From 373535524c9c88f38cfbe558ec38e028221117fb Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Mon, 6 Nov 2023 10:17:13 +0000 Subject: [PATCH 001/135] chore(release): 1.49.0 --- CHANGELOG.md | 16 ++++++++++++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 01631435d2..b9256fa915 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,22 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [1.49.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.48.0...v1.49.0) (2023-11-06) + + +### Features + +* add new destination tiktok_audience ([#2710](https://github.com/rudderlabs/rudder-transformer/issues/2710)) ([9bc0fd8](https://github.com/rudderlabs/rudder-transformer/commit/9bc0fd8efcee44871a190bd6cb9e89c5cf035ff8)) +* onboard one signal to router transform ([#2785](https://github.com/rudderlabs/rudder-transformer/issues/2785)) ([818858e](https://github.com/rudderlabs/rudder-transformer/commit/818858e046ce5f9735bbb97715c43a959ad3aa3c)) +* onboard revenuecat as a source ([#2774](https://github.com/rudderlabs/rudder-transformer/issues/2774)) ([55f9637](https://github.com/rudderlabs/rudder-transformer/commit/55f96374b4d73db7013c1d5e72bfc9c8257b224b)) + + +### Bug Fixes + +* add check to remove null and undefined properties before sending ([#2796](https://github.com/rudderlabs/rudder-transformer/issues/2796)) ([6e89cd3](https://github.com/rudderlabs/rudder-transformer/commit/6e89cd3f67ea887ba17c1cd5ffbca6675f54d96c)) +* allow support for full url from UI in freshsales and freshmarketer ([#2780](https://github.com/rudderlabs/rudder-transformer/issues/2780)) ([570532c](https://github.com/rudderlabs/rudder-transformer/commit/570532ce790c05a69621d9289758a1b1a7acda8c)) +* busgnag issues for klaviyo, freshsales, customeio ([#2795](https://github.com/rudderlabs/rudder-transformer/issues/2795)) ([11fb7c4](https://github.com/rudderlabs/rudder-transformer/commit/11fb7c47910681833e37d25a1573d2005e62742b)) + ## [1.48.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.47.0...v1.48.0) (2023-11-02) diff --git a/package-lock.json b/package-lock.json index 0822a9b42b..5e857f6bb9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "rudder-transformer", - "version": "1.48.0", + "version": "1.49.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "rudder-transformer", - "version": "1.48.0", + "version": "1.49.0", "license": "ISC", "dependencies": { "@amplitude/ua-parser-js": "^0.7.24", diff --git a/package.json b/package.json index 46f728664d..ac0ae2bbeb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rudder-transformer", - "version": "1.48.0", + "version": "1.49.0", "description": "", "homepage": "https://github.com/rudderlabs/rudder-transformer#readme", "bugs": { From c99361b951960224b8220c854f9c509ec2844b52 Mon Sep 17 00:00:00 2001 From: Anant Jain Date: Tue, 7 Nov 2023 12:20:39 +0530 Subject: [PATCH 002/135] chore: comments addressed --- src/v0/destinations/am/transform.js | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/v0/destinations/am/transform.js b/src/v0/destinations/am/transform.js index b74625e273..d7d8f95565 100644 --- a/src/v0/destinations/am/transform.js +++ b/src/v0/destinations/am/transform.js @@ -589,8 +589,8 @@ const processSingleMessage = (message, destination) => { // To be used for track/page calls to associate the event to a group in AM let groupInfo = get(message, 'integrations.Amplitude.groups') || undefined; let category = ConfigCategory.DEFAULT; - let { properties } = message; - const { name, event } = message; + let updatedProperties; + const { name, event, properties } = message; const messageType = message.type.toLowerCase(); const CATEGORY_KEY = 'properties.category'; const { useUserDefinedPageEventName, userProvidedPageEventString } = destination.Config; @@ -623,17 +623,14 @@ const processSingleMessage = (message, destination) => { evType = `Viewed ${updatedName || ''}Page`; } message.properties = { - ...message.properties, + ...properties, name: name || get(message, CATEGORY_KEY), }; category = ConfigCategory.PAGE; break; case EventType.SCREEN: - ({ evType, updatedProperties: properties } = getScreenevTypeAndUpdatedProperties( - message, - CATEGORY_KEY, - )); - message.properties = properties; + ({ evType, updatedProperties } = getScreenevTypeAndUpdatedProperties(message, CATEGORY_KEY)); + message.properties = updatedProperties; category = ConfigCategory.SCREEN; break; case EventType.GROUP: @@ -664,9 +661,9 @@ const processSingleMessage = (message, destination) => { throw new InstrumentationError('Event not present. Please send event field'); } if ( - message.properties && - isDefinedAndNotNull(message.properties?.revenue) && - isDefinedAndNotNull(message.properties?.revenue_type) + properties && + isDefinedAndNotNull(properties?.revenue) && + isDefinedAndNotNull(properties?.revenue_type) ) { // if properties has revenue and revenue_type fields // consider the event as revenue event directly From 54120233ab07bb8c095f91a2dcb90a7d8e5fdf8e Mon Sep 17 00:00:00 2001 From: Anant Jain Date: Tue, 7 Nov 2023 12:49:08 +0530 Subject: [PATCH 003/135] chore: refactor screen code for evType and properties --- src/v0/destinations/am/transform.js | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/v0/destinations/am/transform.js b/src/v0/destinations/am/transform.js index d7d8f95565..04a1c5a107 100644 --- a/src/v0/destinations/am/transform.js +++ b/src/v0/destinations/am/transform.js @@ -196,7 +196,7 @@ const getScreenevTypeAndUpdatedProperties = (message, CATEGORY_KEY) => { const name = message.name || message.event || get(message, CATEGORY_KEY); const updatedName = name ? `${name} ` : ''; return { - evType: `Viewed ${updatedName}Screen`, + eventType: `Viewed ${updatedName}Screen`, updatedProperties: { ...message.properties, name, @@ -589,7 +589,6 @@ const processSingleMessage = (message, destination) => { // To be used for track/page calls to associate the event to a group in AM let groupInfo = get(message, 'integrations.Amplitude.groups') || undefined; let category = ConfigCategory.DEFAULT; - let updatedProperties; const { name, event, properties } = message; const messageType = message.type.toLowerCase(); const CATEGORY_KEY = 'properties.category'; @@ -629,9 +628,15 @@ const processSingleMessage = (message, destination) => { category = ConfigCategory.PAGE; break; case EventType.SCREEN: - ({ evType, updatedProperties } = getScreenevTypeAndUpdatedProperties(message, CATEGORY_KEY)); - message.properties = updatedProperties; - category = ConfigCategory.SCREEN; + { + const { eventType, updatedProperties } = getScreenevTypeAndUpdatedProperties( + message, + CATEGORY_KEY, + ); + evType = eventType; + message.properties = updatedProperties; + category = ConfigCategory.SCREEN; + } break; case EventType.GROUP: evType = 'group'; From b41aebf5f06800dceaf6ededce033b756c385559 Mon Sep 17 00:00:00 2001 From: Abhimanyu Babbar Date: Wed, 8 Nov 2023 11:38:30 +0530 Subject: [PATCH 004/135] chore(dm): added stats for the user transformation batch request (#2788) * added stats for user transform on openfaas * added stats for user transform to ivm --- src/legacy/router.js | 11 ---- src/services/userTransform.ts | 3 - src/util/customTransformer-faas.js | 17 +----- src/util/customTransformer-v1.js | 89 ++++++++++++---------------- src/util/customTransformer.js | 21 ++++--- src/util/customTransformerFactory.js | 28 +++++++-- src/util/openfaas/index.js | 54 +++++++++++------ src/util/prometheus.js | 67 ++++++++++----------- src/util/stats.js | 21 ++++--- 9 files changed, 156 insertions(+), 155 deletions(-) diff --git a/src/legacy/router.js b/src/legacy/router.js index a8c2b49a1a..99fb8570fb 100644 --- a/src/legacy/router.js +++ b/src/legacy/router.js @@ -571,14 +571,9 @@ if (startDestTransformer) { destEvents.length > 0 && destEvents[0].metadata ? getMetadata(destEvents[0].metadata) : {}; - const userFuncStartTime = new Date(); if (transformationVersionId) { let destTransformedEvents; try { - stats.counter('user_transform_function_input_events', destEvents.length, { - processSessions, - ...metaTags, - }); destTransformedEvents = await userTransformHandler()( destEvents, transformationVersionId, @@ -630,12 +625,6 @@ if (startDestTransformer) { processSessions, ...metaTags, }); - } finally { - stats.timing('user_transform_function_latency', userFuncStartTime, { - transformationVersionId, - processSessions, - ...metaTags, - }); } } else { const errorMessage = 'Transformation VersionID not found'; diff --git a/src/services/userTransform.ts b/src/services/userTransform.ts index 18165615a8..4fe1ad0b52 100644 --- a/src/services/userTransform.ts +++ b/src/services/userTransform.ts @@ -85,9 +85,6 @@ export default class UserTransformService { } const userFuncStartTime = new Date(); try { - stats.counter('user_transform_function_input_events', eventsToProcess.length, { - ...metaTags, - }); const destTransformedEvents: UserTransformationResponse[] = await userTransformHandler()( eventsToProcess, transformationVersionId, diff --git a/src/util/customTransformer-faas.js b/src/util/customTransformer-faas.js index 54d2410313..2c0bbfd8c0 100644 --- a/src/util/customTransformer-faas.js +++ b/src/util/customTransformer-faas.js @@ -24,8 +24,8 @@ function generateFunctionName(userTransformation, libraryVersionIds, testMode) { const ids = [userTransformation.workspaceId, userTransformation.versionId].concat( (libraryVersionIds || []).sort(), ); - const hash = crypto.createHash('md5').update(`${ids}`).digest('hex'); + const hash = crypto.createHash('md5').update(`${ids}`).digest('hex'); return `fn-${userTransformation.workspaceId}-${hash}`.substring(0, 63).toLowerCase(); } @@ -127,15 +127,8 @@ async function runOpenFaasUserTransform( if (events.length === 0) { throw new Error('Invalid payload. No events'); } - const metaTags = events[0].metadata ? getMetadata(events[0].metadata) : {}; - const tags = { - transformerVersionId: userTransformation.versionId, - identifier: 'openfaas', - testMode, - ...metaTags, - }; - const trMetadata = events[0].metadata ? getTransformationMetadata(events[0].metadata) : {}; + const trMetadata = events[0].metadata ? getTransformationMetadata(events[0].metadata) : {}; // check and deploy faas function if not exists const functionName = generateFunctionName(userTransformation, libraryVersionIds, testMode); if (testMode) { @@ -148,9 +141,7 @@ async function runOpenFaasUserTransform( ); } - const invokeTime = new Date(); - stats.counter('events_to_process', events.length, tags); - const result = await executeFaasFunction( + return await executeFaasFunction( functionName, events, userTransformation.versionId, @@ -165,8 +156,6 @@ async function runOpenFaasUserTransform( testMode, trMetadata, ); - stats.timing('run_time', invokeTime, tags); - return result; } module.exports = { diff --git a/src/util/customTransformer-v1.js b/src/util/customTransformer-v1.js index 397281d8d9..60f8e493fa 100644 --- a/src/util/customTransformer-v1.js +++ b/src/util/customTransformer-v1.js @@ -1,7 +1,7 @@ const ivm = require('isolated-vm'); const { getFactory } = require('./ivmFactory'); -const { getMetadata } = require('../v0/util'); +const { getMetadata, getTransformationMetadata } = require('../v0/util'); const logger = require('../logger'); const stats = require('./stats'); @@ -54,63 +54,48 @@ async function userTransformHandlerV1( libraryVersionIds, testMode = false, ) { - /* - Removing pool usage to address memory leaks - Env variable ON_DEMAND_ISOLATE_VM is not being used anymore - */ - if (userTransformation.versionId) { - const metaTags = events.length && events[0].metadata ? getMetadata(events[0].metadata) : {}; - const tags = { - transformerVersionId: userTransformation.versionId, - identifier: 'v1', - ...metaTags, - }; - - logger.debug(`Isolate VM being created... `); - const isolatevmFactory = await getFactory( - userTransformation.code, - libraryVersionIds, - userTransformation.versionId, - userTransformation.secrets || {}, - testMode, - ); - const isolatevm = await isolatevmFactory.create(); - logger.debug(`Isolate VM created... `); + if (!userTransformation.versionId) { + return { transformedEvents : events }; + } - // Transform the event... - stats.counter('events_to_process', events.length, tags); - const isolateStartWallTime = calculateMsFromIvmTime(isolatevm.isolateStartWallTime); - const isolateStartCPUTime = calculateMsFromIvmTime(isolatevm.isolateStartCPUTime); + const isolatevmFactory = await getFactory( + userTransformation.code, + libraryVersionIds, + userTransformation.versionId, + userTransformation.secrets || {}, + testMode, + ); - const invokeTime = new Date(); - let transformedEvents; - // Destroy isolatevm in case of execution errors - try { - transformedEvents = await transform(isolatevm, events); - } catch (err) { - logger.error(`Error encountered while executing transformation: ${err.message}`); - isolatevmFactory.destroy(isolatevm); - throw err; - } - const { logs } = isolatevm; - stats.timing('run_time', invokeTime, tags); - const isolateEndWallTime = calculateMsFromIvmTime(isolatevm.isolate.wallTime); - const isolateEndCPUTime = calculateMsFromIvmTime(isolatevm.isolate.cpuTime); + logger.debug(`Creating IsolateVM`); + const isolatevm = await isolatevmFactory.create(); - //TODO: fix "Value is not a valid number: NaN" error and uncomment - //stats.timing('isolate_wall_time', isolateEndWallTime - isolateStartWallTime, tags); - //stats.timing('isolate_cpu_time', isolateEndCPUTime - isolateStartCPUTime, tags); + const invokeTime = new Date(); + let transformedEvents; + let logs; + let transformationError; - // Destroy the isolated vm resources created - logger.debug(`Isolate VM being destroyed... `); + try { + transformedEvents = await transform(isolatevm, events); + logs = isolatevm.logs; + } catch (err) { + logger.error(`Error encountered while executing transformation: ${err.message}`); + transformationError = err; + throw err; + } finally { + logger.debug(`Destroying IsolateVM`); isolatevmFactory.destroy(isolatevm); - logger.debug(`Isolate VM destroyed... `); - - return { transformedEvents, logs }; - // Events contain message and destination. We take the message part of event and run transformation on it. - // And put back the destination after transforrmation + // send the observability stats + const tags = { + identifier: 'v1', + errored: transformationError ? true : false, + ...events.length && events[0].metadata ? getMetadata(events[0].metadata) : {}, + ...events.length && events[0].metadata ? getTransformationMetadata(events[0].metadata) : {} + } + stats.counter('user_transform_function_input_events', events.length, tags); + stats.timing('user_transform_function_latency', invokeTime, tags); } - return { transformedEvents: events }; + + return { transformedEvents, logs }; } async function setUserTransformHandlerV1() { diff --git a/src/util/customTransformer.js b/src/util/customTransformer.js index 90dcea61b2..001fe3216c 100644 --- a/src/util/customTransformer.js +++ b/src/util/customTransformer.js @@ -7,6 +7,7 @@ const { UserTransformHandlerFactory } = require('./customTransformerFactory'); const { parserForImport } = require('./parser'); const stats = require('./stats'); const { fetchWithDnsWrapper } = require('./utils'); +const { getMetadata, getTransformationMetadata } = require('../v0/util'); const ISOLATE_VM_MEMORY = parseInt(process.env.ISOLATE_VM_MEMORY || '128', 10); const GEOLOCATION_TIMEOUT_IN_MS = parseInt(process.env.GEOLOCATION_TIMEOUT_IN_MS || '1000', 10); @@ -19,10 +20,6 @@ async function runUserTransform( versionId, testMode = false, ) { - const tags = { - transformerVersionId: versionId, - identifier: 'v0', - }; // TODO: Decide on the right value for memory limit const isolate = new ivm.Isolate({ memoryLimit: ISOLATE_VM_MEMORY }); const context = await isolate.createContext(); @@ -214,9 +211,6 @@ async function runUserTransform( const customScript = await isolate.compileScript(`${code}`); await customScript.run(context); const fnRef = await jail.get('transform', { reference: true }); - // stat - stats.counter('events_to_process', events.length, tags); - // TODO : check if we can resolve this // eslint-disable-next-line no-async-promise-executor const executionPromise = new Promise(async (resolve, reject) => { const sharedMessagesList = new ivm.ExternalCopy(events).copyInto({ @@ -233,6 +227,7 @@ async function runUserTransform( } }); let result; + let transformationError; const invokeTime = new Date(); try { const timeoutPromise = new Promise((resolve) => { @@ -245,8 +240,8 @@ async function runUserTransform( if (result === 'Timedout') { throw new Error('Timed out'); } - stats.timing('run_time', invokeTime, tags); } catch (error) { + transformationError = error; throw error; } finally { // release function, script, context and isolate @@ -255,6 +250,16 @@ async function runUserTransform( bootstrapScriptResult.release(); context.release(); isolate.dispose(); + + const tags = { + identifier: 'v0', + errored: transformationError ? true : false, + ...events.length && events[0].metadata ? getMetadata(events[0].metadata) : {}, + ...events.length && events[0].metadata ? getTransformationMetadata(events[0].metadata) : {} + } + + stats.counter('user_transform_function_input_events', events.length, tags); + stats.timing('user_transform_function_latency', invokeTime, tags); } return { diff --git a/src/util/customTransformerFactory.js b/src/util/customTransformerFactory.js index 66268db286..1bf10e5d45 100644 --- a/src/util/customTransformerFactory.js +++ b/src/util/customTransformerFactory.js @@ -1,9 +1,15 @@ -const { setOpenFaasUserTransform, runOpenFaasUserTransform } = require('./customTransformer-faas'); +const { + setOpenFaasUserTransform, + runOpenFaasUserTransform, +} = require('./customTransformer-faas'); -const { userTransformHandlerV1, setUserTransformHandlerV1 } = require('./customTransformer-v1'); +const { + userTransformHandlerV1, + setUserTransformHandlerV1, +} = require('./customTransformer-v1'); const UserTransformHandlerFactory = (userTransformation) => { - const transformHandler = { + return { setUserTransform: async (libraryVersionIds) => { switch (userTransformation.language) { case 'pythonfaas': @@ -17,13 +23,23 @@ const UserTransformHandlerFactory = (userTransformation) => { switch (userTransformation.language) { case 'pythonfaas': case 'python': - return runOpenFaasUserTransform(events, userTransformation, libraryVersionIds, testMode); + return runOpenFaasUserTransform( + events, + userTransformation, + libraryVersionIds, + testMode + ); + default: - return userTransformHandlerV1(events, userTransformation, libraryVersionIds, testMode); + return userTransformHandlerV1( + events, + userTransformation, + libraryVersionIds, + testMode + ); } }, }; - return transformHandler; }; exports.UserTransformHandlerFactory = UserTransformHandlerFactory; diff --git a/src/util/openfaas/index.js b/src/util/openfaas/index.js index f80aa01c23..47a69aeb18 100644 --- a/src/util/openfaas/index.js +++ b/src/util/openfaas/index.js @@ -1,6 +1,5 @@ const NodeCache = require('node-cache'); const { - getFunction, deleteFunction, deployFunction, invokeFunction, @@ -8,6 +7,9 @@ const { } = require('./faasApi'); const logger = require('../../logger'); const { RetryRequestError, RespStatusError } = require('../utils'); +const stats = require('../stats'); +const { getMetadata, getTransformationMetadata } = require('../../v0/util'); +const { HTTP_STATUS_CODES } = require('../../v0/util/constant'); const FAAS_BASE_IMG = process.env.FAAS_BASE_IMG || 'rudderlabs/openfaas-flask:main'; const FAAS_MAX_PODS_IN_TEXT = process.env.FAAS_MAX_PODS_IN_TEXT || '40'; @@ -230,41 +232,44 @@ async function setupFaasFunction( } const executeFaasFunction = async ( - functionName, + name, events, versionId, libraryVersionIDs, testMode, trMetadata = {}, ) => { - try { - logger.debug('[Faas] Invoking faas function'); + logger.debug(`Executing faas function: ${name}`); - if (testMode) await awaitFunctionReadiness(functionName); + const startTime = new Date(); + let errorRaised; + + try { + if (testMode) await awaitFunctionReadiness(name); + return await invokeFunction(name, events); - const res = await invokeFunction(functionName, events); - logger.debug('[Faas] Invoked faas function'); - return res; } catch (error) { - logger.error(`[Faas] Error while invoking ${functionName}: ${error.message}`); + logger.error(`Error while invoking ${name}: ${error.message}`); + errorRaised = error; + if ( error.statusCode === 404 && - error.message.includes(`error finding function ${functionName}`) + error.message.includes(`error finding function ${name}`) ) { - removeFunctionFromCache(functionName); + removeFunctionFromCache(name); await setupFaasFunction( - functionName, + name, null, versionId, libraryVersionIDs, testMode, trMetadata, ); - throw new RetryRequestError(`${functionName} not found`); + throw new RetryRequestError(`${name} not found`); } if (error.statusCode === 429) { - throw new RetryRequestError(`Rate limit exceeded for ${functionName}`); + throw new RetryRequestError(`Rate limit exceeded for ${name}`); } if (error.statusCode === 500 || error.statusCode === 503) { @@ -272,16 +277,29 @@ const executeFaasFunction = async ( } if (error.statusCode === 504) { - throw new RespStatusError('Timed out'); + throw new RespStatusError(`${name} timed out`); } throw error; } finally { + // delete the function created, if it's called as part of testMode if (testMode) { - deleteFunction(functionName).catch((err) => { - logger.error(`[Faas] Error while deleting ${functionName}: ${err.message}`); - }); + deleteFunction(name).catch((err) => + logger.error(`[Faas] Error while deleting ${name}: ${err.message}`)) + } + + // setup the tags for observability and then fire the stats + const tags = { + identifier: "openfaas", + testMode: testMode, + errored: errorRaised ? true : false, + statusCode: errorRaised ? errorRaised.statusCode : HTTP_STATUS_CODES.OK, // default statuscode is 200OK + ...events.length && events[0].metadata ? getMetadata(events[0].metadata) : {}, + ...events.length && events[0].metadata ? getTransformationMetadata(events[0].metadata) : {}, } + + stats.counter('user_transform_function_input_events', events.length, tags) + stats.timing('user_transform_function_latency', startTime, tags) } }; diff --git a/src/util/prometheus.js b/src/util/prometheus.js index 9f3255a05d..116f77d214 100644 --- a/src/util/prometheus.js +++ b/src/util/prometheus.js @@ -249,12 +249,6 @@ class Prometheus { type: 'counter', labelNames: ['processSessions'], }, - { - name: 'user_transform_function_input_events', - help: 'user_transform_function_input_events', - type: 'counter', - labelNames: ['processSessions', 'sourceType', 'destinationType', 'k8_namespace'], - }, { name: 'user_transform_errors', help: 'user_transform_errors', @@ -505,20 +499,6 @@ class Prometheus { type: 'counter', labelNames: ['writeKey', 'source'], }, - { - name: 'events_to_process', - help: 'events_to_process', - type: 'counter', - labelNames: [ - 'transformerVersionId', - 'language', - 'identifier', - 'testMode', - 'sourceType', - 'destinationType', - 'k8_namespace', - ], - }, { name: 'get_transformation_code', help: 'get_transformation_code', @@ -668,21 +648,6 @@ class Prometheus { type: 'histogram', labelNames: ['transformerVersionId', 'language', 'identifier', 'publish', 'testMode'], }, - { - name: 'run_time', - help: 'run_time', - type: 'histogram', - labelNames: [ - 'transformerVersionId', - 'language', - 'identifier', - 'publish', - 'testMode', - 'sourceType', - 'destinationType', - 'k8_namespace', - ], - }, { name: 'get_tracking_plan', help: 'get_tracking_plan', type: 'histogram', labelNames: [] }, { name: 'createivm_duration', help: 'createivm_duration', type: 'histogram', labelNames: [] }, { @@ -940,6 +905,38 @@ class Prometheus { type: 'histogram', labelNames: [], }, + { + name: 'user_transform_function_input_events', + help: 'user_transform_function_input_events', + type: 'counter', + labelNames: [ + 'identifier', + 'testMode', + 'sourceType', + 'destinationType', + 'k8_namespace', + 'errored', + 'statusCode', + 'transformationId', + 'workspaceId' + ], + }, + { + name: 'user_transform_function_latency', + help: 'user_transform_function_latency', + type: 'histogram', + labelNames: [ + 'identifier', + 'testMode', + 'sourceType', + 'destinationType', + 'k8_namespace', + 'errored', + 'statusCode', + 'transformationId', + 'workspaceId' + ], + } ]; metrics.forEach((metric) => { diff --git a/src/util/stats.js b/src/util/stats.js index de77362ac1..e57ab85731 100644 --- a/src/util/stats.js +++ b/src/util/stats.js @@ -11,14 +11,19 @@ function init() { return; } - if (statsClientType === 'statsd') { - statsClient = new statsd.Statsd(); - logger.info('created statsd client'); - } else if (statsClientType === 'prometheus') { - statsClient = new prometheus.Prometheus(); - logger.info('created prometheus client'); - } else { - logger.info("Invalid stats client type. Valid values are 'statsd' and 'prometheus'."); + switch (statsClientType) { + case 'statsd': + logger.info("setting up statsd client") + statsClient = new statsd.Statsd(); + break; + + case 'prometheus': + logger.info("setting up prometheus client") + statsClient = new prometheus.Prometheus(); + break; + + default: + logger.error(`invalid stats client type: ${statsClientType}, supported values are 'statsd' and 'prometheues'`) } } From 8be8294b79c3f3ba2a804a30648f047e0a6331c4 Mon Sep 17 00:00:00 2001 From: Mihir Bhalala <77438541+mihir-4116@users.noreply.github.com> Date: Wed, 8 Nov 2023 12:00:05 +0530 Subject: [PATCH 005/135] chore: security upgrade crypto-js from 4.1.1 to 4.2.0 (#2768) fix: package.json & package-lock.json to reduce vulnerabilities The following vulnerabilities are fixed with an upgrade: - https://snyk.io/vuln/SNYK-JS-CRYPTOJS-6028119 Co-authored-by: snyk-bot --- package-lock.json | 7 ++++--- package.json | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5e857f6bb9..f85f4c0516 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26,7 +26,7 @@ "axios": "^1.4.0", "btoa": "^1.2.1", "component-each": "^0.2.6", - "crypto-js": "^4.1.1", + "crypto-js": "^4.2.0", "dotenv": "^16.0.3", "flat": "^5.0.2", "form-data": "^4.0.0", @@ -10608,8 +10608,9 @@ } }, "node_modules/crypto-js": { - "version": "4.1.1", - "license": "MIT" + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz", + "integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==" }, "node_modules/currently-unhandled": { "version": "0.4.1", diff --git a/package.json b/package.json index ac0ae2bbeb..4b57da4d5f 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,7 @@ "axios": "^1.4.0", "btoa": "^1.2.1", "component-each": "^0.2.6", - "crypto-js": "^4.1.1", + "crypto-js": "^4.2.0", "dotenv": "^16.0.3", "flat": "^5.0.2", "form-data": "^4.0.0", From c14b68997d90205d59f30a61723b937a2e88fb43 Mon Sep 17 00:00:00 2001 From: ktgowtham Date: Wed, 8 Nov 2023 12:00:39 +0530 Subject: [PATCH 006/135] chore: security upgrade axios from 1.4.0 to 1.6.0 (#2772) fix: package.json & package-lock.json to reduce vulnerabilities The following vulnerabilities are fixed with an upgrade: - https://snyk.io/vuln/SNYK-JS-AXIOS-6032459 Co-authored-by: snyk-bot --- package-lock.json | 7 ++++--- package.json | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index f85f4c0516..c16855ccfd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,7 +23,7 @@ "ajv": "^8.12.0", "ajv-draft-04": "^1.0.0", "ajv-formats": "^2.1.1", - "axios": "^1.4.0", + "axios": "^1.6.0", "btoa": "^1.2.1", "component-each": "^0.2.6", "crypto-js": "^4.2.0", @@ -8171,8 +8171,9 @@ "license": "MIT" }, "node_modules/axios": { - "version": "1.4.0", - "license": "MIT", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.0.tgz", + "integrity": "sha512-EZ1DYihju9pwVB+jg67ogm+Tmqc6JmhamRN6I4Zt8DfZu5lbcQGw3ozH9lFejSJgs/ibaef3A9PMXPLeefFGJg==", "dependencies": { "follow-redirects": "^1.15.0", "form-data": "^4.0.0", diff --git a/package.json b/package.json index 4b57da4d5f..f0746c9aaf 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,7 @@ "ajv": "^8.12.0", "ajv-draft-04": "^1.0.0", "ajv-formats": "^2.1.1", - "axios": "^1.4.0", + "axios": "^1.6.0", "btoa": "^1.2.1", "component-each": "^0.2.6", "crypto-js": "^4.2.0", From c02370e38fabb581698baa00e1ddd3da93dc07fa Mon Sep 17 00:00:00 2001 From: Anant Jain <62471433+anantjain45823@users.noreply.github.com> Date: Thu, 9 Nov 2023 20:26:15 +0530 Subject: [PATCH 007/135] fix: shopify redis metric when there is no data returned for a key (#2811) fix: shopfify redis metric when there is no data returned for a key --- src/v0/sources/shopify/util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/v0/sources/shopify/util.js b/src/v0/sources/shopify/util.js index 0d81ddc185..2521e9cb9d 100644 --- a/src/v0/sources/shopify/util.js +++ b/src/v0/sources/shopify/util.js @@ -32,7 +32,7 @@ const getDataFromRedis = async (key, metricMetadata) => { ...metricMetadata, }); const redisData = await RedisDB.getVal(key); - if (redisData === null) { + if (redisData === null || (typeof redisData === "object" && Object.keys(redisData).length === 0)) { stats.increment('shopify_redis_no_val', { ...metricMetadata, }); From 8eb1e1d482923004e2f3357e4163a8ea95b9e183 Mon Sep 17 00:00:00 2001 From: Gauravudia <60897972+Gauravudia@users.noreply.github.com> Date: Fri, 10 Nov 2023 12:16:32 +0530 Subject: [PATCH 008/135] chore: import error classes from integrations lib (#2719) --- package-lock.json | 35 ++++++-- package.json | 1 + .../networkhandler/genericNetworkHandler.js | 2 +- src/adapters/utils/networkUtils.js | 2 +- src/cdk/v1/autopilot/transform.js | 2 +- src/cdk/v1/dcm_floodlight/transform.js | 2 +- src/cdk/v1/handler.js | 8 +- src/cdk/v2/bindings/default.js | 2 +- .../v2/destinations/dcm_floodlight/utils.js | 2 +- src/cdk/v2/utils.ts | 2 +- src/helpers/serviceSelector.ts | 2 +- src/services/destination/cdkV1Integration.ts | 2 +- src/services/destination/cdkV2Integration.ts | 2 +- src/util/errorNotifier/bugsnag.js | 9 +- src/util/redis/redisConnector.js | 2 +- .../destinations/active_campaign/transform.js | 10 +-- src/v0/destinations/active_campaign/util.js | 2 +- src/v0/destinations/adj/transform.js | 10 +-- .../destinations/adobe_analytics/transform.js | 10 +-- src/v0/destinations/adobe_analytics/utils.js | 8 +- src/v0/destinations/af/deleteUsers.js | 6 +- src/v0/destinations/af/transform.js | 2 +- src/v0/destinations/airship/transform.js | 2 +- src/v0/destinations/algolia/transform.js | 4 +- src/v0/destinations/algolia/util.js | 2 +- src/v0/destinations/am/deleteUsers.js | 2 +- src/v0/destinations/am/transform.js | 3 +- src/v0/destinations/appcues/transform.js | 2 +- .../destinations/attentive_tag/transform.js | 2 +- src/v0/destinations/attentive_tag/util.js | 2 +- src/v0/destinations/attribution/transform.js | 2 +- src/v0/destinations/autopilot/transform.js | 2 +- src/v0/destinations/awin/transform.js | 2 +- .../destinations/azure_event_hub/transform.js | 1 - src/v0/destinations/blueshift/transform.js | 10 +-- src/v0/destinations/bqstream/transform.js | 2 +- src/v0/destinations/branch/transform.js | 2 +- src/v0/destinations/braze/deleteUsers.js | 2 +- src/v0/destinations/braze/networkHandler.js | 2 +- src/v0/destinations/braze/transform.js | 7 +- src/v0/destinations/braze/util.js | 2 +- .../campaign_manager/networkHandler.js | 2 +- .../campaign_manager/transform.js | 3 +- src/v0/destinations/candu/transform.js | 2 +- src/v0/destinations/canny/transform.js | 2 +- src/v0/destinations/canny/util.js | 2 +- src/v0/destinations/clevertap/deleteUsers.js | 2 +- .../destinations/clevertap/networkHandler.js | 2 +- src/v0/destinations/clevertap/transform.js | 2 +- src/v0/destinations/clickup/transform.js | 2 +- src/v0/destinations/clickup/util.js | 2 +- .../destinations/confluent_cloud/transform.js | 1 - src/v0/destinations/courier/transform.js | 10 +-- .../criteo_audience/networkHandler.js | 14 +-- .../destinations/criteo_audience/transform.js | 2 +- src/v0/destinations/criteo_audience/util.js | 2 +- src/v0/destinations/custify/deleteUsers.js | 6 +- src/v0/destinations/custify/transform.js | 2 +- src/v0/destinations/custify/util.js | 2 +- src/v0/destinations/customerio/transform.js | 2 +- src/v0/destinations/customerio/util.js | 3 +- src/v0/destinations/delighted/transform.js | 10 +-- src/v0/destinations/delighted/util.js | 8 +- src/v0/destinations/discord/transform.js | 2 +- src/v0/destinations/drip/transform.js | 10 +-- src/v0/destinations/drip/util.js | 2 +- src/v0/destinations/engage/deleteUsers.js | 2 +- src/v0/destinations/engage/transform.js | 2 +- src/v0/destinations/eventbridge/transform.js | 2 +- .../facebook_offline_conversions/transform.js | 2 +- .../facebook_offline_conversions/utils.js | 2 +- .../destinations/facebook_pixel/transform.js | 3 +- src/v0/destinations/facebook_pixel/utils.js | 2 +- src/v0/destinations/factorsai/transform.js | 2 +- src/v0/destinations/fb/transform.js | 2 +- .../fb_custom_audience/transform.js | 10 +-- .../destinations/fb_custom_audience/util.js | 2 +- src/v0/destinations/firehose/transform.js | 2 +- .../destinations/freshmarketer/transform.js | 10 +-- src/v0/destinations/freshmarketer/utils.js | 10 +-- src/v0/destinations/freshsales/transform.js | 2 +- src/v0/destinations/freshsales/utils.js | 10 +-- src/v0/destinations/ga/deleteUsers.js | 2 +- src/v0/destinations/ga/networkHandler.js | 2 +- src/v0/destinations/ga/transform.js | 2 +- src/v0/destinations/ga/utils.js | 2 +- src/v0/destinations/ga360/transform.js | 2 +- src/v0/destinations/ga4/networkHandler.js | 2 +- src/v0/destinations/ga4/transform.js | 10 +-- src/v0/destinations/ga4/utils.js | 2 +- src/v0/destinations/gainsight/transform.js | 2 +- src/v0/destinations/gainsight/util.js | 6 +- src/v0/destinations/gainsight_px/transform.js | 2 +- src/v0/destinations/gainsight_px/util.js | 2 +- .../networkHandler.js | 3 +- .../transform.js | 3 +- .../networkHandler.js | 10 +-- .../transform.js | 2 +- .../utils.js | 6 +- .../networkHandler.js | 2 +- .../transform.js | 2 +- .../google_cloud_function/util.js | 2 +- src/v0/destinations/googlepubsub/transform.js | 2 +- src/v0/destinations/googlesheets/transform.js | 2 +- src/v0/destinations/heap/transform.js | 2 +- src/v0/destinations/hs/HSTransform-v1.js | 10 +-- src/v0/destinations/hs/HSTransform-v2.js | 10 +-- src/v0/destinations/hs/transform.js | 2 +- src/v0/destinations/hs/util.js | 12 +-- src/v0/destinations/impact/transform.js | 10 +-- src/v0/destinations/indicative/transform.js | 2 +- src/v0/destinations/intercom/deleteUsers.js | 2 +- .../destinations/intercom/networkHandler.js | 3 +- src/v0/destinations/intercom/transform.js | 2 +- src/v0/destinations/iterable/deleteUsers.js | 2 +- src/v0/destinations/iterable/transform.js | 2 +- src/v0/destinations/iterable/util.js | 2 +- src/v0/destinations/june/transform.js | 2 +- src/v0/destinations/kafka/transform.js | 1 - src/v0/destinations/keen/transform.js | 2 +- src/v0/destinations/kissmetrics/transform.js | 2 +- src/v0/destinations/klaviyo/transform.js | 7 +- src/v0/destinations/klaviyo/util.js | 2 +- src/v0/destinations/kochava/transform.js | 2 +- src/v0/destinations/kustomer/transform.js | 2 +- src/v0/destinations/kustomer/util.js | 2 +- src/v0/destinations/lambda/transform.js | 2 +- src/v0/destinations/leanplum/transform.js | 2 +- src/v0/destinations/lemnisk/transform.js | 10 +-- src/v0/destinations/lemnisk/utils.js | 2 +- src/v0/destinations/lytics/transform.js | 2 +- src/v0/destinations/mailchimp/transform.js | 2 +- src/v0/destinations/mailchimp/utils.js | 2 +- src/v0/destinations/mailjet/transform.js | 2 +- src/v0/destinations/mailmodo/transform.js | 2 +- src/v0/destinations/marketo/transform.js | 10 +-- src/v0/destinations/marketo/util.js | 14 +-- .../marketo_bulk_upload/fetchJobStatus.js | 2 +- .../marketo_bulk_upload/fileUpload.js | 12 +-- .../marketo_bulk_upload.util.test.js | 2 +- .../destinations/marketo_bulk_upload/poll.js | 2 +- .../marketo_bulk_upload/transform.js | 2 +- .../destinations/marketo_bulk_upload/util.js | 4 +- .../marketo_static_list/transform.js | 2 +- .../destinations/marketo_static_list/util.js | 2 +- src/v0/destinations/mautic/transform.js | 10 +-- src/v0/destinations/mautic/utils.js | 6 +- src/v0/destinations/moengage/transform.js | 10 +-- src/v0/destinations/monday/transform.js | 10 +-- src/v0/destinations/monday/util.js | 6 +- src/v0/destinations/monetate/transform.js | 2 +- src/v0/destinations/monetate/utils.js | 2 +- src/v0/destinations/mp/deleteUsers.js | 2 +- src/v0/destinations/mp/transform.js | 2 +- src/v0/destinations/mp/util.js | 2 +- .../ometria/networkResponseHandler.js | 2 +- src/v0/destinations/ometria/transform.js | 2 +- src/v0/destinations/one_signal/transform.js | 10 +-- src/v0/destinations/one_signal/util.js | 2 +- src/v0/destinations/pagerduty/transform.js | 10 +-- src/v0/destinations/pagerduty/util.js | 2 +- src/v0/destinations/pardot/networkHandler.js | 2 +- src/v0/destinations/pardot/transform.js | 2 +- src/v0/destinations/persistiq/transform.js | 2 +- src/v0/destinations/persistiq/util.js | 2 +- src/v0/destinations/personalize/transform.js | 2 +- .../destinations/pinterest_tag/transform.js | 2 +- src/v0/destinations/pinterest_tag/utils.js | 2 +- src/v0/destinations/posthog/transform.js | 2 +- src/v0/destinations/profitwell/transform.js | 6 +- src/v0/destinations/profitwell/utils.js | 5 +- src/v0/destinations/redis/transform.js | 2 +- src/v0/destinations/refiner/transform.js | 2 +- src/v0/destinations/refiner/utils.js | 2 +- src/v0/destinations/revenue_cat/transform.js | 10 +-- src/v0/destinations/rockerbox/transform.js | 2 +- src/v0/destinations/salesforce/transform.js | 5 +- src/v0/destinations/salesforce/utils.js | 2 +- src/v0/destinations/sendgrid/deleteUsers.js | 2 +- src/v0/destinations/sendgrid/transform.js | 10 +-- src/v0/destinations/sendgrid/util.js | 6 +- src/v0/destinations/sendinblue/transform.js | 2 +- src/v0/destinations/sendinblue/util.js | 2 +- src/v0/destinations/serenytics/transform.js | 10 +-- src/v0/destinations/serenytics/utils.js | 2 +- src/v0/destinations/sfmc/transform.js | 6 +- src/v0/destinations/shynet/transform.js | 2 +- src/v0/destinations/signl4/transform.js | 10 +-- src/v0/destinations/singular/transform.js | 2 +- src/v0/destinations/singular/util.js | 2 +- src/v0/destinations/slack/transform.js | 2 +- .../snapchat_conversion/transform.js | 2 +- .../networkHandler.js | 2 +- .../snapchat_custom_audience/transform.js | 2 +- .../snapchat_custom_audience/utils.js | 2 +- src/v0/destinations/splitio/transform.js | 2 +- src/v0/destinations/statsig/transform.js | 2 +- src/v0/destinations/stormly/transform.js | 5 +- .../destinations/tiktok_ads/networkHandler.js | 2 +- src/v0/destinations/tiktok_ads/transform.js | 2 +- .../tiktok_ads_offline_events/transform.js | 2 +- src/v0/destinations/trengo/transform.js | 14 +-- src/v0/destinations/twitter_ads/transform.js | 10 +-- src/v0/destinations/user/transform.js | 10 +-- src/v0/destinations/user/utils.js | 5 +- src/v0/destinations/userlist/transform.js | 2 +- src/v0/destinations/vero/transform.js | 2 +- src/v0/destinations/webengage/transform.js | 2 +- src/v0/destinations/webhook/transform.js | 2 +- src/v0/destinations/woopra/transform.js | 2 +- src/v0/destinations/wootric/transform.js | 2 +- src/v0/destinations/wootric/util.js | 2 +- src/v0/destinations/yahoo_dsp/transform.js | 2 +- src/v0/destinations/yahoo_dsp/util.js | 2 +- src/v0/destinations/zendesk/transform.js | 10 +-- src/v0/destinations/zendesk/util.js | 2 +- src/v0/sources/appsflyer/transform.js | 2 +- src/v0/sources/braze/transform.js | 2 +- src/v0/sources/canny/transform.js | 2 +- src/v0/sources/canny/util.js | 2 +- src/v0/sources/customerio/transform.js | 2 - src/v0/sources/gainsightpx/transform.js | 2 +- src/v0/sources/iterable/transform.js | 2 +- src/v0/sources/mailmodo/transform.js | 2 +- src/v0/sources/monday/transform.js | 2 +- src/v0/sources/shopify/util.js | 2 +- src/v0/util/errorTypes/abortedError.js | 15 ---- src/v0/util/errorTypes/configurationError.js | 16 ---- src/v0/util/errorTypes/index.js | 32 ------- .../util/errorTypes/instrumentationError.js | 15 ---- .../util/errorTypes/invalidAuthTokenError.js | 16 ---- src/v0/util/errorTypes/networkError.js | 29 ------- .../errorTypes/networkInstrumentationError.js | 16 ---- src/v0/util/errorTypes/oAuthSecretError.js | 15 ---- src/v0/util/errorTypes/platformError.js | 14 --- src/v0/util/errorTypes/redisError.js | 15 ---- src/v0/util/errorTypes/retryableError.js | 15 ---- src/v0/util/errorTypes/throttledError.js | 15 ---- src/v0/util/errorTypes/transformationError.js | 14 --- src/v0/util/errorTypes/unauthorizedError.js | 16 ---- .../errorTypes/unhandledStatusCodeError.js | 16 ---- .../util/errorTypes/unsupportedEventError.js | 14 --- src/v0/util/facebookUtils/index.js | 2 +- src/v0/util/facebookUtils/networkHandler.js | 2 +- src/v0/util/index.js | 8 +- src/v0/util/regulation-api.js | 2 +- src/warehouse/identity.js | 2 +- src/warehouse/index.js | 2 +- src/warehouse/util.js | 2 +- src/warehouse/v1/util.js | 2 +- .../pinterest_tag/processor/data.ts | 85 +++++++++++++++++++ 251 files changed, 562 insertions(+), 689 deletions(-) delete mode 100644 src/v0/util/errorTypes/abortedError.js delete mode 100644 src/v0/util/errorTypes/configurationError.js delete mode 100644 src/v0/util/errorTypes/instrumentationError.js delete mode 100644 src/v0/util/errorTypes/invalidAuthTokenError.js delete mode 100644 src/v0/util/errorTypes/networkError.js delete mode 100644 src/v0/util/errorTypes/networkInstrumentationError.js delete mode 100644 src/v0/util/errorTypes/oAuthSecretError.js delete mode 100644 src/v0/util/errorTypes/platformError.js delete mode 100644 src/v0/util/errorTypes/redisError.js delete mode 100644 src/v0/util/errorTypes/retryableError.js delete mode 100644 src/v0/util/errorTypes/throttledError.js delete mode 100644 src/v0/util/errorTypes/transformationError.js delete mode 100644 src/v0/util/errorTypes/unauthorizedError.js delete mode 100644 src/v0/util/errorTypes/unhandledStatusCodeError.js delete mode 100644 src/v0/util/errorTypes/unsupportedEventError.js diff --git a/package-lock.json b/package-lock.json index c16855ccfd..91f984e22c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,6 +19,7 @@ "@koa/router": "^12.0.0", "@ndhoule/extend": "^2.0.0", "@pyroscope/nodejs": "^0.2.6", + "@rudderstack/integrations-lib": "^0.1.8", "@rudderstack/workflow-engine": "^0.5.7", "ajv": "^8.12.0", "ajv-draft-04": "^1.0.0", @@ -6637,6 +6638,25 @@ "node": ">= 8" } }, + "node_modules/@rudderstack/integrations-lib": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/@rudderstack/integrations-lib/-/integrations-lib-0.1.8.tgz", + "integrity": "sha512-f8GX78RFma3XAWPNEI6QjGk4avbE8r9aspHNaYE+YyRKsJGWrl8gw/k+Jso36C0juOGas79GWPSiypbXLu8Q/g==", + "dependencies": { + "@rudderstack/workflow-engine": "^0.5.7", + "axios": "^1.4.0", + "axios-mock-adapter": "^1.22.0", + "crypto": "^1.0.1", + "get-value": "^3.0.1", + "handlebars": "^4.7.8", + "lodash": "^4.17.21", + "moment": "^2.29.4", + "moment-timezone": "^0.5.43", + "set-value": "^4.1.0", + "sha256": "^0.2.0", + "tslib": "^2.4.0" + } + }, "node_modules/@rudderstack/json-template-engine": { "version": "0.5.5", "license": "MIT" @@ -8184,7 +8204,6 @@ "version": "1.22.0", "resolved": "https://registry.npmjs.org/axios-mock-adapter/-/axios-mock-adapter-1.22.0.tgz", "integrity": "sha512-dmI0KbkyAhntUR05YY96qg2H6gg0XMl2+qTW0xmYg6Up+BFBAJYRLROMXRdDEL06/Wqwa0TJThAYvFtSFdRCZw==", - "dev": true, "dependencies": { "fast-deep-equal": "^3.1.3", "is-buffer": "^2.0.5" @@ -8197,7 +8216,6 @@ "version": "2.0.5", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", - "dev": true, "funding": [ { "type": "github", @@ -10608,6 +10626,12 @@ "node": "*" } }, + "node_modules/crypto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/crypto/-/crypto-1.0.1.tgz", + "integrity": "sha512-VxBKmeNcqQdiUQUW2Tzq0t377b54N2bMtXO/qiLa+6eRRmmC4qT3D4OnTGoT/U6O9aklQ/jTwbOtRMTTY8G0Ig==", + "deprecated": "This package is no longer supported. It's now a built-in Node module. If you've depended on crypto, you should switch to the one that's built-in." + }, "node_modules/crypto-js": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz", @@ -13104,11 +13128,12 @@ "license": "MIT" }, "node_modules/handlebars": { - "version": "4.7.7", - "license": "MIT", + "version": "4.7.8", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", + "integrity": "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==", "dependencies": { "minimist": "^1.2.5", - "neo-async": "^2.6.0", + "neo-async": "^2.6.2", "source-map": "^0.6.1", "wordwrap": "^1.0.0" }, diff --git a/package.json b/package.json index f0746c9aaf..bfa2630971 100644 --- a/package.json +++ b/package.json @@ -63,6 +63,7 @@ "@koa/router": "^12.0.0", "@ndhoule/extend": "^2.0.0", "@pyroscope/nodejs": "^0.2.6", + "@rudderstack/integrations-lib": "^0.1.8", "@rudderstack/workflow-engine": "^0.5.7", "ajv": "^8.12.0", "ajv-draft-04": "^1.0.0", diff --git a/src/adapters/networkhandler/genericNetworkHandler.js b/src/adapters/networkhandler/genericNetworkHandler.js index 23bdc1d7a2..bcbcb21259 100644 --- a/src/adapters/networkhandler/genericNetworkHandler.js +++ b/src/adapters/networkhandler/genericNetworkHandler.js @@ -1,7 +1,7 @@ +const { NetworkError } = require('@rudderstack/integrations-lib'); const { isHttpStatusSuccess } = require('../../v0/util/index'); const { proxyRequest, prepareProxyRequest } = require('../network'); const { getDynamicErrorType, processAxiosResponse } = require('../utils/networkUtils'); -const { NetworkError } = require('../../v0/util/errorTypes'); const tags = require('../../v0/util/tags'); /** diff --git a/src/adapters/utils/networkUtils.js b/src/adapters/utils/networkUtils.js index 7f830f5a4b..0dcb9931e9 100644 --- a/src/adapters/utils/networkUtils.js +++ b/src/adapters/utils/networkUtils.js @@ -1,6 +1,7 @@ /* eslint-disable eqeqeq */ const lodash = require('lodash'); const { isEmpty } = require('lodash'); +const { AbortedError } = require('@rudderstack/integrations-lib'); const { isHttpStatusRetryable, isDefinedAndNotNullAndNotEmpty, @@ -9,7 +10,6 @@ const { isHttpStatusSuccess, getErrorStatusCode, } = require('../../v0/util'); -const { AbortedError } = require('../../v0/util/errorTypes'); const tags = require('../../v0/util/tags'); const { HTTP_STATUS_CODES } = require('../../v0/util/constant'); diff --git a/src/cdk/v1/autopilot/transform.js b/src/cdk/v1/autopilot/transform.js index 613b985c0d..b27e50f096 100644 --- a/src/cdk/v1/autopilot/transform.js +++ b/src/cdk/v1/autopilot/transform.js @@ -1,5 +1,5 @@ const { Utils } = require('rudder-transformer-cdk'); -const { InstrumentationError } = require('../../../v0/util/errorTypes'); +const { InstrumentationError } = require('@rudderstack/integrations-lib'); function identifyPostMapper(event, mappedPayload) { const { message } = event; diff --git a/src/cdk/v1/dcm_floodlight/transform.js b/src/cdk/v1/dcm_floodlight/transform.js index d5835d3e2b..bb93333745 100644 --- a/src/cdk/v1/dcm_floodlight/transform.js +++ b/src/cdk/v1/dcm_floodlight/transform.js @@ -5,6 +5,7 @@ const { removeUndefinedAndNullValues, isDefinedAndNotNull, } = require('rudder-transformer-cdk/build/utils'); +const { ConfigurationError, InstrumentationError } = require('@rudderstack/integrations-lib'); const { getIntegrationsObj, isEmpty, @@ -14,7 +15,6 @@ const { } = require('../../../v0/util'); const { GENERIC_TRUE_VALUES, GENERIC_FALSE_VALUES } = require('../../../constants'); const { BASE_URL, BLACKLISTED_CHARACTERS } = require('./config'); -const { ConfigurationError, InstrumentationError } = require('../../../v0/util/errorTypes'); // append properties to endpoint // eg: ${BASE_URL}key1=value1;key2=value2;.... diff --git a/src/cdk/v1/handler.js b/src/cdk/v1/handler.js index a7dfe85a9f..0af0859f49 100644 --- a/src/cdk/v1/handler.js +++ b/src/cdk/v1/handler.js @@ -6,13 +6,13 @@ const path = require('path'); const basePath = path.resolve(__dirname); ConfigFactory.init({ basePath, loggingMode: 'production' }); -const tags = require('../../v0/util/tags'); -const { generateErrorObject } = require('../../v0/util'); const { + InstrumentationError, TransformationError, ConfigurationError, - InstrumentationError, -} = require('../../v0/util/errorTypes'); +} = require('@rudderstack/integrations-lib'); +const tags = require('../../v0/util/tags'); +const { generateErrorObject } = require('../../v0/util'); const defTags = { [tags.TAG_NAMES.IMPLEMENTATION]: tags.IMPLEMENTATIONS.CDK_V1, diff --git a/src/cdk/v2/bindings/default.js b/src/cdk/v2/bindings/default.js index b86b6d2b63..a447370aca 100644 --- a/src/cdk/v2/bindings/default.js +++ b/src/cdk/v2/bindings/default.js @@ -3,7 +3,7 @@ const { InstrumentationError, ConfigurationError, NetworkError, -} = require('../../../v0/util/errorTypes'); +} = require('@rudderstack/integrations-lib'); const { isHttpStatusSuccess } = require('../../../v0/util'); const { getDynamicErrorType } = require('../../../adapters/utils/networkUtils'); const tags = require('../../../v0/util/tags'); diff --git a/src/cdk/v2/destinations/dcm_floodlight/utils.js b/src/cdk/v2/destinations/dcm_floodlight/utils.js index bee45bdea3..07b158efa3 100644 --- a/src/cdk/v2/destinations/dcm_floodlight/utils.js +++ b/src/cdk/v2/destinations/dcm_floodlight/utils.js @@ -1,7 +1,7 @@ const lodash = require('lodash'); +const { InstrumentationError } = require('@rudderstack/integrations-lib'); const { getValueFromPropertiesOrTraits, getHashFromArray } = require('../../../../v0/util'); const { GENERIC_TRUE_VALUES, GENERIC_FALSE_VALUES } = require('../../../../constants'); -const { InstrumentationError } = require('../../../../v0/util/errorTypes'); // valid flag should be provided [1|true] or [0|false] const mapFlagValue = (key, value) => { diff --git a/src/cdk/v2/utils.ts b/src/cdk/v2/utils.ts index 3fb26c07e0..f9a5c66937 100644 --- a/src/cdk/v2/utils.ts +++ b/src/cdk/v2/utils.ts @@ -1,9 +1,9 @@ import path from 'path'; import fs from 'fs/promises'; import { WorkflowExecutionError, WorkflowCreationError } from '@rudderstack/workflow-engine'; +import { PlatformError } from '@rudderstack/integrations-lib'; import logger from '../../logger'; import { generateErrorObject } from '../../v0/util'; -import { PlatformError } from '../../v0/util/errorTypes'; import tags from '../../v0/util/tags'; import { CatchErr } from '../../util/types'; diff --git a/src/helpers/serviceSelector.ts b/src/helpers/serviceSelector.ts index bac1a17c16..891c21313d 100644 --- a/src/helpers/serviceSelector.ts +++ b/src/helpers/serviceSelector.ts @@ -1,3 +1,4 @@ +import { PlatformError } from '@rudderstack/integrations-lib'; import { ProcessorTransformationRequest, RouterTransformationRequestData } from '../types/index'; import { INTEGRATION_SERVICE } from '../routes/utils/constants'; import CDKV1DestinationService from '../services/destination/cdkV1Integration'; @@ -6,7 +7,6 @@ import DestinationService from '../interfaces/DestinationService'; import NativeIntegrationDestinationService from '../services/destination/nativeIntegration'; import SourceService from '../interfaces/SourceService'; import NativeIntegrationSourceService from '../services/source/nativeIntegration'; -import { PlatformError } from '../v0/util/errorTypes'; import ComparatorService from '../services/comparator'; import { FixMe } from '../util/types'; diff --git a/src/services/destination/cdkV1Integration.ts b/src/services/destination/cdkV1Integration.ts index a016665afb..2f655fca9b 100644 --- a/src/services/destination/cdkV1Integration.ts +++ b/src/services/destination/cdkV1Integration.ts @@ -1,6 +1,7 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ import { ConfigFactory, Executor, RudderBaseConfig } from 'rudder-transformer-cdk'; import path from 'path'; +import { TransformationError } from '@rudderstack/integrations-lib'; import IntegrationDestinationService from '../../interfaces/DestinationService'; import { DeliveryResponse, @@ -14,7 +15,6 @@ import { UserDeletionRequest, UserDeletionResponse, } from '../../types/index'; -import { TransformationError } from '../../v0/util/errorTypes'; import DestinationPostTransformationService from './postTransformation'; import tags from '../../v0/util/tags'; import { getErrorInfo } from '../../cdk/v1/handler'; diff --git a/src/services/destination/cdkV2Integration.ts b/src/services/destination/cdkV2Integration.ts index b4c0a15e87..bc5a1126a8 100644 --- a/src/services/destination/cdkV2Integration.ts +++ b/src/services/destination/cdkV2Integration.ts @@ -1,6 +1,7 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ /* eslint-disable class-methods-use-this */ import groupBy from 'lodash/groupBy'; +import { TransformationError } from '@rudderstack/integrations-lib'; import { processCdkV2Workflow } from '../../cdk/v2/handler'; import IntegrationDestinationService from '../../interfaces/DestinationService'; import { @@ -15,7 +16,6 @@ import { UserDeletionRequest, UserDeletionResponse, } from '../../types/index'; -import { TransformationError } from '../../v0/util/errorTypes'; import tags from '../../v0/util/tags'; import DestinationPostTransformationService from './postTransformation'; import stats from '../../util/stats'; diff --git a/src/util/errorNotifier/bugsnag.js b/src/util/errorNotifier/bugsnag.js index a88432f23d..ef01c58730 100644 --- a/src/util/errorNotifier/bugsnag.js +++ b/src/util/errorNotifier/bugsnag.js @@ -5,9 +5,6 @@ const { DataValidationError, } = require('rudder-transformer-cdk/build/error/index'); const stackTraceParser = require('stacktrace-parser'); -const { logger } = require('../../logger'); -const pkg = require('../../../package.json'); - const { BaseError, TransformationError, @@ -23,8 +20,10 @@ const { UnhandledStatusCodeError, UnauthorizedError, NetworkInstrumentationError, - FilteredEventsError, -} = require('../../v0/util/errorTypes'); +} = require('@rudderstack/integrations-lib'); +const { FilteredEventsError } = require('../../v0/util/errorTypes'); +const { logger } = require('../../logger'); +const pkg = require('../../../package.json'); const { BUGSNAG_API_KEY: apiKey, diff --git a/src/util/redis/redisConnector.js b/src/util/redis/redisConnector.js index 749e23ff83..84d578d3b3 100644 --- a/src/util/redis/redisConnector.js +++ b/src/util/redis/redisConnector.js @@ -1,5 +1,5 @@ const Redis = require('ioredis'); -const { RedisError } = require('../../v0/util/errorTypes'); +const { RedisError } = require('@rudderstack/integrations-lib'); const log = require('../../logger'); const stats = require('../stats'); diff --git a/src/v0/destinations/active_campaign/transform.js b/src/v0/destinations/active_campaign/transform.js index 9c6643ebc3..e00808622d 100644 --- a/src/v0/destinations/active_campaign/transform.js +++ b/src/v0/destinations/active_campaign/transform.js @@ -1,6 +1,11 @@ /* eslint-disable array-callback-return */ /* eslint-disable no-empty */ const get = require('get-value'); +const { + InstrumentationError, + TransformationError, + NetworkError, +} = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { CONFIG_CATEGORIES, MAPPING_CONFIG, getHeader } = require('./config'); const { @@ -12,11 +17,6 @@ const { } = require('../../util'); const { errorHandler } = require('./util'); const { httpGET, httpPOST } = require('../../../adapters/network'); -const { - InstrumentationError, - TransformationError, - NetworkError, -} = require('../../util/errorTypes'); const { getDynamicErrorType } = require('../../../adapters/utils/networkUtils'); const tags = require('../../util/tags'); diff --git a/src/v0/destinations/active_campaign/util.js b/src/v0/destinations/active_campaign/util.js index c508618336..6e1f5a3683 100644 --- a/src/v0/destinations/active_campaign/util.js +++ b/src/v0/destinations/active_campaign/util.js @@ -1,8 +1,8 @@ +const { NetworkError } = require('@rudderstack/integrations-lib'); const { nodeSysErrorToStatus, getDynamicErrorType, } = require('../../../adapters/utils/networkUtils'); -const { NetworkError } = require('../../util/errorTypes'); const tags = require('../../util/tags'); const errorHandler = (err, message) => { diff --git a/src/v0/destinations/adj/transform.js b/src/v0/destinations/adj/transform.js index 695654e58a..8248e731c9 100644 --- a/src/v0/destinations/adj/transform.js +++ b/src/v0/destinations/adj/transform.js @@ -1,4 +1,9 @@ const get = require('get-value'); +const { + InstrumentationError, + TransformationError, + ConfigurationError, +} = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { CONFIG_CATEGORIES, MAPPING_CONFIG, baseEndpoint } = require('./config'); const { @@ -11,11 +16,6 @@ const { isAppleFamily, simpleProcessRouterDest, } = require('../../util'); -const { - InstrumentationError, - TransformationError, - ConfigurationError, -} = require('../../util/errorTypes'); const rejectParams = ['revenue', 'currency']; diff --git a/src/v0/destinations/adobe_analytics/transform.js b/src/v0/destinations/adobe_analytics/transform.js index 67bb66310a..a805e379ff 100644 --- a/src/v0/destinations/adobe_analytics/transform.js +++ b/src/v0/destinations/adobe_analytics/transform.js @@ -1,5 +1,10 @@ const jsonxml = require('jsontoxml'); const get = require('get-value'); +const { + InstrumentationError, + TransformationError, + ConfigurationError, +} = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { ECOM_PRODUCT_EVENTS, commonConfig, formatDestinationConfig } = require('./config'); const { @@ -14,11 +19,6 @@ const { removeUndefinedAndNullValues, simpleProcessRouterDest, } = require('../../util'); -const { - InstrumentationError, - TransformationError, - ConfigurationError, -} = require('../../util/errorTypes'); const { handleContextData, diff --git a/src/v0/destinations/adobe_analytics/utils.js b/src/v0/destinations/adobe_analytics/utils.js index 55059884b1..cbd4f51c23 100644 --- a/src/v0/destinations/adobe_analytics/utils.js +++ b/src/v0/destinations/adobe_analytics/utils.js @@ -4,8 +4,8 @@ /* eslint-disable unicorn/no-for-loop */ /* eslint-disable no-restricted-syntax */ const get = require('get-value'); +const { InstrumentationError } = require('@rudderstack/integrations-lib'); const { isDefinedAndNotNull, getValueFromMessage } = require('../../util'); -const { InstrumentationError } = require('../../util/errorTypes'); const SOURCE_KEYS = ['properties', 'traits', 'context.traits', 'context']; @@ -147,13 +147,13 @@ function rudderPropToDestMapWithDelimitter(mapping, delimMapping, message, prefi `${prefix} mapping properties variable is neither a string nor an array`, ); } - + if (typeof val === 'string') { /* following regex is used to find the one or more commas separated/padded by white spaces. Example: val = 'r15,faze90R' , 'r1v, bvp, pol' */ - val = val.replace(/\s*,+\s*/g, delimMapping[key]); - // Above regex is good as for every comma with whitespace padding the no. of steps will increase by 4. + val = val.replace(/\s*,+\s*/g, delimMapping[key]); + // Above regex is good as for every comma with whitespace padding the no. of steps will increase by 4. } else { val = val.join(delimMapping[key]); } diff --git a/src/v0/destinations/af/deleteUsers.js b/src/v0/destinations/af/deleteUsers.js index 7970d02c20..2d68549fcc 100644 --- a/src/v0/destinations/af/deleteUsers.js +++ b/src/v0/destinations/af/deleteUsers.js @@ -1,12 +1,16 @@ /* eslint-disable no-await-in-loop */ /* eslint-disable no-param-reassign */ +const { + ConfigurationError, + InstrumentationError, + NetworkError, +} = require('@rudderstack/integrations-lib'); const { httpPOST } = require('../../../adapters/network'); const { processAxiosResponse, getDynamicErrorType, } = require('../../../adapters/utils/networkUtils'); const { generateUUID, isHttpStatusSuccess } = require('../../util'); -const { ConfigurationError, InstrumentationError, NetworkError } = require('../../util/errorTypes'); const tags = require('../../util/tags'); const { executeCommonValidations } = require('../../util/regulation-api'); diff --git a/src/v0/destinations/af/transform.js b/src/v0/destinations/af/transform.js index 858adce147..4d7ed7e635 100644 --- a/src/v0/destinations/af/transform.js +++ b/src/v0/destinations/af/transform.js @@ -1,6 +1,7 @@ const get = require('get-value'); const set = require('set-value'); +const { InstrumentationError, ConfigurationError } = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { removeUndefinedValues, @@ -15,7 +16,6 @@ const { isDefinedAndNotNullAndNotEmpty, simpleProcessRouterDest, } = require('../../util'); -const { InstrumentationError, ConfigurationError } = require('../../util/errorTypes'); const { Event, ENDPOINT, ConfigCategory, mappingConfig, nameToEventMap } = require('./config'); const { JSON_MIME_TYPE } = require('../../util/constant'); diff --git a/src/v0/destinations/airship/transform.js b/src/v0/destinations/airship/transform.js index a390ec8060..091c9b7f39 100644 --- a/src/v0/destinations/airship/transform.js +++ b/src/v0/destinations/airship/transform.js @@ -1,3 +1,4 @@ +const { InstrumentationError, ConfigurationError } = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { @@ -22,7 +23,6 @@ const { isEmptyObject, simpleProcessRouterDest, } = require('../../util'); -const { InstrumentationError, ConfigurationError } = require('../../util/errorTypes'); const { JSON_MIME_TYPE } = require('../../util/constant'); const DEFAULT_ACCEPT_HEADER = 'application/vnd.urbanairship+json; version=3'; diff --git a/src/v0/destinations/algolia/transform.js b/src/v0/destinations/algolia/transform.js index c8b9be28dd..8e9cd57e8b 100644 --- a/src/v0/destinations/algolia/transform.js +++ b/src/v0/destinations/algolia/transform.js @@ -1,10 +1,10 @@ const set = require('set-value'); -const { EventType } = require('../../../constants'); const { InstrumentationError, ConfigurationError, PlatformError, -} = require('../../util/errorTypes'); +} = require('@rudderstack/integrations-lib'); +const { EventType } = require('../../../constants'); const { getValueFromMessage, constructPayload, diff --git a/src/v0/destinations/algolia/util.js b/src/v0/destinations/algolia/util.js index 89048f0e43..eddb4dc16d 100644 --- a/src/v0/destinations/algolia/util.js +++ b/src/v0/destinations/algolia/util.js @@ -1,5 +1,5 @@ +const { InstrumentationError } = require('@rudderstack/integrations-lib'); const logger = require('../../../logger'); -const { InstrumentationError } = require('../../util/errorTypes'); const { EVENT_TYPES } = require('./config'); /** diff --git a/src/v0/destinations/am/deleteUsers.js b/src/v0/destinations/am/deleteUsers.js index c0402284b4..578c58fb5c 100644 --- a/src/v0/destinations/am/deleteUsers.js +++ b/src/v0/destinations/am/deleteUsers.js @@ -1,4 +1,5 @@ const btoa = require('btoa'); +const { ConfigurationError, NetworkError } = require('@rudderstack/integrations-lib'); const { httpPOST } = require('../../../adapters/network'); const tags = require('../../util/tags'); const { @@ -6,7 +7,6 @@ const { getDynamicErrorType, } = require('../../../adapters/utils/networkUtils'); const { isHttpStatusSuccess } = require('../../util'); -const { ConfigurationError, NetworkError } = require('../../util/errorTypes'); const { executeCommonValidations } = require('../../util/regulation-api'); const { DELETE_MAX_BATCH_SIZE } = require('./config'); const { getUserIdBatches } = require('../../util/deleteUserUtils'); diff --git a/src/v0/destinations/am/transform.js b/src/v0/destinations/am/transform.js index 04a1c5a107..d7101982a7 100644 --- a/src/v0/destinations/am/transform.js +++ b/src/v0/destinations/am/transform.js @@ -4,6 +4,7 @@ const cloneDeep = require('lodash/cloneDeep'); const get = require('get-value'); const set = require('set-value'); +const { InstrumentationError, ConfigurationError } = require('@rudderstack/integrations-lib'); const { EventType, SpecedTraits, @@ -44,7 +45,7 @@ const tags = require('../../util/tags'); const AMUtils = require('./utils'); const logger = require('../../../logger'); -const { InstrumentationError, ConfigurationError } = require('../../util/errorTypes'); + const { JSON_MIME_TYPE } = require('../../util/constant'); const EVENTS_KEY_PATH = 'body.JSON.events'; diff --git a/src/v0/destinations/appcues/transform.js b/src/v0/destinations/appcues/transform.js index 095256cc4e..57a54bce33 100644 --- a/src/v0/destinations/appcues/transform.js +++ b/src/v0/destinations/appcues/transform.js @@ -1,4 +1,5 @@ /* eslint-disable no-underscore-dangle */ +const { InstrumentationError } = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { @@ -9,7 +10,6 @@ const { simpleProcessRouterDest, } = require('../../util'); const { JSON_MIME_TYPE } = require('../../util/constant'); -const { InstrumentationError } = require('../../util/errorTypes'); const { ConfigCategory, mappingConfig, getEndpoint } = require('./config'); diff --git a/src/v0/destinations/attentive_tag/transform.js b/src/v0/destinations/attentive_tag/transform.js index 231beec143..fa05eb6c21 100644 --- a/src/v0/destinations/attentive_tag/transform.js +++ b/src/v0/destinations/attentive_tag/transform.js @@ -1,4 +1,5 @@ const get = require('get-value'); +const { InstrumentationError, ConfigurationError } = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { ConfigCategory, mappingConfig, BASE_URL } = require('./config'); const { @@ -18,7 +19,6 @@ const { getPropertiesKeyValidation, validateTimestamp, } = require('./util'); -const { InstrumentationError, ConfigurationError } = require('../../util/errorTypes'); const { JSON_MIME_TYPE } = require('../../util/constant'); const responseBuilder = (payload, apiKey, endpoint) => { diff --git a/src/v0/destinations/attentive_tag/util.js b/src/v0/destinations/attentive_tag/util.js index 890f73cdc9..c96d03028f 100644 --- a/src/v0/destinations/attentive_tag/util.js +++ b/src/v0/destinations/attentive_tag/util.js @@ -1,13 +1,13 @@ /* eslint-disable no-restricted-syntax */ const get = require('get-value'); const moment = require('moment'); +const { InstrumentationError } = require('@rudderstack/integrations-lib'); const { constructPayload, isDefinedAndNotNull, getDestinationExternalID, isDefinedAndNotNullAndNotEmpty, } = require('../../util'); -const { InstrumentationError } = require('../../util/errorTypes'); const { mappingConfig, ConfigCategory } = require('./config'); /** diff --git a/src/v0/destinations/attribution/transform.js b/src/v0/destinations/attribution/transform.js index 712f3e5e5d..fa42a6238a 100644 --- a/src/v0/destinations/attribution/transform.js +++ b/src/v0/destinations/attribution/transform.js @@ -1,3 +1,4 @@ +const { InstrumentationError, ConfigurationError } = require('@rudderstack/integrations-lib'); const { batchEndpoint } = require('./config'); const { defaultPostRequestConfig, @@ -5,7 +6,6 @@ const { removeUndefinedAndNullValues, getFieldValueFromMessage, } = require('../../util'); -const { InstrumentationError, ConfigurationError } = require('../../util/errorTypes'); const { JSON_MIME_TYPE } = require('../../util/constant'); function responseBuilderSimple(payload, attributionConfig) { diff --git a/src/v0/destinations/autopilot/transform.js b/src/v0/destinations/autopilot/transform.js index e0fe9aa400..e4a2c408af 100644 --- a/src/v0/destinations/autopilot/transform.js +++ b/src/v0/destinations/autopilot/transform.js @@ -1,3 +1,4 @@ +const { InstrumentationError, TransformationError } = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { CONFIG_CATEGORIES, MAPPING_CONFIG } = require('./config'); const { @@ -9,7 +10,6 @@ const { simpleProcessRouterDest, } = require('../../util'); -const { InstrumentationError, TransformationError } = require('../../util/errorTypes'); const { JSON_MIME_TYPE } = require('../../util/constant'); const identifyFields = [ diff --git a/src/v0/destinations/awin/transform.js b/src/v0/destinations/awin/transform.js index f6070fccd5..49a115c1ff 100644 --- a/src/v0/destinations/awin/transform.js +++ b/src/v0/destinations/awin/transform.js @@ -1,8 +1,8 @@ +const { InstrumentationError, ConfigurationError } = require('@rudderstack/integrations-lib'); const { BASE_URL, ConfigCategory, mappingConfig } = require('./config'); const { defaultRequestConfig, constructPayload, simpleProcessRouterDest } = require('../../util'); const { getParams } = require('./utils'); -const { InstrumentationError, ConfigurationError } = require('../../util/errorTypes'); const responseBuilder = (message, { Config }) => { const { advertiserId, eventsToTrack } = Config; diff --git a/src/v0/destinations/azure_event_hub/transform.js b/src/v0/destinations/azure_event_hub/transform.js index 6200e32ce7..98180b55b4 100644 --- a/src/v0/destinations/azure_event_hub/transform.js +++ b/src/v0/destinations/azure_event_hub/transform.js @@ -1,6 +1,5 @@ const cloneDeep = require('lodash/cloneDeep'); const { getIntegrationsObj } = require('../../util'); -// const { InstrumentationError } = require("../../util/errorTypes"); function process(event) { const { message, destination } = event; diff --git a/src/v0/destinations/blueshift/transform.js b/src/v0/destinations/blueshift/transform.js index b79af327d2..cdfbfe32e1 100644 --- a/src/v0/destinations/blueshift/transform.js +++ b/src/v0/destinations/blueshift/transform.js @@ -1,3 +1,8 @@ +const { + TransformationError, + InstrumentationError, + ConfigurationError, +} = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { constructPayload, @@ -10,11 +15,6 @@ const { simpleProcessRouterDest, } = require('../../util'); const { JSON_MIME_TYPE } = require('../../util/constant'); -const { - TransformationError, - InstrumentationError, - ConfigurationError, -} = require('../../util/errorTypes'); const { MAPPING_CONFIG, diff --git a/src/v0/destinations/bqstream/transform.js b/src/v0/destinations/bqstream/transform.js index 55679b08a8..598a97946d 100644 --- a/src/v0/destinations/bqstream/transform.js +++ b/src/v0/destinations/bqstream/transform.js @@ -1,5 +1,6 @@ /* eslint-disable no-console */ const lodash = require('lodash'); +const { InstrumentationError } = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { defaultBatchRequestConfig, @@ -9,7 +10,6 @@ const { groupEventsByType, } = require('../../util'); const { MAX_ROWS_PER_REQUEST, DESTINATION } = require('./config'); -const { InstrumentationError } = require('../../util/errorTypes'); const { getRearrangedEvents } = require('./util'); const getInsertIdColValue = (properties, insertIdCol) => { diff --git a/src/v0/destinations/branch/transform.js b/src/v0/destinations/branch/transform.js index 0d47fbd791..23dcd6c8db 100644 --- a/src/v0/destinations/branch/transform.js +++ b/src/v0/destinations/branch/transform.js @@ -1,4 +1,5 @@ const get = require('get-value'); +const { InstrumentationError } = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { endpoints } = require('./config'); const { categoriesList } = require('./data/eventMapping'); @@ -11,7 +12,6 @@ const { isAppleFamily, simpleProcessRouterDest, } = require('../../util'); -const { InstrumentationError } = require('../../util/errorTypes'); const { JSON_MIME_TYPE } = require('../../util/constant'); function responseBuilder(payload, message, destination, category) { diff --git a/src/v0/destinations/braze/deleteUsers.js b/src/v0/destinations/braze/deleteUsers.js index 799aa3f9b4..b94d901138 100644 --- a/src/v0/destinations/braze/deleteUsers.js +++ b/src/v0/destinations/braze/deleteUsers.js @@ -1,3 +1,4 @@ +const { NetworkError, ConfigurationError } = require('@rudderstack/integrations-lib'); const { httpPOST } = require('../../../adapters/network'); const { processAxiosResponse, @@ -8,7 +9,6 @@ const { isHttpStatusSuccess } = require('../../util'); const { executeCommonValidations } = require('../../util/regulation-api'); const { DEL_MAX_BATCH_SIZE } = require('./config'); const { getUserIdBatches } = require('../../util/deleteUserUtils'); -const { NetworkError, ConfigurationError } = require('../../util/errorTypes'); const { JSON_MIME_TYPE } = require('../../util/constant'); const userDeletionHandler = async (userAttributes, config) => { diff --git a/src/v0/destinations/braze/networkHandler.js b/src/v0/destinations/braze/networkHandler.js index a141607fe9..c6cf7222ea 100644 --- a/src/v0/destinations/braze/networkHandler.js +++ b/src/v0/destinations/braze/networkHandler.js @@ -1,4 +1,5 @@ /* eslint-disable no-unused-vars */ +const { NetworkError } = require('@rudderstack/integrations-lib'); const { isHttpStatusSuccess } = require('../../util/index'); const { proxyRequest, prepareProxyRequest } = require('../../../adapters/network'); const { @@ -6,7 +7,6 @@ const { processAxiosResponse, } = require('../../../adapters/utils/networkUtils'); const { DESTINATION } = require('./config'); -const { NetworkError } = require('../../util/errorTypes'); const tags = require('../../util/tags'); const stats = require('../../../util/stats'); diff --git a/src/v0/destinations/braze/transform.js b/src/v0/destinations/braze/transform.js index 26fd86b3dd..b939e1f414 100644 --- a/src/v0/destinations/braze/transform.js +++ b/src/v0/destinations/braze/transform.js @@ -1,6 +1,8 @@ /* eslint-disable no-nested-ternary,no-param-reassign */ const lodash = require('lodash'); const get = require('get-value'); +const { InstrumentationError, NetworkError } = require('@rudderstack/integrations-lib'); +const { FilteredEventsError } = require('../../util/errorTypes'); const { BrazeDedupUtility, CustomAttributeOperationUtil, @@ -24,11 +26,6 @@ const { simpleProcessRouterDest, isNewStatusCodesAccepted, } = require('../../util'); -const { - InstrumentationError, - NetworkError, - FilteredEventsError, -} = require('../../util/errorTypes'); const { ConfigCategory, mappingConfig, diff --git a/src/v0/destinations/braze/util.js b/src/v0/destinations/braze/util.js index b3e60f2c6a..9b5d57d6bc 100644 --- a/src/v0/destinations/braze/util.js +++ b/src/v0/destinations/braze/util.js @@ -25,7 +25,7 @@ const { const { JSON_MIME_TYPE, HTTP_STATUS_CODES } = require('../../util/constant'); const { isObject } = require('../../util'); const { removeUndefinedValues, getIntegrationsObj } = require('../../util'); -const { InstrumentationError } = require('../../util/errorTypes'); +const { InstrumentationError } = require('@rudderstack/integrations-lib'); const getEndpointFromConfig = (destination) => { // Init -- mostly for test cases diff --git a/src/v0/destinations/campaign_manager/networkHandler.js b/src/v0/destinations/campaign_manager/networkHandler.js index cd98de253e..0683b0c55c 100644 --- a/src/v0/destinations/campaign_manager/networkHandler.js +++ b/src/v0/destinations/campaign_manager/networkHandler.js @@ -1,3 +1,4 @@ +const { AbortedError, RetryableError, NetworkError } = require('@rudderstack/integrations-lib'); const { prepareProxyRequest, proxyRequest } = require('../../../adapters/network'); const { isHttpStatusSuccess, getAuthErrCategoryFromStCode } = require('../../util/index'); @@ -5,7 +6,6 @@ const { processAxiosResponse, getDynamicErrorType, } = require('../../../adapters/utils/networkUtils'); -const { AbortedError, RetryableError, NetworkError } = require('../../util/errorTypes'); const tags = require('../../util/tags'); function checkIfFailuresAreRetryable(response) { diff --git a/src/v0/destinations/campaign_manager/transform.js b/src/v0/destinations/campaign_manager/transform.js index af097e5b4c..7b6d6cba4c 100644 --- a/src/v0/destinations/campaign_manager/transform.js +++ b/src/v0/destinations/campaign_manager/transform.js @@ -1,3 +1,4 @@ +const { InstrumentationError } = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { @@ -19,8 +20,6 @@ const { } = require('./config'); const { convertToMicroseconds } = require('./util'); - -const { InstrumentationError } = require('../../util/errorTypes'); const { JSON_MIME_TYPE } = require('../../util/constant'); function isEmptyObject(obj) { diff --git a/src/v0/destinations/candu/transform.js b/src/v0/destinations/candu/transform.js index 659af36540..d114998484 100644 --- a/src/v0/destinations/candu/transform.js +++ b/src/v0/destinations/candu/transform.js @@ -1,3 +1,4 @@ +const { InstrumentationError, ConfigurationError } = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { defaultRequestConfig, @@ -6,7 +7,6 @@ const { simpleProcessRouterDest, } = require('../../util'); const { JSON_MIME_TYPE } = require('../../util/constant'); -const { InstrumentationError, ConfigurationError } = require('../../util/errorTypes'); const { endpoint, identifyDataMapping, trackDataMapping } = require('./config'); const responseBuilder = (body, { Config }) => { diff --git a/src/v0/destinations/canny/transform.js b/src/v0/destinations/canny/transform.js index d837a8ddd3..f4364e1fb7 100644 --- a/src/v0/destinations/canny/transform.js +++ b/src/v0/destinations/canny/transform.js @@ -1,3 +1,4 @@ +const { InstrumentationError, ConfigurationError } = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { ConfigCategory, mappingConfig, BASE_URL } = require('./config'); const { @@ -14,7 +15,6 @@ const { validateCreatePostFields, validateEventMapping, } = require('./util'); -const { InstrumentationError, ConfigurationError } = require('../../util/errorTypes'); const { JSON_MIME_TYPE } = require('../../util/constant'); const responseBuilder = (responseConfgs) => { diff --git a/src/v0/destinations/canny/util.js b/src/v0/destinations/canny/util.js index 002d9aa69f..59644bcd6b 100644 --- a/src/v0/destinations/canny/util.js +++ b/src/v0/destinations/canny/util.js @@ -1,8 +1,8 @@ const qs = require('qs'); +const { InstrumentationError, NetworkError } = require('@rudderstack/integrations-lib'); const { httpPOST } = require('../../../adapters/network'); const { getDynamicErrorType } = require('../../../adapters/utils/networkUtils'); const { getDestinationExternalID } = require('../../util'); -const { InstrumentationError, NetworkError } = require('../../util/errorTypes'); const tags = require('../../util/tags'); const logger = require('../../../logger'); const { JSON_MIME_TYPE } = require('../../util/constant'); diff --git a/src/v0/destinations/clevertap/deleteUsers.js b/src/v0/destinations/clevertap/deleteUsers.js index 826c6c6939..3c07a63d93 100644 --- a/src/v0/destinations/clevertap/deleteUsers.js +++ b/src/v0/destinations/clevertap/deleteUsers.js @@ -1,3 +1,4 @@ +const { NetworkError, ConfigurationError } = require('@rudderstack/integrations-lib'); const { httpPOST } = require('../../../adapters/network'); const { getEndpoint, DEL_MAX_BATCH_SIZE } = require('./config'); const { @@ -6,7 +7,6 @@ const { } = require('../../../adapters/utils/networkUtils'); const { isHttpStatusSuccess } = require('../../util'); const { executeCommonValidations } = require('../../util/regulation-api'); -const { NetworkError, ConfigurationError } = require('../../util/errorTypes'); const tags = require('../../util/tags'); const { getUserIdBatches } = require('../../util/deleteUserUtils'); const { JSON_MIME_TYPE } = require('../../util/constant'); diff --git a/src/v0/destinations/clevertap/networkHandler.js b/src/v0/destinations/clevertap/networkHandler.js index 35c972e502..e17afb57d1 100644 --- a/src/v0/destinations/clevertap/networkHandler.js +++ b/src/v0/destinations/clevertap/networkHandler.js @@ -1,10 +1,10 @@ +const { NetworkError, AbortedError } = require('@rudderstack/integrations-lib'); const { isHttpStatusSuccess } = require('../../util/index'); const { proxyRequest, prepareProxyRequest } = require('../../../adapters/network'); const { processAxiosResponse, getDynamicErrorType, } = require('../../../adapters/utils/networkUtils'); -const { NetworkError, AbortedError } = require('../../util/errorTypes'); const tags = require('../../util/tags'); const responseHandler = (destinationResponse) => { diff --git a/src/v0/destinations/clevertap/transform.js b/src/v0/destinations/clevertap/transform.js index 5c1e28c086..efcd101668 100644 --- a/src/v0/destinations/clevertap/transform.js +++ b/src/v0/destinations/clevertap/transform.js @@ -1,6 +1,7 @@ /* eslint-disable no-param-reassign */ /* eslint-disable no-nested-ternary */ const get = require('get-value'); +const { InstrumentationError, TransformationError } = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { getEndpoint, @@ -25,7 +26,6 @@ const { } = require('../../util'); const { generateClevertapBatchedPayload } = require('./utils'); -const { InstrumentationError, TransformationError } = require('../../util/errorTypes'); const { JSON_MIME_TYPE } = require('../../util/constant'); const TIMESTAMP_KEY_PATH = 'context.traits.ts'; diff --git a/src/v0/destinations/clickup/transform.js b/src/v0/destinations/clickup/transform.js index d93e53b349..0637d65bd4 100644 --- a/src/v0/destinations/clickup/transform.js +++ b/src/v0/destinations/clickup/transform.js @@ -1,3 +1,4 @@ +const { TransformationError, InstrumentationError } = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { defaultRequestConfig, @@ -14,7 +15,6 @@ const { checkEventIfUIMapped, } = require('./util'); const { CONFIG_CATEGORIES, MAPPING_CONFIG, createTaskEndPoint } = require('./config'); -const { TransformationError, InstrumentationError } = require('../../util/errorTypes'); const { JSON_MIME_TYPE } = require('../../util/constant'); const responseBuilder = async (payload, listId, apiToken) => { diff --git a/src/v0/destinations/clickup/util.js b/src/v0/destinations/clickup/util.js index 7b17f83bb6..148fe1bd07 100644 --- a/src/v0/destinations/clickup/util.js +++ b/src/v0/destinations/clickup/util.js @@ -1,3 +1,4 @@ +const { NetworkError, InstrumentationError } = require('@rudderstack/integrations-lib'); const { httpGET } = require('../../../adapters/network'); const { processAxiosResponse, @@ -9,7 +10,6 @@ const { formatTimeStamp, } = require('../../util'); const { getCustomFieldsEndPoint } = require('./config'); -const { NetworkError, InstrumentationError } = require('../../util/errorTypes'); const tags = require('../../util/tags'); const { JSON_MIME_TYPE } = require('../../util/constant'); diff --git a/src/v0/destinations/confluent_cloud/transform.js b/src/v0/destinations/confluent_cloud/transform.js index e8f0f4d2e2..b33abc90cf 100644 --- a/src/v0/destinations/confluent_cloud/transform.js +++ b/src/v0/destinations/confluent_cloud/transform.js @@ -1,6 +1,5 @@ const cloneDeep = require('lodash/cloneDeep'); const { getIntegrationsObj } = require('../../util'); -// const { InstrumentationError } = require("../../util/errorTypes"); function process(event) { const { message, destination } = event; diff --git a/src/v0/destinations/courier/transform.js b/src/v0/destinations/courier/transform.js index 7d52b503d9..d5e25434ec 100644 --- a/src/v0/destinations/courier/transform.js +++ b/src/v0/destinations/courier/transform.js @@ -1,3 +1,8 @@ +const { + TransformationError, + InstrumentationError, + ConfigurationError, +} = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { defaultRequestConfig, @@ -6,11 +11,6 @@ const { simpleProcessRouterDest, } = require('../../util'); const { JSON_MIME_TYPE } = require('../../util/constant'); -const { - TransformationError, - InstrumentationError, - ConfigurationError, -} = require('../../util/errorTypes'); const { API_URL } = require('./config'); const responseBuilder = (payload, endpoint, destination) => { diff --git a/src/v0/destinations/criteo_audience/networkHandler.js b/src/v0/destinations/criteo_audience/networkHandler.js index f4369cdc9e..18bd9a93a0 100644 --- a/src/v0/destinations/criteo_audience/networkHandler.js +++ b/src/v0/destinations/criteo_audience/networkHandler.js @@ -1,3 +1,10 @@ +const { + NetworkError, + ThrottledError, + NetworkInstrumentationError, + AbortedError, + RetryableError, +} = require('@rudderstack/integrations-lib'); const { prepareProxyRequest, proxyRequest } = require('../../../adapters/network'); const { isHttpStatusSuccess } = require('../../util/index'); const { REFRESH_TOKEN } = require('../../../adapters/networkhandler/authConstants'); @@ -6,13 +13,6 @@ const { getDynamicErrorType, processAxiosResponse, } = require('../../../adapters/utils/networkUtils'); -const { - NetworkError, - ThrottledError, - NetworkInstrumentationError, - AbortedError, - RetryableError, -} = require('../../util/errorTypes'); // https://developers.criteo.com/marketing-solutions/v2021.01/docs/how-to-handle-api-errors#:~:text=the%20response%20body.-,401,-Authentication%20error // Following fucntion tells us if there is a particular error code in the response. diff --git a/src/v0/destinations/criteo_audience/transform.js b/src/v0/destinations/criteo_audience/transform.js index 7ddbdbef20..25e53cc305 100644 --- a/src/v0/destinations/criteo_audience/transform.js +++ b/src/v0/destinations/criteo_audience/transform.js @@ -1,4 +1,5 @@ const get = require('get-value'); +const { InstrumentationError } = require('@rudderstack/integrations-lib'); const { BASE_ENDPOINT, operation } = require('./config'); const { defaultRequestConfig, @@ -9,7 +10,6 @@ const { getEventType, getDestinationExternalIDInfoForRetl, } = require('../../util'); -const { InstrumentationError } = require('../../util/errorTypes'); const { MappedToDestinationKey } = require('../../../constants'); const { preparePayload } = require('./util'); diff --git a/src/v0/destinations/criteo_audience/util.js b/src/v0/destinations/criteo_audience/util.js index a7541f7911..d9d37bc331 100644 --- a/src/v0/destinations/criteo_audience/util.js +++ b/src/v0/destinations/criteo_audience/util.js @@ -1,6 +1,6 @@ const lodash = require('lodash'); +const { ConfigurationError, InstrumentationError } = require('@rudderstack/integrations-lib'); const { isDefinedAndNotNullAndNotEmpty } = require('../../util'); -const { ConfigurationError, InstrumentationError } = require('../../util/errorTypes'); const { MAX_IDENTIFIERS } = require('./config'); const populateIdentifiers = (audienceList, audienceType) => { diff --git a/src/v0/destinations/custify/deleteUsers.js b/src/v0/destinations/custify/deleteUsers.js index e90abe7abb..147fcc602c 100644 --- a/src/v0/destinations/custify/deleteUsers.js +++ b/src/v0/destinations/custify/deleteUsers.js @@ -1,9 +1,13 @@ +const { + ConfigurationError, + InstrumentationError, + NetworkError, +} = require('@rudderstack/integrations-lib'); const { httpDELETE } = require('../../../adapters/network'); const { processAxiosResponse, getDynamicErrorType, } = require('../../../adapters/utils/networkUtils'); -const { ConfigurationError, InstrumentationError, NetworkError } = require('../../util/errorTypes'); const { executeCommonValidations } = require('../../util/regulation-api'); const tags = require('../../util/tags'); diff --git a/src/v0/destinations/custify/transform.js b/src/v0/destinations/custify/transform.js index fd81511982..6b08be1c56 100644 --- a/src/v0/destinations/custify/transform.js +++ b/src/v0/destinations/custify/transform.js @@ -1,4 +1,5 @@ const get = require('get-value'); +const { InstrumentationError } = require('@rudderstack/integrations-lib'); const { EventType, MappedToDestinationKey } = require('../../../constants'); const { ConfigCategory } = require('./config'); const { @@ -9,7 +10,6 @@ const { simpleProcessRouterDest, } = require('../../util'); const { processIdentify, processTrack, processGroup } = require('./util'); -const { InstrumentationError } = require('../../util/errorTypes'); const { JSON_MIME_TYPE } = require('../../util/constant'); /** diff --git a/src/v0/destinations/custify/util.js b/src/v0/destinations/custify/util.js index d943b5c8bf..ae6f21fe20 100644 --- a/src/v0/destinations/custify/util.js +++ b/src/v0/destinations/custify/util.js @@ -1,4 +1,5 @@ const get = require('get-value'); +const { InstrumentationError, NetworkError } = require('@rudderstack/integrations-lib'); const { ConfigCategory, MappingConfig, @@ -16,7 +17,6 @@ const { constructPayload, isHttpStatusSuccess, } = require('../../util'); -const { InstrumentationError, NetworkError } = require('../../util/errorTypes'); const tags = require('../../util/tags'); const { JSON_MIME_TYPE } = require('../../util/constant'); diff --git a/src/v0/destinations/customerio/transform.js b/src/v0/destinations/customerio/transform.js index 984fb7e67f..be4486717c 100644 --- a/src/v0/destinations/customerio/transform.js +++ b/src/v0/destinations/customerio/transform.js @@ -1,6 +1,7 @@ const get = require('get-value'); const btoa = require('btoa'); +const { InstrumentationError } = require('@rudderstack/integrations-lib'); const { EventType, MappedToDestinationKey } = require('../../../constants'); const { @@ -24,7 +25,6 @@ const { defaultResponseBuilder, validateConfigFields, } = require('./util'); -const { InstrumentationError } = require('../../util/errorTypes'); const { JSON_MIME_TYPE } = require('../../util/constant'); function responseBuilder(message, evType, evName, destination, messageType) { diff --git a/src/v0/destinations/customerio/util.js b/src/v0/destinations/customerio/util.js index 6b4dbc0e11..ef983748a5 100644 --- a/src/v0/destinations/customerio/util.js +++ b/src/v0/destinations/customerio/util.js @@ -1,6 +1,7 @@ const get = require('get-value'); const set = require('set-value'); const truncate = require('truncate-utf8-bytes'); +const { InstrumentationError, ConfigurationError } = require('@rudderstack/integrations-lib'); const { MAX_BATCH_SIZE, configFieldsToCheck } = require('./config'); const { constructPayload, @@ -28,8 +29,6 @@ const { DEVICE_REGISTER_ENDPOINT, } = require('./config'); -const { InstrumentationError, ConfigurationError } = require('../../util/errorTypes'); - const deviceRelatedEventNames = [ 'Application Installed', 'Application Opened', diff --git a/src/v0/destinations/delighted/transform.js b/src/v0/destinations/delighted/transform.js index f5a2afdcaf..cf80dc878d 100644 --- a/src/v0/destinations/delighted/transform.js +++ b/src/v0/destinations/delighted/transform.js @@ -1,3 +1,8 @@ +const { + InstrumentationError, + ConfigurationError, + NetworkInstrumentationError, +} = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { getFieldValueFromMessage, @@ -20,11 +25,6 @@ const { userValidity, } = require('./util'); const { ENDPOINT, TRACKING_EXCLUSION_FIELDS, identifyMapping } = require('./config'); -const { - InstrumentationError, - ConfigurationError, - NetworkInstrumentationError, -} = require('../../util/errorTypes'); const { JSON_MIME_TYPE } = require('../../util/constant'); const identifyResponseBuilder = (message, { Config }) => { diff --git a/src/v0/destinations/delighted/util.js b/src/v0/destinations/delighted/util.js index 3cf26a3697..2c92685fd7 100644 --- a/src/v0/destinations/delighted/util.js +++ b/src/v0/destinations/delighted/util.js @@ -1,11 +1,11 @@ -const myAxios = require('../../../util/myAxios'); -const { getDynamicErrorType } = require('../../../adapters/utils/networkUtils'); -const { getValueFromMessage } = require('../../util'); const { NetworkInstrumentationError, InstrumentationError, NetworkError, -} = require('../../util/errorTypes'); +} = require('@rudderstack/integrations-lib'); +const myAxios = require('../../../util/myAxios'); +const { getDynamicErrorType } = require('../../../adapters/utils/networkUtils'); +const { getValueFromMessage } = require('../../util'); const { ENDPOINT } = require('./config'); const tags = require('../../util/tags'); const { JSON_MIME_TYPE } = require('../../util/constant'); diff --git a/src/v0/destinations/discord/transform.js b/src/v0/destinations/discord/transform.js index 4eb2f79235..714ee4f52b 100644 --- a/src/v0/destinations/discord/transform.js +++ b/src/v0/destinations/discord/transform.js @@ -1,6 +1,7 @@ /* eslint-disable no-nested-ternary */ /* eslint-disable no-prototype-builtins */ const Handlebars = require('handlebars'); +const { InstrumentationError } = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { @@ -9,7 +10,6 @@ const { getFieldValueFromMessage, simpleProcessRouterDest, } = require('../../util'); -const { InstrumentationError } = require('../../util/errorTypes'); const { stringifyJSON, getName, diff --git a/src/v0/destinations/drip/transform.js b/src/v0/destinations/drip/transform.js index 9abe3e3f77..4ccba076d0 100644 --- a/src/v0/destinations/drip/transform.js +++ b/src/v0/destinations/drip/transform.js @@ -1,3 +1,8 @@ +const { + InstrumentationError, + ConfigurationError, + NetworkInstrumentationError, +} = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { getDestinationExternalID, @@ -31,11 +36,6 @@ const { createUpdateUser, createList, } = require('./util'); -const { - InstrumentationError, - ConfigurationError, - NetworkInstrumentationError, -} = require('../../util/errorTypes'); const { JSON_MIME_TYPE } = require('../../util/constant'); const identifyResponseBuilder = async (message, { Config }) => { diff --git a/src/v0/destinations/drip/util.js b/src/v0/destinations/drip/util.js index dbb59fc6af..a502cf0d20 100644 --- a/src/v0/destinations/drip/util.js +++ b/src/v0/destinations/drip/util.js @@ -1,8 +1,8 @@ +const { NetworkError, AbortedError } = require('@rudderstack/integrations-lib'); const myAxios = require('../../../util/myAxios'); const { getDynamicErrorType } = require('../../../adapters/utils/networkUtils'); const logger = require('../../../logger'); const { constructPayload, isDefinedAndNotNull } = require('../../util'); -const { NetworkError, AbortedError } = require('../../util/errorTypes'); const { ENDPOINT, productMapping } = require('./config'); const tags = require('../../util/tags'); const { JSON_MIME_TYPE } = require('../../util/constant'); diff --git a/src/v0/destinations/engage/deleteUsers.js b/src/v0/destinations/engage/deleteUsers.js index 940529ea0c..a3c3055c7d 100644 --- a/src/v0/destinations/engage/deleteUsers.js +++ b/src/v0/destinations/engage/deleteUsers.js @@ -1,3 +1,4 @@ +const { ConfigurationError, NetworkError } = require('@rudderstack/integrations-lib'); const { httpDELETE } = require('../../../adapters/network'); const { processAxiosResponse, @@ -5,7 +6,6 @@ const { } = require('../../../adapters/utils/networkUtils'); const { isHttpStatusSuccess } = require('../../util'); const tags = require('../../util/tags'); -const { ConfigurationError, NetworkError } = require('../../util/errorTypes'); const { executeCommonValidations } = require('../../util/regulation-api'); const { JSON_MIME_TYPE } = require('../../util/constant'); diff --git a/src/v0/destinations/engage/transform.js b/src/v0/destinations/engage/transform.js index 98b8bb2bb9..f5daafb98c 100644 --- a/src/v0/destinations/engage/transform.js +++ b/src/v0/destinations/engage/transform.js @@ -1,4 +1,5 @@ const { set } = require('lodash'); +const { TransformationError, InstrumentationError } = require('@rudderstack/integrations-lib'); const { defaultRequestConfig, constructPayload, @@ -14,7 +15,6 @@ const { getDestinationExternalID } = require('../../util'); const { EventType } = require('../../../constants'); const { mappingConfig, ConfigCategories } = require('./config'); const { refinePayload, generatePageName, getLists } = require('./utils'); -const { TransformationError, InstrumentationError } = require('../../util/errorTypes'); const { JSON_MIME_TYPE } = require('../../util/constant'); const UID_ERROR_MSG = 'Neither externalId nor userId is available'; diff --git a/src/v0/destinations/eventbridge/transform.js b/src/v0/destinations/eventbridge/transform.js index 71c7731074..53c74d0f88 100644 --- a/src/v0/destinations/eventbridge/transform.js +++ b/src/v0/destinations/eventbridge/transform.js @@ -1,5 +1,5 @@ +const { ConfigurationError } = require('@rudderstack/integrations-lib'); const { removeUndefinedAndNullValues, simpleProcessRouterDest } = require('../../util'); -const { ConfigurationError } = require('../../util/errorTypes'); function getResouceList(config) { let resource; diff --git a/src/v0/destinations/facebook_offline_conversions/transform.js b/src/v0/destinations/facebook_offline_conversions/transform.js index e30bc2fa9a..cc95270fcc 100644 --- a/src/v0/destinations/facebook_offline_conversions/transform.js +++ b/src/v0/destinations/facebook_offline_conversions/transform.js @@ -1,3 +1,4 @@ +const { InstrumentationError, TransformationError } = require('@rudderstack/integrations-lib'); const { defaultRequestConfig, simpleProcessRouterDest, @@ -7,7 +8,6 @@ const { const { offlineConversionResponseBuilder, prepareUrls } = require('./utils'); const { EventType } = require('../../../constants'); -const { InstrumentationError, TransformationError } = require('../../util/errorTypes'); const responseBuilder = (endpoint) => { if (endpoint) { diff --git a/src/v0/destinations/facebook_offline_conversions/utils.js b/src/v0/destinations/facebook_offline_conversions/utils.js index 819bf8056d..c48de4e0b9 100644 --- a/src/v0/destinations/facebook_offline_conversions/utils.js +++ b/src/v0/destinations/facebook_offline_conversions/utils.js @@ -1,5 +1,6 @@ const sha256 = require('sha256'); const get = require('get-value'); +const { ConfigurationError } = require('@rudderstack/integrations-lib'); const { isObject, formatTimeStamp, @@ -22,7 +23,6 @@ const { eventToStandardMapping, MATCH_KEY_FIELD_TYPE_DICTIONARY, } = require('./config'); -const { ConfigurationError } = require('../../util/errorTypes'); /** * @param {*} message diff --git a/src/v0/destinations/facebook_pixel/transform.js b/src/v0/destinations/facebook_pixel/transform.js index 02c416cfde..7c55b61302 100644 --- a/src/v0/destinations/facebook_pixel/transform.js +++ b/src/v0/destinations/facebook_pixel/transform.js @@ -1,6 +1,7 @@ /* eslint-disable no-param-reassign */ const get = require('get-value'); const moment = require('moment'); +const { InstrumentationError, ConfigurationError } = require('@rudderstack/integrations-lib'); const stats = require('../../../util/stats'); const { CONFIG_CATEGORIES, @@ -36,8 +37,6 @@ const { formingFinalResponse, } = require('../../util/facebookUtils'); -const { InstrumentationError, ConfigurationError } = require('../../util/errorTypes'); - const responseBuilderSimple = (message, category, destination) => { const { Config, ID } = destination; const { pixelId, accessToken } = Config; diff --git a/src/v0/destinations/facebook_pixel/utils.js b/src/v0/destinations/facebook_pixel/utils.js index d642c446fd..1901edf306 100644 --- a/src/v0/destinations/facebook_pixel/utils.js +++ b/src/v0/destinations/facebook_pixel/utils.js @@ -1,7 +1,7 @@ +const { InstrumentationError } = require('@rudderstack/integrations-lib'); const { isObject } = require('../../util'); const { ACTION_SOURCES_VALUES, CONFIG_CATEGORIES, OTHER_STANDARD_EVENTS } = require('./config'); const { getContentType, getContentCategory } = require('../../util/facebookUtils'); -const { InstrumentationError } = require('../../util/errorTypes'); /** format revenue according to fb standards with max two decimal places. * @param revenue diff --git a/src/v0/destinations/factorsai/transform.js b/src/v0/destinations/factorsai/transform.js index dd2dad42fc..9824b73bbf 100644 --- a/src/v0/destinations/factorsai/transform.js +++ b/src/v0/destinations/factorsai/transform.js @@ -1,3 +1,4 @@ +const { InstrumentationError } = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { @@ -9,7 +10,6 @@ const { simpleProcessRouterDest, } = require('../../util'); const { JSON_MIME_TYPE } = require('../../util/constant'); -const { InstrumentationError } = require('../../util/errorTypes'); const { ConfigCategories, mappingConfig, BASE_URL } = require('./config'); diff --git a/src/v0/destinations/fb/transform.js b/src/v0/destinations/fb/transform.js index 756c74ba83..c0d78a2b3f 100644 --- a/src/v0/destinations/fb/transform.js +++ b/src/v0/destinations/fb/transform.js @@ -1,6 +1,7 @@ const get = require('get-value'); const set = require('set-value'); const sha256 = require('sha256'); +const { InstrumentationError } = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { removeUndefinedValues, @@ -20,7 +21,6 @@ const { eventPropToTypeMapping, } = require('./config'); const logger = require('../../../logger'); -const { InstrumentationError } = require('../../util/errorTypes'); // const funcMap = { // integer: parseInt, diff --git a/src/v0/destinations/fb_custom_audience/transform.js b/src/v0/destinations/fb_custom_audience/transform.js index f31a3dd42e..9320a3476b 100644 --- a/src/v0/destinations/fb_custom_audience/transform.js +++ b/src/v0/destinations/fb_custom_audience/transform.js @@ -1,5 +1,10 @@ const lodash = require('lodash'); const get = require('get-value'); +const { + InstrumentationError, + TransformationError, + ConfigurationError, +} = require('@rudderstack/integrations-lib'); const { defaultRequestConfig, defaultPostRequestConfig, @@ -26,11 +31,6 @@ const { } = require('./config'); const { MappedToDestinationKey } = require('../../../constants'); -const { - InstrumentationError, - TransformationError, - ConfigurationError, -} = require('../../util/errorTypes'); const responseBuilderSimple = (payload, audienceId) => { if (payload) { diff --git a/src/v0/destinations/fb_custom_audience/util.js b/src/v0/destinations/fb_custom_audience/util.js index 9e7198e393..47ccb9bf7d 100644 --- a/src/v0/destinations/fb_custom_audience/util.js +++ b/src/v0/destinations/fb_custom_audience/util.js @@ -2,11 +2,11 @@ const lodash = require('lodash'); const sha256 = require('sha256'); const get = require('get-value'); const jsonSize = require('json-size'); +const { InstrumentationError, ConfigurationError } = require('@rudderstack/integrations-lib'); const stats = require('../../../util/stats'); const { isDefinedAndNotNull } = require('../../util'); const { maxPayloadSize } = require('./config'); -const { InstrumentationError, ConfigurationError } = require('../../util/errorTypes'); /** * Example payload ={ diff --git a/src/v0/destinations/firehose/transform.js b/src/v0/destinations/firehose/transform.js index b0dc841579..81e2a1ebc8 100644 --- a/src/v0/destinations/firehose/transform.js +++ b/src/v0/destinations/firehose/transform.js @@ -1,6 +1,6 @@ const isString = require('lodash/isString'); +const { ConfigurationError } = require('@rudderstack/integrations-lib'); const { getHashFromArray, simpleProcessRouterDest } = require('../../util'); -const { ConfigurationError } = require('../../util/errorTypes'); function getDeliveryStreamMapTo(event) { const { message, destination } = event; diff --git a/src/v0/destinations/freshmarketer/transform.js b/src/v0/destinations/freshmarketer/transform.js index 41c604d407..aa0e03811d 100644 --- a/src/v0/destinations/freshmarketer/transform.js +++ b/src/v0/destinations/freshmarketer/transform.js @@ -1,4 +1,9 @@ const get = require('get-value'); +const { + InstrumentationError, + NetworkInstrumentationError, + TransformationError, +} = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { defaultRequestConfig, @@ -9,11 +14,6 @@ const { getValidDynamicFormConfig, simpleProcessRouterDest, } = require('../../util'); -const { - InstrumentationError, - NetworkInstrumentationError, - TransformationError, -} = require('../../util/errorTypes'); const { CONFIG_CATEGORIES, MAPPING_CONFIG } = require('./config'); const { diff --git a/src/v0/destinations/freshmarketer/utils.js b/src/v0/destinations/freshmarketer/utils.js index f7dcc46b06..6fa1fe9976 100644 --- a/src/v0/destinations/freshmarketer/utils.js +++ b/src/v0/destinations/freshmarketer/utils.js @@ -1,5 +1,10 @@ /* eslint-disable no-param-reassign */ const get = require('get-value'); +const { + InstrumentationError, + NetworkInstrumentationError, + NetworkError, +} = require('@rudderstack/integrations-lib'); const logger = require('../../../logger'); const { httpPOST, httpGET } = require('../../../adapters/network'); const { @@ -13,11 +18,6 @@ const { getFieldValueFromMessage, } = require('../../util'); const { CONFIG_CATEGORIES, LIFECYCLE_STAGE_ENDPOINT } = require('./config'); -const { - InstrumentationError, - NetworkInstrumentationError, - NetworkError, -} = require('../../util/errorTypes'); const tags = require('../../util/tags'); const { JSON_MIME_TYPE } = require('../../util/constant'); diff --git a/src/v0/destinations/freshsales/transform.js b/src/v0/destinations/freshsales/transform.js index c1e18482ed..096a2d749c 100644 --- a/src/v0/destinations/freshsales/transform.js +++ b/src/v0/destinations/freshsales/transform.js @@ -1,4 +1,5 @@ const get = require('get-value'); +const { InstrumentationError, TransformationError } = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { defaultRequestConfig, @@ -10,7 +11,6 @@ const { simpleProcessRouterDest, validateEventName, } = require('../../util'); -const { InstrumentationError, TransformationError } = require('../../util/errorTypes'); const { CONFIG_CATEGORIES, MAPPING_CONFIG } = require('./config'); const { getUserAccountDetails, diff --git a/src/v0/destinations/freshsales/utils.js b/src/v0/destinations/freshsales/utils.js index b30d9fa16b..96acabb037 100644 --- a/src/v0/destinations/freshsales/utils.js +++ b/src/v0/destinations/freshsales/utils.js @@ -1,5 +1,10 @@ /* eslint-disable no-param-reassign */ const get = require('get-value'); +const { + NetworkInstrumentationError, + InstrumentationError, + NetworkError, +} = require('@rudderstack/integrations-lib'); const { httpPOST, httpGET } = require('../../../adapters/network'); const { processAxiosResponse, @@ -10,11 +15,6 @@ const { defaultPostRequestConfig, getFieldValueFromMessage, } = require('../../util'); -const { - NetworkInstrumentationError, - InstrumentationError, - NetworkError, -} = require('../../util/errorTypes'); const { CONFIG_CATEGORIES, LIFECYCLE_STAGE_ENDPOINT } = require('./config'); const tags = require('../../util/tags'); const { JSON_MIME_TYPE } = require('../../util/constant'); diff --git a/src/v0/destinations/ga/deleteUsers.js b/src/v0/destinations/ga/deleteUsers.js index cf4694f44a..bb909a0053 100644 --- a/src/v0/destinations/ga/deleteUsers.js +++ b/src/v0/destinations/ga/deleteUsers.js @@ -1,7 +1,7 @@ const { isEmpty } = require('lodash'); +const { InstrumentationError, OAuthSecretError } = require('@rudderstack/integrations-lib'); const { httpPOST } = require('../../../adapters/network'); -const { InstrumentationError, OAuthSecretError } = require('../../util/errorTypes'); const { executeCommonValidations } = require('../../util/regulation-api'); const { GA_USER_DELETION_ENDPOINT } = require('./config'); const { gaResponseHandler } = require('./networkHandler'); diff --git a/src/v0/destinations/ga/networkHandler.js b/src/v0/destinations/ga/networkHandler.js index a12f9594cd..57db1cb7af 100644 --- a/src/v0/destinations/ga/networkHandler.js +++ b/src/v0/destinations/ga/networkHandler.js @@ -1,3 +1,4 @@ +const { NetworkError, InvalidAuthTokenError } = require('@rudderstack/integrations-lib'); const { REFRESH_TOKEN, AUTH_STATUS_INACTIVE, @@ -7,7 +8,6 @@ const { getDynamicErrorType, } = require('../../../adapters/utils/networkUtils'); -const { NetworkError, InvalidAuthTokenError } = require('../../util/errorTypes'); const tags = require('../../util/tags'); /** diff --git a/src/v0/destinations/ga/transform.js b/src/v0/destinations/ga/transform.js index c10697c4e1..32e94bdd41 100644 --- a/src/v0/destinations/ga/transform.js +++ b/src/v0/destinations/ga/transform.js @@ -1,6 +1,7 @@ /* eslint-disable no-nested-ternary */ const get = require('get-value'); const md5 = require('md5'); +const { InstrumentationError, ConfigurationError } = require('@rudderstack/integrations-lib'); const { EventType, MappedToDestinationKey } = require('../../../constants'); const { Event, GA_ENDPOINT, ConfigCategory, mappingConfig, nameToEventMap } = require('./config'); const { setContextualFields } = require('./utils'); @@ -19,7 +20,6 @@ const { } = require('../../util'); const { isDefinedAndNotNull } = require('../../util'); -const { InstrumentationError, ConfigurationError } = require('../../util/errorTypes'); const gaDisplayName = 'Google Analytics'; diff --git a/src/v0/destinations/ga/utils.js b/src/v0/destinations/ga/utils.js index 0d3a2f9798..617f2522a0 100644 --- a/src/v0/destinations/ga/utils.js +++ b/src/v0/destinations/ga/utils.js @@ -1,4 +1,4 @@ -const { InstrumentationError } = require('../../util/errorTypes'); +const { InstrumentationError } = require('@rudderstack/integrations-lib'); const { GA_ENDPOINT } = require('./config'); /** diff --git a/src/v0/destinations/ga360/transform.js b/src/v0/destinations/ga360/transform.js index c60ea47551..3655c330d5 100644 --- a/src/v0/destinations/ga360/transform.js +++ b/src/v0/destinations/ga360/transform.js @@ -1,5 +1,6 @@ const get = require('get-value'); const md5 = require('md5'); +const { ConfigurationError, InstrumentationError } = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { Event, GA_ENDPOINT, ConfigCategory, mappingConfig, nameToEventMap } = require('./config'); const { @@ -12,7 +13,6 @@ const { getDestinationExternalID, simpleProcessRouterDest, } = require('../../util'); -const { ConfigurationError, InstrumentationError } = require('../../util/errorTypes'); const gaDisplayName = 'Google Analytics'; diff --git a/src/v0/destinations/ga4/networkHandler.js b/src/v0/destinations/ga4/networkHandler.js index e90d2c3095..b62fcc8d3b 100644 --- a/src/v0/destinations/ga4/networkHandler.js +++ b/src/v0/destinations/ga4/networkHandler.js @@ -1,3 +1,4 @@ +const { NetworkError } = require('@rudderstack/integrations-lib'); const { proxyRequest, prepareProxyRequest } = require('../../../adapters/network'); const { getDynamicErrorType, @@ -5,7 +6,6 @@ const { } = require('../../../adapters/utils/networkUtils'); const { isDefinedAndNotNull, isDefined, isHttpStatusSuccess } = require('../../util'); -const { NetworkError } = require('../../util/errorTypes'); const tags = require('../../util/tags'); const responseHandler = (destinationResponse, dest) => { diff --git a/src/v0/destinations/ga4/transform.js b/src/v0/destinations/ga4/transform.js index d1d0790fa9..d8fc531e92 100644 --- a/src/v0/destinations/ga4/transform.js +++ b/src/v0/destinations/ga4/transform.js @@ -1,4 +1,9 @@ const get = require('get-value'); +const { + ConfigurationError, + InstrumentationError, + UnsupportedEventError, +} = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { isEmptyObject, @@ -11,11 +16,6 @@ const { getDestinationExternalID, removeUndefinedAndNullValues, } = require('../../util'); -const { - ConfigurationError, - InstrumentationError, - UnsupportedEventError, -} = require('../../util/errorTypes'); const { ENDPOINT, mappingConfig, diff --git a/src/v0/destinations/ga4/utils.js b/src/v0/destinations/ga4/utils.js index d356300ff7..e4db494727 100644 --- a/src/v0/destinations/ga4/utils.js +++ b/src/v0/destinations/ga4/utils.js @@ -1,4 +1,5 @@ const get = require('get-value'); +const { InstrumentationError } = require('@rudderstack/integrations-lib'); const { isEmpty, constructPayload, @@ -7,7 +8,6 @@ const { extractCustomFields, isDefinedAndNotNull, } = require('../../util'); -const { InstrumentationError } = require('../../util/errorTypes'); const { mappingConfig, ConfigCategory } = require('./config'); /** diff --git a/src/v0/destinations/gainsight/transform.js b/src/v0/destinations/gainsight/transform.js index f58fc0d566..f47296f066 100644 --- a/src/v0/destinations/gainsight/transform.js +++ b/src/v0/destinations/gainsight/transform.js @@ -1,6 +1,7 @@ /* eslint-disable no-nested-ternary */ const set = require('set-value'); const get = require('get-value'); +const { InstrumentationError, ConfigurationError } = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { identifyMapping, @@ -28,7 +29,6 @@ const { renameCustomFieldsFromMap, getConfigOrThrowError, } = require('./util'); -const { InstrumentationError, ConfigurationError } = require('../../util/errorTypes'); const { JSON_MIME_TYPE } = require('../../util/constant'); /** diff --git a/src/v0/destinations/gainsight/util.js b/src/v0/destinations/gainsight/util.js index 3c986b420d..39e666c1a5 100644 --- a/src/v0/destinations/gainsight/util.js +++ b/src/v0/destinations/gainsight/util.js @@ -1,7 +1,11 @@ +const { + ConfigurationError, + RetryableError, + NetworkError, +} = require('@rudderstack/integrations-lib'); const myAxios = require('../../../util/myAxios'); const { getDynamicErrorType } = require('../../../adapters/utils/networkUtils'); const logger = require('../../../logger'); -const { ConfigurationError, RetryableError, NetworkError } = require('../../util/errorTypes'); const { ENDPOINTS, getLookupPayload } = require('./config'); const tags = require('../../util/tags'); const { JSON_MIME_TYPE } = require('../../util/constant'); diff --git a/src/v0/destinations/gainsight_px/transform.js b/src/v0/destinations/gainsight_px/transform.js index ab66b87c5a..4d91980f11 100644 --- a/src/v0/destinations/gainsight_px/transform.js +++ b/src/v0/destinations/gainsight_px/transform.js @@ -1,4 +1,5 @@ /* eslint-disable no-nested-ternary */ +const { InstrumentationError, ConfigurationError } = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { isEmptyObject, @@ -29,7 +30,6 @@ const { groupMapping, identifyMapping, } = require('./config'); -const { InstrumentationError, ConfigurationError } = require('../../util/errorTypes'); const { JSON_MIME_TYPE } = require('../../util/constant'); /** diff --git a/src/v0/destinations/gainsight_px/util.js b/src/v0/destinations/gainsight_px/util.js index 6900180ab5..5109286b3f 100644 --- a/src/v0/destinations/gainsight_px/util.js +++ b/src/v0/destinations/gainsight_px/util.js @@ -1,6 +1,6 @@ +const { NetworkError } = require('@rudderstack/integrations-lib'); const myAxios = require('../../../util/myAxios'); const { ENDPOINTS } = require('./config'); -const { NetworkError } = require('../../util/errorTypes'); const tags = require('../../util/tags'); const { getDynamicErrorType } = require('../../../adapters/utils/networkUtils'); const { JSON_MIME_TYPE } = require('../../util/constant'); diff --git a/src/v0/destinations/google_adwords_enhanced_conversions/networkHandler.js b/src/v0/destinations/google_adwords_enhanced_conversions/networkHandler.js index e25349dfdc..8ac432935f 100644 --- a/src/v0/destinations/google_adwords_enhanced_conversions/networkHandler.js +++ b/src/v0/destinations/google_adwords_enhanced_conversions/networkHandler.js @@ -1,5 +1,6 @@ const { get, set } = require('lodash'); const sha256 = require('sha256'); +const { NetworkError, NetworkInstrumentationError } = require('@rudderstack/integrations-lib'); const { prepareProxyRequest, handleHttpRequest } = require('../../../adapters/network'); const { isHttpStatusSuccess, getAuthErrCategoryFromStCode } = require('../../util/index'); const { CONVERSION_ACTION_ID_CACHE_TTL } = require('./config'); @@ -12,7 +13,7 @@ const { getDynamicErrorType, } = require('../../../adapters/utils/networkUtils'); const { BASE_ENDPOINT } = require('./config'); -const { NetworkError, NetworkInstrumentationError } = require('../../util/errorTypes'); + const tags = require('../../util/tags'); const ERROR_MSG_PATH = 'response[0].error.message'; diff --git a/src/v0/destinations/google_adwords_enhanced_conversions/transform.js b/src/v0/destinations/google_adwords_enhanced_conversions/transform.js index 898c3f95b0..0be7c3f0ee 100644 --- a/src/v0/destinations/google_adwords_enhanced_conversions/transform.js +++ b/src/v0/destinations/google_adwords_enhanced_conversions/transform.js @@ -2,6 +2,7 @@ const get = require('get-value'); const { cloneDeep } = require('lodash'); +const { InstrumentationError, ConfigurationError } = require('@rudderstack/integrations-lib'); const { constructPayload, defaultRequestConfig, @@ -11,8 +12,6 @@ const { getAccessToken, } = require('../../util'); -const { InstrumentationError, ConfigurationError } = require('../../util/errorTypes'); - const { trackMapping, BASE_ENDPOINT } = require('./config'); const { JSON_MIME_TYPE } = require('../../util/constant'); diff --git a/src/v0/destinations/google_adwords_offline_conversions/networkHandler.js b/src/v0/destinations/google_adwords_offline_conversions/networkHandler.js index 71fdccff20..a87a2431f2 100644 --- a/src/v0/destinations/google_adwords_offline_conversions/networkHandler.js +++ b/src/v0/destinations/google_adwords_offline_conversions/networkHandler.js @@ -1,6 +1,11 @@ const set = require('set-value'); const get = require('get-value'); const sha256 = require('sha256'); +const { + AbortedError, + NetworkInstrumentationError, + NetworkError, +} = require('@rudderstack/integrations-lib'); const { prepareProxyRequest, httpSend, httpPOST } = require('../../../adapters/network'); const { isHttpStatusSuccess, @@ -15,11 +20,6 @@ const { processAxiosResponse, getDynamicErrorType, } = require('../../../adapters/utils/networkUtils'); -const { - AbortedError, - NetworkInstrumentationError, - NetworkError, -} = require('../../util/errorTypes'); const tags = require('../../util/tags'); const conversionCustomVariableCache = new Cache(CONVERSION_CUSTOM_VARIABLE_CACHE_TTL); diff --git a/src/v0/destinations/google_adwords_offline_conversions/transform.js b/src/v0/destinations/google_adwords_offline_conversions/transform.js index 0186739d37..397895c603 100644 --- a/src/v0/destinations/google_adwords_offline_conversions/transform.js +++ b/src/v0/destinations/google_adwords_offline_conversions/transform.js @@ -1,4 +1,5 @@ const { set, get } = require('lodash'); +const { InstrumentationError, ConfigurationError } = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { getHashFromArrayWithDuplicate, @@ -21,7 +22,6 @@ const { requestBuilder, getClickConversionPayloadAndEndpoint, } = require('./utils'); -const { InstrumentationError, ConfigurationError } = require('../../util/errorTypes'); const helper = require('./helper'); /** diff --git a/src/v0/destinations/google_adwords_offline_conversions/utils.js b/src/v0/destinations/google_adwords_offline_conversions/utils.js index 7fa5eb29af..c69c5a436f 100644 --- a/src/v0/destinations/google_adwords_offline_conversions/utils.js +++ b/src/v0/destinations/google_adwords_offline_conversions/utils.js @@ -1,5 +1,10 @@ const sha256 = require('sha256'); const { get, set, cloneDeep } = require('lodash'); +const { + AbortedError, + ConfigurationError, + InstrumentationError, +} = require('@rudderstack/integrations-lib'); const { httpPOST } = require('../../../adapters/network'); const { isHttpStatusSuccess, @@ -24,7 +29,6 @@ const { } = require('./config'); const { processAxiosResponse } = require('../../../adapters/utils/networkUtils'); const Cache = require('../../util/cache'); -const { AbortedError, ConfigurationError, InstrumentationError } = require('../../util/errorTypes'); const helper = require('./helper'); const conversionActionIdCache = new Cache(CONVERSION_ACTION_ID_CACHE_TTL); diff --git a/src/v0/destinations/google_adwords_remarketing_lists/networkHandler.js b/src/v0/destinations/google_adwords_remarketing_lists/networkHandler.js index b8470f9d28..5be8597bdb 100644 --- a/src/v0/destinations/google_adwords_remarketing_lists/networkHandler.js +++ b/src/v0/destinations/google_adwords_remarketing_lists/networkHandler.js @@ -1,3 +1,4 @@ +const { NetworkError } = require('@rudderstack/integrations-lib'); const { httpSend, prepareProxyRequest } = require('../../../adapters/network'); const { isHttpStatusSuccess, getAuthErrCategoryFromStCode } = require('../../util/index'); @@ -5,7 +6,6 @@ const { processAxiosResponse, getDynamicErrorType, } = require('../../../adapters/utils/networkUtils'); -const { NetworkError } = require('../../util/errorTypes'); const tags = require('../../util/tags'); /** * This function helps to create a offlineUserDataJobs diff --git a/src/v0/destinations/google_adwords_remarketing_lists/transform.js b/src/v0/destinations/google_adwords_remarketing_lists/transform.js index f8cd7c7037..884fcd71f6 100644 --- a/src/v0/destinations/google_adwords_remarketing_lists/transform.js +++ b/src/v0/destinations/google_adwords_remarketing_lists/transform.js @@ -1,5 +1,6 @@ const sha256 = require('sha256'); const get = require('get-value'); +const { InstrumentationError, ConfigurationError } = require('@rudderstack/integrations-lib'); const logger = require('../../../logger'); const { isDefinedAndNotNullAndNotEmpty, @@ -14,7 +15,6 @@ const { getAccessToken, } = require('../../util'); -const { InstrumentationError, ConfigurationError } = require('../../util/errorTypes'); const { offlineDataJobsMapping, addressInfoMapping, diff --git a/src/v0/destinations/google_cloud_function/util.js b/src/v0/destinations/google_cloud_function/util.js index 0a4fb9f4de..8f85460902 100644 --- a/src/v0/destinations/google_cloud_function/util.js +++ b/src/v0/destinations/google_cloud_function/util.js @@ -1,4 +1,4 @@ -const { ConfigurationError } = require('../../util/errorTypes'); +const { ConfigurationError } = require('@rudderstack/integrations-lib'); /** * validate destination config diff --git a/src/v0/destinations/googlepubsub/transform.js b/src/v0/destinations/googlepubsub/transform.js index 44208735e0..7a022d6c29 100644 --- a/src/v0/destinations/googlepubsub/transform.js +++ b/src/v0/destinations/googlepubsub/transform.js @@ -1,5 +1,5 @@ +const { ConfigurationError } = require('@rudderstack/integrations-lib'); const { simpleProcessRouterDest } = require('../../util'); -const { ConfigurationError } = require('../../util/errorTypes'); const { getTopic, createAttributesMetadata } = require('./util'); diff --git a/src/v0/destinations/googlesheets/transform.js b/src/v0/destinations/googlesheets/transform.js index 6cfb3f1d1e..6e27f6192c 100644 --- a/src/v0/destinations/googlesheets/transform.js +++ b/src/v0/destinations/googlesheets/transform.js @@ -1,12 +1,12 @@ /* eslint-disable no-nested-ternary */ const get = require('get-value'); +const { ConfigurationError } = require('@rudderstack/integrations-lib'); const { getValueFromMessage, getSuccessRespEvents, handleRtTfSingleEventError, checkInvalidRtTfEvents, } = require('../../util'); -const { ConfigurationError } = require('../../util/errorTypes'); const SOURCE_KEYS = ['properties', 'traits', 'context.traits']; diff --git a/src/v0/destinations/heap/transform.js b/src/v0/destinations/heap/transform.js index 32196eb7be..4256324165 100644 --- a/src/v0/destinations/heap/transform.js +++ b/src/v0/destinations/heap/transform.js @@ -1,3 +1,4 @@ +const { InstrumentationError, TransformationError } = require('@rudderstack/integrations-lib'); const { CONFIG_CATEGORIES, MAPPING_CONFIG } = require('./config'); const { EventType } = require('../../../constants'); const { @@ -8,7 +9,6 @@ const { flattenJson, simpleProcessRouterDest, } = require('../../util'); -const { InstrumentationError, TransformationError } = require('../../util/errorTypes'); const { JSON_MIME_TYPE } = require('../../util/constant'); function responseBuilderSimple(message, category, destination) { diff --git a/src/v0/destinations/hs/HSTransform-v1.js b/src/v0/destinations/hs/HSTransform-v1.js index 30546ad8f6..51feebea74 100644 --- a/src/v0/destinations/hs/HSTransform-v1.js +++ b/src/v0/destinations/hs/HSTransform-v1.js @@ -1,5 +1,10 @@ const get = require('get-value'); const lodash = require('lodash'); +const { + InstrumentationError, + ConfigurationError, + TransformationError, +} = require('@rudderstack/integrations-lib'); const { MappedToDestinationKey, GENERIC_TRUE_VALUES } = require('../../../constants'); const { defaultGetRequestConfig, @@ -14,11 +19,6 @@ const { getDestinationExternalID, getDestinationExternalIDInfoForRetl, } = require('../../util'); -const { - InstrumentationError, - ConfigurationError, - TransformationError, -} = require('../../util/errorTypes'); const { BATCH_CONTACT_ENDPOINT, MAX_BATCH_SIZE, diff --git a/src/v0/destinations/hs/HSTransform-v2.js b/src/v0/destinations/hs/HSTransform-v2.js index 26c12d3eea..2acdd82152 100644 --- a/src/v0/destinations/hs/HSTransform-v2.js +++ b/src/v0/destinations/hs/HSTransform-v2.js @@ -1,5 +1,10 @@ const get = require('get-value'); const lodash = require('lodash'); +const { + TransformationError, + ConfigurationError, + InstrumentationError, +} = require('@rudderstack/integrations-lib'); const { MappedToDestinationKey, GENERIC_TRUE_VALUES } = require('../../../constants'); const { defaultPostRequestConfig, @@ -16,11 +21,6 @@ const { getDestinationExternalIDInfoForRetl, getDestinationExternalIDObjectForRetl, } = require('../../util'); -const { - TransformationError, - ConfigurationError, - InstrumentationError, -} = require('../../util/errorTypes'); const { IDENTIFY_CRM_UPDATE_CONTACT, IDENTIFY_CRM_CREATE_NEW_CONTACT, diff --git a/src/v0/destinations/hs/transform.js b/src/v0/destinations/hs/transform.js index a2326e0395..c26e024a6c 100644 --- a/src/v0/destinations/hs/transform.js +++ b/src/v0/destinations/hs/transform.js @@ -1,4 +1,5 @@ const get = require('get-value'); +const { InstrumentationError } = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { checkInvalidRtTfEvents, @@ -19,7 +20,6 @@ const { getProperties, validateDestinationConfig, } = require('./util'); -const { InstrumentationError } = require('../../util/errorTypes'); const processSingleMessage = async (message, destination, propertyMap) => { if (!message.type) { diff --git a/src/v0/destinations/hs/util.js b/src/v0/destinations/hs/util.js index eb062b0c39..72025997d2 100644 --- a/src/v0/destinations/hs/util.js +++ b/src/v0/destinations/hs/util.js @@ -1,4 +1,10 @@ const get = require('get-value'); +const { + NetworkInstrumentationError, + InstrumentationError, + ConfigurationError, + NetworkError, +} = require('@rudderstack/integrations-lib'); const { httpGET, httpPOST } = require('../../../adapters/network'); const { processAxiosResponse, @@ -12,12 +18,6 @@ const { getDestinationExternalIDInfoForRetl, getValueFromMessage, } = require('../../util'); -const { - NetworkInstrumentationError, - InstrumentationError, - ConfigurationError, - NetworkError, -} = require('../../util/errorTypes'); const { CONTACT_PROPERTY_MAP_ENDPOINT, IDENTIFY_CRM_SEARCH_CONTACT, diff --git a/src/v0/destinations/impact/transform.js b/src/v0/destinations/impact/transform.js index 026318cec7..2eefdf7992 100644 --- a/src/v0/destinations/impact/transform.js +++ b/src/v0/destinations/impact/transform.js @@ -1,5 +1,10 @@ const sha1 = require('js-sha1'); const btoa = require('btoa'); +const { + ConfigurationError, + TransformationError, + InstrumentationError, +} = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { CONFIG_CATEGORIES, MAPPING_CONFIG } = require('./config'); const { @@ -17,11 +22,6 @@ const { removeUndefinedAndNullValues, isDefinedAndNotNullAndNotEmpty, } = require('../../util'); -const { - ConfigurationError, - TransformationError, - InstrumentationError, -} = require('../../util/errorTypes'); /** * This function takes the transformed payload, endpoint and destination Config as input and returns the prepared response. diff --git a/src/v0/destinations/indicative/transform.js b/src/v0/destinations/indicative/transform.js index 81eb19f320..000998c3b8 100644 --- a/src/v0/destinations/indicative/transform.js +++ b/src/v0/destinations/indicative/transform.js @@ -1,4 +1,5 @@ const get = require('get-value'); +const { InstrumentationError, TransformationError } = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { CONFIG_CATEGORIES, MAPPING_CONFIG } = require('./config'); const { @@ -9,7 +10,6 @@ const { simpleProcessRouterDest, } = require('../../util'); const { getUAInfo } = require('./utils'); -const { InstrumentationError, TransformationError } = require('../../util/errorTypes'); const { JSON_MIME_TYPE } = require('../../util/constant'); const handleProperties = (properties) => { diff --git a/src/v0/destinations/intercom/deleteUsers.js b/src/v0/destinations/intercom/deleteUsers.js index 9241a22906..e11d352117 100644 --- a/src/v0/destinations/intercom/deleteUsers.js +++ b/src/v0/destinations/intercom/deleteUsers.js @@ -1,8 +1,8 @@ +const { NetworkError, ConfigurationError } = require('@rudderstack/integrations-lib'); const { httpPOST } = require('../../../adapters/network'); const { processAxiosResponse } = require('../../../adapters/utils/networkUtils'); const { isHttpStatusSuccess } = require('../../util'); const { getDynamicErrorType } = require('../../../adapters/utils/networkUtils'); -const { NetworkError, ConfigurationError } = require('../../util/errorTypes'); const { executeCommonValidations } = require('../../util/regulation-api'); const tags = require('../../util/tags'); const { JSON_MIME_TYPE } = require('../../util/constant'); diff --git a/src/v0/destinations/intercom/networkHandler.js b/src/v0/destinations/intercom/networkHandler.js index 33f78e8cf6..a4106257b3 100644 --- a/src/v0/destinations/intercom/networkHandler.js +++ b/src/v0/destinations/intercom/networkHandler.js @@ -1,8 +1,7 @@ +const { RetryableError } = require('@rudderstack/integrations-lib'); const { proxyRequest, prepareProxyRequest } = require('../../../adapters/network'); const { processAxiosResponse } = require('../../../adapters/utils/networkUtils'); -const { RetryableError } = require('../../util/errorTypes'); - const errorResponseHandler = (destinationResponse, dest) => { const { status } = destinationResponse; if (status === 408) { diff --git a/src/v0/destinations/intercom/transform.js b/src/v0/destinations/intercom/transform.js index 552c80527c..212eaba13b 100644 --- a/src/v0/destinations/intercom/transform.js +++ b/src/v0/destinations/intercom/transform.js @@ -1,5 +1,6 @@ const md5 = require('md5'); const get = require('get-value'); +const { InstrumentationError } = require('@rudderstack/integrations-lib'); const { EventType, MappedToDestinationKey } = require('../../../constants'); const { ConfigCategory, @@ -18,7 +19,6 @@ const { flattenJson, } = require('../../util'); const { separateReservedAndRestMetadata } = require('./util'); -const { InstrumentationError } = require('../../util/errorTypes'); const { JSON_MIME_TYPE } = require('../../util/constant'); function getCompanyAttribute(company) { diff --git a/src/v0/destinations/iterable/deleteUsers.js b/src/v0/destinations/iterable/deleteUsers.js index 834cccd4cb..a179a8930f 100644 --- a/src/v0/destinations/iterable/deleteUsers.js +++ b/src/v0/destinations/iterable/deleteUsers.js @@ -1,8 +1,8 @@ +const { NetworkError, ConfigurationError } = require('@rudderstack/integrations-lib'); const { httpDELETE } = require('../../../adapters/network'); const { processAxiosResponse } = require('../../../adapters/utils/networkUtils'); const { isHttpStatusSuccess } = require('../../util'); const { getDynamicErrorType } = require('../../../adapters/utils/networkUtils'); -const { NetworkError, ConfigurationError } = require('../../util/errorTypes'); const { executeCommonValidations } = require('../../util/regulation-api'); const tags = require('../../util/tags'); const { JSON_MIME_TYPE } = require('../../util/constant'); diff --git a/src/v0/destinations/iterable/transform.js b/src/v0/destinations/iterable/transform.js index c54b579a52..64bdcfcfa4 100644 --- a/src/v0/destinations/iterable/transform.js +++ b/src/v0/destinations/iterable/transform.js @@ -1,5 +1,6 @@ const lodash = require('lodash'); const get = require('get-value'); +const { InstrumentationError } = require('@rudderstack/integrations-lib'); const { getCatalogEndpoint, hasMultipleResponses, @@ -26,7 +27,6 @@ const { } = require('../../util'); const { JSON_MIME_TYPE } = require('../../util/constant'); const { mappingConfig, ConfigCategory } = require('./config'); -const { InstrumentationError } = require('../../util/errorTypes'); const { EventType, MappedToDestinationKey } = require('../../../constants'); /** diff --git a/src/v0/destinations/iterable/util.js b/src/v0/destinations/iterable/util.js index 0b7e402f01..7c1509c2b7 100644 --- a/src/v0/destinations/iterable/util.js +++ b/src/v0/destinations/iterable/util.js @@ -1,6 +1,7 @@ const lodash = require('lodash'); const get = require('get-value'); const jsonSize = require('json-size'); +const { InstrumentationError, ConfigurationError } = require('@rudderstack/integrations-lib'); const { isAppleFamily, constructPayload, @@ -20,7 +21,6 @@ const { } = require('./config'); const { JSON_MIME_TYPE } = require('../../util/constant'); const { EventType, MappedToDestinationKey } = require('../../../constants'); -const { InstrumentationError, ConfigurationError } = require('../../util/errorTypes'); const MESSAGE_JSON_PATH = 'message.body.JSON'; diff --git a/src/v0/destinations/june/transform.js b/src/v0/destinations/june/transform.js index f85cb0fd3d..c8f3206903 100644 --- a/src/v0/destinations/june/transform.js +++ b/src/v0/destinations/june/transform.js @@ -1,3 +1,4 @@ +const { TransformationError, InstrumentationError } = require('@rudderstack/integrations-lib'); const { isEmptyObject, constructPayload, @@ -10,7 +11,6 @@ const { const { EventType } = require('../../../constants'); const { JSON_MIME_TYPE } = require('../../util/constant'); const { CONFIG_CATEGORIES, MAPPING_CONFIG } = require('./config'); -const { TransformationError, InstrumentationError } = require('../../util/errorTypes'); const responseBuilder = (payload, endpoint, destination) => { const destPayload = payload; diff --git a/src/v0/destinations/kafka/transform.js b/src/v0/destinations/kafka/transform.js index 39334b5f52..b08c717475 100644 --- a/src/v0/destinations/kafka/transform.js +++ b/src/v0/destinations/kafka/transform.js @@ -8,7 +8,6 @@ const { getSuccessRespEvents, getErrorRespEvents, } = require('../../util'); -// const { InstrumentationError } = require("../../util/errorTypes"); const filterConfigTopics = (message, destination) => { const { Config } = destination; diff --git a/src/v0/destinations/keen/transform.js b/src/v0/destinations/keen/transform.js index 6d99c90dcc..b68b5e5e1d 100644 --- a/src/v0/destinations/keen/transform.js +++ b/src/v0/destinations/keen/transform.js @@ -2,6 +2,7 @@ /* eslint-disable no-nested-ternary */ const isIp = require('is-ip'); const validUrl = require('valid-url'); +const { InstrumentationError } = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { defaultPostRequestConfig, @@ -10,7 +11,6 @@ const { getFieldValueFromMessage, simpleProcessRouterDest, } = require('../../util'); -const { InstrumentationError } = require('../../util/errorTypes'); const { ENDPOINT } = require('./config'); const { JSON_MIME_TYPE } = require('../../util/constant'); diff --git a/src/v0/destinations/kissmetrics/transform.js b/src/v0/destinations/kissmetrics/transform.js index 3e2c5593de..b24395076c 100644 --- a/src/v0/destinations/kissmetrics/transform.js +++ b/src/v0/destinations/kissmetrics/transform.js @@ -9,6 +9,7 @@ const is = require('is'); const extend = require('@ndhoule/extend'); const each = require('component-each'); +const { InstrumentationError } = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { defaultGetRequestConfig, @@ -17,7 +18,6 @@ const { simpleProcessRouterDest, } = require('../../util'); const { ENDPOINT } = require('./config'); -const { InstrumentationError } = require('../../util/errorTypes'); // source : https://github.com/segment-integrations/analytics.js-integration-kissmetrics/blob/master/lib/index.js function toUnixTimestamp(date) { diff --git a/src/v0/destinations/klaviyo/transform.js b/src/v0/destinations/klaviyo/transform.js index 5ad9b1869d..7c9061fc41 100644 --- a/src/v0/destinations/klaviyo/transform.js +++ b/src/v0/destinations/klaviyo/transform.js @@ -2,6 +2,7 @@ /* eslint-disable no-underscore-dangle */ /* eslint-disable array-callback-return */ const get = require('get-value'); +const { ConfigurationError, InstrumentationError } = require('@rudderstack/integrations-lib'); const { EventType, WhiteListedTraits, MappedToDestinationKey } = require('../../../constants'); const { CONFIG_CATEGORIES, @@ -36,7 +37,6 @@ const { flattenJson, isNewStatusCodesAccepted, } = require('../../util'); -const { ConfigurationError, InstrumentationError } = require('../../util/errorTypes'); const { JSON_MIME_TYPE, HTTP_STATUS_CODES } = require('../../util/constant'); /** @@ -373,8 +373,9 @@ const processRouterDest = async (inputs, reqMetadata) => { eventDestination, false, HTTP_STATUS_CODES.SUPPRESS_EVENTS, - ), error - } + ), + error, + }; } return getSuccessRespEvents(message, [metadata], eventDestination); }); diff --git a/src/v0/destinations/klaviyo/util.js b/src/v0/destinations/klaviyo/util.js index b31dafd78b..60b334f3a2 100644 --- a/src/v0/destinations/klaviyo/util.js +++ b/src/v0/destinations/klaviyo/util.js @@ -1,5 +1,6 @@ const { defaultRequestConfig } = require('rudder-transformer-cdk/build/utils'); const lodash = require('lodash'); +const { NetworkError, InstrumentationError } = require('@rudderstack/integrations-lib'); const { WhiteListedTraits } = require('../../../constants'); const { @@ -15,7 +16,6 @@ const { const tags = require('../../util/tags'); const { handleHttpRequest } = require('../../../adapters/network'); const { JSON_MIME_TYPE, HTTP_STATUS_CODES } = require('../../util/constant'); -const { NetworkError, InstrumentationError } = require('../../util/errorTypes'); const { getDynamicErrorType } = require('../../../adapters/utils/networkUtils'); const { BASE_ENDPOINT, MAPPING_CONFIG, CONFIG_CATEGORIES, MAX_BATCH_SIZE } = require('./config'); diff --git a/src/v0/destinations/kochava/transform.js b/src/v0/destinations/kochava/transform.js index c5a4fec81f..e9cf2eb1a0 100644 --- a/src/v0/destinations/kochava/transform.js +++ b/src/v0/destinations/kochava/transform.js @@ -1,4 +1,5 @@ const get = require('get-value'); +const { InstrumentationError } = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { KOCHAVA_ENDPOINT, @@ -11,7 +12,6 @@ const { formatTimeStamp, isAppleFamily, } = require('../../util'); -const { InstrumentationError } = require('../../util/errorTypes'); // build final response // -------------------- diff --git a/src/v0/destinations/kustomer/transform.js b/src/v0/destinations/kustomer/transform.js index 2898f0dfc2..e5010f55e0 100644 --- a/src/v0/destinations/kustomer/transform.js +++ b/src/v0/destinations/kustomer/transform.js @@ -1,5 +1,6 @@ /* eslint-disable no-nested-ternary */ const get = require('get-value'); +const { TransformationError, InstrumentationError } = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { CONFIG_CATEGORIES, MAPPING_CONFIG, DEFAULT_BASE_ENDPOINT } = require('./config'); const { @@ -13,7 +14,6 @@ const { simpleProcessRouterDest, } = require('../../util'); const { fetchKustomer, handleAdvancedtransformations } = require('./util'); -const { TransformationError, InstrumentationError } = require('../../util/errorTypes'); const { JSON_MIME_TYPE } = require('../../util/constant'); // Function responsible for constructing the Kustomer (User) Payload for identify diff --git a/src/v0/destinations/kustomer/util.js b/src/v0/destinations/kustomer/util.js index 31157b2738..571a03f139 100644 --- a/src/v0/destinations/kustomer/util.js +++ b/src/v0/destinations/kustomer/util.js @@ -2,11 +2,11 @@ const lodash = require('lodash'); const set = require('set-value'); const get = require('get-value'); +const { NetworkError, AbortedError } = require('@rudderstack/integrations-lib'); const myAxios = require('../../../util/myAxios'); const { DEFAULT_BASE_ENDPOINT } = require('./config'); const { getType, isDefinedAndNotNull, isObject } = require('../../util'); const { getDynamicErrorType } = require('../../../adapters/utils/networkUtils'); -const { NetworkError, AbortedError } = require('../../util/errorTypes'); const tags = require('../../util/tags'); /** diff --git a/src/v0/destinations/lambda/transform.js b/src/v0/destinations/lambda/transform.js index 221ef18186..1570a69ec3 100644 --- a/src/v0/destinations/lambda/transform.js +++ b/src/v0/destinations/lambda/transform.js @@ -1,6 +1,6 @@ const _ = require('lodash'); const { getErrorRespEvents, getSuccessRespEvents } = require('../../util'); -const { ConfigurationError } = require('../../util/errorTypes'); +const { ConfigurationError } = require('@rudderstack/integrations-lib'); const DEFAULT_INVOCATION_TYPE = 'Event'; // asynchronous invocation const MAX_PAYLOAD_SIZE_IN_KB = 256; // only for asynchronous invocation diff --git a/src/v0/destinations/leanplum/transform.js b/src/v0/destinations/leanplum/transform.js index 9a5462f2e5..df075dd631 100644 --- a/src/v0/destinations/leanplum/transform.js +++ b/src/v0/destinations/leanplum/transform.js @@ -1,3 +1,4 @@ +const { InstrumentationError } = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { ConfigCategory, mappingConfig, ENDPOINT, API_VERSION } = require('./config'); const { @@ -7,7 +8,6 @@ const { constructPayload, simpleProcessRouterDest, } = require('../../util'); -const { InstrumentationError } = require('../../util/errorTypes'); const { JSON_MIME_TYPE } = require('../../util/constant'); function preparePayload(message, name, destination) { diff --git a/src/v0/destinations/lemnisk/transform.js b/src/v0/destinations/lemnisk/transform.js index 1d6d9a89fb..905199079b 100644 --- a/src/v0/destinations/lemnisk/transform.js +++ b/src/v0/destinations/lemnisk/transform.js @@ -1,3 +1,8 @@ +const { + ConfigurationError, + TransformationError, + InstrumentationError, +} = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { CONFIG_CATEGORIES, @@ -14,11 +19,6 @@ const { isDefinedAndNotNullAndNotEmpty, } = require('../../util'); const { fetchPlatform } = require('./utils'); -const { - ConfigurationError, - TransformationError, - InstrumentationError, -} = require('../../util/errorTypes'); const { JSON_MIME_TYPE } = require('../../util/constant'); const responseBuilder = (message, category, destination, platform) => { diff --git a/src/v0/destinations/lemnisk/utils.js b/src/v0/destinations/lemnisk/utils.js index 207122153d..28de9ab354 100644 --- a/src/v0/destinations/lemnisk/utils.js +++ b/src/v0/destinations/lemnisk/utils.js @@ -1,4 +1,4 @@ -const { ConfigurationError } = require('../../util/errorTypes'); +const { ConfigurationError } = require('@rudderstack/integrations-lib'); /** * Fetches the platform type from the destination Config diff --git a/src/v0/destinations/lytics/transform.js b/src/v0/destinations/lytics/transform.js index a8d489fa5f..c3a971adba 100644 --- a/src/v0/destinations/lytics/transform.js +++ b/src/v0/destinations/lytics/transform.js @@ -1,3 +1,4 @@ +const { InstrumentationError } = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { CONFIG_CATEGORIES, @@ -14,7 +15,6 @@ const { flattenJson, simpleProcessRouterDest, } = require('../../util'); -const { InstrumentationError } = require('../../util/errorTypes'); const { JSON_MIME_TYPE } = require('../../util/constant'); const responseBuilderSimple = (message, category, destination) => { diff --git a/src/v0/destinations/mailchimp/transform.js b/src/v0/destinations/mailchimp/transform.js index ced92ddea1..894f70672a 100644 --- a/src/v0/destinations/mailchimp/transform.js +++ b/src/v0/destinations/mailchimp/transform.js @@ -1,4 +1,5 @@ const lodash = require('lodash'); +const { InstrumentationError, ConfigurationError } = require('@rudderstack/integrations-lib'); const { defaultPutRequestConfig, handleRtTfSingleEventError, @@ -23,7 +24,6 @@ const { stringifyPropertiesValues, } = require('./utils'); const { MAX_BATCH_SIZE, VALID_STATUSES, TRACK_CONFIG } = require('./config'); -const { InstrumentationError, ConfigurationError } = require('../../util/errorTypes'); const { JSON_MIME_TYPE } = require('../../util/constant'); const responseBuilderSimple = (finalPayload, endpoint, Config, audienceId) => { diff --git a/src/v0/destinations/mailchimp/utils.js b/src/v0/destinations/mailchimp/utils.js index 5a6d62c72c..e1e2e9883b 100644 --- a/src/v0/destinations/mailchimp/utils.js +++ b/src/v0/destinations/mailchimp/utils.js @@ -1,5 +1,6 @@ const get = require('get-value'); const md5 = require('md5'); +const { InstrumentationError, NetworkError } = require('@rudderstack/integrations-lib'); const myAxios = require('../../../util/myAxios'); const { MappedToDestinationKey } = require('../../../constants'); const logger = require('../../../logger'); @@ -15,7 +16,6 @@ const { defaultBatchRequestConfig, constructPayload, } = require('../../util'); -const { InstrumentationError, NetworkError } = require('../../util/errorTypes'); const { MERGE_CONFIG, MERGE_ADDRESS, SUBSCRIPTION_STATUS, VALID_STATUSES } = require('./config'); const { getDynamicErrorType } = require('../../../adapters/utils/networkUtils'); const tags = require('../../util/tags'); diff --git a/src/v0/destinations/mailjet/transform.js b/src/v0/destinations/mailjet/transform.js index 3e3cfe5c81..9156bf45e9 100644 --- a/src/v0/destinations/mailjet/transform.js +++ b/src/v0/destinations/mailjet/transform.js @@ -1,4 +1,5 @@ const lodash = require('lodash'); +const { TransformationError, InstrumentationError } = require('@rudderstack/integrations-lib'); const { getErrorRespEvents, getSuccessRespEvents, @@ -12,7 +13,6 @@ const { const { MAX_BATCH_SIZE } = require('./config'); const { EventType } = require('../../../constants'); const { createOrUpdateContactResponseBuilder } = require('./utils'); -const { TransformationError, InstrumentationError } = require('../../util/errorTypes'); const { JSON_MIME_TYPE } = require('../../util/constant'); const responseBuilder = (payload) => { diff --git a/src/v0/destinations/mailmodo/transform.js b/src/v0/destinations/mailmodo/transform.js index 39783c864f..756522939d 100644 --- a/src/v0/destinations/mailmodo/transform.js +++ b/src/v0/destinations/mailmodo/transform.js @@ -1,6 +1,7 @@ const lodash = require('lodash'); const get = require('get-value'); const { isEmpty } = require('lodash'); +const { ConfigurationError, InstrumentationError } = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { ConfigCategory, IDENTIFY_MAX_BATCH_SIZE, mappingConfig, BASE_URL } = require('./config'); const { @@ -14,7 +15,6 @@ const { handleRtTfSingleEventError, } = require('../../util'); const { deduceAddressFields, extractCustomProperties } = require('./utils'); -const { ConfigurationError, InstrumentationError } = require('../../util/errorTypes'); const { JSON_MIME_TYPE } = require('../../util/constant'); const responseBuilder = (responseConfgs) => { diff --git a/src/v0/destinations/marketo/transform.js b/src/v0/destinations/marketo/transform.js index b23d992b64..5000ef506b 100644 --- a/src/v0/destinations/marketo/transform.js +++ b/src/v0/destinations/marketo/transform.js @@ -3,6 +3,11 @@ /* eslint-disable no-use-before-define */ const get = require('get-value'); const cloneDeep = require('lodash/cloneDeep'); +const { + InstrumentationError, + ConfigurationError, + UnauthorizedError, +} = require('@rudderstack/integrations-lib'); const stats = require('../../../util/stats'); const { EventType, MappedToDestinationKey } = require('../../../constants'); const { @@ -38,11 +43,6 @@ const { getResponseHandlerData, } = require('./util'); const logger = require('../../../logger'); -const { - InstrumentationError, - ConfigurationError, - UnauthorizedError, -} = require('../../util/errorTypes'); const userIdLeadCache = new Cache(USER_LEAD_CACHE_TTL); // 1 day const emailLeadCache = new Cache(USER_LEAD_CACHE_TTL); // 1 day diff --git a/src/v0/destinations/marketo/util.js b/src/v0/destinations/marketo/util.js index 0de14e2072..203e0bf859 100644 --- a/src/v0/destinations/marketo/util.js +++ b/src/v0/destinations/marketo/util.js @@ -1,9 +1,3 @@ -const { httpGET, httpPOST } = require('../../../adapters/network'); -const { - getDynamicErrorType, - processAxiosResponse, -} = require('../../../adapters/utils/networkUtils'); -const { isHttpStatusSuccess } = require('../../util/index'); const { NetworkError, AbortedError, @@ -11,7 +5,13 @@ const { RetryableError, UnhandledStatusCodeError, InstrumentationError, -} = require('../../util/errorTypes'); +} = require('@rudderstack/integrations-lib'); +const { httpGET, httpPOST } = require('../../../adapters/network'); +const { + getDynamicErrorType, + processAxiosResponse, +} = require('../../../adapters/utils/networkUtils'); +const { isHttpStatusSuccess } = require('../../util/index'); const tags = require('../../util/tags'); /** diff --git a/src/v0/destinations/marketo_bulk_upload/fetchJobStatus.js b/src/v0/destinations/marketo_bulk_upload/fetchJobStatus.js index 04eadc4c51..e6f5662000 100644 --- a/src/v0/destinations/marketo_bulk_upload/fetchJobStatus.js +++ b/src/v0/destinations/marketo_bulk_upload/fetchJobStatus.js @@ -1,8 +1,8 @@ /* eslint-disable no-restricted-syntax */ /* eslint-disable no-prototype-builtins */ +const { PlatformError } = require('@rudderstack/integrations-lib'); const { getAccessToken } = require('./util'); const { handleHttpRequest } = require('../../../adapters/network'); -const { PlatformError } = require('../../util/errorTypes'); const stats = require('../../../util/stats'); const { JSON_MIME_TYPE } = require('../../util/constant'); const { diff --git a/src/v0/destinations/marketo_bulk_upload/fileUpload.js b/src/v0/destinations/marketo_bulk_upload/fileUpload.js index 2c77cd6e29..c7212ff9cb 100644 --- a/src/v0/destinations/marketo_bulk_upload/fileUpload.js +++ b/src/v0/destinations/marketo_bulk_upload/fileUpload.js @@ -1,6 +1,12 @@ /* eslint-disable no-plusplus */ const FormData = require('form-data'); const fs = require('fs'); +const { + NetworkError, + ConfigurationError, + RetryableError, + TransformationError, +} = require('@rudderstack/integrations-lib'); const { getAccessToken, getMarketoFilePath, @@ -16,12 +22,6 @@ const { isDefinedAndNotNullAndNotEmpty, } = require('../../util'); const { handleHttpRequest } = require('../../../adapters/network'); -const { - NetworkError, - ConfigurationError, - RetryableError, - TransformationError, -} = require('../../util/errorTypes'); const { client } = require('../../../util/errorNotifier'); const stats = require('../../../util/stats'); diff --git a/src/v0/destinations/marketo_bulk_upload/marketo_bulk_upload.util.test.js b/src/v0/destinations/marketo_bulk_upload/marketo_bulk_upload.util.test.js index 777301b6c3..78ac7c9e48 100644 --- a/src/v0/destinations/marketo_bulk_upload/marketo_bulk_upload.util.test.js +++ b/src/v0/destinations/marketo_bulk_upload/marketo_bulk_upload.util.test.js @@ -4,7 +4,7 @@ const { handleFileUploadResponse, } = require('./util'); -const { AbortedError, RetryableError } = require('../../util/errorTypes'); +const { AbortedError, RetryableError } = require('@rudderstack/integrations-lib'); describe('handleCommonErrorResponse', () => { test('should throw AbortedError for abortable error codes', () => { diff --git a/src/v0/destinations/marketo_bulk_upload/poll.js b/src/v0/destinations/marketo_bulk_upload/poll.js index 5e37fd7c0e..3ad458c545 100644 --- a/src/v0/destinations/marketo_bulk_upload/poll.js +++ b/src/v0/destinations/marketo_bulk_upload/poll.js @@ -1,8 +1,8 @@ +const { NetworkError } = require('@rudderstack/integrations-lib'); const { removeUndefinedValues, isHttpStatusSuccess } = require('../../util'); const { getAccessToken, handlePollResponse, hydrateStatusForServer } = require('./util'); const { handleHttpRequest } = require('../../../adapters/network'); const stats = require('../../../util/stats'); -const { NetworkError } = require('../../util/errorTypes'); const { JSON_MIME_TYPE } = require('../../util/constant'); const { POLL_ACTIVITY } = require('./config'); diff --git a/src/v0/destinations/marketo_bulk_upload/transform.js b/src/v0/destinations/marketo_bulk_upload/transform.js index d5764ee6c3..5431e67d38 100644 --- a/src/v0/destinations/marketo_bulk_upload/transform.js +++ b/src/v0/destinations/marketo_bulk_upload/transform.js @@ -1,3 +1,4 @@ +const { InstrumentationError } = require('@rudderstack/integrations-lib'); const { getHashFromArray, getFieldValueFromMessage, @@ -5,7 +6,6 @@ const { defaultRequestConfig, } = require('../../util'); const { EventType } = require('../../../constants'); -const { InstrumentationError } = require('../../util/errorTypes'); function responseBuilderSimple(message, destination) { const payload = {}; diff --git a/src/v0/destinations/marketo_bulk_upload/util.js b/src/v0/destinations/marketo_bulk_upload/util.js index a60f57e50b..7b329a3441 100644 --- a/src/v0/destinations/marketo_bulk_upload/util.js +++ b/src/v0/destinations/marketo_bulk_upload/util.js @@ -1,10 +1,10 @@ -const { handleHttpRequest } = require('../../../adapters/network'); const { AbortedError, RetryableError, NetworkError, TransformationError, -} = require('../../util/errorTypes'); +} = require('@rudderstack/integrations-lib'); +const { handleHttpRequest } = require('../../../adapters/network'); const tags = require('../../util/tags'); const { isHttpStatusSuccess, generateUUID } = require('../../util'); const { getDynamicErrorType } = require('../../../adapters/utils/networkUtils'); diff --git a/src/v0/destinations/marketo_static_list/transform.js b/src/v0/destinations/marketo_static_list/transform.js index 156e26270b..856947c33c 100644 --- a/src/v0/destinations/marketo_static_list/transform.js +++ b/src/v0/destinations/marketo_static_list/transform.js @@ -1,5 +1,6 @@ const lodash = require('lodash'); const cloneDeep = require('lodash/cloneDeep'); +const { InstrumentationError, UnauthorizedError } = require('@rudderstack/integrations-lib'); const { defaultPostRequestConfig, defaultDeleteRequestConfig, @@ -16,7 +17,6 @@ const { const { formatConfig, MAX_LEAD_IDS_SIZE } = require('./config'); const Cache = require('../../util/cache'); const { getAuthToken } = require('../marketo/transform'); -const { InstrumentationError, UnauthorizedError } = require('../../util/errorTypes'); const authCache = new Cache(AUTH_CACHE_TTL); // 1 hr diff --git a/src/v0/destinations/marketo_static_list/util.js b/src/v0/destinations/marketo_static_list/util.js index 2d4fe493a0..3db6180d24 100644 --- a/src/v0/destinations/marketo_static_list/util.js +++ b/src/v0/destinations/marketo_static_list/util.js @@ -1,4 +1,4 @@ -const { InstrumentationError } = require('../../util/errorTypes'); +const { InstrumentationError } = require('@rudderstack/integrations-lib'); /** * Fetches the ids from the array of objects diff --git a/src/v0/destinations/mautic/transform.js b/src/v0/destinations/mautic/transform.js index 12b0d06b6f..13808f6e3c 100644 --- a/src/v0/destinations/mautic/transform.js +++ b/src/v0/destinations/mautic/transform.js @@ -1,3 +1,8 @@ +const { + TransformationError, + InstrumentationError, + ConfigurationError, +} = require('@rudderstack/integrations-lib'); const { defaultRequestConfig, constructPayload, @@ -20,11 +25,6 @@ const { const { EventType } = require('../../../constants'); const { mappingConfig, ConfigCategories } = require('./config'); -const { - TransformationError, - InstrumentationError, - ConfigurationError, -} = require('../../util/errorTypes'); const { JSON_MIME_TYPE } = require('../../util/constant'); const responseBuilder = async (payload, endpoint, method, messageType, Config) => { diff --git a/src/v0/destinations/mautic/utils.js b/src/v0/destinations/mautic/utils.js index f9dd787d9d..d8ad8dbffc 100644 --- a/src/v0/destinations/mautic/utils.js +++ b/src/v0/destinations/mautic/utils.js @@ -1,5 +1,10 @@ /* eslint-disable no-return-assign, no-param-reassign, no-restricted-syntax */ const get = require('get-value'); +const { + NetworkError, + InstrumentationError, + ConfigurationError, +} = require('@rudderstack/integrations-lib'); const { getFieldValueFromMessage } = require('../../util'); const { BASE_URL, lookupFieldMap } = require('./config'); const { httpGET } = require('../../../adapters/network'); @@ -7,7 +12,6 @@ const { processAxiosResponse, getDynamicErrorType, } = require('../../../adapters/utils/networkUtils'); -const { NetworkError, InstrumentationError, ConfigurationError } = require('../../util/errorTypes'); const tags = require('../../util/tags'); const { JSON_MIME_TYPE } = require('../../util/constant'); diff --git a/src/v0/destinations/moengage/transform.js b/src/v0/destinations/moengage/transform.js index d87d931817..ea7db24406 100644 --- a/src/v0/destinations/moengage/transform.js +++ b/src/v0/destinations/moengage/transform.js @@ -1,4 +1,9 @@ const btoa = require('btoa'); +const { + ConfigurationError, + TransformationError, + InstrumentationError, +} = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { CONFIG_CATEGORIES, @@ -16,11 +21,6 @@ const { simpleProcessRouterDest, isAppleFamily, } = require('../../util'); -const { - ConfigurationError, - TransformationError, - InstrumentationError, -} = require('../../util/errorTypes'); const { JSON_MIME_TYPE } = require('../../util/constant'); function responseBuilderSimple(message, category, destination) { diff --git a/src/v0/destinations/monday/transform.js b/src/v0/destinations/monday/transform.js index 37ee835e50..152b42f8d0 100644 --- a/src/v0/destinations/monday/transform.js +++ b/src/v0/destinations/monday/transform.js @@ -1,4 +1,9 @@ const get = require('get-value'); +const { + ConfigurationError, + TransformationError, + InstrumentationError, +} = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { ENDPOINT } = require('./config'); const { populatePayload, getBoardDetails, checkAllowedEventNameFromUI } = require('./util'); @@ -10,11 +15,6 @@ const { getDestinationExternalID, validateEventName, } = require('../../util'); -const { - ConfigurationError, - TransformationError, - InstrumentationError, -} = require('../../util/errorTypes'); const { JSON_MIME_TYPE } = require('../../util/constant'); const responseBuilder = (payload, endpoint, apiToken) => { diff --git a/src/v0/destinations/monday/util.js b/src/v0/destinations/monday/util.js index 5f260aabae..a66dd63dff 100644 --- a/src/v0/destinations/monday/util.js +++ b/src/v0/destinations/monday/util.js @@ -1,8 +1,12 @@ const { isNumber } = require('lodash'); +const { + NetworkError, + ConfigurationError, + InstrumentationError, +} = require('@rudderstack/integrations-lib'); const { httpPOST } = require('../../../adapters/network'); const { processAxiosResponse } = require('../../../adapters/utils/networkUtils'); const { getDestinationExternalID, isDefinedAndNotNull } = require('../../util'); -const { NetworkError, ConfigurationError, InstrumentationError } = require('../../util/errorTypes'); const { getDynamicErrorType } = require('../../../adapters/utils/networkUtils'); const tags = require('../../util/tags'); const { JSON_MIME_TYPE } = require('../../util/constant'); diff --git a/src/v0/destinations/monetate/transform.js b/src/v0/destinations/monetate/transform.js index e4d1f28b61..26a88e686b 100644 --- a/src/v0/destinations/monetate/transform.js +++ b/src/v0/destinations/monetate/transform.js @@ -1,4 +1,5 @@ const get = require('get-value'); +const { InstrumentationError } = require('@rudderstack/integrations-lib'); const { removeUndefinedValues, simpleProcessRouterDest } = require('../../util'); const { handleProductViewed, @@ -11,7 +12,6 @@ const { } = require('./utils'); const { EventType } = require('../../../constants'); const { mappingConfig } = require('./config'); -const { InstrumentationError } = require('../../util/errorTypes'); function track(message, destination) { const rawPayload = constructPayload(message, mappingConfig.MONETATETrack); diff --git a/src/v0/destinations/monetate/utils.js b/src/v0/destinations/monetate/utils.js index 7facc2617d..1fe899f120 100644 --- a/src/v0/destinations/monetate/utils.js +++ b/src/v0/destinations/monetate/utils.js @@ -1,6 +1,6 @@ const set = require('set-value'); const get = require('get-value'); -const { InstrumentationError } = require('../../util/errorTypes'); +const { InstrumentationError } = require('@rudderstack/integrations-lib'); const { isDefinedAndNotNull, defaultRequestConfig, getValueFromMessage } = require('../../util'); const { ENDPOINT } = require('./config'); const { JSON_MIME_TYPE } = require('../../util/constant'); diff --git a/src/v0/destinations/mp/deleteUsers.js b/src/v0/destinations/mp/deleteUsers.js index 5b86cae6ae..f01475ef2b 100644 --- a/src/v0/destinations/mp/deleteUsers.js +++ b/src/v0/destinations/mp/deleteUsers.js @@ -1,4 +1,5 @@ const lodash = require('lodash'); +const { ConfigurationError, NetworkError } = require('@rudderstack/integrations-lib'); const { handleHttpRequest } = require('../../../adapters/network'); const { isHttpStatusSuccess } = require('../../util'); const { @@ -7,7 +8,6 @@ const { DISTINCT_ID_MAX_BATCH_SIZE, } = require('./config'); const { executeCommonValidations } = require('../../util/regulation-api'); -const { ConfigurationError, NetworkError } = require('../../util/errorTypes'); const { getDynamicErrorType } = require('../../../adapters/utils/networkUtils'); const tags = require('../../util/tags'); const { JSON_MIME_TYPE } = require('../../util/constant'); diff --git a/src/v0/destinations/mp/transform.js b/src/v0/destinations/mp/transform.js index a5f1bf2d9d..bb8d3e5756 100644 --- a/src/v0/destinations/mp/transform.js +++ b/src/v0/destinations/mp/transform.js @@ -1,5 +1,6 @@ const lodash = require('lodash'); const get = require('get-value'); +const { InstrumentationError, ConfigurationError } = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { base64Convertor, @@ -35,7 +36,6 @@ const { groupEventsByEndpoint, batchEvents, } = require('./util'); -const { InstrumentationError, ConfigurationError } = require('../../util/errorTypes'); const { CommonUtils } = require('../../../util/common'); // ref: https://help.mixpanel.com/hc/en-us/articles/115004613766-Default-Properties-Collected-by-Mixpanel diff --git a/src/v0/destinations/mp/util.js b/src/v0/destinations/mp/util.js index 30173fd514..bb4c23f1b4 100644 --- a/src/v0/destinations/mp/util.js +++ b/src/v0/destinations/mp/util.js @@ -1,5 +1,6 @@ const set = require('set-value'); const get = require('get-value'); +const { InstrumentationError } = require('@rudderstack/integrations-lib'); const { isDefined, constructPayload, @@ -20,7 +21,6 @@ const { GEO_SOURCE_ALLOWED_VALUES, mappingConfig, } = require('./config'); -const { InstrumentationError } = require('../../util/errorTypes'); const { CommonUtils } = require('../../../util/common'); const mPIdentifyConfigJson = mappingConfig[ConfigCategory.IDENTIFY.name]; diff --git a/src/v0/destinations/ometria/networkResponseHandler.js b/src/v0/destinations/ometria/networkResponseHandler.js index 2020ab0343..501b67f176 100644 --- a/src/v0/destinations/ometria/networkResponseHandler.js +++ b/src/v0/destinations/ometria/networkResponseHandler.js @@ -1,8 +1,8 @@ +const { NetworkError } = require('@rudderstack/integrations-lib'); const { getDynamicErrorType, trimResponse } = require('../../../adapters/utils/networkUtils'); const { isDefinedAndNotNull } = require('../../util'); const { isEmpty } = require('../../util/index'); const tags = require('../../util/tags'); -const { NetworkError } = require('../../util/errorTypes'); const responseTransform = (destResponse) => { let respBody; diff --git a/src/v0/destinations/ometria/transform.js b/src/v0/destinations/ometria/transform.js index 6d3c2ab174..55038e10b8 100644 --- a/src/v0/destinations/ometria/transform.js +++ b/src/v0/destinations/ometria/transform.js @@ -1,7 +1,7 @@ /* eslint-disable one-var, @typescript-eslint/naming-convention */ /* eslint-disable camelcase */ +const { ConfigurationError, InstrumentationError } = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); -const { ConfigurationError, InstrumentationError } = require('../../util/errorTypes'); const { constructPayload, extractCustomFields, diff --git a/src/v0/destinations/one_signal/transform.js b/src/v0/destinations/one_signal/transform.js index db699935f4..a072aef0e4 100644 --- a/src/v0/destinations/one_signal/transform.js +++ b/src/v0/destinations/one_signal/transform.js @@ -1,4 +1,9 @@ const get = require('get-value'); +const { + ConfigurationError, + TransformationError, + InstrumentationError, +} = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { ConfigCategory, mappingConfig, BASE_URL, ENDPOINTS } = require('./config'); const { @@ -13,11 +18,6 @@ const { defaultPutRequestConfig, } = require('../../util'); const { populateDeviceType, populateTags } = require('./util'); -const { - ConfigurationError, - TransformationError, - InstrumentationError, -} = require('../../util/errorTypes'); const { JSON_MIME_TYPE } = require('../../util/constant'); const responseBuilder = (payload, endpoint, eventType) => { diff --git a/src/v0/destinations/one_signal/util.js b/src/v0/destinations/one_signal/util.js index 4b53949e55..2de57de1b4 100644 --- a/src/v0/destinations/one_signal/util.js +++ b/src/v0/destinations/one_signal/util.js @@ -1,5 +1,5 @@ +const { InstrumentationError } = require('@rudderstack/integrations-lib'); const { getIntegrationsObj, getFieldValueFromMessage, getBrowserInfo } = require('../../util'); -const { InstrumentationError } = require('../../util/errorTypes'); // For mapping device_type value const deviceTypeMapping = { diff --git a/src/v0/destinations/pagerduty/transform.js b/src/v0/destinations/pagerduty/transform.js index d7a8848ace..fb862d2553 100644 --- a/src/v0/destinations/pagerduty/transform.js +++ b/src/v0/destinations/pagerduty/transform.js @@ -1,3 +1,8 @@ +const { + ConfigurationError, + TransformationError, + InstrumentationError, +} = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { defaultRequestConfig, @@ -6,11 +11,6 @@ const { removeUndefinedAndNullValues, } = require('../../util'); const { JSON_MIME_TYPE } = require('../../util/constant'); -const { - ConfigurationError, - TransformationError, - InstrumentationError, -} = require('../../util/errorTypes'); const { trackEventPayloadBuilder } = require('./util'); const responseBuilder = (payload, endpoint) => { diff --git a/src/v0/destinations/pagerduty/util.js b/src/v0/destinations/pagerduty/util.js index 42030aa2e7..5b768704ed 100644 --- a/src/v0/destinations/pagerduty/util.js +++ b/src/v0/destinations/pagerduty/util.js @@ -1,5 +1,6 @@ const get = require('get-value'); const moment = require('moment'); +const { InstrumentationError } = require('@rudderstack/integrations-lib'); const { SEVERITIES, EVENT_ACTIONS, @@ -9,7 +10,6 @@ const { DEFAULT_EVENT_ACTION, } = require('./config'); const { constructPayload, getIntegrationsObj } = require('../../util'); -const { InstrumentationError } = require('../../util/errorTypes'); /** * Validates the timestamp diff --git a/src/v0/destinations/pardot/networkHandler.js b/src/v0/destinations/pardot/networkHandler.js index 4cec03ebf8..12b4abbc53 100644 --- a/src/v0/destinations/pardot/networkHandler.js +++ b/src/v0/destinations/pardot/networkHandler.js @@ -1,3 +1,4 @@ +const { NetworkError } = require('@rudderstack/integrations-lib'); const { removeUndefinedValues } = require('../../util'); const { prepareProxyRequest, getPayloadData, httpSend } = require('../../../adapters/network'); const { @@ -7,7 +8,6 @@ const { const { isHttpStatusSuccess } = require('../../util/index'); const { REFRESH_TOKEN } = require('../../../adapters/networkhandler/authConstants'); const tags = require('../../util/tags'); -const { NetworkError } = require('../../util/errorTypes'); /** * Example Response from pardot diff --git a/src/v0/destinations/pardot/transform.js b/src/v0/destinations/pardot/transform.js index bfc7386ef9..b32b8967bd 100644 --- a/src/v0/destinations/pardot/transform.js +++ b/src/v0/destinations/pardot/transform.js @@ -34,6 +34,7 @@ */ const get = require('get-value'); +const { ConfigurationError, InstrumentationError } = require('@rudderstack/integrations-lib'); const { identifyConfig, DESTINATION } = require('./config'); const logger = require('../../../logger'); const { @@ -48,7 +49,6 @@ const { getAccessToken, } = require('../../util'); const { CONFIG_CATEGORIES } = require('./config'); -const { ConfigurationError, InstrumentationError } = require('../../util/errorTypes'); const buildResponse = (payload, url, destination, token) => { const responseBody = removeUndefinedValues(payload); diff --git a/src/v0/destinations/persistiq/transform.js b/src/v0/destinations/persistiq/transform.js index 195f8d6567..3b4fd6cadc 100644 --- a/src/v0/destinations/persistiq/transform.js +++ b/src/v0/destinations/persistiq/transform.js @@ -1,4 +1,5 @@ const { set } = require('lodash'); +const { InstrumentationError } = require('@rudderstack/integrations-lib'); const { defaultRequestConfig, removeUndefinedAndNullValues, @@ -8,7 +9,6 @@ const { const { configCategories } = require('./config'); const { buildLeadPayload, getIdentifyTraits } = require('./util'); const { EventType } = require('../../../constants'); -const { InstrumentationError } = require('../../util/errorTypes'); const responseBuilder = (payload, endpoint, method, Config) => { const { apiKey } = Config; diff --git a/src/v0/destinations/persistiq/util.js b/src/v0/destinations/persistiq/util.js index 7e1986e9b3..f37a9d1886 100644 --- a/src/v0/destinations/persistiq/util.js +++ b/src/v0/destinations/persistiq/util.js @@ -1,4 +1,5 @@ const { get } = require('lodash'); +const { InstrumentationError } = require('@rudderstack/integrations-lib'); const { getFieldValueFromMessage, getHashFromArray, @@ -6,7 +7,6 @@ const { flattenMultilevelPayload, } = require('../../util'); const { identifySourceKeys, fileConfigCategories, mappingConfig } = require('./config'); -const { InstrumentationError } = require('../../util/errorTypes'); /** * Returns the remaining keys from traits diff --git a/src/v0/destinations/personalize/transform.js b/src/v0/destinations/personalize/transform.js index 3523987a89..dcfaae755c 100644 --- a/src/v0/destinations/personalize/transform.js +++ b/src/v0/destinations/personalize/transform.js @@ -1,4 +1,5 @@ const lodash = require('lodash'); +const { ConfigurationError, InstrumentationError } = require('@rudderstack/integrations-lib'); const { KEY_CHECK_LIST, MANDATORY_PROPERTIES } = require('./config'); const { EventType } = require('../../../constants'); const { @@ -9,7 +10,6 @@ const { isDefined, simpleProcessRouterDest, } = require('../../util'); -const { ConfigurationError, InstrumentationError } = require('../../util/errorTypes'); const putEventsHandler = (message, destination) => { const { properties, anonymousId, event, messageId, context } = message; diff --git a/src/v0/destinations/pinterest_tag/transform.js b/src/v0/destinations/pinterest_tag/transform.js index 15efd63436..ee7e2e5b19 100644 --- a/src/v0/destinations/pinterest_tag/transform.js +++ b/src/v0/destinations/pinterest_tag/transform.js @@ -1,4 +1,5 @@ const { get } = require('lodash'); +const { InstrumentationError } = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { defaultRequestConfig, @@ -28,7 +29,6 @@ const { getV5EventsEndpoint, API_VERSION, } = require('./config'); -const { InstrumentationError } = require('../../util/errorTypes'); const responseBuilderSimple = (finalPayload, { Config }) => { const { apiVersion = API_VERSION.v3, adAccountId, conversionToken, sendAsTestEvent } = Config; diff --git a/src/v0/destinations/pinterest_tag/utils.js b/src/v0/destinations/pinterest_tag/utils.js index c6822636dc..c1493e9dbd 100644 --- a/src/v0/destinations/pinterest_tag/utils.js +++ b/src/v0/destinations/pinterest_tag/utils.js @@ -1,5 +1,6 @@ /* eslint-disable no-param-reassign */ const sha256 = require('sha256'); +const { InstrumentationError, ConfigurationError } = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { constructPayload, @@ -8,7 +9,6 @@ const { getHashFromArrayWithDuplicate, removeUndefinedAndNullValues, } = require('../../util'); -const { InstrumentationError, ConfigurationError } = require('../../util/errorTypes'); const { COMMON_CONFIGS, CUSTOM_CONFIGS, API_VERSION } = require('./config'); const VALID_ACTION_SOURCES = ['app_android', 'app_ios', 'web', 'offline']; diff --git a/src/v0/destinations/posthog/transform.js b/src/v0/destinations/posthog/transform.js index 9f639b59de..62a2f26783 100644 --- a/src/v0/destinations/posthog/transform.js +++ b/src/v0/destinations/posthog/transform.js @@ -1,4 +1,5 @@ const get = require('get-value'); +const { InstrumentationError, TransformationError } = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { DEFAULT_BASE_ENDPOINT, CONFIG_CATEGORIES, MAPPING_CONFIG } = require('./config'); const { @@ -14,7 +15,6 @@ const { removeUndefinedAndNullValues, simpleProcessRouterDest, } = require('../../util'); -const { InstrumentationError, TransformationError } = require('../../util/errorTypes'); const { JSON_MIME_TYPE } = require('../../util/constant'); // Logic To match destination Property key that is in Rudder Stack Properties Object. diff --git a/src/v0/destinations/profitwell/transform.js b/src/v0/destinations/profitwell/transform.js index 70de193fbd..58449fd9c1 100644 --- a/src/v0/destinations/profitwell/transform.js +++ b/src/v0/destinations/profitwell/transform.js @@ -1,3 +1,8 @@ +const { + NetworkError, + ConfigurationError, + InstrumentationError, +} = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { getSubscriptionHistory, @@ -15,7 +20,6 @@ const { simpleProcessRouterDest, } = require('../../util'); const { BASE_ENDPOINT, createPayloadMapping } = require('./config'); -const { NetworkError, ConfigurationError, InstrumentationError } = require('../../util/errorTypes'); const { getDynamicErrorType } = require('../../../adapters/utils/networkUtils'); const tags = require('../../util/tags'); const { JSON_MIME_TYPE } = require('../../util/constant'); diff --git a/src/v0/destinations/profitwell/utils.js b/src/v0/destinations/profitwell/utils.js index d7a3562126..acc4db2035 100644 --- a/src/v0/destinations/profitwell/utils.js +++ b/src/v0/destinations/profitwell/utils.js @@ -1,4 +1,8 @@ const get = require('get-value'); +const { + InstrumentationError, + NetworkInstrumentationError, +} = require('@rudderstack/integrations-lib'); const { httpGET } = require('../../../adapters/network'); const { toUnixTimestamp, @@ -11,7 +15,6 @@ const { constructPayload, } = require('../../util'); const { BASE_ENDPOINT, createPayloadMapping, updatePayloadMapping } = require('./config'); -const { InstrumentationError, NetworkInstrumentationError } = require('../../util/errorTypes'); const CURRENCY_CODES = [ 'aed', diff --git a/src/v0/destinations/redis/transform.js b/src/v0/destinations/redis/transform.js index ffc4a33c43..23c73f0ba4 100644 --- a/src/v0/destinations/redis/transform.js +++ b/src/v0/destinations/redis/transform.js @@ -1,9 +1,9 @@ const lodash = require('lodash'); const flatten = require('flat'); +const { InstrumentationError } = require('@rudderstack/integrations-lib'); const { isEmpty, isObject } = require('../../util'); const { EventType } = require('../../../constants'); -const { InstrumentationError } = require('../../util/errorTypes'); // processValues: // 1. removes keys with empty values or still an object(empty) after flattening diff --git a/src/v0/destinations/refiner/transform.js b/src/v0/destinations/refiner/transform.js index def685b597..b891945f7f 100644 --- a/src/v0/destinations/refiner/transform.js +++ b/src/v0/destinations/refiner/transform.js @@ -1,3 +1,4 @@ +const { TransformationError, InstrumentationError } = require('@rudderstack/integrations-lib'); const { ErrorMessage, defaultRequestConfig, @@ -13,7 +14,6 @@ const { identifyUserPayloadBuilder, } = require('./utils'); const { EventType } = require('../../../constants'); -const { TransformationError, InstrumentationError } = require('../../util/errorTypes'); const responseBuilder = (payload, endpoint, destination) => { if (payload) { diff --git a/src/v0/destinations/refiner/utils.js b/src/v0/destinations/refiner/utils.js index 109f6ff656..5e788352ca 100644 --- a/src/v0/destinations/refiner/utils.js +++ b/src/v0/destinations/refiner/utils.js @@ -1,7 +1,7 @@ const get = require('get-value'); +const { InstrumentationError } = require('@rudderstack/integrations-lib'); const { CONFIG_CATEGORIES } = require('./config'); const { getHashFromArray, getFieldValueFromMessage } = require('../../util'); -const { InstrumentationError } = require('../../util/errorTypes'); /** * Validation for userId and an email diff --git a/src/v0/destinations/revenue_cat/transform.js b/src/v0/destinations/revenue_cat/transform.js index 5f165a9278..407cb91608 100644 --- a/src/v0/destinations/revenue_cat/transform.js +++ b/src/v0/destinations/revenue_cat/transform.js @@ -1,5 +1,10 @@ const set = require('set-value'); const { defaultRequestConfig } = require('rudder-transformer-cdk/build/utils'); +const { + ConfigurationError, + TransformationError, + InstrumentationError, +} = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { constructPayload, @@ -15,11 +20,6 @@ const { REVENUE_CAT_IDENTIFY_EXCLUSION, BASE_URL, } = require('./config'); -const { - ConfigurationError, - TransformationError, - InstrumentationError, -} = require('../../util/errorTypes'); const { JSON_MIME_TYPE } = require('../../util/constant'); const trackResponseBuilder = async (message, category, { Config }) => { diff --git a/src/v0/destinations/rockerbox/transform.js b/src/v0/destinations/rockerbox/transform.js index 5369afa7e5..3ac806e5ee 100644 --- a/src/v0/destinations/rockerbox/transform.js +++ b/src/v0/destinations/rockerbox/transform.js @@ -1,4 +1,5 @@ const get = require('get-value'); +const { ConfigurationError, InstrumentationError } = require('@rudderstack/integrations-lib'); const { defaultRequestConfig, removeUndefinedAndNullValues, @@ -9,7 +10,6 @@ const { } = require('../../util'); const { EventType } = require('../../../constants'); const { CONFIG_CATEGORIES, MAPPING_CONFIG, ROCKERBOX_DEFINED_PROPERTIES } = require('./config'); -const { ConfigurationError, InstrumentationError } = require('../../util/errorTypes'); const responseBuilderSimple = (message, category, destination) => { const payload = constructPayload(message, MAPPING_CONFIG[category.name]); diff --git a/src/v0/destinations/salesforce/transform.js b/src/v0/destinations/salesforce/transform.js index 95e41ccd98..ab06a16d07 100644 --- a/src/v0/destinations/salesforce/transform.js +++ b/src/v0/destinations/salesforce/transform.js @@ -1,5 +1,9 @@ const get = require('get-value'); const cloneDeep = require('lodash/cloneDeep'); +const { + InstrumentationError, + NetworkInstrumentationError, +} = require('@rudderstack/integrations-lib'); const { EventType, MappedToDestinationKey } = require('../../../constants'); const { SF_API_VERSION, @@ -25,7 +29,6 @@ const { } = require('../../util'); const { getAccessToken, salesforceResponseHandler } = require('./utils'); const { handleHttpRequest } = require('../../../adapters/network'); -const { InstrumentationError, NetworkInstrumentationError } = require('../../util/errorTypes'); const { JSON_MIME_TYPE } = require('../../util/constant'); // Basic response builder diff --git a/src/v0/destinations/salesforce/utils.js b/src/v0/destinations/salesforce/utils.js index 3ffa4e56d8..9429e12e8d 100644 --- a/src/v0/destinations/salesforce/utils.js +++ b/src/v0/destinations/salesforce/utils.js @@ -1,7 +1,7 @@ +const { RetryableError, ThrottledError, AbortedError } = require('@rudderstack/integrations-lib'); const { handleHttpRequest } = require('../../../adapters/network'); const { isHttpStatusSuccess } = require('../../util'); const Cache = require('../../util/cache'); -const { RetryableError, ThrottledError, AbortedError } = require('../../util/errorTypes'); const { ACCESS_TOKEN_CACHE_TTL, SF_TOKEN_REQUEST_URL_SANDBOX, diff --git a/src/v0/destinations/sendgrid/deleteUsers.js b/src/v0/destinations/sendgrid/deleteUsers.js index e93fefa59e..8410f41296 100644 --- a/src/v0/destinations/sendgrid/deleteUsers.js +++ b/src/v0/destinations/sendgrid/deleteUsers.js @@ -1,3 +1,4 @@ +const { NetworkError, ConfigurationError } = require('@rudderstack/integrations-lib'); const { httpDELETE } = require('../../../adapters/network'); const { delIdUrlLimit, DELETE_CONTACTS_ENDPOINT } = require('./config'); const { @@ -5,7 +6,6 @@ const { getDynamicErrorType, } = require('../../../adapters/utils/networkUtils'); const { isHttpStatusSuccess } = require('../../util'); -const { NetworkError, ConfigurationError } = require('../../util/errorTypes'); const tags = require('../../util/tags'); const { executeCommonValidations } = require('../../util/regulation-api'); diff --git a/src/v0/destinations/sendgrid/transform.js b/src/v0/destinations/sendgrid/transform.js index d2f5b38b70..5038fedf7b 100644 --- a/src/v0/destinations/sendgrid/transform.js +++ b/src/v0/destinations/sendgrid/transform.js @@ -1,4 +1,9 @@ const lodash = require('lodash'); +const { + ConfigurationError, + TransformationError, + InstrumentationError, +} = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { ErrorMessage, @@ -34,11 +39,6 @@ const { generatePayloadFromConfig, createOrUpdateContactPayloadBuilder, } = require('./util'); -const { - ConfigurationError, - TransformationError, - InstrumentationError, -} = require('../../util/errorTypes'); const { JSON_MIME_TYPE } = require('../../util/constant'); const responseBuilder = (payload, method, endpoint, apiKey) => { diff --git a/src/v0/destinations/sendgrid/util.js b/src/v0/destinations/sendgrid/util.js index fad227a65b..1df34bfe69 100644 --- a/src/v0/destinations/sendgrid/util.js +++ b/src/v0/destinations/sendgrid/util.js @@ -1,4 +1,9 @@ const get = require('get-value'); +const { + NetworkError, + ConfigurationError, + InstrumentationError, +} = require('@rudderstack/integrations-lib'); const logger = require('../../../logger'); const { isEmpty, @@ -21,7 +26,6 @@ const { processAxiosResponse, } = require('../../../adapters/utils/networkUtils'); const { httpGET } = require('../../../adapters/network'); -const { NetworkError, ConfigurationError, InstrumentationError } = require('../../util/errorTypes'); const { AUTH_CACHE_TTL, JSON_MIME_TYPE } = require('../../util/constant'); const { MAPPING_CONFIG, CONFIG_CATEGORIES } = require('./config'); diff --git a/src/v0/destinations/sendinblue/transform.js b/src/v0/destinations/sendinblue/transform.js index 151304db22..7663672f12 100644 --- a/src/v0/destinations/sendinblue/transform.js +++ b/src/v0/destinations/sendinblue/transform.js @@ -1,5 +1,6 @@ /* eslint-disable camelcase */ /* eslint-disable @typescript-eslint/naming-convention */ +const { TransformationError, InstrumentationError } = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { defaultRequestConfig, @@ -25,7 +26,6 @@ const { prepareTrackEventData, getListIds, } = require('./util'); -const { TransformationError, InstrumentationError } = require('../../util/errorTypes'); const responseBuilder = ( payload, diff --git a/src/v0/destinations/sendinblue/util.js b/src/v0/destinations/sendinblue/util.js index f184ee1ac1..9ad37fc9b7 100644 --- a/src/v0/destinations/sendinblue/util.js +++ b/src/v0/destinations/sendinblue/util.js @@ -1,3 +1,4 @@ +const { NetworkError, InstrumentationError } = require('@rudderstack/integrations-lib'); const { EMAIL_SUFFIX, getContactDetailsEndpoint } = require('./config'); const { getHashFromArray, @@ -12,7 +13,6 @@ const { processAxiosResponse, getDynamicErrorType, } = require('../../../adapters/utils/networkUtils'); -const { NetworkError, InstrumentationError } = require('../../util/errorTypes'); const tags = require('../../util/tags'); const { JSON_MIME_TYPE } = require('../../util/constant'); diff --git a/src/v0/destinations/serenytics/transform.js b/src/v0/destinations/serenytics/transform.js index ee7279e288..ee38f7d1a1 100644 --- a/src/v0/destinations/serenytics/transform.js +++ b/src/v0/destinations/serenytics/transform.js @@ -1,14 +1,14 @@ +const { + ConfigurationError, + TransformationError, + InstrumentationError, +} = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { ErrorMessage, simpleProcessRouterDest, getHashFromArrayWithDuplicate, } = require('../../util'); -const { - ConfigurationError, - TransformationError, - InstrumentationError, -} = require('../../util/errorTypes'); const { CONFIG_CATEGORIES, diff --git a/src/v0/destinations/serenytics/utils.js b/src/v0/destinations/serenytics/utils.js index bccce2585d..90ce374d5a 100644 --- a/src/v0/destinations/serenytics/utils.js +++ b/src/v0/destinations/serenytics/utils.js @@ -1,10 +1,10 @@ +const { ConfigurationError } = require('@rudderstack/integrations-lib'); const { constructPayload, extractCustomFields, defaultRequestConfig, defaultPostRequestConfig, } = require('../../util'); -const { ConfigurationError } = require('../../util/errorTypes'); const { MAPPING_CONFIG } = require('./config'); const checkStorageUrl = (STORAGE_URL, messageType) => { diff --git a/src/v0/destinations/sfmc/transform.js b/src/v0/destinations/sfmc/transform.js index 161720b2cc..879ca1989a 100644 --- a/src/v0/destinations/sfmc/transform.js +++ b/src/v0/destinations/sfmc/transform.js @@ -1,4 +1,9 @@ /* eslint-disable no-nested-ternary */ +const { + NetworkError, + ConfigurationError, + InstrumentationError, +} = require('@rudderstack/integrations-lib'); const myAxios = require('../../../util/myAxios'); const { EventType } = require('../../../constants'); const { CONFIG_CATEGORIES, MAPPING_CONFIG, ENDPOINTS } = require('./config'); @@ -19,7 +24,6 @@ const { getDynamicErrorType, nodeSysErrorToStatus, } = require('../../../adapters/utils/networkUtils'); -const { NetworkError, ConfigurationError, InstrumentationError } = require('../../util/errorTypes'); const tags = require('../../util/tags'); const { JSON_MIME_TYPE } = require('../../util/constant'); diff --git a/src/v0/destinations/shynet/transform.js b/src/v0/destinations/shynet/transform.js index 833616a11f..565c0790d5 100644 --- a/src/v0/destinations/shynet/transform.js +++ b/src/v0/destinations/shynet/transform.js @@ -1,4 +1,5 @@ /* eslint-disable no-underscore-dangle */ +const { InstrumentationError } = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { @@ -9,7 +10,6 @@ const { generateUUID, } = require('../../util'); const { JSON_MIME_TYPE } = require('../../util/constant'); -const { InstrumentationError } = require('../../util/errorTypes'); const { ConfigCategory, mappingConfig } = require('./config'); diff --git a/src/v0/destinations/signl4/transform.js b/src/v0/destinations/signl4/transform.js index 63dc10d73c..3a8b23b630 100644 --- a/src/v0/destinations/signl4/transform.js +++ b/src/v0/destinations/signl4/transform.js @@ -1,3 +1,8 @@ +const { + ConfigurationError, + TransformationError, + InstrumentationError, +} = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { BASE_URL } = require('./config'); const { populatePayload } = require('./utils'); @@ -7,11 +12,6 @@ const { simpleProcessRouterDest, removeUndefinedAndNullAndEmptyValues, } = require('../../util'); -const { - ConfigurationError, - TransformationError, - InstrumentationError, -} = require('../../util/errorTypes'); const { JSON_MIME_TYPE } = require('../../util/constant'); const responseBuilder = (payload, endpoint) => { diff --git a/src/v0/destinations/singular/transform.js b/src/v0/destinations/singular/transform.js index 749debb0b0..ff5d18db9a 100644 --- a/src/v0/destinations/singular/transform.js +++ b/src/v0/destinations/singular/transform.js @@ -1,3 +1,4 @@ +const { InstrumentationError } = require('@rudderstack/integrations-lib'); const { BASE_URL } = require('./config'); const { defaultRequestConfig, @@ -10,7 +11,6 @@ const { generateRevenuePayloadArray, isSessionEvent, } = require('./util'); -const { InstrumentationError } = require('../../util/errorTypes'); const responseBuilderSimple = (message, { Config }) => { const eventName = message.event; diff --git a/src/v0/destinations/singular/util.js b/src/v0/destinations/singular/util.js index 542b049a2e..4c5aeb8964 100644 --- a/src/v0/destinations/singular/util.js +++ b/src/v0/destinations/singular/util.js @@ -1,4 +1,5 @@ const lodash = require('lodash'); +const { TransformationError, InstrumentationError } = require('@rudderstack/integrations-lib'); const { CONFIG_CATEGORIES, MAPPING_CONFIG, @@ -20,7 +21,6 @@ const { isDefinedAndNotNull, isAppleFamily, } = require('../../util'); -const { TransformationError, InstrumentationError } = require('../../util/errorTypes'); /* All the fields listed inside properties which are not directly mapped, will be sent to 'e' as custom event attributes diff --git a/src/v0/destinations/slack/transform.js b/src/v0/destinations/slack/transform.js index 8db934d71f..41282c6887 100644 --- a/src/v0/destinations/slack/transform.js +++ b/src/v0/destinations/slack/transform.js @@ -1,5 +1,6 @@ /* eslint-disable no-nested-ternary, no-restricted-syntax, no-prototype-builtins */ const Handlebars = require('handlebars'); +const { InstrumentationError, ConfigurationError } = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { stringifyJSON, @@ -17,7 +18,6 @@ const { simpleProcessRouterDest, isDefinedAndNotNull, } = require('../../util'); -const { InstrumentationError, ConfigurationError } = require('../../util/errorTypes'); // build the response to be sent to backend, url encoded header is required as slack accepts payload in this format // add the username and image for Rudder diff --git a/src/v0/destinations/snapchat_conversion/transform.js b/src/v0/destinations/snapchat_conversion/transform.js index 49776935de..37d321a468 100644 --- a/src/v0/destinations/snapchat_conversion/transform.js +++ b/src/v0/destinations/snapchat_conversion/transform.js @@ -1,5 +1,6 @@ const get = require('get-value'); const moment = require('moment'); +const { InstrumentationError, ConfigurationError } = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { @@ -33,7 +34,6 @@ const { channelMapping, generateBatchedPayloadForArray, } = require('./util'); -const { InstrumentationError, ConfigurationError } = require('../../util/errorTypes'); const { JSON_MIME_TYPE } = require('../../util/constant'); function buildResponse(apiKey, payload) { diff --git a/src/v0/destinations/snapchat_custom_audience/networkHandler.js b/src/v0/destinations/snapchat_custom_audience/networkHandler.js index 196f9a87fb..db36f6f518 100644 --- a/src/v0/destinations/snapchat_custom_audience/networkHandler.js +++ b/src/v0/destinations/snapchat_custom_audience/networkHandler.js @@ -1,3 +1,4 @@ +const { NetworkError, RetryableError, AbortedError } = require('@rudderstack/integrations-lib'); const { removeUndefinedValues, getAuthErrCategoryFromErrDetailsAndStCode } = require('../../util'); const { prepareProxyRequest, getPayloadData, httpSend } = require('../../../adapters/network'); const { isHttpStatusSuccess } = require('../../util/index'); @@ -7,7 +8,6 @@ const { getDynamicErrorType, processAxiosResponse, } = require('../../../adapters/utils/networkUtils'); -const { NetworkError, RetryableError, AbortedError } = require('../../util/errorTypes'); const { HTTP_STATUS_CODES } = require('../../util/constant'); const prepareProxyReq = (request) => { diff --git a/src/v0/destinations/snapchat_custom_audience/transform.js b/src/v0/destinations/snapchat_custom_audience/transform.js index 7938236594..f4cbeafb56 100644 --- a/src/v0/destinations/snapchat_custom_audience/transform.js +++ b/src/v0/destinations/snapchat_custom_audience/transform.js @@ -1,4 +1,5 @@ const sha256 = require('sha256'); +const { ConfigurationError } = require('@rudderstack/integrations-lib'); const { defaultRequestConfig, removeUndefinedAndNullValues, @@ -6,7 +7,6 @@ const { isDefinedAndNotNullAndNotEmpty, getAccessToken, } = require('../../util'); -const { ConfigurationError } = require('../../util/errorTypes'); const { BASE_URL, schemaType } = require('./config'); const { validatePayload, validateFields } = require('./utils'); const { JSON_MIME_TYPE } = require('../../util/constant'); diff --git a/src/v0/destinations/snapchat_custom_audience/utils.js b/src/v0/destinations/snapchat_custom_audience/utils.js index 4d20b27a09..bc4a2292da 100644 --- a/src/v0/destinations/snapchat_custom_audience/utils.js +++ b/src/v0/destinations/snapchat_custom_audience/utils.js @@ -1,4 +1,4 @@ -const { InstrumentationError } = require('../../util/errorTypes'); +const { InstrumentationError } = require('@rudderstack/integrations-lib'); /** * Verifies whether the input payload is in right format or not diff --git a/src/v0/destinations/splitio/transform.js b/src/v0/destinations/splitio/transform.js index 012c73a8b6..6641a62fe8 100644 --- a/src/v0/destinations/splitio/transform.js +++ b/src/v0/destinations/splitio/transform.js @@ -1,3 +1,4 @@ +const { TransformationError, InstrumentationError } = require('@rudderstack/integrations-lib'); const { CONFIG_CATEGORIES, MAPPING_CONFIG, @@ -18,7 +19,6 @@ const { simpleProcessRouterDest, ErrorMessage, } = require('../../util'); -const { TransformationError, InstrumentationError } = require('../../util/errorTypes'); const { JSON_MIME_TYPE } = require('../../util/constant'); function responseBuilderSimple(payload, category, destination) { diff --git a/src/v0/destinations/statsig/transform.js b/src/v0/destinations/statsig/transform.js index 1be72d4095..81658a255a 100644 --- a/src/v0/destinations/statsig/transform.js +++ b/src/v0/destinations/statsig/transform.js @@ -1,7 +1,7 @@ +const { InstrumentationError } = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { defaultPostRequestConfig, defaultRequestConfig } = require('../../util'); const { ENDPOINT } = require('./config'); -const { InstrumentationError } = require('../../util/errorTypes'); const { JSON_MIME_TYPE } = require('../../util/constant'); function process(event) { diff --git a/src/v0/destinations/stormly/transform.js b/src/v0/destinations/stormly/transform.js index 756bfb8024..dc7a256583 100644 --- a/src/v0/destinations/stormly/transform.js +++ b/src/v0/destinations/stormly/transform.js @@ -1,6 +1,7 @@ /* eslint-disable no-nested-ternary */ const get = require('get-value'); const set = require('set-value'); +const { TransformationError, InstrumentationError } = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { defaultRequestConfig, @@ -12,7 +13,6 @@ const { getDestinationExternalID, } = require('../../util'); const { CONFIG_CATEGORIES, MAPPING_CONFIG } = require('./config'); -const { TransformationError, InstrumentationError } = require('../../util/errorTypes'); const { JSON_MIME_TYPE } = require('../../util/constant'); const responseBuilder = (payload, endpoint, destination) => { @@ -40,7 +40,8 @@ const identifyResponseBuilder = (message, destination) => { const trackResponseBuilder = (message, destination) => { const { endpoint, name } = CONFIG_CATEGORIES.TRACK; - const groupId = getDestinationExternalID(message, 'stormlyGroupId') || message.properties?.groupId; + const groupId = + getDestinationExternalID(message, 'stormlyGroupId') || message.properties?.groupId; let payload = constructPayload(message, MAPPING_CONFIG[name]); if (groupId) { diff --git a/src/v0/destinations/tiktok_ads/networkHandler.js b/src/v0/destinations/tiktok_ads/networkHandler.js index 1ec31e982a..ae93b1ec15 100644 --- a/src/v0/destinations/tiktok_ads/networkHandler.js +++ b/src/v0/destinations/tiktok_ads/networkHandler.js @@ -1,10 +1,10 @@ +const { NetworkError, ThrottledError, AbortedError } = require('@rudderstack/integrations-lib'); const { proxyRequest, prepareProxyRequest } = require('../../../adapters/network'); const { processAxiosResponse, getDynamicErrorType, } = require('../../../adapters/utils/networkUtils'); const { DESTINATION } = require('./config'); -const { NetworkError, ThrottledError, AbortedError } = require('../../util/errorTypes'); const { TAG_NAMES } = require('../../util/tags'); const { HTTP_STATUS_CODES } = require('../../util/constant'); diff --git a/src/v0/destinations/tiktok_ads/transform.js b/src/v0/destinations/tiktok_ads/transform.js index 4e99d83575..f0ed04a120 100644 --- a/src/v0/destinations/tiktok_ads/transform.js +++ b/src/v0/destinations/tiktok_ads/transform.js @@ -4,6 +4,7 @@ const _ = require('lodash'); const { SHA256 } = require('crypto-js'); const get = require('get-value'); const set = require('set-value'); +const { ConfigurationError, InstrumentationError } = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { constructPayload, @@ -29,7 +30,6 @@ const { MAX_BATCH_SIZE, PARTNER_NAME, } = require('./config'); -const { ConfigurationError, InstrumentationError } = require('../../util/errorTypes'); const { JSON_MIME_TYPE } = require('../../util/constant'); const USER_EMAIL_KEY_PATH = 'context.user.email'; diff --git a/src/v0/destinations/tiktok_ads_offline_events/transform.js b/src/v0/destinations/tiktok_ads_offline_events/transform.js index 3539c856a3..945c31ea63 100644 --- a/src/v0/destinations/tiktok_ads_offline_events/transform.js +++ b/src/v0/destinations/tiktok_ads_offline_events/transform.js @@ -1,6 +1,7 @@ const { SHA256 } = require('crypto-js'); const set = require('set-value'); const lodash = require('lodash'); +const { ConfigurationError, InstrumentationError } = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { constructPayload, @@ -21,7 +22,6 @@ const { EVENT_NAME_MAPPING, PARTNER_NAME, } = require('./config'); -const { ConfigurationError, InstrumentationError } = require('../../util/errorTypes'); const { JSON_MIME_TYPE } = require('../../util/constant'); const getContents = (message) => { diff --git a/src/v0/destinations/trengo/transform.js b/src/v0/destinations/trengo/transform.js index 14d1d8c84c..06e5496a1e 100644 --- a/src/v0/destinations/trengo/transform.js +++ b/src/v0/destinations/trengo/transform.js @@ -2,6 +2,13 @@ /* eslint-disable no-prototype-builtins */ const Handlebars = require('handlebars'); const get = require('get-value'); +const { + NetworkError, + ConfigurationError, + TransformationError, + InstrumentationError, + NetworkInstrumentationError, +} = require('@rudderstack/integrations-lib'); const myAxios = require('../../../util/myAxios'); const { EventType } = require('../../../constants'); const { EndPoints, BASE_URL } = require('./config'); @@ -17,13 +24,6 @@ const { getStringValueOfJSON, ErrorMessage, } = require('../../util'); -const { - NetworkError, - ConfigurationError, - TransformationError, - InstrumentationError, - NetworkInstrumentationError, -} = require('../../util/errorTypes'); const tags = require('../../util/tags'); const { getDynamicErrorType } = require('../../../adapters/utils/networkUtils'); const { JSON_MIME_TYPE } = require('../../util/constant'); diff --git a/src/v0/destinations/twitter_ads/transform.js b/src/v0/destinations/twitter_ads/transform.js index 363e61072e..268dca3636 100644 --- a/src/v0/destinations/twitter_ads/transform.js +++ b/src/v0/destinations/twitter_ads/transform.js @@ -1,5 +1,10 @@ const sha256 = require('sha256'); +const { + InstrumentationError, + OAuthSecretError, + ConfigurationError, +} = require('@rudderstack/integrations-lib'); const { constructPayload, defaultRequestConfig, @@ -11,11 +16,6 @@ const { const { EventType } = require('../../../constants'); const { ConfigCategories, mappingConfig, BASE_URL } = require('./config'); -const { - InstrumentationError, - OAuthSecretError, - ConfigurationError, -} = require('../../util/errorTypes'); const { JSON_MIME_TYPE } = require('../../util/constant'); const { getAuthHeaderForRequest } = require('./util'); diff --git a/src/v0/destinations/user/transform.js b/src/v0/destinations/user/transform.js index 6cde9c9b80..ed04f5ccd4 100644 --- a/src/v0/destinations/user/transform.js +++ b/src/v0/destinations/user/transform.js @@ -1,3 +1,8 @@ +const { + TransformationError, + InstrumentationError, + NetworkInstrumentationError, +} = require('@rudderstack/integrations-lib'); const { defaultRequestConfig, simpleProcessRouterDest, @@ -17,11 +22,6 @@ const { createOrUpdateUserPayloadBuilder, createEventOccurrencePayloadBuilder, } = require('./utils'); -const { - TransformationError, - InstrumentationError, - NetworkInstrumentationError, -} = require('../../util/errorTypes'); const { EventType } = require('../../../constants'); const { JSON_MIME_TYPE } = require('../../util/constant'); diff --git a/src/v0/destinations/user/utils.js b/src/v0/destinations/user/utils.js index 23dd74a30f..41ad173583 100644 --- a/src/v0/destinations/user/utils.js +++ b/src/v0/destinations/user/utils.js @@ -1,4 +1,8 @@ const get = require('get-value'); +const { + InstrumentationError, + NetworkInstrumentationError, +} = require('@rudderstack/integrations-lib'); const { getHashFromArray, constructPayload, @@ -19,7 +23,6 @@ const { groupSourceKeys, identifySourceKeys, } = require('./config'); -const { InstrumentationError, NetworkInstrumentationError } = require('../../util/errorTypes'); const { JSON_MIME_TYPE } = require('../../util/constant'); const ACCEPT_HEADER_VAL = '*/*;version=2'; diff --git a/src/v0/destinations/userlist/transform.js b/src/v0/destinations/userlist/transform.js index 20b47c6a35..45d58edbbf 100644 --- a/src/v0/destinations/userlist/transform.js +++ b/src/v0/destinations/userlist/transform.js @@ -1,3 +1,4 @@ +const { InstrumentationError } = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { defaultRequestConfig, @@ -9,7 +10,6 @@ const { const { endpoint } = require('./config'); -const { InstrumentationError } = require('../../util/errorTypes'); const { JSON_MIME_TYPE } = require('../../util/constant'); // ------------------------------------------------ diff --git a/src/v0/destinations/vero/transform.js b/src/v0/destinations/vero/transform.js index 7115ea425d..f489056681 100644 --- a/src/v0/destinations/vero/transform.js +++ b/src/v0/destinations/vero/transform.js @@ -1,5 +1,6 @@ const set = require('set-value'); const get = require('get-value'); +const { InstrumentationError, ConfigurationError } = require('@rudderstack/integrations-lib'); const { defaultRequestConfig, constructPayload, @@ -11,7 +12,6 @@ const { } = require('../../util'); const { EventType } = require('../../../constants'); const { CONFIG_CATEGORIES, MAPPING_CONFIG } = require('./config'); -const { InstrumentationError, ConfigurationError } = require('../../util/errorTypes'); // This function handles the common response payload for the supported calls const responseBuilderSimple = (message, category, destination) => { diff --git a/src/v0/destinations/webengage/transform.js b/src/v0/destinations/webengage/transform.js index 835a486eff..f18a7399ff 100644 --- a/src/v0/destinations/webengage/transform.js +++ b/src/v0/destinations/webengage/transform.js @@ -1,4 +1,5 @@ /* eslint-disable no-param-reassign */ +const { InstrumentationError, TransformationError } = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { CONFIG_CATEGORIES, @@ -15,7 +16,6 @@ const { simpleProcessRouterDest, extractCustomFields, } = require('../../util'); -const { InstrumentationError, TransformationError } = require('../../util/errorTypes'); const { JSON_MIME_TYPE } = require('../../util/constant'); const responseBuilder = (message, category, { Config }) => { diff --git a/src/v0/destinations/webhook/transform.js b/src/v0/destinations/webhook/transform.js index a4a7617f68..6a115f1c63 100644 --- a/src/v0/destinations/webhook/transform.js +++ b/src/v0/destinations/webhook/transform.js @@ -1,6 +1,7 @@ /* eslint-disable no-nested-ternary */ const get = require('get-value'); const set = require('set-value'); +const { ConfigurationError } = require('@rudderstack/integrations-lib'); const { defaultPostRequestConfig, defaultPutRequestConfig, @@ -17,7 +18,6 @@ const { } = require('../../util'); const { EventType } = require('../../../constants'); -const { ConfigurationError } = require('../../util/errorTypes'); const { JSON_MIME_TYPE } = require('../../util/constant'); const getPropertyParams = (message) => { diff --git a/src/v0/destinations/woopra/transform.js b/src/v0/destinations/woopra/transform.js index 1414cbac23..9104884416 100644 --- a/src/v0/destinations/woopra/transform.js +++ b/src/v0/destinations/woopra/transform.js @@ -1,5 +1,6 @@ /* eslint-disable no-param-reassign */ const { set, get } = require('lodash'); +const { TransformationError, InstrumentationError } = require('@rudderstack/integrations-lib'); const { defaultRequestConfig, constructPayload, @@ -12,7 +13,6 @@ const { const { EventType } = require('../../../constants'); const { BASE_URL, mappingConfig, ConfigCategories } = require('./config'); const { refinePayload, getEvent } = require('./utils'); -const { TransformationError, InstrumentationError } = require('../../util/errorTypes'); const responseBuilder = (payload, endpoint, method, projectName) => { if (!payload) { diff --git a/src/v0/destinations/wootric/transform.js b/src/v0/destinations/wootric/transform.js index f89e63a5ed..f8b4274af7 100644 --- a/src/v0/destinations/wootric/transform.js +++ b/src/v0/destinations/wootric/transform.js @@ -1,3 +1,4 @@ +const { TransformationError, InstrumentationError } = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { defaultRequestConfig, @@ -19,7 +20,6 @@ const { createDeclinePayloadBuilder, } = require('./util'); const { PROPERTIES, END_USER_PROPERTIES } = require('./config'); -const { TransformationError, InstrumentationError } = require('../../util/errorTypes'); const responseBuilder = async (payload, endpoint, method, accessToken) => { if (payload) { diff --git a/src/v0/destinations/wootric/util.js b/src/v0/destinations/wootric/util.js index 207a0994bb..fce8a66586 100644 --- a/src/v0/destinations/wootric/util.js +++ b/src/v0/destinations/wootric/util.js @@ -1,4 +1,5 @@ const qs = require('qs'); +const { InstrumentationError, NetworkError } = require('@rudderstack/integrations-lib'); const { httpGET, httpPOST } = require('../../../adapters/network'); const { getDynamicErrorType, @@ -8,7 +9,6 @@ const { BASE_ENDPOINT, VERSION, ACCESS_TOKEN_CACHE_TTL_SECONDS } = require('./co const { constructPayload, isDefinedAndNotNullAndNotEmpty } = require('../../util'); const { CONFIG_CATEGORIES, MAPPING_CONFIG } = require('./config'); const Cache = require('../../util/cache'); -const { InstrumentationError, NetworkError } = require('../../util/errorTypes'); const tags = require('../../util/tags'); const { JSON_MIME_TYPE } = require('../../util/constant'); diff --git a/src/v0/destinations/yahoo_dsp/transform.js b/src/v0/destinations/yahoo_dsp/transform.js index 8b0875f1a0..4cd1eee73d 100644 --- a/src/v0/destinations/yahoo_dsp/transform.js +++ b/src/v0/destinations/yahoo_dsp/transform.js @@ -1,3 +1,4 @@ +const { InstrumentationError } = require('@rudderstack/integrations-lib'); const { BASE_ENDPOINT, ENDPOINTS, @@ -12,7 +13,6 @@ const { } = require('../../util'); const { getAccessToken, createPayload } = require('./util'); -const { InstrumentationError } = require('../../util/errorTypes'); const { JSON_MIME_TYPE } = require('../../util/constant'); /** diff --git a/src/v0/destinations/yahoo_dsp/util.js b/src/v0/destinations/yahoo_dsp/util.js index a069660bde..d41716935f 100644 --- a/src/v0/destinations/yahoo_dsp/util.js +++ b/src/v0/destinations/yahoo_dsp/util.js @@ -1,12 +1,12 @@ const qs = require('qs'); const sha256 = require('sha256'); +const { InstrumentationError, NetworkError } = require('@rudderstack/integrations-lib'); const { generateJWTToken } = require('../../../util/jwtTokenGenerator'); const { httpSend } = require('../../../adapters/network'); const { isDefinedAndNotNullAndNotEmpty } = require('../../util'); const { getDynamicErrorType } = require('../../../adapters/utils/networkUtils'); const { ACCESS_TOKEN_CACHE_TTL, AUDIENCE_ATTRIBUTE, DSP_SUPPORTED_OPERATION } = require('./config'); const Cache = require('../../util/cache'); -const { InstrumentationError, NetworkError } = require('../../util/errorTypes'); const tags = require('../../util/tags'); const { JSON_MIME_TYPE } = require('../../util/constant'); diff --git a/src/v0/destinations/zendesk/transform.js b/src/v0/destinations/zendesk/transform.js index 869e54c220..bf2bc01ed2 100644 --- a/src/v0/destinations/zendesk/transform.js +++ b/src/v0/destinations/zendesk/transform.js @@ -1,5 +1,10 @@ const get = require('get-value'); const set = require('set-value'); +const { + NetworkInstrumentationError, + InstrumentationError, + NetworkError, +} = require('@rudderstack/integrations-lib'); const myAxios = require('../../../util/myAxios'); const { EventType } = require('../../../constants'); @@ -26,11 +31,6 @@ const { const { getSourceName } = require('./util'); const logger = require('../../../logger'); const { httpGET } = require('../../../adapters/network'); -const { - NetworkInstrumentationError, - InstrumentationError, - NetworkError, -} = require('../../util/errorTypes'); const { getDynamicErrorType } = require('../../../adapters/utils/networkUtils'); const tags = require('../../util/tags'); const { JSON_MIME_TYPE } = require('../../util/constant'); diff --git a/src/v0/destinations/zendesk/util.js b/src/v0/destinations/zendesk/util.js index 0d03f73c19..29f3fc0602 100644 --- a/src/v0/destinations/zendesk/util.js +++ b/src/v0/destinations/zendesk/util.js @@ -1,4 +1,4 @@ -const { ConfigurationError } = require('../../util/errorTypes'); +const { ConfigurationError } = require('@rudderstack/integrations-lib'); /** * Get source name from config or return 'Rudder' as default source name diff --git a/src/v0/sources/appsflyer/transform.js b/src/v0/sources/appsflyer/transform.js index 862e19acd0..1f21392b67 100644 --- a/src/v0/sources/appsflyer/transform.js +++ b/src/v0/sources/appsflyer/transform.js @@ -1,8 +1,8 @@ const path = require('path'); const fs = require('fs'); +const { TransformationError } = require('@rudderstack/integrations-lib'); const Message = require('../message'); const { generateUUID } = require('../../util'); -const { TransformationError } = require('../../util/errorTypes'); const mappingJson = JSON.parse(fs.readFileSync(path.resolve(__dirname, './mapping.json'), 'utf-8')); diff --git a/src/v0/sources/braze/transform.js b/src/v0/sources/braze/transform.js index 34158c8e68..e3d7200023 100644 --- a/src/v0/sources/braze/transform.js +++ b/src/v0/sources/braze/transform.js @@ -2,9 +2,9 @@ const set = require('set-value'); const get = require('get-value'); const path = require('path'); const fs = require('fs'); +const { TransformationError } = require('@rudderstack/integrations-lib'); const { formatTimeStamp, removeUndefinedAndNullValues } = require('../../util'); const Message = require('../message'); -const { TransformationError } = require('../../util/errorTypes'); // import mapping json using JSON.parse to preserve object key order const mapping = JSON.parse(fs.readFileSync(path.resolve(__dirname, './mapping.json'), 'utf-8')); diff --git a/src/v0/sources/canny/transform.js b/src/v0/sources/canny/transform.js index abc6f491b8..9188f5ac34 100644 --- a/src/v0/sources/canny/transform.js +++ b/src/v0/sources/canny/transform.js @@ -1,8 +1,8 @@ const sha256 = require('sha256'); +const { TransformationError } = require('@rudderstack/integrations-lib'); const Message = require('../message'); const { voterMapping, authorMapping, checkForRequiredFields } = require('./util'); const { logger } = require('../../../logger'); -const { TransformationError } = require('../../util/errorTypes'); const CannyOperation = { VOTE_CREATED: 'vote.created', diff --git a/src/v0/sources/canny/util.js b/src/v0/sources/canny/util.js index cd92c0c2af..549b7dcbbc 100644 --- a/src/v0/sources/canny/util.js +++ b/src/v0/sources/canny/util.js @@ -1,6 +1,6 @@ const path = require('path'); const fs = require('fs'); -const { TransformationError } = require('../../util/errorTypes'); +const { TransformationError } = require('@rudderstack/integrations-lib'); // import mapping json using JSON.parse to preserve object key order const voterMapping = JSON.parse( diff --git a/src/v0/sources/customerio/transform.js b/src/v0/sources/customerio/transform.js index 51c353dd3b..a2e69388b9 100644 --- a/src/v0/sources/customerio/transform.js +++ b/src/v0/sources/customerio/transform.js @@ -8,7 +8,6 @@ const Message = require('../message'); const { mappingConfig } = require('./config'); const { isDefinedAndNotNull } = require('../../util'); -// const { TransformationError } = require("../../util/errorTypes"); function process(event) { const message = new Message(`Customer.io`); @@ -35,7 +34,6 @@ function process(event) { message.setProperty('sentAt', validTimestamp); } - // when customer.io does not pass an associated userId, set the email address as anonymousId if ( (message.userId === null || message.userId === undefined) && diff --git a/src/v0/sources/gainsightpx/transform.js b/src/v0/sources/gainsightpx/transform.js index ca91765fa6..92f0a07456 100644 --- a/src/v0/sources/gainsightpx/transform.js +++ b/src/v0/sources/gainsightpx/transform.js @@ -1,4 +1,5 @@ const md5 = require('md5'); +const { TransformationError } = require('@rudderstack/integrations-lib'); const Message = require('../message'); const customMapping = require('./data/customMapping.json'); const identifyMapping = require('./data/identifyMapping.json'); @@ -9,7 +10,6 @@ const surveyMapping = require('./data/surveyMapping.json'); const featureMatchMapping = require('./data/featureMatchMapping.json'); const segmentIoMapping = require('./data/segmentIOMapping.json'); const { refinePayload, refineTraitPayload } = require('./utils'); -const { TransformationError } = require('../../util/errorTypes'); const buildIdentifyPayload = (event) => { let message = new Message(`GAINSIGHTPX`); diff --git a/src/v0/sources/iterable/transform.js b/src/v0/sources/iterable/transform.js index 275051815b..dc3fc72c3c 100644 --- a/src/v0/sources/iterable/transform.js +++ b/src/v0/sources/iterable/transform.js @@ -1,8 +1,8 @@ const path = require('path'); const fs = require('fs'); const md5 = require('md5'); +const { TransformationError } = require('@rudderstack/integrations-lib'); const Message = require('../message'); -const { TransformationError } = require('../../util/errorTypes'); // import mapping json using JSON.parse to preserve object key order const mapping = JSON.parse(fs.readFileSync(path.resolve(__dirname, './mapping.json'), 'utf-8')); diff --git a/src/v0/sources/mailmodo/transform.js b/src/v0/sources/mailmodo/transform.js index 8b36eafa1a..a4383fb440 100644 --- a/src/v0/sources/mailmodo/transform.js +++ b/src/v0/sources/mailmodo/transform.js @@ -1,9 +1,9 @@ const path = require('path'); const fs = require('fs'); const sha256 = require('sha256'); +const { TransformationError } = require('@rudderstack/integrations-lib'); const { flattenJson, removeUndefinedAndNullAndEmptyValues } = require('../../util'); const Message = require('../message'); -const { TransformationError } = require('../../util/errorTypes'); // import mapping json using JSON.parse to preserve object key order const mapping = JSON.parse(fs.readFileSync(path.resolve(__dirname, './mapping.json'), 'utf-8')); diff --git a/src/v0/sources/monday/transform.js b/src/v0/sources/monday/transform.js index 48cddec301..d63323605b 100644 --- a/src/v0/sources/monday/transform.js +++ b/src/v0/sources/monday/transform.js @@ -1,7 +1,7 @@ const sha256 = require('sha256'); +const { TransformationError } = require('@rudderstack/integrations-lib'); const Message = require('../message'); const { mapping, formEventName } = require('./util'); -const { TransformationError } = require('../../util/errorTypes'); const { generateUUID, removeUndefinedAndNullValues } = require('../../util'); const { JSON_MIME_TYPE } = require('../../util/constant'); diff --git a/src/v0/sources/shopify/util.js b/src/v0/sources/shopify/util.js index 2521e9cb9d..1da75cba3d 100644 --- a/src/v0/sources/shopify/util.js +++ b/src/v0/sources/shopify/util.js @@ -2,6 +2,7 @@ /* eslint-disable @typescript-eslint/naming-convention */ const { v5 } = require('uuid'); const sha256 = require('sha256'); +const { TransformationError } = require('@rudderstack/integrations-lib'); const stats = require('../../../util/stats'); const { constructPayload, @@ -22,7 +23,6 @@ const { useRedisDatabase, maxTimeToIdentifyRSGeneratedCall, } = require('./config'); -const { TransformationError } = require('../../util/errorTypes'); const getDataFromRedis = async (key, metricMetadata) => { try { diff --git a/src/v0/util/errorTypes/abortedError.js b/src/v0/util/errorTypes/abortedError.js deleted file mode 100644 index bf5896c8be..0000000000 --- a/src/v0/util/errorTypes/abortedError.js +++ /dev/null @@ -1,15 +0,0 @@ -const tags = require('../tags'); -const { BaseError } = require('./base'); - -class AbortedError extends BaseError { - constructor(message, statusCode, destResponse, authErrorCategory) { - const finalStatTags = { - [tags.TAG_NAMES.ERROR_CATEGORY]: tags.ERROR_CATEGORIES.NETWORK, - [tags.TAG_NAMES.ERROR_TYPE]: tags.ERROR_TYPES.ABORTED, - }; - - super(message, statusCode || 400, finalStatTags, destResponse, authErrorCategory); - } -} - -module.exports = AbortedError; diff --git a/src/v0/util/errorTypes/configurationError.js b/src/v0/util/errorTypes/configurationError.js deleted file mode 100644 index 59df3718e7..0000000000 --- a/src/v0/util/errorTypes/configurationError.js +++ /dev/null @@ -1,16 +0,0 @@ -const tags = require('../tags'); -const { BaseError } = require('./base'); - -class ConfigurationError extends BaseError { - constructor(message) { - const finalStatTags = { - [tags.TAG_NAMES.ERROR_CATEGORY]: tags.ERROR_CATEGORIES.DATA_VALIDATION, - [tags.TAG_NAMES.ERROR_TYPE]: tags.ERROR_TYPES.CONFIGURATION, - }; - - // TODO: Change this to a retryable error - super(message, 400, finalStatTags); - } -} - -module.exports = ConfigurationError; diff --git a/src/v0/util/errorTypes/index.js b/src/v0/util/errorTypes/index.js index 2926306dcd..80268c3e77 100644 --- a/src/v0/util/errorTypes/index.js +++ b/src/v0/util/errorTypes/index.js @@ -1,37 +1,5 @@ -const { BaseError } = require('./base'); -const TransformationError = require('./transformationError'); -const ConfigurationError = require('./configurationError'); -const InstrumentationError = require('./instrumentationError'); -const PlatformError = require('./platformError'); -const OAuthSecretError = require('./oAuthSecretError'); -const NetworkError = require('./networkError'); -const ThrottledError = require('./throttledError'); -const RedisError = require('./redisError'); -const RetryableError = require('./retryableError'); -const InvalidAuthTokenError = require('./invalidAuthTokenError'); -const AbortedError = require('./abortedError'); -const UnhandledStatusCodeError = require('./unhandledStatusCodeError'); -const UnauthorizedError = require('./unauthorizedError'); -const NetworkInstrumentationError = require('./networkInstrumentationError'); -const UnsupportedEventError = require('./unsupportedEventError'); const FilteredEventsError = require('./filteredEventsError'); module.exports = { - BaseError, - TransformationError, - ConfigurationError, - InstrumentationError, - PlatformError, - OAuthSecretError, - NetworkError, - ThrottledError, - RetryableError, - InvalidAuthTokenError, - AbortedError, - UnhandledStatusCodeError, - UnauthorizedError, - NetworkInstrumentationError, - UnsupportedEventError, - RedisError, FilteredEventsError, }; diff --git a/src/v0/util/errorTypes/instrumentationError.js b/src/v0/util/errorTypes/instrumentationError.js deleted file mode 100644 index 74df966260..0000000000 --- a/src/v0/util/errorTypes/instrumentationError.js +++ /dev/null @@ -1,15 +0,0 @@ -const tags = require('../tags'); -const { BaseError } = require('./base'); - -class InstrumentationError extends BaseError { - constructor(message) { - const finalStatTags = { - [tags.TAG_NAMES.ERROR_CATEGORY]: tags.ERROR_CATEGORIES.DATA_VALIDATION, - [tags.TAG_NAMES.ERROR_TYPE]: tags.ERROR_TYPES.INSTRUMENTATION, - }; - - super(message, 400, finalStatTags); - } -} - -module.exports = InstrumentationError; diff --git a/src/v0/util/errorTypes/invalidAuthTokenError.js b/src/v0/util/errorTypes/invalidAuthTokenError.js deleted file mode 100644 index 6a78996c6e..0000000000 --- a/src/v0/util/errorTypes/invalidAuthTokenError.js +++ /dev/null @@ -1,16 +0,0 @@ -const tags = require('../tags'); -const { BaseError } = require('./base'); - -class InvalidAuthTokenError extends BaseError { - constructor(message, statusCode, destResponse, authErrorCategory) { - const finalStatTags = { - [tags.TAG_NAMES.ERROR_CATEGORY]: tags.ERROR_CATEGORIES.NETWORK, - [tags.TAG_NAMES.ERROR_TYPE]: tags.ERROR_TYPES.RETRYABLE, - [tags.TAG_NAMES.META]: tags.METADATA.INVALID_AUTH_TOKEN, - }; - - super(message, statusCode || 500, finalStatTags, destResponse, authErrorCategory); - } -} - -module.exports = InvalidAuthTokenError; diff --git a/src/v0/util/errorTypes/networkError.js b/src/v0/util/errorTypes/networkError.js deleted file mode 100644 index 3461efbbdd..0000000000 --- a/src/v0/util/errorTypes/networkError.js +++ /dev/null @@ -1,29 +0,0 @@ -const tags = require('../tags'); -const { BaseError } = require('./base'); - -const errorTypes = Object.values(tags.ERROR_TYPES); -const metaTypes = Object.values(tags.METADATA); -// To throw error when error type (abort, retry or throttle) has to be dynamically deduced -class NetworkError extends BaseError { - constructor(message, statusCode, statTags, destResponse, authErrorCategory) { - const finalStatTags = { - [tags.TAG_NAMES.ERROR_CATEGORY]: tags.ERROR_CATEGORIES.NETWORK, - [tags.TAG_NAMES.ERROR_TYPE]: tags.ERROR_TYPES.ABORTED, - }; - - // Allow specifying only error type and meta tags - if (statTags && typeof statTags === 'object' && !Array.isArray(statTags)) { - if (errorTypes.includes(statTags[tags.TAG_NAMES.ERROR_TYPE])) { - finalStatTags[tags.TAG_NAMES.ERROR_TYPE] = statTags[tags.TAG_NAMES.ERROR_TYPE]; - } - - if (metaTypes.includes(statTags[tags.TAG_NAMES.META])) { - finalStatTags[tags.TAG_NAMES.META] = statTags[tags.TAG_NAMES.META]; - } - } - - super(message, statusCode || 400, finalStatTags, destResponse, authErrorCategory); - } -} - -module.exports = NetworkError; diff --git a/src/v0/util/errorTypes/networkInstrumentationError.js b/src/v0/util/errorTypes/networkInstrumentationError.js deleted file mode 100644 index fb9acdfeb4..0000000000 --- a/src/v0/util/errorTypes/networkInstrumentationError.js +++ /dev/null @@ -1,16 +0,0 @@ -const tags = require('../tags'); -const { BaseError } = require('./base'); - -class NetworkInstrumentationError extends BaseError { - constructor(message, destResponse) { - const finalStatTags = { - [tags.TAG_NAMES.ERROR_CATEGORY]: tags.ERROR_CATEGORIES.NETWORK, - [tags.TAG_NAMES.ERROR_TYPE]: tags.ERROR_TYPES.ABORTED, - [tags.TAG_NAMES.META]: tags.METADATA.INSTRUMENTATION, - }; - - super(message, 400, finalStatTags, destResponse); - } -} - -module.exports = NetworkInstrumentationError; diff --git a/src/v0/util/errorTypes/oAuthSecretError.js b/src/v0/util/errorTypes/oAuthSecretError.js deleted file mode 100644 index dd8c51eaac..0000000000 --- a/src/v0/util/errorTypes/oAuthSecretError.js +++ /dev/null @@ -1,15 +0,0 @@ -const tags = require('../tags'); -const { BaseError } = require('./base'); - -class OAuthSecretError extends BaseError { - constructor(message) { - const finalStatTags = { - [tags.TAG_NAMES.ERROR_CATEGORY]: tags.ERROR_CATEGORIES.PLATFORM, - [tags.TAG_NAMES.ERROR_TYPE]: tags.ERROR_TYPES.OAUTH_SECRET, - }; - - super(message, 500, finalStatTags); - } -} - -module.exports = OAuthSecretError; diff --git a/src/v0/util/errorTypes/platformError.js b/src/v0/util/errorTypes/platformError.js deleted file mode 100644 index b04ef50c16..0000000000 --- a/src/v0/util/errorTypes/platformError.js +++ /dev/null @@ -1,14 +0,0 @@ -const tags = require('../tags'); -const { BaseError } = require('./base'); - -class PlatformError extends BaseError { - constructor(message) { - const finalStatTags = { - [tags.TAG_NAMES.ERROR_CATEGORY]: tags.ERROR_CATEGORIES.PLATFORM, - }; - - super(message, 400, finalStatTags); - } -} - -module.exports = PlatformError; diff --git a/src/v0/util/errorTypes/redisError.js b/src/v0/util/errorTypes/redisError.js deleted file mode 100644 index ec3d49ff2b..0000000000 --- a/src/v0/util/errorTypes/redisError.js +++ /dev/null @@ -1,15 +0,0 @@ -const tags = require('../tags'); -const { BaseError } = require('./base'); - -class RedisError extends BaseError { - constructor(message, statusCode) { - const finalStatTags = { - [tags.TAG_NAMES.ERROR_CATEGORY]: tags.ERROR_CATEGORIES.TRANSFORMATION, - [tags.TAG_NAMES.ERROR_TYPE]: tags.ERROR_TYPES.REDIS, - }; - - super(message, statusCode || 500, finalStatTags); - } -} - -module.exports = RedisError; diff --git a/src/v0/util/errorTypes/retryableError.js b/src/v0/util/errorTypes/retryableError.js deleted file mode 100644 index ba18424c76..0000000000 --- a/src/v0/util/errorTypes/retryableError.js +++ /dev/null @@ -1,15 +0,0 @@ -const tags = require('../tags'); -const { BaseError } = require('./base'); - -class RetryableError extends BaseError { - constructor(message, statusCode, destResponse, authErrorCategory) { - const finalStatTags = { - [tags.TAG_NAMES.ERROR_CATEGORY]: tags.ERROR_CATEGORIES.NETWORK, - [tags.TAG_NAMES.ERROR_TYPE]: tags.ERROR_TYPES.RETRYABLE, - }; - - super(message, statusCode || 500, finalStatTags, destResponse, authErrorCategory); - } -} - -module.exports = RetryableError; diff --git a/src/v0/util/errorTypes/throttledError.js b/src/v0/util/errorTypes/throttledError.js deleted file mode 100644 index 0e873c7892..0000000000 --- a/src/v0/util/errorTypes/throttledError.js +++ /dev/null @@ -1,15 +0,0 @@ -const tags = require('../tags'); -const { BaseError } = require('./base'); - -class ThrottledError extends BaseError { - constructor(message, destResponse) { - const finalStatTags = { - [tags.TAG_NAMES.ERROR_CATEGORY]: tags.ERROR_CATEGORIES.NETWORK, - [tags.TAG_NAMES.ERROR_TYPE]: tags.ERROR_TYPES.THROTTLED, - }; - - super(message, 429, finalStatTags, destResponse); - } -} - -module.exports = ThrottledError; diff --git a/src/v0/util/errorTypes/transformationError.js b/src/v0/util/errorTypes/transformationError.js deleted file mode 100644 index 0b28b61984..0000000000 --- a/src/v0/util/errorTypes/transformationError.js +++ /dev/null @@ -1,14 +0,0 @@ -const tags = require('../tags'); -const { BaseError } = require('./base'); - -class TransformationError extends BaseError { - constructor(message, statusCode, destResponse, authErrorCategory) { - const finalStatTags = { - [tags.TAG_NAMES.ERROR_CATEGORY]: tags.ERROR_CATEGORIES.TRANSFORMATION, - }; - - super(message, statusCode || 400, finalStatTags, destResponse, authErrorCategory); - } -} - -module.exports = TransformationError; diff --git a/src/v0/util/errorTypes/unauthorizedError.js b/src/v0/util/errorTypes/unauthorizedError.js deleted file mode 100644 index c9c35795b8..0000000000 --- a/src/v0/util/errorTypes/unauthorizedError.js +++ /dev/null @@ -1,16 +0,0 @@ -const tags = require('../tags'); -const { BaseError } = require('./base'); - -class UnauthorizedError extends BaseError { - constructor(message, statusCode, destResponse, authErrorCategory) { - const finalStatTags = { - [tags.TAG_NAMES.ERROR_CATEGORY]: tags.ERROR_CATEGORIES.NETWORK, - [tags.TAG_NAMES.ERROR_TYPE]: tags.ERROR_TYPES.ABORTED, - [tags.TAG_NAMES.META]: tags.METADATA.UNAUTHORIZED, - }; - - super(message, statusCode || 400, finalStatTags, destResponse, authErrorCategory); - } -} - -module.exports = UnauthorizedError; diff --git a/src/v0/util/errorTypes/unhandledStatusCodeError.js b/src/v0/util/errorTypes/unhandledStatusCodeError.js deleted file mode 100644 index fe35c01c1a..0000000000 --- a/src/v0/util/errorTypes/unhandledStatusCodeError.js +++ /dev/null @@ -1,16 +0,0 @@ -const tags = require('../tags'); -const { BaseError } = require('./base'); - -class UnhandledStatusCodeError extends BaseError { - constructor(message, destResponse) { - const finalStatTags = { - [tags.TAG_NAMES.ERROR_CATEGORY]: tags.ERROR_CATEGORIES.NETWORK, - [tags.TAG_NAMES.ERROR_TYPE]: tags.ERROR_TYPES.ABORTED, - [tags.TAG_NAMES.META]: tags.METADATA.UNHANDLED_STATUS_CODE, - }; - - super(message, 400, finalStatTags, destResponse); - } -} - -module.exports = UnhandledStatusCodeError; diff --git a/src/v0/util/errorTypes/unsupportedEventError.js b/src/v0/util/errorTypes/unsupportedEventError.js deleted file mode 100644 index c2e965b620..0000000000 --- a/src/v0/util/errorTypes/unsupportedEventError.js +++ /dev/null @@ -1,14 +0,0 @@ -const tags = require('../tags'); -const { BaseError } = require('./base'); - -class UnsupportedEventError extends BaseError { - constructor(message) { - const finalStatTags = { - [tags.TAG_NAMES.ERROR_CATEGORY]: tags.ERROR_CATEGORIES.PLATFORM, - [tags.TAG_NAMES.ERROR_TYPE]: tags.ERROR_TYPES.UNSUPPORTED, - }; - super(message, 400, finalStatTags); - } -} - -module.exports = UnsupportedEventError; diff --git a/src/v0/util/facebookUtils/index.js b/src/v0/util/facebookUtils/index.js index d39d1c4ce9..4c09518559 100644 --- a/src/v0/util/facebookUtils/index.js +++ b/src/v0/util/facebookUtils/index.js @@ -1,4 +1,5 @@ const sha256 = require('sha256'); +const { InstrumentationError, TransformationError } = require('@rudderstack/integrations-lib'); const { isObject, getIntegrationsObj, @@ -9,7 +10,6 @@ const { getFieldValueFromMessage, formatTimeStamp, } = require('../index'); -const { InstrumentationError, TransformationError } = require('../errorTypes'); /** This function transforms the payloads according to the config settings and adds, removes or hashes pii data. @param message --> the rudder payload diff --git a/src/v0/util/facebookUtils/networkHandler.js b/src/v0/util/facebookUtils/networkHandler.js index 87c2ced2b4..9589d17255 100644 --- a/src/v0/util/facebookUtils/networkHandler.js +++ b/src/v0/util/facebookUtils/networkHandler.js @@ -1,11 +1,11 @@ const { isEmpty } = require('lodash'); const get = require('get-value'); +const { NetworkError } = require('@rudderstack/integrations-lib'); const { processAxiosResponse, getDynamicErrorType, } = require('../../../adapters/utils/networkUtils'); const { prepareProxyRequest, proxyRequest } = require('../../../adapters/network'); -const { NetworkError } = require('../errorTypes'); const tags = require('../tags'); const { ErrorDetailsExtractorBuilder } = require('../../../util/error-extractor'); diff --git a/src/v0/util/index.js b/src/v0/util/index.js index d6f6621220..0296895662 100644 --- a/src/v0/util/index.js +++ b/src/v0/util/index.js @@ -16,16 +16,16 @@ const uaParser = require('ua-parser-js'); const moment = require('moment-timezone'); const sha256 = require('sha256'); const crypto = require('crypto'); -const logger = require('../../logger'); -const stats = require('../../util/stats'); -const { DestCanonicalNames, DestHandlerMap } = require('../../constants/destinationCanonicalNames'); const { InstrumentationError, BaseError, PlatformError, TransformationError, OAuthSecretError, -} = require('./errorTypes'); +} = require('@rudderstack/integrations-lib'); +const logger = require('../../logger'); +const stats = require('../../util/stats'); +const { DestCanonicalNames, DestHandlerMap } = require('../../constants/destinationCanonicalNames'); const { client: errNotificationClient } = require('../../util/errorNotifier'); const { HTTP_STATUS_CODES } = require('./constant'); const { diff --git a/src/v0/util/regulation-api.js b/src/v0/util/regulation-api.js index 8a557858e0..238993ee81 100644 --- a/src/v0/util/regulation-api.js +++ b/src/v0/util/regulation-api.js @@ -1,4 +1,4 @@ -const { PlatformError } = require('./errorTypes'); +const { PlatformError } = require('@rudderstack/integrations-lib'); const RegulationApiUtils = { /** diff --git a/src/warehouse/identity.js b/src/warehouse/identity.js index 4326dddfc6..c34a66a481 100644 --- a/src/warehouse/identity.js +++ b/src/warehouse/identity.js @@ -1,5 +1,5 @@ const _ = require('lodash'); -const { InstrumentationError } = require('../v0/util/errorTypes'); +const { InstrumentationError } = require('@rudderstack/integrations-lib'); const { getVersionedUtils } = require('./util'); const identityEnabledWarehouses = ['snowflake', 'bq']; diff --git a/src/warehouse/index.js b/src/warehouse/index.js index c12239c440..d88904b4a8 100644 --- a/src/warehouse/index.js +++ b/src/warehouse/index.js @@ -25,7 +25,7 @@ const whScreenColumnMappingRules = require('./config/WHScreenConfig.js'); const whGroupColumnMappingRules = require('./config/WHGroupConfig.js'); const whAliasColumnMappingRules = require('./config/WHAliasConfig.js'); const { isDataLakeProvider } = require('./config/helpers'); -const { InstrumentationError } = require('../v0/util/errorTypes'); +const { InstrumentationError } = require('@rudderstack/integrations-lib'); const whExtractEventTableColumnMappingRules = require('./config/WHExtractEventTableConfig.js'); const maxColumnsInEvent = parseInt(process.env.WH_MAX_COLUMNS_IN_EVENT || '200', 10); diff --git a/src/warehouse/util.js b/src/warehouse/util.js index 91b49039f1..79981249e7 100644 --- a/src/warehouse/util.js +++ b/src/warehouse/util.js @@ -3,7 +3,7 @@ const get = require('get-value'); const v0 = require('./v0/util'); const v1 = require('./v1/util'); -const { PlatformError, InstrumentationError } = require('../v0/util/errorTypes'); +const { PlatformError, InstrumentationError } = require('@rudderstack/integrations-lib'); const minTimeInMs = Date.parse('0001-01-01T00:00:00Z'); const maxTimeInMs = Date.parse('9999-12-31T23:59:59.999Z'); diff --git a/src/warehouse/v1/util.js b/src/warehouse/v1/util.js index 8f44a17b8e..1c44a2385e 100644 --- a/src/warehouse/v1/util.js +++ b/src/warehouse/v1/util.js @@ -2,7 +2,7 @@ const _ = require('lodash'); const reservedANSIKeywordsMap = require('../config/ReservedKeywords.json'); const { isDataLakeProvider } = require('../config/helpers'); -const { TransformationError } = require('../../v0/util/errorTypes'); +const { TransformationError } = require('@rudderstack/integrations-lib'); function safeTableName(options, name = '') { const { provider } = options; diff --git a/test/integrations/destinations/pinterest_tag/processor/data.ts b/test/integrations/destinations/pinterest_tag/processor/data.ts index c7f482aadd..045ba53cd1 100644 --- a/test/integrations/destinations/pinterest_tag/processor/data.ts +++ b/test/integrations/destinations/pinterest_tag/processor/data.ts @@ -3474,4 +3474,89 @@ export const data = [ }, }, }, + { + name: 'pinterest_tag', + description: 'Test 26', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + channel: 'web', + sentAt: '2020-08-14T05:30:30.118Z', + context: { + source: 'test', + userAgent: 'chrome', + traits: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + email: 'abc@gmail.com', + phone: '+1234589947', + ge: 'male', + db: '19950715', + lastname: 'Rudderlabs', + firstName: 'Test', + address: { city: 'Kolkata', state: 'WB', zip: '700114', country: 'IN' }, + }, + device: { advertisingId: 'abc123' }, + library: { name: 'rudder-sdk-ruby-sync', version: '1.0.6' }, + }, + messageId: '7208bbb6-2c4e-45bb-bf5b-ad426f3593e9', + timestamp: '2020-08-14T05:30:30.118Z', + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + integrations: { All: true }, + }, + destination: { + DestinationDefinition: { Config: { cdkV2Enabled: true } }, + ID: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', + Name: 'PINTEREST_TAG', + Config: { + sendAsTestEvent: false, + tagId: '123456789', + apiVersion: 'newApi', + adAccountId: 'accountId123', + conversionToken: 'conversionToken123', + appId: '429047995', + enhancedMatch: true, + enableDeduplication: true, + deduplicationKey: 'messageId', + sendingUnHashedData: true, + sendAsCustomEvent: false, + customProperties: [{ properties: 'presentclass' }, { properties: 'presentgrade' }], + eventsMapping: [{ from: 'ABC Searched', to: 'WatchVideo' }], + }, + Enabled: true, + Transformations: [], + }, + metadata: { destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq' }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + error: + 'event_name could not be mapped. Aborting.: Workflow: procWorkflow, Step: validateInputForTrack, ChildStep: undefined, OriginalError: event_name could not be mapped. Aborting.', + metadata: { destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq' }, + statTags: { + destType: 'PINTEREST_TAG', + errorCategory: 'platform', + feature: 'processor', + implementation: 'cdkV2', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, ]; From dd884ddc78898bd7de155ec4f05ce8fe6e2c4b80 Mon Sep 17 00:00:00 2001 From: Anant Jain <62471433+anantjain45823@users.noreply.github.com> Date: Fri, 10 Nov 2023 12:20:23 +0530 Subject: [PATCH 009/135] fix: update create-hotfix-branch.yml (#2815) Update create-hotfix-branch.yml There is a missing <'> due which we are unable to create a hotfix branch --- .github/workflows/create-hotfix-branch.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/create-hotfix-branch.yml b/.github/workflows/create-hotfix-branch.yml index 97611f1eee..03c79e0df1 100644 --- a/.github/workflows/create-hotfix-branch.yml +++ b/.github/workflows/create-hotfix-branch.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest # Only allow these users to create new hotfix branch from 'main' - if: github.ref == 'refs/heads/main' && (github.actor == 'ItsSudip' || github.actor == 'krishna2020' || github.actor == 'saikumarrs' || github.actor == 'sandeepdsvs' || github.actor == 'shrouti1507' || github.actor == 'anantjain45823' || github.actor == 'chandumlg' || github.actor == 'mihir-4116' || github.actor == 'ujjwal-ab') && (github.triggering_actor == 'ItsSudip' || github.triggering_actor == 'krishna2020' || github.triggering_actor == 'saikumarrs' || github.triggering_actor == 'sandeepdsvs' || github.triggering_actor == 'shrouti1507' || github.triggering_actor == 'anantjain45823' || github.triggering_actor == 'chandumlg' || github.triggering_actor == 'mihir-4116' || github.triggering_actor == 'ujjwal-ab) + if: github.ref == 'refs/heads/main' && (github.actor == 'ItsSudip' || github.actor == 'krishna2020' || github.actor == 'saikumarrs' || github.actor == 'sandeepdsvs' || github.actor == 'shrouti1507' || github.actor == 'anantjain45823' || github.actor == 'chandumlg' || github.actor == 'mihir-4116' || github.actor == 'ujjwal-ab') && (github.triggering_actor == 'ItsSudip' || github.triggering_actor == 'krishna2020' || github.triggering_actor == 'saikumarrs' || github.triggering_actor == 'sandeepdsvs' || github.triggering_actor == 'shrouti1507' || github.triggering_actor == 'anantjain45823' || github.triggering_actor == 'chandumlg' || github.triggering_actor == 'mihir-4116' || github.triggering_actor == 'ujjwal-ab') steps: - name: Create Branch uses: peterjgrainger/action-create-branch@v2.4.0 From 084c6fb6d390d5f4a64f121a79e0cab2abf1c66a Mon Sep 17 00:00:00 2001 From: Anant Jain <62471433+anantjain45823@users.noreply.github.com> Date: Fri, 10 Nov 2023 12:50:24 +0530 Subject: [PATCH 010/135] revert: fix: amplitude page and screen call containg double spaces (#2814) * revert: fix: amplitude page and screen call containg double spaces * chore: fix for undefined names --- src/v0/destinations/am/transform.js | 13 +++---------- test/__tests__/data/am_output.json | 4 ++-- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/src/v0/destinations/am/transform.js b/src/v0/destinations/am/transform.js index 04a1c5a107..48d9d0cd9b 100644 --- a/src/v0/destinations/am/transform.js +++ b/src/v0/destinations/am/transform.js @@ -194,9 +194,9 @@ const handleTraits = (messageTrait, destination) => { const getScreenevTypeAndUpdatedProperties = (message, CATEGORY_KEY) => { const name = message.name || message.event || get(message, CATEGORY_KEY); - const updatedName = name ? `${name} ` : ''; + return { - eventType: `Viewed ${updatedName}Screen`, + eventType: `Viewed ${message.name || message.event || get(message, CATEGORY_KEY) || ''} Screen`, updatedProperties: { ...message.properties, name, @@ -577,8 +577,6 @@ const getGroupInfo = (destination, groupInfo, groupTraits) => { } return groupInfo; }; -const getUpdatedPageNameWithoutUserDefinedPageEventName = (name, message, CATEGORY_KEY) => - name || get(message, CATEGORY_KEY) ? `${name || get(message, CATEGORY_KEY)} ` : undefined; // Generic process function which invokes specific handler functions depending on message type // and event type where applicable @@ -614,12 +612,7 @@ const processSingleMessage = (message, destination) => { .trim() .replaceAll(/{{([^{}]+)}}/g, get(message, getMessagePath)); } else { - const updatedName = getUpdatedPageNameWithoutUserDefinedPageEventName( - name, - message, - CATEGORY_KEY, - ); - evType = `Viewed ${updatedName || ''}Page`; + evType = `Viewed ${name || get(message, CATEGORY_KEY) || ''} Page`; } message.properties = { ...properties, diff --git a/test/__tests__/data/am_output.json b/test/__tests__/data/am_output.json index 34471f4922..ea4b8b908d 100644 --- a/test/__tests__/data/am_output.json +++ b/test/__tests__/data/am_output.json @@ -3944,7 +3944,7 @@ "id": "User Android", "userId": "User Android" }, - "event_type": "Viewed Screen", + "event_type": "Viewed Screen", "user_id": "User Android", "device_brand": "Google", "time": 1662393883250, @@ -4276,7 +4276,7 @@ "app_name": "RudderLabs JavaScript SDK", "app_version": "1.0.0", "language": "en-US", - "event_type": "Viewed Page", + "event_type": "Viewed Page", "event_properties": { "path": "/destinations/amplitude", "referrer": "", From 608a4d520bcc5ef5333bbb05e8d9cf5414150e69 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Fri, 10 Nov 2023 07:22:59 +0000 Subject: [PATCH 011/135] chore(release): 1.49.1 --- CHANGELOG.md | 7 +++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b9256fa915..97a3a2c226 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [1.49.1](https://github.com/rudderlabs/rudder-transformer/compare/v1.49.0...v1.49.1) (2023-11-10) + + +### Bug Fixes + +* update create-hotfix-branch.yml ([#2815](https://github.com/rudderlabs/rudder-transformer/issues/2815)) ([dd884dd](https://github.com/rudderlabs/rudder-transformer/commit/dd884ddc78898bd7de155ec4f05ce8fe6e2c4b80)) + ## [1.49.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.48.0...v1.49.0) (2023-11-06) diff --git a/package-lock.json b/package-lock.json index 5e857f6bb9..a73ba099c4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "rudder-transformer", - "version": "1.49.0", + "version": "1.49.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "rudder-transformer", - "version": "1.49.0", + "version": "1.49.1", "license": "ISC", "dependencies": { "@amplitude/ua-parser-js": "^0.7.24", diff --git a/package.json b/package.json index ac0ae2bbeb..130fc840e1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rudder-transformer", - "version": "1.49.0", + "version": "1.49.1", "description": "", "homepage": "https://github.com/rudderlabs/rudder-transformer#readme", "bugs": { From 0996e816d3671c3e25561f76e3219be99225f24b Mon Sep 17 00:00:00 2001 From: Anant Jain <62471433+anantjain45823@users.noreply.github.com> Date: Fri, 10 Nov 2023 14:23:57 +0530 Subject: [PATCH 012/135] feat: introduce v1/source/sourceType endpoint (#2722) * source routing handle * migrate webhook to v1 * using folder structure to fetch varsionMap dynamically * small fix * update feature.json for v1 support boolean * temp commit * chore: comments addressed * chore: add test cases * chore: use map to store source version mapping * chore: resolve conflicts * chore: fix test cases and adressed comments * chore: fix test cases and adressed comments * chore: removed unnecessary types for source * chore: add test case for version v1 for webhook source means no alters in payload --- src/controllers/source.ts | 9 +- src/controllers/util/index.test.ts | 149 ++++++++++++++++++ src/controllers/util/index.ts | 48 ++++++ src/features.json | 3 +- src/types/index.ts | 29 ++++ src/{v0 => v1}/sources/webhook/transform.js | 5 +- .../source/{ => v0}/failure.json | 0 .../source/{ => v0}/response_to_caller.json | 0 .../source/{ => v0}/successful.json | 0 .../data_scenarios/source/v1/failure.json | 27 ++++ .../data_scenarios/source/v1/pipedream.json | 49 ++++++ .../data_scenarios/source/v1/successful.json | 38 +++++ test/apitests/service.api.test.ts | 38 ++++- 13 files changed, 387 insertions(+), 8 deletions(-) create mode 100644 src/controllers/util/index.test.ts rename src/{v0 => v1}/sources/webhook/transform.js (81%) rename test/apitests/data_scenarios/source/{ => v0}/failure.json (100%) rename test/apitests/data_scenarios/source/{ => v0}/response_to_caller.json (100%) rename test/apitests/data_scenarios/source/{ => v0}/successful.json (100%) create mode 100644 test/apitests/data_scenarios/source/v1/failure.json create mode 100644 test/apitests/data_scenarios/source/v1/pipedream.json create mode 100644 test/apitests/data_scenarios/source/v1/successful.json diff --git a/src/controllers/source.ts b/src/controllers/source.ts index efb6dc746e..b1e7e8fe12 100644 --- a/src/controllers/source.ts +++ b/src/controllers/source.ts @@ -16,10 +16,15 @@ export default class SourceController { const { version, source }: { version: string; source: string } = ctx.params; const integrationService = ServiceSelector.getNativeSourceService(); try { - const resplist = await integrationService.sourceTransformRoutine( - events, + const { implementationVersion, input } = ControllerUtility.adaptInputToVersion( source, version, + events, + ); + const resplist = await integrationService.sourceTransformRoutine( + input, + source, + implementationVersion, requestMetadata, ); ctx.body = resplist; diff --git a/src/controllers/util/index.test.ts b/src/controllers/util/index.test.ts new file mode 100644 index 0000000000..0bc5f174b0 --- /dev/null +++ b/src/controllers/util/index.test.ts @@ -0,0 +1,149 @@ +import ControllerUtility from './index'; + +describe('adaptInputToVersion', () => { + it('should return the input unchanged when the implementation version is not found', () => { + const sourceType = 'NA_SOURCE'; + const requestVersion = 'v0'; + const input = [ + { key1: 'val1', key2: 'val2' }, + { key1: 'val1', key2: 'val2' }, + { key1: 'val1', key2: 'val2' }, + ]; + const expected = { + implementationVersion: undefined, + input: [ + { key1: 'val1', key2: 'val2' }, + { key1: 'val1', key2: 'val2' }, + { key1: 'val1', key2: 'val2' }, + ], + }; + + const result = ControllerUtility.adaptInputToVersion(sourceType, requestVersion, input); + + expect(result).toEqual(expected); + }); + it('should return the input unchanged when the implementation version and request version are the same i.e. v0', () => { + const sourceType = 'pipedream'; + const requestVersion = 'v0'; + const input = [ + { key1: 'val1', key2: 'val2' }, + { key1: 'val1', key2: 'val2' }, + { key1: 'val1', key2: 'val2' }, + ]; + const expected = { + implementationVersion: 'v0', + input: [ + { key1: 'val1', key2: 'val2' }, + { key1: 'val1', key2: 'val2' }, + { key1: 'val1', key2: 'val2' }, + ], + }; + + const result = ControllerUtility.adaptInputToVersion(sourceType, requestVersion, input); + + expect(result).toEqual(expected); + }); + it('should return the input unchanged when the implementation version and request version are the same i.e. v1', () => { + const sourceType = 'webhook'; + const requestVersion = 'v1'; + const input = [ + { + event: { key1: 'val1', key2: 'val2' }, + source: { id: 'source_id', config: { configField1: 'configVal1' } }, + }, + { + event: { key1: 'val1', key2: 'val2' }, + source: { id: 'source_id', config: { configField1: 'configVal1' } }, + }, + { + event: { key1: 'val1', key2: 'val2' }, + source: { id: 'source_id', config: { configField1: 'configVal1' } }, + }, + ]; + const expected = { + implementationVersion: 'v1', + input: [ + { + event: { key1: 'val1', key2: 'val2' }, + source: { id: 'source_id', config: { configField1: 'configVal1' } }, + }, + { + event: { key1: 'val1', key2: 'val2' }, + source: { id: 'source_id', config: { configField1: 'configVal1' } }, + }, + { + event: { key1: 'val1', key2: 'val2' }, + source: { id: 'source_id', config: { configField1: 'configVal1' } }, + }, + ], + }; + + const result = ControllerUtility.adaptInputToVersion(sourceType, requestVersion, input); + + expect(result).toEqual(expected); + }); + it('should convert input from v0 to v1 when the request version is v0 and the implementation version is v1', () => { + const sourceType = 'webhook'; + const requestVersion = 'v0'; + const input = [ + { key1: 'val1', key2: 'val2' }, + { key1: 'val1', key2: 'val2' }, + { key1: 'val1', key2: 'val2' }, + ]; + const expected = { + implementationVersion: 'v1', + input: [ + { event: { key1: 'val1', key2: 'val2' }, source: undefined }, + { event: { key1: 'val1', key2: 'val2' }, source: undefined }, + { event: { key1: 'val1', key2: 'val2' }, source: undefined }, + ], + }; + + const result = ControllerUtility.adaptInputToVersion(sourceType, requestVersion, input); + + expect(result).toEqual(expected); + }); + + it('should convert input from v1 to v0 format when the request version is v1 and the implementation version is v0', () => { + const sourceType = 'pipedream'; + const requestVersion = 'v1'; + const input = [ + { + event: { key1: 'val1', key2: 'val2' }, + source: { id: 'source_id', config: { configField1: 'configVal1' } }, + }, + { + event: { key1: 'val1', key2: 'val2' }, + source: { id: 'source_id', config: { configField1: 'configVal1' } }, + }, + { + event: { key1: 'val1', key2: 'val2' }, + source: { id: 'source_id', config: { configField1: 'configVal1' } }, + }, + ]; + const expected = { + implementationVersion: 'v0', + input: [ + { key1: 'val1', key2: 'val2' }, + { key1: 'val1', key2: 'val2' }, + { key1: 'val1', key2: 'val2' }, + ], + }; + + const result = ControllerUtility.adaptInputToVersion(sourceType, requestVersion, input); + + expect(result).toEqual(expected); + }); + + // Should return an empty array when the input is an empty array + it('should return an empty array when the input is an empty array', () => { + const sourceType = 'pipedream'; + const requestVersion = 'v1'; + const input = []; + const expected = { implementationVersion: 'v0', input: [] }; + + const result = ControllerUtility.adaptInputToVersion(sourceType, requestVersion, input); + + expect(result).toEqual(expected); + }); +}); diff --git a/src/controllers/util/index.ts b/src/controllers/util/index.ts index e2071968d7..c52eb6899e 100644 --- a/src/controllers/util/index.ts +++ b/src/controllers/util/index.ts @@ -1,3 +1,5 @@ +import fs = require('fs'); +import path = require('path'); import { Context } from 'koa'; import isEmpty from 'lodash/isEmpty'; import get from 'get-value'; @@ -7,12 +9,15 @@ import { ProcessorTransformationRequest, RouterTransformationRequestData, RudderMessage, + SourceInput, } from '../../types'; import { getValueFromMessage } from '../../v0/util'; import genericFieldMap from '../../v0/util/data/GenericFieldMapping.json'; import { EventType, MappedToDestinationKey } from '../../constants'; export default class ControllerUtility { + private static sourceVersionMap: Map = new Map(); + public static timestampValsMap: Record = { [EventType.IDENTIFY]: [ `context.${RETL_TIMESTAMP}`, @@ -23,6 +28,49 @@ export default class ControllerUtility { [EventType.TRACK]: [`properties.${RETL_TIMESTAMP}`, ...genericFieldMap.timestamp], }; + private static getSourceVersionsMap(): Map { + if (this.sourceVersionMap?.size > 0) { + return this.sourceVersionMap; + } + const versions = ['v0', 'v1']; + versions.forEach((version) => { + const files = fs.readdirSync(path.resolve(__dirname, `../../${version}/sources`), { + withFileTypes: true, + }); + const sources = files.filter((file) => file.isDirectory()).map((folder) => folder.name); + sources.forEach((source) => { + this.sourceVersionMap.set(source, version); + }); + }); + return this.sourceVersionMap; + } + + private static convertSourceInputv1Tov0(sourceEvents: SourceInput[]): NonNullable[] { + return sourceEvents.map((sourceEvent) => sourceEvent.event); + } + + private static convertSourceInputv0Tov1(sourceEvents: unknown[]): SourceInput[] { + return sourceEvents.map( + (sourceEvent) => ({ event: sourceEvent, source: undefined } as SourceInput), + ); + } + + public static adaptInputToVersion( + sourceType: string, + requestVersion: string, + input: NonNullable[], + ): { implementationVersion: string; input: NonNullable[] } { + const sourceToVersionMap = this.getSourceVersionsMap(); + const implementationVersion = sourceToVersionMap.get(sourceType); + let updatedInput: NonNullable[] = input; + if (requestVersion === 'v0' && implementationVersion === 'v1') { + updatedInput = this.convertSourceInputv0Tov1(input); + } else if (requestVersion === 'v1' && implementationVersion === 'v0') { + updatedInput = this.convertSourceInputv1Tov0(input as SourceInput[]); + } + return { implementationVersion, input: updatedInput }; + } + private static getCompatibleStatusCode(status: number): number { return getCompatibleStatusCode(status); } diff --git a/src/features.json b/src/features.json index 9793f667e3..d3ea3e98a6 100644 --- a/src/features.json +++ b/src/features.json @@ -61,5 +61,6 @@ "ORTTO": true, "ONE_SIGNAL": true, "TIKTOK_AUDIENCE": true - } + }, + "supportSourceTransformV1": true } diff --git a/src/types/index.ts b/src/types/index.ts index 79efaecb40..9292fe2cc2 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -224,7 +224,34 @@ type ComparatorInput = { requestMetadata: object; feature: string; }; +type SourceDefinition = { + ID: string; + Name: string; + Category: string; + Type: string; +}; + +type Source = { + ID: string; + OriginalID: string; + Name: string; + SourceDefinition: SourceDefinition; + Config: object; + Enabled: boolean; + WorkspaceID: string; + WriteKey: string; + Transformations?: UserTransformationInput[]; + RevisionID?: string; + Destinations?: Destination[]; + Transient: boolean; + EventSchemasEnabled: boolean; + DgSourceTrackingPlanConfig: object; +}; +type SourceInput = { + event: NonNullable[]; + source?: Source; +}; export { Metadata, MessageIdMetadataMap, @@ -246,4 +273,6 @@ export { UserDeletionResponse, Destination, ComparatorInput, + SourceInput, + Source, }; diff --git a/src/v0/sources/webhook/transform.js b/src/v1/sources/webhook/transform.js similarity index 81% rename from src/v0/sources/webhook/transform.js rename to src/v1/sources/webhook/transform.js index 3a756ef63b..fc13424b8a 100644 --- a/src/v0/sources/webhook/transform.js +++ b/src/v1/sources/webhook/transform.js @@ -1,4 +1,4 @@ -const { removeUndefinedAndNullValues, generateUUID } = require('../../util'); +const { removeUndefinedAndNullValues, generateUUID } = require('../../../v0/util'); function processEvent(event) { const payload = { @@ -10,7 +10,8 @@ function processEvent(event) { return payload; } -function process(event) { +function process(inputEvent) { + const { event } = inputEvent; const response = processEvent(event); return removeUndefinedAndNullValues(response); } diff --git a/test/apitests/data_scenarios/source/failure.json b/test/apitests/data_scenarios/source/v0/failure.json similarity index 100% rename from test/apitests/data_scenarios/source/failure.json rename to test/apitests/data_scenarios/source/v0/failure.json diff --git a/test/apitests/data_scenarios/source/response_to_caller.json b/test/apitests/data_scenarios/source/v0/response_to_caller.json similarity index 100% rename from test/apitests/data_scenarios/source/response_to_caller.json rename to test/apitests/data_scenarios/source/v0/response_to_caller.json diff --git a/test/apitests/data_scenarios/source/successful.json b/test/apitests/data_scenarios/source/v0/successful.json similarity index 100% rename from test/apitests/data_scenarios/source/successful.json rename to test/apitests/data_scenarios/source/v0/successful.json diff --git a/test/apitests/data_scenarios/source/v1/failure.json b/test/apitests/data_scenarios/source/v1/failure.json new file mode 100644 index 0000000000..9bf77f9b53 --- /dev/null +++ b/test/apitests/data_scenarios/source/v1/failure.json @@ -0,0 +1,27 @@ +{ + "input": [ + { + "event": { + "anonymousId": "63767499ca6fb1b7c988d5bb", + "artist": "Gautam", + "genre": "Jazz", + "song": "Take Five" + }, + "source": { + "id": "source_id", + "config": { + "configField1": "configVal1" + } + } + } + ], + "output": [ + { + "statusCode": 500, + "error": "Cannot find module '../undefined/sources/NA_SOURCE/transform' from 'src/services/misc.ts'", + "statTags": { + "errorCategory": "transformation" + } + } + ] +} diff --git a/test/apitests/data_scenarios/source/v1/pipedream.json b/test/apitests/data_scenarios/source/v1/pipedream.json new file mode 100644 index 0000000000..4219f3f6b1 --- /dev/null +++ b/test/apitests/data_scenarios/source/v1/pipedream.json @@ -0,0 +1,49 @@ +{ + "input": [ + { + "event": { + "anonymousId": "63767499ca6fb1b7c988d5bb", + "artist": "Gautam", + "genre": "Jazz", + "song": "Take Five" + }, + "source": { + "id": "source_id", + "config": { + "configField1": "configVal1" + } + } + } + ], + "output": [ + { + "output": { + "batch": [ + { + "event": "pipedream_source_event", + "anonymousId": "63767499ca6fb1b7c988d5bb", + "context": { + "integration": { + "name": "PIPEDREAM" + }, + "library": { + "name": "unknown", + "version": "unknown" + } + }, + "integrations": { + "PIPEDREAM": false + }, + "type": "track", + "properties": { + "anonymousId": "63767499ca6fb1b7c988d5bb", + "artist": "Gautam", + "genre": "Jazz", + "song": "Take Five" + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/test/apitests/data_scenarios/source/v1/successful.json b/test/apitests/data_scenarios/source/v1/successful.json new file mode 100644 index 0000000000..c42d723800 --- /dev/null +++ b/test/apitests/data_scenarios/source/v1/successful.json @@ -0,0 +1,38 @@ +{ + "input": [ + { + "event": { + "event": "Fulfillments Update", + "data": { + "fulfillment_id": "1234567890", + "status": "pending" + } + }, + "source": { + "id": "source_id", + "config": { + "configField1": "configVal1" + } + } + } + ], + "output": [ + { + "output": { + "batch": [ + { + "type": "track", + "event": "webhook_source_event", + "properties": { + "event": "Fulfillments Update", + "data": { + "fulfillment_id": "1234567890", + "status": "pending" + } + } + } + ] + } + } + ] +} diff --git a/test/apitests/service.api.test.ts b/test/apitests/service.api.test.ts index dfe7e10dd6..ee534d7b37 100644 --- a/test/apitests/service.api.test.ts +++ b/test/apitests/service.api.test.ts @@ -177,7 +177,7 @@ describe('Destination api tests', () => { describe('Source api tests', () => { test('(shopify) successful source transform', async () => { - const data = getDataFromPath('./data_scenarios/source/successful.json'); + const data = getDataFromPath('./data_scenarios/source/v0/successful.json'); const response = await request(server) .post('/v0/sources/shopify') .set('Accept', 'application/json') @@ -189,7 +189,7 @@ describe('Source api tests', () => { }); test('(shopify) failure source transform (shopify)', async () => { - const data = getDataFromPath('./data_scenarios/source/failure.json'); + const data = getDataFromPath('./data_scenarios/source/v0/failure.json'); const response = await request(server) .post('/v0/sources/shopify') .set('Accept', 'application/json') @@ -199,7 +199,7 @@ describe('Source api tests', () => { }); test('(shopify) success source transform (monday)', async () => { - const data = getDataFromPath('./data_scenarios/source/response_to_caller.json'); + const data = getDataFromPath('./data_scenarios/source/v0/response_to_caller.json'); const response = await request(server) .post('/v0/sources/monday') .set('Accept', 'application/json') @@ -207,6 +207,38 @@ describe('Source api tests', () => { expect(response.status).toEqual(200); expect(JSON.parse(response.text)).toEqual(data.output); }); + + test('(webhook) successful source transform for source present in v1 and server providing v0 endpoint', async () => { + const data = getDataFromPath('./data_scenarios/source/v1/successful.json'); + const response = await request(server) + .post('/v1/sources/webhook') + .set('Accept', 'application/json') + .send(data.input); + const parsedResp = JSON.parse(response.text); + delete parsedResp[0].output.batch[0].anonymousId; + expect(response.status).toEqual(200); + expect(parsedResp).toEqual(data.output); + }); + + test('(NA_SOURCE) failure source transform ', async () => { + const data = getDataFromPath('./data_scenarios/source/v1/failure.json'); + const response = await request(server) + .post('/v0/sources/NA_SOURCE') + .set('Accept', 'application/json') + .send(data.input); + expect(response.status).toEqual(200); + expect(JSON.parse(response.text)).toEqual(data.output); + }); + + test('(pipedream) success source transform for source present in v0 and server providing v1 endpoint', async () => { + const data = getDataFromPath('./data_scenarios/source/v1/pipedream.json'); + const response = await request(server) + .post('/v1/sources/pipedream') + .set('Accept', 'application/json') + .send(data.input); + expect(response.status).toEqual(200); + expect(JSON.parse(response.text)).toEqual(data.output); + }); }); describe('CDK V1 api tests', () => { From 42bec546cc9159a8cc496a7b01a08a9171c02aff Mon Sep 17 00:00:00 2001 From: Gauravudia <60897972+Gauravudia@users.noreply.github.com> Date: Fri, 10 Nov 2023 15:46:08 +0530 Subject: [PATCH 013/135] chore: add error import from lib for missing integrations (#2818) --- src/legacy/router.js | 2 +- src/v0/destinations/facebook_conversions/transform.js | 3 +-- src/v0/destinations/facebook_conversions/utils.js | 2 +- src/v0/sources/appcenter/transform.js | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/legacy/router.js b/src/legacy/router.js index 99fb8570fb..f8deb3fe62 100644 --- a/src/legacy/router.js +++ b/src/legacy/router.js @@ -7,6 +7,7 @@ const Router = require('@koa/router'); const lodash = require('lodash'); const fs = require('fs'); const path = require('path'); +const { PlatformError } = require('@rudderstack/integrations-lib'); const logger = require('../logger'); const stats = require('../util/stats'); const { SUPPORTED_VERSIONS, API_VERSION } = require('../routes/utils/constants'); @@ -35,7 +36,6 @@ const { sendViolationMetrics, constructValidationErrors, } = require('../util/utils'); -const { PlatformError } = require('../v0/util/errorTypes'); const { processCdkV1 } = require('../cdk/v1/handler'); const { extractLibraries } = require('../util/customTransformer'); const { getCompatibleStatusCode } = require('../adapters/utils/networkUtils'); diff --git a/src/v0/destinations/facebook_conversions/transform.js b/src/v0/destinations/facebook_conversions/transform.js index dec1ef2e6c..cf11795605 100644 --- a/src/v0/destinations/facebook_conversions/transform.js +++ b/src/v0/destinations/facebook_conversions/transform.js @@ -1,6 +1,7 @@ /* eslint-disable no-param-reassign */ const get = require('get-value'); const moment = require('moment'); +const { InstrumentationError, ConfigurationError } = require('@rudderstack/integrations-lib'); const { CONFIG_CATEGORIES, MAPPING_CONFIG, @@ -34,8 +35,6 @@ const { formingFinalResponse, } = require('../../util/facebookUtils'); -const { InstrumentationError, ConfigurationError } = require('../../util/errorTypes'); - const responseBuilderSimple = (message, category, destination) => { const { Config, ID } = destination; let { categoryToContent } = Config; diff --git a/src/v0/destinations/facebook_conversions/utils.js b/src/v0/destinations/facebook_conversions/utils.js index 270fac8c45..32fafae3d0 100644 --- a/src/v0/destinations/facebook_conversions/utils.js +++ b/src/v0/destinations/facebook_conversions/utils.js @@ -1,3 +1,4 @@ +const { InstrumentationError } = require('@rudderstack/integrations-lib'); const { CONFIG_CATEGORIES, OTHER_STANDARD_EVENTS, @@ -8,7 +9,6 @@ const { } = require('./config'); const { constructPayload, isObject, isAppleFamily } = require('../../util'); const { getContentType, getContentCategory } = require('../../util/facebookUtils'); -const { InstrumentationError } = require('../../util/errorTypes'); const getActionSource = (payload, fallbackActionSource) => { let actionSource = fallbackActionSource; diff --git a/src/v0/sources/appcenter/transform.js b/src/v0/sources/appcenter/transform.js index 3a98a6db3e..40399d92e2 100644 --- a/src/v0/sources/appcenter/transform.js +++ b/src/v0/sources/appcenter/transform.js @@ -1,5 +1,6 @@ const path = require('path'); const fs = require('fs'); +const { TransformationError } = require('@rudderstack/integrations-lib'); const { generateUUID } = require('../../util'); const Message = require('../message'); @@ -7,7 +8,6 @@ const mappingJson = JSON.parse(fs.readFileSync(path.resolve(__dirname, './mappin const { removeUndefinedAndNullValues } = require('../../util'); -const { TransformationError } = require('../../util/errorTypes'); const { JSON_MIME_TYPE } = require('../../util/constant'); const processNormalEvent = (event) => { From 0e1429663d167a2c5cded0d9130374eb586a18c0 Mon Sep 17 00:00:00 2001 From: Ujjwal Abhishek <63387036+ujjwal-ab@users.noreply.github.com> Date: Fri, 10 Nov 2023 20:19:52 +0530 Subject: [PATCH 014/135] feat: add clickId support for tiktok and pinterest destination (#2784) * feat: add clickId support for tiktok * feat: add clickId support for pinterest * chore: add clickId in tests * chore: correct mapping for tiktok * chore: remove instances of callback in input * fix: add clickId in tests * fix: revert context.page mapping --- .../pinterest_tag/procWorkflow.yaml | 8 +- .../tiktok_ads/data/TikTokTrack.json | 5 + .../pinterest_tag/processor/data.ts | 2 + .../destinations/tiktok_ads/processor/data.ts | 9351 ++++++++--------- .../destinations/tiktok_ads/router/data.ts | 30 +- 5 files changed, 4675 insertions(+), 4721 deletions(-) diff --git a/src/cdk/v2/destinations/pinterest_tag/procWorkflow.yaml b/src/cdk/v2/destinations/pinterest_tag/procWorkflow.yaml index e0b81e0afe..7bcb804126 100644 --- a/src/cdk/v2/destinations/pinterest_tag/procWorkflow.yaml +++ b/src/cdk/v2/destinations/pinterest_tag/procWorkflow.yaml @@ -100,7 +100,8 @@ steps: "hashed_maids": .context.device.advertisingId, "client_ip_address": .context.ip ?? .request_ip, "client_user_agent": .context.userAgent, - "external_id": {{{{$.getGenericPaths("userId")}}}} + "external_id": {{{{$.getGenericPaths("userId")}}}}, + "click_id": .properties.clickId }); !.destination.Config.sendExternalId ? userFields = userFields{~["external_id"]} : null; userFields = $.removeUndefinedAndNullAndEmptyValues(userFields); @@ -185,14 +186,13 @@ steps: - name: payload template: | $.outputs.eventNames.().({...$.outputs.basePayload, event_name: .})[] - + - name: checkSendTestEventConfig description: | If sendTestEvent is enabled, we send test event to the destination ref: https://help.pinterest.com/en/business/article/track-conversions-with-the-conversions-api template: | - ^.destination.Config.sendAsTestEvent ? {"test": true} : {} - + ^.destination.Config.sendAsTestEvent ? {"test": true} : {} - name: buildResponseForBatchMode description: In batchMode we return payload directly diff --git a/src/v0/destinations/tiktok_ads/data/TikTokTrack.json b/src/v0/destinations/tiktok_ads/data/TikTokTrack.json index b15223b999..cc5f4886e0 100644 --- a/src/v0/destinations/tiktok_ads/data/TikTokTrack.json +++ b/src/v0/destinations/tiktok_ads/data/TikTokTrack.json @@ -72,6 +72,11 @@ "sourceKeys": ["properties.context.ad", "context.ad"], "required": false }, + { + "destKey": "context.ad.callback", + "sourceKeys": "properties.clickId", + "required": false + }, { "destKey": "context.page", "sourceKeys": ["properties.context.page", "context.page"], diff --git a/test/integrations/destinations/pinterest_tag/processor/data.ts b/test/integrations/destinations/pinterest_tag/processor/data.ts index 045ba53cd1..2887ee8cb9 100644 --- a/test/integrations/destinations/pinterest_tag/processor/data.ts +++ b/test/integrations/destinations/pinterest_tag/processor/data.ts @@ -44,6 +44,7 @@ export const data = [ order_id: '50314b8e9bcf000000000000', requestIP: '123.0.0.0', optOutType: 'LDP', + clickId: 'dummy_clickId', products: [ { sku: '45790-32', @@ -132,6 +133,7 @@ export const data = [ '6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090', ], client_user_agent: 'chrome', + click_id: 'dummy_clickId', ge: ['1b16b1df538ba12dc3f97edbb85caa7050d46c148134290feba80f8236c83db9'], }, custom_data: { diff --git a/test/integrations/destinations/tiktok_ads/processor/data.ts b/test/integrations/destinations/tiktok_ads/processor/data.ts index 38fec1e1e0..453a875af2 100644 --- a/test/integrations/destinations/tiktok_ads/processor/data.ts +++ b/test/integrations/destinations/tiktok_ads/processor/data.ts @@ -1,4690 +1,4663 @@ export const data = [ - { - "name": "tiktok_ads", - "description": "Test 0", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "anonymousId": "21e13f4bc7ceddad", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion", - "ip": "13.57.97.131", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "tiktokExternalId", - "id": "f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc" - } - ] - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "timestamp": "2020-09-17T19:49:27Z", - "type": "track", - "event": "checkout step completed", - "properties": { - "eventId": "1616318632825_357", - "contents": [ - { - "price": 8, - "quantity": 2, - "content_type": "socks", - "content_id": "1077218" - }, - { - "price": 30, - "quantity": 1, - "content_type": "dress", - "content_id": "1197218" - } - ], - "currency": "USD", - "value": 46, - "context": { - "ad": { - "callback": "123ATXSfe" - }, - "page": { - "url": "http://demo.mywebsite.com/purchase", - "referrer": "http://demo.mywebsite.com" - }, - "user": { - "phone_number": "2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea", - "email": "dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f" - } - } - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "accessToken": "dummyAccessToken", - "pixelCode": "A1T8T4UYGVIQA8ORZMX9", - "hashUserProperties": false - } - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://business-api.tiktok.com/open_api/v1.3/pixel/track/", - "headers": { - "Access-Token": "dummyAccessToken", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "pixel_code": "A1T8T4UYGVIQA8ORZMX9", - "event": "CompletePayment", - "event_id": "1616318632825_357", - "timestamp": "2020-09-17T19:49:27Z", - "properties": { - "contents": [ - { - "price": 8, - "quantity": 2, - "content_type": "socks", - "content_id": "1077218" - }, - { - "price": 30, - "quantity": 1, - "content_type": "dress", - "content_id": "1197218" - } - ], - "currency": "USD", - "value": 46 - }, - "context": { - "ad": { - "callback": "123ATXSfe" - }, - "page": { - "url": "http://demo.mywebsite.com/purchase", - "referrer": "http://demo.mywebsite.com" - }, - "user": { - "phone_number": "2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea", - "email": "dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f", - "external_id": "f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc" - }, - "ip": "13.57.97.131", - "user_agent": "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion" - }, - "partner_name": "RudderStack" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "tiktok_ads", - "description": "Test 1", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "anonymousId": "21e13f4bc7ceddad", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion", - "locale": "en-US", - "ip": "13.57.97.131", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "tiktokExternalId", - "id": "f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc" - } - ] - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "timestamp": "2020-09-17T19:49:27Z", - "type": "track", - "event": "checkout started", - "properties": { - "eventId": "1616318632825_357", - "context": { - "ad": { - "callback": "123ATXSfe" - }, - "page": { - "url": "http://demo.mywebsite.com/purchase", - "referrer": "http://demo.mywebsite.com" - }, - "user": { - "phone_number": "2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea", - "email": "dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f" - } - }, - "contents": [ - { - "price": 8, - "quantity": 2, - "content_type": "socks", - "content_id": "1077218" - }, - { - "price": 30, - "quantity": 1, - "content_type": "dress", - "content_id": "1197218" - } - ], - "currency": "USD", - "value": 46 - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "accessToken": "dummyAccessToken", - "pixelCode": "A1T8T4UYGVIQA8ORZMX9", - "hashUserProperties": false - } - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://business-api.tiktok.com/open_api/v1.3/pixel/track/", - "headers": { - "Access-Token": "dummyAccessToken", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "pixel_code": "A1T8T4UYGVIQA8ORZMX9", - "event": "InitiateCheckout", - "event_id": "1616318632825_357", - "timestamp": "2020-09-17T19:49:27Z", - "properties": { - "contents": [ - { - "price": 8, - "quantity": 2, - "content_type": "socks", - "content_id": "1077218" - }, - { - "price": 30, - "quantity": 1, - "content_type": "dress", - "content_id": "1197218" - } - ], - "currency": "USD", - "value": 46 - }, - "context": { - "ad": { - "callback": "123ATXSfe" - }, - "page": { - "url": "http://demo.mywebsite.com/purchase", - "referrer": "http://demo.mywebsite.com" - }, - "user": { - "phone_number": "2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea", - "email": "dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f", - "external_id": "f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc" - }, - "ip": "13.57.97.131", - "user_agent": "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion" - }, - "partner_name": "RudderStack" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "tiktok_ads", - "description": "Test 2", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "anonymousId": "21e13f4bc7ceddad", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "tiktokExternalId", - "id": "f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc" - } - ] - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "timestamp": "2020-09-17T19:49:27Z", - "type": "track", - "event": "Product Added to Wishlist", - "properties": { - "eventId": "1616318632825_357", - "testEventCode": "sample rudder test_event_code", - "context": { - "ad": { - "callback": "123ATXSfe" - }, - "page": { - "url": "http://demo.mywebsite.com/purchase", - "referrer": "http://demo.mywebsite.com" - }, - "user": { - "phone_number": "2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea", - "email": "dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f" - } - }, - "contents": [ - { - "price": 8, - "quantity": 2, - "content_type": "socks", - "content_id": "1077218" - }, - { - "price": 30, - "quantity": 1, - "content_type": "dress", - "content_id": "1197218" - } - ], - "currency": "USD", - "value": 46 - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "accessToken": "dummyAccessToken", - "pixelCode": "A1T8T4UYGVIQA8ORZMX9", - "hashUserProperties": false - } - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://business-api.tiktok.com/open_api/v1.3/pixel/track/", - "headers": { - "Access-Token": "dummyAccessToken", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "pixel_code": "A1T8T4UYGVIQA8ORZMX9", - "event": "AddToWishlist", - "event_id": "1616318632825_357", - "timestamp": "2020-09-17T19:49:27Z", - "test_event_code": "sample rudder test_event_code", - "properties": { - "contents": [ - { - "price": 8, - "quantity": 2, - "content_type": "socks", - "content_id": "1077218" - }, - { - "price": 30, - "quantity": 1, - "content_type": "dress", - "content_id": "1197218" - } - ], - "currency": "USD", - "value": 46 - }, - "context": { - "ad": { - "callback": "123ATXSfe" - }, - "page": { - "url": "http://demo.mywebsite.com/purchase", - "referrer": "http://demo.mywebsite.com" - }, - "user": { - "phone_number": "2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea", - "email": "dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f", - "external_id": "f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc" - } - }, - "partner_name": "RudderStack" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "tiktok_ads", - "description": "Test 3", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "anonymousId": "21e13f4bc7ceddad", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion", - "locale": "en-US", - "ip": "13.57.97.131", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "tiktokExternalId", - "id": "f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc" - } - ] - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "timestamp": "2020-09-17T19:49:27Z", - "type": "track", - "event": "Product Added to Wishlist1", - "properties": { - "eventId": "1616318632825_357", - "testEventCode": "sample rudder test_event_code", - "context": { - "ad": { - "callback": "123ATXSfe" - }, - "page": { - "url": "http://demo.mywebsite.com/purchase", - "referrer": "http://demo.mywebsite.com" - }, - "user": { - "phone_number": "2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea", - "email": "dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f" - } - }, - "contents": [ - { - "price": 8, - "quantity": 2, - "content_type": "socks", - "content_id": "1077218" - }, - { - "price": 30, - "quantity": 1, - "content_type": "dress", - "content_id": "1197218" - } - ], - "currency": "USD", - "value": 46 - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "accessToken": "dummyAccessToken", - "pixelCode": "A1T8T4UYGVIQA8ORZMX9", - "hashUserProperties": false - } - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "statusCode": 400, - "error": "Event name (product added to wishlist1) is not valid, must be mapped to one of standard events", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation", - "destType": "TIKTOK_ADS", - "module": "destination", - "implementation": "native", - "feature": "processor" - } - } - ] - } - } - }, - { - "name": "tiktok_ads", - "description": "Test 4", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "anonymousId": "21e13f4bc7ceddad", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion", - "locale": "en-US", - "ip": "13.57.97.131", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "tiktokExternalId", - "id": "f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc" - } - ] - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "timestamp": "2020-09-17T19:49:27Z", - "type": "track", - "event": "Product Added to Wishlist", - "properties": { - "eventId": "1616318632825_357", - "testEventCode": "sample rudder test_event_code", - "context": { - "ad": { - "callback": "123ATXSfe" - }, - "page": { - "url": "http://demo.mywebsite.com/purchase", - "referrer": "http://demo.mywebsite.com" - }, - "user": { - "phone_number": "2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea", - "email": "dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f" - } - }, - "contents": [ - { - "price": 8, - "quantity": 2, - "content_type": "socks", - "content_id": "1077218" - }, - { - "price": 30, - "quantity": 1, - "content_type": "dress", - "content_id": "1197218" - } - ], - "currency": "USD", - "value": 46 - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "accessToken": "dummyAccessToken", - "pixelCode": "A1T8T4UYGVIQA8ORZMX9", - "hashUserProperties": false - } - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://business-api.tiktok.com/open_api/v1.3/pixel/track/", - "headers": { - "Access-Token": "dummyAccessToken", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "pixel_code": "A1T8T4UYGVIQA8ORZMX9", - "event": "AddToWishlist", - "event_id": "1616318632825_357", - "timestamp": "2020-09-17T19:49:27Z", - "test_event_code": "sample rudder test_event_code", - "properties": { - "contents": [ - { - "price": 8, - "quantity": 2, - "content_type": "socks", - "content_id": "1077218" - }, - { - "price": 30, - "quantity": 1, - "content_type": "dress", - "content_id": "1197218" - } - ], - "currency": "USD", - "value": 46 - }, - "context": { - "ad": { - "callback": "123ATXSfe" - }, - "page": { - "url": "http://demo.mywebsite.com/purchase", - "referrer": "http://demo.mywebsite.com" - }, - "user": { - "phone_number": "2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea", - "email": "dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f", - "external_id": "f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc" - }, - "ip": "13.57.97.131", - "user_agent": "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion" - }, - "partner_name": "RudderStack" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "tiktok_ads", - "description": "Test 5", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "anonymousId": "21e13f4bc7ceddad", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion", - "locale": "en-US", - "ip": "13.57.97.131", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "tiktokExternalId", - "id": "f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc" - } - ] - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "timestamp": "2020-09-17T19:49:27Z", - "type": "track", - "event": "Product Added to Wishlist", - "properties": { - "eventId": "1616318632825_357", - "testEventCode": "sample rudder test_event_code", - "context": { - "ad": { - "callback": "123ATXSfe" - }, - "page": { - "url": "http://demo.mywebsite.com/purchase", - "referrer": "http://demo.mywebsite.com" - }, - "user": { - "phone_number": "2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea", - "email": "dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f" - } - }, - "contents": [ - { - "price": 8, - "quantity": 2, - "content_type": "socks", - "content_id": "1077218" - }, - { - "price": 30, - "quantity": 1, - "content_type": "dress", - "content_id": "1197218" - } - ], - "currency": "USD", - "value": 46 - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "accessToken": "dummyAccessToken", - "pixelCode": "A1T8T4UYGVIQA8ORZMX9", - "hashUserProperties": false - } - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://business-api.tiktok.com/open_api/v1.3/pixel/track/", - "headers": { - "Access-Token": "dummyAccessToken", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "pixel_code": "A1T8T4UYGVIQA8ORZMX9", - "event": "AddToWishlist", - "event_id": "1616318632825_357", - "timestamp": "2020-09-17T19:49:27Z", - "test_event_code": "sample rudder test_event_code", - "properties": { - "contents": [ - { - "price": 8, - "quantity": 2, - "content_type": "socks", - "content_id": "1077218" - }, - { - "price": 30, - "quantity": 1, - "content_type": "dress", - "content_id": "1197218" - } - ], - "currency": "USD", - "value": 46 - }, - "context": { - "ad": { - "callback": "123ATXSfe" - }, - "page": { - "url": "http://demo.mywebsite.com/purchase", - "referrer": "http://demo.mywebsite.com" - }, - "user": { - "phone_number": "2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea", - "email": "dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f", - "external_id": "f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc" - }, - "ip": "13.57.97.131", - "user_agent": "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion" - }, - "partner_name": "RudderStack" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "tiktok_ads", - "description": "Test 6", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "anonymousId": "21e13f4bc7ceddad", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion", - "locale": "en-US", - "ip": "13.57.97.131", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "tiktokExternalId", - "id": "1234" - } - ] - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "timestamp": "2020-09-17T19:49:27Z", - "type": "track", - "event": "SubscriBe", - "properties": { - "eventId": "1616318632825_357", - "testEventCode": "", - "context": { - "ad": { - "callback": "123ATXSfe" - }, - "page": { - "url": "http://demo.mywebsite.com/purchase", - "referrer": "http://demo.mywebsite.com" - }, - "user": { - "phone_number": "+868987675687", - "email": "sample@sample.com" - } - }, - "contents": [ - { - "price": 8, - "quantity": 2, - "content_type": "socks", - "content_id": "1077218" - }, - { - "price": 30, - "quantity": 1, - "content_type": "dress", - "content_id": "1197218" - } - ], - "currency": "USD", - "value": 46 - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "accessToken": "dummyAccessToken", - "pixelCode": "A1T8T4UYGVIQA8ORZMX9", - "hashUserProperties": true - } - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://business-api.tiktok.com/open_api/v1.3/pixel/track/", - "headers": { - "Access-Token": "dummyAccessToken", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "pixel_code": "A1T8T4UYGVIQA8ORZMX9", - "event": "Subscribe", - "event_id": "1616318632825_357", - "timestamp": "2020-09-17T19:49:27Z", - "properties": { - "contents": [ - { - "price": 8, - "quantity": 2, - "content_type": "socks", - "content_id": "1077218" - }, - { - "price": 30, - "quantity": 1, - "content_type": "dress", - "content_id": "1197218" - } - ], - "currency": "USD", - "value": 46 - }, - "context": { - "ad": { - "callback": "123ATXSfe" - }, - "page": { - "url": "http://demo.mywebsite.com/purchase", - "referrer": "http://demo.mywebsite.com" - }, - "user": { - "phone_number": "1d96e70d2bf54087e33586457cde2790825bee7b1a3b05d26481cb12ec8e63fd", - "email": "774efc08cebab8c50c0f0eb2d3a2d2e560872a64f6c1617314c4f03b1c3d4dfa", - "external_id": "03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4" - }, - "ip": "13.57.97.131", - "user_agent": "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion" - }, - "partner_name": "RudderStack" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "tiktok_ads", - "description": "Test 7", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "anonymousId": "21e13f4bc7ceddad", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion", - "locale": "en-US", - "ip": "13.57.97.131", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "tiktokExternalId", - "id": "f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc" - } - ] - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "timestamp": "2020-09-17T19:49:27Z", - "type": "track", - "event": "payment info entered", - "properties": { - "eventId": "1616318632825_357", - "context": { - "ad": { - "callback": "123ATXSfe" - }, - "page": { - "url": "http://demo.mywebsite.com/purchase", - "referrer": "http://demo.mywebsite.com" - }, - "user": { - "phone_number": "2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea", - "email": "dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f" - } - }, - "contents": [ - { - "price": 8, - "quantity": 2, - "content_type": "socks", - "content_id": "1077218" - }, - { - "price": 30, - "quantity": 1, - "content_type": "dress", - "content_id": "1197218" - } - ], - "currency": "USD", - "value": 46 - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "accessToken": "dummyAccessToken", - "pixelCode": "A1T8T4UYGVIQA8ORZMX9", - "hashUserProperties": false - } - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://business-api.tiktok.com/open_api/v1.3/pixel/track/", - "headers": { - "Access-Token": "dummyAccessToken", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "pixel_code": "A1T8T4UYGVIQA8ORZMX9", - "event": "AddPaymentInfo", - "event_id": "1616318632825_357", - "timestamp": "2020-09-17T19:49:27Z", - "properties": { - "contents": [ - { - "price": 8, - "quantity": 2, - "content_type": "socks", - "content_id": "1077218" - }, - { - "price": 30, - "quantity": 1, - "content_type": "dress", - "content_id": "1197218" - } - ], - "currency": "USD", - "value": 46 - }, - "context": { - "ad": { - "callback": "123ATXSfe" - }, - "page": { - "url": "http://demo.mywebsite.com/purchase", - "referrer": "http://demo.mywebsite.com" - }, - "user": { - "phone_number": "2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea", - "email": "dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f", - "external_id": "f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc" - }, - "ip": "13.57.97.131", - "user_agent": "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion" - }, - "partner_name": "RudderStack" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "tiktok_ads", - "description": "Test 8", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "anonymousId": "21e13f4bc7ceddad", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion", - "locale": "en-US", - "ip": "13.57.97.131", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "tiktokExternalId", - "id": "f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc" - } - ] - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "timestamp": "2020-09-17T19:49:27Z", - "type": "track", - "properties": { - "eventId": "1616318632825_357", - "context": { - "ad": { - "callback": "123ATXSfe" - }, - "page": { - "url": "http://demo.mywebsite.com/purchase", - "referrer": "http://demo.mywebsite.com" - }, - "user": { - "phone_number": "2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea", - "email": "dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f" - } - }, - "contents": [ - { - "price": 8, - "quantity": 2, - "content_type": "socks", - "content_id": "1077218" - }, - { - "price": 30, - "quantity": 1, - "content_type": "dress", - "content_id": "1197218" - } - ], - "currency": "USD", - "value": 46 - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "accessToken": "dummyAccessToken", - "pixelCode": "A1T8T4UYGVIQA8ORZMX9", - "hashUserProperties": false - } - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "statusCode": 400, - "error": "Event name is required", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation", - "destType": "TIKTOK_ADS", - "module": "destination", - "implementation": "native", - "feature": "processor" - } - } - ] - } - } - }, - { - "name": "tiktok_ads", - "description": "Test 9", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "anonymousId": "21e13f4bc7ceddad", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion", - "locale": "en-US", - "ip": "13.57.97.131", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "tiktokExternalId", - "id": "f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc" - } - ] - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "timestamp": "2020-09-17T19:49:27Z", - "properties": { - "eventId": "1616318632825_357", - "context": { - "ad": { - "callback": "123ATXSfe" - }, - "page": { - "url": "http://demo.mywebsite.com/purchase", - "referrer": "http://demo.mywebsite.com" - }, - "user": { - "phone_number": "2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea", - "email": "dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f" - } - }, - "contents": [ - { - "price": 8, - "quantity": 2, - "content_type": "socks", - "content_id": "1077218" - }, - { - "price": 30, - "quantity": 1, - "content_type": "dress", - "content_id": "1197218" - } - ], - "currency": "USD", - "value": 46 - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "accessToken": "dummyAccessToken", - "pixelCode": "A1T8T4UYGVIQA8ORZMX9", - "hashUserProperties": false - } - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "statusCode": 400, - "error": "Event type is required", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation", - "destType": "TIKTOK_ADS", - "module": "destination", - "implementation": "native", - "feature": "processor" - } - } - ] - } - } - }, - { - "name": "tiktok_ads", - "description": "Test 10", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "anonymousId": "21e13f4bc7ceddad", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion", - "locale": "en-US", - "ip": "13.57.97.131", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "tiktokExternalId", - "id": "f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc" - } - ] - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "track", - "event": "payment info entered", - "properties": { - "eventId": "1616318632825_357", - "context": { - "ad": { - "callback": "123ATXSfe" - }, - "page": { - "url": "http://demo.mywebsite.com/purchase", - "referrer": "http://demo.mywebsite.com" - }, - "user": { - "phone_number": "2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea", - "email": "dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f" - } - }, - "contents": [ - { - "price": 8, - "quantity": 2, - "content_type": "socks", - "content_id": "1077218" - }, - { - "price": 30, - "quantity": 1, - "content_type": "dress", - "content_id": "1197218" - } - ], - "currency": "USD", - "value": 46 - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "accessToken": "dummyAccessToken", - "pixelCode": "A1T8T4UYGVIQA8ORZMX9", - "hashUserProperties": false - } - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://business-api.tiktok.com/open_api/v1.3/pixel/track/", - "headers": { - "Access-Token": "dummyAccessToken", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "pixel_code": "A1T8T4UYGVIQA8ORZMX9", - "event": "AddPaymentInfo", - "event_id": "1616318632825_357", - "properties": { - "contents": [ - { - "price": 8, - "quantity": 2, - "content_type": "socks", - "content_id": "1077218" - }, - { - "price": 30, - "quantity": 1, - "content_type": "dress", - "content_id": "1197218" - } - ], - "currency": "USD", - "value": 46 - }, - "context": { - "ad": { - "callback": "123ATXSfe" - }, - "page": { - "url": "http://demo.mywebsite.com/purchase", - "referrer": "http://demo.mywebsite.com" - }, - "user": { - "phone_number": "2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea", - "email": "dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f", - "external_id": "f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc" - }, - "ip": "13.57.97.131", - "user_agent": "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion" - }, - "partner_name": "RudderStack" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "tiktok_ads", - "description": "Test 11", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "anonymousId": "21e13f4bc7ceddad", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion", - "locale": "en-US", - "ip": "13.57.97.131", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "tiktokExternalId", - "id": "f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc" - } - ] - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "timestamp": "2020-09-17T19:49:27Z", - "type": "track", - "event": "submitform", - "properties": { - "eventId": "16163186328257", - "context": { - "ad": { - "callback": "123ATXSfe" - }, - "page": { - "url": "http://demo.mywebsite.com/purchase", - "referrer": "http://demo.mywebsite.com" - }, - "user": { - "phone_number": "2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea", - "email": "dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f" - } - }, - "contents": [ - { - "price": 8, - "quantity": 2, - "content_type": "socks", - "content_id": "1077218" - }, - { - "price": 30, - "quantity": 1, - "content_type": "dress", - "content_id": "1197218" - } - ], - "currency": "USD", - "value": 46 - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "accessToken": "dummyAccessToken", - "pixelCode": "A1T8T4UYGVIQA8ORZMX9", - "hashUserProperties": false - } - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://business-api.tiktok.com/open_api/v1.3/pixel/track/", - "headers": { - "Access-Token": "dummyAccessToken", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "pixel_code": "A1T8T4UYGVIQA8ORZMX9", - "event": "SubmitForm", - "event_id": "16163186328257", - "timestamp": "2020-09-17T19:49:27Z", - "properties": { - "contents": [ - { - "price": 8, - "quantity": 2, - "content_type": "socks", - "content_id": "1077218" - }, - { - "price": 30, - "quantity": 1, - "content_type": "dress", - "content_id": "1197218" - } - ], - "currency": "USD", - "value": 46 - }, - "context": { - "ad": { - "callback": "123ATXSfe" - }, - "page": { - "url": "http://demo.mywebsite.com/purchase", - "referrer": "http://demo.mywebsite.com" - }, - "user": { - "phone_number": "2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea", - "email": "dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f", - "external_id": "f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc" - }, - "ip": "13.57.97.131", - "user_agent": "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion" - }, - "partner_name": "RudderStack" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "tiktok_ads", - "description": "Test 12", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "anonymousId": "21e13f4bc7ceddad", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion", - "locale": "en-US", - "ip": "13.57.97.131", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "tiktokExternalId", - "id": "f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc" - } - ] - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "timestamp": "2020-09-17T19:49:27Z", - "type": "track", - "event": "submitform", - "properties": { - "eventId": "16163186328257", - "context": { - "ad": { - "callback": "123ATXSfe" - }, - "page": { - "url": "http://demo.mywebsite.com/purchase", - "referrer": "http://demo.mywebsite.com" - }, - "user": { - "phone_number": "2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea", - "email": "dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f" - }, - "userAgent": "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion", - "ip": "13.57.97.131" - } - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "accessToken": "dummyAccessToken", - "pixelCode": "A1T8T4UYGVIQA8ORZMX9", - "hashUserProperties": false - } - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://business-api.tiktok.com/open_api/v1.3/pixel/track/", - "headers": { - "Access-Token": "dummyAccessToken", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "pixel_code": "A1T8T4UYGVIQA8ORZMX9", - "event": "SubmitForm", - "event_id": "16163186328257", - "timestamp": "2020-09-17T19:49:27Z", - "context": { - "ad": { - "callback": "123ATXSfe" - }, - "page": { - "url": "http://demo.mywebsite.com/purchase", - "referrer": "http://demo.mywebsite.com" - }, - "user": { - "phone_number": "2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea", - "email": "dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f", - "external_id": "f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc" - }, - "ip": "13.57.97.131", - "user_agent": "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion" - }, - "partner_name": "RudderStack" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "tiktok_ads", - "description": "Test 13", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "anonymousId": "21e13f4bc7ceddad", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion", - "locale": "en-US", - "ip": "13.57.97.131", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "tiktokExternalId", - "id": "f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc" - } - ] - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "timestamp": "2020-09-17T19:49:27Z", - "type": "track", - "event": "contact", - "properties": { - "eventId": "16163186328257", - "context": { - "ad": { - "callback": "123ATXSfe" - }, - "page": { - "url": "http://demo.mywebsite.com/purchase", - "referrer": "http://demo.mywebsite.com" - }, - "user": { - "phone_number": "2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea", - "email": "dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f" - } - }, - "contents": [ - { - "price": 8, - "quantity": 2, - "content_type": "socks", - "content_id": "1077218" - }, - { - "price": 30, - "quantity": 1, - "content_type": "dress", - "content_id": "1197218" - } - ], - "currency": "USD", - "value": 46 - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "accessToken": "dummyAccessToken", - "pixelCode": "A1T8T4UYGVIQA8ORZMX9", - "hashUserProperties": false - } - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://business-api.tiktok.com/open_api/v1.3/pixel/track/", - "headers": { - "Access-Token": "dummyAccessToken", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "pixel_code": "A1T8T4UYGVIQA8ORZMX9", - "event": "Contact", - "event_id": "16163186328257", - "timestamp": "2020-09-17T19:49:27Z", - "properties": { - "contents": [ - { - "price": 8, - "quantity": 2, - "content_type": "socks", - "content_id": "1077218" - }, - { - "price": 30, - "quantity": 1, - "content_type": "dress", - "content_id": "1197218" - } - ], - "currency": "USD", - "value": 46 - }, - "context": { - "ad": { - "callback": "123ATXSfe" - }, - "page": { - "url": "http://demo.mywebsite.com/purchase", - "referrer": "http://demo.mywebsite.com" - }, - "user": { - "phone_number": "2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea", - "email": "dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f", - "external_id": "f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc" - }, - "ip": "13.57.97.131", - "user_agent": "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion" - }, - "partner_name": "RudderStack" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "tiktok_ads", - "description": "Test 14", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "anonymousId": "21e13f4bc7ceddad", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion", - "locale": "en-US", - "ip": "13.57.97.131", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "tiktokExternalId", - "id": "f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc" - } - ] - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "timestamp": "2020-09-17T19:49:27Z", - "type": "identify", - "event": "contact", - "properties": { - "eventId": "16163186328257", - "context": { - "ad": { - "callback": "123ATXSfe" - }, - "page": { - "url": "http://demo.mywebsite.com/purchase", - "referrer": "http://demo.mywebsite.com" - }, - "user": { - "phone_number": "2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea", - "email": "dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f" - } - }, - "contents": [ - { - "price": 8, - "quantity": 2, - "content_type": "socks", - "content_id": "1077218" - }, - { - "price": 30, - "quantity": 1, - "content_type": "dress", - "content_id": "1197218" - } - ], - "currency": "USD", - "value": 46 - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "accessToken": "dummyAccessToken", - "pixelCode": "A1T8T4UYGVIQA8ORZMX9", - "hashUserProperties": false - } - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "statusCode": 400, - "error": "Event type identify is not supported", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation", - "destType": "TIKTOK_ADS", - "module": "destination", - "implementation": "native", - "feature": "processor" - } - } - ] - } - } - }, - { - "name": "tiktok_ads", - "description": "Test 15", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "anonymousId": "21e13f4bc7ceddad", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion", - "locale": "en-US", - "ip": "13.57.97.131", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "tiktokExternalId", - "id": "f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc" - } - ] - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "timestamp": "2020-09-17T19:49:27Z", - "type": "track", - "event": "checkout step completed", - "properties": { - "eventId": "1616318632825_357", - "context": { - "ad": { - "callback": "123ATXSfe" - }, - "page": { - "url": "http://demo.mywebsite.com/purchase", - "referrer": "http://demo.mywebsite.com" - }, - "user": { - "phone_number": "2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea", - "email": "dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f" - } - }, - "contents": [ - { - "price": 8, - "quantity": 2, - "content_type": "socks", - "content_id": "1077218" - }, - { - "price": 30, - "quantity": 1, - "content_type": "dress", - "content_id": "1197218" - } - ], - "currency": "USD", - "value": 46 - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "accessToken": "dummyAccessToken", - "pixelCode": "A1T8T4UYGVIQA8ORZMX9", - "hashUserProperties": false - } - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://business-api.tiktok.com/open_api/v1.3/pixel/track/", - "headers": { - "Access-Token": "dummyAccessToken", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "pixel_code": "A1T8T4UYGVIQA8ORZMX9", - "event": "CompletePayment", - "event_id": "1616318632825_357", - "timestamp": "2020-09-17T19:49:27Z", - "properties": { - "contents": [ - { - "price": 8, - "quantity": 2, - "content_type": "socks", - "content_id": "1077218" - }, - { - "price": 30, - "quantity": 1, - "content_type": "dress", - "content_id": "1197218" - } - ], - "currency": "USD", - "value": 46 - }, - "context": { - "ad": { - "callback": "123ATXSfe" - }, - "page": { - "url": "http://demo.mywebsite.com/purchase", - "referrer": "http://demo.mywebsite.com" - }, - "user": { - "phone_number": "2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea", - "email": "dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f", - "external_id": "f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc" - }, - "ip": "13.57.97.131", - "user_agent": "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion" - }, - "partner_name": "RudderStack" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "tiktok_ads", - "description": "Test 16", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "anonymousId": "21e13f4bc7ceddad", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion", - "locale": "en-US", - "ip": "13.57.97.131", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "tiktokExternalId", - "id": "f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc" - } - ] - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "timestamp": "2020-09-17T19:49:27Z", - "type": "track", - "event": "order completed", - "properties": { - "eventId": "1616318632825_357", - "context": { - "ad": { - "callback": "123ATXSfe" - }, - "page": { - "url": "http://demo.mywebsite.com/purchase", - "referrer": "http://demo.mywebsite.com" - }, - "user": { - "phone_number": "2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea", - "email": "dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f" - } - }, - "contents": [ - { - "price": 8, - "quantity": 2, - "content_type": "socks", - "content_id": "1077218" - }, - { - "price": 30, - "quantity": 1, - "content_type": "dress", - "content_id": "1197218" - } - ], - "currency": "USD", - "value": 46 - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "accessToken": "dummyAccessToken", - "pixelCode": "A1T8T4UYGVIQA8ORZMX9", - "hashUserProperties": false - } - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://business-api.tiktok.com/open_api/v1.3/pixel/track/", - "headers": { - "Access-Token": "dummyAccessToken", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "pixel_code": "A1T8T4UYGVIQA8ORZMX9", - "event": "PlaceAnOrder", - "event_id": "1616318632825_357", - "timestamp": "2020-09-17T19:49:27Z", - "properties": { - "contents": [ - { - "price": 8, - "quantity": 2, - "content_type": "socks", - "content_id": "1077218" - }, - { - "price": 30, - "quantity": 1, - "content_type": "dress", - "content_id": "1197218" - } - ], - "currency": "USD", - "value": 46 - }, - "context": { - "ad": { - "callback": "123ATXSfe" - }, - "page": { - "url": "http://demo.mywebsite.com/purchase", - "referrer": "http://demo.mywebsite.com" - }, - "user": { - "phone_number": "2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea", - "email": "dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f", - "external_id": "f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc" - }, - "ip": "13.57.97.131", - "user_agent": "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion" - }, - "partner_name": "RudderStack" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "tiktok_ads", - "description": "Test 17", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "anonymousId": "21e13f4bc7ceddad", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "user@sample.com", - "phone": "+919912345678" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion", - "locale": "en-US", - "ip": "13.57.97.131", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "tiktokExternalId", - "id": "f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc" - } - ] - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "timestamp": "2020-09-17T19:49:27Z", - "type": "track", - "event": "SubscriBe", - "properties": { - "eventId": "1616318632825_357", - "testEventCode": "TEST0000000011", - "context": { - "ad": { - "callback": "123ATXSfe" - }, - "page": { - "url": "http://demo.mywebsite.com/purchase", - "referrer": "http://demo.mywebsite.com" - }, - "user": { - "phone_number": "+918987674657", - "email": "sample@rudder.com" - } - }, - "contents": [ - { - "price": 8, - "quantity": 2, - "content_type": "socks", - "content_id": "1077218" - }, - { - "price": 30, - "quantity": 1, - "content_type": "dress", - "content_id": "1197218" - } - ], - "currency": "USD", - "value": 46 - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "accessToken": "dummyAccessToken", - "pixelCode": "A1T8T4UYGVIQA8ORZMX9", - "hashUserProperties": true - } - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://business-api.tiktok.com/open_api/v1.3/pixel/track/", - "headers": { - "Access-Token": "dummyAccessToken", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "pixel_code": "A1T8T4UYGVIQA8ORZMX9", - "event": "Subscribe", - "event_id": "1616318632825_357", - "timestamp": "2020-09-17T19:49:27Z", - "test_event_code": "TEST0000000011", - "properties": { - "contents": [ - { - "price": 8, - "quantity": 2, - "content_type": "socks", - "content_id": "1077218" - }, - { - "price": 30, - "quantity": 1, - "content_type": "dress", - "content_id": "1197218" - } - ], - "currency": "USD", - "value": 46 - }, - "context": { - "ad": { - "callback": "123ATXSfe" - }, - "page": { - "url": "http://demo.mywebsite.com/purchase", - "referrer": "http://demo.mywebsite.com" - }, - "user": { - "phone_number": "1b6abcebb79b2208929967160ba291656f3fcd4f00e93b6a846c1e56c0e177c6", - "email": "02e47a94635c1ffd6f6a69fe2c7a92dbfbb9d5e2ebddb54810520b34989b66a7", - "external_id": "f0f3ec74bbef8580d7de80624dea93c05d828c748715199fe71bc7f5a67aa8b3" - }, - "ip": "13.57.97.131", - "user_agent": "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion" - }, - "partner_name": "RudderStack" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "tiktok_ads", - "description": "Test 18", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "anonymousId": "21e13f4bc7ceddad", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "user@sample.com", - "phone": "+919912345678" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion", - "locale": "en-US", - "ip": "13.57.97.131", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "tiktokExternalId", - "id": "f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc" - } - ] - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "timestamp": "2020-09-17T19:49:27Z", - "type": "track", - "event": "SubscriBe", - "properties": { - "eventId": "1616318632825_357", - "testEventCode": "TEST0000000011", - "context": { - "ad": { - "callback": "123ATXSfe" - }, - "page": { - "url": "http://demo.mywebsite.com/purchase", - "referrer": "http://demo.mywebsite.com" - }, - "user": { - "phone_number": "", - "email": "" - } - }, - "contents": [ - { - "price": 8, - "quantity": 2, - "content_type": "socks", - "content_id": "1077218" - }, - { - "price": 30, - "quantity": 1, - "content_type": "dress", - "content_id": "1197218" - } - ], - "currency": "USD", - "value": 46 - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "accessToken": "dummyAccessToken", - "pixelCode": "A1T8T4UYGVIQA8ORZMX9", - "hashUserProperties": true - } - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://business-api.tiktok.com/open_api/v1.3/pixel/track/", - "headers": { - "Access-Token": "dummyAccessToken", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "pixel_code": "A1T8T4UYGVIQA8ORZMX9", - "event": "Subscribe", - "event_id": "1616318632825_357", - "timestamp": "2020-09-17T19:49:27Z", - "test_event_code": "TEST0000000011", - "properties": { - "contents": [ - { - "price": 8, - "quantity": 2, - "content_type": "socks", - "content_id": "1077218" - }, - { - "price": 30, - "quantity": 1, - "content_type": "dress", - "content_id": "1197218" - } - ], - "currency": "USD", - "value": 46 - }, - "context": { - "ad": { - "callback": "123ATXSfe" - }, - "page": { - "url": "http://demo.mywebsite.com/purchase", - "referrer": "http://demo.mywebsite.com" - }, - "user": { - "phone_number": "241102c24fa8a642e3d1346a31fbce3dd312563c015ae577a2253cb8652581eb", - "email": "a344da1fac6201ed1c1f20a07e1b55bb896a5ac0abd269c1e9daf1afbbffca3b", - "external_id": "f0f3ec74bbef8580d7de80624dea93c05d828c748715199fe71bc7f5a67aa8b3" - }, - "ip": "13.57.97.131", - "user_agent": "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion" - }, - "partner_name": "RudderStack" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "tiktok_ads", - "description": "Test 19", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "anonymousId": "21e13f4bc7ceddad", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion", - "ip": "13.57.97.131", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "ad": { - "callback": "999ATXSfe" - }, - "page": { - "url": "http://rudder.mywebsite.com/purchase", - "referrer": "http://rudder.mywebsite.com" - }, - "externalId": [ - { - "type": "tiktokExternalId", - "id": "f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc" - } - ] - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "timestamp": "2020-09-17T19:49:27Z", - "type": "track", - "event": "checkout step completed", - "properties": { - "eventId": "1616318632825_357", - "contents": [ - { - "price": 8, - "quantity": 2, - "content_type": "socks", - "content_id": "1077218" - }, - { - "price": 30, - "quantity": 1, - "content_type": "dress", - "content_id": "1197218" - } - ], - "currency": "USD", - "value": 46, - "context": { - "user": { - "phone_number": "2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea", - "email": "dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f" - } - } - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "accessToken": "dummyAccessToken", - "pixelCode": "A1T8T4UYGVIQA8ORZMX9", - "hashUserProperties": false - } - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://business-api.tiktok.com/open_api/v1.3/pixel/track/", - "headers": { - "Access-Token": "dummyAccessToken", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "pixel_code": "A1T8T4UYGVIQA8ORZMX9", - "event": "CompletePayment", - "event_id": "1616318632825_357", - "timestamp": "2020-09-17T19:49:27Z", - "properties": { - "contents": [ - { - "price": 8, - "quantity": 2, - "content_type": "socks", - "content_id": "1077218" - }, - { - "price": 30, - "quantity": 1, - "content_type": "dress", - "content_id": "1197218" - } - ], - "currency": "USD", - "value": 46 - }, - "context": { - "ad": { - "callback": "999ATXSfe" - }, - "page": { - "url": "http://rudder.mywebsite.com/purchase", - "referrer": "http://rudder.mywebsite.com" - }, - "user": { - "phone_number": "2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea", - "email": "dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f", - "external_id": "f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc" - }, - "ip": "13.57.97.131", - "user_agent": "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion" - }, - "partner_name": "RudderStack" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "tiktok_ads", - "description": "Test 20", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "anonymousId": "21e13f4bc7ceddad", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion", - "ip": "13.57.97.131", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "tiktokExternalId", - "id": "f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc" - } - ] - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "timestamp": "2020-09-17T19:49:27Z", - "type": "track", - "event": "abc", - "properties": { - "eventId": "1616318632825_357", - "contents": [ - { - "price": 8, - "quantity": 2, - "content_type": "socks", - "content_id": "1077218" - }, - { - "price": 30, - "quantity": 1, - "content_type": "dress", - "content_id": "1197218" - } - ], - "currency": "USD", - "value": 46, - "context": { - "ad": { - "callback": "123ATXSfe" - }, - "page": { - "url": "http://demo.mywebsite.com/purchase", - "referrer": "http://demo.mywebsite.com" - }, - "user": { - "phone_number": "2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea", - "email": "dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f" - } - } - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "accessToken": "dummyAccessToken", - "pixelCode": "A1T8T4UYGVIQA8ORZMX9", - "hashUserProperties": false, - "eventsToStandard": [ - { - "from": "abc", - "to": "download" - }, - { - "from": "abc", - "to": "search" - }, - { - "from": "def", - "to": "search" - } - ] - } - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://business-api.tiktok.com/open_api/v1.3/pixel/track/", - "headers": { - "Access-Token": "dummyAccessToken", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "pixel_code": "A1T8T4UYGVIQA8ORZMX9", - "event": "download", - "event_id": "1616318632825_357", - "timestamp": "2020-09-17T19:49:27Z", - "properties": { - "contents": [ - { - "price": 8, - "quantity": 2, - "content_type": "socks", - "content_id": "1077218" - }, - { - "price": 30, - "quantity": 1, - "content_type": "dress", - "content_id": "1197218" - } - ], - "currency": "USD", - "value": 46 - }, - "context": { - "ad": { - "callback": "123ATXSfe" - }, - "page": { - "url": "http://demo.mywebsite.com/purchase", - "referrer": "http://demo.mywebsite.com" - }, - "user": { - "phone_number": "2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea", - "email": "dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f", - "external_id": "f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc" - }, - "ip": "13.57.97.131", - "user_agent": "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion" - }, - "partner_name": "RudderStack" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - }, - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://business-api.tiktok.com/open_api/v1.3/pixel/track/", - "headers": { - "Access-Token": "dummyAccessToken", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "pixel_code": "A1T8T4UYGVIQA8ORZMX9", - "event": "search", - "event_id": "1616318632825_357", - "timestamp": "2020-09-17T19:49:27Z", - "properties": { - "contents": [ - { - "price": 8, - "quantity": 2, - "content_type": "socks", - "content_id": "1077218" - }, - { - "price": 30, - "quantity": 1, - "content_type": "dress", - "content_id": "1197218" - } - ], - "currency": "USD", - "value": 46 - }, - "context": { - "ad": { - "callback": "123ATXSfe" - }, - "page": { - "url": "http://demo.mywebsite.com/purchase", - "referrer": "http://demo.mywebsite.com" - }, - "user": { - "phone_number": "2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea", - "email": "dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f", - "external_id": "f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc" - }, - "ip": "13.57.97.131", - "user_agent": "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion" - }, - "partner_name": "RudderStack" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "tiktok_ads", - "description": "Test 21", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "anonymousId": "21e13f4bc7ceddad", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion", - "ip": "13.57.97.131", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "tiktokExternalId", - "id": "f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc" - } - ] - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "timestamp": "2020-09-17T19:49:27Z", - "type": "track", - "event": "abc", - "properties": { - "eventId": "1616318632825_357", - "contents": [ - { - "price": 8, - "quantity": 2, - "content_type": "socks", - "content_id": "1077218" - }, - { - "price": 30, - "quantity": 1, - "content_type": "dress", - "content_id": "1197218" - } - ], - "currency": "USD", - "value": 46, - "context": { - "ad": { - "callback": "123ATXSfe" - }, - "page": { - "url": "http://demo.mywebsite.com/purchase", - "referrer": "http://demo.mywebsite.com" - }, - "user": { - "phone_number": "2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea", - "email": "dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f" - } - } - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "accessToken": "dummyAccessToken", - "pixelCode": "A1T8T4UYGVIQA8ORZMX9", - "hashUserProperties": false, - "eventsToStandard": [ - { - "from": "def", - "to": "download" - } - ] - } - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "statusCode": 400, - "error": "Event name (abc) is not valid, must be mapped to one of standard events", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation", - "destType": "TIKTOK_ADS", - "module": "destination", - "implementation": "native", - "feature": "processor" - } - } - ] - } - } - }, - { - "name": "tiktok_ads", - "description": "Test 22", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "anonymousId": "21e13f4bc7ceddad", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion", - "ip": "13.57.97.131", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "tiktokExternalId", - "id": "f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc" - } - ] - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "timestamp": "2020-09-17T19:49:27Z", - "type": "track", - "event": "abc", - "properties": { - "eventId": "1616318632825_357", - "contents": [ - { - "price": 8, - "quantity": 2, - "content_type": "socks", - "content_id": "1077218" - }, - { - "price": 30, - "quantity": 1, - "content_type": "dress", - "content_id": "1197218" - } - ], - "currency": "USD", - "value": 46, - "context": { - "ad": { - "callback": "123ATXSfe" - }, - "page": { - "url": "http://demo.mywebsite.com/purchase", - "referrer": "http://demo.mywebsite.com" - }, - "user": { - "phone_number": "2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea", - "email": "dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f" - } - } - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "accessToken": "dummyAccessToken", - "pixelCode": "A1T8T4UYGVIQA8ORZMX9", - "hashUserProperties": false, - "eventsToStandard": [ - { - "from": "abc", - "to": "download" - }, - { - "from": "def", - "to": "download" - } - ] - } - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://business-api.tiktok.com/open_api/v1.3/pixel/track/", - "headers": { - "Access-Token": "dummyAccessToken", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "pixel_code": "A1T8T4UYGVIQA8ORZMX9", - "event": "download", - "event_id": "1616318632825_357", - "timestamp": "2020-09-17T19:49:27Z", - "properties": { - "contents": [ - { - "price": 8, - "quantity": 2, - "content_type": "socks", - "content_id": "1077218" - }, - { - "price": 30, - "quantity": 1, - "content_type": "dress", - "content_id": "1197218" - } - ], - "currency": "USD", - "value": 46 - }, - "context": { - "ad": { - "callback": "123ATXSfe" - }, - "page": { - "url": "http://demo.mywebsite.com/purchase", - "referrer": "http://demo.mywebsite.com" - }, - "user": { - "phone_number": "2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea", - "email": "dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f", - "external_id": "f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc" - }, - "ip": "13.57.97.131", - "user_agent": "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion" - }, - "partner_name": "RudderStack" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "tiktok_ads", - "description": "Test 23", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "anonymousId": "21e13f4bc7ceddad", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion", - "ip": "13.57.97.131", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "tiktokExternalId", - "id": "f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc" - } - ] - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "timestamp": "2020-09-17T19:49:27Z", - "type": "track", - "event": "abc", - "properties": { - "eventId": "1616318632825_357", - "contents": [ - { - "price": 8, - "quantity": 2, - "content_type": "socks", - "content_id": "1077218" - }, - { - "price": 30, - "quantity": 1, - "content_type": "dress", - "content_id": "1197218" - } - ], - "currency": "USD", - "value": 46, - "context": { - "ad": { - "callback": "123ATXSfe" - }, - "page": { - "url": "http://demo.mywebsite.com/purchase", - "referrer": "http://demo.mywebsite.com" - }, - "user": { - "phone_number": "+371234567890123", - "email": "sample@sample.com" - } - } - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "accessToken": "dummyAccessToken", - "pixelCode": "A1T8T4UYGVIQA8ORZMX9", - "hashUserProperties": true, - "eventsToStandard": [ - { - "from": "abc", - "to": "download" - }, - { - "from": "def", - "to": "download" - } - ] - } - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://business-api.tiktok.com/open_api/v1.3/pixel/track/", - "headers": { - "Access-Token": "dummyAccessToken", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "pixel_code": "A1T8T4UYGVIQA8ORZMX9", - "event": "download", - "event_id": "1616318632825_357", - "timestamp": "2020-09-17T19:49:27Z", - "properties": { - "contents": [ - { - "price": 8, - "quantity": 2, - "content_type": "socks", - "content_id": "1077218" - }, - { - "price": 30, - "quantity": 1, - "content_type": "dress", - "content_id": "1197218" - } - ], - "currency": "USD", - "value": 46 - }, - "context": { - "ad": { - "callback": "123ATXSfe" - }, - "page": { - "url": "http://demo.mywebsite.com/purchase", - "referrer": "http://demo.mywebsite.com" - }, - "user": { - "phone_number": "6080191ec608e10062e9257702cbca694cfe1bfa53944ba5701119d8f8b99ad6", - "email": "774efc08cebab8c50c0f0eb2d3a2d2e560872a64f6c1617314c4f03b1c3d4dfa", - "external_id": "f0f3ec74bbef8580d7de80624dea93c05d828c748715199fe71bc7f5a67aa8b3" - }, - "ip": "13.57.97.131", - "user_agent": "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion" - }, - "partner_name": "RudderStack" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "tiktok_ads", - "description": "Test 24", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "anonymousId": "21e13f4bc7ceddad", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion", - "ip": "13.57.97.131", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "tiktokExternalId", - "id": "f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc" - } - ] - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "timestamp": "2020-09-17T19:49:27Z", - "type": "track", - "event": "abc", - "properties": { - "eventId": "1616318632825_357", - "contents": [ - { - "price": 8, - "quantity": 2, - "content_type": "socks", - "content_id": "1077218" - }, - { - "price": 30, - "quantity": 1, - "content_type": "dress", - "content_id": "1197218" - } - ], - "currency": "USD", - "value": 46, - "context": { - "ad": { - "callback": "123ATXSfe" - }, - "page": { - "url": "http://demo.mywebsite.com/purchase", - "referrer": "http://demo.mywebsite.com" - }, - "user": { - "phone_number": "+3712345678", - "email": "sample@sample.com" - } - } - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "accessToken": "dummyAccessToken", - "pixelCode": "A1T8T4UYGVIQA8ORZMX9", - "hashUserProperties": true, - "eventsToStandard": [ - { - "from": "abc", - "to": "download" - }, - { - "from": "def", - "to": "download" - } - ] - } - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://business-api.tiktok.com/open_api/v1.3/pixel/track/", - "headers": { - "Access-Token": "dummyAccessToken", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "pixel_code": "A1T8T4UYGVIQA8ORZMX9", - "event": "download", - "event_id": "1616318632825_357", - "timestamp": "2020-09-17T19:49:27Z", - "properties": { - "contents": [ - { - "price": 8, - "quantity": 2, - "content_type": "socks", - "content_id": "1077218" - }, - { - "price": 30, - "quantity": 1, - "content_type": "dress", - "content_id": "1197218" - } - ], - "currency": "USD", - "value": 46 - }, - "context": { - "ad": { - "callback": "123ATXSfe" - }, - "page": { - "url": "http://demo.mywebsite.com/purchase", - "referrer": "http://demo.mywebsite.com" - }, - "user": { - "phone_number": "6e6c1bb39126b3ecf537e62847909b1372a1a22de9b28d85960e12c78f322035", - "email": "774efc08cebab8c50c0f0eb2d3a2d2e560872a64f6c1617314c4f03b1c3d4dfa", - "external_id": "f0f3ec74bbef8580d7de80624dea93c05d828c748715199fe71bc7f5a67aa8b3" - }, - "ip": "13.57.97.131", - "user_agent": "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion" - }, - "partner_name": "RudderStack" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "tiktok_ads", - "description": "Test 25", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "anonymousId": "21e13f4bc7ceddad", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion", - "ip": "13.57.97.131", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "tiktokExternalId", - "id": "f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc" - } - ] - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "timestamp": "2020-09-17T19:49:27Z", - "type": "track", - "event": "checkout step completed", - "properties": { - "eventId": "1616318632825_357", - "contents": [ - { - "price": 8, - "quantity": 2, - "content_type": "socks", - "content_id": "1077218" - }, - { - "price": 30, - "quantity": 1, - "content_type": "dress", - "content_id": "1197218" - } - ], - "products": [ - { - "product_id": 123, - "sku": "G-32", - "name": "Monopoly", - "price": 14, - "quantity": 1, - "category": "Games", - "url": "https://www.website.com/product/path", - "image_url": "https://www.website.com/product/path.jpg" - }, - { - "product_id": "345", - "sku": "F-32", - "name": "UNO", - "price": 3.45, - "quantity": 2, - "category": "Games" - } - ], - "currency": "USD", - "value": 46, - "context": { - "ad": { - "callback": "123ATXSfe" - }, - "page": { - "url": "http://demo.mywebsite.com/purchase", - "referrer": "http://demo.mywebsite.com" - }, - "user": { - "phone_number": "2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea", - "email": "dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f" - } - } - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "accessToken": "dummyAccessToken", - "pixelCode": "A1T8T4UYGVIQA8ORZMX9", - "hashUserProperties": false - } - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://business-api.tiktok.com/open_api/v1.3/pixel/track/", - "headers": { - "Access-Token": "dummyAccessToken", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "pixel_code": "A1T8T4UYGVIQA8ORZMX9", - "event": "CompletePayment", - "event_id": "1616318632825_357", - "timestamp": "2020-09-17T19:49:27Z", - "properties": { - "contents": [ - { - "price": 8, - "quantity": 2, - "content_type": "socks", - "content_id": "1077218" - }, - { - "price": 30, - "quantity": 1, - "content_type": "dress", - "content_id": "1197218" - } - ], - "currency": "USD", - "value": 46 - }, - "context": { - "ad": { - "callback": "123ATXSfe" - }, - "page": { - "url": "http://demo.mywebsite.com/purchase", - "referrer": "http://demo.mywebsite.com" - }, - "user": { - "phone_number": "2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea", - "email": "dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f", - "external_id": "f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc" - }, - "ip": "13.57.97.131", - "user_agent": "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion" - }, - "partner_name": "RudderStack" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "tiktok_ads", - "description": "Test 26", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "anonymousId": "21e13f4bc7ceddad", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion", - "ip": "13.57.97.131", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "tiktokExternalId", - "id": "f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc" - } - ] - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "timestamp": "2020-09-17T19:49:27Z", - "type": "track", - "event": "checkout step completed", - "properties": { - "eventId": "1616318632825_357", - "products": [ - { - "product_id": 123, - "sku": "G-32", - "name": "Monopoly", - "price": 14, - "quantity": 1, - "contentType": "product_group", - "category": "Games", - "url": "https://www.website.com/product/path", - "image_url": "https://www.website.com/product/path.jpg" - }, - { - "product_id": 345, - "sku": "F-32", - "name": "UNO", - "price": 3.45, - "contentType": "product_group", - "quantity": 2 - } - ], - "currency": "USD", - "value": 46, - "context": { - "ad": { - "callback": "123ATXSfe" - }, - "page": { - "url": "http://demo.mywebsite.com/purchase", - "referrer": "http://demo.mywebsite.com" - }, - "user": { - "phone_number": "2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea", - "email": "dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f" - } - } - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "accessToken": "dummyAccessToken", - "pixelCode": "A1T8T4UYGVIQA8ORZMX9", - "hashUserProperties": false - } - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://business-api.tiktok.com/open_api/v1.3/pixel/track/", - "headers": { - "Access-Token": "dummyAccessToken", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "pixel_code": "A1T8T4UYGVIQA8ORZMX9", - "event": "CompletePayment", - "event_id": "1616318632825_357", - "timestamp": "2020-09-17T19:49:27Z", - "properties": { - "currency": "USD", - "value": 46, - "contents": [ - { - "content_type": "product_group", - "content_id": "123", - "content_category": "Games", - "content_name": "Monopoly", - "price": 14, - "quantity": 1 - }, - { - "content_type": "product_group", - "content_id": "345", - "content_name": "UNO", - "price": 3.45, - "quantity": 2 - } - ] - }, - "context": { - "ad": { - "callback": "123ATXSfe" - }, - "page": { - "url": "http://demo.mywebsite.com/purchase", - "referrer": "http://demo.mywebsite.com" - }, - "user": { - "phone_number": "2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea", - "email": "dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f", - "external_id": "f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc" - }, - "ip": "13.57.97.131", - "user_agent": "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion" - }, - "partner_name": "RudderStack" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "tiktok_ads", - "description": "Test 27", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "anonymousId": "21e13f4bc7ceddad", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion", - "ip": "13.57.97.131", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "tiktokExternalId", - "id": "f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc" - } - ] - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "timestamp": "2020-09-17T19:49:27Z", - "type": "track", - "event": "checkout step completed", - "properties": { - "eventId": "1616318632825_357", - "products": [ - { - "contentType": "product_group", - "product_id": "123", - "sku": "G-32", - "name": "Monopoly", - "price": 14, - "quantity": 1, - "category": "Games", - "url": "https://www.website.com/product/path", - "image_url": "https://www.website.com/product/path.jpg" - }, - { - "contentType": "product_group", - "product_id": "345", - "sku": "F-32", - "name": "UNO", - "price": 3.45, - "quantity": 2, - "category": "Games" - } - ], - "currency": "USD", - "value": 46, - "context": { - "ad": { - "callback": "123ATXSfe" - }, - "page": { - "url": "http://demo.mywebsite.com/purchase", - "referrer": "http://demo.mywebsite.com" - }, - "user": { - "phone_number": "2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea", - "email": "dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f" - } - } - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "accessToken": "dummyAccessToken", - "pixelCode": "A1T8T4UYGVIQA8ORZMX9", - "hashUserProperties": false - } - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://business-api.tiktok.com/open_api/v1.3/pixel/track/", - "headers": { - "Access-Token": "dummyAccessToken", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "pixel_code": "A1T8T4UYGVIQA8ORZMX9", - "event": "CompletePayment", - "event_id": "1616318632825_357", - "timestamp": "2020-09-17T19:49:27Z", - "properties": { - "currency": "USD", - "value": 46, - "contents": [ - { - "content_type": "product_group", - "content_id": "123", - "content_category": "Games", - "content_name": "Monopoly", - "price": 14, - "quantity": 1 - }, - { - "content_type": "product_group", - "content_id": "345", - "content_category": "Games", - "content_name": "UNO", - "price": 3.45, - "quantity": 2 - } - ] - }, - "context": { - "ad": { - "callback": "123ATXSfe" - }, - "page": { - "url": "http://demo.mywebsite.com/purchase", - "referrer": "http://demo.mywebsite.com" - }, - "user": { - "phone_number": "2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea", - "email": "dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f", - "external_id": "f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc" - }, - "ip": "13.57.97.131", - "user_agent": "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion" - }, - "partner_name": "RudderStack" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "tiktok_ads", - "description": "Test 28", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "anonymousId": "21e13f4bc7ceddad", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion", - "ip": "13.57.97.131", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "tiktokExternalId", - "id": "f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc" - } - ] - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "timestamp": "2020-09-17T19:49:27Z", - "type": "track", - "event": "checkout step completed", - "properties": { - "category": "Urban", - "status": "processed", - "name": "games", - "contentType": "product_group", - "productId": "qqw21221341234", - "eventId": "1616318632825_357", - "products": [ - { - "product_id": "123", - "sku": "G-32", - "name": "Monopoly", - "price": 14, - "quantity": 1, - "category": "Games", - "url": "https://www.website.com/product/path", - "image_url": "https://www.website.com/product/path.jpg" - }, - { - "product_id": "345", - "sku": "F-32", - "name": "UNO", - "price": 3.45, - "quantity": 2, - "category": "Games" - } - ], - "currency": "USD", - "value": 46, - "context": { - "ad": { - "callback": "123ATXSfe" - }, - "page": { - "url": "http://demo.mywebsite.com/purchase", - "referrer": "http://demo.mywebsite.com" - }, - "user": { - "phone_number": "2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea", - "email": "dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f" - } - } - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "accessToken": "dummyAccessToken", - "pixelCode": "A1T8T4UYGVIQA8ORZMX9", - "hashUserProperties": false - } - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://business-api.tiktok.com/open_api/v1.3/pixel/track/", - "headers": { - "Access-Token": "dummyAccessToken", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "pixel_code": "A1T8T4UYGVIQA8ORZMX9", - "event": "CompletePayment", - "event_id": "1616318632825_357", - "timestamp": "2020-09-17T19:49:27Z", - "properties": { - "content_category": "Urban", - "status": "processed", - "content_name": "games", - "content_id": "qqw21221341234", - "content_type": "product_group", - "currency": "USD", - "value": 46, - "contents": [ - { - "content_type": "product_group", - "content_id": "123", - "content_category": "Games", - "content_name": "Monopoly", - "price": 14, - "quantity": 1 - }, - { - "content_type": "product_group", - "content_id": "345", - "content_category": "Games", - "content_name": "UNO", - "price": 3.45, - "quantity": 2 - } - ] - }, - "context": { - "ad": { - "callback": "123ATXSfe" - }, - "page": { - "url": "http://demo.mywebsite.com/purchase", - "referrer": "http://demo.mywebsite.com" - }, - "user": { - "phone_number": "2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea", - "email": "dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f", - "external_id": "f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc" - }, - "ip": "13.57.97.131", - "user_agent": "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion" - }, - "partner_name": "RudderStack" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - } - } -] \ No newline at end of file + { + name: 'tiktok_ads', + description: 'Test 0', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + ip: '13.57.97.131', + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'tiktokExternalId', + id: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + ], + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + timestamp: '2020-09-17T19:49:27Z', + type: 'track', + event: 'checkout step completed', + properties: { + eventId: '1616318632825_357', + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + clickId: 'dummyclickId', + currency: 'USD', + value: 46, + context: { + ad: { + callback: '123ATXSfe', + }, + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + phone_number: + '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', + }, + }, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + hashUserProperties: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://business-api.tiktok.com/open_api/v1.3/pixel/track/', + headers: { + 'Access-Token': 'dummyAccessToken', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + pixel_code: 'A1T8T4UYGVIQA8ORZMX9', + event: 'CompletePayment', + event_id: '1616318632825_357', + timestamp: '2020-09-17T19:49:27Z', + properties: { + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + currency: 'USD', + value: 46, + }, + context: { + ad: { + callback: 'dummyclickId', + }, + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + phone_number: + '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', + external_id: + 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + ip: '13.57.97.131', + user_agent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + }, + partner_name: 'RudderStack', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'tiktok_ads', + description: 'Test 1', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + locale: 'en-US', + ip: '13.57.97.131', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'tiktokExternalId', + id: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + ], + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + timestamp: '2020-09-17T19:49:27Z', + type: 'track', + event: 'checkout started', + properties: { + eventId: '1616318632825_357', + context: { + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + phone_number: + '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', + }, + }, + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + currency: 'USD', + value: 46, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + hashUserProperties: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://business-api.tiktok.com/open_api/v1.3/pixel/track/', + headers: { + 'Access-Token': 'dummyAccessToken', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + pixel_code: 'A1T8T4UYGVIQA8ORZMX9', + event: 'InitiateCheckout', + event_id: '1616318632825_357', + timestamp: '2020-09-17T19:49:27Z', + properties: { + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + currency: 'USD', + value: 46, + }, + context: { + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + phone_number: + '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', + external_id: + 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + ip: '13.57.97.131', + user_agent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + }, + partner_name: 'RudderStack', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'tiktok_ads', + description: 'Test 2', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'tiktokExternalId', + id: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + ], + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + timestamp: '2020-09-17T19:49:27Z', + type: 'track', + event: 'Product Added to Wishlist', + properties: { + eventId: '1616318632825_357', + testEventCode: 'sample rudder test_event_code', + context: { + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + phone_number: + '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', + }, + }, + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + currency: 'USD', + value: 46, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + hashUserProperties: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://business-api.tiktok.com/open_api/v1.3/pixel/track/', + headers: { + 'Access-Token': 'dummyAccessToken', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + pixel_code: 'A1T8T4UYGVIQA8ORZMX9', + event: 'AddToWishlist', + event_id: '1616318632825_357', + timestamp: '2020-09-17T19:49:27Z', + test_event_code: 'sample rudder test_event_code', + properties: { + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + currency: 'USD', + value: 46, + }, + context: { + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + phone_number: + '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', + external_id: + 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + }, + partner_name: 'RudderStack', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'tiktok_ads', + description: 'Test 3', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + locale: 'en-US', + ip: '13.57.97.131', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'tiktokExternalId', + id: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + ], + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + timestamp: '2020-09-17T19:49:27Z', + type: 'track', + event: 'Product Added to Wishlist1', + properties: { + eventId: '1616318632825_357', + testEventCode: 'sample rudder test_event_code', + context: { + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + phone_number: + '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', + }, + }, + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + currency: 'USD', + value: 46, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + hashUserProperties: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: + 'Event name (product added to wishlist1) is not valid, must be mapped to one of standard events', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'TIKTOK_ADS', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'tiktok_ads', + description: 'Test 4', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + locale: 'en-US', + ip: '13.57.97.131', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'tiktokExternalId', + id: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + ], + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + timestamp: '2020-09-17T19:49:27Z', + type: 'track', + event: 'Product Added to Wishlist', + properties: { + eventId: '1616318632825_357', + testEventCode: 'sample rudder test_event_code', + context: { + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + phone_number: + '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', + }, + }, + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + currency: 'USD', + value: 46, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + hashUserProperties: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://business-api.tiktok.com/open_api/v1.3/pixel/track/', + headers: { + 'Access-Token': 'dummyAccessToken', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + pixel_code: 'A1T8T4UYGVIQA8ORZMX9', + event: 'AddToWishlist', + event_id: '1616318632825_357', + timestamp: '2020-09-17T19:49:27Z', + test_event_code: 'sample rudder test_event_code', + properties: { + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + currency: 'USD', + value: 46, + }, + context: { + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + phone_number: + '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', + external_id: + 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + ip: '13.57.97.131', + user_agent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + }, + partner_name: 'RudderStack', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'tiktok_ads', + description: 'Test 5', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + locale: 'en-US', + ip: '13.57.97.131', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'tiktokExternalId', + id: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + ], + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + timestamp: '2020-09-17T19:49:27Z', + type: 'track', + event: 'Product Added to Wishlist', + properties: { + eventId: '1616318632825_357', + testEventCode: 'sample rudder test_event_code', + context: { + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + phone_number: + '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', + }, + }, + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + currency: 'USD', + value: 46, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + hashUserProperties: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://business-api.tiktok.com/open_api/v1.3/pixel/track/', + headers: { + 'Access-Token': 'dummyAccessToken', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + pixel_code: 'A1T8T4UYGVIQA8ORZMX9', + event: 'AddToWishlist', + event_id: '1616318632825_357', + timestamp: '2020-09-17T19:49:27Z', + test_event_code: 'sample rudder test_event_code', + properties: { + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + currency: 'USD', + value: 46, + }, + context: { + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + phone_number: + '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', + external_id: + 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + ip: '13.57.97.131', + user_agent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + }, + partner_name: 'RudderStack', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'tiktok_ads', + description: 'Test 6', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + locale: 'en-US', + ip: '13.57.97.131', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'tiktokExternalId', + id: '1234', + }, + ], + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + timestamp: '2020-09-17T19:49:27Z', + type: 'track', + event: 'SubscriBe', + properties: { + eventId: '1616318632825_357', + testEventCode: '', + context: { + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + phone_number: '+868987675687', + email: 'sample@sample.com', + }, + }, + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + currency: 'USD', + value: 46, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + hashUserProperties: true, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://business-api.tiktok.com/open_api/v1.3/pixel/track/', + headers: { + 'Access-Token': 'dummyAccessToken', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + pixel_code: 'A1T8T4UYGVIQA8ORZMX9', + event: 'Subscribe', + event_id: '1616318632825_357', + timestamp: '2020-09-17T19:49:27Z', + properties: { + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + currency: 'USD', + value: 46, + }, + context: { + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + phone_number: + '1d96e70d2bf54087e33586457cde2790825bee7b1a3b05d26481cb12ec8e63fd', + email: '774efc08cebab8c50c0f0eb2d3a2d2e560872a64f6c1617314c4f03b1c3d4dfa', + external_id: + '03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4', + }, + ip: '13.57.97.131', + user_agent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + }, + partner_name: 'RudderStack', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'tiktok_ads', + description: 'Test 7', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + locale: 'en-US', + ip: '13.57.97.131', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'tiktokExternalId', + id: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + ], + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + timestamp: '2020-09-17T19:49:27Z', + type: 'track', + event: 'payment info entered', + properties: { + eventId: '1616318632825_357', + context: { + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + phone_number: + '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', + }, + }, + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + currency: 'USD', + value: 46, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + hashUserProperties: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://business-api.tiktok.com/open_api/v1.3/pixel/track/', + headers: { + 'Access-Token': 'dummyAccessToken', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + pixel_code: 'A1T8T4UYGVIQA8ORZMX9', + event: 'AddPaymentInfo', + event_id: '1616318632825_357', + timestamp: '2020-09-17T19:49:27Z', + properties: { + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + currency: 'USD', + value: 46, + }, + context: { + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + phone_number: + '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', + external_id: + 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + ip: '13.57.97.131', + user_agent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + }, + partner_name: 'RudderStack', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'tiktok_ads', + description: 'Test 8', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + locale: 'en-US', + ip: '13.57.97.131', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'tiktokExternalId', + id: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + ], + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + timestamp: '2020-09-17T19:49:27Z', + type: 'track', + properties: { + eventId: '1616318632825_357', + context: { + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + phone_number: + '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', + }, + }, + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + currency: 'USD', + value: 46, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + hashUserProperties: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: 'Event name is required', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'TIKTOK_ADS', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'tiktok_ads', + description: 'Test 9', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + locale: 'en-US', + ip: '13.57.97.131', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'tiktokExternalId', + id: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + ], + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + timestamp: '2020-09-17T19:49:27Z', + properties: { + eventId: '1616318632825_357', + context: { + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + phone_number: + '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', + }, + }, + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + currency: 'USD', + value: 46, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + hashUserProperties: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: 'Event type is required', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'TIKTOK_ADS', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'tiktok_ads', + description: 'Test 10', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + locale: 'en-US', + ip: '13.57.97.131', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'tiktokExternalId', + id: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + ], + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + type: 'track', + event: 'payment info entered', + properties: { + eventId: '1616318632825_357', + context: { + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + phone_number: + '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', + }, + }, + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + currency: 'USD', + value: 46, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + hashUserProperties: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://business-api.tiktok.com/open_api/v1.3/pixel/track/', + headers: { + 'Access-Token': 'dummyAccessToken', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + pixel_code: 'A1T8T4UYGVIQA8ORZMX9', + event: 'AddPaymentInfo', + event_id: '1616318632825_357', + properties: { + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + currency: 'USD', + value: 46, + }, + context: { + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + phone_number: + '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', + external_id: + 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + ip: '13.57.97.131', + user_agent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + }, + partner_name: 'RudderStack', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'tiktok_ads', + description: 'Test 11', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + locale: 'en-US', + ip: '13.57.97.131', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'tiktokExternalId', + id: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + ], + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + timestamp: '2020-09-17T19:49:27Z', + type: 'track', + event: 'submitform', + properties: { + eventId: '16163186328257', + context: { + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + phone_number: + '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', + }, + }, + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + currency: 'USD', + value: 46, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + hashUserProperties: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://business-api.tiktok.com/open_api/v1.3/pixel/track/', + headers: { + 'Access-Token': 'dummyAccessToken', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + pixel_code: 'A1T8T4UYGVIQA8ORZMX9', + event: 'SubmitForm', + event_id: '16163186328257', + timestamp: '2020-09-17T19:49:27Z', + properties: { + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + currency: 'USD', + value: 46, + }, + context: { + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + phone_number: + '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', + external_id: + 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + ip: '13.57.97.131', + user_agent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + }, + partner_name: 'RudderStack', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'tiktok_ads', + description: 'Test 12', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + locale: 'en-US', + ip: '13.57.97.131', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'tiktokExternalId', + id: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + ], + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + timestamp: '2020-09-17T19:49:27Z', + type: 'track', + event: 'submitform', + properties: { + eventId: '16163186328257', + context: { + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + phone_number: + '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', + }, + userAgent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + ip: '13.57.97.131', + }, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + hashUserProperties: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://business-api.tiktok.com/open_api/v1.3/pixel/track/', + headers: { + 'Access-Token': 'dummyAccessToken', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + pixel_code: 'A1T8T4UYGVIQA8ORZMX9', + event: 'SubmitForm', + event_id: '16163186328257', + timestamp: '2020-09-17T19:49:27Z', + context: { + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + phone_number: + '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', + external_id: + 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + ip: '13.57.97.131', + user_agent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + }, + partner_name: 'RudderStack', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'tiktok_ads', + description: 'Test 13', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + locale: 'en-US', + ip: '13.57.97.131', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'tiktokExternalId', + id: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + ], + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + timestamp: '2020-09-17T19:49:27Z', + type: 'track', + event: 'contact', + properties: { + eventId: '16163186328257', + context: { + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + phone_number: + '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', + }, + }, + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + currency: 'USD', + value: 46, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + hashUserProperties: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://business-api.tiktok.com/open_api/v1.3/pixel/track/', + headers: { + 'Access-Token': 'dummyAccessToken', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + pixel_code: 'A1T8T4UYGVIQA8ORZMX9', + event: 'Contact', + event_id: '16163186328257', + timestamp: '2020-09-17T19:49:27Z', + properties: { + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + currency: 'USD', + value: 46, + }, + context: { + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + phone_number: + '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', + external_id: + 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + ip: '13.57.97.131', + user_agent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + }, + partner_name: 'RudderStack', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'tiktok_ads', + description: 'Test 14', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + locale: 'en-US', + ip: '13.57.97.131', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'tiktokExternalId', + id: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + ], + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + timestamp: '2020-09-17T19:49:27Z', + type: 'identify', + event: 'contact', + properties: { + eventId: '16163186328257', + context: { + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + phone_number: + '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', + }, + }, + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + currency: 'USD', + value: 46, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + hashUserProperties: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: 'Event type identify is not supported', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'TIKTOK_ADS', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'tiktok_ads', + description: 'Test 15', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + locale: 'en-US', + ip: '13.57.97.131', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'tiktokExternalId', + id: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + ], + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + timestamp: '2020-09-17T19:49:27Z', + type: 'track', + event: 'checkout step completed', + properties: { + eventId: '1616318632825_357', + context: { + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + phone_number: + '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', + }, + }, + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + currency: 'USD', + value: 46, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + hashUserProperties: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://business-api.tiktok.com/open_api/v1.3/pixel/track/', + headers: { + 'Access-Token': 'dummyAccessToken', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + pixel_code: 'A1T8T4UYGVIQA8ORZMX9', + event: 'CompletePayment', + event_id: '1616318632825_357', + timestamp: '2020-09-17T19:49:27Z', + properties: { + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + currency: 'USD', + value: 46, + }, + context: { + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + phone_number: + '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', + external_id: + 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + ip: '13.57.97.131', + user_agent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + }, + partner_name: 'RudderStack', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'tiktok_ads', + description: 'Test 16', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + locale: 'en-US', + ip: '13.57.97.131', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'tiktokExternalId', + id: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + ], + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + timestamp: '2020-09-17T19:49:27Z', + type: 'track', + event: 'order completed', + properties: { + eventId: '1616318632825_357', + context: { + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + phone_number: + '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', + }, + }, + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + currency: 'USD', + value: 46, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + hashUserProperties: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://business-api.tiktok.com/open_api/v1.3/pixel/track/', + headers: { + 'Access-Token': 'dummyAccessToken', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + pixel_code: 'A1T8T4UYGVIQA8ORZMX9', + event: 'PlaceAnOrder', + event_id: '1616318632825_357', + timestamp: '2020-09-17T19:49:27Z', + properties: { + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + currency: 'USD', + value: 46, + }, + context: { + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + phone_number: + '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', + external_id: + 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + ip: '13.57.97.131', + user_agent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + }, + partner_name: 'RudderStack', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'tiktok_ads', + description: 'Test 17', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'user@sample.com', + phone: '+919912345678', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + locale: 'en-US', + ip: '13.57.97.131', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'tiktokExternalId', + id: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + ], + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + timestamp: '2020-09-17T19:49:27Z', + type: 'track', + event: 'SubscriBe', + properties: { + eventId: '1616318632825_357', + testEventCode: 'TEST0000000011', + context: { + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + phone_number: '+918987674657', + email: 'sample@rudder.com', + }, + }, + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + currency: 'USD', + value: 46, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + hashUserProperties: true, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://business-api.tiktok.com/open_api/v1.3/pixel/track/', + headers: { + 'Access-Token': 'dummyAccessToken', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + pixel_code: 'A1T8T4UYGVIQA8ORZMX9', + event: 'Subscribe', + event_id: '1616318632825_357', + timestamp: '2020-09-17T19:49:27Z', + test_event_code: 'TEST0000000011', + properties: { + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + currency: 'USD', + value: 46, + }, + context: { + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + phone_number: + '1b6abcebb79b2208929967160ba291656f3fcd4f00e93b6a846c1e56c0e177c6', + email: '02e47a94635c1ffd6f6a69fe2c7a92dbfbb9d5e2ebddb54810520b34989b66a7', + external_id: + 'f0f3ec74bbef8580d7de80624dea93c05d828c748715199fe71bc7f5a67aa8b3', + }, + ip: '13.57.97.131', + user_agent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + }, + partner_name: 'RudderStack', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'tiktok_ads', + description: 'Test 18', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'user@sample.com', + phone: '+919912345678', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + locale: 'en-US', + ip: '13.57.97.131', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'tiktokExternalId', + id: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + ], + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + timestamp: '2020-09-17T19:49:27Z', + type: 'track', + event: 'SubscriBe', + properties: { + eventId: '1616318632825_357', + testEventCode: 'TEST0000000011', + context: { + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + phone_number: '', + email: '', + }, + }, + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + currency: 'USD', + value: 46, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + hashUserProperties: true, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://business-api.tiktok.com/open_api/v1.3/pixel/track/', + headers: { + 'Access-Token': 'dummyAccessToken', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + pixel_code: 'A1T8T4UYGVIQA8ORZMX9', + event: 'Subscribe', + event_id: '1616318632825_357', + timestamp: '2020-09-17T19:49:27Z', + test_event_code: 'TEST0000000011', + properties: { + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + currency: 'USD', + value: 46, + }, + context: { + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + phone_number: + '241102c24fa8a642e3d1346a31fbce3dd312563c015ae577a2253cb8652581eb', + email: 'a344da1fac6201ed1c1f20a07e1b55bb896a5ac0abd269c1e9daf1afbbffca3b', + external_id: + 'f0f3ec74bbef8580d7de80624dea93c05d828c748715199fe71bc7f5a67aa8b3', + }, + ip: '13.57.97.131', + user_agent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + }, + partner_name: 'RudderStack', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'tiktok_ads', + description: 'Test 19', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + ip: '13.57.97.131', + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + url: 'http://rudder.mywebsite.com/purchase', + referrer: 'http://rudder.mywebsite.com', + }, + externalId: [ + { + type: 'tiktokExternalId', + id: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + ], + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + timestamp: '2020-09-17T19:49:27Z', + type: 'track', + event: 'checkout step completed', + properties: { + eventId: '1616318632825_357', + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + currency: 'USD', + value: 46, + context: { + user: { + phone_number: + '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', + }, + }, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + hashUserProperties: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://business-api.tiktok.com/open_api/v1.3/pixel/track/', + headers: { + 'Access-Token': 'dummyAccessToken', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + pixel_code: 'A1T8T4UYGVIQA8ORZMX9', + event: 'CompletePayment', + event_id: '1616318632825_357', + timestamp: '2020-09-17T19:49:27Z', + properties: { + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + currency: 'USD', + value: 46, + }, + context: { + page: { + url: 'http://rudder.mywebsite.com/purchase', + referrer: 'http://rudder.mywebsite.com', + }, + user: { + phone_number: + '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', + external_id: + 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + ip: '13.57.97.131', + user_agent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + }, + partner_name: 'RudderStack', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'tiktok_ads', + description: 'Test 20', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + ip: '13.57.97.131', + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'tiktokExternalId', + id: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + ], + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + timestamp: '2020-09-17T19:49:27Z', + type: 'track', + event: 'abc', + properties: { + eventId: '1616318632825_357', + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + currency: 'USD', + value: 46, + context: { + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + phone_number: + '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', + }, + }, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + hashUserProperties: false, + eventsToStandard: [ + { + from: 'abc', + to: 'download', + }, + { + from: 'abc', + to: 'search', + }, + { + from: 'def', + to: 'search', + }, + ], + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://business-api.tiktok.com/open_api/v1.3/pixel/track/', + headers: { + 'Access-Token': 'dummyAccessToken', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + pixel_code: 'A1T8T4UYGVIQA8ORZMX9', + event: 'download', + event_id: '1616318632825_357', + timestamp: '2020-09-17T19:49:27Z', + properties: { + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + currency: 'USD', + value: 46, + }, + context: { + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + phone_number: + '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', + external_id: + 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + ip: '13.57.97.131', + user_agent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + }, + partner_name: 'RudderStack', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://business-api.tiktok.com/open_api/v1.3/pixel/track/', + headers: { + 'Access-Token': 'dummyAccessToken', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + pixel_code: 'A1T8T4UYGVIQA8ORZMX9', + event: 'search', + event_id: '1616318632825_357', + timestamp: '2020-09-17T19:49:27Z', + properties: { + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + currency: 'USD', + value: 46, + }, + context: { + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + phone_number: + '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', + external_id: + 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + ip: '13.57.97.131', + user_agent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + }, + partner_name: 'RudderStack', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'tiktok_ads', + description: 'Test 21', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + ip: '13.57.97.131', + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'tiktokExternalId', + id: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + ], + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + timestamp: '2020-09-17T19:49:27Z', + type: 'track', + event: 'abc', + properties: { + eventId: '1616318632825_357', + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + currency: 'USD', + value: 46, + context: { + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + phone_number: + '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', + }, + }, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + hashUserProperties: false, + eventsToStandard: [ + { + from: 'def', + to: 'download', + }, + ], + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: 'Event name (abc) is not valid, must be mapped to one of standard events', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'TIKTOK_ADS', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'tiktok_ads', + description: 'Test 22', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + ip: '13.57.97.131', + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'tiktokExternalId', + id: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + ], + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + timestamp: '2020-09-17T19:49:27Z', + type: 'track', + event: 'abc', + properties: { + eventId: '1616318632825_357', + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + currency: 'USD', + value: 46, + context: { + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + phone_number: + '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', + }, + }, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + hashUserProperties: false, + eventsToStandard: [ + { + from: 'abc', + to: 'download', + }, + { + from: 'def', + to: 'download', + }, + ], + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://business-api.tiktok.com/open_api/v1.3/pixel/track/', + headers: { + 'Access-Token': 'dummyAccessToken', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + pixel_code: 'A1T8T4UYGVIQA8ORZMX9', + event: 'download', + event_id: '1616318632825_357', + timestamp: '2020-09-17T19:49:27Z', + properties: { + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + currency: 'USD', + value: 46, + }, + context: { + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + phone_number: + '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', + external_id: + 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + ip: '13.57.97.131', + user_agent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + }, + partner_name: 'RudderStack', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'tiktok_ads', + description: 'Test 23', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + ip: '13.57.97.131', + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'tiktokExternalId', + id: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + ], + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + timestamp: '2020-09-17T19:49:27Z', + type: 'track', + event: 'abc', + properties: { + eventId: '1616318632825_357', + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + currency: 'USD', + value: 46, + context: { + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + phone_number: '+371234567890123', + email: 'sample@sample.com', + }, + }, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + hashUserProperties: true, + eventsToStandard: [ + { + from: 'abc', + to: 'download', + }, + { + from: 'def', + to: 'download', + }, + ], + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://business-api.tiktok.com/open_api/v1.3/pixel/track/', + headers: { + 'Access-Token': 'dummyAccessToken', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + pixel_code: 'A1T8T4UYGVIQA8ORZMX9', + event: 'download', + event_id: '1616318632825_357', + timestamp: '2020-09-17T19:49:27Z', + properties: { + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + currency: 'USD', + value: 46, + }, + context: { + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + phone_number: + '6080191ec608e10062e9257702cbca694cfe1bfa53944ba5701119d8f8b99ad6', + email: '774efc08cebab8c50c0f0eb2d3a2d2e560872a64f6c1617314c4f03b1c3d4dfa', + external_id: + 'f0f3ec74bbef8580d7de80624dea93c05d828c748715199fe71bc7f5a67aa8b3', + }, + ip: '13.57.97.131', + user_agent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + }, + partner_name: 'RudderStack', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'tiktok_ads', + description: 'Test 24', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + ip: '13.57.97.131', + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'tiktokExternalId', + id: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + ], + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + timestamp: '2020-09-17T19:49:27Z', + type: 'track', + event: 'abc', + properties: { + eventId: '1616318632825_357', + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + currency: 'USD', + value: 46, + context: { + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + phone_number: '+3712345678', + email: 'sample@sample.com', + }, + }, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + hashUserProperties: true, + eventsToStandard: [ + { + from: 'abc', + to: 'download', + }, + { + from: 'def', + to: 'download', + }, + ], + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://business-api.tiktok.com/open_api/v1.3/pixel/track/', + headers: { + 'Access-Token': 'dummyAccessToken', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + pixel_code: 'A1T8T4UYGVIQA8ORZMX9', + event: 'download', + event_id: '1616318632825_357', + timestamp: '2020-09-17T19:49:27Z', + properties: { + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + currency: 'USD', + value: 46, + }, + context: { + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + phone_number: + '6e6c1bb39126b3ecf537e62847909b1372a1a22de9b28d85960e12c78f322035', + email: '774efc08cebab8c50c0f0eb2d3a2d2e560872a64f6c1617314c4f03b1c3d4dfa', + external_id: + 'f0f3ec74bbef8580d7de80624dea93c05d828c748715199fe71bc7f5a67aa8b3', + }, + ip: '13.57.97.131', + user_agent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + }, + partner_name: 'RudderStack', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'tiktok_ads', + description: 'Test 25', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + ip: '13.57.97.131', + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'tiktokExternalId', + id: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + ], + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + timestamp: '2020-09-17T19:49:27Z', + type: 'track', + event: 'checkout step completed', + properties: { + eventId: '1616318632825_357', + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + products: [ + { + product_id: 123, + sku: 'G-32', + name: 'Monopoly', + price: 14, + quantity: 1, + category: 'Games', + url: 'https://www.website.com/product/path', + image_url: 'https://www.website.com/product/path.jpg', + }, + { + product_id: '345', + sku: 'F-32', + name: 'UNO', + price: 3.45, + quantity: 2, + category: 'Games', + }, + ], + currency: 'USD', + value: 46, + context: { + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + phone_number: + '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', + }, + }, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + hashUserProperties: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://business-api.tiktok.com/open_api/v1.3/pixel/track/', + headers: { + 'Access-Token': 'dummyAccessToken', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + pixel_code: 'A1T8T4UYGVIQA8ORZMX9', + event: 'CompletePayment', + event_id: '1616318632825_357', + timestamp: '2020-09-17T19:49:27Z', + properties: { + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + currency: 'USD', + value: 46, + }, + context: { + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + phone_number: + '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', + external_id: + 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + ip: '13.57.97.131', + user_agent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + }, + partner_name: 'RudderStack', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'tiktok_ads', + description: 'Test 26', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + ip: '13.57.97.131', + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'tiktokExternalId', + id: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + ], + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + timestamp: '2020-09-17T19:49:27Z', + type: 'track', + event: 'checkout step completed', + properties: { + eventId: '1616318632825_357', + products: [ + { + product_id: 123, + sku: 'G-32', + name: 'Monopoly', + price: 14, + quantity: 1, + contentType: 'product_group', + category: 'Games', + url: 'https://www.website.com/product/path', + image_url: 'https://www.website.com/product/path.jpg', + }, + { + product_id: 345, + sku: 'F-32', + name: 'UNO', + price: 3.45, + contentType: 'product_group', + quantity: 2, + }, + ], + currency: 'USD', + value: 46, + context: { + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + phone_number: + '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', + }, + }, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + hashUserProperties: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://business-api.tiktok.com/open_api/v1.3/pixel/track/', + headers: { + 'Access-Token': 'dummyAccessToken', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + pixel_code: 'A1T8T4UYGVIQA8ORZMX9', + event: 'CompletePayment', + event_id: '1616318632825_357', + timestamp: '2020-09-17T19:49:27Z', + properties: { + currency: 'USD', + value: 46, + contents: [ + { + content_type: 'product_group', + content_id: '123', + content_category: 'Games', + content_name: 'Monopoly', + price: 14, + quantity: 1, + }, + { + content_type: 'product_group', + content_id: '345', + content_name: 'UNO', + price: 3.45, + quantity: 2, + }, + ], + }, + context: { + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + phone_number: + '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', + external_id: + 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + ip: '13.57.97.131', + user_agent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + }, + partner_name: 'RudderStack', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'tiktok_ads', + description: 'Test 27', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + ip: '13.57.97.131', + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'tiktokExternalId', + id: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + ], + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + timestamp: '2020-09-17T19:49:27Z', + type: 'track', + event: 'checkout step completed', + properties: { + eventId: '1616318632825_357', + products: [ + { + contentType: 'product_group', + product_id: '123', + sku: 'G-32', + name: 'Monopoly', + price: 14, + quantity: 1, + category: 'Games', + url: 'https://www.website.com/product/path', + image_url: 'https://www.website.com/product/path.jpg', + }, + { + contentType: 'product_group', + product_id: '345', + sku: 'F-32', + name: 'UNO', + price: 3.45, + quantity: 2, + category: 'Games', + }, + ], + currency: 'USD', + value: 46, + context: { + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + phone_number: + '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', + }, + }, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + hashUserProperties: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://business-api.tiktok.com/open_api/v1.3/pixel/track/', + headers: { + 'Access-Token': 'dummyAccessToken', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + pixel_code: 'A1T8T4UYGVIQA8ORZMX9', + event: 'CompletePayment', + event_id: '1616318632825_357', + timestamp: '2020-09-17T19:49:27Z', + properties: { + currency: 'USD', + value: 46, + contents: [ + { + content_type: 'product_group', + content_id: '123', + content_category: 'Games', + content_name: 'Monopoly', + price: 14, + quantity: 1, + }, + { + content_type: 'product_group', + content_id: '345', + content_category: 'Games', + content_name: 'UNO', + price: 3.45, + quantity: 2, + }, + ], + }, + context: { + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + phone_number: + '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', + external_id: + 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + ip: '13.57.97.131', + user_agent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + }, + partner_name: 'RudderStack', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'tiktok_ads', + description: 'Test 28', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + ip: '13.57.97.131', + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'tiktokExternalId', + id: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + ], + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + timestamp: '2020-09-17T19:49:27Z', + type: 'track', + event: 'checkout step completed', + properties: { + category: 'Urban', + status: 'processed', + name: 'games', + contentType: 'product_group', + productId: 'qqw21221341234', + eventId: '1616318632825_357', + products: [ + { + product_id: '123', + sku: 'G-32', + name: 'Monopoly', + price: 14, + quantity: 1, + category: 'Games', + url: 'https://www.website.com/product/path', + image_url: 'https://www.website.com/product/path.jpg', + }, + { + product_id: '345', + sku: 'F-32', + name: 'UNO', + price: 3.45, + quantity: 2, + category: 'Games', + }, + ], + currency: 'USD', + value: 46, + context: { + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + phone_number: + '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', + }, + }, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + hashUserProperties: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://business-api.tiktok.com/open_api/v1.3/pixel/track/', + headers: { + 'Access-Token': 'dummyAccessToken', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + pixel_code: 'A1T8T4UYGVIQA8ORZMX9', + event: 'CompletePayment', + event_id: '1616318632825_357', + timestamp: '2020-09-17T19:49:27Z', + properties: { + content_category: 'Urban', + status: 'processed', + content_name: 'games', + content_id: 'qqw21221341234', + content_type: 'product_group', + currency: 'USD', + value: 46, + contents: [ + { + content_type: 'product_group', + content_id: '123', + content_category: 'Games', + content_name: 'Monopoly', + price: 14, + quantity: 1, + }, + { + content_type: 'product_group', + content_id: '345', + content_category: 'Games', + content_name: 'UNO', + price: 3.45, + quantity: 2, + }, + ], + }, + context: { + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + phone_number: + '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', + external_id: + 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + ip: '13.57.97.131', + user_agent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + }, + partner_name: 'RudderStack', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, +]; diff --git a/test/integrations/destinations/tiktok_ads/router/data.ts b/test/integrations/destinations/tiktok_ads/router/data.ts index 60bb5628ca..a8c233c7a8 100644 --- a/test/integrations/destinations/tiktok_ads/router/data.ts +++ b/test/integrations/destinations/tiktok_ads/router/data.ts @@ -52,6 +52,7 @@ export const data = [ event: 'checkout step completed', properties: { eventId: '1616318632825_357', + clickId: 'dummyClickId', contents: [ { price: 8, @@ -69,9 +70,6 @@ export const data = [ currency: 'USD', value: 46.0, context: { - ad: { - callback: '123ATXSfe', - }, page: { url: 'http://demo.mywebsite.com/purchase', referrer: 'http://demo.mywebsite.com', @@ -141,9 +139,6 @@ export const data = [ properties: { eventId: '1616318632825_357', context: { - ad: { - callback: '123ATXSfe', - }, page: { url: 'http://demo.mywebsite.com/purchase', referrer: 'http://demo.mywebsite.com', @@ -229,9 +224,6 @@ export const data = [ properties: { eventId: '1616318632825_357', context: { - ad: { - callback: '123ATXSfe', - }, page: { url: 'http://demo.mywebsite.com/purchase', referrer: 'http://demo.mywebsite.com', @@ -320,9 +312,6 @@ export const data = [ properties: { eventId: '1616318632825_357', context: { - ad: { - callback: '123ATXSfe', - }, page: { url: 'http://demo.mywebsite.com/purchase', referrer: 'http://demo.mywebsite.com', @@ -421,7 +410,7 @@ export const data = [ }, context: { ad: { - callback: '123ATXSfe', + callback: 'dummyClickId', }, page: { url: 'http://demo.mywebsite.com/purchase', @@ -446,9 +435,6 @@ export const data = [ type: 'track', timestamp: '2020-09-17T19:49:27Z', context: { - ad: { - callback: '123ATXSfe', - }, ip: '13.57.97.131', page: { url: 'http://demo.mywebsite.com/purchase', @@ -490,9 +476,6 @@ export const data = [ type: 'track', timestamp: '2020-09-17T19:49:27Z', context: { - ad: { - callback: '123ATXSfe', - }, ip: '13.57.97.131', page: { url: 'http://demo.mywebsite.com/purchase', @@ -534,9 +517,6 @@ export const data = [ type: 'track', timestamp: '2020-09-17T19:49:27Z', context: { - ad: { - callback: '123ATXSfe', - }, ip: '13.57.97.131', page: { url: 'http://demo.mywebsite.com/purchase', @@ -662,9 +642,6 @@ export const data = [ eventId: '1616318632825_357', testEventCode: 'sample rudder test_event_code', context: { - ad: { - callback: '123ATXSfe', - }, page: { url: 'http://demo.mywebsite.com/purchase', referrer: 'http://demo.mywebsite.com', @@ -729,9 +706,6 @@ export const data = [ FORM: {}, JSON: { context: { - ad: { - callback: '123ATXSfe', - }, ip: '13.57.97.131', page: { referrer: 'http://demo.mywebsite.com', From 195b48ac0f438a200933e4bbb956fcc3941b7aed Mon Sep 17 00:00:00 2001 From: AASHISH MALIK Date: Fri, 10 Nov 2023 20:35:31 +0530 Subject: [PATCH 015/135] feat: move cdkV1 to cdkv2 component tests (#2804) * feat: move cdkV1 to cdkv2 component test --- src/cdk/v2/handler.ts | 10 +- .../data_scenarios/cdk_v2/failure.json | 3 +- .../destinations/algolia/processor/data.ts | 220 +- .../destinations/autopilot/processor/data.ts | 78 +- .../dcm_floodlight/processor/data.ts | 5003 +++++++++++++++++ .../dynamic_yield/processor/data.ts | 1041 ++++ .../destinations/eloqua/processor/data.ts | 460 ++ .../destinations/fullstory/processor/data.ts | 462 ++ .../destinations/heap/processor/data.ts | 84 +- .../destinations/kochava/processor/data.ts | 136 +- .../launchdarkly_audience/processor/data.ts | 611 ++ .../destinations/lytics/processor/data.ts | 117 +- .../destinations/new_relic/processor/data.ts | 882 +++ .../optimizely_fullstack/processor/data.ts | 37 +- .../destinations/ortto/processor/data.ts | 15 +- .../pinterest_tag/processor/data.ts | 24 +- .../destinations/userlist/processor/data.ts | 894 +++ .../destinations/vitally/processor/data.ts | 300 + test/integrations/destinations/zapier/data.ts | 50 +- 19 files changed, 10302 insertions(+), 125 deletions(-) create mode 100644 test/integrations/destinations/dcm_floodlight/processor/data.ts create mode 100644 test/integrations/destinations/dynamic_yield/processor/data.ts create mode 100644 test/integrations/destinations/eloqua/processor/data.ts create mode 100644 test/integrations/destinations/fullstory/processor/data.ts create mode 100644 test/integrations/destinations/launchdarkly_audience/processor/data.ts create mode 100644 test/integrations/destinations/new_relic/processor/data.ts create mode 100644 test/integrations/destinations/userlist/processor/data.ts create mode 100644 test/integrations/destinations/vitally/processor/data.ts diff --git a/src/cdk/v2/handler.ts b/src/cdk/v2/handler.ts index 4b3868b85b..3058d62e51 100644 --- a/src/cdk/v2/handler.ts +++ b/src/cdk/v2/handler.ts @@ -65,13 +65,9 @@ export function getCachedWorkflowEngine( } export async function executeWorkflow(workflowEngine: WorkflowEngine, parsedEvent: FixMe) { - try { - const result = await workflowEngine.execute(parsedEvent); - // TODO: Handle remaining output scenarios - return result.output; - } catch (error) { - throw getErrorInfo(error, isCdkV2Destination(parsedEvent), defTags); - } + const result = await workflowEngine.execute(parsedEvent); + // TODO: Handle remaining output scenarios + return result.output; } export async function processCdkV2Workflow( diff --git a/test/apitests/data_scenarios/cdk_v2/failure.json b/test/apitests/data_scenarios/cdk_v2/failure.json index f39d351b2d..1635a3f0db 100644 --- a/test/apitests/data_scenarios/cdk_v2/failure.json +++ b/test/apitests/data_scenarios/cdk_v2/failure.json @@ -646,7 +646,8 @@ "statusCode": 400, "error": "Action source must be one of app_android, app_ios, web, offline: Workflow: procWorkflow, Step: validateCommonFields, ChildStep: undefined, OriginalError: Action source must be one of app_android, app_ios, web, offline", "statTags": { - "errorCategory": "platform", + "errorCategory": "dataValidation", + "errorType": "instrumentation", "implementation": "cdkV2", "destType": "PINTEREST_TAG", "module": "destination", diff --git a/test/integrations/destinations/algolia/processor/data.ts b/test/integrations/destinations/algolia/processor/data.ts index f5c01e47e5..0cbdd8b31b 100644 --- a/test/integrations/destinations/algolia/processor/data.ts +++ b/test/integrations/destinations/algolia/processor/data.ts @@ -66,6 +66,13 @@ export const data = [ sentAt: '2019-10-14T09:03:22.563Z', }, destination: { + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + excludeKeys: [], + includeKeys: [], + }, + }, Config: { apiKey: 'dummyApiKey', applicationId: 'O2YARRI15I', @@ -77,6 +84,10 @@ export const data = [ ], }, }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, }, ], }, @@ -116,6 +127,10 @@ export const data = [ version: '1', }, statusCode: 200, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, }, ], }, @@ -197,7 +212,18 @@ export const data = [ }, sentAt: '2019-10-14T09:03:22.563Z', }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, destination: { + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + excludeKeys: [], + includeKeys: [], + }, + }, Config: { apiKey: 'dummyApiKey', applicationId: 'O2YARRI15I', @@ -250,6 +276,10 @@ export const data = [ version: '1', }, statusCode: 200, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, }, ], }, @@ -322,7 +352,18 @@ export const data = [ }, sentAt: '2019-10-14T09:03:22.563Z', }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, destination: { + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + excludeKeys: [], + includeKeys: [], + }, + }, Config: { apiKey: 'dummyApiKey', applicationId: 'O2YARRI15I', @@ -338,16 +379,23 @@ export const data = [ status: 200, body: [ { - error: 'Either filters or objectIds is required.', + error: + 'Either filters or objectIds is required.: Workflow: procWorkflow, Step: validateDestPayload, ChildStep: undefined, OriginalError: Either filters or objectIds is required.', statTags: { destType: 'ALGOLIA', errorCategory: 'dataValidation', errorType: 'instrumentation', feature: 'processor', - implementation: 'native', + implementation: 'cdkV2', module: 'destination', + destinationId: 'destId', + workspaceId: 'wspId', }, statusCode: 400, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, }, ], }, @@ -419,7 +467,18 @@ export const data = [ }, sentAt: '2019-10-14T09:03:22.563Z', }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, destination: { + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + excludeKeys: [], + includeKeys: [], + }, + }, Config: { apiKey: 'dummyApiKey', applicationId: 'O2YARRI15I', @@ -435,16 +494,23 @@ export const data = [ status: 200, body: [ { - error: 'eventType is mandatory for track call', + error: + 'eventType is mandatory for track call: Workflow: procWorkflow, Step: preparePayload, ChildStep: undefined, OriginalError: eventType is mandatory for track call', statTags: { destType: 'ALGOLIA', errorCategory: 'dataValidation', errorType: 'instrumentation', feature: 'processor', - implementation: 'native', + implementation: 'cdkV2', module: 'destination', + destinationId: 'destId', + workspaceId: 'wspId', }, statusCode: 400, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, }, ], }, @@ -526,7 +592,18 @@ export const data = [ }, sentAt: '2019-10-14T09:03:22.563Z', }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, destination: { + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + excludeKeys: [], + includeKeys: [], + }, + }, Config: { apiKey: 'dummyApiKey', applicationId: 'O2YARRI15I', @@ -548,16 +625,22 @@ export const data = [ body: [ { error: - 'for click eventType either both positions and queryId should be present or none', + 'for click eventType either both positions and queryId should be present or none: Workflow: procWorkflow, Step: validatePayloadForClickEvent, ChildStep: undefined, OriginalError: for click eventType either both positions and queryId should be present or none', statTags: { destType: 'ALGOLIA', errorCategory: 'dataValidation', errorType: 'instrumentation', feature: 'processor', - implementation: 'native', + implementation: 'cdkV2', module: 'destination', + destinationId: 'destId', + workspaceId: 'wspId', }, statusCode: 400, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, }, ], }, @@ -639,7 +722,18 @@ export const data = [ }, sentAt: '2019-10-14T09:03:22.563Z', }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, destination: { + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + excludeKeys: [], + includeKeys: [], + }, + }, Config: { apiKey: 'dummyApiKey', applicationId: 'O2YARRI15I', @@ -691,6 +785,10 @@ export const data = [ version: '1', }, statusCode: 200, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, }, ], }, @@ -772,7 +870,18 @@ export const data = [ }, sentAt: '2019-10-14T09:03:22.563Z', }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, destination: { + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + excludeKeys: [], + includeKeys: [], + }, + }, Config: { apiKey: 'dummyApiKey', applicationId: 'O2YARRI15I', @@ -794,16 +903,22 @@ export const data = [ body: [ { error: - 'for click eventType either both positions and queryId should be present or none', + 'for click eventType either both positions and queryId should be present or none: Workflow: procWorkflow, Step: validatePayloadForClickEvent, ChildStep: undefined, OriginalError: for click eventType either both positions and queryId should be present or none', statTags: { destType: 'ALGOLIA', errorCategory: 'dataValidation', errorType: 'instrumentation', feature: 'processor', - implementation: 'native', + implementation: 'cdkV2', module: 'destination', + destinationId: 'destId', + workspaceId: 'wspId', }, statusCode: 400, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, }, ], }, @@ -885,7 +1000,18 @@ export const data = [ }, sentAt: '2019-10-14T09:03:22.563Z', }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, destination: { + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + excludeKeys: [], + includeKeys: [], + }, + }, Config: { apiKey: 'dummyApiKey', applicationId: 'O2YARRI15I', @@ -906,16 +1032,23 @@ export const data = [ status: 200, body: [ { - error: 'eventType can be either click, view or conversion', + error: + 'eventType can be either click, view or conversion: Workflow: procWorkflow, Step: preparePayload, ChildStep: undefined, OriginalError: eventType can be either click, view or conversion', statTags: { destType: 'ALGOLIA', errorCategory: 'dataValidation', errorType: 'instrumentation', feature: 'processor', - implementation: 'native', + implementation: 'cdkV2', module: 'destination', + destinationId: 'destId', + workspaceId: 'wspId', }, statusCode: 400, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, }, ], }, @@ -997,7 +1130,18 @@ export const data = [ }, sentAt: '2019-10-14T09:03:22.563Z', }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, destination: { + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + excludeKeys: [], + includeKeys: [], + }, + }, Config: { apiKey: 'dummyApiKey', applicationId: 'O2YARRI15I', @@ -1012,16 +1156,23 @@ export const data = [ status: 200, body: [ { - error: 'eventType is mandatory for track call', + error: + 'eventType is mandatory for track call: Workflow: procWorkflow, Step: preparePayload, ChildStep: undefined, OriginalError: eventType is mandatory for track call', statTags: { destType: 'ALGOLIA', errorCategory: 'dataValidation', errorType: 'instrumentation', feature: 'processor', - implementation: 'native', + implementation: 'cdkV2', module: 'destination', + destinationId: 'destId', + workspaceId: 'wspId', }, statusCode: 400, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, }, ], }, @@ -1092,7 +1243,18 @@ export const data = [ }, sentAt: '2019-10-14T09:03:22.563Z', }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, destination: { + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + excludeKeys: [], + includeKeys: [], + }, + }, Config: { apiKey: 'dummyApiKey', applicationId: 'O2YARRI15I', @@ -1113,16 +1275,24 @@ export const data = [ status: 200, body: [ { - error: 'Missing required value from "properties.index"', + error: + 'Missing required value from "properties.index": Workflow: procWorkflow, Step: preparePayload, ChildStep: undefined, OriginalError: Missing required value from "properties.index"', statTags: { destType: 'ALGOLIA', errorCategory: 'dataValidation', errorType: 'instrumentation', feature: 'processor', - implementation: 'native', + implementation: 'cdkV2', module: 'destination', + + destinationId: 'destId', + workspaceId: 'wspId', }, statusCode: 400, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, }, ], }, @@ -1193,7 +1363,18 @@ export const data = [ }, sentAt: '2019-10-14T09:03:22.563Z', }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, destination: { + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + excludeKeys: [], + includeKeys: [], + }, + }, Config: { apiKey: 'dummyApiKey', applicationId: 'O2YARRI15I', @@ -1214,16 +1395,23 @@ export const data = [ status: 200, body: [ { - error: 'event name should be a string', + error: + 'event name should be a string: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: event name should be a string', statTags: { destType: 'ALGOLIA', errorCategory: 'dataValidation', errorType: 'instrumentation', feature: 'processor', - implementation: 'native', + implementation: 'cdkV2', module: 'destination', + destinationId: 'destId', + workspaceId: 'wspId', }, statusCode: 400, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, }, ], }, diff --git a/test/integrations/destinations/autopilot/processor/data.ts b/test/integrations/destinations/autopilot/processor/data.ts index 8ae3e28671..135e3e22f7 100644 --- a/test/integrations/destinations/autopilot/processor/data.ts +++ b/test/integrations/destinations/autopilot/processor/data.ts @@ -17,7 +17,7 @@ export const data = [ Name: 'AUTOPILOT', DisplayName: 'Autopilot', Config: { - cdkEnabled: true, + cdkV2Enabled: true, excludeKeys: [], includeKeys: [], }, @@ -85,6 +85,10 @@ export const data = [ type: 'identify', userId: 'user12345', }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, }, ], }, @@ -123,6 +127,10 @@ export const data = [ userId: 'ac7722c2-ccb6-4ae2-baf6-1effe861f4cd', }, statusCode: 200, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, }, ], }, @@ -146,7 +154,7 @@ export const data = [ Name: 'AUTOPILOT', DisplayName: 'Autopilot', Config: { - cdkEnabled: true, + cdkV2Enabled: true, excludeKeys: [], includeKeys: [], }, @@ -219,6 +227,10 @@ export const data = [ type: 'track', userId: 'user12345', }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, }, ], }, @@ -255,6 +267,10 @@ export const data = [ userId: 'ac7722c2-ccb6-4ae2-baf6-1effe861f4cd', }, statusCode: 200, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, }, ], }, @@ -278,7 +294,7 @@ export const data = [ Name: 'AUTOPILOT', DisplayName: 'Autopilot', Config: { - cdkEnabled: true, + cdkV2Enabled: true, excludeKeys: [], includeKeys: [], }, @@ -365,7 +381,8 @@ export const data = [ body: [ { statusCode: 400, - error: 'Bad event. Original error: message type "page" not supported for "autopilot"', + error: + 'message type page is not supported: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: message type page is not supported', metadata: { destinationId: 'destId', workspaceId: 'wspId', @@ -375,7 +392,7 @@ export const data = [ errorType: 'instrumentation', destType: 'AUTOPILOT', module: 'destination', - implementation: 'cdkV1', + implementation: 'cdkV2', feature: 'processor', destinationId: 'destId', workspaceId: 'wspId', @@ -403,7 +420,7 @@ export const data = [ Name: 'AUTOPILOT', DisplayName: 'Autopilot', Config: { - cdkEnabled: true, + cdkV2Enabled: true, excludeKeys: [], includeKeys: [], }, @@ -489,16 +506,18 @@ export const data = [ body: [ { statusCode: 400, - error: 'Unknown error occurred. Original error: Email is required for track calls', + error: + 'Email is required for track calls: Workflow: procWorkflow, Step: preparePayloadForTrack, ChildStep: undefined, OriginalError: Email is required for track calls', metadata: { destinationId: 'destId', workspaceId: 'wspId', }, statTags: { - errorCategory: 'transformation', + errorCategory: 'dataValidation', + errorType: 'instrumentation', destType: 'AUTOPILOT', module: 'destination', - implementation: 'cdkV1', + implementation: 'cdkV2', feature: 'processor', destinationId: 'destId', workspaceId: 'wspId', @@ -526,7 +545,7 @@ export const data = [ Name: 'AUTOPILOT', DisplayName: 'Autopilot', Config: { - cdkEnabled: true, + cdkV2Enabled: true, excludeKeys: [], includeKeys: [], }, @@ -612,16 +631,17 @@ export const data = [ { statusCode: 400, error: - 'Unknown error occurred. Original error: "type" is a required field and it must be a string', + 'message Type is not present. Aborting message.: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: message Type is not present. Aborting message.', metadata: { destinationId: 'destId', workspaceId: 'wspId', }, statTags: { - errorCategory: 'transformation', + errorCategory: 'dataValidation', + errorType: 'instrumentation', destType: 'AUTOPILOT', module: 'destination', - implementation: 'cdkV1', + implementation: 'cdkV2', destinationId: 'destId', workspaceId: 'wspId', feature: 'processor', @@ -649,7 +669,7 @@ export const data = [ Name: 'AUTOPILOT', DisplayName: 'Autopilot', Config: { - cdkEnabled: true, + cdkV2Enabled: true, excludeKeys: [], includeKeys: [], }, @@ -736,7 +756,8 @@ export const data = [ body: [ { statusCode: 400, - error: 'Bad event. Original error: message type "group" not supported for "autopilot"', + error: + 'message type group is not supported: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: message type group is not supported', metadata: { destinationId: 'destId', workspaceId: 'wspId', @@ -746,7 +767,7 @@ export const data = [ errorType: 'instrumentation', destType: 'AUTOPILOT', module: 'destination', - implementation: 'cdkV1', + implementation: 'cdkV2', destinationId: 'destId', workspaceId: 'wspId', feature: 'processor', @@ -774,7 +795,7 @@ export const data = [ Name: 'AUTOPILOT', DisplayName: 'Autopilot', Config: { - cdkEnabled: true, + cdkV2Enabled: true, excludeKeys: [], includeKeys: [], }, @@ -906,7 +927,7 @@ export const data = [ Name: 'AUTOPILOT', DisplayName: 'Autopilot', Config: { - cdkEnabled: true, + cdkV2Enabled: true, excludeKeys: [], includeKeys: [], }, @@ -993,16 +1014,17 @@ export const data = [ { statusCode: 400, error: - 'Unknown error occurred. Original error: "type" is a required field and it must be a string', + 'message Type is not present. Aborting message.: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: message Type is not present. Aborting message.', metadata: { destinationId: 'destId', workspaceId: 'wspId', }, statTags: { - errorCategory: 'transformation', + errorCategory: 'dataValidation', + errorType: 'instrumentation', destType: 'AUTOPILOT', module: 'destination', - implementation: 'cdkV1', + implementation: 'cdkV2', destinationId: 'destId', workspaceId: 'wspId', feature: 'processor', @@ -1030,7 +1052,7 @@ export const data = [ Name: 'AUTOPILOT', DisplayName: 'Autopilot', Config: { - cdkEnabled: true, + cdkV2Enabled: true, excludeKeys: [], includeKeys: [], }, @@ -1110,7 +1132,8 @@ export const data = [ body: [ { statusCode: 400, - error: 'Bad event. Original error: message type "group" not supported for "autopilot"', + error: + 'message type group is not supported: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: message type group is not supported', metadata: { destinationId: 'destId', workspaceId: 'wspId', @@ -1120,7 +1143,7 @@ export const data = [ errorType: 'instrumentation', destType: 'AUTOPILOT', module: 'destination', - implementation: 'cdkV1', + implementation: 'cdkV2', destinationId: 'destId', workspaceId: 'wspId', feature: 'processor', @@ -1148,7 +1171,7 @@ export const data = [ Name: 'AUTOPILOT', DisplayName: 'Autopilot', Config: { - cdkEnabled: true, + cdkV2Enabled: true, excludeKeys: [], includeKeys: [], }, @@ -1228,7 +1251,8 @@ export const data = [ body: [ { statusCode: 400, - error: 'Bad event. Original error: message type "Tals" not supported for "autopilot"', + error: + 'message type Tals is not supported: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: message type Tals is not supported', metadata: { destinationId: 'destId', workspaceId: 'wspId', @@ -1238,7 +1262,7 @@ export const data = [ errorType: 'instrumentation', destType: 'AUTOPILOT', module: 'destination', - implementation: 'cdkV1', + implementation: 'cdkV2', destinationId: 'destId', workspaceId: 'wspId', feature: 'processor', diff --git a/test/integrations/destinations/dcm_floodlight/processor/data.ts b/test/integrations/destinations/dcm_floodlight/processor/data.ts new file mode 100644 index 0000000000..e4b582a3f7 --- /dev/null +++ b/test/integrations/destinations/dcm_floodlight/processor/data.ts @@ -0,0 +1,5003 @@ +export const data = [ + { + name: 'dcm_floodlight', + description: 'Test 0', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + advertiserId: '22448662', + activityTag: '', + groupTag: '', + conversionEvents: [ + { + customVariables: [ + { + from: 'rudder1', + to: '1', + }, + { + from: 'rudder2', + to: '2', + }, + ], + eventName: 'Product viewed', + floodlightActivityTag: 'signu01', + floodlightGroupTag: 'conv01', + salesTag: false, + }, + { + customVariables: [ + { + from: '', + to: '', + }, + ], + eventName: 'Order Complete', + floodlightActivityTag: 'signu01', + floodlightGroupTag: 'conv02', + salesTag: false, + }, + ], + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + message: { + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + userId: '1234', + type: 'track', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'true', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + event: 'Product viewed', + properties: { + orderId: 111, + quantity: 2, + revenue: 800, + rudder1: 'rudder-v1', + rudder2: 'rudder-v2', + }, + integrations: { + All: true, + 'DCM Floodlight': { + COPPA: 'false', + GDPR: '1', + npa: true, + }, + }, + messageId: 'ea5cfab2-3961-4d8a-8187-3d1858c90a9f', + originalTimestamp: '2020-01-17T04:53:51.185Z', + receivedAt: '2020-01-17T10:23:52.688+05:30', + sentAt: '2020-01-17T04:53:52.667Z', + timestamp: '2020-01-17T10:23:51.206+05:30', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'GET', + endpoint: + 'https://ad.doubleclick.net/ddm/activity/src=22448662;cat=signu01;type=conv01;dc_rdid=T0T0T072-5e28-45a1-9eda-ce22a3e36d1a;ord=ea5cfab2-3961-4d8a-8187-3d1858c90a9f;dc_lat=1;tag_for_child_directed_treatment=0;tfua=1;npa=1;u1=rudder-v1;u2=rudder-v2', + headers: { + 'User-Agent': + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'dcm_floodlight', + description: 'Test 1', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + activityTag: '', + advertiserId: '12649566', + conversionEvents: [ + { + customVariables: [ + { + from: '', + to: '', + }, + ], + eventName: 'Sign up Completed', + floodlightActivityTag: 'signu0', + floodlightGroupTag: 'conv01', + salesTag: false, + }, + { + customVariables: [ + { + from: 'rudder1', + to: '1', + }, + { + from: 'akash2', + to: '2', + }, + ], + eventName: 'Order Complete', + floodlightActivityTag: 'order0', + floodlightGroupTag: 'conv000', + salesTag: false, + }, + { + customVariables: [ + { + from: '', + to: '', + }, + ], + eventName: 'Checkout Started', + floodlightActivityTag: 'check0', + floodlightGroupTag: 'conv00', + salesTag: true, + }, + ], + groupTag: '', + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + message: { + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + userId: '1234', + type: 'track', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'true', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + event: 'Sign up Completed', + properties: { + orderId: 111, + quantity: 2, + revenue: 800, + }, + integrations: { + All: true, + 'DCM Floodlight': { + COPPA: 'false', + GDPR: '1', + npa: true, + }, + }, + messageId: 'ea5cfab2-3961-4d8a-8187-3d1858c90a9f', + originalTimestamp: '2020-01-17T04:53:51.185Z', + receivedAt: '2020-01-17T10:23:52.688+05:30', + sentAt: '2020-01-17T04:53:52.667Z', + timestamp: '2020-01-17T10:23:51.206+05:30', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'GET', + endpoint: + 'https://ad.doubleclick.net/ddm/activity/src=12649566;cat=signu0;type=conv01;dc_rdid=T0T0T072-5e28-45a1-9eda-ce22a3e36d1a;ord=ea5cfab2-3961-4d8a-8187-3d1858c90a9f;dc_lat=1;tag_for_child_directed_treatment=0;tfua=1;npa=1', + headers: { + 'User-Agent': + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'dcm_floodlight', + description: 'Test 2', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + activityTag: '', + advertiserId: '12649566', + conversionEvents: [ + { + customVariables: [ + { + from: '', + to: '', + }, + ], + eventName: 'Sign up Completed', + floodlightActivityTag: 'signu0', + floodlightGroupTag: 'conv01', + salesTag: false, + }, + { + customVariables: [ + { + from: 'rudder1', + to: '1', + }, + { + from: 'akash2', + to: '2', + }, + ], + eventName: 'Order Complete', + floodlightActivityTag: 'order0', + floodlightGroupTag: 'conv000', + salesTag: false, + }, + { + customVariables: [ + { + from: '', + to: '', + }, + ], + eventName: 'Checkout Started', + floodlightActivityTag: 'check0', + floodlightGroupTag: 'conv00', + salesTag: true, + }, + ], + groupTag: '', + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + message: { + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + userId: '1234', + type: 'track', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'true', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + event: 'Order Complete', + properties: { + orderId: 111, + quantity: 2, + revenue: 800, + rudder1: 'rudder-v1', + akash2: 'akash-v2', + }, + integrations: { + All: true, + 'DCM Floodlight': { + COPPA: 'false', + GDPR: '1', + npa: true, + }, + }, + messageId: 'ea5cfab2-3961-4d8a-8187-3d1858c90a9f', + originalTimestamp: '2020-01-17T04:53:51.185Z', + receivedAt: '2020-01-17T10:23:52.688+05:30', + sentAt: '2020-01-17T04:53:52.667Z', + timestamp: '2020-01-17T10:23:51.206+05:30', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'GET', + endpoint: + 'https://ad.doubleclick.net/ddm/activity/src=12649566;cat=order0;type=conv000;dc_rdid=T0T0T072-5e28-45a1-9eda-ce22a3e36d1a;ord=ea5cfab2-3961-4d8a-8187-3d1858c90a9f;dc_lat=1;tag_for_child_directed_treatment=0;tfua=1;npa=1;u1=rudder-v1;u2=akash-v2', + headers: { + 'User-Agent': + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'dcm_floodlight', + description: 'Test 3', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + activityTag: '', + advertiserId: '12649566', + conversionEvents: [ + { + customVariables: [ + { + from: '', + to: '', + }, + ], + eventName: 'Sign up Completed', + floodlightActivityTag: 'signu0', + floodlightGroupTag: 'conv01', + salesTag: false, + }, + { + customVariables: [ + { + from: 'rudder1', + to: '1', + }, + { + from: 'akash2', + to: '2', + }, + ], + eventName: 'Order Complete', + floodlightActivityTag: 'order0', + floodlightGroupTag: 'conv000', + salesTag: false, + }, + { + customVariables: [ + { + from: '', + to: '', + }, + ], + eventName: 'Checkout Started', + floodlightActivityTag: 'check0', + floodlightGroupTag: 'conv00', + salesTag: true, + }, + ], + groupTag: '', + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + message: { + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + userId: '1234', + type: 'track', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'true', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + event: 'Checkout Started', + properties: { + orderId: 111, + quantity: 2, + revenue: 800, + }, + integrations: { + All: true, + 'DCM Floodlight': { + COPPA: 'false', + GDPR: '1', + npa: true, + }, + }, + messageId: 'ea5cfab2-3961-4d8a-8187-3d1858c90a9f', + originalTimestamp: '2020-01-17T04:53:51.185Z', + receivedAt: '2020-01-17T10:23:52.688+05:30', + sentAt: '2020-01-17T04:53:52.667Z', + timestamp: '2020-01-17T10:23:51.206+05:30', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'GET', + endpoint: + 'https://ad.doubleclick.net/ddm/activity/src=12649566;cat=check0;type=conv00;dc_rdid=T0T0T072-5e28-45a1-9eda-ce22a3e36d1a;ord=111;qty=2;cost=800;dc_lat=1;tag_for_child_directed_treatment=0;tfua=1;npa=1', + headers: { + 'User-Agent': + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'dcm_floodlight', + description: 'Test 4', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + activityTag: '', + advertiserId: '12649566', + conversionEvents: [ + { + customVariables: [ + { + from: '', + to: '', + }, + ], + eventName: 'Sign up Completed', + floodlightActivityTag: 'signu0', + floodlightGroupTag: 'conv01', + salesTag: false, + }, + { + customVariables: [ + { + from: 'rudder1', + to: '1', + }, + { + from: 'akash1', + to: '2', + }, + ], + eventName: 'Order Complete', + floodlightActivityTag: 'order0', + floodlightGroupTag: 'conv000', + salesTag: false, + }, + { + customVariables: [ + { + from: '', + to: '', + }, + ], + eventName: 'Checkout Started', + floodlightActivityTag: 'check0', + floodlightGroupTag: 'conv00', + salesTag: true, + }, + { + customVariables: [ + { + from: 'rudder2', + to: '1', + }, + { + from: 'akash2', + to: '2', + }, + { + from: 'friendlyName2', + to: '3', + }, + { + from: 'name2', + to: '4', + }, + ], + eventName: 'Purchase', + floodlightActivityTag: 'Pur0', + floodlightGroupTag: 'conv111', + salesTag: false, + }, + ], + groupTag: '', + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + message: { + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + userId: '1234', + type: 'track', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'true', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + event: 'Purchase', + properties: { + orderId: 111, + quantity: 999999, + revenue: 800, + products: [ + { + sku: '45790-32', + url: 'https://www.example.com/product/path', + name: 'Monopoly: 3rd Edition', + price: 19, + category: 'Games', + quantity: 1, + image_url: 'https:///www.example.com/product/path.jpg', + product_id: '507f1f77bcf86cd799439011', + }, + { + sku: '46493-32', + name: 'Uno Card Game', + price: 3, + category: 'Games', + quantity: 2, + product_id: '505bd76785ebb509fc183733', + }, + ], + rudder2: 'rudder2', + akash2: 'akash2', + friendlyName2: 'friendlyName2', + name2: 'name2', + }, + integrations: { + All: true, + 'DCM Floodlight': { + COPPA: 'false', + GDPR: '1', + npa: true, + }, + }, + messageId: 'ea5cfab2-3961-4d8a-8187-3d1858c90a9f', + originalTimestamp: '2020-01-17T04:53:51.185Z', + receivedAt: '2020-01-17T10:23:52.688+05:30', + sentAt: '2020-01-17T04:53:52.667Z', + timestamp: '2020-01-17T10:23:51.206+05:30', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'GET', + endpoint: + 'https://ad.doubleclick.net/ddm/activity/src=12649566;cat=Pur0;type=conv111;dc_rdid=T0T0T072-5e28-45a1-9eda-ce22a3e36d1a;ord=ea5cfab2-3961-4d8a-8187-3d1858c90a9f;dc_lat=1;tag_for_child_directed_treatment=0;tfua=1;npa=1;u1=rudder2;u2=akash2;u3=friendlyName2;u4=name2', + headers: { + 'User-Agent': + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'dcm_floodlight', + description: 'Test 5', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + activityTag: '', + advertiserId: '12649566', + conversionEvents: [ + { + customVariables: [ + { + from: '', + to: '', + }, + ], + eventName: 'Sign up Completed', + floodlightActivityTag: 'signu0', + floodlightGroupTag: 'conv01', + salesTag: false, + }, + { + customVariables: [ + { + from: 'rudder1', + to: '1', + }, + { + from: 'akash1', + to: '2', + }, + ], + eventName: 'Order Complete', + floodlightActivityTag: 'order0', + floodlightGroupTag: 'conv000', + salesTag: false, + }, + { + customVariables: [ + { + from: '', + to: '', + }, + ], + eventName: 'Checkout Started', + floodlightActivityTag: 'check0', + floodlightGroupTag: 'conv00', + salesTag: true, + }, + { + customVariables: [ + { + from: 'rudder2', + to: '1', + }, + { + from: 'akash2', + to: '2', + }, + { + from: 'friendlyName2', + to: '3', + }, + { + from: 'name2', + to: '4', + }, + ], + eventName: 'Purchase', + floodlightActivityTag: 'Pur0', + floodlightGroupTag: 'conv111', + salesTag: false, + }, + ], + groupTag: '', + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + message: { + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + userId: '1234', + type: 'track', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'true', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + event: 'Sign up Completed', + properties: { + orderId: 111, + quantity: 999999, + revenue: 800, + products: [ + { + sku: '45790-32', + url: 'https://www.example.com/product/path', + name: 'Monopoly: 3rd Edition', + price: 19, + category: 'Games', + quantity: 1, + image_url: 'https:///www.example.com/product/path.jpg', + product_id: '507f1f77bcf86cd799439011', + }, + { + sku: '46493-32', + name: 'Uno Card Game', + price: 3, + category: 'Games', + quantity: 2, + product_id: '505bd76785ebb509fc183733', + }, + ], + }, + integrations: { + All: true, + 'DCM Floodlight': { + COPPA: 'false', + GDPR: '1', + npa: true, + }, + }, + messageId: 'ea5cfab2-3961-4d8a-8187-3d1858c90a9f', + originalTimestamp: '2020-01-17T04:53:51.185Z', + receivedAt: '2020-01-17T10:23:52.688+05:30', + sentAt: '2020-01-17T04:53:52.667Z', + timestamp: '2020-01-17T10:23:51.206+05:30', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 400, + error: + 'advertisingId is required: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: advertisingId is required', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + implementation: 'cdkV2', + destType: 'DCM_FLOODLIGHT', + module: 'destination', + feature: 'processor', + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + }, + { + name: 'dcm_floodlight', + description: 'Test 6', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + activityTag: '', + advertiserId: '12649566', + conversionEvents: [ + { + customVariables: [ + { + to: '', + from: '', + }, + ], + eventName: 'Sign up Completed', + floodlightActivityTag: 'signu0', + floodlightGroupTag: 'conv01', + salesTag: false, + }, + { + customVariables: [ + { + from: 'rudder1', + to: '1', + }, + { + from: 'akash1', + to: '2', + }, + ], + eventName: 'Order Complete', + floodlightActivityTag: 'order0', + floodlightGroupTag: 'conv000', + salesTag: false, + }, + { + customVariables: [ + { + from: '', + to: '', + }, + ], + eventName: 'Checkout Started', + floodlightActivityTag: 'check0', + floodlightGroupTag: 'conv00', + salesTag: true, + }, + { + customVariables: [ + { + to: '1', + from: 'rudder2', + }, + { + to: '2', + from: 'akash2', + }, + { + to: '3', + from: 'friendlyName2', + }, + { + to: '4', + from: 'name2', + }, + ], + eventName: 'Purchase', + floodlightActivityTag: 'Pur0', + floodlightGroupTag: 'conv111', + salesTag: false, + }, + ], + groupTag: '', + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + message: { + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + userId: '1234', + type: 'track', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'true', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + }, + event: 'Sign up Completed', + properties: { + orderId: 111, + quantity: 999999, + revenue: 800, + products: [ + { + sku: '45790-32', + url: 'https://www.example.com/product/path', + name: 'Monopoly: 3rd Edition', + price: 19, + category: 'Games', + quantity: 1, + image_url: 'https:///www.example.com/product/path.jpg', + product_id: '507f1f77bcf86cd799439011', + }, + { + sku: '46493-32', + name: 'Uno Card Game', + price: 3, + category: 'Games', + quantity: 2, + product_id: '505bd76785ebb509fc183733', + }, + ], + }, + integrations: { + All: true, + 'DCM Floodlight': { + COPPA: 'false', + GDPR: '1', + npa: true, + }, + }, + messageId: 'ea5cfab2-3961-4d8a-8187-3d1858c90a9f', + originalTimestamp: '2020-01-17T04:53:51.185Z', + receivedAt: '2020-01-17T10:23:52.688+05:30', + sentAt: '2020-01-17T04:53:52.667Z', + timestamp: '2020-01-17T10:23:51.206+05:30', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 400, + error: + 'track:: userAgent is required: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: track:: userAgent is required', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + implementation: 'cdkV2', + destType: 'DCM_FLOODLIGHT', + module: 'destination', + feature: 'processor', + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + }, + { + name: 'dcm_floodlight', + description: 'Test 7', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + advertiserId: '12649566', + activityTag: 'check0', + groupTag: 'conv00', + conversionEvents: [ + { + customVariables: [ + { + to: '', + from: '', + }, + ], + eventName: 'Sign up Completed', + floodlightActivityTag: 'signu0', + floodlightGroupTag: 'conv01', + salesTag: false, + }, + { + customVariables: [ + { + to: '1', + from: 'rudder1', + }, + { + to: '2', + from: 'akash1', + }, + ], + eventName: 'Order Complete', + floodlightActivityTag: 'order0', + floodlightGroupTag: 'conv000', + salesTag: false, + }, + { + customVariables: [ + { + to: '1', + from: 'akash1', + }, + ], + eventName: 'Checkout Started', + floodlightActivityTag: '', + floodlightGroupTag: '', + salesTag: true, + }, + { + customVariables: [ + { + to: '1', + from: 'rudder2', + }, + { + to: '2', + from: 'akash2', + }, + { + to: '3', + from: 'friendlyName2', + }, + { + to: '4', + from: 'name2', + }, + ], + eventName: 'Purchase', + floodlightActivityTag: 'Pur0', + floodlightGroupTag: 'conv111', + salesTag: false, + }, + ], + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + message: { + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + userId: '1234', + type: 'track', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'true', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + event: 'Checkout Started', + properties: { + orderId: 111, + quantity: 999999, + revenue: 800, + products: [ + { + sku: '45790-32', + url: 'https://www.example.com/product/path', + name: 'Monopoly: 3rd Edition', + price: 19, + category: 'Games', + quantity: 1, + image_url: 'https:///www.example.com/product/path.jpg', + product_id: '507f1f77bcf86cd799439011', + }, + { + sku: '46493-32', + name: 'Uno Card Game', + price: 3, + category: 'Games', + quantity: 2, + product_id: '505bd76785ebb509fc183733', + }, + ], + akash1: 'akash-v1', + }, + integrations: { + All: true, + 'DCM Floodlight': { + COPPA: 'false', + GDPR: '1', + npa: true, + }, + }, + messageId: 'ea5cfab2-3961-4d8a-8187-3d1858c90a9f', + originalTimestamp: '2020-01-17T04:53:51.185Z', + receivedAt: '2020-01-17T10:23:52.688+05:30', + sentAt: '2020-01-17T04:53:52.667Z', + timestamp: '2020-01-17T10:23:51.206+05:30', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'GET', + endpoint: + 'https://ad.doubleclick.net/ddm/activity/src=12649566;cat=check0;type=conv00;dc_rdid=T0T0T072-5e28-45a1-9eda-ce22a3e36d1a;ord=111;qty=3;cost=800;dc_lat=1;tag_for_child_directed_treatment=0;tfua=1;npa=1;u1=akash-v1', + headers: { + 'User-Agent': + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'dcm_floodlight', + description: 'Test 8', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + advertiserId: '12649566', + activityTag: 'check0', + groupTag: 'conv00', + conversionEvents: [ + { + customVariables: [ + { + to: '', + from: '', + }, + ], + eventName: 'Sign up Completed', + floodlightActivityTag: 'signu0', + floodlightGroupTag: 'conv01', + salesTag: false, + }, + { + customVariables: [ + { + to: '1', + from: 'rudder1', + }, + { + to: '2', + from: 'akash1', + }, + ], + eventName: 'Order Complete', + floodlightActivityTag: 'order0', + floodlightGroupTag: 'conv000', + salesTag: false, + }, + { + eventName: 'Checkout Started', + floodlightActivityTag: '', + floodlightGroupTag: '', + salesTag: true, + }, + { + customVariables: [ + { + to: '1', + from: 'rudder2', + }, + { + to: '2', + from: 'akash2', + }, + { + to: '3', + from: 'friendlyName2', + }, + { + to: '4', + from: 'name2', + }, + ], + eventName: 'Purchase', + floodlightActivityTag: 'Pur0', + floodlightGroupTag: 'conv111', + salesTag: false, + }, + ], + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + message: { + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + userId: '1234', + type: 'track', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'true', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + event: 'Checkout Started', + properties: { + orderId: 111, + quantity: 999999, + revenue: 800, + products: [ + { + sku: '45790-32', + url: 'https://www.example.com/product/path', + name: 'Monopoly: 3rd Edition', + price: 19, + category: 'Games', + quantity: 1, + image_url: 'https:///www.example.com/product/path.jpg', + product_id: '507f1f77bcf86cd799439011', + }, + { + sku: '46493-32', + name: 'Uno Card Game', + price: 3, + category: 'Games', + quantity: 2, + product_id: '505bd76785ebb509fc183733', + }, + ], + }, + integrations: { + All: true, + 'DCM Floodlight': { + COPPA: 'false', + GDPR: '1', + npa: true, + }, + }, + messageId: 'ea5cfab2-3961-4d8a-8187-3d1858c90a9f', + originalTimestamp: '2020-01-17T04:53:51.185Z', + receivedAt: '2020-01-17T10:23:52.688+05:30', + sentAt: '2020-01-17T04:53:52.667Z', + timestamp: '2020-01-17T10:23:51.206+05:30', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'GET', + endpoint: + 'https://ad.doubleclick.net/ddm/activity/src=12649566;cat=check0;type=conv00;dc_rdid=T0T0T072-5e28-45a1-9eda-ce22a3e36d1a;ord=111;qty=3;cost=800;dc_lat=1;tag_for_child_directed_treatment=0;tfua=1;npa=1', + headers: { + 'User-Agent': + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'dcm_floodlight', + description: 'Test 9', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + advertiserId: '12649566', + activityTag: 'check0', + groupTag: 'conv00', + conversionEvents: [ + { + customVariables: [ + { + to: '', + from: '', + }, + ], + eventName: 'Sign up Completed', + floodlightActivityTag: 'signu0', + floodlightGroupTag: 'conv01', + salesTag: false, + }, + { + customVariables: [ + { + to: '1', + from: 'rudder1', + }, + { + to: '2', + from: 'akash1', + }, + ], + eventName: 'Order Complete', + floodlightActivityTag: 'order0', + floodlightGroupTag: 'conv000', + salesTag: false, + }, + { + eventName: 'Checkout Started', + floodlightActivityTag: '', + floodlightGroupTag: '', + salesTag: true, + }, + { + customVariables: [ + { + to: '1', + from: 'rudder2', + }, + { + to: '2', + from: 'akash2', + }, + { + to: '3', + from: 'friendlyName2', + }, + { + to: '4', + from: 'name2', + }, + ], + eventName: 'Purchase', + floodlightActivityTag: 'Pur0', + floodlightGroupTag: 'conv111', + salesTag: false, + }, + ], + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + message: { + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + userId: '1234', + type: 'track', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'true', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + event: 'Sample event', + properties: { + orderId: 111, + quantity: 999999, + revenue: 800, + products: [ + { + sku: '45790-32', + url: 'https://www.example.com/product/path', + name: 'Monopoly: 3rd Edition', + price: 19, + category: 'Games', + quantity: 1, + image_url: 'https:///www.example.com/product/path.jpg', + product_id: '507f1f77bcf86cd799439011', + }, + { + sku: '46493-32', + name: 'Uno Card Game', + price: 3, + category: 'Games', + quantity: 2, + product_id: '505bd76785ebb509fc183733', + }, + ], + }, + integrations: { + All: true, + 'DCM Floodlight': { + COPPA: 'false', + GDPR: '1', + npa: true, + }, + }, + messageId: 'ea5cfab2-3961-4d8a-8187-3d1858c90a9f', + originalTimestamp: '2020-01-17T04:53:51.185Z', + receivedAt: '2020-01-17T10:23:52.688+05:30', + sentAt: '2020-01-17T04:53:52.667Z', + timestamp: '2020-01-17T10:23:51.206+05:30', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 400, + error: + 'track:: Conversion event not found: Workflow: procWorkflow, Step: handleConversionEvents, ChildStep: undefined, OriginalError: track:: Conversion event not found', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + implementation: 'cdkV2', + destType: 'DCM_FLOODLIGHT', + module: 'destination', + feature: 'processor', + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + }, + { + name: 'dcm_floodlight', + description: 'Test 10', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + advertiserId: '12649566', + activityTag: 'check0', + groupTag: 'conv00', + conversionEvents: [ + { + customVariables: [ + { + to: '', + from: '', + }, + ], + eventName: 'Sign up Completed', + floodlightActivityTag: 'signu0', + floodlightGroupTag: 'conv01', + salesTag: false, + }, + { + customVariables: [ + { + to: '1', + from: 'rudder1', + }, + { + to: '2', + from: 'akash1', + }, + ], + eventName: 'Order Complete', + floodlightActivityTag: 'order0', + floodlightGroupTag: 'conv000', + salesTag: false, + }, + { + eventName: 'Checkout Started', + floodlightActivityTag: '', + floodlightGroupTag: '', + salesTag: true, + }, + { + customVariables: [ + { + to: '1', + from: 'rudder2', + }, + { + to: '2', + from: 'akash2', + }, + { + to: '3', + from: 'friendlyName2', + }, + { + to: '4', + from: 'name2', + }, + ], + eventName: 'Purchase', + floodlightActivityTag: 'Pur0', + floodlightGroupTag: 'conv111', + salesTag: false, + }, + ], + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + message: { + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + userId: '1234', + type: 'track', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'true', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + event: 'Checkout Started', + properties: { + orderId: 111, + quantity: 999999, + revenue: 800, + products: [ + { + sku: '45790-32', + url: 'https://www.example.com/product/path', + name: 'Monopoly: 3rd Edition', + price: 19, + category: 'Games', + quantity: 1, + image_url: 'https:///www.example.com/product/path.jpg', + product_id: '507f1f77bcf86cd799439011', + }, + ], + }, + integrations: { + All: true, + 'DCM Floodlight': { + COPPA: 'false', + GDPR: '1', + npa: true, + }, + }, + messageId: 'ea5cfab2-3961-4d8a-8187-3d1858c90a9f', + originalTimestamp: '2020-01-17T04:53:51.185Z', + receivedAt: '2020-01-17T10:23:52.688+05:30', + sentAt: '2020-01-17T04:53:52.667Z', + timestamp: '2020-01-17T10:23:51.206+05:30', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'GET', + endpoint: + 'https://ad.doubleclick.net/ddm/activity/src=12649566;cat=check0;type=conv00;dc_rdid=T0T0T072-5e28-45a1-9eda-ce22a3e36d1a;ord=111;qty=1;cost=800;dc_lat=1;tag_for_child_directed_treatment=0;tfua=1;npa=1', + headers: { + 'User-Agent': + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'dcm_floodlight', + description: 'Test 11', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + advertiserId: '12649566', + activityTag: 'check0', + groupTag: 'conv00', + conversionEvents: [ + { + customVariables: [ + { + to: '', + from: '', + }, + ], + eventName: 'Sign up Completed', + floodlightActivityTag: 'signu0', + floodlightGroupTag: 'conv01', + salesTag: false, + }, + { + customVariables: [ + { + to: '1', + from: 'rudder1', + }, + { + to: '2', + from: 'akash1', + }, + ], + eventName: 'Order Complete', + floodlightActivityTag: 'order0', + floodlightGroupTag: 'conv000', + salesTag: false, + }, + { + eventName: 'Checkout Started', + floodlightActivityTag: '', + floodlightGroupTag: '', + salesTag: true, + }, + { + customVariables: [ + { + to: '1', + from: 'rudder2', + }, + { + to: '2', + from: 'akash2', + }, + { + to: '3', + from: 'friendlyName2', + }, + { + to: '4', + from: 'name2', + }, + ], + eventName: 'Purchase', + floodlightActivityTag: 'Pur0', + floodlightGroupTag: 'conv111', + salesTag: false, + }, + ], + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + message: { + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + userId: '1234', + type: 'track', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'true', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + event: 'Checkout Started', + properties: { + orderId: 111, + revenue: 800, + products: [ + { + sku: '45790-32', + url: 'https://www.example.com/product/path', + name: 'Monopoly: 3rd Edition', + price: 19, + category: 'Games', + quantity: 4, + image_url: 'https:///www.example.com/product/path.jpg', + product_id: '507f1f77bcf86cd799439011', + }, + { + sku: '46493-32', + name: 'Uno Card Game', + price: 3, + category: 'Games', + quantity: 2, + product_id: '505bd76785ebb509fc183733', + }, + ], + }, + integrations: { + All: true, + 'DCM Floodlight': { + COPPA: 'false', + GDPR: '1', + npa: true, + }, + }, + messageId: 'ea5cfab2-3961-4d8a-8187-3d1858c90a9f', + originalTimestamp: '2020-01-17T04:53:51.185Z', + receivedAt: '2020-01-17T10:23:52.688+05:30', + sentAt: '2020-01-17T04:53:52.667Z', + timestamp: '2020-01-17T10:23:51.206+05:30', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'GET', + endpoint: + 'https://ad.doubleclick.net/ddm/activity/src=12649566;cat=check0;type=conv00;dc_rdid=T0T0T072-5e28-45a1-9eda-ce22a3e36d1a;ord=111;qty=6;cost=800;dc_lat=1;tag_for_child_directed_treatment=0;tfua=1;npa=1', + headers: { + 'User-Agent': + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'dcm_floodlight', + description: 'Test 12', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + advertiserId: '12649566', + activityTag: 'check0', + groupTag: 'conv00', + conversionEvents: [ + { + customVariables: [ + { + to: '', + from: '', + }, + ], + eventName: 'Sign up Completed', + floodlightActivityTag: 'signu0', + floodlightGroupTag: 'conv01', + salesTag: false, + }, + { + customVariables: [ + { + to: '1', + from: 'rudder1', + }, + { + to: '2', + from: 'akash1', + }, + ], + eventName: 'Order Complete', + floodlightActivityTag: 'order0', + floodlightGroupTag: 'conv000', + salesTag: false, + }, + { + eventName: 'Checkout Started', + floodlightActivityTag: '', + floodlightGroupTag: '', + salesTag: true, + }, + { + customVariables: [ + { + to: '1', + from: 'rudder2', + }, + { + to: '2', + from: 'akash2', + }, + { + to: '3', + from: 'friendlyName2', + }, + { + to: '4', + from: 'name2', + }, + ], + eventName: 'Purchase', + floodlightActivityTag: 'Pur0', + floodlightGroupTag: 'conv111', + salesTag: false, + }, + ], + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + message: { + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + userId: '1234', + type: 'track', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'true', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + event: 'Checkout Started', + properties: { + orderId: 111, + quantity: 999999, + revenue: 800, + }, + integrations: { + All: true, + 'DCM Floodlight': { + COPPA: 'false', + GDPR: '1', + npa: true, + }, + }, + messageId: 'ea5cfab2-3961-4d8a-8187-3d1858c90a9f', + originalTimestamp: '2020-01-17T04:53:51.185Z', + receivedAt: '2020-01-17T10:23:52.688+05:30', + sentAt: '2020-01-17T04:53:52.667Z', + timestamp: '2020-01-17T10:23:51.206+05:30', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'GET', + endpoint: + 'https://ad.doubleclick.net/ddm/activity/src=12649566;cat=check0;type=conv00;dc_rdid=T0T0T072-5e28-45a1-9eda-ce22a3e36d1a;ord=111;qty=999999;cost=800;dc_lat=1;tag_for_child_directed_treatment=0;tfua=1;npa=1', + headers: { + 'User-Agent': + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'dcm_floodlight', + description: 'Test 13', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + advertiserId: '12649566', + activityTag: 'check0', + groupTag: 'conv00', + conversionEvents: [ + { + customVariables: [ + { + to: '', + from: '', + }, + ], + eventName: 'Sign up Completed', + floodlightActivityTag: 'signu0', + floodlightGroupTag: 'conv01', + salesTag: false, + }, + { + customVariables: [ + { + to: '1', + from: 'rudder1', + }, + { + to: '2', + from: 'akash1', + }, + ], + eventName: 'Order Complete', + floodlightActivityTag: 'order0', + floodlightGroupTag: 'conv000', + salesTag: false, + }, + { + eventName: 'Checkout Started', + floodlightActivityTag: '', + floodlightGroupTag: '', + salesTag: true, + }, + { + customVariables: [ + { + to: '1', + from: 'rudder2', + }, + { + to: '2', + from: 'akash2', + }, + { + to: '3', + from: 'friendlyName2', + }, + { + to: '4', + from: 'name2', + }, + ], + eventName: 'Purchase', + floodlightActivityTag: 'Pur0', + floodlightGroupTag: 'conv111', + salesTag: false, + }, + ], + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + message: { + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + userId: '1234', + type: 'track', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'true', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + event: 'OrDeR complete', + properties: { + orderId: 111, + quantity: 999999, + revenue: 800, + rudder1: 'rudder-v1', + akash1: 'akash-v1', + }, + integrations: { + All: true, + 'DCM Floodlight': { + COPPA: 'false', + GDPR: '1', + npa: true, + }, + }, + messageId: 'ea5cfab2-3961-4d8a-8187-3d1858c90a9f', + originalTimestamp: '2020-01-17T04:53:51.185Z', + receivedAt: '2020-01-17T10:23:52.688+05:30', + sentAt: '2020-01-17T04:53:52.667Z', + timestamp: '2020-01-17T10:23:51.206+05:30', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'GET', + endpoint: + 'https://ad.doubleclick.net/ddm/activity/src=12649566;cat=order0;type=conv000;dc_rdid=T0T0T072-5e28-45a1-9eda-ce22a3e36d1a;ord=ea5cfab2-3961-4d8a-8187-3d1858c90a9f;dc_lat=1;tag_for_child_directed_treatment=0;tfua=1;npa=1;u1=rudder-v1;u2=akash-v1', + headers: { + 'User-Agent': + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'dcm_floodlight', + description: 'Test 14', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + advertiserId: '12649566', + activityTag: 'check0', + groupTag: 'conv00', + conversionEvents: [ + { + customVariables: [ + { + to: '', + from: '', + }, + ], + eventName: 'Sign up Completed', + floodlightActivityTag: 'signu0', + floodlightGroupTag: 'conv01', + salesTag: false, + }, + { + customVariables: [ + { + to: '1', + from: 'rudder1', + }, + { + to: '2', + from: 'akash1', + }, + ], + eventName: 'Order Complete', + floodlightActivityTag: 'order0', + floodlightGroupTag: 'conv000', + salesTag: false, + }, + { + eventName: 'Checkout Started', + floodlightActivityTag: '', + floodlightGroupTag: '', + salesTag: true, + }, + { + customVariables: [ + { + to: '1', + from: 'rudder2', + }, + { + to: '2', + from: 'akash2', + }, + { + to: '3', + from: 'friendlyName2', + }, + { + to: '4', + from: 'name2', + }, + ], + eventName: 'Purchase', + floodlightActivityTag: 'Pur0', + floodlightGroupTag: 'conv111', + salesTag: false, + }, + ], + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + message: { + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + userId: '1234', + type: 'track', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'true', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + event: 'Order complete', + properties: { + orderId: 111, + quantity: 999999, + revenue: 800, + rudder1: 'rudder-v1', + akash1: 'akash-v1', + }, + integrations: { + All: true, + 'DCM Floodlight': {}, + }, + messageId: 'ea5cfab2-3961-4d8a-8187-3d1858c90a9f', + originalTimestamp: '2020-01-17T04:53:51.185Z', + receivedAt: '2020-01-17T10:23:52.688+05:30', + sentAt: '2020-01-17T04:53:52.667Z', + timestamp: '2020-01-17T10:23:51.206+05:30', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'GET', + endpoint: + 'https://ad.doubleclick.net/ddm/activity/src=12649566;cat=order0;type=conv000;dc_rdid=T0T0T072-5e28-45a1-9eda-ce22a3e36d1a;ord=ea5cfab2-3961-4d8a-8187-3d1858c90a9f;dc_lat=1;u1=rudder-v1;u2=akash-v1', + headers: { + 'User-Agent': + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'dcm_floodlight', + description: 'Test 15', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + advertiserId: '12649566', + activityTag: 'check0', + groupTag: 'conv00', + conversionEvents: [ + { + customVariables: [ + { + to: '', + from: '', + }, + ], + eventName: 'Sign up Completed', + floodlightActivityTag: 'signu0', + floodlightGroupTag: 'conv01', + salesTag: false, + }, + { + customVariables: [ + { + to: '1', + from: 'rudder1', + }, + { + to: '2', + from: 'akash1', + }, + ], + eventName: 'Order Complete', + floodlightActivityTag: 'order0', + floodlightGroupTag: 'conv000', + salesTag: false, + }, + { + eventName: 'Checkout Started', + floodlightActivityTag: '', + floodlightGroupTag: '', + salesTag: true, + }, + { + customVariables: [ + { + to: '1', + from: 'rudder2', + }, + { + to: '2', + from: 'akash2', + }, + { + to: '3', + from: 'friendlyName2', + }, + { + to: '4', + from: 'name2', + }, + ], + eventName: 'Purchase', + floodlightActivityTag: 'Pur0', + floodlightGroupTag: 'conv111', + salesTag: false, + }, + ], + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + message: { + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + userId: '1234', + type: 'track', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'true', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + event: 'Order complete', + properties: { + orderId: 111, + quantity: 999999, + revenue: 800, + rudder1: 100, + akash1: 5987, + }, + messageId: 'ea5cfab2-3961-4d8a-8187-3d1858c90a9f', + originalTimestamp: '2020-01-17T04:53:51.185Z', + receivedAt: '2020-01-17T10:23:52.688+05:30', + sentAt: '2020-01-17T04:53:52.667Z', + timestamp: '2020-01-17T10:23:51.206+05:30', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'GET', + endpoint: + 'https://ad.doubleclick.net/ddm/activity/src=12649566;cat=order0;type=conv000;dc_rdid=T0T0T072-5e28-45a1-9eda-ce22a3e36d1a;ord=ea5cfab2-3961-4d8a-8187-3d1858c90a9f;dc_lat=1;u1=100;u2=5987', + headers: { + 'User-Agent': + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'dcm_floodlight', + description: 'Test 16', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + advertiserId: '12649566', + activityTag: 'check0', + groupTag: 'conv00', + conversionEvents: [ + { + customVariables: [ + { + to: '', + from: '', + }, + ], + eventName: 'Sign up Completed', + floodlightActivityTag: 'signu0', + floodlightGroupTag: 'conv01', + salesTag: false, + }, + { + customVariables: [ + { + to: '1', + from: 'rudder1', + }, + { + to: '2', + from: 'akash1', + }, + ], + eventName: 'Order Complete', + floodlightActivityTag: 'order0', + floodlightGroupTag: 'conv000', + salesTag: false, + }, + { + eventName: 'Checkout Started', + floodlightActivityTag: '', + floodlightGroupTag: '', + salesTag: true, + }, + { + customVariables: [ + { + to: '1', + from: 'rudder2', + }, + { + to: '2', + from: 'akash2', + }, + { + to: '3', + from: 'friendlyName2', + }, + { + to: '4', + from: 'name2', + }, + ], + eventName: 'Purchase', + floodlightActivityTag: 'Pur0', + floodlightGroupTag: 'conv111', + salesTag: false, + }, + ], + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + message: { + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + userId: '1234', + type: 'track', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: true, + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + event: 'Order complete', + properties: { + orderId: 111, + quantity: 999999, + revenue: 800, + rudder1: 'rudder-v1', + akash1: 'akash-v1', + }, + integrations: { + All: true, + 'DCM Floodlight': { + COPPA: 1, + GDPR: 1, + npa: true, + }, + }, + messageId: 'ea5cfab2-3961-4d8a-8187-3d1858c90a9f', + originalTimestamp: '2020-01-17T04:53:51.185Z', + receivedAt: '2020-01-17T10:23:52.688+05:30', + sentAt: '2020-01-17T04:53:52.667Z', + timestamp: '2020-01-17T10:23:51.206+05:30', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'GET', + endpoint: + 'https://ad.doubleclick.net/ddm/activity/src=12649566;cat=order0;type=conv000;dc_rdid=T0T0T072-5e28-45a1-9eda-ce22a3e36d1a;ord=ea5cfab2-3961-4d8a-8187-3d1858c90a9f;dc_lat=1;tag_for_child_directed_treatment=1;tfua=1;npa=1;u1=rudder-v1;u2=akash-v1', + headers: { + 'User-Agent': + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'dcm_floodlight', + description: 'Test 17', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + advertiserId: '12649566', + activityTag: 'check0', + groupTag: 'conv00', + conversionEvents: [ + { + customVariables: [ + { + to: '', + from: '', + }, + ], + eventName: 'Sign up Completed', + floodlightActivityTag: 'signu0', + floodlightGroupTag: 'conv01', + salesTag: false, + }, + { + customVariables: [ + { + to: '1', + from: 'rudder1', + }, + { + to: '2', + from: 'akash1', + }, + ], + eventName: 'Order Complete', + floodlightActivityTag: 'order0', + floodlightGroupTag: 'conv000', + salesTag: false, + }, + { + eventName: 'Checkout Started', + floodlightActivityTag: '', + floodlightGroupTag: '', + salesTag: true, + }, + { + customVariables: [ + { + to: '1', + from: 'rudder2', + }, + { + to: '2', + from: 'akash2', + }, + { + to: '3', + from: 'friendlyName2', + }, + { + to: '4', + from: 'name2', + }, + ], + eventName: 'Purchase', + floodlightActivityTag: 'Pur0', + floodlightGroupTag: 'conv111', + salesTag: false, + }, + ], + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + message: { + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + userId: '1234', + type: 'track', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: true, + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + event: 'Order complete', + properties: { + orderId: 111, + quantity: 999999, + revenue: 800, + }, + integrations: { + All: true, + 'DCM Floodlight': { + COPPA: 'Yes', + GDPR: '1', + npa: true, + }, + }, + messageId: 'ea5cfab2-3961-4d8a-8187-3d1858c90a9f', + originalTimestamp: '2020-01-17T04:53:51.185Z', + receivedAt: '2020-01-17T10:23:52.688+05:30', + sentAt: '2020-01-17T04:53:52.667Z', + timestamp: '2020-01-17T10:23:51.206+05:30', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 400, + error: + 'COPPA: valid parameters are [1|true] or [0|false]: Workflow: procWorkflow, Step: handleIntegrationsObject, ChildStep: undefined, OriginalError: COPPA: valid parameters are [1|true] or [0|false]', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + implementation: 'cdkV2', + destType: 'DCM_FLOODLIGHT', + module: 'destination', + feature: 'processor', + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + }, + { + name: 'dcm_floodlight', + description: 'Test 18', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + advertiserId: '12649566', + activityTag: 'check0', + groupTag: 'conv00', + conversionEvents: [ + { + customVariables: [ + { + to: '', + from: '', + }, + ], + eventName: 'Sign up Completed', + floodlightActivityTag: 'signu0', + floodlightGroupTag: 'conv01', + salesTag: false, + }, + { + customVariables: [ + { + to: '1', + from: 'rudder1', + }, + { + to: '2', + from: 'akash1', + }, + ], + eventName: 'Order Complete', + floodlightActivityTag: 'order0', + floodlightGroupTag: 'conv000', + salesTag: false, + }, + { + eventName: 'Checkout Started', + floodlightActivityTag: '', + floodlightGroupTag: '', + salesTag: true, + }, + { + customVariables: [ + { + to: '1', + from: 'rudder2', + }, + { + to: '2', + from: 'akash2', + }, + { + to: '3', + from: 'friendlyName2', + }, + { + to: '4', + from: 'name2', + }, + ], + eventName: 'Purchase', + floodlightActivityTag: 'Pur0', + floodlightGroupTag: 'conv111', + salesTag: false, + }, + ], + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + message: { + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + userId: '1234', + type: 'track', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: true, + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + event: 'Order complete', + properties: { + orderId: 111, + quantity: 999999, + revenue: 800, + }, + integrations: { + All: true, + 'DCM Floodlight': { + COPPA: 'false', + GDPR: 'Yes', + npa: true, + }, + }, + messageId: 'ea5cfab2-3961-4d8a-8187-3d1858c90a9f', + originalTimestamp: '2020-01-17T04:53:51.185Z', + receivedAt: '2020-01-17T10:23:52.688+05:30', + sentAt: '2020-01-17T04:53:52.667Z', + timestamp: '2020-01-17T10:23:51.206+05:30', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 400, + error: + 'GDPR: valid parameters are [1|true] or [0|false]: Workflow: procWorkflow, Step: handleIntegrationsObject, ChildStep: undefined, OriginalError: GDPR: valid parameters are [1|true] or [0|false]', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + implementation: 'cdkV2', + destType: 'DCM_FLOODLIGHT', + module: 'destination', + feature: 'processor', + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + }, + { + name: 'dcm_floodlight', + description: 'Test 19', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + advertiserId: '12649566', + activityTag: 'check0', + groupTag: 'conv00', + conversionEvents: [ + { + customVariables: [ + { + to: '', + from: '', + }, + ], + eventName: 'Sign up Completed', + floodlightActivityTag: 'signu0', + floodlightGroupTag: 'conv01', + salesTag: false, + }, + { + customVariables: [ + { + to: '1', + from: 'rudder1', + }, + { + to: '2', + from: 'akash1', + }, + ], + eventName: 'Order Complete', + floodlightActivityTag: 'order0', + floodlightGroupTag: 'conv000', + salesTag: false, + }, + { + eventName: 'Checkout Started', + floodlightActivityTag: '', + floodlightGroupTag: '', + salesTag: true, + }, + { + customVariables: [ + { + to: '1', + from: 'rudder2', + }, + { + to: '2', + from: 'akash2', + }, + { + to: '3', + from: 'friendlyName2', + }, + { + to: '4', + from: 'name2', + }, + ], + eventName: 'Purchase', + floodlightActivityTag: 'Pur0', + floodlightGroupTag: 'conv111', + salesTag: false, + }, + ], + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + message: { + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + userId: '1234', + type: 'track', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: true, + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + event: 'Order complete', + properties: { + orderId: 111, + quantity: 999999, + revenue: 800, + }, + integrations: { + All: true, + 'DCM Floodlight': { + COPPA: 'false', + GDPR: '1', + npa: 'No', + }, + }, + messageId: 'ea5cfab2-3961-4d8a-8187-3d1858c90a9f', + originalTimestamp: '2020-01-17T04:53:51.185Z', + receivedAt: '2020-01-17T10:23:52.688+05:30', + sentAt: '2020-01-17T04:53:52.667Z', + timestamp: '2020-01-17T10:23:51.206+05:30', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 400, + error: + 'npa: valid parameters are [1|true] or [0|false]: Workflow: procWorkflow, Step: handleIntegrationsObject, ChildStep: undefined, OriginalError: npa: valid parameters are [1|true] or [0|false]', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + implementation: 'cdkV2', + destType: 'DCM_FLOODLIGHT', + module: 'destination', + feature: 'processor', + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + }, + { + name: 'dcm_floodlight', + description: 'Test 20', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + advertiserId: '12649566', + activityTag: 'check0', + groupTag: 'conv00', + conversionEvents: [ + { + customVariables: [ + { + to: '', + from: '', + }, + ], + eventName: 'Sign up Completed', + floodlightActivityTag: 'signu0', + floodlightGroupTag: 'conv01', + salesTag: false, + }, + { + customVariables: [ + { + to: '1', + from: 'rudder1', + }, + { + to: '2', + from: 'akash1', + }, + ], + eventName: 'Order Complete', + floodlightActivityTag: 'order0', + floodlightGroupTag: 'conv000', + salesTag: false, + }, + { + eventName: 'Checkout Started', + floodlightActivityTag: '', + floodlightGroupTag: '', + salesTag: true, + }, + { + customVariables: [ + { + to: '1', + from: 'rudder2', + }, + { + to: '2', + from: 'akash2', + }, + { + to: '3', + from: 'friendlyName2', + }, + { + to: '4', + from: 'name2', + }, + ], + eventName: 'Purchase', + floodlightActivityTag: 'Pur0', + floodlightGroupTag: 'conv111', + salesTag: false, + }, + ], + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + message: { + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + userId: '1234', + type: 'track', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'Yes', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + event: 'Order complete', + properties: { + orderId: 111, + quantity: 999999, + revenue: 800, + }, + integrations: { + All: true, + 'DCM Floodlight': { + COPPA: 'false', + GDPR: '1', + npa: 'true', + }, + }, + messageId: 'ea5cfab2-3961-4d8a-8187-3d1858c90a9f', + originalTimestamp: '2020-01-17T04:53:51.185Z', + receivedAt: '2020-01-17T10:23:52.688+05:30', + sentAt: '2020-01-17T04:53:52.667Z', + timestamp: '2020-01-17T10:23:51.206+05:30', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 400, + error: + 'dc_lat: valid parameters are [1|true] or [0|false]: Workflow: procWorkflow, Step: cleanPayload, ChildStep: undefined, OriginalError: dc_lat: valid parameters are [1|true] or [0|false]', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + implementation: 'cdkV2', + destType: 'DCM_FLOODLIGHT', + module: 'destination', + feature: 'processor', + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + }, + { + name: 'dcm_floodlight', + description: 'Test 21', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + advertiserId: '12649566', + activityTag: 'check0', + groupTag: 'conv00', + conversionEvents: [ + { + customVariables: [ + { + to: '', + from: '', + }, + ], + eventName: 'Sign up Completed', + floodlightActivityTag: 'signu0', + floodlightGroupTag: 'conv01', + salesTag: false, + }, + { + customVariables: [ + { + to: '1', + from: 'rudder1', + }, + { + to: '2', + from: 'akash1', + }, + ], + eventName: 'Order Complete', + floodlightActivityTag: 'order0', + floodlightGroupTag: 'conv000', + salesTag: false, + }, + { + eventName: 'Checkout Started', + floodlightActivityTag: '', + floodlightGroupTag: '', + salesTag: true, + }, + { + customVariables: [ + { + to: '1', + from: 'rudder2', + }, + { + to: '2', + from: 'akash2', + }, + { + to: '3', + from: 'friendlyName2', + }, + { + to: '4', + from: 'name2', + }, + ], + eventName: 'Purchase', + floodlightActivityTag: 'Pur0', + floodlightGroupTag: 'conv111', + salesTag: false, + }, + ], + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + message: { + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + userId: '1234', + type: 'page', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'Yes', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + properties: { + orderId: 111, + quantity: 999999, + revenue: 800, + }, + integrations: { + All: true, + 'DCM Floodlight': { + COPPA: 'false', + GDPR: '1', + npa: 'true', + }, + }, + messageId: 'ea5cfab2-3961-4d8a-8187-3d1858c90a9f', + originalTimestamp: '2020-01-17T04:53:51.185Z', + receivedAt: '2020-01-17T10:23:52.688+05:30', + sentAt: '2020-01-17T04:53:52.667Z', + timestamp: '2020-01-17T10:23:51.206+05:30', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 400, + error: + 'page:: Conversion event not found: Workflow: procWorkflow, Step: handleConversionEvents, ChildStep: undefined, OriginalError: page:: Conversion event not found', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + implementation: 'cdkV2', + destType: 'DCM_FLOODLIGHT', + module: 'destination', + feature: 'processor', + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + }, + { + name: 'dcm_floodlight', + description: 'Test 22', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + advertiserId: '12649566', + activityTag: 'check0', + groupTag: 'conv00', + conversionEvents: [ + { + customVariables: [ + { + to: '', + from: '', + }, + ], + eventName: 'Viewed Sign up Completed Page', + floodlightActivityTag: 'signu0', + floodlightGroupTag: 'conv01', + salesTag: false, + }, + { + customVariables: [ + { + to: '1', + from: 'rudder1', + }, + { + to: '2', + from: 'akash1', + }, + ], + eventName: 'Order Complete', + floodlightActivityTag: 'order0', + floodlightGroupTag: 'conv000', + salesTag: false, + }, + { + eventName: 'Checkout Started', + floodlightActivityTag: '', + floodlightGroupTag: '', + salesTag: true, + }, + { + customVariables: [ + { + to: '1', + from: 'rudder2', + }, + { + to: '2', + from: 'akash2', + }, + { + to: '3', + from: 'friendlyName2', + }, + { + to: '4', + from: 'name2', + }, + ], + eventName: 'Purchase', + floodlightActivityTag: 'Pur0', + floodlightGroupTag: 'conv111', + salesTag: false, + }, + ], + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + message: { + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + userId: '1234', + type: 'page', + channel: 'web', + name: 'Sign up Completed', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'true', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + properties: { + orderId: 111, + quantity: 999999, + revenue: 800, + }, + integrations: { + All: true, + 'DCM Floodlight': { + COPPA: 'false', + GDPR: '1', + npa: 'true', + }, + }, + messageId: 'ea5cfab2-3961-4d8a-8187-3d1858c90a9f', + originalTimestamp: '2020-01-17T04:53:51.185Z', + receivedAt: '2020-01-17T10:23:52.688+05:30', + sentAt: '2020-01-17T04:53:52.667Z', + timestamp: '2020-01-17T10:23:51.206+05:30', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'GET', + endpoint: + 'https://ad.doubleclick.net/ddm/activity/src=12649566;cat=signu0;type=conv01;dc_rdid=T0T0T072-5e28-45a1-9eda-ce22a3e36d1a;ord=ea5cfab2-3961-4d8a-8187-3d1858c90a9f;dc_lat=1;tag_for_child_directed_treatment=0;tfua=1;npa=1', + headers: { + 'User-Agent': + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'dcm_floodlight', + description: 'Test 23', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + advertiserId: '22448662', + activityTag: '', + groupTag: '', + conversionEvents: [ + { + customVariables: [ + { + from: 'rudder1', + to: '1', + }, + { + from: 'rudder2', + to: '2', + }, + ], + eventName: 'Product viewed', + floodlightActivityTag: 'signu01', + floodlightGroupTag: 'conv01', + salesTag: false, + }, + { + customVariables: [ + { + from: '', + to: '', + }, + ], + eventName: 'Order Complete', + floodlightActivityTag: 'signu01', + floodlightGroupTag: 'conv02', + salesTag: false, + }, + ], + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + message: { + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + userId: '1234', + type: 'track', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'true', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + event: 'Product viewed', + properties: { + orderId: 111, + quantity: 2, + revenue: 800, + }, + integrations: { + All: true, + 'DCM Floodlight': { + COPPA: 'false', + GDPR: '1', + npa: true, + }, + }, + messageId: 'ea5cfab2-3961-4d8a-8187-3d1858c90a9f', + originalTimestamp: '2020-01-17T04:53:51.185Z', + receivedAt: '2020-01-17T10:23:52.688+05:30', + sentAt: '2020-01-17T04:53:52.667Z', + timestamp: '2020-01-17T10:23:51.206+05:30', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'GET', + endpoint: + 'https://ad.doubleclick.net/ddm/activity/src=22448662;cat=signu01;type=conv01;dc_rdid=T0T0T072-5e28-45a1-9eda-ce22a3e36d1a;ord=ea5cfab2-3961-4d8a-8187-3d1858c90a9f;dc_lat=1;tag_for_child_directed_treatment=0;tfua=1;npa=1', + headers: { + 'User-Agent': + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'dcm_floodlight', + description: 'Test 24', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + activityTag: '', + advertiserId: '12649566', + conversionEvents: [ + { + customVariables: [ + { + from: '', + to: '', + }, + ], + eventName: 'Sign up Completed', + floodlightActivityTag: 'signu0', + floodlightGroupTag: 'conv01', + salesTag: false, + }, + { + customVariables: [ + { + from: 'rudder1', + to: '1', + }, + { + from: 'akash1', + to: '2', + }, + ], + eventName: 'Order Complete', + floodlightActivityTag: 'order0', + floodlightGroupTag: 'conv000', + salesTag: false, + }, + { + customVariables: [ + { + from: '', + to: '', + }, + ], + eventName: 'Checkout Started', + floodlightActivityTag: 'check0', + floodlightGroupTag: 'conv00', + salesTag: true, + }, + { + customVariables: [ + { + to: '1', + from: 'rudder2', + }, + { + to: '2', + from: 'akash2', + }, + { + to: '3', + from: 'friendlyName2', + }, + { + to: '4', + from: 'name2', + }, + ], + eventName: 'Purchase', + floodlightActivityTag: 'Pur0', + floodlightGroupTag: 'conv111', + salesTag: false, + }, + ], + groupTag: '', + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + message: { + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + userId: '1234', + type: 'track', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'true', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + event: 'Purchase', + properties: { + orderId: 111, + quantity: 999999, + revenue: 800, + products: [ + { + sku: '45790-32', + url: 'https://www.example.com/product/path', + name: 'Monopoly: 3rd Edition', + price: 19, + category: 'Games', + quantity: 1, + image_url: 'https:///www.example.com/product/path.jpg', + product_id: '507f1f77bcf86cd799439011', + }, + { + sku: '46493-32', + name: 'Uno Card Game', + price: 3, + category: 'Games', + quantity: 2, + product_id: '505bd76785ebb509fc183733', + }, + ], + rudder2: 0, + akash2: 'akash2', + friendlyName2: false, + name2: '1234', + }, + integrations: { + All: true, + 'DCM Floodlight': { + COPPA: 'false', + GDPR: '1', + npa: true, + }, + }, + messageId: 'ea5cfab2-3961-4d8a-8187-3d1858c90a9f', + originalTimestamp: '2020-01-17T04:53:51.185Z', + receivedAt: '2020-01-17T10:23:52.688+05:30', + sentAt: '2020-01-17T04:53:52.667Z', + timestamp: '2020-01-17T10:23:51.206+05:30', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'GET', + endpoint: + 'https://ad.doubleclick.net/ddm/activity/src=12649566;cat=Pur0;type=conv111;dc_rdid=T0T0T072-5e28-45a1-9eda-ce22a3e36d1a;ord=ea5cfab2-3961-4d8a-8187-3d1858c90a9f;dc_lat=1;tag_for_child_directed_treatment=0;tfua=1;npa=1;u1=0;u2=akash2;u4=1234', + headers: { + 'User-Agent': + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'dcm_floodlight', + description: 'Test 25', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + advertiserId: '12649566', + activityTag: 'check0', + groupTag: 'conv00', + conversionEvents: [ + { + customVariables: [ + { + to: '', + from: '', + }, + ], + eventName: 'Viewed Page', + floodlightActivityTag: 'signu0', + floodlightGroupTag: 'conv01', + salesTag: false, + }, + { + customVariables: [ + { + to: '1', + from: 'rudder1', + }, + { + to: '2', + from: 'akash1', + }, + ], + eventName: 'Order Complete', + floodlightActivityTag: 'order0', + floodlightGroupTag: 'conv000', + salesTag: false, + }, + { + eventName: 'Checkout Started', + floodlightActivityTag: '', + floodlightGroupTag: '', + salesTag: true, + }, + { + customVariables: [ + { + to: '1', + from: 'rudder2', + }, + { + to: '2', + from: 'akash2', + }, + { + to: '3', + from: 'friendlyName2', + }, + { + to: '4', + from: 'name2', + }, + ], + eventName: 'Purchase', + floodlightActivityTag: 'Pur0', + floodlightGroupTag: 'conv111', + salesTag: false, + }, + ], + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + message: { + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + userId: '1234', + type: 'page', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'true', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + properties: { + orderId: 111, + quantity: 999999, + revenue: 800, + }, + integrations: { + All: true, + 'DCM Floodlight': { + COPPA: 'false', + GDPR: '1', + npa: 'true', + }, + }, + messageId: 'ea5cfab2-3961-4d8a-8187-3d1858c90a9f', + originalTimestamp: '2020-01-17T04:53:51.185Z', + receivedAt: '2020-01-17T10:23:52.688+05:30', + sentAt: '2020-01-17T04:53:52.667Z', + timestamp: '2020-01-17T10:23:51.206+05:30', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'GET', + endpoint: + 'https://ad.doubleclick.net/ddm/activity/src=12649566;cat=signu0;type=conv01;dc_rdid=T0T0T072-5e28-45a1-9eda-ce22a3e36d1a;ord=ea5cfab2-3961-4d8a-8187-3d1858c90a9f;dc_lat=1;tag_for_child_directed_treatment=0;tfua=1;npa=1', + headers: { + 'User-Agent': + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'dcm_floodlight', + description: 'Test 26', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + activityTag: '', + advertiserId: '12649566', + conversionEvents: [ + { + customVariables: [ + { + to: '', + from: '', + }, + ], + eventName: 'Sign up Completed', + floodlightActivityTag: 'signu0', + floodlightGroupTag: 'conv01', + salesTag: false, + }, + { + customVariables: [ + { + to: '1', + from: 'rudder1', + }, + { + to: '2', + from: 'akash1', + }, + ], + eventName: 'Order Complete', + floodlightActivityTag: 'order0', + floodlightGroupTag: 'conv000', + salesTag: false, + }, + { + customVariables: [ + { + to: '', + from: '', + }, + ], + eventName: 'Checkout Started', + floodlightActivityTag: 'check0', + floodlightGroupTag: 'conv00', + salesTag: true, + }, + { + customVariables: [ + { + to: '1', + from: 'rudder2', + }, + { + to: '2', + from: 'akash2', + }, + { + to: '3', + from: 'friendlyName2', + }, + { + to: '4', + from: 'name2', + }, + ], + eventName: 'Purchase', + floodlightActivityTag: 'Pur0', + floodlightGroupTag: 'conv111', + salesTag: false, + }, + ], + groupTag: '', + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + message: { + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + userId: '1234', + type: 'track', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'true', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + brand: 'Google2', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + traits: { + name2: 'traits-v1', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + event: 'Purchase', + properties: { + orderId: 111, + quantity: 999999, + revenue: 800, + products: [ + { + sku: '45790-32', + url: 'https://www.example.com/product/path', + name: 'Monopoly: 3rd Edition', + price: 19, + category: 'Games', + quantity: 1, + image_url: 'https:///www.example.com/product/path.jpg', + product_id: '507f1f77bcf86cd799439011', + }, + { + sku: '46493-32', + name: 'Uno Card Game', + price: 3, + category: 'Games', + quantity: 2, + product_id: '505bd76785ebb509fc183733', + }, + ], + rudder2: '0', + akash2: 'akash2', + friendlyName2: false, + }, + integrations: { + All: true, + 'DCM Floodlight': { + COPPA: 'false', + GDPR: '1', + npa: true, + }, + }, + messageId: 'ea5cfab2-3961-4d8a-8187-3d1858c90a9f', + originalTimestamp: '2020-01-17T04:53:51.185Z', + receivedAt: '2020-01-17T10:23:52.688+05:30', + sentAt: '2020-01-17T04:53:52.667Z', + timestamp: '2020-01-17T10:23:51.206+05:30', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'GET', + endpoint: + 'https://ad.doubleclick.net/ddm/activity/src=12649566;cat=Pur0;type=conv111;dc_rdid=T0T0T072-5e28-45a1-9eda-ce22a3e36d1a;ord=ea5cfab2-3961-4d8a-8187-3d1858c90a9f;dc_lat=1;tag_for_child_directed_treatment=0;tfua=1;npa=1;u1=0;u2=akash2;u4=traits-v1', + headers: { + 'User-Agent': + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 200, + }, + ], + }, + }, + }, +]; diff --git a/test/integrations/destinations/dynamic_yield/processor/data.ts b/test/integrations/destinations/dynamic_yield/processor/data.ts new file mode 100644 index 0000000000..f72f1574f7 --- /dev/null +++ b/test/integrations/destinations/dynamic_yield/processor/data.ts @@ -0,0 +1,1041 @@ +export const data = [ + { + name: 'dynamic_yield', + description: 'Identify call without hashed email 21313123', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '507f191e810c19729de860ea', + context: { + ip: '54.100.200.255', + sessionId: '16733896350494', + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36', + }, + integrations: { + All: true, + }, + receivedAt: '2015-02-23T22:28:55.387Z', + sentAt: '2015-02-23T22:28:55.111Z', + timestamp: '2015-02-23T22:28:55.111Z', + traits: { + email: 'peter@example.com', + }, + type: 'identify', + userId: 'user0', + version: '1', + }, + destination: { + Config: { + apiKey: 'dummyApiKey', + hashEmail: true, + }, + DestinationDefinition: { Config: { cdkV2Enabled: true } }, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 200, + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://dy-api.com/v2/collect/user/event', + headers: { + 'Content-Type': 'application/json', + 'DY-API-Key': 'dummyApiKey', + }, + params: {}, + body: { + JSON: { + user: { id: 'user0' }, + session: { custom: '16733896350494' }, + context: { device: { ip: '54.100.200.255' } }, + events: [ + { + name: 'Identify User', + properties: { + dyType: 'identify-v1', + hashedEmail: + 'f111db891a36b76df28abc74867e6c7248f796e045117f0cff27b6e2be25d2df', + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + }, + ], + }, + }, + }, + { + name: 'dynamic_yield', + description: 'Identify call with hashed email', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '507f191e810c19729de860ea', + context: { + ip: '54.100.200.255', + sessionId: '16733896350494', + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36', + }, + integrations: { + All: true, + }, + receivedAt: '2015-02-23T22:28:55.387Z', + sentAt: '2015-02-23T22:28:55.111Z', + timestamp: '2015-02-23T22:28:55.111Z', + traits: { + email: 'f111db891a36b76df28abc74867e6c7248f796e045117f0cff27b6e2be25d2df', + }, + type: 'identify', + userId: 'user0', + version: '1', + }, + destination: { + Config: { + apiKey: 'dummyApiKey', + hashEmail: false, + }, + DestinationDefinition: { Config: { cdkV2Enabled: true } }, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 200, + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://dy-api.com/v2/collect/user/event', + headers: { + 'Content-Type': 'application/json', + 'DY-API-Key': 'dummyApiKey', + }, + params: {}, + body: { + JSON: { + user: { id: 'user0' }, + session: { custom: '16733896350494' }, + context: { device: { ip: '54.100.200.255' } }, + events: [ + { + name: 'Identify User', + properties: { + dyType: 'identify-v1', + hashedEmail: + 'f111db891a36b76df28abc74867e6c7248f796e045117f0cff27b6e2be25d2df', + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + }, + ], + }, + }, + }, + { + name: 'dynamic_yield', + description: 'Track call with Product Added event', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + context: { + traits: { + email: 'testone@gmail.com', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + ip: '54.100.200.255', + }, + type: 'track', + session_id: '16733896350494', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: '123456', + event: 'Product Added', + userId: 'testuserId1', + properties: { + product_id: '123', + sku: 'item-34454ga', + category: 'Games', + name: 'Game', + brand: 'Gamepro', + variant: '111', + price: 39.95, + quantity: 1, + coupon: 'DISC21', + position: 1, + url: 'https://www.website.com/product/path', + image_url: 'https://www.website.com/product/path.png', + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + apiKey: 'dummyApiKey', + hashEmail: false, + }, + DestinationDefinition: { Config: { cdkV2Enabled: true } }, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 200, + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://dy-api.com/v2/collect/user/event', + headers: { + 'Content-Type': 'application/json', + 'DY-API-Key': 'dummyApiKey', + }, + params: {}, + body: { + JSON: { + user: { id: 'testuserId1' }, + session: { custom: '16733896350494' }, + context: { device: { ip: '54.100.200.255' } }, + events: [ + { + name: 'Add to Cart', + properties: { + dyType: 'add-to-cart-v1', + value: 39.95, + productId: 'item-34454ga', + quantity: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + }, + ], + }, + }, + }, + { + name: 'dynamic_yield', + description: 'Identify call without email', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '507f191e810c19729de860ea', + context: { + ip: '54.100.200.255', + sessionId: '16733896350494', + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36', + }, + integrations: { + All: true, + }, + receivedAt: '2015-02-23T22:28:55.387Z', + sentAt: '2015-02-23T22:28:55.111Z', + timestamp: '2015-02-23T22:28:55.111Z', + traits: {}, + type: 'identify', + userId: 'user0', + version: '1', + }, + destination: { + Config: { + apiKey: 'dummyApiKey', + hashEmail: false, + }, + DestinationDefinition: { Config: { cdkV2Enabled: true } }, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 200, + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://dy-api.com/v2/collect/user/event', + headers: { + 'Content-Type': 'application/json', + 'DY-API-Key': 'dummyApiKey', + }, + params: {}, + body: { + JSON: { + user: { id: 'user0' }, + session: { custom: '16733896350494' }, + context: { device: { ip: '54.100.200.255' } }, + events: [ + { + name: 'Identify User', + properties: { + dyType: 'identify-v1', + cuid: 'user0', + cuidType: 'userId', + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + }, + ], + }, + }, + }, + { + name: 'dynamic_yield', + description: 'Track call with Product Removed event', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + context: { + traits: { + email: 'testone@gmail.com', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + ip: '54.100.200.255', + }, + type: 'track', + session_id: '16733896350494', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: '123456', + event: 'Product Removed', + userId: 'testuserId1', + properties: { + product_id: '123', + sku: 'item-34454ga', + category: 'Games', + name: 'Game', + brand: 'Gamepro', + variant: '111', + price: 39.95, + quantity: 1, + coupon: 'DISC21', + position: 1, + url: 'https://www.website.com/product/path', + image_url: 'https://www.website.com/product/path.png', + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + apiKey: 'dummyApiKey', + hashEmail: false, + }, + DestinationDefinition: { Config: { cdkV2Enabled: true } }, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 200, + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://dy-api.com/v2/collect/user/event', + headers: { + 'Content-Type': 'application/json', + 'DY-API-Key': 'dummyApiKey', + }, + params: {}, + body: { + JSON: { + user: { id: 'testuserId1' }, + session: { custom: '16733896350494' }, + context: { device: { ip: '54.100.200.255' } }, + events: [ + { + name: 'Remove from Cart', + properties: { + dyType: 'remove-from-cart-v1', + value: 39.95, + productId: 'item-34454ga', + quantity: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + }, + ], + }, + }, + }, + { + name: 'dynamic_yield', + description: 'Track call with Product Added to Wishlist event', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + context: { + traits: { + email: 'testone@gmail.com', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + ip: '54.100.200.255', + }, + type: 'track', + session_id: '16733896350494', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: '123456', + event: 'Product Added to Wishlist', + userId: 'testuserId1', + properties: { + product_id: '123', + sku: 'item-34454ga', + category: 'Games', + name: 'Game', + brand: 'Gamepro', + variant: '111', + price: 39.95, + quantity: 1, + coupon: 'DISC21', + position: 1, + url: 'https://www.website.com/product/path', + image_url: 'https://www.website.com/product/path.png', + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + apiKey: 'dummyApiKey', + hashEmail: false, + }, + DestinationDefinition: { Config: { cdkV2Enabled: true } }, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 200, + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://dy-api.com/v2/collect/user/event', + headers: { + 'Content-Type': 'application/json', + 'DY-API-Key': 'dummyApiKey', + }, + params: {}, + body: { + JSON: { + user: { id: 'testuserId1' }, + session: { custom: '16733896350494' }, + context: { device: { ip: '54.100.200.255' } }, + events: [ + { + name: 'Add to Wishlist', + properties: { + dyType: 'add-to-wishlist-v1', + value: 39.95, + productId: 'item-34454ga', + quantity: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + }, + ], + }, + }, + }, + { + name: 'dynamic_yield', + description: 'Track call with order completed event', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + context: { + traits: { + email: 'testone@gmail.com', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + ip: '54.100.200.255', + }, + type: 'track', + session_id: '16733896350494', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: '123456', + event: 'Order Completed', + userId: 'testuserId1', + properties: { + checkout_id: '12345', + order_id: '1234', + affiliation: 'Apple Store', + total: 20, + revenue: 15, + shipping: 4, + tax: 1, + discount: 1.5, + coupon: 'ImagePro', + currency: 'USD', + products: [ + { + product_id: '123', + sku: 'G-32', + name: 'Monopoly', + price: 14, + quantity: 1, + category: 'Games', + url: 'https://www.website.com/product/path', + image_url: 'https://www.website.com/product/path.jpg', + }, + { + product_id: '345', + sku: 'F-32', + name: 'UNO', + price: 3.45, + quantity: 2, + category: 'Games', + }, + ], + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + apiKey: 'dummyApiKey', + hashEmail: false, + }, + DestinationDefinition: { Config: { cdkV2Enabled: true } }, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 200, + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://dy-api.com/v2/collect/user/event', + headers: { + 'Content-Type': 'application/json', + 'DY-API-Key': 'dummyApiKey', + }, + params: {}, + body: { + JSON: { + user: { id: 'testuserId1' }, + session: { custom: '16733896350494' }, + context: { device: { ip: '54.100.200.255' } }, + events: [ + { + name: 'Purchase', + properties: { + dyType: 'purchase-v1', + uniqueTransactionId: '1234', + value: 15, + currency: 'USD', + cart: [ + { + itemPrice: 14, + productId: 'G-32', + quantity: 1, + }, + { + itemPrice: 3.45, + productId: 'F-32', + quantity: 2, + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + }, + ], + }, + }, + }, + { + name: 'dynamic_yield', + description: 'Unsupported group call check', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '507f191e810c19729de860ea', + context: { + ip: '54.100.200.255', + sessionId: '16733896350494', + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36', + }, + integrations: { + All: true, + }, + receivedAt: '2015-02-23T22:28:55.387Z', + sentAt: '2015-02-23T22:28:55.111Z', + timestamp: '2015-02-23T22:28:55.111Z', + traits: { + email: 'peter@example.com', + }, + type: 'group', + userId: 'user0', + version: '1', + }, + destination: { + Config: { + apiKey: 'dummyApiKey', + }, + DestinationDefinition: { Config: { cdkV2Enabled: true } }, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 400, + error: + 'message type group is not supported: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: message type group is not supported', + statTags: { + destType: 'DYNAMIC_YIELD', + destinationId: 'destId', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'cdkV2', + module: 'destination', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + }, + { + name: 'dynamic_yield', + description: 'Event type not present', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '507f191e810c19729de860ea', + context: { + ip: '54.100.200.255', + sessionId: '16733896350494', + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36', + }, + integrations: { + All: true, + }, + receivedAt: '2015-02-23T22:28:55.387Z', + sentAt: '2015-02-23T22:28:55.111Z', + timestamp: '2015-02-23T22:28:55.111Z', + traits: { + email: 'peter@example.com', + }, + userId: 'user0', + version: '1', + }, + destination: { + Config: { + apiKey: 'dummyApiKey', + }, + DestinationDefinition: { Config: { cdkV2Enabled: true } }, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 400, + error: + 'message Type is not present. Aborting message.: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: message Type is not present. Aborting message.', + statTags: { + destType: 'DYNAMIC_YIELD', + destinationId: 'destId', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'cdkV2', + module: 'destination', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + }, + { + name: 'dynamic_yield', + description: 'API Key not present', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '507f191e810c19729de860ea', + type: 'identify', + context: { + ip: '54.100.200.255', + sessionId: '16733896350494', + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36', + }, + integrations: { + All: true, + }, + receivedAt: '2015-02-23T22:28:55.387Z', + sentAt: '2015-02-23T22:28:55.111Z', + timestamp: '2015-02-23T22:28:55.111Z', + traits: { + email: 'peter@example.com', + }, + userId: 'user0', + version: '1', + }, + destination: { + Config: {}, + DestinationDefinition: { Config: { cdkV2Enabled: true } }, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 400, + error: + 'Api Key is not present: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: Api Key is not present', + statTags: { + destType: 'DYNAMIC_YIELD', + destinationId: 'destId', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'cdkV2', + module: 'destination', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + }, + { + name: 'dynamic_yield', + description: 'Event is not there in input', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + context: { + traits: { + email: 'testone@gmail.com', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + ip: '54.100.200.255', + }, + type: 'track', + session_id: '16733896350494', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: '123456', + userId: 'testuserId1', + properties: { + product_id: '123', + sku: 'item-34454ga', + category: 'Games', + name: 'Game', + brand: 'Gamepro', + variant: '111', + price: 39.95, + quantity: 1, + coupon: 'DISC21', + position: 1, + url: 'https://www.website.com/product/path', + image_url: 'https://www.website.com/product/path.png', + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + apiKey: 'dummyApiKey', + }, + DestinationDefinition: { Config: { cdkV2Enabled: true } }, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 400, + error: + 'event is not present. Aborting.: Workflow: procWorkflow, Step: validateInputForTrack, ChildStep: undefined, OriginalError: event is not present. Aborting.', + statTags: { + destType: 'DYNAMIC_YIELD', + destinationId: 'destId', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'cdkV2', + module: 'destination', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + }, +]; diff --git a/test/integrations/destinations/eloqua/processor/data.ts b/test/integrations/destinations/eloqua/processor/data.ts new file mode 100644 index 0000000000..50aad5639a --- /dev/null +++ b/test/integrations/destinations/eloqua/processor/data.ts @@ -0,0 +1,460 @@ +export const data = [ + { + name: 'eloqua', + description: 'identify payload pass', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'identify', + traits: { + C_FirstName: 'Test User', + C_patient_id1: 1, + C_MobilePhone: '+008822773355', + C_City: 'Scranton', + C_date_of_birth_1life1: '22/12/01', + }, + userId: 'testUser1234@keeptesting.com', + context: { + sources: { + job_id: '2RVkqlV1adBiIpj33kWlQzchMP1/Syncher', + version: 'v1.28.0', + job_run_id: 'cja699onfuet3te5obc0', + task_run_id: 'cja699onfuet3te5obcg', + }, + externalId: [ + { + id: 'testUser1234@keeptesting.com', + type: 'ELOQUA-contacts', + identifierType: 'C_EmailAddress', + }, + ], + mappedToDestination: 'true', + }, + recordId: '1', + rudderId: '3606d3c7-8741-4245-a254-450e137d3866', + messageId: '40def17a-1b6a-4d2d-a851-2a8d96f913bd', + }, + destination: { + Config: { + customerAccountId: '89236978', + customerId: '78678678', + audienceId: '564567', + hashEmail: false, + }, + DestinationDefinition: { Config: { cdkV2Enabled: true } }, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: '', + headers: {}, + params: {}, + body: { + JSON: { + identifierFieldName: 'C_EmailAddress', + data: { + C_FirstName: 'Test User', + C_patient_id1: '1', + C_MobilePhone: '+008822773355', + C_City: 'Scranton', + C_date_of_birth_1life1: '22/12/01', + C_EmailAddress: 'testUser1234@keeptesting.com', + }, + customObjectId: 'contacts', + type: 'identify', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + }, + { + name: 'eloqua', + description: 'type not correect', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'audiencelist', + traits: { + C_FirstName: 'Test User', + C_patient_id1: 1, + C_MobilePhone: '+008822773355', + C_City: 'Scranton', + C_date_of_birth_1life1: '22/12/01', + }, + userId: 'testUser1234@keeptesting.com', + context: { + sources: { + job_id: '2RVkqlV1adBiIpj33kWlQzchMP1/Syncher', + version: 'v1.28.0', + job_run_id: 'cja699onfuet3te5obc0', + task_run_id: 'cja699onfuet3te5obcg', + }, + externalId: [ + { + id: 'testUser1234@keeptesting.com', + type: 'ELOQUA-contacts', + identifierType: 'C_EmailAddress', + }, + ], + mappedToDestination: 'true', + }, + recordId: '1', + rudderId: '3606d3c7-8741-4245-a254-450e137d3866', + messageId: '40def17a-1b6a-4d2d-a851-2a8d96f913bd', + }, + destination: { + Config: { + customerAccountId: '89236978', + customerId: '78678678', + audienceId: '564567', + hashEmail: false, + }, + DestinationDefinition: { Config: { cdkV2Enabled: true } }, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: + 'Event type audiencelist is not supported. Aborting message.: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: Event type audiencelist is not supported. Aborting message.', + statTags: { + destType: 'ELOQUA', + destinationId: 'destId', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'cdkV2', + module: 'destination', + workspaceId: 'wspId', + }, + statusCode: 400, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + }, + { + name: 'eloqua', + description: 'trits not correect', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'identify', + userId: 'testUser1234@keeptesting.com', + context: { + sources: { + job_id: '2RVkqlV1adBiIpj33kWlQzchMP1/Syncher', + version: 'v1.28.0', + job_run_id: 'cja699onfuet3te5obc0', + task_run_id: 'cja699onfuet3te5obcg', + }, + externalId: [ + { + id: 'testUser1234@keeptesting.com', + type: 'ELOQUA-contacts', + identifierType: 'C_EmailAddress', + }, + ], + mappedToDestination: 'true', + }, + recordId: '1', + rudderId: '3606d3c7-8741-4245-a254-450e137d3866', + messageId: '40def17a-1b6a-4d2d-a851-2a8d96f913bd', + }, + destination: { + Config: { + customerAccountId: '89236978', + customerId: '78678678', + audienceId: '564567', + hashEmail: false, + }, + DestinationDefinition: { Config: { cdkV2Enabled: true } }, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: + 'Message traits/properties not present. Aborting message.: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: Message traits/properties not present. Aborting message.', + statTags: { + destType: 'ELOQUA', + destinationId: 'destId', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'cdkV2', + module: 'destination', + workspaceId: 'wspId', + }, + statusCode: 400, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + }, + { + name: 'eloqua', + description: 'identify payload pass 2', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'identify', + traits: { + C_FirstName: 'Test User', + C_patient_id1: 1, + C_MobilePhone: '+008822773355', + C_City: 'Scranton', + C_date_of_birth_1life1: '22/12/01', + }, + userId: 'testUser1234@keeptesting.com', + context: { + sources: { + job_id: '2RVkqlV1adBiIpj33kWlQzchMP1/Syncher', + version: 'v1.28.0', + job_run_id: 'cja699onfuet3te5obc0', + task_run_id: 'cja699onfuet3te5obcg', + }, + externalId: [ + { + id: 'testUser1234@keeptesting.com', + type: 'ELOQUA-contacts', + identifierType: 'C_EmailAddress', + }, + ], + mappedToDestination: 'true', + }, + recordId: '1', + rudderId: '3606d3c7-8741-4245-a254-450e137d3866', + messageId: '40def17a-1b6a-4d2d-a851-2a8d96f913bd', + }, + destination: { + Config: { + customerAccountId: '89236978', + customerId: '78678678', + audienceId: '564567', + hashEmail: false, + }, + DestinationDefinition: { Config: { cdkV2Enabled: true } }, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: '', + headers: {}, + params: {}, + body: { + JSON: { + identifierFieldName: 'C_EmailAddress', + data: { + C_FirstName: 'Test User', + C_patient_id1: '1', + C_MobilePhone: '+008822773355', + C_City: 'Scranton', + C_date_of_birth_1life1: '22/12/01', + C_EmailAddress: 'testUser1234@keeptesting.com', + }, + customObjectId: 'contacts', + type: 'identify', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + }, + { + name: 'eloqua', + description: 'track payload pass', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + properties: { + key11: 'Test User', + key21: 1, + contactID11: '+008822773355', + }, + userId: 'testUser1234@keeptesting.com', + channel: 'sources', + context: { + sources: { + job_id: '2RVkqlV1adBiIpj33kWlQzchMP1/Syncher', + version: 'v1.28.0', + job_run_id: 'cja699onfuet3te5obc0', + task_run_id: 'cja699onfuet3te5obcg', + }, + externalId: [ + { + id: 'testUser1234@keeptesting.com', + type: 'ELOQUA-172', + identifierType: 'contactID1', + }, + ], + mappedToDestination: 'true', + }, + recordId: '1', + rudderId: '3606d3c7-8741-4245-a254-450e137d3866', + messageId: '40def17a-1b6a-4d2d-a851-2a8d96f913bd', + }, + destination: { + Config: { + customerAccountId: '89236978', + customerId: '78678678', + audienceId: '564567', + hashEmail: false, + }, + DestinationDefinition: { Config: { cdkV2Enabled: true } }, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: '', + headers: {}, + params: {}, + body: { + JSON: { + identifierFieldName: 'contactID1', + data: { + key11: 'Test User', + key21: '1', + contactID11: '+008822773355', + contactID1: 'testUser1234@keeptesting.com', + }, + customObjectId: '172', + type: 'track', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + }, +]; diff --git a/test/integrations/destinations/fullstory/processor/data.ts b/test/integrations/destinations/fullstory/processor/data.ts new file mode 100644 index 0000000000..d206b4a84f --- /dev/null +++ b/test/integrations/destinations/fullstory/processor/data.ts @@ -0,0 +1,462 @@ +export const data = [ + { + name: 'fullstory', + description: 'Complete track event', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '78c53c15-32a1-4b65-adac-bec2d7bb8fab', + channel: 'web', + context: { + app: { + name: 'RSPM', + version: '1.9.0', + }, + campaign: { + name: 'sales campaign', + source: 'google', + medium: 'medium', + term: 'event data', + content: 'Make sense of the modern data stack', + }, + ip: '192.0.2.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '2.9.1', + }, + locale: 'en-US', + device: { + manufacturer: 'Nokia', + model: 'N2023', + }, + page: { + path: '/best-seller/1', + initial_referrer: 'https://www.google.com/search', + initial_referring_domain: 'google.com', + referrer: 'https://www.google.com/search?q=estore+bestseller', + referring_domain: 'google.com', + search: 'estore bestseller', + title: 'The best sellers offered by EStore', + url: 'https://www.estore.com/best-seller/1', + }, + screen: { + density: 420, + height: 1794, + width: 1080, + innerHeight: 200, + innerWidth: 100, + }, + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 9; Android SDK built for x86 Build/PSR1.180720.075)', + }, + event: 'Product Reviewed', + integrations: { + All: true, + }, + messageId: '1578564113557-af022c68-429e-4af4-b99b-2b9174056383', + properties: { + userId: 'u001', + sessionId: 's001', + review_id: 'review_id_1', + product_id: 'product_id_1', + rating: 5, + review_body: 'Sample Review Body', + latitude: 44.56, + longitude: 54.46, + region: 'Atlas', + city: 'NY', + country: 'USA', + }, + originalTimestamp: '2020-01-09T10:01:53.558Z', + type: 'track', + sentAt: '2020-01-09T10:02:03.257Z', + }, + destination: { + ID: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', + Name: 'Fullstory', + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + Config: { + apiKey: 'dummyfullstoryAPIKey', + }, + Enabled: true, + Transformations: [], + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + JSON: { + name: 'Product Reviewed', + properties: { + userId: 'u001', + sessionId: 's001', + review_id: 'review_id_1', + product_id: 'product_id_1', + rating: 5, + review_body: 'Sample Review Body', + latitude: 44.56, + longitude: 54.46, + region: 'Atlas', + city: 'NY', + country: 'USA', + }, + timestamp: '2020-01-09T10:01:53.558Z', + context: { + browser: { + url: 'https://www.estore.com/best-seller/1', + user_agent: + 'Dalvik/2.1.0 (Linux; U; Android 9; Android SDK built for x86 Build/PSR1.180720.075)', + initial_referrer: 'https://www.google.com/search', + }, + mobile: { + app_name: 'RSPM', + app_version: '1.9.0', + }, + device: { + manufacturer: 'Nokia', + model: 'N2023', + }, + location: { + ip_address: '192.0.2.0', + latitude: 44.56, + longitude: 54.46, + city: 'NY', + region: 'Atlas', + country: 'USA', + }, + }, + session: { + id: 's001', + }, + user: { + id: 'u001', + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.fullstory.com/v2/events', + headers: { + authorization: 'Basic dummyfullstoryAPIKey', + 'content-type': 'application/json', + }, + params: {}, + files: {}, + userId: '', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'fullstory', + description: 'Missing event name', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + device: { + manufacturer: 'Nokia', + model: 'N2023', + }, + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 9; Android SDK built for x86 Build/PSR1.180720.075)', + }, + integrations: { + All: true, + }, + properties: { + userId: 'u001', + latitude: 44.56, + longitude: 54.46, + region: 'Atlas', + city: 'NY', + country: 'USA', + }, + originalTimestamp: '2020-01-09T10:01:53.558Z', + type: 'track', + sentAt: '2020-01-09T10:02:03.257Z', + }, + destination: { + ID: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', + Name: 'Fullstory', + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + Config: { + apiKey: 'dummyfullstoryAPIKey', + }, + Enabled: true, + Transformations: [], + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 400, + error: + 'event is required for track call: Workflow: procWorkflow, Step: validateEventName, ChildStep: undefined, OriginalError: event is required for track call', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + implementation: 'cdkV2', + destType: 'FULLSTORY', + module: 'destination', + feature: 'processor', + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + }, + { + name: 'fullstory', + description: 'Complete identify event', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'dummy-user001', + channel: 'web', + context: { + traits: { + company: 'Initech', + address: { + country: 'USA', + state: 'CA', + street: '101 dummy street', + }, + email: 'dummyuser@domain.com', + name: 'dummy user', + phone: '099-999-9999', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36', + }, + integrations: { + All: true, + }, + originalTimestamp: '2020-01-27T12:20:55.301Z', + receivedAt: '2020-01-27T17:50:58.657+05:30', + request_ip: '14.98.244.60', + sentAt: '2020-01-27T12:20:56.849Z', + timestamp: '2020-01-27T17:50:57.109+05:30', + type: 'identify', + }, + destination: { + ID: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', + Name: 'Fullstory', + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + Config: { + apiKey: 'fullstoryAPIKey', + }, + Enabled: true, + Transformations: [], + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + JSON: { + properties: { + company: 'Initech', + address: { + country: 'USA', + state: 'CA', + street: '101 dummy street', + }, + email: 'dummyuser@domain.com', + name: 'dummy user', + phone: '099-999-9999', + }, + uid: 'dummy-user001', + email: 'dummyuser@domain.com', + display_name: 'dummy user', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.fullstory.com/v2/users', + headers: { + authorization: 'Basic fullstoryAPIKey', + 'content-type': 'application/json', + }, + params: {}, + files: {}, + userId: '', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'fullstory', + description: 'Identify event with needed traits', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'dummy-user001', + channel: 'web', + context: { + traits: { + email: 'dummyuser@domain.com', + name: 'dummy user', + phone: '099-999-9999', + }, + }, + timestamp: '2020-01-27T17:50:57.109+05:30', + type: 'identify', + }, + destination: { + ID: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', + Name: 'Fullstory', + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + Config: { + apiKey: 'fullstoryAPIKey', + }, + Enabled: true, + Transformations: [], + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + JSON: { + properties: { + email: 'dummyuser@domain.com', + name: 'dummy user', + phone: '099-999-9999', + }, + uid: 'dummy-user001', + email: 'dummyuser@domain.com', + display_name: 'dummy user', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.fullstory.com/v2/users', + headers: { + authorization: 'Basic fullstoryAPIKey', + 'content-type': 'application/json', + }, + params: {}, + files: {}, + userId: '', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 200, + }, + ], + }, + }, + }, +]; diff --git a/test/integrations/destinations/heap/processor/data.ts b/test/integrations/destinations/heap/processor/data.ts index be4f9c87bf..6efa45435c 100644 --- a/test/integrations/destinations/heap/processor/data.ts +++ b/test/integrations/destinations/heap/processor/data.ts @@ -15,7 +15,7 @@ export const data = [ }, DestinationDefinition: { Config: { - cdkEnabled: true, + cdkV2Enabled: true, }, DisplayName: 'Heap.io', ID: '1WTbl0l5GjOQKOvfmcGwk0T49kV', @@ -26,6 +26,10 @@ export const data = [ Name: 'heap test', Transformations: [], }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, message: { anonymousId: 'sampath', channel: 'web', @@ -104,6 +108,10 @@ export const data = [ userId: 'sampath', }, statusCode: 200, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, }, ], }, @@ -125,7 +133,7 @@ export const data = [ }, DestinationDefinition: { Config: { - cdkEnabled: true, + cdkV2Enabled: true, }, DisplayName: 'Heap.io', ID: '1WTbl0l5GjOQKOvfmcGwk0T49kV', @@ -136,6 +144,10 @@ export const data = [ Name: 'heap test', Transformations: [], }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, message: { anonymousId: 'sampath', channel: 'web', @@ -221,6 +233,10 @@ export const data = [ userId: 'sampath', }, statusCode: 200, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, }, ], }, @@ -242,7 +258,7 @@ export const data = [ }, DestinationDefinition: { Config: { - cdkEnabled: false, + cdkV2Enabled: false, }, DisplayName: 'Heap.io', ID: '1WTbl0l5GjOQKOvfmcGwk0T49kV', @@ -253,6 +269,10 @@ export const data = [ Name: 'heap test', Transformations: [], }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, message: { anonymousId: 'sampath', channel: 'web', @@ -311,8 +331,14 @@ export const data = [ feature: 'processor', implementation: 'native', module: 'destination', + destinationId: 'destId', + workspaceId: 'wspId', }, statusCode: 400, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, }, ], }, @@ -334,7 +360,7 @@ export const data = [ }, DestinationDefinition: { Config: { - cdkEnabled: false, + cdkV2Enabled: false, }, DisplayName: 'Heap.io', ID: '1WTbl0l5GjOQKOvfmcGwk0T49kV', @@ -345,6 +371,10 @@ export const data = [ Name: 'heap test', Transformations: [], }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, message: { anonymousId: 'sampath', channel: 'web', @@ -403,6 +433,8 @@ export const data = [ { error: 'message type page not supported for heap', statTags: { + destinationId: 'destId', + workspaceId: 'wspId', destType: 'HEAP', errorCategory: 'dataValidation', errorType: 'instrumentation', @@ -411,6 +443,10 @@ export const data = [ module: 'destination', }, statusCode: 400, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, }, ], }, @@ -432,7 +468,7 @@ export const data = [ }, DestinationDefinition: { Config: { - cdkEnabled: true, + cdkV2Enabled: true, }, DisplayName: 'Heap.io', ID: '1WTbl0l5GjOQKOvfmcGwk0T49kV', @@ -443,6 +479,10 @@ export const data = [ Name: 'heap test', Transformations: [], }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, message: { anonymousId: 'sampath', channel: 'web', @@ -530,6 +570,10 @@ export const data = [ userId: 'sampath', }, statusCode: 200, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, }, ], }, @@ -551,7 +595,7 @@ export const data = [ }, DestinationDefinition: { Config: { - cdkEnabled: true, + cdkV2Enabled: true, }, DisplayName: 'Heap.io', ID: '1WTbl0l5GjOQKOvfmcGwk0T49kV', @@ -562,6 +606,10 @@ export const data = [ Name: 'heap test', Transformations: [], }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, message: { anonymousId: 'sampath', channel: 'web', @@ -649,6 +697,10 @@ export const data = [ userId: 'sampath', }, statusCode: 200, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, }, ], }, @@ -670,7 +722,7 @@ export const data = [ }, DestinationDefinition: { Config: { - cdkEnabled: true, + cdkV2Enabled: true, }, DisplayName: 'Heap.io', ID: '1WTbl0l5GjOQKOvfmcGwk0T49kV', @@ -681,6 +733,10 @@ export const data = [ Name: 'heap test', Transformations: [], }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, message: { anonymousId: 'sampath', channel: 'web', @@ -771,6 +827,10 @@ export const data = [ userId: 'sampath', }, statusCode: 200, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, }, ], }, @@ -792,7 +852,7 @@ export const data = [ }, DestinationDefinition: { Config: { - cdkEnabled: true, + cdkV2Enabled: true, }, DisplayName: 'Heap.io', ID: '1WTbl0l5GjOQKOvfmcGwk0T49kV', @@ -803,6 +863,10 @@ export const data = [ Name: 'heap test', Transformations: [], }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, message: { anonymousId: 'sampath', channel: 'web', @@ -888,6 +952,10 @@ export const data = [ userId: 'sampath', }, statusCode: 200, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, }, ], }, diff --git a/test/integrations/destinations/kochava/processor/data.ts b/test/integrations/destinations/kochava/processor/data.ts index d17e9795ff..06b5667c2a 100644 --- a/test/integrations/destinations/kochava/processor/data.ts +++ b/test/integrations/destinations/kochava/processor/data.ts @@ -12,7 +12,7 @@ export const data = [ destination: { Config: { apiKey: '' }, DestinationDefinition: { - Config: { cdkEnabled: true }, + Config: { cdkV2Enabled: true }, DisplayName: 'Kochava', ID: '1WTpBSTiL3iAUHUdW7rHT4sawgU', Name: 'KOCHAVA', @@ -22,6 +22,10 @@ export const data = [ Name: 'kochava test', Transformations: [], }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, message: { anonymousId: 'sampath', channel: 'web', @@ -103,6 +107,10 @@ export const data = [ userId: 'sampath', }, statusCode: 200, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, }, ], }, @@ -144,12 +152,13 @@ export const data = [ sentAt: '2019-10-14T09:03:22.563Z', }, metadata: { - destinationId: '1WTpIHpH7NTBgjeiUPW1kCUgZGI', + destinationId: 'destId', + workspaceId: 'wspId', }, destination: { Config: { apiKey: '' }, DestinationDefinition: { - Config: { cdkEnabled: true }, + Config: { cdkV2Enabled: true }, DisplayName: 'Kochava', ID: '1WTpBSTiL3iAUHUdW7rHT4sawgU', Name: 'KOCHAVA', @@ -170,18 +179,21 @@ export const data = [ status: 200, body: [ { - error: 'Bad event. Original error: message type "identify" not supported for "kochava"', + error: + 'message type identify is not supported: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: message type identify is not supported', metadata: { - destinationId: '1WTpIHpH7NTBgjeiUPW1kCUgZGI', + destinationId: 'destId', + workspaceId: 'wspId', }, statTags: { destType: 'KOCHAVA', errorCategory: 'dataValidation', - destinationId: '1WTpIHpH7NTBgjeiUPW1kCUgZGI', + destinationId: 'destId', errorType: 'instrumentation', feature: 'processor', - implementation: 'cdkV1', + implementation: 'cdkV2', module: 'destination', + workspaceId: 'wspId', }, statusCode: 400, }, @@ -225,10 +237,14 @@ export const data = [ integrations: { All: true }, sentAt: '2019-10-14T09:03:22.563Z', }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, destination: { Config: { apiKey: '' }, DestinationDefinition: { - Config: { cdkEnabled: true }, + Config: { cdkV2Enabled: true }, DisplayName: 'Kochava', ID: '1WTpBSTiL3iAUHUdW7rHT4sawgU', Name: 'KOCHAVA', @@ -288,6 +304,10 @@ export const data = [ userId: '00000000000000000000000000', }, statusCode: 200, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, }, ], }, @@ -329,10 +349,14 @@ export const data = [ integrations: { All: true }, sentAt: '2019-10-14T09:03:22.563Z', }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, destination: { Config: { apiKey: '' }, DestinationDefinition: { - Config: { cdkEnabled: true }, + Config: { cdkV2Enabled: true }, DisplayName: 'Kochava', ID: '1WTpBSTiL3iAUHUdW7rHT4sawgU', Name: 'KOCHAVA', @@ -392,6 +416,10 @@ export const data = [ userId: '00000000000000000000000000', }, statusCode: 200, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, }, ], }, @@ -444,10 +472,14 @@ export const data = [ type: 'screen', sentAt: '2020-03-12T09:05:13.042Z', }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, destination: { Config: { apiKey: '' }, DestinationDefinition: { - Config: { cdkEnabled: true }, + Config: { cdkV2Enabled: true }, DisplayName: 'Kochava', ID: '1WTpBSTiL3iAUHUdW7rHT4sawgU', Name: 'KOCHAVA', @@ -511,6 +543,10 @@ export const data = [ userId: '5094f5704b9cf2b3', }, statusCode: 200, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, }, ], }, @@ -564,10 +600,14 @@ export const data = [ type: 'screen', sentAt: '2020-03-12T09:05:13.042Z', }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, destination: { Config: { apiKey: '' }, DestinationDefinition: { - Config: { cdkEnabled: true }, + Config: { cdkV2Enabled: true }, DisplayName: 'Kochava', ID: '1WTpBSTiL3iAUHUdW7rHT4sawgU', Name: 'KOCHAVA', @@ -631,6 +671,10 @@ export const data = [ userId: '5094f5704b9cf2b3', }, statusCode: 200, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, }, ], }, @@ -687,7 +731,7 @@ export const data = [ destination: { Config: { apiKey: '' }, DestinationDefinition: { - Config: { cdkEnabled: true }, + Config: { cdkV2Enabled: true }, DisplayName: 'Kochava', ID: '1WTpBSTiL3iAUHUdW7rHT4sawgU', Name: 'KOCHAVA', @@ -697,6 +741,10 @@ export const data = [ Name: 'kochava test', Transformations: [], }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, }, ], method: 'POST', @@ -750,6 +798,10 @@ export const data = [ userId: '5094f5704b9cf2b3', }, statusCode: 200, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, }, ], }, @@ -800,10 +852,14 @@ export const data = [ type: 'screen', sentAt: '2020-03-12T09:05:13.042Z', }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, destination: { Config: { apiKey: '' }, DestinationDefinition: { - Config: { cdkEnabled: true }, + Config: { cdkV2Enabled: true }, DisplayName: 'Kochava', ID: '1WTpBSTiL3iAUHUdW7rHT4sawgU', Name: 'KOCHAVA', @@ -862,6 +918,10 @@ export const data = [ userId: '5094f5704b9cf2b3', }, statusCode: 200, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, }, ], }, @@ -914,7 +974,7 @@ export const data = [ destination: { Config: { apiKey: '' }, DestinationDefinition: { - Config: { cdkEnabled: true }, + Config: { cdkV2Enabled: true }, DisplayName: 'Kochava', ID: '1WTpBSTiL3iAUHUdW7rHT4sawgU', Name: 'KOCHAVA', @@ -924,6 +984,10 @@ export const data = [ Name: 'kochava test', Transformations: [], }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, }, ], method: 'POST', @@ -972,6 +1036,10 @@ export const data = [ userId: '5094f5704b9cf2b3', }, statusCode: 200, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, }, ], }, @@ -1012,10 +1080,14 @@ export const data = [ integrations: { All: true }, sentAt: '2019-10-14T09:03:22.563Z', }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, destination: { Config: { apiKey: '' }, DestinationDefinition: { - Config: { cdkEnabled: true }, + Config: { cdkV2Enabled: true }, DisplayName: 'Kochava', ID: '1WTpBSTiL3iAUHUdW7rHT4sawgU', Name: 'KOCHAVA', @@ -1074,6 +1146,10 @@ export const data = [ userId: '00000000000000000000000000', }, statusCode: 200, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, }, ], }, @@ -1115,10 +1191,14 @@ export const data = [ integrations: { All: true }, sentAt: '2019-10-14T09:03:22.563Z', }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, destination: { Config: { apiKey: '' }, DestinationDefinition: { - Config: { cdkEnabled: true }, + Config: { cdkV2Enabled: true }, DisplayName: 'Kochava', ID: '1WTpBSTiL3iAUHUdW7rHT4sawgU', Name: 'KOCHAVA', @@ -1182,6 +1262,10 @@ export const data = [ userId: '00000000000000000000000000', }, statusCode: 200, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, }, ], }, @@ -1222,10 +1306,14 @@ export const data = [ integrations: { All: true }, sentAt: '2019-10-14T09:03:22.563Z', }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, destination: { Config: { apiKey: '' }, DestinationDefinition: { - Config: { cdkEnabled: true }, + Config: { cdkV2Enabled: true }, DisplayName: 'Kochava', ID: '1WTpBSTiL3iAUHUdW7rHT4sawgU', Name: 'KOCHAVA', @@ -1289,6 +1377,10 @@ export const data = [ userId: '00000000000000000000000000', }, statusCode: 200, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, }, ], }, @@ -1329,10 +1421,14 @@ export const data = [ integrations: { All: true }, sentAt: '2019-10-14T09:03:22.563Z', }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, destination: { Config: { apiKey: '' }, DestinationDefinition: { - Config: { cdkEnabled: true }, + Config: { cdkV2Enabled: true }, DisplayName: 'Kochava', ID: '1WTpBSTiL3iAUHUdW7rHT4sawgU', Name: 'KOCHAVA', @@ -1396,6 +1492,10 @@ export const data = [ userId: '00000000000000000000000000', }, statusCode: 200, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, }, ], }, diff --git a/test/integrations/destinations/launchdarkly_audience/processor/data.ts b/test/integrations/destinations/launchdarkly_audience/processor/data.ts new file mode 100644 index 0000000000..b26cf60f4c --- /dev/null +++ b/test/integrations/destinations/launchdarkly_audience/processor/data.ts @@ -0,0 +1,611 @@ +export const data = [ + { + name: 'launchdarkly_audience', + description: 'Unsupported event type', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user123', + type: 'abc', + properties: { + listData: { + add: [ + { + identifier: 'alex@email.com', + }, + { + identifier: 'ryan@email.com', + }, + { + identifier: 'van@email.com', + }, + ], + }, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + Config: { + audienceId: 'test-audienceId', + audienceName: 'test-audienceName', + accessToken: 'test-accessToken', + clientSideId: 'test-clientSideId', + }, + DestinationDefinition: { Config: { cdkV2Enabled: true } }, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 400, + error: + 'Event type abc is not supported. Aborting message.: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: Event type abc is not supported. Aborting message.', + statTags: { + destType: 'LAUNCHDARKLY_AUDIENCE', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'cdkV2', + module: 'destination', + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + }, + { + name: 'launchdarkly_audience', + description: 'List data is not passed', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user123', + type: 'audiencelist', + properties: {}, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + Config: { + audienceId: 'test-audienceId', + audienceName: 'test-audienceName', + accessToken: 'test-accessToken', + clientSideId: 'test-clientSideId', + }, + DestinationDefinition: { Config: { cdkV2Enabled: true } }, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 400, + error: + '`listData` is not present inside properties. Aborting message.: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: `listData` is not present inside properties. Aborting message.', + statTags: { + destType: 'LAUNCHDARKLY_AUDIENCE', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'cdkV2', + module: 'destination', + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + }, + { + name: 'launchdarkly_audience', + description: 'List data is empty', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user123', + type: 'audiencelist', + properties: { + listData: {}, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + Config: { + audienceId: 'test-audienceId', + audienceName: 'test-audienceName', + accessToken: 'test-accessToken', + clientSideId: 'test-clientSideId', + }, + DestinationDefinition: { Config: { cdkV2Enabled: true } }, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 400, + error: + '`listData` is empty. Aborting message.: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: `listData` is empty. Aborting message.', + statTags: { + destType: 'LAUNCHDARKLY_AUDIENCE', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'cdkV2', + module: 'destination', + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + }, + { + name: 'launchdarkly_audience', + description: 'Unsupported action type', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user123', + type: 'audiencelist', + properties: { + listData: { + update: [ + { + identifier: 'alex@email.com', + }, + ], + }, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + Config: { + audienceId: 'test-audienceId', + audienceName: 'test-audienceName', + accessToken: 'test-accessToken', + clientSideId: 'test-clientSideId', + }, + DestinationDefinition: { Config: { cdkV2Enabled: true } }, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 400, + error: + 'Unsupported action type. Aborting message.: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: Unsupported action type. Aborting message.', + statTags: { + destType: 'LAUNCHDARKLY_AUDIENCE', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'cdkV2', + module: 'destination', + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + }, + { + name: 'launchdarkly_audience', + description: 'Add members to the audience list', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user123', + type: 'audiencelist', + properties: { + listData: { + add: [ + { + identifier: 'alex@email.com', + }, + { + identifier: 'ryan@email.com', + }, + { + identifier: 'van@email.com', + }, + ], + }, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + Config: { + audienceId: 'test-audienceId', + audienceName: 'test-audienceName', + accessToken: 'test-accessToken', + clientSideId: 'test-clientSideId', + }, + DestinationDefinition: { Config: { cdkV2Enabled: true } }, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 200, + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://app.launchdarkly.com/api/v2/segment-targets/rudderstack', + headers: { + Authorization: 'test-accessToken', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + environmentId: 'test-clientSideId', + cohortId: 'test-audienceId', + cohortName: 'test-audienceName', + listData: { + add: [ + { + id: 'alex@email.com', + }, + { + id: 'ryan@email.com', + }, + { + id: 'van@email.com', + }, + ], + remove: [], + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + }, + ], + }, + }, + }, + { + name: 'launchdarkly_audience', + description: 'Remove members from the audience list', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user123', + type: 'audiencelist', + properties: { + listData: { + remove: [ + { + identifier: 'alex@email.com', + }, + { + identifier: 'ryan@email.com', + }, + { + identifier: 'van@email.com', + }, + ], + }, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + Config: { + audienceId: 'test-audienceId', + audienceName: 'test-audienceName', + accessToken: 'test-accessToken', + clientSideId: 'test-clientSideId', + }, + DestinationDefinition: { Config: { cdkV2Enabled: true } }, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 200, + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://app.launchdarkly.com/api/v2/segment-targets/rudderstack', + headers: { + Authorization: 'test-accessToken', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + environmentId: 'test-clientSideId', + cohortId: 'test-audienceId', + cohortName: 'test-audienceName', + listData: { + remove: [ + { + id: 'alex@email.com', + }, + { + id: 'ryan@email.com', + }, + { + id: 'van@email.com', + }, + ], + add: [], + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + }, + ], + }, + }, + }, + { + name: 'launchdarkly_audience', + description: 'Add/Remove members', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user123', + type: 'audiencelist', + properties: { + listData: { + add: [ + { + identifier: 'alex@email.com', + }, + { + userId: 'user1', + }, + ], + remove: [ + { + identifier: 'ryan@email.com', + }, + { + identifier: 'van@email.com', + }, + ], + }, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + Config: { + audienceId: 'test-audienceId', + audienceName: 'test-audienceName', + accessToken: 'test-accessToken', + clientSideId: 'test-clientSideId', + }, + DestinationDefinition: { Config: { cdkV2Enabled: true } }, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 200, + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://app.launchdarkly.com/api/v2/segment-targets/rudderstack', + headers: { + Authorization: 'test-accessToken', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + environmentId: 'test-clientSideId', + cohortId: 'test-audienceId', + cohortName: 'test-audienceName', + listData: { + add: [ + { + id: 'alex@email.com', + }, + ], + remove: [ + { + id: 'ryan@email.com', + }, + { + id: 'van@email.com', + }, + ], + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + }, + ], + }, + }, + }, +]; diff --git a/test/integrations/destinations/lytics/processor/data.ts b/test/integrations/destinations/lytics/processor/data.ts index e04b1aa413..344eecc3cd 100644 --- a/test/integrations/destinations/lytics/processor/data.ts +++ b/test/integrations/destinations/lytics/processor/data.ts @@ -112,12 +112,16 @@ export const data = [ userId: 'rudder123', }, destination: { - DestinationDefinition: { Config: { cdkEnabled: true } }, + DestinationDefinition: { Config: { cdkV2Enabled: true } }, Config: { apiKey: 'dummyApiKey', stream: 'default' }, Enabled: true, Transformations: [], IsProcessorEnabled: true, }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, }, ], method: 'POST', @@ -197,6 +201,10 @@ export const data = [ files: {}, userId: '', }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, statusCode: 200, }, ], @@ -255,12 +263,16 @@ export const data = [ userId: 'rudder123', }, destination: { - DestinationDefinition: { Config: { cdkEnabled: true } }, + DestinationDefinition: { Config: { cdkV2Enabled: true } }, Config: { apiKey: 'dummyApiKey', stream: 'default' }, Enabled: true, Transformations: [], IsProcessorEnabled: true, }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, }, ], method: 'POST', @@ -295,6 +307,10 @@ export const data = [ files: {}, userId: '', }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, statusCode: 200, }, ], @@ -361,12 +377,16 @@ export const data = [ userId: 'rudder123', }, destination: { - DestinationDefinition: { Config: { cdkEnabled: true } }, + DestinationDefinition: { Config: { cdkV2Enabled: true } }, Config: { apiKey: 'dummyApiKey', stream: 'default' }, Enabled: true, Transformations: [], IsProcessorEnabled: true, }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, }, ], method: 'POST', @@ -401,6 +421,10 @@ export const data = [ files: {}, userId: '', }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, statusCode: 200, }, ], @@ -459,12 +483,17 @@ export const data = [ userId: 'rudder123', }, destination: { - DestinationDefinition: { Config: { cdkEnabled: true } }, + ID: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', + DestinationDefinition: { Config: { cdkV2Enabled: true } }, Config: { apiKey: 'dummyApiKey', stream: 'default' }, Enabled: true, Transformations: [], IsProcessorEnabled: true, }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, }, ], method: 'POST', @@ -500,6 +529,10 @@ export const data = [ userId: '', }, statusCode: 200, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, }, ], }, @@ -557,12 +590,16 @@ export const data = [ userId: 'rudder123', }, destination: { - DestinationDefinition: { Config: { cdkEnabled: true } }, + DestinationDefinition: { Config: { cdkV2Enabled: true } }, Config: { apiKey: 'dummyApiKey', stream: 'default' }, Enabled: true, Transformations: [], IsProcessorEnabled: true, }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, }, ], method: 'POST', @@ -598,6 +635,10 @@ export const data = [ userId: '', }, statusCode: 200, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, }, ], }, @@ -655,12 +696,16 @@ export const data = [ userId: 'rudder123', }, destination: { - DestinationDefinition: { Config: { cdkEnabled: true } }, + DestinationDefinition: { Config: { cdkV2Enabled: true } }, Config: { apiKey: 'dummyApiKey', stream: 'default' }, Enabled: true, Transformations: [], IsProcessorEnabled: true, }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, }, ], method: 'POST', @@ -696,6 +741,10 @@ export const data = [ userId: '', }, statusCode: 200, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, }, ], }, @@ -753,7 +802,7 @@ export const data = [ }, metadata: { destinationID: 'ewksfdgDFSdvzsdmwsdfvcxj' }, destination: { - DestinationDefinition: { Config: { cdkEnabled: true } }, + DestinationDefinition: { Config: { cdkV2Enabled: true } }, Config: { apiKey: 'dummyApiKey', stream: 'default' }, Enabled: true, Transformations: [], @@ -771,13 +820,14 @@ export const data = [ body: [ { error: - 'Unknown error occurred. Original error: "type" is a required field and it must be a string', + 'message Type is not present. Aborting message.: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: message Type is not present. Aborting message.', metadata: { destinationID: 'ewksfdgDFSdvzsdmwsdfvcxj' }, statTags: { destType: 'LYTICS', - errorCategory: 'transformation', + errorCategory: 'dataValidation', + errorType: 'instrumentation', feature: 'processor', - implementation: 'cdkV1', + implementation: 'cdkV2', module: 'destination', }, statusCode: 400, @@ -839,7 +889,7 @@ export const data = [ }, metadata: { destinationID: 'ewksfdgDFSdvzsdmwsdfvcxj' }, destination: { - DestinationDefinition: { Config: { cdkEnabled: true } }, + DestinationDefinition: { Config: { cdkV2Enabled: true } }, Config: { apiKey: 'dummyApiKey', stream: 'default' }, Enabled: true, Transformations: [], @@ -856,14 +906,15 @@ export const data = [ status: 200, body: [ { - error: 'Bad event. Original error: message type "gone" not supported for "lytics"', + error: + 'message type gone is not supported: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: message type gone is not supported', metadata: { destinationID: 'ewksfdgDFSdvzsdmwsdfvcxj' }, statTags: { destType: 'LYTICS', errorCategory: 'dataValidation', errorType: 'instrumentation', feature: 'processor', - implementation: 'cdkV1', + implementation: 'cdkV2', module: 'destination', }, statusCode: 400, @@ -984,12 +1035,16 @@ export const data = [ userId: 'rudder123', }, destination: { - DestinationDefinition: { Config: { cdkEnabled: true } }, + DestinationDefinition: { Config: { cdkV2Enabled: true } }, Config: { apiKey: 'dummyApiKey', stream: 'default' }, Enabled: true, Transformations: [], IsProcessorEnabled: true, }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, }, ], method: 'POST', @@ -1070,6 +1125,10 @@ export const data = [ userId: '', }, statusCode: 200, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, }, ], }, @@ -1119,12 +1178,16 @@ export const data = [ destination_props: { AF: { af_uid: 'afUid' } }, }, destination: { - DestinationDefinition: { Config: { cdkEnabled: true } }, + DestinationDefinition: { Config: { cdkV2Enabled: true } }, Config: { apiKey: 'dummyApiKey', stream: 'default' }, Enabled: true, Transformations: [], IsProcessorEnabled: true, }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, }, ], method: 'POST', @@ -1160,6 +1223,10 @@ export const data = [ userId: '', }, statusCode: 200, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, }, ], }, @@ -1209,12 +1276,16 @@ export const data = [ destination_props: { AF: { af_uid: 'afUid' } }, }, destination: { - DestinationDefinition: { Config: { cdkEnabled: true } }, + DestinationDefinition: { Config: { cdkV2Enabled: true } }, Config: { apiKey: 'dummyApiKey', stream: 'default' }, Enabled: true, Transformations: [], IsProcessorEnabled: true, }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, }, ], method: 'POST', @@ -1250,6 +1321,10 @@ export const data = [ userId: '', }, statusCode: 200, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, }, ], }, @@ -1309,12 +1384,16 @@ export const data = [ userId: 'rudder123', }, destination: { - DestinationDefinition: { Config: { cdkEnabled: true } }, + DestinationDefinition: { Config: { cdkV2Enabled: true } }, Config: { apiKey: 'dummyApiKey', stream: 'default' }, Enabled: true, Transformations: [], IsProcessorEnabled: true, }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, }, ], method: 'POST', @@ -1352,6 +1431,10 @@ export const data = [ userId: '', }, statusCode: 200, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, }, ], }, diff --git a/test/integrations/destinations/new_relic/processor/data.ts b/test/integrations/destinations/new_relic/processor/data.ts new file mode 100644 index 0000000000..7eb4099e3b --- /dev/null +++ b/test/integrations/destinations/new_relic/processor/data.ts @@ -0,0 +1,882 @@ +export const data = [ + { + name: 'new_relic', + description: 'Test 0', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + event: 'first', + userId: 'identified user id', + type: 'track', + anonymousId: 'anon-id-new', + context: { + traits: { + trait1: 'new-val', + }, + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + properties: { + abc: '123', + key: { + abc: 123, + }, + array: [ + { + abc: 123, + }, + { + def: 123, + }, + ], + }, + timestamp: '2020-02-02T00:23:09.544Z', + sentAt: '2020-02-02T00:23:09.544Z', + originalTimestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + Config: { + accountId: '12345', + insertKey: '11111122702j2a2U2K2C7H', + customEventType: '', + sendDeviceContext: true, + sendUserIdanonymousId: true, + dataCenter: 'us', + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://insights-collector.newrelic.com/v1/accounts/12345/events', + headers: { + 'Api-Key': '11111122702j2a2U2K2C7H', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + event: 'first', + abc: '123', + 'key.abc': 123, + 'array[0].abc': 123, + 'array[1].def': 123, + timestamp: 1580602989, + eventType: 'rudderstack', + userId: 'identified user id', + anonymousId: 'anon-id-new', + 'traits.trait1': 'new-val', + ip: '14.5.67.21', + 'library.name': 'http', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'new_relic', + description: 'Test 1', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + event: 'second', + userId: 'identified user id', + type: 'track', + anonymousId: 'anon-id-new', + context: { + traits: { + trait1: 'new-val', + }, + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + properties: { + abc: '123', + key: { + abc: 123, + }, + array: [ + { + abc: 123, + }, + { + def: 'test', + }, + ], + }, + timestamp: '2020-02-02T00:23:09.544Z', + sentAt: '2020-02-02T00:23:09.544Z', + originalTimestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + Config: { + accountId: '12345', + insertKey: '11111122702j2a2U2K2C7H', + customEventType: '', + sendDeviceContext: false, + sendUserIdanonymousId: false, + dataCenter: 'us', + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://insights-collector.newrelic.com/v1/accounts/12345/events', + headers: { + 'Api-Key': '11111122702j2a2U2K2C7H', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + event: 'second', + abc: '123', + 'key.abc': 123, + 'array[0].abc': 123, + 'array[1].def': 'test', + timestamp: 1580602989, + eventType: 'rudderstack', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'new_relic', + description: 'Test 2', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + event: 'test', + userId: 'identified user id', + type: 'track', + anonymousId: 'anon-id-new', + context: { + traits: { + trait1: 'new-val', + }, + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + properties: { + abc: '123', + key: { + abc: 123, + }, + array: [ + { + abc: 123, + }, + { + def: 123, + }, + ], + }, + timestamp: '2020-02-02T00:23:09.544Z', + sentAt: '2020-02-02T00:23:09.544Z', + originalTimestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + Config: { + accountId: '12345', + insertKey: '11111122702j2a2U2K2C7H', + customEventType: 'rudder-testing', + sendDeviceContext: false, + sendUserIdanonymousId: false, + dataCenter: 'us', + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://insights-collector.newrelic.com/v1/accounts/12345/events', + headers: { + 'Api-Key': '11111122702j2a2U2K2C7H', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + event: 'test', + abc: '123', + 'key.abc': 123, + 'array[0].abc': 123, + 'array[1].def': 123, + timestamp: 1580602989, + eventType: 'rudder-testing', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'new_relic', + description: 'Test 3', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + event: 'first', + userId: 'identified user id', + type: 'track', + anonymousId: 'anon-id-new', + context: { + traits: { + trait1: 'new-val', + }, + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + properties: { + abc: '123', + key: { + abc: 123, + }, + array: [ + { + abc: 123, + }, + { + def: 123, + }, + ], + }, + timestamp: '2020-02-02T00:23:09.544Z', + sentAt: '2020-02-02T00:23:09.544Z', + originalTimestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + Config: { + accountId: '12345', + insertKey: '11111122702j2a2U2K2C7H', + customEventType: '', + sendDeviceContext: true, + sendUserIdanonymousId: true, + dataCenter: 'eu', + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://insights-collector.eu01.nr-data.net/v1/accounts/12345/events', + headers: { + 'Api-Key': '11111122702j2a2U2K2C7H', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + event: 'first', + abc: '123', + 'key.abc': 123, + 'array[0].abc': 123, + 'array[1].def': 123, + timestamp: 1580602989, + eventType: 'rudderstack', + userId: 'identified user id', + anonymousId: 'anon-id-new', + 'traits.trait1': 'new-val', + ip: '14.5.67.21', + 'library.name': 'http', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'new_relic', + description: 'Test 4', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + event: 'second', + userId: 'identified user id', + type: 'track', + anonymousId: 'anon-id-new', + context: { + traits: { + trait1: 'new-val', + }, + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + properties: { + abc: '123', + key: { + abc: 123, + }, + array: [ + { + abc: 123, + }, + { + def: 'test', + }, + ], + }, + timestamp: '2020-02-02T00:23:09.544Z', + sentAt: '2020-02-02T00:23:09.544Z', + originalTimestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + Config: { + accountId: '12345', + insertKey: '11111122702j2a2U2K2C7H', + customEventType: '', + sendDeviceContext: false, + sendUserIdanonymousId: false, + dataCenter: 'eu', + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://insights-collector.eu01.nr-data.net/v1/accounts/12345/events', + headers: { + 'Api-Key': '11111122702j2a2U2K2C7H', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + event: 'second', + abc: '123', + 'key.abc': 123, + 'array[0].abc': 123, + 'array[1].def': 'test', + timestamp: 1580602989, + eventType: 'rudderstack', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'new_relic', + description: 'Test 5', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + event: 'test', + userId: 'identified user id', + type: 'track', + anonymousId: 'anon-id-new', + context: { + traits: { + trait1: 'new-val', + }, + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + properties: { + abc: '123', + key: { + abc: 123, + }, + array: [ + { + abc: 123, + }, + { + def: 123, + }, + ], + }, + timestamp: '2020-02-02T00:23:09.544Z', + sentAt: '2020-02-02T00:23:09.544Z', + originalTimestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + Config: { + accountId: '12345', + insertKey: '11111122702j2a2U2K2C7H', + customEventType: 'rudder-testing', + sendDeviceContext: false, + sendUserIdanonymousId: true, + dataCenter: 'eu', + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://insights-collector.eu01.nr-data.net/v1/accounts/12345/events', + headers: { + 'Api-Key': '11111122702j2a2U2K2C7H', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + event: 'test', + abc: '123', + 'key.abc': 123, + 'array[0].abc': 123, + 'array[1].def': 123, + timestamp: 1580602989, + eventType: 'rudder-testing', + userId: 'identified user id', + anonymousId: 'anon-id-new', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'new_relic', + description: 'Test 6', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + event: 'test', + type: 'track', + anonymousId: 'anon-id-new', + context: { + traits: { + trait1: 'new-val', + }, + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + properties: { + abc: '123', + key: { + abc: 123, + }, + array: [ + { + abc: 123, + }, + { + def: 123, + }, + ], + }, + timestamp: '2020-02-02T00:23:09.544Z', + sentAt: '2020-02-02T00:23:09.544Z', + originalTimestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + Config: { + accountId: '12345', + insertKey: '11111122702j2a2U2K2C7H', + customEventType: '', + sendDeviceContext: true, + sendUserIdanonymousId: true, + dataCenter: 'us', + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://insights-collector.newrelic.com/v1/accounts/12345/events', + headers: { + 'Api-Key': '11111122702j2a2U2K2C7H', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + event: 'test', + abc: '123', + 'key.abc': 123, + 'array[0].abc': 123, + 'array[1].def': 123, + timestamp: 1580602989, + eventType: 'rudderstack', + anonymousId: 'anon-id-new', + 'traits.trait1': 'new-val', + ip: '14.5.67.21', + 'library.name': 'http', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'new_relic', + description: 'Test 7', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + event: 'first', + userId: 'identified user id', + type: 'identify', + anonymousId: 'anon-id-new', + context: { + traits: { + trait1: 'new-val', + }, + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + traits: { + abc: '123', + key: { + abc: 123, + }, + array: [ + { + abc: 123, + }, + { + def: 123, + }, + ], + }, + timestamp: '2020-02-02T00:23:09.544Z', + sentAt: '2020-02-02T00:23:09.544Z', + originalTimestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + Config: { + accountId: '12345', + insertKey: '11111122702j2a2U2K2C7H', + customEventType: '', + sendDeviceContext: true, + sendUserIdanonymousId: true, + dataCenter: 'us', + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 400, + error: + 'message type identify is not supported: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: message type identify is not supported', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + implementation: 'cdkV2', + destType: 'NEW_RELIC', + module: 'destination', + feature: 'processor', + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + }, +]; diff --git a/test/integrations/destinations/optimizely_fullstack/processor/data.ts b/test/integrations/destinations/optimizely_fullstack/processor/data.ts index 09749178ee..52fbdfe5fe 100644 --- a/test/integrations/destinations/optimizely_fullstack/processor/data.ts +++ b/test/integrations/destinations/optimizely_fullstack/processor/data.ts @@ -55,7 +55,8 @@ export const data = [ 'Data File Url is not present. Aborting: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: Data File Url is not present. Aborting', statTags: { destType: 'OPTIMIZELY_FULLSTACK', - errorCategory: 'platform', + errorCategory: 'dataValidation', + errorType: 'configuration', feature: 'processor', implementation: 'cdkV2', module: 'destination', @@ -121,7 +122,8 @@ export const data = [ 'Variation ID is not present in the integrations object: Workflow: procWorkflow, Step: validateInputForIdentify, ChildStep: undefined, OriginalError: Variation ID is not present in the integrations object', statTags: { destType: 'OPTIMIZELY_FULLSTACK', - errorCategory: 'platform', + errorCategory: 'dataValidation', + errorType: 'instrumentation', feature: 'processor', implementation: 'cdkV2', module: 'destination', @@ -186,7 +188,8 @@ export const data = [ 'Account ID is not present. Aborting: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: Account ID is not present. Aborting', statTags: { destType: 'OPTIMIZELY_FULLSTACK', - errorCategory: 'platform', + errorCategory: 'dataValidation', + errorType: 'configuration', feature: 'processor', implementation: 'cdkV2', module: 'destination', @@ -251,7 +254,8 @@ export const data = [ 'Campaign ID is not present. Aborting: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: Campaign ID is not present. Aborting', statTags: { destType: 'OPTIMIZELY_FULLSTACK', - errorCategory: 'platform', + errorCategory: 'dataValidation', + errorType: 'configuration', feature: 'processor', implementation: 'cdkV2', module: 'destination', @@ -316,7 +320,8 @@ export const data = [ 'Experiment ID is not present. Aborting: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: Experiment ID is not present. Aborting', statTags: { destType: 'OPTIMIZELY_FULLSTACK', - errorCategory: 'platform', + errorCategory: 'dataValidation', + errorType: 'configuration', feature: 'processor', implementation: 'cdkV2', module: 'destination', @@ -388,7 +393,8 @@ export const data = [ "Both 'Track Categorized Pages' and 'Track Named Pages' toggles are disabled in webapp. Please enable at one of them to send page/screen events to Optimizely.: Workflow: procWorkflow, Step: validateInputForPageAndScreen, ChildStep: undefined, OriginalError: Both 'Track Categorized Pages' and 'Track Named Pages' toggles are disabled in webapp. Please enable at one of them to send page/screen events to Optimizely.", statTags: { destType: 'OPTIMIZELY_FULLSTACK', - errorCategory: 'platform', + errorCategory: 'dataValidation', + errorType: 'configuration', feature: 'processor', implementation: 'cdkV2', module: 'destination', @@ -467,7 +473,8 @@ export const data = [ "UserId is required for event tracking when the 'Track Known Users' setting is enabled. Please include a 'userId' in your event payload: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: UserId is required for event tracking when the 'Track Known Users' setting is enabled. Please include a 'userId' in your event payload", statTags: { destType: 'OPTIMIZELY_FULLSTACK', - errorCategory: 'platform', + errorCategory: 'dataValidation', + errorType: 'configuration', feature: 'processor', implementation: 'cdkV2', module: 'destination', @@ -530,7 +537,8 @@ export const data = [ 'Event is not present. Aborting.: Workflow: procWorkflow, Step: validateInputForTrack, ChildStep: undefined, OriginalError: Event is not present. Aborting.', statTags: { destType: 'OPTIMIZELY_FULLSTACK', - errorCategory: 'platform', + errorCategory: 'dataValidation', + errorType: 'instrumentation', feature: 'processor', implementation: 'cdkV2', module: 'destination', @@ -591,15 +599,16 @@ export const data = [ body: [ { error: - '{"message":"Data File Lookup Failed due to {\\"code\\":\\"document_not_found\\",\\"message\\":\\"document_not_found\\"}: Workflow: procWorkflow, Step: dataFile, ChildStep: undefined, OriginalError: Data File Lookup Failed due to {\\"code\\":\\"document_not_found\\",\\"message\\":\\"document_not_found\\"}","destinationResponse":{"code":"document_not_found","message":"document_not_found"}}', + '{"message":"{\\"message\\":\\"Data File Lookup Failed due to {\\\\\\"code\\\\\\":\\\\\\"document_not_found\\\\\\",\\\\\\"message\\\\\\":\\\\\\"document_not_found\\\\\\"}: Workflow: procWorkflow, Step: dataFile, ChildStep: undefined, OriginalError: Data File Lookup Failed due to {\\\\\\"code\\\\\\":\\\\\\"document_not_found\\\\\\",\\\\\\"message\\\\\\":\\\\\\"document_not_found\\\\\\"}\\",\\"destinationResponse\\":{\\"code\\":\\"document_not_found\\",\\"message\\":\\"document_not_found\\"}}","destinationResponse":{"code":"document_not_found","message":"document_not_found"}}', statTags: { destType: 'OPTIMIZELY_FULLSTACK', - errorCategory: 'platform', + errorCategory: 'network', + errorType: 'aborted', feature: 'processor', implementation: 'cdkV2', module: 'destination', }, - statusCode: 400, + statusCode: 404, metadata: { jobId: 10, }, @@ -670,7 +679,8 @@ export const data = [ "Event 'product_added' is not present in data file. Make sure event exists in Optimizely.: Workflow: procWorkflow, Step: prepareTrackPayload, ChildStep: optimizelyEvent, OriginalError: Event 'product_added' is not present in data file. Make sure event exists in Optimizely.", statTags: { destType: 'OPTIMIZELY_FULLSTACK', - errorCategory: 'platform', + errorCategory: 'dataValidation', + errorType: 'instrumentation', feature: 'processor', implementation: 'cdkV2', module: 'destination', @@ -1162,7 +1172,8 @@ export const data = [ metadata: { jobId: 15 }, statTags: { destType: 'OPTIMIZELY_FULLSTACK', - errorCategory: 'platform', + errorCategory: 'dataValidation', + errorType: 'instrumentation', feature: 'processor', implementation: 'cdkV2', module: 'destination', diff --git a/test/integrations/destinations/ortto/processor/data.ts b/test/integrations/destinations/ortto/processor/data.ts index 9c3d00b874..e7c71c7355 100644 --- a/test/integrations/destinations/ortto/processor/data.ts +++ b/test/integrations/destinations/ortto/processor/data.ts @@ -347,7 +347,8 @@ export const data = [ { statTags: { destType: 'ORTTO', - errorCategory: 'platform', + errorCategory: 'dataValidation', + errorType: 'instrumentation', feature: 'processor', implementation: 'cdkV2', module: 'destination', @@ -505,7 +506,8 @@ export const data = [ { statTags: { destType: 'ORTTO', - errorCategory: 'platform', + errorCategory: 'dataValidation', + errorType: 'instrumentation', feature: 'processor', implementation: 'cdkV2', module: 'destination', @@ -667,7 +669,8 @@ export const data = [ { statTags: { destType: 'ORTTO', - errorCategory: 'platform', + errorCategory: 'dataValidation', + errorType: 'configuration', feature: 'processor', implementation: 'cdkV2', module: 'destination', @@ -829,7 +832,8 @@ export const data = [ { statTags: { destType: 'ORTTO', - errorCategory: 'platform', + errorCategory: 'dataValidation', + errorType: 'configuration', feature: 'processor', implementation: 'cdkV2', module: 'destination', @@ -1216,7 +1220,8 @@ export const data = [ { statTags: { destType: 'ORTTO', - errorCategory: 'platform', + errorCategory: 'dataValidation', + errorType: 'instrumentation', feature: 'processor', implementation: 'cdkV2', module: 'destination', diff --git a/test/integrations/destinations/pinterest_tag/processor/data.ts b/test/integrations/destinations/pinterest_tag/processor/data.ts index 2887ee8cb9..17ab83b2e9 100644 --- a/test/integrations/destinations/pinterest_tag/processor/data.ts +++ b/test/integrations/destinations/pinterest_tag/processor/data.ts @@ -564,7 +564,8 @@ export const data = [ metadata: { destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq' }, statTags: { destType: 'PINTEREST_TAG', - errorCategory: 'platform', + errorCategory: 'dataValidation', + errorType: 'configuration', feature: 'processor', implementation: 'cdkV2', module: 'destination', @@ -681,7 +682,8 @@ export const data = [ 'It is required at least one of em, hashed_maids or pair of client_ip_address and client_user_agent: Workflow: procWorkflow, Step: validateUserFields, ChildStep: undefined, OriginalError: It is required at least one of em, hashed_maids or pair of client_ip_address and client_user_agent', statTags: { destType: 'PINTEREST_TAG', - errorCategory: 'platform', + errorCategory: 'dataValidation', + errorType: 'instrumentation', feature: 'processor', implementation: 'cdkV2', module: 'destination', @@ -960,7 +962,8 @@ export const data = [ metadata: { destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq' }, statTags: { destType: 'PINTEREST_TAG', - errorCategory: 'platform', + errorCategory: 'dataValidation', + errorType: 'configuration', feature: 'processor', implementation: 'cdkV2', module: 'destination', @@ -1079,7 +1082,8 @@ export const data = [ metadata: { destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq' }, statTags: { destType: 'PINTEREST_TAG', - errorCategory: 'platform', + errorCategory: 'dataValidation', + errorType: 'instrumentation', feature: 'processor', implementation: 'cdkV2', module: 'destination', @@ -1199,7 +1203,8 @@ export const data = [ 'Action source must be one of app_android, app_ios, web, offline: Workflow: procWorkflow, Step: validateCommonFields, ChildStep: undefined, OriginalError: Action source must be one of app_android, app_ios, web, offline', statTags: { destType: 'PINTEREST_TAG', - errorCategory: 'platform', + errorCategory: 'dataValidation', + errorType: 'instrumentation', feature: 'processor', implementation: 'cdkV2', module: 'destination', @@ -3236,7 +3241,8 @@ export const data = [ metadata: { destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq' }, statTags: { destType: 'PINTEREST_TAG', - errorCategory: 'platform', + errorCategory: 'dataValidation', + errorType: 'configuration', feature: 'processor', implementation: 'cdkV2', module: 'destination', @@ -3323,7 +3329,8 @@ export const data = [ metadata: { destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq' }, statTags: { destType: 'PINTEREST_TAG', - errorCategory: 'platform', + errorCategory: 'dataValidation', + errorType: 'configuration', feature: 'processor', implementation: 'cdkV2', module: 'destination', @@ -3550,7 +3557,8 @@ export const data = [ metadata: { destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq' }, statTags: { destType: 'PINTEREST_TAG', - errorCategory: 'platform', + errorCategory: 'dataValidation', + errorType: 'instrumentation', feature: 'processor', implementation: 'cdkV2', module: 'destination', diff --git a/test/integrations/destinations/userlist/processor/data.ts b/test/integrations/destinations/userlist/processor/data.ts new file mode 100644 index 0000000000..f07006b186 --- /dev/null +++ b/test/integrations/destinations/userlist/processor/data.ts @@ -0,0 +1,894 @@ +export const data = [ + { + name: 'userlist', + description: 'Test 0', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + Config: { + pushKey: 'userlist-push-key', + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + anonymousId: '123456', + email: 'test@rudderstack.com', + address: { + city: 'kolkata', + country: 'India', + postalCode: 712136, + state: 'WB', + street: '', + }, + ip: '0.0.0.0', + age: 26, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + user_properties: { + prop1: 'val1', + prop2: 'val2', + }, + type: 'identify', + messageId: '84e26acc-56a5-4835-8233-591137fca468', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: '123456', + userId: '123456', + integrations: { + All: true, + }, + traits: { + anonymousId: 'anon-id', + email: 'test@gmail.com', + address: { + city: 'NY', + country: 'USA', + postalCode: 712136, + state: 'CA', + street: '', + }, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + JSON_ARRAY: {}, + JSON: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + anonymousId: '123456', + email: 'test@rudderstack.com', + address: { + city: 'kolkata', + country: 'India', + postalCode: 712136, + state: 'WB', + street: '', + }, + ip: '0.0.0.0', + age: 26, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + user_properties: { + prop1: 'val1', + prop2: 'val2', + }, + type: 'identify', + messageId: '84e26acc-56a5-4835-8233-591137fca468', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: '123456', + userId: '123456', + integrations: { + All: true, + }, + traits: { + anonymousId: 'anon-id', + email: 'test@gmail.com', + address: { + city: 'NY', + country: 'USA', + postalCode: 712136, + state: 'CA', + street: '', + }, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + FORM: {}, + }, + files: {}, + endpoint: 'https://incoming.userlist.com/rudderstack/events', + headers: { + Authorization: 'Push userlist-push-key', + 'Content-Type': 'application/json', + }, + version: '1', + params: {}, + type: 'REST', + method: 'POST', + userId: '', + }, + statusCode: 200, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + }, + { + name: 'userlist', + description: 'Test 1', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + Config: { + pushKey: 'userlist-push-key', + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.5', + }, + traits: { + name: 'Shehan Study', + category: 'SampleIdentify', + email: 'test@rudderstack.com', + plan: 'Open source', + logins: 5, + createdAt: 1599264000, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.5', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36', + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 0.8999999761581421, + }, + campaign: { + source: 'google', + medium: 'medium', + term: 'keyword', + content: 'some content', + name: 'some campaign', + test: 'other value', + }, + page: { + path: '/html/sajal.html', + referrer: '', + search: + '?utm_source=google&utm_medium=medium&utm_term=keyword&utm_content=some%20content&utm_campaign=some%20campaign&utm_test=other%20value', + title: '', + url: 'http://localhost:9116/html/sajal.html?utm_source=google&utm_medium=medium&utm_term=keyword&utm_content=some%20content&utm_campaign=some%20campaign&utm_test=other%20value', + }, + }, + type: 'group', + messageId: 'e5034df0-a404-47b4-a463-76df99934fea', + originalTimestamp: '2020-10-20T07:54:58.983Z', + anonymousId: 'my-anonymous-id-new', + userId: 'sampleusrRudder3', + integrations: { + All: true, + }, + groupId: 'Sample_groupId23', + traits: { + KEY_3: { + CHILD_KEY_92: 'value_95', + CHILD_KEY_102: 'value_103', + }, + KEY_2: { + CHILD_KEY_92: 'value_95', + CHILD_KEY_102: 'value_103', + }, + name_trait: 'Company', + value_trait: ['Comapny-ABC'], + }, + sentAt: '2020-10-20T07:54:58.983Z', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + JSON_ARRAY: {}, + JSON: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.5', + }, + traits: { + name: 'Shehan Study', + category: 'SampleIdentify', + email: 'test@rudderstack.com', + plan: 'Open source', + logins: 5, + createdAt: 1599264000, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.5', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36', + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 0.8999999761581421, + }, + campaign: { + source: 'google', + medium: 'medium', + term: 'keyword', + content: 'some content', + name: 'some campaign', + test: 'other value', + }, + page: { + path: '/html/sajal.html', + referrer: '', + search: + '?utm_source=google&utm_medium=medium&utm_term=keyword&utm_content=some%20content&utm_campaign=some%20campaign&utm_test=other%20value', + title: '', + url: 'http://localhost:9116/html/sajal.html?utm_source=google&utm_medium=medium&utm_term=keyword&utm_content=some%20content&utm_campaign=some%20campaign&utm_test=other%20value', + }, + }, + type: 'group', + messageId: 'e5034df0-a404-47b4-a463-76df99934fea', + originalTimestamp: '2020-10-20T07:54:58.983Z', + anonymousId: 'my-anonymous-id-new', + userId: 'sampleusrRudder3', + integrations: { + All: true, + }, + groupId: 'Sample_groupId23', + traits: { + KEY_3: { + CHILD_KEY_92: 'value_95', + CHILD_KEY_102: 'value_103', + }, + KEY_2: { + CHILD_KEY_92: 'value_95', + CHILD_KEY_102: 'value_103', + }, + name_trait: 'Company', + value_trait: ['Comapny-ABC'], + }, + sentAt: '2020-10-20T07:54:58.983Z', + }, + FORM: {}, + }, + files: {}, + endpoint: 'https://incoming.userlist.com/rudderstack/events', + headers: { + Authorization: 'Push userlist-push-key', + 'Content-Type': 'application/json', + }, + version: '1', + params: {}, + type: 'REST', + method: 'POST', + userId: '', + }, + statusCode: 200, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + }, + { + name: 'userlist', + description: 'Test 2', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + Config: { + pushKey: 'userlist-push-key', + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'test@rudderstack.com', + anonymousId: '12345', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + type: 'track', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2019-10-14T11:15:18.300Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + event: 'test track event', + properties: { + user_actual_role: 'system_admin', + user_actual_id: 12345, + user_time_spent: 50000, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T11:15:53.296Z', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + JSON_ARRAY: {}, + JSON: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'test@rudderstack.com', + anonymousId: '12345', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + type: 'track', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2019-10-14T11:15:18.300Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + event: 'test track event', + properties: { + user_actual_role: 'system_admin', + user_actual_id: 12345, + user_time_spent: 50000, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T11:15:53.296Z', + }, + FORM: {}, + }, + files: {}, + endpoint: 'https://incoming.userlist.com/rudderstack/events', + headers: { + Authorization: 'Push userlist-push-key', + 'Content-Type': 'application/json', + }, + version: '1', + params: {}, + type: 'REST', + method: 'POST', + userId: '', + }, + statusCode: 200, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + }, + { + name: 'userlist', + description: 'Test 2', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + Config: { + pushKey: 'userlist-push-key', + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + anonymousId: '123456', + email: 'test@rudderstack.com', + address: { + city: 'kolkata', + country: 'India', + postalCode: 712136, + state: 'WB', + street: '', + }, + ip: '0.0.0.0', + age: 26, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + user_properties: { + prop1: 'val1', + prop2: 'val2', + }, + type: 'identify', + messageId: '84e26acc-56a5-4835-8233-591137fca468', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: '123456', + integrations: { + All: true, + }, + traits: { + anonymousId: 'anon-id', + email: 'test@gmail.com', + address: { + city: 'NY', + country: 'USA', + postalCode: 712136, + state: 'CA', + street: '', + }, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: + 'userId is required: Workflow: procWorkflow, Step: preparePayload, ChildStep: undefined, OriginalError: userId is required', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'USERLIST', + module: 'destination', + implementation: 'cdkV2', + destinationId: 'destId', + workspaceId: 'wspId', + feature: 'processor', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + }, + { + name: 'userlist', + description: 'Test 2', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + Config: { + pushKey: 'userlist-push-key', + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + anonymousId: '123456', + email: 'test@rudderstack.com', + address: { + city: 'kolkata', + country: 'India', + postalCode: 712136, + state: 'WB', + street: '', + }, + ip: '0.0.0.0', + age: 26, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + user_properties: { + prop1: 'val1', + prop2: 'val2', + }, + type: 'identify', + messageId: '84e26acc-56a5-4835-8233-591137fca468', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: '123456', + integrations: { + All: true, + }, + traits: { + anonymousId: 'anon-id', + email: 'test@gmail.com', + address: { + city: 'NY', + country: 'USA', + postalCode: 712136, + state: 'CA', + street: '', + }, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: + 'userId is required: Workflow: procWorkflow, Step: preparePayload, ChildStep: undefined, OriginalError: userId is required', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'USERLIST', + module: 'destination', + implementation: 'cdkV2', + destinationId: 'destId', + workspaceId: 'wspId', + feature: 'processor', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + }, + { + name: 'userlist', + description: 'Test 2', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + Config: { + pushKey: 'userlist-push-key', + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + anonymousId: '123456', + email: 'test@rudderstack.com', + address: { + city: 'kolkata', + country: 'India', + postalCode: 712136, + state: 'WB', + street: '', + }, + ip: '0.0.0.0', + age: 26, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + user_properties: { + prop1: 'val1', + prop2: 'val2', + }, + type: 'page', + messageId: '84e26acc-56a5-4835-8233-591137fca468', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: '123456', + integrations: { + All: true, + }, + traits: { + anonymousId: 'anon-id', + email: 'test@gmail.com', + address: { + city: 'NY', + country: 'USA', + postalCode: 712136, + state: 'CA', + street: '', + }, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: + 'message type page is not supported: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: message type page is not supported', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'USERLIST', + module: 'destination', + implementation: 'cdkV2', + destinationId: 'destId', + workspaceId: 'wspId', + feature: 'processor', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + }, +]; diff --git a/test/integrations/destinations/vitally/processor/data.ts b/test/integrations/destinations/vitally/processor/data.ts new file mode 100644 index 0000000000..2c3fdd3297 --- /dev/null +++ b/test/integrations/destinations/vitally/processor/data.ts @@ -0,0 +1,300 @@ +export const data = [ + { + name: 'vitally', + description: 'Test 0', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKeyVitally: 'abc123', + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + message: { + userId: '0220c056-934e-11ed-a1eb-0242ac120002', + event: 'this is a track event', + type: 'track', + properties: { + thing: 'amazing!', + }, + originalTimestamp: '2023-01-13T09:03:17.562Z', + sentAt: '2023-01-13T09:03:17.562Z', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + FORM: {}, + JSON_ARRAY: {}, + XML: {}, + JSON: { + userId: '0220c056-934e-11ed-a1eb-0242ac120002', + event: 'this is a track event', + type: 'track', + properties: { + thing: 'amazing!', + }, + originalTimestamp: '2023-01-13T09:03:17.562Z', + sentAt: '2023-01-13T09:03:17.562Z', + }, + }, + endpoint: 'https://api.vitally.io/rudderstack', + files: {}, + params: {}, + type: 'REST', + version: '1', + method: 'POST', + userId: '', + headers: { + authorization: 'Basic abc123', + 'content-type': 'application/json', + }, + }, + statusCode: 200, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + }, + { + name: 'vitally', + description: 'Test 1', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKeyVitally: 'abc123', + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + message: { + userId: '0220c056-934e-11ed-a1eb-0242ac120002', + type: 'identify', + traits: { + name: 'Johnny Appleseed', + }, + originalTimestamp: '2023-01-13T09:03:17.562Z', + sentAt: '2023-01-13T09:03:17.562Z', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + FORM: {}, + JSON_ARRAY: {}, + XML: {}, + JSON: { + userId: '0220c056-934e-11ed-a1eb-0242ac120002', + type: 'identify', + traits: { + name: 'Johnny Appleseed', + }, + originalTimestamp: '2023-01-13T09:03:17.562Z', + sentAt: '2023-01-13T09:03:17.562Z', + }, + }, + endpoint: 'https://api.vitally.io/rudderstack', + files: {}, + params: {}, + type: 'REST', + version: '1', + method: 'POST', + userId: '', + headers: { + authorization: 'Basic abc123', + 'content-type': 'application/json', + }, + }, + statusCode: 200, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + }, + { + name: 'vitally', + description: 'Test 1', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKeyVitally: 'abc123', + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + message: { + userId: '0220c056-934e-11ed-a1eb-0242ac120002', + type: 'group', + groupId: '5de17322-934e-11ed-a1eb-0242ac120002', + originalTimestamp: '2023-01-13T09:03:17.562Z', + sentAt: '2023-01-13T09:03:17.562Z', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + FORM: {}, + JSON_ARRAY: {}, + XML: {}, + JSON: { + userId: '0220c056-934e-11ed-a1eb-0242ac120002', + type: 'group', + groupId: '5de17322-934e-11ed-a1eb-0242ac120002', + originalTimestamp: '2023-01-13T09:03:17.562Z', + sentAt: '2023-01-13T09:03:17.562Z', + }, + }, + endpoint: 'https://api.vitally.io/rudderstack', + files: {}, + params: {}, + type: 'REST', + version: '1', + method: 'POST', + userId: '', + headers: { + authorization: 'Basic abc123', + 'content-type': 'application/json', + }, + }, + statusCode: 200, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + }, + + { + name: 'vitally', + description: 'Test 1', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKeyVitally: 'abc123', + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + message: { + userId: '0220c056-934e-11ed-a1eb-0242ac120002', + type: 'page', + groupId: '5de17322-934e-11ed-a1eb-0242ac120002', + originalTimestamp: '2023-01-13T09:03:17.562Z', + sentAt: '2023-01-13T09:03:17.562Z', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: + 'message type page is not supported: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: message type page is not supported', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'VITALLY', + module: 'destination', + implementation: 'cdkV2', + destinationId: 'destId', + workspaceId: 'wspId', + feature: 'processor', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + }, +]; diff --git a/test/integrations/destinations/zapier/data.ts b/test/integrations/destinations/zapier/data.ts index 6dbabd26d8..122ffd2d1d 100644 --- a/test/integrations/destinations/zapier/data.ts +++ b/test/integrations/destinations/zapier/data.ts @@ -41,10 +41,14 @@ export const data = [ originalTimestamp: '2020-04-17T14:42:44.724Z', sentAt: '2020-04-17T14:42:44.724Z', }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, destination: { DestinationDefinition: { Config: { - cdkEnabled: true, + cdkV2Enabled: true, }, }, Config: { @@ -116,6 +120,10 @@ export const data = [ userId: '', }, statusCode: 200, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, }, ], }, @@ -163,10 +171,14 @@ export const data = [ originalTimestamp: '2020-04-17T14:42:44.724Z', sentAt: '2020-04-17T14:42:44.724Z', }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, destination: { DestinationDefinition: { Config: { - cdkEnabled: true, + cdkV2Enabled: true, }, }, Config: { @@ -247,6 +259,10 @@ export const data = [ userId: '', }, statusCode: 200, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, }, ], }, @@ -294,10 +310,14 @@ export const data = [ originalTimestamp: '2020-04-17T14:42:44.724Z', sentAt: '2020-04-17T14:42:44.724Z', }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, destination: { DestinationDefinition: { Config: { - cdkEnabled: true, + cdkV2Enabled: true, }, }, Config: { @@ -387,6 +407,10 @@ export const data = [ userId: '', }, statusCode: 200, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, }, ], }, @@ -434,10 +458,14 @@ export const data = [ originalTimestamp: '2020-04-17T14:42:44.724Z', sentAt: '2020-04-17T14:42:44.724Z', }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, destination: { DestinationDefinition: { Config: { - cdkEnabled: true, + cdkV2Enabled: true, }, }, Config: { @@ -527,6 +555,10 @@ export const data = [ userId: '', }, statusCode: 200, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, }, ], }, @@ -574,10 +606,14 @@ export const data = [ originalTimestamp: '2020-04-17T14:42:44.724Z', sentAt: '2020-04-17T14:42:44.724Z', }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, destination: { DestinationDefinition: { Config: { - cdkEnabled: true, + cdkV2Enabled: true, }, }, Config: { @@ -658,6 +694,10 @@ export const data = [ userId: '', }, statusCode: 200, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, }, ], }, From e82cef88e154d47519f0deeb60f55773f25fd3ad Mon Sep 17 00:00:00 2001 From: Sandeep Digumarty Date: Mon, 13 Nov 2023 12:08:47 +0530 Subject: [PATCH 016/135] feat: add delivery_category as part of contents, remove flattening custom_data in FB conversions (#2812) * feat: add delivery_category as part of contents, remove flattening custom_data in FB conversions * feat: update API version to v18.0 * feat: updated tests --- .../facebook_conversions/config.js | 2 +- .../facebook_conversions/transform.js | 8 +- .../facebook_conversions/utils.js | 8 +- test/__tests__/data/facebook_conversions.json | 260 ++++++++++++++++-- .../facebook_conversions_router_input.json | 4 +- .../facebook_conversions_router_output.json | 8 +- ...rsions.js => facebook_conversions.test.js} | 0 7 files changed, 254 insertions(+), 36 deletions(-) rename test/__tests__/{facebook_conversions.js => facebook_conversions.test.js} (100%) diff --git a/src/v0/destinations/facebook_conversions/config.js b/src/v0/destinations/facebook_conversions/config.js index fc04f13be6..0c1fc12e15 100644 --- a/src/v0/destinations/facebook_conversions/config.js +++ b/src/v0/destinations/facebook_conversions/config.js @@ -1,7 +1,7 @@ const { getMappingConfig } = require('../../util'); const ENDPOINT = (datasetId, accessToken) => - `https://graph.facebook.com/v17.0/${datasetId}/events?access_token=${accessToken}`; + `https://graph.facebook.com/v18.0/${datasetId}/events?access_token=${accessToken}`; const CONFIG_CATEGORIES = { USERDATA: { diff --git a/src/v0/destinations/facebook_conversions/transform.js b/src/v0/destinations/facebook_conversions/transform.js index cf11795605..1bb97b2672 100644 --- a/src/v0/destinations/facebook_conversions/transform.js +++ b/src/v0/destinations/facebook_conversions/transform.js @@ -14,7 +14,6 @@ const { EventType } = require('../../../constants'); const { constructPayload, extractCustomFields, - flattenJson, getIntegrationsObj, getValidDynamicFormConfig, simpleProcessRouterDest, @@ -73,8 +72,11 @@ const responseBuilderSimple = (message, category, destination) => { commonData.action_source = getActionSource(commonData, actionSource); let customData = {}; - customData = flattenJson( - extractCustomFields(message, customData, ['properties'], FB_CONVERSIONS_DEFAULT_EXCLUSION), + customData = extractCustomFields( + message, + customData, + ['properties'], + FB_CONVERSIONS_DEFAULT_EXCLUSION, ); customData = transformedPayloadData( diff --git a/src/v0/destinations/facebook_conversions/utils.js b/src/v0/destinations/facebook_conversions/utils.js index 32fafae3d0..26204ec61a 100644 --- a/src/v0/destinations/facebook_conversions/utils.js +++ b/src/v0/destinations/facebook_conversions/utils.js @@ -44,7 +44,11 @@ const getCategoryFromEvent = (eventName) => { return category; }; -const populateContentsAndContentIDs = (productPropertiesArray, fallbackQuantity) => { +const populateContentsAndContentIDs = ( + productPropertiesArray, + fallbackQuantity, + fallbackDeliveryCategory, +) => { const contentIds = []; const contents = []; if (Array.isArray(productPropertiesArray)) { @@ -57,6 +61,7 @@ const populateContentsAndContentIDs = (productPropertiesArray, fallbackQuantity) id: productId, quantity: productProps.quantity || fallbackQuantity || 1, item_price: productProps.price, + delivery_category: productProps.delivery_category || fallbackDeliveryCategory, }); } } @@ -142,6 +147,7 @@ const populateCustomDataBasedOnCategory = (customData, message, category, catego const { contentIds, contents } = populateContentsAndContentIDs( message.properties?.products, message.properties?.quantity, + message.properties?.delivery_category, ); const contentCategory = eventTypeCustomData.content_category; diff --git a/test/__tests__/data/facebook_conversions.json b/test/__tests__/data/facebook_conversions.json index 62d0a49c0f..cc4d9a1421 100644 --- a/test/__tests__/data/facebook_conversions.json +++ b/test/__tests__/data/facebook_conversions.json @@ -120,7 +120,7 @@ "revenue": 400, "additional_bet_index": 0 }, - "timestamp": "2023-10-15T15:46:51.693229+05:30", + "timestamp": "2023-11-12T15:46:51.693229+05:30", "type": "track" }, "destination": { @@ -201,7 +201,7 @@ "revenue": 400, "additional_bet_index": 0 }, - "timestamp": "2023-10-15T15:46:51.693229+05:30", + "timestamp": "2023-11-12T15:46:51.693229+05:30", "type": "track" }, "destination": { @@ -241,7 +241,7 @@ "version": "1", "type": "REST", "method": "POST", - "endpoint": "https://graph.facebook.com/v17.0/dummyID/events?access_token=09876", + "endpoint": "https://graph.facebook.com/v18.0/dummyID/events?access_token=09876", "headers": {}, "params": {}, "body": { @@ -250,7 +250,7 @@ "JSON_ARRAY": {}, "FORM": { "data": [ - "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"spin_result\",\"event_time\":1697365011,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"value\":400,\"currency\":\"USD\"}}" + "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"spin_result\",\"event_time\":1699784211,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"value\":400,\"currency\":\"USD\"}}" ] } }, @@ -298,7 +298,7 @@ "revenue": 400, "additional_bet_index": 0 }, - "timestamp": "2023-10-15T15:46:51.693229+05:30", + "timestamp": "2023-11-12T15:46:51.693229+05:30", "type": "track" }, "destination": { @@ -338,7 +338,7 @@ "version": "1", "type": "REST", "method": "POST", - "endpoint": "https://graph.facebook.com/v17.0/dummyID/events?access_token=09876", + "endpoint": "https://graph.facebook.com/v18.0/dummyID/events?access_token=09876", "headers": {}, "params": {}, "body": { @@ -347,7 +347,7 @@ "JSON_ARRAY": {}, "FORM": { "data": [ - "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"Search\",\"event_time\":1697365011,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"content_ids\":[],\"contents\":[],\"content_type\":\"product\",\"currency\":\"USD\",\"value\":400}}" + "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"Search\",\"event_time\":1699784211,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"content_ids\":[],\"contents\":[],\"content_type\":\"product\",\"currency\":\"USD\",\"value\":400}}" ] } }, @@ -395,7 +395,7 @@ "revenue": 400, "additional_bet_index": 0 }, - "timestamp": "2023-10-15T15:46:51.693229+05:30", + "timestamp": "2023-11-12T15:46:51.693229+05:30", "type": "track" }, "destination": { @@ -435,7 +435,7 @@ "version": "1", "type": "REST", "method": "POST", - "endpoint": "https://graph.facebook.com/v17.0/dummyID/events?access_token=09876", + "endpoint": "https://graph.facebook.com/v18.0/dummyID/events?access_token=09876", "headers": {}, "params": {}, "body": { @@ -444,7 +444,7 @@ "JSON_ARRAY": {}, "FORM": { "data": [ - "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"AddToCart\",\"event_time\":1697365011,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"content_ids\":[],\"contents\":[],\"content_type\":\"product\",\"currency\":\"USD\",\"value\":400}}" + "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"AddToCart\",\"event_time\":1699784211,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"content_ids\":[],\"contents\":[],\"content_type\":\"product\",\"currency\":\"USD\",\"value\":400}}" ] } }, @@ -492,7 +492,7 @@ "revenue": 400, "additional_bet_index": 0 }, - "timestamp": "2023-10-15T15:46:51.693229+05:30", + "timestamp": "2023-11-12T15:46:51.693229+05:30", "type": "track" }, "destination": { @@ -532,7 +532,7 @@ "version": "1", "type": "REST", "method": "POST", - "endpoint": "https://graph.facebook.com/v17.0/dummyID/events?access_token=09876", + "endpoint": "https://graph.facebook.com/v18.0/dummyID/events?access_token=09876", "headers": {}, "params": {}, "body": { @@ -541,7 +541,7 @@ "JSON_ARRAY": {}, "FORM": { "data": [ - "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"ViewContent\",\"event_time\":1697365011,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"content_ids\":[],\"contents\":[],\"content_type\":\"product\",\"currency\":\"USD\",\"value\":400}}" + "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"ViewContent\",\"event_time\":1699784211,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"content_ids\":[],\"contents\":[],\"content_type\":\"product\",\"currency\":\"USD\",\"value\":400}}" ] } }, @@ -596,7 +596,7 @@ } ] }, - "timestamp": "2023-10-15T15:46:51.693229+05:30", + "timestamp": "2023-11-12T15:46:51.693229+05:30", "type": "track" }, "destination": { @@ -636,7 +636,7 @@ "version": "1", "type": "REST", "method": "POST", - "endpoint": "https://graph.facebook.com/v17.0/dummyID/events?access_token=09876", + "endpoint": "https://graph.facebook.com/v18.0/dummyID/events?access_token=09876", "headers": {}, "params": {}, "body": { @@ -645,7 +645,7 @@ "JSON_ARRAY": {}, "FORM": { "data": [ - "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"ViewContent\",\"event_time\":1697365011,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"products[0].product_id\":1234,\"products[0].quantity\":5,\"products[0].price\":55,\"content_ids\":[1234],\"contents\":[{\"id\":1234,\"quantity\":5,\"item_price\":55}],\"content_type\":\"product\",\"currency\":\"USD\",\"value\":400}}" + "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"ViewContent\",\"event_time\":1699784211,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"products\":[{\"product_id\":1234,\"quantity\":5,\"price\":55}],\"content_ids\":[1234],\"contents\":[{\"id\":1234,\"quantity\":5,\"item_price\":55}],\"content_type\":\"product\",\"currency\":\"USD\",\"value\":400}}" ] } }, @@ -694,7 +694,7 @@ "additional_bet_index": 0, "category": "randomCategory" }, - "timestamp": "2023-10-15T15:46:51.693229+05:30", + "timestamp": "2023-11-12T15:46:51.693229+05:30", "type": "track" }, "destination": { @@ -734,7 +734,7 @@ "version": "1", "type": "REST", "method": "POST", - "endpoint": "https://graph.facebook.com/v17.0/dummyID/events?access_token=09876", + "endpoint": "https://graph.facebook.com/v18.0/dummyID/events?access_token=09876", "headers": {}, "params": {}, "body": { @@ -743,7 +743,7 @@ "JSON_ARRAY": {}, "FORM": { "data": [ - "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"ViewContent\",\"event_time\":1697365011,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"category\":\"randomCategory\",\"content_ids\":[\"randomCategory\"],\"contents\":[{\"id\":\"randomCategory\",\"quantity\":1}],\"content_type\":\"product_group\",\"content_category\":\"randomCategory\",\"currency\":\"USD\",\"value\":400}}" + "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"ViewContent\",\"event_time\":1699784211,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"category\":\"randomCategory\",\"content_ids\":[\"randomCategory\"],\"contents\":[{\"id\":\"randomCategory\",\"quantity\":1}],\"content_type\":\"product_group\",\"content_category\":\"randomCategory\",\"currency\":\"USD\",\"value\":400}}" ] } }, @@ -791,7 +791,7 @@ "revenue": 400, "additional_bet_index": 0 }, - "timestamp": "2023-10-15T15:46:51.693229+05:30", + "timestamp": "2023-11-12T15:46:51.693229+05:30", "type": "track" }, "destination": { @@ -831,7 +831,7 @@ "version": "1", "type": "REST", "method": "POST", - "endpoint": "https://graph.facebook.com/v17.0/dummyID/events?access_token=09876", + "endpoint": "https://graph.facebook.com/v18.0/dummyID/events?access_token=09876", "headers": {}, "params": {}, "body": { @@ -840,7 +840,7 @@ "JSON_ARRAY": {}, "FORM": { "data": [ - "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"AddToWishlist\",\"event_time\":1697365011,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"content_ids\":[],\"contents\":[],\"currency\":\"USD\",\"value\":400}}" + "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"AddToWishlist\",\"event_time\":1699784211,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"content_ids\":[],\"contents\":[],\"currency\":\"USD\",\"value\":400}}" ] } }, @@ -888,7 +888,7 @@ "revenue": 400, "additional_bet_index": 0 }, - "timestamp": "2023-10-15T15:46:51.693229+05:30", + "timestamp": "2023-11-12T15:46:51.693229+05:30", "type": "track" }, "destination": { @@ -928,7 +928,7 @@ "version": "1", "type": "REST", "method": "POST", - "endpoint": "https://graph.facebook.com/v17.0/dummyID/events?access_token=09876", + "endpoint": "https://graph.facebook.com/v18.0/dummyID/events?access_token=09876", "headers": {}, "params": {}, "body": { @@ -937,7 +937,217 @@ "JSON_ARRAY": {}, "FORM": { "data": [ - "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"AddPaymentInfo\",\"event_time\":1697365011,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"content_ids\":[],\"contents\":[],\"currency\":\"USD\",\"value\":400}}" + "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"AddPaymentInfo\",\"event_time\":1699784211,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"content_ids\":[],\"contents\":[],\"currency\":\"USD\",\"value\":400}}" + ] + } + }, + "files": {} + } + }, + { + "description": "Track event with standard event order completed with delivery_category in products array", + "input": { + "message": { + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "channel": "web", + "context": { + "device": { + "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", + "manufacturer": "Xiaomi", + "model": "Redmi 6", + "name": "xiaomi" + }, + "network": { + "carrier": "Banglalink" + }, + "os": { + "name": "android", + "version": "8.1.0" + }, + "screen": { + "height": "100", + "density": 50 + }, + "traits": { + "email": " aBc@gmail.com ", + "address": { + "zip": 1234 + }, + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" + } + }, + "event": "order completed", + "integrations": { + "All": true + }, + "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", + "properties": { + "revenue": 400, + "additional_bet_index": 0, + "products": [ + { + "product_id": 1234, + "quantity": 5, + "price": 55, + "delivery_category": "home_delivery" + } + ] + }, + "timestamp": "2023-11-12T15:46:51.693229+05:30", + "type": "track" + }, + "destination": { + "Config": { + "limitedDataUsage": true, + "blacklistPiiProperties": [ + { + "blacklistPiiProperties": "", + "blacklistPiiHash": false + } + ], + "accessToken": "09876", + "datasetId": "dummyID", + "eventsToEvents": [ + { + "from": "", + "to": "" + } + ], + "eventCustomProperties": [ + { + "eventCustomProperties": "" + } + ], + "removeExternalId": true, + "whitelistPiiProperties": [ + { + "whitelistPiiProperties": "" + } + ], + "actionSource": "website" + }, + "Enabled": true + } + }, + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://graph.facebook.com/v18.0/dummyID/events?access_token=09876", + "headers": {}, + "params": {}, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": { + "data": [ + "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"Purchase\",\"event_time\":1699784211,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"products\":[{\"product_id\":1234,\"quantity\":5,\"price\":55,\"delivery_category\":\"home_delivery\"}],\"content_ids\":[1234],\"contents\":[{\"id\":1234,\"quantity\":5,\"item_price\":55,\"delivery_category\":\"home_delivery\"}],\"content_type\":\"product\",\"currency\":\"USD\",\"value\":400,\"num_items\":1}}" + ] + } + }, + "files": {} + } + }, + { + "description": "Track event with standard event order completed with delivery_category in properties", + "input": { + "message": { + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "channel": "web", + "context": { + "device": { + "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", + "manufacturer": "Xiaomi", + "model": "Redmi 6", + "name": "xiaomi" + }, + "network": { + "carrier": "Banglalink" + }, + "os": { + "name": "android", + "version": "8.1.0" + }, + "screen": { + "height": "100", + "density": 50 + }, + "traits": { + "email": " aBc@gmail.com ", + "address": { + "zip": 1234 + }, + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" + } + }, + "event": "order completed", + "integrations": { + "All": true + }, + "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", + "properties": { + "revenue": 400, + "additional_bet_index": 0, + "delivery_category": "home_delivery", + "products": [ + { + "product_id": 1234, + "quantity": 5, + "price": 55 + } + ] + }, + "timestamp": "2023-11-12T15:46:51.693229+05:30", + "type": "track" + }, + "destination": { + "Config": { + "limitedDataUsage": true, + "blacklistPiiProperties": [ + { + "blacklistPiiProperties": "", + "blacklistPiiHash": false + } + ], + "accessToken": "09876", + "datasetId": "dummyID", + "eventsToEvents": [ + { + "from": "", + "to": "" + } + ], + "eventCustomProperties": [ + { + "eventCustomProperties": "" + } + ], + "removeExternalId": true, + "whitelistPiiProperties": [ + { + "whitelistPiiProperties": "" + } + ], + "actionSource": "website" + }, + "Enabled": true + } + }, + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://graph.facebook.com/v18.0/dummyID/events?access_token=09876", + "headers": {}, + "params": {}, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": { + "data": [ + "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"Purchase\",\"event_time\":1699784211,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"delivery_category\":\"home_delivery\",\"products\":[{\"product_id\":1234,\"quantity\":5,\"price\":55}],\"content_ids\":[1234],\"contents\":[{\"id\":1234,\"quantity\":5,\"item_price\":55,\"delivery_category\":\"home_delivery\"}],\"content_type\":\"product\",\"currency\":\"USD\",\"value\":400,\"num_items\":1}}" ] } }, diff --git a/test/__tests__/data/facebook_conversions_router_input.json b/test/__tests__/data/facebook_conversions_router_input.json index 4abe66d3c4..b8865d124e 100644 --- a/test/__tests__/data/facebook_conversions_router_input.json +++ b/test/__tests__/data/facebook_conversions_router_input.json @@ -41,7 +41,7 @@ "revenue": 400, "additional_bet_index": 0 }, - "timestamp": "2023-10-15T15:46:51.693229+05:30", + "timestamp": "2023-11-12T15:46:51.693229+05:30", "type": "track" }, "destination": { @@ -119,7 +119,7 @@ "revenue": 400, "additional_bet_index": 0 }, - "timestamp": "2023-10-15T15:46:51.693229+05:30", + "timestamp": "2023-11-12T15:46:51.693229+05:30", "type": "track" }, "destination": { diff --git a/test/__tests__/data/facebook_conversions_router_output.json b/test/__tests__/data/facebook_conversions_router_output.json index d376a91027..542c173090 100644 --- a/test/__tests__/data/facebook_conversions_router_output.json +++ b/test/__tests__/data/facebook_conversions_router_output.json @@ -4,7 +4,7 @@ "version": "1", "type": "REST", "method": "POST", - "endpoint": "https://graph.facebook.com/v17.0/dummyID/events?access_token=09876", + "endpoint": "https://graph.facebook.com/v18.0/dummyID/events?access_token=09876", "headers": {}, "params": {}, "body": { @@ -13,7 +13,7 @@ "JSON_ARRAY": {}, "FORM": { "data": [ - "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"spin_result\",\"event_time\":1697365011,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"value\":400,\"currency\":\"USD\"}}" + "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"spin_result\",\"event_time\":1699784211,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"value\":400,\"currency\":\"USD\"}}" ] } }, @@ -64,7 +64,7 @@ "version": "1", "type": "REST", "method": "POST", - "endpoint": "https://graph.facebook.com/v17.0/dummyID/events?access_token=09876", + "endpoint": "https://graph.facebook.com/v18.0/dummyID/events?access_token=09876", "headers": {}, "params": {}, "body": { @@ -73,7 +73,7 @@ "JSON_ARRAY": {}, "FORM": { "data": [ - "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"Search\",\"event_time\":1697365011,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"content_ids\":[],\"contents\":[],\"content_type\":\"product\",\"currency\":\"USD\",\"value\":400}}" + "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"Search\",\"event_time\":1699784211,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"content_ids\":[],\"contents\":[],\"content_type\":\"product\",\"currency\":\"USD\",\"value\":400}}" ] } }, diff --git a/test/__tests__/facebook_conversions.js b/test/__tests__/facebook_conversions.test.js similarity index 100% rename from test/__tests__/facebook_conversions.js rename to test/__tests__/facebook_conversions.test.js From 916ea4c8d08f69b68b7795dd513a25a3cded55fa Mon Sep 17 00:00:00 2001 From: shrouti1507 <60211312+shrouti1507@users.noreply.github.com> Date: Mon, 13 Nov 2023 12:54:49 +0530 Subject: [PATCH 017/135] feat: adding support for future oauth facility in salesforce (#2746) * feat: oauth in salesforce * fix: backward compatibility initial * fix: editing error class and proxy test case * fix: access token call for legacy auth * Update src/v0/destinations/salesforce/utils.js Co-authored-by: Sudip Paul <67197965+ItsSudip@users.noreply.github.com> * feat: added missing authorization logic for axios calls * fix: adding new dest salesforce oauth * fix: review comment addressed * feat: review comments addressed * feat: small edit * fix: review comments addressed * Update src/v0/destinations/salesforce/transform.js Co-authored-by: Sankeerth * fix: review comments addressed * fix: review comments addressed --------- Co-authored-by: Sudip Paul <67197965+ItsSudip@users.noreply.github.com> Co-authored-by: Sankeerth --- src/constants/destinationCanonicalNames.js | 1 + src/features.json | 1 + src/v0/destinations/salesforce/config.js | 4 + src/v0/destinations/salesforce/transform.js | 74 +++++++--- src/v0/destinations/salesforce/utils.js | 54 +++++++- .../salesforce/dataDelivery/data.ts | 3 +- .../destinations/salesforce/processor/data.ts | 128 ++++++++++++++++++ 7 files changed, 236 insertions(+), 29 deletions(-) diff --git a/src/constants/destinationCanonicalNames.js b/src/constants/destinationCanonicalNames.js index 870c534db0..d1e199c9e2 100644 --- a/src/constants/destinationCanonicalNames.js +++ b/src/constants/destinationCanonicalNames.js @@ -1,5 +1,6 @@ const DestHandlerMap = { ga360: 'ga', + salesforce_oauth: 'salesforce', }; const DestCanonicalNames = { diff --git a/src/features.json b/src/features.json index d3ea3e98a6..27da6cfaf2 100644 --- a/src/features.json +++ b/src/features.json @@ -25,6 +25,7 @@ "PINTEREST_TAG": true, "PROFITWELL": true, "SALESFORCE": true, + "SALESFORCE_OAUTH": true, "SFMC": true, "SNAPCHAT_CONVERSION": true, "TIKTOK_ADS": true, diff --git a/src/v0/destinations/salesforce/config.js b/src/v0/destinations/salesforce/config.js index 6c0ccde80f..1425bad51b 100644 --- a/src/v0/destinations/salesforce/config.js +++ b/src/v0/destinations/salesforce/config.js @@ -24,6 +24,8 @@ const SF_TOKEN_REQUEST_URL = 'https://login.salesforce.com/services/oauth2/token const SF_TOKEN_REQUEST_URL_SANDBOX = 'https://test.salesforce.com/services/oauth2/token'; const DESTINATION = 'Salesforce'; +const OAUTH = 'oauth'; +const LEGACY = 'legacy'; const mappingConfig = getMappingConfig(ConfigCategory, __dirname); @@ -37,4 +39,6 @@ module.exports = { ignoredContactTraits: mappingConfig[ConfigCategory.IGNORE_CONTACT.name], ACCESS_TOKEN_CACHE_TTL, DESTINATION, + OAUTH, + LEGACY, }; diff --git a/src/v0/destinations/salesforce/transform.js b/src/v0/destinations/salesforce/transform.js index ab06a16d07..5ada9dfaa0 100644 --- a/src/v0/destinations/salesforce/transform.js +++ b/src/v0/destinations/salesforce/transform.js @@ -26,8 +26,9 @@ const { checkInvalidRtTfEvents, handleRtTfSingleEventError, generateErrorObject, + isHttpStatusSuccess, } = require('../../util'); -const { getAccessToken, salesforceResponseHandler } = require('./utils'); +const { salesforceResponseHandler, collectAuthorizationInfo, getAuthHeader } = require('./utils'); const { handleHttpRequest } = require('../../../adapters/network'); const { JSON_MIME_TYPE } = require('../../util/constant'); @@ -41,6 +42,7 @@ function responseBuilderSimple( authorizationData, mapProperty, mappedToDestination, + authorizationFlow, ) { const { salesforceType, salesforceId } = salesforceMap; @@ -87,12 +89,12 @@ function responseBuilderSimple( } const response = defaultRequestConfig(); - const header = { + + response.method = defaultPostRequestConfig.requestMethod; + response.headers = { 'Content-Type': JSON_MIME_TYPE, - Authorization: authorizationData.token, + ...getAuthHeader({ authorizationFlow, authorizationData }), }; - response.method = defaultPostRequestConfig.requestMethod; - response.headers = header; response.body.JSON = removeUndefinedValues(rawPayload); response.endpoint = targetEndpoint; @@ -106,24 +108,26 @@ async function getSaleforceIdForRecord( identifierType, identifierValue, destination, + authorizationFlow, ) { const objSearchUrl = `${authorizationData.instanceUrl}/services/data/v${SF_API_VERSION}/parameterizedSearch/?q=${identifierValue}&sobject=${objectType}&in=${identifierType}&${objectType}.fields=id,${identifierType}`; const { processedResponse: processedsfSearchResponse } = await handleHttpRequest( 'get', objSearchUrl, { - headers: { Authorization: authorizationData.token }, + headers: getAuthHeader({ authorizationFlow, authorizationData }), }, { destType: 'salesforce', feature: 'transformation', }, ); - if (processedsfSearchResponse.status !== 200) { + if (!isHttpStatusSuccess(processedsfSearchResponse.status)) { salesforceResponseHandler( processedsfSearchResponse, `:- SALESFORCE SEARCH BY ID`, destination.ID, + authorizationFlow, ); } const searchRecord = processedsfSearchResponse.response?.searchRecords?.find( @@ -149,7 +153,12 @@ async function getSaleforceIdForRecord( // We'll use the Salesforce Object names by removing "Salesforce-" string from the type field // // Default Object type will be "Lead" for backward compatibility -async function getSalesforceIdFromPayload(message, authorizationData, destination) { +async function getSalesforceIdFromPayload( + message, + authorizationData, + destination, + authorizationFlow, +) { // define default map const salesforceMaps = []; @@ -191,6 +200,7 @@ async function getSalesforceIdFromPayload(message, authorizationData, destinatio identifierType, id, destination, + authorizationFlow, ); } @@ -212,12 +222,13 @@ async function getSalesforceIdFromPayload(message, authorizationData, destinatio throw new InstrumentationError('Invalid Email address for Lead Objet'); } const leadQueryUrl = `${authorizationData.instanceUrl}/services/data/v${SF_API_VERSION}/parameterizedSearch/?q=${email}&sobject=Lead&Lead.fields=id,IsConverted,ConvertedContactId,IsDeleted`; + // request configuration will be conditional const { processedResponse: processedLeadQueryResponse } = await handleHttpRequest( 'get', leadQueryUrl, { - headers: { Authorization: authorizationData.token }, + headers: getAuthHeader({ authorizationFlow, authorizationData }), }, { destType: 'salesforce', @@ -225,8 +236,13 @@ async function getSalesforceIdFromPayload(message, authorizationData, destinatio }, ); - if (processedLeadQueryResponse.status !== 200) { - salesforceResponseHandler(processedLeadQueryResponse, `:- during Lead Query`, destination.ID); + if (!isHttpStatusSuccess(processedLeadQueryResponse.status)) { + salesforceResponseHandler( + processedLeadQueryResponse, + `:- during Lead Query`, + destination.ID, + authorizationFlow, + ); } if (processedLeadQueryResponse.response.searchRecords.length > 0) { @@ -262,7 +278,7 @@ async function getSalesforceIdFromPayload(message, authorizationData, destinatio } // Function for handling identify events -async function processIdentify(message, authorizationData, destination) { +async function processIdentify(message, authorizationData, destination, authorizationFlow) { const mapProperty = destination.Config.mapProperty === undefined ? true : destination.Config.mapProperty; // check the traits before hand @@ -283,7 +299,12 @@ async function processIdentify(message, authorizationData, destination) { const responseData = []; // get salesforce object map - const salesforceMaps = await getSalesforceIdFromPayload(message, authorizationData, destination); + const salesforceMaps = await getSalesforceIdFromPayload( + message, + authorizationData, + destination, + authorizationFlow, + ); // iterate over the object types found salesforceMaps.forEach((salesforceMap) => { @@ -295,6 +316,7 @@ async function processIdentify(message, authorizationData, destination) { authorizationData, mapProperty, mappedToDestination, + authorizationFlow, ), ); }); @@ -304,10 +326,10 @@ async function processIdentify(message, authorizationData, destination) { // Generic process function which invokes specific handler functions depending on message type // and event type where applicable -async function processSingleMessage(message, authorizationData, destination) { +async function processSingleMessage(message, authorizationData, destination, authorizationFlow) { let response; if (message.type === EventType.IDENTIFY) { - response = await processIdentify(message, authorizationData, destination); + response = await processIdentify(message, authorizationData, destination, authorizationFlow); } else { throw new InstrumentationError(`message type ${message.type} is not supported`); } @@ -315,9 +337,13 @@ async function processSingleMessage(message, authorizationData, destination) { } async function process(event) { - // Get the authorization header if not available - const authorizationData = await getAccessToken(event.destination); - const response = await processSingleMessage(event.message, authorizationData, event.destination); + const authInfo = await collectAuthorizationInfo(event); + const response = await processSingleMessage( + event.message, + authInfo.authorizationData, + event.destination, + authInfo.authorizationFlow, + ); return response; } @@ -326,10 +352,9 @@ const processRouterDest = async (inputs, reqMetadata) => { if (errorRespEvents.length > 0) { return errorRespEvents; } - - let authorizationData; + let authInfo; try { - authorizationData = await getAccessToken(inputs[0].destination); + authInfo = await collectAuthorizationInfo(inputs[0]); } catch (error) { const errObj = generateErrorObject(error); const respEvents = getErrorRespEvents( @@ -351,7 +376,12 @@ const processRouterDest = async (inputs, reqMetadata) => { // unprocessed payload return getSuccessRespEvents( - await processSingleMessage(input.message, authorizationData, input.destination), + await processSingleMessage( + input.message, + authInfo.authorizationData, + input.destination, + authInfo.authorizationFlow, + ), [input.metadata], input.destination, ); diff --git a/src/v0/destinations/salesforce/utils.js b/src/v0/destinations/salesforce/utils.js index 9429e12e8d..c725ec3b20 100644 --- a/src/v0/destinations/salesforce/utils.js +++ b/src/v0/destinations/salesforce/utils.js @@ -1,12 +1,18 @@ const { RetryableError, ThrottledError, AbortedError } = require('@rudderstack/integrations-lib'); const { handleHttpRequest } = require('../../../adapters/network'); -const { isHttpStatusSuccess } = require('../../util'); +const { + isHttpStatusSuccess, + getAuthErrCategoryFromStCode, + isDefinedAndNotNull, +} = require('../../util'); const Cache = require('../../util/cache'); const { ACCESS_TOKEN_CACHE_TTL, SF_TOKEN_REQUEST_URL_SANDBOX, SF_TOKEN_REQUEST_URL, DESTINATION, + LEGACY, + OAUTH, } = require('./config'); const ACCESS_TOKEN_CACHE = new Cache(ACCESS_TOKEN_CACHE_TTL); @@ -19,7 +25,7 @@ const ACCESS_TOKEN_CACHE = new Cache(ACCESS_TOKEN_CACHE_TTL); * @param {*} stage * @param {String} authKey */ -const salesforceResponseHandler = (destResponse, sourceMessage, authKey) => { +const salesforceResponseHandler = (destResponse, sourceMessage, authKey, authorizationFlow) => { const { status, response } = destResponse; // if the response from destination is not a success case build an explicit error @@ -27,13 +33,16 @@ const salesforceResponseHandler = (destResponse, sourceMessage, authKey) => { const matchErrorCode = (errorCode) => response && Array.isArray(response) && response.some((resp) => resp?.errorCode === errorCode); if (status === 401 && authKey && matchErrorCode('INVALID_SESSION_ID')) { - // checking for invalid/expired token errors and evicting cache in that case - // rudderJobMetadata contains some destination info which is being used to evict the cache - ACCESS_TOKEN_CACHE.del(authKey); + if (authorizationFlow === LEGACY) { + // checking for invalid/expired token errors and evicting cache in that case + // rudderJobMetadata contains some destination info which is being used to evict the cache + ACCESS_TOKEN_CACHE.del(authKey); + } throw new RetryableError( `${DESTINATION} Request Failed - due to "INVALID_SESSION_ID", (Retryable) ${sourceMessage}`, 500, destResponse, + authorizationFlow === LEGACY ? '' : getAuthErrCategoryFromStCode(status), ); } else if (status === 403 && matchErrorCode('REQUEST_LIMIT_EXCEEDED')) { // If the error code is REQUEST_LIMIT_EXCEEDED, you’ve exceeded API request limits in your org. @@ -89,6 +98,11 @@ const salesforceResponseHandler = (destResponse, sourceMessage, authKey) => { * @param {*} destination * @returns */ +const getAccessTokenOauth = (metadata) => ({ + token: metadata.secret?.access_token, + instanceUrl: metadata.secret?.instance_url, +}); + const getAccessToken = async (destination) => { const accessTokenKey = destination.ID; @@ -122,6 +136,7 @@ const getAccessToken = async (destination) => { processedResponse, `:- authentication failed during fetching access token.`, accessTokenKey, + LEGACY, ); } const token = httpResponse.response.data; @@ -131,6 +146,7 @@ const getAccessToken = async (destination) => { processedResponse, `:- authentication failed could not retrieve authorization token.`, accessTokenKey, + LEGACY, ); } return { @@ -140,4 +156,30 @@ const getAccessToken = async (destination) => { }); }; -module.exports = { getAccessToken, salesforceResponseHandler }; +const collectAuthorizationInfo = async (event) => { + let authorizationFlow; + let authorizationData; + if (isDefinedAndNotNull(event.metadata?.secret)) { + authorizationFlow = OAUTH; + authorizationData = getAccessTokenOauth(event.metadata); + } else { + authorizationFlow = LEGACY; + authorizationData = await getAccessToken(event.destination); + } + return { authorizationFlow, authorizationData }; +}; + +const getAuthHeader = (authInfo) => { + const { authorizationFlow, authorizationData } = authInfo; + return authorizationFlow === OAUTH + ? { Authorization: `Bearer ${authorizationData.token}` } + : { Authorization: authorizationData.token }; +}; + +module.exports = { + getAccessTokenOauth, + salesforceResponseHandler, + getAccessToken, + collectAuthorizationInfo, + getAuthHeader, +}; diff --git a/test/integrations/destinations/salesforce/dataDelivery/data.ts b/test/integrations/destinations/salesforce/dataDelivery/data.ts index 504159cc6f..c53ce58f9e 100644 --- a/test/integrations/destinations/salesforce/dataDelivery/data.ts +++ b/test/integrations/destinations/salesforce/dataDelivery/data.ts @@ -119,6 +119,7 @@ export const data = [ body: { output: { status: 500, + authErrorCategory: 'REFRESH_TOKEN', message: 'Salesforce Request Failed - due to "INVALID_SESSION_ID", (Retryable) during Salesforce Response Handling', destinationResponse: { @@ -128,12 +129,12 @@ export const data = [ errorCode: 'INVALID_SESSION_ID', }, ], - status: 401, rudderJobMetadata: { destInfo: { authKey: '2HezPl1w11opbFSxnLDEgZ7kWTf', }, }, + status: 401, }, statTags: { destType: 'SALESFORCE', diff --git a/test/integrations/destinations/salesforce/processor/data.ts b/test/integrations/destinations/salesforce/processor/data.ts index ad0dbb6843..4ccc8cca79 100644 --- a/test/integrations/destinations/salesforce/processor/data.ts +++ b/test/integrations/destinations/salesforce/processor/data.ts @@ -1381,4 +1381,132 @@ export const data = [ }, }, }, + { + name: 'salesforce', + description: 'Test 10', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + initialAccessToken: '7fiy1FKcO9sohsxq1v6J88sg', + password: 'dummyPassword2', + userName: 'test.c97-qvpd@force.com.test', + sandbox: true, + }, + DestinationDefinition: { + DisplayName: 'Salesforce', + ID: '1T96GHZ0YZ1qQSLULHCoJkow9KC', + Name: 'SALESFORCE', + }, + Enabled: true, + ID: '1ut7LcVW1QC56y2EoTNo7ZwBWSY', + Name: 'Test SF', + Transformations: [], + }, + metadata: { + secret: { + access_token: 'dummyAccessToken', + instance_url: 'http://dummyurl.com', + }, + }, + message: { + anonymousId: '1e7673da-9473-49c6-97f7-da848ecafa76', + channel: 'web', + context: { + mappedToDestination: true, + externalId: [ + { + id: 'a005g0000383kmUAAQ', + type: 'SALESFORCE-custom_object__c', + identifierType: 'Id', + }, + ], + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + email: 'john@rs.com', + firstname: 'john doe', + Id: 'some-id', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36', + }, + integrations: { + All: true, + }, + messageId: 'f19c35da-e9de-4c6e-b6e5-9e60cccc12c8', + originalTimestamp: '2020-01-27T12:20:55.301Z', + receivedAt: '2020-01-27T17:50:58.657+05:30', + request_ip: '14.98.244.60', + sentAt: '2020-01-27T12:20:56.849Z', + timestamp: '2020-01-27T17:50:57.109+05:30', + type: 'identify', + userId: '1e7673da-9473-49c6-97f7-da848ecafa76', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 200, + metadata: { + secret: { + access_token: 'dummyAccessToken', + instance_url: 'http://dummyurl.com', + }, + }, + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'http://dummyurl.com/services/data/v50.0/sobjects/custom_object__c/a005g0000383kmUAAQ?_HttpMethod=PATCH', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer dummyAccessToken', + }, + params: {}, + body: { + JSON: { + email: 'john@rs.com', + firstname: 'john doe', + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + }, + ], + }, + }, + }, ]; From ee1f4733e82291375d85a6de8b8626ffdc8907b1 Mon Sep 17 00:00:00 2001 From: Sandeep Digumarty Date: Mon, 13 Nov 2023 13:04:34 +0530 Subject: [PATCH 018/135] feat: add delivery_category as part of contents, update flattening custom_data in FB Pixel (#2816) * feat: remove contents and content_ids from flattening before setting in custom_data * feat: add delivery_category as part of contents * feat: update API version to v18.0 * chore: updated tests * feat: revert v18 version update * feat: added tests * feat: added tests --- src/v0/destinations/facebook_pixel/config.js | 2 + .../destinations/facebook_pixel/transform.js | 13 +- src/v0/destinations/facebook_pixel/utils.js | 22 +- .../facebook_pixel/processor/data.ts | 401 ++++++++++++++++++ 4 files changed, 435 insertions(+), 3 deletions(-) diff --git a/src/v0/destinations/facebook_pixel/config.js b/src/v0/destinations/facebook_pixel/config.js index 99c3c70b2d..f5f895aea9 100644 --- a/src/v0/destinations/facebook_pixel/config.js +++ b/src/v0/destinations/facebook_pixel/config.js @@ -95,6 +95,7 @@ const OTHER_STANDARD_EVENTS = [ ]; const FB_PIXEL_DEFAULT_EXCLUSION = ['opt_out', 'event_id', 'action_source']; +const FB_PIXEL_CUSTOM_DATA_EXCLUDE_FLATTENING = ['content_ids', 'contents']; const STANDARD_ECOMM_EVENTS_TYPE = [ CONFIG_CATEGORIES.PRODUCT_LIST_VIEWED.type, CONFIG_CATEGORIES.PRODUCT_VIEWED.type, @@ -109,6 +110,7 @@ module.exports = { MAPPING_CONFIG, ACTION_SOURCES_VALUES, FB_PIXEL_DEFAULT_EXCLUSION, + FB_PIXEL_CUSTOM_DATA_EXCLUDE_FLATTENING, STANDARD_ECOMM_EVENTS_TYPE, OTHER_STANDARD_EVENTS, DESTINATION: 'FACEBOOK_PIXEL', diff --git a/src/v0/destinations/facebook_pixel/transform.js b/src/v0/destinations/facebook_pixel/transform.js index 7c55b61302..1bc97ac1fb 100644 --- a/src/v0/destinations/facebook_pixel/transform.js +++ b/src/v0/destinations/facebook_pixel/transform.js @@ -7,6 +7,7 @@ const { CONFIG_CATEGORIES, MAPPING_CONFIG, FB_PIXEL_DEFAULT_EXCLUSION, + FB_PIXEL_CUSTOM_DATA_EXCLUDE_FLATTENING, STANDARD_ECOMM_EVENTS_TYPE, } = require('./config'); const { EventType } = require('../../../constants'); @@ -84,7 +85,12 @@ const responseBuilderSimple = (message, category, destination) => { if (category.type !== 'identify') { customData = flattenJson( - extractCustomFields(message, customData, ['properties'], FB_PIXEL_DEFAULT_EXCLUSION), + extractCustomFields( + message, + customData, + ['properties'], + [...FB_PIXEL_DEFAULT_EXCLUSION, ...FB_PIXEL_CUSTOM_DATA_EXCLUDE_FLATTENING], + ), ); if (standardPageCall && category.type === 'page') { category.standard = true; @@ -124,6 +130,11 @@ const responseBuilderSimple = (message, category, destination) => { if (type === 'simple track') { customData.value = message.properties?.revenue; delete customData.revenue; + FB_PIXEL_CUSTOM_DATA_EXCLUDE_FLATTENING.forEach((customDataParameter) => { + if (message.properties?.[customDataParameter]) { + customData[customDataParameter] = message.properties[customDataParameter]; + } + }); } } } else { diff --git a/src/v0/destinations/facebook_pixel/utils.js b/src/v0/destinations/facebook_pixel/utils.js index 1901edf306..8a63a0b0fe 100644 --- a/src/v0/destinations/facebook_pixel/utils.js +++ b/src/v0/destinations/facebook_pixel/utils.js @@ -1,6 +1,11 @@ const { InstrumentationError } = require('@rudderstack/integrations-lib'); const { isObject } = require('../../util'); -const { ACTION_SOURCES_VALUES, CONFIG_CATEGORIES, OTHER_STANDARD_EVENTS } = require('./config'); +const { + ACTION_SOURCES_VALUES, + CONFIG_CATEGORIES, + OTHER_STANDARD_EVENTS, + FB_PIXEL_CUSTOM_DATA_EXCLUDE_FLATTENING, +} = require('./config'); const { getContentType, getContentCategory } = require('../../util/facebookUtils'); /** format revenue according to fb standards with max two decimal places. @@ -54,7 +59,14 @@ const handleOrder = (message, categoryToContent) => { const contentType = getContentType(message, 'product', categoryToContent); const contentIds = []; const contents = []; - const { category, quantity, price, currency, contentName } = message.properties; + const { + category, + quantity, + price, + currency, + contentName, + delivery_category: deliveryCategory, + } = message.properties; if (products) { if (products.length > 0 && Array.isArray(products)) { products.forEach((singleProduct) => { @@ -67,6 +79,7 @@ const handleOrder = (message, categoryToContent) => { id: pId, quantity: singleProduct.quantity || quantity || 1, item_price: singleProduct.price || price, + delivery_category: singleProduct.delivery_category || deliveryCategory, }; contents.push(content); } @@ -262,6 +275,11 @@ const populateCustomDataBasedOnCategory = ( case 'page': // executed when page call is done with standard PageView turned on case 'otherStandard': updatedCustomData = { ...customData }; + FB_PIXEL_CUSTOM_DATA_EXCLUDE_FLATTENING.forEach((customDataParameter) => { + if (message.properties?.[customDataParameter]) { + updatedCustomData[customDataParameter] = message.properties[customDataParameter]; + } + }); break; default: throw new InstrumentationError(`${category.standard} type of standard event does not exist`); diff --git a/test/integrations/destinations/facebook_pixel/processor/data.ts b/test/integrations/destinations/facebook_pixel/processor/data.ts index d5d0a8ec96..96e80c01e8 100644 --- a/test/integrations/destinations/facebook_pixel/processor/data.ts +++ b/test/integrations/destinations/facebook_pixel/processor/data.ts @@ -6058,4 +6058,405 @@ export const data = [ }, }, }, + { + name: 'facebook_pixel', + description: 'Test 48', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'test@rudderstack.com', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + type: 'track', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2023-10-14T15:46:51.693229+05:30', + anonymousId: '00000000000000000000000000', + userId: '12345', + event: 'order completed', + properties: { + category: ['clothing', 'fishing'], + order_id: 'rudderstackorder1', + total: 99.99, + revenue: 12.24, + shipping: 13.99, + tax: 20.99, + currency: 'INR', + products: [ + { + quantity: 1, + price: 24.75, + name: 'my product', + sku: 'p-298', + delivery_category: 'home_delivery', + }, + { + quantity: 3, + price: 24.75, + name: 'other product', + sku: 'p-299', + delivery_category: 'home_delivery', + }, + ], + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T11:15:53.296Z', + }, + destination: { + Config: { + blacklistPiiProperties: [ + { + blacklistPiiProperties: '', + blacklistPiiHash: true, + }, + ], + categoryToContent: [ + { + from: 'clothing', + to: 'product', + }, + ], + accessToken: '09876', + pixelId: 'dummyPixelId', + eventsToEvents: [ + { + from: '', + to: '', + }, + ], + eventCustomProperties: [ + { + eventCustomProperties: '', + }, + ], + valueFieldIdentifier: 'properties.price', + advancedMapping: false, + whitelistPiiProperties: [ + { + whitelistPiiProperties: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + headers: {}, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: { + data: [ + '{"user_data":{"external_id":"5994471abb01112afcc18159f6cc74b4f511b99806da59b3caf5a9c173cacfc5","em":"1c5e54849f5c711ce38fa60716fbbe44bff478f9ca250897b39cdfc2438cd1bd","client_user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36"},"event_name":"Purchase","event_time":1697278611,"event_id":"ec5481b6-a926-4d2e-b293-0b3a77c4d3be","action_source":"website","custom_data":{"category[0]":"clothing","category[1]":"fishing","order_id":"rudderstackorder1","total":99.99,"revenue":12.24,"shipping":13.99,"tax":20.99,"currency":"INR","products[0].quantity":1,"products[0].price":24.75,"products[0].name":"my product","products[0].sku":"p-298","products[0].delivery_category":"home_delivery","products[1].quantity":3,"products[1].price":24.75,"products[1].name":"other product","products[1].sku":"p-299","products[1].delivery_category":"home_delivery","content_category":"clothing,fishing","content_ids":["p-298","p-299"],"content_type":"product","value":12.24,"contents":[{"id":"p-298","quantity":1,"item_price":24.75,"delivery_category":"home_delivery"},{"id":"p-299","quantity":3,"item_price":24.75,"delivery_category":"home_delivery"}],"num_items":2}}', + ], + }, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'facebook_pixel', + description: 'Test 49', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + channel: 'mobile', + destination_props: { + Fb: { + app_id: 'RudderFbApp', + }, + }, + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, + screen: { + height: '100', + density: 50, + }, + traits: { + email: ' aBc@gmail.com ', + address: { + zip: 1234, + }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'spin_result', + integrations: { + All: true, + }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + revenue: 400, + additional_bet_index: 0, + content_ids: ['prod1', 'prod2'], + }, + timestamp: '2023-10-14T00:00:00.693229+05:30', + type: 'track', + }, + destination: { + Config: { + limitedDataUsage: true, + blacklistPiiProperties: [ + { + blacklistPiiProperties: '', + blacklistPiiHash: false, + }, + ], + accessToken: '09876', + pixelId: 'dummyPixelId', + eventsToEvents: [ + { + from: '', + to: '', + }, + ], + eventCustomProperties: [ + { + eventCustomProperties: '', + }, + ], + removeExternalId: true, + valueFieldIdentifier: '', + advancedMapping: false, + whitelistPiiProperties: [ + { + whitelistPiiProperties: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + headers: {}, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: { + data: [ + '{"user_data":{"em":"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08","zp":"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4"},"event_name":"spin_result","event_time":1697221800,"action_source":"app","custom_data":{"additional_bet_index":0,"value":400,"content_ids":["prod1","prod2"]}}', + ], + }, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'facebook_pixel', + description: 'Test 50', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + channel: 'mobile', + destination_props: { + Fb: { + app_id: 'RudderFbApp', + }, + }, + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, + screen: { + height: '100', + density: 50, + }, + traits: { + email: ' aBc@gmail.com ', + address: { + zip: 1234, + }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'spin_result', + integrations: { + All: true, + }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + revenue: 400, + additional_bet_index: 0, + contents: [ + { + id: 'prod1', + quantity: 5, + item_price: 55, + }, + ], + }, + timestamp: '2023-10-14T00:00:00.693229+05:30', + type: 'track', + }, + destination: { + Config: { + limitedDataUsage: true, + blacklistPiiProperties: [ + { + blacklistPiiProperties: '', + blacklistPiiHash: false, + }, + ], + accessToken: '09876', + pixelId: 'dummyPixelId', + eventsToEvents: [ + { + from: '', + to: '', + }, + ], + eventCustomProperties: [ + { + eventCustomProperties: '', + }, + ], + removeExternalId: true, + valueFieldIdentifier: '', + advancedMapping: false, + whitelistPiiProperties: [ + { + whitelistPiiProperties: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + headers: {}, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: { + data: [ + '{"user_data":{"em":"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08","zp":"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4"},"event_name":"spin_result","event_time":1697221800,"action_source":"app","custom_data":{"additional_bet_index":0,"value":400,"contents":[{"id":"prod1","quantity":5,"item_price":55}]}}', + ], + }, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, ].map((d) => ({ ...d, mockFns })); From 93a82bd4856b462768d0213ae3de8b9b78e9858c Mon Sep 17 00:00:00 2001 From: AASHISH MALIK Date: Mon, 13 Nov 2023 13:21:51 +0530 Subject: [PATCH 019/135] feat: use custom screen name amplitude (#2823) * feat: use custom screen name amplitude * fix: use name if custom screen name is empty --- src/v0/destinations/am/transform.js | 44 +++++--- test/__tests__/data/am_input.json | 100 ++++++++++++++++++ test/__tests__/data/am_output.json | 156 ++++++++++++++++++++++++++++ 3 files changed, 286 insertions(+), 14 deletions(-) diff --git a/src/v0/destinations/am/transform.js b/src/v0/destinations/am/transform.js index 27d5bc3161..bed5d45b28 100644 --- a/src/v0/destinations/am/transform.js +++ b/src/v0/destinations/am/transform.js @@ -591,7 +591,8 @@ const processSingleMessage = (message, destination) => { const { name, event, properties } = message; const messageType = message.type.toLowerCase(); const CATEGORY_KEY = 'properties.category'; - const { useUserDefinedPageEventName, userProvidedPageEventString } = destination.Config; + const { useUserDefinedPageEventName, userProvidedPageEventString, + useUserDefinedScreenEventName, userProvidedScreenEventString } = destination.Config; switch (messageType) { case EventType.IDENTIFY: payloadObjectName = 'events'; // identify same as events @@ -601,17 +602,17 @@ const processSingleMessage = (message, destination) => { case EventType.PAGE: if (useUserDefinedPageEventName) { const getMessagePath = userProvidedPageEventString - .substring( - userProvidedPageEventString.indexOf('{') + 2, - userProvidedPageEventString.indexOf('}'), - ) - .trim(); + .substring( + userProvidedPageEventString.indexOf('{') + 2, + userProvidedPageEventString.indexOf('}'), + ) + .trim(); evType = - userProvidedPageEventString.trim() === '' - ? name - : userProvidedPageEventString - .trim() - .replaceAll(/{{([^{}]+)}}/g, get(message, getMessagePath)); + userProvidedPageEventString.trim() === '' + ? name + : userProvidedPageEventString + .trim() + .replaceAll(/{{([^{}]+)}}/g, get(message, getMessagePath)); } else { evType = `Viewed ${name || get(message, CATEGORY_KEY) || ''} Page`; } @@ -624,10 +625,25 @@ const processSingleMessage = (message, destination) => { case EventType.SCREEN: { const { eventType, updatedProperties } = getScreenevTypeAndUpdatedProperties( - message, - CATEGORY_KEY, + message, + CATEGORY_KEY, ); - evType = eventType; + let customScreenEv = ''; + if (useUserDefinedScreenEventName) { + const getMessagePath = userProvidedScreenEventString + .substring( + userProvidedScreenEventString.indexOf('{') + 2, + userProvidedScreenEventString.indexOf('}'), + ) + .trim(); + customScreenEv = + userProvidedScreenEventString.trim() === '' + ? name + : userProvidedScreenEventString + .trim() + .replaceAll(/{{([^{}]+)}}/g, get(message, getMessagePath)); + } + evType =useUserDefinedScreenEventName ? customScreenEv : eventType; message.properties = updatedProperties; category = ConfigCategory.SCREEN; } diff --git a/test/__tests__/data/am_input.json b/test/__tests__/data/am_input.json index 3e5cde2cca..126d235787 100644 --- a/test/__tests__/data/am_input.json +++ b/test/__tests__/data/am_input.json @@ -4842,5 +4842,105 @@ "userProvidedPageEventString": "Viewed {{context.page.title}} event." } } + }, + { + "message": { + "type": "screen", + "userId": "identified user id", + "anonymousId": "anon-id-new", + "event": "Screen View", + "properties": { + "prop1": "5" + }, + "context": { + "ip": "14.5.67.21", + "library": { + "name": "http" + } + }, + "timestamp": "2020-02-02T00:23:09.544Z" + }, + "destination": { + "Config": { + "apiKey": "abcde", + "useUserDefinedScreenEventName": true, + "userProvidedScreenEventString": "My {{ event }} event." + } + } + }, + { + "message": { + "type": "screen", + "userId": "identified user id", + "anonymousId": "anon-id-new", + "event": "Screen View", + "properties": { + "prop1": "5" + }, + "context": { + "ip": "14.5.67.21", + "library": { + "name": "http" + } + }, + "timestamp": "2020-02-02T00:23:09.544Z" + }, + "destination": { + "Config": { + "apiKey": "abcde", + "useUserDefinedScreenEventName": false, + "userProvidedScreenEventString": "My {{ event }} event." + } + } + }, + { + "message": { + "type": "screen", + "userId": "identified user id", + "anonymousId": "anon-id-new", + "event": "Screen same as event", + "properties": { + "prop1": "5" + }, + "context": { + "ip": "14.5.67.21", + "library": { + "name": "http" + } + }, + "timestamp": "2020-02-02T00:23:09.544Z" + }, + "destination": { + "Config": { + "apiKey": "abcde", + "useUserDefinedScreenEventName": true, + "userProvidedScreenEventString": "{{ event }}" + } + } + }, + { + "message": { + "type": "screen", + "userId": "identified user id", + "anonymousId": "anon-id-new", + "name": "Screen", + "properties": { + "prop1": "5" + }, + "context": { + "ip": "14.5.67.21", + "library": { + "name": "http" + } + }, + "timestamp": "2020-02-02T00:23:09.544Z" + }, + "destination": { + "Config": { + "apiKey": "abcde", + "useUserDefinedScreenEventName": true, + "userProvidedScreenEventString": "" + } + } } ] \ No newline at end of file diff --git a/test/__tests__/data/am_output.json b/test/__tests__/data/am_output.json index ea4b8b908d..5a9c674113 100644 --- a/test/__tests__/data/am_output.json +++ b/test/__tests__/data/am_output.json @@ -4311,5 +4311,161 @@ }, "files": {}, "userId": "00000000000000000000000000" + }, + { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api2.amplitude.com/2/httpapi", + "headers": { + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "api_key": "abcde", + "events": [ + { + "device_id": "anon-id-new", + "library": "rudderstack", + "event_properties": { + "prop1": "5", + "name": "Screen View" + }, + "event_type": "My Screen View event.", + "time": 1580602989544, + "user_id": "identified user id", + "user_properties": {}, + "session_id": -1, + "ip": "14.5.67.21" + } + ], + "options": { + "min_id_length": 1 + } + }, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "anon-id-new" + }, + { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api2.amplitude.com/2/httpapi", + "headers": { + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "api_key": "abcde", + "events": [ + { + "device_id": "anon-id-new", + "library": "rudderstack", + "event_properties": { + "prop1": "5", + "name": "Screen View" + }, + "event_type": "Viewed Screen View Screen", + "time": 1580602989544, + "user_id": "identified user id", + "user_properties": {}, + "session_id": -1, + "ip": "14.5.67.21" + } + ], + "options": { + "min_id_length": 1 + } + }, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "anon-id-new" + }, + { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api2.amplitude.com/2/httpapi", + "headers": { + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "api_key": "abcde", + "events": [ + { + "device_id": "anon-id-new", + "library": "rudderstack", + "event_properties": { + "prop1": "5", + "name": "Screen same as event" + }, + "event_type": "Screen same as event", + "time": 1580602989544, + "user_id": "identified user id", + "user_properties": {}, + "session_id": -1, + "ip": "14.5.67.21" + } + ], + "options": { + "min_id_length": 1 + } + }, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "anon-id-new" + }, + { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api2.amplitude.com/2/httpapi", + "headers": { + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "api_key": "abcde", + "events": [ + { + "device_id": "anon-id-new", + "library": "rudderstack", + "event_properties": { + "prop1": "5", + "name": "Screen" + }, + "event_type": "Screen", + "time": 1580602989544, + "user_id": "identified user id", + "user_properties": {}, + "session_id": -1, + "ip": "14.5.67.21" + } + ], + "options": { + "min_id_length": 1 + } + }, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "anon-id-new" } ] \ No newline at end of file From b92846170b11158b9fea889f579ec590ed2c512a Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Mon, 13 Nov 2023 07:58:21 +0000 Subject: [PATCH 020/135] chore(release): 1.50.0 --- CHANGELOG.md | 18 ++++++++++++++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 97a3a2c226..04ebb304cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,24 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [1.50.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.49.1...v1.50.0) (2023-11-13) + + +### Features + +* add clickId support for tiktok and pinterest destination ([#2784](https://github.com/rudderlabs/rudder-transformer/issues/2784)) ([0e14296](https://github.com/rudderlabs/rudder-transformer/commit/0e1429663d167a2c5cded0d9130374eb586a18c0)) +* add delivery_category as part of contents, remove flattening custom_data in FB conversions ([#2812](https://github.com/rudderlabs/rudder-transformer/issues/2812)) ([e82cef8](https://github.com/rudderlabs/rudder-transformer/commit/e82cef88e154d47519f0deeb60f55773f25fd3ad)) +* add delivery_category as part of contents, update flattening custom_data in FB Pixel ([#2816](https://github.com/rudderlabs/rudder-transformer/issues/2816)) ([ee1f473](https://github.com/rudderlabs/rudder-transformer/commit/ee1f4733e82291375d85a6de8b8626ffdc8907b1)) +* adding support for future oauth facility in salesforce ([#2746](https://github.com/rudderlabs/rudder-transformer/issues/2746)) ([916ea4c](https://github.com/rudderlabs/rudder-transformer/commit/916ea4c8d08f69b68b7795dd513a25a3cded55fa)) +* introduce v1/source/sourceType endpoint ([#2722](https://github.com/rudderlabs/rudder-transformer/issues/2722)) ([0996e81](https://github.com/rudderlabs/rudder-transformer/commit/0996e816d3671c3e25561f76e3219be99225f24b)) +* move cdkV1 to cdkv2 component tests ([#2804](https://github.com/rudderlabs/rudder-transformer/issues/2804)) ([195b48a](https://github.com/rudderlabs/rudder-transformer/commit/195b48ac0f438a200933e4bbb956fcc3941b7aed)) +* use custom screen name amplitude ([#2823](https://github.com/rudderlabs/rudder-transformer/issues/2823)) ([93a82bd](https://github.com/rudderlabs/rudder-transformer/commit/93a82bd4856b462768d0213ae3de8b9b78e9858c)) + + +### Bug Fixes + +* shopify redis metric when there is no data returned for a key ([#2811](https://github.com/rudderlabs/rudder-transformer/issues/2811)) ([c02370e](https://github.com/rudderlabs/rudder-transformer/commit/c02370e38fabb581698baa00e1ddd3da93dc07fa)) + ### [1.49.1](https://github.com/rudderlabs/rudder-transformer/compare/v1.49.0...v1.49.1) (2023-11-10) diff --git a/package-lock.json b/package-lock.json index f1d3be597c..28d814c925 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "rudder-transformer", - "version": "1.49.1", + "version": "1.50.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "rudder-transformer", - "version": "1.49.1", + "version": "1.50.0", "license": "ISC", "dependencies": { "@amplitude/ua-parser-js": "^0.7.24", diff --git a/package.json b/package.json index 076e912112..e4a4d9151c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rudder-transformer", - "version": "1.49.1", + "version": "1.50.0", "description": "", "homepage": "https://github.com/rudderlabs/rudder-transformer#readme", "bugs": { From a56d66810bdcbcf8a4073735dd1a9622ba48c27e Mon Sep 17 00:00:00 2001 From: chandumlg <54652834+chandumlg@users.noreply.github.com> Date: Mon, 13 Nov 2023 09:07:36 -0600 Subject: [PATCH 021/135] fix: source transform error stat (#2825) * fix: source_transform_error_stat * chore: update changelog --------- Co-authored-by: Chandra shekar Varkala --- CHANGELOG.md | 1 + src/services/source/nativeIntegration.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 04ebb304cf..c720cc8718 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ All notable changes to this project will be documented in this file. See [standa ### Bug Fixes +* source_transform_error stat label correction ([#2825](https://github.com/rudderlabs/rudder-transformer/issues/2825)) ([f3bcd7c](https://github.com/rudderlabs/rudder-transformer/commit/f3bcd7c9338ef96267be84f845c63f5234d37e33)) * shopify redis metric when there is no data returned for a key ([#2811](https://github.com/rudderlabs/rudder-transformer/issues/2811)) ([c02370e](https://github.com/rudderlabs/rudder-transformer/commit/c02370e38fabb581698baa00e1ddd3da93dc07fa)) ### [1.49.1](https://github.com/rudderlabs/rudder-transformer/compare/v1.49.0...v1.49.1) (2023-11-10) diff --git a/src/services/source/nativeIntegration.ts b/src/services/source/nativeIntegration.ts index f29d68d054..22783db049 100644 --- a/src/services/source/nativeIntegration.ts +++ b/src/services/source/nativeIntegration.ts @@ -42,7 +42,7 @@ export default class NativeIntegrationSourceService implements IntegrationSource } catch (error: FixMe) { const metaTO = this.getTags(); stats.increment('source_transform_errors', { - sourceType, + source: sourceType, version, }); return PostTransformationServiceSource.handleFailureEventsSource(error, metaTO); From 2055dabb25e0e67a61dda263ca75f93408f1bf9c Mon Sep 17 00:00:00 2001 From: AASHISH MALIK Date: Tue, 14 Nov 2023 11:24:35 +0530 Subject: [PATCH 022/135] fix: snapchat_conversion category mapping (#2826) * fix: snapchat_conversion category mapping --- CHANGELOG.md | 1 + .../data/OrderCompletedConfig.json | 2 +- .../snapchat_conversion/processor/data.ts | 309 ++++++++++++++++++ 3 files changed, 311 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c720cc8718..8f990fe3b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ All notable changes to this project will be documented in this file. See [standa * source_transform_error stat label correction ([#2825](https://github.com/rudderlabs/rudder-transformer/issues/2825)) ([f3bcd7c](https://github.com/rudderlabs/rudder-transformer/commit/f3bcd7c9338ef96267be84f845c63f5234d37e33)) * shopify redis metric when there is no data returned for a key ([#2811](https://github.com/rudderlabs/rudder-transformer/issues/2811)) ([c02370e](https://github.com/rudderlabs/rudder-transformer/commit/c02370e38fabb581698baa00e1ddd3da93dc07fa)) +* snapchat_conversion category mapping ([#2826](https://github.com/rudderlabs/rudder-transformer/issues/2826)) ([7acd004](https://github.com/rudderlabs/rudder-transformer/commit/7acd004e4290dfb5ea20402929041462eddb4496)) ### [1.49.1](https://github.com/rudderlabs/rudder-transformer/compare/v1.49.0...v1.49.1) (2023-11-10) diff --git a/src/v0/destinations/snapchat_conversion/data/OrderCompletedConfig.json b/src/v0/destinations/snapchat_conversion/data/OrderCompletedConfig.json index dc5696e9a4..38e85ca2d8 100644 --- a/src/v0/destinations/snapchat_conversion/data/OrderCompletedConfig.json +++ b/src/v0/destinations/snapchat_conversion/data/OrderCompletedConfig.json @@ -6,7 +6,7 @@ }, { "destKey": "item_category", - "sourceKeys": "properties.item_category", + "sourceKeys": ["properties.item_category", "properties.category"], "required": false }, { diff --git a/test/integrations/destinations/snapchat_conversion/processor/data.ts b/test/integrations/destinations/snapchat_conversion/processor/data.ts index ed38673d95..baa2b2b99e 100644 --- a/test/integrations/destinations/snapchat_conversion/processor/data.ts +++ b/test/integrations/destinations/snapchat_conversion/processor/data.ts @@ -4291,6 +4291,315 @@ export const data = [ }, }, }, + { + name: 'snapchat_conversion', + description: 'Test Case for Order Completed event category', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-22T10:57:58Z', + channel: 'mobile', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + traits: { + email: 'test@email.com', + phone: '+91 2111111 ', + }, + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99v4f979fb997ce453373900f891', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'Order Completed', + properties: { + brands: ['brand01', 'brand02'], + products: [ + { + product_id: '123', + price: '14', + quantity: 1, + }, + { + product_id: '124', + price: 14, + quantity: 3, + }, + ], + category: 'shoes' + }, + integrations: { + All: true, + }, + sentAt: '2022-04-22T10:57:58Z', + }, + destination: { + DestinationDefinition: { + Config: { + cdkV2Enabled: false, + }, + }, + Config: { + apiKey: 'dummyApiKey', + pixelId: 'dummyPixelId', + appId: 'dhfeih44f', + snapAppId: 'hfhdhfd', + }, + }, + metadata: { + jobId: 31, + destinationId: 'd2', + workspaceId: 'w2', + }, + }, + ], + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + jobId: 31, + destinationId: 'd2', + workspaceId: 'w2', + }, + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://tr.snapchat.com/v2/conversion', + headers: { + Authorization: 'Bearer dummyApiKey', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + event_type: 'PURCHASE', + item_ids: ['123', '124'], + brands: ['brand01', 'brand02'], + item_category: "shoes", + price: '56', + hashed_email: '73062d872926c2a556f17b36f50e328ddf9bff9d403939bd14b6c3b7f5a33fc2', + hashed_phone_number: + 'bc77d64d7045fe44795ed926df37231a0cfb6ec6b74588c512790e9f143cc492', + hashed_mobile_ad_id: + 'f9779d734aaee50f16ee0011260bae7048f1d9a128c62b6a661077875701edd2', + hashed_idfv: '54bd0b26a3d39dad90f5149db49b9fd9ba885f8e35d1d94cae69273f5e657b9f', + user_agent: + 'mozilla/5.0 (macintosh; intel mac os x 10_15_2) applewebkit/537.36 (khtml, like gecko) chrome/79.0.3945.88 safari/537.36', + timestamp: '1650625078', + event_conversion_type: 'MOBILE_APP', + snap_app_id: 'hfhdhfd', + app_id: 'dhfeih44f', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'snapchat_conversion', + description: 'Test Case for Order Completed event with both category and item_category', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-22T10:57:58Z', + channel: 'mobile', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + traits: { + email: 'test@email.com', + phone: '+91 2111111 ', + }, + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99v4f979fb997ce453373900f891', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'Order Completed', + properties: { + brands: ['brand01', 'brand02'], + products: [ + { + product_id: '123', + price: '14', + quantity: 1, + }, + { + product_id: '124', + price: 14, + quantity: 3, + }, + ], + category: 'shoes', + item_category: 'glass' + }, + integrations: { + All: true, + }, + sentAt: '2022-04-22T10:57:58Z', + }, + destination: { + DestinationDefinition: { + Config: { + cdkV2Enabled: false, + }, + }, + Config: { + apiKey: 'dummyApiKey', + pixelId: 'dummyPixelId', + appId: 'dhfeih44f', + snapAppId: 'hfhdhfd', + }, + }, + metadata: { + jobId: 31, + destinationId: 'd2', + workspaceId: 'w2', + }, + }, + ], + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + jobId: 31, + destinationId: 'd2', + workspaceId: 'w2', + }, + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://tr.snapchat.com/v2/conversion', + headers: { + Authorization: 'Bearer dummyApiKey', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + event_type: 'PURCHASE', + item_ids: ['123', '124'], + brands: ['brand01', 'brand02'], + item_category: "glass", + price: '56', + hashed_email: '73062d872926c2a556f17b36f50e328ddf9bff9d403939bd14b6c3b7f5a33fc2', + hashed_phone_number: + 'bc77d64d7045fe44795ed926df37231a0cfb6ec6b74588c512790e9f143cc492', + hashed_mobile_ad_id: + 'f9779d734aaee50f16ee0011260bae7048f1d9a128c62b6a661077875701edd2', + hashed_idfv: '54bd0b26a3d39dad90f5149db49b9fd9ba885f8e35d1d94cae69273f5e657b9f', + user_agent: + 'mozilla/5.0 (macintosh; intel mac os x 10_15_2) applewebkit/537.36 (khtml, like gecko) chrome/79.0.3945.88 safari/537.36', + timestamp: '1650625078', + event_conversion_type: 'MOBILE_APP', + snap_app_id: 'hfhdhfd', + app_id: 'dhfeih44f', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + } ].map((tc) => ({ ...tc, mockFns: (_) => { From 06c6503c8857e61d084c7f5f997ab2efaf9012f9 Mon Sep 17 00:00:00 2001 From: Utsab Chowdhury Date: Tue, 14 Nov 2023 17:27:48 +0530 Subject: [PATCH 023/135] chore: update import and export names, default new routes (#2810) --- .eslintrc.json | 2 +- package.json | 1 + src/controllers/delivery.ts | 12 +- src/controllers/destination.ts | 26 +-- src/controllers/eventTest.ts | 4 +- src/controllers/misc.ts | 4 +- src/controllers/profile.ts | 6 +- src/controllers/regulation.ts | 9 +- src/controllers/source.ts | 12 +- src/controllers/trackingPlan.ts | 6 +- src/controllers/userTransform.ts | 6 +- src/controllers/util/index.test.ts | 2 +- src/controllers/util/index.ts | 2 +- src/helpers/fetchHandlers.ts | 4 +- src/helpers/serviceSelector.ts | 16 +- src/index.ts | 14 +- src/interfaces/DestinationService.ts | 2 +- src/interfaces/SourceService.ts | 2 +- src/middlewares/featureFlag.ts | 2 +- src/middlewares/routeActivation.ts | 2 +- src/routes/delivery.ts | 4 +- src/routes/destination.ts | 26 +-- src/routes/misc.ts | 4 +- src/routes/source.ts | 8 +- src/routes/testEvents.ts | 2 +- src/routes/trackingPlan.ts | 2 +- src/routes/userTransform.ts | 18 +- src/services/comparator.ts | 13 +- src/services/delivertTest/deliveryTest.ts | 2 +- src/services/destination/cdkV1Integration.ts | 6 +- src/services/destination/cdkV2Integration.ts | 6 +- src/services/destination/nativeIntegration.ts | 8 +- .../destination/postTransformation.ts | 4 +- src/services/destination/preTransformation.ts | 2 +- src/services/errorReporting.ts | 2 +- src/services/eventTest/eventTester.ts | 2 +- src/services/misc.ts | 2 +- src/services/profile.ts | 2 +- src/services/source/nativeIntegration.ts | 12 +- src/services/source/postTransformation.ts | 4 +- src/services/trackingPlan.ts | 2 +- src/services/userTransform.ts | 2 +- src/util/dynamicConfigParser.ts | 2 +- src/v0/destinations/hs/util.js | 3 +- src/v0/sources/shopify/util.js | 5 +- .../data/sanity/active_campaign_output.json | 54 ----- .../data/sanity/destination_config.json | 102 --------- .../data/sanity/marketo_router_output.json | 165 -------------- test/__tests__/data/sanity/sanity_input.json | 185 ---------------- .../data/sanity/sanity_router_input.json | 59 ----- test/__tests__/legacyRouter.test.ts | 2 +- test/__tests__/sanity.test.js | 204 ------------------ test/__tests__/user_transformation_ts.test.ts | 2 +- .../data_scenarios/source/v1/pipedream.json | 2 +- test/controllerUtility/ctrl-utility.test.ts | 2 +- 55 files changed, 138 insertions(+), 916 deletions(-) delete mode 100644 test/__tests__/data/sanity/active_campaign_output.json delete mode 100644 test/__tests__/data/sanity/destination_config.json delete mode 100644 test/__tests__/data/sanity/marketo_router_output.json delete mode 100644 test/__tests__/data/sanity/sanity_input.json delete mode 100644 test/__tests__/data/sanity/sanity_router_input.json delete mode 100644 test/__tests__/sanity.test.js diff --git a/.eslintrc.json b/.eslintrc.json index c2614ac5ef..d2928e50fd 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -54,7 +54,7 @@ "@typescript-eslint/no-explicit-any": "off", "class-methods-use-this": "off", "@typescript-eslint/return-await": "error", - "import/prefer-default-export": "error", + "import/prefer-default-export": "off", "sonarjs/no-ignored-return": "error", "no-new": "error", "@typescript-eslint/no-shadow": "error", diff --git a/package.json b/package.json index e4a4d9151c..f8851cc687 100644 --- a/package.json +++ b/package.json @@ -28,6 +28,7 @@ "build:ci": "tsc -p tsconfig.json", "build:swagger": "npm run build && npm run setup:swagger", "build": "npm run build:ci && npm run copy", + "clean:build": "npm run clean && npm run build", "build:clean": "npm run clean && npm run build", "verify": "eslint . || exit 1; npm run test:js || exit 1", "test:testRouter": "jest testRouter --detectOpenHandles --coverage --notify --watchAll=false", diff --git a/src/controllers/delivery.ts b/src/controllers/delivery.ts index 5dee091c46..af94764d46 100644 --- a/src/controllers/delivery.ts +++ b/src/controllers/delivery.ts @@ -1,15 +1,15 @@ import { Context } from 'koa'; -import MiscService from '../services/misc'; +import { MiscService } from '../services/misc'; import { DeliveryResponse, ProcessorTransformationOutput } from '../types/index'; -import ServiceSelector from '../helpers/serviceSelector'; -import DeliveryTestService from '../services/delivertTest/deliveryTest'; -import ControllerUtility from './util'; +import { ServiceSelector } from '../helpers/serviceSelector'; +import { DeliveryTestService } from '../services/delivertTest/deliveryTest'; +import { ControllerUtility } from './util'; import logger from '../logger'; -import DestinationPostTransformationService from '../services/destination/postTransformation'; +import { DestinationPostTransformationService } from '../services/destination/postTransformation'; import tags from '../v0/util/tags'; import { FixMe } from '../util/types'; -export default class DeliveryController { +export class DeliveryController { public static async deliverToDestination(ctx: Context) { logger.debug('Native(Delivery):: Request to transformer::', JSON.stringify(ctx.request.body)); let deliveryResponse: DeliveryResponse; diff --git a/src/controllers/destination.ts b/src/controllers/destination.ts index 60eac8a56c..71075d1b4c 100644 --- a/src/controllers/destination.ts +++ b/src/controllers/destination.ts @@ -1,22 +1,22 @@ import { Context } from 'koa'; -import MiscService from '../services/misc'; -import PreTransformationDestinationService from '../services/destination/preTransformation'; -import PostTransformationDestinationService from '../services/destination/postTransformation'; +import { MiscService } from '../services/misc'; +import { DestinationPreTransformationService } from '../services/destination/preTransformation'; +import { DestinationPostTransformationService } from '../services/destination/postTransformation'; import { ProcessorTransformationRequest, RouterTransformationRequest, ProcessorTransformationResponse, RouterTransformationResponse, } from '../types/index'; -import ServiceSelector from '../helpers/serviceSelector'; -import ControllerUtility from './util'; +import { ServiceSelector } from '../helpers/serviceSelector'; +import { ControllerUtility } from './util'; import stats from '../util/stats'; import logger from '../logger'; import { getIntegrationVersion } from '../util/utils'; import tags from '../v0/util/tags'; -import DynamicConfigParser from '../util/dynamicConfigParser'; +import { DynamicConfigParser } from '../util/dynamicConfigParser'; -export default class DestinationController { +export class DestinationController { public static async destinationTransformAtProcessor(ctx: Context) { const startTime = new Date(); logger.debug( @@ -36,7 +36,7 @@ export default class DestinationController { const integrationService = ServiceSelector.getDestinationService(events); try { integrationService.init(); - events = PreTransformationDestinationService.preProcess( + events = DestinationPreTransformationService.preProcess( events, ctx, ) as ProcessorTransformationRequest[]; @@ -59,7 +59,7 @@ export default class DestinationController { tags.FEATURES.PROCESSOR, ); metaTO.metadata = ev.metadata; - const errResp = PostTransformationDestinationService.handleProcessorTransformFailureEvents( + const errResp = DestinationPostTransformationService.handleProcessorTransformFailureEvents( error, metaTO, ); @@ -110,7 +110,7 @@ export default class DestinationController { const integrationService = ServiceSelector.getDestinationService(events); let resplist: RouterTransformationResponse[]; try { - events = PreTransformationDestinationService.preProcess(events, ctx); + events = DestinationPreTransformationService.preProcess(events, ctx); const timestampCorrectEvents = ControllerUtility.handleTimestampInEvents(events); events = DynamicConfigParser.process(timestampCorrectEvents); resplist = await integrationService.doRouterTransformation( @@ -127,7 +127,7 @@ export default class DestinationController { tags.FEATURES.ROUTER, ); metaTO.metadatas = events.map((ev) => ev.metadata); - const errResp = PostTransformationDestinationService.handleRouterTransformFailureEvents( + const errResp = DestinationPostTransformationService.handleRouterTransformFailureEvents( error, metaTO, ); @@ -165,7 +165,7 @@ export default class DestinationController { let events = routerRequest.input; const integrationService = ServiceSelector.getDestinationService(events); try { - events = PreTransformationDestinationService.preProcess(events, ctx); + events = DestinationPreTransformationService.preProcess(events, ctx); const timestampCorrectEvents = ControllerUtility.handleTimestampInEvents(events); const resplist = integrationService.doBatchTransformation( timestampCorrectEvents, @@ -182,7 +182,7 @@ export default class DestinationController { tags.FEATURES.BATCH, ); metaTO.metadatas = events.map((ev) => ev.metadata); - const errResp = PostTransformationDestinationService.handleBatchTransformFailureEvents( + const errResp = DestinationPostTransformationService.handleBatchTransformFailureEvents( error, metaTO, ); diff --git a/src/controllers/eventTest.ts b/src/controllers/eventTest.ts index 8888b63807..d5507f65d2 100644 --- a/src/controllers/eventTest.ts +++ b/src/controllers/eventTest.ts @@ -1,9 +1,9 @@ import { Context } from 'koa'; -import EventTesterService from '../services/eventTest/eventTester'; +import { EventTesterService } from '../services/eventTest/eventTester'; // eslint-disable-next-line @typescript-eslint/no-unused-vars import { CatchErr, FixMe } from '../util/types'; -export default class EventTestController { +export class EventTestController { private static API_VERSION = '1'; public static async testEvent(ctx: Context) { diff --git a/src/controllers/misc.ts b/src/controllers/misc.ts index 92ec33f80f..e2efdab5db 100644 --- a/src/controllers/misc.ts +++ b/src/controllers/misc.ts @@ -1,7 +1,7 @@ import { Context } from 'koa'; -import MiscService from '../services/misc'; +import { MiscService } from '../services/misc'; -export default class MiscController { +export class MiscController { public static healthStats(ctx: Context) { ctx.body = MiscService.getHealthInfo(); ctx.status = 200; diff --git a/src/controllers/profile.ts b/src/controllers/profile.ts index 984f4ac645..a0a62bf479 100644 --- a/src/controllers/profile.ts +++ b/src/controllers/profile.ts @@ -1,8 +1,8 @@ import { Context } from 'koa'; -import ProfileService from '../services/profile'; -import ControllerUtility from './util'; +import { ProfileService } from '../services/profile'; +import { ControllerUtility } from './util'; -export default class ProfileController { +export class ProfileController { /** * Example usage of API * diff --git a/src/controllers/regulation.ts b/src/controllers/regulation.ts index cefe1f748a..a50541780d 100644 --- a/src/controllers/regulation.ts +++ b/src/controllers/regulation.ts @@ -1,15 +1,14 @@ import { Context } from 'koa'; import logger from '../logger'; import { UserDeletionRequest, UserDeletionResponse } from '../types'; -import ServiceSelector from '../helpers/serviceSelector'; +import { ServiceSelector } from '../helpers/serviceSelector'; import tags from '../v0/util/tags'; import stats from '../util/stats'; -import PostTransformationDestinationService from '../services/destination/postTransformation'; +import { DestinationPostTransformationService } from '../services/destination/postTransformation'; // eslint-disable-next-line @typescript-eslint/no-unused-vars import { CatchErr } from '../util/types'; -// TODO: refactor this class to new format -export default class RegulationController { +export class RegulationController { public static async deleteUsers(ctx: Context) { logger.debug( 'Native(Process-Transform):: Requst to transformer::', @@ -44,7 +43,7 @@ export default class RegulationController { tags.FEATURES.USER_DELETION, ); // eslint-disable-next-line @typescript-eslint/no-unused-vars - const errResp = PostTransformationDestinationService.handleUserDeletionFailureEvents( + const errResp = DestinationPostTransformationService.handleUserDeletionFailureEvents( error, metaTO, ); diff --git a/src/controllers/source.ts b/src/controllers/source.ts index b1e7e8fe12..ef5483a756 100644 --- a/src/controllers/source.ts +++ b/src/controllers/source.ts @@ -1,11 +1,11 @@ import { Context } from 'koa'; -import MiscService from '../services/misc'; -import ServiceSelector from '../helpers/serviceSelector'; -import ControllerUtility from './util'; +import { MiscService } from '../services/misc'; +import { ServiceSelector } from '../helpers/serviceSelector'; +import { ControllerUtility } from './util'; import logger from '../logger'; -import PostTransformationServiceSource from '../services/source/postTransformation'; +import { SourcePostTransformationService } from '../services/source/postTransformation'; -export default class SourceController { +export class SourceController { public static async sourceTransform(ctx: Context) { logger.debug( 'Native(Source-Transform):: Request to transformer::', @@ -30,7 +30,7 @@ export default class SourceController { ctx.body = resplist; } catch (err: any) { const metaTO = integrationService.getTags(); - const resp = PostTransformationServiceSource.handleFailureEventsSource(err, metaTO); + const resp = SourcePostTransformationService.handleFailureEventsSource(err, metaTO); ctx.body = [resp]; } ControllerUtility.postProcess(ctx); diff --git a/src/controllers/trackingPlan.ts b/src/controllers/trackingPlan.ts index 66bf360700..74e47e0ec9 100644 --- a/src/controllers/trackingPlan.ts +++ b/src/controllers/trackingPlan.ts @@ -1,8 +1,8 @@ import { Context } from 'koa'; -import TrackingPlanservice from '../services/trackingPlan'; -import ControllerUtility from './util'; +import { TrackingPlanservice } from '../services/trackingPlan'; +import { ControllerUtility } from './util'; -export default class TrackingPlanController { +export class TrackingPlanController { public static async validateTrackingPlan(ctx: Context) { const events = ctx.request.body; const requestSize = Number(ctx.request.get('content-length')); diff --git a/src/controllers/userTransform.ts b/src/controllers/userTransform.ts index 6cbf578077..c344bd072a 100644 --- a/src/controllers/userTransform.ts +++ b/src/controllers/userTransform.ts @@ -1,15 +1,15 @@ import { Context } from 'koa'; import { ProcessorTransformationRequest, UserTransformationServiceResponse } from '../types/index'; -import UserTransformService from '../services/userTransform'; +import { UserTransformService } from '../services/userTransform'; import logger from '../logger'; import { setupUserTransformHandler, extractLibraries, validateCode, } from '../util/customTransformer'; -import ControllerUtility from './util'; +import { ControllerUtility } from './util'; -export default class UserTransformController { +export class UserTransformController { public static async transform(ctx: Context) { logger.debug( '(User transform - router:/customTransform ):: Request to transformer', diff --git a/src/controllers/util/index.test.ts b/src/controllers/util/index.test.ts index 0bc5f174b0..e23d3f6832 100644 --- a/src/controllers/util/index.test.ts +++ b/src/controllers/util/index.test.ts @@ -1,4 +1,4 @@ -import ControllerUtility from './index'; +import { ControllerUtility } from './index'; describe('adaptInputToVersion', () => { it('should return the input unchanged when the implementation version is not found', () => { diff --git a/src/controllers/util/index.ts b/src/controllers/util/index.ts index c52eb6899e..75d3d8ffa7 100644 --- a/src/controllers/util/index.ts +++ b/src/controllers/util/index.ts @@ -15,7 +15,7 @@ import { getValueFromMessage } from '../../v0/util'; import genericFieldMap from '../../v0/util/data/GenericFieldMapping.json'; import { EventType, MappedToDestinationKey } from '../../constants'; -export default class ControllerUtility { +export class ControllerUtility { private static sourceVersionMap: Map = new Map(); public static timestampValsMap: Record = { diff --git a/src/helpers/fetchHandlers.ts b/src/helpers/fetchHandlers.ts index 96a74e528d..ef7d9e6611 100644 --- a/src/helpers/fetchHandlers.ts +++ b/src/helpers/fetchHandlers.ts @@ -1,6 +1,6 @@ -import MiscService from '../services/misc'; +import { MiscService } from '../services/misc'; -export default class FetchHandler { +export class FetchHandler { private static sourceHandlerMap: Map = new Map(); private static destHandlerMap: Map = new Map(); diff --git a/src/helpers/serviceSelector.ts b/src/helpers/serviceSelector.ts index 891c21313d..89678e9407 100644 --- a/src/helpers/serviceSelector.ts +++ b/src/helpers/serviceSelector.ts @@ -1,16 +1,16 @@ import { PlatformError } from '@rudderstack/integrations-lib'; import { ProcessorTransformationRequest, RouterTransformationRequestData } from '../types/index'; import { INTEGRATION_SERVICE } from '../routes/utils/constants'; -import CDKV1DestinationService from '../services/destination/cdkV1Integration'; -import CDKV2DestinationService from '../services/destination/cdkV2Integration'; -import DestinationService from '../interfaces/DestinationService'; -import NativeIntegrationDestinationService from '../services/destination/nativeIntegration'; -import SourceService from '../interfaces/SourceService'; -import NativeIntegrationSourceService from '../services/source/nativeIntegration'; -import ComparatorService from '../services/comparator'; +import { CDKV1DestinationService } from '../services/destination/cdkV1Integration'; +import { CDKV2DestinationService } from '../services/destination/cdkV2Integration'; +import { DestinationService } from '../interfaces/DestinationService'; +import { NativeIntegrationDestinationService } from '../services/destination/nativeIntegration'; +import { SourceService } from '../interfaces/SourceService'; +import { NativeIntegrationSourceService } from '../services/source/nativeIntegration'; +import { ComparatorService } from '../services/comparator'; import { FixMe } from '../util/types'; -export default class ServiceSelector { +export class ServiceSelector { private static serviceMap: Map = new Map(); private static services = { diff --git a/src/index.ts b/src/index.ts index d1cc95cc36..36f32f1aed 100644 --- a/src/index.ts +++ b/src/index.ts @@ -4,8 +4,6 @@ import gracefulShutdown from 'http-graceful-shutdown'; import dotenv from 'dotenv'; import logger from './logger'; import cluster from './util/cluster'; -import { router } from './legacy/router'; -import { testRouter } from './testRouter'; import { metricsRouter } from './routes/metricsRouter'; import { addStatMiddleware, addRequestSizeMiddleware, initPyroscope } from './middleware'; import { logProcessInfo } from './util/utils'; @@ -14,7 +12,6 @@ import { RedisDB } from './util/redis/redisConnector'; dotenv.config(); const clusterEnabled = process.env.CLUSTER_ENABLED !== 'false'; -const useUpdatedRoutes = process.env.ENABLE_NEW_ROUTES !== 'false'; const port = parseInt(process.env.PORT ?? '9090', 10); const metricsPort = parseInt(process.env.METRICS_PORT || '9091', 10); @@ -35,15 +32,8 @@ app.use( addRequestSizeMiddleware(app); addSwaggerRoutes(app); -if (useUpdatedRoutes) { - logger.info('Using new routes'); - applicationRoutes(app); -} else { - // To be depricated - logger.info('Using old routes'); - app.use(router.routes()).use(router.allowedMethods()); - app.use(testRouter.routes()).use(testRouter.allowedMethods()); -} +logger.info('Using new routes'); +applicationRoutes(app); function finalFunction() { RedisDB.disconnect(); diff --git a/src/interfaces/DestinationService.ts b/src/interfaces/DestinationService.ts index 123da35292..b27f98da2a 100644 --- a/src/interfaces/DestinationService.ts +++ b/src/interfaces/DestinationService.ts @@ -10,7 +10,7 @@ import { UserDeletionResponse, } from '../types/index'; -export default interface DestinationService { +export interface DestinationService { getName(): string; init(): void; diff --git a/src/interfaces/SourceService.ts b/src/interfaces/SourceService.ts index 99b29f095b..c7de8cfe8b 100644 --- a/src/interfaces/SourceService.ts +++ b/src/interfaces/SourceService.ts @@ -1,6 +1,6 @@ import { MetaTransferObject, SourceTransformationResponse } from '../types/index'; -export default interface SourceService { +export interface SourceService { getTags(): MetaTransferObject; sourceTransformRoutine( diff --git a/src/middlewares/featureFlag.ts b/src/middlewares/featureFlag.ts index 146e57186c..206fa7c5ea 100644 --- a/src/middlewares/featureFlag.ts +++ b/src/middlewares/featureFlag.ts @@ -6,7 +6,7 @@ export interface FeatureFlags { export const FEATURE_FILTER_CODE = 'filter-code'; -export default class FeatureFlagMiddleware { +export class FeatureFlagMiddleware { public static async handle(ctx: Context, next: Next): Promise { // Initialize ctx.state.features if it doesn't exist ctx.state.features = (ctx.state.features || {}) as FeatureFlags; diff --git a/src/middlewares/routeActivation.ts b/src/middlewares/routeActivation.ts index dfdaef964e..ffb1e15e80 100644 --- a/src/middlewares/routeActivation.ts +++ b/src/middlewares/routeActivation.ts @@ -18,7 +18,7 @@ const destinationFilterList = process.env.DESTINATION_FILTER_LIST?.toLocaleLower const sourceFilteList = process.env.SOURCE_FILTER_LIST?.toLocaleLowerCase(); const deliveryFilterList = process.env.DESTINATION_DELIVERY_FILTER_LIST?.toLocaleLowerCase(); -export default class RouteActivationMiddleware { +export class RouteActivationMiddleware { private static executeActivationRule(ctx: Context, next: Next, shouldActivate: boolean) { if (shouldActivate) { return next(); diff --git a/src/routes/delivery.ts b/src/routes/delivery.ts index 141700fd9f..0591dc8b9e 100644 --- a/src/routes/delivery.ts +++ b/src/routes/delivery.ts @@ -1,6 +1,6 @@ import Router from '@koa/router'; -import DeliveryController from '../controllers/delivery'; -import RouteActivationMiddleware from '../middlewares/routeActivation'; +import { DeliveryController } from '../controllers/delivery'; +import { RouteActivationMiddleware } from '../middlewares/routeActivation'; const router = new Router(); diff --git a/src/routes/destination.ts b/src/routes/destination.ts index 3d4be42ff3..1c47825145 100644 --- a/src/routes/destination.ts +++ b/src/routes/destination.ts @@ -1,30 +1,30 @@ import Router from '@koa/router'; -import DestinationController from '../controllers/destination'; -import RegulationController from '../controllers/regulation'; -import FeatureFlagController from '../middlewares/featureFlag'; -import RouteActivationController from '../middlewares/routeActivation'; +import { DestinationController } from '../controllers/destination'; +import { RegulationController } from '../controllers/regulation'; +import { FeatureFlagMiddleware } from '../middlewares/featureFlag'; +import { RouteActivationMiddleware } from '../middlewares/routeActivation'; const router = new Router(); router.post( '/:version/destinations/:destination', - RouteActivationController.isDestinationRouteActive, - RouteActivationController.destinationProcFilter, - FeatureFlagController.handle, + RouteActivationMiddleware.isDestinationRouteActive, + RouteActivationMiddleware.destinationProcFilter, + FeatureFlagMiddleware.handle, DestinationController.destinationTransformAtProcessor, ); router.post( '/routerTransform', - RouteActivationController.isDestinationRouteActive, - RouteActivationController.destinationRtFilter, - FeatureFlagController.handle, + RouteActivationMiddleware.isDestinationRouteActive, + RouteActivationMiddleware.destinationRtFilter, + FeatureFlagMiddleware.handle, DestinationController.destinationTransformAtRouter, ); router.post( '/batch', - RouteActivationController.isDestinationRouteActive, - RouteActivationController.destinationBatchFilter, - FeatureFlagController.handle, + RouteActivationMiddleware.isDestinationRouteActive, + RouteActivationMiddleware.destinationBatchFilter, + FeatureFlagMiddleware.handle, DestinationController.batchProcess, ); diff --git a/src/routes/misc.ts b/src/routes/misc.ts index 750c1194dd..4d1c5d5fb5 100644 --- a/src/routes/misc.ts +++ b/src/routes/misc.ts @@ -1,6 +1,6 @@ import Router from '@koa/router'; -import ProfileController from '../controllers/profile'; -import MiscController from '../controllers/misc'; +import { ProfileController } from '../controllers/profile'; +import { MiscController } from '../controllers/misc'; const router = new Router(); diff --git a/src/routes/source.ts b/src/routes/source.ts index ade26c8700..1abc46e2e4 100644 --- a/src/routes/source.ts +++ b/src/routes/source.ts @@ -1,13 +1,13 @@ import Router from '@koa/router'; -import RouteActivationController from '../middlewares/routeActivation'; -import SourceController from '../controllers/source'; +import { RouteActivationMiddleware } from '../middlewares/routeActivation'; +import { SourceController } from '../controllers/source'; const router = new Router(); router.post( '/:version/sources/:source', - RouteActivationController.isSourceRouteActive, - RouteActivationController.sourceFilter, + RouteActivationMiddleware.isSourceRouteActive, + RouteActivationMiddleware.sourceFilter, SourceController.sourceTransform, ); diff --git a/src/routes/testEvents.ts b/src/routes/testEvents.ts index 556ec10198..a35fe447ba 100644 --- a/src/routes/testEvents.ts +++ b/src/routes/testEvents.ts @@ -1,5 +1,5 @@ import Router from '@koa/router'; -import EventTestController from '../controllers/eventTest'; +import { EventTestController } from '../controllers/eventTest'; const router = new Router({ prefix: '/test-router' }); diff --git a/src/routes/trackingPlan.ts b/src/routes/trackingPlan.ts index d177af7b2c..3e62ba2a74 100644 --- a/src/routes/trackingPlan.ts +++ b/src/routes/trackingPlan.ts @@ -1,5 +1,5 @@ import Router from '@koa/router'; -import TrackingPlanController from '../controllers/trackingPlan'; +import { TrackingPlanController } from '../controllers/trackingPlan'; const router = new Router(); diff --git a/src/routes/userTransform.ts b/src/routes/userTransform.ts index 23870db3b4..1fb8ad3a1c 100644 --- a/src/routes/userTransform.ts +++ b/src/routes/userTransform.ts @@ -1,34 +1,34 @@ import Router from '@koa/router'; -import RouteActivationController from '../middlewares/routeActivation'; -import FeatureFlagController from '../middlewares/featureFlag'; -import UserTransformController from '../controllers/userTransform'; +import { RouteActivationMiddleware } from '../middlewares/routeActivation'; +import { FeatureFlagMiddleware } from '../middlewares/featureFlag'; +import { UserTransformController } from '../controllers/userTransform'; const router = new Router(); router.post( '/customTransform', - RouteActivationController.isUserTransformRouteActive, - FeatureFlagController.handle, + RouteActivationMiddleware.isUserTransformRouteActive, + FeatureFlagMiddleware.handle, UserTransformController.transform, ); router.post( '/transformation/test', - RouteActivationController.isUserTransformTestRouteActive, + RouteActivationMiddleware.isUserTransformTestRouteActive, UserTransformController.testTransform, ); router.post( '/transformationLibrary/test', - RouteActivationController.isUserTransformTestRouteActive, + RouteActivationMiddleware.isUserTransformTestRouteActive, UserTransformController.testTransformLibrary, ); router.post( '/transformation/sethandle', - RouteActivationController.isUserTransformTestRouteActive, + RouteActivationMiddleware.isUserTransformTestRouteActive, UserTransformController.testTransformSethandle, ); router.post( '/extractLibs', - RouteActivationController.isUserTransformRouteActive, + RouteActivationMiddleware.isUserTransformRouteActive, UserTransformController.extractLibhandle, ); diff --git a/src/services/comparator.ts b/src/services/comparator.ts index 3495b7bbfd..7f63da9402 100644 --- a/src/services/comparator.ts +++ b/src/services/comparator.ts @@ -1,5 +1,5 @@ /* eslint-disable class-methods-use-this */ -import IntegrationDestinationService from '../interfaces/DestinationService'; +import { DestinationService } from '../interfaces/DestinationService'; import { DeliveryResponse, Destination, @@ -20,15 +20,12 @@ import { CommonUtils } from '../util/common'; const NS_PER_SEC = 1e9; -export default class ComparatorService implements IntegrationDestinationService { - secondaryService: IntegrationDestinationService; +export class ComparatorService implements DestinationService { + secondaryService: DestinationService; - primaryService: IntegrationDestinationService; + primaryService: DestinationService; - constructor( - primaryService: IntegrationDestinationService, - secondaryService: IntegrationDestinationService, - ) { + constructor(primaryService: DestinationService, secondaryService: DestinationService) { this.primaryService = primaryService; this.secondaryService = secondaryService; } diff --git a/src/services/delivertTest/deliveryTest.ts b/src/services/delivertTest/deliveryTest.ts index e5713073c1..0d960ade17 100644 --- a/src/services/delivertTest/deliveryTest.ts +++ b/src/services/delivertTest/deliveryTest.ts @@ -7,7 +7,7 @@ import stats from '../../util/stats'; import logger from '../../logger'; import tags from '../../v0/util/tags'; -export default class DeliveryTestService { +export class DeliveryTestService { public static async doTestDelivery( destination: string, routerDestReqPayload: any, diff --git a/src/services/destination/cdkV1Integration.ts b/src/services/destination/cdkV1Integration.ts index 2f655fca9b..8ccd3341e5 100644 --- a/src/services/destination/cdkV1Integration.ts +++ b/src/services/destination/cdkV1Integration.ts @@ -2,7 +2,7 @@ import { ConfigFactory, Executor, RudderBaseConfig } from 'rudder-transformer-cdk'; import path from 'path'; import { TransformationError } from '@rudderstack/integrations-lib'; -import IntegrationDestinationService from '../../interfaces/DestinationService'; +import { DestinationService } from '../../interfaces/DestinationService'; import { DeliveryResponse, ErrorDetailer, @@ -15,12 +15,12 @@ import { UserDeletionRequest, UserDeletionResponse, } from '../../types/index'; -import DestinationPostTransformationService from './postTransformation'; +import { DestinationPostTransformationService } from './postTransformation'; import tags from '../../v0/util/tags'; import { getErrorInfo } from '../../cdk/v1/handler'; import { CatchErr } from '../../util/types'; -export default class CDKV1DestinationService implements IntegrationDestinationService { +export class CDKV1DestinationService implements DestinationService { public init() { ConfigFactory.init({ basePath: path.resolve(__dirname, '../../cdk/v1'), diff --git a/src/services/destination/cdkV2Integration.ts b/src/services/destination/cdkV2Integration.ts index bc5a1126a8..e333d4544e 100644 --- a/src/services/destination/cdkV2Integration.ts +++ b/src/services/destination/cdkV2Integration.ts @@ -3,7 +3,7 @@ import groupBy from 'lodash/groupBy'; import { TransformationError } from '@rudderstack/integrations-lib'; import { processCdkV2Workflow } from '../../cdk/v2/handler'; -import IntegrationDestinationService from '../../interfaces/DestinationService'; +import { DestinationService } from '../../interfaces/DestinationService'; import { DeliveryResponse, ErrorDetailer, @@ -17,11 +17,11 @@ import { UserDeletionResponse, } from '../../types/index'; import tags from '../../v0/util/tags'; -import DestinationPostTransformationService from './postTransformation'; +import { DestinationPostTransformationService } from './postTransformation'; import stats from '../../util/stats'; import { CatchErr } from '../../util/types'; -export default class CDKV2DestinationService implements IntegrationDestinationService { +export class CDKV2DestinationService implements DestinationService { public init() {} public getName(): string { diff --git a/src/services/destination/nativeIntegration.ts b/src/services/destination/nativeIntegration.ts index a788b388e4..6763f54c7e 100644 --- a/src/services/destination/nativeIntegration.ts +++ b/src/services/destination/nativeIntegration.ts @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ import groupBy from 'lodash/groupBy'; import cloneDeep from 'lodash/cloneDeep'; -import IntegrationDestinationService from '../../interfaces/DestinationService'; +import { DestinationService } from '../../interfaces/DestinationService'; import { DeliveryResponse, ErrorDetailer, @@ -14,12 +14,12 @@ import { UserDeletionRequest, UserDeletionResponse, } from '../../types/index'; -import DestinationPostTransformationService from './postTransformation'; +import { DestinationPostTransformationService } from './postTransformation'; import networkHandlerFactory from '../../adapters/networkHandlerFactory'; -import FetchHandler from '../../helpers/fetchHandlers'; +import { FetchHandler } from '../../helpers/fetchHandlers'; import tags from '../../v0/util/tags'; -export default class NativeIntegrationDestinationService implements IntegrationDestinationService { +export class NativeIntegrationDestinationService implements DestinationService { public init() {} public getName(): string { diff --git a/src/services/destination/postTransformation.ts b/src/services/destination/postTransformation.ts index 090e39b059..0b91eb7cc1 100644 --- a/src/services/destination/postTransformation.ts +++ b/src/services/destination/postTransformation.ts @@ -12,11 +12,11 @@ import { UserDeletionResponse, } from '../../types/index'; import { generateErrorObject } from '../../v0/util'; -import ErrorReportingService from '../errorReporting'; +import { ErrorReportingService } from '../errorReporting'; import tags from '../../v0/util/tags'; import stats from '../../util/stats'; -export default class DestinationPostTransformationService { +export class DestinationPostTransformationService { public static handleProcessorTransformSucessEvents( event: ProcessorTransformationRequest, transformedPayloads: ProcessorTransformationOutput | ProcessorTransformationOutput[], diff --git a/src/services/destination/preTransformation.ts b/src/services/destination/preTransformation.ts index dd5579b7b9..db1d76d64e 100644 --- a/src/services/destination/preTransformation.ts +++ b/src/services/destination/preTransformation.ts @@ -1,7 +1,7 @@ import { Context } from 'koa'; import { ProcessorTransformationRequest, RouterTransformationRequestData } from '../../types/index'; -export default class PreTransformationDestinationService { +export class DestinationPreTransformationService { public static preProcess( events: ProcessorTransformationRequest[] | RouterTransformationRequestData[], ctx: Context, diff --git a/src/services/errorReporting.ts b/src/services/errorReporting.ts index 2d3c84ff30..3a4276f978 100644 --- a/src/services/errorReporting.ts +++ b/src/services/errorReporting.ts @@ -1,6 +1,6 @@ import { client } from '../util/errorNotifier'; -export default class ErrorReportingService { +export class ErrorReportingService { public static reportError(error: NonNullable, context: string, errorResp: object) { client.notify(error, context, { ...errorResp, diff --git a/src/services/eventTest/eventTester.ts b/src/services/eventTest/eventTester.ts index a3755d3e80..75df29cc63 100644 --- a/src/services/eventTest/eventTester.ts +++ b/src/services/eventTest/eventTester.ts @@ -1,7 +1,7 @@ import { sendToDestination, userTransformHandler } from '../../routerUtils'; import { FixMe } from '../../util/types'; -export default class EventTesterService { +export class EventTesterService { private static getDestHandler(version, destination) { // eslint-disable-next-line global-require, import/no-dynamic-require return require(`../../${version}/destinations/${destination}/transform`); diff --git a/src/services/misc.ts b/src/services/misc.ts index 4c3e2ae6da..e0953d08bf 100644 --- a/src/services/misc.ts +++ b/src/services/misc.ts @@ -6,7 +6,7 @@ import { DestHandlerMap } from '../constants/destinationCanonicalNames'; import { Metadata } from '../types'; import { getCPUProfile, getHeapProfile } from '../middleware'; -export default class MiscService { +export class MiscService { public static getDestHandler(dest: string, version: string) { if (DestHandlerMap.hasOwnProperty(dest)) { return require(`../${version}/destinations/${DestHandlerMap[dest]}/transform`); diff --git a/src/services/profile.ts b/src/services/profile.ts index 4d7a7104e7..d71826e251 100644 --- a/src/services/profile.ts +++ b/src/services/profile.ts @@ -22,7 +22,7 @@ logger.info(`Interval Bytes set: ${intervalBytes}`); heap.start(intervalBytes, stackDepth); -export default class ProfileService { +export class ProfileService { private static async promisifiedRead(readable: any) { // eslint-disable-next-line no-new new Promise((resolve, reject) => { diff --git a/src/services/source/nativeIntegration.ts b/src/services/source/nativeIntegration.ts index 22783db049..6eaef2f835 100644 --- a/src/services/source/nativeIntegration.ts +++ b/src/services/source/nativeIntegration.ts @@ -1,4 +1,4 @@ -import IntegrationSourceService from '../../interfaces/SourceService'; +import { SourceService } from '../../interfaces/SourceService'; import { ErrorDetailer, MetaTransferObject, @@ -6,12 +6,12 @@ import { SourceTransformationResponse, } from '../../types/index'; import { FixMe } from '../../util/types'; -import PostTransformationServiceSource from './postTransformation'; -import FetchHandler from '../../helpers/fetchHandlers'; +import { SourcePostTransformationService } from './postTransformation'; +import { FetchHandler } from '../../helpers/fetchHandlers'; import tags from '../../v0/util/tags'; import stats from '../../util/stats'; -export default class NativeIntegrationSourceService implements IntegrationSourceService { +export class NativeIntegrationSourceService implements SourceService { public getTags(): MetaTransferObject { const metaTO = { errorDetails: { @@ -38,14 +38,14 @@ export default class NativeIntegrationSourceService implements IntegrationSource try { const respEvents: RudderMessage | RudderMessage[] | SourceTransformationResponse = await sourceHandler.process(sourceEvent); - return PostTransformationServiceSource.handleSuccessEventsSource(respEvents); + return SourcePostTransformationService.handleSuccessEventsSource(respEvents); } catch (error: FixMe) { const metaTO = this.getTags(); stats.increment('source_transform_errors', { source: sourceType, version, }); - return PostTransformationServiceSource.handleFailureEventsSource(error, metaTO); + return SourcePostTransformationService.handleFailureEventsSource(error, metaTO); } }), ); diff --git a/src/services/source/postTransformation.ts b/src/services/source/postTransformation.ts index f732cac3a7..20c815171b 100644 --- a/src/services/source/postTransformation.ts +++ b/src/services/source/postTransformation.ts @@ -1,9 +1,9 @@ import { MetaTransferObject, RudderMessage, SourceTransformationResponse } from '../../types/index'; import { CatchErr } from '../../util/types'; import { generateErrorObject } from '../../v0/util'; -import ErrorReportingService from '../errorReporting'; +import { ErrorReportingService } from '../errorReporting'; -export default class PostTransformationSourceService { +export class SourcePostTransformationService { public static handleFailureEventsSource( error: CatchErr, metaTO: MetaTransferObject, diff --git a/src/services/trackingPlan.ts b/src/services/trackingPlan.ts index 35f21320a5..2e68df55e9 100644 --- a/src/services/trackingPlan.ts +++ b/src/services/trackingPlan.ts @@ -4,7 +4,7 @@ import { getMetadata } from '../v0/util'; import eventValidator from '../util/eventValidation'; import stats from '../util/stats'; -export default class TrackingPlanservice { +export class TrackingPlanservice { public static async validateTrackingPlan(events, requestSize, reqParams) { const requestStartTime = new Date(); const respList: any[] = []; diff --git a/src/services/userTransform.ts b/src/services/userTransform.ts index 4fe1ad0b52..ddd5c82f67 100644 --- a/src/services/userTransform.ts +++ b/src/services/userTransform.ts @@ -24,7 +24,7 @@ import { CatchErr, FixMe } from '../util/types'; import { FeatureFlags, FEATURE_FILTER_CODE } from '../middlewares/featureFlag'; import { HTTP_CUSTOM_STATUS_CODES } from '../constants'; -export default class UserTransformService { +export class UserTransformService { public static async transformRoutine( events: ProcessorTransformationRequest[], features: FeatureFlags = {}, diff --git a/src/util/dynamicConfigParser.ts b/src/util/dynamicConfigParser.ts index 73ad85a0d2..6de2e38f94 100644 --- a/src/util/dynamicConfigParser.ts +++ b/src/util/dynamicConfigParser.ts @@ -6,7 +6,7 @@ import { FixMe } from './types'; const get = require('get-value'); const unset = require('unset-value'); -export default class DynamicConfigParser { +export class DynamicConfigParser { private static getDynamicConfigValue( event: ProcessorTransformationRequest | RouterTransformationRequestData, value: FixMe, diff --git a/src/v0/destinations/hs/util.js b/src/v0/destinations/hs/util.js index 72025997d2..f83ce0b6de 100644 --- a/src/v0/destinations/hs/util.js +++ b/src/v0/destinations/hs/util.js @@ -607,7 +607,8 @@ const splitEventsForCreateUpdate = async (inputs, destination) => { const { destinationExternalId } = getDestinationExternalIDInfoForRetl(message, DESTINATION); const filteredInfo = updateHubspotIds.filter( - (update) => update.property.toString().toLowerCase() === destinationExternalId.toString().toLowerCase(), + (update) => + update.property.toString().toLowerCase() === destinationExternalId.toString().toLowerCase(), ); if (filteredInfo.length > 0) { diff --git a/src/v0/sources/shopify/util.js b/src/v0/sources/shopify/util.js index 1da75cba3d..61501bdab6 100644 --- a/src/v0/sources/shopify/util.js +++ b/src/v0/sources/shopify/util.js @@ -32,7 +32,10 @@ const getDataFromRedis = async (key, metricMetadata) => { ...metricMetadata, }); const redisData = await RedisDB.getVal(key); - if (redisData === null || (typeof redisData === "object" && Object.keys(redisData).length === 0)) { + if ( + redisData === null || + (typeof redisData === 'object' && Object.keys(redisData).length === 0) + ) { stats.increment('shopify_redis_no_val', { ...metricMetadata, }); diff --git a/test/__tests__/data/sanity/active_campaign_output.json b/test/__tests__/data/sanity/active_campaign_output.json deleted file mode 100644 index 544f9b937f..0000000000 --- a/test/__tests__/data/sanity/active_campaign_output.json +++ /dev/null @@ -1,54 +0,0 @@ -[ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://active.campaigns.rudder.com/api/3/contact/sync", - "headers": { - "Content-Type": "application/json", - "Api-Token": "dummyApiToken" - }, - "params": {}, - "body": { - "JSON": { - "contact": { - "email": "manashi@gmail.com", - "phone": 9090909000, - "firstName": null, - "lastName": null - }, - "apiKey": "dummyApiKey" - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://active.campaigns.rudder.com/api/3/contact/sync", - "headers": { - "Content-Type": "application/json", - "Api-Token": "dummyApiToken" - }, - "params": {}, - "body": { - "JSON": { - "contact": { - "email": "testkolkata@rudderlabs.com", - "phone": "570-690-4150", - "firstName": "Sajal", - "lastName": "Mohanta" - }, - "apiKey": "dummyApiKey" - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - } -] diff --git a/test/__tests__/data/sanity/destination_config.json b/test/__tests__/data/sanity/destination_config.json deleted file mode 100644 index 11c999aa9c..0000000000 --- a/test/__tests__/data/sanity/destination_config.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "active_campaign": { - "config": { - "processor": { - "Config": { - "apiKey": "dummyApiKey", - "apiUrl": "https://active.campaigns.rudder.com", - "actid": "476550467", - "eventKey": "f8a866fddc721350fdc2fbbd2e5c43a6dddaaa03" - } - } - } - }, - "clevertap": { - "config": { - "processor": {}, - "router": {} - } - }, - "marketo": { - "config": { - "router": { - "Config": { - "accountId": "marketo_acct_id_success", - "clientId": "marketo_client_id_success", - "clientSecret": "marketo_client_secret_success", - "trackAnonymousEvents": true, - "customActivityEventMap": [{ "from": "Product Clicked", "to": "100001" }], - "customActivityPropertyMap": [{ "from": "name", "to": "productName" }], - "customActivityPrimaryKeyMap": [{ "from": "Product Clicked", "to": "name" }], - "leadTraitMapping": [{ "from": "leadScore", "to": "customLeadScore" }] - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Marketo", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "config": { - "destConfig": { - "defaultConfig": [ - "accountId", - "clientId", - "clientSecret", - "trackAnonymousEvents", - "customActivityEventMap", - "customActivityPropertyMap", - "customActivityPrimaryKeyMap", - "leadTraitMapping" - ] - }, - "secretKeys": ["clientSecret"], - "excludeKeys": [], - "includeKeys": [], - "routerTransform": true, - "supportedSourceTypes": [ - "android", - "ios", - "web", - "unity", - "amp", - "cloud", - "reactnative" - ] - }, - "responseRules": { - "responseType": "JSON", - "rules": { - "retryable": [ - { "success": "false", "errors.0.code": 600 }, - { "success": "false", "errors.0.code": 601 }, - { "success": "false", "errors.0.code": 602 }, - { "success": "false", "errors.0.code": 604 }, - { "success": "false", "errors.0.code": 606 }, - { "success": "false", "errors.0.code": 607 }, - { "success": "false", "errors.0.code": 608 }, - { "success": "false", "errors.0.code": 611 } - ], - "abortable": [ - { "success": "false", "errors.0.code": 603 }, - { "success": "false", "errors.0.code": 605 }, - { "success": "false", "errors.0.code": 609 }, - { "success": "false", "errors.0.code": 610 } - ] - } - }, - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "MARKETO", - "displayName": "Marketo", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - } - } -} diff --git a/test/__tests__/data/sanity/marketo_router_output.json b/test/__tests__/data/sanity/marketo_router_output.json deleted file mode 100644 index 9f967074a3..0000000000 --- a/test/__tests__/data/sanity/marketo_router_output.json +++ /dev/null @@ -1,165 +0,0 @@ -[ - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://marketo_acct_id_success.mktorest.com/rest/v1/activities/external.json", - "headers": { - "Authorization": "Bearer access_token_success", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "input": [ - { - "activityDate": "2020-12-17T21:00:59.176Z", - "activityTypeId": 100001, - "attributes": [], - "leadId": 4, - "primaryAttributeValue": "Test Product" - } - ] - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "jobId": 1 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "accountId": "marketo_acct_id_success", - "clientId": "marketo_client_id_success", - "clientSecret": "marketo_client_secret_success", - "trackAnonymousEvents": true, - "customActivityEventMap": [ - { - "from": "Product Clicked", - "to": "100001" - } - ], - "customActivityPropertyMap": [ - { - "from": "name", - "to": "productName" - } - ], - "customActivityPrimaryKeyMap": [ - { - "from": "Product Clicked", - "to": "name" - } - ], - "leadTraitMapping": [ - { - "from": "leadScore", - "to": "customLeadScore" - } - ] - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Marketo", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "config": { - "destConfig": { - "defaultConfig": [ - "accountId", - "clientId", - "clientSecret", - "trackAnonymousEvents", - "customActivityEventMap", - "customActivityPropertyMap", - "customActivityPrimaryKeyMap", - "leadTraitMapping" - ] - }, - "secretKeys": ["clientSecret"], - "excludeKeys": [], - "includeKeys": [], - "routerTransform": true, - "supportedSourceTypes": ["android", "ios", "web", "unity", "amp", "cloud", "reactnative"] - }, - "responseRules": { - "responseType": "JSON", - "rules": { - "retryable": [ - { - "success": "false", - "errors.0.code": 600 - }, - { - "success": "false", - "errors.0.code": 601 - }, - { - "success": "false", - "errors.0.code": 602 - }, - { - "success": "false", - "errors.0.code": 604 - }, - { - "success": "false", - "errors.0.code": 606 - }, - { - "success": "false", - "errors.0.code": 607 - }, - { - "success": "false", - "errors.0.code": 608 - }, - { - "success": "false", - "errors.0.code": 611 - } - ], - "abortable": [ - { - "success": "false", - "errors.0.code": 603 - }, - { - "success": "false", - "errors.0.code": 605 - }, - { - "success": "false", - "errors.0.code": 609 - }, - { - "success": "false", - "errors.0.code": 610 - } - ] - } - }, - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "MARKETO", - "displayName": "Marketo", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - } -] diff --git a/test/__tests__/data/sanity/sanity_input.json b/test/__tests__/data/sanity/sanity_input.json deleted file mode 100644 index 9dd9961160..0000000000 --- a/test/__tests__/data/sanity/sanity_input.json +++ /dev/null @@ -1,185 +0,0 @@ -{ - "messages": [ - { - "type": "identify", - "event": "identify", - "sentAt": "2021-02-08T12:45:42.760Z", - "userId": "User_111", - "channel": "mobile", - "context": { - "os": { - "name": "iOS", - "version": "13.0" - }, - "app": { - "name": "MyApp", - "build": "1", - "version": "1.0", - "namespace": "com.rudderlabs.MyApp" - }, - "device": { - "id": "e2b94e2d-8327-429c-9d91-792a80d189c8", - "name": "iPhone 11 Pro Max", - "type": "iOS", - "model": "iPhone", - "manufacturer": "Apple" - }, - "locale": "en-US", - "screen": { - "width": 896, - "height": 414, - "density": 3 - }, - "traits": { - "age": 24, - "city": "Bangalore", - "name": "Manashi Mazumder", - "email": "manashi@gmail.com", - "phone": 9090909000, - "userId": "User_111", - "anonymousId": "e2b94e2d-8327-429c-9d91-792a80d189c8" - }, - "library": { - "name": "rudder-ios-library", - "version": "1.0.11" - }, - "network": { - "wifi": true, - "carrier": "unavailable", - "cellular": false, - "bluetooth": false - }, - "timezone": "Asia/Kolkata", - "userAgent": "unknown" - }, - "rudderId": "139d65bb-8a40-48c7-854c-06bbf44f686e", - "messageId": "1612788330-7e1e60a8-fb7e-437d-81c1-5b000318d0cb", - "anonymousId": "e2b94e2d-8327-429c-9d91-792a80d189c8", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-02-08T12:45:30.717Z" - }, - { - "type": "identify", - "sentAt": "2021-04-15T19:43:53.393Z", - "userId": "sajal1234", - "channel": "web", - "context": { - "id": "ID101", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.17", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "www.rudderstack.com", - "path": "/path5", - "title": "JS Test", - "search": "My Page", - "tab_url": "https://odd-rat-19.loca.lt/Rectified.html", - "referrer": "www.google.com", - "initial_referrer": "$direct", - "referring_domain": "", - "initial_referring_domain": "" - }, - "event": "Sample Identify call", - "locale": "en-US", - "screen": { - "density": 2.75 - }, - "traits": { - "id": "ID101", - "city": "east greenwich", - "plan": "Open source", - "tags": ["x0002x", "y0004y", "t0001t"], - "email": "testkolkata@rudderlabs.com", - "event": "Sample Identify call", - "lists": [ - { - "id": 2, - "status": "unsubscribed" - }, - { - "id": 3, - "status": "unsubscribe" - } - ], - "phone": "570-690-4150", - "state": "RI", - "title": "Mr", - "logins": 5, - "mobile": "123456786", - "rating": "Hot", - "street": "19123 forest lane", - "company": { - "id": 378763009439, - "name": "Rudderlabs", - "industry": "IT", - "employee_count": 1200 - }, - "country": "USA", - "sent_at": "20210109134567", - "birthDay": "2021/04/15", - "category": "SampleIdentify", - "industry": "ITES", - "lastName": "Mohanta", - "timezone": "Berlin", - "Homephone": 9836543283, - "createdAt": "2021/04/15", - "fieldInfo": { - "state": "California", - "Address": "kolkata", - "listBox": ["Option1", "Option2"], - "CheckBox": ["Option1", "Option2", "Option3"], - "TextArea": "This is a sample text area field value . it is tested for Active Campaign. It should have more than 100 words. Lorem ipsum is a dummy sentence to fill up any area. And also , it is used to fill up dummy website. So, it is wriiten by simply wasting time. ", - "DateField": "1988-12-05", - "HiddenField": "Hidden", - "RadioButton": "Option1", - "multiChoice": "Option 1", - "DateTimeField": "2020-05-19T02:45:00-05:00" - }, - "firstName": "Sajal", - "isEnabled": true, - "timestamp": "1403743443", - "event_text": "identify", - "leadSource": "WEB", - "postalCode": "94115", - "received_at": "202101091347654", - "organizationId": 378763009439, - "original_timestamp": "1403743443" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.17" - }, - "sent_at": "20210109134567", - "campaign": {}, - "timestamp": "1403743443", - "userAgent": "Mozilla/5.0 (Linux; Android 11; sdk_gphone_x86_arm Build/RSR1.201013.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/83.0.4103.106 Mobile Safari/537.36", - "event_text": "identify", - "externalId": [ - { - "id": "0035g000002XN5MAAW", - "type": "Salesforce-Contact" - } - ], - "received_at": "202101091347654", - "original_timestamp": "1403743443" - }, - "rudderId": "bc2402b7-6796-4fa5-9beb-bad3761fc961", - "messageId": "9d0df235-d354-4a81-8056-07dcb58081d7", - "anonymousId": "anonIDfromAndroid", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-04-15T19:43:53.392Z" - } - ] -} diff --git a/test/__tests__/data/sanity/sanity_router_input.json b/test/__tests__/data/sanity/sanity_router_input.json deleted file mode 100644 index 16b8ccffad..0000000000 --- a/test/__tests__/data/sanity/sanity_router_input.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "messages": [ - { - "anonymousId": "anon_id_success", - "channel": "mobile", - "context": { - "app": { - "build": "1", - "name": "TestAppName", - "namespace": "com.android.sample", - "version": "1.0" - }, - "device": { - "id": "anon_id_success", - "manufacturer": "Google", - "model": "Android SDK built for x86", - "name": "generic_x86", - "type": "android" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.1-beta.1" - }, - "locale": "en-US", - "network": { - "carrier": "Android", - "bluetooth": false, - "cellular": true, - "wifi": true - }, - "os": { - "name": "Android", - "version": "8.1.0" - }, - "screen": { - "density": 420, - "height": 1794, - "width": 1080 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "anon_id_success" - }, - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)" - }, - "event": "Product Clicked", - "integrations": { - "All": true - }, - "messageId": "id1", - "properties": { - "name": "Test Product" - }, - "originalTimestamp": "2020-12-17T21:00:59.176Z", - "type": "track", - "sentAt": "2020-03-12T09:05:03.421Z" - } - ] -} diff --git a/test/__tests__/legacyRouter.test.ts b/test/__tests__/legacyRouter.test.ts index 768db08ca8..926f6e76d4 100644 --- a/test/__tests__/legacyRouter.test.ts +++ b/test/__tests__/legacyRouter.test.ts @@ -1,6 +1,6 @@ import fs from 'fs'; import path from 'path'; -import DestinationController from '../../src/controllers/destination'; +import { DestinationController } from '../../src/controllers/destination'; const destArg = process.argv.filter((x) => x.startsWith('--destName='))[0]; // send arguments on which destination const typeArg = process.argv.filter((x) => x.startsWith('--type='))[0]; // send argument on which function diff --git a/test/__tests__/sanity.test.js b/test/__tests__/sanity.test.js deleted file mode 100644 index ae5faa917c..0000000000 --- a/test/__tests__/sanity.test.js +++ /dev/null @@ -1,204 +0,0 @@ -jest.mock("axios"); -const name = "Sanity"; -const fs = require("fs"); -const path = require("path"); -const version = "v0"; -const { getDirectories } = require("./util"); -const { mockaxios } = require("../__mocks__/network"); - -// ******************************** -// Getting Started -// ******************************** -// sanity-folder-structure -// __tests__ -// | -// |--sanity.test.js -// |--data -// | | -// | |--sanity -// | | -// | {integration(s)}_output.json -// | {integration(s)}_router_output.json -// | sanity_input.json -// | sanity_router_input.json -// | destination_config.json - -// ------ destination_config.json ------ -// JSON to store the destination-config of all the destinations -// Each destination-config object has a config object storing the -// processor/ router (transform-at) configs -// ------------------------------------- -// If transformation is only done at processor -// only use the processor as key and store the -// destination definition as value. -// -// Format : -// { -// "clevertap": { -// "config": { -// "processor": { ...destination_definition }, -// "router": { ...destination_definition } -// } -// } -// .. -// .. -// } - -// ----- sanity_input.json ----- -// JSON to store the sanity input messages which will be -// used to test sanity for all the destination. -// -// Format: -// { -// "messages": [ -// { sanity_input_message_1}, -// { sanity_input_message_2}, -// { sanity_input_message_3} -// ... -// ] -// } - -// ----- sanity_router_input.json ----- -// JSON to store the sanity input messages which will be -// used to test sanity for all the destination. -// These inputs will be used for testing router -// transformation for all destination which support it. -// -// Format: -// { -// "messages": [ -// { router_sanity_input_message_1}, -// { router_sanity_input_message_2}, -// { router_sanity_input_message_3} -// ... -// ] -// } - -// ------ {integration(s)}_output.json ------ -// These are specific output for each of the destinations -// given the sanity input. We are using jest result matcher -// to check if the output is matching with the expected output. -// Example clevertap_output.json -// Format: -// [ -// {sanity_output_for_message_1}, -// {sanity_output_for_message_2}, -// .. -// ] - -// ------ {integration(s)}_router_output.json ------ -// These are specific output for each of the destinations -// given the router sanity input. -// ** CHECK IF THE PARTICULAR DESTINATION SUPPORTS ROUTER TRANSFORMATION ** -// Example clevertap_router_output.json -// Format: -// [ -// {router_sanity_output_for_message_1}, -// {router_sanity_output_for_message_2}, -// .. -// ] - -// Parsing all the destination names from /v0/destinations dir structure -// parsing it into an array of string. This keeping the destinations to test -// dynamic. -// const integrations = getDirectories( -// path.resolve(__dirname, `../${version}/destinations/`) -// ); -// For Testing Current: -// Uncomment this Line and comment the above 3 lines -const integrations = ["marketo"]; - -// Parsing the sanity input JSON which will be used for testing each destination -const processorSanityInput = JSON.parse( - fs.readFileSync(path.resolve(__dirname, `./data/sanity/sanity_input.json`)) -); - -// Parsing the sanity router input JSON which will be used for testing each destination -// which support it -const routerSanityInputRouter = JSON.parse( - fs.readFileSync( - path.resolve(__dirname, `./data/sanity/sanity_router_input.json`) - ) -); -// Parsing the destination config JSON from which we will get the destination definitions -// along with if the destination supports router-transformation -const destinationConfig = JSON.parse( - fs.readFileSync( - path.resolve(__dirname, `./data/sanity/destination_config.json`) - ) -); - -// Iterating each of the destinations -integrations.forEach(intg => { - // Getting the transformation object - const transformer = require(`../../src/${version}/destinations/${intg}/transform`); - // Getting the config for this particular destination - const { config } = destinationConfig[`${intg}`]; - // Where the ransformation is done at (processor, router ..) - Object.keys(config).forEach(processAt => { - // Depending on the case - switch (processAt) { - case "processor": - { - // Parsing the expected data for this particular destination - const expectedData = JSON.parse( - fs.readFileSync( - path.resolve(__dirname, `./data/sanity/${intg}_output.json`) - ) - ); - // For each of the messages we are processing using the transformer - processorSanityInput.messages.forEach((message, index) => { - // Building the event object with specified destination-definition - const event = { - message, - destination: config[`${processAt}`] - }; - // Sending the event to transformer and matching the result with expected output - it(`${name} - integration[Processor]: ${intg} payload:${index}`, async () => { - try { - const output = await transformer.process(event); - expect(output).toEqual(expectedData[index]); - } catch (error) { - expect(error.message).toEqual(expectedData[index].error); - } - }); - }); - } - break; - - case "router": - { - // Parsing the expected router output data for this particular destination - const expectedData = JSON.parse( - fs.readFileSync( - path.resolve( - __dirname, - `./data/sanity/${intg}_router_output.json` - ) - ) - ); - // For each of the messages we are processing using the router transformer - routerSanityInputRouter.messages.forEach((message, index) => { - // Building the event object with specified destination-definition - const events = [ - { - message, - metadata: { - jobId: 1 - }, - destination: config[`${processAt}`] - } - ]; - // Sending the event to router transformer of this destinationand matching the result with expected output - it(`${name} - integration(Router): ${intg} payload:${index}`, async () => { - const routerOutput = await transformer.processRouterDest(events); - expect(routerOutput[0]).toEqual(expectedData[index]); - }); - }); - } - break; - default: - throw new Error("Undefined Transform-At Config"); - } - }); -}); diff --git a/test/__tests__/user_transformation_ts.test.ts b/test/__tests__/user_transformation_ts.test.ts index 418c42fe33..971476e513 100644 --- a/test/__tests__/user_transformation_ts.test.ts +++ b/test/__tests__/user_transformation_ts.test.ts @@ -1,5 +1,5 @@ import fetch from 'node-fetch'; -import UserTransformService from '../../src/services/userTransform'; +import { UserTransformService } from '../../src/services/userTransform'; import { FeatureFlags, FEATURE_FILTER_CODE } from '../../src/middlewares/featureFlag'; jest.mock('node-fetch', () => jest.fn()); diff --git a/test/apitests/data_scenarios/source/v1/pipedream.json b/test/apitests/data_scenarios/source/v1/pipedream.json index 4219f3f6b1..1496471066 100644 --- a/test/apitests/data_scenarios/source/v1/pipedream.json +++ b/test/apitests/data_scenarios/source/v1/pipedream.json @@ -46,4 +46,4 @@ } } ] -} \ No newline at end of file +} diff --git a/test/controllerUtility/ctrl-utility.test.ts b/test/controllerUtility/ctrl-utility.test.ts index c3a668d7e7..bf9eef1846 100644 --- a/test/controllerUtility/ctrl-utility.test.ts +++ b/test/controllerUtility/ctrl-utility.test.ts @@ -1,5 +1,5 @@ import { ProcessorTransformationRequest, RouterTransformationRequestData } from '../../src/types'; -import ControllerUtility from '../../src/controllers/util'; +import { ControllerUtility } from '../../src/controllers/util'; type timestampTestCases = { caseName: string; From ff80b885fe0507c137b3c9eacffcef331010da0c Mon Sep 17 00:00:00 2001 From: Mihir Bhalala <77438541+mihir-4116@users.noreply.github.com> Date: Tue, 14 Nov 2023 18:33:35 +0530 Subject: [PATCH 024/135] feat(INT-305): onboard gladly destination (#2786) * feat: onboard gladly destination * chore: code review changes * chore: code review changes * chore: code review changes * chore: code review changes * chore: code review changes * chore: code review changes * chore: code review changes * chore: code review changes * fix: package.json changes * chore: added utility tests * chore: added gladly router and processor tests * chore: added gladly rETL tests * fix: sonar code smell * chore: code review changes --- package-lock.json | 131 ++- package.json | 2 +- .../v2/destinations/gladly/procWorkflow.yaml | 88 ++ .../v2/destinations/gladly/rtWorkflow.yaml | 33 + src/cdk/v2/destinations/gladly/utils.js | 175 ++++ src/cdk/v2/destinations/gladly/utils.test.js | 503 +++++++++++ src/cdk/v2/handler.ts | 11 +- src/constants/destinationCanonicalNames.js | 2 +- src/features.json | 1 + src/services/destination/cdkV2Integration.ts | 7 +- .../destinations/gladly/network.ts | 120 +++ .../destinations/gladly/processor/data.ts | 809 ++++++++++++++++++ .../destinations/gladly/router/data.ts | 604 +++++++++++++ 13 files changed, 2456 insertions(+), 30 deletions(-) create mode 100644 src/cdk/v2/destinations/gladly/procWorkflow.yaml create mode 100644 src/cdk/v2/destinations/gladly/rtWorkflow.yaml create mode 100644 src/cdk/v2/destinations/gladly/utils.js create mode 100644 src/cdk/v2/destinations/gladly/utils.test.js create mode 100644 test/integrations/destinations/gladly/network.ts create mode 100644 test/integrations/destinations/gladly/processor/data.ts create mode 100644 test/integrations/destinations/gladly/router/data.ts diff --git a/package-lock.json b/package-lock.json index 28d814c925..4f83954e5b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,7 +20,7 @@ "@ndhoule/extend": "^2.0.0", "@pyroscope/nodejs": "^0.2.6", "@rudderstack/integrations-lib": "^0.1.8", - "@rudderstack/workflow-engine": "^0.5.7", + "@rudderstack/workflow-engine": "^0.6.9", "ajv": "^8.12.0", "ajv-draft-04": "^1.0.0", "ajv-formats": "^2.1.1", @@ -6657,13 +6657,45 @@ "tslib": "^2.4.0" } }, - "node_modules/@rudderstack/json-template-engine": { + "node_modules/@rudderstack/integrations-lib/node_modules/@aws-crypto/sha256-js": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-js/-/sha256-js-4.0.0.tgz", + "integrity": "sha512-MHGJyjE7TX9aaqXj7zk2ppnFUOhaDs5sP+HtNS0evOxn72c+5njUmyJmpGd7TfyoDznZlHMmdo/xGUdu2NIjNQ==", + "dependencies": { + "@aws-crypto/util": "^4.0.0", + "@aws-sdk/types": "^3.222.0", + "tslib": "^1.11.1" + } + }, + "node_modules/@rudderstack/integrations-lib/node_modules/@aws-crypto/sha256-js/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "node_modules/@rudderstack/integrations-lib/node_modules/@aws-crypto/util": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/util/-/util-4.0.0.tgz", + "integrity": "sha512-2EnmPy2gsFZ6m8bwUQN4jq+IyXV3quHAcwPOS6ZA3k+geujiqI8aRokO2kFJe+idJ/P3v4qWI186rVMo0+zLDQ==", + "dependencies": { + "@aws-sdk/types": "^3.222.0", + "@aws-sdk/util-utf8-browser": "^3.0.0", + "tslib": "^1.11.1" + } + }, + "node_modules/@rudderstack/integrations-lib/node_modules/@aws-crypto/util/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "node_modules/@rudderstack/integrations-lib/node_modules/@rudderstack/json-template-engine": { "version": "0.5.5", - "license": "MIT" + "resolved": "https://registry.npmjs.org/@rudderstack/json-template-engine/-/json-template-engine-0.5.5.tgz", + "integrity": "sha512-p3HdTqgZiJjjZmjaHN2paa1e87ifGE5UjkA4zdvge4bBzJbKKMQNWqRg6I96SwoA+hsxNkW/f9R83SPLU9t7LA==" }, - "node_modules/@rudderstack/workflow-engine": { - "version": "0.5.7", - "license": "MIT", + "node_modules/@rudderstack/integrations-lib/node_modules/@rudderstack/workflow-engine": { + "version": "0.5.8", + "resolved": "https://registry.npmjs.org/@rudderstack/workflow-engine/-/workflow-engine-0.5.8.tgz", + "integrity": "sha512-H1aCowYqTnOoqJtL9cGDhdhoGNl+KzqmVbSjFmE7n75onZaIMs87+HQyW08jYxS9l1Uo4TL8SAvzFICqFqkBbw==", "dependencies": { "@aws-crypto/sha256-js": "^4.0.0", "@rudderstack/json-template-engine": "^0.5.5", @@ -6673,27 +6705,81 @@ "object-sizeof": "^2.6.3" } }, + "node_modules/@rudderstack/json-template-engine": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/@rudderstack/json-template-engine/-/json-template-engine-0.8.2.tgz", + "integrity": "sha512-9oMBnqgNuwiXd7MUlNOAchCnJXQAy6w6XGmDqDM6iXdYDkvqYFiq7sbg5j4SdtpTTST293hahREr5PXfFVzVKg==" + }, + "node_modules/@rudderstack/workflow-engine": { + "version": "0.6.9", + "resolved": "https://registry.npmjs.org/@rudderstack/workflow-engine/-/workflow-engine-0.6.9.tgz", + "integrity": "sha512-b0ZHURJfCj2REIL/w7AJgJ+K5BGwIVX3sRDZQqN3F4YWcZX3ZYUXo7gtUeb99FLnZzm7KuThIWR02Fxwos+L4Q==", + "dependencies": { + "@aws-crypto/sha256-js": "^5.0.0", + "@rudderstack/json-template-engine": "^0.8.1", + "jsonata": "^2.0.3", + "lodash": "^4.17.21", + "object-sizeof": "^2.6.3", + "yaml": "^2.3.2" + } + }, "node_modules/@rudderstack/workflow-engine/node_modules/@aws-crypto/sha256-js": { - "version": "4.0.0", - "license": "Apache-2.0", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-js/-/sha256-js-5.2.0.tgz", + "integrity": "sha512-FFQQyu7edu4ufvIZ+OadFpHHOt+eSTBaYaki44c+akjg7qZg9oOQeLlk77F6tSYqjDAFClrHJk9tMf0HdVyOvA==", "dependencies": { - "@aws-crypto/util": "^4.0.0", + "@aws-crypto/util": "^5.2.0", "@aws-sdk/types": "^3.222.0", - "tslib": "^1.11.1" + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" } }, "node_modules/@rudderstack/workflow-engine/node_modules/@aws-crypto/util": { - "version": "4.0.0", - "license": "Apache-2.0", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/util/-/util-5.2.0.tgz", + "integrity": "sha512-4RkU9EsI6ZpBve5fseQlGNUWKMa1RLPQ1dnjnQoe07ldfIzcsGb5hC5W0Dm7u423KWzawlrpbjXBrXCEv9zazQ==", "dependencies": { "@aws-sdk/types": "^3.222.0", - "@aws-sdk/util-utf8-browser": "^3.0.0", - "tslib": "^1.11.1" + "@smithy/util-utf8": "^2.0.0", + "tslib": "^2.6.2" } }, - "node_modules/@rudderstack/workflow-engine/node_modules/tslib": { - "version": "1.14.1", - "license": "0BSD" + "node_modules/@rudderstack/workflow-engine/node_modules/@smithy/is-array-buffer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.0.0.tgz", + "integrity": "sha512-z3PjFjMyZNI98JFRJi/U0nGoLWMSJlDjAW4QUX2WNZLas5C0CmVV6LJ01JI0k90l7FvpmixjWxPFmENSClQ7ug==", + "dependencies": { + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@rudderstack/workflow-engine/node_modules/@smithy/util-buffer-from": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.0.0.tgz", + "integrity": "sha512-/YNnLoHsR+4W4Vf2wL5lGv0ksg8Bmk3GEGxn2vEQt52AQaPSCuaO5PM5VM7lP1K9qHRKHwrPGktqVoAHKWHxzw==", + "dependencies": { + "@smithy/is-array-buffer": "^2.0.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@rudderstack/workflow-engine/node_modules/@smithy/util-utf8": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.0.2.tgz", + "integrity": "sha512-qOiVORSPm6Ce4/Yu6hbSgNHABLP2VMv8QOC3tTDNHHlWY19pPyc++fBTbZPtx6egPXi4HQxKDnMxVxpbtX2GoA==", + "dependencies": { + "@smithy/util-buffer-from": "^2.0.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } }, "node_modules/@sideway/address": { "version": "4.1.4", @@ -19379,8 +19465,9 @@ } }, "node_modules/tslib": { - "version": "2.5.3", - "license": "0BSD" + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/tsscmp": { "version": "1.0.6", @@ -19918,9 +20005,9 @@ "license": "ISC" }, "node_modules/yaml": { - "version": "2.3.1", - "dev": true, - "license": "ISC", + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.4.tgz", + "integrity": "sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA==", "engines": { "node": ">= 14" } diff --git a/package.json b/package.json index f8851cc687..8a8b6177bd 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ "@ndhoule/extend": "^2.0.0", "@pyroscope/nodejs": "^0.2.6", "@rudderstack/integrations-lib": "^0.1.8", - "@rudderstack/workflow-engine": "^0.5.7", + "@rudderstack/workflow-engine": "^0.6.9", "ajv": "^8.12.0", "ajv-draft-04": "^1.0.0", "ajv-formats": "^2.1.1", diff --git a/src/cdk/v2/destinations/gladly/procWorkflow.yaml b/src/cdk/v2/destinations/gladly/procWorkflow.yaml new file mode 100644 index 0000000000..fe8697bc31 --- /dev/null +++ b/src/cdk/v2/destinations/gladly/procWorkflow.yaml @@ -0,0 +1,88 @@ +bindings: + - name: EventType + path: ../../../../constants + - path: ./utils + exportAll: true + - name: defaultRequestConfig + path: ../../../../v0/util + - name: removeUndefinedAndNullValues + path: ../../../../v0/util + - name: getDestinationExternalID + path: ../../../../v0/util + - name: httpGET + path: ../../../../adapters/network + - name: processAxiosResponse + path: ../../../../adapters/utils/networkUtils + + +steps: + - name: checkIfProcessed + condition: .message.statusCode + template: | + $.batchMode ? .message.body.JSON : .message + onComplete: return + + - name: messageType + template: | + .message.type.toLowerCase() + + - name: validateInput + template: | + let messageType = $.outputs.messageType + $.assert(messageType, "message Type is not present. Aborting") + $.assert(messageType in {{$.EventType.([.IDENTIFY])}}, "message type " + messageType + " is not supported") + $.assertConfig(.destination.Config.apiToken, "API Token is not present. Aborting") + $.assertConfig(.destination.Config.domain, "Gladly domain is not present. Aborting") + $.assertConfig(.destination.Config.userName, "User Name is not present. Aborting") + + - name: preparePayload + template: | + $.context.payload = { + name: .message.traits.name || .message.context.traits.name, + image: .message.traits.avatar || .message.context.traits.avatar, + address: .message.traits.address || .message.context.traits.address + } + $.context.payload.address && typeof $.context.payload.address === "object" ? $.context.payload.address = JSON.stringify($.context.payload.address) + $.context.payload.emails = $.formatField(.message, "email") + $.context.payload.phones = $.formatField(.message, "phone") + $.context.payload.customAttributes = $.getCustomAttributes(.message) + $.context.payload.externalCustomerId = $.getExternalCustomerId(.message) + $.context.payload.id = $.getCustomerId(.message) + $.context.payload = $.removeUndefinedAndNullValues($.context.payload) + + - name: validatePayload + template: | + $.validatePayload($.context.payload) + + - name: findCustomer + description: Find if customer is exist or not based on email, phone or externalCustomerId + condition: $.getQueryParams($.context.payload) !== undefined + template: | + const requestOptions = { + headers: $.getHeaders(.destination) + } + const endpoint = $.getEndpoint(.destination) + "?" + $.getQueryParams($.context.payload); + const rawResponse = await $.httpGET(endpoint,requestOptions) + const processedResponse = $.processAxiosResponse(rawResponse) + processedResponse + + - name: createCustomer + description: Build response for create customer + condition: $.outputs.findCustomer.status === 400 || ($.outputs.findCustomer.status === 200 && $.outputs.findCustomer.response.length === 0) || $.getQueryParams($.context.payload) === undefined + template: | + const response = $.defaultRequestConfig() + response.body.JSON = $.removeUndefinedAndNullValues($.context.payload) + response.endpoint = $.getEndpoint(.destination) + response.method = "POST" + response.headers = $.getHeaders(.destination) + response + else: + name: updateCustomer + description: Build response for update customer + template: | + const response = $.defaultRequestConfig() + response.body.JSON = $.removeUndefinedAndNullValues($.context.payload.{~["id"]}) + response.endpoint = $.getEndpoint(.destination) + "/" + $.outputs.findCustomer.response[0].id + response.method = "PATCH" + response.headers = $.getHeaders(.destination) + response diff --git a/src/cdk/v2/destinations/gladly/rtWorkflow.yaml b/src/cdk/v2/destinations/gladly/rtWorkflow.yaml new file mode 100644 index 0000000000..341e5552c8 --- /dev/null +++ b/src/cdk/v2/destinations/gladly/rtWorkflow.yaml @@ -0,0 +1,33 @@ +bindings: + - name: handleRtTfSingleEventError + path: ../../../../v0/util/index + - path: ./utils + exportAll: true + +steps: + - name: validateInput + template: | + $.assert(Array.isArray(^) && ^.length > 0, "Invalid event array") + + - name: transform + externalWorkflow: + path: ./procWorkflow.yaml + loopOverInput: true + + - name: successfulEvents + template: | + $.outputs.transform#idx.output.({ + "batchedRequest": ., + "batched": false, + "destination": ^[idx].destination, + "metadata": ^[idx].metadata[], + "statusCode": 200 + })[] + - name: failedEvents + template: | + $.outputs.transform#idx.error.( + $.handleRtTfSingleEventError(^[idx], .originalError ?? ., {}) + )[] + - name: finalPayload + template: | + [...$.outputs.successfulEvents, ...$.outputs.failedEvents] \ No newline at end of file diff --git a/src/cdk/v2/destinations/gladly/utils.js b/src/cdk/v2/destinations/gladly/utils.js new file mode 100644 index 0000000000..5abc9b6dd0 --- /dev/null +++ b/src/cdk/v2/destinations/gladly/utils.js @@ -0,0 +1,175 @@ +const get = require('get-value'); +const { InstrumentationError } = require('@rudderstack/integrations-lib'); +const { + base64Convertor, + getDestinationExternalID, +} = require('../../../../v0/util'); +const { MappedToDestinationKey } = require('../../../../constants'); + +const reservedCustomAttributes = [ + 'email', + 'phone', + 'address', + 'name', + 'avatar', + 'firstName', + 'lastName', + 'userId', +]; + +const externalIdKey = 'context.externalId.0.id'; +const identifierTypeKey = 'context.externalId.0.identifierType'; + +const getHeaders = (destination) => { + const { apiToken, userName } = destination.Config; + const credentials = `${userName}:${apiToken}`; + const base64Credentials = base64Convertor(credentials); + return { + 'Content-Type': 'application/json', + Authorization: `Basic ${base64Credentials}`, + }; +}; + +const getEndpoint = (destination) => { + const { domain } = destination.Config; + return `https://${domain}/api/v1/customer-profiles`; +}; + + +const getFieldValue = (field) => { + if (field) { + if (Array.isArray(field)) { + return field.map((item) => ({ original: item })); + } + return [{ original: field }]; + } + return undefined; +} + +const formatFieldForRETl = (message, fieldName) => { + const identifierType = get(message, identifierTypeKey); + if (identifierType && identifierType === fieldName) { + const field = get(message, externalIdKey); + if (field) { + return [{ original: field }]; + } + } + const key = fieldName === 'email' ? 'emails' : 'phones'; + const field = get(message, `traits.${key}`); + return getFieldValue(field); +}; + +const formatFieldForEventStream = (message, fieldName) => { + const field = get(message, `context.traits.${fieldName}`); + return getFieldValue(field); +}; + +const formatField = (message, fieldName) => { + const mappedToDestination = get(message, MappedToDestinationKey); + if (mappedToDestination) { + return formatFieldForRETl(message, fieldName); + } + return formatFieldForEventStream(message, fieldName); + +}; + +const getCustomAttributes = (message) => { + const mappedToDestination = get(message, MappedToDestinationKey); + // for rETL + if (mappedToDestination) { + if (message?.traits?.customAttributes && typeof message.traits.customAttributes === 'object') { + return Object.keys(message.traits.customAttributes).length > 0 ? message.traits.customAttributes : undefined; + } + return undefined; + } + + // for event stream + const customAttributes = message.context?.traits || {}; + reservedCustomAttributes.forEach((customAttribute) => { + if (customAttributes[customAttribute]) { + delete customAttributes[customAttribute]; + } + }); + return Object.keys(customAttributes).length > 0 ? customAttributes : undefined; +}; + +const getExternalCustomerId = (message) => { + const mappedToDestination = get(message, MappedToDestinationKey); + // for rETL + if (mappedToDestination) { + const identifierType = get(message, identifierTypeKey); + if (identifierType === 'externalCustomerId') { + return get(message, externalIdKey); + } + + if (message?.traits?.externalCustomerId) { + return message.traits.externalCustomerId; + } + + return undefined; + } + + // for event stream + return message.userId; +}; + +const getCustomerId = (message) => { + const mappedToDestination = get(message, MappedToDestinationKey); + // for rETL + if (mappedToDestination) { + const identifierType = get(message, identifierTypeKey); + if (identifierType === 'id') { + return get(message, externalIdKey); + } + + if (message?.traits?.id) { + return message.traits.id; + } + + return undefined; + } + + // for event stream + const customerId = getDestinationExternalID(message, 'GladlyCustomerId'); + if (customerId) { + return customerId; + } + + return undefined; +}; + +const validatePayload = (payload) => { + if (!(payload?.phones || payload?.emails || payload?.id || payload?.externalCustomerId)) { + throw new InstrumentationError('One of phone, email, userId or GladlyCustomerId is required for an identify call'); + } +}; + +const getQueryParams = (payload) => { + if (payload.emails && payload.emails.length > 0) { + return `email=${encodeURIComponent(payload.emails[0].original)}` + } + + if (payload.phones && payload.phones.length > 0) { + return `phoneNumber=${encodeURIComponent(payload.phones[0].original)}` + } + + if (payload.externalCustomerId) { + return `externalCustomerId=${encodeURIComponent(payload.externalCustomerId)}` + } + + return undefined; +} + +module.exports = { + getHeaders, + getEndpoint, + formatField, + getFieldValue, + getCustomerId, + getQueryParams, + validatePayload, + formatFieldForRETl, + getCustomAttributes, + getExternalCustomerId, + formatFieldForEventStream +}; diff --git a/src/cdk/v2/destinations/gladly/utils.test.js b/src/cdk/v2/destinations/gladly/utils.test.js new file mode 100644 index 0000000000..116f150448 --- /dev/null +++ b/src/cdk/v2/destinations/gladly/utils.test.js @@ -0,0 +1,503 @@ +const { + getHeaders, + getEndpoint, + formatField, + getCustomerId, + getFieldValue, + getQueryParams, + validatePayload, + formatFieldForRETl, + getCustomAttributes, + getExternalCustomerId, + formatFieldForEventStream, +} = require('./utils'); +const { base64Convertor } = require('../../../../v0/util'); + +describe('Unit test cases for getHeaders function', () => { + it('Should return headers', () => { + const destination = { + Config: { + apiToken: 'token', + userName: 'user', + }, + }; + const expectedHeaders = { + 'Content-Type': 'application/json', + Authorization: `Basic ${base64Convertor('user:token')}`, + }; + + const result = getHeaders(destination); + + expect(result).toEqual(expectedHeaders); + }); +}); + +describe('Unit test cases for getEndpoint function', () => { + it('Should return destination endpoint', () => { + const destination = { + Config: { + domain: 'rudderstack.us-uat.gladly.qa', + }, + }; + const expected = 'https://rudderstack.us-uat.gladly.qa/api/v1/customer-profiles'; + const result = getEndpoint(destination); + expect(result).toBe(expected); + }); +}); + +describe('Unit test cases for getFieldValue function', () => { + it('Should return an array with a single object containing the original value when the input field is a string', () => { + const field = 'rudderlabs1@gmail.com'; + const result = getFieldValue(field); + expect(result).toEqual([{ original: field }]); + }); + + it('should return an array with each element containing the original value when the input field is an array', () => { + const field = ['rudderlabs1@gmail.com', 'rudderlabs2@gmail.com', 'rudderlabs3@gmail.com']; + const result = getFieldValue(field); + expect(result).toEqual([ + { + original: 'rudderlabs1@gmail.com', + }, + { + original: 'rudderlabs2@gmail.com', + }, + { + original: 'rudderlabs3@gmail.com', + }, + ]); + }); + + it('Should return undefined when the input field is null', () => { + const field = null; + const result = getFieldValue(field); + expect(result).toBeUndefined(); + }); + + it('Should return undefined when the input field is undefined', () => { + const field = undefined; + const result = getFieldValue(field); + expect(result).toBeUndefined(); + }); +}); + +describe('Unit test cases for formatFieldForRETl function', () => { + it('should return the object containing the original value when identifierType matches fieldName', () => { + const message = { + context: { + externalId: [ + { + id: 'test@rudderlabs.com', + identifierType: 'email', + }, + ], + }, + traits: { + emails: ['test@rudderlabs.com', 'test@rudderlabshome.com'], + }, + }; + const fieldName = 'email'; + const expected = [{ original: 'test@rudderlabs.com' }]; + + const result = formatFieldForRETl(message, fieldName); + + expect(result).toEqual(expected); + }); + + it('Should retrieve the email value from traits when fieldName does not match with identifierType', () => { + const message = { + context: { + externalId: [ + { + id: '+91 9999999999', + identifierType: 'phone', + }, + ], + }, + traits: { + emails: ['test@rudderlabs.com', 'test@rudderlabshome.com'], + }, + }; + const fieldName = 'email'; + const expected = [{ original: 'test@rudderlabs.com' }, { original: 'test@rudderlabshome.com' }]; + + const result = formatFieldForRETl(message, fieldName); + + expect(result).toEqual(expected); + }); +}); + +describe('Unit test cases for formatFieldForEventStream function', () => { + it('Should return field value when fieldName exist in payload', () => { + const message = { + context: { + traits: { + phone: '+91 9999999999', + }, + }, + }; + const fieldName = 'phone'; + const expected = [{ original: '+91 9999999999' }]; + + const result = formatFieldForEventStream(message, fieldName); + expect(result).toEqual(expected); + }); + + it('Should return undefined when fieldName does not exist in payload', () => { + const message = { + context: { + traits: { + phone: '+91 9999999999', + }, + }, + }; + const fieldName = 'email'; + const result = formatFieldForEventStream(message, fieldName); + expect(result).toBeUndefined(); + }); +}); + +describe('Unit test cases for formatField function', () => { + describe('rETL tests', () => { + it('Should return field value from externalId when identifier type matches with fieldName', () => { + const message = { + context: { + externalId: [ + { + id: '+91 9999999999', + identifierType: 'phone', + }, + ], + mappedToDestination: true, + }, + traits: { + emails: ['test@rudderlabs.com', 'test@rudderlabshome.com'], + }, + }; + const result = formatField(message, 'phone'); + expect(result).toEqual([{ original: '+91 9999999999' }]); + }); + + it('Should return field value from traits when identifier type does not match with fieldName', () => { + const message = { + context: { + externalId: [ + { + id: 'user@1', + identifierType: 'externalCustomerId', + }, + ], + mappedToDestination: true, + }, + traits: { + phones: ['+91 9999999999'], + }, + }; + const result = formatField(message, 'phone'); + expect(result).toEqual([{ original: '+91 9999999999' }]); + }); + }); + + describe('Event stream tests', () => { + it('Should return field value from payload', () => { + const message = { + context: { + traits: { + phone: ['+91 9999999999'], + }, + }, + }; + const result = formatField(message, 'phone'); + expect(result).toEqual([{ original: '+91 9999999999' }]); + }); + }); +}); + +describe('Unit test cases for getCustomAttributes function', () => { + describe('rETL tests', () => { + it('Should return custom attributes from payload', () => { + const message = { + context: { + mappedToDestination: true, + }, + traits: { + customAttributes: { + attribute1: 'value1', + attribute2: 'value2', + }, + }, + }; + const result = getCustomAttributes(message); + expect(result).toEqual({ + attribute1: 'value1', + attribute2: 'value2', + }); + }); + + it('Should return undefined when empty custom attributes object is present in payload', () => { + const message = { + context: { + mappedToDestination: true, + }, + traits: { + customAttributes: {}, + }, + }; + const result = getCustomAttributes(message); + expect(result).toBeUndefined(); + }); + + it('Should return undefined when no custom attributes are present in payload', () => { + const message = { + context: { + mappedToDestination: true, + }, + traits: {}, + }; + const result = getCustomAttributes(message); + expect(result).toBeUndefined(); + }); + }); + + describe('Event stream tests', () => { + it('Should filter traits and return remaining custom attributes from payload', () => { + const message = { + context: { + traits: { + name: 'John Doe', + email: 'john@gmail.com', + age: 65, + source: 'rudderstack', + }, + }, + }; + const result = getCustomAttributes(message); + expect(result).toEqual({ + age: 65, + source: 'rudderstack', + }); + }); + + it('Should return undefined when empty traits object is present in payload', () => { + const message = { + context: { + traits: {}, + }, + }; + const result = getCustomAttributes(message); + expect(result).toBeUndefined(); + }); + + it('Should return undefined when no traits object is present in payload', () => { + const message = { + context: {}, + }; + const result = getCustomAttributes(message); + expect(result).toBeUndefined(); + }); + }); +}); + +describe('Unit test cases for getExternalCustomerId function', () => { + describe('rETL tests', () => { + it('Should return the external ID when the identifier type is "externalCustomerId"', () => { + const message = { + context: { + externalId: [ + { + id: 'externalCustomer@1', + identifierType: 'externalCustomerId', + }, + ], + mappedToDestination: true, + }, + }; + + const result = getExternalCustomerId(message); + expect(result).toBe('externalCustomer@1'); + }); + + it('Should return the external ID from traits when identifier type is not "externalCustomerId"', () => { + const message = { + context: { + externalId: [ + { + id: 'test@rudderlabs.com', + identifierType: 'email', + }, + ], + mappedToDestination: true, + }, + traits: { + externalCustomerId: 'externalCustomer@1', + }, + }; + const result = getExternalCustomerId(message); + expect(result).toBe('externalCustomer@1'); + }); + + it('Should return undefined when external customer id is not present in payload', () => { + const message = { + context: { + mappedToDestination: true, + }, + }; + + const result = getExternalCustomerId(message); + expect(result).toBeUndefined(); + }); + }); + + describe('Event stream tests', () => { + it('Should return the external ID as userId is present in payload', () => { + const message = { + userId: 'externalCustomer@1', + context: {}, + }; + + const result = getExternalCustomerId(message); + expect(result).toBe('externalCustomer@1'); + }); + + it('Should return undefined when userId is not present in payload', () => { + const message = { + context: {}, + }; + + const result = getExternalCustomerId(message); + expect(result).toBeUndefined(); + }); + }); +}); + +describe('Unit test cases for getCustomerId function', () => { + describe('rETL tests', () => { + it('Should return the customerId when the identifier type is "id"', () => { + const message = { + context: { + externalId: [ + { + id: 'user@1', + identifierType: 'id', + }, + ], + mappedToDestination: true, + }, + }; + + const result = getCustomerId(message); + expect(result).toBe('user@1'); + }); + + it('Should return the customerId from traits when identifier type is not "id"', () => { + const message = { + context: { + externalId: [ + { + id: 'test@rudderlabs.com', + identifierType: 'email', + }, + ], + mappedToDestination: true, + }, + traits: { + id: 'user@1', + }, + }; + const result = getCustomerId(message); + expect(result).toBe('user@1'); + }); + + it('Should return undefined when customerId is not present in payload', () => { + const message = { + context: { + mappedToDestination: true, + }, + }; + + const result = getCustomerId(message); + expect(result).toBeUndefined(); + }); + }); + + describe('Event stream tests', () => { + it('Should return the customerId as GladlyCustomerId is present in payload', () => { + const message = { + context: { + externalId: [ + { + id: 'user@1', + type: 'GladlyCustomerId', + }, + ], + }, + }; + const result = getCustomerId(message); + expect(result).toBe('user@1'); + }); + + it('Should return undefined when GladlyCustomerId is not present in payload', () => { + const message = { + context: {}, + }; + const result = getCustomerId(message); + expect(result).toBeUndefined(); + }); + }); +}); + +describe('Unit test cases for validatePayload function', () => { + it('Should throw an error when payload does not have all required fields', () => { + const payload = {}; + try { + validatePayload(payload); + } catch (err) { + expect(err.message).toEqual( + 'One of phone, email, userId or GladlyCustomerId is required for an identify call', + ); + } + }); + + it('Should throw an error when payload is undefined', () => { + const payload = undefined; + try { + validatePayload(payload); + } catch (err) { + expect(err.message).toEqual( + 'One of phone, email, userId or GladlyCustomerId is required for an identify call', + ); + } + }); +}); + +describe('Unit test cases for getQueryParams function', () => { + it('Should return email as query parameter if email is present in payload', () => { + const payload = { + emails: [{ original: 'test@example.com' }], + }; + const result = getQueryParams(payload); + expect(result).toBe('email=test%40example.com'); + }); + + it('Should return phone as query parameter if phone is present in payload', () => { + const payload = { + phones: [{ original: '+91 9999999999' }], + }; + const result = getQueryParams(payload); + expect(result).toBe('phoneNumber=%2B91%209999999999'); + }); + + it('Should return externalCustomerId as query parameter if externalCustomerId is present in payload', () => { + const payload = { + externalCustomerId: 'externalCustomer@1', + }; + const result = getQueryParams(payload); + expect(result).toBe('externalCustomerId=externalCustomer%401'); + }); + + it('should return undefined when no supported query params are present in payload', () => { + const payload = {}; + const result = getQueryParams(payload); + expect(result).toBeUndefined(); + }); +}); diff --git a/src/cdk/v2/handler.ts b/src/cdk/v2/handler.ts index 3058d62e51..47d6d10179 100644 --- a/src/cdk/v2/handler.ts +++ b/src/cdk/v2/handler.ts @@ -64,8 +64,12 @@ export function getCachedWorkflowEngine( return workflowEnginePromiseMap[destName][feature]; } -export async function executeWorkflow(workflowEngine: WorkflowEngine, parsedEvent: FixMe) { - const result = await workflowEngine.execute(parsedEvent); +export async function executeWorkflow( + workflowEngine: WorkflowEngine, + parsedEvent: FixMe, + requestMetadata: NonNullable = {}, +) { + const result = await workflowEngine.execute(parsedEvent, { requestMetadata }); // TODO: Handle remaining output scenarios return result.output; } @@ -74,11 +78,12 @@ export async function processCdkV2Workflow( destType: string, parsedEvent: FixMe, feature: string, + requestMetadata: NonNullable = {}, bindings: Record = {}, ) { try { const workflowEngine = await getCachedWorkflowEngine(destType, feature, bindings); - return await executeWorkflow(workflowEngine, parsedEvent); + return await executeWorkflow(workflowEngine, parsedEvent, requestMetadata); } catch (error) { throw getErrorInfo(error, isCdkV2Destination(parsedEvent), defTags); } diff --git a/src/constants/destinationCanonicalNames.js b/src/constants/destinationCanonicalNames.js index d1e199c9e2..48e7c6d8bb 100644 --- a/src/constants/destinationCanonicalNames.js +++ b/src/constants/destinationCanonicalNames.js @@ -140,7 +140,7 @@ const DestCanonicalNames = { 'twitter_ads', 'TWITTER_ADS', ], - BRAZE: ['BRAZE', 'Braze', 'braze'], + BRAZE: ['BRAZE', 'Braze', 'braze'] }; module.exports = { DestHandlerMap, DestCanonicalNames }; diff --git a/src/features.json b/src/features.json index 27da6cfaf2..224968c99b 100644 --- a/src/features.json +++ b/src/features.json @@ -60,6 +60,7 @@ "TWITTER_ADS": true, "CLEVERTAP": true, "ORTTO": true, + "GLADLY": true, "ONE_SIGNAL": true, "TIKTOK_AUDIENCE": true }, diff --git a/src/services/destination/cdkV2Integration.ts b/src/services/destination/cdkV2Integration.ts index e333d4544e..f3be2c0144 100644 --- a/src/services/destination/cdkV2Integration.ts +++ b/src/services/destination/cdkV2Integration.ts @@ -52,7 +52,7 @@ export class CDKV2DestinationService implements DestinationService { events: ProcessorTransformationRequest[], destinationType: string, _version: string, - _requestMetadata: NonNullable, + requestMetadata: NonNullable, ): Promise { // TODO: Change the promise type const respList: ProcessorTransformationResponse[][] = await Promise.all( @@ -64,6 +64,7 @@ export class CDKV2DestinationService implements DestinationService { destinationType, event, tags.FEATURES.PROCESSOR, + requestMetadata ); stats.increment('event_transform_success', { @@ -108,7 +109,7 @@ export class CDKV2DestinationService implements DestinationService { events: RouterTransformationRequestData[], destinationType: string, _version: string, - _requestMetadata: NonNullable, + requestMetadata: NonNullable, ): Promise { const allDestEvents: object = groupBy( events, @@ -126,7 +127,7 @@ export class CDKV2DestinationService implements DestinationService { metaTo.metadata = destInputArray[0].metadata; try { const doRouterTransformationResponse: RouterTransformationResponse[] = - await processCdkV2Workflow(destinationType, destInputArray, tags.FEATURES.ROUTER); + await processCdkV2Workflow(destinationType, destInputArray, tags.FEATURES.ROUTER, requestMetadata); return DestinationPostTransformationService.handleRouterTransformSuccessEvents( doRouterTransformationResponse, undefined, diff --git a/test/integrations/destinations/gladly/network.ts b/test/integrations/destinations/gladly/network.ts new file mode 100644 index 0000000000..8c1c228738 --- /dev/null +++ b/test/integrations/destinations/gladly/network.ts @@ -0,0 +1,120 @@ +const deleteNwData = [ + { + httpReq: { + method: 'get', + url: 'https://rudderlabs.us-uat.gladly.qa/api/v1/customer-profiles?email=test%40rudderlabs.com', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Basic dGVzdFVzZXJOYW1lOnRlc3RBcGlUb2tlbg==', + }, + }, + httpRes: { + data: [], + status: 200, + }, + }, + { + httpReq: { + method: 'get', + url: 'https://rudderlabs.us-uat.gladly.qa/api/v1/customer-profiles?email=test%2B2%40rudderlabs.com', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Basic dGVzdFVzZXJOYW1lOnRlc3RBcGlUb2tlbg==', + }, + }, + httpRes: { + data: [ + { + emails: [ + { + normalized: 'test+2@rudderstack.com', + original: 'test+2@rudderlabs.com', + }, + ], + externalCustomerId: 'externalCustomer@2', + name: 'Test Rudderstack', + phones: [], + id: 'user@2', + }, + ], + status: 200, + }, + }, + { + httpReq: { + method: 'get', + url: 'https://rudderlabs.us-uat.gladly.qa/api/v1/customer-profiles?phoneNumber=%2B91%209999999988', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Basic dGVzdFVzZXJOYW1lOnRlc3RBcGlUb2tlbg==', + }, + }, + httpRes: { + data: [ + { + emails: [ + { + normalized: 'test+3@rudderstack.com', + original: 'test+3@rudderlabs.com', + }, + ], + externalCustomerId: 'externalCustomer@3', + name: 'Test Rudderstack', + phones: [], + id: 'user@3', + }, + { + emails: [ + { + normalized: 'test+4@rudderstack.com', + original: 'test+4@rudderlabs.com', + }, + ], + externalCustomerId: 'externalCustomer@4', + name: 'Test Rudderstack', + phones: [], + id: 'user@4', + }, + ], + status: 200, + }, + }, + { + httpReq: { + method: 'get', + url: 'https://rudderlabs.us-uat.gladly.qa/api/v1/customer-profiles?email=test6%40rudderlabs.com', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Basic dGVzdFVzZXJOYW1lOnRlc3RBcGlUb2tlbg==', + }, + }, + httpRes: { + data: [], + status: 200, + }, + }, + { + httpReq: { + method: 'get', + url: 'https://rudderlabs.us-uat.gladly.qa/api/v1/customer-profiles?email=abc', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Basic dGVzdFVzZXJOYW1lOnRlc3RBcGlUb2tlbg==', + }, + }, + httpRes: { + data: { + errors: [ + { + attr: 'email', + code: 'invalid', + detail: 'invalid email address', + }, + ], + }, + status: 400, + }, + }, +]; + +export const networkCallsData = [...deleteNwData]; diff --git a/test/integrations/destinations/gladly/processor/data.ts b/test/integrations/destinations/gladly/processor/data.ts new file mode 100644 index 0000000000..211fa78134 --- /dev/null +++ b/test/integrations/destinations/gladly/processor/data.ts @@ -0,0 +1,809 @@ +export const data = [ + { + name: 'gladly', + description: 'No message type', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user@1', + channel: 'web', + context: { + traits: { + age: 23, + email: 'adc@test.com', + firstName: 'Test', + }, + }, + originalTimestamp: '2023-11-10T14:42:44.724Z', + timestamp: '2023-11-22T10:12:44.757+05:30', + }, + destination: { + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + Config: { + apiToken: 'testApiToken', + userName: 'testUserName', + domain: 'rudderlabs.us-uat.gladly.qa', + }, + }, + metadata: { + jobId: 1, + }, + }, + ], + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + jobId: 1, + }, + statusCode: 400, + error: + 'message Type is not present. Aborting: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: message Type is not present. Aborting', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'GLADLY', + module: 'destination', + implementation: 'cdkV2', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'gladly', + description: 'Unsupported message type', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user@1', + channel: 'web', + context: { + traits: { + age: 23, + email: 'adc@test.com', + firstName: 'Test', + }, + }, + event: 'Product Viewed', + type: 'track', + originalTimestamp: '2023-11-10T14:42:44.724Z', + timestamp: '2023-11-22T10:12:44.757+05:30', + }, + destination: { + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + Config: { + apiToken: 'testApiToken', + userName: 'testUserName', + domain: 'rudderlabs.us-uat.gladly.qa', + }, + }, + metadata: { + jobId: 2, + }, + }, + ], + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + jobId: 2, + }, + statusCode: 400, + error: + 'message type track is not supported: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: message type track is not supported', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'GLADLY', + module: 'destination', + implementation: 'cdkV2', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'gladly', + description: 'Missing config', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user@1', + channel: 'web', + context: { + traits: { + age: 23, + email: 'adc@test.com', + firstName: 'Test', + }, + }, + type: 'identify', + originalTimestamp: '2023-11-10T14:42:44.724Z', + timestamp: '2023-11-22T10:12:44.757+05:30', + }, + destination: { + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + Config: { + apiToken: 'testApiToken', + domain: 'rudderlabs.us-uat.gladly.qa', + }, + }, + metadata: { + jobId: 3, + }, + }, + ], + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + jobId: 3, + }, + statusCode: 400, + error: + 'User Name is not present. Aborting: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: User Name is not present. Aborting', + statTags: { + errorCategory: 'dataValidation', + errorType: 'configuration', + destType: 'GLADLY', + module: 'destination', + implementation: 'cdkV2', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'gladly', + description: 'Create customer with email as lookup field', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'externalCustomer@1', + channel: 'web', + context: { + traits: { + age: 23, + email: 'test@rudderlabs.com', + phone: '+91 9999999999', + firstName: 'Test', + lastName: 'Rudderlabs', + address: 'california usa', + }, + externalId: [ + { + id: 'user@1', + type: 'GladlyCustomerId', + }, + ], + }, + type: 'identify', + originalTimestamp: '2023-11-10T14:42:44.724Z', + timestamp: '2023-11-22T10:12:44.757+05:30', + }, + destination: { + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + Config: { + apiToken: 'testApiToken', + userName: 'testUserName', + domain: 'rudderlabs.us-uat.gladly.qa', + }, + }, + metadata: { + jobId: 4, + }, + }, + ], + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + JSON: { + address: 'california usa', + customAttributes: { age: 23 }, + emails: [{ original: 'test@rudderlabs.com' }], + externalCustomerId: 'externalCustomer@1', + id: 'user@1', + phones: [{ original: '+91 9999999999' }], + }, + XML: {}, + FORM: {}, + JSON_ARRAY: {}, + }, + endpoint: 'https://rudderlabs.us-uat.gladly.qa/api/v1/customer-profiles', + headers: { + Authorization: 'Basic dGVzdFVzZXJOYW1lOnRlc3RBcGlUb2tlbg==', + 'Content-Type': 'application/json', + }, + userId: '', + version: '1', + type: 'REST', + method: 'POST', + files: {}, + params: {}, + }, + metadata: { jobId: 4 }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'gladly', + description: 'Update customer with email as lookup field', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'externalCustomer@2', + channel: 'web', + context: { + traits: { + age: 23, + email: 'test+2@rudderlabs.com', + phone: '+91 9999999998', + firstName: 'Test', + lastName: 'Rudderstack', + address: 'New York, USA', + }, + externalId: [ + { + id: 'user@2', + type: 'GladlyCustomerId', + }, + ], + }, + type: 'identify', + originalTimestamp: '2023-11-10T14:42:44.724Z', + timestamp: '2023-11-22T10:12:44.757+05:30', + }, + destination: { + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + Config: { + apiToken: 'testApiToken', + userName: 'testUserName', + domain: 'rudderlabs.us-uat.gladly.qa', + }, + }, + metadata: { + jobId: 5, + }, + }, + ], + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + JSON: { + address: 'New York, USA', + customAttributes: { age: 23 }, + emails: [{ original: 'test+2@rudderlabs.com' }], + externalCustomerId: 'externalCustomer@2', + phones: [{ original: '+91 9999999998' }], + }, + XML: {}, + FORM: {}, + JSON_ARRAY: {}, + }, + endpoint: 'https://rudderlabs.us-uat.gladly.qa/api/v1/customer-profiles/user@2', + headers: { + Authorization: 'Basic dGVzdFVzZXJOYW1lOnRlc3RBcGlUb2tlbg==', + 'Content-Type': 'application/json', + }, + userId: '', + version: '1', + type: 'REST', + method: 'PATCH', + files: {}, + params: {}, + }, + metadata: { jobId: 5 }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'gladly', + description: 'Update customer with phone as lookup field', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'externalCustomer@3', + channel: 'web', + context: { + traits: { + phone: '+91 9999999988', + firstName: 'Test', + lastName: 'Rudderstack', + address: 'New York, USA', + }, + externalId: [ + { + id: 'user@3', + type: 'GladlyCustomerId', + }, + ], + }, + type: 'identify', + originalTimestamp: '2023-11-10T14:42:44.724Z', + timestamp: '2023-11-22T10:12:44.757+05:30', + }, + destination: { + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + Config: { + apiToken: 'testApiToken', + userName: 'testUserName', + domain: 'rudderlabs.us-uat.gladly.qa', + }, + }, + metadata: { + jobId: 6, + }, + }, + ], + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + JSON: { + address: 'New York, USA', + externalCustomerId: 'externalCustomer@3', + phones: [{ original: '+91 9999999988' }], + }, + XML: {}, + FORM: {}, + JSON_ARRAY: {}, + }, + endpoint: 'https://rudderlabs.us-uat.gladly.qa/api/v1/customer-profiles/user@3', + headers: { + Authorization: 'Basic dGVzdFVzZXJOYW1lOnRlc3RBcGlUb2tlbg==', + 'Content-Type': 'application/json', + }, + userId: '', + version: '1', + type: 'REST', + method: 'PATCH', + files: {}, + params: {}, + }, + metadata: { jobId: 6 }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'gladly', + description: 'Required values are not present in payload to create or update customer', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + traits: { + firstName: 'Test', + lastName: 'Rudderstack', + address: 'New York, USA', + }, + }, + type: 'identify', + anonymousId: '78c53c15-32a1-4b65-adac-bec2d7bb8fab', + originalTimestamp: '2023-11-10T14:42:44.724Z', + timestamp: '2023-11-22T10:12:44.757+05:30', + }, + destination: { + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + Config: { + apiToken: 'testApiToken', + userName: 'testUserName', + domain: 'rudderlabs.us-uat.gladly.qa', + }, + }, + metadata: { + jobId: 7, + }, + }, + ], + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + jobId: 7, + }, + statusCode: 400, + error: + 'One of phone, email, userId or GladlyCustomerId is required for an identify call: Workflow: procWorkflow, Step: validatePayload, ChildStep: undefined, OriginalError: One of phone, email, userId or GladlyCustomerId is required for an identify call', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'GLADLY', + module: 'destination', + implementation: 'cdkV2', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'gladly', + description: 'Multiple emails and phones are present in payload', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'externalCustomer@6', + channel: 'web', + context: { + traits: { + age: 23, + email: [ + 'test6@rudderlabs.com', + 'test6home@rudderlabs.com', + 'test6office@rudderlabs.com', + ], + phone: ['+91 8888888888', '+91 8888888889'], + firstName: 'Test', + lastName: 'Rudderlabs', + address: 'Germany', + }, + externalId: [ + { + id: 'user@6', + type: 'GladlyCustomerId', + }, + ], + }, + type: 'identify', + originalTimestamp: '2023-11-10T14:42:44.724Z', + timestamp: '2023-11-22T10:12:44.757+05:30', + }, + destination: { + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + Config: { + apiToken: 'testApiToken', + userName: 'testUserName', + domain: 'rudderlabs.us-uat.gladly.qa', + }, + }, + metadata: { + jobId: 8, + }, + }, + ], + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + JSON: { + address: 'Germany', + customAttributes: { age: 23 }, + emails: [ + { original: 'test6@rudderlabs.com' }, + { original: 'test6home@rudderlabs.com' }, + { original: 'test6office@rudderlabs.com' }, + ], + externalCustomerId: 'externalCustomer@6', + id: 'user@6', + phones: [{ original: '+91 8888888888' }, { original: '+91 8888888889' }], + }, + XML: {}, + FORM: {}, + JSON_ARRAY: {}, + }, + endpoint: 'https://rudderlabs.us-uat.gladly.qa/api/v1/customer-profiles', + headers: { + Authorization: 'Basic dGVzdFVzZXJOYW1lOnRlc3RBcGlUb2tlbg==', + 'Content-Type': 'application/json', + }, + userId: '', + version: '1', + type: 'REST', + method: 'POST', + files: {}, + params: {}, + }, + metadata: { jobId: 8 }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'gladly', + description: 'Create customer with only GladlyCustomerId', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + traits: { + firstName: 'Test', + lastName: 'Undefined', + address: 'India', + isProUser: true, + }, + externalId: [ + { + id: 'user@9', + type: 'GladlyCustomerId', + }, + ], + }, + type: 'identify', + originalTimestamp: '2023-11-10T14:42:44.724Z', + timestamp: '2023-11-22T10:12:44.757+05:30', + }, + destination: { + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + Config: { + apiToken: 'testApiToken', + userName: 'testUserName', + domain: 'rudderlabs.us-uat.gladly.qa', + }, + }, + metadata: { + jobId: 9, + }, + }, + ], + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + JSON: { + address: 'India', + customAttributes: { isProUser: true }, + id: 'user@9', + }, + XML: {}, + FORM: {}, + JSON_ARRAY: {}, + }, + endpoint: 'https://rudderlabs.us-uat.gladly.qa/api/v1/customer-profiles', + headers: { + Authorization: 'Basic dGVzdFVzZXJOYW1lOnRlc3RBcGlUb2tlbg==', + 'Content-Type': 'application/json', + }, + userId: '', + version: '1', + type: 'REST', + method: 'POST', + files: {}, + params: {}, + }, + metadata: { jobId: 9 }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'gladly', + description: 'Create customer with invalid lookup field value', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + traits: { + firstName: 'Test', + lastName: 'Undefined', + address: 'Pakistan', + email: 'abc', + }, + externalId: [ + { + id: 'user@10', + type: 'GladlyCustomerId', + }, + ], + }, + type: 'identify', + originalTimestamp: '2023-11-10T14:42:44.724Z', + timestamp: '2023-11-22T10:12:44.757+05:30', + }, + destination: { + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + Config: { + apiToken: 'testApiToken', + userName: 'testUserName', + domain: 'rudderlabs.us-uat.gladly.qa', + }, + }, + metadata: { + jobId: 10, + }, + }, + ], + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + JSON: { + address: 'Pakistan', + emails: [{original: 'abc'}], + id: 'user@10', + }, + XML: {}, + FORM: {}, + JSON_ARRAY: {}, + }, + endpoint: 'https://rudderlabs.us-uat.gladly.qa/api/v1/customer-profiles', + headers: { + Authorization: 'Basic dGVzdFVzZXJOYW1lOnRlc3RBcGlUb2tlbg==', + 'Content-Type': 'application/json', + }, + userId: '', + version: '1', + type: 'REST', + method: 'POST', + files: {}, + params: {}, + }, + metadata: { jobId: 10 }, + statusCode: 200, + }, + ], + }, + }, + }, +]; diff --git a/test/integrations/destinations/gladly/router/data.ts b/test/integrations/destinations/gladly/router/data.ts new file mode 100644 index 0000000000..d3339d8108 --- /dev/null +++ b/test/integrations/destinations/gladly/router/data.ts @@ -0,0 +1,604 @@ +export const data = [ + { + name: 'gladly', + description: 'Gladly router tests', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + message: { + userId: 'externalCustomer@1', + channel: 'web', + context: { + traits: { + age: 23, + email: 'test@rudderlabs.com', + phone: '+91 9999999999', + firstName: 'Test', + lastName: 'Rudderlabs', + address: 'california usa', + }, + externalId: [ + { + id: 'user@1', + type: 'GladlyCustomerId', + }, + ], + }, + type: 'identify', + originalTimestamp: '2023-11-10T14:42:44.724Z', + timestamp: '2023-11-22T10:12:44.75705:30', + }, + destination: { + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + Config: { + apiToken: 'testApiToken', + userName: 'testUserName', + domain: 'rudderlabs.us-uat.gladly.qa', + }, + }, + metadata: { + jobId: 1, + }, + }, + { + message: { + userId: 'externalCustomer@2', + channel: 'web', + context: { + traits: { + age: 23, + email: 'test+2@rudderlabs.com', + phone: '+91 9999999998', + firstName: 'Test', + lastName: 'Rudderstack', + address: 'New York, USA', + }, + externalId: [ + { + id: 'user@2', + type: 'GladlyCustomerId', + }, + ], + }, + type: 'identify', + originalTimestamp: '2023-11-10T14:42:44.724Z', + timestamp: '2023-11-22T10:12:44.75705:30', + }, + destination: { + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + Config: { + apiToken: 'testApiToken', + userName: 'testUserName', + domain: 'rudderlabs.us-uat.gladly.qa', + }, + }, + metadata: { + jobId: 2, + }, + }, + { + message: { + userId: 'externalCustomer@3', + channel: 'web', + context: { + traits: { + phone: '+91 9999999988', + firstName: 'Test', + lastName: 'Rudderstack', + address: 'New York, USA', + }, + externalId: [ + { + id: 'user@3', + type: 'GladlyCustomerId', + }, + ], + }, + type: 'identify', + originalTimestamp: '2023-11-10T14:42:44.724Z', + timestamp: '2023-11-22T10:12:44.75705:30', + }, + destination: { + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + Config: { + apiToken: 'testApiToken', + userName: 'testUserName', + domain: 'rudderlabs.us-uat.gladly.qa', + }, + }, + metadata: { + jobId: 3, + }, + }, + ], + destType: 'gladly', + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batched: false, + batchedRequest: { + body: { + FORM: {}, + JSON: { + address: 'california usa', + customAttributes: { + age: 23, + }, + emails: [ + { + original: 'test@rudderlabs.com', + }, + ], + externalCustomerId: 'externalCustomer@1', + id: 'user@1', + phones: [ + { + original: '+91 9999999999', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + }, + endpoint: 'https://rudderlabs.us-uat.gladly.qa/api/v1/customer-profiles', + files: {}, + headers: { + Authorization: 'Basic dGVzdFVzZXJOYW1lOnRlc3RBcGlUb2tlbg==', + 'Content-Type': 'application/json', + }, + method: 'POST', + params: {}, + type: 'REST', + version: '1', + }, + destination: { + Config: { + apiToken: 'testApiToken', + domain: 'rudderlabs.us-uat.gladly.qa', + userName: 'testUserName', + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + metadata: [ + { + jobId: 1, + }, + ], + statusCode: 200, + }, + { + batched: false, + batchedRequest: { + body: { + FORM: {}, + JSON: { + address: 'New York, USA', + customAttributes: { + age: 23, + }, + emails: [ + { + original: 'test+2@rudderlabs.com', + }, + ], + externalCustomerId: 'externalCustomer@2', + phones: [ + { + original: '+91 9999999998', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + }, + endpoint: 'https://rudderlabs.us-uat.gladly.qa/api/v1/customer-profiles/user@2', + files: {}, + headers: { + Authorization: 'Basic dGVzdFVzZXJOYW1lOnRlc3RBcGlUb2tlbg==', + 'Content-Type': 'application/json', + }, + method: 'PATCH', + params: {}, + type: 'REST', + version: '1', + }, + destination: { + Config: { + apiToken: 'testApiToken', + domain: 'rudderlabs.us-uat.gladly.qa', + userName: 'testUserName', + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + metadata: [ + { + jobId: 2, + }, + ], + statusCode: 200, + }, + { + batched: false, + batchedRequest: { + body: { + FORM: {}, + JSON: { + address: 'New York, USA', + externalCustomerId: 'externalCustomer@3', + phones: [ + { + original: '+91 9999999988', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + }, + endpoint: 'https://rudderlabs.us-uat.gladly.qa/api/v1/customer-profiles/user@3', + files: {}, + headers: { + Authorization: 'Basic dGVzdFVzZXJOYW1lOnRlc3RBcGlUb2tlbg==', + 'Content-Type': 'application/json', + }, + method: 'PATCH', + params: {}, + type: 'REST', + version: '1', + }, + destination: { + Config: { + apiToken: 'testApiToken', + domain: 'rudderlabs.us-uat.gladly.qa', + userName: 'testUserName', + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + metadata: [ + { + jobId: 3, + }, + ], + statusCode: 200, + }, + ], + }, + }, + }, + }, + { + name: 'gladly', + description: 'Gladly rETL tests', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + message: { + userId: 'externalCustomer@1', + channel: 'web', + context: { + externalId: [ + { + id: 'externalCustomer@1', + identifierType: 'externalCustomerId', + }, + ], + mappedToDestination: true + }, + traits: { + id: 'user@1', + emails: ['test@rudderlabs.com'], + phones: ['+91 9999999999'], + firstName: 'Test', + lastName: 'Rudderlabs', + address: 'california usa', + }, + type: 'identify', + originalTimestamp: '2023-11-10T14:42:44.724Z', + timestamp: '2023-11-22T10:12:44.75705:30', + }, + destination: { + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + Config: { + apiToken: 'testApiToken', + userName: 'testUserName', + domain: 'rudderlabs.us-uat.gladly.qa', + }, + }, + metadata: { + jobId: 1, + }, + }, + { + message: { + userId: 'externalCustomer@2', + channel: 'web', + context: { + externalId: [ + { + id: 'externalCustomer@2', + identifierType: 'externalCustomerId', + }, + ], + mappedToDestination: true, + }, + traits: { + id: 'user@2', + emails: 'test+2@rudderlabs.com', + phones: '+91 9999999998', + firstName: 'Test', + lastName: 'Rudderstack', + address: 'New York, USA', + }, + type: 'identify', + originalTimestamp: '2023-11-10T14:42:44.724Z', + timestamp: '2023-11-22T10:12:44.75705:30', + }, + destination: { + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + Config: { + apiToken: 'testApiToken', + userName: 'testUserName', + domain: 'rudderlabs.us-uat.gladly.qa', + }, + }, + metadata: { + jobId: 2, + }, + }, + { + message: { + userId: 'externalCustomer@3', + channel: 'web', + context: { + externalId: [ + { + id: 'externalCustomer@3', + identifierType: 'externalCustomerId', + }, + ], + mappedToDestination: true, + }, + traits: { + id: 'user@3', + phones: '+91 9999999988', + firstName: 'Test', + lastName: 'Rudderstack', + address: 'New York, USA', + }, + type: 'identify', + originalTimestamp: '2023-11-10T14:42:44.724Z', + timestamp: '2023-11-22T10:12:44.75705:30', + }, + destination: { + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + Config: { + apiToken: 'testApiToken', + userName: 'testUserName', + domain: 'rudderlabs.us-uat.gladly.qa', + }, + }, + metadata: { + jobId: 3, + }, + }, + ], + destType: 'gladly', + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batched: false, + batchedRequest: { + body: { + FORM: {}, + JSON: { + address: 'california usa', + emails: [ + { + original: 'test@rudderlabs.com', + }, + ], + externalCustomerId: 'externalCustomer@1', + id: 'user@1', + phones: [ + { + original: '+91 9999999999', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + }, + endpoint: 'https://rudderlabs.us-uat.gladly.qa/api/v1/customer-profiles', + files: {}, + headers: { + Authorization: 'Basic dGVzdFVzZXJOYW1lOnRlc3RBcGlUb2tlbg==', + 'Content-Type': 'application/json', + }, + method: 'POST', + params: {}, + type: 'REST', + version: '1', + }, + destination: { + Config: { + apiToken: 'testApiToken', + domain: 'rudderlabs.us-uat.gladly.qa', + userName: 'testUserName', + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + metadata: [ + { + jobId: 1, + }, + ], + statusCode: 200, + }, + { + batched: false, + batchedRequest: { + body: { + FORM: {}, + JSON: { + address: 'New York, USA', + emails: [ + { + original: 'test+2@rudderlabs.com', + }, + ], + externalCustomerId: 'externalCustomer@2', + phones: [ + { + original: '+91 9999999998', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + }, + endpoint: 'https://rudderlabs.us-uat.gladly.qa/api/v1/customer-profiles/user@2', + files: {}, + headers: { + Authorization: 'Basic dGVzdFVzZXJOYW1lOnRlc3RBcGlUb2tlbg==', + 'Content-Type': 'application/json', + }, + method: 'PATCH', + params: {}, + type: 'REST', + version: '1', + }, + destination: { + Config: { + apiToken: 'testApiToken', + domain: 'rudderlabs.us-uat.gladly.qa', + userName: 'testUserName', + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + metadata: [ + { + jobId: 2, + }, + ], + statusCode: 200, + }, + { + batched: false, + batchedRequest: { + body: { + FORM: {}, + JSON: { + address: 'New York, USA', + externalCustomerId: 'externalCustomer@3', + phones: [ + { + original: '+91 9999999988', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + }, + endpoint: 'https://rudderlabs.us-uat.gladly.qa/api/v1/customer-profiles/user@3', + files: {}, + headers: { + Authorization: 'Basic dGVzdFVzZXJOYW1lOnRlc3RBcGlUb2tlbg==', + 'Content-Type': 'application/json', + }, + method: 'PATCH', + params: {}, + type: 'REST', + version: '1', + }, + destination: { + Config: { + apiToken: 'testApiToken', + domain: 'rudderlabs.us-uat.gladly.qa', + userName: 'testUserName', + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + metadata: [ + { + jobId: 3, + }, + ], + statusCode: 200, + }, + ], + }, + }, + }, + }, +]; From e5f8714a51bd28154ce0c84301042f544a744479 Mon Sep 17 00:00:00 2001 From: Abhimanyu Babbar Date: Thu, 16 Nov 2023 17:52:46 +0530 Subject: [PATCH 025/135] chore: capture correct status code on faas pod time out (#2831) --- src/util/openfaas/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/openfaas/index.js b/src/util/openfaas/index.js index 47a69aeb18..2792003f4a 100644 --- a/src/util/openfaas/index.js +++ b/src/util/openfaas/index.js @@ -277,7 +277,7 @@ const executeFaasFunction = async ( } if (error.statusCode === 504) { - throw new RespStatusError(`${name} timed out`); + throw new RespStatusError(`${name} timed out`, 504); } throw error; From 5c63d2c5bc9507d43b9377ac84ce9ba7d59b37c8 Mon Sep 17 00:00:00 2001 From: Sandeep Digumarty Date: Tue, 21 Nov 2023 15:50:09 +0530 Subject: [PATCH 026/135] chore: add date mock to fix timestamp validation in tests (#2844) chore: add date mock to fix timestamp validation --- test/__tests__/facebook_conversions.test.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/__tests__/facebook_conversions.test.js b/test/__tests__/facebook_conversions.test.js index a450952efe..9495a85913 100644 --- a/test/__tests__/facebook_conversions.test.js +++ b/test/__tests__/facebook_conversions.test.js @@ -23,6 +23,8 @@ const outputRouterDataFile = fs.readFileSync( const inputRouterData = JSON.parse(inputRouterDataFile); const expectedRouterData = JSON.parse(outputRouterDataFile); +Date.now = jest.fn(() => new Date("2023-11-12T15:46:51.000Z")); // 2023-11-12T15:46:51.693229+05:30 + describe(`${name} Tests`, () => { describe("Processor", () => { testData.forEach((dataPoint, index) => { From 9eda50e850c5a1ccb46f1b54c3d176edb915eb27 Mon Sep 17 00:00:00 2001 From: shrouti1507 <60211312+shrouti1507@users.noreply.github.com> Date: Thu, 23 Nov 2023 19:51:50 +0530 Subject: [PATCH 027/135] feat: mixpanel set once feature onboard (#2820) * feat: initial commit * feat: making sure existing functionality is intact * fix: edits for exclusion keys * fix: edits for supporting property paths * fix: delete wrong test case * fix: test cases * fix: removed unnecessary code * fix: adding unit test cases for trimTraits * fix: changing the order of priority in property mapping * fix: edited distinct id logic * fix: small edit * fix: review comments addressed * fix: adding dedicated mappingJson for setOnce * fix: adding all the fields to the dedicated json * fix: addressing review comments * feat: review comments addressed --- src/v0/destinations/mp/config.js | 3 + .../destinations/mp/data/MPSetOnceConfig.json | 122 ++++++++ src/v0/destinations/mp/transform.js | 47 ++- src/v0/destinations/mp/util.js | 70 +++++ src/v0/destinations/mp/util.test.js | 94 ++++++ src/v0/util/index.js | 26 ++ test/integrations/destinations/mp/common.ts | 40 ++- .../destinations/mp/processor/data.ts | 271 +++++++++++++++++- 8 files changed, 665 insertions(+), 8 deletions(-) create mode 100644 src/v0/destinations/mp/data/MPSetOnceConfig.json diff --git a/src/v0/destinations/mp/config.js b/src/v0/destinations/mp/config.js index 41a801e9da..35b40294f5 100644 --- a/src/v0/destinations/mp/config.js +++ b/src/v0/destinations/mp/config.js @@ -11,6 +11,9 @@ const ConfigCategory = { IDENTIFY: { name: 'MPIdentifyConfig', }, + SET_ONCE: { + name: 'MPSetOnceConfig', + }, PROFILE_ANDROID: { name: 'MPProfilePropertiesAndroid', }, diff --git a/src/v0/destinations/mp/data/MPSetOnceConfig.json b/src/v0/destinations/mp/data/MPSetOnceConfig.json new file mode 100644 index 0000000000..e5aaf851a3 --- /dev/null +++ b/src/v0/destinations/mp/data/MPSetOnceConfig.json @@ -0,0 +1,122 @@ +[ + { + "destKey": "$created", + "sourceKeys": "createdAt", + "required": false + }, + { + "destKey": "$email", + "sourceKeys": "email", + "required": false + }, + { + "destKey": "$first_name", + "sourceKeys": ["firstName", "firstname", "first_name"], + "required": false + }, + { + "destKey": "$last_name", + "sourceKeys": ["lastName", "lastname", "last_name"], + "required": false + }, + { + "destKey": "$name", + "sourceKeys": "name", + "required": false + }, + { + "destKey": "$username", + "sourceKeys": ["username", "userName"], + "required": false + }, + { + "destKey": "$phone", + "sourceKeys": "phone", + "required": false + }, + { + "destKey": "$avatar", + "sourceKeys": "avatar", + "required": false + }, + { + "destKey": "$country_code", + "sourceKeys": ["country", "address.country"], + "required": false + }, + { + "destKey": "$city", + "sourceKeys": ["city", "address.city"], + "required": false + }, + { + "destKey": "$region", + "sourceKeys": ["state", "address.state", "location.region"], + "required": false + }, + { + "destKey": "$unsubscribed", + "sourceKeys": "unsubscribed", + "required": false + }, + { + "destKey": "$geo_source", + "sourceKeys": "location.geoSource", + "required": false + }, + { + "destKey": "$timezone", + "sourceKeys": "location.timezone", + "required": false + }, + { + "destKey": "$latitude", + "sourceKeys": "location.latitude", + "required": false + }, + { + "destKey": "$longitude", + "sourceKeys": "location.longitude", + "required": false + }, + { + "destKey": "$carrier", + "sourceKeys": "network.carrier", + "required": false + }, + { + "destKey": "$manufacturer", + "sourceKeys": "device.manufacturer", + "required": false + }, + { + "destKey": "$model", + "sourceKeys": "device.model", + "required": false + }, + { + "destKey": "$screen_height", + "sourceKeys": "screen.height", + "required": false + }, + { + "destKey": "$screen_width", + "sourceKeys": "screen.width", + "required": false + }, + { + "destKey": "$wifi", + "sourceKeys": "network.wifi", + "required": false + }, + { + "destKey": "$initial_referrer", + "sourceKeys": "page.initial_referrer", + "required": false + }, + { + "destKey": "$initial_referring_domain", + "sourceKeys": ["page.initial_referring_domain", "page.initialReferringDomain"], + "required": false + } +] diff --git a/src/v0/destinations/mp/transform.js b/src/v0/destinations/mp/transform.js index bb8d3e5756..3d0aaa7c4c 100644 --- a/src/v0/destinations/mp/transform.js +++ b/src/v0/destinations/mp/transform.js @@ -17,6 +17,7 @@ const { checkInvalidRtTfEvents, handleRtTfSingleEventError, groupEventsByType, + parseConfigArray, } = require('../../util'); const { ConfigCategory, @@ -35,6 +36,7 @@ const { combineBatchRequestsWithSameJobIds, groupEventsByEndpoint, batchEvents, + trimTraits, } = require('./util'); const { CommonUtils } = require('../../../util/common'); @@ -226,17 +228,51 @@ const processTrack = (message, destination) => { return returnValue; }; +const createSetOnceResponse = (message, type, destination, setOnce) => { + const payload = { + $set_once: setOnce, + $token: destination.Config.token, + $distinct_id: message.userId || message.anonymousId, + }; + + if (destination?.Config.identityMergeApi === 'simplified') { + payload.$distinct_id = message.userId || `$device:${message.anonymousId}`; + } + + return responseBuilderSimple(payload, message, type, destination.Config); +}; + const processIdentifyEvents = async (message, type, destination) => { + const messageClone = { ...message }; + let seggregatedTraits = {}; const returnValue = []; + let setOnceProperties = []; + + // making payload for set_once properties + if (destination.Config.setOnceProperties && destination.Config.setOnceProperties.length > 0) { + setOnceProperties = parseConfigArray(destination.Config.setOnceProperties, 'property'); + seggregatedTraits = trimTraits( + messageClone.traits, + messageClone.context.traits, + setOnceProperties, + ); + messageClone.traits = seggregatedTraits.traits; + messageClone.context.traits = seggregatedTraits.contextTraits; + if (Object.keys(seggregatedTraits.setOnce).length > 0) { + returnValue.push( + createSetOnceResponse(messageClone, type, destination, seggregatedTraits.setOnce), + ); + } + } // Creating the user profile // https://developer.mixpanel.com/reference/profile-set - returnValue.push(createIdentifyResponse(message, type, destination, responseBuilderSimple)); + returnValue.push(createIdentifyResponse(messageClone, type, destination, responseBuilderSimple)); if ( destination.Config?.identityMergeApi !== 'simplified' && - message.userId && - message.anonymousId && + messageClone.userId && + messageClone.anonymousId && isImportAuthCredentialsAvailable(destination) ) { // If userId and anonymousId both are present and required credentials for /import @@ -245,13 +281,13 @@ const processIdentifyEvents = async (message, type, destination) => { const trackPayload = { event: '$merge', properties: { - $distinct_ids: [message.userId, message.anonymousId], + $distinct_ids: [messageClone.userId, messageClone.anonymousId], token: destination.Config.token, }, }; const identifyTrackResponse = responseBuilderSimple( trackPayload, - message, + messageClone, 'merge', destination.Config, ); @@ -440,7 +476,6 @@ const processRouterDest = async (inputs, reqMetadata) => { destination: event.destination, }; } - let processedEvents = await process(event); processedEvents = CommonUtils.toArray(processedEvents); return processedEvents.map((res) => ({ diff --git a/src/v0/destinations/mp/util.js b/src/v0/destinations/mp/util.js index bb4c23f1b4..bb8f36fdbe 100644 --- a/src/v0/destinations/mp/util.js +++ b/src/v0/destinations/mp/util.js @@ -1,3 +1,4 @@ +const lodash = require('lodash'); const set = require('set-value'); const get = require('get-value'); const { InstrumentationError } = require('@rudderstack/integrations-lib'); @@ -14,6 +15,7 @@ const { defaultBatchRequestConfig, IsGzipSupported, isObject, + isDefinedAndNotNullAndNotEmpty, } = require('../../util'); const { ConfigCategory, @@ -26,6 +28,7 @@ const { CommonUtils } = require('../../../util/common'); const mPIdentifyConfigJson = mappingConfig[ConfigCategory.IDENTIFY.name]; const mPProfileAndroidConfigJson = mappingConfig[ConfigCategory.PROFILE_ANDROID.name]; const mPProfileIosConfigJson = mappingConfig[ConfigCategory.PROFILE_IOS.name]; +const mPSetOnceConfigJson = mappingConfig[ConfigCategory.SET_ONCE.name]; /** * this function has been used to create @@ -322,6 +325,72 @@ const combineBatchRequestsWithSameJobIds = (inputBatches) => { return combineBatches(combineBatches(inputBatches)); }; +/** + * Trims the traits and contextTraits objects based on the setOnceProperties array and returns an object containing the modified traits, contextTraits, and setOnce properties. + * + * @param {object} traits - An object representing the traits. + * @param {object} contextTraits - An object representing the context traits. + * @param {string[]} setOnceProperties - An array of property paths to be considered for the setOnce transformation. + * @returns {object} - An object containing the modified traits, contextTraits, and setOnce properties. + * + * @example + * const traits = { name: 'John', age: 30 }; + * const contextTraits = { country: 'USA', language: 'English', address: { city: 'New York', state: 'NY' }}}; + * const setOnceProperties = ['name', 'country', 'address.city']; + * + * const result = trimTraits(traits, contextTraits, setOnceProperties); + * // Output: { traits: { age: 30 }, contextTraits: { language: 'English' }, setOnce: { $name: 'John', $country_code: 'USA', city: 'New York'} } + */ +function trimTraits(traits, contextTraits, setOnceProperties) { + let sentOnceTransformedPayload; + // Create a copy of the original traits object + const traitsCopy = { ...traits }; + const contextTraitsCopy = { ...contextTraits }; + + // Initialize setOnce object + const setOnceEligible = {}; + + // Step 1: find the k-v pairs of setOnceProperties in traits and contextTraits + + setOnceProperties.forEach((propertyPath) => { + const propName = lodash.last(propertyPath.split('.')); + + const traitsValue = get(traitsCopy, propertyPath); + const contextTraitsValue = get(contextTraitsCopy, propertyPath); + + if (isDefinedAndNotNullAndNotEmpty(traitsValue)) { + setOnceEligible[propName] = traitsValue; + lodash.unset(traitsCopy, propertyPath); + } + if (isDefinedAndNotNullAndNotEmpty(contextTraitsValue)) { + if (!setOnceEligible.hasOwnProperty(propName)) { + setOnceEligible[propName] = contextTraitsValue; + } + lodash.unset(contextTraitsCopy, propertyPath); + } + }); + + if (setOnceEligible && Object.keys(setOnceEligible).length > 0) { + // Step 2: transform properties eligible as per rudderstack declared identify event mapping + // setOnce should have all traits from message.traits and message.context.traits by now + sentOnceTransformedPayload = constructPayload(setOnceEligible, mPSetOnceConfigJson); + + // Step 3: combine the transformed and custom setOnce traits + sentOnceTransformedPayload = extractCustomFields( + setOnceEligible, + sentOnceTransformedPayload, + 'root', + MP_IDENTIFY_EXCLUSION_LIST, + ); + } + + return { + traits: traitsCopy, + contextTraits: contextTraitsCopy, + setOnce: sentOnceTransformedPayload || {}, + }; +} + module.exports = { createIdentifyResponse, isImportAuthCredentialsAvailable, @@ -330,4 +399,5 @@ module.exports = { generateBatchedPayloadForArray, batchEvents, combineBatchRequestsWithSameJobIds, + trimTraits, }; diff --git a/src/v0/destinations/mp/util.test.js b/src/v0/destinations/mp/util.test.js index 6d5b24766d..fbaa6f9b9f 100644 --- a/src/v0/destinations/mp/util.test.js +++ b/src/v0/destinations/mp/util.test.js @@ -4,6 +4,7 @@ const { batchEvents, generateBatchedPayloadForArray, buildUtmParams, + trimTraits, } = require('./util'); const { FEATURE_GZIP_SUPPORT } = require('../../util/constant'); @@ -602,4 +603,97 @@ describe('Mixpanel utils test', () => { }); }); }); + describe('Unit test cases for trimTraits', () => { + // Given a valid traits object and contextTraits object, and a valid setOnceProperties array, the function should return an object containing traits, contextTraits, and setOnce properties. + it('should return an object containing traits, contextTraits, and setOnce properties when given valid inputs', () => { + const traits = { name: 'John', age: 30 }; + const contextTraits = { email: 'john@example.com' }; + const setOnceProperties = ['name', 'email']; + + const result = trimTraits(traits, contextTraits, setOnceProperties); + console.log(result); + + expect(result).toEqual({ + traits: { + age: 30, + }, + contextTraits: {}, + setOnce: { $name: 'John', $email: 'john@example.com' }, + }); + }); + + // Given an empty traits object and contextTraits object, and a valid setOnceProperties array, the function should return an object containing empty traits and contextTraits, and an empty setOnce property. + it('should return an object containing empty traits and contextTraits, and an empty setOnce property when given empty traits and contextTraits objects', () => { + const traits = {}; + const contextTraits = {}; + const setOnceProperties = ['name', 'email']; + + const result = trimTraits(traits, contextTraits, setOnceProperties); + + expect(result).toEqual({ + traits: {}, + contextTraits: {}, + setOnce: {}, + }); + }); + + // Given an empty setOnceProperties array, the function should return an object containing the original traits and contextTraits objects, and an empty setOnce property. + it('should return an object containing the original traits and contextTraits objects, and an empty setOnce property when given an empty setOnceProperties array', () => { + const traits = { name: 'John', age: 30 }; + const contextTraits = { email: 'john@example.com' }; + const setOnceProperties = []; + + const result = trimTraits(traits, contextTraits, setOnceProperties); + + expect(result).toEqual({ + traits: { name: 'John', age: 30 }, + contextTraits: { email: 'john@example.com' }, + setOnce: {}, + }); + }); + + // Given a setOnceProperties array containing properties that do not exist in either traits or contextTraits objects, the function should not add the property to the setOnce property. + it('should not add properties to the setOnce property when given setOnceProperties array with non-existent properties', () => { + const traits = { name: 'John', age: 30 }; + const contextTraits = { email: 'john@example.com' }; + const setOnceProperties = ['name', 'email', 'address']; + + const result = trimTraits(traits, contextTraits, setOnceProperties); + + expect(result).toEqual({ + traits: { age: 30 }, + contextTraits: {}, + setOnce: { $name: 'John', $email: 'john@example.com' }, + }); + }); + + // Given a setOnceProperties array containing properties with nested paths that do not exist in either traits or contextTraits objects, the function should not add the property to the setOnce property. + it('should not add properties to the setOnce property when given setOnceProperties array with non-existent nested properties', () => { + const traits = { name: 'John', age: 30, address: 'kolkata' }; + const contextTraits = { email: 'john@example.com' }; + const setOnceProperties = ['name', 'email', 'address.city']; + + const result = trimTraits(traits, contextTraits, setOnceProperties); + + expect(result).toEqual({ + traits: { age: 30, address: 'kolkata' }, + contextTraits: {}, + setOnce: { $name: 'John', $email: 'john@example.com' }, + }); + }); + + it('should add properties to the setOnce property when given setOnceProperties array with existent nested properties', () => { + const traits = { name: 'John', age: 30, address: { city: 'kolkata' }, isAdult: false }; + const contextTraits = { email: 'john@example.com' }; + const setOnceProperties = ['name', 'email', 'address.city']; + + const result = trimTraits(traits, contextTraits, setOnceProperties); + + expect(result).toEqual({ + traits: { age: 30, address: {}, isAdult: false }, + contextTraits: {}, + setOnce: { $name: 'John', $email: 'john@example.com', $city: 'kolkata' }, + }); + }); + }); }); diff --git a/src/v0/util/index.js b/src/v0/util/index.js index 0296895662..fee1d7a96d 100644 --- a/src/v0/util/index.js +++ b/src/v0/util/index.js @@ -2083,6 +2083,31 @@ const IsGzipSupported = (reqMetadata = {}) => { return false; }; +/** + * Returns an array containing the values of the specified key from each object in the input array. + * If the input array is falsy (null, undefined, empty array), an empty array is returned. + * + * @param {Array} arr - The input array from which values will be extracted. + * @param {string} key - The key of the property whose values will be extracted from each object in the input array. + * @returns {Array} - A new array containing the values of the specified key from each object in the input array. + * + * @example + * const configArray = [ + * { name: 'John', age: 25 }, + * { name: 'Jane', age: 30 }, + * { name: 'Bob', age: 35 } + * ]; + * + * const result = parseConfigArray(configArray, 'name'); + * Output: ['John', 'Jane', 'Bob'] + */ +const parseConfigArray = (arr, key) => { + if (!arr) { + return []; + } + return arr.map((item) => item[key]); +}; + // ======================================================================== // EXPORTS // ======================================================================== @@ -2192,4 +2217,5 @@ module.exports = { isValidInteger, isNewStatusCodesAccepted, IsGzipSupported, + parseConfigArray, }; diff --git a/test/integrations/destinations/mp/common.ts b/test/integrations/destinations/mp/common.ts index ad12566cc6..76ed25a760 100644 --- a/test/integrations/destinations/mp/common.ts +++ b/test/integrations/destinations/mp/common.ts @@ -20,4 +20,42 @@ const sampleDestination = { Transformations: [], }; -export { sampleDestination, defaultMockFns }; +const destinationWithSetOnceProperty = { + Config: { + apiSecret: 'dummySecret', + dataResidency: 'us', + identityMergeApi: 'simplified', + setOnceProperties: [ + { + property: 'nationality', + }, + { + property: 'firstName', + }, + { + property: 'address.city', + }, + ], + superProperties: [ + { + property: 'random', + }, + ], + token: 'dummyToken', + useNativeSDK: false, + useNewMapping: false, + userDeletionApi: 'engage', + whitelistedEvents: [], + }, + DestinationDefinition: { + DisplayName: 'Kiss Metrics', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'MIXPANEL', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Kiss Metrics', + Transformations: [], +}; + +export { sampleDestination, defaultMockFns, destinationWithSetOnceProperty }; diff --git a/test/integrations/destinations/mp/processor/data.ts b/test/integrations/destinations/mp/processor/data.ts index 2745c09ecc..a6ba51ee78 100644 --- a/test/integrations/destinations/mp/processor/data.ts +++ b/test/integrations/destinations/mp/processor/data.ts @@ -1,5 +1,5 @@ import { overrideDestination } from '../../../testUtils'; -import { sampleDestination, defaultMockFns } from '../common'; +import { sampleDestination, defaultMockFns, destinationWithSetOnceProperty } from '../common'; export const data = [ { @@ -5852,4 +5852,273 @@ export const data = [ }, }, }, + { + name: 'mp', + description: 'Test Set Once Property', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + description: 'Alias: with property beyond and within exclusion list', + destination: destinationWithSetOnceProperty, + message: { + anonymousId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.5', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + address: { + city: 'Disney', + }, + country: 'USA', + email: 'TestSanity@disney.com', + firstName: 'Mickey test', + lastName: 'VarChange', + createdAt: '2020-01-23T08:54:02.362Z', + nationality: 'USA', + random: 'superProp', + }, + page: { + path: '/destinations/mixpanel', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/mixpanel', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36', + }, + integrations: { + All: true, + }, + page: { + path: '/destinations/mixpanel', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/mixpanel', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + request_ip: '[::1]:53709', + type: 'identify', + userId: 'Santiy', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.mixpanel.com/engage/', + headers: {}, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: { + batch: + '[{"$set_once":{"$first_name":"Mickey test","$city":"Disney","nationality":"USA"},"$token":"dummyToken","$distinct_id":"Santiy"}]', + }, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'Santiy', + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.mixpanel.com/engage/', + headers: {}, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: { + batch: + '[{"$set":{"$created":"2020-01-23T08:54:02.362Z","$email":"TestSanity@disney.com","$country_code":"USA","$initial_referrer":"https://docs.rudderstack.com","$initial_referring_domain":"docs.rudderstack.com","random":"superProp","$lastName":"VarChange","$browser":"Chrome","$browser_version":"79.0.3945.117"},"$token":"dummyToken","$distinct_id":"Santiy","$ip":"0.0.0.0","$time":null}]', + }, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'Santiy', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'mp', + description: 'Test Set Once Property with anonymousId', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + description: 'Alias: with property beyond and within exclusion list', + destination: destinationWithSetOnceProperty, + message: { + anonymousId: 'dummyAnnonymousId', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.5', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + address: { + city: 'Disney', + }, + country: 'USA', + email: 'TestSanity@disney.com', + firstName: 'Mickey test', + lastName: 'VarChange', + createdAt: '2020-01-23T08:54:02.362Z', + nationality: 'USA', + random: 'superProp', + }, + page: { + path: '/destinations/mixpanel', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/mixpanel', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36', + }, + integrations: { + All: true, + }, + page: { + path: '/destinations/mixpanel', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/mixpanel', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + request_ip: '[::1]:53709', + type: 'identify', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.mixpanel.com/engage/', + headers: {}, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: { + batch: + '[{"$set_once":{"$first_name":"Mickey test","$city":"Disney","nationality":"USA"},"$token":"dummyToken","$distinct_id":"$device:dummyAnnonymousId"}]', + }, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'dummyAnnonymousId', + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.mixpanel.com/engage/', + headers: {}, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: { + batch: + '[{"$set":{"$created":"2020-01-23T08:54:02.362Z","$email":"TestSanity@disney.com","$country_code":"USA","$initial_referrer":"https://docs.rudderstack.com","$initial_referring_domain":"docs.rudderstack.com","random":"superProp","$lastName":"VarChange","$browser":"Chrome","$browser_version":"79.0.3945.117"},"$token":"dummyToken","$distinct_id":"$device:dummyAnnonymousId","$ip":"0.0.0.0","$time":null}]', + }, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'dummyAnnonymousId', + }, + statusCode: 200, + }, + ], + }, + }, + }, ]; From 8c02b8ccb2101147ac84b4555e7fd07235ebf9fc Mon Sep 17 00:00:00 2001 From: Sankeerth Date: Tue, 28 Nov 2023 15:06:00 +0530 Subject: [PATCH 028/135] fix: unhandled error code in facebook_custom_audience (#2853) --- src/v0/util/facebookUtils/networkHandler.js | 3 + .../fb_custom_audience/dataDelivery/data.ts | 1120 ++++++++--------- .../fb_custom_audience/network.ts | 909 ++++++------- 3 files changed, 1008 insertions(+), 1024 deletions(-) diff --git a/src/v0/util/facebookUtils/networkHandler.js b/src/v0/util/facebookUtils/networkHandler.js index 9589d17255..e0d69fa5c8 100644 --- a/src/v0/util/facebookUtils/networkHandler.js +++ b/src/v0/util/facebookUtils/networkHandler.js @@ -195,6 +195,9 @@ const errorDetailsMap = { .setMessage('There have been too many calls to this ad-account.') .build(), }, + 200: { + default: new ErrorDetailsExtractorBuilder().setStatus(403).setMessageField('message').build(), + }, }; const getErrorDetailsFromErrorMap = (error) => { diff --git a/test/integrations/destinations/fb_custom_audience/dataDelivery/data.ts b/test/integrations/destinations/fb_custom_audience/dataDelivery/data.ts index ddb081ba87..d2220e16da 100644 --- a/test/integrations/destinations/fb_custom_audience/dataDelivery/data.ts +++ b/test/integrations/destinations/fb_custom_audience/dataDelivery/data.ts @@ -1,617 +1,573 @@ export const data = [ - { - name: 'fb_custom_audience', - description: 'successfully adding users to audience', - feature: 'dataDelivery', - module: 'destination', - version: 'v0', - input: { - request: { - body: { - version: '1', - type: 'REST', - method: 'DELETE', - endpoint: 'https://graph.facebook.com/v17.0/aud1/users', - headers: { - "test-dest-response-key": "successResponse" - }, - params: { - access_token: 'ABC', - payload: { - is_raw: true, - data_source: { - sub_type: 'ANYTHING', - }, - schema: [ - 'EMAIL', - 'DOBM', - 'DOBD', - 'DOBY', - 'PHONE', - 'GEN', - 'FI', - 'MADID', - 'ZIP', - 'ST', - 'COUNTRY', - ], - data: [ - [ - 'shrouti@abc.com', - '2', - '13', - '2013', - '@09432457768', - 'f', - 'Ms.', - 'ABC', - 'ZIP ', - '123abc ', - 'IN', - ], - ], - }, - }, - userId: '', - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - } + { + name: 'fb_custom_audience', + description: 'successfully adding users to audience', + feature: 'dataDelivery', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + version: '1', + type: 'REST', + method: 'DELETE', + endpoint: 'https://graph.facebook.com/v17.0/aud1/users', + headers: { + 'test-dest-response-key': 'successResponse', + }, + params: { + access_token: 'ABC', + payload: { + is_raw: true, + data_source: { + sub_type: 'ANYTHING', + }, + schema: [ + 'EMAIL', + 'DOBM', + 'DOBD', + 'DOBY', + 'PHONE', + 'GEN', + 'FI', + 'MADID', + 'ZIP', + 'ST', + 'COUNTRY', + ], + data: [ + [ + 'shrouti@abc.com', + '2', + '13', + '2013', + '@09432457768', + 'f', + 'Ms.', + 'ABC', + 'ZIP ', + '123abc ', + 'IN', + ], + ], }, + }, + userId: '', + body: { + JSON: {}, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, }, - output: { - response: { - status: 200, - body: { - output: { - status: 200, - message: 'Request Processed Successfully', - destinationResponse: { - audience_id: 'aud1', - invalid_entry_samples: {}, - num_invalid_entries: 0, - num_received: 4, - session_id: '123' - } - } - } + }, + }, + output: { + response: { + status: 200, + body: { + output: { + status: 200, + message: 'Request Processed Successfully', + destinationResponse: { + audience_id: 'aud1', + invalid_entry_samples: {}, + num_invalid_entries: 0, + num_received: 4, + session_id: '123', }, + }, }, + }, }, - { - name: 'fb_custom_audience', - description: 'user addition failed due to missing permission', - feature: 'dataDelivery', - module: 'destination', - version: 'v0', - input: { - request: { - body: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/aud1/users', - headers: { - "test-dest-response-key": "permissionMissingError" - }, - params: { - access_token: 'BCD', - payload: { - is_raw: true, - data_source: { - sub_type: 'ANYTHING', - }, - schema: [ - 'DOBM', - 'DOBD', - 'DOBY', - 'PHONE', - 'GEN', - 'FI', - 'MADID', - 'ZIP', - 'ST', - 'COUNTRY', - ], - data: [ - [ - '2', - '13', - '2013', - '@09432457768', - 'f', - 'Ms.', - 'ABC', - 'ZIP ', - '123abc ', - 'IN', - ], - ], - }, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - } + }, + { + name: 'fb_custom_audience', + description: 'user addition failed due to missing permission', + feature: 'dataDelivery', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://graph.facebook.com/v17.0/aud1/users', + headers: { + 'test-dest-response-key': 'permissionMissingError', + }, + params: { + access_token: 'BCD', + payload: { + is_raw: true, + data_source: { + sub_type: 'ANYTHING', + }, + schema: [ + 'DOBM', + 'DOBD', + 'DOBY', + 'PHONE', + 'GEN', + 'FI', + 'MADID', + 'ZIP', + 'ST', + 'COUNTRY', + ], + data: [ + ['2', '13', '2013', '@09432457768', 'f', 'Ms.', 'ABC', 'ZIP ', '123abc ', 'IN'], + ], }, + }, + body: { + JSON: {}, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, }, - output: { - response: { - status: 400, - body: { - output: { - destinationResponse: { - error: { - code: 294, - message: "Missing permission. Please make sure you have ads_management permission and the application is included in the allowlist", - type: "GraphMethodException", - }, - status: 400, - - }, - message: "Missing permission. Please make sure you have ads_management permission and the application is included in the allowlist", - statTags: { - destType: "FB_CUSTOM_AUDIENCE", - destinationId: "Non-determininable", - errorCategory: "network", - errorType: "aborted", - feature: "dataDelivery", - implementation: "native", - module: "destination", - workspaceId: "Non-determininable", - }, - "status": 400, - }, - }, + }, + }, + output: { + response: { + status: 400, + body: { + output: { + destinationResponse: { + error: { + code: 294, + message: + 'Missing permission. Please make sure you have ads_management permission and the application is included in the allowlist', + type: 'GraphMethodException', + }, + status: 400, + }, + message: + 'Missing permission. Please make sure you have ads_management permission and the application is included in the allowlist', + statTags: { + destType: 'FB_CUSTOM_AUDIENCE', + destinationId: 'Non-determininable', + errorCategory: 'network', + errorType: 'aborted', + feature: 'dataDelivery', + implementation: 'native', + module: 'destination', + workspaceId: 'Non-determininable', }, + status: 400, + }, }, + }, }, - { - name: 'fb_custom_audience', - description: 'user addition failed due to unavailable audience error', - feature: 'dataDelivery', - module: 'destination', - version: 'v0', - input: { - request: { - body: { - version: '1', - type: 'REST', - method: 'DELETE', - endpoint: 'https://graph.facebook.com/v17.0/aud1/users', - headers: { - "test-dest-response-key": "audienceUnavailableError" - }, - params: { - access_token: 'ABC', - payload: { - is_raw: true, - data_source: { - sub_type: 'ANYTHING', - }, - schema: [ - 'DOBY', - 'PHONE', - 'GEN', - 'FI', - 'MADID', - 'ZIP', - 'ST', - 'COUNTRY', - ], - data: [ - [ - '2013', - '@09432457768', - 'f', - 'Ms.', - 'ABC', - 'ZIP ', - '123abc ', - 'IN', - ], - ], - }, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - } + }, + { + name: 'fb_custom_audience', + description: 'user addition failed due to unavailable audience error', + feature: 'dataDelivery', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + version: '1', + type: 'REST', + method: 'DELETE', + endpoint: 'https://graph.facebook.com/v17.0/aud1/users', + headers: { + 'test-dest-response-key': 'audienceUnavailableError', + }, + params: { + access_token: 'ABC', + payload: { + is_raw: true, + data_source: { + sub_type: 'ANYTHING', + }, + schema: ['DOBY', 'PHONE', 'GEN', 'FI', 'MADID', 'ZIP', 'ST', 'COUNTRY'], + data: [['2013', '@09432457768', 'f', 'Ms.', 'ABC', 'ZIP ', '123abc ', 'IN']], }, + }, + body: { + JSON: {}, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, }, - output: { - response: { - status: 400, - body: { - output: { - destinationResponse: { - error: { - code: 1487301, - message: "Custom Audience Unavailable: The custom audience you are trying to use has not been shared with your ad account", - type: "GraphMethodException", - }, - status: 400, - - }, - message: "Custom Audience Unavailable: The custom audience you are trying to use has not been shared with your ad account", - statTags: { - destType: "FB_CUSTOM_AUDIENCE", - destinationId: "Non-determininable", - errorCategory: "network", - errorType: "aborted", - feature: "dataDelivery", - implementation: "native", - module: "destination", - workspaceId: "Non-determininable", - }, - "status": 400, - }, - }, + }, + }, + output: { + response: { + status: 400, + body: { + output: { + destinationResponse: { + error: { + code: 1487301, + message: + 'Custom Audience Unavailable: The custom audience you are trying to use has not been shared with your ad account', + type: 'GraphMethodException', + }, + status: 400, + }, + message: + 'Custom Audience Unavailable: The custom audience you are trying to use has not been shared with your ad account', + statTags: { + destType: 'FB_CUSTOM_AUDIENCE', + destinationId: 'Non-determininable', + errorCategory: 'network', + errorType: 'aborted', + feature: 'dataDelivery', + implementation: 'native', + module: 'destination', + workspaceId: 'Non-determininable', }, + status: 400, + }, }, + }, }, - { - name: 'fb_custom_audience', - description: 'user addition failed because the custom audience has been deleted', - feature: 'dataDelivery', - module: 'destination', - version: 'v0', - input: { - request: { - body: { - version: '1', - type: 'REST', - method: 'DELETE', - endpoint: 'https://graph.facebook.com/v17.0/aud1/users', - headers: { - "test-dest-response-key": "audienceDeletedError" - }, - params: { - access_token: 'ABC', - payload: { - is_raw: true, - data_source: { - sub_type: 'ANYTHING', - }, - schema: [ - 'DOBY', - 'PHONE', - 'GEN', - 'FI', - 'MADID', - 'ZIP', - 'ST', - 'COUNTRY', - ], - data: [ - [ - '2013', - '@09432457768', - 'f', - 'Ms.', - 'ABC', - 'ZIP ', - '123abc ', - 'IN', - ], - ], - }, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - } + }, + { + name: 'fb_custom_audience', + description: 'user addition failed because the custom audience has been deleted', + feature: 'dataDelivery', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + version: '1', + type: 'REST', + method: 'DELETE', + endpoint: 'https://graph.facebook.com/v17.0/aud1/users', + headers: { + 'test-dest-response-key': 'audienceDeletedError', + }, + params: { + access_token: 'ABC', + payload: { + is_raw: true, + data_source: { + sub_type: 'ANYTHING', + }, + schema: ['DOBY', 'PHONE', 'GEN', 'FI', 'MADID', 'ZIP', 'ST', 'COUNTRY'], + data: [['2013', '@09432457768', 'f', 'Ms.', 'ABC', 'ZIP ', '123abc ', 'IN']], }, + }, + body: { + JSON: {}, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, }, - output: { - response: { - status: 400, - body: { - output: { - destinationResponse: { - error: { - code: 1487366, - message: "Custom Audience Has Been Deleted", - type: "GraphMethodException", - }, - status: 400, - - }, - message: "Custom Audience Has Been Deleted", - statTags: { - destType: "FB_CUSTOM_AUDIENCE", - destinationId: "Non-determininable", - errorCategory: "network", - errorType: "aborted", - feature: "dataDelivery", - implementation: "native", - module: "destination", - workspaceId: "Non-determininable", - }, - "status": 400, - }, - }, + }, + }, + output: { + response: { + status: 400, + body: { + output: { + destinationResponse: { + error: { + code: 1487366, + message: 'Custom Audience Has Been Deleted', + type: 'GraphMethodException', + }, + status: 400, }, + message: 'Custom Audience Has Been Deleted', + statTags: { + destType: 'FB_CUSTOM_AUDIENCE', + destinationId: 'Non-determininable', + errorCategory: 'network', + errorType: 'aborted', + feature: 'dataDelivery', + implementation: 'native', + module: 'destination', + workspaceId: 'Non-determininable', + }, + status: 400, + }, }, + }, }, - { - name: 'fb_custom_audience', - description: 'Failed to update the custom audience for unknown reason', - feature: 'dataDelivery', - module: 'destination', - version: 'v0', - input: { - request: { - body: { - version: '1', - type: 'REST', - method: 'DELETE', - endpoint: 'https://graph.facebook.com/v17.0/aud1/users', - headers: { - "test-dest-response-key": "failedToUpdateAudienceError" - }, - params: { - access_token: 'ABC', - payload: { - is_raw: true, - data_source: { - sub_type: 'ANYTHING', - }, - schema: [ - 'DOBY', - 'PHONE', - 'GEN', - 'FI', - 'MADID', - 'ZIP', - 'ST', - 'COUNTRY', - ], - data: [ - [ - '2013', - '@09432457768', - 'f', - 'Ms.', - 'ABC', - 'ZIP ', - '123abc ', - 'IN', - ], - ], - }, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - } + }, + { + name: 'fb_custom_audience', + description: 'Failed to update the custom audience for unknown reason', + feature: 'dataDelivery', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + version: '1', + type: 'REST', + method: 'DELETE', + endpoint: 'https://graph.facebook.com/v17.0/aud1/users', + headers: { + 'test-dest-response-key': 'failedToUpdateAudienceError', + }, + params: { + access_token: 'ABC', + payload: { + is_raw: true, + data_source: { + sub_type: 'ANYTHING', + }, + schema: ['DOBY', 'PHONE', 'GEN', 'FI', 'MADID', 'ZIP', 'ST', 'COUNTRY'], + data: [['2013', '@09432457768', 'f', 'Ms.', 'ABC', 'ZIP ', '123abc ', 'IN']], }, + }, + body: { + JSON: {}, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, }, - output: { - response: { - status: 400, - body: { - output: { - destinationResponse: { - error: { - code: 2650, - message: "Failed to update the custom audience", - type: "GraphMethodException", - }, - status: 400, - - }, - message: "Failed to update the custom audience", - statTags: { - destType: "FB_CUSTOM_AUDIENCE", - destinationId: "Non-determininable", - errorCategory: "network", - errorType: "aborted", - feature: "dataDelivery", - implementation: "native", - module: "destination", - workspaceId: "Non-determininable", - }, - "status": 400, - }, - }, + }, + }, + output: { + response: { + status: 400, + body: { + output: { + destinationResponse: { + error: { + code: 2650, + message: 'Failed to update the custom audience', + type: 'GraphMethodException', + }, + status: 400, + }, + message: 'Failed to update the custom audience', + statTags: { + destType: 'FB_CUSTOM_AUDIENCE', + destinationId: 'Non-determininable', + errorCategory: 'network', + errorType: 'aborted', + feature: 'dataDelivery', + implementation: 'native', + module: 'destination', + workspaceId: 'Non-determininable', }, + status: 400, + }, }, + }, }, - { - name: 'fb_custom_audience', - description: 'Failed to update the custom audience as excessive number of parameters were passed in the request', - feature: 'dataDelivery', - module: 'destination', - version: 'v0', - input: { - request: { - body: { - version: '1', - type: 'REST', - method: 'DELETE', - endpoint: 'https://graph.facebook.com/v17.0/aud1/users', - headers: { - "test-dest-response-key": "parameterExceededError" - }, - params: { - access_token: 'ABC', - payload: { - is_raw: true, - data_source: { - sub_type: 'ANYTHING', - }, - schema: [ - 'DOBY', - 'PHONE', - 'GEN', - 'FI', - 'MADID', - 'ZIP', - 'ST', - 'COUNTRY', - ], - data: [ - [ - '2013', - '@09432457768', - 'f', - 'Ms.', - 'ABC', - 'ZIP ', - '123abc ', - 'IN', - ], - ], - }, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - } + }, + { + name: 'fb_custom_audience', + description: + 'Failed to update the custom audience as excessive number of parameters were passed in the request', + feature: 'dataDelivery', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + version: '1', + type: 'REST', + method: 'DELETE', + endpoint: 'https://graph.facebook.com/v17.0/aud1/users', + headers: { + 'test-dest-response-key': 'parameterExceededError', + }, + params: { + access_token: 'ABC', + payload: { + is_raw: true, + data_source: { + sub_type: 'ANYTHING', + }, + schema: ['DOBY', 'PHONE', 'GEN', 'FI', 'MADID', 'ZIP', 'ST', 'COUNTRY'], + data: [['2013', '@09432457768', 'f', 'Ms.', 'ABC', 'ZIP ', '123abc ', 'IN']], }, + }, + body: { + JSON: {}, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, }, - output: { - response: { - status: 400, - body: { - output: { - destinationResponse: { - error: { - code: 105, - message: "The number of parameters exceeded the maximum for this operation", - type: "GraphMethodException", - }, - status: 400, - - }, - message: "The number of parameters exceeded the maximum for this operation", - statTags: { - destType: "FB_CUSTOM_AUDIENCE", - destinationId: "Non-determininable", - errorCategory: "network", - errorType: "aborted", - feature: "dataDelivery", - implementation: "native", - module: "destination", - workspaceId: "Non-determininable", - }, - "status": 400, - }, - }, + }, + }, + output: { + response: { + status: 400, + body: { + output: { + destinationResponse: { + error: { + code: 105, + message: 'The number of parameters exceeded the maximum for this operation', + type: 'GraphMethodException', + }, + status: 400, + }, + message: 'The number of parameters exceeded the maximum for this operation', + statTags: { + destType: 'FB_CUSTOM_AUDIENCE', + destinationId: 'Non-determininable', + errorCategory: 'network', + errorType: 'aborted', + feature: 'dataDelivery', + implementation: 'native', + module: 'destination', + workspaceId: 'Non-determininable', }, + status: 400, + }, }, + }, }, - { - name: 'fb_custom_audience', - description: 'user update request is throttled due to too many calls to the ad account', - feature: 'dataDelivery', - module: 'destination', - version: 'v0', - input: { - request: { - body: { - version: '1', - type: 'REST', - method: 'DELETE', - endpoint: 'https://graph.facebook.com/v17.0/aud1/users', - headers: { - "test-dest-response-key": "tooManyCallsError" - }, - params: { - access_token: 'ABC', - payload: { - is_raw: true, - data_source: { - sub_type: 'ANYTHING', - }, - schema: [ - 'DOBY', - 'PHONE', - 'GEN', - 'FI', - 'MADID', - 'ZIP', - 'ST', - 'COUNTRY', - ], - data: [ - [ - '2013', - '@09432457768', - 'f', - 'Ms.', - 'ABC', - 'ZIP ', - '123abc ', - 'IN', - ], - ], - }, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - } + }, + { + name: 'fb_custom_audience', + description: 'user update request is throttled due to too many calls to the ad account', + feature: 'dataDelivery', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + version: '1', + type: 'REST', + method: 'DELETE', + endpoint: 'https://graph.facebook.com/v17.0/aud1/users', + headers: { + 'test-dest-response-key': 'tooManyCallsError', + }, + params: { + access_token: 'ABC', + payload: { + is_raw: true, + data_source: { + sub_type: 'ANYTHING', + }, + schema: ['DOBY', 'PHONE', 'GEN', 'FI', 'MADID', 'ZIP', 'ST', 'COUNTRY'], + data: [['2013', '@09432457768', 'f', 'Ms.', 'ABC', 'ZIP ', '123abc ', 'IN']], }, + }, + body: { + JSON: {}, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, }, - output: { - response: { - status: 429, - body: { - output: { - destinationResponse: { - error: { - code: 80003, - message: "There have been too many calls to this ad-account.", - type: "GraphMethodException", - }, - status: 429, - - }, - message: "There have been too many calls to this ad-account.", - statTags: { - destType: "FB_CUSTOM_AUDIENCE", - destinationId: "Non-determininable", - errorCategory: "network", - errorType: "throttled", - feature: "dataDelivery", - implementation: "native", - module: "destination", - workspaceId: "Non-determininable", - }, - "status": 429, - }, - }, + }, + }, + output: { + response: { + status: 429, + body: { + output: { + destinationResponse: { + error: { + code: 80003, + message: 'There have been too many calls to this ad-account.', + type: 'GraphMethodException', + }, + status: 429, + }, + message: 'There have been too many calls to this ad-account.', + statTags: { + destType: 'FB_CUSTOM_AUDIENCE', + destinationId: 'Non-determininable', + errorCategory: 'network', + errorType: 'throttled', + feature: 'dataDelivery', + implementation: 'native', + module: 'destination', + workspaceId: 'Non-determininable', + }, + status: 429, + }, + }, + }, + }, + }, + { + name: 'fb_custom_audience', + description: 'user having permission issue while updating audience', + feature: 'dataDelivery', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + version: '1', + type: 'REST', + method: 'DELETE', + endpoint: 'https://graph.facebook.com/v17.0/aud1/users', + headers: { + 'test-dest-response-key': 'code200PermissionError', + }, + params: { + access_token: 'ABC', + payload: { + is_raw: true, + data_source: { + sub_type: 'ANYTHING', + }, + schema: ['DOBY', 'PHONE', 'GEN', 'FI', 'MADID', 'ZIP', 'ST', 'COUNTRY'], + data: [['2013', '@09432457768', 'f', 'Ms.', 'ABC', 'ZIP ', '123abc ', 'IN']], }, + }, + body: { + JSON: {}, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, }, - } -] \ No newline at end of file + }, + }, + output: { + response: { + status: 403, + body: { + output: { + destinationResponse: { + error: { + code: 200, + fbtrace_id: 'AFfWqjY-_y2Q92DsyJ4DQ6f', + message: '(#200) The current user can not update audience 23861283180290489', + type: 'OAuthException', + }, + status: 403, + }, + message: '(#200) The current user can not update audience 23861283180290489', + statTags: { + destType: 'FB_CUSTOM_AUDIENCE', + destinationId: 'Non-determininable', + errorCategory: 'network', + errorType: 'aborted', + feature: 'dataDelivery', + implementation: 'native', + module: 'destination', + workspaceId: 'Non-determininable', + }, + status: 403, + }, + }, + }, + }, + }, +]; diff --git a/test/integrations/destinations/fb_custom_audience/network.ts b/test/integrations/destinations/fb_custom_audience/network.ts index 2c19a6fe0d..7dd904fdd9 100644 --- a/test/integrations/destinations/fb_custom_audience/network.ts +++ b/test/integrations/destinations/fb_custom_audience/network.ts @@ -1,456 +1,481 @@ export const networkCallsData = [ - { - httpReq: { - version: '1', - type: 'REST', - method: 'DELETE', - endpoint: 'https://graph.facebook.com/v17.0/aud1/users', - headers: { - 'test-dest-response-key': 'successResponse' - }, - params: { - access_token: 'ABC', - payload: { - is_raw: true, - data_source: { - sub_type: 'ANYTHING', - }, - schema: [ - 'EMAIL', - 'DOBM', - 'DOBD', - 'DOBY', - 'PHONE', - 'GEN', - 'FI', - 'MADID', - 'ZIP', - 'ST', - 'COUNTRY', - ], - data: [ - [ - 'shrouti@abc.com', - '2', - '13', - '2013', - '@09432457768', - 'f', - 'Ms.', - 'ABC', - 'ZIP ', - '123abc ', - 'IN', - ], - ], - }, - }, - userId: '', - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, + { + httpReq: { + version: '1', + type: 'REST', + method: 'DELETE', + endpoint: 'https://graph.facebook.com/v17.0/aud1/users', + headers: { + 'test-dest-response-key': 'successResponse', + }, + params: { + access_token: 'ABC', + payload: { + is_raw: true, + data_source: { + sub_type: 'ANYTHING', + }, + schema: [ + 'EMAIL', + 'DOBM', + 'DOBD', + 'DOBY', + 'PHONE', + 'GEN', + 'FI', + 'MADID', + 'ZIP', + 'ST', + 'COUNTRY', + ], + data: [ + [ + 'shrouti@abc.com', + '2', + '13', + '2013', + '@09432457768', + 'f', + 'Ms.', + 'ABC', + 'ZIP ', + '123abc ', + 'IN', + ], + ], }, - httpRes: { - "data": { - "audience_id": "aud1", - "session_id": "123", - "num_received": 4, - "num_invalid_entries": 0, - "invalid_entry_samples": {} - }, - "status": 200 - } + }, + userId: '', + body: { + JSON: {}, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, }, - { - httpReq: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/aud1/users', - headers: { - 'test-dest-response-key': 'permissionMissingError' - }, - params: { - access_token: 'BCD', - payload: { - is_raw: true, - data_source: { - sub_type: 'ANYTHING', - }, - schema: [ - 'DOBM', - 'DOBD', - 'DOBY', - 'PHONE', - 'GEN', - 'FI', - 'MADID', - 'ZIP', - 'ST', - 'COUNTRY', - ], - data: [ - [ - '2', - '13', - '2013', - '@09432457768', - 'f', - 'Ms.', - 'ABC', - 'ZIP ', - '123abc ', - 'IN', - ], - ], - }, - }, - userId: '', - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, + httpRes: { + data: { + audience_id: 'aud1', + session_id: '123', + num_received: 4, + num_invalid_entries: 0, + invalid_entry_samples: {}, + }, + status: 200, + }, + }, + { + httpReq: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://graph.facebook.com/v17.0/aud1/users', + headers: { + 'test-dest-response-key': 'permissionMissingError', + }, + params: { + access_token: 'BCD', + payload: { + is_raw: true, + data_source: { + sub_type: 'ANYTHING', + }, + schema: ['DOBM', 'DOBD', 'DOBY', 'PHONE', 'GEN', 'FI', 'MADID', 'ZIP', 'ST', 'COUNTRY'], + data: [['2', '13', '2013', '@09432457768', 'f', 'Ms.', 'ABC', 'ZIP ', '123abc ', 'IN']], + }, + }, + userId: '', + body: { + JSON: {}, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + }, + httpRes: { + data: { + error: { + code: 294, + message: + 'Missing permission. Please make sure you have ads_management permission and the application is included in the allowlist', + type: 'GraphMethodException', + }, + }, + status: 400, + }, + }, + { + httpReq: { + version: '1', + type: 'REST', + method: 'DELETE', + endpoint: 'https://graph.facebook.com/v17.0/aud1/users', + headers: { + 'test-dest-response-key': 'audienceUnavailableError', + }, + params: { + access_token: 'ABC', + payload: { + is_raw: true, + data_source: { + sub_type: 'ANYTHING', + }, + schema: ['DOBY', 'PHONE', 'GEN', 'FI', 'MADID', 'ZIP', 'ST', 'COUNTRY'], + data: [['2013', '@09432457768', 'f', 'Ms.', 'ABC', 'ZIP ', '123abc ', 'IN']], + }, + }, + userId: '', + body: { + JSON: {}, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + }, + httpRes: { + data: { + error: { + code: 1487301, + message: + 'Custom Audience Unavailable: The custom audience you are trying to use has not been shared with your ad account', + type: 'GraphMethodException', + }, + }, + status: 400, + }, + }, + { + httpReq: { + version: '1', + type: 'REST', + method: 'DELETE', + endpoint: 'https://graph.facebook.com/v17.0/aud1/users', + headers: { + 'test-dest-response-key': 'audienceDeletedError', + }, + params: { + access_token: 'ABC', + payload: { + is_raw: true, + data_source: { + sub_type: 'ANYTHING', + }, + schema: [ + 'EMAIL', + 'DOBM', + 'DOBD', + 'DOBY', + 'PHONE', + 'GEN', + 'FI', + 'MADID', + 'ZIP', + 'ST', + 'COUNTRY', + ], + data: [ + [ + 'shrouti@abc.com', + '2', + '13', + '2013', + '@09432457768', + 'f', + 'Ms.', + 'ABC', + 'ZIP ', + '123abc ', + 'IN', + ], + ], }, - httpRes: { - data: { - error: { - code: 294, - message: "Missing permission. Please make sure you have ads_management permission and the application is included in the allowlist", - type: "GraphMethodException", - } - }, - "status": 400 - } + }, + userId: '', + body: { + JSON: {}, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, }, - { - httpReq: { - version: '1', - type: 'REST', - method: 'DELETE', - endpoint: 'https://graph.facebook.com/v17.0/aud1/users', - headers: { - 'test-dest-response-key': 'audienceUnavailableError' - }, - params: { - access_token: 'ABC', - payload: { - is_raw: true, - data_source: { - sub_type: 'ANYTHING', - }, - schema: [ - 'DOBY', - 'PHONE', - 'GEN', - 'FI', - 'MADID', - 'ZIP', - 'ST', - 'COUNTRY', - ], - data: [ - [ - '2013', - '@09432457768', - 'f', - 'Ms.', - 'ABC', - 'ZIP ', - '123abc ', - 'IN', - ], - ], - }, - }, - userId: '', - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, + httpRes: { + data: { + error: { + code: 1487366, + message: 'Custom Audience Has Been Deleted', + type: 'GraphMethodException', }, - httpRes: { - data: { - error: { - code: 1487301, - message: "Custom Audience Unavailable: The custom audience you are trying to use has not been shared with your ad account", - type: "GraphMethodException", - } - }, - "status": 400 - } + }, + status: 400, }, - { - httpReq: { - version: '1', - type: 'REST', - method: 'DELETE', - endpoint: 'https://graph.facebook.com/v17.0/aud1/users', - headers: { - 'test-dest-response-key': 'audienceDeletedError' - }, - params: { - access_token: 'ABC', - payload: { - is_raw: true, - data_source: { - sub_type: 'ANYTHING', - }, - schema: [ - 'EMAIL', - 'DOBM', - 'DOBD', - 'DOBY', - 'PHONE', - 'GEN', - 'FI', - 'MADID', - 'ZIP', - 'ST', - 'COUNTRY', - ], - data: [ - [ - 'shrouti@abc.com', - '2', - '13', - '2013', - '@09432457768', - 'f', - 'Ms.', - 'ABC', - 'ZIP ', - '123abc ', - 'IN', - ], - ], - }, - }, - userId: '', - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, + }, + { + httpReq: { + version: '1', + type: 'REST', + method: 'DELETE', + endpoint: 'https://graph.facebook.com/v17.0/aud1/users', + headers: { + 'test-dest-response-key': 'failedToUpdateAudienceError', + }, + params: { + access_token: 'ABC', + payload: { + is_raw: true, + data_source: { + sub_type: 'ANYTHING', + }, + schema: [ + 'EMAIL', + 'DOBM', + 'DOBD', + 'DOBY', + 'PHONE', + 'GEN', + 'FI', + 'MADID', + 'ZIP', + 'ST', + 'COUNTRY', + ], + data: [ + [ + 'shrouti@abc.com', + '2', + '13', + '2013', + '@09432457768', + 'f', + 'Ms.', + 'ABC', + 'ZIP ', + '123abc ', + 'IN', + ], + ], }, - httpRes: { - data: { - error: { - code: 1487366, - message: "Custom Audience Has Been Deleted", - type: "GraphMethodException", - } - }, - "status": 400 - } + }, + userId: '', + body: { + JSON: {}, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, }, - { - httpReq: { - version: '1', - type: 'REST', - method: 'DELETE', - endpoint: 'https://graph.facebook.com/v17.0/aud1/users', - headers: { - 'test-dest-response-key': 'failedToUpdateAudienceError' - }, - params: { - access_token: 'ABC', - payload: { - is_raw: true, - data_source: { - sub_type: 'ANYTHING', - }, - schema: [ - 'EMAIL', - 'DOBM', - 'DOBD', - 'DOBY', - 'PHONE', - 'GEN', - 'FI', - 'MADID', - 'ZIP', - 'ST', - 'COUNTRY', - ], - data: [ - [ - 'shrouti@abc.com', - '2', - '13', - '2013', - '@09432457768', - 'f', - 'Ms.', - 'ABC', - 'ZIP ', - '123abc ', - 'IN', - ], - ], - }, - }, - userId: '', - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, + httpRes: { + data: { + error: { + code: 2650, + message: 'Failed to update the custom audience', + type: 'GraphMethodException', }, - httpRes: { - data: { - error: { - code: 2650, - message: "Failed to update the custom audience", - type: "GraphMethodException", - } - }, - "status": 400 - } + }, + status: 400, }, - { - httpReq: { - version: '1', - type: 'REST', - method: 'DELETE', - endpoint: 'https://graph.facebook.com/v17.0/aud1/users', - headers: { - 'test-dest-response-key': 'parameterExceededError' - }, - params: { - access_token: 'ABC', - payload: { - is_raw: true, - data_source: { - sub_type: 'ANYTHING', - }, - schema: [ - 'EMAIL', - 'DOBM', - 'DOBD', - 'DOBY', - 'PHONE', - 'GEN', - 'FI', - 'MADID', - 'ZIP', - 'ST', - 'COUNTRY', - ], - data: [ - [ - 'shrouti@abc.com', - '2', - '13', - '2013', - '@09432457768', - 'f', - 'Ms.', - 'ABC', - 'ZIP ', - '123abc ', - 'IN', - ], - ], - }, - }, - userId: '', - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, + }, + { + httpReq: { + version: '1', + type: 'REST', + method: 'DELETE', + endpoint: 'https://graph.facebook.com/v17.0/aud1/users', + headers: { + 'test-dest-response-key': 'parameterExceededError', + }, + params: { + access_token: 'ABC', + payload: { + is_raw: true, + data_source: { + sub_type: 'ANYTHING', + }, + schema: [ + 'EMAIL', + 'DOBM', + 'DOBD', + 'DOBY', + 'PHONE', + 'GEN', + 'FI', + 'MADID', + 'ZIP', + 'ST', + 'COUNTRY', + ], + data: [ + [ + 'shrouti@abc.com', + '2', + '13', + '2013', + '@09432457768', + 'f', + 'Ms.', + 'ABC', + 'ZIP ', + '123abc ', + 'IN', + ], + ], }, - httpRes: { - data: { - error: { - code: 105, - message: "The number of parameters exceeded the maximum for this operation", - type: "GraphMethodException", - } - }, - "status": 400 - } + }, + userId: '', + body: { + JSON: {}, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, }, - { - httpReq: { - version: '1', - type: 'REST', - method: 'DELETE', - endpoint: 'https://graph.facebook.com/v17.0/aud1/users', - headers: { - 'test-dest-response-key': 'tooManyCallsError' - }, - params: { - access_token: 'ABC', - payload: { - is_raw: true, - data_source: { - sub_type: 'ANYTHING', - }, - schema: [ - 'EMAIL', - 'DOBM', - 'DOBD', - 'DOBY', - 'PHONE', - 'GEN', - 'FI', - 'MADID', - 'ZIP', - 'ST', - 'COUNTRY', - ], - data: [ - [ - 'shrouti@abc.com', - '2', - '13', - '2013', - '@09432457768', - 'f', - 'Ms.', - 'ABC', - 'ZIP ', - '123abc ', - 'IN', - ], - ], - }, - }, - userId: '', - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, + httpRes: { + data: { + error: { + code: 105, + message: 'The number of parameters exceeded the maximum for this operation', + type: 'GraphMethodException', }, - httpRes: { - data: { - error: { - code: 80003, - message: "There have been too many calls to this ad-account.", - type: "GraphMethodException", - } - }, - "status": 429 - } - } -]; \ No newline at end of file + }, + status: 400, + }, + }, + { + httpReq: { + version: '1', + type: 'REST', + method: 'DELETE', + endpoint: 'https://graph.facebook.com/v17.0/aud1/users', + headers: { + 'test-dest-response-key': 'tooManyCallsError', + }, + params: { + access_token: 'ABC', + payload: { + is_raw: true, + data_source: { + sub_type: 'ANYTHING', + }, + schema: [ + 'EMAIL', + 'DOBM', + 'DOBD', + 'DOBY', + 'PHONE', + 'GEN', + 'FI', + 'MADID', + 'ZIP', + 'ST', + 'COUNTRY', + ], + data: [ + [ + 'shrouti@abc.com', + '2', + '13', + '2013', + '@09432457768', + 'f', + 'Ms.', + 'ABC', + 'ZIP ', + '123abc ', + 'IN', + ], + ], + }, + }, + userId: '', + body: { + JSON: {}, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + }, + httpRes: { + data: { + error: { + code: 80003, + message: 'There have been too many calls to this ad-account.', + type: 'GraphMethodException', + }, + }, + status: 429, + }, + }, + { + httpReq: { + version: '1', + type: 'REST', + method: 'DELETE', + endpoint: 'https://graph.facebook.com/v17.0/aud1/users', + headers: { + 'test-dest-response-key': 'code200PermissionError', + }, + params: { + access_token: 'ABC', + payload: { + is_raw: true, + data_source: { + sub_type: 'ANYTHING', + }, + schema: [ + 'EMAIL', + 'DOBM', + 'DOBD', + 'DOBY', + 'PHONE', + 'GEN', + 'FI', + 'MADID', + 'ZIP', + 'ST', + 'COUNTRY', + ], + data: [ + [ + 'shrouti@abc.com', + '2', + '13', + '2013', + '@09432457768', + 'f', + 'Ms.', + 'ABC', + 'ZIP ', + '123abc ', + 'IN', + ], + ], + }, + }, + userId: '', + body: { + JSON: {}, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + }, + httpRes: { + data: { + error: { + code: 200, + fbtrace_id: 'AFfWqjY-_y2Q92DsyJ4DQ6f', + message: '(#200) The current user can not update audience 23861283180290489', + type: 'OAuthException', + }, + }, + status: 403, + }, + }, +]; From cd9a046f66eab8363373cb9a0fa1afeef3137d78 Mon Sep 17 00:00:00 2001 From: Utsab Chowdhury Date: Wed, 29 Nov 2023 12:06:38 +0530 Subject: [PATCH 029/135] fix: sfmc bug fix for track event validations (#2852) --- src/v0/destinations/sfmc/transform.js | 23 +++- src/v0/destinations/sfmc/transform.test.js | 125 ++++++++++++++++++++ test/__tests__/data/sfmc_output.json | 2 +- test/__tests__/data/sfmc_router_output.json | 2 +- 4 files changed, 145 insertions(+), 7 deletions(-) create mode 100644 src/v0/destinations/sfmc/transform.test.js diff --git a/src/v0/destinations/sfmc/transform.js b/src/v0/destinations/sfmc/transform.js index 879ca1989a..7623d751f1 100644 --- a/src/v0/destinations/sfmc/transform.js +++ b/src/v0/destinations/sfmc/transform.js @@ -3,6 +3,8 @@ const { NetworkError, ConfigurationError, InstrumentationError, + isDefinedAndNotNull, + isEmpty, } = require('@rudderstack/integrations-lib'); const myAxios = require('../../../util/myAxios'); const { EventType } = require('../../../constants'); @@ -17,7 +19,6 @@ const { flattenJson, toTitleCase, getHashFromArray, - isEmpty, simpleProcessRouterDest, } = require('../../util'); const { @@ -221,10 +222,22 @@ const responseBuilderSimple = async (message, category, destination) => { } if (category.type === 'identify' && createOrUpdateContacts) { - throw new ConfigurationError('Creating or updating contacts is disabled'); + throw new ConfigurationError( + 'Creating or updating contacts is disabled. To enable this feature set "Do Not Create or Update Contacts" to false', + ); } - if (category.type === 'track' && hashMapExternalKey[message.event.toLowerCase()]) { + if (category.type === 'track') { + if (isEmpty(message.event)) { + throw new ConfigurationError('Event name is required for track events'); + } + if (typeof message.event !== 'string') { + throw new ConfigurationError('Event name must be a string'); + } + if (!isDefinedAndNotNull(hashMapExternalKey[message.event.toLowerCase()])) { + throw new ConfigurationError('Event not mapped for this track call'); + } + return responseBuilderForInsertData( message, hashMapExternalKey[message.event.toLowerCase()], @@ -237,7 +250,7 @@ const responseBuilderSimple = async (message, category, destination) => { ); } - throw new ConfigurationError('Event not mapped for this track call'); + throw new ConfigurationError(`Event type '${category.type}' not supported`); }; const processEvent = async (message, destination) => { @@ -274,4 +287,4 @@ const processRouterDest = async (inputs, reqMetadata) => { return respList; }; -module.exports = { process, processRouterDest }; +module.exports = { process, processRouterDest, responseBuilderSimple }; diff --git a/src/v0/destinations/sfmc/transform.test.js b/src/v0/destinations/sfmc/transform.test.js new file mode 100644 index 0000000000..c49c49017c --- /dev/null +++ b/src/v0/destinations/sfmc/transform.test.js @@ -0,0 +1,125 @@ +const { ConfigurationError } = require('@rudderstack/integrations-lib'); +const axios = require('axios'); +const MockAxiosAdapter = require('axios-mock-adapter'); +const { responseBuilderSimple } = require('./transform'); +beforeAll(() => { + const mock = new MockAxiosAdapter(axios); + mock + .onPost('https://yourSubDomain.auth.marketingcloudapis.com/v2/token') + .reply(200, '{"access_token":"yourAuthToken"}'); +}); + +describe('responseBuilderSimple', () => { + const destination = { + Config: { + clientId: 'yourClientId', + clientSecret: 'yourClientSecret', + subDomain: 'yourSubDomain', + createOrUpdateContacts: false, + externalKey: 'yourExternalKey', + eventToExternalKey: [{ from: 'purchase', to: 'purchaseKey' }], + eventToPrimaryKey: [{ from: 'purchase', to: 'primaryKey' }], + eventToUUID: [{ event: 'purchase', uuid: true }], + }, + }; + it('should return an array of two payloads for identify calls when createOrUpdateContacts is false', async () => { + const message = { + type: 'identify', + userId: '12345', + }; + + const category = { + type: 'identify', + name: 'Identify', + }; + + const response = await responseBuilderSimple(message, category, destination); + + expect(response).toHaveLength(2); + expect(response[0]).toHaveProperty('endpoint'); + expect(response[0]).toHaveProperty('method'); + expect(response[0]).toHaveProperty('body.JSON'); + expect(response[0]).toHaveProperty('headers'); + expect(response[1]).toHaveProperty('endpoint'); + expect(response[1]).toHaveProperty('method'); + expect(response[1]).toHaveProperty('body.JSON'); + expect(response[1]).toHaveProperty('headers'); + }); + + // Throws an error when event name is not provided for track calls + it('should throw an error when event name is not provided for track calls', async () => { + const message = { + type: 'track', + }; + + const category = { + type: 'track', + name: 'Track', + }; + + try { + await responseBuilderSimple(message, category, destination); + } catch (e) { + expect(e).toBeInstanceOf(ConfigurationError); + expect(e.message).toBe('Event name is required for track events'); + } + }); + + // Throws an error when event is not mapped for track calls + it('should throw an error when event is not mapped for track calls', async () => { + const message = { + type: 'track', + event: 'unmappedEvent', + }; + + const category = { + type: 'track', + name: 'Track', + }; + try { + await responseBuilderSimple(message, category, destination); + } catch (e) { + expect(e).toBeInstanceOf(ConfigurationError); + expect(e.message).toBe('Event not mapped for this track call'); + } + }); + + // Throws an error when event type is not supported + it('should throw an error when event type is not supported', async () => { + const message = { + type: 'unsupported', + }; + + const category = { + type: 'unsupported', + name: 'Unsupported', + }; + + try { + await responseBuilderSimple(message, category, destination); + } catch (e) { + expect(e).toBeInstanceOf(ConfigurationError); + expect(e.message).toBe("Event type 'unsupported' not supported"); + } + }); + + // Returns a payload for track calls when event is mapped and event name is a string + it('should return a payload for track calls when event is mapped and event name is a string', async () => { + const message = { + type: 'track', + event: 'purchase', + userId: '12345', + }; + + const category = { + type: 'track', + name: 'Track', + }; + + const response = await responseBuilderSimple(message, category, destination); + expect(response).toHaveProperty('endpoint'); + expect(response).toHaveProperty('method'); + expect(response).toHaveProperty('body.JSON'); + expect(response).toHaveProperty('headers'); + }); +}); diff --git a/test/__tests__/data/sfmc_output.json b/test/__tests__/data/sfmc_output.json index 0271475e4a..aaaf23aea8 100644 --- a/test/__tests__/data/sfmc_output.json +++ b/test/__tests__/data/sfmc_output.json @@ -1,6 +1,6 @@ [ { - "error": "Creating or updating contacts is disabled" + "error": "Creating or updating contacts is disabled. To enable this feature set \"Do Not Create or Update Contacts\" to false" }, [ { diff --git a/test/__tests__/data/sfmc_router_output.json b/test/__tests__/data/sfmc_router_output.json index d207b792ee..beb90b5e13 100644 --- a/test/__tests__/data/sfmc_router_output.json +++ b/test/__tests__/data/sfmc_router_output.json @@ -37,7 +37,7 @@ }, "batched": false, "statusCode": 400, - "error": "Creating or updating contacts is disabled", + "error": "Creating or updating contacts is disabled. To enable this feature set \"Do Not Create or Update Contacts\" to false", "statTags": { "errorCategory": "dataValidation", "errorType": "configuration" From 91d4cd16f9839b0be5a663ca5010bdd72cff9bdc Mon Sep 17 00:00:00 2001 From: Sankeerth Date: Wed, 29 Nov 2023 12:54:12 +0530 Subject: [PATCH 030/135] fix: remove errorCategory for braze dedup error (#2850) --- src/v0/util/errorTypes/filteredEventsError.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/v0/util/errorTypes/filteredEventsError.js b/src/v0/util/errorTypes/filteredEventsError.js index 35a384f4e3..cb0236f342 100644 --- a/src/v0/util/errorTypes/filteredEventsError.js +++ b/src/v0/util/errorTypes/filteredEventsError.js @@ -1,13 +1,9 @@ -const tags = require('../tags'); const { BaseError } = require('./base'); const { HTTP_STATUS_CODES } = require('../constant'); class FilteredEventsError extends BaseError { constructor(message, statusCode = HTTP_STATUS_CODES.FILTER_EVENTS) { - const finalStatTags = { - [tags.TAG_NAMES.ERROR_CATEGORY]: tags.ERROR_CATEGORIES.TRANSFORMATION, - }; - super(message, statusCode, finalStatTags); + super(message, statusCode); } } From 3127a1ca8dc1b887f9158a1d839c5504f40c4678 Mon Sep 17 00:00:00 2001 From: Sandeep Digumarty Date: Wed, 29 Nov 2023 16:37:21 +0530 Subject: [PATCH 031/135] feat: update facebook destinations API version to v18.0 (#2828) * feat: update facebook destinations API version to v18.0 * feat: updated fb_pixel tests to pick version dynamically from config.js * feat: updated fb tests to pick version dynamically from config.js * feat: updated fb_custom_audience tests to pick version dynamically from config.js --- src/v0/destinations/facebook_pixel/config.js | 3 + .../destinations/facebook_pixel/transform.js | 3 +- src/v0/destinations/fb/config.js | 3 + src/v0/destinations/fb/transform.js | 3 +- .../destinations/fb_custom_audience/config.js | 4 +- .../facebook_pixel/dataDelivery/data.ts | 29 +- .../destinations/facebook_pixel/network.ts | 19 +- .../facebook_pixel/processor/data.ts | 79 +-- .../facebook_pixel/router/data.ts | 6 +- .../destinations/fb/dataDelivery/data.ts | 649 +++++++++--------- test/integrations/destinations/fb/network.ts | 5 +- .../destinations/fb/processor/data.ts | 24 +- .../fb_custom_audience/dataDelivery/data.ts | 18 +- .../fb_custom_audience/network.ts | 18 +- .../fb_custom_audience/processor/data.ts | 44 +- .../fb_custom_audience/router/data.ts | 20 +- 16 files changed, 479 insertions(+), 448 deletions(-) diff --git a/src/v0/destinations/facebook_pixel/config.js b/src/v0/destinations/facebook_pixel/config.js index f5f895aea9..17d5887e1b 100644 --- a/src/v0/destinations/facebook_pixel/config.js +++ b/src/v0/destinations/facebook_pixel/config.js @@ -1,5 +1,7 @@ const { getMappingConfig } = require('../../util'); +const VERSION = 'v18.0'; + const CONFIG_CATEGORIES = { USERDATA: { standard: false, @@ -106,6 +108,7 @@ const STANDARD_ECOMM_EVENTS_TYPE = [ ]; module.exports = { + VERSION, CONFIG_CATEGORIES, MAPPING_CONFIG, ACTION_SOURCES_VALUES, diff --git a/src/v0/destinations/facebook_pixel/transform.js b/src/v0/destinations/facebook_pixel/transform.js index 1bc97ac1fb..8a63998b45 100644 --- a/src/v0/destinations/facebook_pixel/transform.js +++ b/src/v0/destinations/facebook_pixel/transform.js @@ -4,6 +4,7 @@ const moment = require('moment'); const { InstrumentationError, ConfigurationError } = require('@rudderstack/integrations-lib'); const stats = require('../../../util/stats'); const { + VERSION, CONFIG_CATEGORIES, MAPPING_CONFIG, FB_PIXEL_DEFAULT_EXCLUSION, @@ -65,7 +66,7 @@ const responseBuilderSimple = (message, category, destination) => { } = Config; const integrationsObj = getIntegrationsObj(message, 'fb_pixel'); - const endpoint = `https://graph.facebook.com/v17.0/${pixelId}/events?access_token=${accessToken}`; + const endpoint = `https://graph.facebook.com/${VERSION}/${pixelId}/events?access_token=${accessToken}`; const userData = fetchUserData( message, diff --git a/src/v0/destinations/fb/config.js b/src/v0/destinations/fb/config.js index 2ad9aeacba..0e52b42416 100644 --- a/src/v0/destinations/fb/config.js +++ b/src/v0/destinations/fb/config.js @@ -1,6 +1,8 @@ const fs = require('fs'); const path = require('path'); +const VERSION = 'v18.0'; + const getPath = (file) => path.resolve(__dirname, file); const baseMapping = JSON.parse(fs.readFileSync(getPath('./data/FbAppBasicMapping.json'))); @@ -20,6 +22,7 @@ const eventPropToTypeMapping = JSON.parse( ); module.exports = { + VERSION, baseMapping, eventNameMapping, eventPropsMapping, diff --git a/src/v0/destinations/fb/transform.js b/src/v0/destinations/fb/transform.js index c0d78a2b3f..e6f8e986cf 100644 --- a/src/v0/destinations/fb/transform.js +++ b/src/v0/destinations/fb/transform.js @@ -14,6 +14,7 @@ const { } = require('../../util'); const { + VERSION, baseMapping, eventNameMapping, eventPropsMapping, @@ -250,7 +251,7 @@ function responseBuilderSimple(message, payload, destination) { // "https://graph.facebook.com/v13.0/644748472345539/activities" - const endpoint = `https://graph.facebook.com/v17.0/${appID}/activities`; + const endpoint = `https://graph.facebook.com/${VERSION}/${appID}/activities`; const response = defaultRequestConfig(); response.endpoint = endpoint; diff --git a/src/v0/destinations/fb_custom_audience/config.js b/src/v0/destinations/fb_custom_audience/config.js index 635ad2a9bb..284ab0d4a4 100644 --- a/src/v0/destinations/fb_custom_audience/config.js +++ b/src/v0/destinations/fb_custom_audience/config.js @@ -1,4 +1,4 @@ -const BASE_URL = 'https://graph.facebook.com/v17.0'; +const BASE_URL = 'https://graph.facebook.com/v18.0'; function getEndPoint(audienceId) { return `${BASE_URL}/${audienceId}/users`; @@ -93,7 +93,7 @@ const subTypeFields = [ // const MAX_USER_COUNT = 500; (using from destination definition) const USER_ADD = 'add'; const USER_DELETE = 'remove'; -/* No official Documentation is available for this but using trial +/* No official Documentation is available for this but using trial and error method we found that 65000 bytes is the maximum payload allowed size but we are 60000 just to be sure batching is done properly */ const maxPayloadSize = 60000; // bytes diff --git a/test/integrations/destinations/facebook_pixel/dataDelivery/data.ts b/test/integrations/destinations/facebook_pixel/dataDelivery/data.ts index d560658341..eb9ce344e0 100644 --- a/test/integrations/destinations/facebook_pixel/dataDelivery/data.ts +++ b/test/integrations/destinations/facebook_pixel/dataDelivery/data.ts @@ -1,3 +1,5 @@ +import { VERSION } from '../../../../../src/v0/destinations/facebook_pixel/config'; + export const data = [ { name: 'facebook_pixel', @@ -24,8 +26,7 @@ export const data = [ userId: '', headers: {}, version: '1', - endpoint: - 'https://graph.facebook.com/v17.0/1234567891234567/events?access_token=invalid_access_token', + endpoint: `https://graph.facebook.com/${VERSION}/1234567891234567/events?access_token=invalid_access_token`, params: { destination: 'facebook_pixel', }, @@ -89,8 +90,7 @@ export const data = [ userId: '', headers: {}, version: '1', - endpoint: - 'https://graph.facebook.com/v17.0/1234567891234567/events?access_token=my_access_token', + endpoint: `https://graph.facebook.com/${VERSION}/1234567891234567/events?access_token=my_access_token`, params: { destination: 'facebook_pixel', }, @@ -139,8 +139,7 @@ export const data = [ userId: '', headers: {}, version: '1', - endpoint: - 'https://graph.facebook.com/v17.0/1234567891234567/events?access_token=invalid_timestamp_correct_access_token', + endpoint: `https://graph.facebook.com/${VERSION}/1234567891234567/events?access_token=invalid_timestamp_correct_access_token`, params: { destination: 'facebook_pixel', }, @@ -209,8 +208,7 @@ export const data = [ userId: '', headers: {}, version: '1', - endpoint: - 'https://graph.facebook.com/v17.0/1234567891234567/events?access_token=throttled_valid_access_token', + endpoint: `https://graph.facebook.com/${VERSION}/1234567891234567/events?access_token=throttled_valid_access_token`, params: { destination: 'facebook_pixel', }, @@ -274,8 +272,7 @@ export const data = [ userId: '', headers: {}, version: '1', - endpoint: - 'https://graph.facebook.com/v17.0/1234567891234567/events?access_token=invalid_account_id_valid_access_token', + endpoint: `https://graph.facebook.com/${VERSION}/1234567891234567/events?access_token=invalid_account_id_valid_access_token`, params: { destination: 'facebook_pixel', }, @@ -342,8 +339,7 @@ export const data = [ userId: '', headers: {}, version: '1', - endpoint: - 'https://graph.facebook.com/v17.0/1234567891234567/events?access_token=not_found_access_token', + endpoint: `https://graph.facebook.com/${VERSION}/1234567891234567/events?access_token=not_found_access_token`, params: { destination: 'facebook_pixel', }, @@ -411,8 +407,7 @@ export const data = [ userId: '', headers: {}, version: '1', - endpoint: - 'https://graph.facebook.com/v17.0/1234567891234570/events?access_token=valid_access_token', + endpoint: `https://graph.facebook.com/${VERSION}/1234567891234570/events?access_token=valid_access_token`, }, method: 'POST', }, @@ -477,8 +472,7 @@ export const data = [ userId: '', headers: {}, version: '1', - endpoint: - 'https://graph.facebook.com/v17.0/1234567891234571/events?access_token=valid_access_token', + endpoint: `https://graph.facebook.com/${VERSION}/1234567891234571/events?access_token=valid_access_token`, }, method: 'POST', }, @@ -543,8 +537,7 @@ export const data = [ userId: '', headers: {}, version: '1', - endpoint: - 'https://graph.facebook.com/v17.0/1234567891234572/events?access_token=valid_access_token_unhandled_response', + endpoint: `https://graph.facebook.com/${VERSION}/1234567891234572/events?access_token=valid_access_token_unhandled_response`, }, method: 'POST', }, diff --git a/test/integrations/destinations/facebook_pixel/network.ts b/test/integrations/destinations/facebook_pixel/network.ts index a63970c4c6..05b3a05fd0 100644 --- a/test/integrations/destinations/facebook_pixel/network.ts +++ b/test/integrations/destinations/facebook_pixel/network.ts @@ -1,10 +1,11 @@ import { data } from './dataDelivery/data'; import { getFormData } from '../../../../src/adapters/network'; +import { VERSION } from '../../../../src/v0/destinations/facebook_pixel/config'; export const networkCallsData = [ { httpReq: { - url: 'https://graph.facebook.com/v17.0/1234567891234567/events?access_token=invalid_access_token', + url: `https://graph.facebook.com/${VERSION}/1234567891234567/events?access_token=invalid_access_token`, data: getFormData(data[0].input.request.body.body.FORM).toString(), params: { destination: 'facebook_pixel' }, headers: { 'User-Agent': 'RudderLabs' }, @@ -24,7 +25,7 @@ export const networkCallsData = [ }, { httpReq: { - url: 'https://graph.facebook.com/v17.0/1234567891234567/events?access_token=invalid_timestamp_correct_access_token', + url: `https://graph.facebook.com/${VERSION}/1234567891234567/events?access_token=invalid_timestamp_correct_access_token`, data: getFormData(data[2].input.request.body.body.FORM).toString(), params: { destination: 'facebook_pixel' }, headers: { 'User-Agent': 'RudderLabs' }, @@ -49,7 +50,7 @@ export const networkCallsData = [ }, { httpReq: { - url: 'https://graph.facebook.com/v17.0/1234567891234567/events?access_token=throttled_valid_access_token', + url: `https://graph.facebook.com/${VERSION}/1234567891234567/events?access_token=throttled_valid_access_token`, data: getFormData(data[3].input.request.body.body.FORM).toString(), params: { destination: 'facebook_pixel' }, headers: { 'User-Agent': 'RudderLabs' }, @@ -69,7 +70,7 @@ export const networkCallsData = [ }, { httpReq: { - url: 'https://graph.facebook.com/v17.0/1234567891234567/events?access_token=invalid_account_id_valid_access_token', + url: `https://graph.facebook.com/${VERSION}/1234567891234567/events?access_token=invalid_account_id_valid_access_token`, data: getFormData(data[4].input.request.body.body.FORM).toString(), params: { destination: 'facebook_pixel' }, headers: { 'User-Agent': 'RudderLabs' }, @@ -91,7 +92,7 @@ export const networkCallsData = [ }, { httpReq: { - url: 'https://graph.facebook.com/v17.0/1234567891234567/events?access_token=not_found_access_token', + url: `https://graph.facebook.com/${VERSION}/1234567891234567/events?access_token=not_found_access_token`, data: getFormData(data[5].input.request.body.body.FORM).toString(), params: { destination: 'facebook_pixel' }, headers: { 'User-Agent': 'RudderLabs' }, @@ -112,7 +113,7 @@ export const networkCallsData = [ }, { httpReq: { - url: 'https://graph.facebook.com/v17.0/1234567891234570/events?access_token=valid_access_token', + url: `https://graph.facebook.com/${VERSION}/1234567891234570/events?access_token=valid_access_token`, data: getFormData(data[6].input.request.body.body.FORM).toString(), params: { destination: 'facebook_pixel' }, headers: { 'User-Agent': 'RudderLabs' }, @@ -133,7 +134,7 @@ export const networkCallsData = [ }, { httpReq: { - url: 'https://graph.facebook.com/v17.0/1234567891234571/events?access_token=valid_access_token', + url: `https://graph.facebook.com/${VERSION}/1234567891234571/events?access_token=valid_access_token`, data: getFormData(data[7].input.request.body.body.FORM).toString(), params: { destination: 'facebook_pixel' }, headers: { 'User-Agent': 'RudderLabs' }, @@ -154,7 +155,7 @@ export const networkCallsData = [ }, { httpReq: { - url: 'https://graph.facebook.com/v17.0/1234567891234572/events?access_token=valid_access_token_unhandled_response', + url: `https://graph.facebook.com/${VERSION}/1234567891234572/events?access_token=valid_access_token_unhandled_response`, data: getFormData(data[8].input.request.body.body.FORM).toString(), params: { destination: 'facebook_pixel' }, headers: { 'User-Agent': 'RudderLabs' }, @@ -175,7 +176,7 @@ export const networkCallsData = [ }, { httpReq: { - url: 'https://graph.facebook.com/v17.0/1234567891234567/events?access_token=my_access_token', + url: `https://graph.facebook.com/${VERSION}/1234567891234567/events?access_token=my_access_token`, data: getFormData(data[1].input.request.body.body.FORM).toString(), params: { destination: 'facebook_pixel' }, headers: { 'User-Agent': 'RudderLabs' }, diff --git a/test/integrations/destinations/facebook_pixel/processor/data.ts b/test/integrations/destinations/facebook_pixel/processor/data.ts index 96e80c01e8..557bc7066c 100644 --- a/test/integrations/destinations/facebook_pixel/processor/data.ts +++ b/test/integrations/destinations/facebook_pixel/processor/data.ts @@ -1,3 +1,5 @@ +import { VERSION } from '../../../../../src/v0/destinations/facebook_pixel/config'; + export const mockFns = (_) => { // @ts-ignore jest.useFakeTimers().setSystemTime(new Date('2023-10-15')); @@ -106,7 +108,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: `https://graph.facebook.com/${VERSION}/dummyPixelId/events?access_token=09876`, headers: {}, params: {}, body: { @@ -445,7 +447,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: `https://graph.facebook.com/${VERSION}/dummyPixelId/events?access_token=09876`, headers: {}, params: {}, body: { @@ -569,7 +571,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: `https://graph.facebook.com/${VERSION}/dummyPixelId/events?access_token=09876`, headers: {}, params: {}, body: { @@ -688,7 +690,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: `https://graph.facebook.com/${VERSION}/dummyPixelId/events?access_token=09876`, headers: {}, params: {}, body: { @@ -807,7 +809,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: `https://graph.facebook.com/${VERSION}/dummyPixelId/events?access_token=09876`, headers: {}, params: {}, body: { @@ -927,7 +929,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: `https://graph.facebook.com/${VERSION}/dummyPixelId/events?access_token=09876`, headers: {}, params: {}, body: { @@ -1047,7 +1049,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: `https://graph.facebook.com/${VERSION}/dummyPixelId/events?access_token=09876`, headers: {}, params: {}, body: { @@ -1166,7 +1168,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: `https://graph.facebook.com/${VERSION}/dummyPixelId/events?access_token=09876`, headers: {}, params: {}, body: { @@ -1284,7 +1286,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: `https://graph.facebook.com/${VERSION}/dummyPixelId/events?access_token=09876`, headers: {}, params: {}, body: { @@ -1419,7 +1421,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: `https://graph.facebook.com/${VERSION}/dummyPixelId/events?access_token=09876`, headers: {}, params: {}, body: { @@ -1554,7 +1556,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: `https://graph.facebook.com/${VERSION}/dummyPixelId/events?access_token=09876`, headers: {}, params: {}, body: { @@ -1705,7 +1707,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: `https://graph.facebook.com/${VERSION}/dummyPixelId/events?access_token=09876`, headers: {}, params: {}, body: { @@ -1855,7 +1857,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: `https://graph.facebook.com/${VERSION}/dummyPixelId/events?access_token=09876`, headers: {}, params: {}, body: { @@ -1984,7 +1986,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: `https://graph.facebook.com/${VERSION}/dummyPixelId/events?access_token=09876`, headers: {}, params: {}, body: { @@ -2106,7 +2108,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: `https://graph.facebook.com/${VERSION}/dummyPixelId/events?access_token=09876`, headers: {}, params: {}, body: { @@ -2249,7 +2251,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: `https://graph.facebook.com/${VERSION}/dummyPixelId/events?access_token=09876`, headers: {}, params: {}, body: { @@ -2392,7 +2394,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: `https://graph.facebook.com/${VERSION}/dummyPixelId/events?access_token=09876`, headers: {}, params: {}, body: { @@ -2516,7 +2518,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: `https://graph.facebook.com/${VERSION}/dummyPixelId/events?access_token=09876`, headers: {}, params: {}, body: { @@ -2640,7 +2642,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: `https://graph.facebook.com/${VERSION}/dummyPixelId/events?access_token=09876`, headers: {}, params: {}, body: { @@ -2768,7 +2770,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: `https://graph.facebook.com/${VERSION}/dummyPixelId/events?access_token=09876`, headers: {}, params: {}, body: { @@ -2893,7 +2895,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: `https://graph.facebook.com/${VERSION}/dummyPixelId/events?access_token=09876`, headers: {}, params: {}, body: { @@ -3014,7 +3016,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: `https://graph.facebook.com/${VERSION}/dummyPixelId/events?access_token=09876`, headers: {}, params: {}, body: { @@ -3133,7 +3135,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: `https://graph.facebook.com/${VERSION}/dummyPixelId/events?access_token=09876`, headers: {}, params: {}, body: { @@ -3282,7 +3284,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: `https://graph.facebook.com/${VERSION}/dummyPixelId/events?access_token=09876`, headers: {}, params: {}, body: { @@ -3510,7 +3512,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: `https://graph.facebook.com/${VERSION}/dummyPixelId/events?access_token=09876`, headers: {}, params: {}, body: { @@ -3631,7 +3633,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: `https://graph.facebook.com/${VERSION}/dummyPixelId/events?access_token=09876`, headers: {}, params: {}, body: { @@ -3884,7 +3886,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: `https://graph.facebook.com/${VERSION}/dummyPixelId/events?access_token=09876`, headers: {}, params: {}, body: { @@ -4027,7 +4029,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: `https://graph.facebook.com/${VERSION}/dummyPixelId/events?access_token=09876`, headers: {}, params: {}, body: { @@ -4289,7 +4291,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: `https://graph.facebook.com/${VERSION}/dummyPixelId/events?access_token=09876`, headers: {}, params: {}, body: { @@ -4752,7 +4754,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: `https://graph.facebook.com/${VERSION}/dummyPixelId/events?access_token=09876`, headers: {}, params: {}, body: { @@ -4897,7 +4899,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: `https://graph.facebook.com/${VERSION}/dummyPixelId/events?access_token=09876`, headers: {}, params: {}, body: { @@ -5178,7 +5180,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: `https://graph.facebook.com/${VERSION}/dummyPixelId/events?access_token=09876`, headers: {}, params: {}, body: { @@ -5310,7 +5312,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: `https://graph.facebook.com/${VERSION}/dummyPixelId/events?access_token=09876`, headers: {}, params: {}, body: { @@ -5440,7 +5442,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: `https://graph.facebook.com/${VERSION}/dummyPixelId/events?access_token=09876`, headers: {}, params: {}, body: { @@ -6032,8 +6034,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: - 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=dummyAccessToken', + endpoint: `https://graph.facebook.com/${VERSION}/dummyPixelId/events?access_token=dummyAccessToken`, headers: {}, params: {}, body: { @@ -6181,7 +6182,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: `https://graph.facebook.com/${VERSION}/dummyPixelId/events?access_token=09876`, headers: {}, params: {}, body: { @@ -6306,7 +6307,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: `https://graph.facebook.com/${VERSION}/dummyPixelId/events?access_token=09876`, headers: {}, params: {}, body: { @@ -6437,7 +6438,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: `https://graph.facebook.com/${VERSION}/dummyPixelId/events?access_token=09876`, headers: {}, params: {}, body: { diff --git a/test/integrations/destinations/facebook_pixel/router/data.ts b/test/integrations/destinations/facebook_pixel/router/data.ts index ef6b9f8635..ee2f6968b1 100644 --- a/test/integrations/destinations/facebook_pixel/router/data.ts +++ b/test/integrations/destinations/facebook_pixel/router/data.ts @@ -1,3 +1,5 @@ +import { VERSION } from '../../../../../src/v0/destinations/facebook_pixel/config'; + export const mockFns = (_) => { // @ts-ignore jest.useFakeTimers().setSystemTime(new Date('2023-10-15')); @@ -193,7 +195,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: `https://graph.facebook.com/${VERSION}/dummyPixelId/events?access_token=09876`, headers: {}, params: {}, body: { @@ -254,7 +256,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/dummyPixelId/events?access_token=09876', + endpoint: `https://graph.facebook.com/${VERSION}/dummyPixelId/events?access_token=09876`, headers: {}, params: {}, body: { diff --git a/test/integrations/destinations/fb/dataDelivery/data.ts b/test/integrations/destinations/fb/dataDelivery/data.ts index c50cffee80..f9405ba4b3 100644 --- a/test/integrations/destinations/fb/dataDelivery/data.ts +++ b/test/integrations/destinations/fb/dataDelivery/data.ts @@ -1,357 +1,372 @@ +import { VERSION } from '../../../../../src/v0/destinations/fb/config'; + export const data = [ { - "name": "fb", - "description": "Test 0", - "feature": "dataDelivery", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "event": "CUSTOM_APP_EVENTS", - "advertiser_id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "ud[em]": "48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08", - "ud[fn]": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08", - "ud[ge]": "62c66a7a5dd70c3146618063c344e531e6d4b59e379808443ce962b3abd63c5a", - "ud[ln]": "3547cb112ac4489af2310c0626cdba6f3097a2ad5a3b42ddd3b59c76c7a079a3", - "ud[ph]": "588211a01b10feacbf7988d97a06e86c18af5259a7f457fd8759b7f7409a7d1f", - "extinfo": "[\"a2\",\"\",\"\",\"\",\"8.1.0\",\"Redmi 6\",\"\",\"\",\"Banglalink\",640,480,\"1.23\",0,0,0,\"Europe/Berlin\"]", - "app_user_id": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "custom_events": "[{\"_logTime\":1567333011693,\"_eventName\":\"spin_result\",\"_valueToSum\":400,\"fb_currency\":\"GBP\",\"additional_bet_index\":0,\"battle_id\":\"N/A\",\"bet_amount\":9,\"bet_level\":1,\"bet_multiplier\":1,\"coin_balance\":9466052,\"current_module_name\":\"CasinoGameModule\",\"days_in_game\":0,\"extra_param\":\"N/A\",\"fb_profile\":\"0\",\"featureGameType\":\"N/A\",\"game_fps\":30,\"game_id\":\"fireEagleBase\",\"game_name\":\"FireEagleSlots\",\"gem_balance\":0,\"graphicsQuality\":\"HD\",\"idfa\":\"2bf99787-33d2-4ae2-a76a-c49672f97252\",\"internetReachability\":\"ReachableViaLocalAreaNetwork\",\"isLowEndDevice\":\"False\",\"is_auto_spin\":\"False\",\"is_turbo\":\"False\",\"isf\":\"False\",\"ishighroller\":\"False\",\"jackpot_win_amount\":90,\"jackpot_win_type\":\"Silver\",\"level\":6,\"lifetime_gem_balance\":0,\"no_of_spin\":1,\"player_total_battles\":0,\"player_total_shields\":0,\"start_date\":\"2019-08-01\",\"total_payments\":0,\"tournament_id\":\"T1561970819\",\"userId\":\"c82cbdff-e5be-4009-ac78-cdeea09ab4b1\",\"versionSessionCount\":2,\"win_amount\":0,\"fb_content_id\":[\"123\",\"345\",\"567\"]}]", - "advertiser_tracking_enabled": "0", - "application_tracking_enabled": "0" + name: 'fb', + description: 'Test 0', + feature: 'dataDelivery', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: { + event: 'CUSTOM_APP_EVENTS', + advertiser_id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + 'ud[em]': '48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08', + 'ud[fn]': '9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08', + 'ud[ge]': '62c66a7a5dd70c3146618063c344e531e6d4b59e379808443ce962b3abd63c5a', + 'ud[ln]': '3547cb112ac4489af2310c0626cdba6f3097a2ad5a3b42ddd3b59c76c7a079a3', + 'ud[ph]': '588211a01b10feacbf7988d97a06e86c18af5259a7f457fd8759b7f7409a7d1f', + extinfo: + '["a2","","","","8.1.0","Redmi 6","","","Banglalink",640,480,"1.23",0,0,0,"Europe/Berlin"]', + app_user_id: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + custom_events: + '[{"_logTime":1567333011693,"_eventName":"spin_result","_valueToSum":400,"fb_currency":"GBP","additional_bet_index":0,"battle_id":"N/A","bet_amount":9,"bet_level":1,"bet_multiplier":1,"coin_balance":9466052,"current_module_name":"CasinoGameModule","days_in_game":0,"extra_param":"N/A","fb_profile":"0","featureGameType":"N/A","game_fps":30,"game_id":"fireEagleBase","game_name":"FireEagleSlots","gem_balance":0,"graphicsQuality":"HD","idfa":"2bf99787-33d2-4ae2-a76a-c49672f97252","internetReachability":"ReachableViaLocalAreaNetwork","isLowEndDevice":"False","is_auto_spin":"False","is_turbo":"False","isf":"False","ishighroller":"False","jackpot_win_amount":90,"jackpot_win_type":"Silver","level":6,"lifetime_gem_balance":0,"no_of_spin":1,"player_total_battles":0,"player_total_shields":0,"start_date":"2019-08-01","total_payments":0,"tournament_id":"T1561970819","userId":"c82cbdff-e5be-4009-ac78-cdeea09ab4b1","versionSessionCount":2,"win_amount":0,"fb_content_id":["123","345","567"]}]', + advertiser_tracking_enabled: '0', + application_tracking_enabled: '0', }, - "JSON": {} + JSON: {}, + }, + endpoint: `https://graph.facebook.com/${VERSION}/RudderFbApp/activities?access_token=invalid_access_token`, + files: {}, + headers: { + 'x-forwarded-for': '1.2.3.4', }, - "endpoint": "https://graph.facebook.com/v17.0/RudderFbApp/activities?access_token=invalid_access_token", - "files": {}, - "headers": { - "x-forwarded-for": "1.2.3.4" + method: 'POST', + statusCode: 200, + type: 'REST', + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + version: '1', + params: { + destination: 'fb', }, - "method": "POST", - "statusCode": 200, - "type": "REST", - "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "version": "1", - "params": { - "destination": "fb" - } }, - "method": "POST" - } + method: 'POST', + }, }, - "output": { - "response": { - "status": 400, - "body": { - "output": { - "status": 400, - "message": "Invalid OAuth 2.0 access token", - "destinationResponse": { - "error": { - "message": "The access token could not be decrypted", - "type": "OAuthException", - "code": 190, - "fbtrace_id": "fbpixel_trace_id" + output: { + response: { + status: 400, + body: { + output: { + status: 400, + message: 'Invalid OAuth 2.0 access token', + destinationResponse: { + error: { + message: 'The access token could not be decrypted', + type: 'OAuthException', + code: 190, + fbtrace_id: 'fbpixel_trace_id', }, - "status": 500 + status: 500, }, - "statTags": { - "destType": "FB", - "errorCategory": "network", - "destinationId": "Non-determininable", - "workspaceId": "Non-determininable", - "errorType": "aborted", - "feature": "dataDelivery", - "implementation": "native", - "module": "destination" - } - } - } - } - } + statTags: { + destType: 'FB', + errorCategory: 'network', + destinationId: 'Non-determininable', + workspaceId: 'Non-determininable', + errorType: 'aborted', + feature: 'dataDelivery', + implementation: 'native', + module: 'destination', + }, + }, + }, + }, + }, }, { - "name": "fb", - "description": "Test 1", - "feature": "dataDelivery", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "event": "CUSTOM_APP_EVENTS", - "advertiser_id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "ud[em]": "48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08", - "ud[fn]": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08", - "ud[ge]": "62c66a7a5dd70c3146618063c344e531e6d4b59e379808443ce962b3abd63c5a", - "ud[ln]": "3547cb112ac4489af2310c0626cdba6f3097a2ad5a3b42ddd3b59c76c7a079a3", - "ud[ph]": "588211a01b10feacbf7988d97a06e86c18af5259a7f457fd8759b7f7409a7d1f", - "extinfo": "[\"a2\",\"\",\"\",\"\",\"8.1.0\",\"Redmi 6\",\"\",\"\",\"Banglalink\",640,480,\"1.23\",0,0,0,\"Europe/Berlin\"]", - "app_user_id": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "custom_events": "[{\"_logTime\":1567333011693,\"_eventName\":\"spin_result\",\"_valueToSum\":400,\"fb_currency\":\"GBP\",\"additional_bet_index\":0,\"battle_id\":\"N/A\",\"bet_amount\":9,\"bet_level\":1,\"bet_multiplier\":1,\"coin_balance\":9466052,\"current_module_name\":\"CasinoGameModule\",\"days_in_game\":0,\"extra_param\":\"N/A\",\"fb_profile\":\"0\",\"featureGameType\":\"N/A\",\"game_fps\":30,\"game_id\":\"fireEagleBase\",\"game_name\":\"FireEagleSlots\",\"gem_balance\":0,\"graphicsQuality\":\"HD\",\"idfa\":\"2bf99787-33d2-4ae2-a76a-c49672f97252\",\"internetReachability\":\"ReachableViaLocalAreaNetwork\",\"isLowEndDevice\":\"False\",\"is_auto_spin\":\"False\",\"is_turbo\":\"False\",\"isf\":\"False\",\"ishighroller\":\"False\",\"jackpot_win_amount\":90,\"jackpot_win_type\":\"Silver\",\"level\":6,\"lifetime_gem_balance\":0,\"no_of_spin\":1,\"player_total_battles\":0,\"player_total_shields\":0,\"start_date\":\"2019-08-01\",\"total_payments\":0,\"tournament_id\":\"T1561970819\",\"userId\":\"c82cbdff-e5be-4009-ac78-cdeea09ab4b1\",\"versionSessionCount\":2,\"win_amount\":0,\"fb_content_id\":[\"123\",\"345\",\"567\"]}]", - "advertiser_tracking_enabled": "0", - "application_tracking_enabled": "0" + name: 'fb', + description: 'Test 1', + feature: 'dataDelivery', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: { + event: 'CUSTOM_APP_EVENTS', + advertiser_id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + 'ud[em]': '48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08', + 'ud[fn]': '9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08', + 'ud[ge]': '62c66a7a5dd70c3146618063c344e531e6d4b59e379808443ce962b3abd63c5a', + 'ud[ln]': '3547cb112ac4489af2310c0626cdba6f3097a2ad5a3b42ddd3b59c76c7a079a3', + 'ud[ph]': '588211a01b10feacbf7988d97a06e86c18af5259a7f457fd8759b7f7409a7d1f', + extinfo: + '["a2","","","","8.1.0","Redmi 6","","","Banglalink",640,480,"1.23",0,0,0,"Europe/Berlin"]', + app_user_id: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + custom_events: + '[{"_logTime":1567333011693,"_eventName":"spin_result","_valueToSum":400,"fb_currency":"GBP","additional_bet_index":0,"battle_id":"N/A","bet_amount":9,"bet_level":1,"bet_multiplier":1,"coin_balance":9466052,"current_module_name":"CasinoGameModule","days_in_game":0,"extra_param":"N/A","fb_profile":"0","featureGameType":"N/A","game_fps":30,"game_id":"fireEagleBase","game_name":"FireEagleSlots","gem_balance":0,"graphicsQuality":"HD","idfa":"2bf99787-33d2-4ae2-a76a-c49672f97252","internetReachability":"ReachableViaLocalAreaNetwork","isLowEndDevice":"False","is_auto_spin":"False","is_turbo":"False","isf":"False","ishighroller":"False","jackpot_win_amount":90,"jackpot_win_type":"Silver","level":6,"lifetime_gem_balance":0,"no_of_spin":1,"player_total_battles":0,"player_total_shields":0,"start_date":"2019-08-01","total_payments":0,"tournament_id":"T1561970819","userId":"c82cbdff-e5be-4009-ac78-cdeea09ab4b1","versionSessionCount":2,"win_amount":0,"fb_content_id":["123","345","567"]}]', + advertiser_tracking_enabled: '0', + application_tracking_enabled: '0', }, - "JSON": {} + JSON: {}, }, - "endpoint": "https://graph.facebook.com/v17.0/RudderFbApp/activities?access_token=my_access_token", - "files": {}, - "headers": { - "x-forwarded-for": "1.2.3.4" + endpoint: `https://graph.facebook.com/${VERSION}/RudderFbApp/activities?access_token=my_access_token`, + files: {}, + headers: { + 'x-forwarded-for': '1.2.3.4', + }, + method: 'POST', + statusCode: 200, + type: 'REST', + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + version: '1', + params: { + destination: 'fb', }, - "method": "POST", - "statusCode": 200, - "type": "REST", - "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "version": "1", - "params": { - "destination": "fb" - } }, - "method": "POST" - } + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: { + status: 200, + message: 'Request Processed Successfully', + destinationResponse: { + events_received: 1, + fbtrace_id: 'facebook_trace_id', + }, + }, + }, + }, }, - "output": { - "response": { - "status": 200, - "body": { - "output": { - "status": 200, - "message": "Request Processed Successfully", - "destinationResponse": { - "events_received": 1, - "fbtrace_id": "facebook_trace_id" - } - } - } - } - } }, { - "name": "fb", - "description": "Test 2", - "feature": "dataDelivery", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "event": "CUSTOM_APP_EVENTS", - "advertiser_id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "ud[em]": "48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08", - "ud[fn]": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08", - "ud[ge]": "62c66a7a5dd70c3146618063c344e531e6d4b59e379808443ce962b3abd63c5a", - "ud[ln]": "3547cb112ac4489af2310c0626cdba6f3097a2ad5a3b42ddd3b59c76c7a079a3", - "ud[ph]": "588211a01b10feacbf7988d97a06e86c18af5259a7f457fd8759b7f7409a7d1f", - "extinfo": "[\"a2\",\"\",\"\",\"\",\"8.1.0\",\"Redmi 6\",\"\",\"\",\"Banglalink\",640,480,\"1.23\",0,0,0,\"Europe/Berlin\"]", - "app_user_id": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "custom_events": "[{\"_logTime\":1567333011693,\"_eventName\":\"spin_result\",\"_valueToSum\":400,\"fb_currency\":\"GBP\",\"additional_bet_index\":0,\"battle_id\":\"N/A\",\"bet_amount\":9,\"bet_level\":1,\"bet_multiplier\":1,\"coin_balance\":9466052,\"current_module_name\":\"CasinoGameModule\",\"days_in_game\":0,\"extra_param\":\"N/A\",\"fb_profile\":\"0\",\"featureGameType\":\"N/A\",\"game_fps\":30,\"game_id\":\"fireEagleBase\",\"game_name\":\"FireEagleSlots\",\"gem_balance\":0,\"graphicsQuality\":\"HD\",\"idfa\":\"2bf99787-33d2-4ae2-a76a-c49672f97252\",\"internetReachability\":\"ReachableViaLocalAreaNetwork\",\"isLowEndDevice\":\"False\",\"is_auto_spin\":\"False\",\"is_turbo\":\"False\",\"isf\":\"False\",\"ishighroller\":\"False\",\"jackpot_win_amount\":90,\"jackpot_win_type\":\"Silver\",\"level\":6,\"lifetime_gem_balance\":0,\"no_of_spin\":1,\"player_total_battles\":0,\"player_total_shields\":0,\"start_date\":\"2019-08-01\",\"total_payments\":0,\"tournament_id\":\"T1561970819\",\"userId\":\"c82cbdff-e5be-4009-ac78-cdeea09ab4b1\",\"versionSessionCount\":2,\"win_amount\":0,\"fb_content_id\":[\"123\",\"345\",\"567\"]}]", - "advertiser_tracking_enabled": "0", - "application_tracking_enabled": "0" + name: 'fb', + description: 'Test 2', + feature: 'dataDelivery', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: { + event: 'CUSTOM_APP_EVENTS', + advertiser_id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + 'ud[em]': '48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08', + 'ud[fn]': '9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08', + 'ud[ge]': '62c66a7a5dd70c3146618063c344e531e6d4b59e379808443ce962b3abd63c5a', + 'ud[ln]': '3547cb112ac4489af2310c0626cdba6f3097a2ad5a3b42ddd3b59c76c7a079a3', + 'ud[ph]': '588211a01b10feacbf7988d97a06e86c18af5259a7f457fd8759b7f7409a7d1f', + extinfo: + '["a2","","","","8.1.0","Redmi 6","","","Banglalink",640,480,"1.23",0,0,0,"Europe/Berlin"]', + app_user_id: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + custom_events: + '[{"_logTime":1567333011693,"_eventName":"spin_result","_valueToSum":400,"fb_currency":"GBP","additional_bet_index":0,"battle_id":"N/A","bet_amount":9,"bet_level":1,"bet_multiplier":1,"coin_balance":9466052,"current_module_name":"CasinoGameModule","days_in_game":0,"extra_param":"N/A","fb_profile":"0","featureGameType":"N/A","game_fps":30,"game_id":"fireEagleBase","game_name":"FireEagleSlots","gem_balance":0,"graphicsQuality":"HD","idfa":"2bf99787-33d2-4ae2-a76a-c49672f97252","internetReachability":"ReachableViaLocalAreaNetwork","isLowEndDevice":"False","is_auto_spin":"False","is_turbo":"False","isf":"False","ishighroller":"False","jackpot_win_amount":90,"jackpot_win_type":"Silver","level":6,"lifetime_gem_balance":0,"no_of_spin":1,"player_total_battles":0,"player_total_shields":0,"start_date":"2019-08-01","total_payments":0,"tournament_id":"T1561970819","userId":"c82cbdff-e5be-4009-ac78-cdeea09ab4b1","versionSessionCount":2,"win_amount":0,"fb_content_id":["123","345","567"]}]', + advertiser_tracking_enabled: '0', + application_tracking_enabled: '0', }, - "JSON": {} + JSON: {}, + }, + endpoint: `https://graph.facebook.com/${VERSION}/1234567891234567/events?access_token=invalid_timestamp_correct_access_token`, + files: {}, + headers: { + 'x-forwarded-for': '1.2.3.4', }, - "endpoint": "https://graph.facebook.com/v17.0/1234567891234567/events?access_token=invalid_timestamp_correct_access_token", - "files": {}, - "headers": { - "x-forwarded-for": "1.2.3.4" + method: 'POST', + statusCode: 200, + type: 'REST', + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + version: '1', + params: { + destination: 'fb', }, - "method": "POST", - "statusCode": 200, - "type": "REST", - "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "version": "1", - "params": { - "destination": "fb" - } }, - "method": "POST" - } + method: 'POST', + }, }, - "output": { - "response": { - "status": 400, - "body": { - "output": { - "status": 400, - "message": "Event Timestamp Too Old", - "destinationResponse": { - "error": { - "message": "Invalid parameter", - "type": "OAuthException", - "code": 100, - "error_subcode": 2804003, - "is_transient": false, - "error_user_title": "Event Timestamp Too Old", - "error_user_msg": "The timestamp for this event is too far in the past. Events need to be sent from your server within 7 days of when they occurred. Enter a timestamp that has occurred within the last 7 days.", - "fbtrace_id": "A6UyEgg_HdoiRX9duxcBOjb" + output: { + response: { + status: 400, + body: { + output: { + status: 400, + message: 'Event Timestamp Too Old', + destinationResponse: { + error: { + message: 'Invalid parameter', + type: 'OAuthException', + code: 100, + error_subcode: 2804003, + is_transient: false, + error_user_title: 'Event Timestamp Too Old', + error_user_msg: + 'The timestamp for this event is too far in the past. Events need to be sent from your server within 7 days of when they occurred. Enter a timestamp that has occurred within the last 7 days.', + fbtrace_id: 'A6UyEgg_HdoiRX9duxcBOjb', }, - "status": 400 + status: 400, }, - "statTags": { - "destType": "FB", - "errorCategory": "network", - "destinationId": "Non-determininable", - "workspaceId": "Non-determininable", - "errorType": "aborted", - "feature": "dataDelivery", - "implementation": "native", - "module": "destination" - } - } - } - } - } + statTags: { + destType: 'FB', + errorCategory: 'network', + destinationId: 'Non-determininable', + workspaceId: 'Non-determininable', + errorType: 'aborted', + feature: 'dataDelivery', + implementation: 'native', + module: 'destination', + }, + }, + }, + }, + }, }, { - "name": "fb", - "description": "Test 3", - "feature": "dataDelivery", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://graph.facebook.com/v17.0/1234567891234567/events?access_token=throttled_valid_access_token", - "headers": {}, - "body": { - "JSON": {}, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "extinfo": "[\"a2\",\"\",\"\",\"\",\"8.1.0\",\"Redmi 6\",\"\",\"\",\"Banglalink\",0,100,\"50.00\",0,0,0,\"\"]", - "custom_events": "[{\"_logTime\":1567333011693,\"_eventName\":\"Viewed Screen\",\"fb_description\":\"Main.1233\"}]", - "ud[em]": "48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08", - "advertiser_tracking_enabled": "0", - "application_tracking_enabled": "0", - "event": "CUSTOM_APP_EVENTS" - } + name: 'fb', + description: 'Test 3', + feature: 'dataDelivery', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: `https://graph.facebook.com/${VERSION}/1234567891234567/events?access_token=throttled_valid_access_token`, + headers: {}, + body: { + JSON: {}, + XML: {}, + JSON_ARRAY: {}, + FORM: { + extinfo: + '["a2","","","","8.1.0","Redmi 6","","","Banglalink",0,100,"50.00",0,0,0,""]', + custom_events: + '[{"_logTime":1567333011693,"_eventName":"Viewed Screen","fb_description":"Main.1233"}]', + 'ud[em]': '48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08', + advertiser_tracking_enabled: '0', + application_tracking_enabled: '0', + event: 'CUSTOM_APP_EVENTS', + }, + }, + files: {}, + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + statusCode: 200, + params: { + destination: 'fb', }, - "files": {}, - "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "statusCode": 200, - "params": { - "destination": "fb" - } }, - "method": "POST" - } + method: 'POST', + }, }, - "output": { - "response": { - "status": 429, - "body": { - "output": { - "status": 429, - "message": "API User Too Many Calls", - "destinationResponse": { - "error": { - "message": "User request limit reached", - "type": "OAuthException", - "code": 17, - "fbtrace_id": "facebook_px_trace_id_4" + output: { + response: { + status: 429, + body: { + output: { + status: 429, + message: 'API User Too Many Calls', + destinationResponse: { + error: { + message: 'User request limit reached', + type: 'OAuthException', + code: 17, + fbtrace_id: 'facebook_px_trace_id_4', }, - "status": 500 + status: 500, + }, + statTags: { + destType: 'FB', + errorCategory: 'network', + destinationId: 'Non-determininable', + workspaceId: 'Non-determininable', + errorType: 'throttled', + feature: 'dataDelivery', + implementation: 'native', + module: 'destination', }, - "statTags": { - "destType": "FB", - "errorCategory": "network", - "destinationId": "Non-determininable", - "workspaceId": "Non-determininable", - "errorType": "throttled", - "feature": "dataDelivery", - "implementation": "native", - "module": "destination" - } - } - } - } - } + }, + }, + }, + }, }, { - "name": "fb", - "description": "Test 4", - "feature": "dataDelivery", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://graph.facebook.com/v17.0/1234567891234567/events?access_token=invalid_account_id_valid_access_token", - "headers": {}, - "body": { - "JSON": {}, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "extinfo": "[\"a2\",\"\",\"\",\"\",\"8.1.0\",\"Redmi 6\",\"\",\"\",\"Banglalink\",0,100,\"50.00\",0,0,0,\"\"]", - "custom_events": "[{\"_logTime\":1567333011693,\"_eventName\":\"Viewed Screen\",\"fb_description\":\"Main.1233\"}]", - "ud[em]": "48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08", - "advertiser_tracking_enabled": "0", - "application_tracking_enabled": "0", - "event": "CUSTOM_APP_EVENTS" - } + name: 'fb', + description: 'Test 4', + feature: 'dataDelivery', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: `https://graph.facebook.com/${VERSION}/1234567891234567/events?access_token=invalid_account_id_valid_access_token`, + headers: {}, + body: { + JSON: {}, + XML: {}, + JSON_ARRAY: {}, + FORM: { + extinfo: + '["a2","","","","8.1.0","Redmi 6","","","Banglalink",0,100,"50.00",0,0,0,""]', + custom_events: + '[{"_logTime":1567333011693,"_eventName":"Viewed Screen","fb_description":"Main.1233"}]', + 'ud[em]': '48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08', + advertiser_tracking_enabled: '0', + application_tracking_enabled: '0', + event: 'CUSTOM_APP_EVENTS', + }, + }, + files: {}, + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + statusCode: 200, + params: { + destination: 'fb', }, - "files": {}, - "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "statusCode": 200, - "params": { - "destination": "fb" - } }, - "method": "POST" - } + method: 'POST', + }, }, - "output": { - "response": { - "status": 400, - "body": { - "output": { - "status": 400, - "message": "Object with ID 'PIXEL_ID' / 'DATASET_ID' / 'AUDIENCE_ID' does not exist, cannot be loaded due to missing permissions, or does not support this operation", - "destinationResponse": { - "error": { - "message": "Unsupported post request. Object with ID '1234567891234569' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api", - "type": "GraphMethodException", - "code": 100, - "error_subcode": 33, - "fbtrace_id": "facebook_px_trace_id_5" + output: { + response: { + status: 400, + body: { + output: { + status: 400, + message: + "Object with ID 'PIXEL_ID' / 'DATASET_ID' / 'AUDIENCE_ID' does not exist, cannot be loaded due to missing permissions, or does not support this operation", + destinationResponse: { + error: { + message: + "Unsupported post request. Object with ID '1234567891234569' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api", + type: 'GraphMethodException', + code: 100, + error_subcode: 33, + fbtrace_id: 'facebook_px_trace_id_5', }, - "status": 400 + status: 400, }, - "statTags": { - "destType": "FB", - "errorCategory": "network", - "destinationId": "Non-determininable", - "workspaceId": "Non-determininable", - "errorType": "aborted", - "feature": "dataDelivery", - "implementation": "native", - "module": "destination" - } - } - } - } - } - } -] \ No newline at end of file + statTags: { + destType: 'FB', + errorCategory: 'network', + destinationId: 'Non-determininable', + workspaceId: 'Non-determininable', + errorType: 'aborted', + feature: 'dataDelivery', + implementation: 'native', + module: 'destination', + }, + }, + }, + }, + }, + }, +]; diff --git a/test/integrations/destinations/fb/network.ts b/test/integrations/destinations/fb/network.ts index 07a84a7e66..1a2f114d74 100644 --- a/test/integrations/destinations/fb/network.ts +++ b/test/integrations/destinations/fb/network.ts @@ -2,6 +2,7 @@ import { cloneDeep } from 'lodash'; import { getFormData } from '../../../../src/adapters/network'; import * as fbPixelNw from '../facebook_pixel/network'; import { data } from './dataDelivery/data'; +import { VERSION } from '../../../../src/v0/destinations/fb/config'; const fbPixelTcs = data .filter((_, i) => [2, 3, 4].includes(i)) @@ -19,7 +20,7 @@ const fbPixelTcs = data export const networkCallsData = [ { httpReq: { - url: 'https://graph.facebook.com/v17.0/RudderFbApp/activities?access_token=invalid_access_token', + url: `https://graph.facebook.com/${VERSION}/RudderFbApp/activities?access_token=invalid_access_token`, data: getFormData(data[0].input.request.body.body.FORM).toString(), params: { destination: 'fb' }, headers: { 'User-Agent': 'RudderLabs' }, @@ -39,7 +40,7 @@ export const networkCallsData = [ }, { httpReq: { - url: 'https://graph.facebook.com/v17.0/RudderFbApp/activities?access_token=my_access_token', + url: `https://graph.facebook.com/${VERSION}/RudderFbApp/activities?access_token=my_access_token`, data: getFormData(data[1].input.request.body.body.FORM).toString(), params: { destination: 'fb' }, headers: { 'x-forwarded-for': '1.2.3.4', 'User-Agent': 'RudderLabs' }, diff --git a/test/integrations/destinations/fb/processor/data.ts b/test/integrations/destinations/fb/processor/data.ts index 9b57f3ef78..a437b90855 100644 --- a/test/integrations/destinations/fb/processor/data.ts +++ b/test/integrations/destinations/fb/processor/data.ts @@ -1,3 +1,5 @@ +import { VERSION } from '../../../../../src/v0/destinations/fb/config'; + export const data = [ { name: 'fb', @@ -618,7 +620,7 @@ export const data = [ }, JSON: {}, }, - endpoint: 'https://graph.facebook.com/v17.0/RudderFbApp/activities', + endpoint: `https://graph.facebook.com/${VERSION}/RudderFbApp/activities`, files: {}, headers: { 'x-forwarded-for': '1.2.3.4', @@ -803,7 +805,7 @@ export const data = [ }, JSON: {}, }, - endpoint: 'https://graph.facebook.com/v17.0/RudderFbApp/activities', + endpoint: `https://graph.facebook.com/${VERSION}/RudderFbApp/activities`, files: {}, headers: { 'x-forwarded-for': '1.2.3.4', @@ -893,7 +895,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/RudderFbApp/activities', + endpoint: `https://graph.facebook.com/${VERSION}/RudderFbApp/activities`, headers: {}, params: {}, body: { @@ -993,7 +995,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/RudderFbApp/activities', + endpoint: `https://graph.facebook.com/${VERSION}/RudderFbApp/activities`, headers: {}, params: {}, body: { @@ -1177,7 +1179,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/RudderFbApp/activities', + endpoint: `https://graph.facebook.com/${VERSION}/RudderFbApp/activities`, headers: {}, params: {}, body: { @@ -1277,7 +1279,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/RudderFbApp/activities', + endpoint: `https://graph.facebook.com/${VERSION}/RudderFbApp/activities`, headers: {}, params: {}, body: { @@ -1377,7 +1379,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/RudderFbApp/activities', + endpoint: `https://graph.facebook.com/${VERSION}/RudderFbApp/activities`, headers: {}, params: {}, body: { @@ -1551,7 +1553,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/RudderFbApp/activities', + endpoint: `https://graph.facebook.com/${VERSION}/RudderFbApp/activities`, headers: {}, params: {}, body: { @@ -1731,7 +1733,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/RudderFbApp/activities', + endpoint: `https://graph.facebook.com/${VERSION}/RudderFbApp/activities`, headers: {}, params: {}, body: { @@ -1831,7 +1833,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/RudderFbApp/activities', + endpoint: `https://graph.facebook.com/${VERSION}/RudderFbApp/activities`, headers: { 'x-forwarded-for': '2.3.4.5', }, @@ -2153,7 +2155,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/RudderFbApp/activities', + endpoint: `https://graph.facebook.com/${VERSION}/RudderFbApp/activities`, headers: {}, params: {}, body: { diff --git a/test/integrations/destinations/fb_custom_audience/dataDelivery/data.ts b/test/integrations/destinations/fb_custom_audience/dataDelivery/data.ts index d2220e16da..3066dae887 100644 --- a/test/integrations/destinations/fb_custom_audience/dataDelivery/data.ts +++ b/test/integrations/destinations/fb_custom_audience/dataDelivery/data.ts @@ -1,3 +1,5 @@ +import { getEndPoint } from '../../../../../src/v0/destinations/fb_custom_audience/config'; + export const data = [ { name: 'fb_custom_audience', @@ -11,7 +13,7 @@ export const data = [ version: '1', type: 'REST', method: 'DELETE', - endpoint: 'https://graph.facebook.com/v17.0/aud1/users', + endpoint: getEndPoint('aud1'), headers: { 'test-dest-response-key': 'successResponse', }, @@ -94,7 +96,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/aud1/users', + endpoint: getEndPoint('aud1'), headers: { 'test-dest-response-key': 'permissionMissingError', }, @@ -176,7 +178,7 @@ export const data = [ version: '1', type: 'REST', method: 'DELETE', - endpoint: 'https://graph.facebook.com/v17.0/aud1/users', + endpoint: getEndPoint('aud1'), headers: { 'test-dest-response-key': 'audienceUnavailableError', }, @@ -245,7 +247,7 @@ export const data = [ version: '1', type: 'REST', method: 'DELETE', - endpoint: 'https://graph.facebook.com/v17.0/aud1/users', + endpoint: getEndPoint('aud1'), headers: { 'test-dest-response-key': 'audienceDeletedError', }, @@ -312,7 +314,7 @@ export const data = [ version: '1', type: 'REST', method: 'DELETE', - endpoint: 'https://graph.facebook.com/v17.0/aud1/users', + endpoint: getEndPoint('aud1'), headers: { 'test-dest-response-key': 'failedToUpdateAudienceError', }, @@ -380,7 +382,7 @@ export const data = [ version: '1', type: 'REST', method: 'DELETE', - endpoint: 'https://graph.facebook.com/v17.0/aud1/users', + endpoint: getEndPoint('aud1'), headers: { 'test-dest-response-key': 'parameterExceededError', }, @@ -447,7 +449,7 @@ export const data = [ version: '1', type: 'REST', method: 'DELETE', - endpoint: 'https://graph.facebook.com/v17.0/aud1/users', + endpoint: getEndPoint('aud1'), headers: { 'test-dest-response-key': 'tooManyCallsError', }, @@ -514,7 +516,7 @@ export const data = [ version: '1', type: 'REST', method: 'DELETE', - endpoint: 'https://graph.facebook.com/v17.0/aud1/users', + endpoint: getEndPoint('aud1'), headers: { 'test-dest-response-key': 'code200PermissionError', }, diff --git a/test/integrations/destinations/fb_custom_audience/network.ts b/test/integrations/destinations/fb_custom_audience/network.ts index 7dd904fdd9..bbdc1ffc28 100644 --- a/test/integrations/destinations/fb_custom_audience/network.ts +++ b/test/integrations/destinations/fb_custom_audience/network.ts @@ -1,10 +1,12 @@ +import { getEndPoint } from '../../../../src/v0/destinations/fb_custom_audience/config'; + export const networkCallsData = [ { httpReq: { version: '1', type: 'REST', method: 'DELETE', - endpoint: 'https://graph.facebook.com/v17.0/aud1/users', + endpoint: getEndPoint('aud1'), headers: { 'test-dest-response-key': 'successResponse', }, @@ -70,7 +72,7 @@ export const networkCallsData = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/aud1/users', + endpoint: getEndPoint('aud1'), headers: { 'test-dest-response-key': 'permissionMissingError', }, @@ -111,7 +113,7 @@ export const networkCallsData = [ version: '1', type: 'REST', method: 'DELETE', - endpoint: 'https://graph.facebook.com/v17.0/aud1/users', + endpoint: getEndPoint('aud1'), headers: { 'test-dest-response-key': 'audienceUnavailableError', }, @@ -152,7 +154,7 @@ export const networkCallsData = [ version: '1', type: 'REST', method: 'DELETE', - endpoint: 'https://graph.facebook.com/v17.0/aud1/users', + endpoint: getEndPoint('aud1'), headers: { 'test-dest-response-key': 'audienceDeletedError', }, @@ -218,7 +220,7 @@ export const networkCallsData = [ version: '1', type: 'REST', method: 'DELETE', - endpoint: 'https://graph.facebook.com/v17.0/aud1/users', + endpoint: getEndPoint('aud1'), headers: { 'test-dest-response-key': 'failedToUpdateAudienceError', }, @@ -284,7 +286,7 @@ export const networkCallsData = [ version: '1', type: 'REST', method: 'DELETE', - endpoint: 'https://graph.facebook.com/v17.0/aud1/users', + endpoint: getEndPoint('aud1'), headers: { 'test-dest-response-key': 'parameterExceededError', }, @@ -350,7 +352,7 @@ export const networkCallsData = [ version: '1', type: 'REST', method: 'DELETE', - endpoint: 'https://graph.facebook.com/v17.0/aud1/users', + endpoint: getEndPoint('aud1'), headers: { 'test-dest-response-key': 'tooManyCallsError', }, @@ -416,7 +418,7 @@ export const networkCallsData = [ version: '1', type: 'REST', method: 'DELETE', - endpoint: 'https://graph.facebook.com/v17.0/aud1/users', + endpoint: getEndPoint('aud1'), headers: { 'test-dest-response-key': 'code200PermissionError', }, diff --git a/test/integrations/destinations/fb_custom_audience/processor/data.ts b/test/integrations/destinations/fb_custom_audience/processor/data.ts index 17dcda3a98..4f892f6fef 100644 --- a/test/integrations/destinations/fb_custom_audience/processor/data.ts +++ b/test/integrations/destinations/fb_custom_audience/processor/data.ts @@ -1,3 +1,5 @@ +import { getEndPoint } from '../../../../../src/v0/destinations/fb_custom_audience/config'; + export const data = [ { name: 'fb_custom_audience', @@ -552,7 +554,7 @@ export const data = [ version: '1', type: 'REST', method: 'DELETE', - endpoint: 'https://graph.facebook.com/v17.0/aud1/users', + endpoint: getEndPoint('aud1'), headers: {}, params: { access_token: 'ABC', @@ -607,7 +609,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/aud1/users', + endpoint: getEndPoint('aud1'), headers: {}, params: { access_token: 'ABC', @@ -763,7 +765,7 @@ export const data = [ version: '1', type: 'REST', method: 'DELETE', - endpoint: 'https://graph.facebook.com/v17.0/aud1/users', + endpoint: getEndPoint('aud1'), headers: {}, params: { access_token: 'ABC', @@ -818,7 +820,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/aud1/users', + endpoint: getEndPoint('aud1'), headers: {}, userId: '', params: { @@ -963,7 +965,7 @@ export const data = [ version: '1', type: 'REST', method: 'DELETE', - endpoint: 'https://graph.facebook.com/v17.0/aud1/users', + endpoint: getEndPoint('aud1'), headers: {}, params: { access_token: 'ABC', @@ -993,7 +995,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/aud1/users', + endpoint: getEndPoint('aud1'), headers: {}, params: { access_token: 'ABC', @@ -1123,7 +1125,7 @@ export const data = [ version: '1', type: 'REST', method: 'DELETE', - endpoint: 'https://graph.facebook.com/v17.0/aud1/users', + endpoint: getEndPoint('aud1'), headers: {}, params: { access_token: 'ABC', @@ -1179,7 +1181,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/aud1/users', + endpoint: getEndPoint('aud1'), headers: {}, params: { access_token: 'ABC', @@ -1336,7 +1338,7 @@ export const data = [ version: '1', type: 'REST', method: 'DELETE', - endpoint: 'https://graph.facebook.com/v17.0/aud1/users', + endpoint: getEndPoint('aud1'), headers: {}, userId: '', params: { @@ -1391,7 +1393,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/aud1/users', + endpoint: getEndPoint('aud1'), headers: {}, params: { access_token: 'ABC', @@ -1547,7 +1549,7 @@ export const data = [ version: '1', type: 'REST', method: 'DELETE', - endpoint: 'https://graph.facebook.com/v17.0/aud1/users', + endpoint: getEndPoint('aud1'), headers: {}, params: { access_token: 'ABC', @@ -1602,7 +1604,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/aud1/users', + endpoint: getEndPoint('aud1'), headers: {}, params: { access_token: 'ABC', @@ -1758,7 +1760,7 @@ export const data = [ version: '1', type: 'REST', method: 'DELETE', - endpoint: 'https://graph.facebook.com/v17.0/aud1/users', + endpoint: getEndPoint('aud1'), headers: {}, userId: '', params: { @@ -1813,7 +1815,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/aud1/users', + endpoint: getEndPoint('aud1'), headers: {}, userId: '', params: { @@ -1955,7 +1957,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/aud1/users', + endpoint: getEndPoint('aud1'), headers: {}, userId: '', params: { @@ -2097,7 +2099,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/aud1/users', + endpoint: getEndPoint('aud1'), headers: {}, userId: '', params: { @@ -2226,7 +2228,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/aud1/users', + endpoint: getEndPoint('aud1'), headers: {}, params: { access_token: 'ABC', @@ -28302,7 +28304,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/aud1/users', + endpoint: getEndPoint('aud1'), headers: {}, params: { access_token: 'ABC', @@ -34844,7 +34846,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/aud1/users', + endpoint: getEndPoint('aud1'), headers: {}, params: { access_token: 'ABC', @@ -41386,7 +41388,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/aud1/users', + endpoint: getEndPoint('aud1'), headers: {}, params: { access_token: 'ABC', @@ -47902,7 +47904,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/aud1/users', + endpoint: getEndPoint('aud1'), headers: {}, params: { access_token: 'ABC', diff --git a/test/integrations/destinations/fb_custom_audience/router/data.ts b/test/integrations/destinations/fb_custom_audience/router/data.ts index c458b45c91..efefb80a89 100644 --- a/test/integrations/destinations/fb_custom_audience/router/data.ts +++ b/test/integrations/destinations/fb_custom_audience/router/data.ts @@ -1,3 +1,5 @@ +import { getEndPoint } from '../../../../../src/v0/destinations/fb_custom_audience/config'; + export const data = [ { name: 'fb_custom_audience', @@ -189,7 +191,7 @@ export const data = [ version: '1', type: 'REST', method: 'DELETE', - endpoint: 'https://graph.facebook.com/v17.0/aud1/users', + endpoint: getEndPoint('aud1'), headers: {}, params: { access_token: 'ABC', @@ -241,7 +243,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/aud1/users', + endpoint: getEndPoint('aud1'), headers: {}, params: { access_token: 'ABC', @@ -332,7 +334,7 @@ export const data = [ version: '1', type: 'REST', method: 'DELETE', - endpoint: 'https://graph.facebook.com/v17.0/aud1/users', + endpoint: getEndPoint('aud1'), headers: {}, params: { access_token: 'ABC', @@ -383,7 +385,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/aud1/users', + endpoint: getEndPoint('aud1'), headers: {}, params: { access_token: 'ABC', @@ -26748,7 +26750,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/23848494844100489/users', + endpoint: getEndPoint('23848494844100489'), headers: {}, params: { access_token: 'ABC', @@ -26874,7 +26876,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/aud1/users', + endpoint: getEndPoint('aud1'), headers: {}, params: { access_token: 'ABC', @@ -33409,7 +33411,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/aud1/users', + endpoint: getEndPoint('aud1'), headers: {}, params: { access_token: 'ABC', @@ -39944,7 +39946,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/aud1/users', + endpoint: getEndPoint('aud1'), headers: {}, params: { access_token: 'ABC', @@ -46453,7 +46455,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v17.0/aud1/users', + endpoint: getEndPoint('aud1'), headers: {}, params: { access_token: 'ABC', From 4bde43509c60d17001fc45bec405f9598776b966 Mon Sep 17 00:00:00 2001 From: Yashasvi Bajpai <33063622+yashasvibajpai@users.noreply.github.com> Date: Wed, 29 Nov 2023 19:11:13 +0530 Subject: [PATCH 032/135] chore: update PR template (#2851) --- .github/pull_request_template.md | 57 ++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .github/pull_request_template.md diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000000..5b716b7e9f --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,57 @@ +## What are the changes introduced in this PR? + +Write a brief explainer on your code changes. + +## Please explain the objectives of your changes below + +Put down any required details on the broader aspect of your changes. If there are any dependent changes, **mandatorily** mention them here + +### Type of change + +If the pull request is a **bug-fix**, **enhancement** or a **refactor**, please fill in the details on the changes made. + +- Existing capabilities/behavior + +- New capabilities/behavior + +If the pull request is a **new feature**, + +### Any technical or performance related pointers to consider with the change? + +N/A + +### Any new dependencies introduced with this change? + +N/A + +### Any new generic utility introduced or modified. Please explain the changes. + +N/A + +### If the PR has changes in more than 10 files, please mention why the changes were not split into multiple PRs. + +N/A + +### If multiple linear tasks are associated with the PR changes, please elaborate on the reason: + +N/A + +
+ +### Developer checklist + +- [ ] **No breaking changes are being introduced.** + +- [ ] Are all related docs linked with the PR? + +- [ ] Are all changes manually tested? + +- [ ] Does this change require any documentation changes? + +- [ ] Are relevant unit and component test-cases added? + +### Reviewer checklist + +- [ ] Is the type of change in the PR title appropriate as per the changes? + +- [ ] Verified that there are no credentials or confidential data exposed with the changes. From 0e7adc66ff88d9510e48a5651460b4e02cc57c78 Mon Sep 17 00:00:00 2001 From: Sankeerth Date: Wed, 29 Nov 2023 21:57:25 +0530 Subject: [PATCH 033/135] fix: bugsnag issue in moengage identify event (#2845) --- src/v0/destinations/moengage/transform.js | 2 +- .../destinations/moengage/processor/data.ts | 101 ++++++++++++++++++ 2 files changed, 102 insertions(+), 1 deletion(-) diff --git a/src/v0/destinations/moengage/transform.js b/src/v0/destinations/moengage/transform.js index ea7db24406..8a16d9c7a7 100644 --- a/src/v0/destinations/moengage/transform.js +++ b/src/v0/destinations/moengage/transform.js @@ -119,7 +119,7 @@ const processEvent = (message, destination) => { response = responseBuilderSimple(message, category, destination); // only if device information is present device info will be added/updated // with an identify call otherwise only user info will be added/updated - if (message.context.device && message.context.device.type && message.context.device.token) { + if (message?.context?.device?.type && message?.context?.device?.token) { // build the response response = [ // user api payload (output for identify) diff --git a/test/integrations/destinations/moengage/processor/data.ts b/test/integrations/destinations/moengage/processor/data.ts index 50b0361381..1ce8705f53 100644 --- a/test/integrations/destinations/moengage/processor/data.ts +++ b/test/integrations/destinations/moengage/processor/data.ts @@ -2777,4 +2777,105 @@ export const data = [ }, }, }, + { + name: 'moengage', + description: + 'when identify is sent without context, the event should not throw internal server error', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'identify', + event: 'identify', + sentAt: '2023-11-22T03:42:40.346Z', + userId: 'userId16', + channel: 'mobile', + rudderId: 'dummy-rudderId', + timestamp: '2023-11-22T03:42:31.470Z', + receivedAt: '2023-11-22T03:42:43.281Z', + request_ip: '114.122.233.48', + anonymousId: 'anon-dummyId-1', + integrations: { + All: true, + }, + originalTimestamp: '2023-11-22T03:42:28.535Z', + }, + destination: { + ID: '1iuTZs6eEZVMm6GjRBe6bNShaL3', + Name: 'MoEngage Testing', + DestinationDefinition: { + ID: '1iu4802Tx27kNC4KNYYou6D8jzL', + Name: 'MOENGAGE', + DisplayName: 'MoEngage', + Config: { + destConfig: { defaultConfig: ['apiId', 'apiKey', 'region'] }, + excludeKeys: [], + includeKeys: [], + supportedSourceTypes: [ + 'android', + 'ios', + 'web', + 'unity', + 'amp', + 'cloud', + 'reactnative', + ], + }, + }, + Config: { + apiId: 'W0ZHNMPI2O4KHJ48ZILZACRA', + apiKey: 'dummyApiKey', + eventDelivery: false, + eventDeliveryTS: 1602757086384, + region: 'US', + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + FORM: {}, + JSON: { + attributes: {}, + customer_id: 'userId16', + type: 'customer', + }, + JSON_ARRAY: {}, + XML: {}, + }, + endpoint: 'https://api-01.moengage.com/v1/customer/W0ZHNMPI2O4KHJ48ZILZACRA', + files: {}, + headers: { + Authorization: 'Basic VzBaSE5NUEkyTzRLSEo0OFpJTFpBQ1JBOmR1bW15QXBpS2V5', + 'Content-Type': 'application/json', + 'MOE-APPKEY': 'W0ZHNMPI2O4KHJ48ZILZACRA', + }, + method: 'POST', + params: {}, + type: 'REST', + userId: 'anon-dummyId-1', + version: '1', + }, + statusCode: 200, + }, + ], + }, + }, + }, ]; From 27f0797c6dcd626a713c11a48c6e85a69e0a4963 Mon Sep 17 00:00:00 2001 From: AASHISH MALIK Date: Thu, 30 Nov 2023 11:15:22 +0530 Subject: [PATCH 034/135] feat: cm360 transformerproxy V1 flag (#2848) * feat: cm360 transformerproxy, V1 features.json update * feat: add support for both v0,v1 in handler for old server support * fix: addressed comments * chore: added tests for V1 too --- src/adapters/networkHandlerFactory.js | 18 +- src/adapters/networkHandlerFactory.test.js | 25 + src/controllers/delivery.ts | 8 +- src/features.json | 3 +- src/interfaces/DestinationService.ts | 1 + src/routes/utils/constants.js | 6 +- src/services/comparator.ts | 2 + src/services/destination/nativeIntegration.ts | 3 +- .../campaign_manager/networkHandler.js | 117 ++++ .../data/campaign_manager_proxy_input.json | 96 --- .../data/campaign_manager_proxy_output.json | 51 -- .../campaign_manager/dataDelivery/data.ts | 604 ++++++++++++++++++ .../destinations/campaign_manager/network.ts | 311 +++++++++ 13 files changed, 1089 insertions(+), 156 deletions(-) create mode 100644 src/adapters/networkHandlerFactory.test.js create mode 100644 src/v1/destinations/campaign_manager/networkHandler.js delete mode 100644 test/__tests__/data/campaign_manager_proxy_input.json delete mode 100644 test/__tests__/data/campaign_manager_proxy_output.json create mode 100644 test/integrations/destinations/campaign_manager/dataDelivery/data.ts create mode 100644 test/integrations/destinations/campaign_manager/network.ts diff --git a/src/adapters/networkHandlerFactory.js b/src/adapters/networkHandlerFactory.js index 7cfa4b048e..f4940553f5 100644 --- a/src/adapters/networkHandlerFactory.js +++ b/src/adapters/networkHandlerFactory.js @@ -8,6 +8,8 @@ const { getIntegrations } = require('../routes/utils'); const handlers = { generic: GenericNetworkHandler, + v0: {}, + v1: {}, }; // Dynamically import the network handlers for all @@ -16,7 +18,17 @@ SUPPORTED_VERSIONS.forEach((version) => { const destinations = getIntegrations(path.resolve(__dirname, `../${version}/destinations`)); destinations.forEach((dest) => { try { - handlers[dest] = require(`../${version}/destinations/${dest}/networkHandler`).networkHandler; + // handles = { + // v0: { + // dest: handler + // }, + // v1: { + // dest: handler + // }, + // generic: GenericNetworkHandler, + // } + handlers[version][dest] = + require(`../${version}/destinations/${dest}/networkHandler`).networkHandler; } catch { // Do nothing as exception indicates // network handler is not defined for that destination @@ -24,8 +36,8 @@ SUPPORTED_VERSIONS.forEach((version) => { }); }); -const getNetworkHandler = (type) => { - const NetworkHandler = handlers[type] || handlers.generic; +const getNetworkHandler = (type, version) => { + const NetworkHandler = handlers[version][type] || handlers.generic; return new NetworkHandler(); }; diff --git a/src/adapters/networkHandlerFactory.test.js b/src/adapters/networkHandlerFactory.test.js new file mode 100644 index 0000000000..c4713e66a8 --- /dev/null +++ b/src/adapters/networkHandlerFactory.test.js @@ -0,0 +1,25 @@ +const { getNetworkHandler } = require('./networkHandlerFactory'); +const { networkHandler: GenericNetworkHandler } = require('./networkhandler/genericNetworkHandler'); + +describe(`Network Handler Tests`, () => { + it('Should return v0 networkhandler', () => { + let proxyHandler = getNetworkHandler('campaign_manager', `v0`); + const cmProxy = require(`../v0/destinations/campaign_manager/networkHandler`).networkHandler; + expect(proxyHandler).toEqual(new cmProxy()); + + proxyHandler = getNetworkHandler('braze', `v0`); + const brazeProxy = require(`../v0/destinations/braze/networkHandler`).networkHandler; + expect(proxyHandler).toEqual(new brazeProxy()); + }); + + it('Should return v1 networkhandler', () => { + let proxyHandler = getNetworkHandler('campaign_manager', `v1`); + const cmProxy = require(`../v1/destinations/campaign_manager/networkHandler`).networkHandler; + expect(proxyHandler).toEqual(new cmProxy()); + }); + + it('Should return genericHandler if v1 proxy and handler is not present for destination', () => { + let proxyHandler = getNetworkHandler('braze', `v1`); + expect(proxyHandler).toEqual(new GenericNetworkHandler()); + }); +}); diff --git a/src/controllers/delivery.ts b/src/controllers/delivery.ts index af94764d46..3ccc241b87 100644 --- a/src/controllers/delivery.ts +++ b/src/controllers/delivery.ts @@ -16,9 +16,15 @@ export class DeliveryController { const requestMetadata = MiscService.getRequestMetadata(ctx); const event = ctx.request.body as ProcessorTransformationOutput; const { destination }: { destination: string } = ctx.params; + const { version }: { version: string } = ctx.params; const integrationService = ServiceSelector.getNativeDestinationService(); try { - deliveryResponse = await integrationService.deliver(event, destination, requestMetadata); + deliveryResponse = await integrationService.deliver( + event, + destination, + requestMetadata, + version, + ); } catch (error: any) { const metaTO = integrationService.getTags( destination, diff --git a/src/features.json b/src/features.json index 224968c99b..23c01c3731 100644 --- a/src/features.json +++ b/src/features.json @@ -64,5 +64,6 @@ "ONE_SIGNAL": true, "TIKTOK_AUDIENCE": true }, - "supportSourceTransformV1": true + "supportSourceTransformV1": true, + "transformerProxyV1": true } diff --git a/src/interfaces/DestinationService.ts b/src/interfaces/DestinationService.ts index b27f98da2a..16f6b9349c 100644 --- a/src/interfaces/DestinationService.ts +++ b/src/interfaces/DestinationService.ts @@ -47,6 +47,7 @@ export interface DestinationService { event: ProcessorTransformationOutput, destinationType: string, requestMetadata: NonNullable, + version: string, ): Promise; processUserDeletion( diff --git a/src/routes/utils/constants.js b/src/routes/utils/constants.js index f074db6c62..ccec8e54dd 100644 --- a/src/routes/utils/constants.js +++ b/src/routes/utils/constants.js @@ -1,4 +1,4 @@ -const SUPPORTED_VERSIONS = ['v0']; +const SUPPORTED_VERSIONS = ['v0', 'v1']; const API_VERSION = '2'; const INTEGRATION_SERVICE = { COMPARATOR: 'comparator', @@ -7,8 +7,8 @@ const INTEGRATION_SERVICE = { NATIVE_DEST: 'native_dest', NATIVE_SOURCE: 'native_source', }; -const CHANNELS= { - sources: 'sources' +const CHANNELS = { + sources: 'sources', }; const RETL_TIMESTAMP = 'timestamp'; diff --git a/src/services/comparator.ts b/src/services/comparator.ts index 7f63da9402..58c96beabb 100644 --- a/src/services/comparator.ts +++ b/src/services/comparator.ts @@ -368,11 +368,13 @@ export class ComparatorService implements DestinationService { event: ProcessorTransformationOutput, destinationType: string, requestMetadata: NonNullable, + version: string, ): Promise { const primaryResplist = await this.primaryService.deliver( event, destinationType, requestMetadata, + version, ); logger.error('[LIVE_COMPARE_TEST] not implemented for delivery routine'); diff --git a/src/services/destination/nativeIntegration.ts b/src/services/destination/nativeIntegration.ts index 6763f54c7e..510fa80362 100644 --- a/src/services/destination/nativeIntegration.ts +++ b/src/services/destination/nativeIntegration.ts @@ -172,9 +172,10 @@ export class NativeIntegrationDestinationService implements DestinationService { destinationRequest: ProcessorTransformationOutput, destinationType: string, _requestMetadata: NonNullable, + version: string, ): Promise { try { - const networkHandler = networkHandlerFactory.getNetworkHandler(destinationType); + const networkHandler = networkHandlerFactory.getNetworkHandler(destinationType, version); const rawProxyResponse = await networkHandler.proxy(destinationRequest, destinationType); const processedProxyResponse = networkHandler.processAxiosResponse(rawProxyResponse); return networkHandler.responseHandler( diff --git a/src/v1/destinations/campaign_manager/networkHandler.js b/src/v1/destinations/campaign_manager/networkHandler.js new file mode 100644 index 0000000000..b3b82c8cf3 --- /dev/null +++ b/src/v1/destinations/campaign_manager/networkHandler.js @@ -0,0 +1,117 @@ +/* eslint-disable no-param-reassign */ +/* eslint-disable no-restricted-syntax */ +const { NetworkError } = require('@rudderstack/integrations-lib'); +const { prepareProxyRequest, proxyRequest } = require('../../../adapters/network'); +const { isHttpStatusSuccess, getAuthErrCategoryFromStCode } = require('../../../v0/util/index'); + +const { + processAxiosResponse, + getDynamicErrorType, +} = require('../../../adapters/utils/networkUtils'); +const tags = require('../../../v0/util/tags'); + +function isEventRetryableAndExtractErrMsg(element, proxyOutputObj) { + let isRetryable = false; + let errorMsg = ''; + // success event + if (!element.errors) { + return isRetryable; + } + for (const err of element.errors) { + errorMsg += `${err.message}, `; + if (err.code === 'INTERNAL') { + isRetryable = true; + } + } + if (errorMsg) { + proxyOutputObj.error = errorMsg; + } + return isRetryable; +} + +function isEventAbortableAndExtractErrMsg(element, proxyOutputObj) { + let isAbortable = false; + let errorMsg = ''; + // success event + if (!element.errors) { + return isAbortable; + } + for (const err of element.errors) { + errorMsg += `${err.message}, `; + // if code is any of these, event is not retryable + if ( + err.code === 'PERMISSION_DENIED' || + err.code === 'INVALID_ARGUMENT' || + err.code === 'NOT_FOUND' + ) { + isAbortable = true; + } + } + if (errorMsg) { + proxyOutputObj.error = errorMsg; + } + return isAbortable; +} + +const responseHandler = (destinationResponse) => { + const message = `[CAMPAIGN_MANAGER Response V1 Handler] - Request Processed Successfully`; + const responseWithIndividualEvents = []; + const { response, status, rudderJobMetadata } = destinationResponse; + + if (isHttpStatusSuccess(status)) { + // check for Partial Event failures and Successes + const destPartialStatus = response.status; + + for (const [idx, element] of destPartialStatus.entries()) { + const proxyOutputObj = { + statusCode: 200, + metadata: rudderJobMetadata[idx], + error: 'success', + }; + // update status of partial event as per retriable or abortable + if (isEventRetryableAndExtractErrMsg(element, proxyOutputObj)) { + proxyOutputObj.statusCode = 500; + } else if (isEventAbortableAndExtractErrMsg(element, proxyOutputObj)) { + proxyOutputObj.statusCode = 400; + } + responseWithIndividualEvents.push(proxyOutputObj); + } + + return { + status, + message, + destinationResponse, + response: responseWithIndividualEvents, + }; + } + + // in case of failure status, populate response to maintain len(metadata)=len(response) + const errorMessage = response.error?.message || 'unknown error format'; + for (const metadata of rudderJobMetadata) { + responseWithIndividualEvents.push({ + statusCode: 500, + metadata, + error: errorMessage, + }); + } + + throw new NetworkError( + `Campaign Manager: Error transformer proxy v1 during CAMPAIGN_MANAGER response transformation`, + 500, + { + [tags.TAG_NAMES.ERROR_TYPE]: getDynamicErrorType(status), + }, + destinationResponse, + getAuthErrCategoryFromStCode(status), + responseWithIndividualEvents, + ); +}; + +function networkHandler() { + this.prepareProxy = prepareProxyRequest; + this.proxy = proxyRequest; + this.processAxiosResponse = processAxiosResponse; + this.responseHandler = responseHandler; +} + +module.exports = { networkHandler }; diff --git a/test/__tests__/data/campaign_manager_proxy_input.json b/test/__tests__/data/campaign_manager_proxy_input.json deleted file mode 100644 index e7bf369d0c..0000000000 --- a/test/__tests__/data/campaign_manager_proxy_input.json +++ /dev/null @@ -1,96 +0,0 @@ -[ - { - "request": { - "body": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://dfareporting.googleapis.com/dfareporting/v4/userprofiles/437689/conversions/batchupdate", - "headers": { - "Authorization": "Bearer dummyApiKey", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "kind": "dfareporting#conversionsBatchInsertRequest", - "encryptionInfo": { - "kind": "dfareporting#encryptionInfo", - "encryptionSource": "AD_SERVING", - "encryptionEntityId": "3564523", - "encryptionEntityType": "DCM_ACCOUNT" - }, - "conversions": [ - { - "timestampMicros": "1668624722000000", - "floodlightConfigurationId": "213123123", - "ordinal": "string", - "floodlightActivityId": "456543345245", - "mobileDeviceId": "string", - "value": 7, - "encryptedUserIdCandidates": ["dfghjbnm"], - "gclid": "string", - "matchId": "string", - "dclid": "string", - "impressionId": "string", - "limitAdTracking": true, - "childDirectedTreatment": true - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - } - }, - { - "request": { - "body": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://dfareporting.googleapis.com/dfareporting/v4/userprofiles/437689/conversions/batchupdate", - "headers": { - "Authorization": "Bearer dummyApiKey", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "kind": "dfareporting#conversionsBatchUpdateRequest", - "encryptionInfo": { - "kind": "dfareporting#encryptionInfo", - "encryptionSource": "AD_SERVING", - "encryptionEntityId": "3564523", - "encryptionEntityType": "DCM_ACCOUNT" - }, - "conversions": [ - { - "timestampMicros": "1668624722000000", - "floodlightConfigurationId": "213123123", - "ordinal": "string", - "floodlightActivityId": "456543345245", - "mobileDeviceId": "string", - "value": 7, - "encryptedUserIdCandidates": ["dfghjbnm"], - "gclid": "string", - "matchId": "string", - "dclid": "string", - "impressionId": "string", - "limitAdTracking": true, - "childDirectedTreatment": true - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - } - } -] diff --git a/test/__tests__/data/campaign_manager_proxy_output.json b/test/__tests__/data/campaign_manager_proxy_output.json deleted file mode 100644 index c5dcc4559f..0000000000 --- a/test/__tests__/data/campaign_manager_proxy_output.json +++ /dev/null @@ -1,51 +0,0 @@ -[ - { - "output": { - "destinationResponse": { - "error": { - "code": 403, - "message": "The caller does not have permission", - "errors": [ - { - "message": "Invalid Credentials", - "domain": "global", - "reason": "authError", - "location": "Authorization", - "locationType": "header" - } - ], - "status": "PERMISSION_DENIED" - } - }, - "message": "Campaign Manager: Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project. during CAMPAIGN_MANAGER response transformation", - "statTags": { - "destType": "CAMPAIGN_MANAGER", - "errorAt": "proxy", - "scope": "exception", - "stage": "responseTransform" - }, - "status": 403 - } - }, - { - "output": { - "status": 200, - "message": "[CAMPAIGN_MANAGER Response Handler] - Request Processed Successfully", - "destinationResponse": { - "response": [ - { - "adjustmentType": "ENHANCEMENT", - "conversionAction": "customers/7693729833/conversionActions/874224905", - "adjustmentDateTime": "2021-01-01 12:32:45-08:00", - "gclidDateTimePair": { - "gclid": "1234", - "conversionDateTime": "2021-01-01 12:32:45-08:00" - }, - "orderId": "12345" - } - ], - "status": 200 - } - } - } -] diff --git a/test/integrations/destinations/campaign_manager/dataDelivery/data.ts b/test/integrations/destinations/campaign_manager/dataDelivery/data.ts new file mode 100644 index 0000000000..f2a7654e3c --- /dev/null +++ b/test/integrations/destinations/campaign_manager/dataDelivery/data.ts @@ -0,0 +1,604 @@ +export const data = [ + { + name: 'campaign_manager', + description: 'Sucess insert request', + feature: 'dataDelivery', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://dfareporting.googleapis.com/dfareporting/v4/userprofiles/437689/conversions/batchinsert', + headers: { + Authorization: 'Bearer dummyApiKey', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + kind: 'dfareporting#conversionsBatchInsertRequest', + encryptionInfo: { + kind: 'dfareporting#encryptionInfo', + encryptionSource: 'AD_SERVING', + encryptionEntityId: '3564523', + encryptionEntityType: 'DCM_ACCOUNT', + }, + conversions: [ + { + timestampMicros: '1668624722000000', + floodlightConfigurationId: '213123123', + ordinal: '1', + floodlightActivityId: '456543345245', + value: 7, + gclid: '123', + limitAdTracking: true, + childDirectedTreatment: true, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: { + status: 200, + message: '[CAMPAIGN_MANAGER Response Handler] - Request Processed Successfully', + destinationResponse: { + response: { + hasFailures: false, + status: [ + { + conversion: { + timestampMicros: '1668624722000000', + floodlightConfigurationId: '213123123', + ordinal: '1', + floodlightActivityId: '456543345245', + value: 7, + gclid: '123', + limitAdTracking: true, + childDirectedTreatment: true, + }, + kind: 'dfareporting#conversionStatus', + }, + ], + kind: 'dfareporting#conversionsBatchInsertResponse', + }, + status: 200, + }, + }, + }, + }, + }, + }, + { + name: 'campaign_manager', + description: 'Failure insert request', + feature: 'dataDelivery', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://dfareporting.googleapis.com/dfareporting/v4/userprofiles/437690/conversions/batchinsert', + headers: { + Authorization: 'Bearer dummyApiKey', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + kind: 'dfareporting#conversionsBatchInsertRequest', + encryptionInfo: { + kind: 'dfareporting#encryptionInfo', + encryptionSource: 'AD_SERVING', + encryptionEntityId: '3564523', + encryptionEntityType: 'DCM_ACCOUNT', + }, + conversions: [ + { + timestampMicros: '1668624722000000', + floodlightConfigurationId: '213123123', + ordinal: '1', + floodlightActivityId: '456543345245', + value: 7, + gclid: '123', + limitAdTracking: true, + childDirectedTreatment: true, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + method: 'POST', + }, + }, + output: { + response: { + status: 500, + body: { + output: { + status: 500, + message: 'Campaign Manager: Retrying during CAMPAIGN_MANAGER response transformation', + statTags: { + errorCategory: 'network', + errorType: 'retryable', + destType: 'CAMPAIGN_MANAGER', + module: 'destination', + implementation: 'native', + feature: 'dataDelivery', + destinationId: 'Non-determininable', + workspaceId: 'Non-determininable', + }, + destinationResponse: { + response: { + hasFailures: true, + status: [ + { + conversion: { + timestampMicros: '1668624722000000', + floodlightConfigurationId: '213123123', + ordinal: '1', + floodlightActivityId: '456543345245', + value: 7, + gclid: '123', + limitAdTracking: true, + childDirectedTreatment: true, + }, + errors: [ + { + code: 'NOT_FOUND', + message: 'Floodlight config id: 213123123 was not found.', + kind: 'dfareporting#conversionError', + }, + ], + kind: 'dfareporting#conversionStatus', + }, + ], + kind: 'dfareporting#conversionsBatchInsertResponse', + }, + status: 200, + }, + }, + }, + }, + }, + }, + { + name: 'campaign_manager', + description: 'Failure insert request Aborted', + feature: 'dataDelivery', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://dfareporting.googleapis.com/dfareporting/v4/userprofiles/437691/conversions/batchinsert', + headers: { + Authorization: 'Bearer dummyApiKey', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + kind: 'dfareporting#conversionsBatchInsertRequest', + encryptionInfo: { + kind: 'dfareporting#encryptionInfo', + encryptionSource: 'AD_SERVING', + encryptionEntityId: '3564523', + encryptionEntityType: 'DCM_ACCOUNT', + }, + conversions: [ + { + timestampMicros: '1668624722000000', + floodlightConfigurationId: '213123123', + ordinal: '1', + floodlightActivityId: '456543345245', + value: 7, + gclid: '123', + limitAdTracking: true, + childDirectedTreatment: true, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + method: 'POST', + }, + }, + output: { + response: { + status: 400, + body: { + output: { + status: 400, + message: 'Campaign Manager: Aborting during CAMPAIGN_MANAGER response transformation', + statTags: { + errorCategory: 'network', + errorType: 'aborted', + destType: 'CAMPAIGN_MANAGER', + module: 'destination', + implementation: 'native', + feature: 'dataDelivery', + destinationId: 'Non-determininable', + workspaceId: 'Non-determininable', + }, + destinationResponse: { + response: { + hasFailures: true, + status: [ + { + conversion: { + timestampMicros: '1668624722000000', + floodlightConfigurationId: '213123123', + ordinal: '1', + floodlightActivityId: '456543345245', + value: 7, + gclid: '123', + limitAdTracking: true, + childDirectedTreatment: true, + }, + errors: [ + { + code: 'INVALID_ARGUMENT', + message: 'Floodlight config id: 213123123 was not found.', + kind: 'dfareporting#conversionError', + }, + ], + kind: 'dfareporting#conversionStatus', + }, + ], + kind: 'dfareporting#conversionsBatchInsertResponse', + }, + status: 200, + }, + }, + }, + }, + }, + }, + { + name: 'campaign_manager', + description: 'Sucess and fail insert request v1', + feature: 'dataDelivery', + module: 'destination', + version: 'v1', + input: { + request: { + body: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://dfareporting.googleapis.com/dfareporting/v4/userprofiles/437692/conversions/batchinsert', + headers: { + Authorization: 'Bearer dummyApiKey', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + kind: 'dfareporting#conversionsBatchInsertRequest', + conversions: [ + { + timestampMicros: '1668624722000000', + floodlightConfigurationId: '213123123', + ordinal: '1', + floodlightActivityId: '456543345245', + value: 7, + gclid: '123', + limitAdTracking: true, + childDirectedTreatment: true, + }, + { + timestampMicros: '1668624722000000', + floodlightConfigurationId: '213123123', + ordinal: '1', + floodlightActivityId: '456543345245', + value: 8, + gclid: '123', + limitAdTracking: true, + childDirectedTreatment: true, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + metadata: [ + { + jobId: 2, + attemptNum: 0, + userId: '', + sourceId: '2Vsge2uWYdrLfG7pZb5Y82eo4lr', + destinationId: '2RHh08uOsXqE9KvCDg3hoaeuK2L', + workspaceId: '2Csl0lSTbuM3qyHdaOQB2GcDH8o', + secret: { + access_token: 'secret', + refresh_token: 'refresh', + developer_token: 'developer_Token', + }, + }, + { + jobId: 3, + attemptNum: 1, + userId: '', + sourceId: '2Vsge2uWYdrLfG7pZb5Y82eo4lr', + destinationId: '2RHh08uOsXqE9KvCDg3hoaeuK2L', + workspaceId: '2Csl0lSTbuM3qyHdaOQB2GcDH8o', + secret: { + access_token: 'secret', + refresh_token: 'refresh', + developer_token: 'developer_Token', + }, + }, + ], + files: {}, + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: { + status: 200, + message: '[CAMPAIGN_MANAGER Response V1 Handler] - Request Processed Successfully', + destinationResponse: { + response: { + hasFailures: true, + status: [ + { + conversion: { + timestampMicros: '1668624722000000', + floodlightConfigurationId: '213123123', + ordinal: '1', + floodlightActivityId: '456543345245', + value: 7, + gclid: '123', + limitAdTracking: true, + childDirectedTreatment: true, + }, + kind: 'dfareporting#conversionStatus', + errors: [ + { + code: 'INVALID_ARGUMENT', + kind: 'dfareporting#conversionError', + message: 'Floodlight config id: 213123123 was not found.', + }, + ], + }, + { + conversion: { + timestampMicros: '1668624722000000', + floodlightConfigurationId: '213123123', + ordinal: '1', + floodlightActivityId: '456543345245', + value: 8, + gclid: '123', + limitAdTracking: true, + childDirectedTreatment: true, + }, + kind: 'dfareporting#conversionStatus', + }, + ], + kind: 'dfareporting#conversionsBatchInsertResponse', + }, + status: 200, + rudderJobMetadata: [ + { + jobId: 2, + attemptNum: 0, + userId: '', + sourceId: '2Vsge2uWYdrLfG7pZb5Y82eo4lr', + destinationId: '2RHh08uOsXqE9KvCDg3hoaeuK2L', + workspaceId: '2Csl0lSTbuM3qyHdaOQB2GcDH8o', + secret: { + access_token: 'secret', + refresh_token: 'refresh', + developer_token: 'developer_Token', + }, + }, + { + jobId: 3, + attemptNum: 1, + userId: '', + sourceId: '2Vsge2uWYdrLfG7pZb5Y82eo4lr', + destinationId: '2RHh08uOsXqE9KvCDg3hoaeuK2L', + workspaceId: '2Csl0lSTbuM3qyHdaOQB2GcDH8o', + secret: { + access_token: 'secret', + refresh_token: 'refresh', + developer_token: 'developer_Token', + }, + }, + ], + }, + response: [ + { + error: 'Floodlight config id: 213123123 was not found., ', + statusCode: 400, + metadata: { + attemptNum: 0, + destinationId: '2RHh08uOsXqE9KvCDg3hoaeuK2L', + jobId: 2, + secret: { + access_token: 'secret', + developer_token: 'developer_Token', + refresh_token: 'refresh', + }, + sourceId: '2Vsge2uWYdrLfG7pZb5Y82eo4lr', + userId: '', + workspaceId: '2Csl0lSTbuM3qyHdaOQB2GcDH8o', + }, + }, + { + error: 'success', + metadata: { + attemptNum: 1, + destinationId: '2RHh08uOsXqE9KvCDg3hoaeuK2L', + jobId: 3, + secret: { + access_token: 'secret', + developer_token: 'developer_Token', + refresh_token: 'refresh', + }, + sourceId: '2Vsge2uWYdrLfG7pZb5Y82eo4lr', + userId: '', + workspaceId: '2Csl0lSTbuM3qyHdaOQB2GcDH8o', + }, + statusCode: 200, + }, + ], + }, + }, + }, + }, + }, + { + name: 'campaign_manager', + description: 'Sucess insert request v1', + feature: 'dataDelivery', + module: 'destination', + version: 'v1', + input: { + request: { + body: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://dfareporting.googleapis.com/dfareporting/v4/userprofiles/43770/conversions/batchinsert', + headers: { + Authorization: 'Bearer dummyApiKey', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + kind: 'dfareporting#conversionsBatchInsertRequest', + encryptionInfo: { + kind: 'dfareporting#encryptionInfo', + encryptionSource: 'AD_SERVING', + encryptionEntityId: '3564523', + encryptionEntityType: 'DCM_ACCOUNT', + }, + conversions: [ + { + timestampMicros: '1668624722000000', + floodlightConfigurationId: '213123123', + ordinal: '1', + floodlightActivityId: '456543345245', + value: 7, + gclid: '123', + limitAdTracking: true, + childDirectedTreatment: true, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + metadata: { + jobId: 2, + attemptNum: 0, + userId: '', + sourceId: '2Vsge2uWYdrLfG7pZb5Y82eo4lr', + destinationId: '2RHh08uOsXqE9KvCDg3hoaeuK2L', + workspaceId: '2Csl0lSTbuM3qyHdaOQB2GcDH8o', + secret: { + access_token: 'secret', + refresh_token: 'refresh', + developer_token: 'developer_Token', + }, + }, + files: {}, + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: { + status: 200, + message: '[CAMPAIGN_MANAGER Response V1 Handler] - Request Processed Successfully', + destinationResponse: { + response: { + hasFailures: false, + status: [ + { + conversion: { + timestampMicros: '1668624722000000', + floodlightConfigurationId: '213123123', + ordinal: '1', + floodlightActivityId: '456543345245', + value: 7, + gclid: '123', + limitAdTracking: true, + childDirectedTreatment: true, + }, + kind: 'dfareporting#conversionStatus', + }, + ], + kind: 'dfareporting#conversionsBatchInsertResponse', + }, + status: 200, + rudderJobMetadata: { + jobId: 2, + attemptNum: 0, + userId: '', + sourceId: '2Vsge2uWYdrLfG7pZb5Y82eo4lr', + destinationId: '2RHh08uOsXqE9KvCDg3hoaeuK2L', + workspaceId: '2Csl0lSTbuM3qyHdaOQB2GcDH8o', + secret: { + access_token: 'secret', + refresh_token: 'refresh', + developer_token: 'developer_Token', + }, + }, + }, + response: [ + { + error: 'success', + statusCode: 200, + }, + ], + }, + }, + }, + }, + }, +]; diff --git a/test/integrations/destinations/campaign_manager/network.ts b/test/integrations/destinations/campaign_manager/network.ts new file mode 100644 index 0000000000..ddecbaf8fa --- /dev/null +++ b/test/integrations/destinations/campaign_manager/network.ts @@ -0,0 +1,311 @@ +const Data = [ + { + httpReq: { + method: 'post', + url: 'https://dfareporting.googleapis.com/dfareporting/v4/userprofiles/437689/conversions/batchinsert', + data: { + kind: 'dfareporting#conversionsBatchInsertRequest', + encryptionInfo: { + kind: 'dfareporting#encryptionInfo', + encryptionSource: 'AD_SERVING', + encryptionEntityId: '3564523', + encryptionEntityType: 'DCM_ACCOUNT', + }, + conversions: [ + { + timestampMicros: '1668624722000000', + floodlightConfigurationId: '213123123', + ordinal: '1', + floodlightActivityId: '456543345245', + value: 7, + gclid: '123', + limitAdTracking: true, + childDirectedTreatment: true, + }, + ], + }, + headers: { + Authorization: 'Bearer dummyApiKey', + 'Content-Type': 'application/json', + }, + }, + httpRes: { + data: { + hasFailures: false, + status: [ + { + conversion: { + timestampMicros: '1668624722000000', + floodlightConfigurationId: '213123123', + ordinal: '1', + floodlightActivityId: '456543345245', + value: 7, + gclid: '123', + limitAdTracking: true, + childDirectedTreatment: true, + }, + kind: 'dfareporting#conversionStatus', + }, + ], + kind: 'dfareporting#conversionsBatchInsertResponse', + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + method: 'post', + url: 'https://dfareporting.googleapis.com/dfareporting/v4/userprofiles/437690/conversions/batchinsert', + data: { + kind: 'dfareporting#conversionsBatchInsertRequest', + encryptionInfo: { + kind: 'dfareporting#encryptionInfo', + encryptionSource: 'AD_SERVING', + encryptionEntityId: '3564523', + encryptionEntityType: 'DCM_ACCOUNT', + }, + conversions: [ + { + timestampMicros: '1668624722000000', + floodlightConfigurationId: '213123123', + ordinal: '1', + floodlightActivityId: '456543345245', + value: 7, + gclid: '123', + limitAdTracking: true, + childDirectedTreatment: true, + }, + ], + }, + headers: { + Authorization: 'Bearer dummyApiKey', + 'Content-Type': 'application/json', + }, + }, + httpRes: { + data: { + hasFailures: true, + status: [ + { + conversion: { + timestampMicros: '1668624722000000', + floodlightConfigurationId: '213123123', + ordinal: '1', + floodlightActivityId: '456543345245', + value: 7, + gclid: '123', + limitAdTracking: true, + childDirectedTreatment: true, + }, + errors: [ + { + code: 'NOT_FOUND', + message: 'Floodlight config id: 213123123 was not found.', + kind: 'dfareporting#conversionError', + }, + ], + kind: 'dfareporting#conversionStatus', + }, + ], + kind: 'dfareporting#conversionsBatchInsertResponse', + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + method: 'post', + url: 'https://dfareporting.googleapis.com/dfareporting/v4/userprofiles/43770/conversions/batchinsert', + data: { + kind: 'dfareporting#conversionsBatchInsertRequest', + encryptionInfo: { + kind: 'dfareporting#encryptionInfo', + encryptionSource: 'AD_SERVING', + encryptionEntityId: '3564523', + encryptionEntityType: 'DCM_ACCOUNT', + }, + conversions: [ + { + timestampMicros: '1668624722000000', + floodlightConfigurationId: '213123123', + ordinal: '1', + floodlightActivityId: '456543345245', + value: 7, + gclid: '123', + limitAdTracking: true, + childDirectedTreatment: true, + }, + ], + }, + headers: { + Authorization: 'Bearer dummyApiKey', + 'Content-Type': 'application/json', + }, + }, + httpRes: { + data: { + hasFailures: false, + status: [ + { + conversion: { + timestampMicros: '1668624722000000', + floodlightConfigurationId: '213123123', + ordinal: '1', + floodlightActivityId: '456543345245', + value: 7, + gclid: '123', + limitAdTracking: true, + childDirectedTreatment: true, + }, + kind: 'dfareporting#conversionStatus', + }, + ], + kind: 'dfareporting#conversionsBatchInsertResponse', + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + method: 'post', + url: 'https://dfareporting.googleapis.com/dfareporting/v4/userprofiles/437692/conversions/batchinsert', + data: { + kind: 'dfareporting#conversionsBatchInsertRequest', + conversions: [ + { + timestampMicros: '1668624722000000', + floodlightConfigurationId: '213123123', + ordinal: '1', + floodlightActivityId: '456543345245', + value: 7, + gclid: '123', + limitAdTracking: true, + childDirectedTreatment: true, + }, + { + timestampMicros: '1668624722000000', + floodlightConfigurationId: '213123123', + ordinal: '1', + floodlightActivityId: '456543345245', + value: 8, + gclid: '123', + limitAdTracking: true, + childDirectedTreatment: true, + }, + ], + }, + headers: { + Authorization: 'Bearer dummyApiKey', + 'Content-Type': 'application/json', + }, + }, + httpRes: { + data: { + hasFailures: true, + status: [ + { + conversion: { + timestampMicros: '1668624722000000', + floodlightConfigurationId: '213123123', + ordinal: '1', + floodlightActivityId: '456543345245', + value: 7, + gclid: '123', + limitAdTracking: true, + childDirectedTreatment: true, + }, + errors: [ + { + code: 'INVALID_ARGUMENT', + message: 'Floodlight config id: 213123123 was not found.', + kind: 'dfareporting#conversionError', + }, + ], + kind: 'dfareporting#conversionStatus', + }, + { + conversion: { + timestampMicros: '1668624722000000', + floodlightConfigurationId: '213123123', + ordinal: '1', + floodlightActivityId: '456543345245', + value: 8, + gclid: '123', + limitAdTracking: true, + childDirectedTreatment: true, + }, + kind: 'dfareporting#conversionStatus', + }, + ], + kind: 'dfareporting#conversionsBatchInsertResponse', + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + method: 'post', + url: 'https://dfareporting.googleapis.com/dfareporting/v4/userprofiles/437691/conversions/batchinsert', + data: { + kind: 'dfareporting#conversionsBatchInsertRequest', + encryptionInfo: { + kind: 'dfareporting#encryptionInfo', + encryptionSource: 'AD_SERVING', + encryptionEntityId: '3564523', + encryptionEntityType: 'DCM_ACCOUNT', + }, + conversions: [ + { + timestampMicros: '1668624722000000', + floodlightConfigurationId: '213123123', + ordinal: '1', + floodlightActivityId: '456543345245', + value: 7, + gclid: '123', + limitAdTracking: true, + childDirectedTreatment: true, + }, + ], + }, + headers: { + Authorization: 'Bearer dummyApiKey', + 'Content-Type': 'application/json', + }, + }, + httpRes: { + data: { + hasFailures: true, + status: [ + { + conversion: { + timestampMicros: '1668624722000000', + floodlightConfigurationId: '213123123', + ordinal: '1', + floodlightActivityId: '456543345245', + value: 7, + gclid: '123', + limitAdTracking: true, + childDirectedTreatment: true, + }, + errors: [ + { + code: 'INVALID_ARGUMENT', + message: 'Floodlight config id: 213123123 was not found.', + kind: 'dfareporting#conversionError', + }, + ], + kind: 'dfareporting#conversionStatus', + }, + ], + kind: 'dfareporting#conversionsBatchInsertResponse', + }, + status: 200, + statusText: 'OK', + }, + }, +]; +export const networkCallsData = [...Data]; From 571dbf5bd65e7d0e261562ff3da3b393f27f27b6 Mon Sep 17 00:00:00 2001 From: Yashasvi Bajpai <33063622+yashasvibajpai@users.noreply.github.com> Date: Thu, 30 Nov 2023 13:05:00 +0530 Subject: [PATCH 035/135] fix: encode &, < and > to html counterparts in adobe analytics (#2854) * fix: encode &, < and > to html counterparts in adobe * fix: use encodeurl on url valuez --- .../destinations/adobe_analytics/transform.js | 3 +- src/v0/destinations/adobe_analytics/utils.js | 26 ++++++++-- .../adobe_analytics/processor/data.ts | 47 ++++++++++--------- 3 files changed, 49 insertions(+), 27 deletions(-) diff --git a/src/v0/destinations/adobe_analytics/transform.js b/src/v0/destinations/adobe_analytics/transform.js index a805e379ff..8bac0edd70 100644 --- a/src/v0/destinations/adobe_analytics/transform.js +++ b/src/v0/destinations/adobe_analytics/transform.js @@ -76,6 +76,7 @@ const responseBuilderSimple = async (message, destinationConfig, basicPayload) = } payload.linkURL = adobeIntegrationsObject?.linkURL || context?.page?.url || 'No linkURL provided'; + payload.linkURL = encodeURI(payload.linkURL); } // handle hier if (overrideHiers) { @@ -97,7 +98,7 @@ const responseBuilderSimple = async (message, destinationConfig, basicPayload) = const propertiesPageUrl = properties?.pageUrl; const pageUrl = contextPageUrl || propertiesPageUrl; if (isDefinedAndNotNullAndNotEmpty(pageUrl)) { - payload.pageUrl = pageUrl; + payload.pageUrl = encodeURI(pageUrl); } if (trackPageName) { // better handling possible here, both error and implementation wise diff --git a/src/v0/destinations/adobe_analytics/utils.js b/src/v0/destinations/adobe_analytics/utils.js index cbd4f51c23..bcb138d77b 100644 --- a/src/v0/destinations/adobe_analytics/utils.js +++ b/src/v0/destinations/adobe_analytics/utils.js @@ -75,6 +75,25 @@ function handleContextData(payload, destinationConfig, message) { return payload; } +/** + * This function is used for replacing '&', '<' and '>' with their respective HTML entities + * @param {*} inputString + * @returns string with HTML entities replaced + * + */ + +function escapeToHTML(inputString) { + return inputString.replace( + /[&<>]/g, + (match) => + ({ + '&': '&', + '<': '<', + '>': '>', + }[match]), + ); +} + /** * This function is used for populating the eVars and hVars in the payload * @param {*} destVarMapping @@ -90,16 +109,16 @@ function rudderPropToDestMap(destVarMapping, message, payload, destVarStrPrefix) let val = get(message, `properties.${key}`); if (isDefinedAndNotNull(val)) { const destVarKey = destVarStrPrefix + destVarMapping[key]; - mappedVar[destVarKey] = val; + mappedVar[destVarKey] = escapeToHTML(val); } else { SOURCE_KEYS.some((sourceKey) => { val = getMappingFieldValueFormMessage(message, sourceKey, key); if (isDefinedAndNotNull(val)) { - mappedVar[`${destVarStrPrefix}${[destVarMapping[key]]}`] = val; + mappedVar[`${destVarStrPrefix}${[destVarMapping[key]]}`] = escapeToHTML(val); } else { val = getValueByPath(message, key); if (isDefinedAndNotNull(val)) { - mappedVar[`${destVarStrPrefix}${[destVarMapping[key]]}`] = val; + mappedVar[`${destVarStrPrefix}${[destVarMapping[key]]}`] = escapeToHTML(val); } } }); @@ -200,4 +219,5 @@ module.exports = { handleList, handleCustomProperties, stringifyValueAndJoinWithDelimiter, + escapeToHTML, }; diff --git a/test/integrations/destinations/adobe_analytics/processor/data.ts b/test/integrations/destinations/adobe_analytics/processor/data.ts index 378523ac3c..690639c057 100644 --- a/test/integrations/destinations/adobe_analytics/processor/data.ts +++ b/test/integrations/destinations/adobe_analytics/processor/data.ts @@ -1,7 +1,7 @@ export const data = [ { name: 'adobe_analytics', - description: 'Test 0', + description: 'Test 0: [ECom]: Product Viewed', feature: 'processor', module: 'destination', version: 'v0', @@ -31,7 +31,7 @@ export const data = [ referring_domain: 'google.com', search: 'estore bestseller', title: 'The best sellers offered by EStore', - url: 'https://www.estore.com/best-seller/1', + url: 'https://www.estore.com/best-seller/News & Sports?ik=123&ij=456', name: 'Best Seller', }, screen: { @@ -61,7 +61,7 @@ export const data = [ coupon: 'DISC21', currency: 'USD', position: 1, - url: 'https://www.website.com/product/path', + url: 'https://www.website.com/product/path?ik=123&ij=456', image_url: 'https://www.website.com/product/path.png', currencyMerch: 25, addressMerch: 'Delhi', @@ -170,7 +170,7 @@ export const data = [ JSON_ARRAY: {}, XML: { payload: - '17941080sales campaignwebUSD127.0.0.1en-USDalvik/2.1.0 (Linux; U; Android 9; Android SDK built for x86 Build/PSR1.180720.075)https://www.google.com/search?q=estore+bestsellert01t02roottval001Kolkata9935400932RudderLabs JavaScript SDKr15,faze90Rciaz,hummer,tharhttps://www.estore.com/best-seller/1Best Sellercustompropval1custompropval22020-01-09T10:01:53.558Zmktcloudid001prodViewGames;Game;11;148.39footlockerrudderstackpoc', + '17941080sales campaignwebUSD127.0.0.1en-USDalvik/2.1.0 (Linux; U; Android 9; Android SDK built for x86 Build/PSR1.180720.075)https://www.google.com/search?q=estore+bestsellert01t02roottval001Kolkata9935400932RudderLabs JavaScript SDKr15,faze90Rciaz,hummer,tharhttps://www.estore.com/best-seller/News%20&%20Sports?ik=123&ij=456Best Sellercustompropval1custompropval22020-01-09T10:01:53.558Zmktcloudid001prodViewGames;Game;11;148.39footlockerrudderstackpoc', }, FORM: {}, }, @@ -185,7 +185,7 @@ export const data = [ }, { name: 'adobe_analytics', - description: 'Test 1', + description: 'Test 1: [ECom]: Product Added', feature: 'processor', module: 'destination', version: 'v0', @@ -356,7 +356,7 @@ export const data = [ }, { name: 'adobe_analytics', - description: 'Test 2', + description: 'Test 2: [ECom]: Product Removed', feature: 'processor', module: 'destination', version: 'v0', @@ -527,7 +527,7 @@ export const data = [ }, { name: 'adobe_analytics', - description: 'Test 3', + description: 'Test 3: [ECom]: Cart Viewed', feature: 'processor', module: 'destination', version: 'v0', @@ -708,7 +708,7 @@ export const data = [ }, { name: 'adobe_analytics', - description: 'Test 4', + description: 'Test 4: [ECom]: Checkout started', feature: 'processor', module: 'destination', version: 'v0', @@ -896,7 +896,7 @@ export const data = [ }, { name: 'adobe_analytics', - description: 'Test 5', + description: 'Test 5: [ECom]: Order Completed', feature: 'processor', module: 'destination', version: 'v0', @@ -1085,7 +1085,7 @@ export const data = [ }, { name: 'adobe_analytics', - description: 'Test 6', + description: 'Test 6: Cart Opened', feature: 'processor', module: 'destination', version: 'v0', @@ -1265,7 +1265,7 @@ export const data = [ }, { name: 'adobe_analytics', - description: 'Test 7', + description: 'Test 7: [Custom] Watched Video', feature: 'processor', module: 'destination', version: 'v0', @@ -1285,7 +1285,7 @@ export const data = [ term: 'event data', content: 'Make sense of the modern data stack', }, - library: { name: 'RudderLabs JavaScript SDK', version: '2.9.1' }, + library: { name: 'RudderLabs JavaScript SDK ', version: '2.9.1' }, locale: 'en-US', page: { path: '/best-seller/1', @@ -1311,7 +1311,7 @@ export const data = [ traits: { roott01: 'roottval001' }, event: 'Watched Video', integrations: { All: true }, - properties: { plan: 'growth', video: 'TEDxGROWTH' }, + properties: { plan: 'growth', video: 'TEDxGROWTH&MARKETING' }, originalTimestamp: '2020-01-09T10:01:53.558Z', type: 'track', sentAt: '2020-01-09T10:02:03.257Z', @@ -1412,7 +1412,7 @@ export const data = [ JSON_ARRAY: {}, XML: { payload: - '17941080sales campaignweb127.0.0.1en-USDalvik/2.1.0 (Linux; U; Android 9; Android SDK built for x86 Build/PSR1.180720.075)https://www.google.com/search?q=estore+bestsellerroottval001RudderLabs JavaScript SDKTEDxGROWTHoWatched Videohttps://www.estore.com/best-seller/1growth2020-01-09T10:01:53.558Zmktcloudid001event1footlockerrudderstackpoc', + '17941080sales campaignweb127.0.0.1en-USDalvik/2.1.0 (Linux; U; Android 9; Android SDK built for x86 Build/PSR1.180720.075)https://www.google.com/search?q=estore+bestsellerroottval001RudderLabs JavaScript SDK <Custom>TEDxGROWTH&MARKETINGoWatched Videohttps://www.estore.com/best-seller/1growth2020-01-09T10:01:53.558Zmktcloudid001event1footlockerrudderstackpoc', }, FORM: {}, }, @@ -1427,7 +1427,7 @@ export const data = [ }, { name: 'adobe_analytics', - description: 'Test 8', + description: 'Test 8: Common Page Call', feature: 'processor', module: 'destination', version: 'v0', @@ -1597,7 +1597,7 @@ export const data = [ }, { name: 'adobe_analytics', - description: 'Test 9', + description: 'Test 9: Currency test event', feature: 'processor', module: 'destination', version: 'v0', @@ -1789,7 +1789,7 @@ export const data = [ }, { name: 'adobe_analytics', - description: 'Test 10', + description: 'Test 10: Override feature test', feature: 'processor', module: 'destination', version: 'v0', @@ -1988,7 +1988,7 @@ export const data = [ }, { name: 'adobe_analytics', - description: 'Test 11', + description: 'Test 11: Override hiers test', feature: 'processor', module: 'destination', version: 'v0', @@ -2188,7 +2188,7 @@ export const data = [ }, { name: 'adobe_analytics', - description: 'Test 12', + description: 'Test 12: product level eVaR', feature: 'processor', module: 'destination', version: 'v0', @@ -2390,7 +2390,7 @@ export const data = [ }, { name: 'adobe_analytics', - description: 'Test 13', + description: 'Test 13: [ERROR]: Invalid message type: Identify', feature: 'processor', module: 'destination', version: 'v0', @@ -2523,7 +2523,7 @@ export const data = [ }, { name: 'adobe_analytics', - description: 'Test 14', + description: 'Test 14: [ERROR]: Message Type is not present.', feature: 'processor', module: 'destination', version: 'v0', @@ -2697,7 +2697,8 @@ export const data = [ }, { name: 'adobe_analytics', - description: 'Test 15', + description: + 'Test 15: [ERROR]: The event is not a supported ECOM event or a mapped custom event.', feature: 'processor', module: 'destination', version: 'v0', @@ -2872,7 +2873,7 @@ export const data = [ }, { name: 'adobe_analytics', - description: 'Test 16', + description: 'Test 16: Test overrideEventName property', feature: 'processor', module: 'destination', version: 'v0', From 4b260e4ec6d25875903830004b3e4975b3402b2d Mon Sep 17 00:00:00 2001 From: AASHISH MALIK Date: Thu, 30 Nov 2023 16:05:12 +0530 Subject: [PATCH 036/135] feat: cm360 router batching (#2836) * fix: timestamp microseconds input cm360 * feat: batching in cm360 * chore: addressed comments * chore: addressed comments * fix: return aborted inside cath block * feat: update batching partial events * feat: update batching partial events * feat: update batching partial events * feat: update batching partial events * chore: removed hardcoded response * feat: added new error class * chore: develop merge * feat: handle metadata as obj * feat: handle metadata as obj * chore: removed commented code * fix: merged develop * fix: merged develop * chore: added tests for batching * chore: added tests for batching --- .../destination/postTransformation.ts | 17 +- src/types/index.ts | 1 + src/v0/destinations/am/transform.js | 54 +- .../destinations/campaign_manager/config.js | 3 + .../campaign_manager/networkHandler.js | 35 +- .../campaign_manager/transform.js | 113 ++- test/__tests__/facebook_conversions.test.js | 2 +- .../campaign_manager/dataDelivery/data.ts | 10 +- .../campaign_manager/router/data.ts | 819 +++++++++++++++++- 9 files changed, 999 insertions(+), 55 deletions(-) diff --git a/src/services/destination/postTransformation.ts b/src/services/destination/postTransformation.ts index 0b91eb7cc1..1e99961045 100644 --- a/src/services/destination/postTransformation.ts +++ b/src/services/destination/postTransformation.ts @@ -16,6 +16,15 @@ import { ErrorReportingService } from '../errorReporting'; import tags from '../../v0/util/tags'; import stats from '../../util/stats'; +type ErrorResponse = { + status?: number; + message?: string; + destinationResponse?: object; + statTags?: object; + authErrorCategory?: string | undefined; + response?: object | undefined; +}; + export class DestinationPostTransformationService { public static handleProcessorTransformSucessEvents( event: ProcessorTransformationRequest, @@ -139,7 +148,7 @@ export class DestinationPostTransformationService { } public static handleDeliveryFailureEvents( - error: NonNullable, + error: ErrorResponse, metaTo: MetaTransferObject, ): DeliveryResponse { const errObj = generateErrorObject(error, metaTo.errorDetails, false); @@ -152,6 +161,12 @@ export class DestinationPostTransformationService { authErrorCategory: errObj.authErrorCategory, }), } as DeliveryResponse; + + // for transformer-proxy to maintain contract + const { response } = error; + if (response) { + resp.response = response; + } ErrorReportingService.reportError(error, metaTo.errorContext, resp); return resp; } diff --git a/src/types/index.ts b/src/types/index.ts index 9292fe2cc2..7a23132173 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -140,6 +140,7 @@ type DeliveryResponse = { destinationResponse: any; statTags: object; authErrorCategory?: string; + response?: object; }; enum MessageType { diff --git a/src/v0/destinations/am/transform.js b/src/v0/destinations/am/transform.js index bed5d45b28..05a130d6e0 100644 --- a/src/v0/destinations/am/transform.js +++ b/src/v0/destinations/am/transform.js @@ -591,8 +591,12 @@ const processSingleMessage = (message, destination) => { const { name, event, properties } = message; const messageType = message.type.toLowerCase(); const CATEGORY_KEY = 'properties.category'; - const { useUserDefinedPageEventName, userProvidedPageEventString, - useUserDefinedScreenEventName, userProvidedScreenEventString } = destination.Config; + const { + useUserDefinedPageEventName, + userProvidedPageEventString, + useUserDefinedScreenEventName, + userProvidedScreenEventString, + } = destination.Config; switch (messageType) { case EventType.IDENTIFY: payloadObjectName = 'events'; // identify same as events @@ -602,17 +606,17 @@ const processSingleMessage = (message, destination) => { case EventType.PAGE: if (useUserDefinedPageEventName) { const getMessagePath = userProvidedPageEventString - .substring( - userProvidedPageEventString.indexOf('{') + 2, - userProvidedPageEventString.indexOf('}'), - ) - .trim(); + .substring( + userProvidedPageEventString.indexOf('{') + 2, + userProvidedPageEventString.indexOf('}'), + ) + .trim(); evType = - userProvidedPageEventString.trim() === '' - ? name - : userProvidedPageEventString - .trim() - .replaceAll(/{{([^{}]+)}}/g, get(message, getMessagePath)); + userProvidedPageEventString.trim() === '' + ? name + : userProvidedPageEventString + .trim() + .replaceAll(/{{([^{}]+)}}/g, get(message, getMessagePath)); } else { evType = `Viewed ${name || get(message, CATEGORY_KEY) || ''} Page`; } @@ -625,25 +629,25 @@ const processSingleMessage = (message, destination) => { case EventType.SCREEN: { const { eventType, updatedProperties } = getScreenevTypeAndUpdatedProperties( - message, - CATEGORY_KEY, + message, + CATEGORY_KEY, ); let customScreenEv = ''; if (useUserDefinedScreenEventName) { const getMessagePath = userProvidedScreenEventString - .substring( - userProvidedScreenEventString.indexOf('{') + 2, - userProvidedScreenEventString.indexOf('}'), - ) - .trim(); + .substring( + userProvidedScreenEventString.indexOf('{') + 2, + userProvidedScreenEventString.indexOf('}'), + ) + .trim(); customScreenEv = - userProvidedScreenEventString.trim() === '' - ? name - : userProvidedScreenEventString - .trim() - .replaceAll(/{{([^{}]+)}}/g, get(message, getMessagePath)); + userProvidedScreenEventString.trim() === '' + ? name + : userProvidedScreenEventString + .trim() + .replaceAll(/{{([^{}]+)}}/g, get(message, getMessagePath)); } - evType =useUserDefinedScreenEventName ? customScreenEv : eventType; + evType = useUserDefinedScreenEventName ? customScreenEv : eventType; message.properties = updatedProperties; category = ConfigCategory.SCREEN; } diff --git a/src/v0/destinations/campaign_manager/config.js b/src/v0/destinations/campaign_manager/config.js index 063f65cb14..b3a9531347 100644 --- a/src/v0/destinations/campaign_manager/config.js +++ b/src/v0/destinations/campaign_manager/config.js @@ -9,6 +9,8 @@ const ConfigCategories = { }, }; +const MAX_BATCH_CONVERSATIONS_SIZE = 1000; + const EncryptionEntityType = [ 'ENCRYPTION_ENTITY_TYPE_UNKNOWN', 'DCM_ACCOUNT', @@ -28,4 +30,5 @@ module.exports = { BASE_URL, EncryptionEntityType, EncryptionSource, + MAX_BATCH_CONVERSATIONS_SIZE, }; diff --git a/src/v0/destinations/campaign_manager/networkHandler.js b/src/v0/destinations/campaign_manager/networkHandler.js index 0683b0c55c..63efff5b50 100644 --- a/src/v0/destinations/campaign_manager/networkHandler.js +++ b/src/v0/destinations/campaign_manager/networkHandler.js @@ -1,3 +1,4 @@ +/* eslint-disable no-restricted-syntax */ const { AbortedError, RetryableError, NetworkError } = require('@rudderstack/integrations-lib'); const { prepareProxyRequest, proxyRequest } = require('../../../adapters/network'); const { isHttpStatusSuccess, getAuthErrCategoryFromStCode } = require('../../util/index'); @@ -9,22 +10,44 @@ const { const tags = require('../../util/tags'); function checkIfFailuresAreRetryable(response) { + const { status } = response; try { - if (Array.isArray(response.status) && Array.isArray(response.status[0].errors)) { - return ( - response.status[0].errors[0].code !== 'PERMISSION_DENIED' && - response.status[0].errors[0].code !== 'INVALID_ARGUMENT' - ); + if (Array.isArray(status)) { + // iterate over each status, and if found retryable in conversations ..retry else discard + /* status : [{ + "conversion": { + object (Conversion) + }, + "errors": [ + { + object (ConversionError) + } + ], + "kind": string + }] */ + for (const st of status) { + for (const err of st.errors) { + // if code is any of these, event is not retryable + if ( + err.code === 'PERMISSION_DENIED' || + err.code === 'INVALID_ARGUMENT' || + err.code === 'NOT_FOUND' + ) { + return false; + } + } + } } return true; } catch (e) { - return true; + return false; } } const responseHandler = (destinationResponse) => { const message = `[CAMPAIGN_MANAGER Response Handler] - Request Processed Successfully`; const { response, status } = destinationResponse; + if (isHttpStatusSuccess(status)) { // check for Failures if (response.hasFailures === true) { diff --git a/src/v0/destinations/campaign_manager/transform.js b/src/v0/destinations/campaign_manager/transform.js index 7b6d6cba4c..3b480dbac2 100644 --- a/src/v0/destinations/campaign_manager/transform.js +++ b/src/v0/destinations/campaign_manager/transform.js @@ -1,13 +1,16 @@ const { InstrumentationError } = require('@rudderstack/integrations-lib'); +const lodash = require('lodash'); const { EventType } = require('../../../constants'); - const { constructPayload, defaultRequestConfig, defaultPostRequestConfig, + defaultBatchRequestConfig, removeUndefinedAndNullValues, + getSuccessRespEvents, isDefinedAndNotNull, - simpleProcessRouterDest, + checkInvalidRtTfEvents, + handleRtTfSingleEventError, getAccessToken, } = require('../../util'); @@ -17,6 +20,7 @@ const { BASE_URL, EncryptionEntityType, EncryptionSource, + MAX_BATCH_CONVERSATIONS_SIZE, } = require('./config'); const { convertToMicroseconds } = require('./util'); @@ -178,9 +182,110 @@ function process(event) { return response; } +const generateBatch = (eventKind, events) => { + const batchRequestObject = defaultBatchRequestConfig(); + const conversions = []; + let encryptionInfo = {}; + const metadata = []; + // extracting destination, message from the first event in a batch + const { destination, message } = events[0]; + // Batch event into dest batch structure + events.forEach((ev) => { + conversions.push(...ev.message.body.JSON.conversions); + metadata.push(ev.metadata); + if (ev.message.body.JSON.encryptionInfo) { + encryptionInfo = ev.message.body.JSON.encryptionInfo; + } + }); + + batchRequestObject.batchedRequest.body.JSON = { + kind: eventKind, + conversions, + }; + + if (Object.keys(encryptionInfo).length > 0) { + batchRequestObject.batchedRequest.body.JSON.encryptionInfo = encryptionInfo; + } + + batchRequestObject.batchedRequest.endpoint = message.endpoint; + + batchRequestObject.batchedRequest.headers = message.headers; + + return { + ...batchRequestObject, + metadata, + destination, + }; +}; + +const batchEvents = (eventChunksArray) => { + const batchedResponseList = []; + + // group batchInsert and batchUpdate payloads + const groupedEventChunks = lodash.groupBy( + eventChunksArray, + (event) => event.message.body.JSON.kind, + ); + Object.keys(groupedEventChunks).forEach((eventKind) => { + // eventChunks = [[e1,e2,e3,..batchSize],[e1,e2,e3,..batchSize]..] + const eventChunks = lodash.chunk(groupedEventChunks[eventKind], MAX_BATCH_CONVERSATIONS_SIZE); + eventChunks.forEach((chunk) => { + const batchEventResponse = generateBatch(eventKind, chunk); + batchedResponseList.push( + getSuccessRespEvents( + batchEventResponse.batchedRequest, + batchEventResponse.metadata, + batchEventResponse.destination, + true, + ), + ); + }); + }); + return batchedResponseList; +}; + const processRouterDest = async (inputs, reqMetadata) => { - const respList = await simpleProcessRouterDest(inputs, process, reqMetadata); - return respList; + const errorRespEvents = checkInvalidRtTfEvents(inputs); + if (errorRespEvents.length > 0) { + return errorRespEvents; + } + + const batchErrorRespList = []; + const eventChunksArray = []; + const { destination } = inputs[0]; + await Promise.all( + inputs.map(async (event) => { + try { + if (event.message.statusCode) { + // already transformed event + eventChunksArray.push({ + message: event.message, + metadata: event.metadata, + destination, + }); + } else { + // if not transformed + const proccessedRespList = process(event); + const transformedPayload = { + message: proccessedRespList, + metadata: event.metadata, + destination, + }; + eventChunksArray.push(transformedPayload); + } + } catch (error) { + const errRespEvent = handleRtTfSingleEventError(event, error, reqMetadata); + batchErrorRespList.push(errRespEvent); + } + }), + ); + + let batchResponseList = []; + if (eventChunksArray.length > 0) { + batchResponseList = batchEvents(eventChunksArray); + } + + return [...batchResponseList, ...batchErrorRespList]; }; module.exports = { process, processRouterDest }; diff --git a/test/__tests__/facebook_conversions.test.js b/test/__tests__/facebook_conversions.test.js index 9495a85913..5bb905b5c8 100644 --- a/test/__tests__/facebook_conversions.test.js +++ b/test/__tests__/facebook_conversions.test.js @@ -38,7 +38,7 @@ describe(`${name} Tests`, () => { }); }); }); - + describe("Router Tests", () => { it("Payload", async () => { const routerOutput = await transformer.processRouterDest(inputRouterData); diff --git a/test/integrations/destinations/campaign_manager/dataDelivery/data.ts b/test/integrations/destinations/campaign_manager/dataDelivery/data.ts index f2a7654e3c..601ad56401 100644 --- a/test/integrations/destinations/campaign_manager/dataDelivery/data.ts +++ b/test/integrations/destinations/campaign_manager/dataDelivery/data.ts @@ -1,7 +1,7 @@ export const data = [ { name: 'campaign_manager', - description: 'Sucess insert request', + description: 'Sucess insert request V0', feature: 'dataDelivery', module: 'destination', version: 'v0', @@ -135,14 +135,14 @@ export const data = [ }, output: { response: { - status: 500, + status: 400, body: { output: { - status: 500, - message: 'Campaign Manager: Retrying during CAMPAIGN_MANAGER response transformation', + status: 400, + message: 'Campaign Manager: Aborting during CAMPAIGN_MANAGER response transformation', statTags: { errorCategory: 'network', - errorType: 'retryable', + errorType: 'aborted', destType: 'CAMPAIGN_MANAGER', module: 'destination', implementation: 'native', diff --git a/test/integrations/destinations/campaign_manager/router/data.ts b/test/integrations/destinations/campaign_manager/router/data.ts index 95372e1925..2ab1813cf8 100644 --- a/test/integrations/destinations/campaign_manager/router/data.ts +++ b/test/integrations/destinations/campaign_manager/router/data.ts @@ -1,7 +1,7 @@ export const data = [ { name: 'campaign_manager', - description: 'Test 0', + description: 'Batch Different Type Requests', feature: 'router', module: 'destination', version: 'v0', @@ -77,7 +77,7 @@ export const data = [ properties: { profileId: 437689, floodlightConfigurationId: '213123123', - ordinal: 'string', + ordinal: '1', quantity: '455678', floodlightActivityId: '456543345245', value: 7, @@ -167,7 +167,7 @@ export const data = [ properties: { profileId: 437689, floodlightConfigurationId: '213123123', - ordinal: 'string', + ordinal: '2', floodlightActivityId: '456543345245', quantity: '455678', value: 7, @@ -256,16 +256,11 @@ export const data = [ properties: { profileId: 437689, floodlightConfigurationId: '213123123', - ordinal: 'string', + ordinal: '3', floodlightActivityId: '456543345245', - mobileDeviceId: 'string', value: 7, encryptedUserIdCandidates: ['dfghjbnm'], - gclid: 'string', - matchId: 'string', - dclid: 'string', quantity: '455678', - impressionId: 'string', limitAdTracking: true, childDirectedTreatment: true, encryptionInfo: { @@ -322,7 +317,7 @@ export const data = [ treatmentForUnderage: false, timestampMicros: '1668624722903000', floodlightConfigurationId: '213123123', - ordinal: 'string', + ordinal: '1', quantity: '455678', floodlightActivityId: '456543345245', value: 7, @@ -348,7 +343,7 @@ export const data = [ jobId: 1, }, ], - batched: false, + batched: true, statusCode: 200, destination: { Config: { @@ -387,7 +382,7 @@ export const data = [ treatmentForUnderage: false, timestampMicros: '1668624722903000', floodlightConfigurationId: '213123123', - ordinal: 'string', + ordinal: '2', quantity: '455678', floodlightActivityId: '456543345245', value: 7, @@ -411,7 +406,7 @@ export const data = [ jobId: 2, }, ], - batched: false, + batched: true, statusCode: 200, destination: { Config: { @@ -461,4 +456,802 @@ export const data = [ }, }, }, + { + name: 'campaign_manager', + description: 'Batch Sucessful BatchInsert Request', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + metadata: { + secret: { + access_token: 'dummyApiToken', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + jobId: 4, + }, + destination: { + Config: { + treatmentForUnderage: false, + limitAdTracking: false, + childDirectedTreatment: false, + nonPersonalizedAd: false, + rudderAccountId: '2EOknn1JNH7WK1MfNku4fGYKkRK', + }, + }, + message: { + channel: 'web', + event: 'Promotion Clicked', + originalTimestamp: '2022-11-17T00:22:02.903+05:30', + properties: { + profileId: 437689, + matchId: '123', + floodlightConfigurationId: '213123123', + quantity: '455678', + ordinal: '1', + floodlightActivityId: '456543345245', + value: 7, + limitAdTracking: true, + childDirectedTreatment: true, + requestType: 'batchinsert', + }, + type: 'track', + anonymousId: 'randomId', + integrations: { + All: true, + }, + name: 'ApplicationLoaded', + sentAt: '2022-11-17T00:22:02.903+05:30', + }, + }, + { + metadata: { + secret: { + access_token: 'dummyApiToken', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + jobId: 5, + }, + destination: { + Config: { + treatmentForUnderage: false, + limitAdTracking: false, + childDirectedTreatment: false, + nonPersonalizedAd: false, + rudderAccountId: '2EOknn1JNH7WK1MfNku4fGYKkRK', + }, + }, + message: { + channel: 'web', + event: 'Promotion Clicked', + type: 'track', + originalTimestamp: '2022-11-17T00:22:02.903+05:30', + properties: { + profileId: 437689, + floodlightConfigurationId: '213123123', + ordinal: '1', + floodlightActivityId: '456543345245', + quantity: '455678', + value: 7, + matchId: '111', + limitAdTracking: true, + childDirectedTreatment: true, + requestType: 'batchinsert', + }, + anonymousId: 'randomId', + integrations: { + All: true, + }, + name: 'ApplicationLoaded', + sentAt: '2022-11-17T00:22:02.903+05:30', + }, + }, + { + metadata: { + secret: { + access_token: 'dummyApiToken', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + jobId: 6, + }, + destination: { + Config: { + treatmentForUnderage: false, + limitAdTracking: false, + childDirectedTreatment: false, + nonPersonalizedAd: false, + rudderAccountId: '2EOknn1JNH7WK1MfNku4fGYKkRK', + }, + }, + message: { + channel: 'web', + event: 'Promotion Clicked', + type: 'track', + originalTimestamp: '2022-11-17T00:22:02.903+05:30', + properties: { + profileId: 437689, + floodlightConfigurationId: '213123123', + floodlightActivityId: '456543345245', + value: 7, + gclid: '123', + ordinal: '1', + quantity: '455678', + limitAdTracking: true, + childDirectedTreatment: true, + requestType: 'batchinsert', + }, + anonymousId: 'randomId', + integrations: { + All: true, + }, + name: 'ApplicationLoaded', + sentAt: '2022-11-17T00:22:02.903+05:30', + }, + }, + ], + destType: 'campaign_manager', + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://dfareporting.googleapis.com/dfareporting/v4/userprofiles/437689/conversions/batchinsert', + headers: { + Authorization: 'Bearer dummyApiToken', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + kind: 'dfareporting#conversionsBatchInsertRequest', + conversions: [ + { + floodlightConfigurationId: '213123123', + ordinal: '1', + timestampMicros: '1668624722903000', + floodlightActivityId: '456543345245', + quantity: '455678', + value: 7, + matchId: '123', + limitAdTracking: true, + childDirectedTreatment: true, + nonPersonalizedAd: false, + treatmentForUnderage: false, + }, + { + floodlightConfigurationId: '213123123', + ordinal: '1', + timestampMicros: '1668624722903000', + floodlightActivityId: '456543345245', + quantity: '455678', + value: 7, + matchId: '111', + limitAdTracking: true, + childDirectedTreatment: true, + nonPersonalizedAd: false, + treatmentForUnderage: false, + }, + { + floodlightConfigurationId: '213123123', + ordinal: '1', + timestampMicros: '1668624722903000', + floodlightActivityId: '456543345245', + quantity: '455678', + value: 7, + gclid: '123', + limitAdTracking: true, + childDirectedTreatment: true, + nonPersonalizedAd: false, + treatmentForUnderage: false, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + metadata: [ + { + secret: { + access_token: 'dummyApiToken', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + jobId: 4, + }, + { + secret: { + access_token: 'dummyApiToken', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + jobId: 5, + }, + { + secret: { + access_token: 'dummyApiToken', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + jobId: 6, + }, + ], + batched: true, + statusCode: 200, + destination: { + Config: { + treatmentForUnderage: false, + limitAdTracking: false, + childDirectedTreatment: false, + nonPersonalizedAd: false, + rudderAccountId: '2EOknn1JNH7WK1MfNku4fGYKkRK', + }, + }, + }, + ], + }, + }, + }, + }, + { + name: 'campaign_manager', + description: 'Batch Sucessful BatchInsert and BatchUpdate Request', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + metadata: { + secret: { + access_token: 'dummyApiToken', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + jobId: 4, + }, + destination: { + Config: { + treatmentForUnderage: false, + limitAdTracking: false, + childDirectedTreatment: false, + nonPersonalizedAd: false, + rudderAccountId: '2EOknn1JNH7WK1MfNku4fGYKkRK', + }, + }, + message: { + channel: 'web', + event: 'Promotion Clicked', + originalTimestamp: '2022-11-17T00:22:02.903+05:30', + properties: { + profileId: 437689, + matchId: '123', + floodlightConfigurationId: '213123123', + quantity: '455678', + ordinal: '1', + floodlightActivityId: '456543345245', + value: 7, + limitAdTracking: true, + childDirectedTreatment: true, + requestType: 'batchupdate', + }, + type: 'track', + anonymousId: 'randomId', + integrations: { + All: true, + }, + name: 'ApplicationLoaded', + sentAt: '2022-11-17T00:22:02.903+05:30', + }, + }, + { + metadata: { + secret: { + access_token: 'dummyApiToken', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + jobId: 5, + }, + destination: { + Config: { + treatmentForUnderage: false, + limitAdTracking: false, + childDirectedTreatment: false, + nonPersonalizedAd: false, + rudderAccountId: '2EOknn1JNH7WK1MfNku4fGYKkRK', + }, + }, + message: { + channel: 'web', + event: 'Promotion Clicked', + type: 'track', + originalTimestamp: '2022-11-17T00:22:02.903+05:30', + properties: { + profileId: 437689, + floodlightConfigurationId: '213123123', + ordinal: '1', + floodlightActivityId: '456543345245', + quantity: '455678', + value: 7, + matchId: '111', + limitAdTracking: true, + childDirectedTreatment: true, + requestType: 'batchupdate', + }, + anonymousId: 'randomId', + integrations: { + All: true, + }, + name: 'ApplicationLoaded', + sentAt: '2022-11-17T00:22:02.903+05:30', + }, + }, + { + metadata: { + secret: { + access_token: 'dummyApiToken', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + jobId: 6, + }, + destination: { + Config: { + treatmentForUnderage: false, + limitAdTracking: false, + childDirectedTreatment: false, + nonPersonalizedAd: false, + rudderAccountId: '2EOknn1JNH7WK1MfNku4fGYKkRK', + }, + }, + message: { + channel: 'web', + event: 'Promotion Clicked', + type: 'track', + originalTimestamp: '2022-11-17T00:22:02.903+05:30', + properties: { + profileId: 437689, + floodlightConfigurationId: '213123123', + floodlightActivityId: '456543345245', + value: 7, + gclid: '123', + ordinal: '1', + quantity: '455678', + limitAdTracking: true, + childDirectedTreatment: true, + requestType: 'batchinsert', + }, + anonymousId: 'randomId', + integrations: { + All: true, + }, + name: 'ApplicationLoaded', + sentAt: '2022-11-17T00:22:02.903+05:30', + }, + }, + ], + destType: 'campaign_manager', + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://dfareporting.googleapis.com/dfareporting/v4/userprofiles/437689/conversions/batchupdate', + headers: { + Authorization: 'Bearer dummyApiToken', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + kind: 'dfareporting#conversionsBatchUpdateRequest', + conversions: [ + { + floodlightConfigurationId: '213123123', + ordinal: '1', + timestampMicros: '1668624722903000', + floodlightActivityId: '456543345245', + quantity: '455678', + value: 7, + matchId: '123', + nonPersonalizedAd: false, + treatmentForUnderage: false, + }, + { + floodlightConfigurationId: '213123123', + ordinal: '1', + timestampMicros: '1668624722903000', + floodlightActivityId: '456543345245', + quantity: '455678', + value: 7, + matchId: '111', + nonPersonalizedAd: false, + treatmentForUnderage: false, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + metadata: [ + { + secret: { + access_token: 'dummyApiToken', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + jobId: 4, + }, + { + secret: { + access_token: 'dummyApiToken', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + jobId: 5, + }, + ], + batched: true, + statusCode: 200, + destination: { + Config: { + treatmentForUnderage: false, + limitAdTracking: false, + childDirectedTreatment: false, + nonPersonalizedAd: false, + rudderAccountId: '2EOknn1JNH7WK1MfNku4fGYKkRK', + }, + }, + }, + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://dfareporting.googleapis.com/dfareporting/v4/userprofiles/437689/conversions/batchinsert', + headers: { + Authorization: 'Bearer dummyApiToken', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + kind: 'dfareporting#conversionsBatchInsertRequest', + conversions: [ + { + floodlightConfigurationId: '213123123', + ordinal: '1', + timestampMicros: '1668624722903000', + floodlightActivityId: '456543345245', + quantity: '455678', + value: 7, + gclid: '123', + limitAdTracking: true, + childDirectedTreatment: true, + nonPersonalizedAd: false, + treatmentForUnderage: false, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + metadata: [ + { + secret: { + access_token: 'dummyApiToken', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + jobId: 6, + }, + ], + batched: true, + statusCode: 200, + destination: { + Config: { + treatmentForUnderage: false, + limitAdTracking: false, + childDirectedTreatment: false, + nonPersonalizedAd: false, + rudderAccountId: '2EOknn1JNH7WK1MfNku4fGYKkRK', + }, + }, + }, + ], + }, + }, + }, + }, + { + name: 'campaign_manager', + description: 'Entire Batch has data instrumentation', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + metadata: { + secret: { + access_token: 'dummyApiToken', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + jobId: 4, + }, + destination: { + Config: { + treatmentForUnderage: false, + limitAdTracking: false, + childDirectedTreatment: false, + nonPersonalizedAd: false, + rudderAccountId: '2EOknn1JNH7WK1MfNku4fGYKkRK', + }, + }, + message: { + channel: 'web', + event: 'Promotion Clicked', + originalTimestamp: '2022-11-17T00:22:02.903+05:30', + properties: { + profileId: 437689, + floodlightConfigurationId: '213123123', + quantity: '455678', + ordinal: '1', + floodlightActivityId: '456543345245', + value: 7, + limitAdTracking: true, + childDirectedTreatment: true, + requestType: 'batchupdate', + }, + type: 'track', + anonymousId: 'randomId', + integrations: { + All: true, + }, + name: 'ApplicationLoaded', + sentAt: '2022-11-17T00:22:02.903+05:30', + }, + }, + { + metadata: { + secret: { + access_token: 'dummyApiToken', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + jobId: 5, + }, + destination: { + Config: { + treatmentForUnderage: false, + limitAdTracking: false, + childDirectedTreatment: false, + nonPersonalizedAd: false, + rudderAccountId: '2EOknn1JNH7WK1MfNku4fGYKkRK', + }, + }, + message: { + channel: 'web', + event: 'Promotion Clicked', + type: 'track', + originalTimestamp: '2022-11-17T00:22:02.903+05:30', + properties: { + profileId: 437689, + floodlightConfigurationId: '213123123', + ordinal: '1', + floodlightActivityId: '456543345245', + quantity: '455678', + value: 7, + limitAdTracking: true, + childDirectedTreatment: true, + requestType: 'batchupdate', + }, + anonymousId: 'randomId', + integrations: { + All: true, + }, + name: 'ApplicationLoaded', + sentAt: '2022-11-17T00:22:02.903+05:30', + }, + }, + { + metadata: { + secret: { + access_token: 'dummyApiToken', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + jobId: 6, + }, + destination: { + Config: { + treatmentForUnderage: false, + limitAdTracking: false, + childDirectedTreatment: false, + nonPersonalizedAd: false, + rudderAccountId: '2EOknn1JNH7WK1MfNku4fGYKkRK', + }, + }, + message: { + channel: 'web', + event: 'Promotion Clicked', + type: 'track', + originalTimestamp: '2022-11-17T00:22:02.903+05:30', + properties: { + profileId: 437689, + floodlightConfigurationId: '213123123', + floodlightActivityId: '456543345245', + value: 7, + + ordinal: '1', + quantity: '455678', + limitAdTracking: true, + childDirectedTreatment: true, + requestType: 'batchinsert', + }, + anonymousId: 'randomId', + integrations: { + All: true, + }, + name: 'ApplicationLoaded', + sentAt: '2022-11-17T00:22:02.903+05:30', + }, + }, + ], + destType: 'campaign_manager', + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + metadata: [ + { + secret: { + access_token: 'dummyApiToken', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + jobId: 4, + }, + ], + batched: false, + statusCode: 400, + error: + '[CAMPAIGN MANAGER (DCM)]: Atleast one of encryptedUserId,encryptedUserIdCandidates, matchId, mobileDeviceId, gclid, dclid, impressionId.', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'CAMPAIGN_MANAGER', + module: 'destination', + implementation: 'native', + feature: 'router', + }, + destination: { + Config: { + treatmentForUnderage: false, + limitAdTracking: false, + childDirectedTreatment: false, + nonPersonalizedAd: false, + rudderAccountId: '2EOknn1JNH7WK1MfNku4fGYKkRK', + }, + }, + }, + { + metadata: [ + { + secret: { + access_token: 'dummyApiToken', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + jobId: 5, + }, + ], + batched: false, + statusCode: 400, + error: + '[CAMPAIGN MANAGER (DCM)]: Atleast one of encryptedUserId,encryptedUserIdCandidates, matchId, mobileDeviceId, gclid, dclid, impressionId.', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'CAMPAIGN_MANAGER', + module: 'destination', + implementation: 'native', + feature: 'router', + }, + destination: { + Config: { + treatmentForUnderage: false, + limitAdTracking: false, + childDirectedTreatment: false, + nonPersonalizedAd: false, + rudderAccountId: '2EOknn1JNH7WK1MfNku4fGYKkRK', + }, + }, + }, + { + metadata: [ + { + secret: { + access_token: 'dummyApiToken', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + jobId: 6, + }, + ], + batched: false, + statusCode: 400, + error: + '[CAMPAIGN MANAGER (DCM)]: Atleast one of encryptedUserId,encryptedUserIdCandidates, matchId, mobileDeviceId, gclid, dclid, impressionId.', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'CAMPAIGN_MANAGER', + module: 'destination', + implementation: 'native', + feature: 'router', + }, + destination: { + Config: { + treatmentForUnderage: false, + limitAdTracking: false, + childDirectedTreatment: false, + nonPersonalizedAd: false, + rudderAccountId: '2EOknn1JNH7WK1MfNku4fGYKkRK', + }, + }, + }, + ], + }, + }, + }, + }, ]; From 1a8d825ccbb87d34d8ae5ff2cb02f4be9700eee6 Mon Sep 17 00:00:00 2001 From: AASHISH MALIK Date: Fri, 1 Dec 2023 10:54:27 +0530 Subject: [PATCH 037/135] fix: updated transformerProxyV1 name (#2859) --- src/features.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/features.json b/src/features.json index 23c01c3731..2d064eeae0 100644 --- a/src/features.json +++ b/src/features.json @@ -65,5 +65,5 @@ "TIKTOK_AUDIENCE": true }, "supportSourceTransformV1": true, - "transformerProxyV1": true + "supportTransformerProxyV1": true } From a015460f0a6d2d5320f633abc151febf22561b6b Mon Sep 17 00:00:00 2001 From: Sankeerth Date: Fri, 1 Dec 2023 12:33:42 +0530 Subject: [PATCH 038/135] fix: error handling in active_campaign (#2843) --- .../destinations/active_campaign/transform.js | 53 +++---------------- src/v0/destinations/active_campaign/util.js | 35 +++++------- 2 files changed, 20 insertions(+), 68 deletions(-) diff --git a/src/v0/destinations/active_campaign/transform.js b/src/v0/destinations/active_campaign/transform.js index e00808622d..973a928472 100644 --- a/src/v0/destinations/active_campaign/transform.js +++ b/src/v0/destinations/active_campaign/transform.js @@ -1,11 +1,7 @@ /* eslint-disable array-callback-return */ /* eslint-disable no-empty */ const get = require('get-value'); -const { - InstrumentationError, - TransformationError, - NetworkError, -} = require('@rudderstack/integrations-lib'); +const { InstrumentationError, TransformationError } = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { CONFIG_CATEGORIES, MAPPING_CONFIG, getHeader } = require('./config'); const { @@ -17,8 +13,6 @@ const { } = require('../../util'); const { errorHandler } = require('./util'); const { httpGET, httpPOST } = require('../../../adapters/network'); -const { getDynamicErrorType } = require('../../../adapters/utils/networkUtils'); -const tags = require('../../util/tags'); const TOTAL_RECORDS_KEY = 'response.data.meta.total'; const EVENT_DATA_KEY = 'properties.eventData'; @@ -72,14 +66,7 @@ const syncContact = async (contactPayload, category, destination) => { } const createdContact = get(res, 'response.data.contact'); // null safe if (!createdContact) { - throw new NetworkError( - 'Unable to Create Contact', - res.response?.status, - { - [tags.TAG_NAMES.ERROR_TYPE]: getDynamicErrorType(res.response?.status), - }, - res.response, - ); + errorHandler(res.response, 'Failed to create new contact'); } return createdContact.id; }; @@ -421,14 +408,7 @@ const screenRequestHandler = async (message, category, destination) => { } if (res?.response?.status !== 200) { - throw new NetworkError( - 'Unable to create event', - res.response?.status, - { - [tags.TAG_NAMES.ERROR_TYPE]: getDynamicErrorType(res.response?.status), - }, - res.response, - ); + errorHandler(res.response, 'Unable to create event'); } const storedEventsArr = res.response?.data?.eventTrackingEvents; @@ -455,14 +435,7 @@ const screenRequestHandler = async (message, category, destination) => { } if (res.response.status !== 201) { - throw new NetworkError( - 'Unable to create event', - res.response.status, - { - [tags.TAG_NAMES.ERROR_TYPE]: getDynamicErrorType(res.response.status), - }, - res?.response, - ); + errorHandler(res.response, 'Unable to create event'); } } // Previous operations successfull then @@ -499,14 +472,7 @@ const trackRequestHandler = async (message, category, destination) => { } if (res.response.status !== 200) { - throw new NetworkError( - 'Unable to fetch events. Aborting', - res.response.status, - { - [tags.TAG_NAMES.ERROR_TYPE]: getDynamicErrorType(res.response.status), - }, - res?.response, - ); + errorHandler(res.response, 'Unable to fetch events. Aborting'); } const storedEventsArr = res.response?.data?.eventTrackingEvents; @@ -529,14 +495,7 @@ const trackRequestHandler = async (message, category, destination) => { feature: 'transformation', }); if (res.response?.status !== 201) { - throw new NetworkError( - 'Unable to create event. Aborting', - res.response.status, - { - [tags.TAG_NAMES.ERROR_TYPE]: getDynamicErrorType(res.response.status), - }, - res.response, - ); + errorHandler(res.response, 'Unable to create event. Aborting'); } } diff --git a/src/v0/destinations/active_campaign/util.js b/src/v0/destinations/active_campaign/util.js index 6e1f5a3683..457413c3e2 100644 --- a/src/v0/destinations/active_campaign/util.js +++ b/src/v0/destinations/active_campaign/util.js @@ -1,31 +1,24 @@ const { NetworkError } = require('@rudderstack/integrations-lib'); const { - nodeSysErrorToStatus, getDynamicErrorType, + processAxiosResponse, } = require('../../../adapters/utils/networkUtils'); const tags = require('../../util/tags'); -const errorHandler = (err, message) => { - if (err.response) { - throw new NetworkError( - `${message} (${err.response?.statusText},${JSON.stringify(err.response?.data)})`, - err.status, - { - [tags.TAG_NAMES.ERROR_TYPE]: getDynamicErrorType(err.status), - }, - err, - ); - } else { - const httpError = nodeSysErrorToStatus(err.code); - throw new NetworkError( - `${message} ${httpError.message}`, - httpError.status, - { - [tags.TAG_NAMES.ERROR_TYPE]: getDynamicErrorType(httpError.status), - }, - err, - ); +const errorHandler = (httpCallError, message) => { + const {response, status} = processAxiosResponse(httpCallError); + let msg = message; + if (response) { + msg = `${message} (${httpCallError.response?.statusText},${JSON.stringify(response)})`; } + throw new NetworkError( + msg, + status, + { + [tags.TAG_NAMES.ERROR_TYPE]: getDynamicErrorType(status), + }, + response, + ); }; const offsetLimitVarPath = 'response.data.meta.total'; From 284d1411514c26dda2403a4a18967e5f40e255ea Mon Sep 17 00:00:00 2001 From: AASHISH MALIK Date: Fri, 1 Dec 2023 20:14:44 +0530 Subject: [PATCH 039/135] feat: onboard webhook to component tests (#2837) --- .../destinations/webhook/processor/data.ts | 4929 +++++++++-------- .../destinations/webhook/router/data.ts | 22 +- 2 files changed, 2781 insertions(+), 2170 deletions(-) diff --git a/test/integrations/destinations/webhook/processor/data.ts b/test/integrations/destinations/webhook/processor/data.ts index d02fa58227..8f37a26da2 100644 --- a/test/integrations/destinations/webhook/processor/data.ts +++ b/test/integrations/destinations/webhook/processor/data.ts @@ -1,2170 +1,2761 @@ export const data = [ - { - name: 'webhook', - description: 'Test 0', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - message: { - anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - context: { - device: { - id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', - manufacturer: 'Xiaomi', - model: 'Redmi 6', - name: 'xiaomi', - }, - network: { carrier: 'Banglalink' }, - os: { name: 'android', version: '8.1.0' }, - traits: { - address: { city: 'Dhaka', country: 'Bangladesh' }, - anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - }, - }, - event: 'spin_result', - integrations: { All: true }, - message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', - properties: { - additional_bet_index: 0, - battle_id: 'N/A', - bet_amount: 9, - bet_level: 1, - bet_multiplier: 1, - coin_balance: 9466052, - current_module_name: 'CasinoGameModule', - days_in_game: 0, - extra_param: 'N/A', - fb_profile: '0', - featureGameType: 'N/A', - game_fps: 30, - game_id: 'fireEagleBase', - game_name: 'FireEagleSlots', - gem_balance: 0, - graphicsQuality: 'HD', - idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', - internetReachability: 'ReachableViaLocalAreaNetwork', - isLowEndDevice: 'False', - is_auto_spin: 'False', - is_turbo: 'False', - isf: 'False', - ishighroller: 'False', - jackpot_win_amount: 90, - jackpot_win_type: 'Silver', - level: 6, - lifetime_gem_balance: 0, - no_of_spin: 1, - player_total_battles: 0, - player_total_shields: 0, - start_date: '2019-08-01', - total_payments: 0, - tournament_id: 'T1561970819', - userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - versionSessionCount: 2, - win_amount: 0, - }, - timestamp: '2019-09-01T15:46:51.693229+05:30', - type: 'track', - user_properties: { - coin_balance: 9466052, - current_module_name: 'CasinoGameModule', - fb_profile: '0', - game_fps: 30, - game_name: 'FireEagleSlots', - gem_balance: 0, - graphicsQuality: 'HD', - idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', - internetReachability: 'ReachableViaLocalAreaNetwork', - isLowEndDevice: false, - level: 6, - lifetime_gem_balance: 0, - player_total_battles: 0, - player_total_shields: 0, - start_date: '2019-08-01', - total_payments: 0, - userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - versionSessionCount: 2, - }, - }, - destination: { - Config: { - webhookUrl: 'http://6b0e6a60.ngrok.io', - headers: [ - { from: '', to: '' }, - { from: 'test2', to: 'value2' }, - ], - }, - }, - }, - ], - method: 'POST', - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - body: { - XML: {}, - JSON_ARRAY: {}, - JSON: { - timestamp: '2019-09-01T15:46:51.693229+05:30', - user_properties: { - total_payments: 0, - internetReachability: 'ReachableViaLocalAreaNetwork', - level: 6, - userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - coin_balance: 9466052, - player_total_shields: 0, - isLowEndDevice: false, - game_fps: 30, - idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', - graphicsQuality: 'HD', - current_module_name: 'CasinoGameModule', - player_total_battles: 0, - lifetime_gem_balance: 0, - gem_balance: 0, - fb_profile: '0', - start_date: '2019-08-01', - versionSessionCount: 2, - game_name: 'FireEagleSlots', - }, - integrations: { All: true }, - event: 'spin_result', - message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', - anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - context: { - device: { - model: 'Redmi 6', - manufacturer: 'Xiaomi', - id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', - name: 'xiaomi', - }, - traits: { - anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - address: { city: 'Dhaka', country: 'Bangladesh' }, - }, - os: { version: '8.1.0', name: 'android' }, - network: { carrier: 'Banglalink' }, - }, - type: 'track', - properties: { - userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - jackpot_win_type: 'Silver', - coin_balance: 9466052, - bet_level: 1, - ishighroller: 'False', - tournament_id: 'T1561970819', - battle_id: 'N/A', - bet_amount: 9, - fb_profile: '0', - player_total_shields: 0, - is_turbo: 'False', - player_total_battles: 0, - bet_multiplier: 1, - start_date: '2019-08-01', - versionSessionCount: 2, - graphicsQuality: 'HD', - is_auto_spin: 'False', - days_in_game: 0, - additional_bet_index: 0, - isLowEndDevice: 'False', - game_fps: 30, - extra_param: 'N/A', - idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', - current_module_name: 'CasinoGameModule', - game_id: 'fireEagleBase', - featureGameType: 'N/A', - gem_balance: 0, - internetReachability: 'ReachableViaLocalAreaNetwork', - total_payments: 0, - level: 6, - win_amount: 0, - no_of_spin: 1, - game_name: 'FireEagleSlots', - jackpot_win_amount: 90, - lifetime_gem_balance: 0, - isf: 'False', - }, - }, - FORM: {}, - }, - files: {}, - endpoint: 'http://6b0e6a60.ngrok.io', - userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - headers: { 'content-type': 'application/json', test2: 'value2' }, - version: '1', - params: {}, - type: 'REST', - method: 'POST', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'webhook', - description: 'Test 1', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - message: { - anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - context: { - device: { - id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', - manufacturer: 'Xiaomi', - model: 'Redmi 6', - name: 'xiaomi', - }, - network: { carrier: 'Banglalink' }, - os: { name: 'android', version: '8.1.0' }, - traits: { - address: { city: 'Dhaka', country: 'Bangladesh' }, - anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - }, - }, - event: 'spin_result', - integrations: { All: true }, - message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', - properties: { - additional_bet_index: 0, - battle_id: 'N/A', - bet_amount: 9, - bet_level: 1, - bet_multiplier: 1, - coin_balance: 9466052, - current_module_name: 'CasinoGameModule', - days_in_game: 0, - extra_param: 'N/A', - fb_profile: '0', - featureGameType: 'N/A', - game_fps: 30, - game_id: 'fireEagleBase', - game_name: 'FireEagleSlots', - gem_balance: 0, - graphicsQuality: 'HD', - idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', - internetReachability: 'ReachableViaLocalAreaNetwork', - isLowEndDevice: 'False', - is_auto_spin: 'False', - is_turbo: 'False', - isf: 'False', - ishighroller: 'False', - jackpot_win_amount: 90, - jackpot_win_type: 'Silver', - level: 6, - lifetime_gem_balance: 0, - no_of_spin: 1, - player_total_battles: 0, - player_total_shields: 0, - start_date: '2019-08-01', - total_payments: 0, - tournament_id: 'T1561970819', - userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - versionSessionCount: 2, - win_amount: 0, - }, - timestamp: '2019-09-01T15:46:51.693229+05:30', - type: 'track', - user_properties: { - coin_balance: 9466052, - current_module_name: 'CasinoGameModule', - fb_profile: '0', - game_fps: 30, - game_name: 'FireEagleSlots', - gem_balance: 0, - graphicsQuality: 'HD', - idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', - internetReachability: 'ReachableViaLocalAreaNetwork', - isLowEndDevice: false, - level: 6, - lifetime_gem_balance: 0, - player_total_battles: 0, - player_total_shields: 0, - start_date: '2019-08-01', - total_payments: 0, - userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - versionSessionCount: 2, - }, - }, - destination: { Config: { webhookUrl: 'https://6b0e6a60.ngrok.io/n' } }, - }, - ], - method: 'POST', - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - body: { - XML: {}, - JSON_ARRAY: {}, - JSON: { - timestamp: '2019-09-01T15:46:51.693229+05:30', - user_properties: { - total_payments: 0, - internetReachability: 'ReachableViaLocalAreaNetwork', - level: 6, - userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - coin_balance: 9466052, - player_total_shields: 0, - isLowEndDevice: false, - game_fps: 30, - idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', - graphicsQuality: 'HD', - current_module_name: 'CasinoGameModule', - player_total_battles: 0, - lifetime_gem_balance: 0, - gem_balance: 0, - fb_profile: '0', - start_date: '2019-08-01', - versionSessionCount: 2, - game_name: 'FireEagleSlots', - }, - integrations: { All: true }, - event: 'spin_result', - message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', - anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - context: { - device: { - model: 'Redmi 6', - manufacturer: 'Xiaomi', - id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', - name: 'xiaomi', - }, - traits: { - anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - address: { city: 'Dhaka', country: 'Bangladesh' }, - }, - os: { version: '8.1.0', name: 'android' }, - network: { carrier: 'Banglalink' }, - }, - type: 'track', - properties: { - userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - jackpot_win_type: 'Silver', - coin_balance: 9466052, - bet_level: 1, - ishighroller: 'False', - tournament_id: 'T1561970819', - battle_id: 'N/A', - bet_amount: 9, - fb_profile: '0', - player_total_shields: 0, - is_turbo: 'False', - player_total_battles: 0, - bet_multiplier: 1, - start_date: '2019-08-01', - versionSessionCount: 2, - graphicsQuality: 'HD', - is_auto_spin: 'False', - days_in_game: 0, - additional_bet_index: 0, - isLowEndDevice: 'False', - game_fps: 30, - extra_param: 'N/A', - idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', - current_module_name: 'CasinoGameModule', - game_id: 'fireEagleBase', - featureGameType: 'N/A', - gem_balance: 0, - internetReachability: 'ReachableViaLocalAreaNetwork', - total_payments: 0, - level: 6, - win_amount: 0, - no_of_spin: 1, - game_name: 'FireEagleSlots', - jackpot_win_amount: 90, - lifetime_gem_balance: 0, - isf: 'False', - }, - }, - FORM: {}, - }, - files: {}, - endpoint: 'https://6b0e6a60.ngrok.io/n', - userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - headers: { 'content-type': 'application/json' }, - version: '1', - params: {}, - type: 'REST', - method: 'POST', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'webhook', - description: 'Test 2', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - message: { - anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - context: { - device: { - id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', - manufacturer: 'Xiaomi', - model: 'Redmi 6', - name: 'xiaomi', - }, - network: { carrier: 'Banglalink' }, - os: { name: 'android', version: '8.1.0' }, - traits: { - address: { city: 'Dhaka', country: 'Bangladesh' }, - anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - }, - }, - event: 'spin_result', - integrations: { All: true }, - message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', - properties: { - additional_bet_index: 0, - battle_id: 'N/A', - bet_amount: 9, - bet_level: 1, - bet_multiplier: 1, - coin_balance: 9466052, - current_module_name: 'CasinoGameModule', - days_in_game: 0, - extra_param: 'N/A', - fb_profile: '0', - featureGameType: 'N/A', - game_fps: 30, - game_id: 'fireEagleBase', - game_name: 'FireEagleSlots', - gem_balance: 0, - graphicsQuality: 'HD', - idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', - internetReachability: 'ReachableViaLocalAreaNetwork', - isLowEndDevice: 'False', - is_auto_spin: 'False', - is_turbo: 'False', - isf: 'False', - ishighroller: 'False', - jackpot_win_amount: 90, - jackpot_win_type: 'Silver', - level: 6, - lifetime_gem_balance: 0, - no_of_spin: 1, - player_total_battles: 0, - player_total_shields: 0, - start_date: '2019-08-01', - total_payments: 0, - tournament_id: 'T1561970819', - userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - versionSessionCount: 2, - win_amount: 0, - }, - timestamp: '2019-09-01T15:46:51.693229+05:30', - type: 'track', - user_properties: { - coin_balance: 9466052, - current_module_name: 'CasinoGameModule', - fb_profile: '0', - game_fps: 30, - game_name: 'FireEagleSlots', - gem_balance: 0, - graphicsQuality: 'HD', - idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', - internetReachability: 'ReachableViaLocalAreaNetwork', - isLowEndDevice: false, - level: 6, - lifetime_gem_balance: 0, - player_total_battles: 0, - player_total_shields: 0, - start_date: '2019-08-01', - total_payments: 0, - userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - versionSessionCount: 2, - }, - }, - destination: { Config: { webhookUrl: 'https://6b0e6a60.' } }, - }, - ], - method: 'POST', - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - body: { - XML: {}, - JSON_ARRAY: {}, - JSON: { - timestamp: '2019-09-01T15:46:51.693229+05:30', - user_properties: { - total_payments: 0, - internetReachability: 'ReachableViaLocalAreaNetwork', - level: 6, - userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - coin_balance: 9466052, - player_total_shields: 0, - isLowEndDevice: false, - game_fps: 30, - idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', - graphicsQuality: 'HD', - current_module_name: 'CasinoGameModule', - player_total_battles: 0, - lifetime_gem_balance: 0, - gem_balance: 0, - fb_profile: '0', - start_date: '2019-08-01', - versionSessionCount: 2, - game_name: 'FireEagleSlots', - }, - integrations: { All: true }, - event: 'spin_result', - message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', - anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - context: { - device: { - model: 'Redmi 6', - manufacturer: 'Xiaomi', - id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', - name: 'xiaomi', - }, - traits: { - anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - address: { city: 'Dhaka', country: 'Bangladesh' }, - }, - os: { version: '8.1.0', name: 'android' }, - network: { carrier: 'Banglalink' }, - }, - type: 'track', - properties: { - userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - jackpot_win_type: 'Silver', - coin_balance: 9466052, - bet_level: 1, - ishighroller: 'False', - tournament_id: 'T1561970819', - battle_id: 'N/A', - bet_amount: 9, - fb_profile: '0', - player_total_shields: 0, - is_turbo: 'False', - player_total_battles: 0, - bet_multiplier: 1, - start_date: '2019-08-01', - versionSessionCount: 2, - graphicsQuality: 'HD', - is_auto_spin: 'False', - days_in_game: 0, - additional_bet_index: 0, - isLowEndDevice: 'False', - game_fps: 30, - extra_param: 'N/A', - idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', - current_module_name: 'CasinoGameModule', - game_id: 'fireEagleBase', - featureGameType: 'N/A', - gem_balance: 0, - internetReachability: 'ReachableViaLocalAreaNetwork', - total_payments: 0, - level: 6, - win_amount: 0, - no_of_spin: 1, - game_name: 'FireEagleSlots', - jackpot_win_amount: 90, - lifetime_gem_balance: 0, - isf: 'False', - }, - }, - FORM: {}, - }, - files: {}, - endpoint: 'https://6b0e6a60.', - userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - headers: { 'content-type': 'application/json' }, - version: '1', - params: {}, - type: 'REST', - method: 'POST', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'webhook', - description: 'Test 3', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - message: { - anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - context: { - device: { - id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', - manufacturer: 'Xiaomi', - model: 'Redmi 6', - name: 'xiaomi', - }, - network: { carrier: 'Banglalink' }, - os: { name: 'android', version: '8.1.0' }, - traits: { - address: { city: 'Dhaka', country: 'Bangladesh' }, - anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - }, - }, - event: 'spin_result', - integrations: { All: true }, - message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', - properties: { k1: 'v1', k2: { k3: 'c3', k4: { k5: 'c5' } } }, - timestamp: '2019-09-01T15:46:51.693229+05:30', - type: 'track', - }, - destination: { - Config: { - webhookUrl: 'https://6b0e6a60.', - webhookMethod: 'GET', - headers: [{ from: 'X-customHeader', to: 'customHeaderVal' }], - }, - }, - }, - ], - method: 'POST', - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'GET', - endpoint: 'https://6b0e6a60.', - headers: { 'x-customheader': 'customHeaderVal' }, - params: { k1: 'v1', 'k2.k3': 'c3', 'k2.k4.k5': 'c5' }, - body: { JSON: {}, XML: {}, JSON_ARRAY: {}, FORM: {} }, - files: {}, - userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'webhook', - description: 'Test 4', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - message: { - anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - context: { - device: { - id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', - manufacturer: 'Xiaomi', - model: 'Redmi 6', - name: 'xiaomi', - }, - network: { carrier: 'Banglalink' }, - os: { name: 'android', version: '8.1.0' }, - traits: { - address: { city: 'Dhaka', country: 'Bangladesh' }, - anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - }, - }, - event: 'spin_result', - integrations: { All: true }, - message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', - properties: { k1: 'v1', k2: { k3: 'c3', k4: { k5: 'c5' } } }, - timestamp: '2019-09-01T15:46:51.693229+05:30', - type: 'track', - }, - destination: { Config: { webhookUrl: 'https://6b0e6a60.', webhookMethod: 'GET' } }, - }, - ], - method: 'POST', - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'GET', - endpoint: 'https://6b0e6a60.', - headers: {}, - params: { k1: 'v1', 'k2.k3': 'c3', 'k2.k4.k5': 'c5' }, - body: { JSON: {}, XML: {}, JSON_ARRAY: {}, FORM: {} }, - files: {}, - userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'webhook', - description: 'Test 5', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - message: { - anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - context: { - device: { - id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', - manufacturer: 'Xiaomi', - model: 'Redmi 6', - name: 'xiaomi', - }, - network: { carrier: 'Banglalink' }, - os: { name: 'android', version: '8.1.0' }, - traits: { - address: { city: 'Dhaka', country: 'Bangladesh' }, - anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - }, - }, - event: 'spin_result', - integrations: { All: true }, - message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', - properties: { - additional_bet_index: 0, - battle_id: 'N/A', - bet_amount: 9, - bet_level: 1, - bet_multiplier: 1, - coin_balance: 9466052, - current_module_name: 'CasinoGameModule', - days_in_game: 0, - extra_param: 'N/A', - fb_profile: '0', - featureGameType: 'N/A', - game_fps: 30, - game_id: 'fireEagleBase', - game_name: 'FireEagleSlots', - gem_balance: 0, - graphicsQuality: 'HD', - idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', - internetReachability: 'ReachableViaLocalAreaNetwork', - isLowEndDevice: 'False', - is_auto_spin: 'False', - is_turbo: 'False', - isf: 'False', - ishighroller: 'False', - jackpot_win_amount: 90, - jackpot_win_type: 'Silver', - level: 6, - lifetime_gem_balance: 0, - no_of_spin: 1, - player_total_battles: 0, - player_total_shields: 0, - start_date: '2019-08-01', - total_payments: 0, - tournament_id: 'T1561970819', - userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - versionSessionCount: 2, - win_amount: 0, - }, - timestamp: '2019-09-01T15:46:51.693229+05:30', - type: 'track', - request_ip: '127.0.0.1', - }, - destination: { - Config: { - webhookUrl: 'http://6b0e6a60.ngrok.io', - header: [ - { from: 'test1', to: 'value1' }, - { from: 'test2', to: 'value2' }, - ], - }, - }, - }, - ], - method: 'POST', - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'http://6b0e6a60.ngrok.io', - headers: { 'content-type': 'application/json' }, - params: {}, - body: { - JSON: { - anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - context: { - device: { - id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', - manufacturer: 'Xiaomi', - model: 'Redmi 6', - name: 'xiaomi', - }, - network: { carrier: 'Banglalink' }, - os: { name: 'android', version: '8.1.0' }, - traits: { - address: { city: 'Dhaka', country: 'Bangladesh' }, - anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - }, - ip: '127.0.0.1', - }, - event: 'spin_result', - integrations: { All: true }, - message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', - properties: { - additional_bet_index: 0, - battle_id: 'N/A', - bet_amount: 9, - bet_level: 1, - bet_multiplier: 1, - coin_balance: 9466052, - current_module_name: 'CasinoGameModule', - days_in_game: 0, - extra_param: 'N/A', - fb_profile: '0', - featureGameType: 'N/A', - game_fps: 30, - game_id: 'fireEagleBase', - game_name: 'FireEagleSlots', - gem_balance: 0, - graphicsQuality: 'HD', - idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', - internetReachability: 'ReachableViaLocalAreaNetwork', - isLowEndDevice: 'False', - is_auto_spin: 'False', - is_turbo: 'False', - isf: 'False', - ishighroller: 'False', - jackpot_win_amount: 90, - jackpot_win_type: 'Silver', - level: 6, - lifetime_gem_balance: 0, - no_of_spin: 1, - player_total_battles: 0, - player_total_shields: 0, - start_date: '2019-08-01', - total_payments: 0, - tournament_id: 'T1561970819', - userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - versionSessionCount: 2, - win_amount: 0, - }, - timestamp: '2019-09-01T15:46:51.693229+05:30', - type: 'track', - request_ip: '127.0.0.1', - }, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'webhook', - description: 'Test 6', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - message: { - anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - context: { - device: { - id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', - manufacturer: 'Xiaomi', - model: 'Redmi 6', - name: 'xiaomi', - }, - network: { carrier: 'Banglalink' }, - os: { name: 'android', version: '8.1.0' }, - traits: { - address: { city: 'Dhaka', country: 'Bangladesh' }, - anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - }, - }, - event: 'spin_result', - integrations: { All: true }, - message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', - properties: { - additional_bet_index: 0, - battle_id: 'N/A', - bet_amount: 9, - bet_level: 1, - bet_multiplier: 1, - coin_balance: 9466052, - current_module_name: 'CasinoGameModule', - days_in_game: 0, - extra_param: 'N/A', - fb_profile: '0', - featureGameType: 'N/A', - game_fps: 30, - game_id: 'fireEagleBase', - game_name: 'FireEagleSlots', - gem_balance: 0, - graphicsQuality: 'HD', - idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', - internetReachability: 'ReachableViaLocalAreaNetwork', - isLowEndDevice: 'False', - is_auto_spin: 'False', - is_turbo: 'False', - isf: 'False', - ishighroller: 'False', - jackpot_win_amount: 90, - jackpot_win_type: 'Silver', - level: 6, - lifetime_gem_balance: 0, - no_of_spin: 1, - player_total_battles: 0, - player_total_shields: 0, - start_date: '2019-08-01', - total_payments: 0, - tournament_id: 'T1561970819', - userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - versionSessionCount: 2, - win_amount: 0, - }, - timestamp: '2019-09-01T15:46:51.693229+05:30', - type: 'track', - request_ip: '127.0.0.1', - }, - destination: { - Config: { - webhookUrl: 'http://6b0e6a60.ngrok.io', - headers: [ - { from: 'Content-Type', to: 'application/xml' }, - { from: 'test2', to: 'value2' }, - ], - }, - }, - }, - ], - method: 'POST', - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'http://6b0e6a60.ngrok.io', - headers: { 'content-type': 'application/xml', test2: 'value2' }, - params: {}, - body: { - JSON: { - anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - context: { - device: { - id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', - manufacturer: 'Xiaomi', - model: 'Redmi 6', - name: 'xiaomi', - }, - network: { carrier: 'Banglalink' }, - os: { name: 'android', version: '8.1.0' }, - traits: { - address: { city: 'Dhaka', country: 'Bangladesh' }, - anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - }, - ip: '127.0.0.1', - }, - event: 'spin_result', - integrations: { All: true }, - message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', - properties: { - additional_bet_index: 0, - battle_id: 'N/A', - bet_amount: 9, - bet_level: 1, - bet_multiplier: 1, - coin_balance: 9466052, - current_module_name: 'CasinoGameModule', - days_in_game: 0, - extra_param: 'N/A', - fb_profile: '0', - featureGameType: 'N/A', - game_fps: 30, - game_id: 'fireEagleBase', - game_name: 'FireEagleSlots', - gem_balance: 0, - graphicsQuality: 'HD', - idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', - internetReachability: 'ReachableViaLocalAreaNetwork', - isLowEndDevice: 'False', - is_auto_spin: 'False', - is_turbo: 'False', - isf: 'False', - ishighroller: 'False', - jackpot_win_amount: 90, - jackpot_win_type: 'Silver', - level: 6, - lifetime_gem_balance: 0, - no_of_spin: 1, - player_total_battles: 0, - player_total_shields: 0, - start_date: '2019-08-01', - total_payments: 0, - tournament_id: 'T1561970819', - userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - versionSessionCount: 2, - win_amount: 0, - }, - timestamp: '2019-09-01T15:46:51.693229+05:30', - type: 'track', - request_ip: '127.0.0.1', - }, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'webhook', - description: 'Test 7', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - message: { - anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - event: 'spin_result', - integrations: { All: true }, - message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', - properties: { - additional_bet_index: 0, - battle_id: 'N/A', - bet_amount: 9, - bet_level: 1, - bet_multiplier: 1, - coin_balance: 9466052, - current_module_name: 'CasinoGameModule', - days_in_game: 0, - extra_param: 'N/A', - fb_profile: '0', - featureGameType: 'N/A', - game_fps: 30, - game_id: 'fireEagleBase', - game_name: 'FireEagleSlots', - gem_balance: 0, - graphicsQuality: 'HD', - idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', - internetReachability: 'ReachableViaLocalAreaNetwork', - isLowEndDevice: 'False', - is_auto_spin: 'False', - is_turbo: 'False', - isf: 'False', - ishighroller: 'False', - jackpot_win_amount: 90, - jackpot_win_type: 'Silver', - level: 6, - lifetime_gem_balance: 0, - no_of_spin: 1, - player_total_battles: 0, - player_total_shields: 0, - start_date: '2019-08-01', - total_payments: 0, - tournament_id: 'T1561970819', - userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - versionSessionCount: 2, - win_amount: 0, - }, - timestamp: '2019-09-01T15:46:51.693229+05:30', - type: 'track', - }, - destination: { - Config: { - webhookUrl: 'http://6b0e6a60.ngrok.io', - headers: [ - { from: 'Content-Type', to: 'application/xml' }, - { from: 'test2', to: 'value2' }, - ], - }, - }, - }, - ], - method: 'POST', - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'http://6b0e6a60.ngrok.io', - headers: { 'content-type': 'application/xml', test2: 'value2' }, - params: {}, - body: { - JSON: { - anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - event: 'spin_result', - integrations: { All: true }, - message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', - properties: { - additional_bet_index: 0, - battle_id: 'N/A', - bet_amount: 9, - bet_level: 1, - bet_multiplier: 1, - coin_balance: 9466052, - current_module_name: 'CasinoGameModule', - days_in_game: 0, - extra_param: 'N/A', - fb_profile: '0', - featureGameType: 'N/A', - game_fps: 30, - game_id: 'fireEagleBase', - game_name: 'FireEagleSlots', - gem_balance: 0, - graphicsQuality: 'HD', - idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', - internetReachability: 'ReachableViaLocalAreaNetwork', - isLowEndDevice: 'False', - is_auto_spin: 'False', - is_turbo: 'False', - isf: 'False', - ishighroller: 'False', - jackpot_win_amount: 90, - jackpot_win_type: 'Silver', - level: 6, - lifetime_gem_balance: 0, - no_of_spin: 1, - player_total_battles: 0, - player_total_shields: 0, - start_date: '2019-08-01', - total_payments: 0, - tournament_id: 'T1561970819', - userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - versionSessionCount: 2, - win_amount: 0, - }, - timestamp: '2019-09-01T15:46:51.693229+05:30', - type: 'track', - }, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'webhook', - description: 'Test 8', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - message: { - anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - context: { - device: { - id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', - manufacturer: 'Xiaomi', - model: 'Redmi 6', - name: 'xiaomi', - }, - network: { carrier: 'Banglalink' }, - os: { name: 'android', version: '8.1.0' }, - traits: { - address: { city: 'Dhaka', country: 'Bangladesh' }, - anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - }, - }, - event: 'spin_result', - integrations: { All: true }, - message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', - properties: { - additional_bet_index: 0, - battle_id: 'N/A', - featureGameType: 'N/A', - win_amount: 0, - }, - timestamp: '2019-09-01T15:46:51.693229+05:30', - type: 'track', - header: { - dynamic_header_key_string: 'dynamic_header_value_string', - dynamic_header_key_num: 10, - dynamic_header_key_object: { k1: 'v1' }, - }, - appendPath: '/product/search?string=value', - }, - destination: { - Config: { - webhookUrl: 'http://6b0e6a60.ngrok.io', - headers: [ - { from: '', to: '' }, - { from: 'test2', to: 'value2' }, - ], - }, - }, - }, - ], - method: 'POST', - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - body: { - XML: {}, - JSON_ARRAY: {}, - JSON: { - anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - context: { - device: { - id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', - manufacturer: 'Xiaomi', - model: 'Redmi 6', - name: 'xiaomi', - }, - network: { carrier: 'Banglalink' }, - os: { name: 'android', version: '8.1.0' }, - traits: { - address: { city: 'Dhaka', country: 'Bangladesh' }, - anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - }, - }, - event: 'spin_result', - integrations: { All: true }, - message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', - properties: { - additional_bet_index: 0, - battle_id: 'N/A', - featureGameType: 'N/A', - win_amount: 0, - }, - timestamp: '2019-09-01T15:46:51.693229+05:30', - type: 'track', - }, - FORM: {}, - }, - files: {}, - endpoint: 'http://6b0e6a60.ngrok.io/product/search?string=value', - userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - headers: { - 'content-type': 'application/json', - test2: 'value2', - dynamic_header_key_string: 'dynamic_header_value_string', - }, - version: '1', - params: {}, - type: 'REST', - method: 'POST', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'webhook', - description: 'Test 9', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - message: { - anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - context: { - device: { - id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', - manufacturer: 'Xiaomi', - model: 'Redmi 6', - name: 'xiaomi', - }, - network: { carrier: 'Banglalink' }, - os: { name: 'android', version: '8.1.0' }, - traits: { - address: { city: 'Dhaka', country: 'Bangladesh' }, - anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - }, - }, - event: 'spin_result', - integrations: { All: true }, - message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', - properties: { - additional_bet_index: 0, - battle_id: 'N/A', - featureGameType: 'N/A', - win_amount: 0, - }, - timestamp: '2019-09-01T15:46:51.693229+05:30', - type: 'track', - fullPath: 'https://www.google.com', - }, - destination: { - Config: { - webhookUrl: 'http://6b0e6a60.ngrok.io', - headers: [ - { from: '', to: '' }, - { from: 'test2', to: 'value2' }, - ], - }, - }, - }, - ], - method: 'POST', - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - body: { - XML: {}, - JSON_ARRAY: {}, - JSON: { - anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - context: { - device: { - id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', - manufacturer: 'Xiaomi', - model: 'Redmi 6', - name: 'xiaomi', - }, - network: { carrier: 'Banglalink' }, - os: { name: 'android', version: '8.1.0' }, - traits: { - address: { city: 'Dhaka', country: 'Bangladesh' }, - anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - }, - }, - event: 'spin_result', - integrations: { All: true }, - message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', - properties: { - additional_bet_index: 0, - battle_id: 'N/A', - featureGameType: 'N/A', - win_amount: 0, - }, - timestamp: '2019-09-01T15:46:51.693229+05:30', - type: 'track', - }, - FORM: {}, - }, - files: {}, - endpoint: 'https://www.google.com', - userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - headers: { 'content-type': 'application/json', test2: 'value2' }, - version: '1', - params: {}, - type: 'REST', - method: 'POST', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'webhook', - description: 'Test 10', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - message: { - anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - context: { - device: { - id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', - manufacturer: 'Xiaomi', - model: 'Redmi 6', - name: 'xiaomi', - }, - network: { carrier: 'Banglalink' }, - os: { name: 'android', version: '8.1.0' }, - traits: { - address: { city: 'Dhaka', country: 'Bangladesh' }, - anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - }, - }, - event: 'spin_result', - integrations: { All: true }, - message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', - properties: { - additional_bet_index: 0, - battle_id: 'N/A', - featureGameType: 'N/A', - win_amount: 0, - }, - timestamp: '2019-09-01T15:46:51.693229+05:30', - type: 'track', - fullPath: 'https://www.google.com/', - appendPath: '?searchTerms=cats', - }, - destination: { - Config: { - webhookUrl: 'http://6b0e6a60.ngrok.io', - headers: [ - { from: '', to: '' }, - { from: 'test2', to: 'value2' }, - ], - }, - }, - }, - ], - method: 'POST', - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - body: { - XML: {}, - JSON_ARRAY: {}, - JSON: { - anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - context: { - device: { - id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', - manufacturer: 'Xiaomi', - model: 'Redmi 6', - name: 'xiaomi', - }, - network: { carrier: 'Banglalink' }, - os: { name: 'android', version: '8.1.0' }, - traits: { - address: { city: 'Dhaka', country: 'Bangladesh' }, - anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - }, - }, - event: 'spin_result', - integrations: { All: true }, - message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', - properties: { - additional_bet_index: 0, - battle_id: 'N/A', - featureGameType: 'N/A', - win_amount: 0, - }, - timestamp: '2019-09-01T15:46:51.693229+05:30', - type: 'track', - }, - FORM: {}, - }, - files: {}, - endpoint: 'https://www.google.com/?searchTerms=cats', - userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - headers: { 'content-type': 'application/json', test2: 'value2' }, - version: '1', - params: {}, - type: 'REST', - method: 'POST', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'webhook', - description: 'Test 11', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - message: { - anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - context: { - device: { - id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', - manufacturer: 'Xiaomi', - model: 'Redmi 6', - name: 'xiaomi', - }, - network: { carrier: 'Banglalink' }, - os: { name: 'android', version: '8.1.0' }, - traits: { - address: { city: 'Dhaka', country: 'Bangladesh' }, - anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - }, - }, - event: 'spin_result', - integrations: { All: true }, - message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', - properties: { - additional_bet_index: 0, - battle_id: 'N/A', - featureGameType: 'N/A', - win_amount: 0, - }, - timestamp: '2019-09-01T15:46:51.693229+05:30', - type: 'track', - fullPath: 'https://www.google.com/', - appendPath: '?searchTerms=cats', - }, - destination: { - Config: { - webhookUrl: 'http://6b0e6a60.ngrok.io', - webhookMethod: 'PUT', - headers: [ - { from: '', to: '' }, - { from: 'test2', to: 'value2' }, - ], - }, - }, - }, - ], - method: 'POST', - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - body: { - XML: {}, - JSON_ARRAY: {}, - JSON: { - anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - context: { - device: { - id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', - manufacturer: 'Xiaomi', - model: 'Redmi 6', - name: 'xiaomi', - }, - network: { carrier: 'Banglalink' }, - os: { name: 'android', version: '8.1.0' }, - traits: { - address: { city: 'Dhaka', country: 'Bangladesh' }, - anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - }, - }, - event: 'spin_result', - integrations: { All: true }, - message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', - properties: { - additional_bet_index: 0, - battle_id: 'N/A', - featureGameType: 'N/A', - win_amount: 0, - }, - timestamp: '2019-09-01T15:46:51.693229+05:30', - type: 'track', - }, - FORM: {}, - }, - files: {}, - endpoint: 'https://www.google.com/?searchTerms=cats', - userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - headers: { 'content-type': 'application/json', test2: 'value2' }, - version: '1', - params: {}, - type: 'REST', - method: 'PUT', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'webhook', - description: 'Test 12', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - message: { - anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - context: { - device: { - id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', - manufacturer: 'Xiaomi', - model: 'Redmi 6', - name: 'xiaomi', - }, - network: { carrier: 'Banglalink' }, - os: { name: 'android', version: '8.1.0' }, - traits: { - address: { city: 'Dhaka', country: 'Bangladesh' }, - anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - }, - }, - event: 'spin_result', - integrations: { All: true }, - message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', - properties: { - additional_bet_index: 0, - battle_id: 'N/A', - featureGameType: 'N/A', - win_amount: 0, - }, - timestamp: '2019-09-01T15:46:51.693229+05:30', - type: 'track', - fullPath: 'https://www.google.com/', - appendPath: '?searchTerms=cats', - }, - destination: { - Config: { - webhookUrl: 'http://6b0e6a60.ngrok.io', - webhookMethod: 'DELETE', - headers: [ - { from: '', to: '' }, - { from: 'test2', to: 'value2' }, - ], - }, - }, - }, - ], - method: 'POST', - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - body: { XML: {}, JSON_ARRAY: {}, JSON: {}, FORM: {} }, - files: {}, - endpoint: 'https://www.google.com/?searchTerms=cats', - userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - headers: { test2: 'value2' }, - version: '1', - params: { - additional_bet_index: 0, - battle_id: 'N/A', - featureGameType: 'N/A', - win_amount: 0, - }, - type: 'REST', - method: 'DELETE', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'webhook', - description: 'Test 13', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - message: { - anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - context: { - device: { - id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', - manufacturer: 'Xiaomi', - model: 'Redmi 6', - name: 'xiaomi', - }, - network: { carrier: 'Banglalink' }, - os: { name: 'android', version: '8.1.0' }, - traits: { - address: { city: 'Dhaka', country: 'Bangladesh' }, - anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - }, - }, - event: 'spin_result', - integrations: { All: true }, - message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', - properties: { - additional_bet_index: 0, - battle_id: 'N/A', - bet_amount: 9, - bet_level: 1, - bet_multiplier: 1, - coin_balance: 9466052, - current_module_name: 'CasinoGameModule', - days_in_game: 0, - extra_param: 'N/A', - fb_profile: '0', - featureGameType: 'N/A', - game_fps: 30, - game_id: 'fireEagleBase', - game_name: 'FireEagleSlots', - gem_balance: 0, - graphicsQuality: 'HD', - idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', - internetReachability: 'ReachableViaLocalAreaNetwork', - isLowEndDevice: 'False', - is_auto_spin: 'False', - is_turbo: 'False', - isf: 'False', - ishighroller: 'False', - jackpot_win_amount: 90, - jackpot_win_type: 'Silver', - level: 6, - lifetime_gem_balance: 0, - no_of_spin: 1, - player_total_battles: 0, - player_total_shields: 0, - start_date: '2019-08-01', - total_payments: 0, - tournament_id: 'T1561970819', - userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - versionSessionCount: 2, - win_amount: 0, - }, - timestamp: '2019-09-01T15:46:51.693229+05:30', - type: 'track', - user_properties: { - coin_balance: 9466052, - current_module_name: 'CasinoGameModule', - fb_profile: '0', - game_fps: 30, - game_name: 'FireEagleSlots', - gem_balance: 0, - graphicsQuality: 'HD', - idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', - internetReachability: 'ReachableViaLocalAreaNetwork', - isLowEndDevice: false, - level: 6, - lifetime_gem_balance: 0, - player_total_battles: 0, - player_total_shields: 0, - start_date: '2019-08-01', - total_payments: 0, - userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - versionSessionCount: 2, - }, - }, - destination: { - Config: { - webhookUrl: 'http://6b0e6a60.ngrok.io', - webhookMethod: 'POST', - headers: [{ from: 'test2', to: 'value2' }], - }, - }, - }, - ], - method: 'POST', - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - body: { - FORM: {}, - JSON: { - anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - context: { - device: { - id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', - manufacturer: 'Xiaomi', - model: 'Redmi 6', - name: 'xiaomi', - }, - network: { carrier: 'Banglalink' }, - os: { name: 'android', version: '8.1.0' }, - traits: { - address: { city: 'Dhaka', country: 'Bangladesh' }, - anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - }, - }, - event: 'spin_result', - integrations: { All: true }, - message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', - properties: { - additional_bet_index: 0, - battle_id: 'N/A', - bet_amount: 9, - bet_level: 1, - bet_multiplier: 1, - coin_balance: 9466052, - current_module_name: 'CasinoGameModule', - days_in_game: 0, - extra_param: 'N/A', - fb_profile: '0', - featureGameType: 'N/A', - game_fps: 30, - game_id: 'fireEagleBase', - game_name: 'FireEagleSlots', - gem_balance: 0, - graphicsQuality: 'HD', - idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', - internetReachability: 'ReachableViaLocalAreaNetwork', - isLowEndDevice: 'False', - is_auto_spin: 'False', - is_turbo: 'False', - isf: 'False', - ishighroller: 'False', - jackpot_win_amount: 90, - jackpot_win_type: 'Silver', - level: 6, - lifetime_gem_balance: 0, - no_of_spin: 1, - player_total_battles: 0, - player_total_shields: 0, - start_date: '2019-08-01', - total_payments: 0, - tournament_id: 'T1561970819', - userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - versionSessionCount: 2, - win_amount: 0, - }, - timestamp: '2019-09-01T15:46:51.693229+05:30', - type: 'track', - user_properties: { - coin_balance: 9466052, - current_module_name: 'CasinoGameModule', - fb_profile: '0', - game_fps: 30, - game_name: 'FireEagleSlots', - gem_balance: 0, - graphicsQuality: 'HD', - idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', - internetReachability: 'ReachableViaLocalAreaNetwork', - isLowEndDevice: false, - level: 6, - lifetime_gem_balance: 0, - player_total_battles: 0, - player_total_shields: 0, - start_date: '2019-08-01', - total_payments: 0, - userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - versionSessionCount: 2, - }, - }, - JSON_ARRAY: {}, - XML: {}, - }, - endpoint: 'http://6b0e6a60.ngrok.io', - files: {}, - headers: { 'content-type': 'application/json', test2: 'value2' }, - method: 'POST', - params: {}, - type: 'REST', - userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - version: '1', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'webhook', - description: 'Test 14', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - message: { - anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - context: { - device: { - id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', - manufacturer: 'Xiaomi', - model: 'Redmi 6', - name: 'xiaomi', - }, - network: { carrier: 'Banglalink' }, - os: { name: 'android', version: '8.1.0' }, - traits: { - address: { city: 'Dhaka', country: 'Bangladesh' }, - anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - }, - }, - event: 'spin_result', - integrations: { All: true }, - message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', - properties: { - additional_bet_index: 0, - battle_id: 'N/A', - bet_amount: 9, - bet_level: 1, - bet_multiplier: 1, - coin_balance: 9466052, - current_module_name: 'CasinoGameModule', - days_in_game: 0, - extra_param: 'N/A', - fb_profile: '0', - featureGameType: 'N/A', - game_fps: 30, - game_id: 'fireEagleBase', - game_name: 'FireEagleSlots', - gem_balance: 0, - graphicsQuality: 'HD', - idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', - internetReachability: 'ReachableViaLocalAreaNetwork', - isLowEndDevice: 'False', - is_auto_spin: 'False', - is_turbo: 'False', - isf: 'False', - ishighroller: 'False', - jackpot_win_amount: 90, - jackpot_win_type: 'Silver', - level: 6, - lifetime_gem_balance: 0, - no_of_spin: 1, - player_total_battles: 0, - player_total_shields: 0, - start_date: '2019-08-01', - total_payments: 0, - tournament_id: 'T1561970819', - userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - versionSessionCount: 2, - win_amount: 0, - }, - timestamp: '2019-09-01T15:46:51.693229+05:30', - type: 'track', - user_properties: { - coin_balance: 9466052, - current_module_name: 'CasinoGameModule', - fb_profile: '0', - game_fps: 30, - game_name: 'FireEagleSlots', - gem_balance: 0, - graphicsQuality: 'HD', - idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', - internetReachability: 'ReachableViaLocalAreaNetwork', - isLowEndDevice: false, - level: 6, - lifetime_gem_balance: 0, - player_total_battles: 0, - player_total_shields: 0, - start_date: '2019-08-01', - total_payments: 0, - userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - versionSessionCount: 2, - }, - }, - destination: { - Config: { - webhookUrl: 'http://6b0e6a60.ngrok.io', - webhookMethod: 'PATCH', - headers: [{ from: 'test2', to: 'value2' }], - }, - }, - }, - ], - method: 'POST', - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - body: { - FORM: {}, - JSON: { - anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - context: { - device: { - id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', - manufacturer: 'Xiaomi', - model: 'Redmi 6', - name: 'xiaomi', - }, - network: { carrier: 'Banglalink' }, - os: { name: 'android', version: '8.1.0' }, - traits: { - address: { city: 'Dhaka', country: 'Bangladesh' }, - anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - }, - }, - event: 'spin_result', - integrations: { All: true }, - message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', - properties: { - additional_bet_index: 0, - battle_id: 'N/A', - bet_amount: 9, - bet_level: 1, - bet_multiplier: 1, - coin_balance: 9466052, - current_module_name: 'CasinoGameModule', - days_in_game: 0, - extra_param: 'N/A', - fb_profile: '0', - featureGameType: 'N/A', - game_fps: 30, - game_id: 'fireEagleBase', - game_name: 'FireEagleSlots', - gem_balance: 0, - graphicsQuality: 'HD', - idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', - internetReachability: 'ReachableViaLocalAreaNetwork', - isLowEndDevice: 'False', - is_auto_spin: 'False', - is_turbo: 'False', - isf: 'False', - ishighroller: 'False', - jackpot_win_amount: 90, - jackpot_win_type: 'Silver', - level: 6, - lifetime_gem_balance: 0, - no_of_spin: 1, - player_total_battles: 0, - player_total_shields: 0, - start_date: '2019-08-01', - total_payments: 0, - tournament_id: 'T1561970819', - userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - versionSessionCount: 2, - win_amount: 0, - }, - timestamp: '2019-09-01T15:46:51.693229+05:30', - type: 'track', - user_properties: { - coin_balance: 9466052, - current_module_name: 'CasinoGameModule', - fb_profile: '0', - game_fps: 30, - game_name: 'FireEagleSlots', - gem_balance: 0, - graphicsQuality: 'HD', - idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', - internetReachability: 'ReachableViaLocalAreaNetwork', - isLowEndDevice: false, - level: 6, - lifetime_gem_balance: 0, - player_total_battles: 0, - player_total_shields: 0, - start_date: '2019-08-01', - total_payments: 0, - userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - versionSessionCount: 2, - }, - }, - JSON_ARRAY: {}, - XML: {}, - }, - endpoint: 'http://6b0e6a60.ngrok.io', - files: {}, - headers: { 'content-type': 'application/json', test2: 'value2' }, - method: 'PATCH', - params: {}, - type: 'REST', - userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - version: '1', - }, - statusCode: 200, - }, - ], - }, - }, - }, -]; + { + "name": "webhook", + "description": "Test 0", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "context": { + "device": { + "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", + "manufacturer": "Xiaomi", + "model": "Redmi 6", + "name": "xiaomi" + }, + "network": { + "carrier": "Banglalink" + }, + "os": { + "name": "android", + "version": "8.1.0" + }, + "traits": { + "address": { + "city": "Dhaka", + "country": "Bangladesh" + }, + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" + } + }, + "event": "spin_result", + "integrations": { + "All": true + }, + "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", + "properties": { + "additional_bet_index": 0, + "battle_id": "N/A", + "bet_amount": 9, + "bet_level": 1, + "bet_multiplier": 1, + "coin_balance": 9466052, + "current_module_name": "CasinoGameModule", + "days_in_game": 0, + "extra_param": "N/A", + "fb_profile": "0", + "featureGameType": "N/A", + "game_fps": 30, + "game_id": "fireEagleBase", + "game_name": "FireEagleSlots", + "gem_balance": 0, + "graphicsQuality": "HD", + "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", + "internetReachability": "ReachableViaLocalAreaNetwork", + "isLowEndDevice": "False", + "is_auto_spin": "False", + "is_turbo": "False", + "isf": "False", + "ishighroller": "False", + "jackpot_win_amount": 90, + "jackpot_win_type": "Silver", + "level": 6, + "lifetime_gem_balance": 0, + "no_of_spin": 1, + "player_total_battles": 0, + "player_total_shields": 0, + "start_date": "2019-08-01", + "total_payments": 0, + "tournament_id": "T1561970819", + "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "versionSessionCount": 2, + "win_amount": 0 + }, + "timestamp": "2019-09-01T15:46:51.693229+05:30", + "type": "track", + "user_properties": { + "coin_balance": 9466052, + "current_module_name": "CasinoGameModule", + "fb_profile": "0", + "game_fps": 30, + "game_name": "FireEagleSlots", + "gem_balance": 0, + "graphicsQuality": "HD", + "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", + "internetReachability": "ReachableViaLocalAreaNetwork", + "isLowEndDevice": false, + "level": 6, + "lifetime_gem_balance": 0, + "player_total_battles": 0, + "player_total_shields": 0, + "start_date": "2019-08-01", + "total_payments": 0, + "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "versionSessionCount": 2 + } + }, + "destination": { + "Config": { + "webhookUrl": "http://6b0e6a60.ngrok.io", + "headers": [ + { + "from": "", + "to": "" + }, + { + "from": "test2", + "to": "value2" + } + ] + }, + "DestinationDefinition": { + "Config": { + "cdkV2Enabled": true + } + } + }, + "metadata": { + "destinationId": "destId", + "workspaceId": "wspId" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "JSON": { + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "context": { + "device": { + "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", + "manufacturer": "Xiaomi", + "model": "Redmi 6", + "name": "xiaomi" + }, + "network": { + "carrier": "Banglalink" + }, + "os": { + "name": "android", + "version": "8.1.0" + }, + "traits": { + "address": { + "city": "Dhaka", + "country": "Bangladesh" + }, + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" + } + }, + "event": "spin_result", + "integrations": { + "All": true + }, + "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", + "properties": { + "additional_bet_index": 0, + "battle_id": "N/A", + "bet_amount": 9, + "bet_level": 1, + "bet_multiplier": 1, + "coin_balance": 9466052, + "current_module_name": "CasinoGameModule", + "days_in_game": 0, + "extra_param": "N/A", + "fb_profile": "0", + "featureGameType": "N/A", + "game_fps": 30, + "game_id": "fireEagleBase", + "game_name": "FireEagleSlots", + "gem_balance": 0, + "graphicsQuality": "HD", + "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", + "internetReachability": "ReachableViaLocalAreaNetwork", + "isLowEndDevice": "False", + "is_auto_spin": "False", + "is_turbo": "False", + "isf": "False", + "ishighroller": "False", + "jackpot_win_amount": 90, + "jackpot_win_type": "Silver", + "level": 6, + "lifetime_gem_balance": 0, + "no_of_spin": 1, + "player_total_battles": 0, + "player_total_shields": 0, + "start_date": "2019-08-01", + "total_payments": 0, + "tournament_id": "T1561970819", + "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "versionSessionCount": 2, + "win_amount": 0 + }, + "timestamp": "2019-09-01T15:46:51.693229+05:30", + "type": "track", + "user_properties": { + "coin_balance": 9466052, + "current_module_name": "CasinoGameModule", + "fb_profile": "0", + "game_fps": 30, + "game_name": "FireEagleSlots", + "gem_balance": 0, + "graphicsQuality": "HD", + "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", + "internetReachability": "ReachableViaLocalAreaNetwork", + "isLowEndDevice": false, + "level": 6, + "lifetime_gem_balance": 0, + "player_total_battles": 0, + "player_total_shields": 0, + "start_date": "2019-08-01", + "total_payments": 0, + "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "versionSessionCount": 2 + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "version": "1", + "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "type": "REST", + "method": "POST", + "endpoint": "http://6b0e6a60.ngrok.io", + "headers": { + "content-type": "application/json", + "test2": "value2" + }, + "params": {}, + "files": {} + }, + "metadata": { + "destinationId": "destId", + "workspaceId": "wspId" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "webhook", + "description": "Test 1", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "context": { + "device": { + "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", + "manufacturer": "Xiaomi", + "model": "Redmi 6", + "name": "xiaomi" + }, + "network": { + "carrier": "Banglalink" + }, + "os": { + "name": "android", + "version": "8.1.0" + }, + "traits": { + "address": { + "city": "Dhaka", + "country": "Bangladesh" + }, + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" + } + }, + "event": "spin_result", + "integrations": { + "All": true + }, + "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", + "properties": { + "additional_bet_index": 0, + "battle_id": "N/A", + "bet_amount": 9, + "bet_level": 1, + "bet_multiplier": 1, + "coin_balance": 9466052, + "current_module_name": "CasinoGameModule", + "days_in_game": 0, + "extra_param": "N/A", + "fb_profile": "0", + "featureGameType": "N/A", + "game_fps": 30, + "game_id": "fireEagleBase", + "game_name": "FireEagleSlots", + "gem_balance": 0, + "graphicsQuality": "HD", + "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", + "internetReachability": "ReachableViaLocalAreaNetwork", + "isLowEndDevice": "False", + "is_auto_spin": "False", + "is_turbo": "False", + "isf": "False", + "ishighroller": "False", + "jackpot_win_amount": 90, + "jackpot_win_type": "Silver", + "level": 6, + "lifetime_gem_balance": 0, + "no_of_spin": 1, + "player_total_battles": 0, + "player_total_shields": 0, + "start_date": "2019-08-01", + "total_payments": 0, + "tournament_id": "T1561970819", + "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "versionSessionCount": 2, + "win_amount": 0 + }, + "timestamp": "2019-09-01T15:46:51.693229+05:30", + "type": "track", + "user_properties": { + "coin_balance": 9466052, + "current_module_name": "CasinoGameModule", + "fb_profile": "0", + "game_fps": 30, + "game_name": "FireEagleSlots", + "gem_balance": 0, + "graphicsQuality": "HD", + "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", + "internetReachability": "ReachableViaLocalAreaNetwork", + "isLowEndDevice": false, + "level": 6, + "lifetime_gem_balance": 0, + "player_total_battles": 0, + "player_total_shields": 0, + "start_date": "2019-08-01", + "total_payments": 0, + "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "versionSessionCount": 2 + } + }, + "destination": { + "Config": { + "webhookUrl": "https://6b0e6a60.ngrok.io/n" + }, + "DestinationDefinition": { + "Config": { + "cdkV2Enabled": true + } + } + }, + "metadata": { + "destinationId": "destId", + "workspaceId": "wspId" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "JSON": { + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "context": { + "device": { + "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", + "manufacturer": "Xiaomi", + "model": "Redmi 6", + "name": "xiaomi" + }, + "network": { + "carrier": "Banglalink" + }, + "os": { + "name": "android", + "version": "8.1.0" + }, + "traits": { + "address": { + "city": "Dhaka", + "country": "Bangladesh" + }, + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" + } + }, + "event": "spin_result", + "integrations": { + "All": true + }, + "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", + "properties": { + "additional_bet_index": 0, + "battle_id": "N/A", + "bet_amount": 9, + "bet_level": 1, + "bet_multiplier": 1, + "coin_balance": 9466052, + "current_module_name": "CasinoGameModule", + "days_in_game": 0, + "extra_param": "N/A", + "fb_profile": "0", + "featureGameType": "N/A", + "game_fps": 30, + "game_id": "fireEagleBase", + "game_name": "FireEagleSlots", + "gem_balance": 0, + "graphicsQuality": "HD", + "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", + "internetReachability": "ReachableViaLocalAreaNetwork", + "isLowEndDevice": "False", + "is_auto_spin": "False", + "is_turbo": "False", + "isf": "False", + "ishighroller": "False", + "jackpot_win_amount": 90, + "jackpot_win_type": "Silver", + "level": 6, + "lifetime_gem_balance": 0, + "no_of_spin": 1, + "player_total_battles": 0, + "player_total_shields": 0, + "start_date": "2019-08-01", + "total_payments": 0, + "tournament_id": "T1561970819", + "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "versionSessionCount": 2, + "win_amount": 0 + }, + "timestamp": "2019-09-01T15:46:51.693229+05:30", + "type": "track", + "user_properties": { + "coin_balance": 9466052, + "current_module_name": "CasinoGameModule", + "fb_profile": "0", + "game_fps": 30, + "game_name": "FireEagleSlots", + "gem_balance": 0, + "graphicsQuality": "HD", + "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", + "internetReachability": "ReachableViaLocalAreaNetwork", + "isLowEndDevice": false, + "level": 6, + "lifetime_gem_balance": 0, + "player_total_battles": 0, + "player_total_shields": 0, + "start_date": "2019-08-01", + "total_payments": 0, + "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "versionSessionCount": 2 + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "version": "1", + "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "type": "REST", + "method": "POST", + "endpoint": "https://6b0e6a60.ngrok.io/n", + "headers": { + "content-type": "application/json" + }, + "params": {}, + "files": {} + }, + "metadata": { + "destinationId": "destId", + "workspaceId": "wspId" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "webhook", + "description": "Test 2", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "context": { + "device": { + "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", + "manufacturer": "Xiaomi", + "model": "Redmi 6", + "name": "xiaomi" + }, + "network": { + "carrier": "Banglalink" + }, + "os": { + "name": "android", + "version": "8.1.0" + }, + "traits": { + "address": { + "city": "Dhaka", + "country": "Bangladesh" + }, + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" + } + }, + "event": "spin_result", + "integrations": { + "All": true + }, + "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", + "properties": { + "additional_bet_index": 0, + "battle_id": "N/A", + "bet_amount": 9, + "bet_level": 1, + "bet_multiplier": 1, + "coin_balance": 9466052, + "current_module_name": "CasinoGameModule", + "days_in_game": 0, + "extra_param": "N/A", + "fb_profile": "0", + "featureGameType": "N/A", + "game_fps": 30, + "game_id": "fireEagleBase", + "game_name": "FireEagleSlots", + "gem_balance": 0, + "graphicsQuality": "HD", + "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", + "internetReachability": "ReachableViaLocalAreaNetwork", + "isLowEndDevice": "False", + "is_auto_spin": "False", + "is_turbo": "False", + "isf": "False", + "ishighroller": "False", + "jackpot_win_amount": 90, + "jackpot_win_type": "Silver", + "level": 6, + "lifetime_gem_balance": 0, + "no_of_spin": 1, + "player_total_battles": 0, + "player_total_shields": 0, + "start_date": "2019-08-01", + "total_payments": 0, + "tournament_id": "T1561970819", + "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "versionSessionCount": 2, + "win_amount": 0 + }, + "timestamp": "2019-09-01T15:46:51.693229+05:30", + "type": "track", + "user_properties": { + "coin_balance": 9466052, + "current_module_name": "CasinoGameModule", + "fb_profile": "0", + "game_fps": 30, + "game_name": "FireEagleSlots", + "gem_balance": 0, + "graphicsQuality": "HD", + "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", + "internetReachability": "ReachableViaLocalAreaNetwork", + "isLowEndDevice": false, + "level": 6, + "lifetime_gem_balance": 0, + "player_total_battles": 0, + "player_total_shields": 0, + "start_date": "2019-08-01", + "total_payments": 0, + "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "versionSessionCount": 2 + } + }, + "destination": { + "Config": { + "webhookUrl": "https://6b0e6a60." + }, + "DestinationDefinition": { + "Config": { + "cdkV2Enabled": true + } + } + }, + "metadata": { + "destinationId": "destId", + "workspaceId": "wspId" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "JSON": { + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "context": { + "device": { + "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", + "manufacturer": "Xiaomi", + "model": "Redmi 6", + "name": "xiaomi" + }, + "network": { + "carrier": "Banglalink" + }, + "os": { + "name": "android", + "version": "8.1.0" + }, + "traits": { + "address": { + "city": "Dhaka", + "country": "Bangladesh" + }, + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" + } + }, + "event": "spin_result", + "integrations": { + "All": true + }, + "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", + "properties": { + "additional_bet_index": 0, + "battle_id": "N/A", + "bet_amount": 9, + "bet_level": 1, + "bet_multiplier": 1, + "coin_balance": 9466052, + "current_module_name": "CasinoGameModule", + "days_in_game": 0, + "extra_param": "N/A", + "fb_profile": "0", + "featureGameType": "N/A", + "game_fps": 30, + "game_id": "fireEagleBase", + "game_name": "FireEagleSlots", + "gem_balance": 0, + "graphicsQuality": "HD", + "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", + "internetReachability": "ReachableViaLocalAreaNetwork", + "isLowEndDevice": "False", + "is_auto_spin": "False", + "is_turbo": "False", + "isf": "False", + "ishighroller": "False", + "jackpot_win_amount": 90, + "jackpot_win_type": "Silver", + "level": 6, + "lifetime_gem_balance": 0, + "no_of_spin": 1, + "player_total_battles": 0, + "player_total_shields": 0, + "start_date": "2019-08-01", + "total_payments": 0, + "tournament_id": "T1561970819", + "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "versionSessionCount": 2, + "win_amount": 0 + }, + "timestamp": "2019-09-01T15:46:51.693229+05:30", + "type": "track", + "user_properties": { + "coin_balance": 9466052, + "current_module_name": "CasinoGameModule", + "fb_profile": "0", + "game_fps": 30, + "game_name": "FireEagleSlots", + "gem_balance": 0, + "graphicsQuality": "HD", + "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", + "internetReachability": "ReachableViaLocalAreaNetwork", + "isLowEndDevice": false, + "level": 6, + "lifetime_gem_balance": 0, + "player_total_battles": 0, + "player_total_shields": 0, + "start_date": "2019-08-01", + "total_payments": 0, + "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "versionSessionCount": 2 + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "version": "1", + "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "type": "REST", + "method": "POST", + "endpoint": "https://6b0e6a60.", + "headers": { + "content-type": "application/json" + }, + "params": {}, + "files": {} + }, + "metadata": { + "destinationId": "destId", + "workspaceId": "wspId" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "webhook", + "description": "Test 3", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "context": { + "device": { + "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", + "manufacturer": "Xiaomi", + "model": "Redmi 6", + "name": "xiaomi" + }, + "network": { + "carrier": "Banglalink" + }, + "os": { + "name": "android", + "version": "8.1.0" + }, + "traits": { + "address": { + "city": "Dhaka", + "country": "Bangladesh" + }, + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" + } + }, + "event": "spin_result", + "integrations": { + "All": true + }, + "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", + "properties": { + "k1": "v1", + "k2": { + "k3": "c3", + "k4": { + "k5": "c5" + } + } + }, + "timestamp": "2019-09-01T15:46:51.693229+05:30", + "type": "track" + }, + "destination": { + "Config": { + "webhookUrl": "https://6b0e6a60.", + "webhookMethod": "GET", + "headers": [ + { + "from": "X-customHeader", + "to": "customHeaderVal" + } + ] + }, + "DestinationDefinition": { + "Config": { + "cdkV2Enabled": true + } + } + }, + "metadata": { + "destinationId": "destId", + "workspaceId": "wspId" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "JSON": {}, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "version": "1", + "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "type": "REST", + "method": "GET", + "endpoint": "https://6b0e6a60.", + "headers": { + "x-customheader": "customHeaderVal" + }, + "params": { + "k1": "v1", + "k2.k3": "c3", + "k2.k4.k5": "c5" + }, + "files": {} + }, + "metadata": { + "destinationId": "destId", + "workspaceId": "wspId" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "webhook", + "description": "Test 4", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "context": { + "device": { + "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", + "manufacturer": "Xiaomi", + "model": "Redmi 6", + "name": "xiaomi" + }, + "network": { + "carrier": "Banglalink" + }, + "os": { + "name": "android", + "version": "8.1.0" + }, + "traits": { + "address": { + "city": "Dhaka", + "country": "Bangladesh" + }, + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" + } + }, + "event": "spin_result", + "integrations": { + "All": true + }, + "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", + "properties": { + "k1": "v1", + "k2": { + "k3": "c3", + "k4": { + "k5": "c5" + } + } + }, + "timestamp": "2019-09-01T15:46:51.693229+05:30", + "type": "track" + }, + "destination": { + "Config": { + "webhookUrl": "https://6b0e6a60.", + "webhookMethod": "GET" + }, + "DestinationDefinition": { + "Config": { + "cdkV2Enabled": true + } + } + }, + "metadata": { + "destinationId": "destId", + "workspaceId": "wspId" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "JSON": {}, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "version": "1", + "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "type": "REST", + "method": "GET", + "endpoint": "https://6b0e6a60.", + "headers": {}, + "params": { + "k1": "v1", + "k2.k3": "c3", + "k2.k4.k5": "c5" + }, + "files": {} + }, + "metadata": { + "destinationId": "destId", + "workspaceId": "wspId" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "webhook", + "description": "Test 5", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "context": { + "device": { + "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", + "manufacturer": "Xiaomi", + "model": "Redmi 6", + "name": "xiaomi" + }, + "network": { + "carrier": "Banglalink" + }, + "os": { + "name": "android", + "version": "8.1.0" + }, + "traits": { + "address": { + "city": "Dhaka", + "country": "Bangladesh" + }, + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" + } + }, + "event": "spin_result", + "integrations": { + "All": true + }, + "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", + "properties": { + "additional_bet_index": 0, + "battle_id": "N/A", + "bet_amount": 9, + "bet_level": 1, + "bet_multiplier": 1, + "coin_balance": 9466052, + "current_module_name": "CasinoGameModule", + "days_in_game": 0, + "extra_param": "N/A", + "fb_profile": "0", + "featureGameType": "N/A", + "game_fps": 30, + "game_id": "fireEagleBase", + "game_name": "FireEagleSlots", + "gem_balance": 0, + "graphicsQuality": "HD", + "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", + "internetReachability": "ReachableViaLocalAreaNetwork", + "isLowEndDevice": "False", + "is_auto_spin": "False", + "is_turbo": "False", + "isf": "False", + "ishighroller": "False", + "jackpot_win_amount": 90, + "jackpot_win_type": "Silver", + "level": 6, + "lifetime_gem_balance": 0, + "no_of_spin": 1, + "player_total_battles": 0, + "player_total_shields": 0, + "start_date": "2019-08-01", + "total_payments": 0, + "tournament_id": "T1561970819", + "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "versionSessionCount": 2, + "win_amount": 0 + }, + "timestamp": "2019-09-01T15:46:51.693229+05:30", + "type": "track", + "request_ip": "127.0.0.1" + }, + "destination": { + "Config": { + "webhookUrl": "http://6b0e6a60.ngrok.io", + "header": [ + { + "from": "test1", + "to": "value1" + }, + { + "from": "test2", + "to": "value2" + } + ] + }, + "DestinationDefinition": { + "Config": { + "cdkV2Enabled": true + } + } + }, + "metadata": { + "destinationId": "destId", + "workspaceId": "wspId" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "JSON": { + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "context": { + "device": { + "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", + "manufacturer": "Xiaomi", + "model": "Redmi 6", + "name": "xiaomi" + }, + "network": { + "carrier": "Banglalink" + }, + "os": { + "name": "android", + "version": "8.1.0" + }, + "traits": { + "address": { + "city": "Dhaka", + "country": "Bangladesh" + }, + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" + }, + "ip": "127.0.0.1" + }, + "event": "spin_result", + "integrations": { + "All": true + }, + "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", + "properties": { + "additional_bet_index": 0, + "battle_id": "N/A", + "bet_amount": 9, + "bet_level": 1, + "bet_multiplier": 1, + "coin_balance": 9466052, + "current_module_name": "CasinoGameModule", + "days_in_game": 0, + "extra_param": "N/A", + "fb_profile": "0", + "featureGameType": "N/A", + "game_fps": 30, + "game_id": "fireEagleBase", + "game_name": "FireEagleSlots", + "gem_balance": 0, + "graphicsQuality": "HD", + "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", + "internetReachability": "ReachableViaLocalAreaNetwork", + "isLowEndDevice": "False", + "is_auto_spin": "False", + "is_turbo": "False", + "isf": "False", + "ishighroller": "False", + "jackpot_win_amount": 90, + "jackpot_win_type": "Silver", + "level": 6, + "lifetime_gem_balance": 0, + "no_of_spin": 1, + "player_total_battles": 0, + "player_total_shields": 0, + "start_date": "2019-08-01", + "total_payments": 0, + "tournament_id": "T1561970819", + "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "versionSessionCount": 2, + "win_amount": 0 + }, + "timestamp": "2019-09-01T15:46:51.693229+05:30", + "type": "track", + "request_ip": "127.0.0.1" + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "version": "1", + "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "type": "REST", + "method": "POST", + "endpoint": "http://6b0e6a60.ngrok.io", + "headers": { + "content-type": "application/json" + }, + "params": {}, + "files": {} + }, + "metadata": { + "destinationId": "destId", + "workspaceId": "wspId" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "webhook", + "description": "Test 6", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "context": { + "device": { + "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", + "manufacturer": "Xiaomi", + "model": "Redmi 6", + "name": "xiaomi" + }, + "network": { + "carrier": "Banglalink" + }, + "os": { + "name": "android", + "version": "8.1.0" + }, + "traits": { + "address": { + "city": "Dhaka", + "country": "Bangladesh" + }, + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" + } + }, + "event": "spin_result", + "integrations": { + "All": true + }, + "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", + "properties": { + "additional_bet_index": 0, + "battle_id": "N/A", + "bet_amount": 9, + "bet_level": 1, + "bet_multiplier": 1, + "coin_balance": 9466052, + "current_module_name": "CasinoGameModule", + "days_in_game": 0, + "extra_param": "N/A", + "fb_profile": "0", + "featureGameType": "N/A", + "game_fps": 30, + "game_id": "fireEagleBase", + "game_name": "FireEagleSlots", + "gem_balance": 0, + "graphicsQuality": "HD", + "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", + "internetReachability": "ReachableViaLocalAreaNetwork", + "isLowEndDevice": "False", + "is_auto_spin": "False", + "is_turbo": "False", + "isf": "False", + "ishighroller": "False", + "jackpot_win_amount": 90, + "jackpot_win_type": "Silver", + "level": 6, + "lifetime_gem_balance": 0, + "no_of_spin": 1, + "player_total_battles": 0, + "player_total_shields": 0, + "start_date": "2019-08-01", + "total_payments": 0, + "tournament_id": "T1561970819", + "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "versionSessionCount": 2, + "win_amount": 0 + }, + "timestamp": "2019-09-01T15:46:51.693229+05:30", + "type": "track", + "request_ip": "127.0.0.1" + }, + "destination": { + "Config": { + "webhookUrl": "http://6b0e6a60.ngrok.io", + "headers": [ + { + "from": "Content-Type", + "to": "application/xml" + }, + { + "from": "test2", + "to": "value2" + } + ] + }, + "DestinationDefinition": { + "Config": { + "cdkV2Enabled": true + } + } + }, + "metadata": { + "destinationId": "destId", + "workspaceId": "wspId" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "JSON": { + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "context": { + "device": { + "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", + "manufacturer": "Xiaomi", + "model": "Redmi 6", + "name": "xiaomi" + }, + "network": { + "carrier": "Banglalink" + }, + "os": { + "name": "android", + "version": "8.1.0" + }, + "traits": { + "address": { + "city": "Dhaka", + "country": "Bangladesh" + }, + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" + }, + "ip": "127.0.0.1" + }, + "event": "spin_result", + "integrations": { + "All": true + }, + "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", + "properties": { + "additional_bet_index": 0, + "battle_id": "N/A", + "bet_amount": 9, + "bet_level": 1, + "bet_multiplier": 1, + "coin_balance": 9466052, + "current_module_name": "CasinoGameModule", + "days_in_game": 0, + "extra_param": "N/A", + "fb_profile": "0", + "featureGameType": "N/A", + "game_fps": 30, + "game_id": "fireEagleBase", + "game_name": "FireEagleSlots", + "gem_balance": 0, + "graphicsQuality": "HD", + "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", + "internetReachability": "ReachableViaLocalAreaNetwork", + "isLowEndDevice": "False", + "is_auto_spin": "False", + "is_turbo": "False", + "isf": "False", + "ishighroller": "False", + "jackpot_win_amount": 90, + "jackpot_win_type": "Silver", + "level": 6, + "lifetime_gem_balance": 0, + "no_of_spin": 1, + "player_total_battles": 0, + "player_total_shields": 0, + "start_date": "2019-08-01", + "total_payments": 0, + "tournament_id": "T1561970819", + "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "versionSessionCount": 2, + "win_amount": 0 + }, + "timestamp": "2019-09-01T15:46:51.693229+05:30", + "type": "track", + "request_ip": "127.0.0.1" + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "version": "1", + "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "type": "REST", + "method": "POST", + "endpoint": "http://6b0e6a60.ngrok.io", + "headers": { + "content-type": "application/xml", + "test2": "value2" + }, + "params": {}, + "files": {} + }, + "metadata": { + "destinationId": "destId", + "workspaceId": "wspId" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "webhook", + "description": "Test 7", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "event": "spin_result", + "integrations": { + "All": true + }, + "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", + "properties": { + "additional_bet_index": 0, + "battle_id": "N/A", + "bet_amount": 9, + "bet_level": 1, + "bet_multiplier": 1, + "coin_balance": 9466052, + "current_module_name": "CasinoGameModule", + "days_in_game": 0, + "extra_param": "N/A", + "fb_profile": "0", + "featureGameType": "N/A", + "game_fps": 30, + "game_id": "fireEagleBase", + "game_name": "FireEagleSlots", + "gem_balance": 0, + "graphicsQuality": "HD", + "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", + "internetReachability": "ReachableViaLocalAreaNetwork", + "isLowEndDevice": "False", + "is_auto_spin": "False", + "is_turbo": "False", + "isf": "False", + "ishighroller": "False", + "jackpot_win_amount": 90, + "jackpot_win_type": "Silver", + "level": 6, + "lifetime_gem_balance": 0, + "no_of_spin": 1, + "player_total_battles": 0, + "player_total_shields": 0, + "start_date": "2019-08-01", + "total_payments": 0, + "tournament_id": "T1561970819", + "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "versionSessionCount": 2, + "win_amount": 0 + }, + "timestamp": "2019-09-01T15:46:51.693229+05:30", + "type": "track" + }, + "destination": { + "Config": { + "webhookUrl": "http://6b0e6a60.ngrok.io", + "headers": [ + { + "from": "Content-Type", + "to": "application/xml" + }, + { + "from": "test2", + "to": "value2" + } + ] + }, + "DestinationDefinition": { + "Config": { + "cdkV2Enabled": true + } + } + }, + "metadata": { + "destinationId": "destId", + "workspaceId": "wspId" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "JSON": { + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "event": "spin_result", + "integrations": { + "All": true + }, + "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", + "properties": { + "additional_bet_index": 0, + "battle_id": "N/A", + "bet_amount": 9, + "bet_level": 1, + "bet_multiplier": 1, + "coin_balance": 9466052, + "current_module_name": "CasinoGameModule", + "days_in_game": 0, + "extra_param": "N/A", + "fb_profile": "0", + "featureGameType": "N/A", + "game_fps": 30, + "game_id": "fireEagleBase", + "game_name": "FireEagleSlots", + "gem_balance": 0, + "graphicsQuality": "HD", + "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", + "internetReachability": "ReachableViaLocalAreaNetwork", + "isLowEndDevice": "False", + "is_auto_spin": "False", + "is_turbo": "False", + "isf": "False", + "ishighroller": "False", + "jackpot_win_amount": 90, + "jackpot_win_type": "Silver", + "level": 6, + "lifetime_gem_balance": 0, + "no_of_spin": 1, + "player_total_battles": 0, + "player_total_shields": 0, + "start_date": "2019-08-01", + "total_payments": 0, + "tournament_id": "T1561970819", + "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "versionSessionCount": 2, + "win_amount": 0 + }, + "timestamp": "2019-09-01T15:46:51.693229+05:30", + "type": "track" + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "version": "1", + "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "type": "REST", + "method": "POST", + "endpoint": "http://6b0e6a60.ngrok.io", + "headers": { + "content-type": "application/xml", + "test2": "value2" + }, + "params": {}, + "files": {} + }, + "metadata": { + "destinationId": "destId", + "workspaceId": "wspId" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "webhook", + "description": "Test 8", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "context": { + "device": { + "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", + "manufacturer": "Xiaomi", + "model": "Redmi 6", + "name": "xiaomi" + }, + "network": { + "carrier": "Banglalink" + }, + "os": { + "name": "android", + "version": "8.1.0" + }, + "traits": { + "address": { + "city": "Dhaka", + "country": "Bangladesh" + }, + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" + } + }, + "event": "spin_result", + "integrations": { + "All": true + }, + "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", + "properties": { + "additional_bet_index": 0, + "battle_id": "N/A", + "featureGameType": "N/A", + "win_amount": 0 + }, + "timestamp": "2019-09-01T15:46:51.693229+05:30", + "type": "track", + "header": { + "dynamic_header_key_string": "dynamic_header_value_string", + "dynamic_header_key_num": 10, + "dynamic_header_key_object": { + "k1": "v1" + } + }, + "appendPath": "/product/search?string=value" + }, + "destination": { + "Config": { + "webhookUrl": "http://6b0e6a60.ngrok.io", + "headers": [ + { + "from": "", + "to": "" + }, + { + "from": "test2", + "to": "value2" + } + ] + }, + "DestinationDefinition": { + "Config": { + "cdkV2Enabled": true + } + } + }, + "metadata": { + "destinationId": "destId", + "workspaceId": "wspId" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "JSON": { + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "context": { + "device": { + "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", + "manufacturer": "Xiaomi", + "model": "Redmi 6", + "name": "xiaomi" + }, + "network": { + "carrier": "Banglalink" + }, + "os": { + "name": "android", + "version": "8.1.0" + }, + "traits": { + "address": { + "city": "Dhaka", + "country": "Bangladesh" + }, + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" + } + }, + "event": "spin_result", + "integrations": { + "All": true + }, + "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", + "properties": { + "additional_bet_index": 0, + "battle_id": "N/A", + "featureGameType": "N/A", + "win_amount": 0 + }, + "timestamp": "2019-09-01T15:46:51.693229+05:30", + "type": "track" + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "version": "1", + "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "type": "REST", + "method": "POST", + "endpoint": "http://6b0e6a60.ngrok.io/product/search?string=value", + "headers": { + "content-type": "application/json", + "test2": "value2", + "dynamic_header_key_string": "dynamic_header_value_string" + }, + "params": {}, + "files": {} + }, + "metadata": { + "destinationId": "destId", + "workspaceId": "wspId" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "webhook", + "description": "Test 9", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "context": { + "device": { + "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", + "manufacturer": "Xiaomi", + "model": "Redmi 6", + "name": "xiaomi" + }, + "network": { + "carrier": "Banglalink" + }, + "os": { + "name": "android", + "version": "8.1.0" + }, + "traits": { + "address": { + "city": "Dhaka", + "country": "Bangladesh" + }, + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" + } + }, + "event": "spin_result", + "integrations": { + "All": true + }, + "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", + "properties": { + "additional_bet_index": 0, + "battle_id": "N/A", + "featureGameType": "N/A", + "win_amount": 0 + }, + "timestamp": "2019-09-01T15:46:51.693229+05:30", + "type": "track", + "fullPath": "https://www.google.com" + }, + "destination": { + "Config": { + "webhookUrl": "http://6b0e6a60.ngrok.io", + "headers": [ + { + "from": "", + "to": "" + }, + { + "from": "test2", + "to": "value2" + } + ] + }, + "DestinationDefinition": { + "Config": { + "cdkV2Enabled": true + } + } + }, + "metadata": { + "destinationId": "destId", + "workspaceId": "wspId" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "JSON": { + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "context": { + "device": { + "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", + "manufacturer": "Xiaomi", + "model": "Redmi 6", + "name": "xiaomi" + }, + "network": { + "carrier": "Banglalink" + }, + "os": { + "name": "android", + "version": "8.1.0" + }, + "traits": { + "address": { + "city": "Dhaka", + "country": "Bangladesh" + }, + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" + } + }, + "event": "spin_result", + "integrations": { + "All": true + }, + "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", + "properties": { + "additional_bet_index": 0, + "battle_id": "N/A", + "featureGameType": "N/A", + "win_amount": 0 + }, + "timestamp": "2019-09-01T15:46:51.693229+05:30", + "type": "track" + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "version": "1", + "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google.com", + "headers": { + "content-type": "application/json", + "test2": "value2" + }, + "params": {}, + "files": {} + }, + "metadata": { + "destinationId": "destId", + "workspaceId": "wspId" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "webhook", + "description": "Test 10", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "context": { + "device": { + "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", + "manufacturer": "Xiaomi", + "model": "Redmi 6", + "name": "xiaomi" + }, + "network": { + "carrier": "Banglalink" + }, + "os": { + "name": "android", + "version": "8.1.0" + }, + "traits": { + "address": { + "city": "Dhaka", + "country": "Bangladesh" + }, + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" + } + }, + "event": "spin_result", + "integrations": { + "All": true + }, + "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", + "properties": { + "additional_bet_index": 0, + "battle_id": "N/A", + "featureGameType": "N/A", + "win_amount": 0 + }, + "timestamp": "2019-09-01T15:46:51.693229+05:30", + "type": "track", + "fullPath": "https://www.google.com/", + "appendPath": "?searchTerms=cats" + }, + "destination": { + "Config": { + "webhookUrl": "http://6b0e6a60.ngrok.io", + "headers": [ + { + "from": "", + "to": "" + }, + { + "from": "test2", + "to": "value2" + } + ] + }, + "DestinationDefinition": { + "Config": { + "cdkV2Enabled": true + } + } + }, + "metadata": { + "destinationId": "destId", + "workspaceId": "wspId" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "JSON": { + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "context": { + "device": { + "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", + "manufacturer": "Xiaomi", + "model": "Redmi 6", + "name": "xiaomi" + }, + "network": { + "carrier": "Banglalink" + }, + "os": { + "name": "android", + "version": "8.1.0" + }, + "traits": { + "address": { + "city": "Dhaka", + "country": "Bangladesh" + }, + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" + } + }, + "event": "spin_result", + "integrations": { + "All": true + }, + "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", + "properties": { + "additional_bet_index": 0, + "battle_id": "N/A", + "featureGameType": "N/A", + "win_amount": 0 + }, + "timestamp": "2019-09-01T15:46:51.693229+05:30", + "type": "track" + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "version": "1", + "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google.com/?searchTerms=cats", + "headers": { + "content-type": "application/json", + "test2": "value2" + }, + "params": {}, + "files": {} + }, + "metadata": { + "destinationId": "destId", + "workspaceId": "wspId" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "webhook", + "description": "Test 11", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "context": { + "device": { + "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", + "manufacturer": "Xiaomi", + "model": "Redmi 6", + "name": "xiaomi" + }, + "network": { + "carrier": "Banglalink" + }, + "os": { + "name": "android", + "version": "8.1.0" + }, + "traits": { + "address": { + "city": "Dhaka", + "country": "Bangladesh" + }, + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" + } + }, + "event": "spin_result", + "integrations": { + "All": true + }, + "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", + "properties": { + "additional_bet_index": 0, + "battle_id": "N/A", + "featureGameType": "N/A", + "win_amount": 0 + }, + "timestamp": "2019-09-01T15:46:51.693229+05:30", + "type": "track", + "fullPath": "https://www.google.com/", + "appendPath": "?searchTerms=cats" + }, + "destination": { + "Config": { + "webhookUrl": "http://6b0e6a60.ngrok.io", + "webhookMethod": "PUT", + "headers": [ + { + "from": "", + "to": "" + }, + { + "from": "test2", + "to": "value2" + } + ] + }, + "DestinationDefinition": { + "Config": { + "cdkV2Enabled": true + } + } + }, + "metadata": { + "destinationId": "destId", + "workspaceId": "wspId" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "JSON": { + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "context": { + "device": { + "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", + "manufacturer": "Xiaomi", + "model": "Redmi 6", + "name": "xiaomi" + }, + "network": { + "carrier": "Banglalink" + }, + "os": { + "name": "android", + "version": "8.1.0" + }, + "traits": { + "address": { + "city": "Dhaka", + "country": "Bangladesh" + }, + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" + } + }, + "event": "spin_result", + "integrations": { + "All": true + }, + "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", + "properties": { + "additional_bet_index": 0, + "battle_id": "N/A", + "featureGameType": "N/A", + "win_amount": 0 + }, + "timestamp": "2019-09-01T15:46:51.693229+05:30", + "type": "track" + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "version": "1", + "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "type": "REST", + "method": "PUT", + "endpoint": "https://www.google.com/?searchTerms=cats", + "headers": { + "content-type": "application/json", + "test2": "value2" + }, + "params": {}, + "files": {} + }, + "metadata": { + "destinationId": "destId", + "workspaceId": "wspId" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "webhook", + "description": "Test 12", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "context": { + "device": { + "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", + "manufacturer": "Xiaomi", + "model": "Redmi 6", + "name": "xiaomi" + }, + "network": { + "carrier": "Banglalink" + }, + "os": { + "name": "android", + "version": "8.1.0" + }, + "traits": { + "address": { + "city": "Dhaka", + "country": "Bangladesh" + }, + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" + } + }, + "event": "spin_result", + "integrations": { + "All": true + }, + "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", + "properties": { + "additional_bet_index": 0, + "battle_id": "N/A", + "featureGameType": "N/A", + "win_amount": 0 + }, + "timestamp": "2019-09-01T15:46:51.693229+05:30", + "type": "track", + "fullPath": "https://www.google.com/", + "appendPath": "?searchTerms=cats" + }, + "destination": { + "Config": { + "webhookUrl": "http://6b0e6a60.ngrok.io", + "webhookMethod": "DELETE", + "headers": [ + { + "from": "", + "to": "" + }, + { + "from": "test2", + "to": "value2" + } + ] + }, + "DestinationDefinition": { + "Config": { + "cdkV2Enabled": true + } + } + }, + "metadata": { + "destinationId": "destId", + "workspaceId": "wspId" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "JSON": {}, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "version": "1", + "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "type": "REST", + "method": "DELETE", + "endpoint": "https://www.google.com/?searchTerms=cats", + "headers": { + "test2": "value2" + }, + "params": { + "additional_bet_index": 0, + "battle_id": "N/A", + "featureGameType": "N/A", + "win_amount": 0 + }, + "files": {} + }, + "metadata": { + "destinationId": "destId", + "workspaceId": "wspId" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "webhook", + "description": "Test 13", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "context": { + "device": { + "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", + "manufacturer": "Xiaomi", + "model": "Redmi 6", + "name": "xiaomi" + }, + "network": { + "carrier": "Banglalink" + }, + "os": { + "name": "android", + "version": "8.1.0" + }, + "traits": { + "address": { + "city": "Dhaka", + "country": "Bangladesh" + }, + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" + } + }, + "event": "spin_result", + "integrations": { + "All": true + }, + "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", + "properties": { + "additional_bet_index": 0, + "battle_id": "N/A", + "bet_amount": 9, + "bet_level": 1, + "bet_multiplier": 1, + "coin_balance": 9466052, + "current_module_name": "CasinoGameModule", + "days_in_game": 0, + "extra_param": "N/A", + "fb_profile": "0", + "featureGameType": "N/A", + "game_fps": 30, + "game_id": "fireEagleBase", + "game_name": "FireEagleSlots", + "gem_balance": 0, + "graphicsQuality": "HD", + "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", + "internetReachability": "ReachableViaLocalAreaNetwork", + "isLowEndDevice": "False", + "is_auto_spin": "False", + "is_turbo": "False", + "isf": "False", + "ishighroller": "False", + "jackpot_win_amount": 90, + "jackpot_win_type": "Silver", + "level": 6, + "lifetime_gem_balance": 0, + "no_of_spin": 1, + "player_total_battles": 0, + "player_total_shields": 0, + "start_date": "2019-08-01", + "total_payments": 0, + "tournament_id": "T1561970819", + "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "versionSessionCount": 2, + "win_amount": 0 + }, + "timestamp": "2019-09-01T15:46:51.693229+05:30", + "type": "track", + "user_properties": { + "coin_balance": 9466052, + "current_module_name": "CasinoGameModule", + "fb_profile": "0", + "game_fps": 30, + "game_name": "FireEagleSlots", + "gem_balance": 0, + "graphicsQuality": "HD", + "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", + "internetReachability": "ReachableViaLocalAreaNetwork", + "isLowEndDevice": false, + "level": 6, + "lifetime_gem_balance": 0, + "player_total_battles": 0, + "player_total_shields": 0, + "start_date": "2019-08-01", + "total_payments": 0, + "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "versionSessionCount": 2 + } + }, + "destination": { + "Config": { + "webhookUrl": "http://6b0e6a60.ngrok.io", + "webhookMethod": "POST", + "headers": [ + { + "from": "test2", + "to": "value2" + } + ] + }, + "DestinationDefinition": { + "Config": { + "cdkV2Enabled": true + } + } + }, + "metadata": { + "destinationId": "destId", + "workspaceId": "wspId" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "JSON": { + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "context": { + "device": { + "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", + "manufacturer": "Xiaomi", + "model": "Redmi 6", + "name": "xiaomi" + }, + "network": { + "carrier": "Banglalink" + }, + "os": { + "name": "android", + "version": "8.1.0" + }, + "traits": { + "address": { + "city": "Dhaka", + "country": "Bangladesh" + }, + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" + } + }, + "event": "spin_result", + "integrations": { + "All": true + }, + "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", + "properties": { + "additional_bet_index": 0, + "battle_id": "N/A", + "bet_amount": 9, + "bet_level": 1, + "bet_multiplier": 1, + "coin_balance": 9466052, + "current_module_name": "CasinoGameModule", + "days_in_game": 0, + "extra_param": "N/A", + "fb_profile": "0", + "featureGameType": "N/A", + "game_fps": 30, + "game_id": "fireEagleBase", + "game_name": "FireEagleSlots", + "gem_balance": 0, + "graphicsQuality": "HD", + "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", + "internetReachability": "ReachableViaLocalAreaNetwork", + "isLowEndDevice": "False", + "is_auto_spin": "False", + "is_turbo": "False", + "isf": "False", + "ishighroller": "False", + "jackpot_win_amount": 90, + "jackpot_win_type": "Silver", + "level": 6, + "lifetime_gem_balance": 0, + "no_of_spin": 1, + "player_total_battles": 0, + "player_total_shields": 0, + "start_date": "2019-08-01", + "total_payments": 0, + "tournament_id": "T1561970819", + "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "versionSessionCount": 2, + "win_amount": 0 + }, + "timestamp": "2019-09-01T15:46:51.693229+05:30", + "type": "track", + "user_properties": { + "coin_balance": 9466052, + "current_module_name": "CasinoGameModule", + "fb_profile": "0", + "game_fps": 30, + "game_name": "FireEagleSlots", + "gem_balance": 0, + "graphicsQuality": "HD", + "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", + "internetReachability": "ReachableViaLocalAreaNetwork", + "isLowEndDevice": false, + "level": 6, + "lifetime_gem_balance": 0, + "player_total_battles": 0, + "player_total_shields": 0, + "start_date": "2019-08-01", + "total_payments": 0, + "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "versionSessionCount": 2 + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "version": "1", + "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "type": "REST", + "method": "POST", + "endpoint": "http://6b0e6a60.ngrok.io", + "headers": { + "content-type": "application/json", + "test2": "value2" + }, + "params": {}, + "files": {} + }, + "metadata": { + "destinationId": "destId", + "workspaceId": "wspId" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "webhook", + "description": "Test 14", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "context": { + "device": { + "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", + "manufacturer": "Xiaomi", + "model": "Redmi 6", + "name": "xiaomi" + }, + "network": { + "carrier": "Banglalink" + }, + "os": { + "name": "android", + "version": "8.1.0" + }, + "traits": { + "address": { + "city": "Dhaka", + "country": "Bangladesh" + }, + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" + } + }, + "event": "spin_result", + "integrations": { + "All": true + }, + "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", + "properties": { + "additional_bet_index": 0, + "battle_id": "N/A", + "bet_amount": 9, + "bet_level": 1, + "bet_multiplier": 1, + "coin_balance": 9466052, + "current_module_name": "CasinoGameModule", + "days_in_game": 0, + "extra_param": "N/A", + "fb_profile": "0", + "featureGameType": "N/A", + "game_fps": 30, + "game_id": "fireEagleBase", + "game_name": "FireEagleSlots", + "gem_balance": 0, + "graphicsQuality": "HD", + "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", + "internetReachability": "ReachableViaLocalAreaNetwork", + "isLowEndDevice": "False", + "is_auto_spin": "False", + "is_turbo": "False", + "isf": "False", + "ishighroller": "False", + "jackpot_win_amount": 90, + "jackpot_win_type": "Silver", + "level": 6, + "lifetime_gem_balance": 0, + "no_of_spin": 1, + "player_total_battles": 0, + "player_total_shields": 0, + "start_date": "2019-08-01", + "total_payments": 0, + "tournament_id": "T1561970819", + "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "versionSessionCount": 2, + "win_amount": 0 + }, + "timestamp": "2019-09-01T15:46:51.693229+05:30", + "type": "track", + "user_properties": { + "coin_balance": 9466052, + "current_module_name": "CasinoGameModule", + "fb_profile": "0", + "game_fps": 30, + "game_name": "FireEagleSlots", + "gem_balance": 0, + "graphicsQuality": "HD", + "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", + "internetReachability": "ReachableViaLocalAreaNetwork", + "isLowEndDevice": false, + "level": 6, + "lifetime_gem_balance": 0, + "player_total_battles": 0, + "player_total_shields": 0, + "start_date": "2019-08-01", + "total_payments": 0, + "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "versionSessionCount": 2 + } + }, + "destination": { + "Config": { + "webhookUrl": "http://6b0e6a60.ngrok.io", + "webhookMethod": "PATCH", + "headers": [ + { + "from": "test2", + "to": "value2" + } + ] + }, + "DestinationDefinition": { + "Config": { + "cdkV2Enabled": true + } + } + }, + "metadata": { + "destinationId": "destId", + "workspaceId": "wspId" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "JSON": { + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "context": { + "device": { + "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", + "manufacturer": "Xiaomi", + "model": "Redmi 6", + "name": "xiaomi" + }, + "network": { + "carrier": "Banglalink" + }, + "os": { + "name": "android", + "version": "8.1.0" + }, + "traits": { + "address": { + "city": "Dhaka", + "country": "Bangladesh" + }, + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" + } + }, + "event": "spin_result", + "integrations": { + "All": true + }, + "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", + "properties": { + "additional_bet_index": 0, + "battle_id": "N/A", + "bet_amount": 9, + "bet_level": 1, + "bet_multiplier": 1, + "coin_balance": 9466052, + "current_module_name": "CasinoGameModule", + "days_in_game": 0, + "extra_param": "N/A", + "fb_profile": "0", + "featureGameType": "N/A", + "game_fps": 30, + "game_id": "fireEagleBase", + "game_name": "FireEagleSlots", + "gem_balance": 0, + "graphicsQuality": "HD", + "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", + "internetReachability": "ReachableViaLocalAreaNetwork", + "isLowEndDevice": "False", + "is_auto_spin": "False", + "is_turbo": "False", + "isf": "False", + "ishighroller": "False", + "jackpot_win_amount": 90, + "jackpot_win_type": "Silver", + "level": 6, + "lifetime_gem_balance": 0, + "no_of_spin": 1, + "player_total_battles": 0, + "player_total_shields": 0, + "start_date": "2019-08-01", + "total_payments": 0, + "tournament_id": "T1561970819", + "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "versionSessionCount": 2, + "win_amount": 0 + }, + "timestamp": "2019-09-01T15:46:51.693229+05:30", + "type": "track", + "user_properties": { + "coin_balance": 9466052, + "current_module_name": "CasinoGameModule", + "fb_profile": "0", + "game_fps": 30, + "game_name": "FireEagleSlots", + "gem_balance": 0, + "graphicsQuality": "HD", + "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", + "internetReachability": "ReachableViaLocalAreaNetwork", + "isLowEndDevice": false, + "level": 6, + "lifetime_gem_balance": 0, + "player_total_battles": 0, + "player_total_shields": 0, + "start_date": "2019-08-01", + "total_payments": 0, + "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "versionSessionCount": 2 + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "version": "1", + "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "type": "REST", + "method": "PATCH", + "endpoint": "http://6b0e6a60.ngrok.io", + "headers": { + "content-type": "application/json", + "test2": "value2" + }, + "params": {}, + "files": {} + }, + "metadata": { + "destinationId": "destId", + "workspaceId": "wspId" + }, + "statusCode": 200 + } + ] + } + } + } +] \ No newline at end of file diff --git a/test/integrations/destinations/webhook/router/data.ts b/test/integrations/destinations/webhook/router/data.ts index e9c4f8701a..ec0bf5634e 100644 --- a/test/integrations/destinations/webhook/router/data.ts +++ b/test/integrations/destinations/webhook/router/data.ts @@ -117,6 +117,11 @@ export const data = [ }, ], }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, }, }, { @@ -217,6 +222,11 @@ export const data = [ Config: { webhookUrl: 'https://6b0e6a60.ngrok.io/n', }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, }, }, ], @@ -360,7 +370,12 @@ export const data = [ }, ], }, - }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + } }, { batchedRequest: { @@ -481,6 +496,11 @@ export const data = [ Config: { webhookUrl: 'https://6b0e6a60.ngrok.io/n', }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, }, }, ], From 80cf69dc40bb4dc7c0a6d516814f36d962018745 Mon Sep 17 00:00:00 2001 From: AASHISH MALIK Date: Fri, 1 Dec 2023 21:30:40 +0530 Subject: [PATCH 040/135] fix: make supportTransformerProxyV1 false (#2861) --- src/features.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/features.json b/src/features.json index 2d064eeae0..0d2d71bbd9 100644 --- a/src/features.json +++ b/src/features.json @@ -65,5 +65,5 @@ "TIKTOK_AUDIENCE": true }, "supportSourceTransformV1": true, - "supportTransformerProxyV1": true + "supportTransformerProxyV1": false } From 7910dba2318f92cec3be1b7c7aa6b00428ecae94 Mon Sep 17 00:00:00 2001 From: Anant Jain <62471433+anantjain45823@users.noreply.github.com> Date: Sat, 2 Dec 2023 08:48:37 +0530 Subject: [PATCH 041/135] feat: marketo: migrate config fields and fix test cases (#2789) * feat: marketo: migrate config fields and fix test cases * Update destination_config.json * chore: fix test cases * Update utils.js * Update destinationCanonicalNames.js * Update cdkV2Integration.ts * Update index.js * Update am_input.json * Update am_output.json * Update am_input.json * Update am_output.json * Update data.ts * Update am_input.json * Update data.ts * Update data.ts * chore: small fix --- src/v0/destinations/marketo/config.js | 12 +- test/__tests__/data/marketo_input.json | 272 +-- test/__tests__/data/marketo_router_input.json | 2025 +++++++++-------- .../data/marketo_router_metadata_input.json | 102 +- .../__tests__/data/marketo_router_output.json | 227 +- 5 files changed, 1360 insertions(+), 1278 deletions(-) diff --git a/src/v0/destinations/marketo/config.js b/src/v0/destinations/marketo/config.js index 5d70cc0425..16449ebbad 100644 --- a/src/v0/destinations/marketo/config.js +++ b/src/v0/destinations/marketo/config.js @@ -15,9 +15,9 @@ const formatConfig = (destination) => ({ ID: destination.ID, ...destination.Config, customActivityEventMap: getHashFromArray( - destination.Config.customActivityEventMap, - 'from', - 'to', + destination.Config.rudderEventsMapping, + 'event', + 'marketoActivityId', false, ), customActivityPropertyMap: getHashFromArray( @@ -27,9 +27,9 @@ const formatConfig = (destination) => ({ false, ), customActivityPrimaryKeyMap: getHashFromArray( - destination.Config.customActivityPrimaryKeyMap, - 'from', - 'to', + destination.Config.rudderEventsMapping, + 'event', + 'marketoPrimarykey', false, ), leadTraitMapping: getHashFromArray(destination.Config.leadTraitMapping, 'from', 'to', false), diff --git a/test/__tests__/data/marketo_input.json b/test/__tests__/data/marketo_input.json index c54005b9f6..6a891fdea0 100644 --- a/test/__tests__/data/marketo_input.json +++ b/test/__tests__/data/marketo_input.json @@ -55,7 +55,12 @@ "includeKeys": [], "saveDestinationResponse": true, "secretKeys": [], - "supportedMessageTypes": ["identify", "page", "screen", "track"], + "supportedMessageTypes": [ + "identify", + "page", + "screen", + "track" + ], "supportedSourceTypes": [ "android", "ios", @@ -77,7 +82,8 @@ "Config": { "clientId": "marketo_client_id_success", "clientSecret": "marketo_client_secret_success", - "accountId": "marketo_acct_id_success" + "accountId": "marketo_acct_id_success", + "rudderEventsMapping": [] }, "Enabled": true, "Transformations": [], @@ -151,31 +157,26 @@ "clientId": "marketo_client_id_success", "clientSecret": "marketo_client_secret_success", "trackAnonymousEvents": true, - "customActivityEventMap": [ - { - "from": "Product Clicked", - "to": "100001" - } - ], "customActivityPropertyMap": [ { "from": "name", "to": "productName" } ], - "customActivityPrimaryKeyMap": [ - { - "from": "Product Clicked", - "to": "name" - } - ], "leadTraitMapping": [ { "from": "leadScore", "to": "customLeadScore" } ], - "createIfNotExist": true + "createIfNotExist": true, + "rudderEventsMapping": [ + { + "event": "Product Clicked", + "marketoPrimarykey": "name", + "marketoActivityId": "100001" + } + ] } } }, @@ -243,12 +244,6 @@ "clientId": "marketo_client_id_success", "clientSecret": "marketo_client_secret_success", "trackAnonymousEvents": true, - "customActivityEventMap": [ - { - "from": "Product Clicked", - "to": "100001" - } - ], "customActivityPropertyMap": [ { "from": "name", @@ -259,19 +254,20 @@ "to": "productId" } ], - "customActivityPrimaryKeyMap": [ - { - "from": "Product Clicked", - "to": "name" - } - ], "leadTraitMapping": [ { "from": "leadScore", "to": "customLeadScore" } ], - "createIfNotExist": true + "createIfNotExist": true, + "rudderEventsMapping": [ + { + "event": "Product Clicked", + "marketoPrimarykey": "name", + "marketoActivityId": "100001" + } + ] } } }, @@ -339,31 +335,26 @@ "clientId": "marketo_client_id_success", "clientSecret": "marketo_client_secret_success", "trackAnonymousEvents": false, - "customActivityEventMap": [ - { - "from": "Product Clicked", - "to": "100001" - } - ], "customActivityPropertyMap": [ { "from": "name", "to": "productName" } ], - "customActivityPrimaryKeyMap": [ - { - "from": "Product Clicked", - "to": "name" - } - ], "leadTraitMapping": [ { "from": "leadScore", "to": "customLeadScore" } ], - "createIfNotExist": true + "createIfNotExist": true, + "rudderEventsMapping": [ + { + "event": "Product Clicked", + "marketoPrimarykey": "name", + "marketoActivityId": "100001" + } + ] } } }, @@ -397,31 +388,26 @@ "clientId": "marketo_acct_id_token_failure", "clientSecret": "marketo_acct_id_token_failure", "trackAnonymousEvents": false, - "customActivityEventMap": [ - { - "from": "Product Clicked", - "to": "100001" - } - ], "customActivityPropertyMap": [ { "from": "name", "to": "productName" } ], - "customActivityPrimaryKeyMap": [ - { - "from": "Product Clicked", - "to": "name" - } - ], "leadTraitMapping": [ { "from": "leadScore", "to": "customLeadScore" } ], - "createIfNotExist": true + "createIfNotExist": true, + "rudderEventsMapping": [ + { + "event": "Product Clicked", + "marketoPrimarykey": "name", + "marketoActivityId": "100001" + } + ] } } }, @@ -489,31 +475,26 @@ "clientId": "marketo_client_id_success", "clientSecret": "marketo_client_secret_success", "trackAnonymousEvents": false, - "customActivityEventMap": [ - { - "from": "Product Clicked", - "to": "100001" - } - ], "customActivityPropertyMap": [ { "from": "name", "to": "productName" } ], - "customActivityPrimaryKeyMap": [ - { - "from": "Product Clicked", - "to": "name" - } - ], "leadTraitMapping": [ { "from": "leadScore", "to": "customLeadScore" } ], - "createIfNotExist": true + "createIfNotExist": true, + "rudderEventsMapping": [ + { + "event": "Product Clicked", + "marketoPrimarykey": "name", + "marketoActivityId": "100001" + } + ] } } }, @@ -558,12 +539,6 @@ "clientId": "marketo_client_id_success", "clientSecret": "marketo_client_secret_success", "trackAnonymousEvents": true, - "customActivityEventMap": [ - { - "from": "Product Clicked", - "to": "100001" - } - ], "customActivityPropertyMap": [ { "from": "name", @@ -574,19 +549,20 @@ "to": "productId" } ], - "customActivityPrimaryKeyMap": [ - { - "from": "Product Clicked", - "to": "name" - } - ], "leadTraitMapping": [ { "from": "leadScore", "to": "customLeadScore" } ], - "createIfNotExist": true + "createIfNotExist": true, + "rudderEventsMapping": [ + { + "event": "Product Clicked", + "marketoPrimarykey": "name", + "marketoActivityId": "100001" + } + ] } } }, @@ -653,31 +629,26 @@ "clientId": "marketo_client_id_success", "clientSecret": "marketo_client_secret_success", "trackAnonymousEvents": false, - "customActivityEventMap": [ - { - "from": "Product Clicked", - "to": "100001" - } - ], "customActivityPropertyMap": [ { "from": "name", "to": "productName" } ], - "customActivityPrimaryKeyMap": [ - { - "from": "Product Clicked", - "to": "name" - } - ], "leadTraitMapping": [ { "from": "leadScore", "to": "customLeadScore" } ], - "createIfNotExist": true + "createIfNotExist": true, + "rudderEventsMapping": [ + { + "event": "Product Clicked", + "marketoPrimarykey": "name", + "marketoActivityId": "100001" + } + ] } } }, @@ -744,31 +715,26 @@ "clientId": "marketo_client_id_success", "clientSecret": "marketo_client_secret_success", "trackAnonymousEvents": true, - "customActivityEventMap": [ - { - "from": "Product Clicked", - "to": "100001" - } - ], "customActivityPropertyMap": [ { "from": "name", "to": "productName" } ], - "customActivityPrimaryKeyMap": [ - { - "from": "Product Clicked", - "to": "name" - } - ], "leadTraitMapping": [ { "from": "leadScore", "to": "customLeadScore" } ], - "createIfNotExist": true + "createIfNotExist": true, + "rudderEventsMapping": [ + { + "event": "Product Clicked", + "marketoPrimarykey": "name", + "marketoActivityId": "100001" + } + ] } } }, @@ -835,31 +801,26 @@ "clientId": "marketo_client_id_success", "clientSecret": "marketo_client_secret_success", "trackAnonymousEvents": true, - "customActivityEventMap": [ - { - "from": "Product Clicked", - "to": "100001" - } - ], "customActivityPropertyMap": [ { "from": "name", "to": "productName" } ], - "customActivityPrimaryKeyMap": [ - { - "from": "Product Clicked", - "to": "name" - } - ], "leadTraitMapping": [ { "from": "leadScore", "to": "customLeadScore" } ], - "createIfNotExist": true + "createIfNotExist": true, + "rudderEventsMapping": [ + { + "event": "Product Clicked", + "marketoPrimarykey": "name", + "marketoActivityId": "100001" + } + ] } } }, @@ -925,31 +886,26 @@ "clientId": "marketo_client_id_success", "clientSecret": "marketo_client_secret_success", "trackAnonymousEvents": true, - "customActivityEventMap": [ - { - "from": "Product Clicked", - "to": "100001" - } - ], "customActivityPropertyMap": [ { "from": "name", "to": "productName" } ], - "customActivityPrimaryKeyMap": [ - { - "from": "Product Clicked", - "to": "name" - } - ], "leadTraitMapping": [ { "from": "leadScore", "to": "customLeadScore" } ], - "createIfNotExist": true + "createIfNotExist": true, + "rudderEventsMapping": [ + { + "event": "Product Clicked", + "marketoPrimarykey": "name", + "marketoActivityId": "100001" + } + ] } } }, @@ -1016,31 +972,26 @@ "clientId": "marketo_client_id_success", "clientSecret": "marketo_client_secret_success", "trackAnonymousEvents": true, - "customActivityEventMap": [ - { - "from": "Product Clicked", - "to": "100001" - } - ], "customActivityPropertyMap": [ { "from": "name", "to": "productName" } ], - "customActivityPrimaryKeyMap": [ - { - "from": "Product Clicked", - "to": "name" - } - ], "leadTraitMapping": [ { "from": "leadScore", "to": "customLeadScore" } ], - "createIfNotExist": true + "createIfNotExist": true, + "rudderEventsMapping": [ + { + "event": "Product Clicked", + "marketoPrimarykey": "name", + "marketoActivityId": "100001" + } + ] } } }, @@ -1088,12 +1039,6 @@ "clientId": "marketo_client_id_success", "clientSecret": "marketo_client_secret_success", "trackAnonymousEvents": true, - "customActivityEventMap": [ - { - "from": "Product Clicked", - "to": "100001" - } - ], "customActivityPropertyMap": [ { "from": "name", @@ -1104,17 +1049,18 @@ "to": "productId" } ], - "customActivityPrimaryKeyMap": [ - { - "from": "Product Clicked", - "to": "name" - } - ], "leadTraitMapping": [ { "from": "score", "to": "customLeadScore" } + ], + "rudderEventsMapping": [ + { + "event": "Product Clicked", + "marketoPrimarykey": "name", + "marketoActivityId": "100001" + } ] } } @@ -1174,7 +1120,12 @@ "includeKeys": [], "saveDestinationResponse": true, "secretKeys": [], - "supportedMessageTypes": ["identify", "page", "screen", "track"], + "supportedMessageTypes": [ + "identify", + "page", + "screen", + "track" + ], "supportedSourceTypes": [ "android", "ios", @@ -1196,7 +1147,8 @@ "Config": { "clientId": "marketo_client_id_success", "clientSecret": "marketo_client_secret_success", - "accountId": "marketo_acct_id_success" + "accountId": "marketo_acct_id_success", + "rudderEventsMapping": [] }, "Enabled": true, "Transformations": [], @@ -1207,4 +1159,4 @@ "query": {} } } -] +] \ No newline at end of file diff --git a/test/__tests__/data/marketo_router_input.json b/test/__tests__/data/marketo_router_input.json index acf59508dd..a2ecc7f616 100644 --- a/test/__tests__/data/marketo_router_input.json +++ b/test/__tests__/data/marketo_router_input.json @@ -1,1011 +1,1046 @@ [ - { - "message": { - "anonymousId": "anon_id_success", - "channel": "mobile", - "context": { - "app": { - "build": "1", - "name": "TestAppName", - "namespace": "com.android.sample", - "version": "1.0" + { + "message": { + "anonymousId": "anon_id_success", + "channel": "mobile", + "context": { + "app": { + "build": "1", + "name": "TestAppName", + "namespace": "com.android.sample", + "version": "1.0" + }, + "device": { + "id": "anon_id_success", + "manufacturer": "Google", + "model": "Android SDK built for x86", + "name": "generic_x86", + "type": "android" + }, + "library": { + "name": "com.rudderstack.android.sdk.core", + "version": "1.0.1-beta.1" + }, + "locale": "en-US", + "network": { + "carrier": "Android", + "bluetooth": false, + "cellular": true, + "wifi": true + }, + "os": { + "name": "Android", + "version": "8.1.0" + }, + "screen": { + "density": 420, + "height": 1794, + "width": 1080 + }, + "timezone": "Asia/Kolkata", + "traits": { + "anonymousId": "anon_id_success" + }, + "userAgent": "Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)" + }, + "event": "Product Clicked", + "integrations": { + "All": true + }, + "messageId": "id1", + "properties": { + "name": "Test Product" + }, + "originalTimestamp": "2020-12-17T21:00:59.176Z", + "type": "track", + "sentAt": "2020-03-12T09:05:03.421Z" }, - "device": { - "id": "anon_id_success", - "manufacturer": "Google", - "model": "Android SDK built for x86", - "name": "generic_x86", - "type": "android" + "metadata": { + "jobId": 1 }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.1-beta.1" - }, - "locale": "en-US", - "network": { - "carrier": "Android", - "bluetooth": false, - "cellular": true, - "wifi": true - }, - "os": { - "name": "Android", - "version": "8.1.0" - }, - "screen": { - "density": 420, - "height": 1794, - "width": 1080 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "anon_id_success" - }, - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)" - }, - "event": "Product Clicked", - "integrations": { - "All": true - }, - "messageId": "id1", - "properties": { - "name": "Test Product" - }, - "originalTimestamp": "2020-12-17T21:00:59.176Z", - "type": "track", - "sentAt": "2020-03-12T09:05:03.421Z" - }, - "metadata": { - "jobId": 1 - }, - "destination": { - "Config": { - "accountId": "marketo_acct_id_success", - "clientId": "marketo_client_id_success", - "clientSecret": "marketo_client_secret_success", - "trackAnonymousEvents": true, - "customActivityEventMap": [ - { - "from": "Product Clicked", - "to": "100001" - } - ], - "customActivityPropertyMap": [ - { - "from": "name", - "to": "productName" - } - ], - "customActivityPrimaryKeyMap": [ - { - "from": "Product Clicked", - "to": "name" - } - ], - "leadTraitMapping": [ - { - "from": "leadScore", - "to": "customLeadScore" - } - ] - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Marketo", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "config": { - "destConfig": { - "defaultConfig": [ - "accountId", - "clientId", - "clientSecret", - "trackAnonymousEvents", - "customActivityEventMap", - "customActivityPropertyMap", - "customActivityPrimaryKeyMap", - "leadTraitMapping" - ] - }, - "secretKeys": ["clientSecret"], - "excludeKeys": [], - "includeKeys": [], - "routerTransform": true, - "supportedSourceTypes": ["android", "ios", "web", "unity", "amp", "cloud", "reactnative"] - }, - "responseRules": { - "responseType": "JSON", - "rules": { - "retryable": [ - { - "success": "false", - "errors.0.code": 600 - }, - { - "success": "false", - "errors.0.code": 601 - }, - { - "success": "false", - "errors.0.code": 602 - }, - { - "success": "false", - "errors.0.code": 604 - }, - { - "success": "false", - "errors.0.code": 606 - }, - { - "success": "false", - "errors.0.code": 607 - }, - { - "success": "false", - "errors.0.code": 608 - }, - { - "success": "false", - "errors.0.code": 611 - } - ], - "abortable": [ - { - "success": "false", - "errors.0.code": 603 - }, - { - "success": "false", - "errors.0.code": 605 - }, - { - "success": "false", - "errors.0.code": 609 - }, - { - "success": "false", - "errors.0.code": 610 - } - ] - } - }, - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "MARKETO", - "displayName": "Marketo", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - }, - { - "message": { - "anonymousId": "anon_id_success", - "channel": "mobile", - "context": { - "app": { - "build": "1", - "name": "TestAppName", - "namespace": "com.android.sample", - "version": "1.0" - }, - "device": { - "id": "anon_id_success", - "manufacturer": "Google", - "model": "Android SDK built for x86", - "name": "generic_x86", - "type": "android" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.1-beta.1" - }, - "locale": "en-US", - "network": { - "carrier": "Android", - "bluetooth": false, - "cellular": true, - "wifi": true - }, - "os": { - "name": "Android", - "version": "8.1.0" - }, - "screen": { - "density": 420, - "height": 1794, - "width": 1080 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "anon_id_success" - }, - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)" - }, - "event": "Product Clicked", - "integrations": { - "All": true - }, - "messageId": "id1", - "properties": { - "name": "Test Product", - "product_id": "prod_1" - }, - "originalTimestamp": "2020-12-17T21:00:59.176Z", - "type": "track", - "sentAt": "2020-12-17T21:00:59.176Z" - }, - "metadata": { - "jobId": 2 - }, - "destination": { - "Config": { - "accountId": "marketo_acct_id_success", - "clientId": "marketo_client_id_success", - "clientSecret": "marketo_client_secret_success", - "trackAnonymousEvents": true, - "customActivityEventMap": [ - { - "from": "Product Clicked", - "to": "100001" - } - ], - "customActivityPropertyMap": [ - { - "from": "name", - "to": "productName" - } - ], - "customActivityPrimaryKeyMap": [ - { - "from": "Product Clicked", - "to": "name" - } - ], - "leadTraitMapping": [ - { - "from": "leadScore", - "to": "customLeadScore" - } - ] - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Marketo", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "config": { - "destConfig": { - "defaultConfig": [ - "accountId", - "clientId", - "clientSecret", - "trackAnonymousEvents", - "customActivityEventMap", - "customActivityPropertyMap", - "customActivityPrimaryKeyMap", - "leadTraitMapping" - ] - }, - "secretKeys": ["clientSecret"], - "excludeKeys": [], - "includeKeys": [], - "routerTransform": true, - "supportedSourceTypes": ["android", "ios", "web", "unity", "amp", "cloud", "reactnative"] - }, - "responseRules": { - "responseType": "JSON", - "rules": { - "retryable": [ - { - "success": "false", - "errors.0.code": 600 - }, - { - "success": "false", - "errors.0.code": 601 - }, - { - "success": "false", - "errors.0.code": 602 - }, - { - "success": "false", - "errors.0.code": 604 - }, - { - "success": "false", - "errors.0.code": 606 - }, - { - "success": "false", - "errors.0.code": 607 - }, - { - "success": "false", - "errors.0.code": 608 - }, - { - "success": "false", - "errors.0.code": 611 - } - ], - "abortable": [ - { - "success": "false", - "errors.0.code": 603 - }, - { - "success": "false", - "errors.0.code": 605 - }, - { - "success": "false", - "errors.0.code": 609 - }, - { - "success": "false", - "errors.0.code": 610 - } - ] - } - }, - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "MARKETO", - "displayName": "Marketo", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - }, - { - "message": { - "type": "identify", - "sentAt": "2022-09-19T10:34:02.002Z", - "userId": "e17c5a5e-5e2f-430b-b497-fe3f1ea3a704", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "2.12.1", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "https://accounts.app.t2.broken.com/home", - "path": "/home", - "title": "Home", - "search": "", - "tab_url": "https://accounts.app.t2.broken.com/home", - "referrer": "https://ts50-cvii.core.broken.org/", - "initial_referrer": "https://ts50-cvii.core.broken.org/", - "referring_domain": "ts50-cvii.core.broken.org", - "initial_referring_domain": "ts50-cvii.core.broken.org" - }, - "locale": "en-IN", - "screen": { - "width": 1728, - "height": 1117, - "density": 2, - "innerWidth": 1728, - "innerHeight": 969 - }, - "traits": { - "name": "AM", - "email": "0c7b8b80-9c43-4f8e-b2d2-5e2448a25040@j.mail", - "lastName": "M", - "firstName": "A", - "accountName": "MACDEV", - "billingName": "g g", - "companyName": "macDev", - "currentTier": "Webinar Pro 250", - "billingCycle": "Annually", - "lastBillingDate": "2022-06-29T09:40:42.000Z", - "nextBillingDate": "2023-09-09T04:00:00.000Z", - "subscriptionType": "Webinar Pro 250", - "subscriptionStatus": "ACTIVE", - "lastWebinarEventDate": "2022-09-15T20:00:00.000Z", - "nextWebinarEventDate": "2022-09-16T06:15:00.000Z" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "2.12.1" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36" - }, - "rudderId": "73dc83ef-587f-4077-90f3-c36083e64019", - "messageId": "1663583642000200-e3f31c4c-6361-4f99-b643-7755303a6007", - "timestamp": "2022-09-19T10:34:02.954Z", - "receivedAt": "2022-09-19T10:34:02.956Z", - "request_ip": "11.105.44.120", - "anonymousId": "0c7b8b80-9c43-4f8e-b2d2-5e2448a25040", - "integrations": { - "All": true - }, - "originalTimestamp": "2022-09-19T10:34:02.000Z" + "destination": { + "Config": { + "accountId": "marketo_acct_id_success", + "clientId": "marketo_client_id_success", + "clientSecret": "marketo_client_secret_success", + "trackAnonymousEvents": true, + "customActivityPropertyMap": [ + { + "from": "name", + "to": "productName" + } + ], + "leadTraitMapping": [ + { + "from": "leadScore", + "to": "customLeadScore" + } + ], + "rudderEventsMapping": [ + { + "event": "Product Clicked", + "marketoPrimarykey": "name", + "marketoActivityId": "100001" + } + ] + }, + "secretConfig": {}, + "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", + "name": "Marketo", + "enabled": true, + "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", + "deleted": false, + "createdAt": "2020-12-30T08:39:32.005Z", + "updatedAt": "2021-02-03T16:22:31.374Z", + "destinationDefinition": { + "config": { + "destConfig": { + "defaultConfig": [ + "accountId", + "clientId", + "clientSecret", + "trackAnonymousEvents", + "rudderEventsMapping", + "customActivityPropertyMap", + "leadTraitMapping" + ] + }, + "secretKeys": [ + "clientSecret" + ], + "excludeKeys": [], + "includeKeys": [], + "routerTransform": true, + "supportedSourceTypes": [ + "android", + "ios", + "web", + "unity", + "amp", + "cloud", + "reactnative" + ] + }, + "responseRules": { + "responseType": "JSON", + "rules": { + "retryable": [ + { + "success": "false", + "errors.0.code": 600 + }, + { + "success": "false", + "errors.0.code": 601 + }, + { + "success": "false", + "errors.0.code": 602 + }, + { + "success": "false", + "errors.0.code": 604 + }, + { + "success": "false", + "errors.0.code": 606 + }, + { + "success": "false", + "errors.0.code": 607 + }, + { + "success": "false", + "errors.0.code": 608 + }, + { + "success": "false", + "errors.0.code": 611 + } + ], + "abortable": [ + { + "success": "false", + "errors.0.code": 603 + }, + { + "success": "false", + "errors.0.code": 605 + }, + { + "success": "false", + "errors.0.code": 609 + }, + { + "success": "false", + "errors.0.code": 610 + } + ] + } + }, + "id": "1aIXqM806xAVm92nx07YwKbRrO9", + "name": "MARKETO", + "displayName": "Marketo", + "createdAt": "2020-04-09T09:24:31.794Z", + "updatedAt": "2021-01-11T11:03:28.103Z" + }, + "transformations": [], + "isConnectionEnabled": true, + "isProcessorEnabled": true + } }, - "destination": { - "Config": { - "accountId": "valid_account_broken_event", - "clientId": "504300cd-76b2-a7l4-bhle-90a07420nx73", - "clientSecret": "3l3gJpzRsZagD6gu7tnTeKXz0bomLGnd", - "trackAnonymousEvents": false, - "createIfNotExist": true, - "customActivityEventMap": [ - { - "from": "acq_signup_completed", - "to": "100026" - }, - { - "from": "act_createwebinarform_submit", - "to": "100025" - }, - { - "from": "act_presentation_style", - "to": "100025" - }, - { - "from": "act_webinar_view", - "to": "100025" - }, - { - "from": "act_webinar_join", - "to": "100025" - }, - { - "from": "act_presentation_addteammember", - "to": "100025" - }, - { - "from": "act_engagement_discussions_savediscussion", - "to": "100025" - }, - { - "to": "100025", - "from": "act_engagement_networking_savetime" - } - ] - }, - "destinationDefinition": { - "config": { - "destConfig": { - "defaultConfig": [ - "accountId", - "clientId", - "clientSecret", - "trackAnonymousEvents", - "customActivityEventMap", - "customActivityPropertyMap", - "customActivityPrimaryKeyMap", - "leadTraitMapping" - ] - }, - "secretKeys": ["clientSecret"], - "excludeKeys": [], - "includeKeys": [], - "routerTransform": true, - "supportedSourceTypes": ["android", "ios", "web", "unity", "amp", "cloud", "reactnative"] + { + "message": { + "anonymousId": "anon_id_success", + "channel": "mobile", + "context": { + "app": { + "build": "1", + "name": "TestAppName", + "namespace": "com.android.sample", + "version": "1.0" + }, + "device": { + "id": "anon_id_success", + "manufacturer": "Google", + "model": "Android SDK built for x86", + "name": "generic_x86", + "type": "android" + }, + "library": { + "name": "com.rudderstack.android.sdk.core", + "version": "1.0.1-beta.1" + }, + "locale": "en-US", + "network": { + "carrier": "Android", + "bluetooth": false, + "cellular": true, + "wifi": true + }, + "os": { + "name": "Android", + "version": "8.1.0" + }, + "screen": { + "density": 420, + "height": 1794, + "width": 1080 + }, + "timezone": "Asia/Kolkata", + "traits": { + "anonymousId": "anon_id_success" + }, + "userAgent": "Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)" + }, + "event": "Product Clicked", + "integrations": { + "All": true + }, + "messageId": "id1", + "properties": { + "name": "Test Product", + "product_id": "prod_1" + }, + "originalTimestamp": "2020-12-17T21:00:59.176Z", + "type": "track", + "sentAt": "2020-12-17T21:00:59.176Z" }, - "responseRules": { - "responseType": "JSON", - "rules": { - "retryable": [ - { - "success": "false", - "errors.0.code": 600 - }, - { - "success": "false", - "errors.0.code": 601 - }, - { - "success": "false", - "errors.0.code": 602 - }, - { - "success": "false", - "errors.0.code": 604 - }, - { - "success": "false", - "errors.0.code": 606 - }, - { - "success": "false", - "errors.0.code": 607 - }, - { - "success": "false", - "errors.0.code": 608 - }, - { - "success": "false", - "errors.0.code": 611 - } - ], - "abortable": [ - { - "success": "false", - "errors.0.code": 603 - }, - { - "success": "false", - "errors.0.code": 605 - }, - { - "success": "false", - "errors.0.code": 609 - }, - { - "success": "false", - "errors.0.code": 610 - } - ] - } + "metadata": { + "jobId": 2 }, - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "MARKETO", - "displayName": "Marketo", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVke", - "name": "Marketo", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmMd", - "deleted": false, - "createdAt": "2022-02-10T08:39:32.005Z", - "updatedAt": "2022-09-03T16:22:31.374Z", - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true + "destination": { + "Config": { + "accountId": "marketo_acct_id_success", + "clientId": "marketo_client_id_success", + "clientSecret": "marketo_client_secret_success", + "trackAnonymousEvents": true, + "customActivityPropertyMap": [ + { + "from": "name", + "to": "productName" + } + ], + "leadTraitMapping": [ + { + "from": "leadScore", + "to": "customLeadScore" + } + ], + "rudderEventsMapping": [ + { + "event": "Product Clicked", + "marketoPrimarykey": "name", + "marketoActivityId": "100001" + } + ] + }, + "secretConfig": {}, + "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", + "name": "Marketo", + "enabled": true, + "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", + "deleted": false, + "createdAt": "2020-12-30T08:39:32.005Z", + "updatedAt": "2021-02-03T16:22:31.374Z", + "destinationDefinition": { + "config": { + "destConfig": { + "defaultConfig": [ + "accountId", + "clientId", + "clientSecret", + "trackAnonymousEvents", + "rudderEventsMapping", + "customActivityPropertyMap", + "leadTraitMapping" + ] + }, + "secretKeys": [ + "clientSecret" + ], + "excludeKeys": [], + "includeKeys": [], + "routerTransform": true, + "supportedSourceTypes": [ + "android", + "ios", + "web", + "unity", + "amp", + "cloud", + "reactnative" + ] + }, + "responseRules": { + "responseType": "JSON", + "rules": { + "retryable": [ + { + "success": "false", + "errors.0.code": 600 + }, + { + "success": "false", + "errors.0.code": 601 + }, + { + "success": "false", + "errors.0.code": 602 + }, + { + "success": "false", + "errors.0.code": 604 + }, + { + "success": "false", + "errors.0.code": 606 + }, + { + "success": "false", + "errors.0.code": 607 + }, + { + "success": "false", + "errors.0.code": 608 + }, + { + "success": "false", + "errors.0.code": 611 + } + ], + "abortable": [ + { + "success": "false", + "errors.0.code": 603 + }, + { + "success": "false", + "errors.0.code": 605 + }, + { + "success": "false", + "errors.0.code": 609 + }, + { + "success": "false", + "errors.0.code": 610 + } + ] + } + }, + "id": "1aIXqM806xAVm92nx07YwKbRrO9", + "name": "MARKETO", + "displayName": "Marketo", + "createdAt": "2020-04-09T09:24:31.794Z", + "updatedAt": "2021-01-11T11:03:28.103Z" + }, + "transformations": [], + "isConnectionEnabled": true, + "isProcessorEnabled": true + } }, - "metadata": { - "jobId": 3 - } - }, - { - "message": { - "type": "identify", - "sentAt": "2022-09-19T10:34:02.002Z", - "userId": "e17c5a5e-5e2f-430b-b497-fe3f1ea3a704", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "2.12.1", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "https://accounts.app.t2.broken.com/home", - "path": "/home", - "title": "Home", - "search": "", - "tab_url": "https://accounts.app.t2.broken.com/home", - "referrer": "https://ts50-cvii.core.broken.org/", - "initial_referrer": "https://ts50-cvii.core.broken.org/", - "referring_domain": "ts50-cvii.core.broken.org", - "initial_referring_domain": "ts50-cvii.core.broken.org" - }, - "locale": "en-IN", - "screen": { - "width": 1728, - "height": 1117, - "density": 2, - "innerWidth": 1728, - "innerHeight": 969 + { + "message": { + "type": "identify", + "sentAt": "2022-09-19T10:34:02.002Z", + "userId": "e17c5a5e-5e2f-430b-b497-fe3f1ea3a704", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "2.12.1", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "https://accounts.app.t2.broken.com/home", + "path": "/home", + "title": "Home", + "search": "", + "tab_url": "https://accounts.app.t2.broken.com/home", + "referrer": "https://ts50-cvii.core.broken.org/", + "initial_referrer": "https://ts50-cvii.core.broken.org/", + "referring_domain": "ts50-cvii.core.broken.org", + "initial_referring_domain": "ts50-cvii.core.broken.org" + }, + "locale": "en-IN", + "screen": { + "width": 1728, + "height": 1117, + "density": 2, + "innerWidth": 1728, + "innerHeight": 969 + }, + "traits": { + "name": "AM", + "email": "0c7b8b80-9c43-4f8e-b2d2-5e2448a25040@j.mail", + "lastName": "M", + "firstName": "A", + "accountName": "MACDEV", + "billingName": "g g", + "companyName": "macDev", + "currentTier": "Webinar Pro 250", + "billingCycle": "Annually", + "lastBillingDate": "2022-06-29T09:40:42.000Z", + "nextBillingDate": "2023-09-09T04:00:00.000Z", + "subscriptionType": "Webinar Pro 250", + "subscriptionStatus": "ACTIVE", + "lastWebinarEventDate": "2022-09-15T20:00:00.000Z", + "nextWebinarEventDate": "2022-09-16T06:15:00.000Z" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "2.12.1" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36" + }, + "rudderId": "73dc83ef-587f-4077-90f3-c36083e64019", + "messageId": "1663583642000200-e3f31c4c-6361-4f99-b643-7755303a6007", + "timestamp": "2022-09-19T10:34:02.954Z", + "receivedAt": "2022-09-19T10:34:02.956Z", + "request_ip": "11.105.44.120", + "anonymousId": "0c7b8b80-9c43-4f8e-b2d2-5e2448a25040", + "integrations": { + "All": true + }, + "originalTimestamp": "2022-09-19T10:34:02.000Z" }, - "traits": { - "name": "AM", - "email": "0c7b8b80-9c43-4f8e-b2d2-5e2448a25040@j.mail", - "lastName": "M", - "firstName": "A", - "accountName": "MACDEV", - "billingName": "g g", - "companyName": "macDev", - "currentTier": "Webinar Pro 250", - "billingCycle": "Annually", - "lastBillingDate": "2022-06-29T09:40:42.000Z", - "nextBillingDate": "2023-09-09T04:00:00.000Z", - "subscriptionType": "Webinar Pro 250", - "subscriptionStatus": "ACTIVE", - "lastWebinarEventDate": "2022-09-15T20:00:00.000Z", - "nextWebinarEventDate": "2022-09-16T06:15:00.000Z" + "destination": { + "Config": { + "accountId": "valid_account_broken_event", + "clientId": "504300cd-76b2-a7l4-bhle-90a07420nx73", + "clientSecret": "3l3gJpzRsZagD6gu7tnTeKXz0bomLGnd", + "trackAnonymousEvents": false, + "createIfNotExist": true, + "rudderEventsMapping": [ + { + "event": "acq_signup_completed", + "marketoActivityId": "100026" + }, + { + "event": "act_createwebinarform_submit", + "marketoActivityId": "100025" + }, + { + "event": "act_presentation_style", + "marketoActivityId": "100025" + }, + { + "event": "act_webinar_view", + "marketoActivityId": "100025" + }, + { + "event": "act_webinar_join", + "marketoActivityId": "100025" + }, + { + "event": "act_presentation_addteammember", + "marketoActivityId": "100025" + }, + { + "event": "act_engagement_discussions_savediscussion", + "marketoActivityId": "100025" + }, + { + "event": "act_engagement_networking_savetime", + "marketoActivityId": "100025" + } + ] + }, + "destinationDefinition": { + "config": { + "destConfig": { + "defaultConfig": [ + "accountId", + "clientId", + "clientSecret", + "trackAnonymousEvents", + "rudderEventsMapping", + "customActivityPropertyMap", + "leadTraitMapping" + ] + }, + "secretKeys": [ + "clientSecret" + ], + "excludeKeys": [], + "includeKeys": [], + "routerTransform": true, + "supportedSourceTypes": [ + "android", + "ios", + "web", + "unity", + "amp", + "cloud", + "reactnative" + ] + }, + "responseRules": { + "responseType": "JSON", + "rules": { + "retryable": [ + { + "success": "false", + "errors.0.code": 600 + }, + { + "success": "false", + "errors.0.code": 601 + }, + { + "success": "false", + "errors.0.code": 602 + }, + { + "success": "false", + "errors.0.code": 604 + }, + { + "success": "false", + "errors.0.code": 606 + }, + { + "success": "false", + "errors.0.code": 607 + }, + { + "success": "false", + "errors.0.code": 608 + }, + { + "success": "false", + "errors.0.code": 611 + } + ], + "abortable": [ + { + "success": "false", + "errors.0.code": 603 + }, + { + "success": "false", + "errors.0.code": 605 + }, + { + "success": "false", + "errors.0.code": 609 + }, + { + "success": "false", + "errors.0.code": 610 + } + ] + } + }, + "id": "1aIXqM806xAVm92nx07YwKbRrO9", + "name": "MARKETO", + "displayName": "Marketo", + "createdAt": "2020-04-09T09:24:31.794Z", + "updatedAt": "2021-01-11T11:03:28.103Z" + }, + "secretConfig": {}, + "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVke", + "name": "Marketo", + "enabled": true, + "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmMd", + "deleted": false, + "createdAt": "2022-02-10T08:39:32.005Z", + "updatedAt": "2022-09-03T16:22:31.374Z", + "transformations": [], + "isConnectionEnabled": true, + "isProcessorEnabled": true }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "2.12.1" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36" - }, - "rudderId": "73dc83ef-587f-4077-90f3-c36083e64019", - "messageId": "1663583642000200-e3f31c4c-6361-4f99-b643-7755303a6007", - "timestamp": "2022-09-19T10:34:02.954Z", - "receivedAt": "2022-09-19T10:34:02.956Z", - "request_ip": "11.105.44.120", - "anonymousId": "0c7b8b80-9c43-4f8e-b2d2-5e2448a25040", - "integrations": { - "All": true - }, - "originalTimestamp": "2022-09-19T10:34:02.000Z" + "metadata": { + "jobId": 3 + } }, - "destination": { - "Config": { - "accountId": "unhandled_status_code", - "clientId": "504300cd-76b2-a7l4-bhle-90a07420nx73", - "clientSecret": "3l3gJpzRsZagD6gu7tnTeKXz0bomLGnd", - "trackAnonymousEvents": false, - "createIfNotExist": true, - "customActivityEventMap": [ - { - "from": "acq_signup_completed", - "to": "100026" - }, - { - "from": "act_createwebinarform_submit", - "to": "100025" - }, - { - "from": "act_presentation_style", - "to": "100025" - }, - { - "from": "act_webinar_view", - "to": "100025" - }, - { - "from": "act_webinar_join", - "to": "100025" - }, - { - "from": "act_presentation_addteammember", - "to": "100025" - }, - { - "from": "act_engagement_discussions_savediscussion", - "to": "100025" - }, - { - "to": "100025", - "from": "act_engagement_networking_savetime" - } - ] - }, - "destinationDefinition": { - "config": { - "destConfig": { - "defaultConfig": [ - "accountId", - "clientId", - "clientSecret", - "trackAnonymousEvents", - "customActivityEventMap", - "customActivityPropertyMap", - "customActivityPrimaryKeyMap", - "leadTraitMapping" - ] - }, - "secretKeys": ["clientSecret"], - "excludeKeys": [], - "includeKeys": [], - "routerTransform": true, - "supportedSourceTypes": ["android", "ios", "web", "unity", "amp", "cloud", "reactnative"] - }, - "responseRules": { - "responseType": "JSON", - "rules": { - "retryable": [ - { - "success": "false", - "errors.0.code": 600 - }, - { - "success": "false", - "errors.0.code": 601 - }, - { - "success": "false", - "errors.0.code": 602 - }, - { - "success": "false", - "errors.0.code": 604 - }, - { - "success": "false", - "errors.0.code": 606 - }, - { - "success": "false", - "errors.0.code": 607 - }, - { - "success": "false", - "errors.0.code": 608 - }, - { - "success": "false", - "errors.0.code": 611 - } - ], - "abortable": [ - { - "success": "false", - "errors.0.code": 603 - }, - { - "success": "false", - "errors.0.code": 605 - }, - { - "success": "false", - "errors.0.code": 609 - }, - { - "success": "false", - "errors.0.code": 610 - } - ] - } - }, - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "MARKETO", - "displayName": "Marketo", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVke", - "name": "Marketo", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmMd", - "deleted": false, - "createdAt": "2022-02-10T08:39:32.005Z", - "updatedAt": "2022-09-03T16:22:31.374Z", - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - }, - "metadata": { - "jobId": 4 - } - }, - { - "message": { - "type": "identify", - "sentAt": "2022-09-19T10:34:02.002Z", - "userId": "e17c5a5e-5e2f-430b-b497-fe3f1ea3a704", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" + { + "message": { + "type": "identify", + "sentAt": "2022-09-19T10:34:02.002Z", + "userId": "e17c5a5e-5e2f-430b-b497-fe3f1ea3a704", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "2.12.1", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "https://accounts.app.t2.broken.com/home", + "path": "/home", + "title": "Home", + "search": "", + "tab_url": "https://accounts.app.t2.broken.com/home", + "referrer": "https://ts50-cvii.core.broken.org/", + "initial_referrer": "https://ts50-cvii.core.broken.org/", + "referring_domain": "ts50-cvii.core.broken.org", + "initial_referring_domain": "ts50-cvii.core.broken.org" + }, + "locale": "en-IN", + "screen": { + "width": 1728, + "height": 1117, + "density": 2, + "innerWidth": 1728, + "innerHeight": 969 + }, + "traits": { + "name": "AM", + "email": "0c7b8b80-9c43-4f8e-b2d2-5e2448a25040@j.mail", + "lastName": "M", + "firstName": "A", + "accountName": "MACDEV", + "billingName": "g g", + "companyName": "macDev", + "currentTier": "Webinar Pro 250", + "billingCycle": "Annually", + "lastBillingDate": "2022-06-29T09:40:42.000Z", + "nextBillingDate": "2023-09-09T04:00:00.000Z", + "subscriptionType": "Webinar Pro 250", + "subscriptionStatus": "ACTIVE", + "lastWebinarEventDate": "2022-09-15T20:00:00.000Z", + "nextWebinarEventDate": "2022-09-16T06:15:00.000Z" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "2.12.1" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36" + }, + "rudderId": "73dc83ef-587f-4077-90f3-c36083e64019", + "messageId": "1663583642000200-e3f31c4c-6361-4f99-b643-7755303a6007", + "timestamp": "2022-09-19T10:34:02.954Z", + "receivedAt": "2022-09-19T10:34:02.956Z", + "request_ip": "11.105.44.120", + "anonymousId": "0c7b8b80-9c43-4f8e-b2d2-5e2448a25040", + "integrations": { + "All": true + }, + "originalTimestamp": "2022-09-19T10:34:02.000Z" }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "2.12.1", - "namespace": "com.rudderlabs.javascript" + "destination": { + "Config": { + "accountId": "unhandled_status_code", + "clientId": "504300cd-76b2-a7l4-bhle-90a07420nx73", + "clientSecret": "3l3gJpzRsZagD6gu7tnTeKXz0bomLGnd", + "trackAnonymousEvents": false, + "createIfNotExist": true, + "rudderEventsMapping": [ + { + "event": "acq_signup_completed", + "marketoActivityId": "100026" + }, + { + "event": "act_createwebinarform_submit", + "marketoActivityId": "100025" + }, + { + "event": "act_presentation_style", + "marketoActivityId": "100025" + }, + { + "event": "act_webinar_view", + "marketoActivityId": "100025" + }, + { + "event": "act_webinar_join", + "marketoActivityId": "100025" + }, + { + "event": "act_presentation_addteammember", + "marketoActivityId": "100025" + }, + { + "event": "act_engagement_discussions_savediscussion", + "marketoActivityId": "100025" + }, + { + "event": "act_engagement_networking_savetime", + "marketoActivityId": "100025" + } + ] + }, + "destinationDefinition": { + "config": { + "destConfig": { + "defaultConfig": [ + "accountId", + "clientId", + "clientSecret", + "trackAnonymousEvents", + "rudderEventsMapping", + "customActivityPropertyMap", + "leadTraitMapping" + ] + }, + "secretKeys": [ + "clientSecret" + ], + "excludeKeys": [], + "includeKeys": [], + "routerTransform": true, + "supportedSourceTypes": [ + "android", + "ios", + "web", + "unity", + "amp", + "cloud", + "reactnative" + ] + }, + "responseRules": { + "responseType": "JSON", + "rules": { + "retryable": [ + { + "success": "false", + "errors.0.code": 600 + }, + { + "success": "false", + "errors.0.code": 601 + }, + { + "success": "false", + "errors.0.code": 602 + }, + { + "success": "false", + "errors.0.code": 604 + }, + { + "success": "false", + "errors.0.code": 606 + }, + { + "success": "false", + "errors.0.code": 607 + }, + { + "success": "false", + "errors.0.code": 608 + }, + { + "success": "false", + "errors.0.code": 611 + } + ], + "abortable": [ + { + "success": "false", + "errors.0.code": 603 + }, + { + "success": "false", + "errors.0.code": 605 + }, + { + "success": "false", + "errors.0.code": 609 + }, + { + "success": "false", + "errors.0.code": 610 + } + ] + } + }, + "id": "1aIXqM806xAVm92nx07YwKbRrO9", + "name": "MARKETO", + "displayName": "Marketo", + "createdAt": "2020-04-09T09:24:31.794Z", + "updatedAt": "2021-01-11T11:03:28.103Z" + }, + "secretConfig": {}, + "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVke", + "name": "Marketo", + "enabled": true, + "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmMd", + "deleted": false, + "createdAt": "2022-02-10T08:39:32.005Z", + "updatedAt": "2022-09-03T16:22:31.374Z", + "transformations": [], + "isConnectionEnabled": true, + "isProcessorEnabled": true }, - "page": { - "url": "https://accounts.app.t2.broken.com/home", - "path": "/home", - "title": "Home", - "search": "", - "tab_url": "https://accounts.app.t2.broken.com/home", - "referrer": "https://ts50-cvii.core.broken.org/", - "initial_referrer": "https://ts50-cvii.core.broken.org/", - "referring_domain": "ts50-cvii.core.broken.org", - "initial_referring_domain": "ts50-cvii.core.broken.org" - }, - "locale": "en-IN", - "screen": { - "width": 1728, - "height": 1117, - "density": 2, - "innerWidth": 1728, - "innerHeight": 969 - }, - "traits": { - "name": "AM", - "email": "0c7b8b80-9c43-4f8e-b2d2-5e2448a25040@j.mail", - "lastName": "M", - "firstName": "A", - "accountName": "MACDEV", - "billingName": "g g", - "companyName": "macDev", - "currentTier": "Webinar Pro 250", - "billingCycle": "Annually", - "lastBillingDate": "2022-06-29T09:40:42.000Z", - "nextBillingDate": "2023-09-09T04:00:00.000Z", - "subscriptionType": "Webinar Pro 250", - "subscriptionStatus": "ACTIVE", - "lastWebinarEventDate": "2022-09-15T20:00:00.000Z", - "nextWebinarEventDate": "2022-09-16T06:15:00.000Z" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "2.12.1" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36" - }, - "rudderId": "73dc83ef-587f-4077-90f3-c36083e64019", - "messageId": "1663583642000200-e3f31c4c-6361-4f99-b643-7755303a6007", - "timestamp": "2022-09-19T10:34:02.954Z", - "receivedAt": "2022-09-19T10:34:02.956Z", - "request_ip": "11.105.44.120", - "anonymousId": "0c7b8b80-9c43-4f8e-b2d2-5e2448a25040", - "integrations": { - "All": true - }, - "originalTimestamp": "2022-09-19T10:34:02.000Z" + "metadata": { + "jobId": 4 + } }, - "destination": { - "Config": { - "accountId": "successful_identify_transformation", - "clientId": "504300cd-76b2-a7l4-bhle-90a07420nx73", - "clientSecret": "3l3gJpzRsZagD6gu7tnTeKXz0bomLGnd", - "trackAnonymousEvents": false, - "createIfNotExist": true, - "customActivityEventMap": [ - { - "from": "acq_signup_completed", - "to": "100026" - }, - { - "from": "act_createwebinarform_submit", - "to": "100025" - }, - { - "from": "act_presentation_style", - "to": "100025" - }, - { - "from": "act_webinar_view", - "to": "100025" - }, - { - "from": "act_webinar_join", - "to": "100025" - }, - { - "from": "act_presentation_addteammember", - "to": "100025" - }, - { - "from": "act_engagement_discussions_savediscussion", - "to": "100025" - }, - { - "to": "100025", - "from": "act_engagement_networking_savetime" - } - ] - }, - "destinationDefinition": { - "config": { - "destConfig": { - "defaultConfig": [ - "accountId", - "clientId", - "clientSecret", - "trackAnonymousEvents", - "customActivityEventMap", - "customActivityPropertyMap", - "customActivityPrimaryKeyMap", - "leadTraitMapping" - ] - }, - "secretKeys": ["clientSecret"], - "excludeKeys": [], - "includeKeys": [], - "routerTransform": true, - "supportedSourceTypes": ["android", "ios", "web", "unity", "amp", "cloud", "reactnative"] + { + "message": { + "type": "identify", + "sentAt": "2022-09-19T10:34:02.002Z", + "userId": "e17c5a5e-5e2f-430b-b497-fe3f1ea3a704", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "2.12.1", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "https://accounts.app.t2.broken.com/home", + "path": "/home", + "title": "Home", + "search": "", + "tab_url": "https://accounts.app.t2.broken.com/home", + "referrer": "https://ts50-cvii.core.broken.org/", + "initial_referrer": "https://ts50-cvii.core.broken.org/", + "referring_domain": "ts50-cvii.core.broken.org", + "initial_referring_domain": "ts50-cvii.core.broken.org" + }, + "locale": "en-IN", + "screen": { + "width": 1728, + "height": 1117, + "density": 2, + "innerWidth": 1728, + "innerHeight": 969 + }, + "traits": { + "name": "AM", + "email": "0c7b8b80-9c43-4f8e-b2d2-5e2448a25040@j.mail", + "lastName": "M", + "firstName": "A", + "accountName": "MACDEV", + "billingName": "g g", + "companyName": "macDev", + "currentTier": "Webinar Pro 250", + "billingCycle": "Annually", + "lastBillingDate": "2022-06-29T09:40:42.000Z", + "nextBillingDate": "2023-09-09T04:00:00.000Z", + "subscriptionType": "Webinar Pro 250", + "subscriptionStatus": "ACTIVE", + "lastWebinarEventDate": "2022-09-15T20:00:00.000Z", + "nextWebinarEventDate": "2022-09-16T06:15:00.000Z" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "2.12.1" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36" + }, + "rudderId": "73dc83ef-587f-4077-90f3-c36083e64019", + "messageId": "1663583642000200-e3f31c4c-6361-4f99-b643-7755303a6007", + "timestamp": "2022-09-19T10:34:02.954Z", + "receivedAt": "2022-09-19T10:34:02.956Z", + "request_ip": "11.105.44.120", + "anonymousId": "0c7b8b80-9c43-4f8e-b2d2-5e2448a25040", + "integrations": { + "All": true + }, + "originalTimestamp": "2022-09-19T10:34:02.000Z" }, - "responseRules": { - "responseType": "JSON", - "rules": { - "retryable": [ - { - "success": "false", - "errors.0.code": 600 - }, - { - "success": "false", - "errors.0.code": 601 - }, - { - "success": "false", - "errors.0.code": 602 - }, - { - "success": "false", - "errors.0.code": 604 - }, - { - "success": "false", - "errors.0.code": 606 - }, - { - "success": "false", - "errors.0.code": 607 - }, - { - "success": "false", - "errors.0.code": 608 - }, - { - "success": "false", - "errors.0.code": 611 - } - ], - "abortable": [ - { - "success": "false", - "errors.0.code": 603 - }, - { - "success": "false", - "errors.0.code": 605 - }, - { - "success": "false", - "errors.0.code": 609 - }, - { - "success": "false", - "errors.0.code": 610 - } - ] - } + "destination": { + "Config": { + "accountId": "successful_identify_transformation", + "clientId": "504300cd-76b2-a7l4-bhle-90a07420nx73", + "clientSecret": "3l3gJpzRsZagD6gu7tnTeKXz0bomLGnd", + "trackAnonymousEvents": false, + "createIfNotExist": true, + "rudderEventsMapping": [ + { + "event": "acq_signup_completed", + "marketoActivityId": "100026" + }, + { + "event": "act_createwebinarform_submit", + "marketoActivityId": "100025" + }, + { + "event": "act_presentation_style", + "marketoActivityId": "100025" + }, + { + "event": "act_webinar_view", + "marketoActivityId": "100025" + }, + { + "event": "act_webinar_join", + "marketoActivityId": "100025" + }, + { + "event": "act_presentation_addteammember", + "marketoActivityId": "100025" + }, + { + "event": "act_engagement_discussions_savediscussion", + "marketoActivityId": "100025" + }, + { + "event": "act_engagement_networking_savetime", + "marketoActivityId": "100025" + } + ] + }, + "destinationDefinition": { + "config": { + "destConfig": { + "defaultConfig": [ + "accountId", + "clientId", + "clientSecret", + "trackAnonymousEvents", + "rudderEventsMapping", + "customActivityPropertyMap", + "leadTraitMapping" + ] + }, + "secretKeys": [ + "clientSecret" + ], + "excludeKeys": [], + "includeKeys": [], + "routerTransform": true, + "supportedSourceTypes": [ + "android", + "ios", + "web", + "unity", + "amp", + "cloud", + "reactnative" + ] + }, + "responseRules": { + "responseType": "JSON", + "rules": { + "retryable": [ + { + "success": "false", + "errors.0.code": 600 + }, + { + "success": "false", + "errors.0.code": 601 + }, + { + "success": "false", + "errors.0.code": 602 + }, + { + "success": "false", + "errors.0.code": 604 + }, + { + "success": "false", + "errors.0.code": 606 + }, + { + "success": "false", + "errors.0.code": 607 + }, + { + "success": "false", + "errors.0.code": 608 + }, + { + "success": "false", + "errors.0.code": 611 + } + ], + "abortable": [ + { + "success": "false", + "errors.0.code": 603 + }, + { + "success": "false", + "errors.0.code": 605 + }, + { + "success": "false", + "errors.0.code": 609 + }, + { + "success": "false", + "errors.0.code": 610 + } + ] + } + }, + "id": "1aIXqM806xAVm92nx07YwKbRrO9", + "name": "MARKETO", + "displayName": "Marketo", + "createdAt": "2020-04-09T09:24:31.794Z", + "updatedAt": "2021-01-11T11:03:28.103Z" + }, + "secretConfig": {}, + "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVke", + "name": "Marketo", + "enabled": true, + "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmMd", + "deleted": false, + "createdAt": "2022-02-10T08:39:32.005Z", + "updatedAt": "2022-09-03T16:22:31.374Z", + "transformations": [], + "isConnectionEnabled": true, + "isProcessorEnabled": true }, - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "MARKETO", - "displayName": "Marketo", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVke", - "name": "Marketo", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmMd", - "deleted": false, - "createdAt": "2022-02-10T08:39:32.005Z", - "updatedAt": "2022-09-03T16:22:31.374Z", - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - }, - "metadata": { - "jobId": 5 + "metadata": { + "jobId": 5 + } } - } -] +] \ No newline at end of file diff --git a/test/__tests__/data/marketo_router_metadata_input.json b/test/__tests__/data/marketo_router_metadata_input.json index 1c02a9c6fd..0c481c38ea 100644 --- a/test/__tests__/data/marketo_router_metadata_input.json +++ b/test/__tests__/data/marketo_router_metadata_input.json @@ -46,10 +46,25 @@ "clientId": "marketo_client_id_success", "clientSecret": "marketo_client_secret_success", "trackAnonymousEvents": true, - "customActivityEventMap": [{ "from": "Product Clicked", "to": "100001" }], - "customActivityPropertyMap": [{ "from": "name", "to": "productName" }], - "customActivityPrimaryKeyMap": [{ "from": "Product Clicked", "to": "name" }], - "leadTraitMapping": [{ "from": "leadScore", "to": "customLeadScore" }] + "customActivityPropertyMap": [ + { + "from": "name", + "to": "productName" + } + ], + "rudderEventsMapping": [ + { + "event": "Product Clicked", + "marketoPrimarykey": "name", + "marketoActivityId": "100001" + } + ], + "leadTraitMapping": [ + { + "from": "leadScore", + "to": "customLeadScore" + } + ] }, "secretConfig": {}, "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", @@ -67,36 +82,81 @@ "clientId", "clientSecret", "trackAnonymousEvents", - "customActivityEventMap", "customActivityPropertyMap", - "customActivityPrimaryKeyMap", + "rudderEventsMapping", "leadTraitMapping" ] }, - "secretKeys": ["clientSecret"], + "secretKeys": [ + "clientSecret" + ], "excludeKeys": [], "includeKeys": [], "routerTransform": true, - "supportedSourceTypes": ["android", "ios", "web", "unity", "amp", "cloud", "reactnative"] + "supportedSourceTypes": [ + "android", + "ios", + "web", + "unity", + "amp", + "cloud", + "reactnative" + ] }, "responseRules": { "responseType": "JSON", "rules": { "retryable": [ - { "success": "false", "errors.0.code": 600 }, - { "success": "false", "errors.0.code": 601 }, - { "success": "false", "errors.0.code": 602 }, - { "success": "false", "errors.0.code": 604 }, - { "success": "false", "errors.0.code": 606 }, - { "success": "false", "errors.0.code": 607 }, - { "success": "false", "errors.0.code": 608 }, - { "success": "false", "errors.0.code": 611 } + { + "success": "false", + "errors.0.code": 600 + }, + { + "success": "false", + "errors.0.code": 601 + }, + { + "success": "false", + "errors.0.code": 602 + }, + { + "success": "false", + "errors.0.code": 604 + }, + { + "success": "false", + "errors.0.code": 606 + }, + { + "success": "false", + "errors.0.code": 607 + }, + { + "success": "false", + "errors.0.code": 608 + }, + { + "success": "false", + "errors.0.code": 611 + } ], "abortable": [ - { "success": "false", "errors.0.code": 603 }, - { "success": "false", "errors.0.code": 605 }, - { "success": "false", "errors.0.code": 609 }, - { "success": "false", "errors.0.code": 610 } + { + "success": "false", + "errors.0.code": 603 + }, + { + "success": "false", + "errors.0.code": 605 + }, + { + "success": "false", + "errors.0.code": 609 + }, + { + "success": "false", + "errors.0.code": 610 + } ] } }, @@ -110,4 +170,4 @@ "isConnectionEnabled": true, "isProcessorEnabled": true } -} +} \ No newline at end of file diff --git a/test/__tests__/data/marketo_router_output.json b/test/__tests__/data/marketo_router_output.json index a8877399e9..35c0d30a8e 100644 --- a/test/__tests__/data/marketo_router_output.json +++ b/test/__tests__/data/marketo_router_output.json @@ -41,29 +41,24 @@ "clientId": "marketo_client_id_success", "clientSecret": "marketo_client_secret_success", "trackAnonymousEvents": true, - "customActivityEventMap": [ - { - "from": "Product Clicked", - "to": "100001" - } - ], "customActivityPropertyMap": [ { "from": "name", "to": "productName" } ], - "customActivityPrimaryKeyMap": [ - { - "from": "Product Clicked", - "to": "name" - } - ], "leadTraitMapping": [ { "from": "leadScore", "to": "customLeadScore" } + ], + "rudderEventsMapping": [ + { + "event": "Product Clicked", + "marketoPrimarykey": "name", + "marketoActivityId": "100001" + } ] }, "secretConfig": {}, @@ -82,17 +77,26 @@ "clientId", "clientSecret", "trackAnonymousEvents", - "customActivityEventMap", + "rudderEventsMapping", "customActivityPropertyMap", - "customActivityPrimaryKeyMap", "leadTraitMapping" ] }, - "secretKeys": ["clientSecret"], + "secretKeys": [ + "clientSecret" + ], "excludeKeys": [], "includeKeys": [], "routerTransform": true, - "supportedSourceTypes": ["android", "ios", "web", "unity", "amp", "cloud", "reactnative"] + "supportedSourceTypes": [ + "android", + "ios", + "web", + "unity", + "amp", + "cloud", + "reactnative" + ] }, "responseRules": { "responseType": "JSON", @@ -204,29 +208,24 @@ "clientId": "marketo_client_id_success", "clientSecret": "marketo_client_secret_success", "trackAnonymousEvents": true, - "customActivityEventMap": [ - { - "from": "Product Clicked", - "to": "100001" - } - ], "customActivityPropertyMap": [ { "from": "name", "to": "productName" } ], - "customActivityPrimaryKeyMap": [ - { - "from": "Product Clicked", - "to": "name" - } - ], "leadTraitMapping": [ { "from": "leadScore", "to": "customLeadScore" } + ], + "rudderEventsMapping": [ + { + "event": "Product Clicked", + "marketoPrimarykey": "name", + "marketoActivityId": "100001" + } ] }, "secretConfig": {}, @@ -245,17 +244,26 @@ "clientId", "clientSecret", "trackAnonymousEvents", - "customActivityEventMap", + "rudderEventsMapping", "customActivityPropertyMap", - "customActivityPrimaryKeyMap", "leadTraitMapping" ] }, - "secretKeys": ["clientSecret"], + "secretKeys": [ + "clientSecret" + ], "excludeKeys": [], "includeKeys": [], "routerTransform": true, - "supportedSourceTypes": ["android", "ios", "web", "unity", "amp", "cloud", "reactnative"] + "supportedSourceTypes": [ + "android", + "ios", + "web", + "unity", + "amp", + "cloud", + "reactnative" + ] }, "responseRules": { "responseType": "JSON", @@ -345,38 +353,38 @@ "clientSecret": "3l3gJpzRsZagD6gu7tnTeKXz0bomLGnd", "trackAnonymousEvents": false, "createIfNotExist": true, - "customActivityEventMap": [ + "rudderEventsMapping": [ { - "from": "acq_signup_completed", - "to": "100026" + "event": "acq_signup_completed", + "marketoActivityId": "100026" }, { - "from": "act_createwebinarform_submit", - "to": "100025" + "event": "act_createwebinarform_submit", + "marketoActivityId": "100025" }, { - "from": "act_presentation_style", - "to": "100025" + "event": "act_presentation_style", + "marketoActivityId": "100025" }, { - "from": "act_webinar_view", - "to": "100025" + "event": "act_webinar_view", + "marketoActivityId": "100025" }, { - "from": "act_webinar_join", - "to": "100025" + "event": "act_webinar_join", + "marketoActivityId": "100025" }, { - "from": "act_presentation_addteammember", - "to": "100025" + "event": "act_presentation_addteammember", + "marketoActivityId": "100025" }, { - "from": "act_engagement_discussions_savediscussion", - "to": "100025" + "event": "act_engagement_discussions_savediscussion", + "marketoActivityId": "100025" }, { - "to": "100025", - "from": "act_engagement_networking_savetime" + "event": "act_engagement_networking_savetime", + "marketoActivityId": "100025" } ] }, @@ -388,17 +396,26 @@ "clientId", "clientSecret", "trackAnonymousEvents", - "customActivityEventMap", + "rudderEventsMapping", "customActivityPropertyMap", - "customActivityPrimaryKeyMap", "leadTraitMapping" ] }, - "secretKeys": ["clientSecret"], + "secretKeys": [ + "clientSecret" + ], "excludeKeys": [], "includeKeys": [], "routerTransform": true, - "supportedSourceTypes": ["android", "ios", "web", "unity", "amp", "cloud", "reactnative"] + "supportedSourceTypes": [ + "android", + "ios", + "web", + "unity", + "amp", + "cloud", + "reactnative" + ] }, "responseRules": { "responseType": "JSON", @@ -492,38 +509,38 @@ "clientSecret": "3l3gJpzRsZagD6gu7tnTeKXz0bomLGnd", "trackAnonymousEvents": false, "createIfNotExist": true, - "customActivityEventMap": [ + "rudderEventsMapping": [ { - "from": "acq_signup_completed", - "to": "100026" + "event": "acq_signup_completed", + "marketoActivityId": "100026" }, { - "from": "act_createwebinarform_submit", - "to": "100025" + "event": "act_createwebinarform_submit", + "marketoActivityId": "100025" }, { - "from": "act_presentation_style", - "to": "100025" + "event": "act_presentation_style", + "marketoActivityId": "100025" }, { - "from": "act_webinar_view", - "to": "100025" + "event": "act_webinar_view", + "marketoActivityId": "100025" }, { - "from": "act_webinar_join", - "to": "100025" + "event": "act_webinar_join", + "marketoActivityId": "100025" }, { - "from": "act_presentation_addteammember", - "to": "100025" + "event": "act_presentation_addteammember", + "marketoActivityId": "100025" }, { - "from": "act_engagement_discussions_savediscussion", - "to": "100025" + "event": "act_engagement_discussions_savediscussion", + "marketoActivityId": "100025" }, { - "to": "100025", - "from": "act_engagement_networking_savetime" + "event": "act_engagement_networking_savetime", + "marketoActivityId": "100025" } ] }, @@ -535,17 +552,26 @@ "clientId", "clientSecret", "trackAnonymousEvents", - "customActivityEventMap", + "rudderEventsMapping", "customActivityPropertyMap", - "customActivityPrimaryKeyMap", "leadTraitMapping" ] }, - "secretKeys": ["clientSecret"], + "secretKeys": [ + "clientSecret" + ], "excludeKeys": [], "includeKeys": [], "routerTransform": true, - "supportedSourceTypes": ["android", "ios", "web", "unity", "amp", "cloud", "reactnative"] + "supportedSourceTypes": [ + "android", + "ios", + "web", + "unity", + "amp", + "cloud", + "reactnative" + ] }, "responseRules": { "responseType": "JSON", @@ -673,38 +699,38 @@ "clientSecret": "3l3gJpzRsZagD6gu7tnTeKXz0bomLGnd", "trackAnonymousEvents": false, "createIfNotExist": true, - "customActivityEventMap": [ + "rudderEventsMapping": [ { - "from": "acq_signup_completed", - "to": "100026" + "event": "acq_signup_completed", + "marketoActivityId": "100026" }, { - "from": "act_createwebinarform_submit", - "to": "100025" + "event": "act_createwebinarform_submit", + "marketoActivityId": "100025" }, { - "from": "act_presentation_style", - "to": "100025" + "event": "act_presentation_style", + "marketoActivityId": "100025" }, { - "from": "act_webinar_view", - "to": "100025" + "event": "act_webinar_view", + "marketoActivityId": "100025" }, { - "from": "act_webinar_join", - "to": "100025" + "event": "act_webinar_join", + "marketoActivityId": "100025" }, { - "from": "act_presentation_addteammember", - "to": "100025" + "event": "act_presentation_addteammember", + "marketoActivityId": "100025" }, { - "from": "act_engagement_discussions_savediscussion", - "to": "100025" + "event": "act_engagement_discussions_savediscussion", + "marketoActivityId": "100025" }, { - "to": "100025", - "from": "act_engagement_networking_savetime" + "event": "act_engagement_networking_savetime", + "marketoActivityId": "100025" } ] }, @@ -716,17 +742,26 @@ "clientId", "clientSecret", "trackAnonymousEvents", - "customActivityEventMap", + "rudderEventsMapping", "customActivityPropertyMap", - "customActivityPrimaryKeyMap", "leadTraitMapping" ] }, - "secretKeys": ["clientSecret"], + "secretKeys": [ + "clientSecret" + ], "excludeKeys": [], "includeKeys": [], "routerTransform": true, - "supportedSourceTypes": ["android", "ios", "web", "unity", "amp", "cloud", "reactnative"] + "supportedSourceTypes": [ + "android", + "ios", + "web", + "unity", + "amp", + "cloud", + "reactnative" + ] }, "responseRules": { "responseType": "JSON", @@ -804,4 +839,4 @@ "isProcessorEnabled": true } } -] +] \ No newline at end of file From 4cec65e4103e99021f5108fcc7c557b952f1c5eb Mon Sep 17 00:00:00 2001 From: shrouti1507 <60211312+shrouti1507@users.noreply.github.com> Date: Tue, 5 Dec 2023 17:57:02 +0530 Subject: [PATCH 042/135] fix: salesforce transformer proxy response handling issue for authorization flow (#2873) --- .../destinations/salesforce/networkHandler.js | 2 ++ src/v0/destinations/salesforce/utils.js | 15 ++++++--- .../salesforce_oauth/networkHandler.js | 33 +++++++++++++++++++ test/__tests__/facebook_conversions.test.js | 2 ++ .../salesforce/dataDelivery/data.ts | 1 - 5 files changed, 47 insertions(+), 6 deletions(-) create mode 100644 src/v0/destinations/salesforce_oauth/networkHandler.js diff --git a/src/v0/destinations/salesforce/networkHandler.js b/src/v0/destinations/salesforce/networkHandler.js index 622d2ae731..dc67aff1b7 100644 --- a/src/v0/destinations/salesforce/networkHandler.js +++ b/src/v0/destinations/salesforce/networkHandler.js @@ -1,5 +1,6 @@ const { proxyRequest, prepareProxyRequest } = require('../../../adapters/network'); const { processAxiosResponse } = require('../../../adapters/utils/networkUtils'); +const { LEGACY } = require('./config'); const { salesforceResponseHandler } = require('./utils'); const responseHandler = (destinationResponse, destType) => { @@ -9,6 +10,7 @@ const responseHandler = (destinationResponse, destType) => { destinationResponse, 'during Salesforce Response Handling', destinationResponse?.rudderJobMetadata?.destInfo?.authKey, + LEGACY ); // else successfully return status as 200, message and original destination response diff --git a/src/v0/destinations/salesforce/utils.js b/src/v0/destinations/salesforce/utils.js index c725ec3b20..96735ecc17 100644 --- a/src/v0/destinations/salesforce/utils.js +++ b/src/v0/destinations/salesforce/utils.js @@ -33,16 +33,21 @@ const salesforceResponseHandler = (destResponse, sourceMessage, authKey, authori const matchErrorCode = (errorCode) => response && Array.isArray(response) && response.some((resp) => resp?.errorCode === errorCode); if (status === 401 && authKey && matchErrorCode('INVALID_SESSION_ID')) { - if (authorizationFlow === LEGACY) { - // checking for invalid/expired token errors and evicting cache in that case - // rudderJobMetadata contains some destination info which is being used to evict the cache - ACCESS_TOKEN_CACHE.del(authKey); + if (authorizationFlow === OAUTH) { + throw new RetryableError( + `${DESTINATION} Request Failed - due to "INVALID_SESSION_ID", (Retryable) ${sourceMessage}`, + 500, + destResponse, + getAuthErrCategoryFromStCode(status), + ); } + // checking for invalid/expired token errors and evicting cache in that case + // rudderJobMetadata contains some destination info which is being used to evict the cache + ACCESS_TOKEN_CACHE.del(authKey); throw new RetryableError( `${DESTINATION} Request Failed - due to "INVALID_SESSION_ID", (Retryable) ${sourceMessage}`, 500, destResponse, - authorizationFlow === LEGACY ? '' : getAuthErrCategoryFromStCode(status), ); } else if (status === 403 && matchErrorCode('REQUEST_LIMIT_EXCEEDED')) { // If the error code is REQUEST_LIMIT_EXCEEDED, you’ve exceeded API request limits in your org. diff --git a/src/v0/destinations/salesforce_oauth/networkHandler.js b/src/v0/destinations/salesforce_oauth/networkHandler.js new file mode 100644 index 0000000000..2042830cb1 --- /dev/null +++ b/src/v0/destinations/salesforce_oauth/networkHandler.js @@ -0,0 +1,33 @@ +const { proxyRequest, prepareProxyRequest } = require('../../../adapters/network'); +const { processAxiosResponse } = require('../../../adapters/utils/networkUtils'); +const { OAUTH } = require('../salesforce/config'); +const { salesforceResponseHandler } = require('../salesforce/utils'); + +const responseHandler = (destinationResponse, destType) => { + const message = `Request for destination: ${destType} Processed Successfully`; + + salesforceResponseHandler( + destinationResponse, + 'during Salesforce Response Handling', + destinationResponse?.rudderJobMetadata?.destInfo?.authKey, + OAUTH + ); + + // else successfully return status as 200, message and original destination response + return { + status: 200, + message, + destinationResponse, + }; +}; + +function networkHandler() { + this.responseHandler = responseHandler; + this.proxy = proxyRequest; + this.prepareProxy = prepareProxyRequest; + this.processAxiosResponse = processAxiosResponse; +} + +module.exports = { + networkHandler, +}; diff --git a/test/__tests__/facebook_conversions.test.js b/test/__tests__/facebook_conversions.test.js index a450952efe..9495a85913 100644 --- a/test/__tests__/facebook_conversions.test.js +++ b/test/__tests__/facebook_conversions.test.js @@ -23,6 +23,8 @@ const outputRouterDataFile = fs.readFileSync( const inputRouterData = JSON.parse(inputRouterDataFile); const expectedRouterData = JSON.parse(outputRouterDataFile); +Date.now = jest.fn(() => new Date("2023-11-12T15:46:51.000Z")); // 2023-11-12T15:46:51.693229+05:30 + describe(`${name} Tests`, () => { describe("Processor", () => { testData.forEach((dataPoint, index) => { diff --git a/test/integrations/destinations/salesforce/dataDelivery/data.ts b/test/integrations/destinations/salesforce/dataDelivery/data.ts index c53ce58f9e..2f1e04815b 100644 --- a/test/integrations/destinations/salesforce/dataDelivery/data.ts +++ b/test/integrations/destinations/salesforce/dataDelivery/data.ts @@ -119,7 +119,6 @@ export const data = [ body: { output: { status: 500, - authErrorCategory: 'REFRESH_TOKEN', message: 'Salesforce Request Failed - due to "INVALID_SESSION_ID", (Retryable) during Salesforce Response Handling', destinationResponse: { From a97f6db0488e4ba3e9a4b2e4cb2c87d8a23b9c77 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Tue, 5 Dec 2023 12:29:58 +0000 Subject: [PATCH 043/135] chore(release): 1.50.1 --- CHANGELOG.md | 7 +++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f990fe3b9..10f456d480 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [1.50.1](https://github.com/rudderlabs/rudder-transformer/compare/v1.50.0...v1.50.1) (2023-12-05) + + +### Bug Fixes + +* salesforce transformer proxy response handling issue for authorization flow ([#2873](https://github.com/rudderlabs/rudder-transformer/issues/2873)) ([4cec65e](https://github.com/rudderlabs/rudder-transformer/commit/4cec65e4103e99021f5108fcc7c557b952f1c5eb)) + ## [1.50.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.49.1...v1.50.0) (2023-11-13) diff --git a/package-lock.json b/package-lock.json index 28d814c925..94246d066b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "rudder-transformer", - "version": "1.50.0", + "version": "1.50.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "rudder-transformer", - "version": "1.50.0", + "version": "1.50.1", "license": "ISC", "dependencies": { "@amplitude/ua-parser-js": "^0.7.24", diff --git a/package.json b/package.json index e4a4d9151c..60fb93acc4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rudder-transformer", - "version": "1.50.0", + "version": "1.50.1", "description": "", "homepage": "https://github.com/rudderlabs/rudder-transformer#readme", "bugs": { From be6ef2605f04e9182534b9633eeec1091cf7a431 Mon Sep 17 00:00:00 2001 From: Utsab Chowdhury Date: Wed, 6 Dec 2023 13:56:53 +0530 Subject: [PATCH 044/135] fix: add support for custom properties for braze purchase events (#2856) --- src/v0/destinations/braze/braze.util.test.js | 141 +++++++++++++++++++ src/v0/destinations/braze/config.js | 4 +- src/v0/destinations/braze/transform.js | 2 +- src/v0/destinations/braze/util.js | 7 +- test/__tests__/data/braze_input.json | 96 +++++++++++++ test/__tests__/data/braze_output.json | 71 ++++++++++ 6 files changed, 318 insertions(+), 3 deletions(-) diff --git a/src/v0/destinations/braze/braze.util.test.js b/src/v0/destinations/braze/braze.util.test.js index eb5a46fe34..9859e16152 100644 --- a/src/v0/destinations/braze/braze.util.test.js +++ b/src/v0/destinations/braze/braze.util.test.js @@ -1219,4 +1219,145 @@ describe('getPurchaseObjs', () => { ); } }); + + test('products having extra properties', () => { + const output = getPurchaseObjs( + { + properties: { + products: [ + { product_id: '123', price: 10.99, quantity: 2, random_extra_property_a: 'abc' }, + { product_id: '456', price: 5.49, quantity: 1, random_extra_property_b: 'efg' }, + { + product_id: '789', + price: 15.49, + quantity: 1, + random_extra_property_a: 'abc', + random_extra_property_b: 'efg', + random_extra_property_c: 'hij', + }, + ], + currency: 'USD', + }, + timestamp: '2023-08-04T12:34:56Z', + anonymousId: 'abc', + }, + { + sendPurchaseEventWithExtraProperties: true, + }, + ); + expect(output).toEqual([ + { + product_id: '123', + price: 10.99, + currency: 'USD', + quantity: 2, + time: '2023-08-04T12:34:56Z', + properties: { + random_extra_property_a: 'abc', + }, + _update_existing_only: false, + user_alias: { + alias_name: 'abc', + alias_label: 'rudder_id', + }, + }, + { + product_id: '456', + price: 5.49, + currency: 'USD', + quantity: 1, + time: '2023-08-04T12:34:56Z', + properties: { + random_extra_property_b: 'efg', + }, + _update_existing_only: false, + user_alias: { + alias_name: 'abc', + alias_label: 'rudder_id', + }, + }, + { + product_id: '789', + price: 15.49, + currency: 'USD', + quantity: 1, + time: '2023-08-04T12:34:56Z', + properties: { + random_extra_property_a: 'abc', + random_extra_property_b: 'efg', + random_extra_property_c: 'hij', + }, + _update_existing_only: false, + user_alias: { + alias_name: 'abc', + alias_label: 'rudder_id', + }, + }, + ]); + }); + + test('products having extra properties with sendPurchaseEventWithExtraProperties as false', () => { + const output = getPurchaseObjs( + { + properties: { + products: [ + { product_id: '123', price: 10.99, quantity: 2, random_extra_property_a: 'abc' }, + { product_id: '456', price: 5.49, quantity: 1, random_extra_property_b: 'efg' }, + { + product_id: '789', + price: 15.49, + quantity: 1, + random_extra_property_a: 'abc', + random_extra_property_b: 'efg', + random_extra_property_c: 'hij', + }, + ], + currency: 'USD', + }, + timestamp: '2023-08-04T12:34:56Z', + anonymousId: 'abc', + }, + { + sendPurchaseEventWithExtraProperties: false, + }, + ); + expect(output).toEqual([ + { + product_id: '123', + price: 10.99, + currency: 'USD', + quantity: 2, + time: '2023-08-04T12:34:56Z', + _update_existing_only: false, + user_alias: { + alias_name: 'abc', + alias_label: 'rudder_id', + }, + }, + { + product_id: '456', + price: 5.49, + currency: 'USD', + quantity: 1, + time: '2023-08-04T12:34:56Z', + _update_existing_only: false, + user_alias: { + alias_name: 'abc', + alias_label: 'rudder_id', + }, + }, + { + product_id: '789', + price: 15.49, + currency: 'USD', + quantity: 1, + time: '2023-08-04T12:34:56Z', + _update_existing_only: false, + user_alias: { + alias_name: 'abc', + alias_label: 'rudder_id', + }, + }, + ]); + }); }); diff --git a/src/v0/destinations/braze/config.js b/src/v0/destinations/braze/config.js index 2e24f43f61..2bbade2754 100644 --- a/src/v0/destinations/braze/config.js +++ b/src/v0/destinations/braze/config.js @@ -56,6 +56,7 @@ const BRAZE_NON_BILLABLE_ATTRIBUTES = [ 'subscription_groups', ]; +const BRAZE_PURCHASE_STANDARD_PROPERTIES = ['product_id', 'sku', 'price', 'quantity', 'currency']; module.exports = { ConfigCategory, mappingConfig, @@ -64,6 +65,7 @@ module.exports = { getSubscriptionGroupEndPoint, getAliasMergeEndPoint, BRAZE_PARTNER_NAME, + BRAZE_PURCHASE_STANDARD_PROPERTIES, TRACK_BRAZE_MAX_REQ_COUNT, IDENTIFY_BRAZE_MAX_REQ_COUNT, DESTINATION, @@ -71,5 +73,5 @@ module.exports = { DEL_MAX_BATCH_SIZE, BRAZE_NON_BILLABLE_ATTRIBUTES, ALIAS_BRAZE_MAX_REQ_COUNT, - SUBSCRIPTION_BRAZE_MAX_REQ_COUNT + SUBSCRIPTION_BRAZE_MAX_REQ_COUNT, }; diff --git a/src/v0/destinations/braze/transform.js b/src/v0/destinations/braze/transform.js index b939e1f414..38a5947ded 100644 --- a/src/v0/destinations/braze/transform.js +++ b/src/v0/destinations/braze/transform.js @@ -315,7 +315,7 @@ function processTrackEvent(messageType, message, destination, mappingJson, proce typeof eventName === 'string' && eventName.toLowerCase() === 'order completed' ) { - const purchaseObjs = getPurchaseObjs(message); + const purchaseObjs = getPurchaseObjs(message, destination.Config); // del used properties delete properties.products; diff --git a/src/v0/destinations/braze/util.js b/src/v0/destinations/braze/util.js index 9b5d57d6bc..3b0855b338 100644 --- a/src/v0/destinations/braze/util.js +++ b/src/v0/destinations/braze/util.js @@ -21,6 +21,7 @@ const { SUBSCRIPTION_BRAZE_MAX_REQ_COUNT, ALIAS_BRAZE_MAX_REQ_COUNT, TRACK_BRAZE_MAX_REQ_COUNT, + BRAZE_PURCHASE_STANDARD_PROPERTIES, } = require('./config'); const { JSON_MIME_TYPE, HTTP_STATUS_CODES } = require('../../util/constant'); const { isObject } = require('../../util'); @@ -539,7 +540,7 @@ function addMandatoryPurchaseProperties(productId, price, currencyCode, quantity }; } -function getPurchaseObjs(message) { +function getPurchaseObjs(message, config) { // ref:https://www.braze.com/docs/api/objects_filters/purchase_object/ const validateForPurchaseEvent = (message) => { const { properties } = message; @@ -634,6 +635,10 @@ function getPurchaseObjs(message) { parseInt(quantity, 10), timestamp, ); + const extraProperties = _.omit(product, BRAZE_PURCHASE_STANDARD_PROPERTIES); + if (Object.keys(extraProperties).length > 0 && config.sendPurchaseEventWithExtraProperties) { + purchaseObj = { ...purchaseObj, properties: extraProperties }; + } purchaseObj = setExternalIdOrAliasObject(purchaseObj, message); purchaseObjs.push(purchaseObj); }); diff --git a/test/__tests__/data/braze_input.json b/test/__tests__/data/braze_input.json index e799cf2e82..8c3294e42b 100644 --- a/test/__tests__/data/braze_input.json +++ b/test/__tests__/data/braze_input.json @@ -1814,5 +1814,101 @@ "type": "track", "userId": "mickeyMouse" } + }, + { + "destination": { + "Config": { + "restApiKey": "dummyApiKey", + "prefixProperties": true, + "useNativeSDK": false, + "sendPurchaseEventWithExtraProperties": true + }, + "DestinationDefinition": { + "DisplayName": "Braze", + "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", + "Name": "BRAZE" + }, + "Enabled": true, + "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", + "Name": "Braze", + "Transformations": [] + }, + "message": { + "anonymousId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.5" + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.5" + }, + "locale": "en-GB", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + }, + "traits": { + "city": "Disney", + "country": "USA", + "email": "mickey@disney.com", + "firstname": "Mickey" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" + }, + "event": "Order Completed", + "integrations": { + "All": true + }, + "messageId": "aa5f5e44-8756-40ad-ad1e-b0d3b9fa710a", + "originalTimestamp": "2020-01-24T06:29:02.367Z", + "properties": { + "affiliation": "Google Store", + "checkout_id": "fksdjfsdjfisjf9sdfjsd9f", + "coupon": "hasbros", + "currency": "USD", + "discount": 2.5, + "order_id": "50314b8e9bcf000000000000", + "products": [ + { + "category": "Games", + "image_url": "https:///www.example.com/product/path.jpg", + "name": "Monopoly: 3rd Edition", + "price": 0, + "product_id": "507f1f77bcf86cd799439023", + "quantity": 1, + "sku": "45790-32", + "url": "https://www.example.com/product/path" + }, + { + "category": "Games", + "name": "Uno Card Game", + "price": 0, + "product_id": "505bd76785ebb509fc183724", + "quantity": 2, + "sku": "46493-32" + } + ], + "revenue": 25, + "shipping": 3, + "subtotal": 22.5, + "tax": 2, + "total": 27.5 + }, + "receivedAt": "2020-01-24T11:59:02.403+05:30", + "request_ip": "[::1]:53712", + "sentAt": "2020-01-24T06:29:02.368Z", + "timestamp": "2020-01-24T11:59:02.402+05:30", + "type": "track", + "userId": "" + } } ] diff --git a/test/__tests__/data/braze_output.json b/test/__tests__/data/braze_output.json index 10c42b1064..0575326237 100644 --- a/test/__tests__/data/braze_output.json +++ b/test/__tests__/data/braze_output.json @@ -963,5 +963,76 @@ }, "files": {}, "userId": "mickeyMouse" + }, + { + "body": { + "FORM": {}, + "JSON": { + "attributes": [ + { + "_update_existing_only": false, + "city": "Disney", + "country": "USA", + "email": "mickey@disney.com", + "firstname": "Mickey", + "user_alias": { + "alias_label": "rudder_id", + "alias_name": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca" + } + } + ], + "partner": "RudderStack", + "purchases": [ + { + "_update_existing_only": false, + "currency": "USD", + "price": 0, + "product_id": "507f1f77bcf86cd799439023", + "properties": { + "category": "Games", + "image_url": "https:///www.example.com/product/path.jpg", + "name": "Monopoly: 3rd Edition", + "url": "https://www.example.com/product/path" + }, + "quantity": 1, + "time": "2020-01-24T11:59:02.402+05:30", + "user_alias": { + "alias_label": "rudder_id", + "alias_name": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca" + } + }, + { + "_update_existing_only": false, + "currency": "USD", + "price": 0, + "product_id": "505bd76785ebb509fc183724", + "properties": { + "category": "Games", + "name": "Uno Card Game" + }, + "quantity": 2, + "time": "2020-01-24T11:59:02.402+05:30", + "user_alias": { + "alias_label": "rudder_id", + "alias_name": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca" + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {} + }, + "endpoint": "https://rest.fra-01.braze.eu/users/track", + "files": {}, + "headers": { + "Accept": "application/json", + "Authorization": "Bearer dummyApiKey", + "Content-Type": "application/json" + }, + "method": "POST", + "params": {}, + "type": "REST", + "userId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", + "version": "1" } ] From 669ed41702d267e90bab69f98dc7b5f984df44d8 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Wed, 6 Dec 2023 10:14:39 +0000 Subject: [PATCH 045/135] chore(release): 1.51.0 --- CHANGELOG.md | 26 ++++++++++++++++++++++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 29 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 10f456d480..451051777d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,32 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [1.51.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.50.1...v1.51.0) (2023-12-06) + + +### Features + +* cm360 router batching ([#2836](https://github.com/rudderlabs/rudder-transformer/issues/2836)) ([4b260e4](https://github.com/rudderlabs/rudder-transformer/commit/4b260e4ec6d25875903830004b3e4975b3402b2d)) +* cm360 transformerproxy V1 flag ([#2848](https://github.com/rudderlabs/rudder-transformer/issues/2848)) ([27f0797](https://github.com/rudderlabs/rudder-transformer/commit/27f0797c6dcd626a713c11a48c6e85a69e0a4963)) +* **INT-305:** onboard gladly destination ([#2786](https://github.com/rudderlabs/rudder-transformer/issues/2786)) ([ff80b88](https://github.com/rudderlabs/rudder-transformer/commit/ff80b885fe0507c137b3c9eacffcef331010da0c)) +* marketo: migrate config fields and fix test cases ([#2789](https://github.com/rudderlabs/rudder-transformer/issues/2789)) ([7910dba](https://github.com/rudderlabs/rudder-transformer/commit/7910dba2318f92cec3be1b7c7aa6b00428ecae94)) +* mixpanel set once feature onboard ([#2820](https://github.com/rudderlabs/rudder-transformer/issues/2820)) ([9eda50e](https://github.com/rudderlabs/rudder-transformer/commit/9eda50e850c5a1ccb46f1b54c3d176edb915eb27)) +* onboard webhook to component tests ([#2837](https://github.com/rudderlabs/rudder-transformer/issues/2837)) ([284d141](https://github.com/rudderlabs/rudder-transformer/commit/284d1411514c26dda2403a4a18967e5f40e255ea)) +* update facebook destinations API version to v18.0 ([#2828](https://github.com/rudderlabs/rudder-transformer/issues/2828)) ([3127a1c](https://github.com/rudderlabs/rudder-transformer/commit/3127a1ca8dc1b887f9158a1d839c5504f40c4678)) + + +### Bug Fixes + +* add support for custom properties for braze purchase events ([#2856](https://github.com/rudderlabs/rudder-transformer/issues/2856)) ([be6ef26](https://github.com/rudderlabs/rudder-transformer/commit/be6ef2605f04e9182534b9633eeec1091cf7a431)) +* bugsnag issue in moengage identify event ([#2845](https://github.com/rudderlabs/rudder-transformer/issues/2845)) ([0e7adc6](https://github.com/rudderlabs/rudder-transformer/commit/0e7adc66ff88d9510e48a5651460b4e02cc57c78)) +* encode &, < and > to html counterparts in adobe analytics ([#2854](https://github.com/rudderlabs/rudder-transformer/issues/2854)) ([571dbf5](https://github.com/rudderlabs/rudder-transformer/commit/571dbf5bd65e7d0e261562ff3da3b393f27f27b6)) +* error handling in active_campaign ([#2843](https://github.com/rudderlabs/rudder-transformer/issues/2843)) ([a015460](https://github.com/rudderlabs/rudder-transformer/commit/a015460f0a6d2d5320f633abc151febf22561b6b)) +* make supportTransformerProxyV1 false ([#2861](https://github.com/rudderlabs/rudder-transformer/issues/2861)) ([80cf69d](https://github.com/rudderlabs/rudder-transformer/commit/80cf69dc40bb4dc7c0a6d516814f36d962018745)) +* remove errorCategory for braze dedup error ([#2850](https://github.com/rudderlabs/rudder-transformer/issues/2850)) ([91d4cd1](https://github.com/rudderlabs/rudder-transformer/commit/91d4cd16f9839b0be5a663ca5010bdd72cff9bdc)) +* sfmc bug fix for track event validations ([#2852](https://github.com/rudderlabs/rudder-transformer/issues/2852)) ([cd9a046](https://github.com/rudderlabs/rudder-transformer/commit/cd9a046f66eab8363373cb9a0fa1afeef3137d78)) +* unhandled error code in facebook_custom_audience ([#2853](https://github.com/rudderlabs/rudder-transformer/issues/2853)) ([8c02b8c](https://github.com/rudderlabs/rudder-transformer/commit/8c02b8ccb2101147ac84b4555e7fd07235ebf9fc)) +* updated transformerProxyV1 name ([#2859](https://github.com/rudderlabs/rudder-transformer/issues/2859)) ([1a8d825](https://github.com/rudderlabs/rudder-transformer/commit/1a8d825ccbb87d34d8ae5ff2cb02f4be9700eee6)) + ### [1.50.1](https://github.com/rudderlabs/rudder-transformer/compare/v1.50.0...v1.50.1) (2023-12-05) diff --git a/package-lock.json b/package-lock.json index 4c8438e746..24e6a3bc3a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "rudder-transformer", - "version": "1.50.1", + "version": "1.51.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "rudder-transformer", - "version": "1.50.1", + "version": "1.51.0", "license": "ISC", "dependencies": { "@amplitude/ua-parser-js": "^0.7.24", diff --git a/package.json b/package.json index b5a9bd9e57..457c0eecf2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rudder-transformer", - "version": "1.50.1", + "version": "1.51.0", "description": "", "homepage": "https://github.com/rudderlabs/rudder-transformer#readme", "bugs": { From cd6c3b0672a0b17078627f28f6613a2ef1898ee7 Mon Sep 17 00:00:00 2001 From: Anant Jain Date: Mon, 4 Dec 2023 14:15:18 +0530 Subject: [PATCH 046/135] fix: marketo new field introduction backward compatibility --- src/v0/destinations/marketo/config.js | 18 ++++++------------ test/__tests__/data/marketo_input.json | 13 +++++++++---- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/src/v0/destinations/marketo/config.js b/src/v0/destinations/marketo/config.js index 16449ebbad..604be41dc0 100644 --- a/src/v0/destinations/marketo/config.js +++ b/src/v0/destinations/marketo/config.js @@ -14,24 +14,18 @@ const DESTINATION = 'marketo'; const formatConfig = (destination) => ({ ID: destination.ID, ...destination.Config, - customActivityEventMap: getHashFromArray( - destination.Config.rudderEventsMapping, - 'event', - 'marketoActivityId', - false, - ), + customActivityEventMap: destination.Config?.rudderEventsMapping + ? getHashFromArray(destination.Config.rudderEventsMapping, 'event', 'marketoActivityId', false) + : getHashFromArray(destination.Config.customActivityEventMap, 'from', 'to', false), customActivityPropertyMap: getHashFromArray( destination.Config.customActivityPropertyMap, 'from', 'to', false, ), - customActivityPrimaryKeyMap: getHashFromArray( - destination.Config.rudderEventsMapping, - 'event', - 'marketoPrimarykey', - false, - ), + customActivityPrimaryKeyMap: destination.Config?.rudderEventsMapping + ? getHashFromArray(destination.Config.rudderEventsMapping, 'event', 'marketoPrimarykey', false) + : getHashFromArray(destination.Config.customActivityPrimaryKeyMap, 'from', 'to', false), leadTraitMapping: getHashFromArray(destination.Config.leadTraitMapping, 'from', 'to', false), responseRules: destination.DestinationDefinition ? destination.DestinationDefinition.ResponseRules diff --git a/test/__tests__/data/marketo_input.json b/test/__tests__/data/marketo_input.json index 6a891fdea0..10fff935fc 100644 --- a/test/__tests__/data/marketo_input.json +++ b/test/__tests__/data/marketo_input.json @@ -170,11 +170,16 @@ } ], "createIfNotExist": true, - "rudderEventsMapping": [ + "customActivityPrimaryKeyMap": [ { - "event": "Product Clicked", - "marketoPrimarykey": "name", - "marketoActivityId": "100001" + "from": "Product Clicked", + "to": "name" + } + ], + "customActivityEventMap": [ + { + "from": "Product Clicked", + "to": "100001" } ] } From b13f0a6340177a56417692ad7dcf3829d4990826 Mon Sep 17 00:00:00 2001 From: AASHISH MALIK Date: Mon, 4 Dec 2023 17:00:24 +0530 Subject: [PATCH 047/135] fix: remove ErrorResponse type from postTransfomration delivery --- src/services/destination/postTransformation.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/services/destination/postTransformation.ts b/src/services/destination/postTransformation.ts index 1e99961045..dc5ab0644d 100644 --- a/src/services/destination/postTransformation.ts +++ b/src/services/destination/postTransformation.ts @@ -148,7 +148,7 @@ export class DestinationPostTransformationService { } public static handleDeliveryFailureEvents( - error: ErrorResponse, + error: NonNullable, metaTo: MetaTransferObject, ): DeliveryResponse { const errObj = generateErrorObject(error, metaTo.errorDetails, false); @@ -161,12 +161,6 @@ export class DestinationPostTransformationService { authErrorCategory: errObj.authErrorCategory, }), } as DeliveryResponse; - - // for transformer-proxy to maintain contract - const { response } = error; - if (response) { - resp.response = response; - } ErrorReportingService.reportError(error, metaTo.errorContext, resp); return resp; } From 24a2cd4d025b5ce01ef32a0ff3b0a43d340dd11d Mon Sep 17 00:00:00 2001 From: Utsab Chowdhury Date: Wed, 6 Dec 2023 16:32:48 +0530 Subject: [PATCH 048/135] chore: cleanup of postTransformation.ts --- src/services/destination/postTransformation.ts | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/services/destination/postTransformation.ts b/src/services/destination/postTransformation.ts index dc5ab0644d..0b91eb7cc1 100644 --- a/src/services/destination/postTransformation.ts +++ b/src/services/destination/postTransformation.ts @@ -16,15 +16,6 @@ import { ErrorReportingService } from '../errorReporting'; import tags from '../../v0/util/tags'; import stats from '../../util/stats'; -type ErrorResponse = { - status?: number; - message?: string; - destinationResponse?: object; - statTags?: object; - authErrorCategory?: string | undefined; - response?: object | undefined; -}; - export class DestinationPostTransformationService { public static handleProcessorTransformSucessEvents( event: ProcessorTransformationRequest, From 45db59067d2272d13b08c355740707e7e53a3458 Mon Sep 17 00:00:00 2001 From: Sankeerth Date: Wed, 6 Dec 2023 16:36:14 +0530 Subject: [PATCH 049/135] chore: remove logging in tiktok_audience (#2864) --- src/cdk/v2/destinations/tiktok_audience/rtWorkflow.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/src/cdk/v2/destinations/tiktok_audience/rtWorkflow.yaml b/src/cdk/v2/destinations/tiktok_audience/rtWorkflow.yaml index 3db4c405ad..a7fa855938 100644 --- a/src/cdk/v2/destinations/tiktok_audience/rtWorkflow.yaml +++ b/src/cdk/v2/destinations/tiktok_audience/rtWorkflow.yaml @@ -13,7 +13,6 @@ steps: loopOverInput: true - name: successfulEvents - debug: true template: | $.outputs.transform#idx{"output" in .}.({ "batchedRequest": .output, From 6dd0eb21a87246d9d04172715f24f09cdc50044a Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Wed, 6 Dec 2023 11:19:32 +0000 Subject: [PATCH 050/135] chore(release): 1.51.1 --- CHANGELOG.md | 9 +++++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 451051777d..b769b51a6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,15 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [1.51.1](https://github.com/rudderlabs/rudder-transformer/compare/v1.51.0...v1.51.1) (2023-12-06) + + +### Bug Fixes + +* marketo backward compatibility ([#2880](https://github.com/rudderlabs/rudder-transformer/issues/2880)) ([af6aebb](https://github.com/rudderlabs/rudder-transformer/commit/af6aebba9a9891fadc91fe2dc4ae4db4b1e269c9)) +* marketo new field introduction backward compatibility ([cd6c3b0](https://github.com/rudderlabs/rudder-transformer/commit/cd6c3b0672a0b17078627f28f6613a2ef1898ee7)) +* remove ErrorResponse type from postTransfomration delivery ([b13f0a6](https://github.com/rudderlabs/rudder-transformer/commit/b13f0a6340177a56417692ad7dcf3829d4990826)) + ## [1.51.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.50.1...v1.51.0) (2023-12-06) diff --git a/package-lock.json b/package-lock.json index 24e6a3bc3a..27655f81ef 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "rudder-transformer", - "version": "1.51.0", + "version": "1.51.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "rudder-transformer", - "version": "1.51.0", + "version": "1.51.1", "license": "ISC", "dependencies": { "@amplitude/ua-parser-js": "^0.7.24", diff --git a/package.json b/package.json index 457c0eecf2..a36ac26e9c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rudder-transformer", - "version": "1.51.0", + "version": "1.51.1", "description": "", "homepage": "https://github.com/rudderlabs/rudder-transformer#readme", "bugs": { From 71317919aa101e2350b6d4cb58f78e9157298bfd Mon Sep 17 00:00:00 2001 From: Anant Jain <62471433+anantjain45823@users.noreply.github.com> Date: Thu, 7 Dec 2023 11:37:12 +0530 Subject: [PATCH 051/135] chore: add stats for shopify Id resolution (#2885) chore: add stats for shopify anonId resolution based on shopifyTopic and method --- src/util/prometheus.js | 6 ++++++ src/v0/sources/shopify/transform.js | 2 +- src/v0/sources/shopify/util.js | 11 +++++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/util/prometheus.js b/src/util/prometheus.js index 116f77d214..ec8ad61789 100644 --- a/src/util/prometheus.js +++ b/src/util/prometheus.js @@ -487,6 +487,12 @@ class Prometheus { type: 'counter', labelNames: ['type', 'writeKey', 'source'], }, + { + name: 'shopify_anon_id_resolve', + help: 'shopify_anon_id_resolve', + type: 'counter', + labelNames: ['method', 'writeKey', 'shopifyTopic'], + }, { name: 'shopify_redis_calls', help: 'shopify_redis_calls', diff --git a/src/v0/sources/shopify/transform.js b/src/v0/sources/shopify/transform.js index fd763eeb46..013580d7a3 100644 --- a/src/v0/sources/shopify/transform.js +++ b/src/v0/sources/shopify/transform.js @@ -175,7 +175,7 @@ const processEvent = async (inputEvent, metricMetadata) => { if (message.type !== EventType.IDENTIFY) { const { anonymousId, sessionId } = await getAnonymousIdAndSessionId( message, - metricMetadata, + { shopifyTopic, ...metricMetadata }, redisData, ); if (isDefinedAndNotNull(anonymousId)) { diff --git a/src/v0/sources/shopify/util.js b/src/v0/sources/shopify/util.js index 61501bdab6..6f31ade4a7 100644 --- a/src/v0/sources/shopify/util.js +++ b/src/v0/sources/shopify/util.js @@ -164,6 +164,10 @@ const getAnonymousIdAndSessionId = async (message, metricMetadata, redisData = n } // falling back to cartToken mapping or its hash in case no rudderAnonymousId or rudderSessionId is found if (isDefinedAndNotNull(anonymousId) && isDefinedAndNotNull(sessionId)) { + stats.increment('shopify_anon_id_resolve', { + method: 'note_attributes', + ...metricMetadata, + }); return { anonymousId, sessionId }; } const cartToken = getCartToken(message); @@ -189,6 +193,13 @@ const getAnonymousIdAndSessionId = async (message, metricMetadata, redisData = n Hash the id and use it as anonymousId (limiting 256 -> 36 chars) and sessionId is not sent as its not required field */ anonymousId = v5(cartToken, v5.URL); + } else { + // This metric let us know how many events based on event name used redis for anonId resolution + // and for how many + stats.increment('shopify_anon_id_resolve', { + method: 'database', + ...metricMetadata, + }); } return { anonymousId, sessionId }; }; From b3437a34358d5fd5b1eb63f30a5a695f39aa84ff Mon Sep 17 00:00:00 2001 From: Abhimanyu Babbar Date: Thu, 7 Dec 2023 14:45:33 +0530 Subject: [PATCH 052/135] fix(dm): add workspaceId in common metadata to be returned to the callers (#2868) Add workspaceId in common metadata to be returned to the callers --- src/services/userTransform.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/services/userTransform.ts b/src/services/userTransform.ts index ddd5c82f67..bf34e3d82a 100644 --- a/src/services/userTransform.ts +++ b/src/services/userTransform.ts @@ -65,6 +65,7 @@ export class UserTransformService { sourceId: eventsToProcess[0]?.metadata?.sourceId, destinationId: eventsToProcess[0]?.metadata.destinationId, destinationType: eventsToProcess[0]?.metadata.destinationType, + workspaceId: eventsToProcess[0]?.metadata.workspaceId, messageIds, }; From c8e5bfb34240d092fb8979f916ac770c667fb652 Mon Sep 17 00:00:00 2001 From: Anant Jain <62471433+anantjain45823@users.noreply.github.com> Date: Fri, 8 Dec 2023 10:19:01 +0530 Subject: [PATCH 053/135] chore: add user deletion stats for regulation worker at destType level (#2884) --- src/services/destination/nativeIntegration.ts | 7 +++++++ src/services/destination/postTransformation.ts | 2 +- src/util/prometheus.js | 18 +++++++++++++++--- 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/services/destination/nativeIntegration.ts b/src/services/destination/nativeIntegration.ts index 510fa80362..6bb79ce27a 100644 --- a/src/services/destination/nativeIntegration.ts +++ b/src/services/destination/nativeIntegration.ts @@ -18,6 +18,7 @@ import { DestinationPostTransformationService } from './postTransformation'; import networkHandlerFactory from '../../adapters/networkHandlerFactory'; import { FetchHandler } from '../../helpers/fetchHandlers'; import tags from '../../v0/util/tags'; +import stats from '../../util/stats'; export class NativeIntegrationDestinationService implements DestinationService { public init() {} @@ -203,6 +204,7 @@ export class NativeIntegrationDestinationService implements DestinationService { ): Promise { const response = await Promise.all( requests.map(async (request) => { + const startTime = new Date(); const { destType } = request; const destUserDeletionHandler: any = FetchHandler.getDeletionHandler( destType.toLowerCase(), @@ -219,6 +221,11 @@ export class NativeIntegrationDestinationService implements DestinationService { ...request, rudderDestInfo, }); + stats.timing('regulation_worker_requests_dest_latency', startTime, { + feature: tags.FEATURES.USER_DELETION, + implementation: tags.IMPLEMENTATIONS.NATIVE, + destType, + }); return result; } catch (error: any) { const metaTO = this.getTags(destType, 'unknown', 'unknown', tags.FEATURES.USER_DELETION); diff --git a/src/services/destination/postTransformation.ts b/src/services/destination/postTransformation.ts index 0b91eb7cc1..076f5ba55e 100644 --- a/src/services/destination/postTransformation.ts +++ b/src/services/destination/postTransformation.ts @@ -161,7 +161,7 @@ export class DestinationPostTransformationService { metaTo: MetaTransferObject, ): UserDeletionResponse { const errObj = generateErrorObject(error, metaTo.errorDetails, false); - // TODO: Add stat tags here + stats.increment('regulation_worker_user_deletion_failure', metaTo.errorDetails); const resp = { statusCode: errObj.status, error: errObj.message, diff --git a/src/util/prometheus.js b/src/util/prometheus.js index ec8ad61789..d7ba3b7c61 100644 --- a/src/util/prometheus.js +++ b/src/util/prometheus.js @@ -451,6 +451,12 @@ class Prometheus { type: 'counter', labelNames: ['writeKey', 'timestamp'], }, + { + name: 'regulation_worker_user_deletion_failure', + help: 'regulation_worker_user_deletion_failure', + type: 'counter', + labelNames: ['destType', 'module', 'implementation', 'feature'], + }, { name: 'shopify_server_side_identifier_event', help: 'shopify_server_side_identifier_event', @@ -605,6 +611,12 @@ class Prometheus { type: 'histogram', labelNames: ['sourceType', 'destinationType', 'k8_namespace'], }, + { + name: 'regulation_worker_requests_dest_latency', + help: 'regulation_worker_requests_dest_latency', + type: 'histogram', + labelNames: ['feature', 'implementation', 'destType'], + }, { name: 'dest_transform_request_latency', help: 'dest_transform_request_latency', @@ -924,7 +936,7 @@ class Prometheus { 'errored', 'statusCode', 'transformationId', - 'workspaceId' + 'workspaceId', ], }, { @@ -940,9 +952,9 @@ class Prometheus { 'errored', 'statusCode', 'transformationId', - 'workspaceId' + 'workspaceId', ], - } + }, ]; metrics.forEach((metric) => { From babb89a5bf6d1b84d1319b967953c7c1b6de7c2c Mon Sep 17 00:00:00 2001 From: Ujjwal Abhishek <63387036+ujjwal-ab@users.noreply.github.com> Date: Mon, 11 Dec 2023 09:43:04 +0530 Subject: [PATCH 054/135] feat: onboard reddit cloud mode destination (#2829) * feat: onboard reddit cloud mode destination * feat: update mappings * feat: add event_type support * feat: add batching support * feat: add reddit to features.json * feat: refactor code * fix: add check for empty string in eventName * fix: use generic mapping for timestamp * chore: add test cases * fix: refactor code * fix: refactor code * feat: add networkHandler * feat: refactor networkHandler * chore: add delivery tests * fix: add additional check for accessToken failure * fix: remove extra parameter from retryable error --- src/cdk/v2/destinations/reddit/config.js | 31 + .../v2/destinations/reddit/procWorkflow.yaml | 135 ++ .../v2/destinations/reddit/rtWorkflow.yaml | 67 + src/cdk/v2/destinations/reddit/utils.js | 33 + src/features.json | 3 +- src/v0/destinations/reddit/networkHandler.js | 50 + .../destinations/reddit/delivery/data.ts | 174 ++ .../destinations/reddit/network.ts | 100 ++ .../destinations/reddit/processor/data.ts | 1532 +++++++++++++++++ .../destinations/reddit/router/data.ts | 502 ++++++ 10 files changed, 2626 insertions(+), 1 deletion(-) create mode 100644 src/cdk/v2/destinations/reddit/config.js create mode 100644 src/cdk/v2/destinations/reddit/procWorkflow.yaml create mode 100644 src/cdk/v2/destinations/reddit/rtWorkflow.yaml create mode 100644 src/cdk/v2/destinations/reddit/utils.js create mode 100644 src/v0/destinations/reddit/networkHandler.js create mode 100644 test/integrations/destinations/reddit/delivery/data.ts create mode 100644 test/integrations/destinations/reddit/network.ts create mode 100644 test/integrations/destinations/reddit/processor/data.ts create mode 100644 test/integrations/destinations/reddit/router/data.ts diff --git a/src/cdk/v2/destinations/reddit/config.js b/src/cdk/v2/destinations/reddit/config.js new file mode 100644 index 0000000000..5c2c778ea5 --- /dev/null +++ b/src/cdk/v2/destinations/reddit/config.js @@ -0,0 +1,31 @@ +const ENDPOINT = 'https://ads-api.reddit.com/api/v2.0/conversions/events/'; +const maxBatchSize = 1000; + +const ecomEventMaps = [ + { + src: ['product viewed', 'product list viewed'], + dest: 'ViewContent', + }, + { + src: ['product added'], + dest: 'AddToCart', + }, + { + src: ['product added to wishlist'], + dest: 'AddToWishlist', + }, + { + src: ['order completed'], + dest: 'Purchase', + }, + { + src: ['products searched'], + dest: 'Search', + }, +]; + +module.exports = { + ENDPOINT, + maxBatchSize, + ecomEventMaps, +}; diff --git a/src/cdk/v2/destinations/reddit/procWorkflow.yaml b/src/cdk/v2/destinations/reddit/procWorkflow.yaml new file mode 100644 index 0000000000..b07aeff962 --- /dev/null +++ b/src/cdk/v2/destinations/reddit/procWorkflow.yaml @@ -0,0 +1,135 @@ +bindings: + - name: EventType + path: ../../../../constants + - path: ../../bindings/jsontemplate + exportAll: true + - path: ./config + - name: removeUndefinedAndNullValues + path: ../../../../v0/util + - name: defaultRequestConfig + path: ../../../../v0/util + - name: isAppleFamily + path: ../../../../v0/util/index + - name: OAuthSecretError + path: '@rudderstack/integrations-lib' + +steps: + - name: validateInput + template: | + let messageType = .message.type; + $.assertConfig(.destination.Config.accountId, "Account is not present. Aborting message."); + $.assert(.message.type, "message Type is not present. Aborting message."); + $.assert(.message.type.toLowerCase() ==='track', "Event type " + .message.type.toLowerCase() + " is not supported. Aborting message."); + $.assert(.message.event, "Event is not present. Aborting message."); + $.assert(.message.().({{{{$.getGenericPaths("timestamp")}}}}), "Timestamp is not present. Aborting message."); + + - name: messageType + template: | + .message.type.toLowerCase() + + - name: prepareTrackPayload + condition: $.outputs.messageType === {{$.EventType.TRACK}} + steps: + - name: prepareUserObject + template: | + const os = (.message.context.os.name)? .message.context.os.name.toLowerCase(): null; + const hashData = .destination.Config.hashData; + let user = .message.().({ + "email": hashData ? $.SHA256({{{{$.getGenericPaths("email")}}}}) : ({{{{$.getGenericPaths("email")}}}}), + "external_id": hashData ? $.SHA256({{{{$.getGenericPaths("userId")}}}}) : ({{{{$.getGenericPaths("userId")}}}}), + "ip_address": hashData? $.SHA256(.context.ip || .request_ip) : (.context.ip || .request_ip), + "uuid": .properties.uuid, + "user_agent": .context.userAgent, + "idfa": $.isAppleFamily(os)? (hashData? $.SHA256(.context.device.advertisingId): .context.device.advertisingId): null, + "aaid": os === "android" && .context.device ? (hashData? $.SHA256(.context.device.advertisingId): .context.device.advertisingId): null, + "opt_out": .properties.optOut, + "screen_dimensions": {"width": .context.screen.width, "height": .context.screen.height}, + }); + $.removeUndefinedAndNullValues(user) + + - name: eventType + template: | + let event = .message.event; + let eventInLowerCase = event.trim().toLowerCase();; + let eventNames = .destination.Config.eventsMapping.(){.from === event}.to[] ?? []; + eventNames.length === 0 ? eventNames = $.ecomEventMaps.(){eventInLowerCase in .src}.dest[] ?? []; + const event_type = (eventNames.length === 0 || eventNames[0]==="") ? ({"tracking_type": "Custom", "custom_event_name": event}): ({tracking_type: eventNames[0]}); + + - name: customFields + condition: $.outputs.eventType.tracking_type === "Purchase" + template: | + const customFields = .message.().({ + "currency": .properties.currency, + "value": .properties.revenue !== undefined ? Number(.properties.revenue) : undefined, + "item_count": (Array.isArray(.properties.products) && .properties.products.length) || (.properties.itemCount && Number(.properties.itemCount)), + "value_decimal": .properties.revenue !== undefined ? Number(.properties.revenue)/100 : undefined, + "conversion_id": .properties.conversionId || .messageId, + }); + $.removeUndefinedAndNullValues(customFields) + else: + name: nonRevenueTypeEvents + template: | + const customFields = .message.().({ + "conversion_id": .properties.conversionId || .messageId, + }); + $.removeUndefinedAndNullValues(customFields) + + - name: productFields + condition: .message.properties.products + description: When event contains multiple products + template: | + let products = .message.properties.products; + { + "item_count": $.sum(products.quantity.(Number(.))[]) || 0, + "products": .message.properties@prop.products.({ + "id": .product_id ?? prop.product_id, + "name": .name ?? prop.name, + "category": .category ?? prop.category, + })[] + } + else: + name: singleProductFields + template: | + const props = .message.properties; + const output = { + "item_count": Number(props.quantity) || 0, + "products": { + "id": props.product_id, + "name": props.name, + "category": props.category, + }[] + }; + - name: combineAllEcomFields + template: | + {...$.outputs.prepareTrackPayload.productFields, ...$.outputs.prepareTrackPayload.customFields} + + - name: prepareFinalPayload + template: | + { + events: [{ + "click_id": .message.properties.clickId, + "event_at": .message.().({{{{$.getGenericPaths("timestamp")}}}}), + "event_type": $.outputs.prepareTrackPayload.eventType, + "user": $.outputs.prepareTrackPayload.prepareUserObject, + "event_metadata": $.outputs.prepareTrackPayload.combineAllEcomFields, + }] + } + + - name: payload + condition: $.outputs.messageType === {{$.EventType.TRACK}} + template: | + const outputPayload = $.outputs.prepareTrackPayload + + - name: buildResponseForProcessTransformation + description: build response + template: | + $.assertThrow((.metadata.secret && .metadata.secret.accessToken), new $.OAuthSecretError("Secret or accessToken is not present in the metadata")) + const accessToken = .metadata.secret.accessToken + const response = $.defaultRequestConfig(); + response.body.JSON = $.outputs.payload; + response.headers = { + "Authorization": "Bearer "+ accessToken, + "Content-Type": "application/json" + } + response.endpoint = $.ENDPOINT+.destination.Config.accountId; + finalResponse = response; diff --git a/src/cdk/v2/destinations/reddit/rtWorkflow.yaml b/src/cdk/v2/destinations/reddit/rtWorkflow.yaml new file mode 100644 index 0000000000..937ff021f4 --- /dev/null +++ b/src/cdk/v2/destinations/reddit/rtWorkflow.yaml @@ -0,0 +1,67 @@ +bindings: + - path: ./utils + - path: ./config + +steps: + - name: validateInput + template: | + $.assert(Array.isArray(^) && ^.length > 0, "Invalid event array") + + - name: transform + externalWorkflow: + path: ./procWorkflow.yaml + bindings: + - name: batchMode + value: true + loopOverInput: true + - name: successfulEvents + template: | + $.outputs.transform#idx.output.({ + "message": .[], + "destination": ^ [idx].destination, + "metadata": ^ [idx].metadata + })[] + - name: failedEvents + template: | + $.outputs.transform#idx.error.({ + "metadata": ^[idx].metadata[], + "destination": ^[idx].destination, + "batched": false, + "statusCode": .status, + "error": .message, + "statTags": .originalError.statTags + })[] + + - name: batchSuccessfulEvents + description: Batches the successfulEvents using endpoint + condition: $.outputs.successfulEvents.length + template: | + let batches = $.batchEvents($.outputs.successfulEvents); + batches@batch.({ + "batchedRequest": { + "body": { + "JSON": batch.message.body.JSON, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": batch.message.endpoint, + "headers": batch.message.headers, + "params": {}, + "files": {} + }, + "metadata": batch.metadata, + "batched": true, + "statusCode": 200, + "destination": batch.destination + })[]; + else: + name: returnEmptyOuput + template: '[]' + + - name: finalPayload + template: | + [...$.outputs.batchSuccessfulEvents, ...$.outputs.failedEvents] diff --git a/src/cdk/v2/destinations/reddit/utils.js b/src/cdk/v2/destinations/reddit/utils.js new file mode 100644 index 0000000000..c108603235 --- /dev/null +++ b/src/cdk/v2/destinations/reddit/utils.js @@ -0,0 +1,33 @@ +const lodash = require('lodash'); +const { maxBatchSize } = require('./config'); + +const batchEventChunks = (eventChunks) => { + const batchedEvents = []; + if (Array.isArray(eventChunks)) { + eventChunks.forEach((chunk) => { + const response = { destination: chunk[0].destination }; + chunk.forEach((event, index) => { + if (index === 0) { + const [firstMessage] = event.message; + response.message = firstMessage; + response.destination = event.destination; + response.metadata = [event.metadata]; + } else { + response.message.body.JSON.events.push(...event.message[0].body.JSON.events); + response.metadata.push(event.metadata); + } + }); + batchedEvents.push(response); + }); + } + return batchedEvents; +}; + +const batchEvents = (successfulEvents) => { + const eventChunks = lodash.chunk(successfulEvents, maxBatchSize); + const batchedEvents = batchEventChunks(eventChunks); + return batchedEvents; +}; +module.exports = { + batchEvents, +}; diff --git a/src/features.json b/src/features.json index 0d2d71bbd9..a3d29bb325 100644 --- a/src/features.json +++ b/src/features.json @@ -62,7 +62,8 @@ "ORTTO": true, "GLADLY": true, "ONE_SIGNAL": true, - "TIKTOK_AUDIENCE": true + "TIKTOK_AUDIENCE": true, + "REDDIT": true }, "supportSourceTransformV1": true, "supportTransformerProxyV1": false diff --git a/src/v0/destinations/reddit/networkHandler.js b/src/v0/destinations/reddit/networkHandler.js new file mode 100644 index 0000000000..836c015859 --- /dev/null +++ b/src/v0/destinations/reddit/networkHandler.js @@ -0,0 +1,50 @@ +const { RetryableError } = require('@rudderstack/integrations-lib'); +const { prepareProxyRequest, proxyRequest } = require('../../../adapters/network'); +const { isHttpStatusSuccess } = require('../../util/index'); +const { REFRESH_TOKEN } = require('../../../adapters/networkhandler/authConstants'); + +const { processAxiosResponse } = require('../../../adapters/utils/networkUtils'); + +const redditRespHandler = (destResponse) => { + const { status, response } = destResponse; + + // to handle the case when authorization-token is invalid + if (status === 401 && response.includes('Authorization Required')) { + throw new RetryableError( + `Request failed due to ${response} 'during reddit response transformation'`, + 500, + destResponse, + REFRESH_TOKEN, + ); + } +}; +const responseHandler = (destinationResponse) => { + const message = `Request Processed Successfully`; + const { status } = destinationResponse; + if (!isHttpStatusSuccess(status)) { + // if error, successfully return status, message and original destination response + redditRespHandler(destinationResponse); + } + const { response } = destinationResponse; + const errorMessage = + response.invalid_events && Array.isArray(response.invalid_events) + ? response?.invalid_events[0]?.error_message + : null; + const destResp = errorMessage || destinationResponse; + // Mostly any error will not have a status of 2xx + return { + status, + message, + destResp, + }; +}; +// eslint-disable-next-line @typescript-eslint/naming-convention +class networkHandler { + constructor() { + this.responseHandler = responseHandler; + this.proxy = proxyRequest; + this.prepareProxy = prepareProxyRequest; + this.processAxiosResponse = processAxiosResponse; + } +} +module.exports = { networkHandler }; diff --git a/test/integrations/destinations/reddit/delivery/data.ts b/test/integrations/destinations/reddit/delivery/data.ts new file mode 100644 index 0000000000..66c1e2863f --- /dev/null +++ b/test/integrations/destinations/reddit/delivery/data.ts @@ -0,0 +1,174 @@ +export const data = [ + { + name: 'reddit', + description: 'Test 0', + feature: 'dataDelivery', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://ads-api.reddit.com/api/v2.0/conversions/events/a2_fsddXXXfsfd', + headers: { + Authorization: 'Bearer dummyAccessToken', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + events: [ + { + event_at: '2019-10-14T09:03:17.562Z', + event_type: { + tracking_type: 'Purchase', + }, + user: { + aaid: 'c12d34889302d3c656b5699fa9190b51c50d6f62fce57e13bd56b503d66c487a', + email: 'ac144532d9e4efeab19475d9253a879173ea12a3d2238d1cb8a332a7b3a105f2', + external_id: '7b023241a3132b792a5a33915a5afb3133cbb1e13d72879689bf6504de3b036d', + ip_address: 'e80bd55a3834b7c2a34ade23c7ecb54d2a49838227080f50716151e765a619db', + user_agent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + screen_dimensions: {}, + }, + event_metadata: { + item_count: 3, + products: [ + { + id: '123', + name: 'Monopoly', + category: 'Games', + }, + { + id: '345', + name: 'UNO', + category: 'Games', + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: { + destResp: { + response: { + message: 'Successfully processed 1 conversion events.', + }, + status: 200, + }, + message: 'Request Processed Successfully', + status: 200, + }, + }, + }, + }, + }, + { + name: 'reddit', + description: 'Test 1', + feature: 'dataDelivery', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://ads-api.reddit.com/api/v2.0/conversions/events/a2_gsddXXXfsfd', + headers: { + Authorization: 'Bearer dummyAccessToken', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + events: [ + { + event_at: '2019-10-14T09:03:17.562Z', + event_type: { + tracking_type: 'ViewContent', + }, + user: { + aaid: 'c12d34889302d3c656b5699fa9190b51c50d6f62fce57e13bd56b503d66c487a', + email: 'ac144532d9e4efeab19475d9253a879173ea12a3d2238d1cb8a332a7b3a105f2', + external_id: '7b023241a3132b792a5a33915a5afb3133cbb1e13d72879689bf6504de3b036d', + ip_address: 'e80bd55a3834b7c2a34ade23c7ecb54d2a49838227080f50716151e765a619db', + user_agent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + screen_dimensions: {}, + }, + event_metadata: { + item_count: 3, + products: [ + { + id: '123', + name: 'Monopoly', + category: 'Games', + }, + { + id: '345', + name: 'UNO', + category: 'Games', + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + method: 'POST', + }, + }, + output: { + response: { + status: 500, + body: { + output: { + authErrorCategory: 'REFRESH_TOKEN', + destinationResponse: { + response: 'Authorization Required', + status: 401, + }, + message: + "Request failed due to Authorization Required 'during reddit response transformation'", + statTags: { + destType: 'REDDIT', + destinationId: 'Non-determininable', + errorCategory: 'network', + errorType: 'retryable', + feature: 'dataDelivery', + implementation: 'native', + module: 'destination', + workspaceId: 'Non-determininable', + }, + status: 500, + }, + }, + }, + }, + }, +]; diff --git a/test/integrations/destinations/reddit/network.ts b/test/integrations/destinations/reddit/network.ts new file mode 100644 index 0000000000..7c436e8fb8 --- /dev/null +++ b/test/integrations/destinations/reddit/network.ts @@ -0,0 +1,100 @@ +export const networkCallsData = [ + { + httpReq: { + url: 'https://ads-api.reddit.com/api/v2.0/conversions/events/a2_fsddXXXfsfd', + data: { + events: [ + { + event_at: '2019-10-14T09:03:17.562Z', + event_type: { + tracking_type: 'Purchase', + }, + user: { + aaid: 'c12d34889302d3c656b5699fa9190b51c50d6f62fce57e13bd56b503d66c487a', + email: 'ac144532d9e4efeab19475d9253a879173ea12a3d2238d1cb8a332a7b3a105f2', + external_id: '7b023241a3132b792a5a33915a5afb3133cbb1e13d72879689bf6504de3b036d', + ip_address: 'e80bd55a3834b7c2a34ade23c7ecb54d2a49838227080f50716151e765a619db', + user_agent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + screen_dimensions: {}, + }, + event_metadata: { + item_count: 3, + products: [ + { + id: '123', + name: 'Monopoly', + category: 'Games', + }, + { + id: '345', + name: 'UNO', + category: 'Games', + }, + ], + }, + }, + ], + }, + params: { destination: 'reddit' }, + headers: { + Authorization: 'Bearer dummyAccessToken', + 'Content-Type': 'application/json', + }, + method: 'POST', + }, + httpRes: { + data: { + message: 'Successfully processed 1 conversion events.', + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://ads-api.reddit.com/api/v2.0/conversions/events/a2_gsddXXXfsfd', + data: { + events: [ + { + event_at: '2019-10-14T09:03:17.562Z', + event_type: { + tracking_type: 'ViewContent', + }, + user: { + aaid: 'c12d34889302d3c656b5699fa9190b51c50d6f62fce57e13bd56b503d66c487a', + email: 'ac144532d9e4efeab19475d9253a879173ea12a3d2238d1cb8a332a7b3a105f2', + external_id: '7b023241a3132b792a5a33915a5afb3133cbb1e13d72879689bf6504de3b036d', + ip_address: 'e80bd55a3834b7c2a34ade23c7ecb54d2a49838227080f50716151e765a619db', + user_agent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + screen_dimensions: {}, + }, + event_metadata: { + item_count: 3, + products: [ + { + id: '123', + name: 'Monopoly', + category: 'Games', + }, + { + id: '345', + name: 'UNO', + category: 'Games', + }, + ], + }, + }, + ], + }, + params: { destination: 'reddit' }, + headers: { + Authorization: 'Bearer dummyAccessToken', + 'Content-Type': 'application/json', + }, + method: 'POST', + }, + httpRes: { data: 'Authorization Required', status: 401, statusText: 'Unauthorized' }, + }, +]; diff --git a/test/integrations/destinations/reddit/processor/data.ts b/test/integrations/destinations/reddit/processor/data.ts new file mode 100644 index 0000000000..91da5fbe67 --- /dev/null +++ b/test/integrations/destinations/reddit/processor/data.ts @@ -0,0 +1,1532 @@ +export const data = [ + { + name: 'reddit', + description: 'Track call with order completed event', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + context: { + traits: { + email: 'testone@gmail.com', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + ip: '54.100.200.255', + device: { + advertisingId: 'asfds7fdsihf734b34j43f', + }, + os: { + name: 'android', + }, + }, + type: 'track', + session_id: '16733896350494', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: '123456', + event: 'Order Completed', + userId: 'testuserId1', + properties: { + checkout_id: '12345', + order_id: '1234', + affiliation: 'Apple Store', + total: 20, + revenue: 15, + shipping: 4, + tax: 1, + discount: 1.5, + coupon: 'ImagePro', + currency: 'USD', + products: [ + { + product_id: '123', + sku: 'G-32', + name: 'Monopoly', + price: 14, + quantity: 1, + category: 'Games', + url: 'https://www.website.com/product/path', + image_url: 'https://www.website.com/product/path.jpg', + }, + { + product_id: '345', + sku: 'F-32', + name: 'UNO', + price: 3.45, + quantity: 2, + category: 'Games', + }, + ], + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + accountId: 'a2_fsddXXXfsfd', + hashData: true, + eventsMapping: [ + { + from: 'Order Completed', + to: 'Purchase', + }, + ], + }, + DestinationDefinition: { Config: { cdkV2Enabled: true } }, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + secret: { + accessToken: 'dummyAccessToken', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://ads-api.reddit.com/api/v2.0/conversions/events/a2_fsddXXXfsfd', + headers: { + Authorization: 'Bearer dummyAccessToken', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + events: [ + { + event_at: '2019-10-14T09:03:17.562Z', + event_type: { + tracking_type: 'Purchase', + }, + user: { + aaid: 'c12d34889302d3c656b5699fa9190b51c50d6f62fce57e13bd56b503d66c487a', + email: 'ac144532d9e4efeab19475d9253a879173ea12a3d2238d1cb8a332a7b3a105f2', + external_id: + '7b023241a3132b792a5a33915a5afb3133cbb1e13d72879689bf6504de3b036d', + ip_address: + 'e80bd55a3834b7c2a34ade23c7ecb54d2a49838227080f50716151e765a619db', + user_agent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + screen_dimensions: {}, + }, + event_metadata: { + item_count: 3, + products: [ + { + id: '123', + name: 'Monopoly', + category: 'Games', + }, + { + id: '345', + name: 'UNO', + category: 'Games', + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + secret: { + accessToken: 'dummyAccessToken', + }, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'reddit', + description: 'Track call with product list viewed event', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + context: { + traits: { + email: 'testone@gmail.com', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + ip: '54.100.200.255', + }, + type: 'track', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: '123456', + event: 'Product List Viewed', + userId: 'testuserId1', + properties: { + list_id: 'list1', + category: "What's New", + products: [ + { + product_id: '017c6f5d5cf86a4b22432066', + sku: '8732-98', + name: 'Just Another Game', + price: 22, + position: 2, + category: 'Games and Entertainment', + url: 'https://www.myecommercewebsite.com/product', + image_url: 'https://www.myecommercewebsite.com/product/path.jpg', + }, + { + product_id: '89ac6f5d5cf86a4b64eac145', + sku: '1267-01', + name: 'Wrestling Trump Cards', + price: 4, + position: 21, + category: 'Card Games', + }, + ], + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + accountId: 'a2_fsddXXXfsfd', + hashData: false, + eventsMapping: [ + { + from: 'Order Completed', + to: 'Purchase', + }, + ], + }, + DestinationDefinition: { Config: { cdkV2Enabled: true } }, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + secret: { + accessToken: 'dummyAccessToken', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://ads-api.reddit.com/api/v2.0/conversions/events/a2_fsddXXXfsfd', + headers: { + Authorization: 'Bearer dummyAccessToken', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + events: [ + { + event_at: '2019-10-14T09:03:17.562Z', + event_type: { + tracking_type: 'ViewContent', + }, + user: { + email: 'testone@gmail.com', + external_id: 'testuserId1', + ip_address: '54.100.200.255', + user_agent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + screen_dimensions: {}, + }, + event_metadata: { + item_count: 0, + products: [ + { + id: '017c6f5d5cf86a4b22432066', + name: 'Just Another Game', + category: 'Games and Entertainment', + }, + { + id: '89ac6f5d5cf86a4b64eac145', + name: 'Wrestling Trump Cards', + category: 'Card Games', + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + secret: { + accessToken: 'dummyAccessToken', + }, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'reddit', + description: 'Track call with product added event', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + context: { + traits: { + email: 'testone@gmail.com', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + ip: '54.100.200.255', + }, + type: 'track', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: '123456', + event: 'PRoduct Added ', + userId: 'testuserId1', + properties: { + product_id: '622c6f5d5cf86a4c77358033', + sku: '8472-998-0112', + category: 'Games', + name: 'Cones of Dunshire', + brand: 'Wyatt Games', + variant: 'exapansion pack', + price: 49.99, + quantity: 5, + coupon: 'PREORDER15', + position: 1, + url: 'https://www.website.com/product/path', + image_url: 'https://www.website.com/product/path.webp', + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + accountId: 'a2_fsddXXXfsfd', + hashData: true, + eventsMapping: [ + { + from: 'Order Completed', + to: 'Purchase', + }, + ], + }, + DestinationDefinition: { Config: { cdkV2Enabled: true } }, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + secret: { + accessToken: 'dummyAccessToken', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://ads-api.reddit.com/api/v2.0/conversions/events/a2_fsddXXXfsfd', + headers: { + Authorization: 'Bearer dummyAccessToken', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + events: [ + { + event_at: '2019-10-14T09:03:17.562Z', + event_type: { + tracking_type: 'AddToCart', + }, + user: { + email: 'ac144532d9e4efeab19475d9253a879173ea12a3d2238d1cb8a332a7b3a105f2', + external_id: + '7b023241a3132b792a5a33915a5afb3133cbb1e13d72879689bf6504de3b036d', + ip_address: + 'e80bd55a3834b7c2a34ade23c7ecb54d2a49838227080f50716151e765a619db', + user_agent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + screen_dimensions: {}, + }, + event_metadata: { + item_count: 5, + products: [ + { + id: '622c6f5d5cf86a4c77358033', + name: 'Cones of Dunshire', + category: 'Games', + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + secret: { + accessToken: 'dummyAccessToken', + }, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'reddit', + description: 'Track call with products searched event', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + context: { + traits: { + email: 'testone@gmail.com', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + ip: '54.100.200.255', + }, + type: 'track', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: '123456', + event: 'products searched', + userId: 'testuserId1', + properties: { + product_id: '622c6f5d5cf86a4c77358033', + sku: '8472-998-0112', + category: 'Games', + name: 'Cones of Dunshire', + brand: 'Wyatt Games', + variant: 'exapansion pack', + price: 49.99, + quantity: 5, + coupon: 'PREORDER15', + position: 1, + url: 'https://www.website.com/product/path', + image_url: 'https://www.website.com/product/path.webp', + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + accountId: 'a2_fsddXXXfsfd', + hashData: true, + eventsMapping: [ + { + from: 'Order Completed', + to: 'Purchase', + }, + ], + }, + DestinationDefinition: { Config: { cdkV2Enabled: true } }, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + secret: { + accessToken: 'dummyAccessToken', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://ads-api.reddit.com/api/v2.0/conversions/events/a2_fsddXXXfsfd', + headers: { + Authorization: 'Bearer dummyAccessToken', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + events: [ + { + event_at: '2019-10-14T09:03:17.562Z', + event_type: { + tracking_type: 'Search', + }, + user: { + email: 'ac144532d9e4efeab19475d9253a879173ea12a3d2238d1cb8a332a7b3a105f2', + external_id: + '7b023241a3132b792a5a33915a5afb3133cbb1e13d72879689bf6504de3b036d', + ip_address: + 'e80bd55a3834b7c2a34ade23c7ecb54d2a49838227080f50716151e765a619db', + user_agent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + screen_dimensions: {}, + }, + event_metadata: { + item_count: 5, + products: [ + { + id: '622c6f5d5cf86a4c77358033', + name: 'Cones of Dunshire', + category: 'Games', + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + secret: { + accessToken: 'dummyAccessToken', + }, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'reddit', + description: 'Track call with products Searched event mapped in UI', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + context: { + traits: { + email: 'testone@gmail.com', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + ip: '54.100.200.255', + }, + type: 'track', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: '123456', + event: 'Products Searched', + userId: 'testuserId1', + properties: { + product_id: '622c6f5d5cf86a4c77358033', + sku: '8472-998-0112', + category: 'Games', + name: 'Cones of Dunshire', + brand: 'Wyatt Games', + variant: 'exapansion pack', + price: 49.99, + quantity: 5, + coupon: 'PREORDER15', + position: 1, + url: 'https://www.website.com/product/path', + image_url: 'https://www.website.com/product/path.webp', + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + accountId: 'a2_fsddXXXfsfd', + hashData: true, + eventsMapping: [ + { + from: 'Products Searched', + to: 'ViewContent', + }, + ], + }, + DestinationDefinition: { Config: { cdkV2Enabled: true } }, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + secret: { + accessToken: 'dummyAccessToken', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://ads-api.reddit.com/api/v2.0/conversions/events/a2_fsddXXXfsfd', + headers: { + Authorization: 'Bearer dummyAccessToken', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + events: [ + { + event_at: '2019-10-14T09:03:17.562Z', + event_type: { + tracking_type: 'ViewContent', + }, + user: { + email: 'ac144532d9e4efeab19475d9253a879173ea12a3d2238d1cb8a332a7b3a105f2', + external_id: + '7b023241a3132b792a5a33915a5afb3133cbb1e13d72879689bf6504de3b036d', + ip_address: + 'e80bd55a3834b7c2a34ade23c7ecb54d2a49838227080f50716151e765a619db', + user_agent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + screen_dimensions: {}, + }, + event_metadata: { + item_count: 5, + products: [ + { + id: '622c6f5d5cf86a4c77358033', + name: 'Cones of Dunshire', + category: 'Games', + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + secret: { + accessToken: 'dummyAccessToken', + }, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'reddit', + description: 'Track call with product added to wishlist event', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + context: { + traits: { + email: 'testone@gmail.com', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + ip: '54.100.200.255', + }, + type: 'track', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: '123456', + event: 'product added to wishlist', + userId: 'testuserId1', + properties: { + list_id: 'list1', + category: "What's New", + products: [ + { + product_id: '017c6f5d5cf86a4b22432066', + sku: '8732-98', + name: 'Just Another Game', + price: 22, + position: 2, + category: 'Games and Entertainment', + url: 'https://www.myecommercewebsite.com/product', + image_url: 'https://www.myecommercewebsite.com/product/path.jpg', + }, + { + product_id: '89ac6f5d5cf86a4b64eac145', + sku: '1267-01', + name: 'Wrestling Trump Cards', + price: 4, + position: 21, + category: 'Card Games', + }, + ], + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + accountId: 'a2_fsddXXXfsfd', + hashData: true, + eventsMapping: [ + { + from: 'Order Completed', + to: 'Purchase', + }, + ], + }, + DestinationDefinition: { Config: { cdkV2Enabled: true } }, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + secret: { + accessToken: 'dummyAccessToken', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://ads-api.reddit.com/api/v2.0/conversions/events/a2_fsddXXXfsfd', + headers: { + Authorization: 'Bearer dummyAccessToken', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + events: [ + { + event_at: '2019-10-14T09:03:17.562Z', + event_type: { + tracking_type: 'AddToWishlist', + }, + user: { + email: 'ac144532d9e4efeab19475d9253a879173ea12a3d2238d1cb8a332a7b3a105f2', + external_id: + '7b023241a3132b792a5a33915a5afb3133cbb1e13d72879689bf6504de3b036d', + ip_address: + 'e80bd55a3834b7c2a34ade23c7ecb54d2a49838227080f50716151e765a619db', + user_agent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + screen_dimensions: {}, + }, + event_metadata: { + item_count: 0, + products: [ + { + id: '017c6f5d5cf86a4b22432066', + name: 'Just Another Game', + category: 'Games and Entertainment', + }, + { + id: '89ac6f5d5cf86a4b64eac145', + name: 'Wrestling Trump Cards', + category: 'Card Games', + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + secret: { + accessToken: 'dummyAccessToken', + }, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'reddit', + description: 'Track call with non-standard non-mapped event', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + context: { + traits: { + email: 'testone@gmail.com', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + ip: '54.100.200.255', + }, + type: 'track', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: '123456', + event: 'Watch Items', + userId: 'testuserId1', + properties: { + list_id: 'list1', + category: "What's New", + products: [ + { + product_id: '017c6f5d5cf86a4b22432066', + sku: '8732-98', + name: 'Just Another Game', + price: 22, + position: 2, + category: 'Games and Entertainment', + url: 'https://www.myecommercewebsite.com/product', + image_url: 'https://www.myecommercewebsite.com/product/path.jpg', + }, + { + product_id: '89ac6f5d5cf86a4b64eac145', + sku: '1267-01', + name: 'Wrestling Trump Cards', + price: 4, + position: 21, + category: 'Card Games', + }, + ], + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + accountId: 'a2_fsddXXXfsfd', + hashData: true, + eventsMapping: [ + { + from: 'Order Completed', + to: 'Purchase', + }, + ], + }, + DestinationDefinition: { Config: { cdkV2Enabled: true } }, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + secret: { + accessToken: 'dummyAccessToken', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://ads-api.reddit.com/api/v2.0/conversions/events/a2_fsddXXXfsfd', + headers: { + Authorization: 'Bearer dummyAccessToken', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + events: [ + { + event_at: '2019-10-14T09:03:17.562Z', + event_type: { + custom_event_name: 'Watch Items', + tracking_type: 'Custom', + }, + user: { + email: 'ac144532d9e4efeab19475d9253a879173ea12a3d2238d1cb8a332a7b3a105f2', + external_id: + '7b023241a3132b792a5a33915a5afb3133cbb1e13d72879689bf6504de3b036d', + ip_address: + 'e80bd55a3834b7c2a34ade23c7ecb54d2a49838227080f50716151e765a619db', + user_agent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + screen_dimensions: {}, + }, + event_metadata: { + item_count: 0, + products: [ + { + id: '017c6f5d5cf86a4b22432066', + name: 'Just Another Game', + category: 'Games and Entertainment', + }, + { + id: '89ac6f5d5cf86a4b64eac145', + name: 'Wrestling Trump Cards', + category: 'Card Games', + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + secret: { + accessToken: 'dummyAccessToken', + }, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'reddit', + description: 'Track call with no accountId in Config', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + context: { + traits: { + email: 'testone@gmail.com', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + ip: '54.100.200.255', + }, + type: 'track', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: '123456', + event: 'Watch Items', + userId: 'testuserId1', + properties: { + list_id: 'list1', + category: "What's New", + products: [ + { + product_id: '017c6f5d5cf86a4b22432066', + sku: '8732-98', + name: 'Just Another Game', + price: 22, + position: 2, + category: 'Games and Entertainment', + url: 'https://www.myecommercewebsite.com/product', + image_url: 'https://www.myecommercewebsite.com/product/path.jpg', + }, + { + product_id: '89ac6f5d5cf86a4b64eac145', + sku: '1267-01', + name: 'Wrestling Trump Cards', + price: 4, + position: 21, + category: 'Card Games', + }, + ], + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + eventsMapping: [ + { + from: 'Order Completed', + to: 'Purchase', + }, + ], + }, + DestinationDefinition: { Config: { cdkV2Enabled: true } }, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + secret: { + accessToken: 'dummyAccessToken', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: + 'Account is not present. Aborting message.: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: Account is not present. Aborting message.', + statusCode: 400, + statTags: { + destType: 'REDDIT', + destinationId: 'destId', + errorCategory: 'dataValidation', + errorType: 'configuration', + feature: 'processor', + implementation: 'cdkV2', + module: 'destination', + workspaceId: 'wspId', + }, + metadata: { + destinationId: 'destId', + secret: { + accessToken: 'dummyAccessToken', + }, + workspaceId: 'wspId', + }, + }, + ], + }, + }, + }, + { + name: 'reddit', + description: 'Track call with no messageType', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + context: { + traits: { + email: 'testone@gmail.com', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + ip: '54.100.200.255', + }, + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: '123456', + event: 'Watch Items', + userId: 'testuserId1', + properties: { + list_id: 'list1', + category: "What's New", + products: [ + { + product_id: '017c6f5d5cf86a4b22432066', + sku: '8732-98', + name: 'Just Another Game', + price: 22, + position: 2, + category: 'Games and Entertainment', + url: 'https://www.myecommercewebsite.com/product', + image_url: 'https://www.myecommercewebsite.com/product/path.jpg', + }, + { + product_id: '89ac6f5d5cf86a4b64eac145', + sku: '1267-01', + name: 'Wrestling Trump Cards', + price: 4, + position: 21, + category: 'Card Games', + }, + ], + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + accountId: 'a2_fsddXXXfsfd', + hashData: true, + eventsMapping: [ + { + from: 'Order Completed', + to: 'Purchase', + }, + ], + }, + DestinationDefinition: { Config: { cdkV2Enabled: true } }, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + secret: { + accessToken: 'dummyAccessToken', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: + 'message Type is not present. Aborting message.: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: message Type is not present. Aborting message.', + statusCode: 400, + statTags: { + destType: 'REDDIT', + destinationId: 'destId', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'cdkV2', + module: 'destination', + workspaceId: 'wspId', + }, + metadata: { + destinationId: 'destId', + secret: { + accessToken: 'dummyAccessToken', + }, + workspaceId: 'wspId', + }, + }, + ], + }, + }, + }, + { + name: 'reddit', + description: 'Track call with no event', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + context: { + traits: { + email: 'testone@gmail.com', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + ip: '54.100.200.255', + }, + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: '123456', + type: 'track', + userId: 'testuserId1', + properties: { + list_id: 'list1', + category: "What's New", + products: [ + { + product_id: '017c6f5d5cf86a4b22432066', + sku: '8732-98', + name: 'Just Another Game', + price: 22, + position: 2, + category: 'Games and Entertainment', + url: 'https://www.myecommercewebsite.com/product', + image_url: 'https://www.myecommercewebsite.com/product/path.jpg', + }, + { + product_id: '89ac6f5d5cf86a4b64eac145', + sku: '1267-01', + name: 'Wrestling Trump Cards', + price: 4, + position: 21, + category: 'Card Games', + }, + ], + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + accountId: 'a2_fsddXXXfsfd', + hashData: true, + eventsMapping: [ + { + from: 'Order Completed', + to: 'Purchase', + }, + ], + }, + DestinationDefinition: { Config: { cdkV2Enabled: true } }, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + secret: { + accessToken: 'dummyAccessToken', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: + 'Event is not present. Aborting message.: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: Event is not present. Aborting message.', + statusCode: 400, + statTags: { + destType: 'REDDIT', + destinationId: 'destId', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'cdkV2', + module: 'destination', + workspaceId: 'wspId', + }, + metadata: { + destinationId: 'destId', + secret: { + accessToken: 'dummyAccessToken', + }, + workspaceId: 'wspId', + }, + }, + ], + }, + }, + }, + { + name: 'reddit', + description: 'Track call with no timestamp', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + context: { + traits: { + email: 'testone@gmail.com', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + ip: '54.100.200.255', + }, + anonymousId: '123456', + type: 'track', + event: 'Watch Items', + userId: 'testuserId1', + properties: { + list_id: 'list1', + category: "What's New", + products: [ + { + product_id: '017c6f5d5cf86a4b22432066', + sku: '8732-98', + name: 'Just Another Game', + price: 22, + position: 2, + category: 'Games and Entertainment', + url: 'https://www.myecommercewebsite.com/product', + image_url: 'https://www.myecommercewebsite.com/product/path.jpg', + }, + { + product_id: '89ac6f5d5cf86a4b64eac145', + sku: '1267-01', + name: 'Wrestling Trump Cards', + price: 4, + position: 21, + category: 'Card Games', + }, + ], + }, + integrations: { + All: true, + }, + }, + destination: { + Config: { + accountId: 'a2_fsddXXXfsfd', + hashData: true, + eventsMapping: [ + { + from: 'Order Completed', + to: 'Purchase', + }, + ], + }, + DestinationDefinition: { Config: { cdkV2Enabled: true } }, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + secret: { + accessToken: 'dummyAccessToken', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: + 'Timestamp is not present. Aborting message.: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: Timestamp is not present. Aborting message.', + statusCode: 400, + statTags: { + destType: 'REDDIT', + destinationId: 'destId', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'cdkV2', + module: 'destination', + workspaceId: 'wspId', + }, + metadata: { + destinationId: 'destId', + secret: { + accessToken: 'dummyAccessToken', + }, + workspaceId: 'wspId', + }, + }, + ], + }, + }, + }, + { + name: 'reddit', + description: 'Track call with no accessToken in secret in metadata', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + context: { + traits: { + email: 'testone@gmail.com', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + ip: '54.100.200.255', + }, + anonymousId: '123456', + type: 'track', + event: 'Watch Items', + userId: 'testuserId1', + originalTimestamp: '2019-10-14T09:03:17.562Z', + properties: { + list_id: 'list1', + category: "What's New", + products: [ + { + product_id: '017c6f5d5cf86a4b22432066', + sku: '8732-98', + name: 'Just Another Game', + price: 22, + position: 2, + category: 'Games and Entertainment', + url: 'https://www.myecommercewebsite.com/product', + image_url: 'https://www.myecommercewebsite.com/product/path.jpg', + }, + { + product_id: '89ac6f5d5cf86a4b64eac145', + sku: '1267-01', + name: 'Wrestling Trump Cards', + price: 4, + position: 21, + category: 'Card Games', + }, + ], + }, + integrations: { + All: true, + }, + }, + destination: { + Config: { + accountId: 'a2_fsddXXXfsfd', + hashData: true, + eventsMapping: [ + { + from: 'Order Completed', + to: 'Purchase', + }, + ], + }, + DestinationDefinition: { Config: { cdkV2Enabled: true } }, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + secret: {}, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: + 'Secret or accessToken is not present in the metadata: Workflow: procWorkflow, Step: buildResponseForProcessTransformation, ChildStep: undefined, OriginalError: Secret or accessToken is not present in the metadata', + statusCode: 500, + statTags: { + destType: 'REDDIT', + destinationId: 'destId', + errorCategory: 'platform', + errorType: 'oAuthSecret', + feature: 'processor', + implementation: 'cdkV2', + module: 'destination', + workspaceId: 'wspId', + }, + metadata: { + destinationId: 'destId', + secret: {}, + workspaceId: 'wspId', + }, + }, + ], + }, + }, + }, +]; diff --git a/test/integrations/destinations/reddit/router/data.ts b/test/integrations/destinations/reddit/router/data.ts new file mode 100644 index 0000000000..317bb41a14 --- /dev/null +++ b/test/integrations/destinations/reddit/router/data.ts @@ -0,0 +1,502 @@ +export const data = [ + { + name: 'reddit', + description: 'Track Events', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + message: { + context: { + traits: { + email: 'testone@gmail.com', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + ip: '54.100.200.255', + }, + type: 'track', + session_id: '16733896350494', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: '123456', + event: 'Order Completed', + userId: 'testuserId1', + properties: { + checkout_id: '12345', + order_id: '1234', + affiliation: 'Apple Store', + total: 20, + revenue: 15, + shipping: 4, + tax: 1, + discount: 1.5, + coupon: 'ImagePro', + currency: 'USD', + products: [ + { + product_id: '123', + sku: 'G-32', + name: 'Monopoly', + price: 14, + quantity: 1, + category: 'Games', + url: 'https://www.website.com/product/path', + image_url: 'https://www.website.com/product/path.jpg', + }, + { + product_id: '345', + sku: 'F-32', + name: 'UNO', + price: 3.45, + quantity: 2, + category: 'Games', + }, + ], + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + accountId: 'a2_fsddXXXfsfd', + hashData: true, + eventsMapping: [ + { + from: 'Order Completed', + to: 'Purchase', + }, + ], + }, + DestinationDefinition: { Config: { cdkV2Enabled: true } }, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + secret: { + accessToken: 'dummyAccessToken', + }, + }, + }, + { + message: { + context: { + traits: { + email: 'testone@gmail.com', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + ip: '54.100.200.255', + }, + type: 'track', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: '123456', + event: 'Product List Viewed', + userId: 'testuserId1', + properties: { + list_id: 'list1', + category: "What's New", + products: [ + { + product_id: '017c6f5d5cf86a4b22432066', + sku: '8732-98', + name: 'Just Another Game', + price: 22, + position: 2, + category: 'Games and Entertainment', + url: 'https://www.myecommercewebsite.com/product', + image_url: 'https://www.myecommercewebsite.com/product/path.jpg', + }, + { + product_id: '89ac6f5d5cf86a4b64eac145', + sku: '1267-01', + name: 'Wrestling Trump Cards', + price: 4, + position: 21, + category: 'Card Games', + }, + ], + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + accountId: 'a2_fsddXXXfsfd', + hashData: true, + eventsMapping: [ + { + from: 'Order Completed', + to: 'Purchase', + }, + ], + }, + DestinationDefinition: { Config: { cdkV2Enabled: true } }, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + secret: { + accessToken: 'dummyAccessToken', + }, + }, + }, + { + message: { + context: { + traits: { + email: 'testone@gmail.com', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + ip: '54.100.200.255', + }, + type: 'track', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: '123456', + event: 'PRoduct Added ', + userId: 'testuserId1', + properties: { + product_id: '622c6f5d5cf86a4c77358033', + sku: '8472-998-0112', + category: 'Games', + name: 'Cones of Dunshire', + brand: 'Wyatt Games', + variant: 'exapansion pack', + price: 49.99, + quantity: 5, + coupon: 'PREORDER15', + position: 1, + url: 'https://www.website.com/product/path', + image_url: 'https://www.website.com/product/path.webp', + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + accountId: 'a2_fsddXXXfsfd', + hashData: true, + eventsMapping: [ + { + from: 'Order Completed', + to: 'Purchase', + }, + ], + }, + DestinationDefinition: { Config: { cdkV2Enabled: true } }, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + secret: { + accessToken: 'dummyAccessToken', + }, + }, + }, + ], + destType: 'reddit', + }, + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: { + body: { + JSON: { + events: [ + { + event_at: '2019-10-14T09:03:17.562Z', + event_type: { + tracking_type: 'Purchase', + }, + user: { + email: 'ac144532d9e4efeab19475d9253a879173ea12a3d2238d1cb8a332a7b3a105f2', + external_id: + '7b023241a3132b792a5a33915a5afb3133cbb1e13d72879689bf6504de3b036d', + ip_address: + 'e80bd55a3834b7c2a34ade23c7ecb54d2a49838227080f50716151e765a619db', + user_agent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + screen_dimensions: {}, + }, + event_metadata: { + item_count: 3, + products: [ + { + id: '123', + name: 'Monopoly', + category: 'Games', + }, + { + id: '345', + name: 'UNO', + category: 'Games', + }, + ], + }, + }, + { + event_at: '2019-10-14T09:03:17.562Z', + event_type: { + tracking_type: 'ViewContent', + }, + user: { + email: 'ac144532d9e4efeab19475d9253a879173ea12a3d2238d1cb8a332a7b3a105f2', + external_id: + '7b023241a3132b792a5a33915a5afb3133cbb1e13d72879689bf6504de3b036d', + ip_address: + 'e80bd55a3834b7c2a34ade23c7ecb54d2a49838227080f50716151e765a619db', + user_agent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + screen_dimensions: {}, + }, + event_metadata: { + item_count: 0, + products: [ + { + id: '017c6f5d5cf86a4b22432066', + name: 'Just Another Game', + category: 'Games and Entertainment', + }, + { + id: '89ac6f5d5cf86a4b64eac145', + name: 'Wrestling Trump Cards', + category: 'Card Games', + }, + ], + }, + }, + { + event_at: '2019-10-14T09:03:17.562Z', + event_type: { + tracking_type: 'AddToCart', + }, + user: { + email: 'ac144532d9e4efeab19475d9253a879173ea12a3d2238d1cb8a332a7b3a105f2', + external_id: + '7b023241a3132b792a5a33915a5afb3133cbb1e13d72879689bf6504de3b036d', + ip_address: + 'e80bd55a3834b7c2a34ade23c7ecb54d2a49838227080f50716151e765a619db', + user_agent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + screen_dimensions: {}, + }, + event_metadata: { + item_count: 5, + products: [ + { + id: '622c6f5d5cf86a4c77358033', + name: 'Cones of Dunshire', + category: 'Games', + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://ads-api.reddit.com/api/v2.0/conversions/events/a2_fsddXXXfsfd', + headers: { + Authorization: 'Bearer dummyAccessToken', + 'Content-Type': 'application/json', + }, + params: {}, + files: {}, + }, + metadata: [ + { + destinationId: 'destId', + workspaceId: 'wspId', + secret: { + accessToken: 'dummyAccessToken', + }, + }, + { + destinationId: 'destId', + workspaceId: 'wspId', + secret: { + accessToken: 'dummyAccessToken', + }, + }, + { + destinationId: 'destId', + workspaceId: 'wspId', + secret: { + accessToken: 'dummyAccessToken', + }, + }, + ], + batched: true, + statusCode: 200, + destination: { + Config: { + accountId: 'a2_fsddXXXfsfd', + hashData: true, + eventsMapping: [ + { + from: 'Order Completed', + to: 'Purchase', + }, + ], + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + }, + ], + }, + }, + }, + }, + { + name: 'reddit', + description: 'Track Events with no event name', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + message: { + context: { + traits: { + email: 'testone@gmail.com', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + ip: '54.100.200.255', + }, + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: '123456', + type: 'track', + userId: 'testuserId1', + properties: { + list_id: 'list1', + category: "What's New", + products: [ + { + product_id: '017c6f5d5cf86a4b22432066', + sku: '8732-98', + name: 'Just Another Game', + price: 22, + position: 2, + category: 'Games and Entertainment', + url: 'https://www.myecommercewebsite.com/product', + image_url: 'https://www.myecommercewebsite.com/product/path.jpg', + }, + { + product_id: '89ac6f5d5cf86a4b64eac145', + sku: '1267-01', + name: 'Wrestling Trump Cards', + price: 4, + position: 21, + category: 'Card Games', + }, + ], + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + accountId: 'a2_fsddXXXfsfd', + eventsMapping: [ + { + from: 'Order Completed', + to: 'Purchase', + }, + ], + }, + DestinationDefinition: { Config: { cdkV2Enabled: true } }, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + secret: { + accessToken: 'dummyAccessToken', + }, + }, + }, + ], + destType: 'reddit', + }, + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + metadata: [ + { + destinationId: 'destId', + workspaceId: 'wspId', + secret: { + accessToken: 'dummyAccessToken', + }, + }, + ], + destination: { + Config: { + accountId: 'a2_fsddXXXfsfd', + eventsMapping: [ + { + from: 'Order Completed', + to: 'Purchase', + }, + ], + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + batched: false, + statusCode: 400, + error: 'Event is not present. Aborting message.', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'REDDIT', + module: 'destination', + implementation: 'cdkV2', + feature: 'router', + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + }, + }, +]; From 776d2c4abe23cd279195064684b9ccc807d83afc Mon Sep 17 00:00:00 2001 From: AASHISH MALIK Date: Mon, 11 Dec 2023 13:24:10 +0530 Subject: [PATCH 055/135] fix: removed retry logic from v1 cm360, added adapter for v1 to v0 conversion (#2860) * fix: removed retry logic from v1 cm360 proxy handler * feat: adapter to convert v1 payload to v0 transformer Proxy --- src/adapters/networkHandlerFactory.js | 10 +- src/adapters/networkHandlerFactory.test.js | 29 +- src/controllers/delivery.ts | 68 +- src/features.json | 2 +- src/interfaces/DestinationService.ts | 7 +- src/routes/delivery.ts | 9 +- src/services/comparator.ts | 8 +- src/services/delivertTest/deliveryTest.ts | 5 +- src/services/destination/cdkV1Integration.ts | 7 +- src/services/destination/cdkV2Integration.ts | 15 +- src/services/destination/nativeIntegration.ts | 63 +- .../destination/postTransformation.ts | 34 +- src/types/index.ts | 80 +- .../campaign_manager/networkHandler.js | 2 +- .../destinations/salesforce/networkHandler.js | 2 +- .../salesforce_oauth/networkHandler.js | 2 +- src/v0/util/errorTypes/index.js | 2 + .../util/errorTypes/transformerProxyError.js | 28 + .../campaign_manager/networkHandler.js | 47 +- test/__tests__/data/marketo_input.json | 16 +- .../destinations/braze/dataDelivery/data.ts | 999 +++++++++++------- .../destinations/braze/network.ts | 29 + 22 files changed, 942 insertions(+), 522 deletions(-) create mode 100644 src/v0/util/errorTypes/transformerProxyError.js diff --git a/src/adapters/networkHandlerFactory.js b/src/adapters/networkHandlerFactory.js index f4940553f5..e8c3748d15 100644 --- a/src/adapters/networkHandlerFactory.js +++ b/src/adapters/networkHandlerFactory.js @@ -37,8 +37,14 @@ SUPPORTED_VERSIONS.forEach((version) => { }); const getNetworkHandler = (type, version) => { - const NetworkHandler = handlers[version][type] || handlers.generic; - return new NetworkHandler(); + let handlerVersion = version; + let NetworkHandler = handlers[version][type] || handlers.generic; + if (version === 'v1' && NetworkHandler === handlers.generic) { + NetworkHandler = handlers.v0[type] || handlers.generic; + handlerVersion = 'v0'; + } + const networkHandler = new NetworkHandler(); + return { networkHandler, handlerVersion }; }; module.exports = { diff --git a/src/adapters/networkHandlerFactory.test.js b/src/adapters/networkHandlerFactory.test.js index c4713e66a8..ff5f26a02d 100644 --- a/src/adapters/networkHandlerFactory.test.js +++ b/src/adapters/networkHandlerFactory.test.js @@ -3,23 +3,34 @@ const { networkHandler: GenericNetworkHandler } = require('./networkhandler/gene describe(`Network Handler Tests`, () => { it('Should return v0 networkhandler', () => { - let proxyHandler = getNetworkHandler('campaign_manager', `v0`); + let { networkHandler, handlerVersion } = getNetworkHandler('campaign_manager', `v0`); const cmProxy = require(`../v0/destinations/campaign_manager/networkHandler`).networkHandler; - expect(proxyHandler).toEqual(new cmProxy()); + expect(networkHandler).toEqual(new cmProxy()); + }); - proxyHandler = getNetworkHandler('braze', `v0`); + it('Should return v0 networkhandler braze', () => { + let { networkHandler, handlerVersion } = getNetworkHandler('braze', `v0`); const brazeProxy = require(`../v0/destinations/braze/networkHandler`).networkHandler; - expect(proxyHandler).toEqual(new brazeProxy()); + expect(networkHandler).toEqual(new brazeProxy()); }); it('Should return v1 networkhandler', () => { - let proxyHandler = getNetworkHandler('campaign_manager', `v1`); + let { networkHandler, handlerVersion } = getNetworkHandler('campaign_manager', `v1`); const cmProxy = require(`../v1/destinations/campaign_manager/networkHandler`).networkHandler; - expect(proxyHandler).toEqual(new cmProxy()); + expect(networkHandler).toEqual(new cmProxy()); }); - it('Should return genericHandler if v1 proxy and handler is not present for destination', () => { - let proxyHandler = getNetworkHandler('braze', `v1`); - expect(proxyHandler).toEqual(new GenericNetworkHandler()); + it('Should return v0 handler if v1 version and handler is present for destination in v0', () => { + const { networkHandler, handlerVersion } = getNetworkHandler('braze', `v1`); + const brazeProxy = require(`../v0/destinations/braze/networkHandler`).networkHandler; + console.log(networkHandler); + expect(networkHandler).toEqual(new brazeProxy()); + }); + + it('Should return generic handler', () => { + const { networkHandler, handlerVersion } = getNetworkHandler('abc', `v1`); + const brazeProxy = require(`../v0/destinations/braze/networkHandler`).networkHandler; + console.log(networkHandler); + expect(networkHandler).toEqual(new GenericNetworkHandler()); }); }); diff --git a/src/controllers/delivery.ts b/src/controllers/delivery.ts index 3ccc241b87..0cc5e12d78 100644 --- a/src/controllers/delivery.ts +++ b/src/controllers/delivery.ts @@ -1,6 +1,14 @@ +/* eslint-disable prefer-destructuring */ +/* eslint-disable sonarjs/no-duplicate-string */ import { Context } from 'koa'; import { MiscService } from '../services/misc'; -import { DeliveryResponse, ProcessorTransformationOutput } from '../types/index'; +import { + DeliveriesResponse, + DeliveryResponse, + ProcessorTransformationOutput, + ProxyDeliveriesRequest, + ProxyDeliveryRequest, +} from '../types/index'; import { ServiceSelector } from '../helpers/serviceSelector'; import { DeliveryTestService } from '../services/delivertTest/deliveryTest'; import { ControllerUtility } from './util'; @@ -9,30 +17,32 @@ import { DestinationPostTransformationService } from '../services/destination/po import tags from '../v0/util/tags'; import { FixMe } from '../util/types'; +const NON_DETERMINABLE = 'Non-determinable'; + export class DeliveryController { public static async deliverToDestination(ctx: Context) { logger.debug('Native(Delivery):: Request to transformer::', JSON.stringify(ctx.request.body)); let deliveryResponse: DeliveryResponse; const requestMetadata = MiscService.getRequestMetadata(ctx); - const event = ctx.request.body as ProcessorTransformationOutput; + const deliveryRequest = ctx.request.body as ProxyDeliveryRequest; const { destination }: { destination: string } = ctx.params; - const { version }: { version: string } = ctx.params; const integrationService = ServiceSelector.getNativeDestinationService(); try { - deliveryResponse = await integrationService.deliver( - event, + deliveryResponse = (await integrationService.deliver( + deliveryRequest, destination, requestMetadata, - version, - ); + 'v0', + )) as DeliveryResponse; } catch (error: any) { + const { metadata } = deliveryRequest; const metaTO = integrationService.getTags( destination, - event.metadata?.destinationId || 'Non-determininable', - event.metadata?.workspaceId || 'Non-determininable', + metadata?.destinationId || NON_DETERMINABLE, + metadata?.workspaceId || NON_DETERMINABLE, tags.FEATURES.DATA_DELIVERY, ); - metaTO.metadata = event.metadata; + metaTO.metadata = metadata; deliveryResponse = DestinationPostTransformationService.handleDeliveryFailureEvents( error, metaTO, @@ -40,6 +50,42 @@ export class DeliveryController { } ctx.body = { output: deliveryResponse }; ControllerUtility.deliveryPostProcess(ctx, deliveryResponse.status); + + logger.debug('Native(Delivery):: Response from transformer::', JSON.stringify(ctx.body)); + return ctx; + } + + public static async deliverToDestinationV1(ctx: Context) { + logger.debug('Native(Delivery):: Request to transformer::', JSON.stringify(ctx.request.body)); + let deliveryResponse: DeliveriesResponse; + const requestMetadata = MiscService.getRequestMetadata(ctx); + const deliveryRequest = ctx.request.body as ProxyDeliveriesRequest; + const { destination }: { destination: string } = ctx.params; + const integrationService = ServiceSelector.getNativeDestinationService(); + try { + deliveryResponse = (await integrationService.deliver( + deliveryRequest, + destination, + requestMetadata, + 'v1', + )) as DeliveriesResponse; + } catch (error: any) { + const { metadata } = deliveryRequest; + const metaTO = integrationService.getTags( + destination, + metadata[0].destinationId || NON_DETERMINABLE, + metadata[0].workspaceId || NON_DETERMINABLE, + tags.FEATURES.DATA_DELIVERY, + ); + metaTO.metadatas = metadata; + deliveryResponse = DestinationPostTransformationService.handlevV1DeliveriesFailureEvents( + error, + metaTO, + ); + } + ctx.body = { output: deliveryResponse }; + ControllerUtility.deliveryPostProcess(ctx); + logger.debug('Native(Delivery):: Response from transformer::', JSON.stringify(ctx.body)); return ctx; } @@ -50,6 +96,7 @@ export class DeliveryController { JSON.stringify(ctx.request.body), ); const { destination }: { destination: string } = ctx.params; + const { version }: { version: string } = ctx.params; const { deliveryPayload, destinationRequestPayload, @@ -61,6 +108,7 @@ export class DeliveryController { destination, destinationRequestPayload, deliveryPayload, + version, ); ctx.body = { output: response }; ControllerUtility.postProcess(ctx); diff --git a/src/features.json b/src/features.json index a3d29bb325..e0745c2246 100644 --- a/src/features.json +++ b/src/features.json @@ -66,5 +66,5 @@ "REDDIT": true }, "supportSourceTransformV1": true, - "supportTransformerProxyV1": false + "supportTransformerProxyV1": true } diff --git a/src/interfaces/DestinationService.ts b/src/interfaces/DestinationService.ts index 16f6b9349c..bf39024d85 100644 --- a/src/interfaces/DestinationService.ts +++ b/src/interfaces/DestinationService.ts @@ -5,9 +5,10 @@ import { ProcessorTransformationResponse, RouterTransformationRequestData, RouterTransformationResponse, - ProcessorTransformationOutput, UserDeletionRequest, UserDeletionResponse, + ProxyRequest, + DeliveriesResponse, } from '../types/index'; export interface DestinationService { @@ -44,11 +45,11 @@ export interface DestinationService { ): RouterTransformationResponse[]; deliver( - event: ProcessorTransformationOutput, + event: ProxyRequest, destinationType: string, requestMetadata: NonNullable, version: string, - ): Promise; + ): Promise; processUserDeletion( requests: UserDeletionRequest[], diff --git a/src/routes/delivery.ts b/src/routes/delivery.ts index 0591dc8b9e..30f4e2fb78 100644 --- a/src/routes/delivery.ts +++ b/src/routes/delivery.ts @@ -5,12 +5,19 @@ import { RouteActivationMiddleware } from '../middlewares/routeActivation'; const router = new Router(); router.post( - '/:version/destinations/:destination/proxy', + '/v0/destinations/:destination/proxy', RouteActivationMiddleware.isDeliveryRouteActive, RouteActivationMiddleware.destinationDeliveryFilter, DeliveryController.deliverToDestination, ); +router.post( + '/v1/destinations/:destination/proxy', + RouteActivationMiddleware.isDeliveryRouteActive, + RouteActivationMiddleware.destinationDeliveryFilter, + DeliveryController.deliverToDestinationV1, +); + router.post( '/:version/destinations/:destination/proxyTest', RouteActivationMiddleware.isDeliveryTestRouteActive, diff --git a/src/services/comparator.ts b/src/services/comparator.ts index 58c96beabb..d1e085b4bd 100644 --- a/src/services/comparator.ts +++ b/src/services/comparator.ts @@ -1,13 +1,14 @@ /* eslint-disable class-methods-use-this */ import { DestinationService } from '../interfaces/DestinationService'; import { + DeliveriesResponse, DeliveryResponse, Destination, ErrorDetailer, MetaTransferObject, - ProcessorTransformationOutput, ProcessorTransformationRequest, ProcessorTransformationResponse, + ProxyRequest, RouterTransformationRequestData, RouterTransformationResponse, UserDeletionRequest, @@ -365,11 +366,11 @@ export class ComparatorService implements DestinationService { } public async deliver( - event: ProcessorTransformationOutput, + event: ProxyRequest, destinationType: string, requestMetadata: NonNullable, version: string, - ): Promise { + ): Promise { const primaryResplist = await this.primaryService.deliver( event, destinationType, @@ -377,7 +378,6 @@ export class ComparatorService implements DestinationService { version, ); logger.error('[LIVE_COMPARE_TEST] not implemented for delivery routine'); - return primaryResplist; } diff --git a/src/services/delivertTest/deliveryTest.ts b/src/services/delivertTest/deliveryTest.ts index 0d960ade17..2f5db183e5 100644 --- a/src/services/delivertTest/deliveryTest.ts +++ b/src/services/delivertTest/deliveryTest.ts @@ -12,12 +12,13 @@ export class DeliveryTestService { destination: string, routerDestReqPayload: any, routerDeliveryPayload: any, + version, ) { let response: any; try { - const destNetworkHandler = networkHandlerFactory.getNetworkHandler(destination); + const { networkHandler } = networkHandlerFactory.getNetworkHandler(destination, version); - const proxyDestReqPayload = destNetworkHandler.prepareProxy(routerDeliveryPayload); + const proxyDestReqPayload = networkHandler.prepareProxy(routerDeliveryPayload); response = { destinationRequestPayload: proxyDestReqPayload, }; diff --git a/src/services/destination/cdkV1Integration.ts b/src/services/destination/cdkV1Integration.ts index 8ccd3341e5..197e3162ea 100644 --- a/src/services/destination/cdkV1Integration.ts +++ b/src/services/destination/cdkV1Integration.ts @@ -11,9 +11,10 @@ import { ProcessorTransformationResponse, RouterTransformationRequestData, RouterTransformationResponse, - ProcessorTransformationOutput, UserDeletionRequest, UserDeletionResponse, + ProxyRequest, + DeliveriesResponse, } from '../../types/index'; import { DestinationPostTransformationService } from './postTransformation'; import tags from '../../v0/util/tags'; @@ -117,10 +118,10 @@ export class CDKV1DestinationService implements DestinationService { } public deliver( - _event: ProcessorTransformationOutput, + _event: ProxyRequest, _destinationType: string, _requestMetadata: NonNullable, - ): Promise { + ): Promise { throw new TransformationError('CDV1 Does not Implement Delivery Routine'); } diff --git a/src/services/destination/cdkV2Integration.ts b/src/services/destination/cdkV2Integration.ts index f3be2c0144..be7f0e51d5 100644 --- a/src/services/destination/cdkV2Integration.ts +++ b/src/services/destination/cdkV2Integration.ts @@ -15,6 +15,8 @@ import { ProcessorTransformationOutput, UserDeletionRequest, UserDeletionResponse, + ProxyRequest, + DeliveriesResponse, } from '../../types/index'; import tags from '../../v0/util/tags'; import { DestinationPostTransformationService } from './postTransformation'; @@ -64,7 +66,7 @@ export class CDKV2DestinationService implements DestinationService { destinationType, event, tags.FEATURES.PROCESSOR, - requestMetadata + requestMetadata, ); stats.increment('event_transform_success', { @@ -127,7 +129,12 @@ export class CDKV2DestinationService implements DestinationService { metaTo.metadata = destInputArray[0].metadata; try { const doRouterTransformationResponse: RouterTransformationResponse[] = - await processCdkV2Workflow(destinationType, destInputArray, tags.FEATURES.ROUTER, requestMetadata); + await processCdkV2Workflow( + destinationType, + destInputArray, + tags.FEATURES.ROUTER, + requestMetadata, + ); return DestinationPostTransformationService.handleRouterTransformSuccessEvents( doRouterTransformationResponse, undefined, @@ -160,10 +167,10 @@ export class CDKV2DestinationService implements DestinationService { } public deliver( - _event: ProcessorTransformationOutput, + _event: ProxyRequest, _destinationType: string, _requestMetadata: NonNullable, - ): Promise { + ): Promise { throw new TransformationError('CDKV2 Does not Implement Delivery Routine'); } diff --git a/src/services/destination/nativeIntegration.ts b/src/services/destination/nativeIntegration.ts index 6bb79ce27a..c3b0237cdc 100644 --- a/src/services/destination/nativeIntegration.ts +++ b/src/services/destination/nativeIntegration.ts @@ -1,3 +1,5 @@ +/* eslint-disable prefer-destructuring */ +/* eslint-disable sonarjs/no-duplicate-string */ /* eslint-disable @typescript-eslint/no-unused-vars */ import groupBy from 'lodash/groupBy'; import cloneDeep from 'lodash/cloneDeep'; @@ -13,6 +15,11 @@ import { ProcessorTransformationOutput, UserDeletionRequest, UserDeletionResponse, + ProxyRequest, + ProxyDeliveriesRequest, + ProxyDeliveryRequest, + DeliveriesResponse, + DeliveryJobState, } from '../../types/index'; import { DestinationPostTransformationService } from './postTransformation'; import networkHandlerFactory from '../../adapters/networkHandlerFactory'; @@ -170,30 +177,66 @@ export class NativeIntegrationDestinationService implements DestinationService { } public async deliver( - destinationRequest: ProcessorTransformationOutput, + deliveryRequest: ProxyRequest, destinationType: string, _requestMetadata: NonNullable, version: string, - ): Promise { + ): Promise { try { - const networkHandler = networkHandlerFactory.getNetworkHandler(destinationType, version); - const rawProxyResponse = await networkHandler.proxy(destinationRequest, destinationType); + const { networkHandler, handlerVersion } = networkHandlerFactory.getNetworkHandler( + destinationType, + version, + ); + const rawProxyResponse = await networkHandler.proxy(deliveryRequest, destinationType); const processedProxyResponse = networkHandler.processAxiosResponse(rawProxyResponse); - return networkHandler.responseHandler( + let rudderJobMetadata = + version.toLowerCase() === 'v1' + ? (deliveryRequest as ProxyDeliveriesRequest).metadata + : (deliveryRequest as ProxyDeliveryRequest).metadata; + + if (version.toLowerCase() === 'v1' && handlerVersion.toLowerCase() === 'v0') { + rudderJobMetadata = rudderJobMetadata[0]; + } + + let responseProxy = networkHandler.responseHandler( { ...processedProxyResponse, - rudderJobMetadata: destinationRequest.metadata, + rudderJobMetadata, }, destinationType, - ) as DeliveryResponse; + ); + // Adaption Logic for V0 to V1 + if (handlerVersion.toLowerCase() === 'v0' && version.toLowerCase() === 'v1') { + const v0Response = responseProxy as DeliveryResponse; + const jobStates = (deliveryRequest as ProxyDeliveriesRequest).metadata.map( + (metadata) => + ({ + error: JSON.stringify(v0Response.destinationResponse?.response), + statusCode: v0Response.status, + metadata, + } as DeliveryJobState), + ); + responseProxy = { + response: jobStates, + } as DeliveriesResponse; + } + return responseProxy; } catch (err: any) { + const metadata = Array.isArray(deliveryRequest.metadata) + ? deliveryRequest.metadata[0] + : deliveryRequest.metadata; const metaTO = this.getTags( destinationType, - destinationRequest.metadata?.destinationId || 'Non-determininable', - destinationRequest.metadata?.workspaceId || 'Non-determininable', + metadata?.destinationId || 'Non-determininable', + metadata?.workspaceId || 'Non-determininable', tags.FEATURES.DATA_DELIVERY, ); - metaTO.metadata = destinationRequest.metadata; + + if (version.toLowerCase() === 'v1') { + metaTO.metadatas = (deliveryRequest as ProxyDeliveriesRequest).metadata; + return DestinationPostTransformationService.handlevV1DeliveriesFailureEvents(err, metaTO); + } + metaTO.metadata = (deliveryRequest as ProxyDeliveryRequest).metadata; return DestinationPostTransformationService.handleDeliveryFailureEvents(err, metaTO); } } diff --git a/src/services/destination/postTransformation.ts b/src/services/destination/postTransformation.ts index 076f5ba55e..de2f5f1b42 100644 --- a/src/services/destination/postTransformation.ts +++ b/src/services/destination/postTransformation.ts @@ -2,6 +2,7 @@ import cloneDeep from 'lodash/cloneDeep'; import isObject from 'lodash/isObject'; import isEmpty from 'lodash/isEmpty'; +import { PlatformError } from '@rudderstack/integrations-lib'; import { ProcessorTransformationRequest, ProcessorTransformationResponse, @@ -10,6 +11,8 @@ import { DeliveryResponse, MetaTransferObject, UserDeletionResponse, + DeliveriesResponse, + DeliveryJobState, } from '../../types/index'; import { generateErrorObject } from '../../v0/util'; import { ErrorReportingService } from '../errorReporting'; @@ -139,7 +142,7 @@ export class DestinationPostTransformationService { } public static handleDeliveryFailureEvents( - error: NonNullable, + error: any, metaTo: MetaTransferObject, ): DeliveryResponse { const errObj = generateErrorObject(error, metaTo.errorDetails, false); @@ -152,6 +155,35 @@ export class DestinationPostTransformationService { authErrorCategory: errObj.authErrorCategory, }), } as DeliveryResponse; + + ErrorReportingService.reportError(error, metaTo.errorContext, resp); + return resp; + } + + public static handlevV1DeliveriesFailureEvents( + error: NonNullable, + metaTo: MetaTransferObject, + ): DeliveriesResponse { + const errObj = generateErrorObject(error, metaTo.errorDetails, false); + const metadataArray = metaTo.metadatas; + if (!Array.isArray(metadataArray)) { + // Panic + throw new PlatformError('Proxy v1 endpoint error : metadataArray is not an array'); + } + const responses = metadataArray.map((metadata) => { + const resp = { + error: errObj.message || '[Delivery] Error occured while processing payload', + statusCode: errObj.status, + metadata, + } as DeliveryJobState; + return resp; + }); + + const resp = { + response: responses, + statTags: errObj.statTags, + } as DeliveriesResponse; + ErrorReportingService.reportError(error, metaTo.errorContext, resp); return resp; } diff --git a/src/types/index.ts b/src/types/index.ts index 7a23132173..f4432e5c2a 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -16,9 +16,46 @@ type ProcessorTransformationOutput = { FORM?: Record; }; files?: Record; - metadata?: Metadata; }; +type ProxyDeliveryRequest = { + version: string; + type: string; + method: string; + endpoint: string; + userId: string; + headers?: Record; + params?: Record; + body?: { + JSON?: Record; + JSON_ARRAY?: Record; + XML?: Record; + FORM?: Record; + }; + files?: Record; + metadata: Metadata; +}; + +type ProxyDeliveriesRequest = { + version: string; + type: string; + method: string; + endpoint: string; + userId: string; + headers?: Record; + params?: Record; + body?: { + JSON?: Record; + JSON_ARRAY?: Record; + XML?: Record; + FORM?: Record; + }; + files?: Record; + metadata: Metadata[]; +}; + +type ProxyRequest = ProxyDeliveryRequest | ProxyDeliveriesRequest; + type Metadata = { sourceId: string; workspaceId: string; @@ -50,6 +87,7 @@ type Metadata = { sourceDefinitionId: string; destinationDefinitionId: string; transformationId: string; + dontBatch?: boolean; }; type MessageIdMetadataMap = { @@ -140,7 +178,20 @@ type DeliveryResponse = { destinationResponse: any; statTags: object; authErrorCategory?: string; - response?: object; +}; + +type DeliveryJobState = { + error: string; + statusCode: number; + metadata: Metadata; +}; + +type DeliveriesResponse = { + status?: number; + message?: string; + statTags?: object; + authErrorCategory?: string; + response: DeliveryJobState[]; }; enum MessageType { @@ -254,26 +305,31 @@ type SourceInput = { source?: Source; }; export { - Metadata, + ComparatorInput, + DeliveryJobState, + DeliveryResponse, + DeliveriesResponse, + Destination, + ErrorDetailer, MessageIdMetadataMap, - UserTransformationLibrary, + MetaTransferObject, + Metadata, + ProcessorTransformationOutput, ProcessorTransformationRequest, ProcessorTransformationResponse, + ProxyDeliveriesRequest, + ProxyDeliveryRequest, + ProxyRequest, RouterTransformationRequest, RouterTransformationRequestData, RouterTransformationResponse, RudderMessage, - ProcessorTransformationOutput, SourceTransformationResponse, - DeliveryResponse, - ErrorDetailer, - UserTransformationResponse, - UserTransformationServiceResponse, - MetaTransferObject, UserDeletionRequest, UserDeletionResponse, - Destination, - ComparatorInput, SourceInput, Source, + UserTransformationLibrary, + UserTransformationResponse, + UserTransformationServiceResponse, }; diff --git a/src/v0/destinations/campaign_manager/networkHandler.js b/src/v0/destinations/campaign_manager/networkHandler.js index 63efff5b50..a1fa24835c 100644 --- a/src/v0/destinations/campaign_manager/networkHandler.js +++ b/src/v0/destinations/campaign_manager/networkHandler.js @@ -76,7 +76,7 @@ const responseHandler = (destinationResponse) => { throw new NetworkError( `Campaign Manager: ${response.error?.message} during CAMPAIGN_MANAGER response transformation 3`, - status, + 500, { [tags.TAG_NAMES.ERROR_TYPE]: getDynamicErrorType(status), }, diff --git a/src/v0/destinations/salesforce/networkHandler.js b/src/v0/destinations/salesforce/networkHandler.js index dc67aff1b7..918084cc89 100644 --- a/src/v0/destinations/salesforce/networkHandler.js +++ b/src/v0/destinations/salesforce/networkHandler.js @@ -10,7 +10,7 @@ const responseHandler = (destinationResponse, destType) => { destinationResponse, 'during Salesforce Response Handling', destinationResponse?.rudderJobMetadata?.destInfo?.authKey, - LEGACY + LEGACY, ); // else successfully return status as 200, message and original destination response diff --git a/src/v0/destinations/salesforce_oauth/networkHandler.js b/src/v0/destinations/salesforce_oauth/networkHandler.js index 2042830cb1..2bcace31c9 100644 --- a/src/v0/destinations/salesforce_oauth/networkHandler.js +++ b/src/v0/destinations/salesforce_oauth/networkHandler.js @@ -10,7 +10,7 @@ const responseHandler = (destinationResponse, destType) => { destinationResponse, 'during Salesforce Response Handling', destinationResponse?.rudderJobMetadata?.destInfo?.authKey, - OAUTH + OAUTH, ); // else successfully return status as 200, message and original destination response diff --git a/src/v0/util/errorTypes/index.js b/src/v0/util/errorTypes/index.js index 80268c3e77..f3cef657ca 100644 --- a/src/v0/util/errorTypes/index.js +++ b/src/v0/util/errorTypes/index.js @@ -1,5 +1,7 @@ const FilteredEventsError = require('./filteredEventsError'); +const TransformerProxyError = require('./transformerProxyError'); module.exports = { FilteredEventsError, + TransformerProxyError, }; diff --git a/src/v0/util/errorTypes/transformerProxyError.js b/src/v0/util/errorTypes/transformerProxyError.js new file mode 100644 index 0000000000..9f4bb593c7 --- /dev/null +++ b/src/v0/util/errorTypes/transformerProxyError.js @@ -0,0 +1,28 @@ +const tags = require('../tags'); +const { BaseError } = require('./base'); + +const errorTypes = Object.values(tags.ERROR_TYPES); +const metaTypes = Object.values(tags.METADATA); +class TransformerProxyError extends BaseError { + constructor(message, statusCode, statTags, destResponse, authErrorCategory, response) { + const finalStatTags = { + [tags.TAG_NAMES.ERROR_CATEGORY]: tags.ERROR_CATEGORIES.NETWORK, + [tags.TAG_NAMES.ERROR_TYPE]: tags.ERROR_TYPES.ABORTED, + }; + + // Allow specifying only error type and meta tags + if (statTags && typeof statTags === 'object' && !Array.isArray(statTags)) { + if (errorTypes.includes(statTags[tags.TAG_NAMES.ERROR_TYPE])) { + finalStatTags[tags.TAG_NAMES.ERROR_TYPE] = statTags[tags.TAG_NAMES.ERROR_TYPE]; + } + + if (metaTypes.includes(statTags[tags.TAG_NAMES.META])) { + finalStatTags[tags.TAG_NAMES.META] = statTags[tags.TAG_NAMES.META]; + } + } + super(message, statusCode, finalStatTags, destResponse, authErrorCategory); + this.response = response; + } +} + +module.exports = TransformerProxyError; \ No newline at end of file diff --git a/src/v1/destinations/campaign_manager/networkHandler.js b/src/v1/destinations/campaign_manager/networkHandler.js index b3b82c8cf3..6e13a68f0a 100644 --- a/src/v1/destinations/campaign_manager/networkHandler.js +++ b/src/v1/destinations/campaign_manager/networkHandler.js @@ -1,6 +1,6 @@ /* eslint-disable no-param-reassign */ /* eslint-disable no-restricted-syntax */ -const { NetworkError } = require('@rudderstack/integrations-lib'); +const { TransformerProxyError } = require('../../../v0/util/errorTypes'); const { prepareProxyRequest, proxyRequest } = require('../../../adapters/network'); const { isHttpStatusSuccess, getAuthErrCategoryFromStCode } = require('../../../v0/util/index'); @@ -10,25 +10,6 @@ const { } = require('../../../adapters/utils/networkUtils'); const tags = require('../../../v0/util/tags'); -function isEventRetryableAndExtractErrMsg(element, proxyOutputObj) { - let isRetryable = false; - let errorMsg = ''; - // success event - if (!element.errors) { - return isRetryable; - } - for (const err of element.errors) { - errorMsg += `${err.message}, `; - if (err.code === 'INTERNAL') { - isRetryable = true; - } - } - if (errorMsg) { - proxyOutputObj.error = errorMsg; - } - return isRetryable; -} - function isEventAbortableAndExtractErrMsg(element, proxyOutputObj) { let isAbortable = false; let errorMsg = ''; @@ -68,10 +49,8 @@ const responseHandler = (destinationResponse) => { metadata: rudderJobMetadata[idx], error: 'success', }; - // update status of partial event as per retriable or abortable - if (isEventRetryableAndExtractErrMsg(element, proxyOutputObj)) { - proxyOutputObj.statusCode = 500; - } else if (isEventAbortableAndExtractErrMsg(element, proxyOutputObj)) { + // update status of partial event if abortable + if (isEventAbortableAndExtractErrMsg(element, proxyOutputObj)) { proxyOutputObj.statusCode = 400; } responseWithIndividualEvents.push(proxyOutputObj); @@ -95,16 +74,16 @@ const responseHandler = (destinationResponse) => { }); } - throw new NetworkError( - `Campaign Manager: Error transformer proxy v1 during CAMPAIGN_MANAGER response transformation`, - 500, - { - [tags.TAG_NAMES.ERROR_TYPE]: getDynamicErrorType(status), - }, - destinationResponse, - getAuthErrCategoryFromStCode(status), - responseWithIndividualEvents, - ); + throw new TransformerProxyError( + `Campaign Manager: Error transformer proxy v1 during CAMPAIGN_MANAGER response transformation`, + 500, + { + [tags.TAG_NAMES.ERROR_TYPE]: getDynamicErrorType(status), + }, + destinationResponse, + getAuthErrCategoryFromStCode(status), + responseWithIndividualEvents, + ); }; function networkHandler() { diff --git a/test/__tests__/data/marketo_input.json b/test/__tests__/data/marketo_input.json index 10fff935fc..122525560e 100644 --- a/test/__tests__/data/marketo_input.json +++ b/test/__tests__/data/marketo_input.json @@ -55,12 +55,7 @@ "includeKeys": [], "saveDestinationResponse": true, "secretKeys": [], - "supportedMessageTypes": [ - "identify", - "page", - "screen", - "track" - ], + "supportedMessageTypes": ["identify", "page", "screen", "track"], "supportedSourceTypes": [ "android", "ios", @@ -1125,12 +1120,7 @@ "includeKeys": [], "saveDestinationResponse": true, "secretKeys": [], - "supportedMessageTypes": [ - "identify", - "page", - "screen", - "track" - ], + "supportedMessageTypes": ["identify", "page", "screen", "track"], "supportedSourceTypes": [ "android", "ios", @@ -1164,4 +1154,4 @@ "query": {} } } -] \ No newline at end of file +] diff --git a/test/integrations/destinations/braze/dataDelivery/data.ts b/test/integrations/destinations/braze/dataDelivery/data.ts index 3e1805c01d..cd688a621b 100644 --- a/test/integrations/destinations/braze/dataDelivery/data.ts +++ b/test/integrations/destinations/braze/dataDelivery/data.ts @@ -1,395 +1,391 @@ -import MockAdapter from "axios-mock-adapter"; +import MockAdapter from 'axios-mock-adapter'; export const data = [ { - "name": "braze", - "description": "Test 0", - "feature": "dataDelivery", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": { - "type": "REST", - "endpoint": "https://rest.iad-03.braze.com/users/identify/test1", - "method": "POST", - "userId": "gabi_userId_45", - "headers": { - "Accept": "application/json", - "Authorization": "Bearer api_key", - "Content-Type": "application/json" - }, - "body": { - "FORM": {}, - "JSON": { - "aliases_to_identify": [ + name: 'braze', + description: 'Test 0', + feature: 'dataDelivery', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + type: 'REST', + endpoint: 'https://rest.iad-03.braze.com/users/identify/test1', + method: 'POST', + userId: 'gabi_userId_45', + headers: { + Accept: 'application/json', + Authorization: 'Bearer api_key', + 'Content-Type': 'application/json', + }, + body: { + FORM: {}, + JSON: { + aliases_to_identify: [ { - "external_id": "gabi_userId_45", - "user_alias": { - "alias_label": "rudder_id", - "alias_name": "gabi_anonId_45" - } - } - ] + external_id: 'gabi_userId_45', + user_alias: { + alias_label: 'rudder_id', + alias_name: 'gabi_anonId_45', + }, + }, + ], }, - "JSON_ARRAY": {}, - "XML": {} + JSON_ARRAY: {}, + XML: {}, + }, + files: {}, + params: { + destination: 'braze', }, - "files": {}, - "params": { - "destination": "braze" - } }, - "method": "POST" - } + method: 'POST', + }, }, - "output": { - "response": { - "status": 200, - "body": { - "output": { - "status": 201, - "message": "Request for braze Processed Successfully", - "destinationResponse": { - "response": { - "aliases_processed": 1, - "message": "success" + output: { + response: { + status: 200, + body: { + output: { + status: 201, + message: 'Request for braze Processed Successfully', + destinationResponse: { + response: { + aliases_processed: 1, + message: 'success', }, - "status": 201 - } - } - } - } - } + status: 201, + }, + }, + }, + }, + }, }, { - "name": "braze", - "description": "Test 1", - "feature": "dataDelivery", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": { - "type": "REST", - "endpoint": "https://rest.iad-03.braze.com/users/identify/test2", - "method": "POST", - "userId": "gabi_userId_45", - "headers": { - "Accept": "application/json", - "Authorization": "Bearer api_key", - "Content-Type": "application/json" - }, - "body": { - "FORM": {}, - "JSON": { - "aliases_to_identify": [ + name: 'braze', + description: 'Test 1', + feature: 'dataDelivery', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + type: 'REST', + endpoint: 'https://rest.iad-03.braze.com/users/identify/test2', + method: 'POST', + userId: 'gabi_userId_45', + headers: { + Accept: 'application/json', + Authorization: 'Bearer api_key', + 'Content-Type': 'application/json', + }, + body: { + FORM: {}, + JSON: { + aliases_to_identify: [ { - "external_id": "gabi_userId_45", - "user_alias": { - "alias_label": "rudder_id", - "alias_name": "gabi_anonId_45" - } - } - ] + external_id: 'gabi_userId_45', + user_alias: { + alias_label: 'rudder_id', + alias_name: 'gabi_anonId_45', + }, + }, + ], }, - "JSON_ARRAY": {}, - "XML": {} + JSON_ARRAY: {}, + XML: {}, + }, + files: {}, + params: { + destination: 'braze', }, - "files": {}, - "params": { - "destination": "braze" - } }, - "method": "POST" - } + method: 'POST', + }, }, - "output": { - "response": { - "status": 200, - "body": { - "output": { - "status": 201, - "message": "Request for braze Processed Successfully", - "destinationResponse": { - "response": { - "message": "success", - "errors": [ - "minor error message" - ] + output: { + response: { + status: 200, + body: { + output: { + status: 201, + message: 'Request for braze Processed Successfully', + destinationResponse: { + response: { + message: 'success', + errors: ['minor error message'], }, - "status": 201 - } - } - } - } - } + status: 201, + }, + }, + }, + }, + }, }, { - "name": "braze", - "description": "Test 2", - "feature": "dataDelivery", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": { - "type": "REST", - "endpoint": "https://rest.iad-03.braze.com/users/identify/test3", - "method": "POST", - "userId": "gabi_userId_45", - "headers": { - "Accept": "application/json", - "Authorization": "Bearer api_key", - "Content-Type": "application/json" - }, - "body": { - "FORM": {}, - "JSON": { - "aliases_to_identify": [ + name: 'braze', + description: 'Test 2', + feature: 'dataDelivery', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + type: 'REST', + endpoint: 'https://rest.iad-03.braze.com/users/identify/test3', + method: 'POST', + userId: 'gabi_userId_45', + headers: { + Accept: 'application/json', + Authorization: 'Bearer api_key', + 'Content-Type': 'application/json', + }, + body: { + FORM: {}, + JSON: { + aliases_to_identify: [ { - "external_id": "gabi_userId_45", - "user_alias": { - "alias_label": "rudder_id", - "alias_name": "gabi_anonId_45" - } - } - ] + external_id: 'gabi_userId_45', + user_alias: { + alias_label: 'rudder_id', + alias_name: 'gabi_anonId_45', + }, + }, + ], }, - "JSON_ARRAY": {}, - "XML": {} + JSON_ARRAY: {}, + XML: {}, + }, + files: {}, + params: { + destination: 'braze', }, - "files": {}, - "params": { - "destination": "braze" - } }, - "method": "POST" - } + method: 'POST', + }, }, - "output": { - "response": { - "status": 200, - "body": { - "output": { - "status": 201, - "message": "Request failed for braze with status: 201", - "destinationResponse": { - "response": { - "message": "fatal error message", - "errors": [ - "minor error message" - ] + output: { + response: { + status: 200, + body: { + output: { + status: 201, + message: 'Request failed for braze with status: 201', + destinationResponse: { + response: { + message: 'fatal error message', + errors: ['minor error message'], }, - "status": 201 + status: 201, + }, + statTags: { + destType: 'BRAZE', + errorCategory: 'network', + destinationId: 'Non-determininable', + workspaceId: 'Non-determininable', + errorType: 'aborted', + feature: 'dataDelivery', + implementation: 'native', + module: 'destination', }, - "statTags": { - "destType": "BRAZE", - "errorCategory": "network", - "destinationId": "Non-determininable", - "workspaceId": "Non-determininable", - "errorType": "aborted", - "feature": "dataDelivery", - "implementation": "native", - "module": "destination" - } - } - } - } - } + }, + }, + }, + }, }, { - "name": "braze", - "description": "Test 3", - "feature": "dataDelivery", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": { - "type": "REST", - "endpoint": "https://rest.iad-03.braze.com/users/identify/test4", - "method": "POST", - "userId": "gabi_userId_45", - "headers": { - "Accept": "application/json", - "Authorization": "Bearer api_key", - "Content-Type": "application/json" - }, - "body": { - "FORM": {}, - "JSON": { - "aliases_to_identify": [ + name: 'braze', + description: 'Test 3', + feature: 'dataDelivery', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + type: 'REST', + endpoint: 'https://rest.iad-03.braze.com/users/identify/test4', + method: 'POST', + userId: 'gabi_userId_45', + headers: { + Accept: 'application/json', + Authorization: 'Bearer api_key', + 'Content-Type': 'application/json', + }, + body: { + FORM: {}, + JSON: { + aliases_to_identify: [ { - "external_id": "gabi_userId_45", - "user_alias": { - "alias_label": "rudder_id", - "alias_name": "gabi_anonId_45" - } - } - ] + external_id: 'gabi_userId_45', + user_alias: { + alias_label: 'rudder_id', + alias_name: 'gabi_anonId_45', + }, + }, + ], }, - "JSON_ARRAY": {}, - "XML": {} + JSON_ARRAY: {}, + XML: {}, + }, + files: {}, + params: { + destination: 'braze', }, - "files": {}, - "params": { - "destination": "braze" - } }, - "method": "POST" - } + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: { + status: 201, + message: 'Request for braze Processed Successfully', + destinationResponse: { + response: '', + status: 201, + }, + }, + }, + }, }, - "output": { - "response": { - "status": 200, - "body": { - "output": { - "status": 201, - "message": "Request for braze Processed Successfully", - "destinationResponse": { - "response": "", - "status": 201 - } - } - } - } - } }, { - "name": "braze", - "description": "Test 4", - "feature": "dataDelivery", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": { - "type": "REST", - "endpoint": "https://rest.iad-03.braze.com/users/identify/test5", - "method": "POST", - "userId": "gabi_userId_45", - "headers": { - "Accept": "application/json", - "Authorization": "Bearer api_key", - "Content-Type": "application/json" - }, - "body": { - "FORM": {}, - "JSON": { - "aliases_to_identify": [ + name: 'braze', + description: 'Test 4', + feature: 'dataDelivery', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + type: 'REST', + endpoint: 'https://rest.iad-03.braze.com/users/identify/test5', + method: 'POST', + userId: 'gabi_userId_45', + headers: { + Accept: 'application/json', + Authorization: 'Bearer api_key', + 'Content-Type': 'application/json', + }, + body: { + FORM: {}, + JSON: { + aliases_to_identify: [ { - "external_id": "gabi_userId_45", - "user_alias": { - "alias_label": "rudder_id", - "alias_name": "gabi_anonId_45" - } - } - ] + external_id: 'gabi_userId_45', + user_alias: { + alias_label: 'rudder_id', + alias_name: 'gabi_anonId_45', + }, + }, + ], }, - "JSON_ARRAY": {}, - "XML": {} + JSON_ARRAY: {}, + XML: {}, + }, + files: {}, + params: { + destination: 'braze', }, - "files": {}, - "params": { - "destination": "braze" - } }, - "method": "POST" - } + method: 'POST', + }, }, - "output": { - "response": { - "status": 500, - "body": { - "output": { - "status": 500, - "message": "Request failed for braze with status: 500", - "destinationResponse": { - "response": "", - "status": 500 + output: { + response: { + status: 500, + body: { + output: { + status: 500, + message: 'Request failed for braze with status: 500', + destinationResponse: { + response: '', + status: 500, + }, + statTags: { + destType: 'BRAZE', + errorCategory: 'network', + destinationId: 'Non-determininable', + workspaceId: 'Non-determininable', + errorType: 'retryable', + feature: 'dataDelivery', + implementation: 'native', + module: 'destination', }, - "statTags": { - "destType": "BRAZE", - "errorCategory": "network", - "destinationId": "Non-determininable", - "workspaceId": "Non-determininable", - "errorType": "retryable", - "feature": "dataDelivery", - "implementation": "native", - "module": "destination" - } - } - } - } - } + }, + }, + }, + }, }, { - "name": "braze", - "description": "Test 5", - "feature": "dataDelivery", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": { - "type": "REST", - "endpoint": "https://rest.iad-03.braze.com/users/identify/test6", - "method": "POST", - "userId": "gabi_userId_45", - "headers": { - "Accept": "application/json", - "Authorization": "Bearer api_key", - "Content-Type": "application/json" - }, - "body": { - "FORM": {}, - "JSON": { - "aliases_to_identify": [ + name: 'braze', + description: 'Test 5', + feature: 'dataDelivery', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + type: 'REST', + endpoint: 'https://rest.iad-03.braze.com/users/identify/test6', + method: 'POST', + userId: 'gabi_userId_45', + headers: { + Accept: 'application/json', + Authorization: 'Bearer api_key', + 'Content-Type': 'application/json', + }, + body: { + FORM: {}, + JSON: { + aliases_to_identify: [ { - "external_id": "gabi_userId_45", - "user_alias": { - "alias_label": "rudder_id", - "alias_name": "gabi_anonId_45" - } - } - ] + external_id: 'gabi_userId_45', + user_alias: { + alias_label: 'rudder_id', + alias_name: 'gabi_anonId_45', + }, + }, + ], }, - "JSON_ARRAY": {}, - "XML": {} + JSON_ARRAY: {}, + XML: {}, + }, + files: {}, + params: { + destination: 'braze', }, - "files": {}, - "params": { - "destination": "braze" - } }, - "method": "POST" - } + method: 'POST', + }, }, - "output": { - "response": { - "status": 500, - "body": { - "output": { - "status": 500, - "message": "Request failed for braze with status: 500", - "destinationResponse": { - "response": "", - "status": 500 + output: { + response: { + status: 500, + body: { + output: { + status: 500, + message: 'Request failed for braze with status: 500', + destinationResponse: { + response: '', + status: 500, }, - "statTags": { - "destType": "BRAZE", - "errorCategory": "network", - "destinationId": "Non-determininable", - "workspaceId": "Non-determininable", - "errorType": "retryable", - "feature": "dataDelivery", - "implementation": "native", - "module": "destination" - } - } - } - } + statTags: { + destType: 'BRAZE', + errorCategory: 'network', + destinationId: 'Non-determininable', + workspaceId: 'Non-determininable', + errorType: 'retryable', + feature: 'dataDelivery', + implementation: 'native', + module: 'destination', + }, + }, + }, + }, }, mockFns: (mockAdapter: MockAdapter) => { // params has `{ destination: salesforce }` @@ -410,79 +406,262 @@ export const data = [ 'Content-Type': 'application/json', 'User-Agent': 'RudderLabs', }, - ).replyOnce((config) => { - // @ts-ignore - const err = AxiosError.from('DNS not found', 'ENOTFOUND', config) - return Promise.reject(err); + ) + .replyOnce((config) => { + // @ts-ignore + const err = AxiosError.from('DNS not found', 'ENOTFOUND', config); + return Promise.reject(err); }); - } + }, + }, + { + name: 'braze', + description: 'Test 6', + feature: 'dataDelivery', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + type: 'REST', + endpoint: 'https://rest.iad-03.braze.com/users/identify/test7', + method: 'POST', + userId: 'gabi_userId_45', + headers: { + Accept: 'application/json', + Authorization: 'Bearer api_key', + 'Content-Type': 'application/json', + }, + body: { + FORM: {}, + JSON: { + aliases_to_identify: [ + { + external_id: 'gabi_userId_45', + user_alias: { + alias_label: 'rudder_id', + alias_name: 'gabi_anonId_45', + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + }, + files: {}, + params: { + destination: 'braze', + }, + }, + method: 'POST', + }, + }, + output: { + response: { + status: 500, + body: { + output: { + status: 500, + message: 'Request failed for braze with status: 500', + destinationResponse: { + response: '', + status: 500, + }, + statTags: { + destType: 'BRAZE', + errorCategory: 'network', + destinationId: 'Non-determininable', + workspaceId: 'Non-determininable', + errorType: 'retryable', + feature: 'dataDelivery', + implementation: 'native', + module: 'destination', + }, + }, + }, + }, + }, + }, + { + name: 'braze', + description: 'Test Transformer Proxy V1 input with v0 proxy handler', + feature: 'dataDelivery', + module: 'destination', + version: 'v1', + input: { + request: { + body: { + type: 'REST', + endpoint: 'https://rest.iad-03.braze.com/users/identify/test1', + method: 'POST', + userId: 'gabi_userId_45', + headers: { + Accept: 'application/json', + Authorization: 'Bearer api_key', + 'Content-Type': 'application/json', + }, + body: { + FORM: {}, + JSON: { + aliases_to_identify: [ + { + external_id: 'gabi_userId_45', + user_alias: { + alias_label: 'rudder_id', + alias_name: 'gabi_anonId_45', + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + }, + metadata: [ + { + jobId: 2, + attemptNum: 0, + userId: '', + sourceId: '2Vsge2uWYdrLfG7pZb5Y82eo4lr', + destinationId: '2RHh08uOsXqE9KvCDg3hoaeuK2L', + workspaceId: '2Csl0lSTbuM3qyHdaOQB2GcDH8o', + secret: { + access_token: 'secret', + refresh_token: 'refresh', + developer_token: 'developer_Token', + }, + }, + ], + files: {}, + params: { + destination: 'braze', + }, + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: { + response: [ + { + error: '{"aliases_processed":1,"message":"success"}', + statusCode: 201, + metadata: { + jobId: 2, + attemptNum: 0, + userId: '', + sourceId: '2Vsge2uWYdrLfG7pZb5Y82eo4lr', + destinationId: '2RHh08uOsXqE9KvCDg3hoaeuK2L', + workspaceId: '2Csl0lSTbuM3qyHdaOQB2GcDH8o', + secret: { + access_token: 'secret', + refresh_token: 'refresh', + developer_token: 'developer_Token', + }, + }, + }, + ], + }, + }, + }, + }, }, { - "name": "braze", - "description": "Test 6", - "feature": "dataDelivery", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": { - "type": "REST", - "endpoint": "https://rest.iad-03.braze.com/users/identify/test7", - "method": "POST", - "userId": "gabi_userId_45", - "headers": { - "Accept": "application/json", - "Authorization": "Bearer api_key", - "Content-Type": "application/json" - }, - "body": { - "FORM": {}, - "JSON": { - "aliases_to_identify": [ + name: 'braze', + description: 'Test Transformer Proxy V1 input with v0 proxy handler Error returned', + feature: 'dataDelivery', + module: 'destination', + version: 'v1', + input: { + request: { + body: { + type: 'REST', + endpoint: 'https://rest.iad-03.braze.com/users/identify/testV1', + method: 'POST', + userId: 'gabi_userId_45', + headers: { + Accept: 'application/json', + Authorization: 'Bearer api_key', + 'Content-Type': 'application/json', + }, + body: { + FORM: {}, + JSON: { + aliases_to_identify: [ { - "external_id": "gabi_userId_45", - "user_alias": { - "alias_label": "rudder_id", - "alias_name": "gabi_anonId_45" - } - } - ] + external_id: 'gabi_userId_45', + user_alias: { + alias_label: 'rudder_id', + alias_name: 'gabi_anonId_45', + }, + }, + ], }, - "JSON_ARRAY": {}, - "XML": {} + JSON_ARRAY: {}, + XML: {}, + }, + metadata: [ + { + jobId: 2, + attemptNum: 0, + userId: '', + sourceId: '2Vsge2uWYdrLfG7pZb5Y82eo4lr', + destinationId: '2RHh08uOsXqE9KvCDg3hoaeuK2L', + workspaceId: '2Csl0lSTbuM3qyHdaOQB2GcDH8o', + secret: { + access_token: 'secret', + refresh_token: 'refresh', + developer_token: 'developer_Token', + }, + }, + ], + files: {}, + params: { + destination: 'braze', }, - "files": {}, - "params": { - "destination": "braze" - } }, - "method": "POST" - } + method: 'POST', + }, }, - "output": { - "response": { - "status": 500, - "body": { - "output": { - "status": 500, - "message": "Request failed for braze with status: 500", - "destinationResponse": { - "response": "", - "status": 500 + output: { + response: { + status: 200, + body: { + output: { + response: [ + { + error: 'Request failed for braze with status: 401', + statusCode: 401, + metadata: { + jobId: 2, + attemptNum: 0, + userId: '', + sourceId: '2Vsge2uWYdrLfG7pZb5Y82eo4lr', + destinationId: '2RHh08uOsXqE9KvCDg3hoaeuK2L', + workspaceId: '2Csl0lSTbuM3qyHdaOQB2GcDH8o', + secret: { + access_token: 'secret', + refresh_token: 'refresh', + developer_token: 'developer_Token', + }, + }, + }, + ], + statTags: { + destType: 'BRAZE', + destinationId: '2RHh08uOsXqE9KvCDg3hoaeuK2L', + errorCategory: 'network', + errorType: 'aborted', + feature: 'dataDelivery', + implementation: 'native', + module: 'destination', + workspaceId: '2Csl0lSTbuM3qyHdaOQB2GcDH8o', }, - "statTags": { - "destType": "BRAZE", - "errorCategory": "network", - "destinationId": "Non-determininable", - "workspaceId": "Non-determininable", - "errorType": "retryable", - "feature": "dataDelivery", - "implementation": "native", - "module": "destination" - } - } - } - } - } - } -] \ No newline at end of file + }, + }, + }, + }, + }, +]; diff --git a/test/integrations/destinations/braze/network.ts b/test/integrations/destinations/braze/network.ts index 1c39a247e4..0ef99b806d 100644 --- a/test/integrations/destinations/braze/network.ts +++ b/test/integrations/destinations/braze/network.ts @@ -391,5 +391,34 @@ const deleteNwData = [ }, }, }, + { + httpReq: { + url: 'https://rest.iad-03.braze.com/users/identify/testV1', + data: { + aliases_to_identify: [ + { + external_id: 'gabi_userId_45', + user_alias: { alias_label: 'rudder_id', alias_name: 'gabi_anonId_45' }, + }, + ], + }, + params: { destination: 'braze' }, + headers: { + Accept: 'application/json', + Authorization: 'Bearer api_key', + 'Content-Type': 'application/json', + 'User-Agent': 'RudderLabs', + }, + method: 'POST', + }, + httpRes: { + data: { + code: 400, + message: 'Bad Req', + status: 'Fail Case', + }, + status: 401, + }, + }, ]; export const networkCallsData = [...deleteNwData, ...dataDeliveryMocksData]; From 36d3f258ed5ea4ba1899c8b2cae8203bf73d90ed Mon Sep 17 00:00:00 2001 From: Yashasvi Bajpai <33063622+yashasvibajpai@users.noreply.github.com> Date: Mon, 11 Dec 2023 13:37:54 +0530 Subject: [PATCH 056/135] feat: onboard msl changes for new record event (#2644) * feat: onboard msl changes for new record event * chore: remove older tc for MSL * fix: metadata * fix: metadatax2 * chore: address comments * chore: address commentsx2, handle mix of audiencelist and record events * chore: address commentsx2, handle mix of audiencelist and record events * chore: add router test * fix: record to audience handling (#2813) * fix: unit case with empty request * fix: missed error lib * chore: refactor tests * refactor: address comments * chore: address commentsx2 * fix: error message, handle metadata, missing id --------- Co-authored-by: Utsab Chowdhury --- .../marketo_static_list/testData/constants.js | 45 + .../marketo_static_list/testData/testData.js | 3085 +++++++++++++++++ .../marketo_static_list/transform.js | 126 +- .../marketo_static_list/transform.test.js | 138 + .../marketo_static_list/transformV2.js | 143 + .../destinations/marketo_static_list/util.js | 1 + test/__tests__/data/marketo_static_list.json | 2542 -------------- .../marketo_static_list_router_input.json | 1209 ------- ...eto_static_list_router_metadata_input.json | 69 - ...to_static_list_router_metadata_output.json | 20 - .../marketo_static_list_router_output.json | 170 - test/__tests__/marketo_static_list.test.js | 64 - .../marketo_static_list/processor/data.ts | 8 +- .../marketo_static_list/router/data.ts | 2356 ++++++++++++- 14 files changed, 5783 insertions(+), 4193 deletions(-) create mode 100644 src/v0/destinations/marketo_static_list/testData/constants.js create mode 100644 src/v0/destinations/marketo_static_list/testData/testData.js create mode 100644 src/v0/destinations/marketo_static_list/transform.test.js create mode 100644 src/v0/destinations/marketo_static_list/transformV2.js delete mode 100644 test/__tests__/data/marketo_static_list.json delete mode 100644 test/__tests__/data/marketo_static_list_router_input.json delete mode 100644 test/__tests__/data/marketo_static_list_router_metadata_input.json delete mode 100644 test/__tests__/data/marketo_static_list_router_metadata_output.json delete mode 100644 test/__tests__/data/marketo_static_list_router_output.json delete mode 100644 test/__tests__/marketo_static_list.test.js diff --git a/src/v0/destinations/marketo_static_list/testData/constants.js b/src/v0/destinations/marketo_static_list/testData/constants.js new file mode 100644 index 0000000000..2c420c6bc2 --- /dev/null +++ b/src/v0/destinations/marketo_static_list/testData/constants.js @@ -0,0 +1,45 @@ +const EXTERNAL_ID = 'marketoStaticListId'; +const TOKEN = 'Bearer access_token_success'; +const CONTENT_TYPE = 'application/json'; +const DEST_CONFIG = { + clientId: 'marketo_client_id_success', + clientSecret: 'marketo_client_secret_success', + accountId: 'marketo_acct_id_success', + staticListId: 1234, +}; +const DEST_DEFINITION = { + ID: '1iVQvTRMsPPyJzwol0ifH93QTQ6', + Name: 'MARKETO', + DisplayName: 'Marketo', + transformAt: 'processor', + transformAtV1: 'processor', +}; +const DEST_OBJECT = { + ID: '1zwa1wKshSt81YksKmUdJnr4IOK', + Name: 'test_marketo_rc', + DestinationDefinition: DEST_DEFINITION, + Config: { + clientId: 'marketo_client_id_success', + clientSecret: 'marketo_client_secret_success', + accountId: 'marketo_acct_id_success', + staticListId: 1122, + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, +}; +const MESSAGE_SOURCES_CONTEXT = { + job_id: '2VsZs4hyPpq7f1p8igrpmHsibHl', + job_run_id: 'ck99nbd2kqiljdihhkh0', + task_run_id: 'ck99nbd2kqiljdihhkhg', +}; + +module.exports = { + EXTERNAL_ID, + TOKEN, + CONTENT_TYPE, + DEST_OBJECT, + DEST_DEFINITION, + MESSAGE_SOURCES_CONTEXT, + DEST_CONFIG, +}; diff --git a/src/v0/destinations/marketo_static_list/testData/testData.js b/src/v0/destinations/marketo_static_list/testData/testData.js new file mode 100644 index 0000000000..45328436ce --- /dev/null +++ b/src/v0/destinations/marketo_static_list/testData/testData.js @@ -0,0 +1,3085 @@ +const { + EXTERNAL_ID, + TOKEN, + CONTENT_TYPE, + DEST_OBJECT, + DEST_DEFINITION, + MESSAGE_SOURCES_CONTEXT, + DEST_CONFIG, +} = require('./constants'); + +const recordInputs = [ + { + destination: DEST_OBJECT, + message: { + type: 'record', + action: 'insert', + fields: { + id: 1001, + }, + channel: 'sources', + context: { + sources: MESSAGE_SOURCES_CONTEXT, + externalId: [ + { + type: EXTERNAL_ID, + id: 'id001', + }, + ], + destinationFields: 'id', + mappedToDestination: 'true', + }, + recordId: '3', + }, + metadata: { + jobId: 1, + }, + }, + { + destination: DEST_OBJECT, + message: { + type: 'record', + action: 'insert', + fields: { + id: 1002, + }, + channel: 'sources', + context: { + sources: MESSAGE_SOURCES_CONTEXT, + externalId: [ + { + type: EXTERNAL_ID, + id: 'id002', + }, + ], + destinationFields: 'id', + mappedToDestination: 'true', + }, + recordId: '3', + }, + metadata: { + jobId: 2, + }, + }, + { + destination: DEST_OBJECT, + message: { + type: 'record', + action: 'insert', + fields: { + id: 1003, + }, + channel: 'sources', + context: { + sources: MESSAGE_SOURCES_CONTEXT, + externalId: [ + { + type: EXTERNAL_ID, + id: 'id001', + }, + ], + destinationFields: 'id', + mappedToDestination: 'true', + }, + recordId: '3', + }, + metadata: { + jobId: 3, + }, + }, + { + destination: DEST_OBJECT, + message: { + action: 'delete', + context: { + destinationFields: 'id', + externalId: [ + { + id: 'id002', + type: EXTERNAL_ID, + }, + ], + mappedToDestination: 'true', + sources: { + job_id: 'sf', + job_run_id: 'ck985bve58cvnti48120', + task_run_id: 'ck985bve58cvnti4812g', + version: '', + }, + }, + recordId: '2', + rudderId: '2', + fields: { + id: '2001', + }, + type: 'record', + }, + metadata: { + jobId: 4, + }, + }, +]; + +const recordOutput = [ + { + batchedRequest: [ + { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://marketo_acct_id_success.mktorest.com/rest/v1/lists/id001/leads.json?id=1001&id=1003', + headers: { + Authorization: TOKEN, + 'Content-Type': CONTENT_TYPE, + }, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + ], + metadata: [ + { + jobId: 1, + }, + { + jobId: 3, + }, + ], + batched: true, + statusCode: 200, + destination: DEST_OBJECT, + }, + { + batchedRequest: [ + { + version: '1', + type: 'REST', + method: 'DELETE', + endpoint: + 'https://marketo_acct_id_success.mktorest.com/rest/v1/lists/id002/leads.json?id=2001', + headers: { + Authorization: TOKEN, + 'Content-Type': CONTENT_TYPE, + }, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + ], + metadata: [ + { + jobId: 4, + }, + ], + batched: true, + statusCode: 200, + destination: DEST_OBJECT, + }, + { + batchedRequest: [ + { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://marketo_acct_id_success.mktorest.com/rest/v1/lists/id002/leads.json?id=1002', + headers: { + Authorization: TOKEN, + 'Content-Type': CONTENT_TYPE, + }, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + ], + metadata: [ + { + jobId: 2, + }, + ], + batched: true, + statusCode: 200, + destination: DEST_OBJECT, + }, +]; + +const audiencelistInputs = [ + { + destination: { + ID: '1zia9wKshXt80YksLmUdJnr7IHI', + Name: 'test_marketo', + DestinationDefinition: DEST_DEFINITION, + Config: DEST_CONFIG, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + message: { + userId: 'user 1', + anonymousId: 'anon-id-new', + event: 'event1', + type: 'audiencelist', + properties: { + listData: { + add: [ + { + id: 501, + }, + { + id: 502, + }, + { + id: 503, + }, + ], + remove: [ + { + id: 704, + }, + { + id: 705, + }, + { + id: 706, + }, + ], + }, + enablePartialFailure: true, + }, + context: { + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + metadata: { + jobId: 1, + }, + }, + { + destination: { + ID: '1zia9wKshXt80YksLmUdJnr7IHI', + Name: 'test_marketo', + DestinationDefinition: DEST_DEFINITION, + Config: DEST_CONFIG, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + message: { + userId: 'user 1', + anonymousId: 'anon-id-new', + event: 'event1', + type: 'audiencelist', + properties: { + listData: { + add: [ + { + id: 0, + }, + { + id: 1, + }, + { + id: 2, + }, + { + id: 3, + }, + { + id: 4, + }, + { + id: 5, + }, + { + id: 6, + }, + { + id: 7, + }, + { + id: 8, + }, + { + id: 9, + }, + { + id: 10, + }, + { + id: 11, + }, + { + id: 12, + }, + { + id: 13, + }, + { + id: 14, + }, + { + id: 15, + }, + { + id: 16, + }, + { + id: 17, + }, + { + id: 18, + }, + { + id: 19, + }, + { + id: 20, + }, + { + id: 21, + }, + { + id: 22, + }, + { + id: 23, + }, + { + id: 24, + }, + { + id: 25, + }, + { + id: 26, + }, + { + id: 27, + }, + { + id: 28, + }, + { + id: 29, + }, + { + id: 30, + }, + { + id: 31, + }, + { + id: 32, + }, + { + id: 33, + }, + { + id: 34, + }, + { + id: 35, + }, + { + id: 36, + }, + { + id: 37, + }, + { + id: 38, + }, + { + id: 39, + }, + { + id: 40, + }, + { + id: 41, + }, + { + id: 42, + }, + { + id: 43, + }, + { + id: 44, + }, + { + id: 45, + }, + { + id: 46, + }, + { + id: 47, + }, + { + id: 48, + }, + { + id: 49, + }, + { + id: 50, + }, + { + id: 51, + }, + { + id: 52, + }, + { + id: 53, + }, + { + id: 54, + }, + { + id: 55, + }, + { + id: 56, + }, + { + id: 57, + }, + { + id: 58, + }, + { + id: 59, + }, + { + id: 60, + }, + { + id: 61, + }, + { + id: 62, + }, + { + id: 63, + }, + { + id: 64, + }, + { + id: 65, + }, + { + id: 66, + }, + { + id: 67, + }, + { + id: 68, + }, + { + id: 69, + }, + { + id: 70, + }, + { + id: 71, + }, + { + id: 72, + }, + { + id: 73, + }, + { + id: 74, + }, + { + id: 75, + }, + { + id: 76, + }, + { + id: 77, + }, + { + id: 78, + }, + { + id: 79, + }, + { + id: 80, + }, + { + id: 81, + }, + { + id: 82, + }, + { + id: 83, + }, + { + id: 84, + }, + { + id: 85, + }, + { + id: 86, + }, + { + id: 87, + }, + { + id: 88, + }, + { + id: 89, + }, + { + id: 90, + }, + { + id: 91, + }, + { + id: 92, + }, + { + id: 93, + }, + { + id: 94, + }, + { + id: 95, + }, + { + id: 96, + }, + { + id: 97, + }, + { + id: 98, + }, + { + id: 99, + }, + { + id: 100, + }, + { + id: 101, + }, + { + id: 102, + }, + { + id: 103, + }, + { + id: 104, + }, + { + id: 105, + }, + { + id: 106, + }, + { + id: 107, + }, + { + id: 108, + }, + { + id: 109, + }, + { + id: 110, + }, + { + id: 111, + }, + { + id: 112, + }, + { + id: 113, + }, + { + id: 114, + }, + { + id: 115, + }, + { + id: 116, + }, + { + id: 117, + }, + { + id: 118, + }, + { + id: 119, + }, + { + id: 120, + }, + { + id: 121, + }, + { + id: 122, + }, + { + id: 123, + }, + { + id: 124, + }, + { + id: 125, + }, + { + id: 126, + }, + { + id: 127, + }, + { + id: 128, + }, + { + id: 129, + }, + { + id: 130, + }, + { + id: 131, + }, + { + id: 132, + }, + { + id: 133, + }, + { + id: 134, + }, + { + id: 135, + }, + { + id: 136, + }, + { + id: 137, + }, + { + id: 138, + }, + { + id: 139, + }, + { + id: 140, + }, + { + id: 141, + }, + { + id: 142, + }, + { + id: 143, + }, + { + id: 144, + }, + { + id: 145, + }, + { + id: 146, + }, + { + id: 147, + }, + { + id: 148, + }, + { + id: 149, + }, + { + id: 150, + }, + { + id: 151, + }, + { + id: 152, + }, + { + id: 153, + }, + { + id: 154, + }, + { + id: 155, + }, + { + id: 156, + }, + { + id: 157, + }, + { + id: 158, + }, + { + id: 159, + }, + { + id: 160, + }, + { + id: 161, + }, + { + id: 162, + }, + { + id: 163, + }, + { + id: 164, + }, + { + id: 165, + }, + { + id: 166, + }, + { + id: 167, + }, + { + id: 168, + }, + { + id: 169, + }, + { + id: 170, + }, + { + id: 171, + }, + { + id: 172, + }, + { + id: 173, + }, + { + id: 174, + }, + { + id: 175, + }, + { + id: 176, + }, + { + id: 177, + }, + { + id: 178, + }, + { + id: 179, + }, + { + id: 180, + }, + { + id: 181, + }, + { + id: 182, + }, + { + id: 183, + }, + { + id: 184, + }, + { + id: 185, + }, + { + id: 186, + }, + { + id: 187, + }, + { + id: 188, + }, + { + id: 189, + }, + { + id: 190, + }, + { + id: 191, + }, + { + id: 192, + }, + { + id: 193, + }, + { + id: 194, + }, + { + id: 195, + }, + { + id: 196, + }, + { + id: 197, + }, + { + id: 198, + }, + { + id: 199, + }, + { + id: 200, + }, + { + id: 201, + }, + { + id: 202, + }, + { + id: 203, + }, + { + id: 204, + }, + { + id: 205, + }, + { + id: 206, + }, + { + id: 207, + }, + { + id: 208, + }, + { + id: 209, + }, + { + id: 210, + }, + { + id: 211, + }, + { + id: 212, + }, + { + id: 213, + }, + { + id: 214, + }, + { + id: 215, + }, + { + id: 216, + }, + { + id: 217, + }, + { + id: 218, + }, + { + id: 219, + }, + { + id: 220, + }, + { + id: 221, + }, + { + id: 222, + }, + { + id: 223, + }, + { + id: 224, + }, + { + id: 225, + }, + { + id: 226, + }, + { + id: 227, + }, + { + id: 228, + }, + { + id: 229, + }, + { + id: 230, + }, + { + id: 231, + }, + { + id: 232, + }, + { + id: 233, + }, + { + id: 234, + }, + { + id: 235, + }, + { + id: 236, + }, + { + id: 237, + }, + { + id: 238, + }, + { + id: 239, + }, + { + id: 240, + }, + { + id: 241, + }, + { + id: 242, + }, + { + id: 243, + }, + { + id: 244, + }, + { + id: 245, + }, + { + id: 246, + }, + { + id: 247, + }, + { + id: 248, + }, + { + id: 249, + }, + { + id: 250, + }, + { + id: 251, + }, + { + id: 252, + }, + { + id: 253, + }, + { + id: 254, + }, + { + id: 255, + }, + { + id: 256, + }, + { + id: 257, + }, + { + id: 258, + }, + { + id: 259, + }, + { + id: 260, + }, + { + id: 261, + }, + { + id: 262, + }, + { + id: 263, + }, + { + id: 264, + }, + { + id: 265, + }, + { + id: 266, + }, + { + id: 267, + }, + { + id: 268, + }, + { + id: 269, + }, + { + id: 270, + }, + { + id: 271, + }, + { + id: 272, + }, + { + id: 273, + }, + { + id: 274, + }, + { + id: 275, + }, + { + id: 276, + }, + { + id: 277, + }, + { + id: 278, + }, + { + id: 279, + }, + { + id: 280, + }, + { + id: 281, + }, + { + id: 282, + }, + { + id: 283, + }, + { + id: 284, + }, + { + id: 285, + }, + { + id: 286, + }, + { + id: 287, + }, + { + id: 288, + }, + { + id: 289, + }, + { + id: 290, + }, + { + id: 291, + }, + { + id: 292, + }, + { + id: 293, + }, + { + id: 294, + }, + { + id: 295, + }, + { + id: 296, + }, + { + id: 297, + }, + { + id: 298, + }, + { + id: 299, + }, + { + id: 300, + }, + { + id: 301, + }, + { + id: 302, + }, + { + id: 303, + }, + { + id: 304, + }, + { + id: 305, + }, + { + id: 306, + }, + { + id: 307, + }, + { + id: 308, + }, + { + id: 309, + }, + { + id: 310, + }, + { + id: 311, + }, + { + id: 312, + }, + { + id: 313, + }, + { + id: 314, + }, + { + id: 315, + }, + { + id: 316, + }, + { + id: 317, + }, + { + id: 318, + }, + { + id: 319, + }, + { + id: 320, + }, + { + id: 321, + }, + { + id: 322, + }, + { + id: 323, + }, + { + id: 324, + }, + { + id: 325, + }, + { + id: 326, + }, + { + id: 327, + }, + { + id: 328, + }, + { + id: 329, + }, + { + id: 330, + }, + { + id: 331, + }, + { + id: 332, + }, + { + id: 333, + }, + { + id: 334, + }, + { + id: 335, + }, + { + id: 336, + }, + { + id: 337, + }, + { + id: 338, + }, + { + id: 339, + }, + { + id: 340, + }, + { + id: 341, + }, + { + id: 342, + }, + { + id: 343, + }, + { + id: 344, + }, + { + id: 345, + }, + { + id: 346, + }, + { + id: 347, + }, + { + id: 348, + }, + { + id: 349, + }, + { + id: 350, + }, + ], + }, + enablePartialFailure: true, + }, + context: { + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + metadata: { + jobId: 2, + }, + }, +]; + +const reqMetadata = { + namespace: 'Unknown', + cluster: 'Unknown', + features: {}, +}; + +const largeRecordOutput = [ + { + batchedRequest: [ + { + version: '1', + type: 'REST', + method: 'DELETE', + endpoint: + 'https://marketo_acct_id_success.mktorest.com/rest/v1/lists/1122/leads.json?id=351&id=352&id=353&id=354&id=355&id=356&id=357&id=358&id=359&id=360&id=361&id=362&id=363&id=364&id=365&id=366&id=367&id=368&id=369&id=370&id=371&id=372&id=373&id=374&id=375&id=376&id=377&id=378&id=379&id=380&id=381&id=382&id=383&id=384&id=385&id=386&id=387&id=388&id=389&id=390&id=391&id=392&id=393&id=394&id=395&id=396&id=397&id=398&id=399&id=400&id=401&id=402&id=403&id=404&id=405&id=406&id=407&id=408&id=409&id=410&id=411&id=412&id=413&id=414&id=415&id=416&id=417&id=418&id=419&id=420&id=421&id=422&id=423&id=424&id=425&id=426&id=427&id=428&id=429&id=430&id=431&id=432&id=433&id=434&id=435&id=436&id=437&id=438&id=439&id=440&id=441&id=442&id=443&id=444&id=445&id=446&id=447&id=448&id=449&id=450', + headers: { + Authorization: TOKEN, + 'Content-Type': CONTENT_TYPE, + }, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + ], + metadata: [ + { + jobId: 351, + }, + { + jobId: 352, + }, + { + jobId: 353, + }, + { + jobId: 354, + }, + { + jobId: 355, + }, + { + jobId: 356, + }, + { + jobId: 357, + }, + { + jobId: 358, + }, + { + jobId: 359, + }, + { + jobId: 360, + }, + { + jobId: 361, + }, + { + jobId: 362, + }, + { + jobId: 363, + }, + { + jobId: 364, + }, + { + jobId: 365, + }, + { + jobId: 366, + }, + { + jobId: 367, + }, + { + jobId: 368, + }, + { + jobId: 369, + }, + { + jobId: 370, + }, + { + jobId: 371, + }, + { + jobId: 372, + }, + { + jobId: 373, + }, + { + jobId: 374, + }, + { + jobId: 375, + }, + { + jobId: 376, + }, + { + jobId: 377, + }, + { + jobId: 378, + }, + { + jobId: 379, + }, + { + jobId: 380, + }, + { + jobId: 381, + }, + { + jobId: 382, + }, + { + jobId: 383, + }, + { + jobId: 384, + }, + { + jobId: 385, + }, + { + jobId: 386, + }, + { + jobId: 387, + }, + { + jobId: 388, + }, + { + jobId: 389, + }, + { + jobId: 390, + }, + { + jobId: 391, + }, + { + jobId: 392, + }, + { + jobId: 393, + }, + { + jobId: 394, + }, + { + jobId: 395, + }, + { + jobId: 396, + }, + { + jobId: 397, + }, + { + jobId: 398, + }, + { + jobId: 399, + }, + { + jobId: 400, + }, + { + jobId: 401, + }, + { + jobId: 402, + }, + { + jobId: 403, + }, + { + jobId: 404, + }, + { + jobId: 405, + }, + { + jobId: 406, + }, + { + jobId: 407, + }, + { + jobId: 408, + }, + { + jobId: 409, + }, + { + jobId: 410, + }, + { + jobId: 411, + }, + { + jobId: 412, + }, + { + jobId: 413, + }, + { + jobId: 414, + }, + { + jobId: 415, + }, + { + jobId: 416, + }, + { + jobId: 417, + }, + { + jobId: 418, + }, + { + jobId: 419, + }, + { + jobId: 420, + }, + { + jobId: 421, + }, + { + jobId: 422, + }, + { + jobId: 423, + }, + { + jobId: 424, + }, + { + jobId: 425, + }, + { + jobId: 426, + }, + { + jobId: 427, + }, + { + jobId: 428, + }, + { + jobId: 429, + }, + { + jobId: 430, + }, + { + jobId: 431, + }, + { + jobId: 432, + }, + { + jobId: 433, + }, + { + jobId: 434, + }, + { + jobId: 435, + }, + { + jobId: 436, + }, + { + jobId: 437, + }, + { + jobId: 438, + }, + { + jobId: 439, + }, + { + jobId: 440, + }, + { + jobId: 441, + }, + { + jobId: 442, + }, + { + jobId: 443, + }, + { + jobId: 444, + }, + { + jobId: 445, + }, + { + jobId: 446, + }, + { + jobId: 447, + }, + { + jobId: 448, + }, + { + jobId: 449, + }, + { + jobId: 450, + }, + ], + batched: true, + statusCode: 200, + destination: DEST_OBJECT, + }, + { + batchedRequest: [ + { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://marketo_acct_id_success.mktorest.com/rest/v1/lists/1122/leads.json?id=1&id=2&id=3&id=4&id=5&id=6&id=7&id=8&id=9&id=10&id=11&id=12&id=13&id=14&id=15&id=16&id=17&id=18&id=19&id=20&id=21&id=22&id=23&id=24&id=25&id=26&id=27&id=28&id=29&id=30&id=31&id=32&id=33&id=34&id=35&id=36&id=37&id=38&id=39&id=40&id=41&id=42&id=43&id=44&id=45&id=46&id=47&id=48&id=49&id=50&id=51&id=52&id=53&id=54&id=55&id=56&id=57&id=58&id=59&id=60&id=61&id=62&id=63&id=64&id=65&id=66&id=67&id=68&id=69&id=70&id=71&id=72&id=73&id=74&id=75&id=76&id=77&id=78&id=79&id=80&id=81&id=82&id=83&id=84&id=85&id=86&id=87&id=88&id=89&id=90&id=91&id=92&id=93&id=94&id=95&id=96&id=97&id=98&id=99&id=100&id=101&id=102&id=103&id=104&id=105&id=106&id=107&id=108&id=109&id=110&id=111&id=112&id=113&id=114&id=115&id=116&id=117&id=118&id=119&id=120&id=121&id=122&id=123&id=124&id=125&id=126&id=127&id=128&id=129&id=130&id=131&id=132&id=133&id=134&id=135&id=136&id=137&id=138&id=139&id=140&id=141&id=142&id=143&id=144&id=145&id=146&id=147&id=148&id=149&id=150&id=151&id=152&id=153&id=154&id=155&id=156&id=157&id=158&id=159&id=160&id=161&id=162&id=163&id=164&id=165&id=166&id=167&id=168&id=169&id=170&id=171&id=172&id=173&id=174&id=175&id=176&id=177&id=178&id=179&id=180&id=181&id=182&id=183&id=184&id=185&id=186&id=187&id=188&id=189&id=190&id=191&id=192&id=193&id=194&id=195&id=196&id=197&id=198&id=199&id=200&id=201&id=202&id=203&id=204&id=205&id=206&id=207&id=208&id=209&id=210&id=211&id=212&id=213&id=214&id=215&id=216&id=217&id=218&id=219&id=220&id=221&id=222&id=223&id=224&id=225&id=226&id=227&id=228&id=229&id=230&id=231&id=232&id=233&id=234&id=235&id=236&id=237&id=238&id=239&id=240&id=241&id=242&id=243&id=244&id=245&id=246&id=247&id=248&id=249&id=250&id=251&id=252&id=253&id=254&id=255&id=256&id=257&id=258&id=259&id=260&id=261&id=262&id=263&id=264&id=265&id=266&id=267&id=268&id=269&id=270&id=271&id=272&id=273&id=274&id=275&id=276&id=277&id=278&id=279&id=280&id=281&id=282&id=283&id=284&id=285&id=286&id=287&id=288&id=289&id=290&id=291&id=292&id=293&id=294&id=295&id=296&id=297&id=298&id=299&id=300', + headers: { + Authorization: TOKEN, + 'Content-Type': CONTENT_TYPE, + }, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://marketo_acct_id_success.mktorest.com/rest/v1/lists/1122/leads.json?id=301&id=302&id=303&id=304&id=305&id=306&id=307&id=308&id=309&id=310&id=311&id=312&id=313&id=314&id=315&id=316&id=317&id=318&id=319&id=320&id=321&id=322&id=323&id=324&id=325&id=326&id=327&id=328&id=329&id=330&id=331&id=332&id=333&id=334&id=335&id=336&id=337&id=338&id=339&id=340&id=341&id=342&id=343&id=344&id=345&id=346&id=347&id=348&id=349&id=350', + headers: { + Authorization: TOKEN, + 'Content-Type': CONTENT_TYPE, + }, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + ], + metadata: [ + { + jobId: 1, + }, + { + jobId: 2, + }, + { + jobId: 3, + }, + { + jobId: 4, + }, + { + jobId: 5, + }, + { + jobId: 6, + }, + { + jobId: 7, + }, + { + jobId: 8, + }, + { + jobId: 9, + }, + { + jobId: 10, + }, + { + jobId: 11, + }, + { + jobId: 12, + }, + { + jobId: 13, + }, + { + jobId: 14, + }, + { + jobId: 15, + }, + { + jobId: 16, + }, + { + jobId: 17, + }, + { + jobId: 18, + }, + { + jobId: 19, + }, + { + jobId: 20, + }, + { + jobId: 21, + }, + { + jobId: 22, + }, + { + jobId: 23, + }, + { + jobId: 24, + }, + { + jobId: 25, + }, + { + jobId: 26, + }, + { + jobId: 27, + }, + { + jobId: 28, + }, + { + jobId: 29, + }, + { + jobId: 30, + }, + { + jobId: 31, + }, + { + jobId: 32, + }, + { + jobId: 33, + }, + { + jobId: 34, + }, + { + jobId: 35, + }, + { + jobId: 36, + }, + { + jobId: 37, + }, + { + jobId: 38, + }, + { + jobId: 39, + }, + { + jobId: 40, + }, + { + jobId: 41, + }, + { + jobId: 42, + }, + { + jobId: 43, + }, + { + jobId: 44, + }, + { + jobId: 45, + }, + { + jobId: 46, + }, + { + jobId: 47, + }, + { + jobId: 48, + }, + { + jobId: 49, + }, + { + jobId: 50, + }, + { + jobId: 51, + }, + { + jobId: 52, + }, + { + jobId: 53, + }, + { + jobId: 54, + }, + { + jobId: 55, + }, + { + jobId: 56, + }, + { + jobId: 57, + }, + { + jobId: 58, + }, + { + jobId: 59, + }, + { + jobId: 60, + }, + { + jobId: 61, + }, + { + jobId: 62, + }, + { + jobId: 63, + }, + { + jobId: 64, + }, + { + jobId: 65, + }, + { + jobId: 66, + }, + { + jobId: 67, + }, + { + jobId: 68, + }, + { + jobId: 69, + }, + { + jobId: 70, + }, + { + jobId: 71, + }, + { + jobId: 72, + }, + { + jobId: 73, + }, + { + jobId: 74, + }, + { + jobId: 75, + }, + { + jobId: 76, + }, + { + jobId: 77, + }, + { + jobId: 78, + }, + { + jobId: 79, + }, + { + jobId: 80, + }, + { + jobId: 81, + }, + { + jobId: 82, + }, + { + jobId: 83, + }, + { + jobId: 84, + }, + { + jobId: 85, + }, + { + jobId: 86, + }, + { + jobId: 87, + }, + { + jobId: 88, + }, + { + jobId: 89, + }, + { + jobId: 90, + }, + { + jobId: 91, + }, + { + jobId: 92, + }, + { + jobId: 93, + }, + { + jobId: 94, + }, + { + jobId: 95, + }, + { + jobId: 96, + }, + { + jobId: 97, + }, + { + jobId: 98, + }, + { + jobId: 99, + }, + { + jobId: 100, + }, + { + jobId: 101, + }, + { + jobId: 102, + }, + { + jobId: 103, + }, + { + jobId: 104, + }, + { + jobId: 105, + }, + { + jobId: 106, + }, + { + jobId: 107, + }, + { + jobId: 108, + }, + { + jobId: 109, + }, + { + jobId: 110, + }, + { + jobId: 111, + }, + { + jobId: 112, + }, + { + jobId: 113, + }, + { + jobId: 114, + }, + { + jobId: 115, + }, + { + jobId: 116, + }, + { + jobId: 117, + }, + { + jobId: 118, + }, + { + jobId: 119, + }, + { + jobId: 120, + }, + { + jobId: 121, + }, + { + jobId: 122, + }, + { + jobId: 123, + }, + { + jobId: 124, + }, + { + jobId: 125, + }, + { + jobId: 126, + }, + { + jobId: 127, + }, + { + jobId: 128, + }, + { + jobId: 129, + }, + { + jobId: 130, + }, + { + jobId: 131, + }, + { + jobId: 132, + }, + { + jobId: 133, + }, + { + jobId: 134, + }, + { + jobId: 135, + }, + { + jobId: 136, + }, + { + jobId: 137, + }, + { + jobId: 138, + }, + { + jobId: 139, + }, + { + jobId: 140, + }, + { + jobId: 141, + }, + { + jobId: 142, + }, + { + jobId: 143, + }, + { + jobId: 144, + }, + { + jobId: 145, + }, + { + jobId: 146, + }, + { + jobId: 147, + }, + { + jobId: 148, + }, + { + jobId: 149, + }, + { + jobId: 150, + }, + { + jobId: 151, + }, + { + jobId: 152, + }, + { + jobId: 153, + }, + { + jobId: 154, + }, + { + jobId: 155, + }, + { + jobId: 156, + }, + { + jobId: 157, + }, + { + jobId: 158, + }, + { + jobId: 159, + }, + { + jobId: 160, + }, + { + jobId: 161, + }, + { + jobId: 162, + }, + { + jobId: 163, + }, + { + jobId: 164, + }, + { + jobId: 165, + }, + { + jobId: 166, + }, + { + jobId: 167, + }, + { + jobId: 168, + }, + { + jobId: 169, + }, + { + jobId: 170, + }, + { + jobId: 171, + }, + { + jobId: 172, + }, + { + jobId: 173, + }, + { + jobId: 174, + }, + { + jobId: 175, + }, + { + jobId: 176, + }, + { + jobId: 177, + }, + { + jobId: 178, + }, + { + jobId: 179, + }, + { + jobId: 180, + }, + { + jobId: 181, + }, + { + jobId: 182, + }, + { + jobId: 183, + }, + { + jobId: 184, + }, + { + jobId: 185, + }, + { + jobId: 186, + }, + { + jobId: 187, + }, + { + jobId: 188, + }, + { + jobId: 189, + }, + { + jobId: 190, + }, + { + jobId: 191, + }, + { + jobId: 192, + }, + { + jobId: 193, + }, + { + jobId: 194, + }, + { + jobId: 195, + }, + { + jobId: 196, + }, + { + jobId: 197, + }, + { + jobId: 198, + }, + { + jobId: 199, + }, + { + jobId: 200, + }, + { + jobId: 201, + }, + { + jobId: 202, + }, + { + jobId: 203, + }, + { + jobId: 204, + }, + { + jobId: 205, + }, + { + jobId: 206, + }, + { + jobId: 207, + }, + { + jobId: 208, + }, + { + jobId: 209, + }, + { + jobId: 210, + }, + { + jobId: 211, + }, + { + jobId: 212, + }, + { + jobId: 213, + }, + { + jobId: 214, + }, + { + jobId: 215, + }, + { + jobId: 216, + }, + { + jobId: 217, + }, + { + jobId: 218, + }, + { + jobId: 219, + }, + { + jobId: 220, + }, + { + jobId: 221, + }, + { + jobId: 222, + }, + { + jobId: 223, + }, + { + jobId: 224, + }, + { + jobId: 225, + }, + { + jobId: 226, + }, + { + jobId: 227, + }, + { + jobId: 228, + }, + { + jobId: 229, + }, + { + jobId: 230, + }, + { + jobId: 231, + }, + { + jobId: 232, + }, + { + jobId: 233, + }, + { + jobId: 234, + }, + { + jobId: 235, + }, + { + jobId: 236, + }, + { + jobId: 237, + }, + { + jobId: 238, + }, + { + jobId: 239, + }, + { + jobId: 240, + }, + { + jobId: 241, + }, + { + jobId: 242, + }, + { + jobId: 243, + }, + { + jobId: 244, + }, + { + jobId: 245, + }, + { + jobId: 246, + }, + { + jobId: 247, + }, + { + jobId: 248, + }, + { + jobId: 249, + }, + { + jobId: 250, + }, + { + jobId: 251, + }, + { + jobId: 252, + }, + { + jobId: 253, + }, + { + jobId: 254, + }, + { + jobId: 255, + }, + { + jobId: 256, + }, + { + jobId: 257, + }, + { + jobId: 258, + }, + { + jobId: 259, + }, + { + jobId: 260, + }, + { + jobId: 261, + }, + { + jobId: 262, + }, + { + jobId: 263, + }, + { + jobId: 264, + }, + { + jobId: 265, + }, + { + jobId: 266, + }, + { + jobId: 267, + }, + { + jobId: 268, + }, + { + jobId: 269, + }, + { + jobId: 270, + }, + { + jobId: 271, + }, + { + jobId: 272, + }, + { + jobId: 273, + }, + { + jobId: 274, + }, + { + jobId: 275, + }, + { + jobId: 276, + }, + { + jobId: 277, + }, + { + jobId: 278, + }, + { + jobId: 279, + }, + { + jobId: 280, + }, + { + jobId: 281, + }, + { + jobId: 282, + }, + { + jobId: 283, + }, + { + jobId: 284, + }, + { + jobId: 285, + }, + { + jobId: 286, + }, + { + jobId: 287, + }, + { + jobId: 288, + }, + { + jobId: 289, + }, + { + jobId: 290, + }, + { + jobId: 291, + }, + { + jobId: 292, + }, + { + jobId: 293, + }, + { + jobId: 294, + }, + { + jobId: 295, + }, + { + jobId: 296, + }, + { + jobId: 297, + }, + { + jobId: 298, + }, + { + jobId: 299, + }, + { + jobId: 300, + }, + { + jobId: 301, + }, + { + jobId: 302, + }, + { + jobId: 303, + }, + { + jobId: 304, + }, + { + jobId: 305, + }, + { + jobId: 306, + }, + { + jobId: 307, + }, + { + jobId: 308, + }, + { + jobId: 309, + }, + { + jobId: 310, + }, + { + jobId: 311, + }, + { + jobId: 312, + }, + { + jobId: 313, + }, + { + jobId: 314, + }, + { + jobId: 315, + }, + { + jobId: 316, + }, + { + jobId: 317, + }, + { + jobId: 318, + }, + { + jobId: 319, + }, + { + jobId: 320, + }, + { + jobId: 321, + }, + { + jobId: 322, + }, + { + jobId: 323, + }, + { + jobId: 324, + }, + { + jobId: 325, + }, + { + jobId: 326, + }, + { + jobId: 327, + }, + { + jobId: 328, + }, + { + jobId: 329, + }, + { + jobId: 330, + }, + { + jobId: 331, + }, + { + jobId: 332, + }, + { + jobId: 333, + }, + { + jobId: 334, + }, + { + jobId: 335, + }, + { + jobId: 336, + }, + { + jobId: 337, + }, + { + jobId: 338, + }, + { + jobId: 339, + }, + { + jobId: 340, + }, + { + jobId: 341, + }, + { + jobId: 342, + }, + { + jobId: 343, + }, + { + jobId: 344, + }, + { + jobId: 345, + }, + { + jobId: 346, + }, + { + jobId: 347, + }, + { + jobId: 348, + }, + { + jobId: 349, + }, + { + jobId: 350, + }, + ], + batched: true, + statusCode: 200, + destination: DEST_OBJECT, + }, +]; + +const mixedBatchOutput = [ + { + batchedRequest: [ + { + version: '1', + type: 'REST', + method: 'DELETE', + endpoint: + 'https://marketo_acct_id_success.mktorest.com/rest/v1/lists/1122/leads.json?id=911&id=912&id=913&id=914&id=915&id=916&id=917&id=918&id=919&id=920', + headers: { + Authorization: TOKEN, + 'Content-Type': CONTENT_TYPE, + }, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + ], + metadata: [ + { + jobId: 911, + }, + { + jobId: 912, + }, + { + jobId: 913, + }, + { + jobId: 914, + }, + { + jobId: 915, + }, + { + jobId: 916, + }, + { + jobId: 917, + }, + { + jobId: 918, + }, + { + jobId: 919, + }, + { + jobId: 920, + }, + ], + batched: true, + statusCode: 200, + destination: DEST_OBJECT, + }, + { + batchedRequest: [ + { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://marketo_acct_id_success.mktorest.com/rest/v1/lists/1122/leads.json?id=901&id=902&id=903&id=904&id=905&id=906&id=907&id=908&id=909&id=910', + headers: { + Authorization: TOKEN, + 'Content-Type': CONTENT_TYPE, + }, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + ], + metadata: [ + { + jobId: 901, + }, + { + jobId: 902, + }, + { + jobId: 903, + }, + { + jobId: 904, + }, + { + jobId: 905, + }, + { + jobId: 906, + }, + { + jobId: 907, + }, + { + jobId: 908, + }, + { + jobId: 909, + }, + { + jobId: 910, + }, + ], + batched: true, + statusCode: 200, + destination: DEST_OBJECT, + }, + { + batchedRequest: [ + { + version: '1', + type: 'REST', + method: 'DELETE', + endpoint: + 'https://marketo_acct_id_success.mktorest.com/rest/v1/lists/1234/leads.json?id=704&id=705&id=706', + headers: { + Authorization: TOKEN, + 'Content-Type': CONTENT_TYPE, + }, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://marketo_acct_id_success.mktorest.com/rest/v1/lists/1234/leads.json?id=501&id=502&id=503', + headers: { + Authorization: TOKEN, + 'Content-Type': CONTENT_TYPE, + }, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + ], + metadata: [ + { + jobId: 1, + }, + ], + batched: false, + statusCode: 200, + destination: { + ID: '1zia9wKshXt80YksLmUdJnr7IHI', + Name: 'test_marketo', + DestinationDefinition: DEST_DEFINITION, + Config: DEST_CONFIG, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + }, + { + batchedRequest: [ + { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://marketo_acct_id_success.mktorest.com/rest/v1/lists/1234/leads.json?id=0&id=1&id=2&id=3&id=4&id=5&id=6&id=7&id=8&id=9&id=10&id=11&id=12&id=13&id=14&id=15&id=16&id=17&id=18&id=19&id=20&id=21&id=22&id=23&id=24&id=25&id=26&id=27&id=28&id=29&id=30&id=31&id=32&id=33&id=34&id=35&id=36&id=37&id=38&id=39&id=40&id=41&id=42&id=43&id=44&id=45&id=46&id=47&id=48&id=49&id=50&id=51&id=52&id=53&id=54&id=55&id=56&id=57&id=58&id=59&id=60&id=61&id=62&id=63&id=64&id=65&id=66&id=67&id=68&id=69&id=70&id=71&id=72&id=73&id=74&id=75&id=76&id=77&id=78&id=79&id=80&id=81&id=82&id=83&id=84&id=85&id=86&id=87&id=88&id=89&id=90&id=91&id=92&id=93&id=94&id=95&id=96&id=97&id=98&id=99&id=100&id=101&id=102&id=103&id=104&id=105&id=106&id=107&id=108&id=109&id=110&id=111&id=112&id=113&id=114&id=115&id=116&id=117&id=118&id=119&id=120&id=121&id=122&id=123&id=124&id=125&id=126&id=127&id=128&id=129&id=130&id=131&id=132&id=133&id=134&id=135&id=136&id=137&id=138&id=139&id=140&id=141&id=142&id=143&id=144&id=145&id=146&id=147&id=148&id=149&id=150&id=151&id=152&id=153&id=154&id=155&id=156&id=157&id=158&id=159&id=160&id=161&id=162&id=163&id=164&id=165&id=166&id=167&id=168&id=169&id=170&id=171&id=172&id=173&id=174&id=175&id=176&id=177&id=178&id=179&id=180&id=181&id=182&id=183&id=184&id=185&id=186&id=187&id=188&id=189&id=190&id=191&id=192&id=193&id=194&id=195&id=196&id=197&id=198&id=199&id=200&id=201&id=202&id=203&id=204&id=205&id=206&id=207&id=208&id=209&id=210&id=211&id=212&id=213&id=214&id=215&id=216&id=217&id=218&id=219&id=220&id=221&id=222&id=223&id=224&id=225&id=226&id=227&id=228&id=229&id=230&id=231&id=232&id=233&id=234&id=235&id=236&id=237&id=238&id=239&id=240&id=241&id=242&id=243&id=244&id=245&id=246&id=247&id=248&id=249&id=250&id=251&id=252&id=253&id=254&id=255&id=256&id=257&id=258&id=259&id=260&id=261&id=262&id=263&id=264&id=265&id=266&id=267&id=268&id=269&id=270&id=271&id=272&id=273&id=274&id=275&id=276&id=277&id=278&id=279&id=280&id=281&id=282&id=283&id=284&id=285&id=286&id=287&id=288&id=289&id=290&id=291&id=292&id=293&id=294&id=295&id=296&id=297&id=298&id=299', + headers: { + Authorization: TOKEN, + 'Content-Type': CONTENT_TYPE, + }, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://marketo_acct_id_success.mktorest.com/rest/v1/lists/1234/leads.json?id=300&id=301&id=302&id=303&id=304&id=305&id=306&id=307&id=308&id=309&id=310&id=311&id=312&id=313&id=314&id=315&id=316&id=317&id=318&id=319&id=320&id=321&id=322&id=323&id=324&id=325&id=326&id=327&id=328&id=329&id=330&id=331&id=332&id=333&id=334&id=335&id=336&id=337&id=338&id=339&id=340&id=341&id=342&id=343&id=344&id=345&id=346&id=347&id=348&id=349&id=350', + headers: { + Authorization: TOKEN, + 'Content-Type': CONTENT_TYPE, + }, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + ], + metadata: [ + { + jobId: 2, + }, + ], + batched: false, + statusCode: 200, + destination: { + ID: '1zia9wKshXt80YksLmUdJnr7IHI', + Name: 'test_marketo', + DestinationDefinition: DEST_DEFINITION, + Config: DEST_CONFIG, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + }, +]; + +const recordEventGenerator = (id, action, externalId) => { + // this function is used to generate record events for testing + const testRecordEvent = { + destination: { + ID: '1zwa1wKshSt81YksKmUdJnr4IOK', + Name: 'test_marketo_rc', + DestinationDefinition: DEST_DEFINITION, + Config: { + clientId: 'marketo_client_id_success', + clientSecret: 'marketo_client_secret_success', + accountId: 'marketo_acct_id_success', + staticListId: 1122, + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + message: { + type: 'record', + action, + fields: { + id, + }, + channel: 'sources', + context: { + sources: MESSAGE_SOURCES_CONTEXT, + externalId: [ + { + type: EXTERNAL_ID, + id: externalId, + }, + ], + destinationFields: 'id', + mappedToDestination: 'true', + }, + recordId: '3', + }, + metadata: { + jobId: id, + }, + }; + return testRecordEvent; +}; + +module.exports = { + recordInputs, + audiencelistInputs, + reqMetadata, + recordOutput, + largeRecordOutput, + mixedBatchOutput, + recordEventGenerator, +}; diff --git a/src/v0/destinations/marketo_static_list/transform.js b/src/v0/destinations/marketo_static_list/transform.js index 856947c33c..cbdb89f532 100644 --- a/src/v0/destinations/marketo_static_list/transform.js +++ b/src/v0/destinations/marketo_static_list/transform.js @@ -5,6 +5,7 @@ const { defaultPostRequestConfig, defaultDeleteRequestConfig, generateErrorObject, + simpleProcessRouterDest, } = require('../../util'); const { AUTH_CACHE_TTL, JSON_MIME_TYPE } = require('../../util/constant'); const { getIds, validateMessageType } = require('./util'); @@ -12,11 +13,11 @@ const { getDestinationExternalID, defaultRequestConfig, getErrorRespEvents, - simpleProcessRouterDest, } = require('../../util'); const { formatConfig, MAX_LEAD_IDS_SIZE } = require('./config'); const Cache = require('../../util/cache'); const { getAuthToken } = require('../marketo/transform'); +const { processRecordInputs } = require('./transformV2'); const authCache = new Cache(AUTH_CACHE_TTL); // 1 hr @@ -57,8 +58,8 @@ const batchResponseBuilder = (message, Config, token, leadIds, operation) => { return response; }; -const processEvent = (input) => { - const { token, message, destination } = input; +const processEvent = (event) => { + const { token, message, destination } = event; const { Config } = destination; validateMessageType(message, ['audiencelist']); const response = []; @@ -70,77 +71,92 @@ const processEvent = (input) => { if (message.properties?.listData?.remove) { toRemove = getIds(message.properties.listData.remove); } - if ( - (Array.isArray(toAdd) && toAdd.length > 0) || - (Array.isArray(toRemove) && toRemove.length > 0) - ) { - if (Array.isArray(toAdd) && toAdd.length > 0) { - const payload = batchResponseBuilder(message, Config, token, toAdd, 'add'); - if (payload) { - response.push(...payload); - } + if (Array.isArray(toRemove) && toRemove.length > 0) { + const payload = batchResponseBuilder(message, Config, token, toRemove, 'remove'); + if (payload) { + response.push(...payload); } - if (Array.isArray(toRemove) && toRemove.length > 0) { - const payload = batchResponseBuilder(message, Config, token, toRemove, 'remove'); - if (payload) { - response.push(...payload); - } + } + if (Array.isArray(toAdd) && toAdd.length > 0) { + const payload = batchResponseBuilder(message, Config, token, toAdd, 'add'); + if (payload) { + response.push(...payload); } - } else { + } + if (response.length === 0) { throw new InstrumentationError( 'Invalid leadIds format or no leadIds found neither to add nor to remove', ); } return response; }; -const process = async (event) => { - const token = await getAuthToken(formatConfig(event.destination)); +// eslint-disable-next-line @typescript-eslint/no-unused-vars +const process = async (event, _processParams) => { + const token = await getAuthToken(formatConfig(event.destination)); if (!token) { throw new UnauthorizedError('Authorization failed'); } - const response = processEvent({ ...event, token }); + const updatedEvent = { ...event, token }; + const response = processEvent(updatedEvent); return response; }; const processRouterDest = async (inputs, reqMetadata) => { // Token needs to be generated for marketo which will be done on input level. // If destination information is not present Error should be thrown - let token; + + const { destination } = inputs[0]; try { - token = await getAuthToken(formatConfig(inputs[0].destination)); + const token = await getAuthToken(formatConfig(destination)); if (!token) { - const errResp = { - status: 400, - message: 'Authorisation failed', - responseTransformFailure: true, - statTags: {}, - }; - const respEvents = getErrorRespEvents( - inputs.map((input) => input.metadata), - errResp.status, - errResp.message, - errResp.statTags, - ); - return [{ ...respEvents, destination: inputs?.[0]?.destination }]; + throw new UnauthorizedError('Could not retrieve authorisation token'); } } catch (error) { - // Not using handleRtTfSingleEventError here as this is for multiple events - const errObj = generateErrorObject(error); - const respEvents = getErrorRespEvents( - inputs.map((input) => input.metadata), - errObj.status, - errObj.message, - errObj.statTags, + const errorObj = generateErrorObject(error); + const errResponses = inputs.map((input) => + getErrorRespEvents(input.metadata, errorObj.status, errorObj.message, errorObj.statTags), ); - return [{ ...respEvents, destination: inputs?.[0]?.destination }]; + + return errResponses; } - // Checking previous status Code. Initially setting to false. - // If true then previous status is 500 and every subsequent event output should be - // sent with status code 500 to the router to be retried. - const tokenisedInputs = inputs.map((input) => ({ ...input, token })); - const respList = await simpleProcessRouterDest(tokenisedInputs, processEvent, reqMetadata); + // use lodash.groupby to group the inputs based on message type + const transformedRecordEvent = []; + let transformedAudienceEvent = []; + const groupedInputs = lodash.groupBy(inputs, (input) => input.message.type); + + const respList = []; + // process record events + if (groupedInputs.record) { + const groupedRecordInputs = groupedInputs.record; + const { staticListId } = destination.Config; + const externalIdGroupedRecordInputs = lodash.groupBy( + groupedRecordInputs, + (input) => getDestinationExternalID(input.message, 'marketoStaticListId') || staticListId, + ); + const alltransformedGroupedRecordEvent = await Promise.all( + Object.keys(externalIdGroupedRecordInputs).map(async (key) => { + const transformedGroupedRecordEvent = await processRecordInputs( + externalIdGroupedRecordInputs[key], + destination, + key, + ); + return transformedGroupedRecordEvent; + }), + ); + + transformedRecordEvent.push(...alltransformedGroupedRecordEvent.flat()); + } + // process audiencelist events + if (groupedInputs.audiencelist) { + transformedAudienceEvent = await simpleProcessRouterDest( + groupedInputs.audiencelist, + process, + reqMetadata, + ); + } + respList.push(...transformedRecordEvent, ...transformedAudienceEvent); return respList; }; @@ -152,16 +168,20 @@ const processRouterDest = async (inputs, reqMetadata) => { function processMetadataForRouter(output) { const { metadata, destination } = output; const clonedMetadata = cloneDeep(metadata); - clonedMetadata.forEach((metadataElement) => { - // eslint-disable-next-line no-param-reassign - metadataElement.destInfo = { authKey: destination.ID }; - }); + if (Array.isArray(clonedMetadata)) { + clonedMetadata.forEach((metadataElement) => { + // eslint-disable-next-line no-param-reassign + metadataElement.destInfo = { authKey: destination?.ID }; + }); + } return clonedMetadata; } module.exports = { process, + processEvent, processRouterDest, processMetadataForRouter, authCache, + batchResponseBuilder, }; diff --git a/src/v0/destinations/marketo_static_list/transform.test.js b/src/v0/destinations/marketo_static_list/transform.test.js new file mode 100644 index 0000000000..3c387c4295 --- /dev/null +++ b/src/v0/destinations/marketo_static_list/transform.test.js @@ -0,0 +1,138 @@ +const { processRouterDest } = require('./transform'); +const axios = require('axios'); +const MockAxiosAdapter = require('axios-mock-adapter'); +const { + recordInputs, + audiencelistInputs, + reqMetadata, + recordOutput, + largeRecordOutput, + mixedBatchOutput, + recordEventGenerator, +} = require('./testData/testData'); + +const mockAdapter = new MockAxiosAdapter(axios, { onNoMatch: 'throwException' }); +beforeAll(() => { + mockAdapter + .onGet('https://marketo_acct_id_success.mktorest.com/identity/oauth/token') + .reply(200, { access_token: 'access_token_success' }); +}); +describe('Unit cases covering the router flow for both record and audiencelist event types', () => { + it('Sending a small batch of only record events (4 events)', async () => { + const inputs = recordInputs; + const result = await processRouterDest(inputs, reqMetadata); + + // assert that the result is as expected + expect(result.length).toEqual(3); + expect(result[0].batchedRequest.length).toEqual(1); // 1 batched request for 2 record events + expect(result[1].batchedRequest.length).toEqual(1); // 1 batched request for 1 record events + expect(result[2].batchedRequest.length).toEqual(1); // 1 batched request for 1 record events + expect(result[0].batchedRequest[0].endpoint).toEqual( + 'https://marketo_acct_id_success.mktorest.com/rest/v1/lists/id001/leads.json?id=1001&id=1003', + ); // 1 api call for 2 leadIds + expect(result[1].batchedRequest[0].endpoint).toEqual( + 'https://marketo_acct_id_success.mktorest.com/rest/v1/lists/id002/leads.json?id=2001', + ); // 1 api call for 1 leadId + expect(result[2].batchedRequest[0].endpoint).toEqual( + 'https://marketo_acct_id_success.mktorest.com/rest/v1/lists/id002/leads.json?id=1002', + ); // 1 api call for 1 leadId + expect(result[1].batchedRequest[0].method).toEqual('DELETE'); // DELETE requests are sent first + expect(result[0].metadata.length).toEqual(2); // 2 metadata objects for 2 record events + expect(result[1].metadata.length).toEqual(1); // 1 metadata object for 1 record event + expect(result[2].metadata.length).toEqual(1); // 1 metadata object for 1 record event + expect(result).toEqual(recordOutput); // overall result should be equal to the expected output + }); + + it('Sending a large batch of only record events (450 events: 350 inserts | 100 deletes )', async () => { + const largeRecordInputs = []; + for (let index = 0; index < 350; index++) { + largeRecordInputs.push(recordEventGenerator(index + 1, 'insert', 1122)); + } + for (let index = 350; index < 450; index++) { + largeRecordInputs.push(recordEventGenerator(index + 1, 'delete', 1122)); + } + const result = await processRouterDest(largeRecordInputs, reqMetadata); + + // assert that the result is as expected + /* + Total 3 API calls + 1. 1 API call for 100 DELETE requests + 2. 1 API call for 100 POST requests = limit reached for Marketo, leads split to next API call + 3. 1 API call for 50 POST requests + */ + expect(result.length).toEqual(2); + expect(result[0].batchedRequest.length).toEqual(1); // 1 batched request for 1 record event + expect(result[1].batchedRequest.length).toEqual(2); // 1 batched request for 2 record events + expect(result[0].batchedRequest[0].endpoint).toEqual( + 'https://marketo_acct_id_success.mktorest.com/rest/v1/lists/1122/leads.json?id=351&id=352&id=353&id=354&id=355&id=356&id=357&id=358&id=359&id=360&id=361&id=362&id=363&id=364&id=365&id=366&id=367&id=368&id=369&id=370&id=371&id=372&id=373&id=374&id=375&id=376&id=377&id=378&id=379&id=380&id=381&id=382&id=383&id=384&id=385&id=386&id=387&id=388&id=389&id=390&id=391&id=392&id=393&id=394&id=395&id=396&id=397&id=398&id=399&id=400&id=401&id=402&id=403&id=404&id=405&id=406&id=407&id=408&id=409&id=410&id=411&id=412&id=413&id=414&id=415&id=416&id=417&id=418&id=419&id=420&id=421&id=422&id=423&id=424&id=425&id=426&id=427&id=428&id=429&id=430&id=431&id=432&id=433&id=434&id=435&id=436&id=437&id=438&id=439&id=440&id=441&id=442&id=443&id=444&id=445&id=446&id=447&id=448&id=449&id=450', + ); + expect(result[1].batchedRequest[0].endpoint).toEqual( + 'https://marketo_acct_id_success.mktorest.com/rest/v1/lists/1122/leads.json?id=1&id=2&id=3&id=4&id=5&id=6&id=7&id=8&id=9&id=10&id=11&id=12&id=13&id=14&id=15&id=16&id=17&id=18&id=19&id=20&id=21&id=22&id=23&id=24&id=25&id=26&id=27&id=28&id=29&id=30&id=31&id=32&id=33&id=34&id=35&id=36&id=37&id=38&id=39&id=40&id=41&id=42&id=43&id=44&id=45&id=46&id=47&id=48&id=49&id=50&id=51&id=52&id=53&id=54&id=55&id=56&id=57&id=58&id=59&id=60&id=61&id=62&id=63&id=64&id=65&id=66&id=67&id=68&id=69&id=70&id=71&id=72&id=73&id=74&id=75&id=76&id=77&id=78&id=79&id=80&id=81&id=82&id=83&id=84&id=85&id=86&id=87&id=88&id=89&id=90&id=91&id=92&id=93&id=94&id=95&id=96&id=97&id=98&id=99&id=100&id=101&id=102&id=103&id=104&id=105&id=106&id=107&id=108&id=109&id=110&id=111&id=112&id=113&id=114&id=115&id=116&id=117&id=118&id=119&id=120&id=121&id=122&id=123&id=124&id=125&id=126&id=127&id=128&id=129&id=130&id=131&id=132&id=133&id=134&id=135&id=136&id=137&id=138&id=139&id=140&id=141&id=142&id=143&id=144&id=145&id=146&id=147&id=148&id=149&id=150&id=151&id=152&id=153&id=154&id=155&id=156&id=157&id=158&id=159&id=160&id=161&id=162&id=163&id=164&id=165&id=166&id=167&id=168&id=169&id=170&id=171&id=172&id=173&id=174&id=175&id=176&id=177&id=178&id=179&id=180&id=181&id=182&id=183&id=184&id=185&id=186&id=187&id=188&id=189&id=190&id=191&id=192&id=193&id=194&id=195&id=196&id=197&id=198&id=199&id=200&id=201&id=202&id=203&id=204&id=205&id=206&id=207&id=208&id=209&id=210&id=211&id=212&id=213&id=214&id=215&id=216&id=217&id=218&id=219&id=220&id=221&id=222&id=223&id=224&id=225&id=226&id=227&id=228&id=229&id=230&id=231&id=232&id=233&id=234&id=235&id=236&id=237&id=238&id=239&id=240&id=241&id=242&id=243&id=244&id=245&id=246&id=247&id=248&id=249&id=250&id=251&id=252&id=253&id=254&id=255&id=256&id=257&id=258&id=259&id=260&id=261&id=262&id=263&id=264&id=265&id=266&id=267&id=268&id=269&id=270&id=271&id=272&id=273&id=274&id=275&id=276&id=277&id=278&id=279&id=280&id=281&id=282&id=283&id=284&id=285&id=286&id=287&id=288&id=289&id=290&id=291&id=292&id=293&id=294&id=295&id=296&id=297&id=298&id=299&id=300', + ); + expect(result[1].batchedRequest[1].endpoint).toEqual( + 'https://marketo_acct_id_success.mktorest.com/rest/v1/lists/1122/leads.json?id=301&id=302&id=303&id=304&id=305&id=306&id=307&id=308&id=309&id=310&id=311&id=312&id=313&id=314&id=315&id=316&id=317&id=318&id=319&id=320&id=321&id=322&id=323&id=324&id=325&id=326&id=327&id=328&id=329&id=330&id=331&id=332&id=333&id=334&id=335&id=336&id=337&id=338&id=339&id=340&id=341&id=342&id=343&id=344&id=345&id=346&id=347&id=348&id=349&id=350', + ); + expect(result[0].batchedRequest[0].method).toEqual('DELETE'); // DELETE requests are sent first + expect(result[1].batchedRequest[0].method).toEqual('POST'); + expect(result[1].batchedRequest[1].method).toEqual('POST'); + expect(result[0].metadata.length).toEqual(100); // 100 metadata objects for 100 record events + expect(result[1].metadata.length).toEqual(350); // 350 metadata objects for 350 record events + expect(result).toEqual(largeRecordOutput); // overall result should be equal to the expected output + }); + + it('Sending a mixed batch of record and audiencelist events (22 events: 10 inserts | 10 deletes | 2 audiencelist (⌐■_■) )', async () => { + const mixedBatchInputs = []; + for (let index = 900; index < 910; index++) { + mixedBatchInputs.push(recordEventGenerator(index + 1, 'insert', 1122)); + } + for (let index = 910; index < 920; index++) { + mixedBatchInputs.push(recordEventGenerator(index + 1, 'delete', 1122)); + } + mixedBatchInputs.push(...audiencelistInputs); + const result = await processRouterDest(mixedBatchInputs, reqMetadata); + + // assert that the result is as expected + /* + Total 4 API calls + 1. 1 API call for 10 DELETE requests + 2. 1 API call for 10 POST requests = limit reached for Marketo, leads split to next API call + 3. 1 API call for 2 POST requests + 4. 1 API call for 2 POST requests + */ + expect(result.length).toEqual(4); + expect(result[0].batchedRequest.length).toEqual(1); // 1 batched request for 1 record event + expect(result[1].batchedRequest.length).toEqual(1); // 1 batched request for 1 record event + expect(result[2].batchedRequest.length).toEqual(2); // 1 batched request for 2 audiencelist events + expect(result[3].batchedRequest.length).toEqual(2); // 1 batched request for 2 audiencelist events + expect(result[0].batchedRequest[0].endpoint).toEqual( + 'https://marketo_acct_id_success.mktorest.com/rest/v1/lists/1122/leads.json?id=911&id=912&id=913&id=914&id=915&id=916&id=917&id=918&id=919&id=920', + ); + expect(result[1].batchedRequest[0].endpoint).toEqual( + 'https://marketo_acct_id_success.mktorest.com/rest/v1/lists/1122/leads.json?id=901&id=902&id=903&id=904&id=905&id=906&id=907&id=908&id=909&id=910', + ); + expect(result[2].batchedRequest[0].endpoint).toEqual( + 'https://marketo_acct_id_success.mktorest.com/rest/v1/lists/1234/leads.json?id=704&id=705&id=706', + ); + expect(result[2].batchedRequest[1].endpoint).toEqual( + 'https://marketo_acct_id_success.mktorest.com/rest/v1/lists/1234/leads.json?id=501&id=502&id=503', + ); + expect(result[3].batchedRequest[0].endpoint).toEqual( + 'https://marketo_acct_id_success.mktorest.com/rest/v1/lists/1234/leads.json?id=0&id=1&id=2&id=3&id=4&id=5&id=6&id=7&id=8&id=9&id=10&id=11&id=12&id=13&id=14&id=15&id=16&id=17&id=18&id=19&id=20&id=21&id=22&id=23&id=24&id=25&id=26&id=27&id=28&id=29&id=30&id=31&id=32&id=33&id=34&id=35&id=36&id=37&id=38&id=39&id=40&id=41&id=42&id=43&id=44&id=45&id=46&id=47&id=48&id=49&id=50&id=51&id=52&id=53&id=54&id=55&id=56&id=57&id=58&id=59&id=60&id=61&id=62&id=63&id=64&id=65&id=66&id=67&id=68&id=69&id=70&id=71&id=72&id=73&id=74&id=75&id=76&id=77&id=78&id=79&id=80&id=81&id=82&id=83&id=84&id=85&id=86&id=87&id=88&id=89&id=90&id=91&id=92&id=93&id=94&id=95&id=96&id=97&id=98&id=99&id=100&id=101&id=102&id=103&id=104&id=105&id=106&id=107&id=108&id=109&id=110&id=111&id=112&id=113&id=114&id=115&id=116&id=117&id=118&id=119&id=120&id=121&id=122&id=123&id=124&id=125&id=126&id=127&id=128&id=129&id=130&id=131&id=132&id=133&id=134&id=135&id=136&id=137&id=138&id=139&id=140&id=141&id=142&id=143&id=144&id=145&id=146&id=147&id=148&id=149&id=150&id=151&id=152&id=153&id=154&id=155&id=156&id=157&id=158&id=159&id=160&id=161&id=162&id=163&id=164&id=165&id=166&id=167&id=168&id=169&id=170&id=171&id=172&id=173&id=174&id=175&id=176&id=177&id=178&id=179&id=180&id=181&id=182&id=183&id=184&id=185&id=186&id=187&id=188&id=189&id=190&id=191&id=192&id=193&id=194&id=195&id=196&id=197&id=198&id=199&id=200&id=201&id=202&id=203&id=204&id=205&id=206&id=207&id=208&id=209&id=210&id=211&id=212&id=213&id=214&id=215&id=216&id=217&id=218&id=219&id=220&id=221&id=222&id=223&id=224&id=225&id=226&id=227&id=228&id=229&id=230&id=231&id=232&id=233&id=234&id=235&id=236&id=237&id=238&id=239&id=240&id=241&id=242&id=243&id=244&id=245&id=246&id=247&id=248&id=249&id=250&id=251&id=252&id=253&id=254&id=255&id=256&id=257&id=258&id=259&id=260&id=261&id=262&id=263&id=264&id=265&id=266&id=267&id=268&id=269&id=270&id=271&id=272&id=273&id=274&id=275&id=276&id=277&id=278&id=279&id=280&id=281&id=282&id=283&id=284&id=285&id=286&id=287&id=288&id=289&id=290&id=291&id=292&id=293&id=294&id=295&id=296&id=297&id=298&id=299', + ); + expect(result[2].batchedRequest[1].endpoint).toEqual( + 'https://marketo_acct_id_success.mktorest.com/rest/v1/lists/1234/leads.json?id=501&id=502&id=503', + ); + expect(result[0].batchedRequest[0].method).toEqual('DELETE'); // DELETE requests are sent first + expect(result[1].batchedRequest[0].method).toEqual('POST'); + expect(result[1].batchedRequest[0].method).toEqual('POST'); + expect(result[2].batchedRequest[0].method).toEqual('DELETE'); + expect(result[0].metadata.length).toEqual(10); + expect(result[1].metadata.length).toEqual(10); + expect(result[2].metadata.length).toEqual(1); + expect(result[3].metadata.length).toEqual(1); + expect(result).toEqual(mixedBatchOutput); // overall result should be equal to the expected output + }); +}); +afterAll(() => { + mockAdapter.restore(); +}); diff --git a/src/v0/destinations/marketo_static_list/transformV2.js b/src/v0/destinations/marketo_static_list/transformV2.js new file mode 100644 index 0000000000..912d548d09 --- /dev/null +++ b/src/v0/destinations/marketo_static_list/transformV2.js @@ -0,0 +1,143 @@ +const lodash = require('lodash'); +const { InstrumentationError, UnauthorizedError } = require('@rudderstack/integrations-lib'); +const { + defaultPostRequestConfig, + defaultDeleteRequestConfig, + defaultRequestConfig, + getSuccessRespEvents, + isDefinedAndNotNull, + generateErrorObject, + getErrorRespEvents, +} = require('../../util'); +const { JSON_MIME_TYPE } = require('../../util/constant'); +const { MAX_LEAD_IDS_SIZE } = require('./config'); +const { getAuthToken } = require('../marketo/transform'); +const { formatConfig } = require('../marketo/config'); + +/** + * Generates the final response structure to be sent to the destination + * @param {*} endPoint + * @param {*} leadIds + * @param {*} operation + * @param {*} token + * @returns batched response + */ +const responseBuilder = (endPoint, leadIds, operation, token) => { + let updatedEndpoint = endPoint; + if (leadIds.length > 0) { + leadIds.forEach((id) => { + updatedEndpoint = `${updatedEndpoint}id=${id}&`; + }); + } + updatedEndpoint = updatedEndpoint.slice(0, -1); + const response = defaultRequestConfig(); + response.endpoint = updatedEndpoint; + if (operation === 'insert') { + response.method = defaultPostRequestConfig.requestMethod; + } else { + response.method = defaultDeleteRequestConfig.requestMethod; + } + response.headers = { + Authorization: `Bearer ${token}`, + 'Content-Type': JSON_MIME_TYPE, + }; + return response; +}; + +/** + * The function is responsible for building the batched response for a given set of record inputs. + * @param {*} groupedRecordInputs + * @param {*} Config + * @param {*} token + * @param {*} leadIds + * @param {*} operation + * @returns an array of response objects, where each object represents a batched response for a chunk of lead IDs. + */ +const batchResponseBuilder = (listId, Config, token, leadIds, operation) => { + const { accountId } = Config; + const endpoint = `https://${accountId}.mktorest.com/rest/v1/lists/${listId}/leads.json?`; + const response = []; + const leadIdsChunks = lodash.chunk(leadIds, MAX_LEAD_IDS_SIZE); + leadIdsChunks.forEach((ids) => { + response.push(responseBuilder(endpoint, ids, operation, token)); + }); + return response; +}; + +/** + * A function that processes a list of grouped record inputs. + * It iterates through each input and groups the field IDs based on the action. + * @param {*} groupedRecordInputs + * @param {*} destination + * @param {*} listId + * @returns An array containing the batched responses for the insert and delete actions along with the metadata. + */ +async function processRecordInputs(groupedRecordInputs, destination, listId) { + const token = await getAuthToken(formatConfig(destination)); + if (!token) { + throw new UnauthorizedError('Authorization failed'); + } + const { Config } = destination; + + // iterate through each input and group field id based on action + const insertFields = []; + const deleteFields = []; + const successMetadataForInsert = []; + const successMetadataForDelete = []; + const errorMetadata = []; + + groupedRecordInputs.forEach((input) => { + const { fields, action } = input.message; + const fieldId = fields?.id; + if (action === 'insert' && isDefinedAndNotNull(fieldId)) { + insertFields.push(fieldId); + successMetadataForInsert.push(input.metadata); + } else if (action === 'delete' && isDefinedAndNotNull(fieldId)) { + deleteFields.push(fieldId); + successMetadataForDelete.push(input.metadata); + } else { + errorMetadata.push(input.metadata); + } + }); + const deletePayloads = batchResponseBuilder(listId, Config, token, deleteFields, 'delete'); + + const deleteResponse = getSuccessRespEvents( + deletePayloads, + successMetadataForDelete, + destination, + true, + ); + + const insertPayloads = batchResponseBuilder(listId, Config, token, insertFields, 'insert'); + + const insertResponse = getSuccessRespEvents( + insertPayloads, + successMetadataForInsert, + destination, + true, + ); + + const error = new InstrumentationError( + 'Invalid action type or no leadIds found neither to add nor to remove', + ); + const errorObj = generateErrorObject(error); + const errorResponseList = errorMetadata.map((metadata) => + getErrorRespEvents(metadata, errorObj.status, errorObj.message, errorObj.statTags), + ); + const finalResponse = []; + if (deleteResponse.batchedRequest.length > 0) { + finalResponse.push(deleteResponse); + } + if (insertResponse.batchedRequest.length > 0) { + finalResponse.push(insertResponse); + } + if (errorResponseList.length > 0) { + finalResponse.push(...errorResponseList); + } + return finalResponse; + // return [deleteResponse, insertResponse, ...errorResponseList]; +} + +module.exports = { + processRecordInputs, +}; diff --git a/src/v0/destinations/marketo_static_list/util.js b/src/v0/destinations/marketo_static_list/util.js index 3db6180d24..c6959cb256 100644 --- a/src/v0/destinations/marketo_static_list/util.js +++ b/src/v0/destinations/marketo_static_list/util.js @@ -1,3 +1,4 @@ +/* eslint-disable unicorn/consistent-destructuring */ const { InstrumentationError } = require('@rudderstack/integrations-lib'); /** diff --git a/test/__tests__/data/marketo_static_list.json b/test/__tests__/data/marketo_static_list.json deleted file mode 100644 index 701868cab0..0000000000 --- a/test/__tests__/data/marketo_static_list.json +++ /dev/null @@ -1,2542 +0,0 @@ -[ - { - "description": "adding and removing users and getting staticListId from externalId", - "input": { - "destination": { - "ID": "1zia9wKshXt80YksLmUdJnr7IHI", - "Name": "test_marketo", - "DestinationDefinition": { - "ID": "1iVQvTRMsPPyJzwol0ifH93QTQ6", - "Name": "MARKETO", - "DisplayName": "Marketo", - "transformAt": "processor", - "transformAtV1": "processor" - }, - "Config": { - "clientId": "marketo_client_id_success", - "clientSecret": "marketo_client_secret_success", - "accountId": "marketo_acct_id_success", - "staticListId": 3421 - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": true - }, - "message": { - "userId": "user 1", - "anonymousId": "anon-id-new", - "event": "event1", - "type": "audiencelist", - "properties": { - "listData": { - "add": [ - { - "id": 1 - }, - { - "id": 2 - }, - { - "id": 3 - } - ], - "remove": [ - { - "id": 4 - }, - { - "id": 5 - }, - { - "id": 6 - } - ] - }, - "enablePartialFailure": true - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - }, - "externalId": [ - { - "type": "marketoStaticListId", - "id": 1234 - } - ] - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - }, - "output": [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://marketo_acct_id_success.mktorest.com/rest/v1/lists/1234/leads.json?id=1&id=2&id=3", - "headers": { - "Authorization": "Bearer access_token_success", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "DELETE", - "endpoint": "https://marketo_acct_id_success.mktorest.com/rest/v1/lists/1234/leads.json?id=4&id=5&id=6", - "headers": { - "Authorization": "Bearer access_token_success", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ] - }, - { - "description": "adding more than max limit users", - "input": { - "destination": { - "ID": "1zia9wKshXt80YksLmUdJnr7IHI", - "Name": "test_marketo", - "DestinationDefinition": { - "ID": "1iVQvTRMsPPyJzwol0ifH93QTQ6", - "Name": "MARKETO", - "DisplayName": "Marketo", - "transformAt": "processor", - "transformAtV1": "processor" - }, - "Config": { - "clientId": "marketo_client_id_success", - "clientSecret": "marketo_client_secret_success", - "accountId": "marketo_acct_id_success", - "staticListId": 1234 - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": true - }, - "message": { - "userId": "user 1", - "anonymousId": "anon-id-new", - "event": "event1", - "type": "audiencelist", - "properties": { - "listData": { - "add": [ - { - "id": 0 - }, - { - "id": 1 - }, - { - "id": 2 - }, - { - "id": 3 - }, - { - "id": 4 - }, - { - "id": 5 - }, - { - "id": 6 - }, - { - "id": 7 - }, - { - "id": 8 - }, - { - "id": 9 - }, - { - "id": 10 - }, - { - "id": 11 - }, - { - "id": 12 - }, - { - "id": 13 - }, - { - "id": 14 - }, - { - "id": 15 - }, - { - "id": 16 - }, - { - "id": 17 - }, - { - "id": 18 - }, - { - "id": 19 - }, - { - "id": 20 - }, - { - "id": 21 - }, - { - "id": 22 - }, - { - "id": 23 - }, - { - "id": 24 - }, - { - "id": 25 - }, - { - "id": 26 - }, - { - "id": 27 - }, - { - "id": 28 - }, - { - "id": 29 - }, - { - "id": 30 - }, - { - "id": 31 - }, - { - "id": 32 - }, - { - "id": 33 - }, - { - "id": 34 - }, - { - "id": 35 - }, - { - "id": 36 - }, - { - "id": 37 - }, - { - "id": 38 - }, - { - "id": 39 - }, - { - "id": 40 - }, - { - "id": 41 - }, - { - "id": 42 - }, - { - "id": 43 - }, - { - "id": 44 - }, - { - "id": 45 - }, - { - "id": 46 - }, - { - "id": 47 - }, - { - "id": 48 - }, - { - "id": 49 - }, - { - "id": 50 - }, - { - "id": 51 - }, - { - "id": 52 - }, - { - "id": 53 - }, - { - "id": 54 - }, - { - "id": 55 - }, - { - "id": 56 - }, - { - "id": 57 - }, - { - "id": 58 - }, - { - "id": 59 - }, - { - "id": 60 - }, - { - "id": 61 - }, - { - "id": 62 - }, - { - "id": 63 - }, - { - "id": 64 - }, - { - "id": 65 - }, - { - "id": 66 - }, - { - "id": 67 - }, - { - "id": 68 - }, - { - "id": 69 - }, - { - "id": 70 - }, - { - "id": 71 - }, - { - "id": 72 - }, - { - "id": 73 - }, - { - "id": 74 - }, - { - "id": 75 - }, - { - "id": 76 - }, - { - "id": 77 - }, - { - "id": 78 - }, - { - "id": 79 - }, - { - "id": 80 - }, - { - "id": 81 - }, - { - "id": 82 - }, - { - "id": 83 - }, - { - "id": 84 - }, - { - "id": 85 - }, - { - "id": 86 - }, - { - "id": 87 - }, - { - "id": 88 - }, - { - "id": 89 - }, - { - "id": 90 - }, - { - "id": 91 - }, - { - "id": 92 - }, - { - "id": 93 - }, - { - "id": 94 - }, - { - "id": 95 - }, - { - "id": 96 - }, - { - "id": 97 - }, - { - "id": 98 - }, - { - "id": 99 - }, - { - "id": 100 - }, - { - "id": 101 - }, - { - "id": 102 - }, - { - "id": 103 - }, - { - "id": 104 - }, - { - "id": 105 - }, - { - "id": 106 - }, - { - "id": 107 - }, - { - "id": 108 - }, - { - "id": 109 - }, - { - "id": 110 - }, - { - "id": 111 - }, - { - "id": 112 - }, - { - "id": 113 - }, - { - "id": 114 - }, - { - "id": 115 - }, - { - "id": 116 - }, - { - "id": 117 - }, - { - "id": 118 - }, - { - "id": 119 - }, - { - "id": 120 - }, - { - "id": 121 - }, - { - "id": 122 - }, - { - "id": 123 - }, - { - "id": 124 - }, - { - "id": 125 - }, - { - "id": 126 - }, - { - "id": 127 - }, - { - "id": 128 - }, - { - "id": 129 - }, - { - "id": 130 - }, - { - "id": 131 - }, - { - "id": 132 - }, - { - "id": 133 - }, - { - "id": 134 - }, - { - "id": 135 - }, - { - "id": 136 - }, - { - "id": 137 - }, - { - "id": 138 - }, - { - "id": 139 - }, - { - "id": 140 - }, - { - "id": 141 - }, - { - "id": 142 - }, - { - "id": 143 - }, - { - "id": 144 - }, - { - "id": 145 - }, - { - "id": 146 - }, - { - "id": 147 - }, - { - "id": 148 - }, - { - "id": 149 - }, - { - "id": 150 - }, - { - "id": 151 - }, - { - "id": 152 - }, - { - "id": 153 - }, - { - "id": 154 - }, - { - "id": 155 - }, - { - "id": 156 - }, - { - "id": 157 - }, - { - "id": 158 - }, - { - "id": 159 - }, - { - "id": 160 - }, - { - "id": 161 - }, - { - "id": 162 - }, - { - "id": 163 - }, - { - "id": 164 - }, - { - "id": 165 - }, - { - "id": 166 - }, - { - "id": 167 - }, - { - "id": 168 - }, - { - "id": 169 - }, - { - "id": 170 - }, - { - "id": 171 - }, - { - "id": 172 - }, - { - "id": 173 - }, - { - "id": 174 - }, - { - "id": 175 - }, - { - "id": 176 - }, - { - "id": 177 - }, - { - "id": 178 - }, - { - "id": 179 - }, - { - "id": 180 - }, - { - "id": 181 - }, - { - "id": 182 - }, - { - "id": 183 - }, - { - "id": 184 - }, - { - "id": 185 - }, - { - "id": 186 - }, - { - "id": 187 - }, - { - "id": 188 - }, - { - "id": 189 - }, - { - "id": 190 - }, - { - "id": 191 - }, - { - "id": 192 - }, - { - "id": 193 - }, - { - "id": 194 - }, - { - "id": 195 - }, - { - "id": 196 - }, - { - "id": 197 - }, - { - "id": 198 - }, - { - "id": 199 - }, - { - "id": 200 - }, - { - "id": 201 - }, - { - "id": 202 - }, - { - "id": 203 - }, - { - "id": 204 - }, - { - "id": 205 - }, - { - "id": 206 - }, - { - "id": 207 - }, - { - "id": 208 - }, - { - "id": 209 - }, - { - "id": 210 - }, - { - "id": 211 - }, - { - "id": 212 - }, - { - "id": 213 - }, - { - "id": 214 - }, - { - "id": 215 - }, - { - "id": 216 - }, - { - "id": 217 - }, - { - "id": 218 - }, - { - "id": 219 - }, - { - "id": 220 - }, - { - "id": 221 - }, - { - "id": 222 - }, - { - "id": 223 - }, - { - "id": 224 - }, - { - "id": 225 - }, - { - "id": 226 - }, - { - "id": 227 - }, - { - "id": 228 - }, - { - "id": 229 - }, - { - "id": 230 - }, - { - "id": 231 - }, - { - "id": 232 - }, - { - "id": 233 - }, - { - "id": 234 - }, - { - "id": 235 - }, - { - "id": 236 - }, - { - "id": 237 - }, - { - "id": 238 - }, - { - "id": 239 - }, - { - "id": 240 - }, - { - "id": 241 - }, - { - "id": 242 - }, - { - "id": 243 - }, - { - "id": 244 - }, - { - "id": 245 - }, - { - "id": 246 - }, - { - "id": 247 - }, - { - "id": 248 - }, - { - "id": 249 - }, - { - "id": 250 - }, - { - "id": 251 - }, - { - "id": 252 - }, - { - "id": 253 - }, - { - "id": 254 - }, - { - "id": 255 - }, - { - "id": 256 - }, - { - "id": 257 - }, - { - "id": 258 - }, - { - "id": 259 - }, - { - "id": 260 - }, - { - "id": 261 - }, - { - "id": 262 - }, - { - "id": 263 - }, - { - "id": 264 - }, - { - "id": 265 - }, - { - "id": 266 - }, - { - "id": 267 - }, - { - "id": 268 - }, - { - "id": 269 - }, - { - "id": 270 - }, - { - "id": 271 - }, - { - "id": 272 - }, - { - "id": 273 - }, - { - "id": 274 - }, - { - "id": 275 - }, - { - "id": 276 - }, - { - "id": 277 - }, - { - "id": 278 - }, - { - "id": 279 - }, - { - "id": 280 - }, - { - "id": 281 - }, - { - "id": 282 - }, - { - "id": 283 - }, - { - "id": 284 - }, - { - "id": 285 - }, - { - "id": 286 - }, - { - "id": 287 - }, - { - "id": 288 - }, - { - "id": 289 - }, - { - "id": 290 - }, - { - "id": 291 - }, - { - "id": 292 - }, - { - "id": 293 - }, - { - "id": 294 - }, - { - "id": 295 - }, - { - "id": 296 - }, - { - "id": 297 - }, - { - "id": 298 - }, - { - "id": 299 - }, - { - "id": 300 - }, - { - "id": 301 - }, - { - "id": 302 - }, - { - "id": 303 - }, - { - "id": 304 - }, - { - "id": 305 - }, - { - "id": 306 - }, - { - "id": 307 - }, - { - "id": 308 - }, - { - "id": 309 - }, - { - "id": 310 - }, - { - "id": 311 - }, - { - "id": 312 - }, - { - "id": 313 - }, - { - "id": 314 - }, - { - "id": 315 - }, - { - "id": 316 - }, - { - "id": 317 - }, - { - "id": 318 - }, - { - "id": 319 - }, - { - "id": 320 - }, - { - "id": 321 - }, - { - "id": 322 - }, - { - "id": 323 - }, - { - "id": 324 - }, - { - "id": 325 - }, - { - "id": 326 - }, - { - "id": 327 - }, - { - "id": 328 - }, - { - "id": 329 - }, - { - "id": 330 - }, - { - "id": 331 - }, - { - "id": 332 - }, - { - "id": 333 - }, - { - "id": 334 - }, - { - "id": 335 - }, - { - "id": 336 - }, - { - "id": 337 - }, - { - "id": 338 - }, - { - "id": 339 - }, - { - "id": 340 - }, - { - "id": 341 - }, - { - "id": 342 - }, - { - "id": 343 - }, - { - "id": 344 - }, - { - "id": 345 - }, - { - "id": 346 - }, - { - "id": 347 - }, - { - "id": 348 - }, - { - "id": 349 - }, - { - "id": 350 - } - ] - }, - "enablePartialFailure": true - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - }, - "output": [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://marketo_acct_id_success.mktorest.com/rest/v1/lists/1234/leads.json?id=0&id=1&id=2&id=3&id=4&id=5&id=6&id=7&id=8&id=9&id=10&id=11&id=12&id=13&id=14&id=15&id=16&id=17&id=18&id=19&id=20&id=21&id=22&id=23&id=24&id=25&id=26&id=27&id=28&id=29&id=30&id=31&id=32&id=33&id=34&id=35&id=36&id=37&id=38&id=39&id=40&id=41&id=42&id=43&id=44&id=45&id=46&id=47&id=48&id=49&id=50&id=51&id=52&id=53&id=54&id=55&id=56&id=57&id=58&id=59&id=60&id=61&id=62&id=63&id=64&id=65&id=66&id=67&id=68&id=69&id=70&id=71&id=72&id=73&id=74&id=75&id=76&id=77&id=78&id=79&id=80&id=81&id=82&id=83&id=84&id=85&id=86&id=87&id=88&id=89&id=90&id=91&id=92&id=93&id=94&id=95&id=96&id=97&id=98&id=99&id=100&id=101&id=102&id=103&id=104&id=105&id=106&id=107&id=108&id=109&id=110&id=111&id=112&id=113&id=114&id=115&id=116&id=117&id=118&id=119&id=120&id=121&id=122&id=123&id=124&id=125&id=126&id=127&id=128&id=129&id=130&id=131&id=132&id=133&id=134&id=135&id=136&id=137&id=138&id=139&id=140&id=141&id=142&id=143&id=144&id=145&id=146&id=147&id=148&id=149&id=150&id=151&id=152&id=153&id=154&id=155&id=156&id=157&id=158&id=159&id=160&id=161&id=162&id=163&id=164&id=165&id=166&id=167&id=168&id=169&id=170&id=171&id=172&id=173&id=174&id=175&id=176&id=177&id=178&id=179&id=180&id=181&id=182&id=183&id=184&id=185&id=186&id=187&id=188&id=189&id=190&id=191&id=192&id=193&id=194&id=195&id=196&id=197&id=198&id=199&id=200&id=201&id=202&id=203&id=204&id=205&id=206&id=207&id=208&id=209&id=210&id=211&id=212&id=213&id=214&id=215&id=216&id=217&id=218&id=219&id=220&id=221&id=222&id=223&id=224&id=225&id=226&id=227&id=228&id=229&id=230&id=231&id=232&id=233&id=234&id=235&id=236&id=237&id=238&id=239&id=240&id=241&id=242&id=243&id=244&id=245&id=246&id=247&id=248&id=249&id=250&id=251&id=252&id=253&id=254&id=255&id=256&id=257&id=258&id=259&id=260&id=261&id=262&id=263&id=264&id=265&id=266&id=267&id=268&id=269&id=270&id=271&id=272&id=273&id=274&id=275&id=276&id=277&id=278&id=279&id=280&id=281&id=282&id=283&id=284&id=285&id=286&id=287&id=288&id=289&id=290&id=291&id=292&id=293&id=294&id=295&id=296&id=297&id=298&id=299", - "headers": { - "Authorization": "Bearer access_token_success", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://marketo_acct_id_success.mktorest.com/rest/v1/lists/1234/leads.json?id=300&id=301&id=302&id=303&id=304&id=305&id=306&id=307&id=308&id=309&id=310&id=311&id=312&id=313&id=314&id=315&id=316&id=317&id=318&id=319&id=320&id=321&id=322&id=323&id=324&id=325&id=326&id=327&id=328&id=329&id=330&id=331&id=332&id=333&id=334&id=335&id=336&id=337&id=338&id=339&id=340&id=341&id=342&id=343&id=344&id=345&id=346&id=347&id=348&id=349&id=350", - "headers": { - "Authorization": "Bearer access_token_success", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ] - }, - { - "description": "removing more than max limit users", - "input": { - "destination": { - "ID": "1zia9wKshXt80YksLmUdJnr7IHI", - "Name": "test_marketo", - "DestinationDefinition": { - "ID": "1iVQvTRMsPPyJzwol0ifH93QTQ6", - "Name": "MARKETO", - "DisplayName": "Marketo", - "transformAt": "processor", - "transformAtV1": "processor" - }, - "Config": { - "clientId": "marketo_client_id_success", - "clientSecret": "marketo_client_secret_success", - "accountId": "marketo_acct_id_success", - "staticListId": 1234 - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": true - }, - "message": { - "userId": "user 1", - "anonymousId": "anon-id-new", - "event": "event1", - "type": "audiencelist", - "properties": { - "listData": { - "remove": [ - { - "id": 0 - }, - { - "id": 1 - }, - { - "id": 2 - }, - { - "id": 3 - }, - { - "id": 4 - }, - { - "id": 5 - }, - { - "id": 6 - }, - { - "id": 7 - }, - { - "id": 8 - }, - { - "id": 9 - }, - { - "id": 10 - }, - { - "id": 11 - }, - { - "id": 12 - }, - { - "id": 13 - }, - { - "id": 14 - }, - { - "id": 15 - }, - { - "id": 16 - }, - { - "id": 17 - }, - { - "id": 18 - }, - { - "id": 19 - }, - { - "id": 20 - }, - { - "id": 21 - }, - { - "id": 22 - }, - { - "id": 23 - }, - { - "id": 24 - }, - { - "id": 25 - }, - { - "id": 26 - }, - { - "id": 27 - }, - { - "id": 28 - }, - { - "id": 29 - }, - { - "id": 30 - }, - { - "id": 31 - }, - { - "id": 32 - }, - { - "id": 33 - }, - { - "id": 34 - }, - { - "id": 35 - }, - { - "id": 36 - }, - { - "id": 37 - }, - { - "id": 38 - }, - { - "id": 39 - }, - { - "id": 40 - }, - { - "id": 41 - }, - { - "id": 42 - }, - { - "id": 43 - }, - { - "id": 44 - }, - { - "id": 45 - }, - { - "id": 46 - }, - { - "id": 47 - }, - { - "id": 48 - }, - { - "id": 49 - }, - { - "id": 50 - }, - { - "id": 51 - }, - { - "id": 52 - }, - { - "id": 53 - }, - { - "id": 54 - }, - { - "id": 55 - }, - { - "id": 56 - }, - { - "id": 57 - }, - { - "id": 58 - }, - { - "id": 59 - }, - { - "id": 60 - }, - { - "id": 61 - }, - { - "id": 62 - }, - { - "id": 63 - }, - { - "id": 64 - }, - { - "id": 65 - }, - { - "id": 66 - }, - { - "id": 67 - }, - { - "id": 68 - }, - { - "id": 69 - }, - { - "id": 70 - }, - { - "id": 71 - }, - { - "id": 72 - }, - { - "id": 73 - }, - { - "id": 74 - }, - { - "id": 75 - }, - { - "id": 76 - }, - { - "id": 77 - }, - { - "id": 78 - }, - { - "id": 79 - }, - { - "id": 80 - }, - { - "id": 81 - }, - { - "id": 82 - }, - { - "id": 83 - }, - { - "id": 84 - }, - { - "id": 85 - }, - { - "id": 86 - }, - { - "id": 87 - }, - { - "id": 88 - }, - { - "id": 89 - }, - { - "id": 90 - }, - { - "id": 91 - }, - { - "id": 92 - }, - { - "id": 93 - }, - { - "id": 94 - }, - { - "id": 95 - }, - { - "id": 96 - }, - { - "id": 97 - }, - { - "id": 98 - }, - { - "id": 99 - }, - { - "id": 100 - }, - { - "id": 101 - }, - { - "id": 102 - }, - { - "id": 103 - }, - { - "id": 104 - }, - { - "id": 105 - }, - { - "id": 106 - }, - { - "id": 107 - }, - { - "id": 108 - }, - { - "id": 109 - }, - { - "id": 110 - }, - { - "id": 111 - }, - { - "id": 112 - }, - { - "id": 113 - }, - { - "id": 114 - }, - { - "id": 115 - }, - { - "id": 116 - }, - { - "id": 117 - }, - { - "id": 118 - }, - { - "id": 119 - }, - { - "id": 120 - }, - { - "id": 121 - }, - { - "id": 122 - }, - { - "id": 123 - }, - { - "id": 124 - }, - { - "id": 125 - }, - { - "id": 126 - }, - { - "id": 127 - }, - { - "id": 128 - }, - { - "id": 129 - }, - { - "id": 130 - }, - { - "id": 131 - }, - { - "id": 132 - }, - { - "id": 133 - }, - { - "id": 134 - }, - { - "id": 135 - }, - { - "id": 136 - }, - { - "id": 137 - }, - { - "id": 138 - }, - { - "id": 139 - }, - { - "id": 140 - }, - { - "id": 141 - }, - { - "id": 142 - }, - { - "id": 143 - }, - { - "id": 144 - }, - { - "id": 145 - }, - { - "id": 146 - }, - { - "id": 147 - }, - { - "id": 148 - }, - { - "id": 149 - }, - { - "id": 150 - }, - { - "id": 151 - }, - { - "id": 152 - }, - { - "id": 153 - }, - { - "id": 154 - }, - { - "id": 155 - }, - { - "id": 156 - }, - { - "id": 157 - }, - { - "id": 158 - }, - { - "id": 159 - }, - { - "id": 160 - }, - { - "id": 161 - }, - { - "id": 162 - }, - { - "id": 163 - }, - { - "id": 164 - }, - { - "id": 165 - }, - { - "id": 166 - }, - { - "id": 167 - }, - { - "id": 168 - }, - { - "id": 169 - }, - { - "id": 170 - }, - { - "id": 171 - }, - { - "id": 172 - }, - { - "id": 173 - }, - { - "id": 174 - }, - { - "id": 175 - }, - { - "id": 176 - }, - { - "id": 177 - }, - { - "id": 178 - }, - { - "id": 179 - }, - { - "id": 180 - }, - { - "id": 181 - }, - { - "id": 182 - }, - { - "id": 183 - }, - { - "id": 184 - }, - { - "id": 185 - }, - { - "id": 186 - }, - { - "id": 187 - }, - { - "id": 188 - }, - { - "id": 189 - }, - { - "id": 190 - }, - { - "id": 191 - }, - { - "id": 192 - }, - { - "id": 193 - }, - { - "id": 194 - }, - { - "id": 195 - }, - { - "id": 196 - }, - { - "id": 197 - }, - { - "id": 198 - }, - { - "id": 199 - }, - { - "id": 200 - }, - { - "id": 201 - }, - { - "id": 202 - }, - { - "id": 203 - }, - { - "id": 204 - }, - { - "id": 205 - }, - { - "id": 206 - }, - { - "id": 207 - }, - { - "id": 208 - }, - { - "id": 209 - }, - { - "id": 210 - }, - { - "id": 211 - }, - { - "id": 212 - }, - { - "id": 213 - }, - { - "id": 214 - }, - { - "id": 215 - }, - { - "id": 216 - }, - { - "id": 217 - }, - { - "id": 218 - }, - { - "id": 219 - }, - { - "id": 220 - }, - { - "id": 221 - }, - { - "id": 222 - }, - { - "id": 223 - }, - { - "id": 224 - }, - { - "id": 225 - }, - { - "id": 226 - }, - { - "id": 227 - }, - { - "id": 228 - }, - { - "id": 229 - }, - { - "id": 230 - }, - { - "id": 231 - }, - { - "id": 232 - }, - { - "id": 233 - }, - { - "id": 234 - }, - { - "id": 235 - }, - { - "id": 236 - }, - { - "id": 237 - }, - { - "id": 238 - }, - { - "id": 239 - }, - { - "id": 240 - }, - { - "id": 241 - }, - { - "id": 242 - }, - { - "id": 243 - }, - { - "id": 244 - }, - { - "id": 245 - }, - { - "id": 246 - }, - { - "id": 247 - }, - { - "id": 248 - }, - { - "id": 249 - }, - { - "id": 250 - }, - { - "id": 251 - }, - { - "id": 252 - }, - { - "id": 253 - }, - { - "id": 254 - }, - { - "id": 255 - }, - { - "id": 256 - }, - { - "id": 257 - }, - { - "id": 258 - }, - { - "id": 259 - }, - { - "id": 260 - }, - { - "id": 261 - }, - { - "id": 262 - }, - { - "id": 263 - }, - { - "id": 264 - }, - { - "id": 265 - }, - { - "id": 266 - }, - { - "id": 267 - }, - { - "id": 268 - }, - { - "id": 269 - }, - { - "id": 270 - }, - { - "id": 271 - }, - { - "id": 272 - }, - { - "id": 273 - }, - { - "id": 274 - }, - { - "id": 275 - }, - { - "id": 276 - }, - { - "id": 277 - }, - { - "id": 278 - }, - { - "id": 279 - }, - { - "id": 280 - }, - { - "id": 281 - }, - { - "id": 282 - }, - { - "id": 283 - }, - { - "id": 284 - }, - { - "id": 285 - }, - { - "id": 286 - }, - { - "id": 287 - }, - { - "id": 288 - }, - { - "id": 289 - }, - { - "id": 290 - }, - { - "id": 291 - }, - { - "id": 292 - }, - { - "id": 293 - }, - { - "id": 294 - }, - { - "id": 295 - }, - { - "id": 296 - }, - { - "id": 297 - }, - { - "id": 298 - }, - { - "id": 299 - }, - { - "id": 300 - }, - { - "id": 301 - }, - { - "id": 302 - }, - { - "id": 303 - }, - { - "id": 304 - }, - { - "id": 305 - }, - { - "id": 306 - }, - { - "id": 307 - }, - { - "id": 308 - }, - { - "id": 309 - }, - { - "id": 310 - }, - { - "id": 311 - }, - { - "id": 312 - }, - { - "id": 313 - }, - { - "id": 314 - }, - { - "id": 315 - }, - { - "id": 316 - }, - { - "id": 317 - }, - { - "id": 318 - }, - { - "id": 319 - }, - { - "id": 320 - }, - { - "id": 321 - }, - { - "id": 322 - }, - { - "id": 323 - }, - { - "id": 324 - }, - { - "id": 325 - }, - { - "id": 326 - }, - { - "id": 327 - }, - { - "id": 328 - }, - { - "id": 329 - }, - { - "id": 330 - }, - { - "id": 331 - }, - { - "id": 332 - }, - { - "id": 333 - }, - { - "id": 334 - }, - { - "id": 335 - }, - { - "id": 336 - }, - { - "id": 337 - }, - { - "id": 338 - }, - { - "id": 339 - }, - { - "id": 340 - }, - { - "id": 341 - }, - { - "id": 342 - }, - { - "id": 343 - }, - { - "id": 344 - }, - { - "id": 345 - }, - { - "id": 346 - }, - { - "id": 347 - }, - { - "id": 348 - }, - { - "id": 349 - }, - { - "id": 350 - } - ] - }, - "enablePartialFailure": true - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - }, - "output": [ - { - "version": "1", - "type": "REST", - "method": "DELETE", - "endpoint": "https://marketo_acct_id_success.mktorest.com/rest/v1/lists/1234/leads.json?id=0&id=1&id=2&id=3&id=4&id=5&id=6&id=7&id=8&id=9&id=10&id=11&id=12&id=13&id=14&id=15&id=16&id=17&id=18&id=19&id=20&id=21&id=22&id=23&id=24&id=25&id=26&id=27&id=28&id=29&id=30&id=31&id=32&id=33&id=34&id=35&id=36&id=37&id=38&id=39&id=40&id=41&id=42&id=43&id=44&id=45&id=46&id=47&id=48&id=49&id=50&id=51&id=52&id=53&id=54&id=55&id=56&id=57&id=58&id=59&id=60&id=61&id=62&id=63&id=64&id=65&id=66&id=67&id=68&id=69&id=70&id=71&id=72&id=73&id=74&id=75&id=76&id=77&id=78&id=79&id=80&id=81&id=82&id=83&id=84&id=85&id=86&id=87&id=88&id=89&id=90&id=91&id=92&id=93&id=94&id=95&id=96&id=97&id=98&id=99&id=100&id=101&id=102&id=103&id=104&id=105&id=106&id=107&id=108&id=109&id=110&id=111&id=112&id=113&id=114&id=115&id=116&id=117&id=118&id=119&id=120&id=121&id=122&id=123&id=124&id=125&id=126&id=127&id=128&id=129&id=130&id=131&id=132&id=133&id=134&id=135&id=136&id=137&id=138&id=139&id=140&id=141&id=142&id=143&id=144&id=145&id=146&id=147&id=148&id=149&id=150&id=151&id=152&id=153&id=154&id=155&id=156&id=157&id=158&id=159&id=160&id=161&id=162&id=163&id=164&id=165&id=166&id=167&id=168&id=169&id=170&id=171&id=172&id=173&id=174&id=175&id=176&id=177&id=178&id=179&id=180&id=181&id=182&id=183&id=184&id=185&id=186&id=187&id=188&id=189&id=190&id=191&id=192&id=193&id=194&id=195&id=196&id=197&id=198&id=199&id=200&id=201&id=202&id=203&id=204&id=205&id=206&id=207&id=208&id=209&id=210&id=211&id=212&id=213&id=214&id=215&id=216&id=217&id=218&id=219&id=220&id=221&id=222&id=223&id=224&id=225&id=226&id=227&id=228&id=229&id=230&id=231&id=232&id=233&id=234&id=235&id=236&id=237&id=238&id=239&id=240&id=241&id=242&id=243&id=244&id=245&id=246&id=247&id=248&id=249&id=250&id=251&id=252&id=253&id=254&id=255&id=256&id=257&id=258&id=259&id=260&id=261&id=262&id=263&id=264&id=265&id=266&id=267&id=268&id=269&id=270&id=271&id=272&id=273&id=274&id=275&id=276&id=277&id=278&id=279&id=280&id=281&id=282&id=283&id=284&id=285&id=286&id=287&id=288&id=289&id=290&id=291&id=292&id=293&id=294&id=295&id=296&id=297&id=298&id=299", - "headers": { - "Authorization": "Bearer access_token_success", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "DELETE", - "endpoint": "https://marketo_acct_id_success.mktorest.com/rest/v1/lists/1234/leads.json?id=300&id=301&id=302&id=303&id=304&id=305&id=306&id=307&id=308&id=309&id=310&id=311&id=312&id=313&id=314&id=315&id=316&id=317&id=318&id=319&id=320&id=321&id=322&id=323&id=324&id=325&id=326&id=327&id=328&id=329&id=330&id=331&id=332&id=333&id=334&id=335&id=336&id=337&id=338&id=339&id=340&id=341&id=342&id=343&id=344&id=345&id=346&id=347&id=348&id=349&id=350", - "headers": { - "Authorization": "Bearer access_token_success", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ] - }, - { - "description": "unsupported message Type", - "input": { - "destination": { - "ID": "1zia9wKshXt80YksLmUdJnr7IHI", - "Name": "test_marketo", - "DestinationDefinition": { - "ID": "1iVQvTRMsPPyJzwol0ifH93QTQ6", - "Name": "MARKETO", - "DisplayName": "Marketo", - "transformAt": "processor", - "transformAtV1": "processor" - }, - "Config": { - "clientId": "marketo_client_id_success", - "clientSecret": "marketo_client_secret_success", - "accountId": "marketo_acct_id_success", - "staticListId": 1234 - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": true - }, - "message": { - "userId": "user 1", - "anonymousId": "anon-id-new", - "event": "event1", - "type": "track", - "properties": { - "listData": { - "remove": [1] - }, - "enablePartialFailure": true - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - }, - "output": { - "error": "Event type track is not supported" - } - }, - { - "description": "Invalid leadIds format ", - "input": { - "destination": { - "ID": "1zia9wKshXt80YksLmUdJnr7IHI", - "Name": "test_marketo", - "DestinationDefinition": { - "ID": "1iVQvTRMsPPyJzwol0ifH93QTQ6", - "Name": "MARKETO", - "DisplayName": "Marketo", - "transformAt": "processor", - "transformAtV1": "processor" - }, - "Config": { - "clientId": "marketo_client_id_success", - "clientSecret": "marketo_client_secret_success", - "accountId": "marketo_acct_id_success", - "staticListId": 1234 - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": true - }, - "message": { - "userId": "user 1", - "anonymousId": "anon-id-new", - "event": "event1", - "type": "audiencelist", - "properties": { - "listData": { - "remove": 1 - }, - "enablePartialFailure": true - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - }, - "output": { - "error": "Invalid leadIds format or no leadIds found neither to add nor to remove" - } - }, - { - "description": "Only adding with remove not an array", - "input": { - "destination": { - "ID": "1zia9wKshXt80YksLmUdJnr7IHI", - "Name": "test_marketo", - "DestinationDefinition": { - "ID": "1iVQvTRMsPPyJzwol0ifH93QTQ6", - "Name": "MARKETO", - "DisplayName": "Marketo", - "transformAt": "processor", - "transformAtV1": "processor" - }, - "Config": { - "clientId": "marketo_client_id_success", - "clientSecret": "marketo_client_secret_success", - "accountId": "marketo_acct_id_success", - "staticListId": 1234 - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": true - }, - "message": { - "userId": "user 1", - "anonymousId": "anon-id-new", - "event": "event1", - "type": "audiencelist", - "properties": { - "listData": { - "add": [{ "id": 1 }], - "remove": 2 - }, - "enablePartialFailure": true - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - }, - "output": [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://marketo_acct_id_success.mktorest.com/rest/v1/lists/1234/leads.json?id=1", - "headers": { - "Authorization": "Bearer access_token_success", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ] - } -] diff --git a/test/__tests__/data/marketo_static_list_router_input.json b/test/__tests__/data/marketo_static_list_router_input.json deleted file mode 100644 index ed3a7591e6..0000000000 --- a/test/__tests__/data/marketo_static_list_router_input.json +++ /dev/null @@ -1,1209 +0,0 @@ -[ - { - "destination": { - "ID": "1zia9wKshXt80YksLmUdJnr7IHI", - "Name": "test_marketo", - "DestinationDefinition": { - "ID": "1iVQvTRMsPPyJzwol0ifH93QTQ6", - "Name": "MARKETO", - "DisplayName": "Marketo", - "transformAt": "processor", - "transformAtV1": "processor" - }, - "Config": { - "clientId": "marketo_client_id_success", - "clientSecret": "marketo_client_secret_success", - "accountId": "marketo_acct_id_success", - "staticListId": 1234 - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": true - }, - "message": { - "userId": "user 1", - "anonymousId": "anon-id-new", - "event": "event1", - "type": "audiencelist", - "properties": { - "listData": { - "add": [ - { - "id": 1 - }, - { - "id": 2 - }, - { - "id": 3 - } - ], - "remove": [ - { - "id": 4 - }, - { - "id": 5 - }, - { - "id": 6 - } - ] - }, - "enablePartialFailure": true - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - }, - "metadata": { - "jobId": 1 - } - }, - { - "destination": { - "ID": "1zia9wKshXt80YksLmUdJnr7IHI", - "Name": "test_marketo", - "DestinationDefinition": { - "ID": "1iVQvTRMsPPyJzwol0ifH93QTQ6", - "Name": "MARKETO", - "DisplayName": "Marketo", - "transformAt": "processor", - "transformAtV1": "processor" - }, - "Config": { - "clientId": "marketo_client_id_success", - "clientSecret": "marketo_client_secret_success", - "accountId": "marketo_acct_id_success", - "staticListId": 1234 - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": true - }, - "message": { - "userId": "user 1", - "anonymousId": "anon-id-new", - "event": "event1", - "type": "audiencelist", - "properties": { - "listData": { - "add": [ - { - "id": 0 - }, - { - "id": 1 - }, - { - "id": 2 - }, - { - "id": 3 - }, - { - "id": 4 - }, - { - "id": 5 - }, - { - "id": 6 - }, - { - "id": 7 - }, - { - "id": 8 - }, - { - "id": 9 - }, - { - "id": 10 - }, - { - "id": 11 - }, - { - "id": 12 - }, - { - "id": 13 - }, - { - "id": 14 - }, - { - "id": 15 - }, - { - "id": 16 - }, - { - "id": 17 - }, - { - "id": 18 - }, - { - "id": 19 - }, - { - "id": 20 - }, - { - "id": 21 - }, - { - "id": 22 - }, - { - "id": 23 - }, - { - "id": 24 - }, - { - "id": 25 - }, - { - "id": 26 - }, - { - "id": 27 - }, - { - "id": 28 - }, - { - "id": 29 - }, - { - "id": 30 - }, - { - "id": 31 - }, - { - "id": 32 - }, - { - "id": 33 - }, - { - "id": 34 - }, - { - "id": 35 - }, - { - "id": 36 - }, - { - "id": 37 - }, - { - "id": 38 - }, - { - "id": 39 - }, - { - "id": 40 - }, - { - "id": 41 - }, - { - "id": 42 - }, - { - "id": 43 - }, - { - "id": 44 - }, - { - "id": 45 - }, - { - "id": 46 - }, - { - "id": 47 - }, - { - "id": 48 - }, - { - "id": 49 - }, - { - "id": 50 - }, - { - "id": 51 - }, - { - "id": 52 - }, - { - "id": 53 - }, - { - "id": 54 - }, - { - "id": 55 - }, - { - "id": 56 - }, - { - "id": 57 - }, - { - "id": 58 - }, - { - "id": 59 - }, - { - "id": 60 - }, - { - "id": 61 - }, - { - "id": 62 - }, - { - "id": 63 - }, - { - "id": 64 - }, - { - "id": 65 - }, - { - "id": 66 - }, - { - "id": 67 - }, - { - "id": 68 - }, - { - "id": 69 - }, - { - "id": 70 - }, - { - "id": 71 - }, - { - "id": 72 - }, - { - "id": 73 - }, - { - "id": 74 - }, - { - "id": 75 - }, - { - "id": 76 - }, - { - "id": 77 - }, - { - "id": 78 - }, - { - "id": 79 - }, - { - "id": 80 - }, - { - "id": 81 - }, - { - "id": 82 - }, - { - "id": 83 - }, - { - "id": 84 - }, - { - "id": 85 - }, - { - "id": 86 - }, - { - "id": 87 - }, - { - "id": 88 - }, - { - "id": 89 - }, - { - "id": 90 - }, - { - "id": 91 - }, - { - "id": 92 - }, - { - "id": 93 - }, - { - "id": 94 - }, - { - "id": 95 - }, - { - "id": 96 - }, - { - "id": 97 - }, - { - "id": 98 - }, - { - "id": 99 - }, - { - "id": 100 - }, - { - "id": 101 - }, - { - "id": 102 - }, - { - "id": 103 - }, - { - "id": 104 - }, - { - "id": 105 - }, - { - "id": 106 - }, - { - "id": 107 - }, - { - "id": 108 - }, - { - "id": 109 - }, - { - "id": 110 - }, - { - "id": 111 - }, - { - "id": 112 - }, - { - "id": 113 - }, - { - "id": 114 - }, - { - "id": 115 - }, - { - "id": 116 - }, - { - "id": 117 - }, - { - "id": 118 - }, - { - "id": 119 - }, - { - "id": 120 - }, - { - "id": 121 - }, - { - "id": 122 - }, - { - "id": 123 - }, - { - "id": 124 - }, - { - "id": 125 - }, - { - "id": 126 - }, - { - "id": 127 - }, - { - "id": 128 - }, - { - "id": 129 - }, - { - "id": 130 - }, - { - "id": 131 - }, - { - "id": 132 - }, - { - "id": 133 - }, - { - "id": 134 - }, - { - "id": 135 - }, - { - "id": 136 - }, - { - "id": 137 - }, - { - "id": 138 - }, - { - "id": 139 - }, - { - "id": 140 - }, - { - "id": 141 - }, - { - "id": 142 - }, - { - "id": 143 - }, - { - "id": 144 - }, - { - "id": 145 - }, - { - "id": 146 - }, - { - "id": 147 - }, - { - "id": 148 - }, - { - "id": 149 - }, - { - "id": 150 - }, - { - "id": 151 - }, - { - "id": 152 - }, - { - "id": 153 - }, - { - "id": 154 - }, - { - "id": 155 - }, - { - "id": 156 - }, - { - "id": 157 - }, - { - "id": 158 - }, - { - "id": 159 - }, - { - "id": 160 - }, - { - "id": 161 - }, - { - "id": 162 - }, - { - "id": 163 - }, - { - "id": 164 - }, - { - "id": 165 - }, - { - "id": 166 - }, - { - "id": 167 - }, - { - "id": 168 - }, - { - "id": 169 - }, - { - "id": 170 - }, - { - "id": 171 - }, - { - "id": 172 - }, - { - "id": 173 - }, - { - "id": 174 - }, - { - "id": 175 - }, - { - "id": 176 - }, - { - "id": 177 - }, - { - "id": 178 - }, - { - "id": 179 - }, - { - "id": 180 - }, - { - "id": 181 - }, - { - "id": 182 - }, - { - "id": 183 - }, - { - "id": 184 - }, - { - "id": 185 - }, - { - "id": 186 - }, - { - "id": 187 - }, - { - "id": 188 - }, - { - "id": 189 - }, - { - "id": 190 - }, - { - "id": 191 - }, - { - "id": 192 - }, - { - "id": 193 - }, - { - "id": 194 - }, - { - "id": 195 - }, - { - "id": 196 - }, - { - "id": 197 - }, - { - "id": 198 - }, - { - "id": 199 - }, - { - "id": 200 - }, - { - "id": 201 - }, - { - "id": 202 - }, - { - "id": 203 - }, - { - "id": 204 - }, - { - "id": 205 - }, - { - "id": 206 - }, - { - "id": 207 - }, - { - "id": 208 - }, - { - "id": 209 - }, - { - "id": 210 - }, - { - "id": 211 - }, - { - "id": 212 - }, - { - "id": 213 - }, - { - "id": 214 - }, - { - "id": 215 - }, - { - "id": 216 - }, - { - "id": 217 - }, - { - "id": 218 - }, - { - "id": 219 - }, - { - "id": 220 - }, - { - "id": 221 - }, - { - "id": 222 - }, - { - "id": 223 - }, - { - "id": 224 - }, - { - "id": 225 - }, - { - "id": 226 - }, - { - "id": 227 - }, - { - "id": 228 - }, - { - "id": 229 - }, - { - "id": 230 - }, - { - "id": 231 - }, - { - "id": 232 - }, - { - "id": 233 - }, - { - "id": 234 - }, - { - "id": 235 - }, - { - "id": 236 - }, - { - "id": 237 - }, - { - "id": 238 - }, - { - "id": 239 - }, - { - "id": 240 - }, - { - "id": 241 - }, - { - "id": 242 - }, - { - "id": 243 - }, - { - "id": 244 - }, - { - "id": 245 - }, - { - "id": 246 - }, - { - "id": 247 - }, - { - "id": 248 - }, - { - "id": 249 - }, - { - "id": 250 - }, - { - "id": 251 - }, - { - "id": 252 - }, - { - "id": 253 - }, - { - "id": 254 - }, - { - "id": 255 - }, - { - "id": 256 - }, - { - "id": 257 - }, - { - "id": 258 - }, - { - "id": 259 - }, - { - "id": 260 - }, - { - "id": 261 - }, - { - "id": 262 - }, - { - "id": 263 - }, - { - "id": 264 - }, - { - "id": 265 - }, - { - "id": 266 - }, - { - "id": 267 - }, - { - "id": 268 - }, - { - "id": 269 - }, - { - "id": 270 - }, - { - "id": 271 - }, - { - "id": 272 - }, - { - "id": 273 - }, - { - "id": 274 - }, - { - "id": 275 - }, - { - "id": 276 - }, - { - "id": 277 - }, - { - "id": 278 - }, - { - "id": 279 - }, - { - "id": 280 - }, - { - "id": 281 - }, - { - "id": 282 - }, - { - "id": 283 - }, - { - "id": 284 - }, - { - "id": 285 - }, - { - "id": 286 - }, - { - "id": 287 - }, - { - "id": 288 - }, - { - "id": 289 - }, - { - "id": 290 - }, - { - "id": 291 - }, - { - "id": 292 - }, - { - "id": 293 - }, - { - "id": 294 - }, - { - "id": 295 - }, - { - "id": 296 - }, - { - "id": 297 - }, - { - "id": 298 - }, - { - "id": 299 - }, - { - "id": 300 - }, - { - "id": 301 - }, - { - "id": 302 - }, - { - "id": 303 - }, - { - "id": 304 - }, - { - "id": 305 - }, - { - "id": 306 - }, - { - "id": 307 - }, - { - "id": 308 - }, - { - "id": 309 - }, - { - "id": 310 - }, - { - "id": 311 - }, - { - "id": 312 - }, - { - "id": 313 - }, - { - "id": 314 - }, - { - "id": 315 - }, - { - "id": 316 - }, - { - "id": 317 - }, - { - "id": 318 - }, - { - "id": 319 - }, - { - "id": 320 - }, - { - "id": 321 - }, - { - "id": 322 - }, - { - "id": 323 - }, - { - "id": 324 - }, - { - "id": 325 - }, - { - "id": 326 - }, - { - "id": 327 - }, - { - "id": 328 - }, - { - "id": 329 - }, - { - "id": 330 - }, - { - "id": 331 - }, - { - "id": 332 - }, - { - "id": 333 - }, - { - "id": 334 - }, - { - "id": 335 - }, - { - "id": 336 - }, - { - "id": 337 - }, - { - "id": 338 - }, - { - "id": 339 - }, - { - "id": 340 - }, - { - "id": 341 - }, - { - "id": 342 - }, - { - "id": 343 - }, - { - "id": 344 - }, - { - "id": 345 - }, - { - "id": 346 - }, - { - "id": 347 - }, - { - "id": 348 - }, - { - "id": 349 - }, - { - "id": 350 - } - ] - }, - "enablePartialFailure": true - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - }, - "metadata": { - "jobId": 2 - } - }, - { - "destination": { - "ID": "1zia9wKshXt80YksLmUdJnr7IHI", - "Name": "test_marketo", - "DestinationDefinition": { - "ID": "1iVQvTRMsPPyJzwol0ifH93QTQ6", - "Name": "MARKETO", - "DisplayName": "Marketo", - "transformAt": "processor", - "transformAtV1": "processor" - }, - "Config": { - "clientId": "marketo_client_id_success", - "clientSecret": "marketo_client_secret_success", - "accountId": "marketo_acct_id_success", - "staticListId": 1234 - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": true - }, - "message": { - "userId": "user 1", - "anonymousId": "anon-id-new", - "event": "event1", - "type": "track", - "properties": { - "listData": { - "remove": [1] - }, - "enablePartialFailure": true - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - }, - "metadata": { - "jobId": 3 - } - } -] diff --git a/test/__tests__/data/marketo_static_list_router_metadata_input.json b/test/__tests__/data/marketo_static_list_router_metadata_input.json deleted file mode 100644 index d006aa184b..0000000000 --- a/test/__tests__/data/marketo_static_list_router_metadata_input.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://marketo_acct_id_success.mktorest.com/rest/v1/lists/1234/leads.json?id=1&id=2&id=3", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer access_token_success" - }, - "params": {}, - "body": { - "JSON": {}, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "jobId": 1 - }, - { - "jobId": 2 - }, - { - "jobId": 3 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "accountId": "marketo_acct_id_success", - "clientId": "marketo_client_id_success", - "clientSecret": "marketo_client_secret_success", - "staticListId": 3027 - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Marketo Static List", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "config": { - "destConfig": { - "defaultConfig": ["accountId", "clientId", "clientSecret", "staticListId"] - }, - "secretKeys": ["clientSecret"], - "excludeKeys": [], - "includeKeys": [], - "routerTransform": true, - "supportedSourceTypes": ["android", "ios", "web", "unity", "amp", "cloud", "reactnative"] - }, - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "MARKETO_STATIC_LIST", - "displayName": "Marketo Static List", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } -} diff --git a/test/__tests__/data/marketo_static_list_router_metadata_output.json b/test/__tests__/data/marketo_static_list_router_metadata_output.json deleted file mode 100644 index bc560d73a7..0000000000 --- a/test/__tests__/data/marketo_static_list_router_metadata_output.json +++ /dev/null @@ -1,20 +0,0 @@ -[ - { - "destInfo": { - "authKey": "1mMy5cqbtfuaKZv1IhVQKnBdVwe" - }, - "jobId": 1 - }, - { - "destInfo": { - "authKey": "1mMy5cqbtfuaKZv1IhVQKnBdVwe" - }, - "jobId": 2 - }, - { - "destInfo": { - "authKey": "1mMy5cqbtfuaKZv1IhVQKnBdVwe" - }, - "jobId": 3 - } -] diff --git a/test/__tests__/data/marketo_static_list_router_output.json b/test/__tests__/data/marketo_static_list_router_output.json deleted file mode 100644 index 9c096b84c6..0000000000 --- a/test/__tests__/data/marketo_static_list_router_output.json +++ /dev/null @@ -1,170 +0,0 @@ -[ - { - "batchedRequest": [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://marketo_acct_id_success.mktorest.com/rest/v1/lists/1234/leads.json?id=1&id=2&id=3", - "headers": { - "Authorization": "Bearer access_token_success", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "DELETE", - "endpoint": "https://marketo_acct_id_success.mktorest.com/rest/v1/lists/1234/leads.json?id=4&id=5&id=6", - "headers": { - "Authorization": "Bearer access_token_success", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ], - "metadata": [ - { - "jobId": 1 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "ID": "1zia9wKshXt80YksLmUdJnr7IHI", - "Name": "test_marketo", - "DestinationDefinition": { - "ID": "1iVQvTRMsPPyJzwol0ifH93QTQ6", - "Name": "MARKETO", - "DisplayName": "Marketo", - "transformAt": "processor", - "transformAtV1": "processor" - }, - "Config": { - "clientId": "marketo_client_id_success", - "clientSecret": "marketo_client_secret_success", - "accountId": "marketo_acct_id_success", - "staticListId": 1234 - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": true - } - }, - { - "batchedRequest": [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://marketo_acct_id_success.mktorest.com/rest/v1/lists/1234/leads.json?id=0&id=1&id=2&id=3&id=4&id=5&id=6&id=7&id=8&id=9&id=10&id=11&id=12&id=13&id=14&id=15&id=16&id=17&id=18&id=19&id=20&id=21&id=22&id=23&id=24&id=25&id=26&id=27&id=28&id=29&id=30&id=31&id=32&id=33&id=34&id=35&id=36&id=37&id=38&id=39&id=40&id=41&id=42&id=43&id=44&id=45&id=46&id=47&id=48&id=49&id=50&id=51&id=52&id=53&id=54&id=55&id=56&id=57&id=58&id=59&id=60&id=61&id=62&id=63&id=64&id=65&id=66&id=67&id=68&id=69&id=70&id=71&id=72&id=73&id=74&id=75&id=76&id=77&id=78&id=79&id=80&id=81&id=82&id=83&id=84&id=85&id=86&id=87&id=88&id=89&id=90&id=91&id=92&id=93&id=94&id=95&id=96&id=97&id=98&id=99&id=100&id=101&id=102&id=103&id=104&id=105&id=106&id=107&id=108&id=109&id=110&id=111&id=112&id=113&id=114&id=115&id=116&id=117&id=118&id=119&id=120&id=121&id=122&id=123&id=124&id=125&id=126&id=127&id=128&id=129&id=130&id=131&id=132&id=133&id=134&id=135&id=136&id=137&id=138&id=139&id=140&id=141&id=142&id=143&id=144&id=145&id=146&id=147&id=148&id=149&id=150&id=151&id=152&id=153&id=154&id=155&id=156&id=157&id=158&id=159&id=160&id=161&id=162&id=163&id=164&id=165&id=166&id=167&id=168&id=169&id=170&id=171&id=172&id=173&id=174&id=175&id=176&id=177&id=178&id=179&id=180&id=181&id=182&id=183&id=184&id=185&id=186&id=187&id=188&id=189&id=190&id=191&id=192&id=193&id=194&id=195&id=196&id=197&id=198&id=199&id=200&id=201&id=202&id=203&id=204&id=205&id=206&id=207&id=208&id=209&id=210&id=211&id=212&id=213&id=214&id=215&id=216&id=217&id=218&id=219&id=220&id=221&id=222&id=223&id=224&id=225&id=226&id=227&id=228&id=229&id=230&id=231&id=232&id=233&id=234&id=235&id=236&id=237&id=238&id=239&id=240&id=241&id=242&id=243&id=244&id=245&id=246&id=247&id=248&id=249&id=250&id=251&id=252&id=253&id=254&id=255&id=256&id=257&id=258&id=259&id=260&id=261&id=262&id=263&id=264&id=265&id=266&id=267&id=268&id=269&id=270&id=271&id=272&id=273&id=274&id=275&id=276&id=277&id=278&id=279&id=280&id=281&id=282&id=283&id=284&id=285&id=286&id=287&id=288&id=289&id=290&id=291&id=292&id=293&id=294&id=295&id=296&id=297&id=298&id=299", - "headers": { - "Authorization": "Bearer access_token_success", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://marketo_acct_id_success.mktorest.com/rest/v1/lists/1234/leads.json?id=300&id=301&id=302&id=303&id=304&id=305&id=306&id=307&id=308&id=309&id=310&id=311&id=312&id=313&id=314&id=315&id=316&id=317&id=318&id=319&id=320&id=321&id=322&id=323&id=324&id=325&id=326&id=327&id=328&id=329&id=330&id=331&id=332&id=333&id=334&id=335&id=336&id=337&id=338&id=339&id=340&id=341&id=342&id=343&id=344&id=345&id=346&id=347&id=348&id=349&id=350", - "headers": { - "Authorization": "Bearer access_token_success", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ], - "metadata": [ - { - "jobId": 2 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "ID": "1zia9wKshXt80YksLmUdJnr7IHI", - "Name": "test_marketo", - "DestinationDefinition": { - "ID": "1iVQvTRMsPPyJzwol0ifH93QTQ6", - "Name": "MARKETO", - "DisplayName": "Marketo", - "transformAt": "processor", - "transformAtV1": "processor" - }, - "Config": { - "clientId": "marketo_client_id_success", - "clientSecret": "marketo_client_secret_success", - "accountId": "marketo_acct_id_success", - "staticListId": 1234 - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": true - } - }, - { - "metadata": [ - { - "jobId": 3 - } - ], - "destination": { - "ID": "1zia9wKshXt80YksLmUdJnr7IHI", - "Name": "test_marketo", - "DestinationDefinition": { - "ID": "1iVQvTRMsPPyJzwol0ifH93QTQ6", - "Name": "MARKETO", - "DisplayName": "Marketo", - "transformAt": "processor", - "transformAtV1": "processor" - }, - "Config": { - "clientId": "marketo_client_id_success", - "clientSecret": "marketo_client_secret_success", - "accountId": "marketo_acct_id_success", - "staticListId": 1234 - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": true - }, - "batched": false, - "statusCode": 400, - "error": "Event type track is not supported", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation" - } - } -] diff --git a/test/__tests__/marketo_static_list.test.js b/test/__tests__/marketo_static_list.test.js deleted file mode 100644 index 43300f243a..0000000000 --- a/test/__tests__/marketo_static_list.test.js +++ /dev/null @@ -1,64 +0,0 @@ -const integration = "marketo_static_list"; -const name = "marketo_static_list"; -const version = "v0"; - -const fs = require("fs"); -const path = require("path"); - -const transformer = require(`../../src/${version}/destinations/${integration}/transform`); - -// Processor Test Data -const testDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}.json`) -); -const testData = JSON.parse(testDataFile); - -// Router Test Data -const inputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_input.json`) -); -const outputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_output.json`) -); -const inputRouterData = JSON.parse(inputRouterDataFile); -const expectedRouterData = JSON.parse(outputRouterDataFile); - -// Router Metadata Test files -const inputRouterMetadataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_metadata_input.json`) -); -const outputRouterMetadataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_metadata_output.json`) -); -const inputRouterMetadata = JSON.parse(inputRouterMetadataFile); -const expectedRouterMetadata = JSON.parse(outputRouterMetadataFile); - -describe(`${name} Tests`, () => { - describe("Processor", () => { - testData.forEach((dataPoint, index) => { - it(`${index}. ${integration} - ${dataPoint.description}`, async () => { - try { - const output = await transformer.process(dataPoint.input); - expect(output).toEqual(dataPoint.output); - } catch (error) { - expect(error.message).toEqual(dataPoint.output.error); - } - }); - }); - }); - - describe("Router Tests", () => { - it("Payload", async () => { - const routerOutput = await transformer.processRouterDest(inputRouterData); - expect(routerOutput).toEqual(expectedRouterData); - }); - }); - describe("Router Metadata Tests", () => { - it("Payload", async () => { - const routerMetadataOutput = await transformer.processMetadataForRouter( - inputRouterMetadata - ); - expect(routerMetadataOutput).toEqual(expectedRouterMetadata); - }); - }); -}); diff --git a/test/integrations/destinations/marketo_static_list/processor/data.ts b/test/integrations/destinations/marketo_static_list/processor/data.ts index 51e4e87824..05fba54f6a 100644 --- a/test/integrations/destinations/marketo_static_list/processor/data.ts +++ b/test/integrations/destinations/marketo_static_list/processor/data.ts @@ -62,9 +62,9 @@ export const data = [ output: { version: '1', type: 'REST', - method: 'POST', + method: 'DELETE', endpoint: - 'https://marketo_acct_id_success.mktorest.com/rest/v1/lists/1234/leads.json?id=1&id=2&id=3', + 'https://marketo_acct_id_success.mktorest.com/rest/v1/lists/1234/leads.json?id=4&id=5&id=6', headers: { Authorization: 'Bearer access_token_success', 'Content-Type': 'application/json', @@ -80,9 +80,9 @@ export const data = [ output: { version: '1', type: 'REST', - method: 'DELETE', + method: 'POST', endpoint: - 'https://marketo_acct_id_success.mktorest.com/rest/v1/lists/1234/leads.json?id=4&id=5&id=6', + 'https://marketo_acct_id_success.mktorest.com/rest/v1/lists/1234/leads.json?id=1&id=2&id=3', headers: { Authorization: 'Bearer access_token_success', 'Content-Type': 'application/json', diff --git a/test/integrations/destinations/marketo_static_list/router/data.ts b/test/integrations/destinations/marketo_static_list/router/data.ts index 23b2ea8ea3..fa97ba49f2 100644 --- a/test/integrations/destinations/marketo_static_list/router/data.ts +++ b/test/integrations/destinations/marketo_static_list/router/data.ts @@ -1,7 +1,7 @@ export const data = [ { name: 'marketo_static_list', - description: 'Test 0', + description: 'Test 0: Test audiencelist event with add and remove', feature: 'router', module: 'destination', version: 'v0', @@ -1172,50 +1172,6 @@ export const data = [ jobId: 2, }, }, - { - destination: { - ID: '1zia9wKshXt80YksLmUdJnr7IHI', - Name: 'test_marketo', - DestinationDefinition: { - ID: '1iVQvTRMsPPyJzwol0ifH93QTQ6', - Name: 'MARKETO', - DisplayName: 'Marketo', - transformAt: 'processor', - transformAtV1: 'processor', - }, - Config: { - clientId: 'marketo_client_id_success', - clientSecret: 'marketo_client_secret_success', - accountId: 'marketo_acct_id_success', - staticListId: 1234, - }, - Enabled: true, - Transformations: [], - IsProcessorEnabled: true, - }, - message: { - userId: 'user 1', - anonymousId: 'anon-id-new', - event: 'event1', - type: 'track', - properties: { - listData: { - remove: [1], - }, - enablePartialFailure: true, - }, - context: { - ip: '14.5.67.21', - library: { - name: 'http', - }, - }, - timestamp: '2020-02-02T00:23:09.544Z', - }, - metadata: { - jobId: 3, - }, - }, ], destType: 'marketo_static_list', }, @@ -1232,9 +1188,9 @@ export const data = [ { version: '1', type: 'REST', - method: 'POST', + method: 'DELETE', endpoint: - 'https://marketo_acct_id_success.mktorest.com/rest/v1/lists/1234/leads.json?id=1&id=2&id=3', + 'https://marketo_acct_id_success.mktorest.com/rest/v1/lists/1234/leads.json?id=4&id=5&id=6', headers: { Authorization: 'Bearer access_token_success', 'Content-Type': 'application/json', @@ -1251,9 +1207,9 @@ export const data = [ { version: '1', type: 'REST', - method: 'DELETE', + method: 'POST', endpoint: - 'https://marketo_acct_id_success.mktorest.com/rest/v1/lists/1234/leads.json?id=4&id=5&id=6', + 'https://marketo_acct_id_success.mktorest.com/rest/v1/lists/1234/leads.json?id=1&id=2&id=3', headers: { Authorization: 'Bearer access_token_success', 'Content-Type': 'application/json', @@ -1371,18 +1327,325 @@ export const data = [ IsProcessorEnabled: true, }, }, + ], + }, + }, + }, + }, + { + name: 'marketo_static_list', + description: 'Test 1: Test record and audiencelist events in a single batch', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + destination: { + ID: '1zwa1wKshSt81YksKmUdJnr4IOK', + Name: 'test_marketo_rc', + DestinationDefinition: { + ID: '1iVQvTRMsPPyJzwol0ifH93QTQ6', + Name: 'MARKETO', + DisplayName: 'Marketo', + transformAt: 'processor', + transformAtV1: 'processor', + }, + Config: { + clientId: 'marketo_client_id_success', + clientSecret: 'marketo_client_secret_success', + accountId: 'marketo_acct_id_success', + staticListId: 1122, + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + message: { + type: 'record', + action: 'insert', + fields: { + id: 1001, + }, + channel: 'sources', + context: { + sources: { + job_id: '2VsZs4hyPpq7f1p8igrpmHsibHl', + version: 'feat.mirrorRetlEvent', + job_run_id: 'ck99nbd2kqiljdihhkh0', + task_run_id: 'ck99nbd2kqiljdihhkhg', + }, + externalId: [ + { + type: 'marketoStaticListId', + identifierType: 'id', + }, + ], + destinationFields: 'id', + mappedToDestination: 'true', + }, + recordId: '3', + }, + metadata: { + jobId: 1, + }, + }, { - metadata: [ - { - destInfo: { - authKey: '1zia9wKshXt80YksLmUdJnr7IHI', + destination: { + ID: '1zwa1wKshSt81YksKmUdJnr4IOK', + Name: 'test_marketo_rc', + DestinationDefinition: { + ID: '1iVQvTRMsPPyJzwol0ifH93QTQ6', + Name: 'MARKETO', + DisplayName: 'Marketo', + transformAt: 'processor', + transformAtV1: 'processor', + }, + Config: { + clientId: 'marketo_client_id_success', + clientSecret: 'marketo_client_secret_success', + accountId: 'marketo_acct_id_success', + staticListId: 1122, + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + message: { + type: 'record', + action: 'insert', + fields: { + id: 1002, + }, + channel: 'sources', + context: { + sources: { + job_id: '2VsZs4hyPpq7f1p8igrpmHsibHl', + version: 'feat.mirrorRetlEvent', + job_run_id: 'ck99nbd2kqiljdihhkh0', + task_run_id: 'ck99nbd2kqiljdihhkhg', }, - jobId: 3, + externalId: [ + { + type: 'marketoStaticListId', + identifierType: 'id', + }, + ], + destinationFields: 'id', + mappedToDestination: 'true', }, - ], + recordId: '3', + }, + metadata: { + jobId: 2, + }, + }, + { + destination: { + ID: '1zwa1wKshSt81YksKmUdJnr4IOK', + Name: 'test_marketo_rc', + DestinationDefinition: { + ID: '1iVQvTRMsPPyJzwol0ifH93QTQ6', + Name: 'MARKETO', + DisplayName: 'Marketo', + transformAt: 'processor', + transformAtV1: 'processor', + }, + Config: { + clientId: 'marketo_client_id_success', + clientSecret: 'marketo_client_secret_success', + accountId: 'marketo_acct_id_success', + staticListId: 1122, + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + message: { + type: 'record', + action: 'insert', + fields: { + id: 1003, + }, + channel: 'sources', + context: { + sources: { + job_id: '2VsZs4hyPpq7f1p8igrpmHsibHl', + version: 'feat.mirrorRetlEvent', + job_run_id: 'ck99nbd2kqiljdihhkh0', + task_run_id: 'ck99nbd2kqiljdihhkhg', + }, + externalId: [ + { + type: 'marketoStaticListId', + identifierType: 'id', + }, + ], + destinationFields: 'id', + mappedToDestination: 'true', + }, + recordId: '3', + }, + metadata: { + jobId: 3, + }, + }, + { + destination: { + ID: '1zwa1wKshSt81YksKmUdJnr4IOK', + Name: 'test_marketo_rc', + DestinationDefinition: { + ID: '1iVQvTRMsPPyJzwol0ifH93QTQ6', + Name: 'MARKETO', + DisplayName: 'Marketo', + transformAt: 'processor', + transformAtV1: 'processor', + }, + Config: { + clientId: 'marketo_client_id_success', + clientSecret: 'marketo_client_secret_success', + accountId: 'marketo_acct_id_success', + staticListId: 1122, + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + message: { + action: 'delete', + context: { + destinationFields: 'id', + externalId: [ + { + identifierType: 'id', + type: 'marketoStaticListId', + }, + ], + mappedToDestination: 'true', + sources: { + job_id: 'sf', + job_run_id: 'ck985bve58cvnti48120', + task_run_id: 'ck985bve58cvnti4812g', + version: '', + }, + }, + recordId: '2', + rudderId: '2', + fields: { + id: '2001', + }, + type: 'record', + }, + metadata: { + jobId: 4, + }, + }, + { + destination: { + ID: '1zwa1wKshSt81YksKmUdJnr4IOK', + Name: 'test_marketo_rc', + DestinationDefinition: { + ID: '1iVQvTRMsPPyJzwol0ifH93QTQ6', + Name: 'MARKETO', + DisplayName: 'Marketo', + transformAt: 'processor', + transformAtV1: 'processor', + }, + Config: { + clientId: 'marketo_client_id_success', + clientSecret: 'marketo_client_secret_success', + accountId: 'marketo_acct_id_success', + staticListId: 1122, + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + message: { + action: 'delete', + context: { + destinationFields: 'id', + externalId: [ + { + identifierType: 'id', + type: 'marketoStaticListId', + }, + ], + mappedToDestination: 'true', + sources: { + job_id: 'sf', + job_run_id: 'ck985bve58cvnti48120', + task_run_id: 'ck985bve58cvnti4812g', + version: '', + }, + }, + recordId: '2', + rudderId: '2', + fields: { + id: '2002', + }, + type: 'record', + }, + metadata: { + jobId: 5, + }, + }, + { + destination: { + ID: '1zwa1wKshSt81YksKmUdJnr4IOK', + Name: 'test_marketo_rc', + DestinationDefinition: { + ID: '1iVQvTRMsPPyJzwol0ifH93QTQ6', + Name: 'MARKETO', + DisplayName: 'Marketo', + transformAt: 'processor', + transformAtV1: 'processor', + }, + Config: { + clientId: 'marketo_client_id_success', + clientSecret: 'marketo_client_secret_success', + accountId: 'marketo_acct_id_success', + staticListId: 1122, + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + message: { + action: 'delete', + context: { + destinationFields: 'id', + externalId: [ + { + identifierType: 'id', + type: 'marketoStaticListId', + }, + ], + mappedToDestination: 'true', + sources: { + job_id: 'sf', + job_run_id: 'ck985bve58cvnti48120', + task_run_id: 'ck985bve58cvnti4812g', + version: '', + }, + }, + recordId: '2', + rudderId: '2', + fields: { + id: '2003', + }, + type: 'record', + }, + metadata: { + jobId: 6, + }, + }, + { destination: { ID: '1zia9wKshXt80YksLmUdJnr7IHI', - Name: 'test_marketo', + Name: 'test_marketo_al', DestinationDefinition: { ID: '1iVQvTRMsPPyJzwol0ifH93QTQ6', Name: 'MARKETO', @@ -1400,12 +1663,1981 @@ export const data = [ Transformations: [], IsProcessorEnabled: true, }, - batched: false, - statusCode: 400, - error: 'Event type track is not supported', - statTags: { - errorCategory: 'dataValidation', - errorType: 'instrumentation', + message: { + userId: 'user 1', + anonymousId: 'anon-id-new', + event: 'event1', + type: 'audiencelist', + properties: { + listData: { + add: [ + { + id: 101, + }, + { + id: 102, + }, + { + id: 103, + }, + ], + remove: [ + { + id: 4, + }, + { + id: 5, + }, + { + id: 6, + }, + ], + }, + enablePartialFailure: true, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + metadata: { + jobId: 7, + }, + }, + { + destination: { + ID: '1zia9wKshXt80YksLmUdJnr7IHI', + Name: 'test_marketo_al', + DestinationDefinition: { + ID: '1iVQvTRMsPPyJzwol0ifH93QTQ6', + Name: 'MARKETO', + DisplayName: 'Marketo', + transformAt: 'processor', + transformAtV1: 'processor', + }, + Config: { + clientId: 'marketo_client_id_success', + clientSecret: 'marketo_client_secret_success', + accountId: 'marketo_acct_id_success', + staticListId: 1234, + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + message: { + userId: 'user 1', + anonymousId: 'anon-id-new', + event: 'event1', + type: 'audiencelist', + properties: { + listData: { + add: [ + { + id: 0, + }, + { + id: 1, + }, + { + id: 2, + }, + { + id: 3, + }, + { + id: 4, + }, + { + id: 5, + }, + { + id: 6, + }, + { + id: 7, + }, + { + id: 8, + }, + { + id: 9, + }, + { + id: 10, + }, + { + id: 11, + }, + { + id: 12, + }, + { + id: 13, + }, + { + id: 14, + }, + { + id: 15, + }, + { + id: 16, + }, + { + id: 17, + }, + { + id: 18, + }, + { + id: 19, + }, + { + id: 20, + }, + { + id: 21, + }, + { + id: 22, + }, + { + id: 23, + }, + { + id: 24, + }, + { + id: 25, + }, + { + id: 26, + }, + { + id: 27, + }, + { + id: 28, + }, + { + id: 29, + }, + { + id: 30, + }, + { + id: 31, + }, + { + id: 32, + }, + { + id: 33, + }, + { + id: 34, + }, + { + id: 35, + }, + { + id: 36, + }, + { + id: 37, + }, + { + id: 38, + }, + { + id: 39, + }, + { + id: 40, + }, + { + id: 41, + }, + { + id: 42, + }, + { + id: 43, + }, + { + id: 44, + }, + { + id: 45, + }, + { + id: 46, + }, + { + id: 47, + }, + { + id: 48, + }, + { + id: 49, + }, + { + id: 50, + }, + { + id: 51, + }, + { + id: 52, + }, + { + id: 53, + }, + { + id: 54, + }, + { + id: 55, + }, + { + id: 56, + }, + { + id: 57, + }, + { + id: 58, + }, + { + id: 59, + }, + { + id: 60, + }, + { + id: 61, + }, + { + id: 62, + }, + { + id: 63, + }, + { + id: 64, + }, + { + id: 65, + }, + { + id: 66, + }, + { + id: 67, + }, + { + id: 68, + }, + { + id: 69, + }, + { + id: 70, + }, + { + id: 71, + }, + { + id: 72, + }, + { + id: 73, + }, + { + id: 74, + }, + { + id: 75, + }, + { + id: 76, + }, + { + id: 77, + }, + { + id: 78, + }, + { + id: 79, + }, + { + id: 80, + }, + { + id: 81, + }, + { + id: 82, + }, + { + id: 83, + }, + { + id: 84, + }, + { + id: 85, + }, + { + id: 86, + }, + { + id: 87, + }, + { + id: 88, + }, + { + id: 89, + }, + { + id: 90, + }, + { + id: 91, + }, + { + id: 92, + }, + { + id: 93, + }, + { + id: 94, + }, + { + id: 95, + }, + { + id: 96, + }, + { + id: 97, + }, + { + id: 98, + }, + { + id: 99, + }, + { + id: 100, + }, + { + id: 101, + }, + { + id: 102, + }, + { + id: 103, + }, + { + id: 104, + }, + { + id: 105, + }, + { + id: 106, + }, + { + id: 107, + }, + { + id: 108, + }, + { + id: 109, + }, + { + id: 110, + }, + { + id: 111, + }, + { + id: 112, + }, + { + id: 113, + }, + { + id: 114, + }, + { + id: 115, + }, + { + id: 116, + }, + { + id: 117, + }, + { + id: 118, + }, + { + id: 119, + }, + { + id: 120, + }, + { + id: 121, + }, + { + id: 122, + }, + { + id: 123, + }, + { + id: 124, + }, + { + id: 125, + }, + { + id: 126, + }, + { + id: 127, + }, + { + id: 128, + }, + { + id: 129, + }, + { + id: 130, + }, + { + id: 131, + }, + { + id: 132, + }, + { + id: 133, + }, + { + id: 134, + }, + { + id: 135, + }, + { + id: 136, + }, + { + id: 137, + }, + { + id: 138, + }, + { + id: 139, + }, + { + id: 140, + }, + { + id: 141, + }, + { + id: 142, + }, + { + id: 143, + }, + { + id: 144, + }, + { + id: 145, + }, + { + id: 146, + }, + { + id: 147, + }, + { + id: 148, + }, + { + id: 149, + }, + { + id: 150, + }, + { + id: 151, + }, + { + id: 152, + }, + { + id: 153, + }, + { + id: 154, + }, + { + id: 155, + }, + { + id: 156, + }, + { + id: 157, + }, + { + id: 158, + }, + { + id: 159, + }, + { + id: 160, + }, + { + id: 161, + }, + { + id: 162, + }, + { + id: 163, + }, + { + id: 164, + }, + { + id: 165, + }, + { + id: 166, + }, + { + id: 167, + }, + { + id: 168, + }, + { + id: 169, + }, + { + id: 170, + }, + { + id: 171, + }, + { + id: 172, + }, + { + id: 173, + }, + { + id: 174, + }, + { + id: 175, + }, + { + id: 176, + }, + { + id: 177, + }, + { + id: 178, + }, + { + id: 179, + }, + { + id: 180, + }, + { + id: 181, + }, + { + id: 182, + }, + { + id: 183, + }, + { + id: 184, + }, + { + id: 185, + }, + { + id: 186, + }, + { + id: 187, + }, + { + id: 188, + }, + { + id: 189, + }, + { + id: 190, + }, + { + id: 191, + }, + { + id: 192, + }, + { + id: 193, + }, + { + id: 194, + }, + { + id: 195, + }, + { + id: 196, + }, + { + id: 197, + }, + { + id: 198, + }, + { + id: 199, + }, + { + id: 200, + }, + { + id: 201, + }, + { + id: 202, + }, + { + id: 203, + }, + { + id: 204, + }, + { + id: 205, + }, + { + id: 206, + }, + { + id: 207, + }, + { + id: 208, + }, + { + id: 209, + }, + { + id: 210, + }, + { + id: 211, + }, + { + id: 212, + }, + { + id: 213, + }, + { + id: 214, + }, + { + id: 215, + }, + { + id: 216, + }, + { + id: 217, + }, + { + id: 218, + }, + { + id: 219, + }, + { + id: 220, + }, + { + id: 221, + }, + { + id: 222, + }, + { + id: 223, + }, + { + id: 224, + }, + { + id: 225, + }, + { + id: 226, + }, + { + id: 227, + }, + { + id: 228, + }, + { + id: 229, + }, + { + id: 230, + }, + { + id: 231, + }, + { + id: 232, + }, + { + id: 233, + }, + { + id: 234, + }, + { + id: 235, + }, + { + id: 236, + }, + { + id: 237, + }, + { + id: 238, + }, + { + id: 239, + }, + { + id: 240, + }, + { + id: 241, + }, + { + id: 242, + }, + { + id: 243, + }, + { + id: 244, + }, + { + id: 245, + }, + { + id: 246, + }, + { + id: 247, + }, + { + id: 248, + }, + { + id: 249, + }, + { + id: 250, + }, + { + id: 251, + }, + { + id: 252, + }, + { + id: 253, + }, + { + id: 254, + }, + { + id: 255, + }, + { + id: 256, + }, + { + id: 257, + }, + { + id: 258, + }, + { + id: 259, + }, + { + id: 260, + }, + { + id: 261, + }, + { + id: 262, + }, + { + id: 263, + }, + { + id: 264, + }, + { + id: 265, + }, + { + id: 266, + }, + { + id: 267, + }, + { + id: 268, + }, + { + id: 269, + }, + { + id: 270, + }, + { + id: 271, + }, + { + id: 272, + }, + { + id: 273, + }, + { + id: 274, + }, + { + id: 275, + }, + { + id: 276, + }, + { + id: 277, + }, + { + id: 278, + }, + { + id: 279, + }, + { + id: 280, + }, + { + id: 281, + }, + { + id: 282, + }, + { + id: 283, + }, + { + id: 284, + }, + { + id: 285, + }, + { + id: 286, + }, + { + id: 287, + }, + { + id: 288, + }, + { + id: 289, + }, + { + id: 290, + }, + { + id: 291, + }, + { + id: 292, + }, + { + id: 293, + }, + { + id: 294, + }, + { + id: 295, + }, + { + id: 296, + }, + { + id: 297, + }, + { + id: 298, + }, + { + id: 299, + }, + { + id: 300, + }, + { + id: 301, + }, + { + id: 302, + }, + { + id: 303, + }, + { + id: 304, + }, + { + id: 305, + }, + { + id: 306, + }, + { + id: 307, + }, + { + id: 308, + }, + { + id: 309, + }, + { + id: 310, + }, + { + id: 311, + }, + { + id: 312, + }, + { + id: 313, + }, + { + id: 314, + }, + { + id: 315, + }, + { + id: 316, + }, + { + id: 317, + }, + { + id: 318, + }, + { + id: 319, + }, + { + id: 320, + }, + { + id: 321, + }, + { + id: 322, + }, + { + id: 323, + }, + { + id: 324, + }, + { + id: 325, + }, + { + id: 326, + }, + { + id: 327, + }, + { + id: 328, + }, + { + id: 329, + }, + { + id: 330, + }, + { + id: 331, + }, + { + id: 332, + }, + { + id: 333, + }, + { + id: 334, + }, + { + id: 335, + }, + { + id: 336, + }, + { + id: 337, + }, + { + id: 338, + }, + { + id: 339, + }, + { + id: 340, + }, + { + id: 341, + }, + { + id: 342, + }, + { + id: 343, + }, + { + id: 344, + }, + { + id: 345, + }, + { + id: 346, + }, + { + id: 347, + }, + { + id: 348, + }, + { + id: 349, + }, + { + id: 350, + }, + ], + }, + enablePartialFailure: true, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + metadata: { + jobId: 8, + }, + }, + ], + destType: 'marketo_static_list', + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: [ + { + version: '1', + type: 'REST', + method: 'DELETE', + endpoint: + 'https://marketo_acct_id_success.mktorest.com/rest/v1/lists/1122/leads.json?id=2001&id=2002&id=2003', + headers: { + Authorization: 'Bearer access_token_success', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + ], + metadata: [ + { + jobId: 4, + destInfo: { + authKey: '1zwa1wKshSt81YksKmUdJnr4IOK', + }, + }, + { + jobId: 5, + destInfo: { + authKey: '1zwa1wKshSt81YksKmUdJnr4IOK', + }, + }, + { + jobId: 6, + destInfo: { + authKey: '1zwa1wKshSt81YksKmUdJnr4IOK', + }, + }, + ], + batched: true, + statusCode: 200, + destination: { + ID: '1zwa1wKshSt81YksKmUdJnr4IOK', + Name: 'test_marketo_rc', + DestinationDefinition: { + ID: '1iVQvTRMsPPyJzwol0ifH93QTQ6', + Name: 'MARKETO', + DisplayName: 'Marketo', + transformAt: 'processor', + transformAtV1: 'processor', + }, + Config: { + clientId: 'marketo_client_id_success', + clientSecret: 'marketo_client_secret_success', + accountId: 'marketo_acct_id_success', + staticListId: 1122, + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + }, + { + batchedRequest: [ + { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://marketo_acct_id_success.mktorest.com/rest/v1/lists/1122/leads.json?id=1001&id=1002&id=1003', + headers: { + Authorization: 'Bearer access_token_success', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + ], + metadata: [ + { + jobId: 1, + destInfo: { + authKey: '1zwa1wKshSt81YksKmUdJnr4IOK', + }, + }, + { + jobId: 2, + destInfo: { + authKey: '1zwa1wKshSt81YksKmUdJnr4IOK', + }, + }, + { + jobId: 3, + destInfo: { + authKey: '1zwa1wKshSt81YksKmUdJnr4IOK', + }, + }, + ], + batched: true, + statusCode: 200, + destination: { + ID: '1zwa1wKshSt81YksKmUdJnr4IOK', + Name: 'test_marketo_rc', + DestinationDefinition: { + ID: '1iVQvTRMsPPyJzwol0ifH93QTQ6', + Name: 'MARKETO', + DisplayName: 'Marketo', + transformAt: 'processor', + transformAtV1: 'processor', + }, + Config: { + clientId: 'marketo_client_id_success', + clientSecret: 'marketo_client_secret_success', + accountId: 'marketo_acct_id_success', + staticListId: 1122, + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + }, + { + batchedRequest: [ + { + version: '1', + type: 'REST', + method: 'DELETE', + endpoint: + 'https://marketo_acct_id_success.mktorest.com/rest/v1/lists/1234/leads.json?id=4&id=5&id=6', + headers: { + Authorization: 'Bearer access_token_success', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://marketo_acct_id_success.mktorest.com/rest/v1/lists/1234/leads.json?id=101&id=102&id=103', + headers: { + Authorization: 'Bearer access_token_success', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + ], + metadata: [ + { + jobId: 7, + destInfo: { + authKey: '1zia9wKshXt80YksLmUdJnr7IHI', + }, + }, + ], + batched: false, + statusCode: 200, + destination: { + ID: '1zia9wKshXt80YksLmUdJnr7IHI', + Name: 'test_marketo_al', + DestinationDefinition: { + ID: '1iVQvTRMsPPyJzwol0ifH93QTQ6', + Name: 'MARKETO', + DisplayName: 'Marketo', + transformAt: 'processor', + transformAtV1: 'processor', + }, + Config: { + clientId: 'marketo_client_id_success', + clientSecret: 'marketo_client_secret_success', + accountId: 'marketo_acct_id_success', + staticListId: 1234, + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + }, + { + batchedRequest: [ + { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://marketo_acct_id_success.mktorest.com/rest/v1/lists/1234/leads.json?id=0&id=1&id=2&id=3&id=4&id=5&id=6&id=7&id=8&id=9&id=10&id=11&id=12&id=13&id=14&id=15&id=16&id=17&id=18&id=19&id=20&id=21&id=22&id=23&id=24&id=25&id=26&id=27&id=28&id=29&id=30&id=31&id=32&id=33&id=34&id=35&id=36&id=37&id=38&id=39&id=40&id=41&id=42&id=43&id=44&id=45&id=46&id=47&id=48&id=49&id=50&id=51&id=52&id=53&id=54&id=55&id=56&id=57&id=58&id=59&id=60&id=61&id=62&id=63&id=64&id=65&id=66&id=67&id=68&id=69&id=70&id=71&id=72&id=73&id=74&id=75&id=76&id=77&id=78&id=79&id=80&id=81&id=82&id=83&id=84&id=85&id=86&id=87&id=88&id=89&id=90&id=91&id=92&id=93&id=94&id=95&id=96&id=97&id=98&id=99&id=100&id=101&id=102&id=103&id=104&id=105&id=106&id=107&id=108&id=109&id=110&id=111&id=112&id=113&id=114&id=115&id=116&id=117&id=118&id=119&id=120&id=121&id=122&id=123&id=124&id=125&id=126&id=127&id=128&id=129&id=130&id=131&id=132&id=133&id=134&id=135&id=136&id=137&id=138&id=139&id=140&id=141&id=142&id=143&id=144&id=145&id=146&id=147&id=148&id=149&id=150&id=151&id=152&id=153&id=154&id=155&id=156&id=157&id=158&id=159&id=160&id=161&id=162&id=163&id=164&id=165&id=166&id=167&id=168&id=169&id=170&id=171&id=172&id=173&id=174&id=175&id=176&id=177&id=178&id=179&id=180&id=181&id=182&id=183&id=184&id=185&id=186&id=187&id=188&id=189&id=190&id=191&id=192&id=193&id=194&id=195&id=196&id=197&id=198&id=199&id=200&id=201&id=202&id=203&id=204&id=205&id=206&id=207&id=208&id=209&id=210&id=211&id=212&id=213&id=214&id=215&id=216&id=217&id=218&id=219&id=220&id=221&id=222&id=223&id=224&id=225&id=226&id=227&id=228&id=229&id=230&id=231&id=232&id=233&id=234&id=235&id=236&id=237&id=238&id=239&id=240&id=241&id=242&id=243&id=244&id=245&id=246&id=247&id=248&id=249&id=250&id=251&id=252&id=253&id=254&id=255&id=256&id=257&id=258&id=259&id=260&id=261&id=262&id=263&id=264&id=265&id=266&id=267&id=268&id=269&id=270&id=271&id=272&id=273&id=274&id=275&id=276&id=277&id=278&id=279&id=280&id=281&id=282&id=283&id=284&id=285&id=286&id=287&id=288&id=289&id=290&id=291&id=292&id=293&id=294&id=295&id=296&id=297&id=298&id=299', + headers: { + Authorization: 'Bearer access_token_success', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://marketo_acct_id_success.mktorest.com/rest/v1/lists/1234/leads.json?id=300&id=301&id=302&id=303&id=304&id=305&id=306&id=307&id=308&id=309&id=310&id=311&id=312&id=313&id=314&id=315&id=316&id=317&id=318&id=319&id=320&id=321&id=322&id=323&id=324&id=325&id=326&id=327&id=328&id=329&id=330&id=331&id=332&id=333&id=334&id=335&id=336&id=337&id=338&id=339&id=340&id=341&id=342&id=343&id=344&id=345&id=346&id=347&id=348&id=349&id=350', + headers: { + Authorization: 'Bearer access_token_success', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + ], + metadata: [ + { + jobId: 8, + destInfo: { + authKey: '1zia9wKshXt80YksLmUdJnr7IHI', + }, + }, + ], + batched: false, + statusCode: 200, + destination: { + ID: '1zia9wKshXt80YksLmUdJnr7IHI', + Name: 'test_marketo_al', + DestinationDefinition: { + ID: '1iVQvTRMsPPyJzwol0ifH93QTQ6', + Name: 'MARKETO', + DisplayName: 'Marketo', + transformAt: 'processor', + transformAtV1: 'processor', + }, + Config: { + clientId: 'marketo_client_id_success', + clientSecret: 'marketo_client_secret_success', + accountId: 'marketo_acct_id_success', + staticListId: 1234, + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + }, + ], + }, + }, + }, + }, + { + name: 'marketo_static_list', + description: 'Test 2: Test record evemts', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + destType: 'marketo_static_list', + input: [ + { + destination: { + ID: '1zwa1wKshSt81YksKmUdJnr4IOK', + Name: 'test_marketo_rc', + DestinationDefinition: { + ID: '1iVQvTRMsPPyJzwol0ifH93QTQ6', + Name: 'MARKETO', + DisplayName: 'Marketo', + transformAt: 'processor', + transformAtV1: 'processor', + }, + Config: { + clientId: 'marketo_client_id_success', + clientSecret: 'marketo_client_secret_success', + accountId: 'marketo_acct_id_success', + staticListId: 1122, + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + message: { + type: 'record', + action: 'insert', + fields: { + id: 1001, + }, + channel: 'sources', + context: { + sources: { + job_id: '2VsZs4hyPpq7f1p8igrpmHsibHl', + version: 'feat.mirrorRetlEvent', + job_run_id: 'ck99nbd2kqiljdihhkh0', + task_run_id: 'ck99nbd2kqiljdihhkhg', + }, + externalId: [ + { + type: 'marketoStaticListId', + id: 'id001', + }, + ], + destinationFields: 'id', + mappedToDestination: 'true', + }, + recordId: '3', + }, + metadata: { + jobId: 1, + }, + }, + { + destination: { + ID: '1zwa1wKshSt81YksKmUdJnr4IOK', + Name: 'test_marketo_rc', + DestinationDefinition: { + ID: '1iVQvTRMsPPyJzwol0ifH93QTQ6', + Name: 'MARKETO', + DisplayName: 'Marketo', + transformAt: 'processor', + transformAtV1: 'processor', + }, + Config: { + clientId: 'marketo_client_id_success', + clientSecret: 'marketo_client_secret_success', + accountId: 'marketo_acct_id_success', + staticListId: 1122, + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + message: { + type: 'record', + action: 'insert', + fields: { + id: 1002, + }, + channel: 'sources', + context: { + sources: { + job_id: '2VsZs4hyPpq7f1p8igrpmHsibHl', + version: 'feat.mirrorRetlEvent', + job_run_id: 'ck99nbd2kqiljdihhkh0', + task_run_id: 'ck99nbd2kqiljdihhkhg', + }, + externalId: [ + { + type: 'marketoStaticListId', + id: 'id002', + }, + ], + destinationFields: 'id', + mappedToDestination: 'true', + }, + recordId: '3', + }, + metadata: { + jobId: 2, + }, + }, + { + destination: { + ID: '1zwa1wKshSt81YksKmUdJnr4IOK', + Name: 'test_marketo_rc', + DestinationDefinition: { + ID: '1iVQvTRMsPPyJzwol0ifH93QTQ6', + Name: 'MARKETO', + DisplayName: 'Marketo', + transformAt: 'processor', + transformAtV1: 'processor', + }, + Config: { + clientId: 'marketo_client_id_success', + clientSecret: 'marketo_client_secret_success', + accountId: 'marketo_acct_id_success', + staticListId: 1122, + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + message: { + type: 'record', + action: 'insert', + fields: { + id: 1003, + }, + channel: 'sources', + context: { + sources: { + job_id: '2VsZs4hyPpq7f1p8igrpmHsibHl', + version: 'feat.mirrorRetlEvent', + job_run_id: 'ck99nbd2kqiljdihhkh0', + task_run_id: 'ck99nbd2kqiljdihhkhg', + }, + externalId: [ + { + type: 'marketoStaticListId', + id: 'id001', + }, + ], + destinationFields: 'id', + mappedToDestination: 'true', + }, + recordId: '3', + }, + metadata: { + jobId: 3, + }, + }, + { + destination: { + ID: '1zwa1wKshSt81YksKmUdJnr4IOK', + Name: 'test_marketo_rc', + DestinationDefinition: { + ID: '1iVQvTRMsPPyJzwol0ifH93QTQ6', + Name: 'MARKETO', + DisplayName: 'Marketo', + transformAt: 'processor', + transformAtV1: 'processor', + }, + Config: { + clientId: 'marketo_client_id_success', + clientSecret: 'marketo_client_secret_success', + accountId: 'marketo_acct_id_success', + staticListId: 1122, + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + message: { + action: 'delete', + context: { + destinationFields: 'id', + externalId: [ + { + id: 'id002', + type: 'marketoStaticListId', + }, + ], + mappedToDestination: 'true', + sources: { + job_id: 'sf', + job_run_id: 'ck985bve58cvnti48120', + task_run_id: 'ck985bve58cvnti4812g', + version: '', + }, + }, + recordId: '2', + rudderId: '2', + fields: { + id: '2001', + }, + type: 'record', + }, + metadata: { + jobId: 4, + }, + }, + { + destination: { + ID: '1zwa1wKshSt81YksKmUdJnr4IOK', + Name: 'test_marketo_rc', + DestinationDefinition: { + ID: '1iVQvTRMsPPyJzwol0ifH93QTQ6', + Name: 'MARKETO', + DisplayName: 'Marketo', + transformAt: 'processor', + transformAtV1: 'processor', + }, + Config: { + clientId: 'marketo_client_id_success', + clientSecret: 'marketo_client_secret_success', + accountId: 'marketo_acct_id_success', + staticListId: 1122, + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + message: { + action: 'delete', + context: { + destinationFields: 'id', + externalId: [ + { + id: 'id001', + type: 'marketoStaticListId', + }, + ], + mappedToDestination: 'true', + sources: { + job_id: 'sf', + job_run_id: 'ck985bve58cvnti48120', + task_run_id: 'ck985bve58cvnti4812g', + version: '', + }, + }, + recordId: '2', + rudderId: '2', + fields: { + id: '2002', + }, + type: 'record', + }, + metadata: { + jobId: 5, + }, + }, + { + destination: { + ID: '1zwa1wKshSt81YksKmUdJnr4IOK', + Name: 'test_marketo_rc', + DestinationDefinition: { + ID: '1iVQvTRMsPPyJzwol0ifH93QTQ6', + Name: 'MARKETO', + DisplayName: 'Marketo', + transformAt: 'processor', + transformAtV1: 'processor', + }, + Config: { + clientId: 'marketo_client_id_success', + clientSecret: 'marketo_client_secret_success', + accountId: 'marketo_acct_id_success', + staticListId: 1122, + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + message: { + action: 'delete', + context: { + destinationFields: 'id', + externalId: [ + { + id: 'id002', + type: 'marketoStaticListId', + }, + ], + mappedToDestination: 'true', + sources: { + job_id: 'sf', + job_run_id: 'ck985bve58cvnti48120', + task_run_id: 'ck985bve58cvnti4812g', + version: '', + }, + }, + recordId: '2', + rudderId: '2', + fields: { + id: '2003', + }, + type: 'record', + }, + metadata: { + jobId: 6, + }, + }, + ], + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: [ + { + version: '1', + type: 'REST', + method: 'DELETE', + endpoint: + 'https://marketo_acct_id_success.mktorest.com/rest/v1/lists/id001/leads.json?id=2002', + headers: { + Authorization: 'Bearer access_token_success', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + ], + metadata: [ + { + jobId: 5, + destInfo: { + authKey: '1zwa1wKshSt81YksKmUdJnr4IOK', + }, + }, + ], + batched: true, + statusCode: 200, + destination: { + ID: '1zwa1wKshSt81YksKmUdJnr4IOK', + Name: 'test_marketo_rc', + DestinationDefinition: { + ID: '1iVQvTRMsPPyJzwol0ifH93QTQ6', + Name: 'MARKETO', + DisplayName: 'Marketo', + transformAt: 'processor', + transformAtV1: 'processor', + }, + Config: { + clientId: 'marketo_client_id_success', + clientSecret: 'marketo_client_secret_success', + accountId: 'marketo_acct_id_success', + staticListId: 1122, + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + }, + { + batchedRequest: [ + { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://marketo_acct_id_success.mktorest.com/rest/v1/lists/id001/leads.json?id=1001&id=1003', + headers: { + Authorization: 'Bearer access_token_success', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + ], + metadata: [ + { + jobId: 1, + destInfo: { + authKey: '1zwa1wKshSt81YksKmUdJnr4IOK', + }, + }, + { + jobId: 3, + destInfo: { + authKey: '1zwa1wKshSt81YksKmUdJnr4IOK', + }, + }, + ], + batched: true, + statusCode: 200, + destination: { + ID: '1zwa1wKshSt81YksKmUdJnr4IOK', + Name: 'test_marketo_rc', + DestinationDefinition: { + ID: '1iVQvTRMsPPyJzwol0ifH93QTQ6', + Name: 'MARKETO', + DisplayName: 'Marketo', + transformAt: 'processor', + transformAtV1: 'processor', + }, + Config: { + clientId: 'marketo_client_id_success', + clientSecret: 'marketo_client_secret_success', + accountId: 'marketo_acct_id_success', + staticListId: 1122, + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + }, + { + batchedRequest: [ + { + version: '1', + type: 'REST', + method: 'DELETE', + endpoint: + 'https://marketo_acct_id_success.mktorest.com/rest/v1/lists/id002/leads.json?id=2001&id=2003', + headers: { + Authorization: 'Bearer access_token_success', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + ], + metadata: [ + { + jobId: 4, + destInfo: { + authKey: '1zwa1wKshSt81YksKmUdJnr4IOK', + }, + }, + { + jobId: 6, + destInfo: { + authKey: '1zwa1wKshSt81YksKmUdJnr4IOK', + }, + }, + ], + batched: true, + statusCode: 200, + destination: { + ID: '1zwa1wKshSt81YksKmUdJnr4IOK', + Name: 'test_marketo_rc', + DestinationDefinition: { + ID: '1iVQvTRMsPPyJzwol0ifH93QTQ6', + Name: 'MARKETO', + DisplayName: 'Marketo', + transformAt: 'processor', + transformAtV1: 'processor', + }, + Config: { + clientId: 'marketo_client_id_success', + clientSecret: 'marketo_client_secret_success', + accountId: 'marketo_acct_id_success', + staticListId: 1122, + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + }, + { + batchedRequest: [ + { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://marketo_acct_id_success.mktorest.com/rest/v1/lists/id002/leads.json?id=1002', + headers: { + Authorization: 'Bearer access_token_success', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + ], + metadata: [ + { + jobId: 2, + destInfo: { + authKey: '1zwa1wKshSt81YksKmUdJnr4IOK', + }, + }, + ], + batched: true, + statusCode: 200, + destination: { + ID: '1zwa1wKshSt81YksKmUdJnr4IOK', + Name: 'test_marketo_rc', + DestinationDefinition: { + ID: '1iVQvTRMsPPyJzwol0ifH93QTQ6', + Name: 'MARKETO', + DisplayName: 'Marketo', + transformAt: 'processor', + transformAtV1: 'processor', + }, + Config: { + clientId: 'marketo_client_id_success', + clientSecret: 'marketo_client_secret_success', + accountId: 'marketo_acct_id_success', + staticListId: 1122, + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, }, }, ], From e8f2d1a44e54f8eea50035d885c23bef7992ae2b Mon Sep 17 00:00:00 2001 From: Yashasvi Bajpai <33063622+yashasvibajpai@users.noreply.github.com> Date: Mon, 11 Dec 2023 16:36:13 +0530 Subject: [PATCH 057/135] chore: onboard Adobe Analytics to transformer proxy (#2858) * chore: init onboard * chore: add network handler * chore: add test * fix: adding correct mock with corrections & modify the status-code in test-case Signed-off-by: Sai Sankeerth * chore: add dummy destination id * chore: add dummy ws id * chore: add tests for success and generic error case --------- Signed-off-by: Sai Sankeerth Co-authored-by: Sai Sankeerth --- src/v0/destinations/adobe_analytics/config.js | 1 + .../adobe_analytics/networkHandler.js | 54 +++++++ .../adobe_analytics/dataDelivery/data.ts | 142 ++++++++++++++++++ .../destinations/adobe_analytics/network.ts | 47 ++++++ 4 files changed, 244 insertions(+) create mode 100644 src/v0/destinations/adobe_analytics/networkHandler.js create mode 100644 test/integrations/destinations/adobe_analytics/dataDelivery/data.ts create mode 100644 test/integrations/destinations/adobe_analytics/network.ts diff --git a/src/v0/destinations/adobe_analytics/config.js b/src/v0/destinations/adobe_analytics/config.js index 7a66b32a48..232fe61f7f 100644 --- a/src/v0/destinations/adobe_analytics/config.js +++ b/src/v0/destinations/adobe_analytics/config.js @@ -44,4 +44,5 @@ module.exports = { ECOM_PRODUCT_EVENTS, commonConfig: MAPPING_CONFIG[CONFIG_CATEGORIES.COMMON.name], formatDestinationConfig, + DESTINATION: 'ADOBE_ANALYTICS' }; diff --git a/src/v0/destinations/adobe_analytics/networkHandler.js b/src/v0/destinations/adobe_analytics/networkHandler.js new file mode 100644 index 0000000000..b5b58ade0c --- /dev/null +++ b/src/v0/destinations/adobe_analytics/networkHandler.js @@ -0,0 +1,54 @@ +const { InstrumentationError } = require('@rudderstack/integrations-lib'); +const { proxyRequest, prepareProxyRequest } = require('../../../adapters/network'); +const { + processAxiosResponse, +} = require('../../../adapters/utils/networkUtils'); +const { DESTINATION } = require('./config'); + + +/** + * Extract data inside different tags from an xml payload + * @param {*} xml + * @param {*} tagName + * @returns data inside the tagName + */ +function extractContent(xmlPayload, tagName) { + const pattern = new RegExp(`<${tagName}>(.*?)`); + const match = xmlPayload.match(pattern); + return match ? match[1] : null; +} + +const responseHandler = (destinationResponse, dest) => { + const message = `[${DESTINATION}] - Request Processed Successfully`; + const { response, status } = destinationResponse; + + // Extract values between different tags + const responseStatus = extractContent(response, 'status'); + const reason = extractContent(response, 'reason'); + + // if the status tag in XML contains FAILURE, we build and throw an explicit error + if (responseStatus === 'FAILURE') { + if (reason) { + throw new InstrumentationError(`[${DESTINATION} Response Handler] Request failed for destination ${dest} : ${reason}` ) + } else { + throw new InstrumentationError(`[${DESTINATION} Response Handler] Request failed for destination ${dest} with a general error`) + } + } + + return { + status, + message, + destinationResponse, + }; +}; + +function networkHandler() { + this.responseHandler = responseHandler; + this.proxy = proxyRequest; + this.prepareProxy = prepareProxyRequest; + this.processAxiosResponse = processAxiosResponse; +} + +module.exports = { + networkHandler, +}; diff --git a/test/integrations/destinations/adobe_analytics/dataDelivery/data.ts b/test/integrations/destinations/adobe_analytics/dataDelivery/data.ts new file mode 100644 index 0000000000..182969da73 --- /dev/null +++ b/test/integrations/destinations/adobe_analytics/dataDelivery/data.ts @@ -0,0 +1,142 @@ +export const data = [ + { + name: 'adobe_analytics', + description: 'Test 0: Failure response from Adobe Analytics with reason', + feature: 'dataDelivery', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://adobe.failure.omtrdc.net/b/ss//6', + headers: { + 'Content-type': 'application/xml', + }, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: { + payload: + '17941080sales campaignwebUSD127.0.0.1en-USDalvik/2.1.0 (Linux; U; Android 9; Android SDK built for x86 Build/PSR1.180720.075)https://www.google.com/search?q=estore+bestsellerprodViewGames;;11;148.39failureReport', + }, + FORM: {}, + }, + files: {}, + }, + method: 'POST', + }, + }, + output: { + response: { + status: 400, + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'ADOBE_ANALYTICS', + module: 'destination', + implementation: 'native', + feature: 'dataDelivery', + destinationId: '2S3s0dXXXXXX7m0UfBwyblDrzs', + workspaceId: '1pKWrE6GXXXXXKBikka1SbRgrSN', + }, + destinationResponse: '', + authErrorCategory: '', + message: + '[ADOBE_ANALYTICS Response Handler] Request failed for destination adobe_analytics : NO pagename OR pageurl', + }, + }, + }, + { + name: 'adobe_analytics', + description: 'Test 1: Failure response from Adobe Analytics without reason (Generic error)', + feature: 'dataDelivery', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://adobe.failure2.omtrdc.net/b/ss//6', + headers: { + 'Content-type': 'application/xml', + }, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: { + payload: + '17941080sales campaignwebUSD127.0.0.1en-USDalvik/2.1.0 (Linux; U; Android 9; Android SDK built for x86 Build/PSR1.180720.075)https://www.google.com/search?q=estore+bestsellerprodViewGames;;11;148.39failureReportgeneric', + }, + FORM: {}, + }, + files: {}, + }, + method: 'POST', + }, + }, + output: { + response: { + status: 400, + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'ADOBE_ANALYTICS', + module: 'destination', + implementation: 'native', + feature: 'dataDelivery', + destinationId: '2S3s0dXXXXXX7m0UfBwyblDrzs', + workspaceId: '1pKWrE6GXXXXXKBikka1SbRgrSN', + }, + destinationResponse: '', + authErrorCategory: '', + message: + '[ADOBE_ANALYTICS Response Handler] Request failed for destination adobe_analytics with a general error', + }, + }, + }, + { + name: 'adobe_analytics', + description: 'Test 2: Success response from Adobe Analytics', + feature: 'dataDelivery', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://adobe.success.omtrdc.net/b/ss//6', + headers: { + 'Content-type': 'application/xml', + }, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: { + payload: + '127.0.1.0www.google.co.inGoogleid1110011prodViewGames;Monopoly;1;14.00,Games;UNO;2;6.90successreport', + }, + FORM: {}, + }, + files: {}, + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + destinationResponse: 'SUCCESS', + }, + }, + }, +]; diff --git a/test/integrations/destinations/adobe_analytics/network.ts b/test/integrations/destinations/adobe_analytics/network.ts new file mode 100644 index 0000000000..2fe4f0204e --- /dev/null +++ b/test/integrations/destinations/adobe_analytics/network.ts @@ -0,0 +1,47 @@ +export const networkCallsData = [ + { + httpReq: { + url: 'https://adobe.failure.omtrdc.net/b/ss//6', + data: '17941080sales campaignwebUSD127.0.0.1en-USDalvik/2.1.0 (Linux; U; Android 9; Android SDK built for x86 Build/PSR1.180720.075)https://www.google.com/search?q=estore+bestsellerprodViewGames;;11;148.39failureReport', + params: {}, + headers: { + 'Content-Type': 'application/xml', + }, + method: 'POST', + }, + httpRes: { + status: 200, + data: 'FAILURENO pagename OR pageurl', + }, + }, + { + httpReq: { + url: 'https://adobe.failure2.omtrdc.net/b/ss//6', + data: '17941080sales campaignwebUSD127.0.0.1en-USDalvik/2.1.0 (Linux; U; Android 9; Android SDK built for x86 Build/PSR1.180720.075)https://www.google.com/search?q=estore+bestsellerprodViewGames;;11;148.39failureReportgeneric', + params: {}, + headers: { + 'Content-Type': 'application/xml', + }, + method: 'POST', + }, + httpRes: { + status: 200, + data: 'FAILURE', + }, + }, + { + httpReq: { + url: 'https://adobe.success.omtrdc.net/b/ss//6', + data: '127.0.1.0www.google.co.inGoogleid1110011prodViewGames;Monopoly;1;14.00,Games;UNO;2;6.90successreport', + params: {}, + headers: { + 'Content-Type': 'application/xml', + }, + method: 'POST', + }, + httpRes: { + status: 200, + data: 'SUCCESS', + }, + }, +]; From ede22e3f8fb60a9e36e2a3f5a5e86260255c49ef Mon Sep 17 00:00:00 2001 From: Mihir Bhalala <77438541+mihir-4116@users.noreply.github.com> Date: Tue, 12 Dec 2023 10:07:21 +0530 Subject: [PATCH 058/135] fix(integrations): onboard sprig destination (#2857) * fix(integrations): onboard sprig destination * chore: code review changes * chore: code review changes --- .../v2/destinations/sprig/procWorkflow.yaml | 73 +++ .../destinations/sprig/processor/data.ts | 504 ++++++++++++++++++ 2 files changed, 577 insertions(+) create mode 100644 src/cdk/v2/destinations/sprig/procWorkflow.yaml create mode 100644 test/integrations/destinations/sprig/processor/data.ts diff --git a/src/cdk/v2/destinations/sprig/procWorkflow.yaml b/src/cdk/v2/destinations/sprig/procWorkflow.yaml new file mode 100644 index 0000000000..18b46913fd --- /dev/null +++ b/src/cdk/v2/destinations/sprig/procWorkflow.yaml @@ -0,0 +1,73 @@ +bindings: + - name: EventType + path: ../../../../constants + - path: ../../bindings/jsontemplate + - name: defaultRequestConfig + path: ../../../../v0/util + - name: removeUndefinedAndNullValues + path: ../../../../v0/util + +steps: + - name: messageType + template: | + .message.type.toLowerCase(); + + - name: validateInput + template: | + let messageType = $.outputs.messageType; + $.assert(messageType, "message Type is not present. Aborting"); + $.assert(messageType in {{$.EventType.([.IDENTIFY, .TRACK])}}, "message type " + messageType + " is not supported"); + $.assertConfig(.destination.Config.apiKey, "API Key is not present. Aborting"); + + - name: validateIdentifyPayload + condition: $.outputs.messageType === {{$.EventType.IDENTIFY}} + template: | + const userId = .message.({{{{$.getGenericPaths("userIdOnly")}}}});; + $.assert(userId, "userId is required"); + + - name: prepareIdentifyPayload + condition: $.outputs.messageType === {{$.EventType.IDENTIFY}} + template: | + $.context.payload = .message.({ + userId: {{{{$.getGenericPaths("userIdOnly")}}}}, + emailAddress: {{{{$.getGenericPaths("email")}}}}, + attributes: .context.traits + }); + $.context.payload = $.removeUndefinedAndNullValues($.context.payload); + + - name: validateTrackPayload + condition: $.outputs.messageType === {{$.EventType.TRACK}} + template: | + const userId = .message.({{{{$.getGenericPaths("userIdOnly")}}}});; + $.assert(userId, "userId is required"); + $.assert(.message.event, "event name is required"); + + - name: prepareTrackPayload + condition: $.outputs.messageType === {{$.EventType.TRACK}} + template: | + $.context.payload = .message.({ + userId: {{{{$.getGenericPaths("userIdOnly")}}}}, + emailAddress: {{{{$.getGenericPaths("email")}}}} + }); + const events = [ + { + event: .message.event, + timestamp: $.toMilliseconds(.message.().({{{{$.getGenericPaths("timestamp")}}}})) + } + ] + $.context.payload.events = events; + $.context.payload = $.removeUndefinedAndNullValues($.context.payload); + + - name: buildResponse + template: | + const response = $.defaultRequestConfig(); + response.body.JSON = $.context.payload; + response.endpoint = "https://api.sprig.com/v2/users"; + response.headers = { + "accept": "application/json", + "content-type": "application/json", + "authorization": "API-Key " + .destination.Config.apiKey + }; + response + + diff --git a/test/integrations/destinations/sprig/processor/data.ts b/test/integrations/destinations/sprig/processor/data.ts new file mode 100644 index 0000000000..6b99e5e13b --- /dev/null +++ b/test/integrations/destinations/sprig/processor/data.ts @@ -0,0 +1,504 @@ +export const data = [ + { + name: 'sprig', + description: 'No message type', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user@1', + channel: 'web', + context: { + traits: { + email: 'test@gmail.com', + firstName: 'Test', + lastName: 'Ruddelabs', + }, + }, + originalTimestamp: '2023-11-10T14:42:44.724Z', + timestamp: '2023-11-22T10:12:44.75705:30', + }, + destination: { + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + Config: { + apiKey: 'testApiKey', + }, + }, + metadata: { + jobId: 1, + }, + }, + ], + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + jobId: 1, + }, + statusCode: 400, + error: + 'message Type is not present. Aborting: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: message Type is not present. Aborting', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'SPRIG', + module: 'destination', + implementation: 'cdkV2', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'sprig', + description: 'Unsupported message type', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user@1', + groupId: 'group@1', + channel: 'web', + context: { + traits: { + email: 'test@gmail.com', + firstName: 'Test', + lastName: 'Rudderstack', + }, + }, + traits: {}, + type: 'group', + originalTimestamp: '2023-11-10T14:42:44.724Z', + timestamp: '2023-11-22T10:12:44.75705:30', + }, + destination: { + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + Config: { + apiKey: 'testApiKey', + }, + }, + metadata: { + jobId: 2, + }, + }, + ], + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + jobId: 2, + }, + statusCode: 400, + error: + 'message type group is not supported: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: message type group is not supported', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'SPRIG', + module: 'destination', + implementation: 'cdkV2', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'sprig', + description: 'Missing config', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user@1', + channel: 'web', + context: { + traits: { + email: 'test@gmail.com', + firstName: 'Test', + lastName: 'Rudderstack', + }, + }, + type: 'identify', + originalTimestamp: '2023-11-10T14:42:44.724Z', + timestamp: '2023-11-22T10:12:44.75705:30', + }, + destination: { + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + Config: {}, + }, + metadata: { + jobId: 3, + }, + }, + ], + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + jobId: 3, + }, + statusCode: 400, + error: + 'API Key is not present. Aborting: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: API Key is not present. Aborting', + statTags: { + errorCategory: 'dataValidation', + errorType: 'configuration', + destType: 'SPRIG', + module: 'destination', + implementation: 'cdkV2', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'sprig', + description: 'Identify call without userId', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + anonymousId: 'anon@1', + context: { + traits: { + email: 'test@gmail.com', + firstName: 'Test', + lastName: 'Rudderlabs', + }, + }, + type: 'identify', + originalTimestamp: '2023-11-10T14:42:44.724Z', + timestamp: '2023-11-22T10:12:44.75705:30', + }, + destination: { + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + Config: { + apiKey: 'testApiKey', + }, + }, + metadata: { + jobId: 4, + }, + }, + ], + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + jobId: 4, + }, + statusCode: 400, + error: + 'userId is required: Workflow: procWorkflow, Step: validateIdentifyPayload, ChildStep: undefined, OriginalError: userId is required', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'SPRIG', + module: 'destination', + implementation: 'cdkV2', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'sprig', + description: 'Successful identify call', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + userId: 'user@1', + context: { + traits: { + email: 'test@gmail.com', + firstName: 'Test', + lastName: 'Rudderlabs', + }, + }, + type: 'identify', + originalTimestamp: '2023-11-10T14:42:44.724Z', + timestamp: '2023-11-22T10:12:44.75705:30', + }, + destination: { + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + Config: { + apiKey: 'testApiKey', + }, + }, + metadata: { + jobId: 5, + }, + }, + ], + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + jobId: 5, + }, + output: { + method: 'POST', + endpoint: 'https://api.sprig.com/v2/users', + headers: { + accept: 'application/json', + authorization: 'API-Key testApiKey', + 'content-type': 'application/json', + }, + body: { + JSON: { + attributes: { + email: 'test@gmail.com', + firstName: 'Test', + lastName: 'Rudderlabs', + }, + emailAddress: 'test@gmail.com', + userId: 'user@1', + }, + XML: {}, + FORM: {}, + JSON_ARRAY: {}, + }, + files: {}, + params: {}, + type: 'REST', + userId: '', + version: '1', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'sprig', + description: 'Track call with empty event name', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + userId: 'user@1', + context: { + traits: { + email: 'test@gmail.com', + firstName: 'Test', + lastName: 'Rudderlabs', + }, + }, + properties: {}, + type: 'track', + event: '', + originalTimestamp: '2020-11-29T19:11:00.337Z', + timestamp: '2023-11-29T19:11:00.337Z', + }, + destination: { + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + Config: { + apiKey: 'testApiKey', + }, + }, + metadata: { + jobId: 6, + }, + }, + ], + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + jobId: 6, + }, + statusCode: 400, + error: + 'event name is required: Workflow: procWorkflow, Step: validateTrackPayload, ChildStep: undefined, OriginalError: event name is required', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'SPRIG', + module: 'destination', + implementation: 'cdkV2', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'sprig', + description: 'Successful track call', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + userId: 'user@1', + context: { + traits: { + email: 'test@gmail.com', + firstName: 'Test', + lastName: 'Rudderlabs', + }, + }, + properties: {}, + type: 'track', + event: 'signup', + originalTimestamp: '2020-11-29T19:11:00.337Z', + timestamp: '2023-11-29T19:11:00.337Z', + }, + destination: { + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + Config: { + apiKey: 'testApiKey', + }, + }, + metadata: { + jobId: 7, + }, + }, + ], + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + jobId: 7, + }, + output: { + method: 'POST', + endpoint: 'https://api.sprig.com/v2/users', + headers: { + accept: 'application/json', + authorization: 'API-Key testApiKey', + 'content-type': 'application/json', + }, + body: { + JSON: { + emailAddress: 'test@gmail.com', + userId: 'user@1', + events: [ + { + event: 'signup', + timestamp: 1701285060337, + }, + ], + }, + XML: {}, + FORM: {}, + JSON_ARRAY: {}, + }, + files: {}, + params: {}, + type: 'REST', + userId: '', + version: '1', + }, + statusCode: 200, + }, + ], + }, + }, + }, +]; From bf39215dd1bbed482665c837a2bfabfcb751c753 Mon Sep 17 00:00:00 2001 From: Dilip Kola <33080863+koladilip@users.noreply.github.com> Date: Tue, 12 Dec 2023 10:32:08 +0530 Subject: [PATCH 059/135] fix: adobe_analytics event field check (#2890) When message doesn't contain event field there is no meaningful process we can do so considering it as instrumenation error. --- .../destinations/adobe_analytics/transform.js | 3 ++ .../adobe_analytics/processor/data.ts | 45 +++++++++++++++++++ 2 files changed, 48 insertions(+) diff --git a/src/v0/destinations/adobe_analytics/transform.js b/src/v0/destinations/adobe_analytics/transform.js index 8bac0edd70..b428138724 100644 --- a/src/v0/destinations/adobe_analytics/transform.js +++ b/src/v0/destinations/adobe_analytics/transform.js @@ -346,6 +346,9 @@ const processTrackEvent = (message, adobeEventName, destinationConfig, extras = const handleTrack = (message, destinationConfig) => { const ORDER_ID_KEY = 'properties.order_id'; const { event: rawEvent, properties } = message; + if (!rawEvent) { + throw new InstrumentationError('Event name is not present. Aborting message.'); + } let payload = null; // handle ecommerce events separately // generic events should go to the default diff --git a/test/integrations/destinations/adobe_analytics/processor/data.ts b/test/integrations/destinations/adobe_analytics/processor/data.ts index 690639c057..fa050897c9 100644 --- a/test/integrations/destinations/adobe_analytics/processor/data.ts +++ b/test/integrations/destinations/adobe_analytics/processor/data.ts @@ -3057,4 +3057,49 @@ export const data = [ }, }, }, + { + name: 'adobe_analytics', + description: 'Test 17: Event is missing for track', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '78c53c15-32a1-4b65-adac-bec2d7bb8fab', + channel: 'web', + originalTimestamp: '2020-01-09T10:01:53.558Z', + type: 'track', + sentAt: '2020-01-09T10:02:03.257Z', + }, + destination: { + Config: {}, + }, + }, + ], + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Event name is not present. Aborting message.', + statTags: { + destType: 'ADOBE_ANALYTICS', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, ]; From 1a86a0723e3f5fb6fdf9cf1dc716a47c6da16745 Mon Sep 17 00:00:00 2001 From: Ujjwal Abhishek <63387036+ujjwal-ab@users.noreply.github.com> Date: Tue, 12 Dec 2023 11:12:53 +0530 Subject: [PATCH 060/135] fix: add check to remove empty properties object from payload (#2896) --- src/v0/destinations/klaviyo/transform.js | 4 + test/__tests__/data/klaviyo.json | 144 +++++++++++++++++++++++ 2 files changed, 148 insertions(+) diff --git a/src/v0/destinations/klaviyo/transform.js b/src/v0/destinations/klaviyo/transform.js index 7c9061fc41..9273b6a048 100644 --- a/src/v0/destinations/klaviyo/transform.js +++ b/src/v0/destinations/klaviyo/transform.js @@ -93,6 +93,10 @@ const identifyRequestHandler = async (message, category, destination, reqMetadat data.attributes.properties = flattenProperties ? flattenJson(data.attributes.properties, '.', 'normal', false) : data.attributes.properties; + + if (isEmptyObject(data.attributes.properties)) { + delete data.attributes.properties; + } const payload = { data: removeUndefinedAndNullValues(data), }; diff --git a/test/__tests__/data/klaviyo.json b/test/__tests__/data/klaviyo.json index 796d9ed8e0..623aa78cc4 100644 --- a/test/__tests__/data/klaviyo.json +++ b/test/__tests__/data/klaviyo.json @@ -636,6 +636,150 @@ } ] }, + { + "description": "Identify call without user custom Properties", + "input": { + "destination": { + "Config": { + "publicApiKey": "dummyPublicApiKey", + "privateApiKey": "dummyPrivateApiKey", + "enforceEmailAsPrimary": false + } + }, + "message": { + "type": "identify", + "sentAt": "2021-01-03T17:02:53.195Z", + "userId": "user@1", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.1.11", + "namespace": "com.rudderlabs.javascript" + }, + "traits": { + "firstName": "Test", + "lastName": "Rudderlabs", + "email": "test@rudderstack.com", + "phone": "+12 345 578 900", + "userId": "user@1", + "title": "Developer", + "organization": "Rudder", + "city": "Tokyo", + "region": "Kanto", + "country": "JP", + "zip": "100-0001", + "properties": { + "listId": "XUepkK", + "subscribe": true, + "consent": ["email", "sms"] + } + }, + "locale": "en-US", + "screen": { + "density": 2 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.11" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" + }, + "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", + "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", + "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", + "integrations": { + "All": true + }, + "originalTimestamp": "2021-01-03T17:02:53.193Z" + } + }, + "output": [ + { + "version": "1", + "type": "REST", + "method": "PATCH", + "endpoint": "https://a.klaviyo.com/api/profiles/01GW3PHVY0MTCDGS0A1612HARX", + "headers": { + "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", + "Content-Type": "application/json", + "Accept": "application/json", + "revision": "2023-02-22" + }, + "params": {}, + "body": { + "JSON": { + "data": { + "type": "profile", + "attributes": { + "email": "test@rudderstack.com", + "first_name": "Test", + "last_name": "Rudderlabs", + "phone_number": "+12 345 578 900", + "external_id": "user@1", + "title": "Developer", + "organization": "Rudder", + "location": { + "city": "Tokyo", + "region": "Kanto", + "country": "JP", + "zip": "100-0001" + } + }, + "id": "01GW3PHVY0MTCDGS0A1612HARX" + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {} + }, + { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://a.klaviyo.com/api/profile-subscription-bulk-create-jobs", + "headers": { + "Content-Type": "application/json", + "Accept": "application/json", + "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", + "revision": "2023-02-22" + }, + "params": {}, + "body": { + "JSON": { + "data": { + "type": "profile-subscription-bulk-create-job", + "attributes": { + "list_id": "XUepkK", + "subscriptions": [ + { + "email": "test@rudderstack.com", + "phone_number": "+12 345 578 900", + "channels": { + "email": ["MARKETING"], + "sms": ["MARKETING"] + } + } + ] + } + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {} + } + ] + }, { "description": "Identify call without email and phone & enforceEmailAsPrimary enabled from UI", "input": { From ec974ba625ac09fb511a63304eb71ba306af67ca Mon Sep 17 00:00:00 2001 From: Dilip Kola <33080863+koladilip@users.noreply.github.com> Date: Tue, 12 Dec 2023 11:17:47 +0530 Subject: [PATCH 061/135] Update prepare-for-prod-deploy.yml --- .github/workflows/prepare-for-prod-deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/prepare-for-prod-deploy.yml b/.github/workflows/prepare-for-prod-deploy.yml index 0a2939ac2c..7750761a33 100644 --- a/.github/workflows/prepare-for-prod-deploy.yml +++ b/.github/workflows/prepare-for-prod-deploy.yml @@ -1,4 +1,4 @@ -name: Prepare for Production Environment Deployment +name: Prepare for DT Production Environment Deployment on: push: From a7df54f33ce95a2557d5234a4b79b9129afcb190 Mon Sep 17 00:00:00 2001 From: Dilip Kola <33080863+koladilip@users.noreply.github.com> Date: Tue, 12 Dec 2023 11:18:09 +0530 Subject: [PATCH 062/135] Update prepare-for-prod-ut-deploy.yml --- .github/workflows/prepare-for-prod-ut-deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/prepare-for-prod-ut-deploy.yml b/.github/workflows/prepare-for-prod-ut-deploy.yml index 1cb300512c..2da3c9d067 100644 --- a/.github/workflows/prepare-for-prod-ut-deploy.yml +++ b/.github/workflows/prepare-for-prod-ut-deploy.yml @@ -1,4 +1,4 @@ -name: Prepare for Production Environment Deployment +name: Prepare for UT Production Environment Deployment on: push: From a6641586eee8410e515269c2823a0b00fdc50306 Mon Sep 17 00:00:00 2001 From: Dilip Kola <33080863+koladilip@users.noreply.github.com> Date: Tue, 12 Dec 2023 11:18:41 +0530 Subject: [PATCH 063/135] Rename prepare-for-prod-deploy.yml to prepare-for-prod-dt-deploy.yml --- ...prepare-for-prod-deploy.yml => prepare-for-prod-dt-deploy.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{prepare-for-prod-deploy.yml => prepare-for-prod-dt-deploy.yml} (100%) diff --git a/.github/workflows/prepare-for-prod-deploy.yml b/.github/workflows/prepare-for-prod-dt-deploy.yml similarity index 100% rename from .github/workflows/prepare-for-prod-deploy.yml rename to .github/workflows/prepare-for-prod-dt-deploy.yml From 69b74d4cff6f0dd112b6f2444e3a73f59e0727c2 Mon Sep 17 00:00:00 2001 From: Dilip Kola <33080863+koladilip@users.noreply.github.com> Date: Tue, 12 Dec 2023 11:20:59 +0530 Subject: [PATCH 064/135] Update build-push-docker-image.yml --- .github/workflows/build-push-docker-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-push-docker-image.yml b/.github/workflows/build-push-docker-image.yml index c57e74c81b..68360df6fc 100644 --- a/.github/workflows/build-push-docker-image.yml +++ b/.github/workflows/build-push-docker-image.yml @@ -151,7 +151,7 @@ jobs: docker buildx imagetools create -t ${{ inputs.push_tags }} ${{ inputs.push_tags }}-amd64 ${{ inputs.push_tags }}-arm64 - name: Create latest multi-arch manifest - # To be triggered only for release/hotfix PR merges coming from `prepare-for-prod-deploy.yaml` + # To be triggered only for release/hotfix PR merges coming from `prepare-for-prod-dt-deploy.yaml` if: ${{ inputs.build_type == 'dt' }} run: | docker buildx imagetools create -t rudderstack/rudder-transformer:latest ${{ inputs.push_tags }}-amd64 ${{ inputs.push_tags }}-arm64 From 50e921d1451bf7016e60b2e238b8f842d72b5b71 Mon Sep 17 00:00:00 2001 From: Dilip Kola <33080863+koladilip@users.noreply.github.com> Date: Tue, 12 Dec 2023 11:34:22 +0530 Subject: [PATCH 065/135] fix: missing null check in braze populateCustomAttributesWithOperation (#2897) Found logs for this error: Failure occurred during custom attributes operations TypeError: Cannot read properties of null (reading 'update') --- src/v0/destinations/braze/transform.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/v0/destinations/braze/transform.js b/src/v0/destinations/braze/transform.js index 38a5947ded..99b4a93e97 100644 --- a/src/v0/destinations/braze/transform.js +++ b/src/v0/destinations/braze/transform.js @@ -95,7 +95,10 @@ function populateCustomAttributesWithOperation( // add,update,remove on json attributes if (enableNestedArrayOperations) { Object.keys(traits) - .filter((key) => typeof traits[key] === 'object' && !Array.isArray(traits[key])) + .filter( + (key) => + traits[key] !== null && typeof traits[key] === 'object' && !Array.isArray(traits[key]), + ) .forEach((key) => { if (traits[key][CustomAttributeOperationTypes.UPDATE]) { CustomAttributeOperationUtil.customAttributeUpdateOperation( From da36d8979ee917c0030cf3f1d8b5cc38e099abc3 Mon Sep 17 00:00:00 2001 From: Dilip Kola <33080863+koladilip@users.noreply.github.com> Date: Tue, 12 Dec 2023 12:06:33 +0530 Subject: [PATCH 066/135] chore(INT-850): upgrade dependencies (#2807) chore: upgrade dependencies --- package-lock.json | 200 +++++++++++++----- package.json | 2 +- src/cdk/v2/destinations/gladly/utils.js | 27 ++- src/constants/destinationCanonicalNames.js | 2 +- src/util/openfaas/index.js | 32 +-- test/__tests__/data/am_input.json | 9 +- test/__tests__/data/am_output.json | 6 +- .../destinations/gladly/processor/data.ts | 2 +- .../destinations/gladly/router/data.ts | 2 +- .../snapchat_conversion/processor/data.ts | 26 +-- 10 files changed, 189 insertions(+), 119 deletions(-) diff --git a/package-lock.json b/package-lock.json index 27655f81ef..61501c6c08 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4805,15 +4805,73 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.22.5", - "license": "MIT", + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", + "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", "dependencies": { - "@babel/highlight": "^7.22.5" + "@babel/highlight": "^7.22.13", + "chalk": "^2.4.2" }, "engines": { "node": ">=6.9.0" } }, + "node_modules/@babel/code-frame/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@babel/code-frame/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" + }, + "node_modules/@babel/code-frame/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/@babel/compat-data": { "version": "7.22.6", "dev": true, @@ -4852,11 +4910,12 @@ } }, "node_modules/@babel/generator": { - "version": "7.22.5", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", + "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/types": "^7.22.5", + "@babel/types": "^7.23.0", "@jridgewell/gen-mapping": "^0.3.2", "@jridgewell/trace-mapping": "^0.3.17", "jsesc": "^2.5.1" @@ -4897,20 +4956,22 @@ } }, "node_modules/@babel/helper-environment-visitor": { - "version": "7.22.5", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", "dev": true, - "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-function-name": { - "version": "7.22.5", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/template": "^7.22.5", - "@babel/types": "^7.22.5" + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" }, "engines": { "node": ">=6.9.0" @@ -4995,8 +5056,9 @@ } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.5", - "license": "MIT", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", "engines": { "node": ">=6.9.0" } @@ -5023,11 +5085,12 @@ } }, "node_modules/@babel/highlight": { - "version": "7.22.5", - "license": "MIT", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", + "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", "dependencies": { - "@babel/helper-validator-identifier": "^7.22.5", - "chalk": "^2.0.0", + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", "js-tokens": "^4.0.0" }, "engines": { @@ -5036,7 +5099,8 @@ }, "node_modules/@babel/highlight/node_modules/ansi-styles": { "version": "3.2.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dependencies": { "color-convert": "^1.9.0" }, @@ -5046,7 +5110,8 @@ }, "node_modules/@babel/highlight/node_modules/chalk": { "version": "2.4.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dependencies": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", @@ -5058,25 +5123,29 @@ }, "node_modules/@babel/highlight/node_modules/color-convert": { "version": "1.9.3", - "license": "MIT", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "dependencies": { "color-name": "1.1.3" } }, "node_modules/@babel/highlight/node_modules/color-name": { "version": "1.1.3", - "license": "MIT" + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" }, "node_modules/@babel/highlight/node_modules/has-flag": { "version": "3.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", "engines": { "node": ">=4" } }, "node_modules/@babel/highlight/node_modules/supports-color": { "version": "5.5.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dependencies": { "has-flag": "^3.0.0" }, @@ -5085,9 +5154,10 @@ } }, "node_modules/@babel/parser": { - "version": "7.22.6", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", + "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", "dev": true, - "license": "MIT", "bin": { "parser": "bin/babel-parser.js" }, @@ -5259,31 +5329,33 @@ } }, "node_modules/@babel/template": { - "version": "7.22.5", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", + "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.22.5", - "@babel/parser": "^7.22.5", - "@babel/types": "^7.22.5" + "@babel/code-frame": "^7.22.13", + "@babel/parser": "^7.22.15", + "@babel/types": "^7.22.15" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.22.6", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", + "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.22.5", - "@babel/generator": "^7.22.5", - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-function-name": "^7.22.5", + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.23.0", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", "@babel/helper-hoist-variables": "^7.22.5", "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.22.6", - "@babel/types": "^7.22.5", + "@babel/parser": "^7.23.0", + "@babel/types": "^7.23.0", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -5300,12 +5372,13 @@ } }, "node_modules/@babel/types": { - "version": "7.22.5", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", + "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" }, "engines": { @@ -6639,9 +6712,9 @@ } }, "node_modules/@rudderstack/integrations-lib": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/@rudderstack/integrations-lib/-/integrations-lib-0.1.8.tgz", - "integrity": "sha512-f8GX78RFma3XAWPNEI6QjGk4avbE8r9aspHNaYE+YyRKsJGWrl8gw/k+Jso36C0juOGas79GWPSiypbXLu8Q/g==", + "version": "0.1.9", + "resolved": "https://registry.npmjs.org/@rudderstack/integrations-lib/-/integrations-lib-0.1.9.tgz", + "integrity": "sha512-ROi/LfI7PXqKDrjSig+1Rf2TQ8MgxJGJ7sAD1B0PmRKELQpxK6PLt8QF+vKXl8wYILQu2gwTkZ5o+uwmNKxGzg==", "dependencies": { "@rudderstack/workflow-engine": "^0.5.7", "axios": "^1.4.0", @@ -6706,9 +6779,9 @@ } }, "node_modules/@rudderstack/json-template-engine": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/@rudderstack/json-template-engine/-/json-template-engine-0.8.2.tgz", - "integrity": "sha512-9oMBnqgNuwiXd7MUlNOAchCnJXQAy6w6XGmDqDM6iXdYDkvqYFiq7sbg5j4SdtpTTST293hahREr5PXfFVzVKg==" + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@rudderstack/json-template-engine/-/json-template-engine-0.8.1.tgz", + "integrity": "sha512-MR2ArfOXEDh9FEj/N3LVLjIxf134wq+YxUdZN4gTLEONIPdna97QeNk4hnhtlob0QQIrWr13mfPaU9FpvU2Q6Q==" }, "node_modules/@rudderstack/workflow-engine": { "version": "0.6.9", @@ -6770,9 +6843,9 @@ } }, "node_modules/@rudderstack/workflow-engine/node_modules/@smithy/util-utf8": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.0.2.tgz", - "integrity": "sha512-qOiVORSPm6Ce4/Yu6hbSgNHABLP2VMv8QOC3tTDNHHlWY19pPyc++fBTbZPtx6egPXi4HQxKDnMxVxpbtX2GoA==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.0.0.tgz", + "integrity": "sha512-rctU1VkziY84n5OXe3bPNpKR001ZCME2JCaBBFgtiM2hfKbHFudc/BkMuPab8hRbLd0j3vbnBTTZ1igBf0wgiQ==", "dependencies": { "@smithy/util-buffer-from": "^2.0.0", "tslib": "^2.5.0" @@ -14903,7 +14976,8 @@ }, "node_modules/js-tokens": { "version": "4.0.0", - "license": "MIT" + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" }, "node_modules/js-yaml": { "version": "4.1.0", @@ -16307,9 +16381,16 @@ "license": "MIT" }, "node_modules/nanoid": { - "version": "3.3.4", + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", "dev": true, - "license": "MIT", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], "bin": { "nanoid": "bin/nanoid.cjs" }, @@ -17071,7 +17152,9 @@ } }, "node_modules/postcss": { - "version": "8.4.21", + "version": "8.4.31", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz", + "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==", "dev": true, "funding": [ { @@ -17081,11 +17164,14 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ], - "license": "MIT", "dependencies": { - "nanoid": "^3.3.4", + "nanoid": "^3.3.6", "picocolors": "^1.0.0", "source-map-js": "^1.0.2" }, diff --git a/package.json b/package.json index a36ac26e9c..7f4aa1c5a5 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "lint:fix": "eslint . --fix", "lint:fix:json": "eslint --ext .json --fix .", "check:merge": "npm run verify || exit 1; codecov", - "start": "node ./dist/src/index.js", + "start": "cd dist;node ./src/index.js;cd ..", "build:start": "npm run build && npm run start", "build:ci": "tsc -p tsconfig.json", "build:swagger": "npm run build && npm run setup:swagger", diff --git a/src/cdk/v2/destinations/gladly/utils.js b/src/cdk/v2/destinations/gladly/utils.js index 5abc9b6dd0..0489f410ec 100644 --- a/src/cdk/v2/destinations/gladly/utils.js +++ b/src/cdk/v2/destinations/gladly/utils.js @@ -1,9 +1,6 @@ const get = require('get-value'); const { InstrumentationError } = require('@rudderstack/integrations-lib'); -const { - base64Convertor, - getDestinationExternalID, -} = require('../../../../v0/util'); +const { base64Convertor, getDestinationExternalID } = require('../../../../v0/util'); const { MappedToDestinationKey } = require('../../../../constants'); const reservedCustomAttributes = [ @@ -35,7 +32,6 @@ const getEndpoint = (destination) => { return `https://${domain}/api/v1/customer-profiles`; }; - const getFieldValue = (field) => { if (field) { if (Array.isArray(field)) { @@ -44,7 +40,7 @@ const getFieldValue = (field) => { return [{ original: field }]; } return undefined; -} +}; const formatFieldForRETl = (message, fieldName) => { const identifierType = get(message, identifierTypeKey); @@ -70,7 +66,6 @@ const formatField = (message, fieldName) => { return formatFieldForRETl(message, fieldName); } return formatFieldForEventStream(message, fieldName); - }; const getCustomAttributes = (message) => { @@ -78,7 +73,9 @@ const getCustomAttributes = (message) => { // for rETL if (mappedToDestination) { if (message?.traits?.customAttributes && typeof message.traits.customAttributes === 'object') { - return Object.keys(message.traits.customAttributes).length > 0 ? message.traits.customAttributes : undefined; + return Object.keys(message.traits.customAttributes).length > 0 + ? message.traits.customAttributes + : undefined; } return undefined; } @@ -140,25 +137,27 @@ const getCustomerId = (message) => { const validatePayload = (payload) => { if (!(payload?.phones || payload?.emails || payload?.id || payload?.externalCustomerId)) { - throw new InstrumentationError('One of phone, email, userId or GladlyCustomerId is required for an identify call'); + throw new InstrumentationError( + 'One of phone, email, userId or GladlyCustomerId is required for an identify call', + ); } }; const getQueryParams = (payload) => { if (payload.emails && payload.emails.length > 0) { - return `email=${encodeURIComponent(payload.emails[0].original)}` + return `email=${encodeURIComponent(payload.emails[0].original)}`; } if (payload.phones && payload.phones.length > 0) { - return `phoneNumber=${encodeURIComponent(payload.phones[0].original)}` + return `phoneNumber=${encodeURIComponent(payload.phones[0].original)}`; } if (payload.externalCustomerId) { - return `externalCustomerId=${encodeURIComponent(payload.externalCustomerId)}` + return `externalCustomerId=${encodeURIComponent(payload.externalCustomerId)}`; } return undefined; -} +}; module.exports = { getHeaders, @@ -171,5 +170,5 @@ module.exports = { formatFieldForRETl, getCustomAttributes, getExternalCustomerId, - formatFieldForEventStream + formatFieldForEventStream, }; diff --git a/src/constants/destinationCanonicalNames.js b/src/constants/destinationCanonicalNames.js index 48e7c6d8bb..d1e199c9e2 100644 --- a/src/constants/destinationCanonicalNames.js +++ b/src/constants/destinationCanonicalNames.js @@ -140,7 +140,7 @@ const DestCanonicalNames = { 'twitter_ads', 'TWITTER_ADS', ], - BRAZE: ['BRAZE', 'Braze', 'braze'] + BRAZE: ['BRAZE', 'Braze', 'braze'], }; module.exports = { DestHandlerMap, DestCanonicalNames }; diff --git a/src/util/openfaas/index.js b/src/util/openfaas/index.js index 2792003f4a..878fa706d9 100644 --- a/src/util/openfaas/index.js +++ b/src/util/openfaas/index.js @@ -247,24 +247,13 @@ const executeFaasFunction = async ( try { if (testMode) await awaitFunctionReadiness(name); return await invokeFunction(name, events); - } catch (error) { logger.error(`Error while invoking ${name}: ${error.message}`); errorRaised = error; - if ( - error.statusCode === 404 && - error.message.includes(`error finding function ${name}`) - ) { + if (error.statusCode === 404 && error.message.includes(`error finding function ${name}`)) { removeFunctionFromCache(name); - await setupFaasFunction( - name, - null, - versionId, - libraryVersionIDs, - testMode, - trMetadata, - ); + await setupFaasFunction(name, null, versionId, libraryVersionIDs, testMode, trMetadata); throw new RetryRequestError(`${name} not found`); } @@ -284,22 +273,23 @@ const executeFaasFunction = async ( } finally { // delete the function created, if it's called as part of testMode if (testMode) { - deleteFunction(name).catch((err) => - logger.error(`[Faas] Error while deleting ${name}: ${err.message}`)) + deleteFunction(name).catch((err) => + logger.error(`[Faas] Error while deleting ${name}: ${err.message}`), + ); } // setup the tags for observability and then fire the stats const tags = { - identifier: "openfaas", + identifier: 'openfaas', testMode: testMode, errored: errorRaised ? true : false, statusCode: errorRaised ? errorRaised.statusCode : HTTP_STATUS_CODES.OK, // default statuscode is 200OK - ...events.length && events[0].metadata ? getMetadata(events[0].metadata) : {}, - ...events.length && events[0].metadata ? getTransformationMetadata(events[0].metadata) : {}, - } + ...(events.length && events[0].metadata ? getMetadata(events[0].metadata) : {}), + ...(events.length && events[0].metadata ? getTransformationMetadata(events[0].metadata) : {}), + }; - stats.counter('user_transform_function_input_events', events.length, tags) - stats.timing('user_transform_function_latency', startTime, tags) + stats.counter('user_transform_function_input_events', events.length, tags); + stats.timing('user_transform_function_latency', startTime, tags); } }; diff --git a/test/__tests__/data/am_input.json b/test/__tests__/data/am_input.json index 126d235787..2eecfb1d2c 100644 --- a/test/__tests__/data/am_input.json +++ b/test/__tests__/data/am_input.json @@ -1074,9 +1074,7 @@ "CHILD_KEY_102": "value_103" }, "name_trait": "Company", - "value_trait": [ - "ABC" - ] + "value_trait": ["ABC"] }, "sentAt": "2020-10-20T07:54:58.983Z" }, @@ -4313,8 +4311,7 @@ "All": true }, "messageId": "1662393883248-509420bf-b812-4f8d-bdb2-8c811bfde87f", - "properties": { - }, + "properties": {}, "originalTimestamp": "2022-09-05T16:04:43.250Z", "type": "screen", "userId": "User Android" @@ -4943,4 +4940,4 @@ } } } -] \ No newline at end of file +] diff --git a/test/__tests__/data/am_output.json b/test/__tests__/data/am_output.json index 5a9c674113..6744a9dcef 100644 --- a/test/__tests__/data/am_output.json +++ b/test/__tests__/data/am_output.json @@ -757,9 +757,7 @@ "JSON_ARRAY": {}, "FORM": { "api_key": "abcde", - "identification": [ - "{\"group_type\":\"Company\",\"group_value\":\"ABC\"}" - ] + "identification": ["{\"group_type\":\"Company\",\"group_value\":\"ABC\"}"] } }, "files": {}, @@ -4468,4 +4466,4 @@ "files": {}, "userId": "anon-id-new" } -] \ No newline at end of file +] diff --git a/test/integrations/destinations/gladly/processor/data.ts b/test/integrations/destinations/gladly/processor/data.ts index 211fa78134..e81af999fb 100644 --- a/test/integrations/destinations/gladly/processor/data.ts +++ b/test/integrations/destinations/gladly/processor/data.ts @@ -780,7 +780,7 @@ export const data = [ body: { JSON: { address: 'Pakistan', - emails: [{original: 'abc'}], + emails: [{ original: 'abc' }], id: 'user@10', }, XML: {}, diff --git a/test/integrations/destinations/gladly/router/data.ts b/test/integrations/destinations/gladly/router/data.ts index d3339d8108..413c92e247 100644 --- a/test/integrations/destinations/gladly/router/data.ts +++ b/test/integrations/destinations/gladly/router/data.ts @@ -322,7 +322,7 @@ export const data = [ identifierType: 'externalCustomerId', }, ], - mappedToDestination: true + mappedToDestination: true, }, traits: { id: 'user@1', diff --git a/test/integrations/destinations/snapchat_conversion/processor/data.ts b/test/integrations/destinations/snapchat_conversion/processor/data.ts index baa2b2b99e..b0d14208cc 100644 --- a/test/integrations/destinations/snapchat_conversion/processor/data.ts +++ b/test/integrations/destinations/snapchat_conversion/processor/data.ts @@ -4344,7 +4344,7 @@ export const data = [ }, ], userAgent: - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', }, type: 'track', event: 'Order Completed', @@ -4362,7 +4362,7 @@ export const data = [ quantity: 3, }, ], - category: 'shoes' + category: 'shoes', }, integrations: { All: true, @@ -4417,16 +4417,16 @@ export const data = [ event_type: 'PURCHASE', item_ids: ['123', '124'], brands: ['brand01', 'brand02'], - item_category: "shoes", + item_category: 'shoes', price: '56', hashed_email: '73062d872926c2a556f17b36f50e328ddf9bff9d403939bd14b6c3b7f5a33fc2', hashed_phone_number: - 'bc77d64d7045fe44795ed926df37231a0cfb6ec6b74588c512790e9f143cc492', + 'bc77d64d7045fe44795ed926df37231a0cfb6ec6b74588c512790e9f143cc492', hashed_mobile_ad_id: - 'f9779d734aaee50f16ee0011260bae7048f1d9a128c62b6a661077875701edd2', + 'f9779d734aaee50f16ee0011260bae7048f1d9a128c62b6a661077875701edd2', hashed_idfv: '54bd0b26a3d39dad90f5149db49b9fd9ba885f8e35d1d94cae69273f5e657b9f', user_agent: - 'mozilla/5.0 (macintosh; intel mac os x 10_15_2) applewebkit/537.36 (khtml, like gecko) chrome/79.0.3945.88 safari/537.36', + 'mozilla/5.0 (macintosh; intel mac os x 10_15_2) applewebkit/537.36 (khtml, like gecko) chrome/79.0.3945.88 safari/537.36', timestamp: '1650625078', event_conversion_type: 'MOBILE_APP', snap_app_id: 'hfhdhfd', @@ -4498,7 +4498,7 @@ export const data = [ }, ], userAgent: - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', }, type: 'track', event: 'Order Completed', @@ -4517,7 +4517,7 @@ export const data = [ }, ], category: 'shoes', - item_category: 'glass' + item_category: 'glass', }, integrations: { All: true, @@ -4572,16 +4572,16 @@ export const data = [ event_type: 'PURCHASE', item_ids: ['123', '124'], brands: ['brand01', 'brand02'], - item_category: "glass", + item_category: 'glass', price: '56', hashed_email: '73062d872926c2a556f17b36f50e328ddf9bff9d403939bd14b6c3b7f5a33fc2', hashed_phone_number: - 'bc77d64d7045fe44795ed926df37231a0cfb6ec6b74588c512790e9f143cc492', + 'bc77d64d7045fe44795ed926df37231a0cfb6ec6b74588c512790e9f143cc492', hashed_mobile_ad_id: - 'f9779d734aaee50f16ee0011260bae7048f1d9a128c62b6a661077875701edd2', + 'f9779d734aaee50f16ee0011260bae7048f1d9a128c62b6a661077875701edd2', hashed_idfv: '54bd0b26a3d39dad90f5149db49b9fd9ba885f8e35d1d94cae69273f5e657b9f', user_agent: - 'mozilla/5.0 (macintosh; intel mac os x 10_15_2) applewebkit/537.36 (khtml, like gecko) chrome/79.0.3945.88 safari/537.36', + 'mozilla/5.0 (macintosh; intel mac os x 10_15_2) applewebkit/537.36 (khtml, like gecko) chrome/79.0.3945.88 safari/537.36', timestamp: '1650625078', event_conversion_type: 'MOBILE_APP', snap_app_id: 'hfhdhfd', @@ -4599,7 +4599,7 @@ export const data = [ ], }, }, - } + }, ].map((tc) => ({ ...tc, mockFns: (_) => { From 4a7eaa09000bcb82eb7f217d500223939bd9b07b Mon Sep 17 00:00:00 2001 From: Dilip Kola <33080863+koladilip@users.noreply.github.com> Date: Tue, 12 Dec 2023 12:07:04 +0530 Subject: [PATCH 067/135] fix: mailjet source transformation by adding email exists check (#2889) mailjet code uses md5 method to hash email for using it as userId when actual userId is not found in the event and when email doesn't exists then md5 throwing an error so added check before calling md5 method. --- src/v0/sources/mailjet/transform.js | 2 +- test/__tests__/data/mailjet_source.json | 45 +++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 1 deletion(-) diff --git a/src/v0/sources/mailjet/transform.js b/src/v0/sources/mailjet/transform.js index fcc27611bb..d2719cc0ba 100644 --- a/src/v0/sources/mailjet/transform.js +++ b/src/v0/sources/mailjet/transform.js @@ -40,7 +40,7 @@ function process(event) { } message.context.externalId = externalId; - if (message.userId === null || message.userId === undefined) { + if (!message.userId && event.email) { // Treating userId as unique identifier // If userId is not present, then generating it from email using md5 hash function message.userId = md5(event.email); diff --git a/test/__tests__/data/mailjet_source.json b/test/__tests__/data/mailjet_source.json index ba7f32fb89..d9869585cb 100644 --- a/test/__tests__/data/mailjet_source.json +++ b/test/__tests__/data/mailjet_source.json @@ -200,5 +200,50 @@ "userId": "5b6a3426dba2cb24e4f0aeec43bee9d7" } } + }, + { + "description": "MailJet when no email is present", + "input": { + "event": "bounce", + "time": 1664444170, + "MessageID": 56013522696710744, + "Message_GUID": "dbe4f0a3-4a5a-4784-a724-a9794d3c0444", + "mj_campaign_id": 108892, + "mj_contact_id": 373142182, + "customcampaign": "mj.nl=58486", + "blocked": false, + "hard_bounce": false, + "error_related_to": "system", + "error": "connection issue" + }, + "output": { + "Message": { + "context": { + "library": { + "name": "unknown", + "version": "unknown" + }, + "integration": { + "name": "MailJet" + }, + "externalId": [ + { + "type": "mailjetContactId", + "id": 373142182 + } + ] + }, + "integrations": { + "MailJet": false + }, + "type": "track", + "event": "bounce", + "properties": { + "customcampaign": "mj.nl=58486", + "mj_campaign_id": 108892 + }, + "originalTimestamp": "2022-09-29T09:36:10.000Z" + } + } } ] From bed431e1de94ab28df1ee592d083a1481b960b6d Mon Sep 17 00:00:00 2001 From: AASHISH MALIK Date: Tue, 12 Dec 2023 13:42:43 +0530 Subject: [PATCH 068/135] fix: covert toString before toLowercase (#2830) * fix: covert toString before toLowercase * fix: throw error if not valid email --- src/v0/destinations/active_campaign/util.js | 2 +- src/v0/destinations/adobe_analytics/config.js | 2 +- .../adobe_analytics/networkHandler.js | 17 +- src/v0/destinations/braze/transform.js | 10 +- .../util/errorTypes/transformerProxyError.js | 2 +- .../campaign_manager/networkHandler.js | 18 +- test/__tests__/data/braze_input.json | 45 + test/__tests__/data/braze_output.json | 4 + test/__tests__/data/marketo_router_input.json | 2006 +++--- .../data/marketo_router_metadata_input.json | 16 +- .../__tests__/data/marketo_router_output.json | 72 +- .../destinations/webhook/processor/data.ts | 5520 ++++++++--------- .../destinations/webhook/router/data.ts | 2 +- 13 files changed, 3831 insertions(+), 3885 deletions(-) diff --git a/src/v0/destinations/active_campaign/util.js b/src/v0/destinations/active_campaign/util.js index 457413c3e2..40e15f95b3 100644 --- a/src/v0/destinations/active_campaign/util.js +++ b/src/v0/destinations/active_campaign/util.js @@ -6,7 +6,7 @@ const { const tags = require('../../util/tags'); const errorHandler = (httpCallError, message) => { - const {response, status} = processAxiosResponse(httpCallError); + const { response, status } = processAxiosResponse(httpCallError); let msg = message; if (response) { msg = `${message} (${httpCallError.response?.statusText},${JSON.stringify(response)})`; diff --git a/src/v0/destinations/adobe_analytics/config.js b/src/v0/destinations/adobe_analytics/config.js index 232fe61f7f..ed5852f5a5 100644 --- a/src/v0/destinations/adobe_analytics/config.js +++ b/src/v0/destinations/adobe_analytics/config.js @@ -44,5 +44,5 @@ module.exports = { ECOM_PRODUCT_EVENTS, commonConfig: MAPPING_CONFIG[CONFIG_CATEGORIES.COMMON.name], formatDestinationConfig, - DESTINATION: 'ADOBE_ANALYTICS' + DESTINATION: 'ADOBE_ANALYTICS', }; diff --git a/src/v0/destinations/adobe_analytics/networkHandler.js b/src/v0/destinations/adobe_analytics/networkHandler.js index b5b58ade0c..0ec1fad286 100644 --- a/src/v0/destinations/adobe_analytics/networkHandler.js +++ b/src/v0/destinations/adobe_analytics/networkHandler.js @@ -1,15 +1,12 @@ const { InstrumentationError } = require('@rudderstack/integrations-lib'); const { proxyRequest, prepareProxyRequest } = require('../../../adapters/network'); -const { - processAxiosResponse, -} = require('../../../adapters/utils/networkUtils'); +const { processAxiosResponse } = require('../../../adapters/utils/networkUtils'); const { DESTINATION } = require('./config'); - /** * Extract data inside different tags from an xml payload - * @param {*} xml - * @param {*} tagName + * @param {*} xml + * @param {*} tagName * @returns data inside the tagName */ function extractContent(xmlPayload, tagName) { @@ -29,9 +26,13 @@ const responseHandler = (destinationResponse, dest) => { // if the status tag in XML contains FAILURE, we build and throw an explicit error if (responseStatus === 'FAILURE') { if (reason) { - throw new InstrumentationError(`[${DESTINATION} Response Handler] Request failed for destination ${dest} : ${reason}` ) + throw new InstrumentationError( + `[${DESTINATION} Response Handler] Request failed for destination ${dest} : ${reason}`, + ); } else { - throw new InstrumentationError(`[${DESTINATION} Response Handler] Request failed for destination ${dest} with a general error`) + throw new InstrumentationError( + `[${DESTINATION} Response Handler] Request failed for destination ${dest} with a general error`, + ); } } diff --git a/src/v0/destinations/braze/transform.js b/src/v0/destinations/braze/transform.js index 99b4a93e97..38c4b348db 100644 --- a/src/v0/destinations/braze/transform.js +++ b/src/v0/destinations/braze/transform.js @@ -22,6 +22,7 @@ const { getFieldValueFromMessage, removeUndefinedValues, isHttpStatusSuccess, + isDefinedAndNotNull, simpleProcessRouterDestSync, simpleProcessRouterDest, isNewStatusCodesAccepted, @@ -153,11 +154,16 @@ function getUserAttributesObject(message, mappingJson, destination) { Object.keys(mappingJson).forEach((destKey) => { let value = get(traits, mappingJson[destKey]); if (value || (value === null && reservedKeys.includes(destKey))) { + // if email is not string remove it from attributes + if (destKey === 'email' && typeof value !== 'string') { + throw new InstrumentationError('Invalid email, email must be a valid string'); + } + // handle gender special case if (destKey === 'gender') { value = formatGender(value); - } else if (destKey === 'email' && value !== null) { - value = value?.toLowerCase(); + } else if (destKey === 'email' && isDefinedAndNotNull(value)) { + value = value.toString().toLowerCase(); } data[destKey] = value; } diff --git a/src/v0/util/errorTypes/transformerProxyError.js b/src/v0/util/errorTypes/transformerProxyError.js index 9f4bb593c7..42ccdea490 100644 --- a/src/v0/util/errorTypes/transformerProxyError.js +++ b/src/v0/util/errorTypes/transformerProxyError.js @@ -25,4 +25,4 @@ class TransformerProxyError extends BaseError { } } -module.exports = TransformerProxyError; \ No newline at end of file +module.exports = TransformerProxyError; diff --git a/src/v1/destinations/campaign_manager/networkHandler.js b/src/v1/destinations/campaign_manager/networkHandler.js index 6e13a68f0a..431cbd6966 100644 --- a/src/v1/destinations/campaign_manager/networkHandler.js +++ b/src/v1/destinations/campaign_manager/networkHandler.js @@ -75,15 +75,15 @@ const responseHandler = (destinationResponse) => { } throw new TransformerProxyError( - `Campaign Manager: Error transformer proxy v1 during CAMPAIGN_MANAGER response transformation`, - 500, - { - [tags.TAG_NAMES.ERROR_TYPE]: getDynamicErrorType(status), - }, - destinationResponse, - getAuthErrCategoryFromStCode(status), - responseWithIndividualEvents, - ); + `Campaign Manager: Error transformer proxy v1 during CAMPAIGN_MANAGER response transformation`, + 500, + { + [tags.TAG_NAMES.ERROR_TYPE]: getDynamicErrorType(status), + }, + destinationResponse, + getAuthErrCategoryFromStCode(status), + responseWithIndividualEvents, + ); }; function networkHandler() { diff --git a/test/__tests__/data/braze_input.json b/test/__tests__/data/braze_input.json index 8c3294e42b..fb4e41b189 100644 --- a/test/__tests__/data/braze_input.json +++ b/test/__tests__/data/braze_input.json @@ -1910,5 +1910,50 @@ "type": "track", "userId": "" } + }, + { + "destination": { + "Config": { + "restApiKey": "dummyApiKey", + "prefixProperties": true, + "useNativeSDK": false, + "dataCenter": "us-01" + }, + "DestinationDefinition": { + "DisplayName": "Braze", + "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", + "Name": "BRAZE" + }, + "Enabled": true, + "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", + "Name": "Braze", + "Transformations": [] + }, + "message": { + "anonymousId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", + "channel": "web", + "context": { + "traits": { + "city": "Disney", + "country": "USA", + "email": 123, + "firstname": "Mickey", + "closed_at": null, + "orderTotal": 0 + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" + }, + "integrations": { + "All": true + }, + "messageId": "2536eda4-d638-4c93-8014-8ffe3f083214", + "originalTimestamp": "2020-01-24T06:29:02.362Z", + "receivedAt": "2020-01-24T11:59:02.403+05:30", + "request_ip": "[::1]:53709", + "sentAt": "2020-01-24T06:29:02.363Z", + "timestamp": "2020-01-24T11:59:02.402+05:30", + "type": "identify", + "userId": "" + } } ] diff --git a/test/__tests__/data/braze_output.json b/test/__tests__/data/braze_output.json index 0575326237..ed39930569 100644 --- a/test/__tests__/data/braze_output.json +++ b/test/__tests__/data/braze_output.json @@ -1034,5 +1034,9 @@ "type": "REST", "userId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", "version": "1" + }, + { + "statusCode": 400, + "message": "Invalid email, email must be a valid string" } ] diff --git a/test/__tests__/data/marketo_router_input.json b/test/__tests__/data/marketo_router_input.json index a2ecc7f616..a7a40a221a 100644 --- a/test/__tests__/data/marketo_router_input.json +++ b/test/__tests__/data/marketo_router_input.json @@ -1,1046 +1,996 @@ [ - { - "message": { - "anonymousId": "anon_id_success", - "channel": "mobile", - "context": { - "app": { - "build": "1", - "name": "TestAppName", - "namespace": "com.android.sample", - "version": "1.0" - }, - "device": { - "id": "anon_id_success", - "manufacturer": "Google", - "model": "Android SDK built for x86", - "name": "generic_x86", - "type": "android" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.1-beta.1" - }, - "locale": "en-US", - "network": { - "carrier": "Android", - "bluetooth": false, - "cellular": true, - "wifi": true - }, - "os": { - "name": "Android", - "version": "8.1.0" - }, - "screen": { - "density": 420, - "height": 1794, - "width": 1080 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "anon_id_success" - }, - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)" - }, + { + "message": { + "anonymousId": "anon_id_success", + "channel": "mobile", + "context": { + "app": { + "build": "1", + "name": "TestAppName", + "namespace": "com.android.sample", + "version": "1.0" + }, + "device": { + "id": "anon_id_success", + "manufacturer": "Google", + "model": "Android SDK built for x86", + "name": "generic_x86", + "type": "android" + }, + "library": { + "name": "com.rudderstack.android.sdk.core", + "version": "1.0.1-beta.1" + }, + "locale": "en-US", + "network": { + "carrier": "Android", + "bluetooth": false, + "cellular": true, + "wifi": true + }, + "os": { + "name": "Android", + "version": "8.1.0" + }, + "screen": { + "density": 420, + "height": 1794, + "width": 1080 + }, + "timezone": "Asia/Kolkata", + "traits": { + "anonymousId": "anon_id_success" + }, + "userAgent": "Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)" + }, + "event": "Product Clicked", + "integrations": { + "All": true + }, + "messageId": "id1", + "properties": { + "name": "Test Product" + }, + "originalTimestamp": "2020-12-17T21:00:59.176Z", + "type": "track", + "sentAt": "2020-03-12T09:05:03.421Z" + }, + "metadata": { + "jobId": 1 + }, + "destination": { + "Config": { + "accountId": "marketo_acct_id_success", + "clientId": "marketo_client_id_success", + "clientSecret": "marketo_client_secret_success", + "trackAnonymousEvents": true, + "customActivityPropertyMap": [ + { + "from": "name", + "to": "productName" + } + ], + "leadTraitMapping": [ + { + "from": "leadScore", + "to": "customLeadScore" + } + ], + "rudderEventsMapping": [ + { "event": "Product Clicked", - "integrations": { - "All": true - }, - "messageId": "id1", - "properties": { - "name": "Test Product" - }, - "originalTimestamp": "2020-12-17T21:00:59.176Z", - "type": "track", - "sentAt": "2020-03-12T09:05:03.421Z" + "marketoPrimarykey": "name", + "marketoActivityId": "100001" + } + ] + }, + "secretConfig": {}, + "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", + "name": "Marketo", + "enabled": true, + "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", + "deleted": false, + "createdAt": "2020-12-30T08:39:32.005Z", + "updatedAt": "2021-02-03T16:22:31.374Z", + "destinationDefinition": { + "config": { + "destConfig": { + "defaultConfig": [ + "accountId", + "clientId", + "clientSecret", + "trackAnonymousEvents", + "rudderEventsMapping", + "customActivityPropertyMap", + "leadTraitMapping" + ] + }, + "secretKeys": ["clientSecret"], + "excludeKeys": [], + "includeKeys": [], + "routerTransform": true, + "supportedSourceTypes": ["android", "ios", "web", "unity", "amp", "cloud", "reactnative"] }, - "metadata": { - "jobId": 1 + "responseRules": { + "responseType": "JSON", + "rules": { + "retryable": [ + { + "success": "false", + "errors.0.code": 600 + }, + { + "success": "false", + "errors.0.code": 601 + }, + { + "success": "false", + "errors.0.code": 602 + }, + { + "success": "false", + "errors.0.code": 604 + }, + { + "success": "false", + "errors.0.code": 606 + }, + { + "success": "false", + "errors.0.code": 607 + }, + { + "success": "false", + "errors.0.code": 608 + }, + { + "success": "false", + "errors.0.code": 611 + } + ], + "abortable": [ + { + "success": "false", + "errors.0.code": 603 + }, + { + "success": "false", + "errors.0.code": 605 + }, + { + "success": "false", + "errors.0.code": 609 + }, + { + "success": "false", + "errors.0.code": 610 + } + ] + } + }, + "id": "1aIXqM806xAVm92nx07YwKbRrO9", + "name": "MARKETO", + "displayName": "Marketo", + "createdAt": "2020-04-09T09:24:31.794Z", + "updatedAt": "2021-01-11T11:03:28.103Z" + }, + "transformations": [], + "isConnectionEnabled": true, + "isProcessorEnabled": true + } + }, + { + "message": { + "anonymousId": "anon_id_success", + "channel": "mobile", + "context": { + "app": { + "build": "1", + "name": "TestAppName", + "namespace": "com.android.sample", + "version": "1.0" }, - "destination": { - "Config": { - "accountId": "marketo_acct_id_success", - "clientId": "marketo_client_id_success", - "clientSecret": "marketo_client_secret_success", - "trackAnonymousEvents": true, - "customActivityPropertyMap": [ - { - "from": "name", - "to": "productName" - } - ], - "leadTraitMapping": [ - { - "from": "leadScore", - "to": "customLeadScore" - } - ], - "rudderEventsMapping": [ - { - "event": "Product Clicked", - "marketoPrimarykey": "name", - "marketoActivityId": "100001" - } - ] - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Marketo", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "config": { - "destConfig": { - "defaultConfig": [ - "accountId", - "clientId", - "clientSecret", - "trackAnonymousEvents", - "rudderEventsMapping", - "customActivityPropertyMap", - "leadTraitMapping" - ] - }, - "secretKeys": [ - "clientSecret" - ], - "excludeKeys": [], - "includeKeys": [], - "routerTransform": true, - "supportedSourceTypes": [ - "android", - "ios", - "web", - "unity", - "amp", - "cloud", - "reactnative" - ] - }, - "responseRules": { - "responseType": "JSON", - "rules": { - "retryable": [ - { - "success": "false", - "errors.0.code": 600 - }, - { - "success": "false", - "errors.0.code": 601 - }, - { - "success": "false", - "errors.0.code": 602 - }, - { - "success": "false", - "errors.0.code": 604 - }, - { - "success": "false", - "errors.0.code": 606 - }, - { - "success": "false", - "errors.0.code": 607 - }, - { - "success": "false", - "errors.0.code": 608 - }, - { - "success": "false", - "errors.0.code": 611 - } - ], - "abortable": [ - { - "success": "false", - "errors.0.code": 603 - }, - { - "success": "false", - "errors.0.code": 605 - }, - { - "success": "false", - "errors.0.code": 609 - }, - { - "success": "false", - "errors.0.code": 610 - } - ] - } - }, - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "MARKETO", - "displayName": "Marketo", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } + "device": { + "id": "anon_id_success", + "manufacturer": "Google", + "model": "Android SDK built for x86", + "name": "generic_x86", + "type": "android" + }, + "library": { + "name": "com.rudderstack.android.sdk.core", + "version": "1.0.1-beta.1" + }, + "locale": "en-US", + "network": { + "carrier": "Android", + "bluetooth": false, + "cellular": true, + "wifi": true + }, + "os": { + "name": "Android", + "version": "8.1.0" + }, + "screen": { + "density": 420, + "height": 1794, + "width": 1080 + }, + "timezone": "Asia/Kolkata", + "traits": { + "anonymousId": "anon_id_success" + }, + "userAgent": "Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)" + }, + "event": "Product Clicked", + "integrations": { + "All": true + }, + "messageId": "id1", + "properties": { + "name": "Test Product", + "product_id": "prod_1" + }, + "originalTimestamp": "2020-12-17T21:00:59.176Z", + "type": "track", + "sentAt": "2020-12-17T21:00:59.176Z" + }, + "metadata": { + "jobId": 2 }, - { - "message": { - "anonymousId": "anon_id_success", - "channel": "mobile", - "context": { - "app": { - "build": "1", - "name": "TestAppName", - "namespace": "com.android.sample", - "version": "1.0" - }, - "device": { - "id": "anon_id_success", - "manufacturer": "Google", - "model": "Android SDK built for x86", - "name": "generic_x86", - "type": "android" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.1-beta.1" - }, - "locale": "en-US", - "network": { - "carrier": "Android", - "bluetooth": false, - "cellular": true, - "wifi": true - }, - "os": { - "name": "Android", - "version": "8.1.0" - }, - "screen": { - "density": 420, - "height": 1794, - "width": 1080 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "anon_id_success" - }, - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)" - }, + "destination": { + "Config": { + "accountId": "marketo_acct_id_success", + "clientId": "marketo_client_id_success", + "clientSecret": "marketo_client_secret_success", + "trackAnonymousEvents": true, + "customActivityPropertyMap": [ + { + "from": "name", + "to": "productName" + } + ], + "leadTraitMapping": [ + { + "from": "leadScore", + "to": "customLeadScore" + } + ], + "rudderEventsMapping": [ + { "event": "Product Clicked", - "integrations": { - "All": true - }, - "messageId": "id1", - "properties": { - "name": "Test Product", - "product_id": "prod_1" - }, - "originalTimestamp": "2020-12-17T21:00:59.176Z", - "type": "track", - "sentAt": "2020-12-17T21:00:59.176Z" + "marketoPrimarykey": "name", + "marketoActivityId": "100001" + } + ] + }, + "secretConfig": {}, + "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", + "name": "Marketo", + "enabled": true, + "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", + "deleted": false, + "createdAt": "2020-12-30T08:39:32.005Z", + "updatedAt": "2021-02-03T16:22:31.374Z", + "destinationDefinition": { + "config": { + "destConfig": { + "defaultConfig": [ + "accountId", + "clientId", + "clientSecret", + "trackAnonymousEvents", + "rudderEventsMapping", + "customActivityPropertyMap", + "leadTraitMapping" + ] + }, + "secretKeys": ["clientSecret"], + "excludeKeys": [], + "includeKeys": [], + "routerTransform": true, + "supportedSourceTypes": ["android", "ios", "web", "unity", "amp", "cloud", "reactnative"] + }, + "responseRules": { + "responseType": "JSON", + "rules": { + "retryable": [ + { + "success": "false", + "errors.0.code": 600 + }, + { + "success": "false", + "errors.0.code": 601 + }, + { + "success": "false", + "errors.0.code": 602 + }, + { + "success": "false", + "errors.0.code": 604 + }, + { + "success": "false", + "errors.0.code": 606 + }, + { + "success": "false", + "errors.0.code": 607 + }, + { + "success": "false", + "errors.0.code": 608 + }, + { + "success": "false", + "errors.0.code": 611 + } + ], + "abortable": [ + { + "success": "false", + "errors.0.code": 603 + }, + { + "success": "false", + "errors.0.code": 605 + }, + { + "success": "false", + "errors.0.code": 609 + }, + { + "success": "false", + "errors.0.code": 610 + } + ] + } + }, + "id": "1aIXqM806xAVm92nx07YwKbRrO9", + "name": "MARKETO", + "displayName": "Marketo", + "createdAt": "2020-04-09T09:24:31.794Z", + "updatedAt": "2021-01-11T11:03:28.103Z" + }, + "transformations": [], + "isConnectionEnabled": true, + "isProcessorEnabled": true + } + }, + { + "message": { + "type": "identify", + "sentAt": "2022-09-19T10:34:02.002Z", + "userId": "e17c5a5e-5e2f-430b-b497-fe3f1ea3a704", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" }, - "metadata": { - "jobId": 2 + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "2.12.1", + "namespace": "com.rudderlabs.javascript" }, - "destination": { - "Config": { - "accountId": "marketo_acct_id_success", - "clientId": "marketo_client_id_success", - "clientSecret": "marketo_client_secret_success", - "trackAnonymousEvents": true, - "customActivityPropertyMap": [ - { - "from": "name", - "to": "productName" - } - ], - "leadTraitMapping": [ - { - "from": "leadScore", - "to": "customLeadScore" - } - ], - "rudderEventsMapping": [ - { - "event": "Product Clicked", - "marketoPrimarykey": "name", - "marketoActivityId": "100001" - } - ] - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Marketo", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "config": { - "destConfig": { - "defaultConfig": [ - "accountId", - "clientId", - "clientSecret", - "trackAnonymousEvents", - "rudderEventsMapping", - "customActivityPropertyMap", - "leadTraitMapping" - ] - }, - "secretKeys": [ - "clientSecret" - ], - "excludeKeys": [], - "includeKeys": [], - "routerTransform": true, - "supportedSourceTypes": [ - "android", - "ios", - "web", - "unity", - "amp", - "cloud", - "reactnative" - ] - }, - "responseRules": { - "responseType": "JSON", - "rules": { - "retryable": [ - { - "success": "false", - "errors.0.code": 600 - }, - { - "success": "false", - "errors.0.code": 601 - }, - { - "success": "false", - "errors.0.code": 602 - }, - { - "success": "false", - "errors.0.code": 604 - }, - { - "success": "false", - "errors.0.code": 606 - }, - { - "success": "false", - "errors.0.code": 607 - }, - { - "success": "false", - "errors.0.code": 608 - }, - { - "success": "false", - "errors.0.code": 611 - } - ], - "abortable": [ - { - "success": "false", - "errors.0.code": 603 - }, - { - "success": "false", - "errors.0.code": 605 - }, - { - "success": "false", - "errors.0.code": 609 - }, - { - "success": "false", - "errors.0.code": 610 - } - ] - } - }, - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "MARKETO", - "displayName": "Marketo", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } + "page": { + "url": "https://accounts.app.t2.broken.com/home", + "path": "/home", + "title": "Home", + "search": "", + "tab_url": "https://accounts.app.t2.broken.com/home", + "referrer": "https://ts50-cvii.core.broken.org/", + "initial_referrer": "https://ts50-cvii.core.broken.org/", + "referring_domain": "ts50-cvii.core.broken.org", + "initial_referring_domain": "ts50-cvii.core.broken.org" + }, + "locale": "en-IN", + "screen": { + "width": 1728, + "height": 1117, + "density": 2, + "innerWidth": 1728, + "innerHeight": 969 + }, + "traits": { + "name": "AM", + "email": "0c7b8b80-9c43-4f8e-b2d2-5e2448a25040@j.mail", + "lastName": "M", + "firstName": "A", + "accountName": "MACDEV", + "billingName": "g g", + "companyName": "macDev", + "currentTier": "Webinar Pro 250", + "billingCycle": "Annually", + "lastBillingDate": "2022-06-29T09:40:42.000Z", + "nextBillingDate": "2023-09-09T04:00:00.000Z", + "subscriptionType": "Webinar Pro 250", + "subscriptionStatus": "ACTIVE", + "lastWebinarEventDate": "2022-09-15T20:00:00.000Z", + "nextWebinarEventDate": "2022-09-16T06:15:00.000Z" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "2.12.1" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36" + }, + "rudderId": "73dc83ef-587f-4077-90f3-c36083e64019", + "messageId": "1663583642000200-e3f31c4c-6361-4f99-b643-7755303a6007", + "timestamp": "2022-09-19T10:34:02.954Z", + "receivedAt": "2022-09-19T10:34:02.956Z", + "request_ip": "11.105.44.120", + "anonymousId": "0c7b8b80-9c43-4f8e-b2d2-5e2448a25040", + "integrations": { + "All": true + }, + "originalTimestamp": "2022-09-19T10:34:02.000Z" }, - { - "message": { - "type": "identify", - "sentAt": "2022-09-19T10:34:02.002Z", - "userId": "e17c5a5e-5e2f-430b-b497-fe3f1ea3a704", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "2.12.1", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "https://accounts.app.t2.broken.com/home", - "path": "/home", - "title": "Home", - "search": "", - "tab_url": "https://accounts.app.t2.broken.com/home", - "referrer": "https://ts50-cvii.core.broken.org/", - "initial_referrer": "https://ts50-cvii.core.broken.org/", - "referring_domain": "ts50-cvii.core.broken.org", - "initial_referring_domain": "ts50-cvii.core.broken.org" - }, - "locale": "en-IN", - "screen": { - "width": 1728, - "height": 1117, - "density": 2, - "innerWidth": 1728, - "innerHeight": 969 - }, - "traits": { - "name": "AM", - "email": "0c7b8b80-9c43-4f8e-b2d2-5e2448a25040@j.mail", - "lastName": "M", - "firstName": "A", - "accountName": "MACDEV", - "billingName": "g g", - "companyName": "macDev", - "currentTier": "Webinar Pro 250", - "billingCycle": "Annually", - "lastBillingDate": "2022-06-29T09:40:42.000Z", - "nextBillingDate": "2023-09-09T04:00:00.000Z", - "subscriptionType": "Webinar Pro 250", - "subscriptionStatus": "ACTIVE", - "lastWebinarEventDate": "2022-09-15T20:00:00.000Z", - "nextWebinarEventDate": "2022-09-16T06:15:00.000Z" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "2.12.1" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36" - }, - "rudderId": "73dc83ef-587f-4077-90f3-c36083e64019", - "messageId": "1663583642000200-e3f31c4c-6361-4f99-b643-7755303a6007", - "timestamp": "2022-09-19T10:34:02.954Z", - "receivedAt": "2022-09-19T10:34:02.956Z", - "request_ip": "11.105.44.120", - "anonymousId": "0c7b8b80-9c43-4f8e-b2d2-5e2448a25040", - "integrations": { - "All": true - }, - "originalTimestamp": "2022-09-19T10:34:02.000Z" + "destination": { + "Config": { + "accountId": "valid_account_broken_event", + "clientId": "504300cd-76b2-a7l4-bhle-90a07420nx73", + "clientSecret": "3l3gJpzRsZagD6gu7tnTeKXz0bomLGnd", + "trackAnonymousEvents": false, + "createIfNotExist": true, + "rudderEventsMapping": [ + { + "event": "acq_signup_completed", + "marketoActivityId": "100026" + }, + { + "event": "act_createwebinarform_submit", + "marketoActivityId": "100025" + }, + { + "event": "act_presentation_style", + "marketoActivityId": "100025" + }, + { + "event": "act_webinar_view", + "marketoActivityId": "100025" + }, + { + "event": "act_webinar_join", + "marketoActivityId": "100025" + }, + { + "event": "act_presentation_addteammember", + "marketoActivityId": "100025" + }, + { + "event": "act_engagement_discussions_savediscussion", + "marketoActivityId": "100025" + }, + { + "event": "act_engagement_networking_savetime", + "marketoActivityId": "100025" + } + ] + }, + "destinationDefinition": { + "config": { + "destConfig": { + "defaultConfig": [ + "accountId", + "clientId", + "clientSecret", + "trackAnonymousEvents", + "rudderEventsMapping", + "customActivityPropertyMap", + "leadTraitMapping" + ] + }, + "secretKeys": ["clientSecret"], + "excludeKeys": [], + "includeKeys": [], + "routerTransform": true, + "supportedSourceTypes": ["android", "ios", "web", "unity", "amp", "cloud", "reactnative"] }, - "destination": { - "Config": { - "accountId": "valid_account_broken_event", - "clientId": "504300cd-76b2-a7l4-bhle-90a07420nx73", - "clientSecret": "3l3gJpzRsZagD6gu7tnTeKXz0bomLGnd", - "trackAnonymousEvents": false, - "createIfNotExist": true, - "rudderEventsMapping": [ - { - "event": "acq_signup_completed", - "marketoActivityId": "100026" - }, - { - "event": "act_createwebinarform_submit", - "marketoActivityId": "100025" - }, - { - "event": "act_presentation_style", - "marketoActivityId": "100025" - }, - { - "event": "act_webinar_view", - "marketoActivityId": "100025" - }, - { - "event": "act_webinar_join", - "marketoActivityId": "100025" - }, - { - "event": "act_presentation_addteammember", - "marketoActivityId": "100025" - }, - { - "event": "act_engagement_discussions_savediscussion", - "marketoActivityId": "100025" - }, - { - "event": "act_engagement_networking_savetime", - "marketoActivityId": "100025" - } - ] - }, - "destinationDefinition": { - "config": { - "destConfig": { - "defaultConfig": [ - "accountId", - "clientId", - "clientSecret", - "trackAnonymousEvents", - "rudderEventsMapping", - "customActivityPropertyMap", - "leadTraitMapping" - ] - }, - "secretKeys": [ - "clientSecret" - ], - "excludeKeys": [], - "includeKeys": [], - "routerTransform": true, - "supportedSourceTypes": [ - "android", - "ios", - "web", - "unity", - "amp", - "cloud", - "reactnative" - ] - }, - "responseRules": { - "responseType": "JSON", - "rules": { - "retryable": [ - { - "success": "false", - "errors.0.code": 600 - }, - { - "success": "false", - "errors.0.code": 601 - }, - { - "success": "false", - "errors.0.code": 602 - }, - { - "success": "false", - "errors.0.code": 604 - }, - { - "success": "false", - "errors.0.code": 606 - }, - { - "success": "false", - "errors.0.code": 607 - }, - { - "success": "false", - "errors.0.code": 608 - }, - { - "success": "false", - "errors.0.code": 611 - } - ], - "abortable": [ - { - "success": "false", - "errors.0.code": 603 - }, - { - "success": "false", - "errors.0.code": 605 - }, - { - "success": "false", - "errors.0.code": 609 - }, - { - "success": "false", - "errors.0.code": 610 - } - ] - } - }, - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "MARKETO", - "displayName": "Marketo", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVke", - "name": "Marketo", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmMd", - "deleted": false, - "createdAt": "2022-02-10T08:39:32.005Z", - "updatedAt": "2022-09-03T16:22:31.374Z", - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true + "responseRules": { + "responseType": "JSON", + "rules": { + "retryable": [ + { + "success": "false", + "errors.0.code": 600 + }, + { + "success": "false", + "errors.0.code": 601 + }, + { + "success": "false", + "errors.0.code": 602 + }, + { + "success": "false", + "errors.0.code": 604 + }, + { + "success": "false", + "errors.0.code": 606 + }, + { + "success": "false", + "errors.0.code": 607 + }, + { + "success": "false", + "errors.0.code": 608 + }, + { + "success": "false", + "errors.0.code": 611 + } + ], + "abortable": [ + { + "success": "false", + "errors.0.code": 603 + }, + { + "success": "false", + "errors.0.code": 605 + }, + { + "success": "false", + "errors.0.code": 609 + }, + { + "success": "false", + "errors.0.code": 610 + } + ] + } }, - "metadata": { - "jobId": 3 - } + "id": "1aIXqM806xAVm92nx07YwKbRrO9", + "name": "MARKETO", + "displayName": "Marketo", + "createdAt": "2020-04-09T09:24:31.794Z", + "updatedAt": "2021-01-11T11:03:28.103Z" + }, + "secretConfig": {}, + "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVke", + "name": "Marketo", + "enabled": true, + "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmMd", + "deleted": false, + "createdAt": "2022-02-10T08:39:32.005Z", + "updatedAt": "2022-09-03T16:22:31.374Z", + "transformations": [], + "isConnectionEnabled": true, + "isProcessorEnabled": true }, - { - "message": { - "type": "identify", - "sentAt": "2022-09-19T10:34:02.002Z", - "userId": "e17c5a5e-5e2f-430b-b497-fe3f1ea3a704", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "2.12.1", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "https://accounts.app.t2.broken.com/home", - "path": "/home", - "title": "Home", - "search": "", - "tab_url": "https://accounts.app.t2.broken.com/home", - "referrer": "https://ts50-cvii.core.broken.org/", - "initial_referrer": "https://ts50-cvii.core.broken.org/", - "referring_domain": "ts50-cvii.core.broken.org", - "initial_referring_domain": "ts50-cvii.core.broken.org" - }, - "locale": "en-IN", - "screen": { - "width": 1728, - "height": 1117, - "density": 2, - "innerWidth": 1728, - "innerHeight": 969 - }, - "traits": { - "name": "AM", - "email": "0c7b8b80-9c43-4f8e-b2d2-5e2448a25040@j.mail", - "lastName": "M", - "firstName": "A", - "accountName": "MACDEV", - "billingName": "g g", - "companyName": "macDev", - "currentTier": "Webinar Pro 250", - "billingCycle": "Annually", - "lastBillingDate": "2022-06-29T09:40:42.000Z", - "nextBillingDate": "2023-09-09T04:00:00.000Z", - "subscriptionType": "Webinar Pro 250", - "subscriptionStatus": "ACTIVE", - "lastWebinarEventDate": "2022-09-15T20:00:00.000Z", - "nextWebinarEventDate": "2022-09-16T06:15:00.000Z" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "2.12.1" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36" - }, - "rudderId": "73dc83ef-587f-4077-90f3-c36083e64019", - "messageId": "1663583642000200-e3f31c4c-6361-4f99-b643-7755303a6007", - "timestamp": "2022-09-19T10:34:02.954Z", - "receivedAt": "2022-09-19T10:34:02.956Z", - "request_ip": "11.105.44.120", - "anonymousId": "0c7b8b80-9c43-4f8e-b2d2-5e2448a25040", - "integrations": { - "All": true - }, - "originalTimestamp": "2022-09-19T10:34:02.000Z" + "metadata": { + "jobId": 3 + } + }, + { + "message": { + "type": "identify", + "sentAt": "2022-09-19T10:34:02.002Z", + "userId": "e17c5a5e-5e2f-430b-b497-fe3f1ea3a704", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "2.12.1", + "namespace": "com.rudderlabs.javascript" }, - "destination": { - "Config": { - "accountId": "unhandled_status_code", - "clientId": "504300cd-76b2-a7l4-bhle-90a07420nx73", - "clientSecret": "3l3gJpzRsZagD6gu7tnTeKXz0bomLGnd", - "trackAnonymousEvents": false, - "createIfNotExist": true, - "rudderEventsMapping": [ - { - "event": "acq_signup_completed", - "marketoActivityId": "100026" - }, - { - "event": "act_createwebinarform_submit", - "marketoActivityId": "100025" - }, - { - "event": "act_presentation_style", - "marketoActivityId": "100025" - }, - { - "event": "act_webinar_view", - "marketoActivityId": "100025" - }, - { - "event": "act_webinar_join", - "marketoActivityId": "100025" - }, - { - "event": "act_presentation_addteammember", - "marketoActivityId": "100025" - }, - { - "event": "act_engagement_discussions_savediscussion", - "marketoActivityId": "100025" - }, - { - "event": "act_engagement_networking_savetime", - "marketoActivityId": "100025" - } - ] - }, - "destinationDefinition": { - "config": { - "destConfig": { - "defaultConfig": [ - "accountId", - "clientId", - "clientSecret", - "trackAnonymousEvents", - "rudderEventsMapping", - "customActivityPropertyMap", - "leadTraitMapping" - ] - }, - "secretKeys": [ - "clientSecret" - ], - "excludeKeys": [], - "includeKeys": [], - "routerTransform": true, - "supportedSourceTypes": [ - "android", - "ios", - "web", - "unity", - "amp", - "cloud", - "reactnative" - ] - }, - "responseRules": { - "responseType": "JSON", - "rules": { - "retryable": [ - { - "success": "false", - "errors.0.code": 600 - }, - { - "success": "false", - "errors.0.code": 601 - }, - { - "success": "false", - "errors.0.code": 602 - }, - { - "success": "false", - "errors.0.code": 604 - }, - { - "success": "false", - "errors.0.code": 606 - }, - { - "success": "false", - "errors.0.code": 607 - }, - { - "success": "false", - "errors.0.code": 608 - }, - { - "success": "false", - "errors.0.code": 611 - } - ], - "abortable": [ - { - "success": "false", - "errors.0.code": 603 - }, - { - "success": "false", - "errors.0.code": 605 - }, - { - "success": "false", - "errors.0.code": 609 - }, - { - "success": "false", - "errors.0.code": 610 - } - ] - } - }, - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "MARKETO", - "displayName": "Marketo", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVke", - "name": "Marketo", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmMd", - "deleted": false, - "createdAt": "2022-02-10T08:39:32.005Z", - "updatedAt": "2022-09-03T16:22:31.374Z", - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true + "page": { + "url": "https://accounts.app.t2.broken.com/home", + "path": "/home", + "title": "Home", + "search": "", + "tab_url": "https://accounts.app.t2.broken.com/home", + "referrer": "https://ts50-cvii.core.broken.org/", + "initial_referrer": "https://ts50-cvii.core.broken.org/", + "referring_domain": "ts50-cvii.core.broken.org", + "initial_referring_domain": "ts50-cvii.core.broken.org" }, - "metadata": { - "jobId": 4 - } + "locale": "en-IN", + "screen": { + "width": 1728, + "height": 1117, + "density": 2, + "innerWidth": 1728, + "innerHeight": 969 + }, + "traits": { + "name": "AM", + "email": "0c7b8b80-9c43-4f8e-b2d2-5e2448a25040@j.mail", + "lastName": "M", + "firstName": "A", + "accountName": "MACDEV", + "billingName": "g g", + "companyName": "macDev", + "currentTier": "Webinar Pro 250", + "billingCycle": "Annually", + "lastBillingDate": "2022-06-29T09:40:42.000Z", + "nextBillingDate": "2023-09-09T04:00:00.000Z", + "subscriptionType": "Webinar Pro 250", + "subscriptionStatus": "ACTIVE", + "lastWebinarEventDate": "2022-09-15T20:00:00.000Z", + "nextWebinarEventDate": "2022-09-16T06:15:00.000Z" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "2.12.1" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36" + }, + "rudderId": "73dc83ef-587f-4077-90f3-c36083e64019", + "messageId": "1663583642000200-e3f31c4c-6361-4f99-b643-7755303a6007", + "timestamp": "2022-09-19T10:34:02.954Z", + "receivedAt": "2022-09-19T10:34:02.956Z", + "request_ip": "11.105.44.120", + "anonymousId": "0c7b8b80-9c43-4f8e-b2d2-5e2448a25040", + "integrations": { + "All": true + }, + "originalTimestamp": "2022-09-19T10:34:02.000Z" }, - { - "message": { - "type": "identify", - "sentAt": "2022-09-19T10:34:02.002Z", - "userId": "e17c5a5e-5e2f-430b-b497-fe3f1ea3a704", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "2.12.1", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "https://accounts.app.t2.broken.com/home", - "path": "/home", - "title": "Home", - "search": "", - "tab_url": "https://accounts.app.t2.broken.com/home", - "referrer": "https://ts50-cvii.core.broken.org/", - "initial_referrer": "https://ts50-cvii.core.broken.org/", - "referring_domain": "ts50-cvii.core.broken.org", - "initial_referring_domain": "ts50-cvii.core.broken.org" - }, - "locale": "en-IN", - "screen": { - "width": 1728, - "height": 1117, - "density": 2, - "innerWidth": 1728, - "innerHeight": 969 - }, - "traits": { - "name": "AM", - "email": "0c7b8b80-9c43-4f8e-b2d2-5e2448a25040@j.mail", - "lastName": "M", - "firstName": "A", - "accountName": "MACDEV", - "billingName": "g g", - "companyName": "macDev", - "currentTier": "Webinar Pro 250", - "billingCycle": "Annually", - "lastBillingDate": "2022-06-29T09:40:42.000Z", - "nextBillingDate": "2023-09-09T04:00:00.000Z", - "subscriptionType": "Webinar Pro 250", - "subscriptionStatus": "ACTIVE", - "lastWebinarEventDate": "2022-09-15T20:00:00.000Z", - "nextWebinarEventDate": "2022-09-16T06:15:00.000Z" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "2.12.1" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36" - }, - "rudderId": "73dc83ef-587f-4077-90f3-c36083e64019", - "messageId": "1663583642000200-e3f31c4c-6361-4f99-b643-7755303a6007", - "timestamp": "2022-09-19T10:34:02.954Z", - "receivedAt": "2022-09-19T10:34:02.956Z", - "request_ip": "11.105.44.120", - "anonymousId": "0c7b8b80-9c43-4f8e-b2d2-5e2448a25040", - "integrations": { - "All": true - }, - "originalTimestamp": "2022-09-19T10:34:02.000Z" + "destination": { + "Config": { + "accountId": "unhandled_status_code", + "clientId": "504300cd-76b2-a7l4-bhle-90a07420nx73", + "clientSecret": "3l3gJpzRsZagD6gu7tnTeKXz0bomLGnd", + "trackAnonymousEvents": false, + "createIfNotExist": true, + "rudderEventsMapping": [ + { + "event": "acq_signup_completed", + "marketoActivityId": "100026" + }, + { + "event": "act_createwebinarform_submit", + "marketoActivityId": "100025" + }, + { + "event": "act_presentation_style", + "marketoActivityId": "100025" + }, + { + "event": "act_webinar_view", + "marketoActivityId": "100025" + }, + { + "event": "act_webinar_join", + "marketoActivityId": "100025" + }, + { + "event": "act_presentation_addteammember", + "marketoActivityId": "100025" + }, + { + "event": "act_engagement_discussions_savediscussion", + "marketoActivityId": "100025" + }, + { + "event": "act_engagement_networking_savetime", + "marketoActivityId": "100025" + } + ] + }, + "destinationDefinition": { + "config": { + "destConfig": { + "defaultConfig": [ + "accountId", + "clientId", + "clientSecret", + "trackAnonymousEvents", + "rudderEventsMapping", + "customActivityPropertyMap", + "leadTraitMapping" + ] + }, + "secretKeys": ["clientSecret"], + "excludeKeys": [], + "includeKeys": [], + "routerTransform": true, + "supportedSourceTypes": ["android", "ios", "web", "unity", "amp", "cloud", "reactnative"] }, - "destination": { - "Config": { - "accountId": "successful_identify_transformation", - "clientId": "504300cd-76b2-a7l4-bhle-90a07420nx73", - "clientSecret": "3l3gJpzRsZagD6gu7tnTeKXz0bomLGnd", - "trackAnonymousEvents": false, - "createIfNotExist": true, - "rudderEventsMapping": [ - { - "event": "acq_signup_completed", - "marketoActivityId": "100026" - }, - { - "event": "act_createwebinarform_submit", - "marketoActivityId": "100025" - }, - { - "event": "act_presentation_style", - "marketoActivityId": "100025" - }, - { - "event": "act_webinar_view", - "marketoActivityId": "100025" - }, - { - "event": "act_webinar_join", - "marketoActivityId": "100025" - }, - { - "event": "act_presentation_addteammember", - "marketoActivityId": "100025" - }, - { - "event": "act_engagement_discussions_savediscussion", - "marketoActivityId": "100025" - }, - { - "event": "act_engagement_networking_savetime", - "marketoActivityId": "100025" - } - ] - }, - "destinationDefinition": { - "config": { - "destConfig": { - "defaultConfig": [ - "accountId", - "clientId", - "clientSecret", - "trackAnonymousEvents", - "rudderEventsMapping", - "customActivityPropertyMap", - "leadTraitMapping" - ] - }, - "secretKeys": [ - "clientSecret" - ], - "excludeKeys": [], - "includeKeys": [], - "routerTransform": true, - "supportedSourceTypes": [ - "android", - "ios", - "web", - "unity", - "amp", - "cloud", - "reactnative" - ] - }, - "responseRules": { - "responseType": "JSON", - "rules": { - "retryable": [ - { - "success": "false", - "errors.0.code": 600 - }, - { - "success": "false", - "errors.0.code": 601 - }, - { - "success": "false", - "errors.0.code": 602 - }, - { - "success": "false", - "errors.0.code": 604 - }, - { - "success": "false", - "errors.0.code": 606 - }, - { - "success": "false", - "errors.0.code": 607 - }, - { - "success": "false", - "errors.0.code": 608 - }, - { - "success": "false", - "errors.0.code": 611 - } - ], - "abortable": [ - { - "success": "false", - "errors.0.code": 603 - }, - { - "success": "false", - "errors.0.code": 605 - }, - { - "success": "false", - "errors.0.code": 609 - }, - { - "success": "false", - "errors.0.code": 610 - } - ] - } - }, - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "MARKETO", - "displayName": "Marketo", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVke", - "name": "Marketo", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmMd", - "deleted": false, - "createdAt": "2022-02-10T08:39:32.005Z", - "updatedAt": "2022-09-03T16:22:31.374Z", - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true + "responseRules": { + "responseType": "JSON", + "rules": { + "retryable": [ + { + "success": "false", + "errors.0.code": 600 + }, + { + "success": "false", + "errors.0.code": 601 + }, + { + "success": "false", + "errors.0.code": 602 + }, + { + "success": "false", + "errors.0.code": 604 + }, + { + "success": "false", + "errors.0.code": 606 + }, + { + "success": "false", + "errors.0.code": 607 + }, + { + "success": "false", + "errors.0.code": 608 + }, + { + "success": "false", + "errors.0.code": 611 + } + ], + "abortable": [ + { + "success": "false", + "errors.0.code": 603 + }, + { + "success": "false", + "errors.0.code": 605 + }, + { + "success": "false", + "errors.0.code": 609 + }, + { + "success": "false", + "errors.0.code": 610 + } + ] + } }, - "metadata": { - "jobId": 5 - } + "id": "1aIXqM806xAVm92nx07YwKbRrO9", + "name": "MARKETO", + "displayName": "Marketo", + "createdAt": "2020-04-09T09:24:31.794Z", + "updatedAt": "2021-01-11T11:03:28.103Z" + }, + "secretConfig": {}, + "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVke", + "name": "Marketo", + "enabled": true, + "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmMd", + "deleted": false, + "createdAt": "2022-02-10T08:39:32.005Z", + "updatedAt": "2022-09-03T16:22:31.374Z", + "transformations": [], + "isConnectionEnabled": true, + "isProcessorEnabled": true + }, + "metadata": { + "jobId": 4 + } + }, + { + "message": { + "type": "identify", + "sentAt": "2022-09-19T10:34:02.002Z", + "userId": "e17c5a5e-5e2f-430b-b497-fe3f1ea3a704", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "2.12.1", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "https://accounts.app.t2.broken.com/home", + "path": "/home", + "title": "Home", + "search": "", + "tab_url": "https://accounts.app.t2.broken.com/home", + "referrer": "https://ts50-cvii.core.broken.org/", + "initial_referrer": "https://ts50-cvii.core.broken.org/", + "referring_domain": "ts50-cvii.core.broken.org", + "initial_referring_domain": "ts50-cvii.core.broken.org" + }, + "locale": "en-IN", + "screen": { + "width": 1728, + "height": 1117, + "density": 2, + "innerWidth": 1728, + "innerHeight": 969 + }, + "traits": { + "name": "AM", + "email": "0c7b8b80-9c43-4f8e-b2d2-5e2448a25040@j.mail", + "lastName": "M", + "firstName": "A", + "accountName": "MACDEV", + "billingName": "g g", + "companyName": "macDev", + "currentTier": "Webinar Pro 250", + "billingCycle": "Annually", + "lastBillingDate": "2022-06-29T09:40:42.000Z", + "nextBillingDate": "2023-09-09T04:00:00.000Z", + "subscriptionType": "Webinar Pro 250", + "subscriptionStatus": "ACTIVE", + "lastWebinarEventDate": "2022-09-15T20:00:00.000Z", + "nextWebinarEventDate": "2022-09-16T06:15:00.000Z" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "2.12.1" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36" + }, + "rudderId": "73dc83ef-587f-4077-90f3-c36083e64019", + "messageId": "1663583642000200-e3f31c4c-6361-4f99-b643-7755303a6007", + "timestamp": "2022-09-19T10:34:02.954Z", + "receivedAt": "2022-09-19T10:34:02.956Z", + "request_ip": "11.105.44.120", + "anonymousId": "0c7b8b80-9c43-4f8e-b2d2-5e2448a25040", + "integrations": { + "All": true + }, + "originalTimestamp": "2022-09-19T10:34:02.000Z" + }, + "destination": { + "Config": { + "accountId": "successful_identify_transformation", + "clientId": "504300cd-76b2-a7l4-bhle-90a07420nx73", + "clientSecret": "3l3gJpzRsZagD6gu7tnTeKXz0bomLGnd", + "trackAnonymousEvents": false, + "createIfNotExist": true, + "rudderEventsMapping": [ + { + "event": "acq_signup_completed", + "marketoActivityId": "100026" + }, + { + "event": "act_createwebinarform_submit", + "marketoActivityId": "100025" + }, + { + "event": "act_presentation_style", + "marketoActivityId": "100025" + }, + { + "event": "act_webinar_view", + "marketoActivityId": "100025" + }, + { + "event": "act_webinar_join", + "marketoActivityId": "100025" + }, + { + "event": "act_presentation_addteammember", + "marketoActivityId": "100025" + }, + { + "event": "act_engagement_discussions_savediscussion", + "marketoActivityId": "100025" + }, + { + "event": "act_engagement_networking_savetime", + "marketoActivityId": "100025" + } + ] + }, + "destinationDefinition": { + "config": { + "destConfig": { + "defaultConfig": [ + "accountId", + "clientId", + "clientSecret", + "trackAnonymousEvents", + "rudderEventsMapping", + "customActivityPropertyMap", + "leadTraitMapping" + ] + }, + "secretKeys": ["clientSecret"], + "excludeKeys": [], + "includeKeys": [], + "routerTransform": true, + "supportedSourceTypes": ["android", "ios", "web", "unity", "amp", "cloud", "reactnative"] + }, + "responseRules": { + "responseType": "JSON", + "rules": { + "retryable": [ + { + "success": "false", + "errors.0.code": 600 + }, + { + "success": "false", + "errors.0.code": 601 + }, + { + "success": "false", + "errors.0.code": 602 + }, + { + "success": "false", + "errors.0.code": 604 + }, + { + "success": "false", + "errors.0.code": 606 + }, + { + "success": "false", + "errors.0.code": 607 + }, + { + "success": "false", + "errors.0.code": 608 + }, + { + "success": "false", + "errors.0.code": 611 + } + ], + "abortable": [ + { + "success": "false", + "errors.0.code": 603 + }, + { + "success": "false", + "errors.0.code": 605 + }, + { + "success": "false", + "errors.0.code": 609 + }, + { + "success": "false", + "errors.0.code": 610 + } + ] + } + }, + "id": "1aIXqM806xAVm92nx07YwKbRrO9", + "name": "MARKETO", + "displayName": "Marketo", + "createdAt": "2020-04-09T09:24:31.794Z", + "updatedAt": "2021-01-11T11:03:28.103Z" + }, + "secretConfig": {}, + "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVke", + "name": "Marketo", + "enabled": true, + "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmMd", + "deleted": false, + "createdAt": "2022-02-10T08:39:32.005Z", + "updatedAt": "2022-09-03T16:22:31.374Z", + "transformations": [], + "isConnectionEnabled": true, + "isProcessorEnabled": true + }, + "metadata": { + "jobId": 5 } -] \ No newline at end of file + } +] diff --git a/test/__tests__/data/marketo_router_metadata_input.json b/test/__tests__/data/marketo_router_metadata_input.json index 0c481c38ea..b1e3a26f69 100644 --- a/test/__tests__/data/marketo_router_metadata_input.json +++ b/test/__tests__/data/marketo_router_metadata_input.json @@ -87,21 +87,11 @@ "leadTraitMapping" ] }, - "secretKeys": [ - "clientSecret" - ], + "secretKeys": ["clientSecret"], "excludeKeys": [], "includeKeys": [], "routerTransform": true, - "supportedSourceTypes": [ - "android", - "ios", - "web", - "unity", - "amp", - "cloud", - "reactnative" - ] + "supportedSourceTypes": ["android", "ios", "web", "unity", "amp", "cloud", "reactnative"] }, "responseRules": { "responseType": "JSON", @@ -170,4 +160,4 @@ "isConnectionEnabled": true, "isProcessorEnabled": true } -} \ No newline at end of file +} diff --git a/test/__tests__/data/marketo_router_output.json b/test/__tests__/data/marketo_router_output.json index 35c0d30a8e..c4b59b396d 100644 --- a/test/__tests__/data/marketo_router_output.json +++ b/test/__tests__/data/marketo_router_output.json @@ -82,21 +82,11 @@ "leadTraitMapping" ] }, - "secretKeys": [ - "clientSecret" - ], + "secretKeys": ["clientSecret"], "excludeKeys": [], "includeKeys": [], "routerTransform": true, - "supportedSourceTypes": [ - "android", - "ios", - "web", - "unity", - "amp", - "cloud", - "reactnative" - ] + "supportedSourceTypes": ["android", "ios", "web", "unity", "amp", "cloud", "reactnative"] }, "responseRules": { "responseType": "JSON", @@ -249,21 +239,11 @@ "leadTraitMapping" ] }, - "secretKeys": [ - "clientSecret" - ], + "secretKeys": ["clientSecret"], "excludeKeys": [], "includeKeys": [], "routerTransform": true, - "supportedSourceTypes": [ - "android", - "ios", - "web", - "unity", - "amp", - "cloud", - "reactnative" - ] + "supportedSourceTypes": ["android", "ios", "web", "unity", "amp", "cloud", "reactnative"] }, "responseRules": { "responseType": "JSON", @@ -401,21 +381,11 @@ "leadTraitMapping" ] }, - "secretKeys": [ - "clientSecret" - ], + "secretKeys": ["clientSecret"], "excludeKeys": [], "includeKeys": [], "routerTransform": true, - "supportedSourceTypes": [ - "android", - "ios", - "web", - "unity", - "amp", - "cloud", - "reactnative" - ] + "supportedSourceTypes": ["android", "ios", "web", "unity", "amp", "cloud", "reactnative"] }, "responseRules": { "responseType": "JSON", @@ -557,21 +527,11 @@ "leadTraitMapping" ] }, - "secretKeys": [ - "clientSecret" - ], + "secretKeys": ["clientSecret"], "excludeKeys": [], "includeKeys": [], "routerTransform": true, - "supportedSourceTypes": [ - "android", - "ios", - "web", - "unity", - "amp", - "cloud", - "reactnative" - ] + "supportedSourceTypes": ["android", "ios", "web", "unity", "amp", "cloud", "reactnative"] }, "responseRules": { "responseType": "JSON", @@ -747,21 +707,11 @@ "leadTraitMapping" ] }, - "secretKeys": [ - "clientSecret" - ], + "secretKeys": ["clientSecret"], "excludeKeys": [], "includeKeys": [], "routerTransform": true, - "supportedSourceTypes": [ - "android", - "ios", - "web", - "unity", - "amp", - "cloud", - "reactnative" - ] + "supportedSourceTypes": ["android", "ios", "web", "unity", "amp", "cloud", "reactnative"] }, "responseRules": { "responseType": "JSON", @@ -839,4 +789,4 @@ "isProcessorEnabled": true } } -] \ No newline at end of file +] diff --git a/test/integrations/destinations/webhook/processor/data.ts b/test/integrations/destinations/webhook/processor/data.ts index 8f37a26da2..dbe83a79a5 100644 --- a/test/integrations/destinations/webhook/processor/data.ts +++ b/test/integrations/destinations/webhook/processor/data.ts @@ -1,2761 +1,2761 @@ export const data = [ - { - "name": "webhook", - "description": "Test 0", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "traits": { - "address": { - "city": "Dhaka", - "country": "Bangladesh" - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "spin_result", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "additional_bet_index": 0, - "battle_id": "N/A", - "bet_amount": 9, - "bet_level": 1, - "bet_multiplier": 1, - "coin_balance": 9466052, - "current_module_name": "CasinoGameModule", - "days_in_game": 0, - "extra_param": "N/A", - "fb_profile": "0", - "featureGameType": "N/A", - "game_fps": 30, - "game_id": "fireEagleBase", - "game_name": "FireEagleSlots", - "gem_balance": 0, - "graphicsQuality": "HD", - "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", - "internetReachability": "ReachableViaLocalAreaNetwork", - "isLowEndDevice": "False", - "is_auto_spin": "False", - "is_turbo": "False", - "isf": "False", - "ishighroller": "False", - "jackpot_win_amount": 90, - "jackpot_win_type": "Silver", - "level": 6, - "lifetime_gem_balance": 0, - "no_of_spin": 1, - "player_total_battles": 0, - "player_total_shields": 0, - "start_date": "2019-08-01", - "total_payments": 0, - "tournament_id": "T1561970819", - "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "versionSessionCount": 2, - "win_amount": 0 - }, - "timestamp": "2019-09-01T15:46:51.693229+05:30", - "type": "track", - "user_properties": { - "coin_balance": 9466052, - "current_module_name": "CasinoGameModule", - "fb_profile": "0", - "game_fps": 30, - "game_name": "FireEagleSlots", - "gem_balance": 0, - "graphicsQuality": "HD", - "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", - "internetReachability": "ReachableViaLocalAreaNetwork", - "isLowEndDevice": false, - "level": 6, - "lifetime_gem_balance": 0, - "player_total_battles": 0, - "player_total_shields": 0, - "start_date": "2019-08-01", - "total_payments": 0, - "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "versionSessionCount": 2 - } - }, - "destination": { - "Config": { - "webhookUrl": "http://6b0e6a60.ngrok.io", - "headers": [ - { - "from": "", - "to": "" - }, - { - "from": "test2", - "to": "value2" - } - ] - }, - "DestinationDefinition": { - "Config": { - "cdkV2Enabled": true - } - } - }, - "metadata": { - "destinationId": "destId", - "workspaceId": "wspId" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "body": { - "JSON": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "traits": { - "address": { - "city": "Dhaka", - "country": "Bangladesh" - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "spin_result", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "additional_bet_index": 0, - "battle_id": "N/A", - "bet_amount": 9, - "bet_level": 1, - "bet_multiplier": 1, - "coin_balance": 9466052, - "current_module_name": "CasinoGameModule", - "days_in_game": 0, - "extra_param": "N/A", - "fb_profile": "0", - "featureGameType": "N/A", - "game_fps": 30, - "game_id": "fireEagleBase", - "game_name": "FireEagleSlots", - "gem_balance": 0, - "graphicsQuality": "HD", - "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", - "internetReachability": "ReachableViaLocalAreaNetwork", - "isLowEndDevice": "False", - "is_auto_spin": "False", - "is_turbo": "False", - "isf": "False", - "ishighroller": "False", - "jackpot_win_amount": 90, - "jackpot_win_type": "Silver", - "level": 6, - "lifetime_gem_balance": 0, - "no_of_spin": 1, - "player_total_battles": 0, - "player_total_shields": 0, - "start_date": "2019-08-01", - "total_payments": 0, - "tournament_id": "T1561970819", - "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "versionSessionCount": 2, - "win_amount": 0 - }, - "timestamp": "2019-09-01T15:46:51.693229+05:30", - "type": "track", - "user_properties": { - "coin_balance": 9466052, - "current_module_name": "CasinoGameModule", - "fb_profile": "0", - "game_fps": 30, - "game_name": "FireEagleSlots", - "gem_balance": 0, - "graphicsQuality": "HD", - "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", - "internetReachability": "ReachableViaLocalAreaNetwork", - "isLowEndDevice": false, - "level": 6, - "lifetime_gem_balance": 0, - "player_total_battles": 0, - "player_total_shields": 0, - "start_date": "2019-08-01", - "total_payments": 0, - "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "versionSessionCount": 2 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "version": "1", - "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "type": "REST", - "method": "POST", - "endpoint": "http://6b0e6a60.ngrok.io", - "headers": { - "content-type": "application/json", - "test2": "value2" - }, - "params": {}, - "files": {} - }, - "metadata": { - "destinationId": "destId", - "workspaceId": "wspId" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "webhook", - "description": "Test 1", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "traits": { - "address": { - "city": "Dhaka", - "country": "Bangladesh" - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "spin_result", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "additional_bet_index": 0, - "battle_id": "N/A", - "bet_amount": 9, - "bet_level": 1, - "bet_multiplier": 1, - "coin_balance": 9466052, - "current_module_name": "CasinoGameModule", - "days_in_game": 0, - "extra_param": "N/A", - "fb_profile": "0", - "featureGameType": "N/A", - "game_fps": 30, - "game_id": "fireEagleBase", - "game_name": "FireEagleSlots", - "gem_balance": 0, - "graphicsQuality": "HD", - "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", - "internetReachability": "ReachableViaLocalAreaNetwork", - "isLowEndDevice": "False", - "is_auto_spin": "False", - "is_turbo": "False", - "isf": "False", - "ishighroller": "False", - "jackpot_win_amount": 90, - "jackpot_win_type": "Silver", - "level": 6, - "lifetime_gem_balance": 0, - "no_of_spin": 1, - "player_total_battles": 0, - "player_total_shields": 0, - "start_date": "2019-08-01", - "total_payments": 0, - "tournament_id": "T1561970819", - "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "versionSessionCount": 2, - "win_amount": 0 - }, - "timestamp": "2019-09-01T15:46:51.693229+05:30", - "type": "track", - "user_properties": { - "coin_balance": 9466052, - "current_module_name": "CasinoGameModule", - "fb_profile": "0", - "game_fps": 30, - "game_name": "FireEagleSlots", - "gem_balance": 0, - "graphicsQuality": "HD", - "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", - "internetReachability": "ReachableViaLocalAreaNetwork", - "isLowEndDevice": false, - "level": 6, - "lifetime_gem_balance": 0, - "player_total_battles": 0, - "player_total_shields": 0, - "start_date": "2019-08-01", - "total_payments": 0, - "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "versionSessionCount": 2 - } - }, - "destination": { - "Config": { - "webhookUrl": "https://6b0e6a60.ngrok.io/n" - }, - "DestinationDefinition": { - "Config": { - "cdkV2Enabled": true - } - } - }, - "metadata": { - "destinationId": "destId", - "workspaceId": "wspId" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "body": { - "JSON": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "traits": { - "address": { - "city": "Dhaka", - "country": "Bangladesh" - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "spin_result", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "additional_bet_index": 0, - "battle_id": "N/A", - "bet_amount": 9, - "bet_level": 1, - "bet_multiplier": 1, - "coin_balance": 9466052, - "current_module_name": "CasinoGameModule", - "days_in_game": 0, - "extra_param": "N/A", - "fb_profile": "0", - "featureGameType": "N/A", - "game_fps": 30, - "game_id": "fireEagleBase", - "game_name": "FireEagleSlots", - "gem_balance": 0, - "graphicsQuality": "HD", - "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", - "internetReachability": "ReachableViaLocalAreaNetwork", - "isLowEndDevice": "False", - "is_auto_spin": "False", - "is_turbo": "False", - "isf": "False", - "ishighroller": "False", - "jackpot_win_amount": 90, - "jackpot_win_type": "Silver", - "level": 6, - "lifetime_gem_balance": 0, - "no_of_spin": 1, - "player_total_battles": 0, - "player_total_shields": 0, - "start_date": "2019-08-01", - "total_payments": 0, - "tournament_id": "T1561970819", - "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "versionSessionCount": 2, - "win_amount": 0 - }, - "timestamp": "2019-09-01T15:46:51.693229+05:30", - "type": "track", - "user_properties": { - "coin_balance": 9466052, - "current_module_name": "CasinoGameModule", - "fb_profile": "0", - "game_fps": 30, - "game_name": "FireEagleSlots", - "gem_balance": 0, - "graphicsQuality": "HD", - "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", - "internetReachability": "ReachableViaLocalAreaNetwork", - "isLowEndDevice": false, - "level": 6, - "lifetime_gem_balance": 0, - "player_total_battles": 0, - "player_total_shields": 0, - "start_date": "2019-08-01", - "total_payments": 0, - "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "versionSessionCount": 2 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "version": "1", - "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "type": "REST", - "method": "POST", - "endpoint": "https://6b0e6a60.ngrok.io/n", - "headers": { - "content-type": "application/json" - }, - "params": {}, - "files": {} - }, - "metadata": { - "destinationId": "destId", - "workspaceId": "wspId" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "webhook", - "description": "Test 2", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "traits": { - "address": { - "city": "Dhaka", - "country": "Bangladesh" - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "spin_result", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "additional_bet_index": 0, - "battle_id": "N/A", - "bet_amount": 9, - "bet_level": 1, - "bet_multiplier": 1, - "coin_balance": 9466052, - "current_module_name": "CasinoGameModule", - "days_in_game": 0, - "extra_param": "N/A", - "fb_profile": "0", - "featureGameType": "N/A", - "game_fps": 30, - "game_id": "fireEagleBase", - "game_name": "FireEagleSlots", - "gem_balance": 0, - "graphicsQuality": "HD", - "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", - "internetReachability": "ReachableViaLocalAreaNetwork", - "isLowEndDevice": "False", - "is_auto_spin": "False", - "is_turbo": "False", - "isf": "False", - "ishighroller": "False", - "jackpot_win_amount": 90, - "jackpot_win_type": "Silver", - "level": 6, - "lifetime_gem_balance": 0, - "no_of_spin": 1, - "player_total_battles": 0, - "player_total_shields": 0, - "start_date": "2019-08-01", - "total_payments": 0, - "tournament_id": "T1561970819", - "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "versionSessionCount": 2, - "win_amount": 0 - }, - "timestamp": "2019-09-01T15:46:51.693229+05:30", - "type": "track", - "user_properties": { - "coin_balance": 9466052, - "current_module_name": "CasinoGameModule", - "fb_profile": "0", - "game_fps": 30, - "game_name": "FireEagleSlots", - "gem_balance": 0, - "graphicsQuality": "HD", - "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", - "internetReachability": "ReachableViaLocalAreaNetwork", - "isLowEndDevice": false, - "level": 6, - "lifetime_gem_balance": 0, - "player_total_battles": 0, - "player_total_shields": 0, - "start_date": "2019-08-01", - "total_payments": 0, - "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "versionSessionCount": 2 - } - }, - "destination": { - "Config": { - "webhookUrl": "https://6b0e6a60." - }, - "DestinationDefinition": { - "Config": { - "cdkV2Enabled": true - } - } - }, - "metadata": { - "destinationId": "destId", - "workspaceId": "wspId" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "body": { - "JSON": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "traits": { - "address": { - "city": "Dhaka", - "country": "Bangladesh" - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "spin_result", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "additional_bet_index": 0, - "battle_id": "N/A", - "bet_amount": 9, - "bet_level": 1, - "bet_multiplier": 1, - "coin_balance": 9466052, - "current_module_name": "CasinoGameModule", - "days_in_game": 0, - "extra_param": "N/A", - "fb_profile": "0", - "featureGameType": "N/A", - "game_fps": 30, - "game_id": "fireEagleBase", - "game_name": "FireEagleSlots", - "gem_balance": 0, - "graphicsQuality": "HD", - "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", - "internetReachability": "ReachableViaLocalAreaNetwork", - "isLowEndDevice": "False", - "is_auto_spin": "False", - "is_turbo": "False", - "isf": "False", - "ishighroller": "False", - "jackpot_win_amount": 90, - "jackpot_win_type": "Silver", - "level": 6, - "lifetime_gem_balance": 0, - "no_of_spin": 1, - "player_total_battles": 0, - "player_total_shields": 0, - "start_date": "2019-08-01", - "total_payments": 0, - "tournament_id": "T1561970819", - "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "versionSessionCount": 2, - "win_amount": 0 - }, - "timestamp": "2019-09-01T15:46:51.693229+05:30", - "type": "track", - "user_properties": { - "coin_balance": 9466052, - "current_module_name": "CasinoGameModule", - "fb_profile": "0", - "game_fps": 30, - "game_name": "FireEagleSlots", - "gem_balance": 0, - "graphicsQuality": "HD", - "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", - "internetReachability": "ReachableViaLocalAreaNetwork", - "isLowEndDevice": false, - "level": 6, - "lifetime_gem_balance": 0, - "player_total_battles": 0, - "player_total_shields": 0, - "start_date": "2019-08-01", - "total_payments": 0, - "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "versionSessionCount": 2 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "version": "1", - "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "type": "REST", - "method": "POST", - "endpoint": "https://6b0e6a60.", - "headers": { - "content-type": "application/json" - }, - "params": {}, - "files": {} - }, - "metadata": { - "destinationId": "destId", - "workspaceId": "wspId" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "webhook", - "description": "Test 3", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "traits": { - "address": { - "city": "Dhaka", - "country": "Bangladesh" - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "spin_result", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "k1": "v1", - "k2": { - "k3": "c3", - "k4": { - "k5": "c5" - } - } - }, - "timestamp": "2019-09-01T15:46:51.693229+05:30", - "type": "track" - }, - "destination": { - "Config": { - "webhookUrl": "https://6b0e6a60.", - "webhookMethod": "GET", - "headers": [ - { - "from": "X-customHeader", - "to": "customHeaderVal" - } - ] - }, - "DestinationDefinition": { - "Config": { - "cdkV2Enabled": true - } - } - }, - "metadata": { - "destinationId": "destId", - "workspaceId": "wspId" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "version": "1", - "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "type": "REST", - "method": "GET", - "endpoint": "https://6b0e6a60.", - "headers": { - "x-customheader": "customHeaderVal" - }, - "params": { - "k1": "v1", - "k2.k3": "c3", - "k2.k4.k5": "c5" - }, - "files": {} - }, - "metadata": { - "destinationId": "destId", - "workspaceId": "wspId" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "webhook", - "description": "Test 4", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "traits": { - "address": { - "city": "Dhaka", - "country": "Bangladesh" - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "spin_result", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "k1": "v1", - "k2": { - "k3": "c3", - "k4": { - "k5": "c5" - } - } - }, - "timestamp": "2019-09-01T15:46:51.693229+05:30", - "type": "track" - }, - "destination": { - "Config": { - "webhookUrl": "https://6b0e6a60.", - "webhookMethod": "GET" - }, - "DestinationDefinition": { - "Config": { - "cdkV2Enabled": true - } - } - }, - "metadata": { - "destinationId": "destId", - "workspaceId": "wspId" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "version": "1", - "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "type": "REST", - "method": "GET", - "endpoint": "https://6b0e6a60.", - "headers": {}, - "params": { - "k1": "v1", - "k2.k3": "c3", - "k2.k4.k5": "c5" - }, - "files": {} - }, - "metadata": { - "destinationId": "destId", - "workspaceId": "wspId" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "webhook", - "description": "Test 5", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "traits": { - "address": { - "city": "Dhaka", - "country": "Bangladesh" - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "spin_result", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "additional_bet_index": 0, - "battle_id": "N/A", - "bet_amount": 9, - "bet_level": 1, - "bet_multiplier": 1, - "coin_balance": 9466052, - "current_module_name": "CasinoGameModule", - "days_in_game": 0, - "extra_param": "N/A", - "fb_profile": "0", - "featureGameType": "N/A", - "game_fps": 30, - "game_id": "fireEagleBase", - "game_name": "FireEagleSlots", - "gem_balance": 0, - "graphicsQuality": "HD", - "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", - "internetReachability": "ReachableViaLocalAreaNetwork", - "isLowEndDevice": "False", - "is_auto_spin": "False", - "is_turbo": "False", - "isf": "False", - "ishighroller": "False", - "jackpot_win_amount": 90, - "jackpot_win_type": "Silver", - "level": 6, - "lifetime_gem_balance": 0, - "no_of_spin": 1, - "player_total_battles": 0, - "player_total_shields": 0, - "start_date": "2019-08-01", - "total_payments": 0, - "tournament_id": "T1561970819", - "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "versionSessionCount": 2, - "win_amount": 0 - }, - "timestamp": "2019-09-01T15:46:51.693229+05:30", - "type": "track", - "request_ip": "127.0.0.1" - }, - "destination": { - "Config": { - "webhookUrl": "http://6b0e6a60.ngrok.io", - "header": [ - { - "from": "test1", - "to": "value1" - }, - { - "from": "test2", - "to": "value2" - } - ] - }, - "DestinationDefinition": { - "Config": { - "cdkV2Enabled": true - } - } - }, - "metadata": { - "destinationId": "destId", - "workspaceId": "wspId" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "body": { - "JSON": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "traits": { - "address": { - "city": "Dhaka", - "country": "Bangladesh" - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - }, - "ip": "127.0.0.1" - }, - "event": "spin_result", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "additional_bet_index": 0, - "battle_id": "N/A", - "bet_amount": 9, - "bet_level": 1, - "bet_multiplier": 1, - "coin_balance": 9466052, - "current_module_name": "CasinoGameModule", - "days_in_game": 0, - "extra_param": "N/A", - "fb_profile": "0", - "featureGameType": "N/A", - "game_fps": 30, - "game_id": "fireEagleBase", - "game_name": "FireEagleSlots", - "gem_balance": 0, - "graphicsQuality": "HD", - "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", - "internetReachability": "ReachableViaLocalAreaNetwork", - "isLowEndDevice": "False", - "is_auto_spin": "False", - "is_turbo": "False", - "isf": "False", - "ishighroller": "False", - "jackpot_win_amount": 90, - "jackpot_win_type": "Silver", - "level": 6, - "lifetime_gem_balance": 0, - "no_of_spin": 1, - "player_total_battles": 0, - "player_total_shields": 0, - "start_date": "2019-08-01", - "total_payments": 0, - "tournament_id": "T1561970819", - "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "versionSessionCount": 2, - "win_amount": 0 - }, - "timestamp": "2019-09-01T15:46:51.693229+05:30", - "type": "track", - "request_ip": "127.0.0.1" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "version": "1", - "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "type": "REST", - "method": "POST", - "endpoint": "http://6b0e6a60.ngrok.io", - "headers": { - "content-type": "application/json" - }, - "params": {}, - "files": {} - }, - "metadata": { - "destinationId": "destId", - "workspaceId": "wspId" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "webhook", - "description": "Test 6", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "traits": { - "address": { - "city": "Dhaka", - "country": "Bangladesh" - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "spin_result", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "additional_bet_index": 0, - "battle_id": "N/A", - "bet_amount": 9, - "bet_level": 1, - "bet_multiplier": 1, - "coin_balance": 9466052, - "current_module_name": "CasinoGameModule", - "days_in_game": 0, - "extra_param": "N/A", - "fb_profile": "0", - "featureGameType": "N/A", - "game_fps": 30, - "game_id": "fireEagleBase", - "game_name": "FireEagleSlots", - "gem_balance": 0, - "graphicsQuality": "HD", - "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", - "internetReachability": "ReachableViaLocalAreaNetwork", - "isLowEndDevice": "False", - "is_auto_spin": "False", - "is_turbo": "False", - "isf": "False", - "ishighroller": "False", - "jackpot_win_amount": 90, - "jackpot_win_type": "Silver", - "level": 6, - "lifetime_gem_balance": 0, - "no_of_spin": 1, - "player_total_battles": 0, - "player_total_shields": 0, - "start_date": "2019-08-01", - "total_payments": 0, - "tournament_id": "T1561970819", - "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "versionSessionCount": 2, - "win_amount": 0 - }, - "timestamp": "2019-09-01T15:46:51.693229+05:30", - "type": "track", - "request_ip": "127.0.0.1" - }, - "destination": { - "Config": { - "webhookUrl": "http://6b0e6a60.ngrok.io", - "headers": [ - { - "from": "Content-Type", - "to": "application/xml" - }, - { - "from": "test2", - "to": "value2" - } - ] - }, - "DestinationDefinition": { - "Config": { - "cdkV2Enabled": true - } - } - }, - "metadata": { - "destinationId": "destId", - "workspaceId": "wspId" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "body": { - "JSON": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "traits": { - "address": { - "city": "Dhaka", - "country": "Bangladesh" - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - }, - "ip": "127.0.0.1" - }, - "event": "spin_result", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "additional_bet_index": 0, - "battle_id": "N/A", - "bet_amount": 9, - "bet_level": 1, - "bet_multiplier": 1, - "coin_balance": 9466052, - "current_module_name": "CasinoGameModule", - "days_in_game": 0, - "extra_param": "N/A", - "fb_profile": "0", - "featureGameType": "N/A", - "game_fps": 30, - "game_id": "fireEagleBase", - "game_name": "FireEagleSlots", - "gem_balance": 0, - "graphicsQuality": "HD", - "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", - "internetReachability": "ReachableViaLocalAreaNetwork", - "isLowEndDevice": "False", - "is_auto_spin": "False", - "is_turbo": "False", - "isf": "False", - "ishighroller": "False", - "jackpot_win_amount": 90, - "jackpot_win_type": "Silver", - "level": 6, - "lifetime_gem_balance": 0, - "no_of_spin": 1, - "player_total_battles": 0, - "player_total_shields": 0, - "start_date": "2019-08-01", - "total_payments": 0, - "tournament_id": "T1561970819", - "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "versionSessionCount": 2, - "win_amount": 0 - }, - "timestamp": "2019-09-01T15:46:51.693229+05:30", - "type": "track", - "request_ip": "127.0.0.1" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "version": "1", - "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "type": "REST", - "method": "POST", - "endpoint": "http://6b0e6a60.ngrok.io", - "headers": { - "content-type": "application/xml", - "test2": "value2" - }, - "params": {}, - "files": {} - }, - "metadata": { - "destinationId": "destId", - "workspaceId": "wspId" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "webhook", - "description": "Test 7", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "event": "spin_result", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "additional_bet_index": 0, - "battle_id": "N/A", - "bet_amount": 9, - "bet_level": 1, - "bet_multiplier": 1, - "coin_balance": 9466052, - "current_module_name": "CasinoGameModule", - "days_in_game": 0, - "extra_param": "N/A", - "fb_profile": "0", - "featureGameType": "N/A", - "game_fps": 30, - "game_id": "fireEagleBase", - "game_name": "FireEagleSlots", - "gem_balance": 0, - "graphicsQuality": "HD", - "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", - "internetReachability": "ReachableViaLocalAreaNetwork", - "isLowEndDevice": "False", - "is_auto_spin": "False", - "is_turbo": "False", - "isf": "False", - "ishighroller": "False", - "jackpot_win_amount": 90, - "jackpot_win_type": "Silver", - "level": 6, - "lifetime_gem_balance": 0, - "no_of_spin": 1, - "player_total_battles": 0, - "player_total_shields": 0, - "start_date": "2019-08-01", - "total_payments": 0, - "tournament_id": "T1561970819", - "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "versionSessionCount": 2, - "win_amount": 0 - }, - "timestamp": "2019-09-01T15:46:51.693229+05:30", - "type": "track" - }, - "destination": { - "Config": { - "webhookUrl": "http://6b0e6a60.ngrok.io", - "headers": [ - { - "from": "Content-Type", - "to": "application/xml" - }, - { - "from": "test2", - "to": "value2" - } - ] - }, - "DestinationDefinition": { - "Config": { - "cdkV2Enabled": true - } - } - }, - "metadata": { - "destinationId": "destId", - "workspaceId": "wspId" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "body": { - "JSON": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "event": "spin_result", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "additional_bet_index": 0, - "battle_id": "N/A", - "bet_amount": 9, - "bet_level": 1, - "bet_multiplier": 1, - "coin_balance": 9466052, - "current_module_name": "CasinoGameModule", - "days_in_game": 0, - "extra_param": "N/A", - "fb_profile": "0", - "featureGameType": "N/A", - "game_fps": 30, - "game_id": "fireEagleBase", - "game_name": "FireEagleSlots", - "gem_balance": 0, - "graphicsQuality": "HD", - "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", - "internetReachability": "ReachableViaLocalAreaNetwork", - "isLowEndDevice": "False", - "is_auto_spin": "False", - "is_turbo": "False", - "isf": "False", - "ishighroller": "False", - "jackpot_win_amount": 90, - "jackpot_win_type": "Silver", - "level": 6, - "lifetime_gem_balance": 0, - "no_of_spin": 1, - "player_total_battles": 0, - "player_total_shields": 0, - "start_date": "2019-08-01", - "total_payments": 0, - "tournament_id": "T1561970819", - "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "versionSessionCount": 2, - "win_amount": 0 - }, - "timestamp": "2019-09-01T15:46:51.693229+05:30", - "type": "track" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "version": "1", - "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "type": "REST", - "method": "POST", - "endpoint": "http://6b0e6a60.ngrok.io", - "headers": { - "content-type": "application/xml", - "test2": "value2" - }, - "params": {}, - "files": {} - }, - "metadata": { - "destinationId": "destId", - "workspaceId": "wspId" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "webhook", - "description": "Test 8", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "traits": { - "address": { - "city": "Dhaka", - "country": "Bangladesh" - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "spin_result", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "additional_bet_index": 0, - "battle_id": "N/A", - "featureGameType": "N/A", - "win_amount": 0 - }, - "timestamp": "2019-09-01T15:46:51.693229+05:30", - "type": "track", - "header": { - "dynamic_header_key_string": "dynamic_header_value_string", - "dynamic_header_key_num": 10, - "dynamic_header_key_object": { - "k1": "v1" - } - }, - "appendPath": "/product/search?string=value" - }, - "destination": { - "Config": { - "webhookUrl": "http://6b0e6a60.ngrok.io", - "headers": [ - { - "from": "", - "to": "" - }, - { - "from": "test2", - "to": "value2" - } - ] - }, - "DestinationDefinition": { - "Config": { - "cdkV2Enabled": true - } - } - }, - "metadata": { - "destinationId": "destId", - "workspaceId": "wspId" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "body": { - "JSON": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "traits": { - "address": { - "city": "Dhaka", - "country": "Bangladesh" - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "spin_result", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "additional_bet_index": 0, - "battle_id": "N/A", - "featureGameType": "N/A", - "win_amount": 0 - }, - "timestamp": "2019-09-01T15:46:51.693229+05:30", - "type": "track" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "version": "1", - "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "type": "REST", - "method": "POST", - "endpoint": "http://6b0e6a60.ngrok.io/product/search?string=value", - "headers": { - "content-type": "application/json", - "test2": "value2", - "dynamic_header_key_string": "dynamic_header_value_string" - }, - "params": {}, - "files": {} - }, - "metadata": { - "destinationId": "destId", - "workspaceId": "wspId" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "webhook", - "description": "Test 9", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "traits": { - "address": { - "city": "Dhaka", - "country": "Bangladesh" - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "spin_result", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "additional_bet_index": 0, - "battle_id": "N/A", - "featureGameType": "N/A", - "win_amount": 0 - }, - "timestamp": "2019-09-01T15:46:51.693229+05:30", - "type": "track", - "fullPath": "https://www.google.com" - }, - "destination": { - "Config": { - "webhookUrl": "http://6b0e6a60.ngrok.io", - "headers": [ - { - "from": "", - "to": "" - }, - { - "from": "test2", - "to": "value2" - } - ] - }, - "DestinationDefinition": { - "Config": { - "cdkV2Enabled": true - } - } - }, - "metadata": { - "destinationId": "destId", - "workspaceId": "wspId" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "body": { - "JSON": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "traits": { - "address": { - "city": "Dhaka", - "country": "Bangladesh" - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "spin_result", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "additional_bet_index": 0, - "battle_id": "N/A", - "featureGameType": "N/A", - "win_amount": 0 - }, - "timestamp": "2019-09-01T15:46:51.693229+05:30", - "type": "track" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "version": "1", - "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google.com", - "headers": { - "content-type": "application/json", - "test2": "value2" - }, - "params": {}, - "files": {} - }, - "metadata": { - "destinationId": "destId", - "workspaceId": "wspId" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "webhook", - "description": "Test 10", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "traits": { - "address": { - "city": "Dhaka", - "country": "Bangladesh" - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "spin_result", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "additional_bet_index": 0, - "battle_id": "N/A", - "featureGameType": "N/A", - "win_amount": 0 - }, - "timestamp": "2019-09-01T15:46:51.693229+05:30", - "type": "track", - "fullPath": "https://www.google.com/", - "appendPath": "?searchTerms=cats" - }, - "destination": { - "Config": { - "webhookUrl": "http://6b0e6a60.ngrok.io", - "headers": [ - { - "from": "", - "to": "" - }, - { - "from": "test2", - "to": "value2" - } - ] - }, - "DestinationDefinition": { - "Config": { - "cdkV2Enabled": true - } - } - }, - "metadata": { - "destinationId": "destId", - "workspaceId": "wspId" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "body": { - "JSON": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "traits": { - "address": { - "city": "Dhaka", - "country": "Bangladesh" - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "spin_result", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "additional_bet_index": 0, - "battle_id": "N/A", - "featureGameType": "N/A", - "win_amount": 0 - }, - "timestamp": "2019-09-01T15:46:51.693229+05:30", - "type": "track" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "version": "1", - "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google.com/?searchTerms=cats", - "headers": { - "content-type": "application/json", - "test2": "value2" - }, - "params": {}, - "files": {} - }, - "metadata": { - "destinationId": "destId", - "workspaceId": "wspId" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "webhook", - "description": "Test 11", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "traits": { - "address": { - "city": "Dhaka", - "country": "Bangladesh" - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "spin_result", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "additional_bet_index": 0, - "battle_id": "N/A", - "featureGameType": "N/A", - "win_amount": 0 - }, - "timestamp": "2019-09-01T15:46:51.693229+05:30", - "type": "track", - "fullPath": "https://www.google.com/", - "appendPath": "?searchTerms=cats" - }, - "destination": { - "Config": { - "webhookUrl": "http://6b0e6a60.ngrok.io", - "webhookMethod": "PUT", - "headers": [ - { - "from": "", - "to": "" - }, - { - "from": "test2", - "to": "value2" - } - ] - }, - "DestinationDefinition": { - "Config": { - "cdkV2Enabled": true - } - } - }, - "metadata": { - "destinationId": "destId", - "workspaceId": "wspId" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "body": { - "JSON": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "traits": { - "address": { - "city": "Dhaka", - "country": "Bangladesh" - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "spin_result", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "additional_bet_index": 0, - "battle_id": "N/A", - "featureGameType": "N/A", - "win_amount": 0 - }, - "timestamp": "2019-09-01T15:46:51.693229+05:30", - "type": "track" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "version": "1", - "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "type": "REST", - "method": "PUT", - "endpoint": "https://www.google.com/?searchTerms=cats", - "headers": { - "content-type": "application/json", - "test2": "value2" - }, - "params": {}, - "files": {} - }, - "metadata": { - "destinationId": "destId", - "workspaceId": "wspId" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "webhook", - "description": "Test 12", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "traits": { - "address": { - "city": "Dhaka", - "country": "Bangladesh" - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "spin_result", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "additional_bet_index": 0, - "battle_id": "N/A", - "featureGameType": "N/A", - "win_amount": 0 - }, - "timestamp": "2019-09-01T15:46:51.693229+05:30", - "type": "track", - "fullPath": "https://www.google.com/", - "appendPath": "?searchTerms=cats" - }, - "destination": { - "Config": { - "webhookUrl": "http://6b0e6a60.ngrok.io", - "webhookMethod": "DELETE", - "headers": [ - { - "from": "", - "to": "" - }, - { - "from": "test2", - "to": "value2" - } - ] - }, - "DestinationDefinition": { - "Config": { - "cdkV2Enabled": true - } - } - }, - "metadata": { - "destinationId": "destId", - "workspaceId": "wspId" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "version": "1", - "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "type": "REST", - "method": "DELETE", - "endpoint": "https://www.google.com/?searchTerms=cats", - "headers": { - "test2": "value2" - }, - "params": { - "additional_bet_index": 0, - "battle_id": "N/A", - "featureGameType": "N/A", - "win_amount": 0 - }, - "files": {} - }, - "metadata": { - "destinationId": "destId", - "workspaceId": "wspId" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "webhook", - "description": "Test 13", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "traits": { - "address": { - "city": "Dhaka", - "country": "Bangladesh" - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "spin_result", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "additional_bet_index": 0, - "battle_id": "N/A", - "bet_amount": 9, - "bet_level": 1, - "bet_multiplier": 1, - "coin_balance": 9466052, - "current_module_name": "CasinoGameModule", - "days_in_game": 0, - "extra_param": "N/A", - "fb_profile": "0", - "featureGameType": "N/A", - "game_fps": 30, - "game_id": "fireEagleBase", - "game_name": "FireEagleSlots", - "gem_balance": 0, - "graphicsQuality": "HD", - "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", - "internetReachability": "ReachableViaLocalAreaNetwork", - "isLowEndDevice": "False", - "is_auto_spin": "False", - "is_turbo": "False", - "isf": "False", - "ishighroller": "False", - "jackpot_win_amount": 90, - "jackpot_win_type": "Silver", - "level": 6, - "lifetime_gem_balance": 0, - "no_of_spin": 1, - "player_total_battles": 0, - "player_total_shields": 0, - "start_date": "2019-08-01", - "total_payments": 0, - "tournament_id": "T1561970819", - "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "versionSessionCount": 2, - "win_amount": 0 - }, - "timestamp": "2019-09-01T15:46:51.693229+05:30", - "type": "track", - "user_properties": { - "coin_balance": 9466052, - "current_module_name": "CasinoGameModule", - "fb_profile": "0", - "game_fps": 30, - "game_name": "FireEagleSlots", - "gem_balance": 0, - "graphicsQuality": "HD", - "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", - "internetReachability": "ReachableViaLocalAreaNetwork", - "isLowEndDevice": false, - "level": 6, - "lifetime_gem_balance": 0, - "player_total_battles": 0, - "player_total_shields": 0, - "start_date": "2019-08-01", - "total_payments": 0, - "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "versionSessionCount": 2 - } - }, - "destination": { - "Config": { - "webhookUrl": "http://6b0e6a60.ngrok.io", - "webhookMethod": "POST", - "headers": [ - { - "from": "test2", - "to": "value2" - } - ] - }, - "DestinationDefinition": { - "Config": { - "cdkV2Enabled": true - } - } - }, - "metadata": { - "destinationId": "destId", - "workspaceId": "wspId" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "body": { - "JSON": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "traits": { - "address": { - "city": "Dhaka", - "country": "Bangladesh" - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "spin_result", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "additional_bet_index": 0, - "battle_id": "N/A", - "bet_amount": 9, - "bet_level": 1, - "bet_multiplier": 1, - "coin_balance": 9466052, - "current_module_name": "CasinoGameModule", - "days_in_game": 0, - "extra_param": "N/A", - "fb_profile": "0", - "featureGameType": "N/A", - "game_fps": 30, - "game_id": "fireEagleBase", - "game_name": "FireEagleSlots", - "gem_balance": 0, - "graphicsQuality": "HD", - "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", - "internetReachability": "ReachableViaLocalAreaNetwork", - "isLowEndDevice": "False", - "is_auto_spin": "False", - "is_turbo": "False", - "isf": "False", - "ishighroller": "False", - "jackpot_win_amount": 90, - "jackpot_win_type": "Silver", - "level": 6, - "lifetime_gem_balance": 0, - "no_of_spin": 1, - "player_total_battles": 0, - "player_total_shields": 0, - "start_date": "2019-08-01", - "total_payments": 0, - "tournament_id": "T1561970819", - "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "versionSessionCount": 2, - "win_amount": 0 - }, - "timestamp": "2019-09-01T15:46:51.693229+05:30", - "type": "track", - "user_properties": { - "coin_balance": 9466052, - "current_module_name": "CasinoGameModule", - "fb_profile": "0", - "game_fps": 30, - "game_name": "FireEagleSlots", - "gem_balance": 0, - "graphicsQuality": "HD", - "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", - "internetReachability": "ReachableViaLocalAreaNetwork", - "isLowEndDevice": false, - "level": 6, - "lifetime_gem_balance": 0, - "player_total_battles": 0, - "player_total_shields": 0, - "start_date": "2019-08-01", - "total_payments": 0, - "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "versionSessionCount": 2 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "version": "1", - "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "type": "REST", - "method": "POST", - "endpoint": "http://6b0e6a60.ngrok.io", - "headers": { - "content-type": "application/json", - "test2": "value2" - }, - "params": {}, - "files": {} - }, - "metadata": { - "destinationId": "destId", - "workspaceId": "wspId" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "webhook", - "description": "Test 14", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "traits": { - "address": { - "city": "Dhaka", - "country": "Bangladesh" - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "spin_result", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "additional_bet_index": 0, - "battle_id": "N/A", - "bet_amount": 9, - "bet_level": 1, - "bet_multiplier": 1, - "coin_balance": 9466052, - "current_module_name": "CasinoGameModule", - "days_in_game": 0, - "extra_param": "N/A", - "fb_profile": "0", - "featureGameType": "N/A", - "game_fps": 30, - "game_id": "fireEagleBase", - "game_name": "FireEagleSlots", - "gem_balance": 0, - "graphicsQuality": "HD", - "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", - "internetReachability": "ReachableViaLocalAreaNetwork", - "isLowEndDevice": "False", - "is_auto_spin": "False", - "is_turbo": "False", - "isf": "False", - "ishighroller": "False", - "jackpot_win_amount": 90, - "jackpot_win_type": "Silver", - "level": 6, - "lifetime_gem_balance": 0, - "no_of_spin": 1, - "player_total_battles": 0, - "player_total_shields": 0, - "start_date": "2019-08-01", - "total_payments": 0, - "tournament_id": "T1561970819", - "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "versionSessionCount": 2, - "win_amount": 0 - }, - "timestamp": "2019-09-01T15:46:51.693229+05:30", - "type": "track", - "user_properties": { - "coin_balance": 9466052, - "current_module_name": "CasinoGameModule", - "fb_profile": "0", - "game_fps": 30, - "game_name": "FireEagleSlots", - "gem_balance": 0, - "graphicsQuality": "HD", - "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", - "internetReachability": "ReachableViaLocalAreaNetwork", - "isLowEndDevice": false, - "level": 6, - "lifetime_gem_balance": 0, - "player_total_battles": 0, - "player_total_shields": 0, - "start_date": "2019-08-01", - "total_payments": 0, - "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "versionSessionCount": 2 - } - }, - "destination": { - "Config": { - "webhookUrl": "http://6b0e6a60.ngrok.io", - "webhookMethod": "PATCH", - "headers": [ - { - "from": "test2", - "to": "value2" - } - ] - }, - "DestinationDefinition": { - "Config": { - "cdkV2Enabled": true - } - } - }, - "metadata": { - "destinationId": "destId", - "workspaceId": "wspId" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "body": { - "JSON": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "traits": { - "address": { - "city": "Dhaka", - "country": "Bangladesh" - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "spin_result", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "additional_bet_index": 0, - "battle_id": "N/A", - "bet_amount": 9, - "bet_level": 1, - "bet_multiplier": 1, - "coin_balance": 9466052, - "current_module_name": "CasinoGameModule", - "days_in_game": 0, - "extra_param": "N/A", - "fb_profile": "0", - "featureGameType": "N/A", - "game_fps": 30, - "game_id": "fireEagleBase", - "game_name": "FireEagleSlots", - "gem_balance": 0, - "graphicsQuality": "HD", - "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", - "internetReachability": "ReachableViaLocalAreaNetwork", - "isLowEndDevice": "False", - "is_auto_spin": "False", - "is_turbo": "False", - "isf": "False", - "ishighroller": "False", - "jackpot_win_amount": 90, - "jackpot_win_type": "Silver", - "level": 6, - "lifetime_gem_balance": 0, - "no_of_spin": 1, - "player_total_battles": 0, - "player_total_shields": 0, - "start_date": "2019-08-01", - "total_payments": 0, - "tournament_id": "T1561970819", - "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "versionSessionCount": 2, - "win_amount": 0 - }, - "timestamp": "2019-09-01T15:46:51.693229+05:30", - "type": "track", - "user_properties": { - "coin_balance": 9466052, - "current_module_name": "CasinoGameModule", - "fb_profile": "0", - "game_fps": 30, - "game_name": "FireEagleSlots", - "gem_balance": 0, - "graphicsQuality": "HD", - "idfa": "2bf99787-33d2-4ae2-a76a-c49672f97252", - "internetReachability": "ReachableViaLocalAreaNetwork", - "isLowEndDevice": false, - "level": 6, - "lifetime_gem_balance": 0, - "player_total_battles": 0, - "player_total_shields": 0, - "start_date": "2019-08-01", - "total_payments": 0, - "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "versionSessionCount": 2 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "version": "1", - "userId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "type": "REST", - "method": "PATCH", - "endpoint": "http://6b0e6a60.ngrok.io", - "headers": { - "content-type": "application/json", - "test2": "value2" - }, - "params": {}, - "files": {} - }, - "metadata": { - "destinationId": "destId", - "workspaceId": "wspId" - }, - "statusCode": 200 - } - ] - } - } - } -] \ No newline at end of file + { + name: 'webhook', + description: 'Test 0', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, + traits: { + address: { + city: 'Dhaka', + country: 'Bangladesh', + }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'spin_result', + integrations: { + All: true, + }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + additional_bet_index: 0, + battle_id: 'N/A', + bet_amount: 9, + bet_level: 1, + bet_multiplier: 1, + coin_balance: 9466052, + current_module_name: 'CasinoGameModule', + days_in_game: 0, + extra_param: 'N/A', + fb_profile: '0', + featureGameType: 'N/A', + game_fps: 30, + game_id: 'fireEagleBase', + game_name: 'FireEagleSlots', + gem_balance: 0, + graphicsQuality: 'HD', + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + internetReachability: 'ReachableViaLocalAreaNetwork', + isLowEndDevice: 'False', + is_auto_spin: 'False', + is_turbo: 'False', + isf: 'False', + ishighroller: 'False', + jackpot_win_amount: 90, + jackpot_win_type: 'Silver', + level: 6, + lifetime_gem_balance: 0, + no_of_spin: 1, + player_total_battles: 0, + player_total_shields: 0, + start_date: '2019-08-01', + total_payments: 0, + tournament_id: 'T1561970819', + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + versionSessionCount: 2, + win_amount: 0, + }, + timestamp: '2019-09-01T15:46:51.693229+05:30', + type: 'track', + user_properties: { + coin_balance: 9466052, + current_module_name: 'CasinoGameModule', + fb_profile: '0', + game_fps: 30, + game_name: 'FireEagleSlots', + gem_balance: 0, + graphicsQuality: 'HD', + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + internetReachability: 'ReachableViaLocalAreaNetwork', + isLowEndDevice: false, + level: 6, + lifetime_gem_balance: 0, + player_total_battles: 0, + player_total_shields: 0, + start_date: '2019-08-01', + total_payments: 0, + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + versionSessionCount: 2, + }, + }, + destination: { + Config: { + webhookUrl: 'http://6b0e6a60.ngrok.io', + headers: [ + { + from: '', + to: '', + }, + { + from: 'test2', + to: 'value2', + }, + ], + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + JSON: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, + traits: { + address: { + city: 'Dhaka', + country: 'Bangladesh', + }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'spin_result', + integrations: { + All: true, + }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + additional_bet_index: 0, + battle_id: 'N/A', + bet_amount: 9, + bet_level: 1, + bet_multiplier: 1, + coin_balance: 9466052, + current_module_name: 'CasinoGameModule', + days_in_game: 0, + extra_param: 'N/A', + fb_profile: '0', + featureGameType: 'N/A', + game_fps: 30, + game_id: 'fireEagleBase', + game_name: 'FireEagleSlots', + gem_balance: 0, + graphicsQuality: 'HD', + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + internetReachability: 'ReachableViaLocalAreaNetwork', + isLowEndDevice: 'False', + is_auto_spin: 'False', + is_turbo: 'False', + isf: 'False', + ishighroller: 'False', + jackpot_win_amount: 90, + jackpot_win_type: 'Silver', + level: 6, + lifetime_gem_balance: 0, + no_of_spin: 1, + player_total_battles: 0, + player_total_shields: 0, + start_date: '2019-08-01', + total_payments: 0, + tournament_id: 'T1561970819', + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + versionSessionCount: 2, + win_amount: 0, + }, + timestamp: '2019-09-01T15:46:51.693229+05:30', + type: 'track', + user_properties: { + coin_balance: 9466052, + current_module_name: 'CasinoGameModule', + fb_profile: '0', + game_fps: 30, + game_name: 'FireEagleSlots', + gem_balance: 0, + graphicsQuality: 'HD', + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + internetReachability: 'ReachableViaLocalAreaNetwork', + isLowEndDevice: false, + level: 6, + lifetime_gem_balance: 0, + player_total_battles: 0, + player_total_shields: 0, + start_date: '2019-08-01', + total_payments: 0, + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + versionSessionCount: 2, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + version: '1', + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + type: 'REST', + method: 'POST', + endpoint: 'http://6b0e6a60.ngrok.io', + headers: { + 'content-type': 'application/json', + test2: 'value2', + }, + params: {}, + files: {}, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'webhook', + description: 'Test 1', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, + traits: { + address: { + city: 'Dhaka', + country: 'Bangladesh', + }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'spin_result', + integrations: { + All: true, + }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + additional_bet_index: 0, + battle_id: 'N/A', + bet_amount: 9, + bet_level: 1, + bet_multiplier: 1, + coin_balance: 9466052, + current_module_name: 'CasinoGameModule', + days_in_game: 0, + extra_param: 'N/A', + fb_profile: '0', + featureGameType: 'N/A', + game_fps: 30, + game_id: 'fireEagleBase', + game_name: 'FireEagleSlots', + gem_balance: 0, + graphicsQuality: 'HD', + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + internetReachability: 'ReachableViaLocalAreaNetwork', + isLowEndDevice: 'False', + is_auto_spin: 'False', + is_turbo: 'False', + isf: 'False', + ishighroller: 'False', + jackpot_win_amount: 90, + jackpot_win_type: 'Silver', + level: 6, + lifetime_gem_balance: 0, + no_of_spin: 1, + player_total_battles: 0, + player_total_shields: 0, + start_date: '2019-08-01', + total_payments: 0, + tournament_id: 'T1561970819', + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + versionSessionCount: 2, + win_amount: 0, + }, + timestamp: '2019-09-01T15:46:51.693229+05:30', + type: 'track', + user_properties: { + coin_balance: 9466052, + current_module_name: 'CasinoGameModule', + fb_profile: '0', + game_fps: 30, + game_name: 'FireEagleSlots', + gem_balance: 0, + graphicsQuality: 'HD', + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + internetReachability: 'ReachableViaLocalAreaNetwork', + isLowEndDevice: false, + level: 6, + lifetime_gem_balance: 0, + player_total_battles: 0, + player_total_shields: 0, + start_date: '2019-08-01', + total_payments: 0, + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + versionSessionCount: 2, + }, + }, + destination: { + Config: { + webhookUrl: 'https://6b0e6a60.ngrok.io/n', + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + JSON: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, + traits: { + address: { + city: 'Dhaka', + country: 'Bangladesh', + }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'spin_result', + integrations: { + All: true, + }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + additional_bet_index: 0, + battle_id: 'N/A', + bet_amount: 9, + bet_level: 1, + bet_multiplier: 1, + coin_balance: 9466052, + current_module_name: 'CasinoGameModule', + days_in_game: 0, + extra_param: 'N/A', + fb_profile: '0', + featureGameType: 'N/A', + game_fps: 30, + game_id: 'fireEagleBase', + game_name: 'FireEagleSlots', + gem_balance: 0, + graphicsQuality: 'HD', + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + internetReachability: 'ReachableViaLocalAreaNetwork', + isLowEndDevice: 'False', + is_auto_spin: 'False', + is_turbo: 'False', + isf: 'False', + ishighroller: 'False', + jackpot_win_amount: 90, + jackpot_win_type: 'Silver', + level: 6, + lifetime_gem_balance: 0, + no_of_spin: 1, + player_total_battles: 0, + player_total_shields: 0, + start_date: '2019-08-01', + total_payments: 0, + tournament_id: 'T1561970819', + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + versionSessionCount: 2, + win_amount: 0, + }, + timestamp: '2019-09-01T15:46:51.693229+05:30', + type: 'track', + user_properties: { + coin_balance: 9466052, + current_module_name: 'CasinoGameModule', + fb_profile: '0', + game_fps: 30, + game_name: 'FireEagleSlots', + gem_balance: 0, + graphicsQuality: 'HD', + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + internetReachability: 'ReachableViaLocalAreaNetwork', + isLowEndDevice: false, + level: 6, + lifetime_gem_balance: 0, + player_total_battles: 0, + player_total_shields: 0, + start_date: '2019-08-01', + total_payments: 0, + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + versionSessionCount: 2, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + version: '1', + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + type: 'REST', + method: 'POST', + endpoint: 'https://6b0e6a60.ngrok.io/n', + headers: { + 'content-type': 'application/json', + }, + params: {}, + files: {}, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'webhook', + description: 'Test 2', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, + traits: { + address: { + city: 'Dhaka', + country: 'Bangladesh', + }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'spin_result', + integrations: { + All: true, + }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + additional_bet_index: 0, + battle_id: 'N/A', + bet_amount: 9, + bet_level: 1, + bet_multiplier: 1, + coin_balance: 9466052, + current_module_name: 'CasinoGameModule', + days_in_game: 0, + extra_param: 'N/A', + fb_profile: '0', + featureGameType: 'N/A', + game_fps: 30, + game_id: 'fireEagleBase', + game_name: 'FireEagleSlots', + gem_balance: 0, + graphicsQuality: 'HD', + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + internetReachability: 'ReachableViaLocalAreaNetwork', + isLowEndDevice: 'False', + is_auto_spin: 'False', + is_turbo: 'False', + isf: 'False', + ishighroller: 'False', + jackpot_win_amount: 90, + jackpot_win_type: 'Silver', + level: 6, + lifetime_gem_balance: 0, + no_of_spin: 1, + player_total_battles: 0, + player_total_shields: 0, + start_date: '2019-08-01', + total_payments: 0, + tournament_id: 'T1561970819', + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + versionSessionCount: 2, + win_amount: 0, + }, + timestamp: '2019-09-01T15:46:51.693229+05:30', + type: 'track', + user_properties: { + coin_balance: 9466052, + current_module_name: 'CasinoGameModule', + fb_profile: '0', + game_fps: 30, + game_name: 'FireEagleSlots', + gem_balance: 0, + graphicsQuality: 'HD', + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + internetReachability: 'ReachableViaLocalAreaNetwork', + isLowEndDevice: false, + level: 6, + lifetime_gem_balance: 0, + player_total_battles: 0, + player_total_shields: 0, + start_date: '2019-08-01', + total_payments: 0, + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + versionSessionCount: 2, + }, + }, + destination: { + Config: { + webhookUrl: 'https://6b0e6a60.', + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + JSON: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, + traits: { + address: { + city: 'Dhaka', + country: 'Bangladesh', + }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'spin_result', + integrations: { + All: true, + }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + additional_bet_index: 0, + battle_id: 'N/A', + bet_amount: 9, + bet_level: 1, + bet_multiplier: 1, + coin_balance: 9466052, + current_module_name: 'CasinoGameModule', + days_in_game: 0, + extra_param: 'N/A', + fb_profile: '0', + featureGameType: 'N/A', + game_fps: 30, + game_id: 'fireEagleBase', + game_name: 'FireEagleSlots', + gem_balance: 0, + graphicsQuality: 'HD', + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + internetReachability: 'ReachableViaLocalAreaNetwork', + isLowEndDevice: 'False', + is_auto_spin: 'False', + is_turbo: 'False', + isf: 'False', + ishighroller: 'False', + jackpot_win_amount: 90, + jackpot_win_type: 'Silver', + level: 6, + lifetime_gem_balance: 0, + no_of_spin: 1, + player_total_battles: 0, + player_total_shields: 0, + start_date: '2019-08-01', + total_payments: 0, + tournament_id: 'T1561970819', + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + versionSessionCount: 2, + win_amount: 0, + }, + timestamp: '2019-09-01T15:46:51.693229+05:30', + type: 'track', + user_properties: { + coin_balance: 9466052, + current_module_name: 'CasinoGameModule', + fb_profile: '0', + game_fps: 30, + game_name: 'FireEagleSlots', + gem_balance: 0, + graphicsQuality: 'HD', + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + internetReachability: 'ReachableViaLocalAreaNetwork', + isLowEndDevice: false, + level: 6, + lifetime_gem_balance: 0, + player_total_battles: 0, + player_total_shields: 0, + start_date: '2019-08-01', + total_payments: 0, + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + versionSessionCount: 2, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + version: '1', + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + type: 'REST', + method: 'POST', + endpoint: 'https://6b0e6a60.', + headers: { + 'content-type': 'application/json', + }, + params: {}, + files: {}, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'webhook', + description: 'Test 3', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, + traits: { + address: { + city: 'Dhaka', + country: 'Bangladesh', + }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'spin_result', + integrations: { + All: true, + }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + k1: 'v1', + k2: { + k3: 'c3', + k4: { + k5: 'c5', + }, + }, + }, + timestamp: '2019-09-01T15:46:51.693229+05:30', + type: 'track', + }, + destination: { + Config: { + webhookUrl: 'https://6b0e6a60.', + webhookMethod: 'GET', + headers: [ + { + from: 'X-customHeader', + to: 'customHeaderVal', + }, + ], + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + version: '1', + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + type: 'REST', + method: 'GET', + endpoint: 'https://6b0e6a60.', + headers: { + 'x-customheader': 'customHeaderVal', + }, + params: { + k1: 'v1', + 'k2.k3': 'c3', + 'k2.k4.k5': 'c5', + }, + files: {}, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'webhook', + description: 'Test 4', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, + traits: { + address: { + city: 'Dhaka', + country: 'Bangladesh', + }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'spin_result', + integrations: { + All: true, + }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + k1: 'v1', + k2: { + k3: 'c3', + k4: { + k5: 'c5', + }, + }, + }, + timestamp: '2019-09-01T15:46:51.693229+05:30', + type: 'track', + }, + destination: { + Config: { + webhookUrl: 'https://6b0e6a60.', + webhookMethod: 'GET', + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + version: '1', + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + type: 'REST', + method: 'GET', + endpoint: 'https://6b0e6a60.', + headers: {}, + params: { + k1: 'v1', + 'k2.k3': 'c3', + 'k2.k4.k5': 'c5', + }, + files: {}, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'webhook', + description: 'Test 5', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, + traits: { + address: { + city: 'Dhaka', + country: 'Bangladesh', + }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'spin_result', + integrations: { + All: true, + }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + additional_bet_index: 0, + battle_id: 'N/A', + bet_amount: 9, + bet_level: 1, + bet_multiplier: 1, + coin_balance: 9466052, + current_module_name: 'CasinoGameModule', + days_in_game: 0, + extra_param: 'N/A', + fb_profile: '0', + featureGameType: 'N/A', + game_fps: 30, + game_id: 'fireEagleBase', + game_name: 'FireEagleSlots', + gem_balance: 0, + graphicsQuality: 'HD', + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + internetReachability: 'ReachableViaLocalAreaNetwork', + isLowEndDevice: 'False', + is_auto_spin: 'False', + is_turbo: 'False', + isf: 'False', + ishighroller: 'False', + jackpot_win_amount: 90, + jackpot_win_type: 'Silver', + level: 6, + lifetime_gem_balance: 0, + no_of_spin: 1, + player_total_battles: 0, + player_total_shields: 0, + start_date: '2019-08-01', + total_payments: 0, + tournament_id: 'T1561970819', + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + versionSessionCount: 2, + win_amount: 0, + }, + timestamp: '2019-09-01T15:46:51.693229+05:30', + type: 'track', + request_ip: '127.0.0.1', + }, + destination: { + Config: { + webhookUrl: 'http://6b0e6a60.ngrok.io', + header: [ + { + from: 'test1', + to: 'value1', + }, + { + from: 'test2', + to: 'value2', + }, + ], + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + JSON: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, + traits: { + address: { + city: 'Dhaka', + country: 'Bangladesh', + }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + ip: '127.0.0.1', + }, + event: 'spin_result', + integrations: { + All: true, + }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + additional_bet_index: 0, + battle_id: 'N/A', + bet_amount: 9, + bet_level: 1, + bet_multiplier: 1, + coin_balance: 9466052, + current_module_name: 'CasinoGameModule', + days_in_game: 0, + extra_param: 'N/A', + fb_profile: '0', + featureGameType: 'N/A', + game_fps: 30, + game_id: 'fireEagleBase', + game_name: 'FireEagleSlots', + gem_balance: 0, + graphicsQuality: 'HD', + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + internetReachability: 'ReachableViaLocalAreaNetwork', + isLowEndDevice: 'False', + is_auto_spin: 'False', + is_turbo: 'False', + isf: 'False', + ishighroller: 'False', + jackpot_win_amount: 90, + jackpot_win_type: 'Silver', + level: 6, + lifetime_gem_balance: 0, + no_of_spin: 1, + player_total_battles: 0, + player_total_shields: 0, + start_date: '2019-08-01', + total_payments: 0, + tournament_id: 'T1561970819', + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + versionSessionCount: 2, + win_amount: 0, + }, + timestamp: '2019-09-01T15:46:51.693229+05:30', + type: 'track', + request_ip: '127.0.0.1', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + version: '1', + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + type: 'REST', + method: 'POST', + endpoint: 'http://6b0e6a60.ngrok.io', + headers: { + 'content-type': 'application/json', + }, + params: {}, + files: {}, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'webhook', + description: 'Test 6', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, + traits: { + address: { + city: 'Dhaka', + country: 'Bangladesh', + }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'spin_result', + integrations: { + All: true, + }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + additional_bet_index: 0, + battle_id: 'N/A', + bet_amount: 9, + bet_level: 1, + bet_multiplier: 1, + coin_balance: 9466052, + current_module_name: 'CasinoGameModule', + days_in_game: 0, + extra_param: 'N/A', + fb_profile: '0', + featureGameType: 'N/A', + game_fps: 30, + game_id: 'fireEagleBase', + game_name: 'FireEagleSlots', + gem_balance: 0, + graphicsQuality: 'HD', + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + internetReachability: 'ReachableViaLocalAreaNetwork', + isLowEndDevice: 'False', + is_auto_spin: 'False', + is_turbo: 'False', + isf: 'False', + ishighroller: 'False', + jackpot_win_amount: 90, + jackpot_win_type: 'Silver', + level: 6, + lifetime_gem_balance: 0, + no_of_spin: 1, + player_total_battles: 0, + player_total_shields: 0, + start_date: '2019-08-01', + total_payments: 0, + tournament_id: 'T1561970819', + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + versionSessionCount: 2, + win_amount: 0, + }, + timestamp: '2019-09-01T15:46:51.693229+05:30', + type: 'track', + request_ip: '127.0.0.1', + }, + destination: { + Config: { + webhookUrl: 'http://6b0e6a60.ngrok.io', + headers: [ + { + from: 'Content-Type', + to: 'application/xml', + }, + { + from: 'test2', + to: 'value2', + }, + ], + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + JSON: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, + traits: { + address: { + city: 'Dhaka', + country: 'Bangladesh', + }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + ip: '127.0.0.1', + }, + event: 'spin_result', + integrations: { + All: true, + }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + additional_bet_index: 0, + battle_id: 'N/A', + bet_amount: 9, + bet_level: 1, + bet_multiplier: 1, + coin_balance: 9466052, + current_module_name: 'CasinoGameModule', + days_in_game: 0, + extra_param: 'N/A', + fb_profile: '0', + featureGameType: 'N/A', + game_fps: 30, + game_id: 'fireEagleBase', + game_name: 'FireEagleSlots', + gem_balance: 0, + graphicsQuality: 'HD', + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + internetReachability: 'ReachableViaLocalAreaNetwork', + isLowEndDevice: 'False', + is_auto_spin: 'False', + is_turbo: 'False', + isf: 'False', + ishighroller: 'False', + jackpot_win_amount: 90, + jackpot_win_type: 'Silver', + level: 6, + lifetime_gem_balance: 0, + no_of_spin: 1, + player_total_battles: 0, + player_total_shields: 0, + start_date: '2019-08-01', + total_payments: 0, + tournament_id: 'T1561970819', + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + versionSessionCount: 2, + win_amount: 0, + }, + timestamp: '2019-09-01T15:46:51.693229+05:30', + type: 'track', + request_ip: '127.0.0.1', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + version: '1', + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + type: 'REST', + method: 'POST', + endpoint: 'http://6b0e6a60.ngrok.io', + headers: { + 'content-type': 'application/xml', + test2: 'value2', + }, + params: {}, + files: {}, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'webhook', + description: 'Test 7', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + event: 'spin_result', + integrations: { + All: true, + }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + additional_bet_index: 0, + battle_id: 'N/A', + bet_amount: 9, + bet_level: 1, + bet_multiplier: 1, + coin_balance: 9466052, + current_module_name: 'CasinoGameModule', + days_in_game: 0, + extra_param: 'N/A', + fb_profile: '0', + featureGameType: 'N/A', + game_fps: 30, + game_id: 'fireEagleBase', + game_name: 'FireEagleSlots', + gem_balance: 0, + graphicsQuality: 'HD', + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + internetReachability: 'ReachableViaLocalAreaNetwork', + isLowEndDevice: 'False', + is_auto_spin: 'False', + is_turbo: 'False', + isf: 'False', + ishighroller: 'False', + jackpot_win_amount: 90, + jackpot_win_type: 'Silver', + level: 6, + lifetime_gem_balance: 0, + no_of_spin: 1, + player_total_battles: 0, + player_total_shields: 0, + start_date: '2019-08-01', + total_payments: 0, + tournament_id: 'T1561970819', + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + versionSessionCount: 2, + win_amount: 0, + }, + timestamp: '2019-09-01T15:46:51.693229+05:30', + type: 'track', + }, + destination: { + Config: { + webhookUrl: 'http://6b0e6a60.ngrok.io', + headers: [ + { + from: 'Content-Type', + to: 'application/xml', + }, + { + from: 'test2', + to: 'value2', + }, + ], + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + JSON: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + event: 'spin_result', + integrations: { + All: true, + }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + additional_bet_index: 0, + battle_id: 'N/A', + bet_amount: 9, + bet_level: 1, + bet_multiplier: 1, + coin_balance: 9466052, + current_module_name: 'CasinoGameModule', + days_in_game: 0, + extra_param: 'N/A', + fb_profile: '0', + featureGameType: 'N/A', + game_fps: 30, + game_id: 'fireEagleBase', + game_name: 'FireEagleSlots', + gem_balance: 0, + graphicsQuality: 'HD', + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + internetReachability: 'ReachableViaLocalAreaNetwork', + isLowEndDevice: 'False', + is_auto_spin: 'False', + is_turbo: 'False', + isf: 'False', + ishighroller: 'False', + jackpot_win_amount: 90, + jackpot_win_type: 'Silver', + level: 6, + lifetime_gem_balance: 0, + no_of_spin: 1, + player_total_battles: 0, + player_total_shields: 0, + start_date: '2019-08-01', + total_payments: 0, + tournament_id: 'T1561970819', + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + versionSessionCount: 2, + win_amount: 0, + }, + timestamp: '2019-09-01T15:46:51.693229+05:30', + type: 'track', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + version: '1', + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + type: 'REST', + method: 'POST', + endpoint: 'http://6b0e6a60.ngrok.io', + headers: { + 'content-type': 'application/xml', + test2: 'value2', + }, + params: {}, + files: {}, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'webhook', + description: 'Test 8', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, + traits: { + address: { + city: 'Dhaka', + country: 'Bangladesh', + }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'spin_result', + integrations: { + All: true, + }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + additional_bet_index: 0, + battle_id: 'N/A', + featureGameType: 'N/A', + win_amount: 0, + }, + timestamp: '2019-09-01T15:46:51.693229+05:30', + type: 'track', + header: { + dynamic_header_key_string: 'dynamic_header_value_string', + dynamic_header_key_num: 10, + dynamic_header_key_object: { + k1: 'v1', + }, + }, + appendPath: '/product/search?string=value', + }, + destination: { + Config: { + webhookUrl: 'http://6b0e6a60.ngrok.io', + headers: [ + { + from: '', + to: '', + }, + { + from: 'test2', + to: 'value2', + }, + ], + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + JSON: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, + traits: { + address: { + city: 'Dhaka', + country: 'Bangladesh', + }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'spin_result', + integrations: { + All: true, + }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + additional_bet_index: 0, + battle_id: 'N/A', + featureGameType: 'N/A', + win_amount: 0, + }, + timestamp: '2019-09-01T15:46:51.693229+05:30', + type: 'track', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + version: '1', + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + type: 'REST', + method: 'POST', + endpoint: 'http://6b0e6a60.ngrok.io/product/search?string=value', + headers: { + 'content-type': 'application/json', + test2: 'value2', + dynamic_header_key_string: 'dynamic_header_value_string', + }, + params: {}, + files: {}, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'webhook', + description: 'Test 9', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, + traits: { + address: { + city: 'Dhaka', + country: 'Bangladesh', + }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'spin_result', + integrations: { + All: true, + }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + additional_bet_index: 0, + battle_id: 'N/A', + featureGameType: 'N/A', + win_amount: 0, + }, + timestamp: '2019-09-01T15:46:51.693229+05:30', + type: 'track', + fullPath: 'https://www.google.com', + }, + destination: { + Config: { + webhookUrl: 'http://6b0e6a60.ngrok.io', + headers: [ + { + from: '', + to: '', + }, + { + from: 'test2', + to: 'value2', + }, + ], + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + JSON: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, + traits: { + address: { + city: 'Dhaka', + country: 'Bangladesh', + }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'spin_result', + integrations: { + All: true, + }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + additional_bet_index: 0, + battle_id: 'N/A', + featureGameType: 'N/A', + win_amount: 0, + }, + timestamp: '2019-09-01T15:46:51.693229+05:30', + type: 'track', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + version: '1', + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google.com', + headers: { + 'content-type': 'application/json', + test2: 'value2', + }, + params: {}, + files: {}, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'webhook', + description: 'Test 10', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, + traits: { + address: { + city: 'Dhaka', + country: 'Bangladesh', + }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'spin_result', + integrations: { + All: true, + }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + additional_bet_index: 0, + battle_id: 'N/A', + featureGameType: 'N/A', + win_amount: 0, + }, + timestamp: '2019-09-01T15:46:51.693229+05:30', + type: 'track', + fullPath: 'https://www.google.com/', + appendPath: '?searchTerms=cats', + }, + destination: { + Config: { + webhookUrl: 'http://6b0e6a60.ngrok.io', + headers: [ + { + from: '', + to: '', + }, + { + from: 'test2', + to: 'value2', + }, + ], + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + JSON: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, + traits: { + address: { + city: 'Dhaka', + country: 'Bangladesh', + }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'spin_result', + integrations: { + All: true, + }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + additional_bet_index: 0, + battle_id: 'N/A', + featureGameType: 'N/A', + win_amount: 0, + }, + timestamp: '2019-09-01T15:46:51.693229+05:30', + type: 'track', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + version: '1', + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google.com/?searchTerms=cats', + headers: { + 'content-type': 'application/json', + test2: 'value2', + }, + params: {}, + files: {}, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'webhook', + description: 'Test 11', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, + traits: { + address: { + city: 'Dhaka', + country: 'Bangladesh', + }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'spin_result', + integrations: { + All: true, + }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + additional_bet_index: 0, + battle_id: 'N/A', + featureGameType: 'N/A', + win_amount: 0, + }, + timestamp: '2019-09-01T15:46:51.693229+05:30', + type: 'track', + fullPath: 'https://www.google.com/', + appendPath: '?searchTerms=cats', + }, + destination: { + Config: { + webhookUrl: 'http://6b0e6a60.ngrok.io', + webhookMethod: 'PUT', + headers: [ + { + from: '', + to: '', + }, + { + from: 'test2', + to: 'value2', + }, + ], + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + JSON: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, + traits: { + address: { + city: 'Dhaka', + country: 'Bangladesh', + }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'spin_result', + integrations: { + All: true, + }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + additional_bet_index: 0, + battle_id: 'N/A', + featureGameType: 'N/A', + win_amount: 0, + }, + timestamp: '2019-09-01T15:46:51.693229+05:30', + type: 'track', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + version: '1', + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + type: 'REST', + method: 'PUT', + endpoint: 'https://www.google.com/?searchTerms=cats', + headers: { + 'content-type': 'application/json', + test2: 'value2', + }, + params: {}, + files: {}, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'webhook', + description: 'Test 12', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, + traits: { + address: { + city: 'Dhaka', + country: 'Bangladesh', + }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'spin_result', + integrations: { + All: true, + }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + additional_bet_index: 0, + battle_id: 'N/A', + featureGameType: 'N/A', + win_amount: 0, + }, + timestamp: '2019-09-01T15:46:51.693229+05:30', + type: 'track', + fullPath: 'https://www.google.com/', + appendPath: '?searchTerms=cats', + }, + destination: { + Config: { + webhookUrl: 'http://6b0e6a60.ngrok.io', + webhookMethod: 'DELETE', + headers: [ + { + from: '', + to: '', + }, + { + from: 'test2', + to: 'value2', + }, + ], + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + version: '1', + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + type: 'REST', + method: 'DELETE', + endpoint: 'https://www.google.com/?searchTerms=cats', + headers: { + test2: 'value2', + }, + params: { + additional_bet_index: 0, + battle_id: 'N/A', + featureGameType: 'N/A', + win_amount: 0, + }, + files: {}, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'webhook', + description: 'Test 13', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, + traits: { + address: { + city: 'Dhaka', + country: 'Bangladesh', + }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'spin_result', + integrations: { + All: true, + }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + additional_bet_index: 0, + battle_id: 'N/A', + bet_amount: 9, + bet_level: 1, + bet_multiplier: 1, + coin_balance: 9466052, + current_module_name: 'CasinoGameModule', + days_in_game: 0, + extra_param: 'N/A', + fb_profile: '0', + featureGameType: 'N/A', + game_fps: 30, + game_id: 'fireEagleBase', + game_name: 'FireEagleSlots', + gem_balance: 0, + graphicsQuality: 'HD', + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + internetReachability: 'ReachableViaLocalAreaNetwork', + isLowEndDevice: 'False', + is_auto_spin: 'False', + is_turbo: 'False', + isf: 'False', + ishighroller: 'False', + jackpot_win_amount: 90, + jackpot_win_type: 'Silver', + level: 6, + lifetime_gem_balance: 0, + no_of_spin: 1, + player_total_battles: 0, + player_total_shields: 0, + start_date: '2019-08-01', + total_payments: 0, + tournament_id: 'T1561970819', + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + versionSessionCount: 2, + win_amount: 0, + }, + timestamp: '2019-09-01T15:46:51.693229+05:30', + type: 'track', + user_properties: { + coin_balance: 9466052, + current_module_name: 'CasinoGameModule', + fb_profile: '0', + game_fps: 30, + game_name: 'FireEagleSlots', + gem_balance: 0, + graphicsQuality: 'HD', + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + internetReachability: 'ReachableViaLocalAreaNetwork', + isLowEndDevice: false, + level: 6, + lifetime_gem_balance: 0, + player_total_battles: 0, + player_total_shields: 0, + start_date: '2019-08-01', + total_payments: 0, + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + versionSessionCount: 2, + }, + }, + destination: { + Config: { + webhookUrl: 'http://6b0e6a60.ngrok.io', + webhookMethod: 'POST', + headers: [ + { + from: 'test2', + to: 'value2', + }, + ], + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + JSON: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, + traits: { + address: { + city: 'Dhaka', + country: 'Bangladesh', + }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'spin_result', + integrations: { + All: true, + }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + additional_bet_index: 0, + battle_id: 'N/A', + bet_amount: 9, + bet_level: 1, + bet_multiplier: 1, + coin_balance: 9466052, + current_module_name: 'CasinoGameModule', + days_in_game: 0, + extra_param: 'N/A', + fb_profile: '0', + featureGameType: 'N/A', + game_fps: 30, + game_id: 'fireEagleBase', + game_name: 'FireEagleSlots', + gem_balance: 0, + graphicsQuality: 'HD', + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + internetReachability: 'ReachableViaLocalAreaNetwork', + isLowEndDevice: 'False', + is_auto_spin: 'False', + is_turbo: 'False', + isf: 'False', + ishighroller: 'False', + jackpot_win_amount: 90, + jackpot_win_type: 'Silver', + level: 6, + lifetime_gem_balance: 0, + no_of_spin: 1, + player_total_battles: 0, + player_total_shields: 0, + start_date: '2019-08-01', + total_payments: 0, + tournament_id: 'T1561970819', + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + versionSessionCount: 2, + win_amount: 0, + }, + timestamp: '2019-09-01T15:46:51.693229+05:30', + type: 'track', + user_properties: { + coin_balance: 9466052, + current_module_name: 'CasinoGameModule', + fb_profile: '0', + game_fps: 30, + game_name: 'FireEagleSlots', + gem_balance: 0, + graphicsQuality: 'HD', + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + internetReachability: 'ReachableViaLocalAreaNetwork', + isLowEndDevice: false, + level: 6, + lifetime_gem_balance: 0, + player_total_battles: 0, + player_total_shields: 0, + start_date: '2019-08-01', + total_payments: 0, + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + versionSessionCount: 2, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + version: '1', + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + type: 'REST', + method: 'POST', + endpoint: 'http://6b0e6a60.ngrok.io', + headers: { + 'content-type': 'application/json', + test2: 'value2', + }, + params: {}, + files: {}, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'webhook', + description: 'Test 14', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, + traits: { + address: { + city: 'Dhaka', + country: 'Bangladesh', + }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'spin_result', + integrations: { + All: true, + }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + additional_bet_index: 0, + battle_id: 'N/A', + bet_amount: 9, + bet_level: 1, + bet_multiplier: 1, + coin_balance: 9466052, + current_module_name: 'CasinoGameModule', + days_in_game: 0, + extra_param: 'N/A', + fb_profile: '0', + featureGameType: 'N/A', + game_fps: 30, + game_id: 'fireEagleBase', + game_name: 'FireEagleSlots', + gem_balance: 0, + graphicsQuality: 'HD', + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + internetReachability: 'ReachableViaLocalAreaNetwork', + isLowEndDevice: 'False', + is_auto_spin: 'False', + is_turbo: 'False', + isf: 'False', + ishighroller: 'False', + jackpot_win_amount: 90, + jackpot_win_type: 'Silver', + level: 6, + lifetime_gem_balance: 0, + no_of_spin: 1, + player_total_battles: 0, + player_total_shields: 0, + start_date: '2019-08-01', + total_payments: 0, + tournament_id: 'T1561970819', + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + versionSessionCount: 2, + win_amount: 0, + }, + timestamp: '2019-09-01T15:46:51.693229+05:30', + type: 'track', + user_properties: { + coin_balance: 9466052, + current_module_name: 'CasinoGameModule', + fb_profile: '0', + game_fps: 30, + game_name: 'FireEagleSlots', + gem_balance: 0, + graphicsQuality: 'HD', + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + internetReachability: 'ReachableViaLocalAreaNetwork', + isLowEndDevice: false, + level: 6, + lifetime_gem_balance: 0, + player_total_battles: 0, + player_total_shields: 0, + start_date: '2019-08-01', + total_payments: 0, + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + versionSessionCount: 2, + }, + }, + destination: { + Config: { + webhookUrl: 'http://6b0e6a60.ngrok.io', + webhookMethod: 'PATCH', + headers: [ + { + from: 'test2', + to: 'value2', + }, + ], + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + JSON: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, + traits: { + address: { + city: 'Dhaka', + country: 'Bangladesh', + }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'spin_result', + integrations: { + All: true, + }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + additional_bet_index: 0, + battle_id: 'N/A', + bet_amount: 9, + bet_level: 1, + bet_multiplier: 1, + coin_balance: 9466052, + current_module_name: 'CasinoGameModule', + days_in_game: 0, + extra_param: 'N/A', + fb_profile: '0', + featureGameType: 'N/A', + game_fps: 30, + game_id: 'fireEagleBase', + game_name: 'FireEagleSlots', + gem_balance: 0, + graphicsQuality: 'HD', + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + internetReachability: 'ReachableViaLocalAreaNetwork', + isLowEndDevice: 'False', + is_auto_spin: 'False', + is_turbo: 'False', + isf: 'False', + ishighroller: 'False', + jackpot_win_amount: 90, + jackpot_win_type: 'Silver', + level: 6, + lifetime_gem_balance: 0, + no_of_spin: 1, + player_total_battles: 0, + player_total_shields: 0, + start_date: '2019-08-01', + total_payments: 0, + tournament_id: 'T1561970819', + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + versionSessionCount: 2, + win_amount: 0, + }, + timestamp: '2019-09-01T15:46:51.693229+05:30', + type: 'track', + user_properties: { + coin_balance: 9466052, + current_module_name: 'CasinoGameModule', + fb_profile: '0', + game_fps: 30, + game_name: 'FireEagleSlots', + gem_balance: 0, + graphicsQuality: 'HD', + idfa: '2bf99787-33d2-4ae2-a76a-c49672f97252', + internetReachability: 'ReachableViaLocalAreaNetwork', + isLowEndDevice: false, + level: 6, + lifetime_gem_balance: 0, + player_total_battles: 0, + player_total_shields: 0, + start_date: '2019-08-01', + total_payments: 0, + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + versionSessionCount: 2, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + version: '1', + userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + type: 'REST', + method: 'PATCH', + endpoint: 'http://6b0e6a60.ngrok.io', + headers: { + 'content-type': 'application/json', + test2: 'value2', + }, + params: {}, + files: {}, + }, + metadata: { + destinationId: 'destId', + workspaceId: 'wspId', + }, + statusCode: 200, + }, + ], + }, + }, + }, +]; diff --git a/test/integrations/destinations/webhook/router/data.ts b/test/integrations/destinations/webhook/router/data.ts index ec0bf5634e..291fc5ffba 100644 --- a/test/integrations/destinations/webhook/router/data.ts +++ b/test/integrations/destinations/webhook/router/data.ts @@ -375,7 +375,7 @@ export const data = [ cdkV2Enabled: true, }, }, - } + }, }, { batchedRequest: { From 091354c4427b33c9f8ac2678db3a4ab38b008e7d Mon Sep 17 00:00:00 2001 From: Anant Jain <62471433+anantjain45823@users.noreply.github.com> Date: Tue, 12 Dec 2023 14:09:07 +0530 Subject: [PATCH 069/135] feat: tiktok_ads: add support for custom events (#2891) * feat: tiktok_ads: add support for custom events * chore: added doc link --- src/v0/destinations/tiktok_ads/transform.js | 12 +- .../destinations/tiktok_ads/processor/data.ts | 292 ++++++++++++++++++ 2 files changed, 299 insertions(+), 5 deletions(-) diff --git a/src/v0/destinations/tiktok_ads/transform.js b/src/v0/destinations/tiktok_ads/transform.js index f0ed04a120..09f0d95dcc 100644 --- a/src/v0/destinations/tiktok_ads/transform.js +++ b/src/v0/destinations/tiktok_ads/transform.js @@ -128,7 +128,7 @@ const getTrackResponse = (message, Config, event) => { }; const trackResponseBuilder = async (message, { Config }) => { - const { eventsToStandard } = Config; + const { eventsToStandard, sendCustomEvents } = Config; let event = message.event?.toLowerCase().trim(); if (!event) { @@ -137,7 +137,7 @@ const trackResponseBuilder = async (message, { Config }) => { const standardEventsMap = getHashFromArrayWithDuplicate(eventsToStandard); - if (eventNameMapping[event] === undefined && !standardEventsMap[event]) { + if (!sendCustomEvents && eventNameMapping[event] === undefined && !standardEventsMap[event]) { throw new InstrumentationError( `Event name (${event}) is not valid, must be mapped to one of standard events`, ); @@ -152,10 +152,12 @@ const trackResponseBuilder = async (message, { Config }) => { }); } }); - } else { - event = eventNameMapping[event]; - responseList.push(getTrackResponse(message, Config, event)); + return responseList; } + // Doc https://ads.tiktok.com/help/article/standard-events-parameters?lang=en + event = eventNameMapping[event] || event; + // if there exists no event mapping we will build payload with custom event recieved + responseList.push(getTrackResponse(message, Config, event)); return responseList; }; diff --git a/test/integrations/destinations/tiktok_ads/processor/data.ts b/test/integrations/destinations/tiktok_ads/processor/data.ts index 453a875af2..46128f46b8 100644 --- a/test/integrations/destinations/tiktok_ads/processor/data.ts +++ b/test/integrations/destinations/tiktok_ads/processor/data.ts @@ -4660,4 +4660,296 @@ export const data = [ }, }, }, + { + name: 'tiktok_ads', + description: 'Test 29 -> custom_event Pass', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + ip: '13.57.97.131', + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'tiktokExternalId', + id: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + ], + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + timestamp: '2020-09-17T19:49:27Z', + type: 'track', + event: 'custom_event', + properties: { + eventId: '1616318632825_357', + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + clickId: 'dummyclickId', + currency: 'USD', + value: 46, + context: { + ad: { + callback: '123ATXSfe', + }, + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + phone_number: + '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', + }, + }, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + hashUserProperties: false, + sendCustomEvents: true, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://business-api.tiktok.com/open_api/v1.3/pixel/track/', + headers: { + 'Access-Token': 'dummyAccessToken', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + pixel_code: 'A1T8T4UYGVIQA8ORZMX9', + event: 'custom_event', + event_id: '1616318632825_357', + timestamp: '2020-09-17T19:49:27Z', + properties: { + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + currency: 'USD', + value: 46, + }, + context: { + ad: { + callback: 'dummyclickId', + }, + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + phone_number: + '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', + external_id: + 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + ip: '13.57.97.131', + user_agent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + }, + partner_name: 'RudderStack', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'tiktok_ads', + description: 'Test 30 -> custom_event Failure case for flag set as false', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + ip: '13.57.97.131', + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'tiktokExternalId', + id: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + ], + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + timestamp: '2020-09-17T19:49:27Z', + type: 'track', + event: 'custom_event', + properties: { + eventId: '1616318632825_357', + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + clickId: 'dummyclickId', + currency: 'USD', + value: 46, + context: { + ad: { + callback: '123ATXSfe', + }, + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + phone_number: + '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', + }, + }, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + hashUserProperties: false, + sendCustomEvents: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: + 'Event name (custom_event) is not valid, must be mapped to one of standard events', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'TIKTOK_ADS', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, ]; From 5a6d296b0ce83f3b6b4e215839fb65d4e0f2de41 Mon Sep 17 00:00:00 2001 From: Sankeerth Date: Tue, 12 Dec 2023 14:39:08 +0530 Subject: [PATCH 070/135] fix: active_campaign error handler (#2895) * fix: send response object captured after API call to active_campaign error handler Signed-off-by: Sai Sankeerth * fix: add test-cases for 5xx, 4xx failures Signed-off-by: Sai Sankeerth --------- Signed-off-by: Sai Sankeerth Co-authored-by: Sai Sankeerth --- .../destinations/active_campaign/transform.js | 32 +- .../active_campaign/processor/data.ts | 388 ++++++++++++++++++ 2 files changed, 404 insertions(+), 16 deletions(-) diff --git a/src/v0/destinations/active_campaign/transform.js b/src/v0/destinations/active_campaign/transform.js index 973a928472..70caf47ea8 100644 --- a/src/v0/destinations/active_campaign/transform.js +++ b/src/v0/destinations/active_campaign/transform.js @@ -62,11 +62,11 @@ const syncContact = async (contactPayload, category, destination) => { feature: 'transformation', }); if (res.success === false) { - errorHandler(res.response, 'Failed to create new contact'); + errorHandler(res, 'Failed to create new contact'); } const createdContact = get(res, 'response.data.contact'); // null safe if (!createdContact) { - errorHandler(res.response, 'Failed to create new contact'); + errorHandler(res, 'Failed to create new contact'); } return createdContact.id; }; @@ -98,7 +98,7 @@ const customTagProcessor = async (message, category, destination, contactId) => feature: 'transformation', }); if (res.success === false) { - errorHandler(res.response, 'Failed to fetch already created tags'); + errorHandler(res, 'Failed to fetch already created tags'); } const storedTags = {}; @@ -169,7 +169,7 @@ const customTagProcessor = async (message, category, destination, contactId) => feature: 'transformation', }); if (res.success === false) { - errorHandler(res.response, 'Failed to create new tag'); + errorHandler(res, 'Failed to create new tag'); // For each tags successfully created the response id is pushed to tagIds } if (res.response.status === 201) tagIds.push(res.response.data.tag.id); @@ -201,7 +201,7 @@ const customTagProcessor = async (message, category, destination, contactId) => ); responsesArr.forEach((respItem) => { if (respItem.success === false) - errorHandler(respItem.response, 'Failed to merge created contact with created tags'); + errorHandler(respItem, 'Failed to merge created contact with created tags'); }); }; @@ -219,7 +219,7 @@ const customFieldProcessor = async (message, category, destination) => { // Step - 2 // Get the existing field data from dest and store it in responseStaging // Ref - https://developers.activecampaign.com/reference/retrieve-fields - let endpoint = `${destination.Config.apiUrl}${`${category.fieldEndPoint}?limit=100`}`; + let endpoint = `${destination.Config.apiUrl}${category.fieldEndPoint}?limit=100`; const requestOptions = { headers: { 'Api-Token': destination.Config.apiKey, @@ -230,7 +230,7 @@ const customFieldProcessor = async (message, category, destination) => { feature: 'transformation', }); if (res.success === false) { - errorHandler(res.response, 'Failed to get existing field data'); + errorHandler(res, 'Failed to get existing field data'); } responseStaging.push(res.response.status === 200 ? res.response.data.fields : []); @@ -257,7 +257,7 @@ const customFieldProcessor = async (message, category, destination) => { if (resp.success === true && resp.response.status === 200) { responseStaging.push(resp.response.data.fields); } else { - errorHandler(resp.response, 'Failed to get existing field data'); + errorHandler(resp, 'Failed to get existing field data'); } }); } @@ -352,7 +352,7 @@ const customListProcessor = async (message, category, destination, contactId) => const responses = await Promise.all(promises); responses.forEach((respItem) => { if (respItem.success === false) { - errorHandler(respItem.response, 'Failed to map created contact with the list'); + errorHandler(respItem, 'Failed to map created contact with the list'); } }); }; @@ -404,11 +404,11 @@ const screenRequestHandler = async (message, category, destination) => { feature: 'transformation', }); if (res.success === false) { - errorHandler(res.response, 'Failed to retrieve events'); + errorHandler(res, 'Failed to retrieve events'); } if (res?.response?.status !== 200) { - errorHandler(res.response, 'Unable to create event'); + errorHandler(res, 'Unable to create event'); } const storedEventsArr = res.response?.data?.eventTrackingEvents; @@ -431,11 +431,11 @@ const screenRequestHandler = async (message, category, destination) => { feature: 'transformation', }); if (res.success === false) { - errorHandler(res.response, 'Failed to create event'); + errorHandler(res, 'Failed to create event'); } if (res.response.status !== 201) { - errorHandler(res.response, 'Unable to create event'); + errorHandler(res, 'Unable to create event'); } } // Previous operations successfull then @@ -468,11 +468,11 @@ const trackRequestHandler = async (message, category, destination) => { }); if (res.success === false) { - errorHandler(res.response, 'Failed to retrieve events'); + errorHandler(res, 'Failed to retrieve events'); } if (res.response.status !== 200) { - errorHandler(res.response, 'Unable to fetch events. Aborting'); + errorHandler(res, 'Unable to fetch events. Aborting'); } const storedEventsArr = res.response?.data?.eventTrackingEvents; @@ -495,7 +495,7 @@ const trackRequestHandler = async (message, category, destination) => { feature: 'transformation', }); if (res.response?.status !== 201) { - errorHandler(res.response, 'Unable to create event. Aborting'); + errorHandler(res, 'Unable to create event. Aborting'); } } diff --git a/test/integrations/destinations/active_campaign/processor/data.ts b/test/integrations/destinations/active_campaign/processor/data.ts index 09499a9eee..cef8c2a3a8 100644 --- a/test/integrations/destinations/active_campaign/processor/data.ts +++ b/test/integrations/destinations/active_campaign/processor/data.ts @@ -1,3 +1,6 @@ +import MockAdapter from 'axios-mock-adapter'; +import { isMatch } from 'lodash'; + export const data = [ { name: 'active_campaign', @@ -765,4 +768,389 @@ export const data = [ }, }, }, + + { + name: 'active_campaign', + description: + 'Test 7: node error(ECONNABORTED) where there is no response coming from dest. server', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'dummyApiKey', + apiUrl: 'https://active.campaigns.dumber.com', + actid: '476550467', + eventKey: 'f8a866fddc721350fdc2fbbd2e5c43a6dddaaa03', + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { name: '', version: '' }, + screen: { density: 2 }, + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: 'anon_id', + userId: '123456', + type: 'identify', + traits: { + anonymousId: 'anon_id', + email: 'patjane@gmail.com', + phone: '92374162213', + tags: ['Test_User', 'Interested_User', 'DIY_Hobby'], + fieldInfo: { + Office: 'Trastkiv', + Country: 'Russia', + Likes: ['Potato', 'Onion'], + Random: 'random', + }, + lists: [ + { id: 2, status: 'subscribe' }, + { id: 3, status: 'unsubscribe' }, + { id: 3, status: 'unsubscribexyz' }, + ], + address: { + city: 'kolkata', + country: 'India', + postalCode: 789223, + state: 'WB', + street: '', + }, + }, + integrations: { All: true }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: + '{"message":"Failed to create new contact (undefined,\\"[ECONNABORTED] :: Connection aborted\\")","destinationResponse":"[ECONNABORTED] :: Connection aborted"}', + statTags: { + destType: 'ACTIVE_CAMPAIGN', + errorCategory: 'network', + errorType: 'retryable', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 500, + }, + ], + }, + }, + mockFns: (mockAdapter: MockAdapter) => { + mockAdapter + .onPost( + 'https://active.campaigns.dumber.com/api/3/contact/sync', + { + asymmetricMatch: (actual) => { + return isMatch(actual, { + contact: { + email: 'patjane@gmail.com', + phone: '92374162213', + }, + }); + }, + }, + { + asymmetricMatch: (actual) => { + return isMatch(actual, { + 'Api-Token': 'dummyApiKey', + 'Content-Type': 'application/json', + }); + }, + }, + ) + .abortRequest(); + }, + }, + { + name: 'active_campaign', + description: 'Test 8: erreneous response from active_campaign server(5xx)', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'dummyApiKey', + apiUrl: 'https://active.campaigns.dumber2.com', + actid: '476550467', + eventKey: 'f8a866fddc721350fdc2fbbd2e5c43a6dddaaa03', + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { name: '', version: '' }, + screen: { density: 2 }, + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: 'anon_id', + userId: '123456', + type: 'identify', + traits: { + anonymousId: 'anon_id', + email: 'patjane1@gmail.com', + phone: '92374162213', + tags: ['Test_User', 'Interested_User', 'DIY_Hobby'], + fieldInfo: { + Office: 'Trastkiv', + Country: 'Russia', + Likes: ['Potato', 'Onion'], + Random: 'random', + }, + lists: [ + { id: 2, status: 'subscribe' }, + { id: 3, status: 'unsubscribe' }, + { id: 3, status: 'unsubscribexyz' }, + ], + address: { + city: 'kolkata', + country: 'India', + postalCode: 789223, + state: 'WB', + street: '', + }, + }, + integrations: { All: true }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: + '{"message":"Failed to create new contact (undefined,\\"\\\\\\\\n\\\\\\\\n\\\\\\\\n\\\\\\\\n \\\\\\\\n\\\\\\\\n\\\\\\\\n\\\\\\\\naccurx.api-us1.com | 504: Gateway time-out\\\\\\\\n\\\\\\\\n\\\\\\\\n\\\\\\\\n\\\\\\\\n\\\\\\\\n\\\\\\\\n\\\\\\\\n\\\\\\\\n\\\\\\\\n\\\\\\\\n
\\\\\\\\n
\\\\\\\\n
\\\\\\\\n

\\\\\\\\n Gateway time-out\\\\\\\\n Error code 504\\\\\\\\n

\\\\\\\\n
\\\\\\\\n Visit cloudflare.com for more information.\\\\\\\\n
\\\\\\\\n
2023-12-06 10:33:27 UTC
\\\\\\\\n
\\\\\\\\n
\\\\\\\\n
\\\\\\\\n
\\\\\\\\n \\\\\\\\n
\\\\\\\\n
\\\\\\\\n \\\\\\\\n \\\\\\\\n \\\\\\\\n \\\\\\\\n
\\\\\\\\n You\\\\\\\\n

\\\\\\\\n \\\\\\\\n Browser\\\\\\\\n \\\\\\\\n

\\\\\\\\n Working\\\\\\\\n
\\\\\\\\n\\\\\\\\n
\\\\\\\\n
\\\\\\\\n \\\\\\\\n \\\\\\\\n \\\\\\\\n \\\\\\\\n
\\\\\\\\n Frankfurt\\\\\\\\n

\\\\\\\\n \\\\\\\\n Cloudflare\\\\\\\\n \\\\\\\\n

\\\\\\\\n Working\\\\\\\\n
\\\\\\\\n\\\\\\\\n
\\\\\\\\n
\\\\\\\\n \\\\\\\\n \\\\\\\\n \\\\\\\\n \\\\\\\\n
\\\\\\\\n accurx.api-us1.com\\\\\\\\n

\\\\\\\\n \\\\\\\\n Host\\\\\\\\n \\\\\\\\n

\\\\\\\\n Error\\\\\\\\n
\\\\\\\\n\\\\\\\\n
\\\\\\\\n
\\\\\\\\n
\\\\\\\\n\\\\\\\\n
\\\\\\\\n
\\\\\\\\n
\\\\\\\\n

What happened?

\\\\\\\\n

The web server reported a gateway time-out error.

\\\\\\\\n
\\\\\\\\n
\\\\\\\\n

What can I do?

\\\\\\\\n

Please try again in a few minutes.

\\\\\\\\n
\\\\\\\\n
\\\\\\\\n
\\\\\\\\n\\\\\\\\n \\\\\\\\n\\\\\\\\n\\\\\\\\n
\\\\\\\\n
\\\\\\\\n\\\\\\\\n\\\\\\\\n\\\\\\")\\")","destinationResponse":"\\\\n\\\\n\\\\n\\\\n \\\\n\\\\n\\\\n\\\\naccurx.api-us1.com | 504: Gateway time-out\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n
\\\\n
\\\\n
\\\\n

\\\\n Gateway time-out\\\\n Error code 504\\\\n

\\\\n
\\\\n Visit cloudflare.com for more information.\\\\n
\\\\n
2023-12-06 10:33:27 UTC
\\\\n
\\\\n
\\\\n
\\\\n
\\\\n \\\\n
\\\\n
\\\\n \\\\n \\\\n \\\\n \\\\n
\\\\n You\\\\n

\\\\n \\\\n Browser\\\\n \\\\n

\\\\n Working\\\\n
\\\\n\\\\n
\\\\n
\\\\n \\\\n \\\\n \\\\n \\\\n
\\\\n Frankfurt\\\\n

\\\\n \\\\n Cloudflare\\\\n \\\\n

\\\\n Working\\\\n
\\\\n\\\\n
\\\\n
\\\\n \\\\n \\\\n \\\\n \\\\n
\\\\n accurx.api-us1.com\\\\n

\\\\n \\\\n Host\\\\n \\\\n

\\\\n Error\\\\n
\\\\n\\\\n
\\\\n
\\\\n
\\\\n\\\\n
\\\\n
\\\\n
\\\\n

What happened?

\\\\n

The web server reported a gateway time-out error.

\\\\n
\\\\n
\\\\n

What can I do?

\\\\n

Please try again in a few minutes.

\\\\n
\\\\n
\\\\n
\\\\n\\\\n \\\\n\\\\n\\\\n
\\\\n
\\\\n\\\\n\\\\n\\")"}', + statTags: { + destType: 'ACTIVE_CAMPAIGN', + errorCategory: 'network', + errorType: 'retryable', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 504, + }, + ], + }, + }, + mockFns: (mockAdapter: MockAdapter) => { + mockAdapter + .onPost( + 'https://active.campaigns.dumber2.com/api/3/contact/sync', + { + asymmetricMatch: (actual) => { + return isMatch(actual, { + contact: { + email: 'patjane1@gmail.com', + phone: '92374162213', + }, + }); + }, + }, + { + asymmetricMatch: (actual) => { + return isMatch(actual, { + 'Api-Token': 'dummyApiKey', + 'Content-Type': 'application/json', + }); + }, + }, + ) + .replyOnce( + 504, + '\\n\\n\\n\\n \\n\\n\\n\\naccurx.api-us1.com | 504: Gateway time-out\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n
\\n
\\n
\\n

\\n Gateway time-out\\n Error code 504\\n

\\n
\\n Visit cloudflare.com for more information.\\n
\\n
2023-12-06 10:33:27 UTC
\\n
\\n
\\n
\\n
\\n \\n
\\n
\\n \\n \\n \\n \\n
\\n You\\n

\\n \\n Browser\\n \\n

\\n Working\\n
\\n\\n
\\n
\\n \\n \\n \\n \\n
\\n Frankfurt\\n

\\n \\n Cloudflare\\n \\n

\\n Working\\n
\\n\\n
\\n
\\n \\n \\n \\n \\n
\\n accurx.api-us1.com\\n

\\n \\n Host\\n \\n

\\n Error\\n
\\n\\n
\\n
\\n
\\n\\n
\\n
\\n
\\n

What happened?

\\n

The web server reported a gateway time-out error.

\\n
\\n
\\n

What can I do?

\\n

Please try again in a few minutes.

\\n
\\n
\\n
\\n\\n \\n\\n\\n
\\n
\\n\\n\\n")', + { + Accept: 'application/json, text/plain, */*', + 'Api-Token': 'dummyApiKey', + }, + ); + }, + }, + { + name: 'active_campaign', + description: 'Test 9: erreneous response from active_campaign server(4xx)', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'dummyApiKey', + apiUrl: 'https://active.campaigns.dumber2.com', + actid: '476550467', + eventKey: 'f8a866fddc721350fdc2fbbd2e5c43a6dddaaa03', + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { name: '', version: '' }, + screen: { density: 2 }, + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: 'anon_id', + userId: '123456', + type: 'identify', + traits: { + anonymousId: 'anon_id', + email: 'patjane2@gmail.com', + phone: '92374162213', + tags: ['Test_User', 'Interested_User', 'DIY_Hobby'], + fieldInfo: { + Office: 'Trastkiv', + Country: 'Russia', + Likes: ['Potato', 'Onion'], + Random: 'random', + }, + lists: [ + { id: 2, status: 'subscribe' }, + { id: 3, status: 'unsubscribe' }, + { id: 3, status: 'unsubscribexyz' }, + ], + address: { + city: 'kolkata', + country: 'India', + postalCode: 789223, + state: 'WB', + street: '', + }, + }, + integrations: { All: true }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: + '{"message":"Failed to create new contact (undefined,{\\"errors\\":[{\\"title\\":\\"Contact Email Address is not valid.\\",\\"detail\\":\\"\\",\\"code\\":\\"email_invalid\\",\\"error\\":\\"must_be_valid_email_address\\",\\"source\\":{\\"pointer\\":\\"/data/attributes/email\\"}}]})","destinationResponse":{"errors":[{"title":"Contact Email Address is not valid.","detail":"","code":"email_invalid","error":"must_be_valid_email_address","source":{"pointer":"/data/attributes/email"}}]}}', + statTags: { + destType: 'ACTIVE_CAMPAIGN', + errorCategory: 'network', + errorType: 'aborted', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 422, + }, + ], + }, + }, + mockFns: (mockAdapter: MockAdapter) => { + mockAdapter + .onPost( + 'https://active.campaigns.dumber2.com/api/3/contact/sync', + { + asymmetricMatch: (actual) => { + return isMatch(actual, { + contact: { + email: 'patjane2@gmail.com', + phone: '92374162213', + }, + }); + }, + }, + { + asymmetricMatch: (actual) => { + return isMatch(actual, { + 'Api-Token': 'dummyApiKey', + 'Content-Type': 'application/json', + }); + }, + }, + ) + .replyOnce( + 422, + { + errors: [ + { + title: 'Contact Email Address is not valid.', + detail: '', + code: 'email_invalid', + error: 'must_be_valid_email_address', + source: { + pointer: '/data/attributes/email', + }, + }, + ], + }, + { + Accept: 'application/json, text/plain, */*', + 'Api-Token': 'dummyApiKey', + }, + ); + }, + }, ]; From eb28f4a94d1e204c5aaf547c7cb5d48ac2d96fd4 Mon Sep 17 00:00:00 2001 From: Dilip Kola <33080863+koladilip@users.noreply.github.com> Date: Tue, 12 Dec 2023 15:00:59 +0530 Subject: [PATCH 071/135] Update draft-new-release.yml --- .github/workflows/draft-new-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/draft-new-release.yml b/.github/workflows/draft-new-release.yml index 23e243918f..57dd33f0b4 100644 --- a/.github/workflows/draft-new-release.yml +++ b/.github/workflows/draft-new-release.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest # Only allow release stakeholders to initiate releases - if: (github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/heads/hotfix/')) && (github.actor == 'ItsSudip' || github.actor == 'krishna2020' || github.actor == 'saikumarrs' || github.actor == 'sandeepdsvs' || github.actor == 'shrouti1507' || github.actor == 'anantjain45823' || github.actor == 'chandumlg' || github.actor == 'mihir-4116' || github.actor == 'yashasvibajpai' || github.actor == 'sanpj2292' || github.actor == 'ujjwal-ab') && (github.triggering_actor == 'ItsSudip' || github.triggering_actor == 'krishna2020' || github.triggering_actor == 'saikumarrs' || github.triggering_actor == 'sandeepdsvs' || github.triggering_actor == 'shrouti1507' || github.triggering_actor == 'anantjain45823' || github.triggering_actor == 'chandumlg' || github.triggering_actor == 'mihir-4116' || github.triggering_actor == 'yashasvibajpai' || github.triggering_actor == 'sanpj2292' || github.triggering_actor == 'ujjwal-ab') + if: (github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/heads/hotfix/')) && (github.actor == 'ItsSudip' || github.actor == 'krishna2020' || github.actor == 'saikumarrs' || github.actor == 'sandeepdsvs' || github.actor == 'koladilip' || github.actor == 'shrouti1507' || github.actor == 'anantjain45823' || github.actor == 'chandumlg' || github.actor == 'mihir-4116' || github.actor == 'yashasvibajpai' || github.actor == 'sanpj2292' || github.actor == 'ujjwal-ab') && (github.triggering_actor == 'ItsSudip' || github.triggering_actor == 'krishna2020' || github.triggering_actor == 'koladilip' || github.triggering_actor == 'saikumarrs' || github.triggering_actor == 'sandeepdsvs' || github.triggering_actor == 'shrouti1507' || github.triggering_actor == 'anantjain45823' || github.triggering_actor == 'chandumlg' || github.triggering_actor == 'mihir-4116' || github.triggering_actor == 'yashasvibajpai' || github.triggering_actor == 'sanpj2292' || github.triggering_actor == 'ujjwal-ab') steps: - name: Checkout uses: actions/checkout@v3.5.3 From b55feed4f8f18f88b20a452cc8ef826a10162e1d Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Tue, 12 Dec 2023 09:33:34 +0000 Subject: [PATCH 072/135] chore(release): 1.52.0 --- CHANGELOG.md | 22 ++++++++++++++++++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b769b51a6d..1e0c6ffb14 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,28 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [1.52.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.51.1...v1.52.0) (2023-12-12) + + +### Features + +* onboard msl changes for new record event ([#2644](https://github.com/rudderlabs/rudder-transformer/issues/2644)) ([36d3f25](https://github.com/rudderlabs/rudder-transformer/commit/36d3f258ed5ea4ba1899c8b2cae8203bf73d90ed)), closes [#2813](https://github.com/rudderlabs/rudder-transformer/issues/2813) +* onboard reddit cloud mode destination ([#2829](https://github.com/rudderlabs/rudder-transformer/issues/2829)) ([babb89a](https://github.com/rudderlabs/rudder-transformer/commit/babb89a5bf6d1b84d1319b967953c7c1b6de7c2c)) +* tiktok_ads: add support for custom events ([#2891](https://github.com/rudderlabs/rudder-transformer/issues/2891)) ([091354c](https://github.com/rudderlabs/rudder-transformer/commit/091354c4427b33c9f8ac2678db3a4ab38b008e7d)) + + +### Bug Fixes + +* active_campaign error handler ([#2895](https://github.com/rudderlabs/rudder-transformer/issues/2895)) ([5a6d296](https://github.com/rudderlabs/rudder-transformer/commit/5a6d296b0ce83f3b6b4e215839fb65d4e0f2de41)) +* add check to remove empty properties object from payload ([#2896](https://github.com/rudderlabs/rudder-transformer/issues/2896)) ([1a86a07](https://github.com/rudderlabs/rudder-transformer/commit/1a86a0723e3f5fb6fdf9cf1dc716a47c6da16745)) +* adobe_analytics event field check ([#2890](https://github.com/rudderlabs/rudder-transformer/issues/2890)) ([bf39215](https://github.com/rudderlabs/rudder-transformer/commit/bf39215dd1bbed482665c837a2bfabfcb751c753)) +* covert toString before toLowercase ([#2830](https://github.com/rudderlabs/rudder-transformer/issues/2830)) ([bed431e](https://github.com/rudderlabs/rudder-transformer/commit/bed431e1de94ab28df1ee592d083a1481b960b6d)) +* **dm:** add workspaceId in common metadata to be returned to the callers ([#2868](https://github.com/rudderlabs/rudder-transformer/issues/2868)) ([b3437a3](https://github.com/rudderlabs/rudder-transformer/commit/b3437a34358d5fd5b1eb63f30a5a695f39aa84ff)) +* **integrations:** onboard sprig destination ([#2857](https://github.com/rudderlabs/rudder-transformer/issues/2857)) ([ede22e3](https://github.com/rudderlabs/rudder-transformer/commit/ede22e3f8fb60a9e36e2a3f5a5e86260255c49ef)) +* mailjet source transformation by adding email exists check ([#2889](https://github.com/rudderlabs/rudder-transformer/issues/2889)) ([4a7eaa0](https://github.com/rudderlabs/rudder-transformer/commit/4a7eaa09000bcb82eb7f217d500223939bd9b07b)) +* missing null check in braze populateCustomAttributesWithOperation ([#2897](https://github.com/rudderlabs/rudder-transformer/issues/2897)) ([50e921d](https://github.com/rudderlabs/rudder-transformer/commit/50e921d1451bf7016e60b2e238b8f842d72b5b71)) +* removed retry logic from v1 cm360, added adapter for v1 to v0 conversion ([#2860](https://github.com/rudderlabs/rudder-transformer/issues/2860)) ([776d2c4](https://github.com/rudderlabs/rudder-transformer/commit/776d2c4abe23cd279195064684b9ccc807d83afc)) + ### [1.51.1](https://github.com/rudderlabs/rudder-transformer/compare/v1.51.0...v1.51.1) (2023-12-06) diff --git a/package-lock.json b/package-lock.json index 61501c6c08..440bb9ea46 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "rudder-transformer", - "version": "1.51.1", + "version": "1.52.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "rudder-transformer", - "version": "1.51.1", + "version": "1.52.0", "license": "ISC", "dependencies": { "@amplitude/ua-parser-js": "^0.7.24", diff --git a/package.json b/package.json index 7f4aa1c5a5..fe3c9f51b3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rudder-transformer", - "version": "1.51.1", + "version": "1.52.0", "description": "", "homepage": "https://github.com/rudderlabs/rudder-transformer#readme", "bugs": { From 439ba73195ddab06eb4bbaafb94b104d2f77d533 Mon Sep 17 00:00:00 2001 From: Abhimanyu Babbar Date: Tue, 12 Dec 2023 19:34:56 +0530 Subject: [PATCH 073/135] fix(dm): dropped support of useClones for trackingplans cache (#2899) * dropped support of useClones for trackingplans cache * updated the changelog --- CHANGELOG.md | 1 + src/util/trackingPlan.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1e0c6ffb14..561aaa900f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ All notable changes to this project will be documented in this file. See [standa * mailjet source transformation by adding email exists check ([#2889](https://github.com/rudderlabs/rudder-transformer/issues/2889)) ([4a7eaa0](https://github.com/rudderlabs/rudder-transformer/commit/4a7eaa09000bcb82eb7f217d500223939bd9b07b)) * missing null check in braze populateCustomAttributesWithOperation ([#2897](https://github.com/rudderlabs/rudder-transformer/issues/2897)) ([50e921d](https://github.com/rudderlabs/rudder-transformer/commit/50e921d1451bf7016e60b2e238b8f842d72b5b71)) * removed retry logic from v1 cm360, added adapter for v1 to v0 conversion ([#2860](https://github.com/rudderlabs/rudder-transformer/issues/2860)) ([776d2c4](https://github.com/rudderlabs/rudder-transformer/commit/776d2c4abe23cd279195064684b9ccc807d83afc)) +* **dm:** use clones as false for tracking plan node cache ([#2899](https://github.com/rudderlabs/rudder-transformer/issues/2899)) ([8f47db8](https://github.com/rudderlabs/rudder-transformer/commit/8f47db8bcf581d1807cfa2aa823ef400a30a09e3)) ### [1.51.1](https://github.com/rudderlabs/rudder-transformer/compare/v1.51.0...v1.51.1) (2023-12-06) diff --git a/src/util/trackingPlan.js b/src/util/trackingPlan.js index 0c03820308..a77265a5b8 100644 --- a/src/util/trackingPlan.js +++ b/src/util/trackingPlan.js @@ -4,7 +4,7 @@ const logger = require('../logger'); const { responseStatusHandler } = require('./utils'); const stats = require('./stats'); -const tpCache = new NodeCache(); +const tpCache = new NodeCache({ useClones: false }); const CONFIG_BACKEND_URL = process.env.CONFIG_BACKEND_URL || 'https://api.rudderlabs.com'; const TRACKING_PLAN_URL = `${CONFIG_BACKEND_URL}/workspaces`; From be208501db5e978f66e09f09a05058289539ad70 Mon Sep 17 00:00:00 2001 From: Yashasvi Bajpai <33063622+yashasvibajpai@users.noreply.github.com> Date: Wed, 13 Dec 2023 09:08:54 +0530 Subject: [PATCH 074/135] chore: add stringtype check to escapehtml in adobe (#2900) --- src/v0/destinations/adobe_analytics/utils.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/v0/destinations/adobe_analytics/utils.js b/src/v0/destinations/adobe_analytics/utils.js index bcb138d77b..97dc6e90bb 100644 --- a/src/v0/destinations/adobe_analytics/utils.js +++ b/src/v0/destinations/adobe_analytics/utils.js @@ -83,6 +83,9 @@ function handleContextData(payload, destinationConfig, message) { */ function escapeToHTML(inputString) { + if (typeof inputString !== 'string') { + return inputString; + } return inputString.replace( /[&<>]/g, (match) => From 90c725e3ecd6c4476d66a54b84f34e0f4a7b205c Mon Sep 17 00:00:00 2001 From: Sankeerth Date: Wed, 13 Dec 2023 13:17:09 +0530 Subject: [PATCH 075/135] fix: braze transformation error due to wrong import (#2901) --- src/v0/util/errorTypes/filteredEventsError.js | 2 +- src/v0/util/errorTypes/transformerProxyError.js | 2 +- src/v0/util/index.js | 2 +- src/v0/util/index.test.js | 10 ++++++++++ test/__tests__/data/braze_router.json | 4 +--- 5 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/v0/util/errorTypes/filteredEventsError.js b/src/v0/util/errorTypes/filteredEventsError.js index cb0236f342..990ca76670 100644 --- a/src/v0/util/errorTypes/filteredEventsError.js +++ b/src/v0/util/errorTypes/filteredEventsError.js @@ -1,4 +1,4 @@ -const { BaseError } = require('./base'); +const { BaseError } = require('@rudderstack/integrations-lib'); const { HTTP_STATUS_CODES } = require('../constant'); class FilteredEventsError extends BaseError { diff --git a/src/v0/util/errorTypes/transformerProxyError.js b/src/v0/util/errorTypes/transformerProxyError.js index 42ccdea490..2fefb6fb92 100644 --- a/src/v0/util/errorTypes/transformerProxyError.js +++ b/src/v0/util/errorTypes/transformerProxyError.js @@ -1,5 +1,5 @@ +const { BaseError } = require('@rudderstack/integrations-lib'); const tags = require('../tags'); -const { BaseError } = require('./base'); const errorTypes = Object.values(tags.ERROR_TYPES); const metaTypes = Object.values(tags.METADATA); diff --git a/src/v0/util/index.js b/src/v0/util/index.js index fee1d7a96d..34182a7685 100644 --- a/src/v0/util/index.js +++ b/src/v0/util/index.js @@ -83,7 +83,7 @@ const isPrimitive = (arg) => { const isNewStatusCodesAccepted = (reqMetadata = {}) => { if (reqMetadata && typeof reqMetadata === 'object' && !Array.isArray(reqMetadata)) { const { features } = reqMetadata; - return !!(features && features[FEATURE_FILTER_CODE]); + return !!features?.[FEATURE_FILTER_CODE]; } return false; }; diff --git a/src/v0/util/index.test.js b/src/v0/util/index.test.js index e39c583aab..65d6313e30 100644 --- a/src/v0/util/index.test.js +++ b/src/v0/util/index.test.js @@ -1,5 +1,7 @@ +const { TAG_NAMES } = require('@rudderstack/integrations-lib'); const utilities = require('.'); const { getFuncTestData } = require('../../../test/testHelper'); +const { FilteredEventsError } = require('./errorTypes'); const { hasCircularReference, flattenJson } = require('./index'); // Names of the utility functions to test @@ -116,3 +118,11 @@ describe('flattenJson', () => { ); }); }); + +describe('tests for generateErrorObject', () => { + test('test-0', () => { + const myErr = new FilteredEventsError('error-1'); + const outputErrObj = utilities.generateErrorObject(myErr); + expect(outputErrObj.statTags).toEqual({}); + }); +}); diff --git a/test/__tests__/data/braze_router.json b/test/__tests__/data/braze_router.json index 8bfd7c7d42..33c66bca6d 100644 --- a/test/__tests__/data/braze_router.json +++ b/test/__tests__/data/braze_router.json @@ -841,9 +841,7 @@ }, { "error": "[Braze Deduplication]: Duplicate user detected, the user is dropped", - "statTags": { - "errorCategory": "transformation" - }, + "statTags": {}, "statusCode": 298, "batched": false, "metadata": [ From aad248077b5036b64d5700f8dbf61260ea36a2de Mon Sep 17 00:00:00 2001 From: Yashasvi Bajpai <33063622+yashasvibajpai@users.noreply.github.com> Date: Wed, 13 Dec 2023 13:29:15 +0530 Subject: [PATCH 076/135] chore: add lowercase check to MSL for event type audiencelist (#2904) * chore: add lowercase check to MSL for event type audiencelist * chore: fix optional chaining Co-authored-by: Utsab Chowdhury * chore: update test --------- Co-authored-by: Utsab Chowdhury --- src/v0/destinations/marketo_static_list/transform.js | 2 +- .../destinations/marketo_static_list/router/data.ts | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/v0/destinations/marketo_static_list/transform.js b/src/v0/destinations/marketo_static_list/transform.js index cbdb89f532..294e34f91b 100644 --- a/src/v0/destinations/marketo_static_list/transform.js +++ b/src/v0/destinations/marketo_static_list/transform.js @@ -124,7 +124,7 @@ const processRouterDest = async (inputs, reqMetadata) => { // use lodash.groupby to group the inputs based on message type const transformedRecordEvent = []; let transformedAudienceEvent = []; - const groupedInputs = lodash.groupBy(inputs, (input) => input.message.type); + const groupedInputs = lodash.groupBy(inputs, (input) => input.message.type?.toLowerCase()); const respList = []; // process record events diff --git a/test/integrations/destinations/marketo_static_list/router/data.ts b/test/integrations/destinations/marketo_static_list/router/data.ts index fa97ba49f2..840ad773b3 100644 --- a/test/integrations/destinations/marketo_static_list/router/data.ts +++ b/test/integrations/destinations/marketo_static_list/router/data.ts @@ -1,7 +1,8 @@ export const data = [ { name: 'marketo_static_list', - description: 'Test 0: Test audiencelist event with add and remove', + description: + 'Test 0: Test audiencelist event with add and remove: Test eventtype lowercase and uppercase', feature: 'router', module: 'destination', version: 'v0', @@ -99,7 +100,7 @@ export const data = [ userId: 'user 1', anonymousId: 'anon-id-new', event: 'event1', - type: 'audiencelist', + type: 'audienceList', properties: { listData: { add: [ From 7825c19f6d8ba633a8a81160aceb7560ce293e41 Mon Sep 17 00:00:00 2001 From: AASHISH MALIK Date: Wed, 13 Dec 2023 14:42:57 +0530 Subject: [PATCH 077/135] fix: updated error response of v1 proxy (#2906) --- .../destination/postTransformation.ts | 8 +- .../destinations/braze/dataDelivery/data.ts | 177 +++++++++++++++++- .../destinations/braze/network.ts | 43 +++++ 3 files changed, 225 insertions(+), 3 deletions(-) diff --git a/src/services/destination/postTransformation.ts b/src/services/destination/postTransformation.ts index de2f5f1b42..7e9cd52aed 100644 --- a/src/services/destination/postTransformation.ts +++ b/src/services/destination/postTransformation.ts @@ -18,6 +18,7 @@ import { generateErrorObject } from '../../v0/util'; import { ErrorReportingService } from '../errorReporting'; import tags from '../../v0/util/tags'; import stats from '../../util/stats'; +import { FixMe } from '../../util/types'; export class DestinationPostTransformationService { public static handleProcessorTransformSucessEvents( @@ -161,7 +162,7 @@ export class DestinationPostTransformationService { } public static handlevV1DeliveriesFailureEvents( - error: NonNullable, + error: FixMe, metaTo: MetaTransferObject, ): DeliveriesResponse { const errObj = generateErrorObject(error, metaTo.errorDetails, false); @@ -172,7 +173,10 @@ export class DestinationPostTransformationService { } const responses = metadataArray.map((metadata) => { const resp = { - error: errObj.message || '[Delivery] Error occured while processing payload', + error: + JSON.stringify(error.destinationResponse?.response) || + errObj.message || + '[Delivery] Error occured while processing payload', statusCode: errObj.status, metadata, } as DeliveryJobState; diff --git a/test/integrations/destinations/braze/dataDelivery/data.ts b/test/integrations/destinations/braze/dataDelivery/data.ts index cd688a621b..d62361e7f9 100644 --- a/test/integrations/destinations/braze/dataDelivery/data.ts +++ b/test/integrations/destinations/braze/dataDelivery/data.ts @@ -632,7 +632,7 @@ export const data = [ output: { response: [ { - error: 'Request failed for braze with status: 401', + error: '{"code":400,"message":"Bad Req","status":"Fail Case"}', statusCode: 401, metadata: { jobId: 2, @@ -664,4 +664,179 @@ export const data = [ }, }, }, + { + name: 'braze', + description: + 'Test Transformer Proxy V1 input with v0 proxy handler Error returned Multiple metadata Track Event', + feature: 'dataDelivery', + module: 'destination', + version: 'v1', + input: { + request: { + body: { + type: 'REST', + endpoint: 'https://rest.iad-03.braze.com/users/track/testV1', + method: 'POST', + userId: 'gabi_userId_45', + headers: { + Accept: 'application/json', + Authorization: 'Bearer api_key', + 'Content-Type': 'application/json', + }, + body: { + FORM: {}, + JSON: { + partner: 'RudderStack', + attributes: [ + { + email: '123@a.com', + city: 'Disney', + country: 'USA', + firstname: 'Mickey', + external_id: '456345345', + }, + { + email: '123@a.com', + city: 'Disney', + country: 'USA', + firstname: 'Mickey', + external_id: '456345345', + }, + { + email: '123@a.com', + city: 'Disney', + country: 'USA', + firstname: 'Mickey', + external_id: '456345345', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + }, + metadata: [ + { + jobId: 2, + attemptNum: 0, + userId: '', + sourceId: '2Vsge2uWYdrLfG7pZb5Y82eo4lr', + destinationId: '2RHh08uOsXqE9KvCDg3hoaeuK2L', + workspaceId: '2Csl0lSTbuM3qyHdaOQB2GcDH8o', + secret: { + access_token: 'secret', + refresh_token: 'refresh', + developer_token: 'developer_Token', + }, + }, + { + jobId: 3, + attemptNum: 0, + userId: '', + sourceId: '2Vsge2uWYdrLfG7pZb5Y82eo4lr', + destinationId: '2RHh08uOsXqE9KvCDg3hoaeuK2L', + workspaceId: '2Csl0lSTbuM3qyHdaOQB2GcDH8o', + secret: { + access_token: 'secret', + refresh_token: 'refresh', + developer_token: 'developer_Token', + }, + }, + { + jobId: 4, + attemptNum: 0, + userId: '', + sourceId: '2Vsge2uWYdrLfG7pZb5Y82eo4lr', + destinationId: '2RHh08uOsXqE9KvCDg3hoaeuK2L', + workspaceId: '2Csl0lSTbuM3qyHdaOQB2GcDH8o', + secret: { + access_token: 'secret', + refresh_token: 'refresh', + developer_token: 'developer_Token', + }, + }, + ], + files: {}, + params: { + destination: 'braze', + }, + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: { + response: [ + { + error: + '{"message":"Valid data must be provided in the \'attributes\', \'events\', or \'purchases\' fields.","errors":[{"type":"The value provided for the \'email\' field is not a valid email.","input_array":"attributes","index":0},{"type":"The value provided for the \'email\' field is not a valid email.","input_array":"attributes","index":1}]}', + statusCode: 401, + metadata: { + jobId: 2, + attemptNum: 0, + userId: '', + sourceId: '2Vsge2uWYdrLfG7pZb5Y82eo4lr', + destinationId: '2RHh08uOsXqE9KvCDg3hoaeuK2L', + workspaceId: '2Csl0lSTbuM3qyHdaOQB2GcDH8o', + secret: { + access_token: 'secret', + refresh_token: 'refresh', + developer_token: 'developer_Token', + }, + }, + }, + { + error: + '{"message":"Valid data must be provided in the \'attributes\', \'events\', or \'purchases\' fields.","errors":[{"type":"The value provided for the \'email\' field is not a valid email.","input_array":"attributes","index":0},{"type":"The value provided for the \'email\' field is not a valid email.","input_array":"attributes","index":1}]}', + statusCode: 401, + metadata: { + jobId: 3, + attemptNum: 0, + userId: '', + sourceId: '2Vsge2uWYdrLfG7pZb5Y82eo4lr', + destinationId: '2RHh08uOsXqE9KvCDg3hoaeuK2L', + workspaceId: '2Csl0lSTbuM3qyHdaOQB2GcDH8o', + secret: { + access_token: 'secret', + refresh_token: 'refresh', + developer_token: 'developer_Token', + }, + }, + }, + { + error: + '{"message":"Valid data must be provided in the \'attributes\', \'events\', or \'purchases\' fields.","errors":[{"type":"The value provided for the \'email\' field is not a valid email.","input_array":"attributes","index":0},{"type":"The value provided for the \'email\' field is not a valid email.","input_array":"attributes","index":1}]}', + statusCode: 401, + metadata: { + jobId: 4, + attemptNum: 0, + userId: '', + sourceId: '2Vsge2uWYdrLfG7pZb5Y82eo4lr', + destinationId: '2RHh08uOsXqE9KvCDg3hoaeuK2L', + workspaceId: '2Csl0lSTbuM3qyHdaOQB2GcDH8o', + secret: { + access_token: 'secret', + refresh_token: 'refresh', + developer_token: 'developer_Token', + }, + }, + }, + ], + statTags: { + destType: 'BRAZE', + destinationId: '2RHh08uOsXqE9KvCDg3hoaeuK2L', + errorCategory: 'network', + errorType: 'aborted', + feature: 'dataDelivery', + implementation: 'native', + module: 'destination', + workspaceId: '2Csl0lSTbuM3qyHdaOQB2GcDH8o', + }, + }, + }, + }, + }, + }, ]; diff --git a/test/integrations/destinations/braze/network.ts b/test/integrations/destinations/braze/network.ts index 0ef99b806d..3db50ca32c 100644 --- a/test/integrations/destinations/braze/network.ts +++ b/test/integrations/destinations/braze/network.ts @@ -420,5 +420,48 @@ const deleteNwData = [ status: 401, }, }, + { + httpReq: { + url: 'https://rest.iad-03.braze.com/users/track/testV1', + data: { + partner: 'RudderStack', + attributes: [ + { + email: '123@a.com', + city: 'Disney', + country: 'USA', + firstname: 'Mickey', + external_id: '456345345', + }, + { + email: '123@a.com', + city: 'Disney', + country: 'USA', + firstname: 'Mickey', + external_id: '456345345', + }, + { + email: '123@a.com', + city: 'Disney', + country: 'USA', + firstname: 'Mickey', + external_id: '456345345', + }, + ], + }, + params: { destination: 'braze' }, + headers: { + Accept: 'application/json', + Authorization: 'Bearer api_key', + 'Content-Type': 'application/json', + 'User-Agent': 'RudderLabs', + }, + method: 'POST', + }, + httpRes: { + data: '{"message":"Valid data must be provided in the \'attributes\', \'events\', or \'purchases\' fields.","errors":[{"type":"The value provided for the \'email\' field is not a valid email.","input_array":"attributes","index":0},{"type":"The value provided for the \'email\' field is not a valid email.","input_array":"attributes","index":1}]}', + status: 401, + }, + }, ]; export const networkCallsData = [...deleteNwData, ...dataDeliveryMocksData]; From a606ec1ff138eed291a68fa78fd03e19c02b1622 Mon Sep 17 00:00:00 2001 From: Ujjwal Abhishek <63387036+ujjwal-ab@users.noreply.github.com> Date: Wed, 13 Dec 2023 14:46:19 +0530 Subject: [PATCH 078/135] fix(reddit): add undefined check for eventsMapping field (#2905) feat: add undefined check for evensMapping field --- src/cdk/v2/destinations/reddit/procWorkflow.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cdk/v2/destinations/reddit/procWorkflow.yaml b/src/cdk/v2/destinations/reddit/procWorkflow.yaml index b07aeff962..65b466bc7c 100644 --- a/src/cdk/v2/destinations/reddit/procWorkflow.yaml +++ b/src/cdk/v2/destinations/reddit/procWorkflow.yaml @@ -51,7 +51,7 @@ steps: template: | let event = .message.event; let eventInLowerCase = event.trim().toLowerCase();; - let eventNames = .destination.Config.eventsMapping.(){.from === event}.to[] ?? []; + let eventNames = .destination.Config.eventsMapping? .destination.Config.eventsMapping.(){.from === event}.to[] ?? []: []; eventNames.length === 0 ? eventNames = $.ecomEventMaps.(){eventInLowerCase in .src}.dest[] ?? []; const event_type = (eventNames.length === 0 || eventNames[0]==="") ? ({"tracking_type": "Custom", "custom_event_name": event}): ({tracking_type: eventNames[0]}); From b479457b365dd13b982ca4dd8b6fa9c4a64703a3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Dec 2023 15:27:27 +0530 Subject: [PATCH 079/135] chore(deps): bump actions/stale from 8.0.0 to 9.0.0 (#2892) Bumps [actions/stale](https://github.com/actions/stale) from 8.0.0 to 9.0.0. - [Release notes](https://github.com/actions/stale/releases) - [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/stale/compare/v8.0.0...v9.0.0) --- updated-dependencies: - dependency-name: actions/stale dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Krishna Chaitanya --- .github/workflows/housekeeping.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/housekeeping.yml b/.github/workflows/housekeeping.yml index 6c94b1c421..c1786ed8ce 100644 --- a/.github/workflows/housekeeping.yml +++ b/.github/workflows/housekeeping.yml @@ -14,7 +14,7 @@ jobs: pull-requests: write steps: - - uses: actions/stale@v8.0.0 + - uses: actions/stale@v9.0.0 with: repo-token: ${{ secrets.PAT }} operations-per-run: 200 From 81e79f84972dea3f5b756b269d7a1d62e76bfaff Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Dec 2023 15:27:49 +0530 Subject: [PATCH 080/135] chore(deps): bump docker/build-push-action from 4.1.1 to 5.1.0 (#2839) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 4.1.1 to 5.1.0. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/v4.1.1...v5.1.0) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Krishna Chaitanya --- .github/workflows/build-push-docker-image.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-push-docker-image.yml b/.github/workflows/build-push-docker-image.yml index 68360df6fc..9aa0fa687b 100644 --- a/.github/workflows/build-push-docker-image.yml +++ b/.github/workflows/build-push-docker-image.yml @@ -50,7 +50,7 @@ jobs: password: ${{ secrets.DOCKERHUB_PROD_TOKEN }} - name: Build Docker Image - uses: docker/build-push-action@v4.1.1 + uses: docker/build-push-action@v5.1.0 with: context: . file: ${{ inputs.dockerfile }} @@ -66,7 +66,7 @@ jobs: docker run ${{ inputs.build_tag }} npm run test:ts:ci - name: Build and Push Multi-platform Images - uses: docker/build-push-action@v4.1.1 + uses: docker/build-push-action@v5.1.0 with: context: . file: ${{ inputs.dockerfile }} @@ -100,7 +100,7 @@ jobs: password: ${{ secrets.DOCKERHUB_PROD_TOKEN }} - name: Build Docker Image - uses: docker/build-push-action@v4.1.1 + uses: docker/build-push-action@v5.1.0 with: context: . file: ${{ inputs.dockerfile }} @@ -116,7 +116,7 @@ jobs: docker run ${{ inputs.build_tag }} npm run test:ts:ci - name: Build and Push Multi-platform Images - uses: docker/build-push-action@v4.1.1 + uses: docker/build-push-action@v5.1.0 with: context: . file: ${{ inputs.dockerfile }} From bac48adc97e0f87e0fca9497b8a966126e55a1ee Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Dec 2023 15:28:11 +0530 Subject: [PATCH 081/135] chore(deps): bump docker/setup-buildx-action from 2.9.1 to 3.0.0 (#2777) Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2.9.1 to 3.0.0. - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](https://github.com/docker/setup-buildx-action/compare/v2.9.1...v3.0.0) --- updated-dependencies: - dependency-name: docker/setup-buildx-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Krishna Chaitanya --- .github/workflows/build-push-docker-image.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-push-docker-image.yml b/.github/workflows/build-push-docker-image.yml index 9aa0fa687b..4949d0ab97 100644 --- a/.github/workflows/build-push-docker-image.yml +++ b/.github/workflows/build-push-docker-image.yml @@ -41,7 +41,7 @@ jobs: fetch-depth: 1 - name: Setup Docker Buildx - uses: docker/setup-buildx-action@v2.9.1 + uses: docker/setup-buildx-action@v3.0.0 - name: Login to DockerHub uses: docker/login-action@v2.1.0 @@ -91,7 +91,7 @@ jobs: fetch-depth: 1 - name: Setup Docker Buildx - uses: docker/setup-buildx-action@v2.9.1 + uses: docker/setup-buildx-action@v3.0.0 - name: Login to DockerHub uses: docker/login-action@v2.1.0 @@ -138,7 +138,7 @@ jobs: steps: - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2.9.1 + uses: docker/setup-buildx-action@v3.0.0 - name: Login to DockerHub uses: docker/login-action@v2.1.0 From b5eaced572a2f632102e373d3dd5e464df505ae9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Dec 2023 15:28:46 +0530 Subject: [PATCH 082/135] chore(deps): bump actions/setup-node from 3.7.0 to 4.0.0 (#2775) Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3.7.0 to 4.0.0. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/v3.7.0...v4.0.0) --- updated-dependencies: - dependency-name: actions/setup-node dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Krishna Chaitanya --- .github/workflows/draft-new-release.yml | 2 +- .github/workflows/publish-new-release.yml | 2 +- .github/workflows/report-code-coverage.yml | 2 +- .github/workflows/test.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/draft-new-release.yml b/.github/workflows/draft-new-release.yml index 57dd33f0b4..3891944ec3 100644 --- a/.github/workflows/draft-new-release.yml +++ b/.github/workflows/draft-new-release.yml @@ -16,7 +16,7 @@ jobs: fetch-depth: 0 - name: Setup Node - uses: actions/setup-node@v3.7.0 + uses: actions/setup-node@v4.0.0 with: node-version-file: '.nvmrc' cache: 'npm' diff --git a/.github/workflows/publish-new-release.yml b/.github/workflows/publish-new-release.yml index e995388ce0..3cf9ddae38 100644 --- a/.github/workflows/publish-new-release.yml +++ b/.github/workflows/publish-new-release.yml @@ -30,7 +30,7 @@ jobs: fetch-depth: 0 - name: Setup Node - uses: actions/setup-node@v3.7.0 + uses: actions/setup-node@v4.0.0 with: node-version-file: '.nvmrc' cache: 'npm' diff --git a/.github/workflows/report-code-coverage.yml b/.github/workflows/report-code-coverage.yml index 02fa18b134..75efec5e7b 100644 --- a/.github/workflows/report-code-coverage.yml +++ b/.github/workflows/report-code-coverage.yml @@ -20,7 +20,7 @@ jobs: fetch-depth: 1 - name: Setup Node - uses: actions/setup-node@v3.7.0 + uses: actions/setup-node@v4.0.0 with: node-version-file: '.nvmrc' cache: 'npm' diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4c01b351e8..aab8e9d477 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,7 +18,7 @@ jobs: fetch-depth: 1 - name: Setup Node - uses: actions/setup-node@v3.7.0 + uses: actions/setup-node@v4.0.0 with: node-version-file: '.nvmrc' cache: 'npm' From e106abbbb347874c2d79acaf3fa1930a7366b54c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Dec 2023 20:07:45 +0530 Subject: [PATCH 083/135] chore(deps): bump actions/checkout from 3.5.3 to 4.1.1 (#2776) Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.3 to 4.1.1. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3.5.3...v4.1.1) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/build-pr-artifacts.yml | 2 +- .github/workflows/build-push-docker-image.yml | 4 ++-- .github/workflows/draft-new-release.yml | 2 +- .github/workflows/housekeeping.yml | 2 +- .github/workflows/prepare-for-dev-deploy.yml | 2 +- .github/workflows/prepare-for-prod-dt-deploy.yml | 4 ++-- .github/workflows/prepare-for-prod-ut-deploy.yml | 4 ++-- .github/workflows/prepare-for-staging-deploy.yml | 4 ++-- .github/workflows/publish-new-release.yml | 2 +- .github/workflows/report-code-coverage.yml | 2 +- .github/workflows/test.yml | 2 +- 11 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build-pr-artifacts.yml b/.github/workflows/build-pr-artifacts.yml index 022afcd9f4..9938563bf0 100644 --- a/.github/workflows/build-pr-artifacts.yml +++ b/.github/workflows/build-pr-artifacts.yml @@ -18,7 +18,7 @@ jobs: tag_name_ut: ${{ steps.gen_tag_names.outputs.tag_name_ut }} steps: - name: Checkout - uses: actions/checkout@v3.5.3 + uses: actions/checkout@v4.1.1 with: fetch-depth: 1 diff --git a/.github/workflows/build-push-docker-image.yml b/.github/workflows/build-push-docker-image.yml index 4949d0ab97..9f6709a040 100644 --- a/.github/workflows/build-push-docker-image.yml +++ b/.github/workflows/build-push-docker-image.yml @@ -36,7 +36,7 @@ jobs: runs-on: [self-hosted, Linux, ARM64] steps: - name: Checkout - uses: actions/checkout@v3.5.3 + uses: actions/checkout@v4.1.1 with: fetch-depth: 1 @@ -86,7 +86,7 @@ jobs: runs-on: [self-hosted, Linux, X64] steps: - name: Checkout - uses: actions/checkout@v3.5.3 + uses: actions/checkout@v4.1.1 with: fetch-depth: 1 diff --git a/.github/workflows/draft-new-release.yml b/.github/workflows/draft-new-release.yml index 3891944ec3..edfd311f9c 100644 --- a/.github/workflows/draft-new-release.yml +++ b/.github/workflows/draft-new-release.yml @@ -11,7 +11,7 @@ jobs: if: (github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/heads/hotfix/')) && (github.actor == 'ItsSudip' || github.actor == 'krishna2020' || github.actor == 'saikumarrs' || github.actor == 'sandeepdsvs' || github.actor == 'koladilip' || github.actor == 'shrouti1507' || github.actor == 'anantjain45823' || github.actor == 'chandumlg' || github.actor == 'mihir-4116' || github.actor == 'yashasvibajpai' || github.actor == 'sanpj2292' || github.actor == 'ujjwal-ab') && (github.triggering_actor == 'ItsSudip' || github.triggering_actor == 'krishna2020' || github.triggering_actor == 'koladilip' || github.triggering_actor == 'saikumarrs' || github.triggering_actor == 'sandeepdsvs' || github.triggering_actor == 'shrouti1507' || github.triggering_actor == 'anantjain45823' || github.triggering_actor == 'chandumlg' || github.triggering_actor == 'mihir-4116' || github.triggering_actor == 'yashasvibajpai' || github.triggering_actor == 'sanpj2292' || github.triggering_actor == 'ujjwal-ab') steps: - name: Checkout - uses: actions/checkout@v3.5.3 + uses: actions/checkout@v4.1.1 with: fetch-depth: 0 diff --git a/.github/workflows/housekeeping.yml b/.github/workflows/housekeeping.yml index c1786ed8ce..61396dd0c1 100644 --- a/.github/workflows/housekeeping.yml +++ b/.github/workflows/housekeeping.yml @@ -32,7 +32,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3.5.3 + uses: actions/checkout@v4.1.1 - name: Delete Old Branches uses: beatlabs/delete-old-branches-action@v0.0.9 diff --git a/.github/workflows/prepare-for-dev-deploy.yml b/.github/workflows/prepare-for-dev-deploy.yml index d45f760c66..cf97772e2e 100644 --- a/.github/workflows/prepare-for-dev-deploy.yml +++ b/.github/workflows/prepare-for-dev-deploy.yml @@ -28,7 +28,7 @@ jobs: tag_name_ut: ${{ steps.gen_tag_names.outputs.tag_name_ut }} steps: - name: Checkout - uses: actions/checkout@v3.5.3 + uses: actions/checkout@v4.1.1 with: fetch-depth: 1 diff --git a/.github/workflows/prepare-for-prod-dt-deploy.yml b/.github/workflows/prepare-for-prod-dt-deploy.yml index 7750761a33..9669e1bc2c 100644 --- a/.github/workflows/prepare-for-prod-dt-deploy.yml +++ b/.github/workflows/prepare-for-prod-dt-deploy.yml @@ -28,7 +28,7 @@ jobs: tag_name_ut: ${{ steps.gen_tag_names.outputs.tag_name_ut }} steps: - name: Checkout - uses: actions/checkout@v3.5.3 + uses: actions/checkout@v4.1.1 with: fetch-depth: 1 @@ -65,7 +65,7 @@ jobs: TF_IMAGE_REPOSITORY: rudderstack/rudder-transformer steps: - name: Checkout - uses: actions/checkout@v3.5.3 + uses: actions/checkout@v4.1.1 with: fetch-depth: 1 diff --git a/.github/workflows/prepare-for-prod-ut-deploy.yml b/.github/workflows/prepare-for-prod-ut-deploy.yml index 2da3c9d067..ea5928f3b2 100644 --- a/.github/workflows/prepare-for-prod-ut-deploy.yml +++ b/.github/workflows/prepare-for-prod-ut-deploy.yml @@ -27,7 +27,7 @@ jobs: tag_name_ut: ${{ steps.gen_tag_names.outputs.tag_name_ut }} steps: - name: Checkout - uses: actions/checkout@v3.5.3 + uses: actions/checkout@v4.1.1 with: fetch-depth: 1 @@ -68,7 +68,7 @@ jobs: TF_IMAGE_REPOSITORY: rudderstack/rudder-transformer steps: - name: Checkout - uses: actions/checkout@v3.5.3 + uses: actions/checkout@v4.1.1 with: fetch-depth: 1 diff --git a/.github/workflows/prepare-for-staging-deploy.yml b/.github/workflows/prepare-for-staging-deploy.yml index 37224121bf..4e8f29cffa 100644 --- a/.github/workflows/prepare-for-staging-deploy.yml +++ b/.github/workflows/prepare-for-staging-deploy.yml @@ -20,7 +20,7 @@ jobs: tag_name_ut: ${{ steps.gen_tag_names.outputs.tag_name_ut }} steps: - name: Checkout - uses: actions/checkout@v3.5.3 + uses: actions/checkout@v4.1.1 with: fetch-depth: 1 @@ -78,7 +78,7 @@ jobs: UT_TAG_NAME: ${{ needs.generate-tag-names.outputs.tag_name_ut }} steps: - name: Checkout - uses: actions/checkout@v3.5.3 + uses: actions/checkout@v4.1.1 with: fetch-depth: 1 diff --git a/.github/workflows/publish-new-release.yml b/.github/workflows/publish-new-release.yml index 3cf9ddae38..7d0d4a7437 100644 --- a/.github/workflows/publish-new-release.yml +++ b/.github/workflows/publish-new-release.yml @@ -25,7 +25,7 @@ jobs: echo "release_version=$version" >> $GITHUB_OUTPUT - name: Checkout - uses: actions/checkout@v3.5.3 + uses: actions/checkout@v4.1.1 with: fetch-depth: 0 diff --git a/.github/workflows/report-code-coverage.yml b/.github/workflows/report-code-coverage.yml index 75efec5e7b..e6f72cbdb8 100644 --- a/.github/workflows/report-code-coverage.yml +++ b/.github/workflows/report-code-coverage.yml @@ -15,7 +15,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3.5.3 + uses: actions/checkout@v4.1.1 with: fetch-depth: 1 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index aab8e9d477..73e5a18ea4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3.5.3 + uses: actions/checkout@v4.1.1 with: fetch-depth: 1 From dc41c7b81c569f4a47a463c3c378a3212b7cea0d Mon Sep 17 00:00:00 2001 From: nidhilashkari17 <108564211+nidhilashkari17@users.noreply.github.com> Date: Wed, 13 Dec 2023 20:22:50 +0530 Subject: [PATCH 084/135] [Snyk] Upgrade @aws-sdk/client-s3 from 3.370.0 to 3.438.0 (#2838) fix: upgrade @aws-sdk/client-s3 from 3.370.0 to 3.438.0 Snyk has created this PR to upgrade @aws-sdk/client-s3 from 3.370.0 to 3.438.0. See this package in npm: https://www.npmjs.com/package/@aws-sdk/client-s3 See this project in Snyk: https://app.snyk.io/org/datamanagement/project/39f686fe-9e69-4343-a9ce-129e22bff288?utm_source=github&utm_medium=referral&page=upgrade-pr Co-authored-by: snyk-bot Co-authored-by: Sai Kumar Battinoju --- package-lock.json | 4945 +++++++++------------------------------------ package.json | 2 +- 2 files changed, 979 insertions(+), 3968 deletions(-) diff --git a/package-lock.json b/package-lock.json index 440bb9ea46..a01ec69256 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "@amplitude/ua-parser-js": "^0.7.24", "@aws-sdk/client-personalize": "^3.391.0", - "@aws-sdk/client-s3": "^3.370.0", + "@aws-sdk/client-s3": "^3.438.0", "@aws-sdk/credential-providers": "^3.391.0", "@aws-sdk/lib-storage": "^3.391.0", "@bugsnag/js": "^7.20.2", @@ -216,7 +216,8 @@ }, "node_modules/@aws-crypto/crc32c": { "version": "3.0.0", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/crc32c/-/crc32c-3.0.0.tgz", + "integrity": "sha512-ENNPPManmnVJ4BTXlOjAgD7URidbAznURqD0KvfREyc4o20DPYdEldU1f5cQ7Jbj0CJJSPaMIk/9ZshdB3210w==", "dependencies": { "@aws-crypto/util": "^3.0.0", "@aws-sdk/types": "^3.222.0", @@ -225,7 +226,8 @@ }, "node_modules/@aws-crypto/crc32c/node_modules/tslib": { "version": "1.14.1", - "license": "0BSD" + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, "node_modules/@aws-crypto/ie11-detection": { "version": "3.0.0", @@ -310,21 +312,6 @@ "version": "1.14.1", "license": "0BSD" }, - "node_modules/@aws-sdk/chunked-blob-reader": { - "version": "3.310.0", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - } - }, - "node_modules/@aws-sdk/chunked-blob-reader-native": { - "version": "3.310.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/util-base64": "3.310.0", - "tslib": "^2.5.0" - } - }, "node_modules/@aws-sdk/client-cognito-identity": { "version": "3.414.0", "license": "Apache-2.0", @@ -382,62 +369,169 @@ "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/abort-controller": { - "version": "2.0.9", + "node_modules/@aws-sdk/client-personalize": { + "version": "3.414.0", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^2.3.3", + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/client-sts": "3.414.0", + "@aws-sdk/credential-provider-node": "3.414.0", + "@aws-sdk/middleware-host-header": "3.413.0", + "@aws-sdk/middleware-logger": "3.413.0", + "@aws-sdk/middleware-recursion-detection": "3.413.0", + "@aws-sdk/middleware-signing": "3.413.0", + "@aws-sdk/middleware-user-agent": "3.413.0", + "@aws-sdk/region-config-resolver": "3.413.0", + "@aws-sdk/types": "3.413.0", + "@aws-sdk/util-endpoints": "3.413.0", + "@aws-sdk/util-user-agent-browser": "3.413.0", + "@aws-sdk/util-user-agent-node": "3.413.0", + "@smithy/config-resolver": "^2.0.8", + "@smithy/fetch-http-handler": "^2.1.3", + "@smithy/hash-node": "^2.0.7", + "@smithy/invalid-dependency": "^2.0.7", + "@smithy/middleware-content-length": "^2.0.9", + "@smithy/middleware-endpoint": "^2.0.7", + "@smithy/middleware-retry": "^2.0.10", + "@smithy/middleware-serde": "^2.0.7", + "@smithy/middleware-stack": "^2.0.0", + "@smithy/node-config-provider": "^2.0.10", + "@smithy/node-http-handler": "^2.1.3", + "@smithy/protocol-http": "^3.0.3", + "@smithy/smithy-client": "^2.1.4", + "@smithy/types": "^2.3.1", + "@smithy/url-parser": "^2.0.7", + "@smithy/util-base64": "^2.0.0", + "@smithy/util-body-length-browser": "^2.0.0", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.8", + "@smithy/util-defaults-mode-node": "^2.0.10", + "@smithy/util-retry": "^2.0.0", + "@smithy/util-utf8": "^2.0.0", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/config-resolver": { - "version": "2.0.10", + "node_modules/@aws-sdk/client-personalize/node_modules/@aws-sdk/types": { + "version": "3.413.0", "license": "Apache-2.0", "dependencies": { - "@smithy/node-config-provider": "^2.0.12", - "@smithy/types": "^2.3.3", - "@smithy/util-config-provider": "^2.0.0", - "@smithy/util-middleware": "^2.0.2", + "@smithy/types": "^2.3.1", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/credential-provider-imds": { - "version": "2.0.12", - "license": "Apache-2.0", + "node_modules/@aws-sdk/client-s3": { + "version": "3.438.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-s3/-/client-s3-3.438.0.tgz", + "integrity": "sha512-5VxdfyZ9oovbK5qzIYW4ZeJ1waD6VqfclSDQLHmgulekM2JYo/goEQJSjWnI4VMWuMsopzvqyeA+L9xq9uXLBQ==", "dependencies": { - "@smithy/node-config-provider": "^2.0.12", - "@smithy/property-provider": "^2.0.10", - "@smithy/types": "^2.3.3", - "@smithy/url-parser": "^2.0.9", + "@aws-crypto/sha1-browser": "3.0.0", + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/client-sts": "3.438.0", + "@aws-sdk/core": "3.436.0", + "@aws-sdk/credential-provider-node": "3.438.0", + "@aws-sdk/middleware-bucket-endpoint": "3.433.0", + "@aws-sdk/middleware-expect-continue": "3.433.0", + "@aws-sdk/middleware-flexible-checksums": "3.433.0", + "@aws-sdk/middleware-host-header": "3.433.0", + "@aws-sdk/middleware-location-constraint": "3.433.0", + "@aws-sdk/middleware-logger": "3.433.0", + "@aws-sdk/middleware-recursion-detection": "3.433.0", + "@aws-sdk/middleware-sdk-s3": "3.433.0", + "@aws-sdk/middleware-signing": "3.433.0", + "@aws-sdk/middleware-ssec": "3.433.0", + "@aws-sdk/middleware-user-agent": "3.438.0", + "@aws-sdk/region-config-resolver": "3.433.0", + "@aws-sdk/signature-v4-multi-region": "3.437.0", + "@aws-sdk/types": "3.433.0", + "@aws-sdk/util-endpoints": "3.438.0", + "@aws-sdk/util-user-agent-browser": "3.433.0", + "@aws-sdk/util-user-agent-node": "3.437.0", + "@aws-sdk/xml-builder": "3.310.0", + "@smithy/config-resolver": "^2.0.16", + "@smithy/eventstream-serde-browser": "^2.0.12", + "@smithy/eventstream-serde-config-resolver": "^2.0.12", + "@smithy/eventstream-serde-node": "^2.0.12", + "@smithy/fetch-http-handler": "^2.2.4", + "@smithy/hash-blob-browser": "^2.0.12", + "@smithy/hash-node": "^2.0.12", + "@smithy/hash-stream-node": "^2.0.12", + "@smithy/invalid-dependency": "^2.0.12", + "@smithy/md5-js": "^2.0.12", + "@smithy/middleware-content-length": "^2.0.14", + "@smithy/middleware-endpoint": "^2.1.3", + "@smithy/middleware-retry": "^2.0.18", + "@smithy/middleware-serde": "^2.0.12", + "@smithy/middleware-stack": "^2.0.6", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/node-http-handler": "^2.1.8", + "@smithy/protocol-http": "^3.0.8", + "@smithy/smithy-client": "^2.1.12", + "@smithy/types": "^2.4.0", + "@smithy/url-parser": "^2.0.12", + "@smithy/util-base64": "^2.0.0", + "@smithy/util-body-length-browser": "^2.0.0", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.16", + "@smithy/util-defaults-mode-node": "^2.0.21", + "@smithy/util-endpoints": "^1.0.2", + "@smithy/util-retry": "^2.0.5", + "@smithy/util-stream": "^2.0.17", + "@smithy/util-utf8": "^2.0.0", + "@smithy/util-waiter": "^2.0.12", + "fast-xml-parser": "4.2.5", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/fetch-http-handler": { - "version": "2.1.5", - "license": "Apache-2.0", + "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/client-sso": { + "version": "3.438.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.438.0.tgz", + "integrity": "sha512-L/xKq+K78PShLku8x5gM6lZDUp7LhFJ2ksKH7Vll+exSZq+QUaxuzjp4gqdzh6B0oIshv2jssQlUa0ScOmVRMg==", "dependencies": { - "@smithy/protocol-http": "^3.0.5", - "@smithy/querystring-builder": "^2.0.9", - "@smithy/types": "^2.3.3", + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/core": "3.436.0", + "@aws-sdk/middleware-host-header": "3.433.0", + "@aws-sdk/middleware-logger": "3.433.0", + "@aws-sdk/middleware-recursion-detection": "3.433.0", + "@aws-sdk/middleware-user-agent": "3.438.0", + "@aws-sdk/region-config-resolver": "3.433.0", + "@aws-sdk/types": "3.433.0", + "@aws-sdk/util-endpoints": "3.438.0", + "@aws-sdk/util-user-agent-browser": "3.433.0", + "@aws-sdk/util-user-agent-node": "3.437.0", + "@smithy/config-resolver": "^2.0.16", + "@smithy/fetch-http-handler": "^2.2.4", + "@smithy/hash-node": "^2.0.12", + "@smithy/invalid-dependency": "^2.0.12", + "@smithy/middleware-content-length": "^2.0.14", + "@smithy/middleware-endpoint": "^2.1.3", + "@smithy/middleware-retry": "^2.0.18", + "@smithy/middleware-serde": "^2.0.12", + "@smithy/middleware-stack": "^2.0.6", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/node-http-handler": "^2.1.8", + "@smithy/protocol-http": "^3.0.8", + "@smithy/smithy-client": "^2.1.12", + "@smithy/types": "^2.4.0", + "@smithy/url-parser": "^2.0.12", "@smithy/util-base64": "^2.0.0", - "tslib": "^2.5.0" - } - }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/hash-node": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "@smithy/util-buffer-from": "^2.0.0", + "@smithy/util-body-length-browser": "^2.0.0", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.16", + "@smithy/util-defaults-mode-node": "^2.0.21", + "@smithy/util-endpoints": "^1.0.2", + "@smithy/util-retry": "^2.0.5", "@smithy/util-utf8": "^2.0.0", "tslib": "^2.5.0" }, @@ -445,382 +539,417 @@ "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/invalid-dependency": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - } - }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/is-array-buffer": { - "version": "2.0.0", - "license": "Apache-2.0", + "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/client-sts": { + "version": "3.438.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.438.0.tgz", + "integrity": "sha512-UBxLZKVVvbR4LHwSNSqaKx22YBSOGkavrh4SyDP8o8XOlXeRxTCllfSfjL9K5Mktp+ZwQ2NiubNcwmvUcGKbbg==", "dependencies": { + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/core": "3.436.0", + "@aws-sdk/credential-provider-node": "3.438.0", + "@aws-sdk/middleware-host-header": "3.433.0", + "@aws-sdk/middleware-logger": "3.433.0", + "@aws-sdk/middleware-recursion-detection": "3.433.0", + "@aws-sdk/middleware-sdk-sts": "3.433.0", + "@aws-sdk/middleware-signing": "3.433.0", + "@aws-sdk/middleware-user-agent": "3.438.0", + "@aws-sdk/region-config-resolver": "3.433.0", + "@aws-sdk/types": "3.433.0", + "@aws-sdk/util-endpoints": "3.438.0", + "@aws-sdk/util-user-agent-browser": "3.433.0", + "@aws-sdk/util-user-agent-node": "3.437.0", + "@smithy/config-resolver": "^2.0.16", + "@smithy/fetch-http-handler": "^2.2.4", + "@smithy/hash-node": "^2.0.12", + "@smithy/invalid-dependency": "^2.0.12", + "@smithy/middleware-content-length": "^2.0.14", + "@smithy/middleware-endpoint": "^2.1.3", + "@smithy/middleware-retry": "^2.0.18", + "@smithy/middleware-serde": "^2.0.12", + "@smithy/middleware-stack": "^2.0.6", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/node-http-handler": "^2.1.8", + "@smithy/protocol-http": "^3.0.8", + "@smithy/smithy-client": "^2.1.12", + "@smithy/types": "^2.4.0", + "@smithy/url-parser": "^2.0.12", + "@smithy/util-base64": "^2.0.0", + "@smithy/util-body-length-browser": "^2.0.0", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.16", + "@smithy/util-defaults-mode-node": "^2.0.21", + "@smithy/util-endpoints": "^1.0.2", + "@smithy/util-retry": "^2.0.5", + "@smithy/util-utf8": "^2.0.0", + "fast-xml-parser": "4.2.5", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/middleware-content-length": { - "version": "2.0.11", - "license": "Apache-2.0", + "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/credential-provider-env": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.433.0.tgz", + "integrity": "sha512-Vl7Qz5qYyxBurMn6hfSiNJeUHSqfVUlMt0C1Bds3tCkl3IzecRWwyBOlxtxO3VCrgVeW3HqswLzCvhAFzPH6nQ==", "dependencies": { - "@smithy/protocol-http": "^3.0.5", - "@smithy/types": "^2.3.3", + "@aws-sdk/types": "3.433.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/middleware-endpoint": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/middleware-serde": "^2.0.9", - "@smithy/types": "^2.3.3", - "@smithy/url-parser": "^2.0.9", - "@smithy/util-middleware": "^2.0.2", + "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/credential-provider-ini": { + "version": "3.438.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.438.0.tgz", + "integrity": "sha512-WYPQR3pXoHJjn9/RMWipUhsUNFy6zhOiII6u8LJ5w84aNqIjV4+BdRYztRNGJD98jdtekhbkX0YKoSuZqP+unQ==", + "dependencies": { + "@aws-sdk/credential-provider-env": "3.433.0", + "@aws-sdk/credential-provider-process": "3.433.0", + "@aws-sdk/credential-provider-sso": "3.438.0", + "@aws-sdk/credential-provider-web-identity": "3.433.0", + "@aws-sdk/types": "3.433.0", + "@smithy/credential-provider-imds": "^2.0.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/middleware-retry": { - "version": "2.0.12", - "license": "Apache-2.0", - "dependencies": { - "@smithy/node-config-provider": "^2.0.12", - "@smithy/protocol-http": "^3.0.5", - "@smithy/service-error-classification": "^2.0.2", - "@smithy/types": "^2.3.3", - "@smithy/util-middleware": "^2.0.2", - "@smithy/util-retry": "^2.0.2", - "tslib": "^2.5.0", - "uuid": "^8.3.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/middleware-serde": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", + "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/credential-provider-node": { + "version": "3.438.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.438.0.tgz", + "integrity": "sha512-uaw3D2R0svyrC32qyZ2aOv/l0AT9eClh+eQsZJTQD3Kz9q+2VdeOBThQ8fsMfRtm26nUbZo6A/CRwxkm6okI+w==", + "dependencies": { + "@aws-sdk/credential-provider-env": "3.433.0", + "@aws-sdk/credential-provider-ini": "3.438.0", + "@aws-sdk/credential-provider-process": "3.433.0", + "@aws-sdk/credential-provider-sso": "3.438.0", + "@aws-sdk/credential-provider-web-identity": "3.433.0", + "@aws-sdk/types": "3.433.0", + "@smithy/credential-provider-imds": "^2.0.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/middleware-stack": { - "version": "2.0.2", - "license": "Apache-2.0", + "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/credential-provider-process": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.433.0.tgz", + "integrity": "sha512-W7FcGlQjio9Y/PepcZGRyl5Bpwb0uWU7qIUCh+u4+q2mW4D5ZngXg8V/opL9/I/p4tUH9VXZLyLGwyBSkdhL+A==", "dependencies": { - "@smithy/types": "^2.3.3", + "@aws-sdk/types": "3.433.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/node-config-provider": { - "version": "2.0.12", - "license": "Apache-2.0", + "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/credential-provider-sso": { + "version": "3.438.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.438.0.tgz", + "integrity": "sha512-Xykli/64xR18cBV5P0XFxcH120omtfAjC/cFy/9nFU/+dPvbk0uu1yEOZYteWHyGGkPN4PkHmbh60GiUCLQkWQ==", "dependencies": { - "@smithy/property-provider": "^2.0.10", - "@smithy/shared-ini-file-loader": "^2.0.11", - "@smithy/types": "^2.3.3", + "@aws-sdk/client-sso": "3.438.0", + "@aws-sdk/token-providers": "3.438.0", + "@aws-sdk/types": "3.433.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/node-http-handler": { - "version": "2.1.5", - "license": "Apache-2.0", + "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/credential-provider-web-identity": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.433.0.tgz", + "integrity": "sha512-RlwjP1I5wO+aPpwyCp23Mk8nmRbRL33hqRASy73c4JA2z2YiRua+ryt6MalIxehhwQU6xvXUKulJnPG9VaMFZg==", "dependencies": { - "@smithy/abort-controller": "^2.0.9", - "@smithy/protocol-http": "^3.0.5", - "@smithy/querystring-builder": "^2.0.9", - "@smithy/types": "^2.3.3", + "@aws-sdk/types": "3.433.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/property-provider": { - "version": "2.0.10", - "license": "Apache-2.0", + "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/middleware-host-header": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.433.0.tgz", + "integrity": "sha512-mBTq3UWv1UzeHG+OfUQ2MB/5GEkt5LTKFaUqzL7ESwzW8XtpBgXnjZvIwu3Vcd3sEetMwijwaGiJhY0ae/YyaA==", "dependencies": { - "@smithy/types": "^2.3.3", + "@aws-sdk/types": "3.433.0", + "@smithy/protocol-http": "^3.0.8", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/protocol-http": { - "version": "3.0.5", - "license": "Apache-2.0", + "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/middleware-logger": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.433.0.tgz", + "integrity": "sha512-We346Fb5xGonTGVZC9Nvqtnqy74VJzYuTLLiuuftA5sbNzftBDy/22QCfvYSTOAl3bvif+dkDUzQY2ihc5PwOQ==", "dependencies": { - "@smithy/types": "^2.3.3", + "@aws-sdk/types": "3.433.0", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/querystring-builder": { - "version": "2.0.9", - "license": "Apache-2.0", + "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/middleware-recursion-detection": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.433.0.tgz", + "integrity": "sha512-HEvYC9PQlWY/ccUYtLvAlwwf1iCif2TSAmLNr3YTBRVa98x6jKL0hlCrHWYklFeqOGSKy6XhE+NGJMUII0/HaQ==", "dependencies": { - "@smithy/types": "^2.3.3", - "@smithy/util-uri-escape": "^2.0.0", + "@aws-sdk/types": "3.433.0", + "@smithy/protocol-http": "^3.0.8", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/querystring-parser": { - "version": "2.0.9", - "license": "Apache-2.0", + "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/middleware-sdk-sts": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-sdk-sts/-/middleware-sdk-sts-3.433.0.tgz", + "integrity": "sha512-ORYbJnBejUyonFl5FwIqhvI3Cq6sAp9j+JpkKZtFNma9tFPdrhmYgfCeNH32H/wGTQV/tUoQ3luh0gA4cuk6DA==", "dependencies": { - "@smithy/types": "^2.3.3", + "@aws-sdk/middleware-signing": "3.433.0", + "@aws-sdk/types": "3.433.0", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/service-error-classification": { - "version": "2.0.2", - "license": "Apache-2.0", + "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/middleware-signing": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-signing/-/middleware-signing-3.433.0.tgz", + "integrity": "sha512-jxPvt59NZo/epMNLNTu47ikmP8v0q217I6bQFGJG7JVFnfl36zDktMwGw+0xZR80qiK47/2BWrNpta61Zd2FxQ==", "dependencies": { - "@smithy/types": "^2.3.3" + "@aws-sdk/types": "3.433.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/protocol-http": "^3.0.8", + "@smithy/signature-v4": "^2.0.0", + "@smithy/types": "^2.4.0", + "@smithy/util-middleware": "^2.0.5", + "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/shared-ini-file-loader": { - "version": "2.0.11", - "license": "Apache-2.0", + "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/middleware-user-agent": { + "version": "3.438.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.438.0.tgz", + "integrity": "sha512-a+xHT1wOxT6EA6YyLmrfaroKWOkwwyiktUfXKM0FsUutGzNi4fKhb5NZ2al58NsXzHgHFrasSDp+Lqbd/X2cEw==", "dependencies": { - "@smithy/types": "^2.3.3", + "@aws-sdk/types": "3.433.0", + "@aws-sdk/util-endpoints": "3.438.0", + "@smithy/protocol-http": "^3.0.8", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/smithy-client": { - "version": "2.1.6", - "license": "Apache-2.0", + "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/region-config-resolver": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.433.0.tgz", + "integrity": "sha512-xpjRjCZW+CDFdcMmmhIYg81ST5UAnJh61IHziQEk0FXONrg4kjyYPZAOjEdzXQ+HxJQuGQLKPhRdzxmQnbX7pg==", "dependencies": { - "@smithy/middleware-stack": "^2.0.2", - "@smithy/types": "^2.3.3", - "@smithy/util-stream": "^2.0.12", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/types": "^2.4.0", + "@smithy/util-config-provider": "^2.0.0", + "@smithy/util-middleware": "^2.0.5", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/types": { - "version": "2.3.3", - "license": "Apache-2.0", + "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/token-providers": { + "version": "3.438.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.438.0.tgz", + "integrity": "sha512-G2fUfTtU6/1ayYRMu0Pd9Ln4qYSvwJOWCqJMdkDgvXSwdgcOSOLsnAIk1AHGJDAvgLikdCzuyOsdJiexr9Vnww==", "dependencies": { + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/middleware-host-header": "3.433.0", + "@aws-sdk/middleware-logger": "3.433.0", + "@aws-sdk/middleware-recursion-detection": "3.433.0", + "@aws-sdk/middleware-user-agent": "3.438.0", + "@aws-sdk/region-config-resolver": "3.433.0", + "@aws-sdk/types": "3.433.0", + "@aws-sdk/util-endpoints": "3.438.0", + "@aws-sdk/util-user-agent-browser": "3.433.0", + "@aws-sdk/util-user-agent-node": "3.437.0", + "@smithy/config-resolver": "^2.0.16", + "@smithy/fetch-http-handler": "^2.2.4", + "@smithy/hash-node": "^2.0.12", + "@smithy/invalid-dependency": "^2.0.12", + "@smithy/middleware-content-length": "^2.0.14", + "@smithy/middleware-endpoint": "^2.1.3", + "@smithy/middleware-retry": "^2.0.18", + "@smithy/middleware-serde": "^2.0.12", + "@smithy/middleware-stack": "^2.0.6", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/node-http-handler": "^2.1.8", + "@smithy/property-provider": "^2.0.0", + "@smithy/protocol-http": "^3.0.8", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/smithy-client": "^2.1.12", + "@smithy/types": "^2.4.0", + "@smithy/url-parser": "^2.0.12", + "@smithy/util-base64": "^2.0.0", + "@smithy/util-body-length-browser": "^2.0.0", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.16", + "@smithy/util-defaults-mode-node": "^2.0.21", + "@smithy/util-endpoints": "^1.0.2", + "@smithy/util-retry": "^2.0.5", + "@smithy/util-utf8": "^2.0.0", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/url-parser": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/querystring-parser": "^2.0.9", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - } - }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/util-base64": { - "version": "2.0.0", - "license": "Apache-2.0", + "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/util-endpoints": { + "version": "3.438.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.438.0.tgz", + "integrity": "sha512-6VyPTq1kN3GWxwFt5DdZfOsr6cJZPLjWh0troY/0uUv3hK74C9o3Y0Xf/z8UAUvQFkVqZse12O0/BgPVMImvfA==", "dependencies": { - "@smithy/util-buffer-from": "^2.0.0", + "@aws-sdk/types": "3.433.0", + "@smithy/util-endpoints": "^1.0.2", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/util-body-length-browser": { - "version": "2.0.0", - "license": "Apache-2.0", + "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/util-user-agent-browser": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.433.0.tgz", + "integrity": "sha512-2Cf/Lwvxbt5RXvWFXrFr49vXv0IddiUwrZoAiwhDYxvsh+BMnh+NUFot+ZQaTrk/8IPZVDeLPWZRdVy00iaVXQ==", "dependencies": { + "@aws-sdk/types": "3.433.0", + "@smithy/types": "^2.4.0", + "bowser": "^2.11.0", "tslib": "^2.5.0" } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/util-body-length-node": { - "version": "2.1.0", - "license": "Apache-2.0", + "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/util-user-agent-node": { + "version": "3.437.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.437.0.tgz", + "integrity": "sha512-JVEcvWaniamtYVPem4UthtCNoTBCfFTwYj7Y3CrWZ2Qic4TqrwLkAfaBGtI2TGrhIClVr77uzLI6exqMTN7orA==", "dependencies": { + "@aws-sdk/types": "3.433.0", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/util-buffer-from": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/is-array-buffer": "^2.0.0", - "tslib": "^2.5.0" }, - "engines": { - "node": ">=14.0.0" + "peerDependencies": { + "aws-crt": ">=1.0.0" + }, + "peerDependenciesMeta": { + "aws-crt": { + "optional": true + } } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/util-config-provider": { - "version": "2.0.0", + "node_modules/@aws-sdk/client-sso": { + "version": "3.414.0", "license": "Apache-2.0", "dependencies": { + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/middleware-host-header": "3.413.0", + "@aws-sdk/middleware-logger": "3.413.0", + "@aws-sdk/middleware-recursion-detection": "3.413.0", + "@aws-sdk/middleware-user-agent": "3.413.0", + "@aws-sdk/region-config-resolver": "3.413.0", + "@aws-sdk/types": "3.413.0", + "@aws-sdk/util-endpoints": "3.413.0", + "@aws-sdk/util-user-agent-browser": "3.413.0", + "@aws-sdk/util-user-agent-node": "3.413.0", + "@smithy/config-resolver": "^2.0.8", + "@smithy/fetch-http-handler": "^2.1.3", + "@smithy/hash-node": "^2.0.7", + "@smithy/invalid-dependency": "^2.0.7", + "@smithy/middleware-content-length": "^2.0.9", + "@smithy/middleware-endpoint": "^2.0.7", + "@smithy/middleware-retry": "^2.0.10", + "@smithy/middleware-serde": "^2.0.7", + "@smithy/middleware-stack": "^2.0.0", + "@smithy/node-config-provider": "^2.0.10", + "@smithy/node-http-handler": "^2.1.3", + "@smithy/protocol-http": "^3.0.3", + "@smithy/smithy-client": "^2.1.4", + "@smithy/types": "^2.3.1", + "@smithy/url-parser": "^2.0.7", + "@smithy/util-base64": "^2.0.0", + "@smithy/util-body-length-browser": "^2.0.0", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.8", + "@smithy/util-defaults-mode-node": "^2.0.10", + "@smithy/util-retry": "^2.0.0", + "@smithy/util-utf8": "^2.0.0", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/util-defaults-mode-browser": { - "version": "2.0.10", + "node_modules/@aws-sdk/client-sso/node_modules/@aws-sdk/types": { + "version": "3.413.0", "license": "Apache-2.0", "dependencies": { - "@smithy/property-provider": "^2.0.10", - "@smithy/smithy-client": "^2.1.6", - "@smithy/types": "^2.3.3", - "bowser": "^2.11.0", + "@smithy/types": "^2.3.1", "tslib": "^2.5.0" }, "engines": { - "node": ">= 10.0.0" + "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/util-defaults-mode-node": { - "version": "2.0.12", - "license": "Apache-2.0", - "dependencies": { - "@smithy/config-resolver": "^2.0.10", - "@smithy/credential-provider-imds": "^2.0.12", - "@smithy/node-config-provider": "^2.0.12", - "@smithy/property-provider": "^2.0.10", - "@smithy/smithy-client": "^2.1.6", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">= 10.0.0" - } - }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/util-hex-encoding": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/util-middleware": { - "version": "2.0.2", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/util-retry": { - "version": "2.0.2", - "license": "Apache-2.0", - "dependencies": { - "@smithy/service-error-classification": "^2.0.2", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">= 14.0.0" - } - }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/util-stream": { - "version": "2.0.12", - "license": "Apache-2.0", - "dependencies": { - "@smithy/fetch-http-handler": "^2.1.5", - "@smithy/node-http-handler": "^2.1.5", - "@smithy/types": "^2.3.3", - "@smithy/util-base64": "^2.0.0", - "@smithy/util-buffer-from": "^2.0.0", - "@smithy/util-hex-encoding": "^2.0.0", - "@smithy/util-utf8": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/util-uri-escape": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/util-utf8": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/util-buffer-from": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/uuid": { - "version": "8.3.2", - "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/@aws-sdk/client-personalize": { - "version": "3.414.0", + "node_modules/@aws-sdk/client-sts": { + "version": "3.414.0", "license": "Apache-2.0", "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/client-sts": "3.414.0", "@aws-sdk/credential-provider-node": "3.414.0", "@aws-sdk/middleware-host-header": "3.413.0", "@aws-sdk/middleware-logger": "3.413.0", "@aws-sdk/middleware-recursion-detection": "3.413.0", + "@aws-sdk/middleware-sdk-sts": "3.413.0", "@aws-sdk/middleware-signing": "3.413.0", "@aws-sdk/middleware-user-agent": "3.413.0", "@aws-sdk/region-config-resolver": "3.413.0", @@ -850,13 +979,14 @@ "@smithy/util-defaults-mode-node": "^2.0.10", "@smithy/util-retry": "^2.0.0", "@smithy/util-utf8": "^2.0.0", + "fast-xml-parser": "4.2.5", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-personalize/node_modules/@aws-sdk/types": { + "node_modules/@aws-sdk/client-sts/node_modules/@aws-sdk/types": { "version": "3.413.0", "license": "Apache-2.0", "dependencies": { @@ -867,3287 +997,78 @@ "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/abort-controller": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/config-resolver": { - "version": "2.0.10", - "license": "Apache-2.0", - "dependencies": { - "@smithy/node-config-provider": "^2.0.12", - "@smithy/types": "^2.3.3", - "@smithy/util-config-provider": "^2.0.0", - "@smithy/util-middleware": "^2.0.2", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/credential-provider-imds": { - "version": "2.0.12", - "license": "Apache-2.0", - "dependencies": { - "@smithy/node-config-provider": "^2.0.12", - "@smithy/property-provider": "^2.0.10", - "@smithy/types": "^2.3.3", - "@smithy/url-parser": "^2.0.9", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/fetch-http-handler": { - "version": "2.1.5", - "license": "Apache-2.0", - "dependencies": { - "@smithy/protocol-http": "^3.0.5", - "@smithy/querystring-builder": "^2.0.9", - "@smithy/types": "^2.3.3", - "@smithy/util-base64": "^2.0.0", - "tslib": "^2.5.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/hash-node": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "@smithy/util-buffer-from": "^2.0.0", - "@smithy/util-utf8": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/invalid-dependency": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/is-array-buffer": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/middleware-content-length": { - "version": "2.0.11", - "license": "Apache-2.0", - "dependencies": { - "@smithy/protocol-http": "^3.0.5", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/middleware-endpoint": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/middleware-serde": "^2.0.9", - "@smithy/types": "^2.3.3", - "@smithy/url-parser": "^2.0.9", - "@smithy/util-middleware": "^2.0.2", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/middleware-retry": { - "version": "2.0.12", - "license": "Apache-2.0", - "dependencies": { - "@smithy/node-config-provider": "^2.0.12", - "@smithy/protocol-http": "^3.0.5", - "@smithy/service-error-classification": "^2.0.2", - "@smithy/types": "^2.3.3", - "@smithy/util-middleware": "^2.0.2", - "@smithy/util-retry": "^2.0.2", - "tslib": "^2.5.0", - "uuid": "^8.3.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/middleware-serde": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/middleware-stack": { - "version": "2.0.2", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/node-config-provider": { - "version": "2.0.12", - "license": "Apache-2.0", - "dependencies": { - "@smithy/property-provider": "^2.0.10", - "@smithy/shared-ini-file-loader": "^2.0.11", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/node-http-handler": { - "version": "2.1.5", - "license": "Apache-2.0", - "dependencies": { - "@smithy/abort-controller": "^2.0.9", - "@smithy/protocol-http": "^3.0.5", - "@smithy/querystring-builder": "^2.0.9", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/property-provider": { - "version": "2.0.10", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/protocol-http": { - "version": "3.0.5", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/querystring-builder": { - "version": "2.0.9", - "license": "Apache-2.0", + "node_modules/@aws-sdk/core": { + "version": "3.436.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.436.0.tgz", + "integrity": "sha512-vX5/LjXvCejC2XUY6TSg1oozjqK6BvkE75t0ys9dgqyr5PlZyZksMoeAFHUlj0sCjhT3ziWCujP1oiSpPWY9hg==", "dependencies": { - "@smithy/types": "^2.3.3", - "@smithy/util-uri-escape": "^2.0.0", - "tslib": "^2.5.0" + "@smithy/smithy-client": "^2.1.12" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/querystring-parser": { - "version": "2.0.9", + "node_modules/@aws-sdk/credential-provider-cognito-identity": { + "version": "3.414.0", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^2.3.3", + "@aws-sdk/client-cognito-identity": "3.414.0", + "@aws-sdk/types": "3.413.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/types": "^2.3.1", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/service-error-classification": { - "version": "2.0.2", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/shared-ini-file-loader": { - "version": "2.0.11", + "node_modules/@aws-sdk/credential-provider-cognito-identity/node_modules/@aws-sdk/types": { + "version": "3.413.0", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^2.3.3", + "@smithy/types": "^2.3.1", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/smithy-client": { - "version": "2.1.6", + "node_modules/@aws-sdk/credential-provider-env": { + "version": "3.413.0", "license": "Apache-2.0", "dependencies": { - "@smithy/middleware-stack": "^2.0.2", - "@smithy/types": "^2.3.3", - "@smithy/util-stream": "^2.0.12", + "@aws-sdk/types": "3.413.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/types": "^2.3.1", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/types": { - "version": "2.3.3", + "node_modules/@aws-sdk/credential-provider-env/node_modules/@aws-sdk/types": { + "version": "3.413.0", "license": "Apache-2.0", "dependencies": { + "@smithy/types": "^2.3.1", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/url-parser": { - "version": "2.0.9", + "node_modules/@aws-sdk/credential-provider-ini": { + "version": "3.414.0", "license": "Apache-2.0", "dependencies": { - "@smithy/querystring-parser": "^2.0.9", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/util-base64": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/util-buffer-from": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/util-body-length-browser": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/util-body-length-node": { - "version": "2.1.0", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/util-buffer-from": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/is-array-buffer": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/util-config-provider": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/util-defaults-mode-browser": { - "version": "2.0.10", - "license": "Apache-2.0", - "dependencies": { - "@smithy/property-provider": "^2.0.10", - "@smithy/smithy-client": "^2.1.6", - "@smithy/types": "^2.3.3", - "bowser": "^2.11.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">= 10.0.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/util-defaults-mode-node": { - "version": "2.0.12", - "license": "Apache-2.0", - "dependencies": { - "@smithy/config-resolver": "^2.0.10", - "@smithy/credential-provider-imds": "^2.0.12", - "@smithy/node-config-provider": "^2.0.12", - "@smithy/property-provider": "^2.0.10", - "@smithy/smithy-client": "^2.1.6", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">= 10.0.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/util-hex-encoding": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/util-middleware": { - "version": "2.0.2", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/util-retry": { - "version": "2.0.2", - "license": "Apache-2.0", - "dependencies": { - "@smithy/service-error-classification": "^2.0.2", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">= 14.0.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/util-stream": { - "version": "2.0.12", - "license": "Apache-2.0", - "dependencies": { - "@smithy/fetch-http-handler": "^2.1.5", - "@smithy/node-http-handler": "^2.1.5", - "@smithy/types": "^2.3.3", - "@smithy/util-base64": "^2.0.0", - "@smithy/util-buffer-from": "^2.0.0", - "@smithy/util-hex-encoding": "^2.0.0", - "@smithy/util-utf8": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/util-uri-escape": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/util-utf8": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/util-buffer-from": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/uuid": { - "version": "8.3.2", - "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/@aws-sdk/client-s3": { - "version": "3.370.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-crypto/sha1-browser": "3.0.0", - "@aws-crypto/sha256-browser": "3.0.0", - "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/client-sts": "3.370.0", - "@aws-sdk/credential-provider-node": "3.370.0", - "@aws-sdk/hash-blob-browser": "3.370.0", - "@aws-sdk/hash-stream-node": "3.370.0", - "@aws-sdk/md5-js": "3.370.0", - "@aws-sdk/middleware-bucket-endpoint": "3.370.0", - "@aws-sdk/middleware-expect-continue": "3.370.0", - "@aws-sdk/middleware-flexible-checksums": "3.370.0", - "@aws-sdk/middleware-host-header": "3.370.0", - "@aws-sdk/middleware-location-constraint": "3.370.0", - "@aws-sdk/middleware-logger": "3.370.0", - "@aws-sdk/middleware-recursion-detection": "3.370.0", - "@aws-sdk/middleware-sdk-s3": "3.370.0", - "@aws-sdk/middleware-signing": "3.370.0", - "@aws-sdk/middleware-ssec": "3.370.0", - "@aws-sdk/middleware-user-agent": "3.370.0", - "@aws-sdk/signature-v4-multi-region": "3.370.0", - "@aws-sdk/types": "3.370.0", - "@aws-sdk/util-endpoints": "3.370.0", - "@aws-sdk/util-user-agent-browser": "3.370.0", - "@aws-sdk/util-user-agent-node": "3.370.0", - "@aws-sdk/xml-builder": "3.310.0", - "@smithy/config-resolver": "^1.0.1", - "@smithy/eventstream-serde-browser": "^1.0.1", - "@smithy/eventstream-serde-config-resolver": "^1.0.1", - "@smithy/eventstream-serde-node": "^1.0.1", - "@smithy/fetch-http-handler": "^1.0.1", - "@smithy/hash-node": "^1.0.1", - "@smithy/invalid-dependency": "^1.0.1", - "@smithy/middleware-content-length": "^1.0.1", - "@smithy/middleware-endpoint": "^1.0.2", - "@smithy/middleware-retry": "^1.0.3", - "@smithy/middleware-serde": "^1.0.1", - "@smithy/middleware-stack": "^1.0.1", - "@smithy/node-config-provider": "^1.0.1", - "@smithy/node-http-handler": "^1.0.2", - "@smithy/protocol-http": "^1.1.0", - "@smithy/smithy-client": "^1.0.3", - "@smithy/types": "^1.1.0", - "@smithy/url-parser": "^1.0.1", - "@smithy/util-base64": "^1.0.1", - "@smithy/util-body-length-browser": "^1.0.1", - "@smithy/util-body-length-node": "^1.0.1", - "@smithy/util-defaults-mode-browser": "^1.0.1", - "@smithy/util-defaults-mode-node": "^1.0.1", - "@smithy/util-retry": "^1.0.3", - "@smithy/util-stream": "^1.0.1", - "@smithy/util-utf8": "^1.0.1", - "@smithy/util-waiter": "^1.0.1", - "fast-xml-parser": "4.2.5", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/client-sso": { - "version": "3.370.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-crypto/sha256-browser": "3.0.0", - "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/middleware-host-header": "3.370.0", - "@aws-sdk/middleware-logger": "3.370.0", - "@aws-sdk/middleware-recursion-detection": "3.370.0", - "@aws-sdk/middleware-user-agent": "3.370.0", - "@aws-sdk/types": "3.370.0", - "@aws-sdk/util-endpoints": "3.370.0", - "@aws-sdk/util-user-agent-browser": "3.370.0", - "@aws-sdk/util-user-agent-node": "3.370.0", - "@smithy/config-resolver": "^1.0.1", - "@smithy/fetch-http-handler": "^1.0.1", - "@smithy/hash-node": "^1.0.1", - "@smithy/invalid-dependency": "^1.0.1", - "@smithy/middleware-content-length": "^1.0.1", - "@smithy/middleware-endpoint": "^1.0.2", - "@smithy/middleware-retry": "^1.0.3", - "@smithy/middleware-serde": "^1.0.1", - "@smithy/middleware-stack": "^1.0.1", - "@smithy/node-config-provider": "^1.0.1", - "@smithy/node-http-handler": "^1.0.2", - "@smithy/protocol-http": "^1.1.0", - "@smithy/smithy-client": "^1.0.3", - "@smithy/types": "^1.1.0", - "@smithy/url-parser": "^1.0.1", - "@smithy/util-base64": "^1.0.1", - "@smithy/util-body-length-browser": "^1.0.1", - "@smithy/util-body-length-node": "^1.0.1", - "@smithy/util-defaults-mode-browser": "^1.0.1", - "@smithy/util-defaults-mode-node": "^1.0.1", - "@smithy/util-retry": "^1.0.3", - "@smithy/util-utf8": "^1.0.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/client-sso-oidc": { - "version": "3.370.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-crypto/sha256-browser": "3.0.0", - "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/middleware-host-header": "3.370.0", - "@aws-sdk/middleware-logger": "3.370.0", - "@aws-sdk/middleware-recursion-detection": "3.370.0", - "@aws-sdk/middleware-user-agent": "3.370.0", - "@aws-sdk/types": "3.370.0", - "@aws-sdk/util-endpoints": "3.370.0", - "@aws-sdk/util-user-agent-browser": "3.370.0", - "@aws-sdk/util-user-agent-node": "3.370.0", - "@smithy/config-resolver": "^1.0.1", - "@smithy/fetch-http-handler": "^1.0.1", - "@smithy/hash-node": "^1.0.1", - "@smithy/invalid-dependency": "^1.0.1", - "@smithy/middleware-content-length": "^1.0.1", - "@smithy/middleware-endpoint": "^1.0.2", - "@smithy/middleware-retry": "^1.0.3", - "@smithy/middleware-serde": "^1.0.1", - "@smithy/middleware-stack": "^1.0.1", - "@smithy/node-config-provider": "^1.0.1", - "@smithy/node-http-handler": "^1.0.2", - "@smithy/protocol-http": "^1.1.0", - "@smithy/smithy-client": "^1.0.3", - "@smithy/types": "^1.1.0", - "@smithy/url-parser": "^1.0.1", - "@smithy/util-base64": "^1.0.1", - "@smithy/util-body-length-browser": "^1.0.1", - "@smithy/util-body-length-node": "^1.0.1", - "@smithy/util-defaults-mode-browser": "^1.0.1", - "@smithy/util-defaults-mode-node": "^1.0.1", - "@smithy/util-retry": "^1.0.3", - "@smithy/util-utf8": "^1.0.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/client-sts": { - "version": "3.370.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-crypto/sha256-browser": "3.0.0", - "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/credential-provider-node": "3.370.0", - "@aws-sdk/middleware-host-header": "3.370.0", - "@aws-sdk/middleware-logger": "3.370.0", - "@aws-sdk/middleware-recursion-detection": "3.370.0", - "@aws-sdk/middleware-sdk-sts": "3.370.0", - "@aws-sdk/middleware-signing": "3.370.0", - "@aws-sdk/middleware-user-agent": "3.370.0", - "@aws-sdk/types": "3.370.0", - "@aws-sdk/util-endpoints": "3.370.0", - "@aws-sdk/util-user-agent-browser": "3.370.0", - "@aws-sdk/util-user-agent-node": "3.370.0", - "@smithy/config-resolver": "^1.0.1", - "@smithy/fetch-http-handler": "^1.0.1", - "@smithy/hash-node": "^1.0.1", - "@smithy/invalid-dependency": "^1.0.1", - "@smithy/middleware-content-length": "^1.0.1", - "@smithy/middleware-endpoint": "^1.0.2", - "@smithy/middleware-retry": "^1.0.3", - "@smithy/middleware-serde": "^1.0.1", - "@smithy/middleware-stack": "^1.0.1", - "@smithy/node-config-provider": "^1.0.1", - "@smithy/node-http-handler": "^1.0.2", - "@smithy/protocol-http": "^1.1.0", - "@smithy/smithy-client": "^1.0.3", - "@smithy/types": "^1.1.0", - "@smithy/url-parser": "^1.0.1", - "@smithy/util-base64": "^1.0.1", - "@smithy/util-body-length-browser": "^1.0.1", - "@smithy/util-body-length-node": "^1.0.1", - "@smithy/util-defaults-mode-browser": "^1.0.1", - "@smithy/util-defaults-mode-node": "^1.0.1", - "@smithy/util-retry": "^1.0.3", - "@smithy/util-utf8": "^1.0.1", - "fast-xml-parser": "4.2.5", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/credential-provider-env": { - "version": "3.370.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.370.0", - "@smithy/property-provider": "^1.0.1", - "@smithy/types": "^1.1.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/credential-provider-ini": { - "version": "3.370.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/credential-provider-env": "3.370.0", - "@aws-sdk/credential-provider-process": "3.370.0", - "@aws-sdk/credential-provider-sso": "3.370.0", - "@aws-sdk/credential-provider-web-identity": "3.370.0", - "@aws-sdk/types": "3.370.0", - "@smithy/credential-provider-imds": "^1.0.1", - "@smithy/property-provider": "^1.0.1", - "@smithy/shared-ini-file-loader": "^1.0.1", - "@smithy/types": "^1.1.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/credential-provider-node": { - "version": "3.370.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/credential-provider-env": "3.370.0", - "@aws-sdk/credential-provider-ini": "3.370.0", - "@aws-sdk/credential-provider-process": "3.370.0", - "@aws-sdk/credential-provider-sso": "3.370.0", - "@aws-sdk/credential-provider-web-identity": "3.370.0", - "@aws-sdk/types": "3.370.0", - "@smithy/credential-provider-imds": "^1.0.1", - "@smithy/property-provider": "^1.0.1", - "@smithy/shared-ini-file-loader": "^1.0.1", - "@smithy/types": "^1.1.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/credential-provider-process": { - "version": "3.370.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.370.0", - "@smithy/property-provider": "^1.0.1", - "@smithy/shared-ini-file-loader": "^1.0.1", - "@smithy/types": "^1.1.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/credential-provider-sso": { - "version": "3.370.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/client-sso": "3.370.0", - "@aws-sdk/token-providers": "3.370.0", - "@aws-sdk/types": "3.370.0", - "@smithy/property-provider": "^1.0.1", - "@smithy/shared-ini-file-loader": "^1.0.1", - "@smithy/types": "^1.1.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/credential-provider-web-identity": { - "version": "3.370.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.370.0", - "@smithy/property-provider": "^1.0.1", - "@smithy/types": "^1.1.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/middleware-host-header": { - "version": "3.370.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.370.0", - "@smithy/protocol-http": "^1.1.0", - "@smithy/types": "^1.1.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/middleware-logger": { - "version": "3.370.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.370.0", - "@smithy/types": "^1.1.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/middleware-recursion-detection": { - "version": "3.370.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.370.0", - "@smithy/protocol-http": "^1.1.0", - "@smithy/types": "^1.1.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/middleware-sdk-sts": { - "version": "3.370.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/middleware-signing": "3.370.0", - "@aws-sdk/types": "3.370.0", - "@smithy/types": "^1.1.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/middleware-signing": { - "version": "3.370.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.370.0", - "@smithy/property-provider": "^1.0.1", - "@smithy/protocol-http": "^1.1.0", - "@smithy/signature-v4": "^1.0.1", - "@smithy/types": "^1.1.0", - "@smithy/util-middleware": "^1.0.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/middleware-user-agent": { - "version": "3.370.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.370.0", - "@aws-sdk/util-endpoints": "3.370.0", - "@smithy/protocol-http": "^1.1.0", - "@smithy/types": "^1.1.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/token-providers": { - "version": "3.370.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/client-sso-oidc": "3.370.0", - "@aws-sdk/types": "3.370.0", - "@smithy/property-provider": "^1.0.1", - "@smithy/shared-ini-file-loader": "^1.0.1", - "@smithy/types": "^1.1.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/util-endpoints": { - "version": "3.370.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.370.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/util-user-agent-browser": { - "version": "3.370.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.370.0", - "@smithy/types": "^1.1.0", - "bowser": "^2.11.0", - "tslib": "^2.5.0" - } - }, - "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/util-user-agent-node": { - "version": "3.370.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.370.0", - "@smithy/node-config-provider": "^1.0.1", - "@smithy/types": "^1.1.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "aws-crt": ">=1.0.0" - }, - "peerDependenciesMeta": { - "aws-crt": { - "optional": true - } - } - }, - "node_modules/@aws-sdk/client-sso": { - "version": "3.414.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-crypto/sha256-browser": "3.0.0", - "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/middleware-host-header": "3.413.0", - "@aws-sdk/middleware-logger": "3.413.0", - "@aws-sdk/middleware-recursion-detection": "3.413.0", - "@aws-sdk/middleware-user-agent": "3.413.0", - "@aws-sdk/region-config-resolver": "3.413.0", - "@aws-sdk/types": "3.413.0", - "@aws-sdk/util-endpoints": "3.413.0", - "@aws-sdk/util-user-agent-browser": "3.413.0", - "@aws-sdk/util-user-agent-node": "3.413.0", - "@smithy/config-resolver": "^2.0.8", - "@smithy/fetch-http-handler": "^2.1.3", - "@smithy/hash-node": "^2.0.7", - "@smithy/invalid-dependency": "^2.0.7", - "@smithy/middleware-content-length": "^2.0.9", - "@smithy/middleware-endpoint": "^2.0.7", - "@smithy/middleware-retry": "^2.0.10", - "@smithy/middleware-serde": "^2.0.7", - "@smithy/middleware-stack": "^2.0.0", - "@smithy/node-config-provider": "^2.0.10", - "@smithy/node-http-handler": "^2.1.3", - "@smithy/protocol-http": "^3.0.3", - "@smithy/smithy-client": "^2.1.4", - "@smithy/types": "^2.3.1", - "@smithy/url-parser": "^2.0.7", - "@smithy/util-base64": "^2.0.0", - "@smithy/util-body-length-browser": "^2.0.0", - "@smithy/util-body-length-node": "^2.1.0", - "@smithy/util-defaults-mode-browser": "^2.0.8", - "@smithy/util-defaults-mode-node": "^2.0.10", - "@smithy/util-retry": "^2.0.0", - "@smithy/util-utf8": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@aws-sdk/types": { - "version": "3.413.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/abort-controller": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/config-resolver": { - "version": "2.0.10", - "license": "Apache-2.0", - "dependencies": { - "@smithy/node-config-provider": "^2.0.12", - "@smithy/types": "^2.3.3", - "@smithy/util-config-provider": "^2.0.0", - "@smithy/util-middleware": "^2.0.2", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/credential-provider-imds": { - "version": "2.0.12", - "license": "Apache-2.0", - "dependencies": { - "@smithy/node-config-provider": "^2.0.12", - "@smithy/property-provider": "^2.0.10", - "@smithy/types": "^2.3.3", - "@smithy/url-parser": "^2.0.9", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/fetch-http-handler": { - "version": "2.1.5", - "license": "Apache-2.0", - "dependencies": { - "@smithy/protocol-http": "^3.0.5", - "@smithy/querystring-builder": "^2.0.9", - "@smithy/types": "^2.3.3", - "@smithy/util-base64": "^2.0.0", - "tslib": "^2.5.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/hash-node": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "@smithy/util-buffer-from": "^2.0.0", - "@smithy/util-utf8": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/invalid-dependency": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/is-array-buffer": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/middleware-content-length": { - "version": "2.0.11", - "license": "Apache-2.0", - "dependencies": { - "@smithy/protocol-http": "^3.0.5", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/middleware-endpoint": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/middleware-serde": "^2.0.9", - "@smithy/types": "^2.3.3", - "@smithy/url-parser": "^2.0.9", - "@smithy/util-middleware": "^2.0.2", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/middleware-retry": { - "version": "2.0.12", - "license": "Apache-2.0", - "dependencies": { - "@smithy/node-config-provider": "^2.0.12", - "@smithy/protocol-http": "^3.0.5", - "@smithy/service-error-classification": "^2.0.2", - "@smithy/types": "^2.3.3", - "@smithy/util-middleware": "^2.0.2", - "@smithy/util-retry": "^2.0.2", - "tslib": "^2.5.0", - "uuid": "^8.3.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/middleware-serde": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/middleware-stack": { - "version": "2.0.2", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/node-config-provider": { - "version": "2.0.12", - "license": "Apache-2.0", - "dependencies": { - "@smithy/property-provider": "^2.0.10", - "@smithy/shared-ini-file-loader": "^2.0.11", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/node-http-handler": { - "version": "2.1.5", - "license": "Apache-2.0", - "dependencies": { - "@smithy/abort-controller": "^2.0.9", - "@smithy/protocol-http": "^3.0.5", - "@smithy/querystring-builder": "^2.0.9", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/property-provider": { - "version": "2.0.10", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/protocol-http": { - "version": "3.0.5", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/querystring-builder": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "@smithy/util-uri-escape": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/querystring-parser": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/service-error-classification": { - "version": "2.0.2", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/shared-ini-file-loader": { - "version": "2.0.11", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/smithy-client": { - "version": "2.1.6", - "license": "Apache-2.0", - "dependencies": { - "@smithy/middleware-stack": "^2.0.2", - "@smithy/types": "^2.3.3", - "@smithy/util-stream": "^2.0.12", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/types": { - "version": "2.3.3", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/url-parser": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/querystring-parser": "^2.0.9", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/util-base64": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/util-buffer-from": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/util-body-length-browser": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/util-body-length-node": { - "version": "2.1.0", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/util-buffer-from": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/is-array-buffer": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/util-config-provider": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/util-defaults-mode-browser": { - "version": "2.0.10", - "license": "Apache-2.0", - "dependencies": { - "@smithy/property-provider": "^2.0.10", - "@smithy/smithy-client": "^2.1.6", - "@smithy/types": "^2.3.3", - "bowser": "^2.11.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">= 10.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/util-defaults-mode-node": { - "version": "2.0.12", - "license": "Apache-2.0", - "dependencies": { - "@smithy/config-resolver": "^2.0.10", - "@smithy/credential-provider-imds": "^2.0.12", - "@smithy/node-config-provider": "^2.0.12", - "@smithy/property-provider": "^2.0.10", - "@smithy/smithy-client": "^2.1.6", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">= 10.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/util-hex-encoding": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/util-middleware": { - "version": "2.0.2", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/util-retry": { - "version": "2.0.2", - "license": "Apache-2.0", - "dependencies": { - "@smithy/service-error-classification": "^2.0.2", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">= 14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/util-stream": { - "version": "2.0.12", - "license": "Apache-2.0", - "dependencies": { - "@smithy/fetch-http-handler": "^2.1.5", - "@smithy/node-http-handler": "^2.1.5", - "@smithy/types": "^2.3.3", - "@smithy/util-base64": "^2.0.0", - "@smithy/util-buffer-from": "^2.0.0", - "@smithy/util-hex-encoding": "^2.0.0", - "@smithy/util-utf8": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/util-uri-escape": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/util-utf8": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/util-buffer-from": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/uuid": { - "version": "8.3.2", - "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/@aws-sdk/client-sts": { - "version": "3.414.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-crypto/sha256-browser": "3.0.0", - "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/credential-provider-node": "3.414.0", - "@aws-sdk/middleware-host-header": "3.413.0", - "@aws-sdk/middleware-logger": "3.413.0", - "@aws-sdk/middleware-recursion-detection": "3.413.0", - "@aws-sdk/middleware-sdk-sts": "3.413.0", - "@aws-sdk/middleware-signing": "3.413.0", - "@aws-sdk/middleware-user-agent": "3.413.0", - "@aws-sdk/region-config-resolver": "3.413.0", - "@aws-sdk/types": "3.413.0", - "@aws-sdk/util-endpoints": "3.413.0", - "@aws-sdk/util-user-agent-browser": "3.413.0", - "@aws-sdk/util-user-agent-node": "3.413.0", - "@smithy/config-resolver": "^2.0.8", - "@smithy/fetch-http-handler": "^2.1.3", - "@smithy/hash-node": "^2.0.7", - "@smithy/invalid-dependency": "^2.0.7", - "@smithy/middleware-content-length": "^2.0.9", - "@smithy/middleware-endpoint": "^2.0.7", - "@smithy/middleware-retry": "^2.0.10", - "@smithy/middleware-serde": "^2.0.7", - "@smithy/middleware-stack": "^2.0.0", - "@smithy/node-config-provider": "^2.0.10", - "@smithy/node-http-handler": "^2.1.3", - "@smithy/protocol-http": "^3.0.3", - "@smithy/smithy-client": "^2.1.4", - "@smithy/types": "^2.3.1", - "@smithy/url-parser": "^2.0.7", - "@smithy/util-base64": "^2.0.0", - "@smithy/util-body-length-browser": "^2.0.0", - "@smithy/util-body-length-node": "^2.1.0", - "@smithy/util-defaults-mode-browser": "^2.0.8", - "@smithy/util-defaults-mode-node": "^2.0.10", - "@smithy/util-retry": "^2.0.0", - "@smithy/util-utf8": "^2.0.0", - "fast-xml-parser": "4.2.5", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@aws-sdk/types": { - "version": "3.413.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/abort-controller": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/config-resolver": { - "version": "2.0.10", - "license": "Apache-2.0", - "dependencies": { - "@smithy/node-config-provider": "^2.0.12", - "@smithy/types": "^2.3.3", - "@smithy/util-config-provider": "^2.0.0", - "@smithy/util-middleware": "^2.0.2", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/credential-provider-imds": { - "version": "2.0.12", - "license": "Apache-2.0", - "dependencies": { - "@smithy/node-config-provider": "^2.0.12", - "@smithy/property-provider": "^2.0.10", - "@smithy/types": "^2.3.3", - "@smithy/url-parser": "^2.0.9", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/fetch-http-handler": { - "version": "2.1.5", - "license": "Apache-2.0", - "dependencies": { - "@smithy/protocol-http": "^3.0.5", - "@smithy/querystring-builder": "^2.0.9", - "@smithy/types": "^2.3.3", - "@smithy/util-base64": "^2.0.0", - "tslib": "^2.5.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/hash-node": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "@smithy/util-buffer-from": "^2.0.0", - "@smithy/util-utf8": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/invalid-dependency": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/is-array-buffer": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/middleware-content-length": { - "version": "2.0.11", - "license": "Apache-2.0", - "dependencies": { - "@smithy/protocol-http": "^3.0.5", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/middleware-endpoint": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/middleware-serde": "^2.0.9", - "@smithy/types": "^2.3.3", - "@smithy/url-parser": "^2.0.9", - "@smithy/util-middleware": "^2.0.2", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/middleware-retry": { - "version": "2.0.12", - "license": "Apache-2.0", - "dependencies": { - "@smithy/node-config-provider": "^2.0.12", - "@smithy/protocol-http": "^3.0.5", - "@smithy/service-error-classification": "^2.0.2", - "@smithy/types": "^2.3.3", - "@smithy/util-middleware": "^2.0.2", - "@smithy/util-retry": "^2.0.2", - "tslib": "^2.5.0", - "uuid": "^8.3.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/middleware-serde": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/middleware-stack": { - "version": "2.0.2", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/node-config-provider": { - "version": "2.0.12", - "license": "Apache-2.0", - "dependencies": { - "@smithy/property-provider": "^2.0.10", - "@smithy/shared-ini-file-loader": "^2.0.11", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/node-http-handler": { - "version": "2.1.5", - "license": "Apache-2.0", - "dependencies": { - "@smithy/abort-controller": "^2.0.9", - "@smithy/protocol-http": "^3.0.5", - "@smithy/querystring-builder": "^2.0.9", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/property-provider": { - "version": "2.0.10", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/protocol-http": { - "version": "3.0.5", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/querystring-builder": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "@smithy/util-uri-escape": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/querystring-parser": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/service-error-classification": { - "version": "2.0.2", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/shared-ini-file-loader": { - "version": "2.0.11", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/smithy-client": { - "version": "2.1.6", - "license": "Apache-2.0", - "dependencies": { - "@smithy/middleware-stack": "^2.0.2", - "@smithy/types": "^2.3.3", - "@smithy/util-stream": "^2.0.12", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/types": { - "version": "2.3.3", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/url-parser": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/querystring-parser": "^2.0.9", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/util-base64": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/util-buffer-from": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/util-body-length-browser": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/util-body-length-node": { - "version": "2.1.0", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/util-buffer-from": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/is-array-buffer": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/util-config-provider": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/util-defaults-mode-browser": { - "version": "2.0.10", - "license": "Apache-2.0", - "dependencies": { - "@smithy/property-provider": "^2.0.10", - "@smithy/smithy-client": "^2.1.6", - "@smithy/types": "^2.3.3", - "bowser": "^2.11.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">= 10.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/util-defaults-mode-node": { - "version": "2.0.12", - "license": "Apache-2.0", - "dependencies": { - "@smithy/config-resolver": "^2.0.10", - "@smithy/credential-provider-imds": "^2.0.12", - "@smithy/node-config-provider": "^2.0.12", - "@smithy/property-provider": "^2.0.10", - "@smithy/smithy-client": "^2.1.6", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">= 10.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/util-hex-encoding": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/util-middleware": { - "version": "2.0.2", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/util-retry": { - "version": "2.0.2", - "license": "Apache-2.0", - "dependencies": { - "@smithy/service-error-classification": "^2.0.2", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">= 14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/util-stream": { - "version": "2.0.12", - "license": "Apache-2.0", - "dependencies": { - "@smithy/fetch-http-handler": "^2.1.5", - "@smithy/node-http-handler": "^2.1.5", - "@smithy/types": "^2.3.3", - "@smithy/util-base64": "^2.0.0", - "@smithy/util-buffer-from": "^2.0.0", - "@smithy/util-hex-encoding": "^2.0.0", - "@smithy/util-utf8": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/util-uri-escape": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/util-utf8": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/util-buffer-from": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/uuid": { - "version": "8.3.2", - "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/@aws-sdk/credential-provider-cognito-identity": { - "version": "3.414.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/client-cognito-identity": "3.414.0", - "@aws-sdk/types": "3.413.0", - "@smithy/property-provider": "^2.0.0", - "@smithy/types": "^2.3.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-cognito-identity/node_modules/@aws-sdk/types": { - "version": "3.413.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-cognito-identity/node_modules/@smithy/property-provider": { - "version": "2.0.10", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-cognito-identity/node_modules/@smithy/types": { - "version": "2.3.3", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-env": { - "version": "3.413.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.413.0", - "@smithy/property-provider": "^2.0.0", - "@smithy/types": "^2.3.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-env/node_modules/@aws-sdk/types": { - "version": "3.413.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-env/node_modules/@smithy/property-provider": { - "version": "2.0.10", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-env/node_modules/@smithy/types": { - "version": "2.3.3", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-ini": { - "version": "3.414.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/credential-provider-env": "3.413.0", - "@aws-sdk/credential-provider-process": "3.413.0", - "@aws-sdk/credential-provider-sso": "3.414.0", - "@aws-sdk/credential-provider-web-identity": "3.413.0", - "@aws-sdk/types": "3.413.0", - "@smithy/credential-provider-imds": "^2.0.0", - "@smithy/property-provider": "^2.0.0", - "@smithy/shared-ini-file-loader": "^2.0.6", - "@smithy/types": "^2.3.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-ini/node_modules/@aws-sdk/types": { - "version": "3.413.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-ini/node_modules/@smithy/credential-provider-imds": { - "version": "2.0.12", - "license": "Apache-2.0", - "dependencies": { - "@smithy/node-config-provider": "^2.0.12", - "@smithy/property-provider": "^2.0.10", - "@smithy/types": "^2.3.3", - "@smithy/url-parser": "^2.0.9", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-ini/node_modules/@smithy/node-config-provider": { - "version": "2.0.12", - "license": "Apache-2.0", - "dependencies": { - "@smithy/property-provider": "^2.0.10", - "@smithy/shared-ini-file-loader": "^2.0.11", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-ini/node_modules/@smithy/property-provider": { - "version": "2.0.10", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-ini/node_modules/@smithy/querystring-parser": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-ini/node_modules/@smithy/shared-ini-file-loader": { - "version": "2.0.11", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-ini/node_modules/@smithy/types": { - "version": "2.3.3", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-ini/node_modules/@smithy/url-parser": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/querystring-parser": "^2.0.9", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - } - }, - "node_modules/@aws-sdk/credential-provider-node": { - "version": "3.414.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/credential-provider-env": "3.413.0", - "@aws-sdk/credential-provider-ini": "3.414.0", - "@aws-sdk/credential-provider-process": "3.413.0", - "@aws-sdk/credential-provider-sso": "3.414.0", - "@aws-sdk/credential-provider-web-identity": "3.413.0", - "@aws-sdk/types": "3.413.0", - "@smithy/credential-provider-imds": "^2.0.0", - "@smithy/property-provider": "^2.0.0", - "@smithy/shared-ini-file-loader": "^2.0.6", - "@smithy/types": "^2.3.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/types": { - "version": "3.413.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/credential-provider-imds": { - "version": "2.0.12", - "license": "Apache-2.0", - "dependencies": { - "@smithy/node-config-provider": "^2.0.12", - "@smithy/property-provider": "^2.0.10", - "@smithy/types": "^2.3.3", - "@smithy/url-parser": "^2.0.9", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/node-config-provider": { - "version": "2.0.12", - "license": "Apache-2.0", - "dependencies": { - "@smithy/property-provider": "^2.0.10", - "@smithy/shared-ini-file-loader": "^2.0.11", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/property-provider": { - "version": "2.0.10", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/querystring-parser": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/shared-ini-file-loader": { - "version": "2.0.11", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/types": { - "version": "2.3.3", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/url-parser": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/querystring-parser": "^2.0.9", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - } - }, - "node_modules/@aws-sdk/credential-provider-process": { - "version": "3.413.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.413.0", - "@smithy/property-provider": "^2.0.0", - "@smithy/shared-ini-file-loader": "^2.0.6", - "@smithy/types": "^2.3.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-process/node_modules/@aws-sdk/types": { - "version": "3.413.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-process/node_modules/@smithy/property-provider": { - "version": "2.0.10", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-process/node_modules/@smithy/shared-ini-file-loader": { - "version": "2.0.11", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-process/node_modules/@smithy/types": { - "version": "2.3.3", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-sso": { - "version": "3.414.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/client-sso": "3.414.0", - "@aws-sdk/token-providers": "3.413.0", - "@aws-sdk/types": "3.413.0", - "@smithy/property-provider": "^2.0.0", - "@smithy/shared-ini-file-loader": "^2.0.6", - "@smithy/types": "^2.3.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/types": { - "version": "3.413.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-sso/node_modules/@smithy/property-provider": { - "version": "2.0.10", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-sso/node_modules/@smithy/shared-ini-file-loader": { - "version": "2.0.11", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-sso/node_modules/@smithy/types": { - "version": "2.3.3", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-web-identity": { - "version": "3.413.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.413.0", - "@smithy/property-provider": "^2.0.0", - "@smithy/types": "^2.3.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-web-identity/node_modules/@aws-sdk/types": { - "version": "3.413.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-web-identity/node_modules/@smithy/property-provider": { - "version": "2.0.10", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-web-identity/node_modules/@smithy/types": { - "version": "2.3.3", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-providers": { - "version": "3.414.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/client-cognito-identity": "3.414.0", - "@aws-sdk/client-sso": "3.414.0", - "@aws-sdk/client-sts": "3.414.0", - "@aws-sdk/credential-provider-cognito-identity": "3.414.0", - "@aws-sdk/credential-provider-env": "3.413.0", - "@aws-sdk/credential-provider-ini": "3.414.0", - "@aws-sdk/credential-provider-node": "3.414.0", - "@aws-sdk/credential-provider-process": "3.413.0", - "@aws-sdk/credential-provider-sso": "3.414.0", - "@aws-sdk/credential-provider-web-identity": "3.413.0", - "@aws-sdk/types": "3.413.0", - "@smithy/credential-provider-imds": "^2.0.0", - "@smithy/property-provider": "^2.0.0", - "@smithy/types": "^2.3.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-providers/node_modules/@aws-sdk/types": { - "version": "3.413.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-providers/node_modules/@smithy/credential-provider-imds": { - "version": "2.0.12", - "license": "Apache-2.0", - "dependencies": { - "@smithy/node-config-provider": "^2.0.12", - "@smithy/property-provider": "^2.0.10", - "@smithy/types": "^2.3.3", - "@smithy/url-parser": "^2.0.9", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-providers/node_modules/@smithy/node-config-provider": { - "version": "2.0.12", - "license": "Apache-2.0", - "dependencies": { - "@smithy/property-provider": "^2.0.10", - "@smithy/shared-ini-file-loader": "^2.0.11", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-providers/node_modules/@smithy/property-provider": { - "version": "2.0.10", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-providers/node_modules/@smithy/querystring-parser": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-providers/node_modules/@smithy/shared-ini-file-loader": { - "version": "2.0.11", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-providers/node_modules/@smithy/types": { - "version": "2.3.3", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-providers/node_modules/@smithy/url-parser": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/querystring-parser": "^2.0.9", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - } - }, - "node_modules/@aws-sdk/hash-blob-browser": { - "version": "3.370.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/chunked-blob-reader": "3.310.0", - "@aws-sdk/chunked-blob-reader-native": "3.310.0", - "@aws-sdk/types": "3.370.0", - "tslib": "^2.5.0" - } - }, - "node_modules/@aws-sdk/hash-stream-node": { - "version": "3.370.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.370.0", - "@aws-sdk/util-utf8": "3.310.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/is-array-buffer": { - "version": "3.310.0", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/lib-storage": { - "version": "3.417.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/abort-controller": "^2.0.1", - "@smithy/middleware-endpoint": "^2.0.7", - "@smithy/smithy-client": "^2.1.4", - "buffer": "5.6.0", - "events": "3.3.0", - "stream-browserify": "3.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "@aws-sdk/client-s3": "^3.0.0" - } - }, - "node_modules/@aws-sdk/lib-storage/node_modules/@smithy/abort-controller": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/lib-storage/node_modules/@smithy/fetch-http-handler": { - "version": "2.1.5", - "license": "Apache-2.0", - "dependencies": { - "@smithy/protocol-http": "^3.0.5", - "@smithy/querystring-builder": "^2.0.9", - "@smithy/types": "^2.3.3", - "@smithy/util-base64": "^2.0.0", - "tslib": "^2.5.0" - } - }, - "node_modules/@aws-sdk/lib-storage/node_modules/@smithy/is-array-buffer": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/lib-storage/node_modules/@smithy/middleware-endpoint": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/middleware-serde": "^2.0.9", - "@smithy/types": "^2.3.3", - "@smithy/url-parser": "^2.0.9", - "@smithy/util-middleware": "^2.0.2", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/lib-storage/node_modules/@smithy/middleware-serde": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/lib-storage/node_modules/@smithy/middleware-stack": { - "version": "2.0.2", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/lib-storage/node_modules/@smithy/node-http-handler": { - "version": "2.1.5", - "license": "Apache-2.0", - "dependencies": { - "@smithy/abort-controller": "^2.0.9", - "@smithy/protocol-http": "^3.0.5", - "@smithy/querystring-builder": "^2.0.9", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/lib-storage/node_modules/@smithy/protocol-http": { - "version": "3.0.5", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/lib-storage/node_modules/@smithy/querystring-builder": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "@smithy/util-uri-escape": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/lib-storage/node_modules/@smithy/querystring-parser": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/lib-storage/node_modules/@smithy/smithy-client": { - "version": "2.1.6", - "license": "Apache-2.0", - "dependencies": { - "@smithy/middleware-stack": "^2.0.2", - "@smithy/types": "^2.3.3", - "@smithy/util-stream": "^2.0.12", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/lib-storage/node_modules/@smithy/types": { - "version": "2.3.3", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/lib-storage/node_modules/@smithy/url-parser": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/querystring-parser": "^2.0.9", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - } - }, - "node_modules/@aws-sdk/lib-storage/node_modules/@smithy/util-base64": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/util-buffer-from": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/lib-storage/node_modules/@smithy/util-buffer-from": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/is-array-buffer": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/lib-storage/node_modules/@smithy/util-hex-encoding": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/lib-storage/node_modules/@smithy/util-middleware": { - "version": "2.0.2", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/lib-storage/node_modules/@smithy/util-stream": { - "version": "2.0.12", - "license": "Apache-2.0", - "dependencies": { - "@smithy/fetch-http-handler": "^2.1.5", - "@smithy/node-http-handler": "^2.1.5", - "@smithy/types": "^2.3.3", - "@smithy/util-base64": "^2.0.0", - "@smithy/util-buffer-from": "^2.0.0", - "@smithy/util-hex-encoding": "^2.0.0", - "@smithy/util-utf8": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/lib-storage/node_modules/@smithy/util-uri-escape": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/lib-storage/node_modules/@smithy/util-utf8": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/util-buffer-from": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/md5-js": { - "version": "3.370.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.370.0", - "@aws-sdk/util-utf8": "3.310.0", - "tslib": "^2.5.0" - } - }, - "node_modules/@aws-sdk/middleware-bucket-endpoint": { - "version": "3.370.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.370.0", - "@aws-sdk/util-arn-parser": "3.310.0", - "@smithy/protocol-http": "^1.1.0", - "@smithy/types": "^1.1.0", - "@smithy/util-config-provider": "^1.0.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-expect-continue": { - "version": "3.370.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.370.0", - "@smithy/protocol-http": "^1.1.0", - "@smithy/types": "^1.1.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-flexible-checksums": { - "version": "3.370.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-crypto/crc32": "3.0.0", - "@aws-crypto/crc32c": "3.0.0", - "@aws-sdk/types": "3.370.0", - "@smithy/is-array-buffer": "^1.0.1", - "@smithy/protocol-http": "^1.1.0", - "@smithy/types": "^1.1.0", - "@smithy/util-utf8": "^1.0.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-host-header": { - "version": "3.413.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.413.0", - "@smithy/protocol-http": "^3.0.3", - "@smithy/types": "^2.3.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-host-header/node_modules/@aws-sdk/types": { - "version": "3.413.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-host-header/node_modules/@smithy/protocol-http": { - "version": "3.0.5", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-host-header/node_modules/@smithy/types": { - "version": "2.3.3", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-location-constraint": { - "version": "3.370.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.370.0", - "@smithy/types": "^1.1.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-logger": { - "version": "3.413.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.413.0", - "@smithy/types": "^2.3.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-logger/node_modules/@aws-sdk/types": { - "version": "3.413.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-logger/node_modules/@smithy/types": { - "version": "2.3.3", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-recursion-detection": { - "version": "3.413.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.413.0", - "@smithy/protocol-http": "^3.0.3", - "@smithy/types": "^2.3.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-recursion-detection/node_modules/@aws-sdk/types": { - "version": "3.413.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-recursion-detection/node_modules/@smithy/protocol-http": { - "version": "3.0.5", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-recursion-detection/node_modules/@smithy/types": { - "version": "2.3.3", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-sdk-s3": { - "version": "3.370.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.370.0", - "@aws-sdk/util-arn-parser": "3.310.0", - "@smithy/protocol-http": "^1.1.0", - "@smithy/types": "^1.1.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-sdk-sts": { - "version": "3.413.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/middleware-signing": "3.413.0", - "@aws-sdk/types": "3.413.0", - "@smithy/types": "^2.3.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-sdk-sts/node_modules/@aws-sdk/types": { - "version": "3.413.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-sdk-sts/node_modules/@smithy/types": { - "version": "2.3.3", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-signing": { - "version": "3.413.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.413.0", - "@smithy/property-provider": "^2.0.0", - "@smithy/protocol-http": "^3.0.3", - "@smithy/signature-v4": "^2.0.0", - "@smithy/types": "^2.3.1", - "@smithy/util-middleware": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-signing/node_modules/@aws-sdk/types": { - "version": "3.413.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-signing/node_modules/@smithy/eventstream-codec": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@aws-crypto/crc32": "3.0.0", - "@smithy/types": "^2.3.3", - "@smithy/util-hex-encoding": "^2.0.0", - "tslib": "^2.5.0" - } - }, - "node_modules/@aws-sdk/middleware-signing/node_modules/@smithy/is-array-buffer": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-signing/node_modules/@smithy/property-provider": { - "version": "2.0.10", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-signing/node_modules/@smithy/protocol-http": { - "version": "3.0.5", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-signing/node_modules/@smithy/signature-v4": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/eventstream-codec": "^2.0.9", - "@smithy/is-array-buffer": "^2.0.0", - "@smithy/types": "^2.3.3", - "@smithy/util-hex-encoding": "^2.0.0", - "@smithy/util-middleware": "^2.0.2", - "@smithy/util-uri-escape": "^2.0.0", - "@smithy/util-utf8": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-signing/node_modules/@smithy/types": { - "version": "2.3.3", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-signing/node_modules/@smithy/util-buffer-from": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/is-array-buffer": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-signing/node_modules/@smithy/util-hex-encoding": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-signing/node_modules/@smithy/util-middleware": { - "version": "2.0.2", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-signing/node_modules/@smithy/util-uri-escape": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-signing/node_modules/@smithy/util-utf8": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/util-buffer-from": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-ssec": { - "version": "3.370.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.370.0", - "@smithy/types": "^1.1.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-user-agent": { - "version": "3.413.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.413.0", - "@aws-sdk/util-endpoints": "3.413.0", - "@smithy/protocol-http": "^3.0.3", - "@smithy/types": "^2.3.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-user-agent/node_modules/@aws-sdk/types": { - "version": "3.413.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/protocol-http": { - "version": "3.0.5", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/types": { - "version": "2.3.3", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/region-config-resolver": { - "version": "3.413.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/node-config-provider": "^2.0.10", - "@smithy/types": "^2.3.1", - "@smithy/util-config-provider": "^2.0.0", - "@smithy/util-middleware": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/region-config-resolver/node_modules/@smithy/node-config-provider": { - "version": "2.0.12", - "license": "Apache-2.0", - "dependencies": { - "@smithy/property-provider": "^2.0.10", - "@smithy/shared-ini-file-loader": "^2.0.11", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/region-config-resolver/node_modules/@smithy/property-provider": { - "version": "2.0.10", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/region-config-resolver/node_modules/@smithy/shared-ini-file-loader": { - "version": "2.0.11", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/region-config-resolver/node_modules/@smithy/types": { - "version": "2.3.3", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/region-config-resolver/node_modules/@smithy/util-config-provider": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/region-config-resolver/node_modules/@smithy/util-middleware": { - "version": "2.0.2", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/signature-v4-multi-region": { - "version": "3.370.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.370.0", - "@smithy/protocol-http": "^1.1.0", - "@smithy/signature-v4": "^1.0.1", - "@smithy/types": "^1.1.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "@aws-sdk/signature-v4-crt": "^3.118.0" - }, - "peerDependenciesMeta": { - "@aws-sdk/signature-v4-crt": { - "optional": true - } - } - }, - "node_modules/@aws-sdk/token-providers": { - "version": "3.413.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-crypto/sha256-browser": "3.0.0", - "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/middleware-host-header": "3.413.0", - "@aws-sdk/middleware-logger": "3.413.0", - "@aws-sdk/middleware-recursion-detection": "3.413.0", - "@aws-sdk/middleware-user-agent": "3.413.0", + "@aws-sdk/credential-provider-env": "3.413.0", + "@aws-sdk/credential-provider-process": "3.413.0", + "@aws-sdk/credential-provider-sso": "3.414.0", + "@aws-sdk/credential-provider-web-identity": "3.413.0", "@aws-sdk/types": "3.413.0", - "@aws-sdk/util-endpoints": "3.413.0", - "@aws-sdk/util-user-agent-browser": "3.413.0", - "@aws-sdk/util-user-agent-node": "3.413.0", - "@smithy/config-resolver": "^2.0.8", - "@smithy/fetch-http-handler": "^2.1.3", - "@smithy/hash-node": "^2.0.7", - "@smithy/invalid-dependency": "^2.0.7", - "@smithy/middleware-content-length": "^2.0.9", - "@smithy/middleware-endpoint": "^2.0.7", - "@smithy/middleware-retry": "^2.0.10", - "@smithy/middleware-serde": "^2.0.7", - "@smithy/middleware-stack": "^2.0.0", - "@smithy/node-config-provider": "^2.0.10", - "@smithy/node-http-handler": "^2.1.3", + "@smithy/credential-provider-imds": "^2.0.0", "@smithy/property-provider": "^2.0.0", - "@smithy/protocol-http": "^3.0.3", "@smithy/shared-ini-file-loader": "^2.0.6", - "@smithy/smithy-client": "^2.1.4", - "@smithy/types": "^2.3.1", - "@smithy/url-parser": "^2.0.7", - "@smithy/util-base64": "^2.0.0", - "@smithy/util-body-length-browser": "^2.0.0", - "@smithy/util-body-length-node": "^2.1.0", - "@smithy/util-defaults-mode-browser": "^2.0.8", - "@smithy/util-defaults-mode-node": "^2.0.10", - "@smithy/util-retry": "^2.0.0", - "@smithy/util-utf8": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/token-providers/node_modules/@aws-sdk/types": { - "version": "3.413.0", - "license": "Apache-2.0", - "dependencies": { "@smithy/types": "^2.3.1", "tslib": "^2.5.0" }, @@ -4155,439 +1076,506 @@ "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/abort-controller": { - "version": "2.0.9", + "node_modules/@aws-sdk/credential-provider-ini/node_modules/@aws-sdk/types": { + "version": "3.413.0", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^2.3.3", + "@smithy/types": "^2.3.1", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/config-resolver": { - "version": "2.0.10", + "node_modules/@aws-sdk/credential-provider-node": { + "version": "3.414.0", "license": "Apache-2.0", "dependencies": { - "@smithy/node-config-provider": "^2.0.12", - "@smithy/types": "^2.3.3", - "@smithy/util-config-provider": "^2.0.0", - "@smithy/util-middleware": "^2.0.2", + "@aws-sdk/credential-provider-env": "3.413.0", + "@aws-sdk/credential-provider-ini": "3.414.0", + "@aws-sdk/credential-provider-process": "3.413.0", + "@aws-sdk/credential-provider-sso": "3.414.0", + "@aws-sdk/credential-provider-web-identity": "3.413.0", + "@aws-sdk/types": "3.413.0", + "@smithy/credential-provider-imds": "^2.0.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/types": "^2.3.1", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/credential-provider-imds": { - "version": "2.0.12", + "node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/types": { + "version": "3.413.0", "license": "Apache-2.0", "dependencies": { - "@smithy/node-config-provider": "^2.0.12", - "@smithy/property-provider": "^2.0.10", - "@smithy/types": "^2.3.3", - "@smithy/url-parser": "^2.0.9", + "@smithy/types": "^2.3.1", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/fetch-http-handler": { - "version": "2.1.5", - "license": "Apache-2.0", - "dependencies": { - "@smithy/protocol-http": "^3.0.5", - "@smithy/querystring-builder": "^2.0.9", - "@smithy/types": "^2.3.3", - "@smithy/util-base64": "^2.0.0", - "tslib": "^2.5.0" - } - }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/hash-node": { - "version": "2.0.9", + "node_modules/@aws-sdk/credential-provider-process": { + "version": "3.413.0", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^2.3.3", - "@smithy/util-buffer-from": "^2.0.0", - "@smithy/util-utf8": "^2.0.0", + "@aws-sdk/types": "3.413.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/types": "^2.3.1", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/invalid-dependency": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - } - }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/is-array-buffer": { - "version": "2.0.0", + "node_modules/@aws-sdk/credential-provider-process/node_modules/@aws-sdk/types": { + "version": "3.413.0", "license": "Apache-2.0", "dependencies": { + "@smithy/types": "^2.3.1", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/middleware-content-length": { - "version": "2.0.11", + "node_modules/@aws-sdk/credential-provider-sso": { + "version": "3.414.0", "license": "Apache-2.0", "dependencies": { - "@smithy/protocol-http": "^3.0.5", - "@smithy/types": "^2.3.3", + "@aws-sdk/client-sso": "3.414.0", + "@aws-sdk/token-providers": "3.413.0", + "@aws-sdk/types": "3.413.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/types": "^2.3.1", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/middleware-endpoint": { - "version": "2.0.9", + "node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/types": { + "version": "3.413.0", "license": "Apache-2.0", "dependencies": { - "@smithy/middleware-serde": "^2.0.9", - "@smithy/types": "^2.3.3", - "@smithy/url-parser": "^2.0.9", - "@smithy/util-middleware": "^2.0.2", + "@smithy/types": "^2.3.1", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/middleware-retry": { - "version": "2.0.12", + "node_modules/@aws-sdk/credential-provider-web-identity": { + "version": "3.413.0", "license": "Apache-2.0", "dependencies": { - "@smithy/node-config-provider": "^2.0.12", - "@smithy/protocol-http": "^3.0.5", - "@smithy/service-error-classification": "^2.0.2", - "@smithy/types": "^2.3.3", - "@smithy/util-middleware": "^2.0.2", - "@smithy/util-retry": "^2.0.2", - "tslib": "^2.5.0", - "uuid": "^8.3.2" + "@aws-sdk/types": "3.413.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/types": "^2.3.1", + "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/middleware-serde": { - "version": "2.0.9", + "node_modules/@aws-sdk/credential-provider-web-identity/node_modules/@aws-sdk/types": { + "version": "3.413.0", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^2.3.3", + "@smithy/types": "^2.3.1", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/middleware-stack": { - "version": "2.0.2", + "node_modules/@aws-sdk/credential-providers": { + "version": "3.414.0", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^2.3.3", + "@aws-sdk/client-cognito-identity": "3.414.0", + "@aws-sdk/client-sso": "3.414.0", + "@aws-sdk/client-sts": "3.414.0", + "@aws-sdk/credential-provider-cognito-identity": "3.414.0", + "@aws-sdk/credential-provider-env": "3.413.0", + "@aws-sdk/credential-provider-ini": "3.414.0", + "@aws-sdk/credential-provider-node": "3.414.0", + "@aws-sdk/credential-provider-process": "3.413.0", + "@aws-sdk/credential-provider-sso": "3.414.0", + "@aws-sdk/credential-provider-web-identity": "3.413.0", + "@aws-sdk/types": "3.413.0", + "@smithy/credential-provider-imds": "^2.0.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/types": "^2.3.1", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/node-config-provider": { - "version": "2.0.12", + "node_modules/@aws-sdk/credential-providers/node_modules/@aws-sdk/types": { + "version": "3.413.0", "license": "Apache-2.0", "dependencies": { - "@smithy/property-provider": "^2.0.10", - "@smithy/shared-ini-file-loader": "^2.0.11", - "@smithy/types": "^2.3.3", + "@smithy/types": "^2.3.1", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/node-http-handler": { - "version": "2.1.5", + "node_modules/@aws-sdk/lib-storage": { + "version": "3.417.0", "license": "Apache-2.0", "dependencies": { - "@smithy/abort-controller": "^2.0.9", - "@smithy/protocol-http": "^3.0.5", - "@smithy/querystring-builder": "^2.0.9", - "@smithy/types": "^2.3.3", + "@smithy/abort-controller": "^2.0.1", + "@smithy/middleware-endpoint": "^2.0.7", + "@smithy/smithy-client": "^2.1.4", + "buffer": "5.6.0", + "events": "3.3.0", + "stream-browserify": "3.0.0", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" + }, + "peerDependencies": { + "@aws-sdk/client-s3": "^3.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/property-provider": { - "version": "2.0.10", - "license": "Apache-2.0", + "node_modules/@aws-sdk/middleware-bucket-endpoint": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-bucket-endpoint/-/middleware-bucket-endpoint-3.433.0.tgz", + "integrity": "sha512-Lk1xIu2tWTRa1zDw5hCF1RrpWQYSodUhrS/q3oKz8IAoFqEy+lNaD5jx+fycuZb5EkE4IzWysT+8wVkd0mAnOg==", "dependencies": { - "@smithy/types": "^2.3.3", + "@aws-sdk/types": "3.433.0", + "@aws-sdk/util-arn-parser": "3.310.0", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/protocol-http": "^3.0.8", + "@smithy/types": "^2.4.0", + "@smithy/util-config-provider": "^2.0.0", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/protocol-http": { - "version": "3.0.5", - "license": "Apache-2.0", + "node_modules/@aws-sdk/middleware-expect-continue": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-expect-continue/-/middleware-expect-continue-3.433.0.tgz", + "integrity": "sha512-Uq2rPIsjz0CR2sulM/HyYr5WiqiefrSRLdwUZuA7opxFSfE808w5DBWSprHxbH3rbDSQR4nFiOiVYIH8Eth7nA==", "dependencies": { - "@smithy/types": "^2.3.3", + "@aws-sdk/types": "3.433.0", + "@smithy/protocol-http": "^3.0.8", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/querystring-builder": { - "version": "2.0.9", - "license": "Apache-2.0", + "node_modules/@aws-sdk/middleware-flexible-checksums": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-flexible-checksums/-/middleware-flexible-checksums-3.433.0.tgz", + "integrity": "sha512-Ptssx373+I7EzFUWjp/i/YiNFt6I6sDuRHz6DOUR9nmmRTlHHqmdcBXlJL2d9wwFxoBRCN8/PXGsTc/DJ4c95Q==", "dependencies": { - "@smithy/types": "^2.3.3", - "@smithy/util-uri-escape": "^2.0.0", + "@aws-crypto/crc32": "3.0.0", + "@aws-crypto/crc32c": "3.0.0", + "@aws-sdk/types": "3.433.0", + "@smithy/is-array-buffer": "^2.0.0", + "@smithy/protocol-http": "^3.0.8", + "@smithy/types": "^2.4.0", + "@smithy/util-utf8": "^2.0.0", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/querystring-parser": { - "version": "2.0.9", + "node_modules/@aws-sdk/middleware-host-header": { + "version": "3.413.0", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^2.3.3", + "@aws-sdk/types": "3.413.0", + "@smithy/protocol-http": "^3.0.3", + "@smithy/types": "^2.3.1", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/service-error-classification": { - "version": "2.0.2", + "node_modules/@aws-sdk/middleware-host-header/node_modules/@aws-sdk/types": { + "version": "3.413.0", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^2.3.3" + "@smithy/types": "^2.3.1", + "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/shared-ini-file-loader": { - "version": "2.0.11", - "license": "Apache-2.0", + "node_modules/@aws-sdk/middleware-location-constraint": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-location-constraint/-/middleware-location-constraint-3.433.0.tgz", + "integrity": "sha512-2YD860TGntwZifIUbxm+lFnNJJhByR/RB/+fV1I8oGKg+XX2rZU+94pRfHXRywoZKlCA0L+LGDA1I56jxrB9sw==", "dependencies": { - "@smithy/types": "^2.3.3", + "@aws-sdk/types": "3.433.0", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/smithy-client": { - "version": "2.1.6", + "node_modules/@aws-sdk/middleware-logger": { + "version": "3.413.0", "license": "Apache-2.0", "dependencies": { - "@smithy/middleware-stack": "^2.0.2", - "@smithy/types": "^2.3.3", - "@smithy/util-stream": "^2.0.12", + "@aws-sdk/types": "3.413.0", + "@smithy/types": "^2.3.1", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/types": { - "version": "2.3.3", + "node_modules/@aws-sdk/middleware-logger/node_modules/@aws-sdk/types": { + "version": "3.413.0", "license": "Apache-2.0", "dependencies": { + "@smithy/types": "^2.3.1", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/url-parser": { - "version": "2.0.9", + "node_modules/@aws-sdk/middleware-recursion-detection": { + "version": "3.413.0", "license": "Apache-2.0", "dependencies": { - "@smithy/querystring-parser": "^2.0.9", - "@smithy/types": "^2.3.3", + "@aws-sdk/types": "3.413.0", + "@smithy/protocol-http": "^3.0.3", + "@smithy/types": "^2.3.1", "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/util-base64": { - "version": "2.0.0", + "node_modules/@aws-sdk/middleware-recursion-detection/node_modules/@aws-sdk/types": { + "version": "3.413.0", "license": "Apache-2.0", "dependencies": { - "@smithy/util-buffer-from": "^2.0.0", + "@smithy/types": "^2.3.1", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/util-body-length-browser": { - "version": "2.0.0", - "license": "Apache-2.0", + "node_modules/@aws-sdk/middleware-sdk-s3": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-sdk-s3/-/middleware-sdk-s3-3.433.0.tgz", + "integrity": "sha512-mkn3DiSuMVh4NTLsduC42Av+ApcOor52LMoQY0Wc6M5Mx7Xd05U+G1j8sjI9n/1bs5cZ/PoeRYJ/9bL1Xxznnw==", "dependencies": { + "@aws-sdk/types": "3.433.0", + "@aws-sdk/util-arn-parser": "3.310.0", + "@smithy/protocol-http": "^3.0.8", + "@smithy/smithy-client": "^2.1.12", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/util-body-length-node": { - "version": "2.1.0", + "node_modules/@aws-sdk/middleware-sdk-sts": { + "version": "3.413.0", "license": "Apache-2.0", "dependencies": { + "@aws-sdk/middleware-signing": "3.413.0", + "@aws-sdk/types": "3.413.0", + "@smithy/types": "^2.3.1", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/util-buffer-from": { - "version": "2.0.0", + "node_modules/@aws-sdk/middleware-sdk-sts/node_modules/@aws-sdk/types": { + "version": "3.413.0", "license": "Apache-2.0", "dependencies": { - "@smithy/is-array-buffer": "^2.0.0", + "@smithy/types": "^2.3.1", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/util-config-provider": { - "version": "2.0.0", + "node_modules/@aws-sdk/middleware-signing": { + "version": "3.413.0", "license": "Apache-2.0", "dependencies": { + "@aws-sdk/types": "3.413.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/protocol-http": "^3.0.3", + "@smithy/signature-v4": "^2.0.0", + "@smithy/types": "^2.3.1", + "@smithy/util-middleware": "^2.0.0", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/util-defaults-mode-browser": { - "version": "2.0.10", + "node_modules/@aws-sdk/middleware-signing/node_modules/@aws-sdk/types": { + "version": "3.413.0", "license": "Apache-2.0", "dependencies": { - "@smithy/property-provider": "^2.0.10", - "@smithy/smithy-client": "^2.1.6", - "@smithy/types": "^2.3.3", - "bowser": "^2.11.0", + "@smithy/types": "^2.3.1", "tslib": "^2.5.0" }, "engines": { - "node": ">= 10.0.0" + "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/util-defaults-mode-node": { - "version": "2.0.12", - "license": "Apache-2.0", + "node_modules/@aws-sdk/middleware-ssec": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-ssec/-/middleware-ssec-3.433.0.tgz", + "integrity": "sha512-2AMaPx0kYfCiekxoL7aqFqSSoA9du+yI4zefpQNLr+1cZOerYiDxdsZ4mbqStR1CVFaX6U6hrYokXzjInsvETw==", "dependencies": { - "@smithy/config-resolver": "^2.0.10", - "@smithy/credential-provider-imds": "^2.0.12", - "@smithy/node-config-provider": "^2.0.12", - "@smithy/property-provider": "^2.0.10", - "@smithy/smithy-client": "^2.1.6", - "@smithy/types": "^2.3.3", + "@aws-sdk/types": "3.433.0", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { - "node": ">= 10.0.0" + "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/util-hex-encoding": { - "version": "2.0.0", + "node_modules/@aws-sdk/middleware-user-agent": { + "version": "3.413.0", "license": "Apache-2.0", "dependencies": { + "@aws-sdk/types": "3.413.0", + "@aws-sdk/util-endpoints": "3.413.0", + "@smithy/protocol-http": "^3.0.3", + "@smithy/types": "^2.3.1", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/util-middleware": { - "version": "2.0.2", + "node_modules/@aws-sdk/middleware-user-agent/node_modules/@aws-sdk/types": { + "version": "3.413.0", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^2.3.3", + "@smithy/types": "^2.3.1", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/util-retry": { - "version": "2.0.2", + "node_modules/@aws-sdk/region-config-resolver": { + "version": "3.413.0", "license": "Apache-2.0", "dependencies": { - "@smithy/service-error-classification": "^2.0.2", - "@smithy/types": "^2.3.3", + "@smithy/node-config-provider": "^2.0.10", + "@smithy/types": "^2.3.1", + "@smithy/util-config-provider": "^2.0.0", + "@smithy/util-middleware": "^2.0.0", "tslib": "^2.5.0" }, "engines": { - "node": ">= 14.0.0" + "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/util-stream": { - "version": "2.0.12", - "license": "Apache-2.0", + "node_modules/@aws-sdk/signature-v4-multi-region": { + "version": "3.437.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/signature-v4-multi-region/-/signature-v4-multi-region-3.437.0.tgz", + "integrity": "sha512-MmrqudssOs87JgVg7HGVdvJws/t4kcOrJJd+975ki+DPeSoyK2U4zBDfDkJ+n0tFuZBs3sLwLh0QXE7BV28rRA==", "dependencies": { - "@smithy/fetch-http-handler": "^2.1.5", - "@smithy/node-http-handler": "^2.1.5", - "@smithy/types": "^2.3.3", - "@smithy/util-base64": "^2.0.0", - "@smithy/util-buffer-from": "^2.0.0", - "@smithy/util-hex-encoding": "^2.0.0", - "@smithy/util-utf8": "^2.0.0", + "@aws-sdk/types": "3.433.0", + "@smithy/protocol-http": "^3.0.8", + "@smithy/signature-v4": "^2.0.0", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/util-uri-escape": { - "version": "2.0.0", + "node_modules/@aws-sdk/token-providers": { + "version": "3.413.0", "license": "Apache-2.0", "dependencies": { + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/middleware-host-header": "3.413.0", + "@aws-sdk/middleware-logger": "3.413.0", + "@aws-sdk/middleware-recursion-detection": "3.413.0", + "@aws-sdk/middleware-user-agent": "3.413.0", + "@aws-sdk/types": "3.413.0", + "@aws-sdk/util-endpoints": "3.413.0", + "@aws-sdk/util-user-agent-browser": "3.413.0", + "@aws-sdk/util-user-agent-node": "3.413.0", + "@smithy/config-resolver": "^2.0.8", + "@smithy/fetch-http-handler": "^2.1.3", + "@smithy/hash-node": "^2.0.7", + "@smithy/invalid-dependency": "^2.0.7", + "@smithy/middleware-content-length": "^2.0.9", + "@smithy/middleware-endpoint": "^2.0.7", + "@smithy/middleware-retry": "^2.0.10", + "@smithy/middleware-serde": "^2.0.7", + "@smithy/middleware-stack": "^2.0.0", + "@smithy/node-config-provider": "^2.0.10", + "@smithy/node-http-handler": "^2.1.3", + "@smithy/property-provider": "^2.0.0", + "@smithy/protocol-http": "^3.0.3", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/smithy-client": "^2.1.4", + "@smithy/types": "^2.3.1", + "@smithy/url-parser": "^2.0.7", + "@smithy/util-base64": "^2.0.0", + "@smithy/util-body-length-browser": "^2.0.0", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.8", + "@smithy/util-defaults-mode-node": "^2.0.10", + "@smithy/util-retry": "^2.0.0", + "@smithy/util-utf8": "^2.0.0", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/util-utf8": { - "version": "2.0.0", + "node_modules/@aws-sdk/token-providers/node_modules/@aws-sdk/types": { + "version": "3.413.0", "license": "Apache-2.0", "dependencies": { - "@smithy/util-buffer-from": "^2.0.0", + "@smithy/types": "^2.3.1", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/uuid": { - "version": "8.3.2", - "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" - } - }, "node_modules/@aws-sdk/types": { - "version": "3.370.0", - "license": "Apache-2.0", + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.433.0.tgz", + "integrity": "sha512-0jEE2mSrNDd8VGFjTc1otYrwYPIkzZJEIK90ZxisKvQ/EURGBhNzWn7ejWB9XCMFT6XumYLBR0V9qq5UPisWtA==", "dependencies": { - "@smithy/types": "^1.1.0", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -4596,30 +1584,9 @@ }, "node_modules/@aws-sdk/util-arn-parser": { "version": "3.310.0", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/util-base64": { - "version": "3.310.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/util-buffer-from": "3.310.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/util-buffer-from": { - "version": "3.310.0", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-arn-parser/-/util-arn-parser-3.310.0.tgz", + "integrity": "sha512-jL8509owp/xB9+Or0pvn3Fe+b94qfklc2yPowZZIFAkFcCSIdkIglz18cPDWnYAcy9JGewpMS1COXKIUhZkJsA==", "dependencies": { - "@aws-sdk/is-array-buffer": "3.310.0", "tslib": "^2.5.0" }, "engines": { @@ -4648,16 +1615,6 @@ "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/util-endpoints/node_modules/@smithy/types": { - "version": "2.3.3", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, "node_modules/@aws-sdk/util-locate-window": { "version": "3.310.0", "license": "Apache-2.0", @@ -4689,16 +1646,6 @@ "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/util-user-agent-browser/node_modules/@smithy/types": { - "version": "2.3.3", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, "node_modules/@aws-sdk/util-user-agent-node": { "version": "3.413.0", "license": "Apache-2.0", @@ -4731,62 +1678,6 @@ "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/util-user-agent-node/node_modules/@smithy/node-config-provider": { - "version": "2.0.12", - "license": "Apache-2.0", - "dependencies": { - "@smithy/property-provider": "^2.0.10", - "@smithy/shared-ini-file-loader": "^2.0.11", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/util-user-agent-node/node_modules/@smithy/property-provider": { - "version": "2.0.10", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/util-user-agent-node/node_modules/@smithy/shared-ini-file-loader": { - "version": "2.0.11", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/util-user-agent-node/node_modules/@smithy/types": { - "version": "2.3.3", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/util-utf8": { - "version": "3.310.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/util-buffer-from": "3.310.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, "node_modules/@aws-sdk/util-utf8-browser": { "version": "3.259.0", "license": "Apache-2.0", @@ -6899,23 +3790,43 @@ } }, "node_modules/@smithy/abort-controller": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-2.0.13.tgz", + "integrity": "sha512-eeOPD+GF9BzF/Mjy3PICLePx4l0f3rG/nQegQHRLTloN5p1lSJJNZsyn+FzDnW8P2AduragZqJdtKNCxXozB1Q==", "dependencies": { - "@smithy/types": "^1.1.0", + "@smithy/types": "^2.5.0", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, + "node_modules/@smithy/chunked-blob-reader": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@smithy/chunked-blob-reader/-/chunked-blob-reader-2.0.0.tgz", + "integrity": "sha512-k+J4GHJsMSAIQPChGBrjEmGS+WbPonCXesoqP9fynIqjn7rdOThdH8FAeCmokP9mxTYKQAKoHCLPzNlm6gh7Wg==", + "dependencies": { + "tslib": "^2.5.0" + } + }, + "node_modules/@smithy/chunked-blob-reader-native": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@smithy/chunked-blob-reader-native/-/chunked-blob-reader-native-2.0.1.tgz", + "integrity": "sha512-N2oCZRglhWKm7iMBu7S6wDzXirjAofi7tAd26cxmgibRYOBS4D3hGfmkwCpHdASZzwZDD8rluh0Rcqw1JeZDRw==", + "dependencies": { + "@smithy/util-base64": "^2.0.1", + "tslib": "^2.5.0" + } + }, "node_modules/@smithy/config-resolver": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-2.0.18.tgz", + "integrity": "sha512-761sJSgNbvsqcsKW6/WZbrZr4H+0Vp/QKKqwyrxCPwD8BsiPEXNHyYnqNgaeK9xRWYswjon0Uxbpe3DWQo0j/g==", "dependencies": { - "@smithy/types": "^1.1.0", - "@smithy/util-config-provider": "^1.0.1", - "@smithy/util-middleware": "^1.0.1", + "@smithy/node-config-provider": "^2.1.5", + "@smithy/types": "^2.5.0", + "@smithy/util-config-provider": "^2.0.0", + "@smithy/util-middleware": "^2.0.6", "tslib": "^2.5.0" }, "engines": { @@ -6923,13 +3834,14 @@ } }, "node_modules/@smithy/credential-provider-imds": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-2.1.1.tgz", + "integrity": "sha512-gw5G3FjWC6sNz8zpOJgPpH5HGKrpoVFQpToNAwLwJVyI/LJ2jDJRjSKEsM6XI25aRpYjMSE/Qptxx305gN1vHw==", "dependencies": { - "@smithy/node-config-provider": "^1.0.1", - "@smithy/property-provider": "^1.0.1", - "@smithy/types": "^1.1.0", - "@smithy/url-parser": "^1.0.1", + "@smithy/node-config-provider": "^2.1.5", + "@smithy/property-provider": "^2.0.14", + "@smithy/types": "^2.5.0", + "@smithy/url-parser": "^2.0.13", "tslib": "^2.5.0" }, "engines": { @@ -6937,21 +3849,23 @@ } }, "node_modules/@smithy/eventstream-codec": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-codec/-/eventstream-codec-2.0.13.tgz", + "integrity": "sha512-CExbelIYp+DxAHG8RIs0l9QL7ElqhG4ym9BNoSpkPa4ptBQfzJdep3LbOSVJIE2VUdBAeObdeL6EDB3Jo85n3g==", "dependencies": { "@aws-crypto/crc32": "3.0.0", - "@smithy/types": "^1.1.0", - "@smithy/util-hex-encoding": "^1.0.1", + "@smithy/types": "^2.5.0", + "@smithy/util-hex-encoding": "^2.0.0", "tslib": "^2.5.0" } }, "node_modules/@smithy/eventstream-serde-browser": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-browser/-/eventstream-serde-browser-2.0.13.tgz", + "integrity": "sha512-OJ/2g/VxkzA+mYZxV102oX3CsiE+igTSmqq/ir3oEVG2kSIdRC00ryttj/lmL14W06ExNi0ysmfLxQkL8XrAZQ==", "dependencies": { - "@smithy/eventstream-serde-universal": "^1.0.1", - "@smithy/types": "^1.1.0", + "@smithy/eventstream-serde-universal": "^2.0.13", + "@smithy/types": "^2.5.0", "tslib": "^2.5.0" }, "engines": { @@ -6959,10 +3873,11 @@ } }, "node_modules/@smithy/eventstream-serde-config-resolver": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-config-resolver/-/eventstream-serde-config-resolver-2.0.13.tgz", + "integrity": "sha512-2BI1CbnYuEvAYoWSeWJtPNygbIKiWeSLxCmDLnyM6wQV32Of7VptiQlaFXPxXp4zqn/rs3ocZ/T29rxE4s4Gsg==", "dependencies": { - "@smithy/types": "^1.1.0", + "@smithy/types": "^2.5.0", "tslib": "^2.5.0" }, "engines": { @@ -6970,11 +3885,12 @@ } }, "node_modules/@smithy/eventstream-serde-node": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-node/-/eventstream-serde-node-2.0.13.tgz", + "integrity": "sha512-7NbFwPafb924elFxCBDvm48jy/DeSrpFbFQN0uN2ThuY5HrEeubikS0t7WMva4Z4EnRoivpbuT0scb9vUIJKoA==", "dependencies": { - "@smithy/eventstream-serde-universal": "^1.0.1", - "@smithy/types": "^1.1.0", + "@smithy/eventstream-serde-universal": "^2.0.13", + "@smithy/types": "^2.5.0", "tslib": "^2.5.0" }, "engines": { @@ -6982,11 +3898,12 @@ } }, "node_modules/@smithy/eventstream-serde-universal": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-universal/-/eventstream-serde-universal-2.0.13.tgz", + "integrity": "sha512-j0yFd5UfftM+ia9dxLRbheJDCkCZBHpcEzCsPO8BxVOTbdcX/auVJCv6ov/yvpCKsf4Hv3mOqi0Is1YogM2g3Q==", "dependencies": { - "@smithy/eventstream-codec": "^1.0.1", - "@smithy/types": "^1.1.0", + "@smithy/eventstream-codec": "^2.0.13", + "@smithy/types": "^2.5.0", "tslib": "^2.5.0" }, "engines": { @@ -6994,23 +3911,49 @@ } }, "node_modules/@smithy/fetch-http-handler": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.2.6", + "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-2.2.6.tgz", + "integrity": "sha512-PStY3XO1Ksjwn3wMKye5U6m6zxXpXrXZYqLy/IeCbh3nM9QB3Jgw/B0PUSLUWKdXg4U8qgEu300e3ZoBvZLsDg==", "dependencies": { - "@smithy/protocol-http": "^1.1.0", - "@smithy/querystring-builder": "^1.0.1", - "@smithy/types": "^1.1.0", - "@smithy/util-base64": "^1.0.1", + "@smithy/protocol-http": "^3.0.9", + "@smithy/querystring-builder": "^2.0.13", + "@smithy/types": "^2.5.0", + "@smithy/util-base64": "^2.0.1", + "tslib": "^2.5.0" + } + }, + "node_modules/@smithy/hash-blob-browser": { + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/@smithy/hash-blob-browser/-/hash-blob-browser-2.0.14.tgz", + "integrity": "sha512-yWdghyPJIEqLYsaE7YVgd3YhM7jN4Pv6eJQvTomnMsz5K2qRBlpjUx3T9fKlElp1qdeQ7DNc3sAat4i9CUBO7Q==", + "dependencies": { + "@smithy/chunked-blob-reader": "^2.0.0", + "@smithy/chunked-blob-reader-native": "^2.0.1", + "@smithy/types": "^2.5.0", "tslib": "^2.5.0" } }, "node_modules/@smithy/hash-node": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-2.0.15.tgz", + "integrity": "sha512-t/qjEJZu/G46A22PAk1k/IiJZT4ncRkG5GOCNWN9HPPy5rCcSZUbh7gwp7CGKgJJ7ATMMg+0Td7i9o1lQTwOfQ==", + "dependencies": { + "@smithy/types": "^2.5.0", + "@smithy/util-buffer-from": "^2.0.0", + "@smithy/util-utf8": "^2.0.2", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/hash-stream-node": { + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/@smithy/hash-stream-node/-/hash-stream-node-2.0.15.tgz", + "integrity": "sha512-ZZ6kC/pHt5Dc2goXIIyC8uA7A4GUMSzdCynAabnZ3CSSaV6ctP8mlvVkqjPph0O3XzHlx/80gdLrNqi1GDPUsA==", "dependencies": { - "@smithy/types": "^1.1.0", - "@smithy/util-buffer-from": "^1.0.1", - "@smithy/util-utf8": "^1.0.1", + "@smithy/types": "^2.5.0", + "@smithy/util-utf8": "^2.0.2", "tslib": "^2.5.0" }, "engines": { @@ -7018,16 +3961,18 @@ } }, "node_modules/@smithy/invalid-dependency": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-2.0.13.tgz", + "integrity": "sha512-XsGYhVhvEikX1Yz0kyIoLssJf2Rs6E0U2w2YuKdT4jSra5A/g8V2oLROC1s56NldbgnpesTYB2z55KCHHbKyjw==", "dependencies": { - "@smithy/types": "^1.1.0", + "@smithy/types": "^2.5.0", "tslib": "^2.5.0" } }, "node_modules/@smithy/is-array-buffer": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.0.0.tgz", + "integrity": "sha512-z3PjFjMyZNI98JFRJi/U0nGoLWMSJlDjAW4QUX2WNZLas5C0CmVV6LJ01JI0k90l7FvpmixjWxPFmENSClQ7ug==", "dependencies": { "tslib": "^2.5.0" }, @@ -7035,12 +3980,23 @@ "node": ">=14.0.0" } }, + "node_modules/@smithy/md5-js": { + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/@smithy/md5-js/-/md5-js-2.0.15.tgz", + "integrity": "sha512-pAZaokib56XvhU0t/R9vAcr3L3bMhIakhF25X7EMSQ7LAURiLfce/tgON8I3x/dIbnZUyeRi8f2cx2azu6ATew==", + "dependencies": { + "@smithy/types": "^2.5.0", + "@smithy/util-utf8": "^2.0.2", + "tslib": "^2.5.0" + } + }, "node_modules/@smithy/middleware-content-length": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-2.0.15.tgz", + "integrity": "sha512-xH4kRBw01gJgWiU+/mNTrnyFXeozpZHw39gLb3JKGsFDVmSrJZ8/tRqu27tU/ki1gKkxr2wApu+dEYjI3QwV1Q==", "dependencies": { - "@smithy/protocol-http": "^1.1.0", - "@smithy/types": "^1.1.0", + "@smithy/protocol-http": "^3.0.9", + "@smithy/types": "^2.5.0", "tslib": "^2.5.0" }, "engines": { @@ -7048,13 +4004,16 @@ } }, "node_modules/@smithy/middleware-endpoint": { - "version": "1.0.2", - "license": "Apache-2.0", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-2.2.0.tgz", + "integrity": "sha512-tddRmaig5URk2106PVMiNX6mc5BnKIKajHHDxb7K0J5MLdcuQluHMGnjkv18iY9s9O0tF+gAcPd/pDXA5L9DZw==", "dependencies": { - "@smithy/middleware-serde": "^1.0.1", - "@smithy/types": "^1.1.0", - "@smithy/url-parser": "^1.0.1", - "@smithy/util-middleware": "^1.0.1", + "@smithy/middleware-serde": "^2.0.13", + "@smithy/node-config-provider": "^2.1.5", + "@smithy/shared-ini-file-loader": "^2.2.4", + "@smithy/types": "^2.5.0", + "@smithy/url-parser": "^2.0.13", + "@smithy/util-middleware": "^2.0.6", "tslib": "^2.5.0" }, "engines": { @@ -7062,14 +4021,16 @@ } }, "node_modules/@smithy/middleware-retry": { - "version": "1.0.3", - "license": "Apache-2.0", - "dependencies": { - "@smithy/protocol-http": "^1.1.0", - "@smithy/service-error-classification": "^1.0.2", - "@smithy/types": "^1.1.0", - "@smithy/util-middleware": "^1.0.1", - "@smithy/util-retry": "^1.0.3", + "version": "2.0.20", + "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-2.0.20.tgz", + "integrity": "sha512-X2yrF/SHDk2WDd8LflRNS955rlzQ9daz9UWSp15wW8KtzoTXg3bhHM78HbK1cjr48/FWERSJKh9AvRUUGlIawg==", + "dependencies": { + "@smithy/node-config-provider": "^2.1.5", + "@smithy/protocol-http": "^3.0.9", + "@smithy/service-error-classification": "^2.0.6", + "@smithy/types": "^2.5.0", + "@smithy/util-middleware": "^2.0.6", + "@smithy/util-retry": "^2.0.6", "tslib": "^2.5.0", "uuid": "^8.3.2" }, @@ -7079,16 +4040,18 @@ }, "node_modules/@smithy/middleware-retry/node_modules/uuid": { "version": "8.3.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", "bin": { "uuid": "dist/bin/uuid" } }, "node_modules/@smithy/middleware-serde": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-2.0.13.tgz", + "integrity": "sha512-tBGbeXw+XsE6pPr4UaXOh+UIcXARZeiA8bKJWxk2IjJcD1icVLhBSUQH9myCIZLNNzJIH36SDjUX8Wqk4xJCJg==", "dependencies": { - "@smithy/types": "^1.1.0", + "@smithy/types": "^2.5.0", "tslib": "^2.5.0" }, "engines": { @@ -7096,9 +4059,11 @@ } }, "node_modules/@smithy/middleware-stack": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-2.0.7.tgz", + "integrity": "sha512-L1KLAAWkXbGx1t2jjCI/mDJ2dDNq+rp4/ifr/HcC6FHngxho5O7A5bQLpKHGlkfATH6fUnOEx0VICEVFA4sUzw==", "dependencies": { + "@smithy/types": "^2.5.0", "tslib": "^2.5.0" }, "engines": { @@ -7106,12 +4071,13 @@ } }, "node_modules/@smithy/node-config-provider": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-2.1.5.tgz", + "integrity": "sha512-3Omb5/h4tOCuKRx4p4pkYTvEYRCYoKk52bOYbKUyz/G/8gERbagsN8jFm4FjQubkrcIqQEghTpQaUw6uk+0edw==", "dependencies": { - "@smithy/property-provider": "^1.0.1", - "@smithy/shared-ini-file-loader": "^1.0.1", - "@smithy/types": "^1.1.0", + "@smithy/property-provider": "^2.0.14", + "@smithy/shared-ini-file-loader": "^2.2.4", + "@smithy/types": "^2.5.0", "tslib": "^2.5.0" }, "engines": { @@ -7119,13 +4085,14 @@ } }, "node_modules/@smithy/node-http-handler": { - "version": "1.0.2", - "license": "Apache-2.0", + "version": "2.1.9", + "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-2.1.9.tgz", + "integrity": "sha512-+K0q3SlNcocmo9OZj+fz67gY4lwhOCvIJxVbo/xH+hfWObvaxrMTx7JEzzXcluK0thnnLz++K3Qe7Z/8MDUreA==", "dependencies": { - "@smithy/abort-controller": "^1.0.1", - "@smithy/protocol-http": "^1.1.0", - "@smithy/querystring-builder": "^1.0.1", - "@smithy/types": "^1.1.0", + "@smithy/abort-controller": "^2.0.13", + "@smithy/protocol-http": "^3.0.9", + "@smithy/querystring-builder": "^2.0.13", + "@smithy/types": "^2.5.0", "tslib": "^2.5.0" }, "engines": { @@ -7133,10 +4100,11 @@ } }, "node_modules/@smithy/property-provider": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-2.0.14.tgz", + "integrity": "sha512-k3D2qp9o6imTrLaXRj6GdLYEJr1sXqS99nLhzq8fYmJjSVOeMg/G+1KVAAc7Oxpu71rlZ2f8SSZxcSxkevuR0A==", "dependencies": { - "@smithy/types": "^1.1.0", + "@smithy/types": "^2.5.0", "tslib": "^2.5.0" }, "engines": { @@ -7144,10 +4112,11 @@ } }, "node_modules/@smithy/protocol-http": { - "version": "1.1.0", - "license": "Apache-2.0", + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-3.0.9.tgz", + "integrity": "sha512-U1wl+FhYu4/BC+rjwh1lg2gcJChQhytiNQSggREgQ9G2FzmoK9sACBZvx7thyWMvRyHQTE22mO2d5UM8gMKDBg==", "dependencies": { - "@smithy/types": "^1.1.0", + "@smithy/types": "^2.5.0", "tslib": "^2.5.0" }, "engines": { @@ -7155,11 +4124,12 @@ } }, "node_modules/@smithy/querystring-builder": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-2.0.13.tgz", + "integrity": "sha512-JhXKwp3JtsFUe96XLHy/nUPEbaXqn6r7xE4sNaH8bxEyytE5q1fwt0ew/Ke6+vIC7gP87HCHgQpJHg1X1jN2Fw==", "dependencies": { - "@smithy/types": "^1.1.0", - "@smithy/util-uri-escape": "^1.0.1", + "@smithy/types": "^2.5.0", + "@smithy/util-uri-escape": "^2.0.0", "tslib": "^2.5.0" }, "engines": { @@ -7167,10 +4137,11 @@ } }, "node_modules/@smithy/querystring-parser": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-2.0.13.tgz", + "integrity": "sha512-TEiT6o8CPZVxJ44Rly/rrsATTQsE+b/nyBVzsYn2sa75xAaZcurNxsFd8z1haoUysONiyex24JMHoJY6iCfLdA==", "dependencies": { - "@smithy/types": "^1.1.0", + "@smithy/types": "^2.5.0", "tslib": "^2.5.0" }, "engines": { @@ -7178,17 +4149,22 @@ } }, "node_modules/@smithy/service-error-classification": { - "version": "1.0.2", - "license": "Apache-2.0", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-2.0.6.tgz", + "integrity": "sha512-fCQ36frtYra2fqY2/DV8+3/z2d0VB/1D1hXbjRcM5wkxTToxq6xHbIY/NGGY6v4carskMyG8FHACxgxturJ9Pg==", + "dependencies": { + "@smithy/types": "^2.5.0" + }, "engines": { "node": ">=14.0.0" } }, "node_modules/@smithy/shared-ini-file-loader": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-2.2.4.tgz", + "integrity": "sha512-9dRknGgvYlRIsoTcmMJXuoR/3ekhGwhRq4un3ns2/byre4Ql5hyUN4iS0x8eITohjU90YOnUCsbRwZRvCkbRfw==", "dependencies": { - "@smithy/types": "^1.1.0", + "@smithy/types": "^2.5.0", "tslib": "^2.5.0" }, "engines": { @@ -7196,16 +4172,17 @@ } }, "node_modules/@smithy/signature-v4": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-2.0.15.tgz", + "integrity": "sha512-SRTEJSEhQYVlBKIIdZ9SZpqW+KFqxqcNnEcBX+8xkDdWx+DItme9VcCDkdN32yTIrICC+irUufnUdV7mmHPjoA==", "dependencies": { - "@smithy/eventstream-codec": "^1.0.1", - "@smithy/is-array-buffer": "^1.0.1", - "@smithy/types": "^1.1.0", - "@smithy/util-hex-encoding": "^1.0.1", - "@smithy/util-middleware": "^1.0.1", - "@smithy/util-uri-escape": "^1.0.1", - "@smithy/util-utf8": "^1.0.1", + "@smithy/eventstream-codec": "^2.0.13", + "@smithy/is-array-buffer": "^2.0.0", + "@smithy/types": "^2.5.0", + "@smithy/util-hex-encoding": "^2.0.0", + "@smithy/util-middleware": "^2.0.6", + "@smithy/util-uri-escape": "^2.0.0", + "@smithy/util-utf8": "^2.0.2", "tslib": "^2.5.0" }, "engines": { @@ -7213,12 +4190,13 @@ } }, "node_modules/@smithy/smithy-client": { - "version": "1.0.3", - "license": "Apache-2.0", + "version": "2.1.15", + "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-2.1.15.tgz", + "integrity": "sha512-rngZcQu7Jvs9UbHihK1EI67RMPuzkc3CJmu4MBgB7D7yBnMGuFR86tq5rqHfL2gAkNnMelBN/8kzQVvZjNKefQ==", "dependencies": { - "@smithy/middleware-stack": "^1.0.1", - "@smithy/types": "^1.1.0", - "@smithy/util-stream": "^1.0.1", + "@smithy/middleware-stack": "^2.0.7", + "@smithy/types": "^2.5.0", + "@smithy/util-stream": "^2.0.20", "tslib": "^2.5.0" }, "engines": { @@ -7226,8 +4204,9 @@ } }, "node_modules/@smithy/types": { - "version": "1.1.0", - "license": "Apache-2.0", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.5.0.tgz", + "integrity": "sha512-/a31lYofrMBkJb3BuPlYJTMKDj0hUmKUP6JFZQu6YVuQVoAjubiY0A52U9S0Uysd33n/djexCUSNJ+G9bf3/aA==", "dependencies": { "tslib": "^2.5.0" }, @@ -7236,19 +4215,21 @@ } }, "node_modules/@smithy/url-parser": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-2.0.13.tgz", + "integrity": "sha512-okWx2P/d9jcTsZWTVNnRMpFOE7fMkzloSFyM53fA7nLKJQObxM2T4JlZ5KitKKuXq7pxon9J6SF2kCwtdflIrA==", "dependencies": { - "@smithy/querystring-parser": "^1.0.1", - "@smithy/types": "^1.1.0", + "@smithy/querystring-parser": "^2.0.13", + "@smithy/types": "^2.5.0", "tslib": "^2.5.0" } }, "node_modules/@smithy/util-base64": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-2.0.1.tgz", + "integrity": "sha512-DlI6XFYDMsIVN+GH9JtcRp3j02JEVuWIn/QOZisVzpIAprdsxGveFed0bjbMRCqmIFe8uetn5rxzNrBtIGrPIQ==", "dependencies": { - "@smithy/util-buffer-from": "^1.0.1", + "@smithy/util-buffer-from": "^2.0.0", "tslib": "^2.5.0" }, "engines": { @@ -7256,15 +4237,17 @@ } }, "node_modules/@smithy/util-body-length-browser": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-body-length-browser/-/util-body-length-browser-2.0.0.tgz", + "integrity": "sha512-JdDuS4ircJt+FDnaQj88TzZY3+njZ6O+D3uakS32f2VNnDo3vyEuNdBOh/oFd8Df1zSZOuH1HEChk2AOYDezZg==", "dependencies": { "tslib": "^2.5.0" } }, "node_modules/@smithy/util-body-length-node": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@smithy/util-body-length-node/-/util-body-length-node-2.1.0.tgz", + "integrity": "sha512-/li0/kj/y3fQ3vyzn36NTLGmUwAICb7Jbe/CsWCktW363gh1MOcpEcSO3mJ344Gv2dqz8YJCLQpb6hju/0qOWw==", "dependencies": { "tslib": "^2.5.0" }, @@ -7273,10 +4256,11 @@ } }, "node_modules/@smithy/util-buffer-from": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.0.0.tgz", + "integrity": "sha512-/YNnLoHsR+4W4Vf2wL5lGv0ksg8Bmk3GEGxn2vEQt52AQaPSCuaO5PM5VM7lP1K9qHRKHwrPGktqVoAHKWHxzw==", "dependencies": { - "@smithy/is-array-buffer": "^1.0.1", + "@smithy/is-array-buffer": "^2.0.0", "tslib": "^2.5.0" }, "engines": { @@ -7284,8 +4268,9 @@ } }, "node_modules/@smithy/util-config-provider": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-config-provider/-/util-config-provider-2.0.0.tgz", + "integrity": "sha512-xCQ6UapcIWKxXHEU4Mcs2s7LcFQRiU3XEluM2WcCjjBtQkUN71Tb+ydGmJFPxMUrW/GWMgQEEGipLym4XG0jZg==", "dependencies": { "tslib": "^2.5.0" }, @@ -7294,11 +4279,13 @@ } }, "node_modules/@smithy/util-defaults-mode-browser": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.0.19", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-2.0.19.tgz", + "integrity": "sha512-VHP8xdFR7/orpiABJwgoTB0t8Zhhwpf93gXhNfUBiwAE9O0rvsv7LwpQYjgvbOUDDO8JfIYQB2GYJNkqqGWsXw==", "dependencies": { - "@smithy/property-provider": "^1.0.1", - "@smithy/types": "^1.1.0", + "@smithy/property-provider": "^2.0.14", + "@smithy/smithy-client": "^2.1.15", + "@smithy/types": "^2.5.0", "bowser": "^2.11.0", "tslib": "^2.5.0" }, @@ -7307,23 +4294,39 @@ } }, "node_modules/@smithy/util-defaults-mode-node": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.0.25", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-2.0.25.tgz", + "integrity": "sha512-jkmep6/JyWmn2ADw9VULDeGbugR4N/FJCKOt+gYyVswmN1BJOfzF2umaYxQ1HhQDvna3kzm1Dbo1qIfBW4iuHA==", "dependencies": { - "@smithy/config-resolver": "^1.0.1", - "@smithy/credential-provider-imds": "^1.0.1", - "@smithy/node-config-provider": "^1.0.1", - "@smithy/property-provider": "^1.0.1", - "@smithy/types": "^1.1.0", + "@smithy/config-resolver": "^2.0.18", + "@smithy/credential-provider-imds": "^2.1.1", + "@smithy/node-config-provider": "^2.1.5", + "@smithy/property-provider": "^2.0.14", + "@smithy/smithy-client": "^2.1.15", + "@smithy/types": "^2.5.0", "tslib": "^2.5.0" }, "engines": { "node": ">= 10.0.0" } }, + "node_modules/@smithy/util-endpoints": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@smithy/util-endpoints/-/util-endpoints-1.0.4.tgz", + "integrity": "sha512-FPry8j1xye5yzrdnf4xKUXVnkQErxdN7bUIaqC0OFoGsv2NfD9b2UUMuZSSt+pr9a8XWAqj0HoyVNUfPiZ/PvQ==", + "dependencies": { + "@smithy/node-config-provider": "^2.1.5", + "@smithy/types": "^2.5.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">= 14.0.0" + } + }, "node_modules/@smithy/util-hex-encoding": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-hex-encoding/-/util-hex-encoding-2.0.0.tgz", + "integrity": "sha512-c5xY+NUnFqG6d7HFh1IFfrm3mGl29lC+vF+geHv4ToiuJCBmIfzx6IeHLg+OgRdPFKDXIw6pvi+p3CsscaMcMA==", "dependencies": { "tslib": "^2.5.0" }, @@ -7332,9 +4335,11 @@ } }, "node_modules/@smithy/util-middleware": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-2.0.6.tgz", + "integrity": "sha512-7W4uuwBvSLgKoLC1x4LfeArCVcbuHdtVaC4g30kKsD1erfICyQ45+tFhhs/dZNeQg+w392fhunCm/+oCcb6BSA==", "dependencies": { + "@smithy/types": "^2.5.0", "tslib": "^2.5.0" }, "engines": { @@ -7342,10 +4347,12 @@ } }, "node_modules/@smithy/util-retry": { - "version": "1.0.3", - "license": "Apache-2.0", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-2.0.6.tgz", + "integrity": "sha512-PSO41FofOBmyhPQJwBQJ6mVlaD7Sp9Uff9aBbnfBJ9eqXOE/obrqQjn0PNdkfdvViiPXl49BINfnGcFtSP4kYw==", "dependencies": { - "@smithy/service-error-classification": "^1.0.2", + "@smithy/service-error-classification": "^2.0.6", + "@smithy/types": "^2.5.0", "tslib": "^2.5.0" }, "engines": { @@ -7353,16 +4360,17 @@ } }, "node_modules/@smithy/util-stream": { - "version": "1.0.1", - "license": "Apache-2.0", - "dependencies": { - "@smithy/fetch-http-handler": "^1.0.1", - "@smithy/node-http-handler": "^1.0.2", - "@smithy/types": "^1.1.0", - "@smithy/util-base64": "^1.0.1", - "@smithy/util-buffer-from": "^1.0.1", - "@smithy/util-hex-encoding": "^1.0.1", - "@smithy/util-utf8": "^1.0.1", + "version": "2.0.20", + "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-2.0.20.tgz", + "integrity": "sha512-tT8VASuD8jJu0yjHEMTCPt1o5E3FVzgdsxK6FQLAjXKqVv5V8InCnc0EOsYrijgspbfDqdAJg7r0o2sySfcHVg==", + "dependencies": { + "@smithy/fetch-http-handler": "^2.2.6", + "@smithy/node-http-handler": "^2.1.9", + "@smithy/types": "^2.5.0", + "@smithy/util-base64": "^2.0.1", + "@smithy/util-buffer-from": "^2.0.0", + "@smithy/util-hex-encoding": "^2.0.0", + "@smithy/util-utf8": "^2.0.2", "tslib": "^2.5.0" }, "engines": { @@ -7370,8 +4378,9 @@ } }, "node_modules/@smithy/util-uri-escape": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-uri-escape/-/util-uri-escape-2.0.0.tgz", + "integrity": "sha512-ebkxsqinSdEooQduuk9CbKcI+wheijxEb3utGXkCoYQkJnwTnLbH1JXGimJtUkQwNQbsbuYwG2+aFVyZf5TLaw==", "dependencies": { "tslib": "^2.5.0" }, @@ -7380,10 +4389,11 @@ } }, "node_modules/@smithy/util-utf8": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.0.2.tgz", + "integrity": "sha512-qOiVORSPm6Ce4/Yu6hbSgNHABLP2VMv8QOC3tTDNHHlWY19pPyc++fBTbZPtx6egPXi4HQxKDnMxVxpbtX2GoA==", "dependencies": { - "@smithy/util-buffer-from": "^1.0.1", + "@smithy/util-buffer-from": "^2.0.0", "tslib": "^2.5.0" }, "engines": { @@ -7391,11 +4401,12 @@ } }, "node_modules/@smithy/util-waiter": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/@smithy/util-waiter/-/util-waiter-2.0.13.tgz", + "integrity": "sha512-YovIQatiuM7giEsRFotqJa2i3EbU2EE3PgtpXgtLgpx5rXiZMAwPxXYDFVFhuO0lbqvc/Zx4n+ZIisXOHPSqyg==", "dependencies": { - "@smithy/abort-controller": "^1.0.1", - "@smithy/types": "^1.1.0", + "@smithy/abort-controller": "^2.0.13", + "@smithy/types": "^2.5.0", "tslib": "^2.5.0" }, "engines": { diff --git a/package.json b/package.json index fe3c9f51b3..ecc2ddbaba 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "dependencies": { "@amplitude/ua-parser-js": "^0.7.24", "@aws-sdk/client-personalize": "^3.391.0", - "@aws-sdk/client-s3": "^3.370.0", + "@aws-sdk/client-s3": "^3.438.0", "@aws-sdk/credential-providers": "^3.391.0", "@aws-sdk/lib-storage": "^3.391.0", "@bugsnag/js": "^7.20.2", From f44a79130bb8f9f6fa571e080a02bc6f3eaeb411 Mon Sep 17 00:00:00 2001 From: Sai Kumar Battinoju Date: Thu, 14 Dec 2023 10:37:15 +0530 Subject: [PATCH 085/135] chore: clean up protected branches and add dispatch support for housekeeping workflow --- .github/workflows/housekeeping.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/housekeeping.yml b/.github/workflows/housekeeping.yml index 6c94b1c421..7b5847035e 100644 --- a/.github/workflows/housekeeping.yml +++ b/.github/workflows/housekeeping.yml @@ -4,6 +4,7 @@ on: schedule: # Run everyday at 1 AM - cron: '0 1 * * *' + workflow_dispatch: jobs: prs: @@ -41,5 +42,5 @@ jobs: date: '3 months ago' dry_run: false delete_tags: false - extra_protected_branch_regex: ^(main|release/.*|develop|hotfix/.*|hotfix-release/.*)$ + extra_protected_branch_regex: ^(main|develop)$ exclude_open_pr_branches: true From 7d275ca1d58c38859fce95d7d0677e11342c662a Mon Sep 17 00:00:00 2001 From: Utsab Chowdhury Date: Thu, 14 Dec 2023 22:29:05 +0530 Subject: [PATCH 086/135] fix: update response handling for v1 proxy --- src/services/destination/postTransformation.ts | 2 ++ test/integrations/destinations/braze/dataDelivery/data.ts | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/src/services/destination/postTransformation.ts b/src/services/destination/postTransformation.ts index 7e9cd52aed..3cec459f8b 100644 --- a/src/services/destination/postTransformation.ts +++ b/src/services/destination/postTransformation.ts @@ -186,6 +186,8 @@ export class DestinationPostTransformationService { const resp = { response: responses, statTags: errObj.statTags, + authErrorCategory: errObj.authErrorCategory, + message: errObj.message.toString(), } as DeliveriesResponse; ErrorReportingService.reportError(error, metaTo.errorContext, resp); diff --git a/test/integrations/destinations/braze/dataDelivery/data.ts b/test/integrations/destinations/braze/dataDelivery/data.ts index d62361e7f9..49a6d607e5 100644 --- a/test/integrations/destinations/braze/dataDelivery/data.ts +++ b/test/integrations/destinations/braze/dataDelivery/data.ts @@ -659,6 +659,8 @@ export const data = [ module: 'destination', workspaceId: '2Csl0lSTbuM3qyHdaOQB2GcDH8o', }, + authErrorCategory: '', + message: 'Request failed for braze with status: 401', }, }, }, @@ -834,6 +836,8 @@ export const data = [ module: 'destination', workspaceId: '2Csl0lSTbuM3qyHdaOQB2GcDH8o', }, + authErrorCategory: '', + message: 'Request failed for braze with status: 401', }, }, }, From 5f1887501c7dbaeb97a580058f23af7c96fff78a Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Thu, 14 Dec 2023 17:08:12 +0000 Subject: [PATCH 087/135] chore(release): 1.52.1 --- CHANGELOG.md | 7 +++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 561aaa900f..bc9a32f4cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [1.52.1](https://github.com/rudderlabs/rudder-transformer/compare/v1.52.0...v1.52.1) (2023-12-14) + + +### Bug Fixes + +* update response handling for v1 proxy ([7d275ca](https://github.com/rudderlabs/rudder-transformer/commit/7d275ca1d58c38859fce95d7d0677e11342c662a)) + ## [1.52.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.51.1...v1.52.0) (2023-12-12) diff --git a/package-lock.json b/package-lock.json index 440bb9ea46..8b14350448 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "rudder-transformer", - "version": "1.52.0", + "version": "1.52.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "rudder-transformer", - "version": "1.52.0", + "version": "1.52.1", "license": "ISC", "dependencies": { "@amplitude/ua-parser-js": "^0.7.24", diff --git a/package.json b/package.json index fe3c9f51b3..6e5ce2f9a6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rudder-transformer", - "version": "1.52.0", + "version": "1.52.1", "description": "", "homepage": "https://github.com/rudderlabs/rudder-transformer#readme", "bugs": { From 52e5a0d43402dac068d3b3b42cad7a57a3f42614 Mon Sep 17 00:00:00 2001 From: Sai Kumar Battinoju Date: Fri, 15 Dec 2023 12:22:26 +0530 Subject: [PATCH 088/135] chore: upgrade delete old branches action --- .github/workflows/housekeeping.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/housekeeping.yml b/.github/workflows/housekeeping.yml index 9259f2db0e..388b80c15f 100644 --- a/.github/workflows/housekeeping.yml +++ b/.github/workflows/housekeeping.yml @@ -36,7 +36,7 @@ jobs: uses: actions/checkout@v4.1.1 - name: Delete Old Branches - uses: beatlabs/delete-old-branches-action@v0.0.9 + uses: beatlabs/delete-old-branches-action@v0.0.10 with: repo_token: ${{ secrets.PAT }} date: '3 months ago' From 44755f3235676b4a23010820151ef146ea877743 Mon Sep 17 00:00:00 2001 From: devops-github-rudderstack <88187154+devops-github-rudderstack@users.noreply.github.com> Date: Fri, 15 Dec 2023 15:11:07 +0530 Subject: [PATCH 089/135] chore(release): pull hotfix-release/v1.52.2 into main (#2923) * fix: supportTransformerProxyV1 set to false (#2920) * fix: braze dedup for adding non-billable attributes (#2921) * fix: braze dedup for adding non-billable attributes * fix: braze dedup add test case for non billable attributes * fix: inclusion of right status-code & error details in proxy response (#2916) * fix: inclusion of right status-code & error details in proxy response Signed-off-by: Sai Sankeerth * fix: update status in response from errObj Signed-off-by: Sai Sankeerth --------- Signed-off-by: Sai Sankeerth Co-authored-by: Sai Sankeerth * chore(release): 1.52.2 --------- Signed-off-by: Sai Sankeerth Co-authored-by: AASHISH MALIK Co-authored-by: Utsab Chowdhury Co-authored-by: Sankeerth Co-authored-by: Sai Sankeerth Co-authored-by: GitHub Actions --- CHANGELOG.md | 9 ++++ package-lock.json | 4 +- package.json | 2 +- src/controllers/delivery.ts | 2 +- src/features.json | 2 +- src/services/destination/nativeIntegration.ts | 3 ++ .../destination/postTransformation.ts | 1 + src/v0/destinations/braze/braze.util.test.js | 53 +++++++++++++++++++ src/v0/destinations/braze/util.js | 8 +++ .../destinations/braze/dataDelivery/data.ts | 8 ++- 10 files changed, 85 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bc9a32f4cd..59f270b984 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,15 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [1.52.2](https://github.com/rudderlabs/rudder-transformer/compare/v1.52.1...v1.52.2) (2023-12-15) + + +### Bug Fixes + +* braze dedup for adding non-billable attributes ([#2921](https://github.com/rudderlabs/rudder-transformer/issues/2921)) ([4196b1b](https://github.com/rudderlabs/rudder-transformer/commit/4196b1bfec2fc3f7c2c5d0b305853b39033e894c)) +* inclusion of right status-code & error details in proxy response ([#2916](https://github.com/rudderlabs/rudder-transformer/issues/2916)) ([5d295c2](https://github.com/rudderlabs/rudder-transformer/commit/5d295c232ff91bfb8564d4d6fcce49dc1e07958b)) +* supportTransformerProxyV1 set to false ([#2920](https://github.com/rudderlabs/rudder-transformer/issues/2920)) ([90ee7ad](https://github.com/rudderlabs/rudder-transformer/commit/90ee7ad13921830c920ee60361adb0e0c5dc1d43)) + ### [1.52.1](https://github.com/rudderlabs/rudder-transformer/compare/v1.52.0...v1.52.1) (2023-12-14) diff --git a/package-lock.json b/package-lock.json index 8b14350448..b34388460a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "rudder-transformer", - "version": "1.52.1", + "version": "1.52.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "rudder-transformer", - "version": "1.52.1", + "version": "1.52.2", "license": "ISC", "dependencies": { "@amplitude/ua-parser-js": "^0.7.24", diff --git a/package.json b/package.json index 6e5ce2f9a6..0b9877ffd3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rudder-transformer", - "version": "1.52.1", + "version": "1.52.2", "description": "", "homepage": "https://github.com/rudderlabs/rudder-transformer#readme", "bugs": { diff --git a/src/controllers/delivery.ts b/src/controllers/delivery.ts index 0cc5e12d78..eba24ccf58 100644 --- a/src/controllers/delivery.ts +++ b/src/controllers/delivery.ts @@ -84,7 +84,7 @@ export class DeliveryController { ); } ctx.body = { output: deliveryResponse }; - ControllerUtility.deliveryPostProcess(ctx); + ControllerUtility.deliveryPostProcess(ctx, deliveryResponse.status); logger.debug('Native(Delivery):: Response from transformer::', JSON.stringify(ctx.body)); return ctx; diff --git a/src/features.json b/src/features.json index e0745c2246..a3d29bb325 100644 --- a/src/features.json +++ b/src/features.json @@ -66,5 +66,5 @@ "REDDIT": true }, "supportSourceTransformV1": true, - "supportTransformerProxyV1": true + "supportTransformerProxyV1": false } diff --git a/src/services/destination/nativeIntegration.ts b/src/services/destination/nativeIntegration.ts index c3b0237cdc..6b680e3f4a 100644 --- a/src/services/destination/nativeIntegration.ts +++ b/src/services/destination/nativeIntegration.ts @@ -218,6 +218,9 @@ export class NativeIntegrationDestinationService implements DestinationService { ); responseProxy = { response: jobStates, + status: v0Response.status, + message: v0Response.message, + authErrorCategory: v0Response.authErrorCategory, } as DeliveriesResponse; } return responseProxy; diff --git a/src/services/destination/postTransformation.ts b/src/services/destination/postTransformation.ts index 3cec459f8b..eef4152b2b 100644 --- a/src/services/destination/postTransformation.ts +++ b/src/services/destination/postTransformation.ts @@ -188,6 +188,7 @@ export class DestinationPostTransformationService { statTags: errObj.statTags, authErrorCategory: errObj.authErrorCategory, message: errObj.message.toString(), + status: errObj.status, } as DeliveriesResponse; ErrorReportingService.reportError(error, metaTo.errorContext, resp); diff --git a/src/v0/destinations/braze/braze.util.test.js b/src/v0/destinations/braze/braze.util.test.js index 9859e16152..9e82a235f1 100644 --- a/src/v0/destinations/braze/braze.util.test.js +++ b/src/v0/destinations/braze/braze.util.test.js @@ -660,9 +660,58 @@ describe('dedup utility tests', () => { color: 'green', age: 30, gender: 'male', + country: 'US', + language: 'en', + email_subscribe: true, + push_subscribe: false, + subscription_groups: ['group1', 'group2'], + }; + const storeData = { + external_id: '123', + country: 'US', + language: 'en', + email_subscribe: true, + push_subscribe: false, + subscription_groups: ['group1', 'group2'], + custom_attributes: { + color: 'blue', + age: 25, + }, + }; + store.set('123', storeData); + const result = BrazeDedupUtility.deduplicate(userData, store); + expect(store.size).toBe(1); + expect(result).toEqual({ + external_id: '123', + color: 'green', + age: 30, + gender: 'male', + country: 'US', + language: 'en', + email_subscribe: true, + push_subscribe: false, + subscription_groups: ['group1', 'group2'], + }); + }); + + test('deduplicates user data correctly 2', () => { + const userData = { + external_id: '123', + color: 'green', + age: 30, + gender: 'male', + language: 'en', + email_subscribe: true, + push_subscribe: false, + subscription_groups: ['group1', 'group2'], }; const storeData = { external_id: '123', + country: 'US', + language: 'en', + email_subscribe: true, + push_subscribe: false, + subscription_groups: ['group1', 'group2'], custom_attributes: { color: 'blue', age: 25, @@ -676,6 +725,10 @@ describe('dedup utility tests', () => { color: 'green', age: 30, gender: 'male', + language: 'en', + email_subscribe: true, + push_subscribe: false, + subscription_groups: ['group1', 'group2'], }); }); diff --git a/src/v0/destinations/braze/util.js b/src/v0/destinations/braze/util.js index 3b0855b338..40b9a7eada 100644 --- a/src/v0/destinations/braze/util.js +++ b/src/v0/destinations/braze/util.js @@ -301,6 +301,14 @@ const BrazeDedupUtility = { }; const identifier = external_id || user_alias?.alias_name; store.set(identifier, { ...storedUserData, ...deduplicatedUserData }); + + // add non billable attributes back to the deduplicated user object + BRAZE_NON_BILLABLE_ATTRIBUTES.forEach((key) => { + if (isDefinedAndNotNull(userData[key])) { + deduplicatedUserData[key] = userData[key]; + } + }); + return removeUndefinedValues(deduplicatedUserData); }, }; diff --git a/test/integrations/destinations/braze/dataDelivery/data.ts b/test/integrations/destinations/braze/dataDelivery/data.ts index 49a6d607e5..8162e75720 100644 --- a/test/integrations/destinations/braze/dataDelivery/data.ts +++ b/test/integrations/destinations/braze/dataDelivery/data.ts @@ -544,6 +544,7 @@ export const data = [ status: 200, body: { output: { + message: 'Request for braze Processed Successfully', response: [ { error: '{"aliases_processed":1,"message":"success"}', @@ -563,6 +564,7 @@ export const data = [ }, }, ], + status: 201, }, }, }, @@ -627,9 +629,10 @@ export const data = [ }, output: { response: { - status: 200, + status: 401, body: { output: { + status: 401, response: [ { error: '{"code":400,"message":"Bad Req","status":"Fail Case"}', @@ -767,9 +770,10 @@ export const data = [ }, output: { response: { - status: 200, + status: 401, body: { output: { + status: 401, response: [ { error: From c875ad44c69dfca3fe9b673ab29f3c41bf9f9ece Mon Sep 17 00:00:00 2001 From: Dilip Kola <33080863+koladilip@users.noreply.github.com> Date: Mon, 18 Dec 2023 10:01:55 +0530 Subject: [PATCH 090/135] Update create-hotfix-branch.yml --- .github/workflows/create-hotfix-branch.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/create-hotfix-branch.yml b/.github/workflows/create-hotfix-branch.yml index 03c79e0df1..a164c25bee 100644 --- a/.github/workflows/create-hotfix-branch.yml +++ b/.github/workflows/create-hotfix-branch.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest # Only allow these users to create new hotfix branch from 'main' - if: github.ref == 'refs/heads/main' && (github.actor == 'ItsSudip' || github.actor == 'krishna2020' || github.actor == 'saikumarrs' || github.actor == 'sandeepdsvs' || github.actor == 'shrouti1507' || github.actor == 'anantjain45823' || github.actor == 'chandumlg' || github.actor == 'mihir-4116' || github.actor == 'ujjwal-ab') && (github.triggering_actor == 'ItsSudip' || github.triggering_actor == 'krishna2020' || github.triggering_actor == 'saikumarrs' || github.triggering_actor == 'sandeepdsvs' || github.triggering_actor == 'shrouti1507' || github.triggering_actor == 'anantjain45823' || github.triggering_actor == 'chandumlg' || github.triggering_actor == 'mihir-4116' || github.triggering_actor == 'ujjwal-ab') + if: github.ref == 'refs/heads/main' && (github.actor == 'ItsSudip' || github.actor == 'krishna2020' || github.actor == 'koladilip' || github.actor == 'saikumarrs' || github.actor == 'sandeepdsvs' || github.actor == 'shrouti1507' || github.actor == 'anantjain45823' || github.actor == 'chandumlg' || github.actor == 'mihir-4116' || github.actor == 'ujjwal-ab') && (github.triggering_actor == 'ItsSudip' || github.triggering_actor == 'krishna2020' || github.triggering_actor == 'saikumarrs' || github.triggering_actor == 'sandeepdsvs' || github.triggering_actor == 'koladilip' || github.triggering_actor == 'shrouti1507' || github.triggering_actor == 'anantjain45823' || github.triggering_actor == 'chandumlg' || github.triggering_actor == 'mihir-4116' || github.triggering_actor == 'ujjwal-ab') steps: - name: Create Branch uses: peterjgrainger/action-create-branch@v2.4.0 From 290854ce7e630f08db51a117795941fe2c8482c5 Mon Sep 17 00:00:00 2001 From: devops-github-rudderstack <88187154+devops-github-rudderstack@users.noreply.github.com> Date: Mon, 18 Dec 2023 14:23:07 +0530 Subject: [PATCH 091/135] chore(release): pull hotfix-release/v1.52.3 into main (#2935) * fix: tiktok remove lowercasing for custom events (#2930) * fix: email validation for braze (#2929) * fix: addressed comments * fix: pinterest event value is restricted to string (#2933) * fix: converting event names to string before lowercasing * fix: small edit and adding test cases * fix: small edit and adding test cases * fix: remove log from dcm_floodlight (#2934) * chore(release): 1.52.3 --------- Co-authored-by: Anant Jain <62471433+anantjain45823@users.noreply.github.com> Co-authored-by: AASHISH MALIK Co-authored-by: shrouti1507 <60211312+shrouti1507@users.noreply.github.com> Co-authored-by: Sankeerth Co-authored-by: GitHub Actions --- CHANGELOG.md | 10 + package-lock.json | 4 +- package.json | 2 +- .../dcm_floodlight/procWorkflow.yaml | 1 - .../pinterest_tag/procWorkflow.yaml | 5 +- src/v0/destinations/braze/transform.js | 23 ++- src/v0/destinations/pinterest_tag/utils.js | 2 + src/v0/destinations/tiktok_ads/transform.js | 3 +- test/__tests__/data/braze_input.json | 77 ++++++++ test/__tests__/data/braze_output.json | 71 ++++++++ .../pinterest_tag/processor/data.ts | 125 +++++++++++++ .../destinations/tiktok_ads/processor/data.ts | 172 ++++++++++++++++++ 12 files changed, 479 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 59f270b984..f6bca95652 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,16 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [1.52.3](https://github.com/rudderlabs/rudder-transformer/compare/v1.52.2...v1.52.3) (2023-12-18) + + +### Bug Fixes + +* email validation for braze ([#2929](https://github.com/rudderlabs/rudder-transformer/issues/2929)) ([28207d0](https://github.com/rudderlabs/rudder-transformer/commit/28207d02a1b39b25325fa30be12c4dccd05c844e)) +* pinterest event value is restricted to string ([#2933](https://github.com/rudderlabs/rudder-transformer/issues/2933)) ([7f6d519](https://github.com/rudderlabs/rudder-transformer/commit/7f6d519b811a5d8f83f7a2103d9ba50efed8a923)) +* remove log from dcm_floodlight ([#2934](https://github.com/rudderlabs/rudder-transformer/issues/2934)) ([c5d9a3c](https://github.com/rudderlabs/rudder-transformer/commit/c5d9a3cc7d0270238c102cec809edcccad5b270d)) +* tiktok remove lowercasing for custom events ([#2930](https://github.com/rudderlabs/rudder-transformer/issues/2930)) ([1a90719](https://github.com/rudderlabs/rudder-transformer/commit/1a9071931e9768a3fd02b749b4b705e8c28d9763)) + ### [1.52.2](https://github.com/rudderlabs/rudder-transformer/compare/v1.52.1...v1.52.2) (2023-12-15) diff --git a/package-lock.json b/package-lock.json index b34388460a..573993a1a6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "rudder-transformer", - "version": "1.52.2", + "version": "1.52.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "rudder-transformer", - "version": "1.52.2", + "version": "1.52.3", "license": "ISC", "dependencies": { "@amplitude/ua-parser-js": "^0.7.24", diff --git a/package.json b/package.json index 0b9877ffd3..e8259c96e6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rudder-transformer", - "version": "1.52.2", + "version": "1.52.3", "description": "", "homepage": "https://github.com/rudderlabs/rudder-transformer#readme", "bugs": { diff --git a/src/cdk/v2/destinations/dcm_floodlight/procWorkflow.yaml b/src/cdk/v2/destinations/dcm_floodlight/procWorkflow.yaml index fbd8fb7498..db7871a7b7 100644 --- a/src/cdk/v2/destinations/dcm_floodlight/procWorkflow.yaml +++ b/src/cdk/v2/destinations/dcm_floodlight/procWorkflow.yaml @@ -84,7 +84,6 @@ steps: $.transformCustomVariable(conversionEvent.customVariables || [], .message) ); $.context.salesTag = conversionEvent.salesTag; - console.log("$.context.salesTag", $.context.salesTag); - name: handleSalesTag condition: $.context.salesTag template: | diff --git a/src/cdk/v2/destinations/pinterest_tag/procWorkflow.yaml b/src/cdk/v2/destinations/pinterest_tag/procWorkflow.yaml index 7bcb804126..8a956e905c 100644 --- a/src/cdk/v2/destinations/pinterest_tag/procWorkflow.yaml +++ b/src/cdk/v2/destinations/pinterest_tag/procWorkflow.yaml @@ -9,6 +9,8 @@ bindings: path: ../../../../v0/util - name: removeUndefinedAndNullAndEmptyValues path: ../../../../v0/util + - name: validateEventName + path: ../../../../v0/util steps: - name: checkIfProcessed condition: .message.statusCode @@ -175,6 +177,7 @@ steps: name: eventNamesForOthers template: | let event = .message.event ?? .message.name; + $.validateEventName(event); let eventInLowerCase = event.toLowerCase(); let eventNames = .destination.Config.eventsMapping.(){.from === event}.to[] ?? []; eventNames = $.convertToSnakeCase(eventNames); @@ -243,4 +246,4 @@ steps: }, "params": $.outputs.checkSendTestEventConfig, "files": {} - })[] + })[] \ No newline at end of file diff --git a/src/v0/destinations/braze/transform.js b/src/v0/destinations/braze/transform.js index 38c4b348db..6549f5658f 100644 --- a/src/v0/destinations/braze/transform.js +++ b/src/v0/destinations/braze/transform.js @@ -154,16 +154,19 @@ function getUserAttributesObject(message, mappingJson, destination) { Object.keys(mappingJson).forEach((destKey) => { let value = get(traits, mappingJson[destKey]); if (value || (value === null && reservedKeys.includes(destKey))) { - // if email is not string remove it from attributes - if (destKey === 'email' && typeof value !== 'string') { - throw new InstrumentationError('Invalid email, email must be a valid string'); - } - - // handle gender special case - if (destKey === 'gender') { - value = formatGender(value); - } else if (destKey === 'email' && isDefinedAndNotNull(value)) { - value = value.toString().toLowerCase(); + switch (destKey) { + case 'gender': + value = formatGender(value); + break; + case 'email': + if (typeof value === 'string') { + value = value.toLowerCase(); + } else if (isDefinedAndNotNull(value)) { + throw new InstrumentationError('Invalid email, email must be a valid string'); + } + break; + default: + break; } data[destKey] = value; } diff --git a/src/v0/destinations/pinterest_tag/utils.js b/src/v0/destinations/pinterest_tag/utils.js index c1493e9dbd..340fba498e 100644 --- a/src/v0/destinations/pinterest_tag/utils.js +++ b/src/v0/destinations/pinterest_tag/utils.js @@ -8,6 +8,7 @@ const { isDefined, getHashFromArrayWithDuplicate, removeUndefinedAndNullValues, + validateEventName, } = require('../../util'); const { COMMON_CONFIGS, CUSTOM_CONFIGS, API_VERSION } = require('./config'); @@ -170,6 +171,7 @@ const deduceTrackScreenEventName = (message, Config) => { if (!trackEventOrScreenName) { throw new InstrumentationError('event_name could not be mapped. Aborting'); } + validateEventName(trackEventOrScreenName); /* Step 1: If the event is not amongst the above list of ecommerce events, will look for diff --git a/src/v0/destinations/tiktok_ads/transform.js b/src/v0/destinations/tiktok_ads/transform.js index 09f0d95dcc..91e2189170 100644 --- a/src/v0/destinations/tiktok_ads/transform.js +++ b/src/v0/destinations/tiktok_ads/transform.js @@ -155,7 +155,8 @@ const trackResponseBuilder = async (message, { Config }) => { return responseList; } // Doc https://ads.tiktok.com/help/article/standard-events-parameters?lang=en - event = eventNameMapping[event] || event; + // For custom event we do not want to lower case the event or trim it we just want to send those as it is + event = eventNameMapping[event] || message.event; // if there exists no event mapping we will build payload with custom event recieved responseList.push(getTrackResponse(message, Config, event)); diff --git a/test/__tests__/data/braze_input.json b/test/__tests__/data/braze_input.json index fb4e41b189..3fc1dbb905 100644 --- a/test/__tests__/data/braze_input.json +++ b/test/__tests__/data/braze_input.json @@ -1955,5 +1955,82 @@ "type": "identify", "userId": "" } + }, + { + "destination": { + "Config": { + "restApiKey": "dummyApiKey", + "prefixProperties": true, + "useNativeSDK": false, + "sendPurchaseEventWithExtraProperties": true + }, + "DestinationDefinition": { + "DisplayName": "Braze", + "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", + "Name": "BRAZE" + }, + "Enabled": true, + "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", + "Name": "Braze", + "Transformations": [] + }, + "message": { + "anonymousId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", + "channel": "web", + "context": { + "traits": { + "city": "Disney", + "country": "USA", + "email": null, + "firstname": "Mickey" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" + }, + "event": "Order Completed", + "integrations": { + "All": true + }, + "messageId": "aa5f5e44-8756-40ad-ad1e-b0d3b9fa710a", + "originalTimestamp": "2020-01-24T06:29:02.367Z", + "properties": { + "affiliation": "Google Store", + "checkout_id": "fksdjfsdjfisjf9sdfjsd9f", + "coupon": "hasbros", + "currency": "USD", + "discount": 2.5, + "order_id": "50314b8e9bcf000000000000", + "products": [ + { + "category": "Games", + "image_url": "https:///www.example.com/product/path.jpg", + "name": "Monopoly: 3rd Edition", + "price": 0, + "product_id": "507f1f77bcf86cd799439023", + "quantity": 1, + "sku": "45790-32", + "url": "https://www.example.com/product/path" + }, + { + "category": "Games", + "name": "Uno Card Game", + "price": 0, + "product_id": "505bd76785ebb509fc183724", + "quantity": 2, + "sku": "46493-32" + } + ], + "revenue": 25, + "shipping": 3, + "subtotal": 22.5, + "tax": 2, + "total": 27.5 + }, + "receivedAt": "2020-01-24T11:59:02.403+05:30", + "request_ip": "[::1]:53712", + "sentAt": "2020-01-24T06:29:02.368Z", + "timestamp": "2020-01-24T11:59:02.402+05:30", + "type": "track", + "userId": "" + } } ] diff --git a/test/__tests__/data/braze_output.json b/test/__tests__/data/braze_output.json index ed39930569..7e0715f057 100644 --- a/test/__tests__/data/braze_output.json +++ b/test/__tests__/data/braze_output.json @@ -1038,5 +1038,76 @@ { "statusCode": 400, "message": "Invalid email, email must be a valid string" + }, + { + "body": { + "FORM": {}, + "JSON": { + "attributes": [ + { + "_update_existing_only": false, + "city": "Disney", + "country": "USA", + "email": null, + "firstname": "Mickey", + "user_alias": { + "alias_label": "rudder_id", + "alias_name": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca" + } + } + ], + "partner": "RudderStack", + "purchases": [ + { + "_update_existing_only": false, + "currency": "USD", + "price": 0, + "product_id": "507f1f77bcf86cd799439023", + "properties": { + "category": "Games", + "image_url": "https:///www.example.com/product/path.jpg", + "name": "Monopoly: 3rd Edition", + "url": "https://www.example.com/product/path" + }, + "quantity": 1, + "time": "2020-01-24T11:59:02.402+05:30", + "user_alias": { + "alias_label": "rudder_id", + "alias_name": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca" + } + }, + { + "_update_existing_only": false, + "currency": "USD", + "price": 0, + "product_id": "505bd76785ebb509fc183724", + "properties": { + "category": "Games", + "name": "Uno Card Game" + }, + "quantity": 2, + "time": "2020-01-24T11:59:02.402+05:30", + "user_alias": { + "alias_label": "rudder_id", + "alias_name": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca" + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {} + }, + "endpoint": "https://rest.fra-01.braze.eu/users/track", + "files": {}, + "headers": { + "Accept": "application/json", + "Authorization": "Bearer dummyApiKey", + "Content-Type": "application/json" + }, + "method": "POST", + "params": {}, + "type": "REST", + "userId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", + "version": "1" } ] diff --git a/test/integrations/destinations/pinterest_tag/processor/data.ts b/test/integrations/destinations/pinterest_tag/processor/data.ts index 17ab83b2e9..65b33e7740 100644 --- a/test/integrations/destinations/pinterest_tag/processor/data.ts +++ b/test/integrations/destinations/pinterest_tag/processor/data.ts @@ -3569,4 +3569,129 @@ export const data = [ }, }, }, + { + name: 'pinterest_tag', + description: 'Test 3', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + description: 'Any other format of event except string should be aborted', + message: { + type: 'track', + event: [1, 2, 3], + sentAt: '2020-08-14T05:30:30.118Z', + channel: 'web', + context: { + source: 'test', + userAgent: 'chrome', + traits: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + email: 'abc@gmail.com', + phone: '+1234589947', + ge: 'male', + db: '19950715', + lastname: 'Rudderlabs', + firstName: 'Test', + address: { city: 'Kolkata', state: 'WB', zip: '700114', country: 'IN' }, + }, + device: { advertisingId: 'abc123' }, + library: { name: 'rudder-sdk-ruby-sync', version: '1.0.6' }, + }, + messageId: '7208bbb6-2c4e-45bb-bf5b-ad426f3593e9', + timestamp: '2020-08-14T05:30:30.118Z', + properties: { + tax: 2, + total: 27.5, + coupon: 'hasbros', + revenue: 48, + price: 25, + quantity: 2, + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + requestIP: '123.0.0.0', + optOutType: 'LDP', + products: [ + { + sku: '45790-32', + url: 'https://www.example.com/product/path', + name: 'Monopoly: 3rd Edition', + price: 19, + category: 'Games', + quantity: 1, + image_url: 'https:///www.example.com/product/path.jpg', + product_id: '507f1f77bcf86cd799439011', + }, + { + sku: '46493-32', + name: 'Uno Card Game', + price: 3, + category: 'Games', + quantity: 2, + product_id: '505bd76785ebb509fc183733', + }, + ], + shipping: 3, + subtotal: 22.5, + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + }, + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + integrations: { All: true }, + }, + destination: { + DestinationDefinition: { Config: { cdkV2Enabled: true } }, + ID: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', + Name: 'PINTEREST_TAG', + Config: { + sendAsTestEvent: false, + tagId: '123456789', + apiVersion: 'newApi', + adAccountId: 'accountId123', + conversionToken: 'conversionToken123', + appId: '429047995', + enhancedMatch: true, + enableDeduplication: true, + deduplicationKey: 'messageId', + sendingUnHashedData: true, + sendExternalId: true, + customProperties: [{ properties: 'presentclass' }, { properties: 'presentgrade' }], + eventsMapping: [{ from: 'ABC Searched', to: 'WatchVideo' }], + }, + Enabled: true, + Transformations: [], + }, + metadata: { destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq' }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + error: + 'Event is a required field and should be a string: Workflow: procWorkflow, Step: eventNames, ChildStep: undefined, OriginalError: Event is a required field and should be a string', + metadata: { destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq' }, + statTags: { + destType: 'PINTEREST_TAG', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'cdkV2', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, ]; diff --git a/test/integrations/destinations/tiktok_ads/processor/data.ts b/test/integrations/destinations/tiktok_ads/processor/data.ts index 46128f46b8..4a6a4bd812 100644 --- a/test/integrations/destinations/tiktok_ads/processor/data.ts +++ b/test/integrations/destinations/tiktok_ads/processor/data.ts @@ -4952,4 +4952,176 @@ export const data = [ }, }, }, + { + name: 'tiktok_ads', + description: 'Test 29 -> Camel Case Custom Event Pass', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + ip: '13.57.97.131', + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'tiktokExternalId', + id: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + ], + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + timestamp: '2020-09-17T19:49:27Z', + type: 'track', + event: 'customEvent', + properties: { + eventId: '1616318632825_357', + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + clickId: 'dummyclickId', + currency: 'USD', + value: 46, + context: { + ad: { + callback: '123ATXSfe', + }, + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + phone_number: + '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', + }, + }, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + hashUserProperties: false, + sendCustomEvents: true, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://business-api.tiktok.com/open_api/v1.3/pixel/track/', + headers: { + 'Access-Token': 'dummyAccessToken', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + pixel_code: 'A1T8T4UYGVIQA8ORZMX9', + event: 'customEvent', + event_id: '1616318632825_357', + timestamp: '2020-09-17T19:49:27Z', + properties: { + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + currency: 'USD', + value: 46, + }, + context: { + ad: { + callback: 'dummyclickId', + }, + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + phone_number: + '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', + external_id: + 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + ip: '13.57.97.131', + user_agent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + }, + partner_name: 'RudderStack', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, ]; From a5931926e14dfa45f248990abfa293aed96a9816 Mon Sep 17 00:00:00 2001 From: Sudip Paul <67197965+ItsSudip@users.noreply.github.com> Date: Tue, 19 Dec 2023 10:13:38 +0530 Subject: [PATCH 092/135] chore: move destinations to component test suite (#2894) * chore: move clevertap, braze and am * chore: move intercom test cases * chore: add component test cases for marketo and sendgrid * chore: resolve conflicts --- test/__mocks__/axios.js | 6 - test/__mocks__/braze.mock.js | 29 - test/__mocks__/data/braze/proxy_response.json | 34 - test/__mocks__/data/braze/response.json | 46 - .../data/intercom/proxy_response.json | 15 - test/__tests__/amplitude.test.js | 124 - test/__tests__/braze.test.js | 76 - test/__tests__/clevertap.test.js | 49 - test/__tests__/data/am_batch_input.json | 1919 --- test/__tests__/data/am_batch_output.json | 1229 -- test/__tests__/data/am_input.json | 4943 ------- test/__tests__/data/am_output.json | 4469 ------ test/__tests__/data/am_router_input.json | 142 - test/__tests__/data/am_router_output.json | 150 - test/__tests__/data/braze_input.json | 2036 --- test/__tests__/data/braze_output.json | 1113 -- test/__tests__/data/braze_proxy_input.json | 219 - test/__tests__/data/braze_proxy_output.json | 106 - test/__tests__/data/braze_router.json | 1034 -- test/__tests__/data/clevertap_input.json | 1084 -- test/__tests__/data/clevertap_output.json | 739 - .../__tests__/data/clevertap_proxy_input.json | 114 - .../data/clevertap_proxy_output.json | 64 - .../data/clevertap_router_input.json | 139 - .../data/clevertap_router_output.json | 107 - test/__tests__/data/intercom_input.json | 1232 -- test/__tests__/data/intercom_output.json | 651 - test/__tests__/data/intercom_proxy_input.json | 44 - .../__tests__/data/intercom_proxy_output.json | 31 - .../__tests__/data/intercom_router_input.json | 150 - .../data/intercom_router_output.json | 99 - test/__tests__/data/marketo_input.json | 1157 -- test/__tests__/data/marketo_output.json | 204 - test/__tests__/data/marketo_router_input.json | 996 -- .../data/marketo_router_metadata_input.json | 163 - .../data/marketo_router_metadata_output.json | 20 - .../__tests__/data/marketo_router_output.json | 792 -- test/__tests__/data/sf_input.json | 152 - test/__tests__/data/sf_output.json | 43 - test/__tests__/intercom.test.js | 49 - test/__tests__/marketo.test.js | 71 - .../destinations/am/batch/data.ts | 3274 +++++ .../destinations/am/processor/data.ts | 11322 ++++++++++++++++ .../destinations/am/router/data.ts | 316 + .../destinations/braze/network.ts | 192 +- .../destinations/braze/processor/data.ts | 3864 ++++++ .../destinations/braze/router/data.ts | 919 ++ .../destinations/clevertap/processor/data.ts | 2427 ++++ .../destinations/clevertap/router/data.ts | 274 + .../destinations/intercom/processor/data.ts | 2311 ++++ .../destinations/intercom/router/data.ts | 272 + .../destinations/marketo/network.ts | 728 + .../destinations/marketo/processor/data.ts | 1745 +++ .../destinations/marketo/router/data.ts | 2140 +++ .../destinations/sendgrid/network.ts | 160 + .../destinations/sendgrid/processor/data.ts | 1533 +++ .../destinations/sendgrid/router/data.ts | 173 + 57 files changed, 31584 insertions(+), 25906 deletions(-) delete mode 100644 test/__mocks__/braze.mock.js delete mode 100644 test/__mocks__/data/braze/proxy_response.json delete mode 100644 test/__mocks__/data/braze/response.json delete mode 100644 test/__mocks__/data/intercom/proxy_response.json delete mode 100644 test/__tests__/amplitude.test.js delete mode 100644 test/__tests__/braze.test.js delete mode 100644 test/__tests__/clevertap.test.js delete mode 100644 test/__tests__/data/am_batch_input.json delete mode 100644 test/__tests__/data/am_batch_output.json delete mode 100644 test/__tests__/data/am_input.json delete mode 100644 test/__tests__/data/am_output.json delete mode 100644 test/__tests__/data/am_router_input.json delete mode 100644 test/__tests__/data/am_router_output.json delete mode 100644 test/__tests__/data/braze_input.json delete mode 100644 test/__tests__/data/braze_output.json delete mode 100644 test/__tests__/data/braze_proxy_input.json delete mode 100644 test/__tests__/data/braze_proxy_output.json delete mode 100644 test/__tests__/data/braze_router.json delete mode 100644 test/__tests__/data/clevertap_input.json delete mode 100644 test/__tests__/data/clevertap_output.json delete mode 100644 test/__tests__/data/clevertap_proxy_input.json delete mode 100644 test/__tests__/data/clevertap_proxy_output.json delete mode 100644 test/__tests__/data/clevertap_router_input.json delete mode 100644 test/__tests__/data/clevertap_router_output.json delete mode 100644 test/__tests__/data/intercom_input.json delete mode 100644 test/__tests__/data/intercom_output.json delete mode 100644 test/__tests__/data/intercom_proxy_input.json delete mode 100644 test/__tests__/data/intercom_proxy_output.json delete mode 100644 test/__tests__/data/intercom_router_input.json delete mode 100644 test/__tests__/data/intercom_router_output.json delete mode 100644 test/__tests__/data/marketo_input.json delete mode 100644 test/__tests__/data/marketo_output.json delete mode 100644 test/__tests__/data/marketo_router_input.json delete mode 100644 test/__tests__/data/marketo_router_metadata_input.json delete mode 100644 test/__tests__/data/marketo_router_metadata_output.json delete mode 100644 test/__tests__/data/marketo_router_output.json delete mode 100644 test/__tests__/data/sf_input.json delete mode 100644 test/__tests__/data/sf_output.json delete mode 100644 test/__tests__/intercom.test.js delete mode 100644 test/__tests__/marketo.test.js create mode 100644 test/integrations/destinations/am/batch/data.ts create mode 100644 test/integrations/destinations/am/processor/data.ts create mode 100644 test/integrations/destinations/am/router/data.ts create mode 100644 test/integrations/destinations/braze/processor/data.ts create mode 100644 test/integrations/destinations/braze/router/data.ts create mode 100644 test/integrations/destinations/clevertap/processor/data.ts create mode 100644 test/integrations/destinations/clevertap/router/data.ts create mode 100644 test/integrations/destinations/intercom/processor/data.ts create mode 100644 test/integrations/destinations/intercom/router/data.ts create mode 100644 test/integrations/destinations/marketo/processor/data.ts create mode 100644 test/integrations/destinations/marketo/router/data.ts create mode 100644 test/integrations/destinations/sendgrid/processor/data.ts create mode 100644 test/integrations/destinations/sendgrid/router/data.ts diff --git a/test/__mocks__/axios.js b/test/__mocks__/axios.js index 6a3139c4e9..e8a4d3c6b3 100644 --- a/test/__mocks__/axios.js +++ b/test/__mocks__/axios.js @@ -39,7 +39,6 @@ const { const { sendgridGetRequestHandler } = require("./sendgrid.mock"); const { sendinblueGetRequestHandler } = require("./sendinblue.mock"); const { courierGetRequestHandler } = require("./courier.mock"); -const { brazePostRequestHandler } = require("./braze.mock"); const urlDirectoryMap = { "api.hubapi.com": "hs", @@ -178,11 +177,6 @@ function post(url, payload) { resolve(acPostRequestHandler(url, payload)); }); } - if(url.includes("braze.com")) { - return new Promise((resolve, reject) => { - resolve(brazePostRequestHandler(url, payload)); - }); - } if (url.includes("https://a.klaviyo.com")) { return new Promise((resolve, reject) => { resolve(klaviyoPostRequestHandler(url, payload)); diff --git a/test/__mocks__/braze.mock.js b/test/__mocks__/braze.mock.js deleted file mode 100644 index 7f63caf184..0000000000 --- a/test/__mocks__/braze.mock.js +++ /dev/null @@ -1,29 +0,0 @@ -const fs = require("fs"); -const path = require("path"); -const getData = url => { - const dataFile = fs.readFileSync( - path.resolve(__dirname, "./data/braze/response.json") - ); - const data = JSON.parse(dataFile); - const response = data[url]; - return response || {}; -}; - -const brazePostRequestHandler = (url, payload) => { - const mockData = getData(url); - switch (url) { - case "https://rest.iad-03.braze.com": - //resolve with status 201 and response data contains value for contact created - return { data: mockData, status: 201 }; - default: - return new Promise((resolve, reject) => { - if (mockData) { - resolve({ data: mockData, status: 200 }); - } else { - resolve({ error: "Request failed" }); - } - }); - } -}; - -module.exports = { brazePostRequestHandler }; diff --git a/test/__mocks__/data/braze/proxy_response.json b/test/__mocks__/data/braze/proxy_response.json deleted file mode 100644 index 704c1a65e5..0000000000 --- a/test/__mocks__/data/braze/proxy_response.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "https://rest.iad-03.braze.com/users/identify/test1": { - "data": { - "aliases_processed": 1, - "message": "success" - }, - "status": 201 - }, - "https://rest.iad-03.braze.com/users/identify/test2": { - "data": { - "message": "success", - "errors": ["minor error message"] - }, - "status": 201 - }, - "https://rest.iad-03.braze.com/users/identify/test3": { - "data": { - "message": "fatal error message", - "errors": ["minor error message"] - }, - "status": 201 - }, - "https://rest.iad-03.braze.com/users/identify/test4": { - "data": "", - "status": 201 - }, - "https://rest.iad-03.braze.com/users/identify/test5": {}, - "https://rest.iad-03.braze.com/users/identify/test6": { - "code": "[ENOTFOUND] :: DNS lookup failed" - }, - "https://rest.iad-03.braze.com/users/identify/test7": { - "response": {} - } -} diff --git a/test/__mocks__/data/braze/response.json b/test/__mocks__/data/braze/response.json deleted file mode 100644 index d4aad64f49..0000000000 --- a/test/__mocks__/data/braze/response.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "https://rest.iad-03.braze.com/users/export/ids": { - "users": [ - { - "created_at": "2023-03-17T20:51:58.297Z", - "external_id": "braze_test_user", - "user_aliases": [], - "appboy_id": "6414d2ee33326e3354e3040b", - "braze_id": "6414d2ee33326e3354e3040b", - "first_name": "Jackson", - "last_name": "Miranda", - "random_bucket": 8134, - "email": "jackson24miranda@gmail.com", - "custom_attributes": { - "pwa": false, - "is_registered": true, - "last_identify": "GOOGLE_SIGN_IN", - "account_region": "ON", - "is_pickup_selected": "false", - "has_tradein_attempt": false, - "custom_obj_attr": { - "key1": "value1", - "key2": "value2", - "key3": "value3" - }, - "custom_arr": [1, 2, "str1"] - }, - "custom_events": [ - { - "name": "Sign In Completed", - "first": "2023-03-10T18:36:05.028Z", - "last": "2023-03-10T18:36:05.028Z", - "count": 2 - } - ], - "total_revenue": 0, - "push_subscribe": "subscribed", - "email_subscribe": "subscribed" - } - ], - "message": "success" - }, - "https://rest.iad-01.braze.com/users/identify": { - "response": {} - } -} diff --git a/test/__mocks__/data/intercom/proxy_response.json b/test/__mocks__/data/intercom/proxy_response.json deleted file mode 100644 index 3c5a3d9638..0000000000 --- a/test/__mocks__/data/intercom/proxy_response.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "https://api.intercom.io/users/test1": { - "data": { - "type": "error.list", - "request_id": "000on04msi4jpk7d3u60", - "errors": [ - { - "code": "Request Timeout", - "message": "The server would not wait any longer for the client" - } - ] - }, - "status": 408 - } -} diff --git a/test/__tests__/amplitude.test.js b/test/__tests__/amplitude.test.js deleted file mode 100644 index 2b7c46f0b5..0000000000 --- a/test/__tests__/amplitude.test.js +++ /dev/null @@ -1,124 +0,0 @@ -const integration = "am"; -const name = "Amplitude"; - -const fs = require("fs"); -const path = require("path"); -const mockedEnv = require("mocked-env"); - -const version = "v0"; - -const transformer = require(`../../src/${version}/destinations/${integration}/transform`); -// const { compareJSON } = require("./util"); - -const inputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_input.json`) -); -const outputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_output.json`) -); - -const batchInputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_batch_input.json`) -); -const batchOutputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_batch_output.json`) -); -const inputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_input.json`) -); -const outputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_output.json`) -); -const inputRouterData = JSON.parse(inputRouterDataFile); -const expectedRouterData = JSON.parse(outputRouterDataFile); - -const inputData = JSON.parse(inputDataFile); -const expectedData = JSON.parse(outputDataFile); - -inputData.forEach((input, index) => { - test(`${name} Tests ${input.message.type}: payload - ${index}`, () => { - try { - const output = transformer.process(input); - if (output.length > 1) { - expect(output).toEqual(expectedData[index]); - } else { - expect(output).toEqual([expectedData[index]]); - } - } catch (error) { - expect(error.message).toEqual(expectedData[index].error); - } - }); -}); - -const batchInputData = JSON.parse(batchInputDataFile); -const batchExpectedData = JSON.parse(batchOutputDataFile); - -batchInputData.forEach((input, index) => { - if (index < batchInputData.length - 2) { - test(`test batching ${index}`, () => { - const output = transformer.batch(input); - expect(Array.isArray(output)).toEqual(true); - expect(output.length).toEqual(batchExpectedData[index].length); - output.forEach((input, indexInner) => { - expect(output[indexInner]).toEqual( - batchExpectedData[index][indexInner] - ); - }); - }); - } -}); - -let restore = mockedEnv({ - BATCH_NOT_MET_CRITERIA_USER: "true" -}); - -test(`test batching ${batchInputData.length - 2}`, () => { - // reset module and load in new transformer with added env - jest.resetModules(); - expect(process.env.BATCH_NOT_MET_CRITERIA_USER).toEqual("true"); - const transformerNew = require(`../../src/${version}/destinations/${integration}/transform`); - const output = transformerNew.batch( - batchInputData[batchInputData.length - 2] - ); - expect(Array.isArray(output)).toEqual(true); - expect(output.length).toEqual( - batchExpectedData[batchExpectedData.length - 2].length - ); - output.forEach((input, indexInner) => { - expect(output[indexInner]).toEqual( - batchExpectedData[batchExpectedData.length - 2][indexInner] - ); - }); -}); - -restore = mockedEnv({ - BATCH_NOT_MET_CRITERIA_USER: "true" -}); - -test(`test batching ${batchInputData.length - 1}`, () => { - // reset module and load in new transformer with added env - jest.resetModules(); - expect(process.env.BATCH_NOT_MET_CRITERIA_USER).toEqual("true"); - const transformerNew = require(`../../src/${version}/destinations/${integration}/transform`); - const output = transformerNew.batch( - batchInputData[batchInputData.length - 1] - ); - expect(Array.isArray(output)).toEqual(true); - expect(output.length).toEqual( - batchExpectedData[batchExpectedData.length - 1].length - ); - output.forEach((input, indexInner) => { - expect(output[indexInner]).toEqual( - batchExpectedData[batchExpectedData.length - 1][indexInner] - ); - }); -}); - -describe(`${name} Tests`, () => { - describe("Router Tests", () => { - it("Payload", async () => { - const routerOutput = await transformer.processRouterDest(inputRouterData); - expect(routerOutput).toEqual(expectedRouterData); - }); - }); -}); diff --git a/test/__tests__/braze.test.js b/test/__tests__/braze.test.js deleted file mode 100644 index c1d317c6ba..0000000000 --- a/test/__tests__/braze.test.js +++ /dev/null @@ -1,76 +0,0 @@ -const cloneDeep = require('lodash/cloneDeep'); -const integration = "braze"; -const name = "Braze"; - -const fs = require("fs"); -const path = require("path"); - -const version = "v0"; - -const { FEATURE_FILTER_CODE } = require('../../src/v0/util/constant'); -const transformer = require(`../../src/${version}/destinations/${integration}/transform`); -const inputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_input.json`) -); -const outputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_output.json`) -); -const inputData = JSON.parse(inputDataFile); -const expectedData = JSON.parse(outputDataFile); - -inputData.forEach((input, index) => { - it(`${name} Tests: payload - ${index}`, async () => { - let output1, output2, output3, expected; - try { - // default reqMetadata - output1 = await transformer.process(cloneDeep(input)); - // null reqMetadata - output2 = await transformer.process(cloneDeep(input), { userStore: new Map() }, null); - // undefined reqMetadata - output3 = await transformer.process(cloneDeep(input), { userStore: new Map() }, undefined); - expected = expectedData[index]; - } catch (error) { - output1 = error.message; - output2 = error.message; - output3 = error.message; - expected = expectedData[index].message; - } - expect(output1).toEqual(expected); - expect(output2).toEqual(expected); - expect(output3).toEqual(expected); - }); -}); - -// Router Test Data -const routerTestDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router.json`) -); -const routerTestData = JSON.parse(routerTestDataFile); -const { simpleRouterTestData, dedupEnabledRouterTestData } = routerTestData; - -describe(`${name} Tests`, () => { - describe("Simple Router Tests", () => { - simpleRouterTestData.forEach((dataPoint, index) => { - it(`${index}. ${integration} - ${dataPoint.description}`, async () => { - const output = await transformer.processRouterDest(dataPoint.input); - expect(output).toEqual(dataPoint.output); - }); - }); - }); - describe("Dedupenabled Router Tests", () => { - dedupEnabledRouterTestData.forEach((dataPoint, index) => { - it(`${index}. ${integration} - ${dataPoint.description}`, async () => { - // default reqMetadata - const oldTransformerOutput = await transformer.processRouterDest(cloneDeep(dataPoint.input)); - // valid reqMetadata - const newTransformerOutput = await transformer.processRouterDest(cloneDeep(dataPoint.input), { features: { [FEATURE_FILTER_CODE]: true } }); - // invalid reqMetadata - const invalidRequestMetadataOutput = await transformer.processRouterDest(cloneDeep(dataPoint.input), [{ features: { [FEATURE_FILTER_CODE]: true } }]); - - expect(oldTransformerOutput).toEqual(dataPoint.oldTransformerOutput); - expect(newTransformerOutput).toEqual(dataPoint.newTransformerOutput); - expect(invalidRequestMetadataOutput).toEqual(dataPoint.oldTransformerOutput); - }); - }); - }); -}); diff --git a/test/__tests__/clevertap.test.js b/test/__tests__/clevertap.test.js deleted file mode 100644 index 1a07c2f6bc..0000000000 --- a/test/__tests__/clevertap.test.js +++ /dev/null @@ -1,49 +0,0 @@ -const integration = "clevertap"; -const name = "Clever Tap"; - -const fs = require("fs"); -const path = require("path"); - -const version = "v0"; - -const transformer = require(`../../src/${version}/destinations/${integration}/transform`); -const inputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_input.json`) -); -const outputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_output.json`) -); -const inputData = JSON.parse(inputDataFile); -const expectedData = JSON.parse(outputDataFile); - -// Router Test Data -const inputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_input.json`) -); -const outputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_output.json`) -); -const inputRouterData = JSON.parse(inputRouterDataFile); -const expectedRouterData = JSON.parse(outputRouterDataFile); - -describe(`${name} Tests`, () => { - describe("Processor Tests", () => { - inputData.forEach((input, index) => { - it(`${name} - payload: ${index}`, async () => { - try { - const output = await transformer.process(input); - expect(output).toEqual(expectedData[index]); - } catch (error) { - expect(error.message).toEqual(expectedData[index].error); - } - }); - }); - }); - - describe("Router Tests", () => { - it("Payload", async () => { - const routerOutput = await transformer.processRouterDest(inputRouterData, {namespace: 'unknown', cluster: 'unknown'}); - expect(routerOutput).toEqual(expectedRouterData); - }); - }); -}); diff --git a/test/__tests__/data/am_batch_input.json b/test/__tests__/data/am_batch_input.json deleted file mode 100644 index 5b0440babf..0000000000 --- a/test/__tests__/data/am_batch_input.json +++ /dev/null @@ -1,1919 +0,0 @@ -[ - [ - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "ip": "0.0.0.0", - "time": 1603132665557, - "os_name": "", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "library": "rudderstack", - "event_type": "$identify", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "user_properties": { - "name": "some campaign", - "plan": "Open source", - "term": "keyword", - "test": "other value", - "email": "test@rudderstack.com", - "logins": 5, - "medium": "medium", - "source": "google", - "content": "some content", - "category": "SampleIdentify", - "createdAt": 1599264000 - } - } - ], - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "options": { - "min_id_length": 1 - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api.eu.amplitude.com/2/httpapi" - }, - "metadata": { - "job_id": 1 - }, - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "EU" - } - } - } - ], - [ - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "ip": "0.0.0.0", - "time": 1603132665557, - "os_name": "", - "user_id": "123", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "$identify", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "user_properties": { - "name": "some campaign", - "plan": "Open source", - "term": "keyword", - "test": "other value", - "email": "test@rudderstack.com", - "logins": 5, - "medium": "medium", - "source": "google", - "content": "some content", - "category": "SampleIdentify", - "createdAt": 1599264000 - } - } - ], - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "options": { - "min_id_length": 1 - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api.eu.amplitude.com/2/httpapi" - }, - "metadata": { - "job_id": 1 - }, - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "EU" - } - } - }, - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "ip": "[::1]", - "time": 1603132712347, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "Simple track call", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "event_properties": { - "key": "val" - } - } - ], - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "options": { - "min_id_length": 1 - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api2.amplitude.com/2/httpapi" - }, - "metadata": { - "job_id": 2 - }, - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "ip": "[::1]", - "time": 1603132719505, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "Simple track call", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "event_properties": { - "key": "val" - } - } - ], - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "options": { - "min_id_length": 1 - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api2.amplitude.com/2/httpapi" - }, - "metadata": { - "job_id": 3 - }, - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "ip": "[::1]", - "time": 1603132726413, - "groups": { - "Company": "Comapny-ABC" - }, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "$identify", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "user_properties": { - "Company": "Comapny-ABC" - } - } - ], - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "options": { - "min_id_length": 1 - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api2.amplitude.com/2/httpapi" - }, - "metadata": { - "job_id": 4 - }, - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "ip": "[::1]", - "time": 1603132726413, - "groups": { - "Company": "Comapny-ABC" - }, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "$identify", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "user_properties": { - "Company": "Comapny-ABC" - } - } - ], - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "options": { - "min_id_length": 1 - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api2.amplitude.com/2/httpapi" - }, - "metadata": { - "job_id": 5 - }, - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "identification": [ - "{\"group_type\":\"Company\",\"group_value\":\"Comapny-ABC\",\"group_properties\":{\"KEY_2\":{\"CHILD_KEY_102\":\"value_103\",\"CHILD_KEY_92\":\"value_95\"},\"KEY_3\":{\"CHILD_KEY_102\":\"value_103\",\"CHILD_KEY_92\":\"value_95\"},\"name_trait\":\"Company\",\"value_trait\":\"Comapny-ABC\"}}" - ] - }, - "JSON": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": {}, - "version": "1", - "endpoint": "https://api2.amplitude.com/groupidentify" - }, - "metadata": { - "job_id": 6 - }, - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "mapping": ["{\"global_user_id\":\"newUserIdAlias\",\"user_id\":\"sampleusrRudder3\"}"] - }, - "JSON": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": {}, - "version": "1", - "endpoint": "https://api2.amplitude.com/usermap" - }, - "metadata": { - "job_id": 7 - }, - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - } - ], - [ - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": { - "ip": "0.0.0.0", - "time": 1603132665557, - "os_name": "", - "user_id": "123", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "$identify", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "user_properties": { - "name": "some campaign", - "plan": "Open source", - "term": "keyword", - "test": "other value", - "email": "test@rudderstack.com", - "logins": 5, - "medium": "medium", - "source": "google", - "content": "some content", - "category": "SampleIdentify", - "createdAt": 1599264000 - } - }, - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "options": { - "min_id_length": 1 - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api2.amplitude.com/2/httpapi" - }, - "metadata": { - "job_id": 1 - }, - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": { - "ip": "[::1]", - "time": 1603132712347, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "Simple track call", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "event_properties": { - "key": "val" - } - }, - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "options": { - "min_id_length": 1 - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api2.amplitude.com/2/httpapi" - }, - "metadata": { - "job_id": 2 - }, - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": { - "ip": "[::1]", - "time": 1603132719505, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "Simple track call", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "event_properties": { - "key": "val" - } - }, - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "options": { - "min_id_length": 1 - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api2.amplitude.com/2/httpapi" - }, - "metadata": { - "job_id": 3 - }, - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": { - "ip": "[::1]", - "time": 1603132726413, - "groups": { - "Company": "Comapny-ABC" - }, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "$identify", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "user_properties": { - "Company": "Comapny-ABC" - } - }, - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "options": { - "min_id_length": 1 - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api2.amplitude.com/2/httpapi" - }, - "metadata": { - "job_id": 4 - }, - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": { - "ip": "[::1]", - "time": 1603132726413, - "groups": { - "Company": "Comapny-ABC" - }, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "$identify", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "user_properties": { - "Company": "Comapny-ABC" - } - }, - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "options": { - "min_id_length": 1 - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api2.amplitude.com/2/httpapi" - }, - "metadata": { - "job_id": 5 - }, - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "identification": [ - "{\"group_type\":\"Company\",\"group_value\":\"Comapny-ABC\",\"group_properties\":{\"KEY_2\":{\"CHILD_KEY_102\":\"value_103\",\"CHILD_KEY_92\":\"value_95\"},\"KEY_3\":{\"CHILD_KEY_102\":\"value_103\",\"CHILD_KEY_92\":\"value_95\"},\"name_trait\":\"Company\",\"value_trait\":\"Comapny-ABC\"}}" - ] - }, - "JSON": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": {}, - "version": "1", - "endpoint": "https://api2.amplitude.com/groupidentify" - }, - "metadata": { - "job_id": 6 - }, - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "mapping": ["{\"global_user_id\":\"newUserIdAlias\",\"user_id\":\"sampleusrRudder3\"}"] - }, - "JSON": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": {}, - "version": "1", - "endpoint": "https://api2.amplitude.com/usermap" - }, - "metadata": { - "job_id": 7 - }, - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - } - ], - [ - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": { - "ip": "[::1]", - "time": 1565586510909, - "carrier": "Android", - "app_name": "RudderAndroidClient", - "language": "en-US", - "device_id": "anon_id", - "library": "rudderstack", - "insert_id": "dd4c4493-a3ff-49c9-9071-6cb72e37cd55", - "event_type": "Demo Track", - "session_id": -1, - "app_version": "1.0", - "device_model": "Android SDK built for x86", - "event_properties": { - "label": "Demo Label", - "value": 5, - "category": "Demo Category" - }, - "device_manufacturer": "Google" - }, - "api_key": "afasf", - "options": { - "min_id_length": 1 - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "anon_id", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api2.amplitude.com/2/httpapi" - }, - "metadata": { - "userId": "90ca6da0-292e-4e79-9880-f8009e0ae4a3", - "jobId": 12, - "sourceId": "1fMCVYZboDlYlauh4GFsEo2JU77", - "destinationId": "1gXSYmSd7vkfFfJ4vtMCL0i43Lb", - "attemptNum": 0, - "receivedAt": "2020-10-20T23:47:29.633+05:30", - "createdAt": "2020-10-20T18:17:32.465Z" - }, - "destination": { - "ID": "1iuPwfigf4Fk5F5OBF2T3EVTGlY", - "Name": "braze dev", - "DestinationDefinition": { - "ID": "1XQoHKJnI6Uf67wN20RlvAQSUB9", - "Name": "BRAZE", - "DisplayName": "Braze", - "Config": { - "destConfig": { - "android": ["useNativeSDK"], - "defaultConfig": ["appKey", "dataCenter", "restApiKey"], - "ios": ["useNativeSDK"], - "web": ["useNativeSDK"] - }, - "excludeKeys": [], - "includeKeys": ["appKey", "dataCenter"], - "secretKeys": ["restApiKey"], - "supportedSourceTypes": [ - "android", - "ios", - "web", - "unity", - "amp", - "cloud", - "reactnative" - ] - } - }, - "Config": { - "appKey": "asdf", - "dataCenter": "asdfasdf", - "residencyServer": "standard" - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": false - } - }, - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": { - "ip": "[::1]", - "time": 1565586510909, - "carrier": "Android", - "app_name": "RudderAndroidClient", - "language": "en-US", - "device_id": "anon_id", - "library": "rudderstack", - "insert_id": "69283c05-bbe9-4aba-bb98-3f065d39cf54", - "event_type": "Demo Track", - "session_id": -1, - "app_version": "1.0", - "device_model": "Android SDK built for x86", - "event_properties": { - "label": "Demo Label", - "value": 5, - "category": "Demo Category" - }, - "device_manufacturer": "Google" - }, - "api_key": "afasf", - "options": { - "min_id_length": 1 - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "anon_id", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api2.amplitude.com/2/httpapi" - }, - "metadata": { - "userId": "90ca6da0-292e-4e79-9880-f8009e0ae4a3", - "jobId": 13, - "sourceId": "1fMCVYZboDlYlauh4GFsEo2JU77", - "destinationId": "1gXSYmSd7vkfFfJ4vtMCL0i43Lb", - "attemptNum": 0, - "receivedAt": "2020-10-20T23:47:29.914+05:30", - "createdAt": "2020-10-20T18:17:32.465Z" - }, - "destination": { - "ID": "1iuPwfigf4Fk5F5OBF2T3EVTGlY", - "Name": "braze dev", - "DestinationDefinition": { - "ID": "1XQoHKJnI6Uf67wN20RlvAQSUB9", - "Name": "BRAZE", - "DisplayName": "Braze", - "Config": { - "destConfig": { - "android": ["useNativeSDK"], - "defaultConfig": ["appKey", "dataCenter", "restApiKey"], - "ios": ["useNativeSDK"], - "web": ["useNativeSDK"] - }, - "excludeKeys": [], - "includeKeys": ["appKey", "dataCenter"], - "secretKeys": ["restApiKey"], - "supportedSourceTypes": [ - "android", - "ios", - "web", - "unity", - "amp", - "cloud", - "reactnative" - ] - } - }, - "Config": { - "appKey": "asdf", - "dataCenter": "asdfasdf", - "residencyServer": "standard" - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": false - } - }, - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": { - "ip": "[::1]", - "time": 1565586510909, - "carrier": "Android", - "app_name": "RudderAndroidClient", - "language": "en-US", - "device_id": "anon_id", - "library": "rudderstack", - "insert_id": "39f7a1fa-ff79-4fd1-a329-d637f018de7e", - "event_type": "Demo Track", - "session_id": -1, - "app_version": "1.0", - "device_model": "Android SDK built for x86", - "event_properties": { - "label": "Demo Label", - "value": 5, - "category": "Demo Category" - }, - "device_manufacturer": "Google" - }, - "api_key": "afasf", - "options": { - "min_id_length": 1 - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "anon_id", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api2.amplitude.com/2/httpapi" - }, - "metadata": { - "userId": "90ca6da0-292e-4e79-9880-f8009e0ae4a3", - "jobId": 14, - "sourceId": "1fMCVYZboDlYlauh4GFsEo2JU77", - "destinationId": "1gXSYmSd7vkfFfJ4vtMCL0i43Lb", - "attemptNum": 0, - "receivedAt": "2020-10-20T23:47:30.166+05:30", - "createdAt": "2020-10-20T18:17:32.465Z" - }, - "destination": { - "ID": "1iuPwfigf4Fk5F5OBF2T3EVTGlY", - "Name": "braze dev", - "DestinationDefinition": { - "ID": "1XQoHKJnI6Uf67wN20RlvAQSUB9", - "Name": "BRAZE", - "DisplayName": "Braze", - "Config": { - "destConfig": { - "android": ["useNativeSDK"], - "defaultConfig": ["appKey", "dataCenter", "restApiKey"], - "ios": ["useNativeSDK"], - "web": ["useNativeSDK"] - }, - "excludeKeys": [], - "includeKeys": ["appKey", "dataCenter"], - "secretKeys": ["restApiKey"], - "supportedSourceTypes": [ - "android", - "ios", - "web", - "unity", - "amp", - "cloud", - "reactnative" - ] - } - }, - "Config": { - "appKey": "asdf", - "dataCenter": "asdfasdf", - "residencyServer": "standard" - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": false - } - }, - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": { - "ip": "[::1]", - "time": 1565586510909, - "carrier": "Android", - "app_name": "RudderAndroidClient", - "language": "en-US", - "device_id": "anon_id", - "library": "rudderstack", - "insert_id": "4314aa01-46a3-4f45-b67d-debe4bc01717", - "event_type": "Demo Track", - "session_id": -1, - "app_version": "1.0", - "device_model": "Android SDK built for x86", - "event_properties": { - "label": "Demo Label", - "value": 5, - "category": "Demo Category" - }, - "device_manufacturer": "Google" - }, - "api_key": "afasf", - "options": { - "min_id_length": 1 - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "anon_id", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api2.amplitude.com/2/httpapi" - }, - "metadata": { - "userId": "90ca6da0-292e-4e79-9880-f8009e0ae4a3", - "jobId": 15, - "sourceId": "1fMCVYZboDlYlauh4GFsEo2JU77", - "destinationId": "1gXSYmSd7vkfFfJ4vtMCL0i43Lb", - "attemptNum": 0, - "receivedAt": "2020-10-20T23:47:30.424+05:30", - "createdAt": "2020-10-20T18:17:32.465Z" - }, - "destination": { - "ID": "1iuPwfigf4Fk5F5OBF2T3EVTGlY", - "Name": "braze dev", - "DestinationDefinition": { - "ID": "1XQoHKJnI6Uf67wN20RlvAQSUB9", - "Name": "BRAZE", - "DisplayName": "Braze", - "Config": { - "destConfig": { - "android": ["useNativeSDK"], - "defaultConfig": ["appKey", "dataCenter", "restApiKey"], - "ios": ["useNativeSDK"], - "web": ["useNativeSDK"] - }, - "excludeKeys": [], - "includeKeys": ["appKey", "dataCenter"], - "secretKeys": ["restApiKey"], - "supportedSourceTypes": [ - "android", - "ios", - "web", - "unity", - "amp", - "cloud", - "reactnative" - ] - } - }, - "Config": { - "appKey": "asdf", - "dataCenter": "asdfasdf", - "residencyServer": "standard" - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": false - } - }, - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": { - "ip": "[::1]", - "time": 1565586510909, - "carrier": "Android", - "app_name": "RudderAndroidClient", - "language": "en-US", - "device_id": "anon_id", - "library": "rudderstack", - "insert_id": "4d958d40-2762-44aa-bf83-d47f881bc615", - "event_type": "Demo Track", - "session_id": -1, - "app_version": "1.0", - "device_model": "Android SDK built for x86", - "event_properties": { - "label": "Demo Label", - "value": 5, - "category": "Demo Category" - }, - "device_manufacturer": "Google" - }, - "api_key": "afasf", - "options": { - "min_id_length": 1 - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "anon_id", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api2.amplitude.com/2/httpapi" - }, - "metadata": { - "userId": "90ca6da0-292e-4e79-9880-f8009e0ae4a3", - "jobId": 16, - "sourceId": "1fMCVYZboDlYlauh4GFsEo2JU77", - "destinationId": "1gXSYmSd7vkfFfJ4vtMCL0i43Lb", - "attemptNum": 0, - "receivedAt": "2020-10-20T23:47:30.668+05:30", - "createdAt": "2020-10-20T18:17:32.465Z" - }, - "destination": { - "ID": "1iuPwfigf4Fk5F5OBF2T3EVTGlY", - "Name": "braze dev", - "DestinationDefinition": { - "ID": "1XQoHKJnI6Uf67wN20RlvAQSUB9", - "Name": "BRAZE", - "DisplayName": "Braze", - "Config": { - "destConfig": { - "android": ["useNativeSDK"], - "defaultConfig": ["appKey", "dataCenter", "restApiKey"], - "ios": ["useNativeSDK"], - "web": ["useNativeSDK"] - }, - "excludeKeys": [], - "includeKeys": ["appKey", "dataCenter"], - "secretKeys": ["restApiKey"], - "supportedSourceTypes": [ - "android", - "ios", - "web", - "unity", - "amp", - "cloud", - "reactnative" - ] - } - }, - "Config": { - "appKey": "asdf", - "dataCenter": "asdfasdf", - "residencyServer": "standard" - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": false - } - } - ], - [ - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "ip": "0.0.0.0", - "time": 1603132665557, - "os_name": "", - "user_id": "123", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "$identify", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "user_properties": { - "name": "some campaign", - "plan": "Open source", - "term": "keyword", - "test": "other value", - "email": "test@rudderstack.com", - "logins": 5, - "medium": "medium", - "source": "google", - "content": "some content", - "category": "SampleIdentify", - "createdAt": 1599264000 - } - } - ], - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "options": { - "min_id_length": 1 - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api2.amplitude.com/2/httpapi" - }, - "metadata": { - "job_id": 1 - }, - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "ip": "[::1]", - "time": 1603132712347, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "Simple track call", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "event_properties": { - "key": "val" - } - } - ], - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "options": { - "min_id_length": 1 - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api2.amplitude.com/2/httpapi" - }, - "metadata": { - "job_id": 2 - }, - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "ip": "[::1]", - "time": 1603132719505, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "Simple track call", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "event_properties": { - "key": "val" - } - } - ], - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "options": { - "min_id_length": 1 - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api2.amplitude.com/2/httpapi" - }, - "metadata": { - "job_id": 3 - }, - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "ip": "[::1]", - "time": 1603132726413, - "groups": { - "Company": "Comapny-ABC" - }, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "$identify", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "user_properties": { - "Company": "Comapny-ABC" - } - } - ], - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "options": { - "min_id_length": 1 - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api2.amplitude.com/2/httpapi" - }, - "metadata": { - "job_id": 4 - }, - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "ip": "[::1]", - "time": 1603132726413, - "groups": { - "Company": "Comapny-ABC" - }, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "$identify", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "user_properties": { - "Company": "Comapny-ABC" - } - } - ], - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "options": { - "min_id_length": 1 - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api2.amplitude.com/2/httpapi" - }, - "metadata": { - "job_id": 5 - }, - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "identification": [ - "{\"group_type\":\"Company\",\"group_value\":\"Comapny-ABC\",\"group_properties\":{\"KEY_2\":{\"CHILD_KEY_102\":\"value_103\",\"CHILD_KEY_92\":\"value_95\"},\"KEY_3\":{\"CHILD_KEY_102\":\"value_103\",\"CHILD_KEY_92\":\"value_95\"},\"name_trait\":\"Company\",\"value_trait\":\"Comapny-ABC\"}}" - ] - }, - "JSON": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": {}, - "version": "1", - "endpoint": "https://api2.amplitude.com/groupidentify" - }, - "metadata": { - "job_id": 6 - }, - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "mapping": ["{\"global_user_id\":\"newUserIdAlias\",\"user_id\":\"sampleusrRudder3\"}"] - }, - "JSON": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": {}, - "version": "1", - "endpoint": "https://api2.amplitude.com/usermap" - }, - "metadata": { - "job_id": 7 - }, - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - } - ], - [ - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "ip": "0.0.0.0", - "time": 1603132665557, - "os_name": "", - "user_id": "123", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "library": "rudderstack", - "event_type": "$identify", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "user_properties": { - "name": "some campaign", - "plan": "Open source", - "term": "keyword", - "test": "other value", - "email": "test@rudderstack.com", - "logins": 5, - "medium": "medium", - "source": "google", - "content": "some content", - "category": "SampleIdentify", - "createdAt": 1599264000 - } - } - ], - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "options": { - "min_id_length": 1 - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api2.amplitude.com/2/httpapi" - }, - "metadata": { - "job_id": 1 - }, - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "ip": "[::1]", - "time": 1603132712347, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "Simple track call", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "event_properties": { - "key": "val" - } - } - ], - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "options": { - "min_id_length": 1 - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api2.amplitude.com/2/httpapi" - }, - "metadata": { - "job_id": 2 - }, - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "ip": "[::1]", - "time": 1603132719505, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "Simple track call", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "event_properties": { - "key": "val" - } - } - ], - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "options": { - "min_id_length": 1 - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api2.amplitude.com/2/httpapi" - }, - "metadata": { - "job_id": 3 - }, - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "ip": "[::1]", - "time": 1603132726413, - "groups": { - "Company": "Comapny-ABC" - }, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "$identify", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "user_properties": { - "Company": "Comapny-ABC" - } - } - ], - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "options": { - "min_id_length": 1 - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api2.amplitude.com/2/httpapi" - }, - "metadata": { - "job_id": 4 - }, - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "ip": "[::1]", - "time": 1603132726413, - "groups": { - "Company": "Comapny-ABC" - }, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "$identify", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "user_properties": { - "Company": "Comapny-ABC" - } - } - ], - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "options": { - "min_id_length": 1 - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api2.amplitude.com/2/httpapi" - }, - "metadata": { - "job_id": 5 - }, - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "identification": [ - "{\"group_type\":\"Company\",\"group_value\":\"Comapny-ABC\",\"group_properties\":{\"KEY_2\":{\"CHILD_KEY_102\":\"value_103\",\"CHILD_KEY_92\":\"value_95\"},\"KEY_3\":{\"CHILD_KEY_102\":\"value_103\",\"CHILD_KEY_92\":\"value_95\"},\"name_trait\":\"Company\",\"value_trait\":\"Comapny-ABC\"}}" - ] - }, - "JSON": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": {}, - "version": "1", - "endpoint": "https://api2.amplitude.com/groupidentify" - }, - "metadata": { - "job_id": 6 - }, - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "mapping": ["{\"global_user_id\":\"newUserIdAlias\",\"user_id\":\"sampleusrRudder3\"}"] - }, - "JSON": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": {}, - "version": "1", - "endpoint": "https://api2.amplitude.com/usermap" - }, - "metadata": { - "job_id": 7 - }, - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - } - ] -] diff --git a/test/__tests__/data/am_batch_output.json b/test/__tests__/data/am_batch_output.json deleted file mode 100644 index 32735b000f..0000000000 --- a/test/__tests__/data/am_batch_output.json +++ /dev/null @@ -1,1229 +0,0 @@ -[ - [ - { - "batched": false, - "error": "Both userId and deviceId cannot be undefined", - "metadata": { - "job_id": 1 - }, - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation" - }, - "statusCode": 400 - } - ], - [ - { - "batchedRequest": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "ip": "0.0.0.0", - "time": 1603132665557, - "os_name": "", - "user_id": "123", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "$identify", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "user_properties": { - "name": "some campaign", - "plan": "Open source", - "term": "keyword", - "test": "other value", - "email": "test@rudderstack.com", - "logins": 5, - "medium": "medium", - "source": "google", - "content": "some content", - "category": "SampleIdentify", - "createdAt": 1599264000 - } - } - ], - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "options": { - "min_id_length": 1 - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api.eu.amplitude.com/2/httpapi" - }, - "metadata": [ - { - "job_id": 1 - } - ], - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "EU" - } - } - }, - { - "batchedRequest": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "identification": [ - "{\"group_type\":\"Company\",\"group_value\":\"Comapny-ABC\",\"group_properties\":{\"KEY_2\":{\"CHILD_KEY_102\":\"value_103\",\"CHILD_KEY_92\":\"value_95\"},\"KEY_3\":{\"CHILD_KEY_102\":\"value_103\",\"CHILD_KEY_92\":\"value_95\"},\"name_trait\":\"Company\",\"value_trait\":\"Comapny-ABC\"}}" - ] - }, - "JSON": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": {}, - "version": "1", - "endpoint": "https://api2.amplitude.com/groupidentify" - }, - "metadata": [ - { - "job_id": 6 - } - ], - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "batchedRequest": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "mapping": [ - "{\"global_user_id\":\"newUserIdAlias\",\"user_id\":\"sampleusrRudder3\"}" - ] - }, - "JSON": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": {}, - "version": "1", - "endpoint": "https://api2.amplitude.com/usermap" - }, - "metadata": [ - { - "job_id": 7 - } - ], - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "batchedRequest": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "ip": "[::1]", - "time": 1603132712347, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "Simple track call", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "event_properties": { - "key": "val" - } - }, - { - "ip": "[::1]", - "time": 1603132719505, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "Simple track call", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "event_properties": { - "key": "val" - } - }, - { - "ip": "[::1]", - "time": 1603132726413, - "groups": { - "Company": "Comapny-ABC" - }, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "$identify", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "user_properties": { - "Company": "Comapny-ABC" - } - }, - { - "ip": "[::1]", - "time": 1603132726413, - "groups": { - "Company": "Comapny-ABC" - }, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "$identify", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "user_properties": { - "Company": "Comapny-ABC" - } - } - ], - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85" - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api2.amplitude.com/batch" - }, - "metadata": [ - { - "job_id": 2 - }, - { - "job_id": 3 - }, - { - "job_id": 4 - }, - { - "job_id": 5 - } - ], - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - } - ], - [ - { - "batchedRequest": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": { - "ip": "0.0.0.0", - "time": 1603132665557, - "os_name": "", - "user_id": "123", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "$identify", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "user_properties": { - "name": "some campaign", - "plan": "Open source", - "term": "keyword", - "test": "other value", - "email": "test@rudderstack.com", - "logins": 5, - "medium": "medium", - "source": "google", - "content": "some content", - "category": "SampleIdentify", - "createdAt": 1599264000 - } - }, - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "options": { - "min_id_length": 1 - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api2.amplitude.com/2/httpapi" - }, - "metadata": [ - { - "job_id": 1 - } - ], - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "batchedRequest": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "identification": [ - "{\"group_type\":\"Company\",\"group_value\":\"Comapny-ABC\",\"group_properties\":{\"KEY_2\":{\"CHILD_KEY_102\":\"value_103\",\"CHILD_KEY_92\":\"value_95\"},\"KEY_3\":{\"CHILD_KEY_102\":\"value_103\",\"CHILD_KEY_92\":\"value_95\"},\"name_trait\":\"Company\",\"value_trait\":\"Comapny-ABC\"}}" - ] - }, - "JSON": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": {}, - "version": "1", - "endpoint": "https://api2.amplitude.com/groupidentify" - }, - "metadata": [ - { - "job_id": 6 - } - ], - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "batchedRequest": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "mapping": [ - "{\"global_user_id\":\"newUserIdAlias\",\"user_id\":\"sampleusrRudder3\"}" - ] - }, - "JSON": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": {}, - "version": "1", - "endpoint": "https://api2.amplitude.com/usermap" - }, - "metadata": [ - { - "job_id": 7 - } - ], - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "batchedRequest": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "ip": "[::1]", - "time": 1603132712347, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "Simple track call", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "event_properties": { - "key": "val" - } - }, - { - "ip": "[::1]", - "time": 1603132719505, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "Simple track call", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "event_properties": { - "key": "val" - } - }, - { - "ip": "[::1]", - "time": 1603132726413, - "groups": { - "Company": "Comapny-ABC" - }, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "$identify", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "user_properties": { - "Company": "Comapny-ABC" - } - }, - { - "ip": "[::1]", - "time": 1603132726413, - "groups": { - "Company": "Comapny-ABC" - }, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "$identify", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "user_properties": { - "Company": "Comapny-ABC" - } - } - ], - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85" - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api2.amplitude.com/batch" - }, - "metadata": [ - { - "job_id": 2 - }, - { - "job_id": 3 - }, - { - "job_id": 4 - }, - { - "job_id": 5 - } - ], - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - } - ], - [ - { - "batchedRequest": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "ip": "[::1]", - "time": 1565586510909, - "carrier": "Android", - "app_name": "RudderAndroidClient", - "language": "en-US", - "device_id": "anon_id", - "library": "rudderstack", - "insert_id": "dd4c4493-a3ff-49c9-9071-6cb72e37cd55", - "event_type": "Demo Track", - "session_id": -1, - "app_version": "1.0", - "device_model": "Android SDK built for x86", - "event_properties": { - "label": "Demo Label", - "value": 5, - "category": "Demo Category" - }, - "device_manufacturer": "Google" - }, - { - "ip": "[::1]", - "time": 1565586510909, - "carrier": "Android", - "app_name": "RudderAndroidClient", - "language": "en-US", - "device_id": "anon_id", - "library": "rudderstack", - "insert_id": "69283c05-bbe9-4aba-bb98-3f065d39cf54", - "event_type": "Demo Track", - "session_id": -1, - "app_version": "1.0", - "device_model": "Android SDK built for x86", - "event_properties": { - "label": "Demo Label", - "value": 5, - "category": "Demo Category" - }, - "device_manufacturer": "Google" - }, - { - "ip": "[::1]", - "time": 1565586510909, - "carrier": "Android", - "app_name": "RudderAndroidClient", - "language": "en-US", - "device_id": "anon_id", - "library": "rudderstack", - "insert_id": "39f7a1fa-ff79-4fd1-a329-d637f018de7e", - "event_type": "Demo Track", - "session_id": -1, - "app_version": "1.0", - "device_model": "Android SDK built for x86", - "event_properties": { - "label": "Demo Label", - "value": 5, - "category": "Demo Category" - }, - "device_manufacturer": "Google" - }, - { - "ip": "[::1]", - "time": 1565586510909, - "carrier": "Android", - "app_name": "RudderAndroidClient", - "language": "en-US", - "device_id": "anon_id", - "library": "rudderstack", - "insert_id": "4314aa01-46a3-4f45-b67d-debe4bc01717", - "event_type": "Demo Track", - "session_id": -1, - "app_version": "1.0", - "device_model": "Android SDK built for x86", - "event_properties": { - "label": "Demo Label", - "value": 5, - "category": "Demo Category" - }, - "device_manufacturer": "Google" - }, - { - "ip": "[::1]", - "time": 1565586510909, - "carrier": "Android", - "app_name": "RudderAndroidClient", - "language": "en-US", - "device_id": "anon_id", - "library": "rudderstack", - "insert_id": "4d958d40-2762-44aa-bf83-d47f881bc615", - "event_type": "Demo Track", - "session_id": -1, - "app_version": "1.0", - "device_model": "Android SDK built for x86", - "event_properties": { - "label": "Demo Label", - "value": 5, - "category": "Demo Category" - }, - "device_manufacturer": "Google" - } - ], - "api_key": "afasf" - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "anon_id", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api2.amplitude.com/batch" - }, - "metadata": [ - { - "userId": "90ca6da0-292e-4e79-9880-f8009e0ae4a3", - "jobId": 12, - "sourceId": "1fMCVYZboDlYlauh4GFsEo2JU77", - "destinationId": "1gXSYmSd7vkfFfJ4vtMCL0i43Lb", - "attemptNum": 0, - "receivedAt": "2020-10-20T23:47:29.633+05:30", - "createdAt": "2020-10-20T18:17:32.465Z" - }, - { - "userId": "90ca6da0-292e-4e79-9880-f8009e0ae4a3", - "jobId": 13, - "sourceId": "1fMCVYZboDlYlauh4GFsEo2JU77", - "destinationId": "1gXSYmSd7vkfFfJ4vtMCL0i43Lb", - "attemptNum": 0, - "receivedAt": "2020-10-20T23:47:29.914+05:30", - "createdAt": "2020-10-20T18:17:32.465Z" - }, - { - "userId": "90ca6da0-292e-4e79-9880-f8009e0ae4a3", - "jobId": 14, - "sourceId": "1fMCVYZboDlYlauh4GFsEo2JU77", - "destinationId": "1gXSYmSd7vkfFfJ4vtMCL0i43Lb", - "attemptNum": 0, - "receivedAt": "2020-10-20T23:47:30.166+05:30", - "createdAt": "2020-10-20T18:17:32.465Z" - }, - { - "userId": "90ca6da0-292e-4e79-9880-f8009e0ae4a3", - "jobId": 15, - "sourceId": "1fMCVYZboDlYlauh4GFsEo2JU77", - "destinationId": "1gXSYmSd7vkfFfJ4vtMCL0i43Lb", - "attemptNum": 0, - "receivedAt": "2020-10-20T23:47:30.424+05:30", - "createdAt": "2020-10-20T18:17:32.465Z" - }, - { - "userId": "90ca6da0-292e-4e79-9880-f8009e0ae4a3", - "jobId": 16, - "sourceId": "1fMCVYZboDlYlauh4GFsEo2JU77", - "destinationId": "1gXSYmSd7vkfFfJ4vtMCL0i43Lb", - "attemptNum": 0, - "receivedAt": "2020-10-20T23:47:30.668+05:30", - "createdAt": "2020-10-20T18:17:32.465Z" - } - ], - "destination": { - "ID": "1iuPwfigf4Fk5F5OBF2T3EVTGlY", - "Name": "braze dev", - "DestinationDefinition": { - "ID": "1XQoHKJnI6Uf67wN20RlvAQSUB9", - "Name": "BRAZE", - "DisplayName": "Braze", - "Config": { - "destConfig": { - "android": [ - "useNativeSDK" - ], - "defaultConfig": [ - "appKey", - "dataCenter", - "restApiKey" - ], - "ios": [ - "useNativeSDK" - ], - "web": [ - "useNativeSDK" - ] - }, - "excludeKeys": [], - "includeKeys": [ - "appKey", - "dataCenter" - ], - "secretKeys": [ - "restApiKey" - ], - "supportedSourceTypes": [ - "android", - "ios", - "web", - "unity", - "amp", - "cloud", - "reactnative" - ] - } - }, - "Config": { - "appKey": "asdf", - "dataCenter": "asdfasdf", - "residencyServer": "standard" - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": false - } - } - ], - [ - { - "batchedRequest": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "identification": [ - "{\"group_type\":\"Company\",\"group_value\":\"Comapny-ABC\",\"group_properties\":{\"KEY_2\":{\"CHILD_KEY_102\":\"value_103\",\"CHILD_KEY_92\":\"value_95\"},\"KEY_3\":{\"CHILD_KEY_102\":\"value_103\",\"CHILD_KEY_92\":\"value_95\"},\"name_trait\":\"Company\",\"value_trait\":\"Comapny-ABC\"}}" - ] - }, - "JSON": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": {}, - "version": "1", - "endpoint": "https://api2.amplitude.com/groupidentify" - }, - "metadata": [ - { - "job_id": 6 - } - ], - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "batchedRequest": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "mapping": [ - "{\"global_user_id\":\"newUserIdAlias\",\"user_id\":\"sampleusrRudder3\"}" - ] - }, - "JSON": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": {}, - "version": "1", - "endpoint": "https://api2.amplitude.com/usermap" - }, - "metadata": [ - { - "job_id": 7 - } - ], - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "batchedRequest": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "ip": "0.0.0.0", - "time": 1603132665557, - "os_name": "", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "$identify", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "user_properties": { - "name": "some campaign", - "plan": "Open source", - "term": "keyword", - "test": "other value", - "email": "test@rudderstack.com", - "logins": 5, - "medium": "medium", - "source": "google", - "content": "some content", - "category": "SampleIdentify", - "createdAt": 1599264000 - } - }, - { - "ip": "[::1]", - "time": 1603132712347, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "Simple track call", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "event_properties": { - "key": "val" - } - }, - { - "ip": "[::1]", - "time": 1603132719505, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "Simple track call", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "event_properties": { - "key": "val" - } - }, - { - "ip": "[::1]", - "time": 1603132726413, - "groups": { - "Company": "Comapny-ABC" - }, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "$identify", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "user_properties": { - "Company": "Comapny-ABC" - } - }, - { - "ip": "[::1]", - "time": 1603132726413, - "groups": { - "Company": "Comapny-ABC" - }, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "$identify", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "user_properties": { - "Company": "Comapny-ABC" - } - } - ], - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85" - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api2.amplitude.com/batch" - }, - "metadata": [ - { - "job_id": 1 - }, - { - "job_id": 2 - }, - { - "job_id": 3 - }, - { - "job_id": 4 - }, - { - "job_id": 5 - } - ], - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - } - ], - [ - { - "batchedRequest": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "ip": "0.0.0.0", - "time": 1603132665557, - "os_name": "", - "user_id": "123", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "library": "rudderstack", - "event_type": "$identify", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "user_properties": { - "name": "some campaign", - "plan": "Open source", - "term": "keyword", - "test": "other value", - "email": "test@rudderstack.com", - "logins": 5, - "medium": "medium", - "source": "google", - "content": "some content", - "category": "SampleIdentify", - "createdAt": 1599264000 - } - } - ], - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "options": { - "min_id_length": 1 - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api2.amplitude.com/2/httpapi" - }, - "metadata": [ - { - "job_id": 1 - } - ], - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "batchedRequest": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "identification": [ - "{\"group_type\":\"Company\",\"group_value\":\"Comapny-ABC\",\"group_properties\":{\"KEY_2\":{\"CHILD_KEY_102\":\"value_103\",\"CHILD_KEY_92\":\"value_95\"},\"KEY_3\":{\"CHILD_KEY_102\":\"value_103\",\"CHILD_KEY_92\":\"value_95\"},\"name_trait\":\"Company\",\"value_trait\":\"Comapny-ABC\"}}" - ] - }, - "JSON": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": {}, - "version": "1", - "endpoint": "https://api2.amplitude.com/groupidentify" - }, - "metadata": [ - { - "job_id": 6 - } - ], - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "batchedRequest": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "mapping": [ - "{\"global_user_id\":\"newUserIdAlias\",\"user_id\":\"sampleusrRudder3\"}" - ] - }, - "JSON": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": {}, - "version": "1", - "endpoint": "https://api2.amplitude.com/usermap" - }, - "metadata": [ - { - "job_id": 7 - } - ], - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "batchedRequest": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "ip": "[::1]", - "time": 1603132712347, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "Simple track call", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "event_properties": { - "key": "val" - } - }, - { - "ip": "[::1]", - "time": 1603132719505, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "Simple track call", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "event_properties": { - "key": "val" - } - }, - { - "ip": "[::1]", - "time": 1603132726413, - "groups": { - "Company": "Comapny-ABC" - }, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "$identify", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "user_properties": { - "Company": "Comapny-ABC" - } - }, - { - "ip": "[::1]", - "time": 1603132726413, - "groups": { - "Company": "Comapny-ABC" - }, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "$identify", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "user_properties": { - "Company": "Comapny-ABC" - } - } - ], - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85" - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api2.amplitude.com/batch" - }, - "metadata": [ - { - "job_id": 2 - }, - { - "job_id": 3 - }, - { - "job_id": 4 - }, - { - "job_id": 5 - } - ], - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - } - ] -] \ No newline at end of file diff --git a/test/__tests__/data/am_input.json b/test/__tests__/data/am_input.json deleted file mode 100644 index 2eecfb1d2c..0000000000 --- a/test/__tests__/data/am_input.json +++ /dev/null @@ -1,4943 +0,0 @@ -[ - { - "message": { - "type": "track", - "sentAt": "2020-08-14T05:30:30.118Z", - "context": { - "source": "test", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "revenue_type": "Purchased", - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "S3": false, - "All": true - } - }, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "email", - "groupValueTrait": "age", - "trackProductsOnce": true, - "trackRevenuePerProduct": false - } - } - }, - { - "message": { - "type": "UNSUPPORTED-TYPE", - "event": "Order Completed", - "sentAt": "2020-08-14T05:30:30.118Z", - "context": {}, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": {}, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "S3": false, - "All": true - } - }, - "destination": { - "Config": { - "groupTypeTrait": "email", - "apiKey": "abcde", - "groupValueTrait": "age", - "trackProductsOnce": true, - "trackRevenuePerProduct": false - } - } - }, - { - "message": { - "event": "Order Completed", - "sentAt": "2020-08-14T05:30:30.118Z", - "context": {}, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": {}, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "S3": false, - "All": true - } - }, - "destination": { - "Config": { - "groupTypeTrait": "email", - "groupValueTrait": "age", - "trackProductsOnce": true, - "trackRevenuePerProduct": false - } - } - }, - { - "message": { - "type": "track", - "event": "Order Completed", - "sentAt": "2020-08-14T05:30:30.118Z", - "context": { - "source": "test", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "revenue_type": "Purchased", - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "S3": false, - "All": true - } - }, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "email", - "groupValueTrait": "age", - "trackProductsOnce": true, - "trackRevenuePerProduct": false - } - } - }, - { - "message": { - "type": "track", - "event": "Order Completed", - "sentAt": "2020-08-14T05:30:30.118Z", - "context": { - "source": "test", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "products": [ - { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "price": 19, - "category": "Games", - "quantity": 1, - "image_url": "https:///www.example.com/product/path.jpg", - "product_id": "507f1f77bcf86cd799439011" - }, - { - "sku": "46493-32", - "name": "Uno Card Game", - "price": 3, - "category": "Games", - "quantity": 2, - "product_id": "505bd76785ebb509fc183733" - } - ], - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "S3": false, - "All": true - } - }, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "email", - "groupValueTrait": "age", - "trackProductsOnce": true, - "trackRevenuePerProduct": false - } - } - }, - { - "message": { - "channel": "web", - "context": { - "externalId": [ - { - "id": "lynnanderson@smith.net", - "identifierType": "device_id", - "type": "AM-users" - } - ], - "mappedToDestination": "true", - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "anonymousId": "123456", - "email": "test@rudderstack.com", - "address": { - "country": "India", - "postalCode": 712136, - "state": "WB", - "street": "", - "os_version": "test os" - }, - "ip": "0.0.0.0", - "age": 26 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "traits": { - "anonymousId": "123456", - "email": "test@rudderstack.com", - "city": "kolkata", - "address": { - "country": "India", - "postalCode": 712136, - "state": "WB", - "street": "" - }, - "os_version": "test os", - "ip": "0.0.0.0", - "age": 26 - }, - "type": "identify", - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "123456", - "userId": "123456", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "metadata": { - "jobId": 2 - }, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "email", - "groupValueTrait": "age", - "traitsToIncrement": [ - { - "traits": "" - } - ] - } - } - }, - { - "message": { - "channel": "web", - "context": { - "externalId": [ - { - "id": "lynnanderson@smith.net", - "identifierType": "device_id", - "type": "AM-users" - } - ], - "mappedToDestination": "true", - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "anonymousId": "123456", - "email": "test@rudderstack.com", - "address": { - "country": "India", - "postalCode": 712136, - "state": "WB", - "street": "", - "os_version": "test os" - }, - "ip": "0.0.0.0", - "age": 26 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "traits": { - "anonymousId": "123456", - "email": "test@rudderstack.com", - "city": "kolkata", - "address": { - "country": "India", - "postalCode": 712136, - "state": "WB", - "street": "" - }, - "os_version": "test os", - "ip": "0.0.0.0", - "age": 26 - }, - "type": "identify", - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "123456", - "userId": "123456", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "metadata": { - "jobId": 2 - }, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "email", - "groupValueTrait": "age" - } - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "anonymousId": "123456", - "email": "test@rudderstack.com", - "address": { - "city": "kolkata", - "country": "India", - "postalCode": 712136, - "state": "WB", - "street": "" - }, - "ip": "0.0.0.0", - "age": 26 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "type": "identify", - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "123456", - "userId": "123456", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "email", - "groupValueTrait": "age" - } - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "test@rudderstack.com", - "anonymousId": "12345" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "request_ip": "1.1.1.1", - "type": "page", - "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T11:15:18.299Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "properties": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - }, - "integrations": { - "All": true - }, - "name": "ApplicationLoaded", - "sentAt": "2019-10-14T11:15:53.296Z" - }, - "destination": { - "Config": { - "apiKey": "abcde" - } - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "test@rudderstack.com", - "anonymousId": "12345" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "request_ip": "1.1.1.1", - "type": "page", - "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T11:15:18.299Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "properties": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - }, - "integrations": { - "All": false, - "Amplitude": { - "groups": { - "Company": "ABC" - } - } - }, - "name": "ApplicationLoaded", - "sentAt": "2019-10-14T11:15:53.296Z" - }, - "destination": { - "Config": { - "apiKey": "abcde" - } - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "test@rudderstack.com", - "anonymousId": "12345" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "type": "track", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T11:15:18.300Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "event": "test track event", - "properties": { - "user_actual_role": "system_admin", - "user_actual_id": 12345, - "user_time_spent": 50000 - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T11:15:53.296Z" - }, - "destination": { - "Config": { - "apiKey": "abcde" - } - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "address": { - "city": "Sealdah", - "country": "India", - "postalCode": 700014, - "state": "WB", - "street": "" - } - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "traits": { - "anonymousId": "123456", - "email": "test@rudderstack.com", - "address": { - "city": "kolkata", - "country": "India", - "postalCode": 712136, - "state": "WB", - "street": "" - }, - "ip": "0.0.0.0", - "age": 26 - }, - "type": "identify", - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "123456", - "userId": "123456", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "apiKey": "abcde" - } - } - }, - { - "message": { - "type": "identify", - "userId": "ubcdfghi0001", - "anonymousId": "123456", - "session_id": "1598597129", - "context": { - "traits": { - "device_id": "adddd0001", - "device_os": "ios", - "device_make": "apple iphone", - "app_version": "v1.0", - "timestamp": "2020-08-28 09:00:00" - }, - "library": { - "name": "http" - } - } - }, - "destination": { - "Config": { - "apiKey": "abcde" - } - } - }, - { - "message": { - "type": "identify", - "userId": "ubcdfghi0001", - "anonymousId": "123456", - "session_id": "user:1598597129", - "context": { - "traits": { - "device_id": "adddd0001", - "device_os": "ios", - "device_make": "apple iphone", - "app_version": "v1.0", - "timestamp": "2020-08-28 09:00:00" - }, - "library": { - "name": "http" - } - } - }, - "destination": { - "Config": { - "apiKey": "abcde" - } - } - }, - { - "message": { - "type": "identify", - "userId": "ubcdfghi0001", - "anonymousId": "123456", - "session_id": 1598597129, - "context": { - "traits": { - "device_id": "adddd0001", - "device_os": "ios", - "device_make": "apple iphone", - "app_version": "v1.0", - "timestamp": "2020-08-28 09:00:00" - }, - "library": { - "name": "http" - } - } - }, - "destination": { - "Config": { - "apiKey": "abcde" - } - } - }, - { - "message": { - "type": "identify", - "userId": "ubcdfghi0001", - "anonymousId": "123456", - "context": { - "traits": { - "device_id": "adddd0001", - "device_os": "ios", - "device_make": "apple iphone", - "app_version": "v1.0", - "timestamp": "2020-08-28 09:00:00" - }, - "library": { - "name": "http" - } - } - }, - "destination": { - "Config": { - "apiKey": "abcde" - } - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "email": "test@rudderstack.com", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "type": "group", - "messageId": "e5034df0-a404-47b4-a463-76df99934fea", - "originalTimestamp": "2020-10-20T07:54:58.983Z", - "anonymousId": "my-anonymous-id-new", - "userId": "sampleusrRudder3", - "integrations": { - "All": true, - "Amplitude": { - "groups": { - "group_type": "Company", - "group_value": "ABC" - } - } - }, - "groupId": "Sample_groupId23", - "traits": { - "KEY_3": { - "CHILD_KEY_92": "value_95", - "CHILD_KEY_102": "value_103" - }, - "KEY_2": { - "CHILD_KEY_92": "value_95", - "CHILD_KEY_102": "value_103" - }, - "name_trait": "Company", - "value_trait": "ABC" - }, - "sentAt": "2020-10-20T07:54:58.983Z" - }, - "destination": { - "Config": { - "apiKey": "abcde" - } - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "email": "test@rudderstack.com", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "type": "group", - "messageId": "e5034df0-a404-47b4-a463-76df99934fea", - "originalTimestamp": "2020-10-20T07:54:58.983Z", - "anonymousId": "my-anonymous-id-new", - "userId": "sampleusrRudder3", - "integrations": { - "All": true - }, - "groupId": "Sample_groupId23", - "traits": { - "KEY_3": { - "CHILD_KEY_92": "value_95", - "CHILD_KEY_102": "value_103" - }, - "KEY_2": { - "CHILD_KEY_92": "value_95", - "CHILD_KEY_102": "value_103" - }, - "name_trait": "Company", - "value_trait": "ABC" - }, - "sentAt": "2020-10-20T07:54:58.983Z" - }, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "name_trait", - "groupValueTrait": "value_trait" - } - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "email": "test@rudderstack.com", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "type": "group", - "messageId": "e5034df0-a404-47b4-a463-76df99934fea", - "originalTimestamp": "2020-10-20T07:54:58.983Z", - "anonymousId": "my-anonymous-id-new", - "userId": "sampleusrRudder3", - "integrations": { - "All": true - }, - "groupId": "Sample_groupId23", - "traits": { - "KEY_3": { - "CHILD_KEY_92": "value_95", - "CHILD_KEY_102": "value_103" - }, - "KEY_2": { - "CHILD_KEY_92": "value_95", - "CHILD_KEY_102": "value_103" - }, - "name_trait": "Company", - "value_trait": ["ABC"] - }, - "sentAt": "2020-10-20T07:54:58.983Z" - }, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "name_trait", - "groupValueTrait": "value_trait" - } - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "email": "test@rudderstack.com", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "type": "alias", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "integrations": { - "All": true - }, - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "abcde" - } - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "email": "test@rudderstack.com", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "type": "alias", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "integrations": { - "All": false, - "Amplitude": { - "unmap": "sampleusrRudder3" - } - }, - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "abcde" - } - } - }, - { - "message": { - "type": "track", - "event": "Sample track event BEFORE IDENTIFY1**", - "sentAt": "2020-09-17T15:07:13.171Z", - "userId": "0572f78fa49c648e", - "channel": "mobile", - "context": { - "os": { - "name": "Android", - "version": "9" - }, - "app": { - "name": "AMTestProject", - "build": "1", - "version": "1.0", - "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" - }, - "locale": "en-US", - "screen": { - "width": 1080, - "height": 2088, - "density": 440 - }, - "traits": { - "id": "0572f78fa49c648e", - "userId": "0572f78fa49c648e", - "address": {}, - "company": {}, - "anonymousId": "0572f78fa49c648e" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.4" - }, - "network": { - "wifi": true, - "carrier": "Android", - "cellular": true, - "bluetooth": false - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - }, - "timezone": "Asia/Kolkata", - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)" - }, - "messageId": "1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466", - "anonymousId": "0572f78fa49c648e", - "integrations": { - "All": true - }, - "originalTimestamp": "2020-09-17T15:07:03.515Z" - }, - "destination": { - "Config": { - "apiKey": "abcde" - } - } - }, - { - "message": { - "type": "track", - "event": "Sample track event BEFORE IDENTIFY1**", - "sentAt": "2020-09-17T15:07:13.171Z", - "userId": "0572f78fa49c648e", - "channel": "mobile", - "context": { - "os": { - "name": "Android", - "version": "9" - }, - "app": { - "name": "AMTestProject", - "build": "1", - "version": "1.0", - "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" - }, - "device": { - "id": "0572f78fa49c648e", - "name": "generic_x86_arm", - "type": "Android", - "model": "AOSP on IA Emulator", - "manufacturer": "Google", - "adTrackingEnabled": false - }, - "locale": "en-US", - "screen": { - "width": 1080, - "height": 2088, - "density": 440 - }, - "traits": { - "id": "0572f78fa49c648e", - "userId": "0572f78fa49c648e", - "address": {}, - "company": {}, - "anonymousId": "0572f78fa49c648e" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.4" - }, - "network": { - "wifi": true, - "carrier": "Android", - "cellular": true, - "bluetooth": false - }, - "timezone": "Asia/Kolkata", - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)" - }, - "messageId": "1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466", - "anonymousId": "0572f78fa49c648e", - "integrations": { - "All": true - }, - "originalTimestamp": "2020-09-17T15:07:03.515Z" - }, - "destination": { - "Config": { - "apiKey": "abcde" - } - } - }, - { - "message": { - "type": "track", - "event": "Sample track event BEFORE IDENTIFY1**", - "sentAt": "2020-09-17T15:07:13.171Z", - "userId": "0572f78fa49c648e", - "channel": "mobile", - "context": { - "os": { - "name": "Android", - "version": "9" - }, - "app": { - "name": "AMTestProject", - "build": "1", - "version": "1.0", - "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" - }, - "device": { - "id": "0572f78fa49c648e", - "name": "generic_x86_arm", - "type": "Android", - "model": "AOSP on IA Emulator", - "manufacturer": "Google", - "adTrackingEnabled": true, - "advertisingId": "44c97318-9040-4361-8bc7-4eb30f665ca8" - }, - "locale": "en-US", - "screen": { - "width": 1080, - "height": 2088, - "density": 440 - }, - "traits": { - "id": "0572f78fa49c648e", - "userId": "0572f78fa49c648e", - "address": {}, - "company": {}, - "anonymousId": "0572f78fa49c648e" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.4" - }, - "network": { - "wifi": true, - "carrier": "Android", - "cellular": true, - "bluetooth": false - }, - "timezone": "Asia/Kolkata", - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)" - }, - "messageId": "1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466", - "anonymousId": "0572f78fa49c648e", - "integrations": { - "All": true - }, - "originalTimestamp": "2020-09-17T15:07:03.515Z" - }, - "destination": { - "Config": { - "apiKey": "abcde" - } - } - }, - { - "message": { - "type": "track", - "event": "Sample track event BEFORE IDENTIFY1**", - "sentAt": "2020-09-17T15:07:13.171Z", - "userId": "0572f78fa49c648e", - "channel": "mobile", - "context": { - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "app": { - "name": "AMTestProject", - "build": "1", - "version": "1.0", - "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" - }, - "device": { - "id": "0572f78fa49c648e", - "name": "iphone_xr_64", - "type": "iOS", - "model": "iPhone XR", - "manufacturer": "Apple", - "adTrackingEnabled": false - }, - "locale": "en-US", - "screen": { - "width": 1080, - "height": 2088, - "density": 440 - }, - "traits": { - "id": "0572f78fa49c648e", - "userId": "0572f78fa49c648e", - "address": {}, - "company": {}, - "anonymousId": "0572f78fa49c648e" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.4" - }, - "network": { - "wifi": true, - "carrier": "AT&T", - "cellular": true, - "bluetooth": false - }, - "timezone": "Asia/Kolkata", - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)" - }, - "messageId": "1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466", - "anonymousId": "0572f78fa49c648e", - "integrations": { - "All": true - }, - "originalTimestamp": "2020-09-17T15:07:03.515Z" - }, - "destination": { - "Config": { - "apiKey": "abcde" - } - } - }, - { - "message": { - "type": "track", - "event": "Sample track event BEFORE IDENTIFY1**", - "sentAt": "2020-09-17T15:07:13.171Z", - "userId": "0572f78fa49c648e", - "channel": "mobile", - "context": { - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "app": { - "name": "AMTestProject", - "build": "1", - "version": "1.0", - "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" - }, - "device": { - "id": "0572f78fa49c648e", - "name": "iphone_xr_64", - "type": "iOS", - "model": "iPhone XR", - "manufacturer": "Apple", - "adTrackingEnabled": true, - "advertisingId": "1606e649-c97e-4d5f-a2ef-b81dbc66741a" - }, - "locale": "en-US", - "screen": { - "width": 1080, - "height": 2088, - "density": 440 - }, - "traits": { - "id": "0572f78fa49c648e", - "userId": "0572f78fa49c648e", - "address": {}, - "company": {}, - "anonymousId": "0572f78fa49c648e" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.4" - }, - "network": { - "wifi": true, - "carrier": "AT&T", - "cellular": true, - "bluetooth": false - }, - "timezone": "Asia/Kolkata", - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)" - }, - "messageId": "1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466", - "anonymousId": "0572f78fa49c648e", - "integrations": { - "All": true - }, - "originalTimestamp": "2020-09-17T15:07:03.515Z" - }, - "destination": { - "Config": { - "apiKey": "abcde" - } - } - }, - { - "message": { - "type": "screen", - "userId": "identified user id", - "anonymousId": "anon-id-new", - "event": "Screen View", - "properties": { - "prop1": "5" - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - }, - "destination": { - "Config": { - "apiKey": "abcde" - } - } - }, - { - "message": { - "type": "track", - "event": "Order Completed", - "sentAt": "2020-08-14T05:30:30.118Z", - "context": { - "source": "test", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "products": [ - { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "price": 19, - "category": "Games", - "quantity": 1, - "image_url": "https:///www.example.com/product/path.jpg", - "product_id": "507f1f77bcf86cd799439011" - }, - { - "sku": "46493-32", - "name": "Uno Card Game", - "price": 3, - "category": "Games", - "quantity": 2, - "product_id": "505bd76785ebb509fc183733" - } - ], - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "S3": false, - "All": true - } - }, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "email", - "groupValueTrait": "age", - "trackProductsOnce": false, - "trackRevenuePerProduct": false - } - } - }, - { - "message": { - "type": "track", - "event": "Order Completed", - "sentAt": "2020-08-14T05:30:30.118Z", - "context": { - "source": "test", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "products": [ - { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "price": 19, - "category": "Games", - "quantity": 1, - "image_url": "https:///www.example.com/product/path.jpg", - "product_id": "507f1f77bcf86cd799439011" - }, - { - "sku": "46493-32", - "name": "Uno Card Game", - "price": 3, - "category": "Games", - "quantity": 2, - "product_id": "505bd76785ebb509fc183733" - } - ], - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "S3": false, - "All": true - } - }, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "email", - "groupValueTrait": "age", - "trackProductsOnce": true, - "trackRevenuePerProduct": false - } - } - }, - { - "message": { - "type": "track", - "event": "Order Completed", - "sentAt": "2020-08-14T05:30:30.118Z", - "context": { - "source": "test", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "products": [ - { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "price": 19, - "category": "Games", - "quantity": 1, - "image_url": "https:///www.example.com/product/path.jpg", - "product_id": "507f1f77bcf86cd799439011" - }, - { - "sku": "46493-32", - "name": "Uno Card Game", - "price": 3, - "category": "Games", - "quantity": 2, - "product_id": "505bd76785ebb509fc183733" - } - ], - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "S3": false, - "All": true - } - }, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "email", - "groupValueTrait": "age", - "trackProductsOnce": false, - "trackRevenuePerProduct": true - } - } - }, - { - "message": { - "type": "track", - "event": "Order Completed", - "sentAt": "2020-08-14T05:30:30.118Z", - "context": { - "source": "test", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "products": [ - { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "price": 19, - "category": "Games", - "quantity": 1, - "image_url": "https:///www.example.com/product/path.jpg", - "product_id": "507f1f77bcf86cd799439011" - }, - { - "sku": "46493-32", - "name": "Uno Card Game", - "price": 3, - "category": "Games", - "quantity": 2, - "product_id": "505bd76785ebb509fc183733" - } - ], - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "S3": false, - "All": true - } - }, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "email", - "groupValueTrait": "age", - "trackProductsOnce": true, - "trackRevenuePerProduct": true - } - } - }, - { - "message": { - "type": "track", - "event": "Order Completed", - "sentAt": "2020-08-14T05:30:30.118Z", - "context": { - "source": "test", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "S3": false, - "All": true - } - }, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "email", - "groupValueTrait": "age", - "trackProductsOnce": true, - "trackRevenuePerProduct": true - } - } - }, - { - "message": { - "type": "track", - "event": "Order Completed", - "sentAt": "2020-08-14T05:30:30.118Z", - "context": { - "source": "test", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "S3": false, - "All": true - } - }, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "email", - "groupValueTrait": "age", - "trackProductsOnce": true, - "trackRevenuePerProduct": false - } - } - }, - { - "message": { - "type": "track", - "event": "Order Completed", - "sentAt": "2020-08-14T05:30:30.118Z", - "context": { - "source": "test", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "S3": false, - "All": true - } - }, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "email", - "groupValueTrait": "age", - "trackProductsOnce": false, - "trackRevenuePerProduct": true - } - } - }, - { - "message": { - "type": "track", - "event": "Order Completed", - "sentAt": "2020-08-14T05:30:30.118Z", - "context": { - "source": "test", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "S3": false, - "All": true - } - }, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "email", - "groupValueTrait": "age", - "trackProductsOnce": false, - "trackRevenuePerProduct": false - } - } - }, - { - "message": { - "type": "identify", - "sentAt": "2020-11-20T06:18:22.342Z", - "userId": "User_111", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.8", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - }, - "locale": "en-GB", - "screen": { - "density": 2.5 - }, - "traits": { - "city": "Durgapur", - "name": "Manashi", - "phone": "990099009900", - "friends": 3, - "age": 12, - "subjects": 5, - "experience": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.8" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36" - }, - "rudderId": "7e00bf3d-5357-4448-886d-f8fc8abf932d", - "messageId": "6f08cc45-95c3-40c1-90f2-2f44a92947ef", - "anonymousId": "2f8b0ba7-d76e-4b91-9577-d1b6ebd68946", - "integrations": { - "All": true - }, - "originalTimestamp": "2020-11-20T06:18:22.342Z" - }, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "email", - "groupValueTrait": "age", - "traitsToIncrement": [ - { - "traits": "age" - }, - { - "traits": "friends" - } - ] - } - } - }, - { - "message": { - "type": "identify", - "sentAt": "2020-11-20T06:18:22.342Z", - "userId": "User_111", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.8", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://localhost:1111/RudderAmplitude.html", - "path": "/RudderAmplitude.html", - "title": "Amplitude Testing By Rudder", - "search": "", - "referrer": "http://localhost:1111/" - }, - "locale": "en-GB", - "screen": { - "density": 2.5 - }, - "traits": { - "city": "Durgapur", - "name": "Manashi", - "phone": "990099009900", - "friends": 3, - "age": 12, - "subjects": 5, - "experience": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.8" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36" - }, - "rudderId": "7e00bf3d-5357-4448-886d-f8fc8abf932d", - "messageId": "6f08cc45-95c3-40c1-90f2-2f44a92947ef", - "anonymousId": "2f8b0ba7-d76e-4b91-9577-d1b6ebd68946", - "integrations": { - "All": true - }, - "originalTimestamp": "2020-11-20T06:18:22.342Z" - }, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "email", - "groupValueTrait": "age", - "traitsToSetOnce": [ - { - "traits": "subjects" - }, - { - "traits": "" - } - ] - } - } - }, - { - "message": { - "type": "identify", - "sentAt": "2020-11-20T06:18:22.342Z", - "userId": "User_111", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.8", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://localhost:1111/RudderAmplitude.html", - "path": "/RudderAmplitude.html", - "title": "Amplitude Testing By Rudder", - "search": "", - "referrer": "http://localhost:1111/" - }, - "locale": "en-GB", - "screen": { - "density": 2.5 - }, - "traits": { - "city": "Durgapur", - "name": "Manashi", - "phone": "990099009900", - "friends": 3, - "age": 12, - "subjects": 5, - "experience": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.8" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36" - }, - "rudderId": "7e00bf3d-5357-4448-886d-f8fc8abf932d", - "messageId": "6f08cc45-95c3-40c1-90f2-2f44a92947ef", - "anonymousId": "2f8b0ba7-d76e-4b91-9577-d1b6ebd68946", - "integrations": { - "All": true - }, - "originalTimestamp": "2020-11-20T06:18:22.342Z" - }, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "email", - "groupValueTrait": "age", - "traitsToAppend": [ - { - "traits": "name" - }, - { - "traits": "" - } - ] - } - } - }, - { - "message": { - "type": "identify", - "sentAt": "2020-11-20T06:18:22.342Z", - "userId": "User_111", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.8", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://localhost:1111/RudderAmplitude.html", - "path": "/RudderAmplitude.html", - "title": "Amplitude Testing By Rudder", - "search": "", - "referrer": "http://localhost:1111/" - }, - "locale": "en-GB", - "screen": { - "density": 2.5 - }, - "traits": { - "city": "Durgapur", - "name": "Manashi", - "phone": "990099009900", - "friends": 3, - "age": 12, - "subjects": 5, - "experience": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.8" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36" - }, - "rudderId": "7e00bf3d-5357-4448-886d-f8fc8abf932d", - "messageId": "6f08cc45-95c3-40c1-90f2-2f44a92947ef", - "anonymousId": "2f8b0ba7-d76e-4b91-9577-d1b6ebd68946", - "integrations": { - "All": true - }, - "originalTimestamp": "2020-11-20T06:18:22.342Z" - }, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "email", - "groupValueTrait": "age", - "traitsToPrepend": [ - { - "traits": "experience" - }, - { - "traits": "" - } - ] - } - } - }, - { - "message": { - "type": "identify", - "sentAt": "2020-11-20T06:18:22.342Z", - "userId": "User_111", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.8", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://localhost:1111/RudderAmplitude.html", - "path": "/RudderAmplitude.html", - "title": "Amplitude Testing By Rudder", - "search": "", - "referrer": "http://localhost:1111/" - }, - "locale": "en-GB", - "screen": { - "density": 2.5 - }, - "traits": { - "city": "Durgapur", - "name": "Manashi", - "phone": "990099009900", - "friends": 3, - "age": 12, - "subjects": 5, - "experience": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.8" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36" - }, - "rudderId": "7e00bf3d-5357-4448-886d-f8fc8abf932d", - "messageId": "6f08cc45-95c3-40c1-90f2-2f44a92947ef", - "anonymousId": "2f8b0ba7-d76e-4b91-9577-d1b6ebd68946", - "integrations": { - "All": true - }, - "originalTimestamp": "2020-11-20T06:18:22.342Z" - }, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "email", - "groupValueTrait": "age", - "traitsToIncrement": [ - { - "traits": "age" - }, - { - "traits": "friends" - } - ], - "traitsToSetOnce": [ - { - "traits": "subjects" - }, - { - "traits": "" - } - ], - "traitsToAppend": [ - { - "traits": "name" - }, - { - "traits": "" - } - ], - "traitsToPrepend": [ - { - "traits": "experience" - }, - { - "traits": "" - } - ] - } - } - }, - { - "message": { - "type": "track", - "event": "Order Completed", - "sentAt": "2020-08-14T05:30:30.118Z", - "userId": "userID123", - "context": { - "source": "test", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a31aaa1", - "address": { - "city": "kolkata", - "country": "India", - "postalCode": 712136, - "state": "WB", - "street": "" - } - }, - "locale": "en-US", - "network": { - "carrier": "T-Mobile" - }, - "location": { - "country": "United States", - "city": "San Francisco", - "region": "California", - "latitude": "37.7672319", - "longitude": "-122.4021353", - "dma": "San Francisco-Oakland-San Jose, CA" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - }, - "os": { - "name": "Android", - "version": "11" - }, - "app": { - "version": "2.6.0 v3" - }, - "device": { - "type": "Android", - "model": "SM-A025M", - "manufacturer": "samsung" - } - }, - "messageId": "7208abb6-2c4e-45bb-bf5b-aa426f3593a2", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "products": [ - { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "price": 19, - "category": "Games", - "quantity": 1, - "image_url": "https:///www.example.com/product/path.jpg", - "product_id": "507f1f77bcf86cd799439011" - }, - { - "sku": "46493-32", - "name": "Uno Card Game", - "price": 3, - "category": "Games", - "quantity": 2, - "product_id": "505bd76785ebb509fc183733" - } - ], - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a31aaa1", - "integrations": { - "S3": false, - "All": true - } - }, - "destination": { - "Config": { - "apiKey": "abcde", - "trackProductsOnce": false, - "trackRevenuePerProduct": true - } - } - }, - { - "message": { - "type": "track", - "event": "Order Completed", - "sentAt": "2020-08-14T05:30:30.118Z", - "userId": "userID123", - "context": { - "source": "test", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a31aaa1", - "address": { - "city": "kolkata", - "country": "India", - "postalCode": 712136, - "state": "WB", - "street": "" - } - }, - "locale": "en-US", - "network": { - "carrier": "T-Mobile" - }, - "location": { - "latitude": "37.7672319", - "longitude": "-122.4021353", - "dma": "San Francisco-Oakland-San Jose, CA" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - }, - "os": { - "name": "Android", - "version": "11" - }, - "app": { - "version": "2.6.0 v3" - }, - "device": { - "type": "Android", - "model": "SM-A025M", - "manufacturer": "samsung" - } - }, - "messageId": "7208abb6-2c4e-45bb-bf5b-aa426f3593a2", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "products": [ - { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "price": 19, - "category": "Games", - "quantity": 1, - "image_url": "https:///www.example.com/product/path.jpg", - "product_id": "507f1f77bcf86cd799439011" - }, - { - "sku": "46493-32", - "name": "Uno Card Game", - "price": 3, - "category": "Games", - "quantity": 2, - "product_id": "505bd76785ebb509fc183733" - } - ], - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a31aaa1", - "integrations": { - "S3": false, - "All": true - } - }, - "destination": { - "Config": { - "apiKey": "abcde", - "trackProductsOnce": true, - "trackRevenuePerProduct": false - } - } - }, - { - "message": { - "type": "track", - "event": "App_Opened", - "sentAt": "2021-11-17T19:13:52.106Z", - "userId": "ab419c3a-47ce-11ec-82ac-16a1bb813a59", - "channel": "mobile", - "context": { - "source": "test", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a31aaa1", - "address": { - "city": "kolkata", - "country": "India", - "postalCode": 712136, - "state": "WB", - "street": "" - } - }, - "locale": "en-US", - "network": { - "carrier": "T-Mobile" - }, - "location": { - "country": "United States", - "city": "San Francisco", - "latitude": "37.7672319", - "longitude": "-122.4021353", - "dma": "San Francisco-Oakland-San Jose, CA" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - }, - "os": { - "name": "Android", - "version": "11" - }, - "app": { - "version": "2.6.0 v3" - }, - "device": { - "type": "Android", - "model": "SM-A025M", - "manufacturer": "samsung" - } - }, - "messageId": "7208abb6-2c4e-45bb-bf5b-aa426f3593a2", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "externalID": "1637170658229-3961832492194264209" - }, - "integrations": { - "All": true - }, - "originalTimestamp": "2021-11-17T19:13:51.143Z" - }, - "destination": { - "Config": { - "apiKey": "abcde", - "trackProductsOnce": true, - "trackRevenuePerProduct": false - } - } - }, - { - "message": { - "type": "identify", - "sentAt": "2020-11-20T06:18:22.342Z", - "userId": "User_111", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.8", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - }, - "locale": "en-GB", - "screen": { - "density": 2.5 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.8" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36" - }, - "rudderId": "7e00bf3d-5357-4448-886d-f8fc8abf932d", - "messageId": "6f08cc45-95c3-40c1-90f2-2f44a92947ef", - "anonymousId": "2f8b0ba7-d76e-4b91-9577-d1b6ebd68946", - "integrations": { - "All": true - }, - "originalTimestamp": "2020-11-20T06:18:22.342Z" - }, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "email", - "groupValueTrait": "age", - "traitsToIncrement": [ - { - "traits": "age" - }, - { - "traits": "friends" - } - ] - } - } - }, - { - "message": { - "type": "track", - "event": "Order Completed", - "sentAt": "2020-08-14T05:30:30.118Z", - "userId": "userID123", - "context": { - "source": "test", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a31aaa1", - "address": { - "city": "kolkata", - "country": "India", - "postalCode": 712136, - "state": "WB", - "street": "" - } - }, - "locale": "en-US", - "network": { - "carrier": "T-Mobile" - }, - "location": { - "latitude": "37.7672319", - "longitude": "-122.4021353", - "dma": "San Francisco-Oakland-San Jose, CA" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - }, - "os": { - "name": "Android", - "version": "11" - }, - "app": { - "version": "2.6.0 v3" - }, - "device": { - "type": "Android", - "model": "SM-A025M", - "manufacturer": "samsung" - } - }, - "messageId": "7208abb6-2c4e-45bb-bf5b-aa426f3593a2", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 0, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "products": [ - { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "price": 19, - "category": "Games", - "quantity": 1, - "image_url": "https:///www.example.com/product/path.jpg", - "product_id": "507f1f77bcf86cd799439011" - }, - { - "sku": "46493-32", - "name": "Uno Card Game", - "price": 3, - "category": "Games", - "quantity": 2, - "product_id": "505bd76785ebb509fc183733" - } - ], - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a31aaa1", - "integrations": { - "S3": false, - "All": true - } - }, - "destination": { - "Config": { - "apiKey": "abcde", - "trackProductsOnce": true, - "trackRevenuePerProduct": true - } - } - }, - { - "message": { - "type": "screen", - "event": "Home", - "sentAt": "2021-12-09T14:55:17.074Z", - "userId": "9e187bff-2867-11ec-82ac-02cdd434d6bf", - "channel": "mobile", - "context": { - "source": "test", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a31aaa1", - "address": { - "city": "kolkata", - "country": "India", - "postalCode": 712136, - "state": "WB", - "street": "" - } - }, - "locale": "en-US", - "network": { - "carrier": "T-Mobile" - }, - "location": { - "country": "United States", - "city": "San Francisco", - "region": "California", - "latitude": "37.7672319", - "longitude": "-122.4021353", - "dma": "San Francisco-Oakland-San Jose, CA" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - }, - "os": { - "name": "Android", - "version": "11" - }, - "app": { - "version": "2.6.0 v3" - }, - "device": { - "type": "Android", - "model": "SM-A025M", - "manufacturer": "samsung" - } - }, - "rudderId": "004670a6-4559-4f2b-aa2a-f35cf81a9423", - "messageId": "1639061715808-a934f1c2-7b55-4e78-bd4d-df209c30c8a1", - "timestamp": "2021-12-09T14:55:15.914Z", - "properties": { - "name": "Home", - "externalID": "1637763064335-7225034711957140329" - }, - "receivedAt": "2021-12-09T14:55:17.180Z", - "request_ip": "186.54.216.75", - "anonymousId": "066a37dc92b16284", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-12-09T14:55:15.808Z" - }, - "destination": { - "Config": { - "apiKey": "abcde" - } - } - }, - { - "message": { - "type": "screen", - "event": "Home", - "sentAt": "2021-12-09T14:55:17.074Z", - "userId": "abcdef123456cf", - "channel": "mobile", - "context": { - "source": "test", - "traits": { - "anonymousId": "50be5c79-6c3f-4b60-be84-97805a32aaa1", - "address": { - "city": "kolkata", - "country": "India", - "postalCode": 712136, - "state": "WB", - "street": "" - } - }, - "locale": "en-US", - "network": { - "carrier": "T-Mobile" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - }, - "os": { - "name": "Android", - "version": "11" - }, - "app": { - "version": "2.6.0 v3" - }, - "device": { - "type": "Android", - "model": "SM-A025M", - "manufacturer": "samsung" - } - }, - "rudderId": "004670a6-4559-4f2b-aa1a-f12cf81a9423", - "messageId": "1639061715808-a934f1c2-7b55-5e78-bd4d-df209c31d8a2", - "timestamp": "2021-12-09T14:55:15.914Z", - "properties": { - "name": "Home", - "externalID": "1637763064336-7225034711957140329" - }, - "receivedAt": "2021-12-09T14:55:17.180Z", - "request_ip": "186.54.216.75", - "anonymousId": "066a37dc92b16284", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-12-09T14:55:15.808Z" - }, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "email", - "groupValueTrait": "age" - } - } - }, - { - "message": { - "type": "track", - "event": "Sample track event BEFORE IDENTIFY1**", - "sentAt": "2020-09-17T15:07:13.171Z", - "userId": "0572f78fa49c648e", - "channel": "mobile", - "context": { - "app": { - "name": "AMTestProject", - "build": "1", - "version": "1.0", - "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" - }, - "device": { - "id": "0572f78fa49c648e", - "type": "watchos", - "manufacturer": "Apple", - "adTrackingEnabled": true, - "advertisingId": "1606e649-c97e-4d5f-a2ef-b81dbc66741a" - }, - "locale": "en-US", - "screen": { - "width": 1080, - "height": 2088, - "density": 440 - }, - "traits": { - "id": "0572f78fa49c648e", - "userId": "0572f78fa49c648e", - "address": {}, - "company": {}, - "anonymousId": "0572f78fa49c648e" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.4" - }, - "network": { - "wifi": true, - "carrier": "AT&T", - "cellular": true, - "bluetooth": false - }, - "timezone": "Asia/Kolkata", - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)" - }, - "messageId": "1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466", - "anonymousId": "0572f78fa49c648e", - "integrations": { - "All": true - }, - "originalTimestamp": "2020-09-17T15:07:03.515Z" - }, - "destination": { - "Config": { - "apiKey": "abcde" - } - } - }, - { - "message": { - "type": "track", - "event": "Sample track event BEFORE IDENTIFY1**", - "sentAt": "2020-09-17T15:07:13.171Z", - "userId": "0572f78fa49c648e", - "channel": "mobile", - "context": { - "app": { - "name": "AMTestProject", - "build": "1", - "version": "1.0", - "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" - }, - "device": { - "id": "0572f78fa49c648e", - "type": "ipados", - "manufacturer": "Apple", - "adTrackingEnabled": true, - "advertisingId": "1606e649-c97e-4d5f-a2ef-b81dbc66741a" - }, - "locale": "en-US", - "screen": { - "width": 1080, - "height": 2088, - "density": 440 - }, - "traits": { - "id": "0572f78fa49c648e", - "userId": "0572f78fa49c648e", - "address": {}, - "company": {}, - "anonymousId": "0572f78fa49c648e" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.4" - }, - "network": { - "wifi": true, - "carrier": "AT&T", - "cellular": true, - "bluetooth": false - }, - "timezone": "Asia/Kolkata", - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)" - }, - "messageId": "1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466", - "anonymousId": "0572f78fa49c648e", - "integrations": { - "All": true - }, - "originalTimestamp": "2020-09-17T15:07:03.515Z" - }, - "destination": { - "Config": { - "apiKey": "abcde" - } - } - }, - { - "message": { - "type": "track", - "event": "Sample track event BEFORE IDENTIFY1**", - "sentAt": "2020-09-17T15:07:13.171Z", - "userId": "0572f78fa49c648e", - "channel": "mobile", - "context": { - "app": { - "name": "AMTestProject", - "build": "1", - "version": "1.0", - "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" - }, - "device": { - "id": "0572f78fa49c648e", - "type": "tvos", - "manufacturer": "Apple", - "adTrackingEnabled": true, - "advertisingId": "1606e649-c97e-4d5f-a2ef-b81dbc66741a" - }, - "locale": "en-US", - "screen": { - "width": 1080, - "height": 2088, - "density": 440 - }, - "traits": { - "id": "0572f78fa49c648e", - "userId": "0572f78fa49c648e", - "address": {}, - "company": {}, - "anonymousId": "0572f78fa49c648e" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.4" - }, - "network": { - "wifi": true, - "carrier": "AT&T", - "cellular": true, - "bluetooth": false - }, - "timezone": "Asia/Kolkata", - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)" - }, - "messageId": "1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466", - "anonymousId": "0572f78fa49c648e", - "integrations": { - "All": true - }, - "originalTimestamp": "2020-09-17T15:07:03.515Z" - }, - "destination": { - "Config": { - "apiKey": "abcde" - } - } - }, - { - "message": { - "channel": "web", - "context": { - "device": { - "brand": "testBrand", - "manufacturer": "testManufacturer" - }, - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "anonymousId": "123456", - "email": "test@rudderstack.com", - "address": { - "city": "kolkata", - "country": "India", - "postalCode": 712136, - "state": "WB", - "street": "" - }, - "ip": "0.0.0.0", - "age": 26 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "type": "identify", - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "123456", - "userId": "123456", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "mapDeviceBrand": true, - "apiKey": "abcde", - "groupTypeTrait": "email", - "groupValueTrait": "age" - } - } - }, - { - "message": { - "type": "track", - "event": "Sample track event BEFORE IDENTIFY1**", - "sentAt": "2020-09-17T15:07:13.171Z", - "userId": "0572f78fa49c648e", - "channel": "mobile", - "context": { - "device": { - "brand": "testBrand", - "manufacturer": "testManufacturer" - }, - "os": { - "name": "Android", - "version": "9" - }, - "app": { - "name": "AMTestProject", - "build": "1", - "version": "1.0", - "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" - }, - "locale": "en-US", - "screen": { - "width": 1080, - "height": 2088, - "density": 440 - }, - "traits": { - "id": "0572f78fa49c648e", - "userId": "0572f78fa49c648e", - "address": {}, - "company": {}, - "anonymousId": "0572f78fa49c648e" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.4" - }, - "network": { - "wifi": true, - "carrier": "Android", - "cellular": true, - "bluetooth": false - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - }, - "timezone": "Asia/Kolkata", - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)" - }, - "messageId": "1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466", - "anonymousId": "0572f78fa49c648e", - "integrations": { - "All": true - }, - "originalTimestamp": "2020-09-17T15:07:03.515Z" - }, - "destination": { - "Config": { - "mapDeviceBrand": true, - "apiKey": "abcde" - } - } - }, - { - "message": { - "type": "screen", - "userId": "identified user id", - "anonymousId": "anon-id-new", - "event": "Screen View", - "channel": "web", - "properties": { - "prop1": "5" - }, - "context": { - "ip": "14.5.67.21", - "device": { - "brand": "testBrand", - "manufacturer": "testManufacturer" - }, - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - }, - "destination": { - "Config": { - "apiKey": "abcde", - "mapDeviceBrand": true - } - } - }, - { - "message": { - "channel": "web", - "context": { - "externalId": [ - { - "id": "lynnanderson@smith.net", - "identifierType": "device_id", - "type": "AM-users" - } - ], - "mappedToDestination": "true", - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "anonymousId": "123456", - "email": "test@rudderstack.com", - "address": { - "country": "India", - "postalCode": 712136, - "state": "WB", - "street": "", - "os_version": "test os" - }, - "ip": "0.0.0.0", - "age": 26 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "traits": { - "anonymousId": "123456", - "email": "test@rudderstack.com", - "city": "kolkata", - "address": { - "country": "India", - "postalCode": 712136, - "state": "WB", - "street": "" - }, - "os_version": "test os", - "ip": "0.0.0.0", - "age": 26 - }, - "type": "identify", - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "123456", - "userId": "123456", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "metadata": { - "jobId": 2 - }, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "email", - "groupValueTrait": "age", - "residencyServer": "EU" - } - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "email": "test@rudderstack.com", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "type": "group", - "messageId": "e5034df0-a404-47b4-a463-76df99934fea", - "originalTimestamp": "2020-10-20T07:54:58.983Z", - "anonymousId": "my-anonymous-id-new", - "userId": "sampleusrRudder3", - "integrations": { - "All": true - }, - "groupId": "Sample_groupId23", - "traits": { - "KEY_3": { - "CHILD_KEY_92": "value_95", - "CHILD_KEY_102": "value_103" - }, - "KEY_2": { - "CHILD_KEY_92": "value_95", - "CHILD_KEY_102": "value_103" - }, - "name_trait": "Company", - "value_trait": "ABC" - }, - "sentAt": "2020-10-20T07:54:58.983Z" - }, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "name_trait", - "groupValueTrait": "value_trait", - "residencyServer": "EU" - } - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "email": "test@rudderstack.com", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "type": "alias", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "integrations": { - "All": true - }, - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "abcde", - "residencyServer": "EU" - } - } - }, - { - "message": { - "type": "track", - "event": "App_Opened", - "sentAt": "2021-11-17T19:13:52.106Z", - "userId": "ab419c3a-47ce-11ec-82ac-16a1bb813a59", - "channel": "mobile", - "context": { - "source": "test", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a31aaa1", - "address": { - "city": "kolkata", - "country": "India", - "postalCode": 712136, - "state": "WB", - "street": "" - } - }, - "locale": "en-US", - "network": { - "carrier": "T-Mobile" - }, - "location": { - "country": "United States", - "city": "San Francisco", - "latitude": "37.7672319", - "longitude": "-122.4021353", - "dma": "San Francisco-Oakland-San Jose, CA" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - }, - "os": { - "name": "Android", - "version": "11" - }, - "app": { - "version": "2.6.0 v3" - }, - "device": { - "type": "Android", - "model": "SM-A025M", - "manufacturer": "samsung" - } - }, - "messageId": "7208abb6-2c4e-45bb-bf5b-aa426f3593a2", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "externalID": "1637170658229-3961832492194264209" - }, - "integrations": { - "All": true, - "Amplitude": { - "event_id": 3 - } - }, - "originalTimestamp": "2021-11-17T19:13:51.143Z" - }, - "destination": { - "Config": { - "apiKey": "abcde", - "trackProductsOnce": true, - "trackRevenuePerProduct": false - } - } - }, - { - "message": { - "type": "track", - "event": "App_Opened", - "sentAt": "2021-11-17T19:13:52.106Z", - "userId": "ab419c3a-47ce-11ec-82ac-16a1bb813a59", - "channel": "mobile", - "context": { - "source": "test", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a31aaa1", - "address": { - "city": "kolkata", - "country": "India", - "postalCode": 712136, - "state": "WB", - "street": "" - } - }, - "locale": "en-US", - "network": { - "carrier": "T-Mobile" - }, - "location": { - "country": "United States", - "city": "San Francisco", - "latitude": "37.7672319", - "longitude": "-122.4021353", - "dma": "San Francisco-Oakland-San Jose, CA" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - }, - "os": { - "name": "Android", - "version": "11" - }, - "app": { - "version": "2.6.0 v3" - }, - "device": { - "type": "Android", - "model": "SM-A025M", - "manufacturer": "samsung" - } - }, - "messageId": "7208abb6-2c4e-45bb-bf5b-aa426f3593a2", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "externalID": "1637170658229-3961832492194264209" - }, - "integrations": { - "All": true, - "Amplitude": { - "event_id": 0 - } - }, - "originalTimestamp": "2021-11-17T19:13:51.143Z" - }, - "destination": { - "Config": { - "apiKey": "abcde", - "trackProductsOnce": true, - "trackRevenuePerProduct": false - } - } - }, - { - "message": { - "type": "track", - "event": "App_Opened", - "sentAt": "2021-11-17T19:13:52.106Z", - "userId": "ab419c3a-47ce-11ec-82ac-16a1bb813a59", - "channel": "mobile", - "context": { - "source": "test", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a31aaa1", - "address": { - "city": "kolkata", - "country": "India", - "postalCode": 712136, - "state": "WB", - "street": "" - } - }, - "locale": "en-US", - "network": { - "carrier": "T-Mobile" - }, - "location": { - "country": "United States", - "city": "San Francisco", - "latitude": "37.7672319", - "longitude": "-122.4021353", - "dma": "San Francisco-Oakland-San Jose, CA" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - }, - "os": { - "name": "Android", - "version": "11" - }, - "app": { - "version": "2.6.0 v3" - }, - "device": { - "type": "Android", - "model": "SM-A025M", - "manufacturer": "samsung" - } - }, - "messageId": "7208abb6-2c4e-45bb-bf5b-aa426f3593a2", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "externalID": "1637170658229-3961832492194264209" - }, - "integrations": { - "All": true, - "Amplitude": { - "event_id": "0" - } - }, - "originalTimestamp": "2021-11-17T19:13:51.143Z" - }, - "destination": { - "Config": { - "apiKey": "abcde", - "trackProductsOnce": true, - "trackRevenuePerProduct": false - } - } - }, - { - "message": { - "channel": "web", - "context": { - "externalId": [ - { - "id": "lynnanderson@smith.net", - "identifierType": "device_id", - "type": "AM-users" - } - ], - "mappedToDestination": "true", - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "anonymousId": "123456", - "email": "test@rudderstack.com", - "address": { - "country": "India", - "postalCode": 712136, - "state": "WB", - "street": "", - "os_version": "test os" - }, - "ip": "0.0.0.0", - "age": 26 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "traits": { - "anonymousId": "123456", - "email": "test@rudderstack.com", - "city": "kolkata", - "address": { - "country": "India", - "postalCode": 712136, - "state": "WB", - "street": "" - }, - "os_version": "test os", - "ip": "0.0.0.0", - "age": 26 - }, - "type": "identify", - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "123456", - "userId": "123456", - "integrations": { - "All": true, - "Amplitude": { - "event_id": 6 - } - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "metadata": { - "jobId": 2 - }, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "email", - "groupValueTrait": "age" - } - } - }, - { - "message": { - "channel": "web", - "context": { - "externalId": [ - { - "id": "lynnanderson@smith.net", - "identifierType": "device_id", - "type": "AM-users" - } - ], - "mappedToDestination": "true", - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "anonymousId": "123456", - "email": "test@rudderstack.com", - "address": { - "country": "India", - "postalCode": 712136, - "state": "WB", - "street": "", - "os_version": "test os" - }, - "ip": "0.0.0.0", - "age": 26 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "traits": { - "anonymousId": "123456", - "email": "test@rudderstack.com", - "city": "kolkata", - "address": { - "country": "India", - "postalCode": 712136, - "state": "WB", - "street": "" - }, - "os_version": "test os", - "ip": "0.0.0.0", - "age": 26 - }, - "type": "identify", - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "123456", - "userId": "123456", - "integrations": { - "All": true, - "Amplitude": { - "event_id": 6 - } - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "metadata": { - "jobId": 2 - }, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "email", - "groupValueTrait": "age" - } - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "email": "test@rudderstack.com", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "type": "group", - "messageId": "e5034df0-a404-47b4-a463-76df99934fea", - "originalTimestamp": "2020-10-20T07:54:58.983Z", - "anonymousId": "my-anonymous-id-new", - "userId": "sampleusrRudder3", - "integrations": { - "All": true, - "Amplitude": { - "event_id": 3 - } - }, - "groupId": "Sample_groupId23", - "traits": { - "KEY_3": { - "CHILD_KEY_92": "value_95", - "CHILD_KEY_102": "value_103" - }, - "KEY_2": { - "CHILD_KEY_92": "value_95", - "CHILD_KEY_102": "value_103" - }, - "name_trait": "Company", - "value_trait": "ABC" - }, - "sentAt": "2020-10-20T07:54:58.983Z" - }, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "name_trait", - "groupValueTrait": "value_trait" - } - } - }, - { - "message": { - "type": "screen", - "userId": "identified user id", - "anonymousId": "anon-id-new", - "event": "Screen View", - "properties": { - "prop1": "5", - "event_id": 7 - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "integrations": { - "All": true, - "Amplitude": { - "event_id": 7 - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - }, - "destination": { - "Config": { - "apiKey": "abcde" - } - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "test@rudderstack.com", - "anonymousId": "12345" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "request_ip": "1.1.1.1", - "type": "page", - "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T11:15:18.299Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "properties": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - }, - "integrations": { - "All": true, - "Amplitude": { - "event_id": 2 - } - }, - "name": "ApplicationLoaded", - "sentAt": "2019-10-14T11:15:53.296Z" - }, - "destination": { - "Config": { - "apiKey": "abcde" - } - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "email": "test@rudderstack.com", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "type": "alias", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "integrations": { - "All": true, - "Amplitude": { - "event_id": 67 - } - }, - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "abcde" - } - } - }, - { - "message": { - "anonymousId": "5d205961641ee6c5", - "channel": "mobile", - "context": { - "app": { - "build": "6", - "name": "Sample Kotlin", - "namespace": "com.example.testapp1mg", - "version": "1.2" - }, - "device": { - "id": "5d205961641ee6c5", - "manufacturer": "Google", - "model": "Android SDK built for x86", - "name": "generic_x86", - "type": "Android" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.7.0" - }, - "locale": "en-US", - "network": { - "carrier": "Android", - "bluetooth": false, - "cellular": true, - "wifi": true - }, - "os": { - "name": "Android", - "version": "7.1.1" - }, - "screen": { - "density": 440, - "height": 2148, - "width": 1080 - }, - "sessionId": "1662393792", - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "5d205961641ee6c5", - "id": "User Android", - "userId": "User Android" - }, - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 7.1.1; Android SDK built for x86 Build/NYC)" - }, - "event": "Screen event", - "integrations": { - "All": true - }, - "messageId": "1662393883248-509420bf-b812-4f8d-bdb2-8c811bfde87f", - "properties": { - "name": "Screen event" - }, - "originalTimestamp": "2022-09-05T16:04:43.250Z", - "type": "screen", - "userId": "User Android" - }, - "destination": { - "Config": { - "apiKey": "abcde" - } - } - }, - { - "message": { - "anonymousId": "5d205961641ee6c5", - "channel": "mobile", - "context": { - "app": { - "build": "6", - "name": "Sample Kotlin", - "namespace": "com.example.testapp1mg", - "version": "1.2" - }, - "device": { - "id": "5d205961641ee6c5", - "manufacturer": "Google", - "model": "Android SDK built for x86", - "name": "generic_x86", - "type": "Android" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.7.0" - }, - "locale": "en-US", - "network": { - "carrier": "Android", - "bluetooth": false, - "cellular": true, - "wifi": true - }, - "os": { - "name": "Android", - "version": "7.1.1" - }, - "screen": { - "density": 440, - "height": 2148, - "width": 1080 - }, - "sessionId": "1662393792", - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "5d205961641ee6c5", - "id": "User Android", - "userId": "User Android" - }, - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 7.1.1; Android SDK built for x86 Build/NYC)" - }, - "integrations": { - "All": true - }, - "messageId": "1662393883248-509420bf-b812-4f8d-bdb2-8c811bfde87f", - "properties": {}, - "originalTimestamp": "2022-09-05T16:04:43.250Z", - "type": "screen", - "userId": "User Android" - }, - "destination": { - "Config": { - "apiKey": "abcde" - } - } - }, - { - "message": { - "channel": "web", - "context": { - "externalId": [ - { - "id": "lynnanderson@smith.net", - "identifierType": "device_id", - "type": "AM-users" - } - ], - "mappedToDestination": "true", - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "anonymousId": "123456", - "email": "test@rudderstack.com", - "address": { - "country": "India", - "postalCode": 712136, - "state": "WB", - "street": "", - "os_version": "test os" - }, - "ip": "0.0.0.0", - "age": 26 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - }, - "sessionId": "1662393792" - }, - "traits": { - "anonymousId": "123456", - "email": "test@rudderstack.com", - "city": "kolkata", - "address": { - "country": "India", - "postalCode": 712136, - "state": "WB", - "street": "" - }, - "os_version": "test os", - "ip": "0.0.0.0", - "age": 26 - }, - "type": "identify", - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "123456", - "userId": "123456", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "apiKey": "abcde" - } - } - }, - { - "message": { - "anonymousId": "5d205961641ee6c5", - "channel": "mobile", - "context": { - "app": { - "build": "6", - "name": "Sample Kotlin", - "namespace": "com.example.testapp1mg", - "version": "1.2" - }, - "device": { - "id": "5d205961641ee6c5", - "manufacturer": "Google", - "model": "Android SDK built for x86", - "name": "generic_x86", - "type": "Android" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.7.0" - }, - "locale": "en-US", - "network": { - "carrier": "Android", - "bluetooth": false, - "cellular": true, - "wifi": true - }, - "os": { - "name": "Android", - "version": "7.1.1" - }, - "screen": { - "density": 440, - "height": 2148, - "width": 1080 - }, - "sessionId": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "5d205961641ee6c5", - "id": "User Android", - "userId": "User Android" - }, - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 7.1.1; Android SDK built for x86 Build/NYC)" - }, - "event": "Screen event", - "integrations": { - "All": true - }, - "messageId": "1662393883248-509420bf-b812-4f8d-bdb2-8c811bfde87f", - "properties": { - "name": "Screen event" - }, - "originalTimestamp": "2022-09-05T16:04:43.250Z", - "type": "screen", - "userId": "User Android" - }, - "destination": { - "Config": { - "apiKey": "abcde" - } - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "email": "test@rudderstack.com", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "type": "group", - "messageId": "e5034df0-a404-47b4-a463-76df99934fea", - "originalTimestamp": "2020-10-20T07:54:58.983Z", - "integrations": { - "All": true - }, - "groupId": "Sample_groupId23", - "traits": { - "KEY_3": { - "CHILD_KEY_92": "value_95", - "CHILD_KEY_102": "value_103" - }, - "KEY_2": { - "CHILD_KEY_92": "value_95", - "CHILD_KEY_102": "value_103" - }, - "name_trait": "Company", - "value_trait": "ABC" - }, - "sentAt": "2020-10-20T07:54:58.983Z" - }, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "name_trait", - "groupValueTrait": "value_trait" - } - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "test@rudderstack.com", - "anonymousId": "12345" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "request_ip": "1.1.1.1", - "type": "page", - "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T11:15:18.299Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "properties": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - }, - "integrations": { - "All": true, - "Amplitude": { - "event_id": 2 - } - }, - "name": "ApplicationLoaded", - "sentAt": "2019-10-14T11:15:53.296Z" - }, - "destination": { - "Config": { - "apiKey": "abcde", - "useUserDefinedPageEventName": true, - "userProvidedPageEventString": "My custom Page Name is {{ name }} . Custom Name." - } - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "test@rudderstack.com", - "anonymousId": "12345" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "request_ip": "1.1.1.1", - "type": "page", - "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T11:15:18.299Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "properties": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - }, - "integrations": { - "All": true, - "Amplitude": { - "event_id": 2 - } - }, - "name": "ApplicationLoaded", - "sentAt": "2019-10-14T11:15:53.296Z" - }, - "destination": { - "Config": { - "apiKey": "abcde", - "useUserDefinedPageEventName": true, - "userProvidedPageEventString": "{{name}}" - } - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "test@rudderstack.com", - "anonymousId": "12345" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "request_ip": "1.1.1.1", - "type": "page", - "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T11:15:18.299Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "properties": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - }, - "integrations": { - "All": true, - "Amplitude": { - "event_id": 2 - } - }, - "name": "ApplicationLoaded", - "sentAt": "2019-10-14T11:15:53.296Z" - }, - "destination": { - "Config": { - "apiKey": "abcde", - "useUserDefinedPageEventName": true, - "userProvidedPageEventString": "" - } - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "test@rudderstack.com", - "anonymousId": "12345" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "Home Page", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "request_ip": "1.1.1.1", - "type": "page", - "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T11:15:18.299Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "properties": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - }, - "integrations": { - "All": true, - "Amplitude": { - "event_id": 2 - } - }, - "sentAt": "2019-10-14T11:15:53.296Z" - }, - "destination": { - "Config": { - "apiKey": "abcde", - "useUserDefinedPageEventName": false, - "userProvidedPageEventString": "Viewed {{context.page.title}} event." - } - } - }, - { - "message": { - "type": "screen", - "userId": "identified user id", - "anonymousId": "anon-id-new", - "event": "Screen View", - "properties": { - "prop1": "5" - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - }, - "destination": { - "Config": { - "apiKey": "abcde", - "useUserDefinedScreenEventName": true, - "userProvidedScreenEventString": "My {{ event }} event." - } - } - }, - { - "message": { - "type": "screen", - "userId": "identified user id", - "anonymousId": "anon-id-new", - "event": "Screen View", - "properties": { - "prop1": "5" - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - }, - "destination": { - "Config": { - "apiKey": "abcde", - "useUserDefinedScreenEventName": false, - "userProvidedScreenEventString": "My {{ event }} event." - } - } - }, - { - "message": { - "type": "screen", - "userId": "identified user id", - "anonymousId": "anon-id-new", - "event": "Screen same as event", - "properties": { - "prop1": "5" - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - }, - "destination": { - "Config": { - "apiKey": "abcde", - "useUserDefinedScreenEventName": true, - "userProvidedScreenEventString": "{{ event }}" - } - } - }, - { - "message": { - "type": "screen", - "userId": "identified user id", - "anonymousId": "anon-id-new", - "name": "Screen", - "properties": { - "prop1": "5" - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - }, - "destination": { - "Config": { - "apiKey": "abcde", - "useUserDefinedScreenEventName": true, - "userProvidedScreenEventString": "" - } - } - } -] diff --git a/test/__tests__/data/am_output.json b/test/__tests__/data/am_output.json deleted file mode 100644 index 6744a9dcef..0000000000 --- a/test/__tests__/data/am_output.json +++ /dev/null @@ -1,4469 +0,0 @@ -[ - { - "error": "Event not present. Please send event field" - }, - { - "error": "message type not supported" - }, - { - "error": "No API Key is Found. Please Configure API key from dashbaord" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "device_id": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "library": "rudderstack", - "event_type": "Order Completed", - "insert_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "event_properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "revenue_type": "Purchased", - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "revenueType": "Purchased", - "price": 48, - "quantity": 1, - "revenue": 48, - "time": 1597383030118, - "user_properties": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - "session_id": -1 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "device_id": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "library": "rudderstack", - "event_type": "Order Completed", - "insert_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "event_properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "products": [ - { - "category": "Games", - "image_url": "https:///www.example.com/product/path.jpg", - "name": "Monopoly: 3rd Edition", - "price": 19, - "product_id": "507f1f77bcf86cd799439011", - "quantity": 1, - "sku": "45790-32", - "url": "https://www.example.com/product/path" - }, - { - "category": "Games", - "name": "Uno Card Game", - "price": 3, - "product_id": "505bd76785ebb509fc183733", - "quantity": 2, - "sku": "46493-32" - } - ], - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "revenueType": "Purchased", - "price": 48, - "quantity": 1, - "revenue": 48, - "time": 1597383030118, - "user_properties": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - "session_id": -1 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Chrome", - "os_version": "test os", - "device_model": "Mac", - "platform": "Web", - "device_id": "lynnanderson@smith.net", - "app_name": "RudderLabs JavaScript SDK", - "app_version": "1.0.0", - "language": "en-US", - "session_id": -1, - "insert_id": "84e26acc-56a5-4835-8233-591137fca468", - "ip": "0.0.0.0", - "user_properties": { - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com", - "anonymousId": "123456", - "email": "test@rudderstack.com", - "postalCode": 712136, - "state": "WB", - "street": "", - "ip": "0.0.0.0", - "age": 26, - "device_id": "lynnanderson@smith.net" - }, - "event_type": "$identify", - "time": 1571043797562, - "user_id": "123456", - "country": "India", - "city": "kolkata", - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "123456" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Chrome", - "os_version": "test os", - "device_model": "Mac", - "platform": "Web", - "device_id": "lynnanderson@smith.net", - "app_name": "RudderLabs JavaScript SDK", - "app_version": "1.0.0", - "language": "en-US", - "session_id": -1, - "insert_id": "84e26acc-56a5-4835-8233-591137fca468", - "ip": "0.0.0.0", - "user_properties": { - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com", - "anonymousId": "123456", - "email": "test@rudderstack.com", - "postalCode": 712136, - "state": "WB", - "street": "", - "ip": "0.0.0.0", - "age": 26, - "device_id": "lynnanderson@smith.net" - }, - "event_type": "$identify", - "time": 1571043797562, - "user_id": "123456", - "country": "India", - "city": "kolkata", - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "123456" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Chrome", - "os_version": "77.0.3865.90", - "city": "kolkata", - "country": "India", - "platform": "Web", - "device_model": "Mac", - "library": "rudderstack", - "device_id": "123456", - "insert_id": "84e26acc-56a5-4835-8233-591137fca468", - "app_name": "RudderLabs JavaScript SDK", - "app_version": "1.0.0", - "language": "en-US", - "session_id": -1, - "event_type": "$identify", - "user_properties": { - "anonymousId": "123456", - "email": "test@rudderstack.com", - "postalCode": 712136, - "state": "WB", - "street": "", - "ip": "0.0.0.0", - "age": 26, - "initial_referring_domain": "docs.rudderstack.com", - "initial_referrer": "https://docs.rudderstack.com" - }, - "time": 1571043797562, - "user_id": "123456", - "ip": "0.0.0.0" - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "123456" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Chrome", - "os_version": "77.0.3865.90", - "platform": "Web", - "library": "rudderstack", - "device_model": "Mac", - "device_id": "00000000000000000000000000", - "insert_id": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", - "app_name": "RudderLabs JavaScript SDK", - "app_version": "1.0.0", - "language": "en-US", - "event_type": "Viewed ApplicationLoaded Page", - "event_properties": { - "category": "destination", - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "name": "ApplicationLoaded", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "initial_referring_domain": "docs.rudderstack.com", - "initial_referrer": "https://docs.rudderstack.com" - }, - "session_id": -1, - "ip": "1.1.1.1", - "time": 1571051718299, - "user_id": "12345", - "user_properties": { - "anonymousId": "12345", - "email": "test@rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com", - "initial_referrer": "https://docs.rudderstack.com" - } - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "00000000000000000000000000" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Chrome", - "os_version": "77.0.3865.90", - "platform": "Web", - "library": "rudderstack", - "device_model": "Mac", - "device_id": "00000000000000000000000000", - "insert_id": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", - "app_name": "RudderLabs JavaScript SDK", - "app_version": "1.0.0", - "language": "en-US", - "event_type": "Viewed ApplicationLoaded Page", - "event_properties": { - "category": "destination", - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "name": "ApplicationLoaded", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "initial_referring_domain": "docs.rudderstack.com", - "initial_referrer": "https://docs.rudderstack.com" - }, - "session_id": -1, - "ip": "1.1.1.1", - "groups": { - "Company": "ABC" - }, - "time": 1571051718299, - "user_id": "12345", - "user_properties": { - "anonymousId": "12345", - "email": "test@rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com", - "initial_referrer": "https://docs.rudderstack.com" - } - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "00000000000000000000000000" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Chrome", - "os_version": "77.0.3865.90", - "platform": "Web", - "library": "rudderstack", - "device_model": "Mac", - "device_id": "00000000000000000000000000", - "insert_id": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "app_name": "RudderLabs JavaScript SDK", - "app_version": "1.0.0", - "language": "en-US", - "event_type": "test track event", - "session_id": -1, - "event_properties": { - "user_actual_role": "system_admin", - "user_actual_id": 12345, - "user_time_spent": 50000 - }, - "time": 1571051718300, - "user_id": "12345", - "user_properties": { - "anonymousId": "12345", - "email": "test@rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com", - "initial_referrer": "https://docs.rudderstack.com" - }, - "ip": "0.0.0.0" - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "00000000000000000000000000" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Chrome", - "os_version": "77.0.3865.90", - "city": "kolkata", - "country": "India", - "platform": "Web", - "library": "rudderstack", - "device_model": "Mac", - "device_id": "123456", - "insert_id": "84e26acc-56a5-4835-8233-591137fca468", - "app_name": "RudderLabs JavaScript SDK", - "app_version": "1.0.0", - "language": "en-US", - "session_id": -1, - "event_type": "$identify", - "user_properties": { - "anonymousId": "123456", - "email": "test@rudderstack.com", - "postalCode": 712136, - "state": "WB", - "street": "", - "ip": "0.0.0.0", - "age": 26, - "initial_referring_domain": "docs.rudderstack.com", - "initial_referrer": "https://docs.rudderstack.com" - }, - "time": 1571043797562, - "user_id": "123456", - "ip": "0.0.0.0" - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "123456" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "device_id": "123456", - "library": "rudderstack", - "user_properties": { - "device_id": "adddd0001", - "device_os": "ios", - "device_make": "apple iphone", - "app_version": "v1.0", - "timestamp": "2020-08-28 09:00:00" - }, - "event_type": "$identify", - "session_id": 1598597129, - "time": 0, - "user_id": "ubcdfghi0001" - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "123456" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "device_id": "123456", - "session_id": 1598597129, - "event_type": "$identify", - "library": "rudderstack", - "user_properties": { - "device_id": "adddd0001", - "device_os": "ios", - "device_make": "apple iphone", - "app_version": "v1.0", - "timestamp": "2020-08-28 09:00:00" - }, - "time": 0, - "user_id": "ubcdfghi0001" - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "123456" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "device_id": "123456", - "session_id": 1598597129, - "event_type": "$identify", - "library": "rudderstack", - "user_properties": { - "device_id": "adddd0001", - "device_os": "ios", - "device_make": "apple iphone", - "app_version": "v1.0", - "timestamp": "2020-08-28 09:00:00" - }, - "time": 0, - "user_id": "ubcdfghi0001" - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "123456" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "device_id": "123456", - "session_id": -1, - "event_type": "$identify", - "library": "rudderstack", - "user_properties": { - "device_id": "adddd0001", - "device_os": "ios", - "device_make": "apple iphone", - "app_version": "v1.0", - "timestamp": "2020-08-28 09:00:00" - }, - "time": 0, - "user_id": "ubcdfghi0001" - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "123456" - }, - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Chrome", - "os_version": "85.0.4183.121", - "platform": "Web", - "library": "rudderstack", - "device_model": "Mac", - "device_id": "my-anonymous-id-new", - "app_name": "RudderLabs JavaScript SDK", - "app_version": "1.1.5", - "language": "en-US", - "event_type": "$identify", - "groups": { - "Company": "ABC" - }, - "user_properties": { - "Company": "ABC", - "utm_content": "some content", - "utm_medium": "medium", - "utm_name": "some campaign", - "utm_source": "google", - "utm_term": "keyword", - "utm_test": "other value", - "initial_referring_domain": "docs.rudderstack.com", - "initial_referrer": "https://docs.rudderstack.com" - }, - "time": 1603180498983, - "user_id": "sampleusrRudder3", - "session_id": -1 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "my-anonymous-id-new" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/groupidentify", - "headers": {}, - "params": {}, - "body": { - "JSON": {}, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "api_key": "abcde", - "identification": ["{\"group_type\":\"Company\",\"group_value\":\"ABC\"}"] - } - }, - "files": {}, - "userId": "my-anonymous-id-new" - } - ], - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Chrome", - "os_version": "85.0.4183.121", - "platform": "Web", - "library": "rudderstack", - "device_model": "Mac", - "device_id": "my-anonymous-id-new", - "app_name": "RudderLabs JavaScript SDK", - "app_version": "1.1.5", - "language": "en-US", - "event_type": "$identify", - "user_properties": { - "Company": "ABC", - "utm_content": "some content", - "utm_medium": "medium", - "utm_name": "some campaign", - "utm_source": "google", - "utm_term": "keyword", - "utm_test": "other value", - "initial_referring_domain": "docs.rudderstack.com", - "initial_referrer": "https://docs.rudderstack.com" - }, - "groups": { - "Company": "ABC" - }, - "time": 1603180498983, - "user_id": "sampleusrRudder3", - "session_id": -1 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "my-anonymous-id-new" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/groupidentify", - "headers": {}, - "params": {}, - "body": { - "JSON": {}, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "api_key": "abcde", - "identification": [ - "{\"group_type\":\"Company\",\"group_value\":\"ABC\",\"group_properties\":{\"KEY_3\":{\"CHILD_KEY_92\":\"value_95\",\"CHILD_KEY_102\":\"value_103\"},\"KEY_2\":{\"CHILD_KEY_92\":\"value_95\",\"CHILD_KEY_102\":\"value_103\"},\"name_trait\":\"Company\",\"value_trait\":\"ABC\"}}" - ] - } - }, - "files": {}, - "userId": "my-anonymous-id-new" - } - ], - { - "error": "Group call parameters are not valid" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/usermap", - "headers": {}, - "params": {}, - "body": { - "JSON": {}, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "api_key": "abcde", - "mapping": [ - "{\"global_user_id\":\"newUserIdAlias\",\"user_id\":\"sampleusrRudder3\",\"user_properties\":{\"initial_referrer\":\"https://docs.rudderstack.com\",\"initial_referring_domain\":\"docs.rudderstack.com\",\"utm_source\":\"google\",\"utm_medium\":\"medium\",\"utm_term\":\"keyword\",\"utm_content\":\"some content\",\"utm_name\":\"some campaign\",\"utm_test\":\"other value\"}}" - ] - } - }, - "files": {}, - "userId": "my-anonymous-id-new" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/usermap", - "headers": {}, - "params": {}, - "body": { - "JSON": {}, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "api_key": "abcde", - "mapping": [ - "{\"user_id\":\"sampleusrRudder3\",\"user_properties\":{\"initial_referrer\":\"https://docs.rudderstack.com\",\"initial_referring_domain\":\"docs.rudderstack.com\",\"utm_source\":\"google\",\"utm_medium\":\"medium\",\"utm_term\":\"keyword\",\"utm_content\":\"some content\",\"utm_name\":\"some campaign\",\"utm_test\":\"other value\"},\"unmap\":true}" - ] - } - }, - "files": {}, - "userId": "my-anonymous-id-new" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Android", - "os_version": "9", - "library": "rudderstack", - "device_id": "0572f78fa49c648e", - "insert_id": "1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466", - "carrier": "Android", - "app_name": "AMTestProject", - "app_version": "1.0", - "language": "en-US", - "event_type": "Sample track event BEFORE IDENTIFY1**", - "time": 1600355223515, - "user_id": "0572f78fa49c648e", - "user_properties": { - "id": "0572f78fa49c648e", - "userId": "0572f78fa49c648e", - "address": {}, - "company": {}, - "anonymousId": "0572f78fa49c648e", - "initial_referring_domain": "docs.rudderstack.com", - "initial_referrer": "https://docs.rudderstack.com" - }, - "session_id": -1 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "0572f78fa49c648e" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Android", - "os_version": "9", - "device_model": "AOSP on IA Emulator", - "device_manufacturer": "Google", - "platform": "Android", - "device_id": "0572f78fa49c648e", - "insert_id": "1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466", - "library": "rudderstack", - "carrier": "Android", - "app_name": "AMTestProject", - "app_version": "1.0", - "language": "en-US", - "event_type": "Sample track event BEFORE IDENTIFY1**", - "device_brand": "Google", - "time": 1600355223515, - "user_id": "0572f78fa49c648e", - "user_properties": { - "id": "0572f78fa49c648e", - "userId": "0572f78fa49c648e", - "address": {}, - "company": {}, - "anonymousId": "0572f78fa49c648e" - }, - "session_id": -1 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "0572f78fa49c648e" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Android", - "os_version": "9", - "device_model": "AOSP on IA Emulator", - "library": "rudderstack", - "device_manufacturer": "Google", - "platform": "Android", - "device_id": "0572f78fa49c648e", - "adid": "44c97318-9040-4361-8bc7-4eb30f665ca8", - "insert_id": "1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466", - "carrier": "Android", - "app_name": "AMTestProject", - "app_version": "1.0", - "language": "en-US", - "event_type": "Sample track event BEFORE IDENTIFY1**", - "device_brand": "Google", - "time": 1600355223515, - "user_id": "0572f78fa49c648e", - "user_properties": { - "id": "0572f78fa49c648e", - "userId": "0572f78fa49c648e", - "address": {}, - "company": {}, - "anonymousId": "0572f78fa49c648e" - }, - "session_id": -1 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "0572f78fa49c648e" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "iOS", - "os_version": "14.4.1", - "device_model": "iPhone XR", - "device_manufacturer": "Apple", - "platform": "iOS", - "library": "rudderstack", - "idfv": "0572f78fa49c648e", - "device_id": "0572f78fa49c648e", - "insert_id": "1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466", - "carrier": "AT&T", - "app_name": "AMTestProject", - "app_version": "1.0", - "language": "en-US", - "event_type": "Sample track event BEFORE IDENTIFY1**", - "device_brand": "Apple", - "time": 1600355223515, - "user_id": "0572f78fa49c648e", - "user_properties": { - "id": "0572f78fa49c648e", - "userId": "0572f78fa49c648e", - "address": {}, - "company": {}, - "anonymousId": "0572f78fa49c648e" - }, - "session_id": -1 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "0572f78fa49c648e" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "iOS", - "os_version": "14.4.1", - "device_model": "iPhone XR", - "device_manufacturer": "Apple", - "platform": "iOS", - "library": "rudderstack", - "device_id": "0572f78fa49c648e", - "idfa": "1606e649-c97e-4d5f-a2ef-b81dbc66741a", - "idfv": "0572f78fa49c648e", - "insert_id": "1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466", - "carrier": "AT&T", - "app_name": "AMTestProject", - "app_version": "1.0", - "language": "en-US", - "event_type": "Sample track event BEFORE IDENTIFY1**", - "device_brand": "Apple", - "time": 1600355223515, - "user_id": "0572f78fa49c648e", - "user_properties": { - "id": "0572f78fa49c648e", - "userId": "0572f78fa49c648e", - "address": {}, - "company": {}, - "anonymousId": "0572f78fa49c648e" - }, - "session_id": -1 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "0572f78fa49c648e" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "device_id": "anon-id-new", - "library": "rudderstack", - "event_properties": { - "prop1": "5", - "name": "Screen View" - }, - "event_type": "Viewed Screen View Screen", - "time": 1580602989544, - "user_id": "identified user id", - "user_properties": {}, - "session_id": -1, - "ip": "14.5.67.21" - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "anon-id-new" - }, - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "device_id": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "library": "rudderstack", - "event_type": "Order Completed", - "insert_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "event_properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "price": 25, - "quantity": 2, - "revenue": 48, - "revenueType": "Purchased", - "time": 1597383030118, - "user_properties": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - "session_id": -1 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "library": "rudderstack", - "device_id": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "event_type": "Product Purchased", - "insert_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9-1", - "event_properties": { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "price": 19, - "category": "Games", - "quantity": 1, - "image_url": "https:///www.example.com/product/path.jpg", - "product_id": "507f1f77bcf86cd799439011" - }, - "time": 1597383030118, - "user_properties": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - "session_id": -1 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "library": "rudderstack", - "device_id": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "event_type": "Product Purchased", - "insert_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9-2", - "event_properties": { - "sku": "46493-32", - "name": "Uno Card Game", - "price": 3, - "category": "Games", - "quantity": 2, - "product_id": "505bd76785ebb509fc183733" - }, - "time": 1597383030118, - "user_properties": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - "session_id": -1 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - } - ], - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "device_id": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "library": "rudderstack", - "event_type": "Order Completed", - "insert_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "event_properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "products": [ - { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "price": 19, - "category": "Games", - "quantity": 1, - "image_url": "https:///www.example.com/product/path.jpg", - "product_id": "507f1f77bcf86cd799439011" - }, - { - "sku": "46493-32", - "name": "Uno Card Game", - "price": 3, - "category": "Games", - "quantity": 2, - "product_id": "505bd76785ebb509fc183733" - } - ], - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "revenueType": "Purchased", - "price": 25, - "quantity": 2, - "revenue": 48, - "time": 1597383030118, - "user_properties": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - "session_id": -1 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "device_id": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "library": "rudderstack", - "event_type": "Order Completed", - "insert_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "event_properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "time": 1597383030118, - "user_properties": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - "session_id": -1 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "device_id": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "library": "rudderstack", - "event_type": "Product Purchased", - "productId": "507f1f77bcf86cd799439011", - "insert_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9-1", - "event_properties": { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "category": "Games", - "image_url": "https:///www.example.com/product/path.jpg" - }, - "price": 19, - "quantity": 1, - "revenueType": "Purchased", - "time": 1597383030118, - "user_properties": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - "session_id": -1 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "device_id": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "library": "rudderstack", - "event_type": "Product Purchased", - "productId": "505bd76785ebb509fc183733", - "insert_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9-2", - "event_properties": { - "sku": "46493-32", - "name": "Uno Card Game", - "category": "Games" - }, - "price": 3, - "quantity": 2, - "revenueType": "Purchased", - "time": 1597383030118, - "user_properties": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - "session_id": -1 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - } - ], - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "device_id": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "library": "rudderstack", - "event_type": "Order Completed", - "insert_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "event_properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "price": 25, - "products": [ - { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "price": 19, - "category": "Games", - "quantity": 1, - "image_url": "https:///www.example.com/product/path.jpg", - "product_id": "507f1f77bcf86cd799439011" - }, - { - "sku": "46493-32", - "name": "Uno Card Game", - "price": 3, - "category": "Games", - "quantity": 2, - "product_id": "505bd76785ebb509fc183733" - } - ], - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "time": 1597383030118, - "user_properties": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - "session_id": -1 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "device_id": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "library": "rudderstack", - "event_type": "Product Purchased", - "productId": "507f1f77bcf86cd799439011", - "insert_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9-1", - "event_properties": { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "category": "Games", - "image_url": "https:///www.example.com/product/path.jpg" - }, - "price": 19, - "quantity": 1, - "revenueType": "Purchased", - "time": 1597383030118, - "user_properties": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - "session_id": -1 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "device_id": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "library": "rudderstack", - "event_type": "Product Purchased", - "productId": "505bd76785ebb509fc183733", - "insert_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9-2", - "event_properties": { - "sku": "46493-32", - "name": "Uno Card Game", - "category": "Games" - }, - "price": 3, - "quantity": 2, - "revenueType": "Purchased", - "time": 1597383030118, - "user_properties": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - "session_id": -1 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - } - ], - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "device_id": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "library": "rudderstack", - "event_type": "Order Completed", - "insert_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "event_properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "price": 25, - "quantity": 2, - "revenue": 48, - "revenueType": "Purchased", - "time": 1597383030118, - "user_properties": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - "session_id": -1 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "device_id": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "library": "rudderstack", - "event_type": "Order Completed", - "insert_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "event_properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "price": 25, - "quantity": 2, - "revenue": 48, - "revenueType": "Purchased", - "time": 1597383030118, - "user_properties": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - "session_id": -1 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "device_id": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "library": "rudderstack", - "event_type": "Order Completed", - "insert_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "event_properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "price": 25, - "quantity": 2, - "revenue": 48, - "revenueType": "Purchased", - "time": 1597383030118, - "user_properties": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - "session_id": -1 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "device_id": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "library": "rudderstack", - "event_type": "Order Completed", - "insert_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "event_properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "price": 25, - "quantity": 2, - "revenue": 48, - "revenueType": "Purchased", - "time": 1597383030118, - "user_properties": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - "session_id": -1 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Chrome", - "os_version": "86.0.4240.198", - "library": "rudderstack", - "device_model": "Mac", - "platform": "Web", - "device_id": "2f8b0ba7-d76e-4b91-9577-d1b6ebd68946", - "app_name": "RudderLabs JavaScript SDK", - "app_version": "1.1.8", - "language": "en-GB", - "insert_id": "6f08cc45-95c3-40c1-90f2-2f44a92947ef", - "event_type": "$identify", - "user_properties": { - "name": "Manashi", - "phone": "990099009900", - "subjects": 5, - "experience": 2, - "$add": { - "age": 12, - "friends": 3 - }, - "initial_referring_domain": "docs.rudderstack.com", - "initial_referrer": "https://docs.rudderstack.com" - }, - "time": 1605853102342, - "user_id": "User_111", - "session_id": -1 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "2f8b0ba7-d76e-4b91-9577-d1b6ebd68946" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Chrome", - "os_version": "86.0.4240.198", - "device_model": "Mac", - "library": "rudderstack", - "platform": "Web", - "device_id": "2f8b0ba7-d76e-4b91-9577-d1b6ebd68946", - "app_name": "RudderLabs JavaScript SDK", - "app_version": "1.1.8", - "language": "en-GB", - "insert_id": "6f08cc45-95c3-40c1-90f2-2f44a92947ef", - "event_type": "$identify", - "user_properties": { - "name": "Manashi", - "phone": "990099009900", - "friends": 3, - "age": 12, - "experience": 2, - "$setOnce": { - "subjects": 5 - } - }, - "time": 1605853102342, - "user_id": "User_111", - "session_id": -1 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "2f8b0ba7-d76e-4b91-9577-d1b6ebd68946" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Chrome", - "os_version": "86.0.4240.198", - "device_model": "Mac", - "library": "rudderstack", - "platform": "Web", - "device_id": "2f8b0ba7-d76e-4b91-9577-d1b6ebd68946", - "app_name": "RudderLabs JavaScript SDK", - "app_version": "1.1.8", - "language": "en-GB", - "insert_id": "6f08cc45-95c3-40c1-90f2-2f44a92947ef", - "event_type": "$identify", - "user_properties": { - "phone": "990099009900", - "friends": 3, - "age": 12, - "subjects": 5, - "experience": 2, - "$append": { - "name": "Manashi" - } - }, - "time": 1605853102342, - "user_id": "User_111", - "session_id": -1 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "2f8b0ba7-d76e-4b91-9577-d1b6ebd68946" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Chrome", - "os_version": "86.0.4240.198", - "device_model": "Mac", - "library": "rudderstack", - "platform": "Web", - "device_id": "2f8b0ba7-d76e-4b91-9577-d1b6ebd68946", - "app_name": "RudderLabs JavaScript SDK", - "app_version": "1.1.8", - "language": "en-GB", - "insert_id": "6f08cc45-95c3-40c1-90f2-2f44a92947ef", - "event_type": "$identify", - "user_properties": { - "name": "Manashi", - "phone": "990099009900", - "friends": 3, - "age": 12, - "subjects": 5, - "$prepend": { - "experience": 2 - } - }, - "time": 1605853102342, - "user_id": "User_111", - "session_id": -1 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "2f8b0ba7-d76e-4b91-9577-d1b6ebd68946" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Chrome", - "os_version": "86.0.4240.198", - "device_model": "Mac", - "library": "rudderstack", - "platform": "Web", - "device_id": "2f8b0ba7-d76e-4b91-9577-d1b6ebd68946", - "app_name": "RudderLabs JavaScript SDK", - "app_version": "1.1.8", - "language": "en-GB", - "insert_id": "6f08cc45-95c3-40c1-90f2-2f44a92947ef", - "event_type": "$identify", - "user_properties": { - "phone": "990099009900", - "$add": { - "age": 12, - "friends": 3 - }, - "$setOnce": { - "subjects": 5 - }, - "$append": { - "name": "Manashi" - }, - "$prepend": { - "experience": 2 - } - }, - "time": 1605853102342, - "user_id": "User_111", - "session_id": -1 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "2f8b0ba7-d76e-4b91-9577-d1b6ebd68946" - }, - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Android", - "os_version": "11", - "device_model": "SM-A025M", - "device_manufacturer": "samsung", - "platform": "Android", - "device_id": "50be5c78-6c3f-4b60-be84-97805a31aaa1", - "carrier": "T-Mobile", - "app_version": "2.6.0 v3", - "language": "en-US", - "insert_id": "7208abb6-2c4e-45bb-bf5b-aa426f3593a2", - "user_properties": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a31aaa1", - "address": { - "postalCode": 712136, - "state": "WB", - "street": "" - } - }, - "event_properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "country": "United States", - "city": "San Francisco", - "event_type": "Order Completed", - "user_id": "userID123", - "time": 1597383030118, - "session_id": -1, - "region": "California", - "location_lat": "37.7672319", - "location_lng": "-122.4021353", - "dma": "San Francisco-Oakland-San Jose, CA", - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "50be5c78-6c3f-4b60-be84-97805a31aaa1" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Android", - "os_version": "11", - "device_model": "SM-A025M", - "device_manufacturer": "samsung", - "platform": "Android", - "device_id": "50be5c78-6c3f-4b60-be84-97805a31aaa1", - "carrier": "T-Mobile", - "app_version": "2.6.0 v3", - "language": "en-US", - "event_type": "Product Purchased", - "insert_id": "7208abb6-2c4e-45bb-bf5b-aa426f3593a2-1", - "user_properties": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a31aaa1", - "address": { - "postalCode": 712136, - "state": "WB", - "street": "" - } - }, - "event_properties": { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "category": "Games", - "image_url": "https:///www.example.com/product/path.jpg" - }, - "country": "United States", - "city": "San Francisco", - "user_id": "userID123", - "productId": "507f1f77bcf86cd799439011", - "revenueType": "Purchased", - "price": 19, - "quantity": 1, - "time": 1597383030118, - "session_id": -1, - "region": "California", - "location_lat": "37.7672319", - "location_lng": "-122.4021353", - "dma": "San Francisco-Oakland-San Jose, CA", - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "50be5c78-6c3f-4b60-be84-97805a31aaa1" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Android", - "os_version": "11", - "device_model": "SM-A025M", - "device_manufacturer": "samsung", - "platform": "Android", - "device_id": "50be5c78-6c3f-4b60-be84-97805a31aaa1", - "carrier": "T-Mobile", - "app_version": "2.6.0 v3", - "language": "en-US", - "event_type": "Product Purchased", - "insert_id": "7208abb6-2c4e-45bb-bf5b-aa426f3593a2-2", - "user_properties": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a31aaa1", - "address": { - "postalCode": 712136, - "state": "WB", - "street": "" - } - }, - "event_properties": { - "sku": "46493-32", - "name": "Uno Card Game", - "category": "Games" - }, - "country": "United States", - "city": "San Francisco", - "user_id": "userID123", - "productId": "505bd76785ebb509fc183733", - "revenueType": "Purchased", - "price": 3, - "quantity": 2, - "time": 1597383030118, - "session_id": -1, - "region": "California", - "location_lat": "37.7672319", - "location_lng": "-122.4021353", - "dma": "San Francisco-Oakland-San Jose, CA", - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "50be5c78-6c3f-4b60-be84-97805a31aaa1" - } - ], - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Android", - "os_version": "11", - "device_model": "SM-A025M", - "device_manufacturer": "samsung", - "platform": "Android", - "device_id": "50be5c78-6c3f-4b60-be84-97805a31aaa1", - "carrier": "T-Mobile", - "app_version": "2.6.0 v3", - "language": "en-US", - "insert_id": "7208abb6-2c4e-45bb-bf5b-aa426f3593a2", - "user_properties": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a31aaa1", - "address": { - "postalCode": 712136, - "state": "WB", - "street": "" - } - }, - "event_properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "products": [ - { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "price": 19, - "category": "Games", - "quantity": 1, - "image_url": "https:///www.example.com/product/path.jpg", - "product_id": "507f1f77bcf86cd799439011" - }, - { - "sku": "46493-32", - "name": "Uno Card Game", - "price": 3, - "category": "Games", - "quantity": 2, - "product_id": "505bd76785ebb509fc183733" - } - ], - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "country": "India", - "city": "kolkata", - "event_type": "Order Completed", - "user_id": "userID123", - "revenueType": "Purchased", - "price": 25.0, - "quantity": 2, - "revenue": 48, - "time": 1597383030118, - "session_id": -1, - "location_lat": "37.7672319", - "location_lng": "-122.4021353", - "dma": "San Francisco-Oakland-San Jose, CA", - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "50be5c78-6c3f-4b60-be84-97805a31aaa1" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Android", - "os_version": "11", - "device_model": "SM-A025M", - "device_manufacturer": "samsung", - "platform": "Android", - "carrier": "T-Mobile", - "app_version": "2.6.0 v3", - "language": "en-US", - "insert_id": "7208abb6-2c4e-45bb-bf5b-aa426f3593a2", - "user_properties": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a31aaa1", - "address": { - "postalCode": 712136, - "state": "WB", - "street": "" - } - }, - "event_properties": { - "externalID": "1637170658229-3961832492194264209" - }, - "country": "United States", - "city": "San Francisco", - "event_type": "App_Opened", - "user_id": "ab419c3a-47ce-11ec-82ac-16a1bb813a59", - "device_brand": "samsung", - "time": 1597383030118, - "session_id": -1, - "location_lat": "37.7672319", - "location_lng": "-122.4021353", - "dma": "San Francisco-Oakland-San Jose, CA", - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "app_name": "RudderLabs JavaScript SDK", - "app_version": "1.1.8", - "device_id": "2f8b0ba7-d76e-4b91-9577-d1b6ebd68946", - "device_model": "Mac", - "event_type": "$identify", - "os_name": "Chrome", - "os_version": "86.0.4240.198", - "platform": "Web", - "insert_id": "6f08cc45-95c3-40c1-90f2-2f44a92947ef", - "language": "en-GB", - "library": "rudderstack", - "time": 1605853102342, - "user_id": "User_111", - "user_properties": { - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - }, - "session_id": -1 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "2f8b0ba7-d76e-4b91-9577-d1b6ebd68946" - }, - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Android", - "os_version": "11", - "device_model": "SM-A025M", - "device_manufacturer": "samsung", - "platform": "Android", - "device_id": "50be5c78-6c3f-4b60-be84-97805a31aaa1", - "carrier": "T-Mobile", - "app_version": "2.6.0 v3", - "language": "en-US", - "insert_id": "7208abb6-2c4e-45bb-bf5b-aa426f3593a2", - "location_lat": "37.7672319", - "location_lng": "-122.4021353", - "dma": "San Francisco-Oakland-San Jose, CA", - "user_properties": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a31aaa1", - "address": { - "postalCode": 712136, - "state": "WB", - "street": "" - } - }, - "event_properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 0, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "products": [ - { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "price": 19, - "category": "Games", - "quantity": 1, - "image_url": "https:///www.example.com/product/path.jpg", - "product_id": "507f1f77bcf86cd799439011" - }, - { - "sku": "46493-32", - "name": "Uno Card Game", - "price": 3, - "category": "Games", - "quantity": 2, - "product_id": "505bd76785ebb509fc183733" - } - ], - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "country": "India", - "city": "kolkata", - "event_type": "Order Completed", - "user_id": "userID123", - "time": 1597383030118, - "session_id": -1, - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "50be5c78-6c3f-4b60-be84-97805a31aaa1" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Android", - "os_version": "11", - "device_model": "SM-A025M", - "device_manufacturer": "samsung", - "platform": "Android", - "device_id": "50be5c78-6c3f-4b60-be84-97805a31aaa1", - "carrier": "T-Mobile", - "app_version": "2.6.0 v3", - "language": "en-US", - "event_type": "Product Purchased", - "insert_id": "7208abb6-2c4e-45bb-bf5b-aa426f3593a2-1", - "location_lat": "37.7672319", - "location_lng": "-122.4021353", - "dma": "San Francisco-Oakland-San Jose, CA", - "user_properties": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a31aaa1", - "address": { - "postalCode": 712136, - "state": "WB", - "street": "" - } - }, - "event_properties": { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "category": "Games", - "image_url": "https:///www.example.com/product/path.jpg" - }, - "country": "India", - "city": "kolkata", - "user_id": "userID123", - "productId": "507f1f77bcf86cd799439011", - "revenueType": "Purchased", - "price": 19, - "quantity": 1, - "time": 1597383030118, - "session_id": -1, - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "50be5c78-6c3f-4b60-be84-97805a31aaa1" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Android", - "os_version": "11", - "device_model": "SM-A025M", - "device_manufacturer": "samsung", - "platform": "Android", - "device_id": "50be5c78-6c3f-4b60-be84-97805a31aaa1", - "carrier": "T-Mobile", - "app_version": "2.6.0 v3", - "language": "en-US", - "event_type": "Product Purchased", - "insert_id": "7208abb6-2c4e-45bb-bf5b-aa426f3593a2-2", - "location_lat": "37.7672319", - "location_lng": "-122.4021353", - "dma": "San Francisco-Oakland-San Jose, CA", - "user_properties": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a31aaa1", - "address": { - "postalCode": 712136, - "state": "WB", - "street": "" - } - }, - "event_properties": { - "sku": "46493-32", - "name": "Uno Card Game", - "category": "Games" - }, - "country": "India", - "city": "kolkata", - "user_id": "userID123", - "productId": "505bd76785ebb509fc183733", - "revenueType": "Purchased", - "price": 3, - "quantity": 2, - "time": 1597383030118, - "session_id": -1, - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "50be5c78-6c3f-4b60-be84-97805a31aaa1" - } - ], - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Android", - "os_version": "11", - "device_model": "SM-A025M", - "device_manufacturer": "samsung", - "device_id": "066a37dc92b16284", - "carrier": "T-Mobile", - "app_version": "2.6.0 v3", - "platform": "Android", - "language": "en-US", - "event_properties": { - "name": "Home", - "externalID": "1637763064335-7225034711957140329" - }, - "insert_id": "1639061715808-a934f1c2-7b55-4e78-bd4d-df209c30c8a1", - "ip": "186.54.216.75", - "user_properties": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a31aaa1", - "address": { - "postalCode": 712136, - "state": "WB", - "street": "" - } - }, - "country": "United States", - "city": "San Francisco", - "event_type": "Viewed Home Screen", - "user_id": "9e187bff-2867-11ec-82ac-02cdd434d6bf", - "device_brand": "samsung", - "time": 1639061715914, - "session_id": -1, - "region": "California", - "location_lat": "37.7672319", - "location_lng": "-122.4021353", - "dma": "San Francisco-Oakland-San Jose, CA", - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "066a37dc92b16284" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Android", - "os_version": "11", - "device_model": "SM-A025M", - "device_manufacturer": "samsung", - "device_id": "066a37dc92b16284", - "carrier": "T-Mobile", - "app_version": "2.6.0 v3", - "platform": "Android", - "language": "en-US", - "event_properties": { - "name": "Home", - "externalID": "1637763064336-7225034711957140329" - }, - "insert_id": "1639061715808-a934f1c2-7b55-5e78-bd4d-df209c31d8a2", - "ip": "186.54.216.75", - "user_properties": { - "anonymousId": "50be5c79-6c3f-4b60-be84-97805a32aaa1", - "address": { - "postalCode": 712136, - "state": "WB", - "street": "" - } - }, - "event_type": "Viewed Home Screen", - "user_id": "abcdef123456cf", - "device_brand": "samsung", - "time": 1639061715914, - "session_id": -1, - "city": "kolkata", - "country": "India", - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "066a37dc92b16284" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "device_manufacturer": "Apple", - "platform": "watchos", - "device_id": "0572f78fa49c648e", - "carrier": "AT&T", - "app_name": "AMTestProject", - "app_version": "1.0", - "language": "en-US", - "insert_id": "1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466", - "user_properties": { - "id": "0572f78fa49c648e", - "userId": "0572f78fa49c648e", - "address": {}, - "company": {}, - "anonymousId": "0572f78fa49c648e" - }, - "event_type": "Sample track event BEFORE IDENTIFY1**", - "user_id": "0572f78fa49c648e", - "device_brand": "Apple", - "idfa": "1606e649-c97e-4d5f-a2ef-b81dbc66741a", - "idfv": "0572f78fa49c648e", - "time": 1600355223515, - "session_id": -1, - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "0572f78fa49c648e" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "device_manufacturer": "Apple", - "platform": "ipados", - "device_id": "0572f78fa49c648e", - "carrier": "AT&T", - "app_name": "AMTestProject", - "app_version": "1.0", - "language": "en-US", - "insert_id": "1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466", - "user_properties": { - "id": "0572f78fa49c648e", - "userId": "0572f78fa49c648e", - "address": {}, - "company": {}, - "anonymousId": "0572f78fa49c648e" - }, - "event_type": "Sample track event BEFORE IDENTIFY1**", - "user_id": "0572f78fa49c648e", - "device_brand": "Apple", - "idfa": "1606e649-c97e-4d5f-a2ef-b81dbc66741a", - "idfv": "0572f78fa49c648e", - "time": 1600355223515, - "session_id": -1, - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "0572f78fa49c648e" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "device_manufacturer": "Apple", - "platform": "tvos", - "device_id": "0572f78fa49c648e", - "carrier": "AT&T", - "app_name": "AMTestProject", - "app_version": "1.0", - "language": "en-US", - "insert_id": "1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466", - "user_properties": { - "id": "0572f78fa49c648e", - "userId": "0572f78fa49c648e", - "address": {}, - "company": {}, - "anonymousId": "0572f78fa49c648e" - }, - "event_type": "Sample track event BEFORE IDENTIFY1**", - "user_id": "0572f78fa49c648e", - "device_brand": "Apple", - "idfa": "1606e649-c97e-4d5f-a2ef-b81dbc66741a", - "idfv": "0572f78fa49c648e", - "time": 1600355223515, - "session_id": -1, - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "0572f78fa49c648e" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Chrome", - "os_version": "77.0.3865.90", - "city": "kolkata", - "country": "India", - "platform": "Web", - "device_model": "Mac", - "library": "rudderstack", - "device_id": "123456", - "insert_id": "84e26acc-56a5-4835-8233-591137fca468", - "app_name": "RudderLabs JavaScript SDK", - "app_version": "1.0.0", - "language": "en-US", - "session_id": -1, - "event_type": "$identify", - "device_brand": "testBrand", - "device_manufacturer": "testManufacturer", - "user_properties": { - "anonymousId": "123456", - "email": "test@rudderstack.com", - "postalCode": 712136, - "state": "WB", - "street": "", - "ip": "0.0.0.0", - "age": 26, - "initial_referring_domain": "docs.rudderstack.com", - "initial_referrer": "https://docs.rudderstack.com" - }, - "time": 1571043797562, - "user_id": "123456", - "ip": "0.0.0.0" - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "123456" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Android", - "os_version": "9", - "library": "rudderstack", - "device_id": "0572f78fa49c648e", - "insert_id": "1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466", - "carrier": "Android", - "app_name": "AMTestProject", - "app_version": "1.0", - "language": "en-US", - "event_type": "Sample track event BEFORE IDENTIFY1**", - "device_brand": "testBrand", - "device_manufacturer": "testManufacturer", - "time": 1600355223515, - "user_id": "0572f78fa49c648e", - "user_properties": { - "id": "0572f78fa49c648e", - "userId": "0572f78fa49c648e", - "address": {}, - "company": {}, - "anonymousId": "0572f78fa49c648e", - "initial_referring_domain": "docs.rudderstack.com", - "initial_referrer": "https://docs.rudderstack.com" - }, - "session_id": -1 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "0572f78fa49c648e" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "device_id": "anon-id-new", - "device_brand": "testBrand", - "device_manufacturer": "testManufacturer", - "library": "rudderstack", - "event_properties": { - "prop1": "5", - "name": "Screen View" - }, - "event_type": "Viewed Screen View Screen", - "time": 1580602989544, - "user_id": "identified user id", - "user_properties": {}, - "session_id": -1, - "ip": "14.5.67.21" - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "anon-id-new" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.eu.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Chrome", - "os_version": "test os", - "device_model": "Mac", - "platform": "Web", - "device_id": "lynnanderson@smith.net", - "app_name": "RudderLabs JavaScript SDK", - "app_version": "1.0.0", - "language": "en-US", - "session_id": -1, - "insert_id": "84e26acc-56a5-4835-8233-591137fca468", - "ip": "0.0.0.0", - "user_properties": { - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com", - "anonymousId": "123456", - "email": "test@rudderstack.com", - "postalCode": 712136, - "state": "WB", - "street": "", - "ip": "0.0.0.0", - "age": 26, - "device_id": "lynnanderson@smith.net" - }, - "event_type": "$identify", - "time": 1571043797562, - "user_id": "123456", - "country": "India", - "city": "kolkata", - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "123456" - }, - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.eu.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Chrome", - "os_version": "85.0.4183.121", - "platform": "Web", - "library": "rudderstack", - "device_model": "Mac", - "device_id": "my-anonymous-id-new", - "app_name": "RudderLabs JavaScript SDK", - "app_version": "1.1.5", - "language": "en-US", - "event_type": "$identify", - "user_properties": { - "Company": "ABC", - "utm_content": "some content", - "utm_medium": "medium", - "utm_name": "some campaign", - "utm_source": "google", - "utm_term": "keyword", - "utm_test": "other value", - "initial_referring_domain": "docs.rudderstack.com", - "initial_referrer": "https://docs.rudderstack.com" - }, - "groups": { - "Company": "ABC" - }, - "time": 1603180498983, - "user_id": "sampleusrRudder3", - "session_id": -1 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "my-anonymous-id-new" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.eu.amplitude.com/groupidentify", - "headers": {}, - "params": {}, - "body": { - "JSON": {}, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "api_key": "abcde", - "identification": [ - "{\"group_type\":\"Company\",\"group_value\":\"ABC\",\"group_properties\":{\"KEY_3\":{\"CHILD_KEY_92\":\"value_95\",\"CHILD_KEY_102\":\"value_103\"},\"KEY_2\":{\"CHILD_KEY_92\":\"value_95\",\"CHILD_KEY_102\":\"value_103\"},\"name_trait\":\"Company\",\"value_trait\":\"ABC\"}}" - ] - } - }, - "files": {}, - "userId": "my-anonymous-id-new" - } - ], - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.eu.amplitude.com/usermap", - "headers": {}, - "params": {}, - "body": { - "JSON": {}, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "api_key": "abcde", - "mapping": [ - "{\"global_user_id\":\"newUserIdAlias\",\"user_id\":\"sampleusrRudder3\",\"user_properties\":{\"initial_referrer\":\"https://docs.rudderstack.com\",\"initial_referring_domain\":\"docs.rudderstack.com\",\"utm_source\":\"google\",\"utm_medium\":\"medium\",\"utm_term\":\"keyword\",\"utm_content\":\"some content\",\"utm_name\":\"some campaign\",\"utm_test\":\"other value\"}}" - ] - } - }, - "files": {}, - "userId": "my-anonymous-id-new" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Android", - "os_version": "11", - "device_model": "SM-A025M", - "device_manufacturer": "samsung", - "platform": "Android", - "event_id": 3, - "carrier": "T-Mobile", - "app_version": "2.6.0 v3", - "language": "en-US", - "insert_id": "7208abb6-2c4e-45bb-bf5b-aa426f3593a2", - "user_properties": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a31aaa1", - "address": { - "postalCode": 712136, - "state": "WB", - "street": "" - } - }, - "event_properties": { - "externalID": "1637170658229-3961832492194264209" - }, - "event_type": "App_Opened", - "user_id": "ab419c3a-47ce-11ec-82ac-16a1bb813a59", - "device_brand": "samsung", - "time": 1597383030118, - "session_id": -1, - "location_lat": "37.7672319", - "location_lng": "-122.4021353", - "dma": "San Francisco-Oakland-San Jose, CA", - "country": "United States", - "city": "San Francisco", - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Android", - "os_version": "11", - "device_model": "SM-A025M", - "device_manufacturer": "samsung", - "platform": "Android", - "event_id": 0, - "carrier": "T-Mobile", - "app_version": "2.6.0 v3", - "language": "en-US", - "insert_id": "7208abb6-2c4e-45bb-bf5b-aa426f3593a2", - "user_properties": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a31aaa1", - "address": { - "postalCode": 712136, - "state": "WB", - "street": "" - } - }, - "event_properties": { - "externalID": "1637170658229-3961832492194264209" - }, - "event_type": "App_Opened", - "user_id": "ab419c3a-47ce-11ec-82ac-16a1bb813a59", - "device_brand": "samsung", - "time": 1597383030118, - "session_id": -1, - "location_lat": "37.7672319", - "location_lng": "-122.4021353", - "dma": "San Francisco-Oakland-San Jose, CA", - "country": "United States", - "city": "San Francisco", - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Android", - "os_version": "11", - "device_model": "SM-A025M", - "device_manufacturer": "samsung", - "platform": "Android", - "carrier": "T-Mobile", - "app_version": "2.6.0 v3", - "language": "en-US", - "insert_id": "7208abb6-2c4e-45bb-bf5b-aa426f3593a2", - "user_properties": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a31aaa1", - "address": { - "postalCode": 712136, - "state": "WB", - "street": "" - } - }, - "event_properties": { - "externalID": "1637170658229-3961832492194264209" - }, - "event_type": "App_Opened", - "user_id": "ab419c3a-47ce-11ec-82ac-16a1bb813a59", - "device_brand": "samsung", - "time": 1597383030118, - "session_id": -1, - "location_lat": "37.7672319", - "location_lng": "-122.4021353", - "dma": "San Francisco-Oakland-San Jose, CA", - "country": "United States", - "city": "San Francisco", - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Chrome", - "os_version": "test os", - "device_model": "Mac", - "platform": "Web", - "event_id": 6, - "device_id": "lynnanderson@smith.net", - "app_name": "RudderLabs JavaScript SDK", - "app_version": "1.0.0", - "language": "en-US", - "insert_id": "84e26acc-56a5-4835-8233-591137fca468", - "ip": "0.0.0.0", - "user_properties": { - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com", - "anonymousId": "123456", - "email": "test@rudderstack.com", - "postalCode": 712136, - "state": "WB", - "street": "", - "ip": "0.0.0.0", - "age": 26, - "device_id": "lynnanderson@smith.net" - }, - "event_type": "$identify", - "time": 1571043797562, - "user_id": "123456", - "session_id": -1, - "country": "India", - "city": "kolkata", - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "123456" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Chrome", - "os_version": "test os", - "device_model": "Mac", - "platform": "Web", - "event_id": 6, - "device_id": "lynnanderson@smith.net", - "app_name": "RudderLabs JavaScript SDK", - "app_version": "1.0.0", - "language": "en-US", - "insert_id": "84e26acc-56a5-4835-8233-591137fca468", - "ip": "0.0.0.0", - "user_properties": { - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com", - "anonymousId": "123456", - "email": "test@rudderstack.com", - "postalCode": 712136, - "state": "WB", - "street": "", - "ip": "0.0.0.0", - "age": 26, - "device_id": "lynnanderson@smith.net" - }, - "event_type": "$identify", - "time": 1571043797562, - "user_id": "123456", - "session_id": -1, - "country": "India", - "city": "kolkata", - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "123456" - }, - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Chrome", - "os_version": "85.0.4183.121", - "device_model": "Mac", - "platform": "Web", - "event_id": 3, - "device_id": "my-anonymous-id-new", - "app_name": "RudderLabs JavaScript SDK", - "app_version": "1.1.5", - "language": "en-US", - "user_properties": { - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com", - "utm_source": "google", - "utm_medium": "medium", - "utm_term": "keyword", - "utm_content": "some content", - "utm_name": "some campaign", - "utm_test": "other value", - "Company": "ABC" - }, - "event_type": "$identify", - "groups": { - "Company": "ABC" - }, - "time": 1603180498983, - "user_id": "sampleusrRudder3", - "session_id": -1, - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "my-anonymous-id-new" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/groupidentify", - "headers": {}, - "params": {}, - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": { - "api_key": "abcde", - "identification": [ - "{\"group_type\":\"Company\",\"group_value\":\"ABC\",\"group_properties\":{\"KEY_3\":{\"CHILD_KEY_92\":\"value_95\",\"CHILD_KEY_102\":\"value_103\"},\"KEY_2\":{\"CHILD_KEY_92\":\"value_95\",\"CHILD_KEY_102\":\"value_103\"},\"name_trait\":\"Company\",\"value_trait\":\"ABC\"}}" - ] - } - }, - "files": {}, - "userId": "my-anonymous-id-new" - } - ], - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "event_id": 7, - "device_id": "anon-id-new", - "event_properties": { - "prop1": "5", - "name": "Screen View", - "event_id": 7 - }, - "user_properties": {}, - "event_type": "Viewed Screen View Screen", - "user_id": "identified user id", - "time": 1580602989544, - "session_id": -1, - "ip": "14.5.67.21", - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "anon-id-new" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Chrome", - "os_version": "77.0.3865.90", - "device_model": "Mac", - "platform": "Web", - "device_id": "00000000000000000000000000", - "app_name": "RudderLabs JavaScript SDK", - "app_version": "1.0.0", - "language": "en-US", - "event_type": "Viewed ApplicationLoaded Page", - "event_properties": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com", - "name": "ApplicationLoaded" - }, - "session_id": -1, - "insert_id": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", - "ip": "1.1.1.1", - "event_id": 2, - "user_properties": { - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com", - "email": "test@rudderstack.com", - "anonymousId": "12345" - }, - "user_id": "12345", - "time": 1571051718299, - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "00000000000000000000000000" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/usermap", - "headers": {}, - "params": {}, - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": { - "api_key": "abcde", - "mapping": [ - "{\"global_user_id\":\"newUserIdAlias\",\"user_id\":\"sampleusrRudder3\",\"event_id\":67,\"user_properties\":{\"initial_referrer\":\"https://docs.rudderstack.com\",\"initial_referring_domain\":\"docs.rudderstack.com\",\"utm_source\":\"google\",\"utm_medium\":\"medium\",\"utm_term\":\"keyword\",\"utm_content\":\"some content\",\"utm_name\":\"some campaign\",\"utm_test\":\"other value\"}}" - ] - } - }, - "files": {}, - "userId": "my-anonymous-id-new" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Android", - "os_version": "7.1.1", - "device_model": "Android SDK built for x86", - "device_manufacturer": "Google", - "device_id": "5d205961641ee6c5", - "carrier": "Android", - "app_name": "Sample Kotlin", - "app_version": "1.2", - "platform": "Android", - "language": "en-US", - "event_properties": { - "name": "Screen event" - }, - "insert_id": "1662393883248-509420bf-b812-4f8d-bdb2-8c811bfde87f", - "user_properties": { - "anonymousId": "5d205961641ee6c5", - "id": "User Android", - "userId": "User Android" - }, - "event_type": "Viewed Screen event Screen", - "user_id": "User Android", - "device_brand": "Google", - "time": 1662393883250, - "session_id": 1662393792, - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "5d205961641ee6c5" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Android", - "os_version": "7.1.1", - "device_model": "Android SDK built for x86", - "device_manufacturer": "Google", - "device_id": "5d205961641ee6c5", - "carrier": "Android", - "app_name": "Sample Kotlin", - "app_version": "1.2", - "platform": "Android", - "language": "en-US", - "event_properties": {}, - "insert_id": "1662393883248-509420bf-b812-4f8d-bdb2-8c811bfde87f", - "user_properties": { - "anonymousId": "5d205961641ee6c5", - "id": "User Android", - "userId": "User Android" - }, - "event_type": "Viewed Screen", - "user_id": "User Android", - "device_brand": "Google", - "time": 1662393883250, - "session_id": 1662393792, - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "5d205961641ee6c5" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Chrome", - "os_version": "test os", - "device_model": "Mac", - "platform": "Web", - "device_id": "lynnanderson@smith.net", - "app_name": "RudderLabs JavaScript SDK", - "app_version": "1.0.0", - "language": "en-US", - "insert_id": "84e26acc-56a5-4835-8233-591137fca468", - "ip": "0.0.0.0", - "user_properties": { - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com", - "anonymousId": "123456", - "email": "test@rudderstack.com", - "postalCode": 712136, - "state": "WB", - "street": "", - "ip": "0.0.0.0", - "age": 26, - "device_id": "lynnanderson@smith.net" - }, - "event_type": "$identify", - "time": 1571043797562, - "user_id": "123456", - "session_id": 1662393792, - "country": "India", - "city": "kolkata", - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "123456" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Android", - "os_version": "7.1.1", - "device_model": "Android SDK built for x86", - "device_manufacturer": "Google", - "device_id": "5d205961641ee6c5", - "carrier": "Android", - "app_name": "Sample Kotlin", - "app_version": "1.2", - "platform": "Android", - "language": "en-US", - "event_properties": { - "name": "Screen event" - }, - "insert_id": "1662393883248-509420bf-b812-4f8d-bdb2-8c811bfde87f", - "user_properties": { - "anonymousId": "5d205961641ee6c5", - "id": "User Android", - "userId": "User Android" - }, - "event_type": "Viewed Screen event Screen", - "user_id": "User Android", - "device_brand": "Google", - "time": 1662393883250, - "session_id": -1, - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "5d205961641ee6c5" - }, - { - "error": "Either of user ID or device ID fields must be specified" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Chrome", - "os_version": "77.0.3865.90", - "device_model": "Mac", - "platform": "Web", - "device_id": "00000000000000000000000000", - "app_name": "RudderLabs JavaScript SDK", - "app_version": "1.0.0", - "language": "en-US", - "event_type": "My custom Page Name is ApplicationLoaded . Custom Name.", - "event_properties": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com", - "name": "ApplicationLoaded" - }, - "session_id": -1, - "insert_id": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", - "ip": "1.1.1.1", - "event_id": 2, - "user_properties": { - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com", - "email": "test@rudderstack.com", - "anonymousId": "12345" - }, - "user_id": "12345", - "time": 1571051718299, - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "00000000000000000000000000" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Chrome", - "os_version": "77.0.3865.90", - "device_model": "Mac", - "platform": "Web", - "device_id": "00000000000000000000000000", - "app_name": "RudderLabs JavaScript SDK", - "app_version": "1.0.0", - "language": "en-US", - "event_type": "ApplicationLoaded", - "event_properties": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com", - "name": "ApplicationLoaded" - }, - "session_id": -1, - "insert_id": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", - "ip": "1.1.1.1", - "event_id": 2, - "user_properties": { - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com", - "email": "test@rudderstack.com", - "anonymousId": "12345" - }, - "user_id": "12345", - "time": 1571051718299, - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "00000000000000000000000000" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Chrome", - "os_version": "77.0.3865.90", - "device_model": "Mac", - "platform": "Web", - "device_id": "00000000000000000000000000", - "app_name": "RudderLabs JavaScript SDK", - "app_version": "1.0.0", - "language": "en-US", - "event_type": "ApplicationLoaded", - "event_properties": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com", - "name": "ApplicationLoaded" - }, - "session_id": -1, - "insert_id": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", - "ip": "1.1.1.1", - "event_id": 2, - "user_properties": { - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com", - "email": "test@rudderstack.com", - "anonymousId": "12345" - }, - "user_id": "12345", - "time": 1571051718299, - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "00000000000000000000000000" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Chrome", - "os_version": "77.0.3865.90", - "device_model": "Mac", - "platform": "Web", - "device_id": "00000000000000000000000000", - "app_name": "RudderLabs JavaScript SDK", - "app_version": "1.0.0", - "language": "en-US", - "event_type": "Viewed Page", - "event_properties": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - }, - "session_id": -1, - "insert_id": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", - "ip": "1.1.1.1", - "event_id": 2, - "user_properties": { - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com", - "email": "test@rudderstack.com", - "anonymousId": "12345" - }, - "user_id": "12345", - "time": 1571051718299, - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "00000000000000000000000000" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "device_id": "anon-id-new", - "library": "rudderstack", - "event_properties": { - "prop1": "5", - "name": "Screen View" - }, - "event_type": "My Screen View event.", - "time": 1580602989544, - "user_id": "identified user id", - "user_properties": {}, - "session_id": -1, - "ip": "14.5.67.21" - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "anon-id-new" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "device_id": "anon-id-new", - "library": "rudderstack", - "event_properties": { - "prop1": "5", - "name": "Screen View" - }, - "event_type": "Viewed Screen View Screen", - "time": 1580602989544, - "user_id": "identified user id", - "user_properties": {}, - "session_id": -1, - "ip": "14.5.67.21" - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "anon-id-new" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "device_id": "anon-id-new", - "library": "rudderstack", - "event_properties": { - "prop1": "5", - "name": "Screen same as event" - }, - "event_type": "Screen same as event", - "time": 1580602989544, - "user_id": "identified user id", - "user_properties": {}, - "session_id": -1, - "ip": "14.5.67.21" - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "anon-id-new" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "device_id": "anon-id-new", - "library": "rudderstack", - "event_properties": { - "prop1": "5", - "name": "Screen" - }, - "event_type": "Screen", - "time": 1580602989544, - "user_id": "identified user id", - "user_properties": {}, - "session_id": -1, - "ip": "14.5.67.21" - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "anon-id-new" - } -] diff --git a/test/__tests__/data/am_router_input.json b/test/__tests__/data/am_router_input.json deleted file mode 100644 index 83314ae7de..0000000000 --- a/test/__tests__/data/am_router_input.json +++ /dev/null @@ -1,142 +0,0 @@ -[ - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "anonymousId": "123456", - "email": "test@rudderstack.com", - "address": { - "city": "kolkata", - "country": "India", - "postalCode": 712136, - "state": "WB", - "street": "" - }, - "ip": "0.0.0.0", - "age": 26 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "type": "identify", - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "123456", - "userId": "123456", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "metadata": { - "jobId": 1 - }, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "email", - "groupValueTrait": "age" - } - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "test@rudderstack.com", - "anonymousId": "12345" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "request_ip": "1.1.1.1", - "type": "page", - "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T11:15:18.299Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "properties": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - }, - "integrations": { - "All": true - }, - "name": "ApplicationLoaded", - "sentAt": "2019-10-14T11:15:53.296Z" - }, - "metadata": { - "jobId": 2 - }, - "destination": { - "Config": { - "apiKey": "abcde" - } - } - } -] diff --git a/test/__tests__/data/am_router_output.json b/test/__tests__/data/am_router_output.json deleted file mode 100644 index bfccb478b3..0000000000 --- a/test/__tests__/data/am_router_output.json +++ /dev/null @@ -1,150 +0,0 @@ -[ - { - "batchedRequest": [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Chrome", - "os_version": "77.0.3865.90", - "device_model": "Mac", - "library": "rudderstack", - "platform": "Web", - "device_id": "123456", - "app_name": "RudderLabs JavaScript SDK", - "app_version": "1.0.0", - "language": "en-US", - "session_id": -1, - "insert_id": "84e26acc-56a5-4835-8233-591137fca468", - "city": "kolkata", - "country": "India", - "user_properties": { - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com", - "anonymousId": "123456", - "email": "test@rudderstack.com", - "postalCode": 712136, - "state": "WB", - "street": "", - "ip": "0.0.0.0", - "age": 26 - }, - "event_type": "$identify", - "time": 1571043797562, - "user_id": "123456", - "ip": "0.0.0.0" - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "123456" - } - ], - "metadata": [ - { - "jobId": 1 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "email", - "groupValueTrait": "age" - } - } - }, - { - "batchedRequest": [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Chrome", - "os_version": "77.0.3865.90", - "device_model": "Mac", - "library": "rudderstack", - "platform": "Web", - "device_id": "00000000000000000000000000", - "app_name": "RudderLabs JavaScript SDK", - "app_version": "1.0.0", - "language": "en-US", - "event_type": "Viewed ApplicationLoaded Page", - "event_properties": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com", - "name": "ApplicationLoaded" - }, - "session_id": -1, - "insert_id": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", - "ip": "1.1.1.1", - "user_properties": { - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com", - "email": "test@rudderstack.com", - "anonymousId": "12345" - }, - "user_id": "12345", - "time": 1571051718299 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "00000000000000000000000000" - } - ], - "metadata": [ - { - "jobId": 2 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "apiKey": "abcde" - } - } - } -] diff --git a/test/__tests__/data/braze_input.json b/test/__tests__/data/braze_input.json deleted file mode 100644 index 3fc1dbb905..0000000000 --- a/test/__tests__/data/braze_input.json +++ /dev/null @@ -1,2036 +0,0 @@ -[ - { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false, - "dataCenter": "us-01" - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "message": { - "anonymousId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.5" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.5" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "city": "Disney", - "country": "USA", - "email": "mickey@disney.com", - "firstname": "Mickey", - "closed_at": null, - "orderTotal": 0 - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" - }, - "integrations": { - "All": true - }, - "messageId": "2536eda4-d638-4c93-8014-8ffe3f083214", - "originalTimestamp": "2020-01-24T06:29:02.362Z", - "receivedAt": "2020-01-24T11:59:02.403+05:30", - "request_ip": "[::1]:53709", - "sentAt": "2020-01-24T06:29:02.363Z", - "timestamp": "2020-01-24T11:59:02.402+05:30", - "type": "identify", - "userId": "" - } - }, - { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false, - "dataCenter": "us-01" - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "message": { - "anonymousId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.5" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.5" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" - }, - "integrations": { - "All": true - }, - "messageId": "2536eda4-d638-4c93-8014-8ffe3f083214", - "originalTimestamp": "2020-01-24T06:29:02.362Z", - "receivedAt": "2020-01-24T11:59:02.403+05:30", - "request_ip": "[::1]:53709", - "sentAt": "2020-01-24T06:29:02.363Z", - "timestamp": "2020-01-24T11:59:02.402+05:30", - "type": "identify", - "userId": "mickeyMouse" - } - }, - { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "message": { - "anonymousId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.5" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.5" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" - }, - "event": "braze revenue test", - "integrations": { - "All": true - }, - "messageId": "a6a0ad5a-bd26-4f19-8f75-38484e580fc7", - "originalTimestamp": "2020-01-24T06:29:02.364Z", - "properties": { - "currency": "USD", - "revenue": 50 - }, - "receivedAt": "2020-01-24T11:59:02.403+05:30", - "request_ip": "[::1]:53710", - "sentAt": "2020-01-24T06:29:02.364Z", - "timestamp": "2020-01-24T11:59:02.403+05:30", - "type": "track", - "userId": "mickeyMouse" - } - }, - { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "message": { - "anonymousId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.5" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.5" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "email": "mickey@disney.com", - "closed_at": null - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" - }, - "event": "braze revenue test", - "integrations": { - "All": true - }, - "messageId": "a6a0ad5a-bd26-4f19-8f75-38484e580fc7", - "originalTimestamp": "2020-01-24T06:29:02.364Z", - "properties": { - "currency": "USD", - "revenue": 50 - }, - "receivedAt": "2020-01-24T11:59:02.403+05:30", - "request_ip": "[::1]:53710", - "sentAt": "2020-01-24T06:29:02.364Z", - "timestamp": "2020-01-24T11:59:02.403+05:30", - "type": "track", - "userId": "mickeyMouse" - } - }, - { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false, - "dataCenter": "eu-01" - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "message": { - "anonymousId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.5" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.5" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" - }, - "integrations": { - "All": true - }, - "messageId": "dd266c67-9199-4a52-ba32-f46ddde67312", - "originalTimestamp": "2020-01-24T06:29:02.358Z", - "properties": { - "path": "/tests/html/index2.html", - "referrer": "", - "search": "", - "title": "", - "url": "http://localhost/tests/html/index2.html" - }, - "receivedAt": "2020-01-24T11:59:02.403+05:30", - "request_ip": "[::1]:53708", - "sentAt": "2020-01-24T06:29:02.359Z", - "timestamp": "2020-01-24T11:59:02.402+05:30", - "type": "page", - "userId": "" - } - }, - { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false, - "dataCenter": "us-01" - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "message": { - "anonymousId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.5" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.5" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "city": "Disney", - "country": "USA", - "email": "mickey@disney.com", - "firstname": "Mickey" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" - }, - "integrations": { - "All": true - }, - "messageId": "2536eda4-d638-4c93-8014-8ffe3f083214", - "originalTimestamp": "2020-01-24T06:29:02.362Z", - "receivedAt": "2020-01-24T11:59:02.403+05:30", - "request_ip": "[::1]:53709", - "sentAt": "2020-01-24T06:29:02.363Z", - "timestamp": "2020-01-24T11:59:02.402+05:30", - "type": "identify", - "userId": "" - } - }, - { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false, - "enableNestedArrayOperations": false - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "message": { - "anonymousId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.5" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.5" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "city": "Disney", - "country": "USA", - "email": "mickey@disney.com", - "firstName": "Mickey", - "gender": "woman" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" - }, - "event": "braze revenue test", - "integrations": { - "All": true - }, - "messageId": "a6a0ad5a-bd26-4f19-8f75-38484e580fc7", - "originalTimestamp": "2020-01-24T06:29:02.364Z", - "properties": { - "currency": "USD", - "revenue": 50 - }, - "receivedAt": "2020-01-24T11:59:02.403+05:30", - "request_ip": "[::1]:53710", - "sentAt": "2020-01-24T06:29:02.364Z", - "timestamp": "2020-01-24T11:59:02.403+05:30", - "type": "track", - "userId": "" - } - }, - { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "message": { - "anonymousId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.5" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.5" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "city": "Disney", - "country": "USA", - "email": "mickey@disney.com", - "firstname": "Mickey" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" - }, - "event": "KM Order Completed", - "integrations": { - "All": true - }, - "messageId": "aa5f5e44-8756-40ad-ad1e-b0d3b9fa710a", - "originalTimestamp": "2020-01-24T06:29:02.367Z", - "properties": { - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f", - "coupon": "hasbros", - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "products": [ - { - "category": "Games", - "image_url": "https:///www.example.com/product/path.jpg", - "name": "Monopoly: 3rd Edition", - "price": 19, - "product_id": "507f1f77bcf86cd799439011", - "quantity": 1, - "sku": "45790-32", - "url": "https://www.example.com/product/path" - }, - { - "category": "Games", - "name": "Uno Card Game", - "price": 3, - "product_id": "505bd76785ebb509fc183733", - "quantity": 2, - "sku": "46493-32" - } - ], - "revenue": 25, - "shipping": 3, - "subtotal": 22.5, - "tax": 2, - "total": 27.5 - }, - "receivedAt": "2020-01-24T11:59:02.403+05:30", - "request_ip": "[::1]:53712", - "sentAt": "2020-01-24T06:29:02.368Z", - "timestamp": "2020-01-24T11:59:02.402+05:30", - "type": "track", - "userId": "" - } - }, - { - "message": { - "type": "track", - "event": "Order Completed", - "sentAt": "2020-09-14T12:09:37.491Z", - "userId": "Randomuser2222", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.3", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "file:///Users/manashi/Desktop/rudder-all-sdk-application-testing/Fullstory%20test%20By%20JS%20SDK/braze.html", - "path": "/Users/manashi/Desktop/rudder-all-sdk-application-testing/Fullstory%20test%20By%20JS%20SDK/braze.html", - "title": "Fullstory Test", - "search": "", - "referrer": "" - }, - "locale": "en-GB", - "screen": { - "density": 2 - }, - "traits": { - "email": "manashi@gmaiol.com" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.3" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36" - }, - "messageId": "24ecc509-ce3e-473c-8483-ba1ea2c195cb", - "properties": { - "products": [ - { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "key1": { - "key11": "value1", - "key22": "value2" - }, - "name": "Monopoly: 3rd Edition", - "price": 19, - "category": "Games", - "quantity": 1, - "image_url": "https:///www.example.com/product/path.jpg", - "currency78": "USD", - "product_id": "507f1f77bcf86cd799439011" - }, - { - "sku": "46493-32", - "name": "Uno Card Game", - "price23": 3, - "category": "Games", - "quantity": 2, - "currency78": "USD", - "product_id": "505bd76785ebb509fc183733" - } - ] - }, - "anonymousId": "c6ff1462-b692-43d6-8f6a-659efedc99ea", - "integrations": { - "All": true - }, - "originalTimestamp": "2020-09-14T12:09:37.491Z" - }, - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - } - }, - { - "message": { - "type": "group", - "event": "Order Completed", - "sentAt": "2020-09-14T12:09:37.491Z", - "userId": "Randomuser2222", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.3", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "file:///Users/manashi/Desktop/rudder-all-sdk-application-testing/Fullstory%20test%20By%20JS%20SDK/braze.html", - "path": "/Users/manashi/Desktop/rudder-all-sdk-application-testing/Fullstory%20test%20By%20JS%20SDK/braze.html", - "title": "Fullstory Test", - "search": "", - "referrer": "" - }, - "locale": "en-GB", - "screen": { - "density": 2 - }, - "traits": { - "email": "manashi@gmaiol.com" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.3" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36" - }, - "messageId": "24ecc509-ce3e-473c-8483-ba1ea2c195cb", - "traits": { - "groupId": "1234" - }, - "anonymousId": "c6ff1462-b692-43d6-8f6a-659efedc99ea", - "integrations": { - "All": true - }, - "originalTimestamp": "2020-09-14T12:09:37.491Z" - }, - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - } - }, - { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false, - "dataCenter": "us-01" - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "message": { - "anonymousId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "channel": "web", - "context": { - "mappedToDestination": true, - "externalId": [ - { - "identifierType": "external_id", - "id": "mickey@disney.com" - } - ], - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.5" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.5" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "home_city": "Disney", - "country": "USA", - "first_name": "Mickey" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" - }, - "integrations": { - "All": true - }, - "messageId": "2536eda4-d638-4c93-8014-8ffe3f083214", - "originalTimestamp": "2020-01-24T06:29:02.362Z", - "receivedAt": "2020-01-24T11:59:02.403+05:30", - "request_ip": "[::1]:53709", - "sentAt": "2020-01-24T06:29:02.363Z", - "timestamp": "2020-01-24T11:59:02.402+05:30", - "type": "identify", - "userId": "" - } - }, - { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "message": { - "anonymousId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.5" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.5" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "city": "Disney", - "country": "USA", - "email": "mickey@disney.com", - "firstname": "Mickey" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" - }, - "event": "Order Completed", - "integrations": { - "All": true - }, - "messageId": "aa5f5e44-8756-40ad-ad1e-b0d3b9fa710a", - "originalTimestamp": "2020-01-24T06:29:02.367Z", - "properties": { - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f", - "coupon": "hasbros", - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "products": [ - { - "category": "Games", - "image_url": "https:///www.example.com/product/path.jpg", - "name": "Monopoly: 3rd Edition", - "price": 0, - "product_id": "507f1f77bcf86cd799439011", - "quantity": 1, - "sku": "45790-32", - "url": "https://www.example.com/product/path" - }, - { - "category": "Games", - "name": "Uno Card Game", - "price": 0, - "product_id": "505bd76785ebb509fc183733", - "quantity": 2, - "sku": "46493-32" - } - ], - "revenue": 25, - "shipping": 3, - "subtotal": 22.5, - "tax": 2, - "total": 27.5 - }, - "receivedAt": "2020-01-24T11:59:02.403+05:30", - "request_ip": "[::1]:53712", - "sentAt": "2020-01-24T06:29:02.368Z", - "timestamp": "2020-01-24T11:59:02.402+05:30", - "type": "track", - "userId": "" - } - }, - { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "message": { - "anonymousId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.5" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.5" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "city": "Disney", - "country": "USA", - "email": "mickey@disney.com", - "firstname": "Mickey" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" - }, - "event": "Order Completed", - "integrations": { - "All": true - }, - "messageId": "aa5f5e44-8756-40ad-ad1e-b0d3b9fa710a", - "originalTimestamp": "2020-01-24T06:29:02.367Z", - "properties": { - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f", - "coupon": "hasbros", - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "products": [ - { - "category": "Games", - "image_url": "https:///www.example.com/product/path.jpg", - "name": "Monopoly: 3rd Edition", - "price": 0, - "product_id": "507f1f77bcf86cd799439011", - "quantity": 1, - "sku": "45790-32", - "url": "https://www.example.com/product/path" - }, - { - "category": "Games", - "name": "Uno Card Game", - "price": 10, - "product_id": "505bd76785ebb509fc183733", - "quantity": 2, - "sku": "46493-32" - } - ], - "revenue": 25, - "shipping": 3, - "subtotal": 22.5, - "tax": 2, - "total": 27.5 - }, - "receivedAt": "2020-01-24T11:59:02.403+05:30", - "request_ip": "[::1]:53712", - "sentAt": "2020-01-24T06:29:02.368Z", - "timestamp": "2020-01-24T11:59:02.402+05:30", - "type": "track", - "userId": "" - } - }, - { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false, - "enableNestedArrayOperations": true - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "message": { - "anonymousId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.5" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.5" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "cars2": { - "update": [ - { - "age": 30, - "id": 2, - "identifier": "id", - "name": "abcd" - }, - { - "age": 27, - "id": 1, - "identifier": "id", - "name": "abcd" - } - ] - }, - "city": "Disney", - "country": "USA", - "email": "mickey@disney.com", - "firstName": "Mickey", - "gender": "woman", - "pets": { - "add": [ - { - "age": 27, - "id": 1, - "name": "abc" - } - ], - "remove": [ - { - "id": 3, - "identifier": "id" - }, - { - "id": 4, - "identifier": "id" - } - ], - "update": [ - { - "age": 27, - "id": 2, - "identifier": "id", - "name": "abc" - } - ] - } - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" - }, - "event": "braze revenue test", - "integrations": { - "All": true - }, - "messageId": "89140820-c187-4e62-9599-3c633771ee58", - "originalTimestamp": "2023-03-14T02:06:26.501+05:30", - "properties": { - "currency": "USD", - "mergeObjectsUpdateOperation": false, - "revenue": 50 - }, - "receivedAt": "2023-03-14T02:06:22.433+05:30", - "request_ip": "[::1]", - "rudderId": "2686e376-7e08-42f7-8edc-ff67eb238a91", - "sentAt": "2023-03-14T02:06:26.501+05:30", - "timestamp": "2023-03-14T02:06:22.432+05:30", - "type": "track", - "userId": "finalUserTestCA" - } - }, - { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false, - "enableNestedArrayOperations": true - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "message": { - "anonymousId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.5" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.5" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "cars": { - "add": [ - { - "age": 27, - "id": 1, - "name": "abc" - } - ], - "update": [ - { - "age": 30, - "id": 2, - "identifier": "id", - "name": "abcd" - }, - { - "age": 27, - "id": 1, - "identifier": "id", - "name": "abcd" - } - ] - }, - "city": "Disney", - "country": "USA", - "email": "mickey@disney.com", - "firstName": "Mickey", - "gender": "woman", - "pets": [ - { - "breed": "beagle", - "id": 1, - "name": "Gus", - "type": "dog" - }, - { - "breed": "calico", - "id": 2, - "name": "Gerald", - "type": "cat" - } - ] - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" - }, - "event": "braze revenue test", - "integrations": { - "All": true - }, - "messageId": "d1e049af-913c-46ee-8f5c-5b26966e896f", - "originalTimestamp": "2023-03-14T02:13:10.758+05:30", - "properties": { - "currency": "USD", - "mergeObjectsUpdateOperation": false, - "revenue": 50 - }, - "receivedAt": "2023-03-14T02:13:10.519+05:30", - "request_ip": "[::1]", - "rudderId": "2686e376-7e08-42f7-8edc-ff67eb238a91", - "sentAt": "2023-03-14T02:13:10.758+05:30", - "timestamp": "2023-03-14T02:13:10.518+05:30", - "type": "track", - "userId": "finalUserTestCA" - } - }, - { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false, - "dataCenter": "us-01" - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "message": { - "channel": "web", - "context": { - "traits": { - "address": { - "city": "Mathura", - "country": "India" - }, - "email": "a@gmail.com", - "phone": "9988123321", - "firstName": "anuj", - "lastName": "kumar", - "gender": "male", - "birthday": "01/01/1971", - "avatar": "https://i.kym-cdn.com/entries/icons/mobile/000/034/772/anuj-1.jpg", - "bio": "Tech and tension go together", - "language": "en-IN", - "job": "Director", - "company": "Plinth India" - }, - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.5" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.5" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" - }, - "integrations": { - "All": true - }, - "request_ip": "[::1]:53709", - "type": "identify", - "userId": "ank101" - } - }, - { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false, - "dataCenter": "us-01" - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "message": { - "channel": "web", - "context": { - "traits": { - "address": { - "city": "Mathura", - "country": "India" - }, - "email": "a@gmail.com", - "phone": "9988123321", - "firstName": "anuj", - "lastName": "kumar", - "gender": null, - "birthday": "01/01/1971", - "avatar": "https://i.kym-cdn.com/entries/icons/mobile/000/034/772/anuj-1.jpg", - "bio": "Tech and tension go together", - "language": "en-IN", - "job": "Director", - "company": null - }, - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.5" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.5" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" - }, - "integrations": { - "All": true - }, - "request_ip": "[::1]:53709", - "type": "identify", - "userId": "ank101" - } - }, - { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false, - "dataCenter": "US-03" - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.5" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.5" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" - }, - "integrations": { - "All": true - }, - "request_ip": "[::1]:53709", - "type": "alias", - "previousId": "userId", - "userId": "userMergeTest2" - } - }, - { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false, - "dataCenter": "US-03" - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.5" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.5" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" - }, - "integrations": { - "All": true - }, - "request_ip": "[::1]:53709", - "type": "alias", - "userId": "userMergeTest2" - } - }, - { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false, - "dataCenter": "US-03" - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.5" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.5" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" - }, - "integrations": { - "All": true - }, - "request_ip": "[::1]:53709", - "type": "alias", - "previousId": "userMergeTest2" - } - }, - { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false, - "dataCenter": "us-01" - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "metadata": { - "sourceType": "metadata.sourceType", - "destinationType": "metadata.destinationType", - "k8_namespace": "metadata.namespace" - }, - "message": { - "channel": "web", - "context": { - "traits": { - "email": "A@HOTMAIL.COM", - "phone": "9988123321", - "firstName": "anil", - "lastName": "kumar", - "gender": null, - "birthday": "01/01/1971", - "avatar": "https://i.kym-cdn.com/entries/icons/mobile/000/034/772/anuj-1.jpg", - "bio": "Tech and tension go together", - "language": "en-IN", - "job": "Director", - "company": null - }, - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.5" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.5" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" - }, - "integrations": { - "All": true - }, - "request_ip": "[::1]:53709", - "type": "identify", - "userId": "ank101" - } - }, - { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false, - "dataCenter": "us-01" - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "metadata": { - "sourceType": "metadata.sourceType", - "destinationType": "metadata.destinationType", - "k8_namespace": "metadata.namespace" - }, - "message": { - "anonymousId": "e6ab2c5e-1cda-34a9-g962-r2f62df18abc", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.5" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.5" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "city": "Disney", - "country": "USA", - "email": "mickey@disney.com", - "firstname": "Mickey" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" - }, - "event": "Order Completed", - "integrations": { - "All": true - }, - "messageId": "aa5f5e44-8756-40ad-ad1e-b0d3b9fa710a", - "originalTimestamp": "2020-01-24T06:29:02.367Z", - "properties": { - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f", - "coupon": "hasbros", - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "products": [ - { - "category": "Games", - "image_url": "https:///www.example.com/product/path.jpg", - "name": "Monopoly: 3rd Edition", - "price": 0, - "product_id": "507f1f77bcf86cd799439011", - "quantity": 1, - "sku": "45790-32", - "url": "https://www.example.com/product/path" - } - ], - "revenue": 25, - "shipping": 3, - "subtotal": 22.5, - "tax": 2, - "total": 27.5 - }, - "receivedAt": "2020-01-24T11:59:02.403+05:30", - "request_ip": "[::1]:53712", - "sentAt": "2020-01-24T06:29:02.368Z", - "timestamp": "2020-01-24T11:59:02.402+05:30", - "type": "track", - "userId": "" - } - }, - { - "message": { - "type": "group", - "event": "Order Completed", - "sentAt": "2020-09-14T12:09:37.491Z", - "userId": "Randomuser2222", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.3", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "file:///Users/manashi/Desktop/rudder-all-sdk-application-testing/Fullstory%20test%20By%20JS%20SDK/braze.html", - "path": "/Users/manashi/Desktop/rudder-all-sdk-application-testing/Fullstory%20test%20By%20JS%20SDK/braze.html", - "title": "Fullstory Test", - "search": "", - "referrer": "" - }, - "locale": "en-GB", - "screen": { - "density": 2 - }, - "traits": { - "email": "manashi@gmaiol.com" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.3" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36" - }, - "messageId": "24ecc509-ce3e-473c-8483-ba1ea2c195cb", - "groupId": "1234", - "traits": { - "phone": "5055077683", - "subscriptionState": "subscribed" - }, - "anonymousId": "c6ff1462-b692-43d6-8f6a-659efedc99ea", - "integrations": { - "All": true - }, - "originalTimestamp": "2020-09-14T12:09:37.491Z" - }, - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false, - "enableSubscriptionGroupInGroupCall": true - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - } - }, - { - "message": { - "type": "group", - "event": "Order Completed", - "sentAt": "2020-09-14T12:09:37.491Z", - "userId": "Randomuser2222", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.3", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "file:///Users/manashi/Desktop/rudder-all-sdk-application-testing/Fullstory%20test%20By%20JS%20SDK/braze.html", - "path": "/Users/manashi/Desktop/rudder-all-sdk-application-testing/Fullstory%20test%20By%20JS%20SDK/braze.html", - "title": "Fullstory Test", - "search": "", - "referrer": "" - }, - "locale": "en-GB", - "screen": { - "density": 2 - }, - "traits": { - "email": "manashi@gmaiol.com" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.3" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36" - }, - "messageId": "24ecc509-ce3e-473c-8483-ba1ea2c195cb", - "groupId": "1234", - "traits": { - "email": "abc@test.com", - "subscriptionState": "unsubscribed" - }, - "anonymousId": "c6ff1462-b692-43d6-8f6a-659efedc99ea", - "integrations": { - "All": true - }, - "originalTimestamp": "2020-09-14T12:09:37.491Z" - }, - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false, - "enableSubscriptionGroupInGroupCall": true - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - } - }, - { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "metadata": { - "sourceType": "", - "destinationType": "", - "namespace": "" - }, - "message": { - "anonymousId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.5" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.5" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" - }, - "event": "braze revenue test", - "integrations": { - "All": true, - "braze": { - "appId": "123" - } - }, - "messageId": "a6a0ad5a-bd26-4f19-8f75-38484e580fc7", - "originalTimestamp": "2020-01-24T06:29:02.364Z", - "properties": { - "currency": "USD", - "revenue": 50 - }, - "receivedAt": "2020-01-24T11:59:02.403+05:30", - "request_ip": "[::1]:53710", - "sentAt": "2020-01-24T06:29:02.364Z", - "timestamp": "2020-01-24T11:59:02.403+05:30", - "type": "track", - "userId": "mickeyMouse" - } - }, - { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false, - "sendPurchaseEventWithExtraProperties": true - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "message": { - "anonymousId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.5" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.5" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "city": "Disney", - "country": "USA", - "email": "mickey@disney.com", - "firstname": "Mickey" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" - }, - "event": "Order Completed", - "integrations": { - "All": true - }, - "messageId": "aa5f5e44-8756-40ad-ad1e-b0d3b9fa710a", - "originalTimestamp": "2020-01-24T06:29:02.367Z", - "properties": { - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f", - "coupon": "hasbros", - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "products": [ - { - "category": "Games", - "image_url": "https:///www.example.com/product/path.jpg", - "name": "Monopoly: 3rd Edition", - "price": 0, - "product_id": "507f1f77bcf86cd799439023", - "quantity": 1, - "sku": "45790-32", - "url": "https://www.example.com/product/path" - }, - { - "category": "Games", - "name": "Uno Card Game", - "price": 0, - "product_id": "505bd76785ebb509fc183724", - "quantity": 2, - "sku": "46493-32" - } - ], - "revenue": 25, - "shipping": 3, - "subtotal": 22.5, - "tax": 2, - "total": 27.5 - }, - "receivedAt": "2020-01-24T11:59:02.403+05:30", - "request_ip": "[::1]:53712", - "sentAt": "2020-01-24T06:29:02.368Z", - "timestamp": "2020-01-24T11:59:02.402+05:30", - "type": "track", - "userId": "" - } - }, - { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false, - "dataCenter": "us-01" - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "message": { - "anonymousId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "channel": "web", - "context": { - "traits": { - "city": "Disney", - "country": "USA", - "email": 123, - "firstname": "Mickey", - "closed_at": null, - "orderTotal": 0 - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" - }, - "integrations": { - "All": true - }, - "messageId": "2536eda4-d638-4c93-8014-8ffe3f083214", - "originalTimestamp": "2020-01-24T06:29:02.362Z", - "receivedAt": "2020-01-24T11:59:02.403+05:30", - "request_ip": "[::1]:53709", - "sentAt": "2020-01-24T06:29:02.363Z", - "timestamp": "2020-01-24T11:59:02.402+05:30", - "type": "identify", - "userId": "" - } - }, - { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false, - "sendPurchaseEventWithExtraProperties": true - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "message": { - "anonymousId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "channel": "web", - "context": { - "traits": { - "city": "Disney", - "country": "USA", - "email": null, - "firstname": "Mickey" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" - }, - "event": "Order Completed", - "integrations": { - "All": true - }, - "messageId": "aa5f5e44-8756-40ad-ad1e-b0d3b9fa710a", - "originalTimestamp": "2020-01-24T06:29:02.367Z", - "properties": { - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f", - "coupon": "hasbros", - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "products": [ - { - "category": "Games", - "image_url": "https:///www.example.com/product/path.jpg", - "name": "Monopoly: 3rd Edition", - "price": 0, - "product_id": "507f1f77bcf86cd799439023", - "quantity": 1, - "sku": "45790-32", - "url": "https://www.example.com/product/path" - }, - { - "category": "Games", - "name": "Uno Card Game", - "price": 0, - "product_id": "505bd76785ebb509fc183724", - "quantity": 2, - "sku": "46493-32" - } - ], - "revenue": 25, - "shipping": 3, - "subtotal": 22.5, - "tax": 2, - "total": 27.5 - }, - "receivedAt": "2020-01-24T11:59:02.403+05:30", - "request_ip": "[::1]:53712", - "sentAt": "2020-01-24T06:29:02.368Z", - "timestamp": "2020-01-24T11:59:02.402+05:30", - "type": "track", - "userId": "" - } - } -] diff --git a/test/__tests__/data/braze_output.json b/test/__tests__/data/braze_output.json deleted file mode 100644 index 7e0715f057..0000000000 --- a/test/__tests__/data/braze_output.json +++ /dev/null @@ -1,1113 +0,0 @@ -[ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rest.iad-01.braze.com/users/track", - "headers": { - "Content-Type": "application/json", - "Accept": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "attributes": [ - { - "email": "mickey@disney.com", - "city": "Disney", - "country": "USA", - "firstname": "Mickey", - "closed_at": null, - "orderTotal": 0, - "_update_existing_only": false, - "user_alias": { - "alias_name": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "alias_label": "rudder_id" - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca" - }, - { - "message": "No attributes found to update the user profile" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rest.fra-01.braze.eu/users/track", - "headers": { - "Content-Type": "application/json", - "Accept": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "partner": "RudderStack", - "events": [ - { - "name": "braze revenue test", - "time": "2020-01-24T11:59:02.403+05:30", - "properties": { - "revenue": 50 - }, - "external_id": "mickeyMouse" - } - ] - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "mickeyMouse" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rest.fra-01.braze.eu/users/track", - "headers": { - "Content-Type": "application/json", - "Accept": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "attributes": [ - { - "email": "mickey@disney.com", - "closed_at": null, - "external_id": "mickeyMouse" - } - ], - "partner": "RudderStack", - "events": [ - { - "name": "braze revenue test", - "time": "2020-01-24T11:59:02.403+05:30", - "properties": { - "revenue": 50 - }, - "external_id": "mickeyMouse" - } - ] - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "mickeyMouse" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rest.fra-01.braze.eu/users/track", - "headers": { - "Content-Type": "application/json", - "Accept": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "events": [ - { - "name": "Page Viewed", - "time": "2020-01-24T11:59:02.402+05:30", - "properties": { - "path": "/tests/html/index2.html", - "referrer": "", - "search": "", - "title": "", - "url": "http://localhost/tests/html/index2.html" - }, - "_update_existing_only": false, - "user_alias": { - "alias_name": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "alias_label": "rudder_id" - } - } - ], - "partner": "RudderStack" - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rest.iad-01.braze.com/users/track", - "headers": { - "Content-Type": "application/json", - "Accept": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "attributes": [ - { - "city": "Disney", - "country": "USA", - "email": "mickey@disney.com", - "firstname": "Mickey", - "_update_existing_only": false, - "user_alias": { - "alias_name": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "alias_label": "rudder_id" - } - } - ] - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rest.fra-01.braze.eu/users/track", - "headers": { - "Content-Type": "application/json", - "Accept": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "attributes": [ - { - "city": "Disney", - "country": "USA", - "email": "mickey@disney.com", - "first_name": "Mickey", - "gender": "F", - "_update_existing_only": false, - "user_alias": { - "alias_name": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "alias_label": "rudder_id" - } - } - ], - "events": [ - { - "name": "braze revenue test", - "time": "2020-01-24T11:59:02.403+05:30", - "properties": { - "revenue": 50 - }, - "_update_existing_only": false, - "user_alias": { - "alias_name": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "alias_label": "rudder_id" - } - } - ], - "partner": "RudderStack" - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rest.fra-01.braze.eu/users/track", - "headers": { - "Content-Type": "application/json", - "Accept": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "attributes": [ - { - "city": "Disney", - "country": "USA", - "email": "mickey@disney.com", - "firstname": "Mickey", - "_update_existing_only": false, - "user_alias": { - "alias_name": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "alias_label": "rudder_id" - } - } - ], - "events": [ - { - "name": "KM Order Completed", - "time": "2020-01-24T11:59:02.402+05:30", - "properties": { - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f", - "coupon": "hasbros", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "products": [ - { - "category": "Games", - "image_url": "https:///www.example.com/product/path.jpg", - "name": "Monopoly: 3rd Edition", - "price": 19, - "product_id": "507f1f77bcf86cd799439011", - "quantity": 1, - "sku": "45790-32", - "url": "https://www.example.com/product/path" - }, - { - "category": "Games", - "name": "Uno Card Game", - "price": 3, - "product_id": "505bd76785ebb509fc183733", - "quantity": 2, - "sku": "46493-32" - } - ], - "revenue": 25, - "shipping": 3, - "subtotal": 22.5, - "tax": 2, - "total": 27.5 - }, - "_update_existing_only": false, - "user_alias": { - "alias_name": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "alias_label": "rudder_id" - } - } - ], - "partner": "RudderStack" - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca" - }, - { - "statusCode": 400, - "message": "Invalid Order Completed event: Message properties and product at index: 0 is missing currency" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rest.fra-01.braze.eu/users/track", - "headers": { - "Content-Type": "application/json", - "Accept": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "attributes": [ - { - "ab_rudder_group_1234": true, - "external_id": "Randomuser2222" - } - ], - "partner": "RudderStack" - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "Randomuser2222" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rest.iad-01.braze.com/users/track", - "headers": { - "Content-Type": "application/json", - "Accept": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "attributes": [ - { - "home_city": "Disney", - "country": "USA", - "external_id": "mickey@disney.com", - "first_name": "Mickey" - } - ] - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "mickey@disney.com" - }, - { - "body": { - "FORM": {}, - "JSON": { - "attributes": [ - { - "_update_existing_only": false, - "city": "Disney", - "country": "USA", - "email": "mickey@disney.com", - "firstname": "Mickey", - "user_alias": { - "alias_label": "rudder_id", - "alias_name": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca" - } - } - ], - "partner": "RudderStack", - "purchases": [ - { - "_update_existing_only": false, - "currency": "USD", - "price": 0, - "product_id": "507f1f77bcf86cd799439011", - "quantity": 1, - "time": "2020-01-24T11:59:02.402+05:30", - "user_alias": { - "alias_label": "rudder_id", - "alias_name": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca" - } - }, - { - "_update_existing_only": false, - "currency": "USD", - "price": 0, - "product_id": "505bd76785ebb509fc183733", - "quantity": 2, - "time": "2020-01-24T11:59:02.402+05:30", - "user_alias": { - "alias_label": "rudder_id", - "alias_name": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca" - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://rest.fra-01.braze.eu/users/track", - "files": {}, - "headers": { - "Accept": "application/json", - "Authorization": "Bearer dummyApiKey", - "Content-Type": "application/json" - }, - "method": "POST", - "params": {}, - "type": "REST", - "userId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "version": "1" - }, - { - "body": { - "FORM": {}, - "JSON": { - "attributes": [ - { - "_update_existing_only": false, - "city": "Disney", - "country": "USA", - "email": "mickey@disney.com", - "firstname": "Mickey", - "user_alias": { - "alias_label": "rudder_id", - "alias_name": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca" - } - } - ], - "partner": "RudderStack", - "purchases": [ - { - "_update_existing_only": false, - "currency": "USD", - "price": 0, - "product_id": "507f1f77bcf86cd799439011", - "quantity": 1, - "time": "2020-01-24T11:59:02.402+05:30", - "user_alias": { - "alias_label": "rudder_id", - "alias_name": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca" - } - }, - { - "_update_existing_only": false, - "currency": "USD", - "price": 10, - "product_id": "505bd76785ebb509fc183733", - "quantity": 2, - "time": "2020-01-24T11:59:02.402+05:30", - "user_alias": { - "alias_label": "rudder_id", - "alias_name": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca" - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://rest.fra-01.braze.eu/users/track", - "files": {}, - "headers": { - "Accept": "application/json", - "Authorization": "Bearer dummyApiKey", - "Content-Type": "application/json" - }, - "method": "POST", - "params": {}, - "type": "REST", - "userId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "version": "1" - }, - { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "name": "braze revenue test", - "time": "2023-03-14T02:06:22.432+05:30", - "properties": { - "revenue": 50, - "mergeObjectsUpdateOperation": false - }, - "external_id": "finalUserTestCA" - } - ], - "partner": "RudderStack", - "attributes": [ - { - "city": "Disney", - "pets": { - "$add": [ - { - "id": 1, - "age": 27, - "name": "abc" - } - ], - "$remove": [ - { - "$identifier_key": "id", - "$identifier_value": 3 - }, - { - "$identifier_key": "id", - "$identifier_value": 4 - } - ], - "$update": [ - { - "$new_object": { - "age": 27, - "name": "abc" - }, - "$identifier_key": "id", - "$identifier_value": 2 - } - ] - }, - "cars2": { - "$update": [ - { - "$new_object": { - "age": 30, - "name": "abcd" - }, - "$identifier_key": "id", - "$identifier_value": 2 - }, - { - "$new_object": { - "age": 27, - "name": "abcd" - }, - "$identifier_key": "id", - "$identifier_value": 1 - } - ] - }, - "email": "mickey@disney.com", - "gender": "F", - "country": "USA", - "first_name": "Mickey", - "external_id": "finalUserTestCA", - "_merge_objects": false - } - ] - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "finalUserTestCA", - "headers": { - "Accept": "application/json", - "Content-Type": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "version": "1", - "endpoint": "https://rest.fra-01.braze.eu/users/track" - }, - { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "name": "braze revenue test", - "time": "2023-03-14T02:13:10.518+05:30", - "properties": { - "revenue": 50, - "mergeObjectsUpdateOperation": false - }, - "external_id": "finalUserTestCA" - } - ], - "partner": "RudderStack", - "attributes": [ - { - "cars": { - "$add": [ - { - "id": 1, - "age": 27, - "name": "abc" - } - ], - "$update": [ - { - "$new_object": { - "age": 30, - "name": "abcd" - }, - "$identifier_key": "id", - "$identifier_value": 2 - }, - { - "$new_object": { - "age": 27, - "name": "abcd" - }, - "$identifier_key": "id", - "$identifier_value": 1 - } - ] - }, - "city": "Disney", - "pets": [ - { - "id": 1, - "name": "Gus", - "type": "dog", - "breed": "beagle" - }, - { - "id": 2, - "name": "Gerald", - "type": "cat", - "breed": "calico" - } - ], - "email": "mickey@disney.com", - "gender": "F", - "country": "USA", - "first_name": "Mickey", - "external_id": "finalUserTestCA", - "_merge_objects": false - } - ] - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "finalUserTestCA", - "headers": { - "Accept": "application/json", - "Content-Type": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "version": "1", - "endpoint": "https://rest.fra-01.braze.eu/users/track" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rest.iad-01.braze.com/users/track", - "headers": { - "Content-Type": "application/json", - "Accept": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "attributes": [ - { - "country": "India", - "dob": "01/01/1971", - "email": "a@gmail.com", - "first_name": "anuj", - "gender": "M", - "home_city": "Mathura", - "image_url": "https://i.kym-cdn.com/entries/icons/mobile/000/034/772/anuj-1.jpg", - "last_name": "kumar", - "phone": "9988123321", - "bio": "Tech and tension go together", - "language": "en-IN", - "job": "Director", - "company": "Plinth India", - "external_id": "ank101" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "ank101" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rest.iad-01.braze.com/users/track", - "headers": { - "Content-Type": "application/json", - "Accept": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "attributes": [ - { - "country": "India", - "dob": "01/01/1971", - "email": "a@gmail.com", - "first_name": "anuj", - "gender": null, - "home_city": "Mathura", - "image_url": "https://i.kym-cdn.com/entries/icons/mobile/000/034/772/anuj-1.jpg", - "last_name": "kumar", - "phone": "9988123321", - "bio": "Tech and tension go together", - "language": "en-IN", - "job": "Director", - "company": null, - "external_id": "ank101" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "ank101" - }, - { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "merge_updates": [ - { - "identifier_to_keep": { - "external_id": "userMergeTest2" - }, - "identifier_to_merge": { - "external_id": "userId" - } - } - ] - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "userMergeTest2", - "headers": { - "Accept": "application/json", - "Content-Type": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "version": "1", - "endpoint": "https://rest.iad-03.braze.com/users/merge" - }, - { - "statusCode": 400, - "message": "[BRAZE]: previousId is required for alias call" - }, - { - "statusCode": 400, - "message": "[BRAZE]: userId is required for alias call" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rest.iad-01.braze.com/users/track", - "headers": { - "Content-Type": "application/json", - "Accept": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "attributes": [ - { - "dob": "01/01/1971", - "email": "a@hotmail.com", - "first_name": "anil", - "gender": null, - "image_url": "https://i.kym-cdn.com/entries/icons/mobile/000/034/772/anuj-1.jpg", - "last_name": "kumar", - "phone": "9988123321", - "bio": "Tech and tension go together", - "language": "en-IN", - "job": "Director", - "company": null, - "external_id": "ank101" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "ank101" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rest.iad-01.braze.com/users/track", - "headers": { - "Content-Type": "application/json", - "Accept": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "attributes": [ - { - "email": "mickey@disney.com", - "city": "Disney", - "country": "USA", - "firstname": "Mickey", - "_update_existing_only": false, - "user_alias": { - "alias_name": "e6ab2c5e-1cda-34a9-g962-r2f62df18abc", - "alias_label": "rudder_id" - } - } - ], - "purchases": [ - { - "product_id": "507f1f77bcf86cd799439011", - "price": 0, - "currency": "USD", - "quantity": 1, - "time": "2020-01-24T11:59:02.402+05:30", - "_update_existing_only": false, - "user_alias": { - "alias_name": "e6ab2c5e-1cda-34a9-g962-r2f62df18abc", - "alias_label": "rudder_id" - } - } - ], - "partner": "RudderStack" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "e6ab2c5e-1cda-34a9-g962-r2f62df18abc" - }, - { - "body": { - "FORM": {}, - "JSON": { - "subscription_groups": [ - { - "external_id": ["Randomuser2222"], - "phones": ["5055077683"], - "subscription_group_id": "1234", - "subscription_state": "subscribed" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://rest.fra-01.braze.eu/v2/subscription/status/set", - "files": {}, - "headers": { - "Accept": "application/json", - "Authorization": "Bearer dummyApiKey", - "Content-Type": "application/json" - }, - "method": "POST", - "params": {}, - "type": "REST", - "version": "1" - }, - { - "body": { - "FORM": {}, - "JSON": { - "subscription_groups": [ - { - "external_id": ["Randomuser2222"], - "emails": ["abc@test.com"], - "subscription_group_id": "1234", - "subscription_state": "unsubscribed" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://rest.fra-01.braze.eu/v2/subscription/status/set", - "files": {}, - "headers": { - "Accept": "application/json", - "Authorization": "Bearer dummyApiKey", - "Content-Type": "application/json" - }, - "method": "POST", - "params": {}, - "type": "REST", - "version": "1" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rest.fra-01.braze.eu/users/track", - "headers": { - "Content-Type": "application/json", - "Accept": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "partner": "RudderStack", - "events": [ - { - "name": "braze revenue test", - "time": "2020-01-24T11:59:02.403+05:30", - "properties": { - "revenue": 50 - }, - "external_id": "mickeyMouse", - "app_id": "123" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "mickeyMouse" - }, - { - "body": { - "FORM": {}, - "JSON": { - "attributes": [ - { - "_update_existing_only": false, - "city": "Disney", - "country": "USA", - "email": "mickey@disney.com", - "firstname": "Mickey", - "user_alias": { - "alias_label": "rudder_id", - "alias_name": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca" - } - } - ], - "partner": "RudderStack", - "purchases": [ - { - "_update_existing_only": false, - "currency": "USD", - "price": 0, - "product_id": "507f1f77bcf86cd799439023", - "properties": { - "category": "Games", - "image_url": "https:///www.example.com/product/path.jpg", - "name": "Monopoly: 3rd Edition", - "url": "https://www.example.com/product/path" - }, - "quantity": 1, - "time": "2020-01-24T11:59:02.402+05:30", - "user_alias": { - "alias_label": "rudder_id", - "alias_name": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca" - } - }, - { - "_update_existing_only": false, - "currency": "USD", - "price": 0, - "product_id": "505bd76785ebb509fc183724", - "properties": { - "category": "Games", - "name": "Uno Card Game" - }, - "quantity": 2, - "time": "2020-01-24T11:59:02.402+05:30", - "user_alias": { - "alias_label": "rudder_id", - "alias_name": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca" - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://rest.fra-01.braze.eu/users/track", - "files": {}, - "headers": { - "Accept": "application/json", - "Authorization": "Bearer dummyApiKey", - "Content-Type": "application/json" - }, - "method": "POST", - "params": {}, - "type": "REST", - "userId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "version": "1" - }, - { - "statusCode": 400, - "message": "Invalid email, email must be a valid string" - }, - { - "body": { - "FORM": {}, - "JSON": { - "attributes": [ - { - "_update_existing_only": false, - "city": "Disney", - "country": "USA", - "email": null, - "firstname": "Mickey", - "user_alias": { - "alias_label": "rudder_id", - "alias_name": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca" - } - } - ], - "partner": "RudderStack", - "purchases": [ - { - "_update_existing_only": false, - "currency": "USD", - "price": 0, - "product_id": "507f1f77bcf86cd799439023", - "properties": { - "category": "Games", - "image_url": "https:///www.example.com/product/path.jpg", - "name": "Monopoly: 3rd Edition", - "url": "https://www.example.com/product/path" - }, - "quantity": 1, - "time": "2020-01-24T11:59:02.402+05:30", - "user_alias": { - "alias_label": "rudder_id", - "alias_name": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca" - } - }, - { - "_update_existing_only": false, - "currency": "USD", - "price": 0, - "product_id": "505bd76785ebb509fc183724", - "properties": { - "category": "Games", - "name": "Uno Card Game" - }, - "quantity": 2, - "time": "2020-01-24T11:59:02.402+05:30", - "user_alias": { - "alias_label": "rudder_id", - "alias_name": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca" - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://rest.fra-01.braze.eu/users/track", - "files": {}, - "headers": { - "Accept": "application/json", - "Authorization": "Bearer dummyApiKey", - "Content-Type": "application/json" - }, - "method": "POST", - "params": {}, - "type": "REST", - "userId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "version": "1" - } -] diff --git a/test/__tests__/data/braze_proxy_input.json b/test/__tests__/data/braze_proxy_input.json deleted file mode 100644 index a143ab42e8..0000000000 --- a/test/__tests__/data/braze_proxy_input.json +++ /dev/null @@ -1,219 +0,0 @@ -[ - { - "type": "REST", - "endpoint": "https://rest.iad-03.braze.com/users/identify/test1", - "method": "POST", - "userId": "gabi_userId_45", - "headers": { - "Accept": "application/json", - "Authorization": "Bearer api_key", - "Content-Type": "application/json" - }, - "body": { - "FORM": {}, - "JSON": { - "aliases_to_identify": [ - { - "external_id": "gabi_userId_45", - "user_alias": { - "alias_label": "rudder_id", - "alias_name": "gabi_anonId_45" - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "files": {}, - "params": { - "destination": "braze" - } - }, - { - "type": "REST", - "endpoint": "https://rest.iad-03.braze.com/users/identify/test2", - "method": "POST", - "userId": "gabi_userId_45", - "headers": { - "Accept": "application/json", - "Authorization": "Bearer api_key", - "Content-Type": "application/json" - }, - "body": { - "FORM": {}, - "JSON": { - "aliases_to_identify": [ - { - "external_id": "gabi_userId_45", - "user_alias": { - "alias_label": "rudder_id", - "alias_name": "gabi_anonId_45" - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "files": {}, - "params": { - "destination": "braze" - } - }, - { - "type": "REST", - "endpoint": "https://rest.iad-03.braze.com/users/identify/test3", - "method": "POST", - "userId": "gabi_userId_45", - "headers": { - "Accept": "application/json", - "Authorization": "Bearer api_key", - "Content-Type": "application/json" - }, - "body": { - "FORM": {}, - "JSON": { - "aliases_to_identify": [ - { - "external_id": "gabi_userId_45", - "user_alias": { - "alias_label": "rudder_id", - "alias_name": "gabi_anonId_45" - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "files": {}, - "params": { - "destination": "braze" - } - }, - { - "type": "REST", - "endpoint": "https://rest.iad-03.braze.com/users/identify/test4", - "method": "POST", - "userId": "gabi_userId_45", - "headers": { - "Accept": "application/json", - "Authorization": "Bearer api_key", - "Content-Type": "application/json" - }, - "body": { - "FORM": {}, - "JSON": { - "aliases_to_identify": [ - { - "external_id": "gabi_userId_45", - "user_alias": { - "alias_label": "rudder_id", - "alias_name": "gabi_anonId_45" - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "files": {}, - "params": { - "destination": "braze" - } - }, - { - "type": "REST", - "endpoint": "https://rest.iad-03.braze.com/users/identify/test5", - "method": "POST", - "userId": "gabi_userId_45", - "headers": { - "Accept": "application/json", - "Authorization": "Bearer api_key", - "Content-Type": "application/json" - }, - "body": { - "FORM": {}, - "JSON": { - "aliases_to_identify": [ - { - "external_id": "gabi_userId_45", - "user_alias": { - "alias_label": "rudder_id", - "alias_name": "gabi_anonId_45" - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "files": {}, - "params": { - "destination": "braze" - } - }, - { - "type": "REST", - "endpoint": "https://rest.iad-03.braze.com/users/identify/test6", - "method": "POST", - "userId": "gabi_userId_45", - "headers": { - "Accept": "application/json", - "Authorization": "Bearer api_key", - "Content-Type": "application/json" - }, - "body": { - "FORM": {}, - "JSON": { - "aliases_to_identify": [ - { - "external_id": "gabi_userId_45", - "user_alias": { - "alias_label": "rudder_id", - "alias_name": "gabi_anonId_45" - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "files": {}, - "params": { - "destination": "braze" - } - }, - { - "type": "REST", - "endpoint": "https://rest.iad-03.braze.com/users/identify/test7", - "method": "POST", - "userId": "gabi_userId_45", - "headers": { - "Accept": "application/json", - "Authorization": "Bearer api_key", - "Content-Type": "application/json" - }, - "body": { - "FORM": {}, - "JSON": { - "aliases_to_identify": [ - { - "external_id": "gabi_userId_45", - "user_alias": { - "alias_label": "rudder_id", - "alias_name": "gabi_anonId_45" - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "files": {}, - "params": { - "destination": "braze" - } - } -] \ No newline at end of file diff --git a/test/__tests__/data/braze_proxy_output.json b/test/__tests__/data/braze_proxy_output.json deleted file mode 100644 index cb367d451a..0000000000 --- a/test/__tests__/data/braze_proxy_output.json +++ /dev/null @@ -1,106 +0,0 @@ -[ - { - "output": { - "status": 201, - "message": "Request for braze Processed Successfully", - "destinationResponse": { - "response": { "aliases_processed": 1, "message": "success" }, - "status": 201 - } - } - }, - { - "output": { - "status": 201, - "message": "Request for braze Processed Successfully", - "destinationResponse": { - "response": { "message": "success", "errors": ["minor error message"] }, - "status": 201 - } - } - }, - { - "output": { - "status": 201, - "message": "Request failed for braze with status: 201", - "destinationResponse": { - "response": { - "message": "fatal error message", - "errors": ["minor error message"] - }, - "status": 201 - }, - "statTags": { - "destType": "BRAZE", - "errorCategory": "network", - "destinationId": "Non-determininable", - "workspaceId": "Non-determininable", - "errorType": "aborted", - "feature": "dataDelivery", - "implementation": "native", - "module": "destination" - } - } - }, - { - "output": { - "status": 201, - "message": "Request for braze Processed Successfully", - "destinationResponse": { "response": "", "status": 201 } - } - }, - { - "output": { - "status": 500, - "message": "Request failed for braze with status: 500", - "destinationResponse": { "response": "", "status": 500 }, - "statTags": { - "destType": "BRAZE", - "errorCategory": "network", - "destinationId": "Non-determininable", - "workspaceId": "Non-determininable", - "errorType": "retryable", - "feature": "dataDelivery", - "implementation": "native", - "module": "destination" - } - } - }, - { - "output": { - "status": 400, - "message": "Request failed for braze with status: 400", - "destinationResponse": { - "response": "[[ENOTFOUND] :: DNS lookup failed]", - "status": 400 - }, - "statTags": { - "destType": "BRAZE", - "errorCategory": "network", - "destinationId": "Non-determininable", - "workspaceId": "Non-determininable", - "errorType": "aborted", - "feature": "dataDelivery", - "implementation": "native", - "module": "destination" - } - } - }, - { - "output": { - "status": 500, - "message": "Request failed for braze with status: 500", - "destinationResponse": { "response": "", "status": 500 }, - "statTags": { - "destType": "BRAZE", - "errorCategory": "network", - "destinationId": "Non-determininable", - "workspaceId": "Non-determininable", - "errorType": "retryable", - "feature": "dataDelivery", - "implementation": "native", - "module": "destination" - } - } - } -] diff --git a/test/__tests__/data/braze_router.json b/test/__tests__/data/braze_router.json deleted file mode 100644 index 33c66bca6d..0000000000 --- a/test/__tests__/data/braze_router.json +++ /dev/null @@ -1,1034 +0,0 @@ -{ - "simpleRouterTestData": [ - { - "description": "simple router tests", - "input": [ - { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false, - "dataCenter": "eu-01" - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "metadata": { - "jobId": 1 - }, - "message": { - "anonymousId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.5" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.5" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" - }, - "integrations": { - "All": true - }, - "messageId": "dd266c67-9199-4a52-ba32-f46ddde67312", - "originalTimestamp": "2020-01-24T06:29:02.358Z", - "properties": { - "path": "/tests/html/index2.html", - "referrer": "", - "search": "", - "title": "", - "url": "http://localhost/tests/html/index2.html" - }, - "receivedAt": "2020-01-24T11:59:02.403+05:30", - "request_ip": "[::1]:53708", - "sentAt": "2020-01-24T06:29:02.359Z", - "timestamp": "2020-01-24T11:59:02.402+05:30", - "type": "page", - "userId": "" - } - }, - { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false, - "dataCenter": "us-01" - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "metadata": { - "jobId": 2 - }, - "message": { - "anonymousId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.5" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.5" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "city": "Disney", - "country": "USA", - "email": "mickey@disney.com", - "firstname": "Mickey" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" - }, - "integrations": { - "All": true - }, - "messageId": "2536eda4-d638-4c93-8014-8ffe3f083214", - "originalTimestamp": "2020-01-24T06:29:02.362Z", - "receivedAt": "2020-01-24T11:59:02.403+05:30", - "request_ip": "[::1]:53709", - "sentAt": "2020-01-24T06:29:02.363Z", - "timestamp": "2020-01-24T11:59:02.402+05:30", - "type": "identify", - "userId": "" - } - }, - { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false, - "dataCenter": "us-01", - "enableSubscriptionGroupInGroupCall": true - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "metadata": { - "jobId": 3 - }, - "message": { - "anonymousId": "56yrtsdfgbgxcb-22b4-401d-aae5-1b994be9a969", - "groupId": "c90f0fd2-2a02-4f2f-bf07-7e7d2c2ed2b1", - "traits": { - "phone": "5055077683", - "subscriptionState": "subscribed" - }, - "userId": "user123", - "type": "group" - } - }, - { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false, - "dataCenter": "us-01", - "enableSubscriptionGroupInGroupCall": true - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "metadata": { - "jobId": 4 - }, - "message": { - "anonymousId": "dfgdfgdfg-22b4-401d-aae5-1b994be9a969", - "groupId": "58d0a278-b55b-4f10-b7d2-98d1c5dd4c30", - "traits": { - "phone": "5055077683", - "subscriptionState": "subscribed" - }, - "userId": "user877", - "type": "group" - } - }, - { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false, - "dataCenter": "us-01", - "enableSubscriptionGroupInGroupCall": true - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "metadata": { - "jobId": 5 - }, - "message": { - "type": "alias", - "previousId": "adsfsaf", - "userId": "dsafsdf" - } - }, - { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false, - "dataCenter": "us-01", - "enableSubscriptionGroupInGroupCall": true - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "metadata": { - "jobId": 6 - }, - "message": { - "type": "alias", - "previousId": "adsfsaf2", - "userId": "dsafsdf2" - } - } - ], - "output": [ - { - "batchedRequest": [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rest.fra-01.braze.eu/users/track", - "headers": { - "Content-Type": "application/json", - "Accept": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "partner": "RudderStack", - "events": [ - { - "name": "Page Viewed", - "time": "2020-01-24T11:59:02.402+05:30", - "properties": { - "path": "/tests/html/index2.html", - "referrer": "", - "search": "", - "title": "", - "url": "http://localhost/tests/html/index2.html" - }, - "_update_existing_only": false, - "user_alias": { - "alias_name": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "alias_label": "rudder_id" - } - } - ], - "attributes": [ - { - "email": "mickey@disney.com", - "city": "Disney", - "country": "USA", - "firstname": "Mickey", - "_update_existing_only": false, - "user_alias": { - "alias_name": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "alias_label": "rudder_id" - } - } - ] - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rest.fra-01.braze.eu/v2/subscription/status/set", - "headers": { - "Content-Type": "application/json", - "Accept": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "subscription_groups": [ - { - "external_id": ["user123"], - "phones": ["5055077683"], - "subscription_group_id": "c90f0fd2-2a02-4f2f-bf07-7e7d2c2ed2b1", - "subscription_state": "subscribed" - }, - { - "external_id": ["user877"], - "phones": ["5055077683"], - "subscription_group_id": "58d0a278-b55b-4f10-b7d2-98d1c5dd4c30", - "subscription_state": "subscribed" - } - ] - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rest.fra-01.braze.eu/users/merge", - "headers": { - "Content-Type": "application/json", - "Accept": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "merge_updates": [ - { - "identifier_to_keep": { - "external_id": "dsafsdf" - }, - "identifier_to_merge": { - "external_id": "adsfsaf" - } - }, - { - "identifier_to_keep": { - "external_id": "dsafsdf2" - }, - "identifier_to_merge": { - "external_id": "adsfsaf2" - } - } - ] - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - } - ], - "metadata": [ - { - "jobId": 1 - }, - { - "jobId": 2 - }, - { - "jobId": 3 - }, - { - "jobId": 4 - }, - { - "jobId": 5 - }, - { - "jobId": 6 - } - ], - "batched": true, - "statusCode": 200, - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false, - "dataCenter": "eu-01" - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - } - } - ] - } - ], - "dedupEnabledRouterTestData": [ - { - "description": "dedup enabled router tests", - "input": [ - { - "destination": { - "ID": "2N9UakqKF0D35wfzSeofIxPdL8X", - "Name": "Braze-Test", - "Config": { - "appKey": "0e5440c3-226b-45d0-91b5-c64da56cde16", - "blacklistedEvents": [], - "dataCenter": "US-03", - "enableNestedArrayOperations": false, - "enableSubscriptionGroupInGroupCall": false, - "eventFilteringOption": "disable", - "oneTrustCookieCategories": [], - "restApiKey": "dummyApiKey", - "supportDedup": true, - "trackAnonymousUser": true, - "whitelistedEvents": [] - }, - "Enabled": true, - "WorkspaceID": "27O0bhB6p5ehfOWeeZlOSsSDTLg", - "Transformations": [], - "IsProcessorEnabled": true, - "RevisionID": "2N9Uaf2tWq2QRmatBWQm03Rz6qX" - }, - "metadata": { - "jobId": 1 - }, - "message": { - "type": "track", - "event": "Sign In Completed", - "sentAt": "2023-03-10T18:36:04.738Z", - "userId": "braze_test_user", - "channel": "web", - "context": { - "locale": "en-US", - "traits": { - "subscribe_once": true, - "pwa": true, - "email": "jackson24miranda@gmail.com", - "lastName": "Miranda", - "firstName": "Spencer", - "is_registered": true, - "last_identify": "GOOGLE_SIGN_IN", - "account_region": "ON", - "is_pickup_selected": "false", - "has_tradein_attempt": false, - "custom_obj_attr": { - "key1": "value1", - "key2": "value2", - "key4": "value4" - }, - "custom_arr": [1, 2, "str1"] - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "2.9.5" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36" - }, - "rudderId": "4118560d-e4fc-4fd1-a734-9c69eae2c047", - "messageId": "1a342814-a882-4b65-9cc9-347544997268", - "timestamp": "2023-03-10T18:36:05.028Z", - "properties": { - "cause": "/redirector", - "method": "GOOGLE", - "region": "ON", - "orderId": "6179367977099", - "order_id": "6179367977099", - "webhookurl": "https://my.test.com", - "countingMethod": "standard", - "is_first_time_signin": false - }, - "receivedAt": "2023-03-18T01:41:42.257+05:30", - "request_ip": "[::1]", - "anonymousId": "77e278c9-e984-4cdd-950c-cd0b61befd03", - "originalTimestamp": "2023-03-10T18:36:04.733Z" - } - }, - { - "destination": { - "ID": "2N9UakqKF0D35wfzSeofIxPdL8X", - "Name": "Braze-Test", - "Config": { - "appKey": "0e5440c3-226b-45d0-91b5-c64da56cde16", - "blacklistedEvents": [], - "dataCenter": "US-03", - "enableNestedArrayOperations": false, - "enableSubscriptionGroupInGroupCall": false, - "eventFilteringOption": "disable", - "oneTrustCookieCategories": [], - "restApiKey": "dummyApiKey", - "supportDedup": true, - "trackAnonymousUser": true, - "whitelistedEvents": [] - }, - "Enabled": true, - "WorkspaceID": "27O0bhB6p5ehfOWeeZlOSsSDTLg", - "Transformations": [], - "IsProcessorEnabled": true, - "RevisionID": "2N9Uaf2tWq2QRmatBWQm03Rz6qX" - }, - "metadata": { - "jobId": 2 - }, - "message": { - "type": "track", - "event": "Sign In Completed", - "sentAt": "2023-03-10T18:36:04.738Z", - "userId": "braze_test_user", - "channel": "web", - "context": { - "locale": "en-US", - "traits": { - "subscribe_once": true, - "pwa": true, - "email": "jackson24miranda@gmail.com", - "lastName": "Miranda 2", - "firstName": "Spencer", - "is_registered": true, - "last_identify": "GOOGLE_SIGN_IN", - "account_region": "ON", - "is_pickup_selected": "true", - "has_tradein_attempt": false, - "custom_obj_attr": { - "key1": "value1", - "key2": "value2", - "key4": "value4" - }, - "custom_arr": ["1", "2", "str1"] - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "2.9.5" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36" - }, - "rudderId": "4118560d-e4fc-4fd1-a734-9c69eae2c047", - "messageId": "1a342814-a882-4b65-9cc9-347544997268", - "timestamp": "2023-03-10T18:36:05.028Z", - "properties": { - "cause": "/redirector", - "method": "GOOGLE", - "region": "ON", - "orderId": "6179367977099", - "order_id": "6179367977099", - "webhookurl": "https://my.test.com", - "countingMethod": "standard", - "is_first_time_signin": false - }, - "receivedAt": "2023-03-18T01:41:42.257+05:30", - "request_ip": "[::1]", - "anonymousId": "77e278c9-e984-4cdd-950c-cd0b61befd03", - "originalTimestamp": "2023-03-10T18:36:04.733Z" - } - }, - { - "destination": { - "ID": "2N9UakqKF0D35wfzSeofIxPdL8X", - "Name": "Braze-Test", - "Config": { - "appKey": "0e5440c3-226b-45d0-91b5-c64da56cde16", - "blacklistedEvents": [], - "dataCenter": "US-03", - "enableNestedArrayOperations": false, - "enableSubscriptionGroupInGroupCall": false, - "eventFilteringOption": "disable", - "oneTrustCookieCategories": [], - "restApiKey": "dummyApiKey", - "supportDedup": true, - "trackAnonymousUser": true, - "whitelistedEvents": [] - }, - "Enabled": true, - "WorkspaceID": "27O0bhB6p5ehfOWeeZlOSsSDTLg", - "Transformations": [], - "IsProcessorEnabled": true, - "RevisionID": "2N9Uaf2tWq2QRmatBWQm03Rz6qX" - }, - "metadata": { - "jobId": 3 - }, - "message": { - "anonymousId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.5" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.5" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "city": "Disney", - "country": "USA", - "email": "mickey@disney.com", - "firstName": "Mickey" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" - }, - "integrations": { - "All": true - }, - "messageId": "2536eda4-d638-4c93-8014-8ffe3f083214", - "type": "identify", - "userId": "user@50" - } - }, - { - "destination": { - "ID": "2N9UakqKF0D35wfzSeofIxPdL8X", - "Name": "Braze-Test", - "Config": { - "appKey": "0e5440c3-226b-45d0-91b5-c64da56cde16", - "blacklistedEvents": [], - "dataCenter": "US-03", - "enableNestedArrayOperations": false, - "enableSubscriptionGroupInGroupCall": false, - "eventFilteringOption": "disable", - "oneTrustCookieCategories": [], - "restApiKey": "dummyApiKey", - "supportDedup": true, - "trackAnonymousUser": true, - "whitelistedEvents": [] - }, - "Enabled": true, - "WorkspaceID": "27O0bhB6p5ehfOWeeZlOSsSDTLg", - "Transformations": [], - "IsProcessorEnabled": true, - "RevisionID": "2N9Uaf2tWq2QRmatBWQm03Rz6qX" - }, - "metadata": { - "jobId": 4 - }, - "message": { - "anonymousId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.5" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.5" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "city": "Disney", - "country": "USA", - "email": "mickey@disney.com", - "firstName": "Mickey" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" - }, - "integrations": { - "All": true - }, - "messageId": "2536eda4-d638-4c93-8014-8ffe3f083214", - "type": "identify", - "userId": "user@50" - } - } - ], - "newTransformerOutput": [ - { - "batchedRequest": [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rest.iad-03.braze.com/users/track", - "headers": { - "Content-Type": "application/json", - "Accept": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "partner": "RudderStack", - "attributes": [ - { - "first_name": "Spencer", - "subscribe_once": true, - "pwa": true, - "external_id": "braze_test_user", - "custom_obj_attr": { - "key1": "value1", - "key2": "value2", - "key4": "value4" - } - }, - { - "last_name": "Miranda 2", - "is_pickup_selected": "true", - "external_id": "braze_test_user", - "custom_arr": ["1", "2", "str1"] - }, - { - "city": "Disney", - "country": "USA", - "email": "mickey@disney.com", - "external_id": "user@50", - "first_name": "Mickey" - } - ], - "events": [ - { - "name": "Sign In Completed", - "time": "2023-03-10T18:36:05.028Z", - "properties": { - "cause": "/redirector", - "method": "GOOGLE", - "region": "ON", - "orderId": "6179367977099", - "order_id": "6179367977099", - "webhookurl": "https://my.test.com", - "countingMethod": "standard", - "is_first_time_signin": false - }, - "external_id": "braze_test_user" - }, - { - "name": "Sign In Completed", - "time": "2023-03-10T18:36:05.028Z", - "properties": { - "cause": "/redirector", - "method": "GOOGLE", - "region": "ON", - "orderId": "6179367977099", - "order_id": "6179367977099", - "webhookurl": "https://my.test.com", - "countingMethod": "standard", - "is_first_time_signin": false - }, - "external_id": "braze_test_user" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ], - "metadata": [ - { - "jobId": 1 - }, - { - "jobId": 2 - }, - { - "jobId": 3 - } - ], - "batched": true, - "statusCode": 200, - "destination": { - "ID": "2N9UakqKF0D35wfzSeofIxPdL8X", - "Name": "Braze-Test", - "Config": { - "appKey": "0e5440c3-226b-45d0-91b5-c64da56cde16", - "blacklistedEvents": [], - "dataCenter": "US-03", - "enableNestedArrayOperations": false, - "enableSubscriptionGroupInGroupCall": false, - "eventFilteringOption": "disable", - "oneTrustCookieCategories": [], - "restApiKey": "dummyApiKey", - "supportDedup": true, - "trackAnonymousUser": true, - "whitelistedEvents": [] - }, - "Enabled": true, - "WorkspaceID": "27O0bhB6p5ehfOWeeZlOSsSDTLg", - "Transformations": [], - "IsProcessorEnabled": true, - "RevisionID": "2N9Uaf2tWq2QRmatBWQm03Rz6qX" - } - }, - { - "error": "[Braze Deduplication]: Duplicate user detected, the user is dropped", - "statTags": {}, - "statusCode": 298, - "batched": false, - "metadata": [ - { - "jobId": 4 - } - ], - "destination": { - "ID": "2N9UakqKF0D35wfzSeofIxPdL8X", - "Name": "Braze-Test", - "Config": { - "appKey": "0e5440c3-226b-45d0-91b5-c64da56cde16", - "blacklistedEvents": [], - "dataCenter": "US-03", - "enableNestedArrayOperations": false, - "enableSubscriptionGroupInGroupCall": false, - "eventFilteringOption": "disable", - "oneTrustCookieCategories": [], - "restApiKey": "dummyApiKey", - "supportDedup": true, - "trackAnonymousUser": true, - "whitelistedEvents": [] - }, - "Enabled": true, - "WorkspaceID": "27O0bhB6p5ehfOWeeZlOSsSDTLg", - "Transformations": [], - "IsProcessorEnabled": true, - "RevisionID": "2N9Uaf2tWq2QRmatBWQm03Rz6qX" - } - } - ], - "oldTransformerOutput": [ - { - "batchedRequest": [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rest.iad-03.braze.com/users/track", - "headers": { - "Content-Type": "application/json", - "Accept": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "partner": "RudderStack", - "attributes": [ - { - "first_name": "Spencer", - "subscribe_once": true, - "pwa": true, - "external_id": "braze_test_user", - "custom_obj_attr": { - "key1": "value1", - "key2": "value2", - "key4": "value4" - } - }, - { - "last_name": "Miranda 2", - "is_pickup_selected": "true", - "external_id": "braze_test_user", - "custom_arr": ["1", "2", "str1"] - }, - { - "city": "Disney", - "country": "USA", - "email": "mickey@disney.com", - "external_id": "user@50", - "first_name": "Mickey" - } - ], - "events": [ - { - "name": "Sign In Completed", - "time": "2023-03-10T18:36:05.028Z", - "properties": { - "cause": "/redirector", - "method": "GOOGLE", - "region": "ON", - "orderId": "6179367977099", - "order_id": "6179367977099", - "webhookurl": "https://my.test.com", - "countingMethod": "standard", - "is_first_time_signin": false - }, - "external_id": "braze_test_user" - }, - { - "name": "Sign In Completed", - "time": "2023-03-10T18:36:05.028Z", - "properties": { - "cause": "/redirector", - "method": "GOOGLE", - "region": "ON", - "orderId": "6179367977099", - "order_id": "6179367977099", - "webhookurl": "https://my.test.com", - "countingMethod": "standard", - "is_first_time_signin": false - }, - "external_id": "braze_test_user" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ], - "metadata": [ - { - "jobId": 1 - }, - { - "jobId": 2 - }, - { - "jobId": 3 - } - ], - "batched": true, - "statusCode": 200, - "destination": { - "ID": "2N9UakqKF0D35wfzSeofIxPdL8X", - "Name": "Braze-Test", - "Config": { - "appKey": "0e5440c3-226b-45d0-91b5-c64da56cde16", - "blacklistedEvents": [], - "dataCenter": "US-03", - "enableNestedArrayOperations": false, - "enableSubscriptionGroupInGroupCall": false, - "eventFilteringOption": "disable", - "oneTrustCookieCategories": [], - "restApiKey": "dummyApiKey", - "supportDedup": true, - "trackAnonymousUser": true, - "whitelistedEvents": [] - }, - "Enabled": true, - "WorkspaceID": "27O0bhB6p5ehfOWeeZlOSsSDTLg", - "Transformations": [], - "IsProcessorEnabled": true, - "RevisionID": "2N9Uaf2tWq2QRmatBWQm03Rz6qX" - } - }, - { - "error": "[Braze Deduplication]: Duplicate user detected, the user is dropped", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation" - }, - "statusCode": 400, - "batched": false, - "metadata": [ - { - "jobId": 4 - } - ], - "destination": { - "ID": "2N9UakqKF0D35wfzSeofIxPdL8X", - "Name": "Braze-Test", - "Config": { - "appKey": "0e5440c3-226b-45d0-91b5-c64da56cde16", - "blacklistedEvents": [], - "dataCenter": "US-03", - "enableNestedArrayOperations": false, - "enableSubscriptionGroupInGroupCall": false, - "eventFilteringOption": "disable", - "oneTrustCookieCategories": [], - "restApiKey": "dummyApiKey", - "supportDedup": true, - "trackAnonymousUser": true, - "whitelistedEvents": [] - }, - "Enabled": true, - "WorkspaceID": "27O0bhB6p5ehfOWeeZlOSsSDTLg", - "Transformations": [], - "IsProcessorEnabled": true, - "RevisionID": "2N9Uaf2tWq2QRmatBWQm03Rz6qX" - } - } - ] - } - ] -} diff --git a/test/__tests__/data/clevertap_input.json b/test/__tests__/data/clevertap_input.json deleted file mode 100644 index e0bb1241e2..0000000000 --- a/test/__tests__/data/clevertap_input.json +++ /dev/null @@ -1,1084 +0,0 @@ -[ - { - "destination": { - "Config": { - "passcode": "sample_passcode", - "accountId": "476550467", - "trackAnonymous": true, - "enableObjectIdMapping": false - } - }, - "message": { - "channel": "web", - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "anon_id", - "type": "identify", - "traits": { - "anonymousId": "anon_id", - "email": "jamesDoe@gmail.com", - "name": "James Doe", - "phone": "92374162212", - "gender": "M", - "employed": true, - "birthday": "1614775793", - "education": "Science", - "graduate": true, - "married": true, - "customerType": "Prime", - "msg_push": true, - "msgSms": true, - "msgemail": true, - "msgwhatsapp": false, - "custom_tags": ["Test_User", "Interested_User", "DIY_Hobby"], - "custom_mappings": { - "Office": "Trastkiv", - "Country": "Russia" - }, - "address": { - "city": "kolkata", - "country": "India", - "postalCode": 789223, - "state": "WB", - "street": "" - } - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "passcode": "sample_passcode", - "accountId": "476550467", - "trackAnonymous": true, - "enableObjectIdMapping": false - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "anon_id", - "type": "identify", - "traits": { - "anonymousId": "anon_id", - "email": "jamesDoe@gmail.com", - "name": "James Doe", - "phone": "92374162212", - "gender": "M", - "employed": true, - "birthday": "1614775793", - "education": "Science", - "graduate": true, - "married": true, - "customerType": "Prime", - "msg_push": true, - "msgSms": true, - "msgemail": true, - "msgwhatsapp": false, - "custom_tags": ["Test_User", "Interested_User", "DIY_Hobby"], - "custom_mappings": { - "Office": "Trastkiv", - "Country": "Russia" - }, - "address": { - "city": "kolkata", - "country": "India", - "postalCode": 789223, - "state": "WB", - "street": "" - } - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "passcode": "sample_passcode", - "accountId": "476550467", - "trackAnonymous": true, - "enableObjectIdMapping": false - } - }, - "message": { - "type": "page", - "anonymousId": "anon-id-new", - "name": "Rudder", - "properties": { - "title": "Home", - "path": "/" - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - }, - { - "destination": { - "Config": { - "passcode": "sample_passcode", - "accountId": "476550467", - "trackAnonymous": true, - "enableObjectIdMapping": false - } - }, - "message": { - "type": "screen", - "userId": "identified_user_id", - "name": "Rudder-Screen", - "properties": { - "prop1": "5" - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - }, - { - "destination": { - "Config": { - "passcode": "sample_passcode", - "accountId": "476550467", - "trackAnonymous": true, - "enableObjectIdMapping": false - } - }, - "message": { - "type": "track", - "userId": "user123", - "event": "Product Purchased", - "properties": { - "name": "Rubik's Cube", - "revenue": 4.99 - }, - "context": { - "ip": "14.5.67.21" - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - }, - { - "destination": { - "Config": { - "passcode": "sample_passcode", - "accountId": "476550467", - "trackAnonymous": true, - "enableObjectIdMapping": false - } - }, - "message": { - "userId": "user1234", - "event": "FailTest", - "properties": { - "name": "Random", - "revenue": 4.99 - }, - "context": { - "ip": "14.5.67.21" - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - }, - { - "destination": { - "Config": { - "passcode": "sample_passcode", - "accountId": "476550467", - "trackAnonymous": true, - "enableObjectIdMapping": false - } - }, - "message": { - "type": "Rndm", - "userId": "user1234", - "event": "FailTest", - "properties": { - "name": "Random2", - "revenue": 4.99 - }, - "context": { - "ip": "14.5.67.21" - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - }, - { - "destination": { - "Config": { - "passcode": "sample_passcode", - "accountId": "476550467", - "trackAnonymous": true, - "enableObjectIdMapping": false - } - }, - "message": { - "type": "track", - "event": "Order Completed", - "sentAt": "2021-03-10T11:59:57.815Z", - "userId": "riverjohn", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.13", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:5500/test.html", - "path": "/test.html", - "title": "sample source", - "search": "", - "referrer": "http://127.0.0.1:5500/", - "referring_domain": "127.0.0.1:5500" - }, - "locale": "en-US", - "screen": { - "density": 2 - }, - "traits": { - "email": "riverjohn@gmail.com", - "phone": "+12345678900", - "avatar": "https://homepages.cae.wisc.edu/~ece533/images/airplane.png", - "testIng": true, - "lastName": "John", - "firstname": "River" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.13" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:86.0) Gecko/20100101 Firefox/86.0" - }, - "rudderId": "fd5d3d37-3ce6-471d-b416-2f351212a44f", - "messageId": "8ff6fd1b-b381-43fc-883c-92bf8eb0e725", - "properties": { - "tax": 1, - "total": 20, - "coupon": "ImagePro", - "revenue": 15, - "currency": "USD", - "discount": 1.5, - "order_id": "1234", - "ts": "2021-03-10T11:59:22.080Z", - "products": [ - { - "sku": "G-32", - "url": "https://www.website.com/product/path", - "name": "Monopoly", - "price": 14, - "category": "Games", - "quantity": 1, - "image_url": "https://www.website.com/product/path.jpg", - "product_id": "123" - }, - { - "sku": "F-32", - "name": "UNO", - "price": 3.45, - "category": "Games", - "quantity": 2, - "product_id": "345" - } - ], - "shipping": 22, - "affiliation": "Apple Store", - "checkout_id": "12345" - }, - "anonymousId": "b2e06708-dd2a-4aee-bb32-41855d2fbdab", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-03-10T11:59:22.080Z" - } - }, - { - "destination": { - "Config": { - "passcode": "sample_passcode", - "accountId": "476550467", - "trackAnonymous": false, - "enableObjectIdMapping": false - } - }, - "message": { - "type": "track", - "anonymousId": "random_anon_id", - "event": "FailTest_with_anon", - "properties": { - "name": "Random2", - "revenue": 4.99 - }, - "context": { - "ip": "14.5.67.21" - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - }, - { - "destination": { - "Config": { - "passcode": "sample_passcode", - "accountId": "476550467", - "trackAnonymous": true, - "enableObjectIdMapping": false - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "anon_id", - "type": "identify", - "traits": { - "anonymousId": "anon_id", - "email": "jamesDoe@gmail.com", - "name": "James Doe", - "phone": "92374162212", - "gender": "female", - "employed": true, - "birthday": "1614775793", - "education": "Science", - "graduate": true, - "married": true, - "customerType": "Prime", - "msg_push": true, - "msgSms": true, - "msgemail": true, - "msgwhatsapp": false, - "custom_tags": ["Test_User", "Interested_User", "DIY_Hobby"], - "custom_mappings": { - "Office": "Trastkiv", - "Country": "Russia" - }, - "address": { - "city": "kolkata", - "country": "India", - "postalCode": 789223, - "state": "WB", - "street": "" - } - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "passcode": "sample_passcode", - "accountId": "476550467", - "trackAnonymous": true, - "enableObjectIdMapping": false - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "anon_id", - "type": "identify", - "traits": { - "anonymousId": "anon_id", - "email": "jamesDoe@gmail.com", - "name": "James Doe", - "phone": "92374162212", - "gender": "other", - "employed": true, - "birthday": "1614775793", - "education": "Science", - "graduate": true, - "married": true, - "customerType": "Prime", - "msg_push": true, - "msgSms": true, - "msgemail": true, - "msgwhatsapp": false, - "custom_tags": ["Test_User", "Interested_User", "DIY_Hobby"], - "custom_mappings": { - "Office": "Trastkiv", - "Country": "Russia" - }, - "address": { - "city": "kolkata", - "country": "India", - "postalCode": 789223, - "state": "WB", - "street": "" - } - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "passcode": "sample_passcode", - "accountId": "476550467", - "trackAnonymous": true, - "enableObjectIdMapping": true - } - }, - "message": { - "type": "identify", - "event": "identify", - "sentAt": "2021-05-24T08:53:38.762Z", - "userId": "useran4", - "channel": "mobile", - "context": { - "os": { - "name": "Android", - "version": "10" - }, - "app": { - "name": "myfirstapp", - "build": "1", - "version": "1.0", - "namespace": "com.example.myfirstapp" - }, - "device": { - "id": "f54bb572361c4fd1", - "name": "whyred", - "type": "Android", - "model": "Redmi Note 5 Pro", - "manufacturer": "Xiaomi", - "token": "frfsgvrwe:APfdsafsgdfsgghfgfgjkhfsfgdhjhbvcvnetry767456fxsasdf" - }, - "locale": "en-IN", - "screen": { - "width": 1080, - "height": 2118, - "density": 420 - }, - "traits": { - "id": "useran4", - "email": "tony4an@testmail.com", - "phone": "4444457700", - "userId": "useran4", - "lastname": "Stark", - "firstname": "Tony4AN", - "anonymousId": "f54bb572361c4fd1" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.12" - }, - "network": { - "wifi": true, - "carrier": "airtel", - "cellular": true, - "bluetooth": false - }, - "timezone": "Asia/Kolkata", - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 10; Redmi Note 5 Pro Build/QQ3A.200805.001)" - }, - "rudderId": "d8dd4917-bdb2-4c17-8f62-24c79d87a937", - "messageId": "1621846417928-7fbb739f-5f96-48ca-9ebb-5bfc4076a687", - "anonymousId": "f54bb572361c4fd1", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-05-24T08:53:37.929Z" - } - }, - { - "destination": { - "Config": { - "passcode": "sample_passcode", - "accountId": "476550467", - "trackAnonymous": true, - "enableObjectIdMapping": true - } - }, - "message": { - "type": "identify", - "event": "identify", - "sentAt": "2021-04-21T12:05:42.383Z", - "userId": "ankur4", - "channel": "mobile", - "context": { - "os": { - "name": "iOS", - "version": "13.0" - }, - "app": { - "name": "Rudder-CleverTap_Example", - "build": "1.0", - "version": "1.0", - "namespace": "org.cocoapods.demo.Rudder-CleverTap-Example" - }, - "device": { - "id": "cd3a4439-7df0-4475-acb9-6659c7c4dfe3", - "name": "iPhone 11 Pro Max", - "type": "iOS", - "model": "iPhone", - "manufacturer": "Apple", - "token": "frfsgvrwe:APfdsafsgdfsgghfgfgjkhfsfgdhjhbvcvnetry767456fxsasdf" - }, - "locale": "en-US", - "screen": { - "width": 896, - "height": 414, - "density": 3 - }, - "traits": { - "name": "Ankur4 Mittal", - "email": "ankur4gmail", - "phone": "8260294239", - "userId": "ankur4" - }, - "library": { - "name": "rudder-ios-library", - "version": "1.0.11" - }, - "network": { - "wifi": true, - "carrier": "unavailable", - "cellular": false, - "bluetooth": false - }, - "timezone": "Asia/Kolkata", - "userAgent": "unknown" - }, - "rudderId": "f5bb9c22-4987-4ef2-9b58-52788035ffb7", - "messageId": "1619006730-60fa60c0-3c77-4de7-95d4-e7dc58214947", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-04-21T12:05:30.330Z" - } - }, - { - "destination": { - "Config": { - "passcode": "sample_passcode", - "accountId": "476550467", - "trackAnonymous": true, - "enableObjectIdMapping": true - } - }, - "message": { - "event": "Random", - "properties": { - "country_region": "India", - "test": "abc" - }, - "receivedAt": "2021-08-20T12:49:07.691Z", - "rudderId": "138c4214-b537-4f77-9dea-9abde70b5147", - "type": "track", - "anonymousId": "cd3a4439-7df0-4475-acb9-6659c7c4dfe3" - } - }, - { - "destination": { - "Config": { - "passcode": "sample_passcode", - "accountId": "476550467", - "trackAnonymous": true, - "enableObjectIdMapping": true - } - }, - "message": { - "event": "Random 2", - "properties": { - "country_region": "India", - "test": "abc" - }, - "receivedAt": "2021-08-20T12:49:07.691Z", - "rudderId": "138c4214-b537-4f77-9dea-9abde70b5147", - "type": "track", - "userId": "ankur4" - } - }, - { - "destination": { - "Config": { - "passcode": "sample_passcode", - "accountId": "476550467", - "trackAnonymous": true, - "enableObjectIdMapping": false - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "anon_id", - "type": "identify", - "traits": { - "anonymousId": "anon_id", - "email": "jamesDoe@gmail.com", - "name": "James Doe", - "phone": "92374162212", - "gender": "M", - "employed": true, - "birthday": "1614775793", - "education": "Science", - "graduate": true, - "married": true, - "customerType": "Prime", - "ts": "2021-03-10T11:59:22.080Z", - "msg_push": true, - "msgSms": true, - "msgemail": true, - "msgwhatsapp": false, - "custom_tags": ["Test_User", "Interested_User", "DIY_Hobby"], - "custom_mappings": { - "Office": "Trastkiv", - "Country": "Russia" - }, - "address": { - "city": "kolkata", - "country": "India", - "postalCode": 789223, - "state": "WB", - "street": "" - } - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "passcode": "sample_passcode", - "accountId": "476550467", - "trackAnonymous": true, - "enableObjectIdMapping": true - } - }, - "message": { - "type": "identify", - "event": "identify", - "sentAt": "2021-05-24T08:53:38.762Z", - "userId": "useran4", - "channel": "mobile", - "context": { - "os": { - "name": "watchos" - }, - "app": { - "name": "myfirstapp", - "build": "1", - "version": "1.0", - "namespace": "com.example.myfirstapp" - }, - "device": { - "id": "cd3a4439-7df0-4475-acb9-6659c7c4dfe3", - "type": "watchos", - "manufacturer": "Apple", - "token": "frfsgvrwe:APfdsafsgdfsgghfgfgjkhfsfgdhjhbvcvnetry767456fxsasdf" - }, - "locale": "en-IN", - "screen": { - "width": 1080, - "height": 2118, - "density": 420 - }, - "traits": { - "id": "useran4", - "email": "tony4an@testmail.com", - "phone": "4444457700", - "userId": "useran4", - "lastname": "Stark", - "firstname": "Tony4AN", - "anonymousId": "f54bb572361c4fd1" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.12" - }, - "network": { - "wifi": true, - "carrier": "airtel", - "cellular": true, - "bluetooth": false - }, - "timezone": "Asia/Kolkata", - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 10; Redmi Note 5 Pro Build/QQ3A.200805.001)" - }, - "rudderId": "d8dd4917-bdb2-4c17-8f62-24c79d87a937", - "messageId": "1621846417928-7fbb739f-5f96-48ca-9ebb-5bfc4076a687", - "anonymousId": "f54bb572361c4fd1", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-05-24T08:53:37.929Z" - } - }, - { - "destination": { - "Config": { - "passcode": "sample_passcode", - "accountId": "476550467", - "trackAnonymous": true, - "enableObjectIdMapping": true - } - }, - "message": { - "type": "alias", - "userId": "newaddedid001", - "context": { - "traits": { - "ts": 1468308340 - } - }, - "rudderId": "a8556b1b-9d11-478d-9242-be124d1f0c93", - "messageId": "46c1a69c-cc24-4a49-8079-3fcbabf15eb8", - "previousId": "1122121" - } - }, - { - "destination": { - "Config": { - "passcode": "sample_passcode", - "accountId": "476550467", - "trackAnonymous": true, - "enableObjectIdMapping": false - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "anon_id", - "type": "identify", - "traits": { - "anonymousId": "anon_id", - "email": "johnDoe@gmail.com", - "first_name": "John", - "last_name": "Doe", - "phone": "92374162212", - "gender": "M", - "employed": true, - "birthday": "1614775793", - "education": "Science", - "graduate": true, - "married": true, - "customerType": "Prime", - "msg_push": true, - "msgSms": true, - "msgemail": true, - "msgwhatsapp": false, - "custom_tags": ["Test_User", "Interested_User", "DIY_Hobby"], - "custom_mappings": { - "Office": "Trastkiv", - "Country": "Russia" - }, - "address": { - "city": "kolkata", - "country": "India", - "postalCode": 789223, - "state": "WB", - "street": "" - }, - "overrideFields": { - "first_name": "John", - "last_name": "Doe" - } - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "passcode": "sample_passcode", - "accountId": "476550467", - "trackAnonymous": true, - "enableObjectIdMapping": false - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "overrideFields": { - "first_name": "John", - "last_name": "Doe" - } - } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "anon_id", - "type": "identify", - "traits": { - "anonymousId": "anon_id", - "email": "johnDoe@gmail.com", - "first_name": "John", - "last_name": "Doe", - "phone": "92374162212", - "gender": "M", - "employed": true, - "birthday": "1614775793", - "education": "Science", - "graduate": true, - "married": true, - "customerType": "Prime", - "msg_push": true, - "msgSms": true, - "msgemail": true, - "msgwhatsapp": false, - "custom_tags": ["Test_User", "Interested_User", "DIY_Hobby"], - "custom_mappings": { - "Office": "Trastkiv", - "Country": "Russia" - }, - "address": { - "city": "kolkata", - "country": "India", - "postalCode": 789223, - "state": "WB", - "street": "" - } - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "passcode": "sample_passcode", - "accountId": "476550467", - "trackAnonymous": true, - "enableObjectIdMapping": false - } - }, - "message": { - "type": "track", - "event": "Order Completed", - "sentAt": "2021-03-10T11:59:57.815Z", - "userId": "riverjohn", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.13", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:5500/test.html", - "path": "/test.html", - "title": "sample source", - "search": "", - "referrer": "http://127.0.0.1:5500/", - "referring_domain": "127.0.0.1:5500" - }, - "locale": "en-US", - "screen": { - "density": 2 - }, - "traits": { - "email": "riverjohn@gmail.com", - "phone": "+12345678900", - "avatar": "https://homepages.cae.wisc.edu/~ece533/images/airplane.png", - "testIng": true, - "lastName": "John", - "firstname": "River" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.13" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:86.0) Gecko/20100101 Firefox/86.0" - }, - "rudderId": "fd5d3d37-3ce6-471d-b416-2f351212a44f", - "messageId": "8ff6fd1b-b381-43fc-883c-92bf8eb0e725", - "properties": { - "tax": 1, - "total": 20, - "coupon": "ImagePro", - "revenue": 15, - "currency": "USD", - "discount": 1.5, - "order_id": "1234", - "ts": "2021-03-10T11:59:22.080Z", - "products": { - "sku": "G-32", - "url": "https://www.website.com/product/path", - "name": "Monopoly", - "price": 14, - "category": "Games", - "quantity": 1, - "image_url": "https://www.website.com/product/path.jpg", - "product_id": "123" - }, - "shipping": 22, - "affiliation": "Apple Store", - "checkout_id": "12345" - }, - "anonymousId": "b2e06708-dd2a-4aee-bb32-41855d2fbdab", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-03-10T11:59:22.080Z" - } - }, - { - "destination": { - "Config": { - "passcode": "sample_passcode", - "accountId": "476550467", - "trackAnonymous": true, - "enableObjectIdMapping": true - } - }, - "message": { - "event": "Random", - "properties": { - "country_region": "India", - "test": "abc" - }, - "receivedAt": "2021-08-20T12:49:07.691Z", - "rudderId": "138c4214-b537-4f77-9dea-9abde70b5147", - "type": "track" - } - } -] diff --git a/test/__tests__/data/clevertap_output.json b/test/__tests__/data/clevertap_output.json deleted file mode 100644 index 947cc2da21..0000000000 --- a/test/__tests__/data/clevertap_output.json +++ /dev/null @@ -1,739 +0,0 @@ -[ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.clevertap.com/1/upload", - "headers": { - "X-CleverTap-Account-Id": "476550467", - "X-CleverTap-Passcode": "sample_passcode", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "d": [ - { - "type": "profile", - "profileData": { - "Email": "jamesDoe@gmail.com", - "Name": "James Doe", - "Phone": "92374162212", - "Gender": "M", - "Employed": true, - "DOB": "1614775793", - "Education": "Science", - "Married": true, - "Customer Type": "Prime", - "graduate": true, - "msg_push": true, - "msgSms": true, - "msgemail": true, - "msgwhatsapp": false, - "custom_tags": "[\"Test_User\",\"Interested_User\",\"DIY_Hobby\"]", - "custom_mappings": "{\"Office\":\"Trastkiv\",\"Country\":\"Russia\"}", - "address": "{\"city\":\"kolkata\",\"country\":\"India\",\"postalCode\":789223,\"state\":\"WB\",\"street\":\"\"}" - }, - "identity": "anon_id" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.clevertap.com/1/upload", - "headers": { - "X-CleverTap-Account-Id": "476550467", - "X-CleverTap-Passcode": "sample_passcode", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "d": [ - { - "type": "profile", - "profileData": { - "Email": "jamesDoe@gmail.com", - "Name": "James Doe", - "Phone": "92374162212", - "Gender": "M", - "Employed": true, - "DOB": "1614775793", - "Education": "Science", - "Married": true, - "Customer Type": "Prime", - "graduate": true, - "msg_push": true, - "msgSms": true, - "msgemail": true, - "msgwhatsapp": false, - "custom_tags": "[\"Test_User\",\"Interested_User\",\"DIY_Hobby\"]", - "custom_mappings": "{\"Office\":\"Trastkiv\",\"Country\":\"Russia\"}", - "address": "{\"city\":\"kolkata\",\"country\":\"India\",\"postalCode\":789223,\"state\":\"WB\",\"street\":\"\"}" - }, - "identity": "anon_id" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "d": [ - { - "identity": "anon-id-new", - "type": "event", - "evtName": "Web Page Viewed: Rudder", - "evtData": { - "title": "Home", - "path": "/" - } - } - ] - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "X-CleverTap-Account-Id": "476550467", - "X-CleverTap-Passcode": "sample_passcode", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api.clevertap.com/1/upload" - }, - { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "d": [ - { - "identity": "identified_user_id", - "type": "event", - "evtName": "Screen Viewed: Rudder-Screen", - "evtData": { - "prop1": "5" - } - } - ] - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "X-CleverTap-Account-Id": "476550467", - "X-CleverTap-Passcode": "sample_passcode", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api.clevertap.com/1/upload" - }, - { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "d": [ - { - "identity": "user123", - "type": "event", - "evtName": "Product Purchased", - "evtData": { - "name": "Rubik's Cube", - "revenue": 4.99 - } - } - ] - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "X-CleverTap-Account-Id": "476550467", - "X-CleverTap-Passcode": "sample_passcode", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api.clevertap.com/1/upload" - }, - { - "error": "Message Type is not present. Aborting message." - }, - { - "error": "Message type not supported" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.clevertap.com/1/upload", - "headers": { - "X-CleverTap-Account-Id": "476550467", - "X-CleverTap-Passcode": "sample_passcode", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "d": [ - { - "evtName": "Charged", - "evtData": { - "Charged ID": "12345", - "Amount": 15, - "Items": [ - { - "sku": "G-32", - "url": "https://www.website.com/product/path", - "name": "Monopoly", - "price": 14, - "category": "Games", - "quantity": 1, - "image_url": "https://www.website.com/product/path.jpg", - "product_id": "123" - }, - { - "sku": "F-32", - "name": "UNO", - "price": 3.45, - "category": "Games", - "quantity": 2, - "product_id": "345" - } - ], - "tax": 1, - "total": 20, - "coupon": "ImagePro", - "currency": "USD", - "discount": 1.5, - "order_id": "1234", - "shipping": 22, - "affiliation": "Apple Store" - }, - "ts": 1615377562, - "type": "event", - "identity": "riverjohn" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - { - "error": "userId, not present cannot track anonymous user" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.clevertap.com/1/upload", - "headers": { - "X-CleverTap-Account-Id": "476550467", - "X-CleverTap-Passcode": "sample_passcode", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "d": [ - { - "type": "profile", - "profileData": { - "Email": "jamesDoe@gmail.com", - "Name": "James Doe", - "Phone": "92374162212", - "Gender": "F", - "Employed": true, - "DOB": "1614775793", - "Education": "Science", - "Married": true, - "Customer Type": "Prime", - "graduate": true, - "msg_push": true, - "msgSms": true, - "msgemail": true, - "msgwhatsapp": false, - "custom_tags": "[\"Test_User\",\"Interested_User\",\"DIY_Hobby\"]", - "custom_mappings": "{\"Office\":\"Trastkiv\",\"Country\":\"Russia\"}", - "address": "{\"city\":\"kolkata\",\"country\":\"India\",\"postalCode\":789223,\"state\":\"WB\",\"street\":\"\"}" - }, - "identity": "anon_id" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.clevertap.com/1/upload", - "headers": { - "X-CleverTap-Account-Id": "476550467", - "X-CleverTap-Passcode": "sample_passcode", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "d": [ - { - "type": "profile", - "profileData": { - "Email": "jamesDoe@gmail.com", - "Name": "James Doe", - "Phone": "92374162212", - "Employed": true, - "DOB": "1614775793", - "Education": "Science", - "Married": true, - "Customer Type": "Prime", - "graduate": true, - "msg_push": true, - "msgSms": true, - "msgemail": true, - "msgwhatsapp": false, - "custom_tags": "[\"Test_User\",\"Interested_User\",\"DIY_Hobby\"]", - "custom_mappings": "{\"Office\":\"Trastkiv\",\"Country\":\"Russia\"}", - "address": "{\"city\":\"kolkata\",\"country\":\"India\",\"postalCode\":789223,\"state\":\"WB\",\"street\":\"\"}" - }, - "identity": "anon_id" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.clevertap.com/1/upload", - "headers": { - "X-CleverTap-Account-Id": "476550467", - "X-CleverTap-Passcode": "sample_passcode", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "d": [ - { - "objectId": "f54bb572361c4fd1", - "type": "profile", - "profileData": { - "Email": "tony4an@testmail.com", - "Phone": "4444457700", - "Name": "Tony4AN Stark", - "identity": "useran4" - } - } - ] - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.clevertap.com/1/upload", - "headers": { - "X-CleverTap-Account-Id": "476550467", - "X-CleverTap-Passcode": "sample_passcode", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "d": [ - { - "type": "token", - "tokenData": { - "id": "frfsgvrwe:APfdsafsgdfsgghfgfgjkhfsfgdhjhbvcvnetry767456fxsasdf", - "type": "fcm" - }, - "objectId": "f54bb572361c4fd1" - } - ] - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - } - ], - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.clevertap.com/1/upload", - "headers": { - "X-CleverTap-Account-Id": "476550467", - "X-CleverTap-Passcode": "sample_passcode", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "d": [ - { - "identity": "ankur4", - "type": "profile", - "profileData": { - "Email": "ankur4gmail", - "Name": "Ankur4 Mittal", - "Phone": "8260294239" - } - } - ] - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "d": [ - { - "type": "event", - "evtData": { - "country_region": "India", - "test": "abc" - }, - "evtName": "Random", - "objectId": "cd3a4439-7df0-4475-acb9-6659c7c4dfe3" - } - ] - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Content-Type": "application/json", - "X-CleverTap-Passcode": "sample_passcode", - "X-CleverTap-Account-Id": "476550467" - }, - "version": "1", - "endpoint": "https://api.clevertap.com/1/upload" - }, - { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "d": [ - { - "type": "event", - "evtData": { - "country_region": "India", - "test": "abc" - }, - "evtName": "Random 2", - "identity": "ankur4" - } - ] - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Content-Type": "application/json", - "X-CleverTap-Passcode": "sample_passcode", - "X-CleverTap-Account-Id": "476550467" - }, - "version": "1", - "endpoint": "https://api.clevertap.com/1/upload" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.clevertap.com/1/upload", - "headers": { - "X-CleverTap-Account-Id": "476550467", - "X-CleverTap-Passcode": "sample_passcode", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "d": [ - { - "type": "profile", - "profileData": { - "Email": "jamesDoe@gmail.com", - "Name": "James Doe", - "Phone": "92374162212", - "Gender": "M", - "Employed": true, - "DOB": "1614775793", - "Education": "Science", - "Married": true, - "Customer Type": "Prime", - "graduate": true, - "msg_push": true, - "msgSms": true, - "msgemail": true, - "msgwhatsapp": false, - "custom_tags": "[\"Test_User\",\"Interested_User\",\"DIY_Hobby\"]", - "custom_mappings": "{\"Office\":\"Trastkiv\",\"Country\":\"Russia\"}", - "address": "{\"city\":\"kolkata\",\"country\":\"India\",\"postalCode\":789223,\"state\":\"WB\",\"street\":\"\"}" - }, - "ts": 1615377562, - "identity": "anon_id" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.clevertap.com/1/upload", - "headers": { - "X-CleverTap-Account-Id": "476550467", - "X-CleverTap-Passcode": "sample_passcode", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "d": [ - { - "type": "profile", - "profileData": { - "Email": "tony4an@testmail.com", - "Phone": "4444457700", - "Name": "Tony4AN Stark", - "identity": "useran4" - }, - "objectId": "f54bb572361c4fd1" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.clevertap.com/1/upload", - "headers": { - "X-CleverTap-Account-Id": "476550467", - "X-CleverTap-Passcode": "sample_passcode", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "d": [ - { - "type": "token", - "tokenData": { - "id": "frfsgvrwe:APfdsafsgdfsgghfgfgjkhfsfgdhjhbvcvnetry767456fxsasdf", - "type": "apns" - }, - "objectId": "f54bb572361c4fd1" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ], - { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "d": [ - { - "ts": 1468308340, - "type": "profile", - "identity": "1122121", - "profileData": { - "identity": "newaddedid001" - } - } - ] - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Content-Type": "application/json", - "X-CleverTap-Passcode": "sample_passcode", - "X-CleverTap-Account-Id": "476550467" - }, - "version": "1", - "endpoint": "https://api.clevertap.com/1/upload" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.clevertap.com/1/upload", - "headers": { - "X-CleverTap-Account-Id": "476550467", - "X-CleverTap-Passcode": "sample_passcode", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "d": [ - { - "type": "profile", - "profileData": { - "Email": "johnDoe@gmail.com", - "Phone": "92374162212", - "Gender": "M", - "Employed": true, - "DOB": "1614775793", - "Education": "Science", - "Married": true, - "Customer Type": "Prime", - "Name": "John Doe", - "graduate": true, - "msg_push": true, - "msgSms": true, - "msgemail": true, - "msgwhatsapp": false, - "custom_tags": "[\"Test_User\",\"Interested_User\",\"DIY_Hobby\"]", - "custom_mappings": "{\"Office\":\"Trastkiv\",\"Country\":\"Russia\"}", - "address": "{\"city\":\"kolkata\",\"country\":\"India\",\"postalCode\":789223,\"state\":\"WB\",\"street\":\"\"}", - "first_name": "John", - "last_name": "Doe" - }, - "identity": "anon_id" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.clevertap.com/1/upload", - "headers": { - "X-CleverTap-Account-Id": "476550467", - "X-CleverTap-Passcode": "sample_passcode", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "d": [ - { - "type": "profile", - "profileData": { - "Email": "johnDoe@gmail.com", - "Phone": "92374162212", - "Gender": "M", - "Employed": true, - "DOB": "1614775793", - "Education": "Science", - "Married": true, - "Customer Type": "Prime", - "Name": "John Doe", - "graduate": true, - "msg_push": true, - "msgSms": true, - "msgemail": true, - "msgwhatsapp": false, - "custom_tags": "[\"Test_User\",\"Interested_User\",\"DIY_Hobby\"]", - "custom_mappings": "{\"Office\":\"Trastkiv\",\"Country\":\"Russia\"}", - "address": "{\"city\":\"kolkata\",\"country\":\"India\",\"postalCode\":789223,\"state\":\"WB\",\"street\":\"\"}", - "first_name": "John", - "last_name": "Doe" - }, - "identity": "anon_id" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - { - "error": "Products property value must be an array of objects" - }, - { - "error": "Unable to process without anonymousId or userId" - } -] diff --git a/test/__tests__/data/clevertap_proxy_input.json b/test/__tests__/data/clevertap_proxy_input.json deleted file mode 100644 index 1826547f5c..0000000000 --- a/test/__tests__/data/clevertap_proxy_input.json +++ /dev/null @@ -1,114 +0,0 @@ -[ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.clevertap.com/1/upload/test1", - "headers": { - "X-CleverTap-Account-Id": "476550467", - "X-CleverTap-Passcode": "fbee74a147828e2932c701d19dc1f2dcfa4ac0048be3aa3a88d427090a59dc1c0fa002f1", - "Content-Type": "application/json" - }, - "body": { - "JSON": { - "d": [ - { - "type": "profile", - "profileData": { - "Email": "jamesDoe@gmail.com", - "Name": "James Doe", - "Phone": "92374162212", - "Gender": "M", - "Employed": true, - "DOB": "1614775793", - "Education": "Science", - "Married": "Y", - "Customer Type": "Prime", - "graduate": true, - "msg_push": true, - "msgSms": true, - "msgemail": true, - "msgwhatsapp": false, - "custom_tags": "[\"Test_User\",\"Interested_User\",\"DIY_Hobby\"]", - "custom_mappings": "{\"Office\":\"Trastkiv\",\"Country\":\"Russia\"}", - "address": "{\"city\":\"kolkata\",\"country\":\"India\",\"postalCode\":789223,\"state\":\"WB\",\"street\":\"\"}" - }, - "identity": "anon_id" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "params": { - "destination": "clevertap" - } - }, - { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "d": [ - { - "identity": "anon-id-new", - "type": "event", - "evtName": "Web Page Viewed: Rudder", - "evtData": { - "title": "Home", - "path": "/" - } - } - ] - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "headers": { - "X-CleverTap-Account-Id": "fakeId123", - "X-CleverTap-Passcode": "fakePasscode123", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api.clevertap.com/1/upload/test2", - "params": { - "destination": "clevertap" - } - }, - { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "d": [ - { - "identity": "anon-id-new", - "type": "event", - "evtData": { - "title": "Home", - "path": "/" - } - } - ] - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "headers": { - "X-CleverTap-Account-Id": "476550467", - "X-CleverTap-Passcode": "fbee74a147828e2932c701d19dc1f2dcfa4ac0048be3aa3a88d427090a59dc1c0fa002f1", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api.clevertap.com/1/upload/test3", - "params": { - "destination": "clevertap" - } - } -] \ No newline at end of file diff --git a/test/__tests__/data/clevertap_proxy_output.json b/test/__tests__/data/clevertap_proxy_output.json deleted file mode 100644 index cbb685e39e..0000000000 --- a/test/__tests__/data/clevertap_proxy_output.json +++ /dev/null @@ -1,64 +0,0 @@ -[ - { - "output": { - "status": 200, - "message": "Request Processed Successfully", - "destinationResponse": { - "response": { - "status": "success", - "processed": 1, - "unprocessed": [] - }, - "status": 200 - } - } - }, - { - "output": { - "status": 401, - "message": "Request failed with status: 401", - "destinationResponse": { - "response": { - "status": "fail", - "error": "Invalid Credentials", - "code": 401 - }, - "status": 401 - }, - "statTags": { - "destType": "CLEVERTAP", - "errorCategory": "network", - "destinationId": "Non-determininable", - "workspaceId": "Non-determininable", - "errorType": "aborted", - "feature": "dataDelivery", - "implementation": "native", - "module": "destination" - } - } - }, - { - "output": { - "status": 400, - "message": "Request failed with status: 200", - "destinationResponse": { - "response": { - "status": "fail", - "processed": 0, - "unprocessed": [] - }, - "status": 200 - }, - "statTags": { - "destType": "CLEVERTAP", - "errorCategory": "network", - "destinationId": "Non-determininable", - "workspaceId": "Non-determininable", - "errorType": "aborted", - "feature": "dataDelivery", - "implementation": "native", - "module": "destination" - } - } - } -] diff --git a/test/__tests__/data/clevertap_router_input.json b/test/__tests__/data/clevertap_router_input.json deleted file mode 100644 index af38871af9..0000000000 --- a/test/__tests__/data/clevertap_router_input.json +++ /dev/null @@ -1,139 +0,0 @@ -[ - { - "destination": { - "Config": { - "passcode": "dummypasscode", - "accountId": "dummyAccountId", - "trackAnonymous": true, - "enableObjectIdMapping": true - } - }, - "metadata": { - "jobId": 1 - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "Android", - "version": "" - }, - "screen": { - "density": 2 - }, - "device": { - "id": "f54bb572361c4fd1", - "name": "whyred", - "type": "Android", - "model": "Redmi Note 5 Pro", - "manufacturer": "Xiaomi", - "token": "frfsgvrwe:APfdsafsgdfsgghfgfgjkhfsfgdhjhbvcvnetry767456fxsasdf" - } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "anon_id", - "type": "identify", - "traits": { - "ts": "2019-10-14T09:03:17.562Z", - "anonymousId": "anon_id", - "email": "dummyuser@gmail.com", - "name": "Dummy User", - "phone": "98765434210", - "gender": "M", - "employed": true, - "birthday": "1614775793", - "education": "Science", - "graduate": true, - "married": true, - "customerType": "Prime", - "msg_push": true, - "msgSms": true, - "msgemail": true, - "msgwhatsapp": false, - "custom_tags": ["Test_User", "Interested_User", "DIY_Hobby"], - "custom_mappings": { - "Office": "Trastkiv", - "Country": "Russia" - }, - "address": { - "city": "kolkata", - "country": "India", - "postalCode": 789223, - "state": "WB", - "street": "" - } - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "passcode": "dummypasscode", - "accountId": "dummyAccountId", - "trackAnonymous": true, - "enableObjectIdMapping": true - } - }, - "metadata": { - "jobId": 2 - }, - "message": { - "event": "Random", - "properties": { - "country_region": "India", - "test": "abc" - }, - "receivedAt": "2021-08-20T12:49:07.691Z", - "rudderId": "138c4214-b537-4f77-9dea-9abde70b5147", - "type": "track", - "anonymousId": "cd3a4439-7df0-4475-acb9-6659c7c4dfe3" - } - }, - { - "destination": { - "Config": { - "passcode": "dummypasscode", - "accountId": "dummyAccountId", - "trackAnonymous": true - } - }, - "metadata": { - "jobId": 3 - }, - "message": { - "type": "group", - "anonymousId": "anon-id-new", - "name": "Rudder", - "properties": { - "title": "Home", - "path": "/" - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - } -] diff --git a/test/__tests__/data/clevertap_router_output.json b/test/__tests__/data/clevertap_router_output.json deleted file mode 100644 index 3f726652e1..0000000000 --- a/test/__tests__/data/clevertap_router_output.json +++ /dev/null @@ -1,107 +0,0 @@ -[ - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "batched": true, - "endpoint": "https://api.clevertap.com/1/upload", - "headers": { - "X-CleverTap-Account-Id": "dummyAccountId", - "X-CleverTap-Passcode": "dummypasscode", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "d": [ - { - "type": "profile", - "ts": 1571043797, - "profileData": { - "Email": "dummyuser@gmail.com", - "Name": "Dummy User", - "Phone": "98765434210", - "Gender": "M", - "Employed": true, - "DOB": "1614775793", - "Education": "Science", - "Married": true, - "Customer Type": "Prime", - "graduate": true, - "msg_push": true, - "msgSms": true, - "msgemail": true, - "msgwhatsapp": false, - "custom_tags": "[\"Test_User\",\"Interested_User\",\"DIY_Hobby\"]", - "custom_mappings": "{\"Office\":\"Trastkiv\",\"Country\":\"Russia\"}", - "address": "{\"city\":\"kolkata\",\"country\":\"India\",\"postalCode\":789223,\"state\":\"WB\",\"street\":\"\"}" - }, - "objectId": "anon_id" - }, - { - "type": "token", - "tokenData": { - "id": "frfsgvrwe:APfdsafsgdfsgghfgfgjkhfsfgdhjhbvcvnetry767456fxsasdf", - "type": "fcm" - }, - "objectId": "anon_id" - }, - { - "evtName": "Random", - "evtData": { - "country_region": "India", - "test": "abc" - }, - "type": "event", - "objectId": "cd3a4439-7df0-4475-acb9-6659c7c4dfe3" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "jobId": 1 - }, - { - "jobId": 2 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "passcode": "dummypasscode", - "accountId": "dummyAccountId", - "trackAnonymous": true, - "enableObjectIdMapping": true - } - } - }, - { - "metadata": [ - { - "jobId": 3 - } - ], - "batched": false, - "statusCode": 400, - "error": "Message type not supported", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation" - }, - "destination": { - "Config": { - "passcode": "dummypasscode", - "accountId": "dummyAccountId", - "trackAnonymous": true - } - } - } -] diff --git a/test/__tests__/data/intercom_input.json b/test/__tests__/data/intercom_input.json deleted file mode 100644 index 2d19ae5717..0000000000 --- a/test/__tests__/data/intercom_input.json +++ /dev/null @@ -1,1232 +0,0 @@ -[ - { - "message": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "channel": "mobile", - "context": { - "app": { - "build": "1.0", - "name": "Test_Example", - "namespace": "com.example.testapp", - "version": "1.0" - }, - "device": { - "id": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "manufacturer": "Apple", - "model": "iPhone", - "name": "iPod touch (7th generation)", - "type": "iOS" - }, - "library": { - "name": "test-ios-library", - "version": "1.0.7" - }, - "locale": "en-US", - "network": { - "bluetooth": false, - "carrier": "unavailable", - "cellular": false, - "wifi": true - }, - "os": { - "name": "iOS", - "version": "14.0" - }, - "screen": { - "density": 2, - "height": 320, - "width": 568 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "name": "Test Name", - "firstName": "Test", - "lastName": "Name", - "createdAt": "2020-09-30T19:11:00.337Z", - "userId": "test_user_id_1", - "email": "test_1@test.com", - "phone": "9876543210", - "key1": "value1", - "address": { - "city": "Kolkata", - "state": "West Bengal" - }, - "originalArray": [ - { - "nested_field": "nested value", - "tags": ["tag_1", "tag_2", "tag_3"] - }, - { - "nested_field": "nested value", - "tags": ["tag_1"] - }, - { - "nested_field": "nested value" - } - ] - }, - "userAgent": "unknown" - }, - "event": "Test Event 2", - "integrations": { - "All": true - }, - "messageId": "1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8", - "originalTimestamp": "2020-09-30T19:11:00.337Z", - "receivedAt": "2020-10-01T00:41:11.369+05:30", - "request_ip": "2405:201:8005:9856:7911:25e7:5603:5e18", - "sentAt": "2020-09-30T19:11:10.382Z", - "timestamp": "2020-10-01T00:41:01.324+05:30", - "type": "identify" - }, - "destination": { - "Config": { - "apiKey": "intercomApiKey", - "appId": "9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0", - "collectContext": false - } - } - }, - { - "message": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "channel": "mobile", - "context": { - "app": { - "build": "1.0", - "name": "Test_Example", - "namespace": "com.example.testapp", - "version": "1.0" - }, - "device": { - "id": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "manufacturer": "Apple", - "model": "iPhone", - "name": "iPod touch (7th generation)", - "type": "iOS" - }, - "library": { - "name": "test-ios-library", - "version": "1.0.7" - }, - "locale": "en-US", - "network": { - "bluetooth": false, - "carrier": "unavailable", - "cellular": false, - "wifi": true - }, - "os": { - "name": "iOS", - "version": "14.0" - }, - "screen": { - "density": 2, - "height": 320, - "width": 568 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "firstName": "Test", - "lastName": "Name", - "createdAt": "2020-09-30T19:11:00.337Z", - "email": "test_1@test.com", - "phone": "9876543210", - "key1": "value1" - }, - "userAgent": "unknown" - }, - "event": "Test Event 2", - "integrations": { - "All": true - }, - "messageId": "1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8", - "originalTimestamp": "2020-09-30T19:11:00.337Z", - "receivedAt": "2020-10-01T00:41:11.369+05:30", - "request_ip": "2405:201:8005:9856:7911:25e7:5603:5e18", - "sentAt": "2020-09-30T19:11:10.382Z", - "timestamp": "2020-10-01T00:41:01.324+05:30", - "type": "identify" - }, - "destination": { - "Config": { - "apiKey": "intercomApiKey", - "appId": "9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0", - "collectContext": false - } - } - }, - { - "message": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "channel": "mobile", - "context": { - "app": { - "build": "1.0", - "name": "Test_Example", - "namespace": "com.example.testapp", - "version": "1.0" - }, - "device": { - "id": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "manufacturer": "Apple", - "model": "iPhone", - "name": "iPod touch (7th generation)", - "type": "iOS" - }, - "library": { - "name": "test-ios-library", - "version": "1.0.7" - }, - "locale": "en-US", - "network": { - "bluetooth": false, - "carrier": "unavailable", - "cellular": false, - "wifi": true - }, - "os": { - "name": "iOS", - "version": "14.0" - }, - "screen": { - "density": 2, - "height": 320, - "width": 568 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "lastName": "Name", - "createdAt": "2020-09-30T19:11:00.337Z", - "email": "test_1@test.com", - "phone": "9876543210", - "key1": "value1" - }, - "userAgent": "unknown" - }, - "event": "Test Event 2", - "integrations": { - "All": true - }, - "messageId": "1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8", - "originalTimestamp": "2020-09-30T19:11:00.337Z", - "receivedAt": "2020-10-01T00:41:11.369+05:30", - "request_ip": "2405:201:8005:9856:7911:25e7:5603:5e18", - "sentAt": "2020-09-30T19:11:10.382Z", - "timestamp": "2020-10-01T00:41:01.324+05:30", - "type": "identify" - }, - "destination": { - "Config": { - "apiKey": "intercomApiKey", - "appId": "9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0", - "collectContext": false - } - } - }, - { - "message": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "channel": "mobile", - "context": { - "app": { - "build": "1.0", - "name": "Test_Example", - "namespace": "com.example.testapp", - "version": "1.0" - }, - "device": { - "id": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "manufacturer": "Apple", - "model": "iPhone", - "name": "iPod touch (7th generation)", - "type": "iOS" - }, - "library": { - "name": "test-ios-library", - "version": "1.0.7" - }, - "locale": "en-US", - "network": { - "bluetooth": false, - "carrier": "unavailable", - "cellular": false, - "wifi": true - }, - "os": { - "name": "iOS", - "version": "14.0" - }, - "screen": { - "density": 2, - "height": 320, - "width": 568 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "firstName": "Name", - "createdAt": "2020-09-30T19:11:00.337Z", - "email": "test_1@test.com", - "phone": "9876543210", - "key1": "value1" - }, - "userAgent": "unknown" - }, - "event": "Test Event 2", - "integrations": { - "All": true - }, - "messageId": "1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8", - "originalTimestamp": "2020-09-30T19:11:00.337Z", - "receivedAt": "2020-10-01T00:41:11.369+05:30", - "request_ip": "2405:201:8005:9856:7911:25e7:5603:5e18", - "sentAt": "2020-09-30T19:11:10.382Z", - "timestamp": "2020-10-01T00:41:01.324+05:30", - "type": "identify" - }, - "destination": { - "Config": { - "apiKey": "intercomApiKey", - "appId": "9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0", - "collectContext": false - } - } - }, - { - "message": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "channel": "mobile", - "context": { - "app": { - "build": "1.0", - "name": "Test_Example", - "namespace": "com.example.testapp", - "version": "1.0" - }, - "device": { - "id": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "manufacturer": "Apple", - "model": "iPhone", - "name": "iPod touch (7th generation)", - "type": "iOS" - }, - "library": { - "name": "test-ios-library", - "version": "1.0.7" - }, - "locale": "en-US", - "network": { - "bluetooth": false, - "carrier": "unavailable", - "cellular": false, - "wifi": true - }, - "os": { - "name": "iOS", - "version": "14.0" - }, - "screen": { - "density": 2, - "height": 320, - "width": 568 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "firstName": "Name", - "createdAt": "2020-09-30T19:11:00.337Z", - "phone": "9876543210", - "key1": "value1" - }, - "userAgent": "unknown" - }, - "event": "Test Event 2", - "integrations": { - "All": true - }, - "messageId": "1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8", - "originalTimestamp": "2020-09-30T19:11:00.337Z", - "receivedAt": "2020-10-01T00:41:11.369+05:30", - "request_ip": "2405:201:8005:9856:7911:25e7:5603:5e18", - "sentAt": "2020-09-30T19:11:10.382Z", - "timestamp": "2020-10-01T00:41:01.324+05:30", - "type": "identify" - }, - "destination": { - "Config": { - "apiKey": "intercomApiKey", - "appId": "9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0", - "collectContext": false - } - } - }, - { - "message": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "channel": "mobile", - "context": { - "app": { - "build": "1.0", - "name": "Test_Example", - "namespace": "com.example.testapp", - "version": "1.0" - }, - "device": { - "id": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "manufacturer": "Apple", - "model": "iPhone", - "name": "iPod touch (7th generation)", - "type": "iOS" - }, - "library": { - "name": "test-ios-library", - "version": "1.0.7" - }, - "locale": "en-US", - "network": { - "bluetooth": false, - "carrier": "unavailable", - "cellular": false, - "wifi": true - }, - "os": { - "name": "iOS", - "version": "14.0" - }, - "screen": { - "density": 2, - "height": 320, - "width": 568 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "lastName": "Name", - "createdAt": "2020-09-30T19:11:00.337Z", - "email": "test_1@test.com", - "phone": "9876543210", - "key1": "value1", - "company": { - "name": "Test Comp", - "id": "company_id", - "industry": "test industry", - "key1": "value1", - "key2": { - "a": "a" - }, - "key3": [1, 2, 3] - } - }, - "userAgent": "unknown" - }, - "event": "Test Event 2", - "integrations": { - "All": true - }, - "messageId": "1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8", - "originalTimestamp": "2020-09-30T19:11:00.337Z", - "receivedAt": "2020-10-01T00:41:11.369+05:30", - "request_ip": "2405:201:8005:9856:7911:25e7:5603:5e18", - "sentAt": "2020-09-30T19:11:10.382Z", - "timestamp": "2020-10-01T00:41:01.324+05:30", - "type": "identify" - }, - "destination": { - "Config": { - "apiKey": "intercomApiKey", - "appId": "9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0", - "collectContext": false - } - } - }, - { - "message": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "channel": "mobile", - "context": { - "app": { - "build": "1.0", - "name": "Test_Example", - "namespace": "com.example.testapp", - "version": "1.0" - }, - "device": { - "id": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "manufacturer": "Apple", - "model": "iPhone", - "name": "iPod touch (7th generation)", - "type": "iOS" - }, - "library": { - "name": "test-ios-library", - "version": "1.0.7" - }, - "locale": "en-US", - "network": { - "bluetooth": false, - "carrier": "unavailable", - "cellular": false, - "wifi": true - }, - "os": { - "name": "iOS", - "version": "14.0" - }, - "screen": { - "density": 2, - "height": 320, - "width": 568 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "lastName": "Name", - "createdAt": "2020-09-30T19:11:00.337Z", - "email": "test_1@test.com", - "phone": "9876543210", - "key1": "value1", - "company": { - "name": "Test Comp", - "industry": "test industry", - "key1": "value1", - "key2": null, - "key3": ["value1", "value2"], - "key4": { - "foo": "bar" - } - } - }, - "userAgent": "unknown" - }, - "event": "Test Event 2", - "integrations": { - "All": true - }, - "messageId": "1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8", - "originalTimestamp": "2020-09-30T19:11:00.337Z", - "receivedAt": "2020-10-01T00:41:11.369+05:30", - "request_ip": "2405:201:8005:9856:7911:25e7:5603:5e18", - "sentAt": "2020-09-30T19:11:10.382Z", - "timestamp": "2020-10-01T00:41:01.324+05:30", - "type": "identify" - }, - "destination": { - "Config": { - "apiKey": "intercomApiKey", - "appId": "9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0", - "collectContext": false, - "updateLastRequestAt": false - } - } - }, - { - "message": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "channel": "mobile", - "context": { - "app": { - "build": "1.0", - "name": "Test_Example", - "namespace": "com.example.testapp", - "version": "1.0" - }, - "device": { - "id": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "manufacturer": "Apple", - "model": "iPhone", - "name": "iPod touch (7th generation)", - "type": "iOS" - }, - "library": { - "name": "test-ios-library", - "version": "1.0.7" - }, - "locale": "en-US", - "network": { - "bluetooth": false, - "carrier": "unavailable", - "cellular": false, - "wifi": true - }, - "os": { - "name": "iOS", - "version": "14.0" - }, - "screen": { - "density": 2, - "height": 320, - "width": 568 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "lastName": "Name", - "createdAt": "2020-09-30T19:11:00.337Z", - "email": "test_1@test.com", - "phone": "9876543210", - "key1": "value1", - "company": { - "industry": "test industry", - "key1": "value1", - "key2": null - } - }, - "userAgent": "unknown" - }, - "event": "Test Event 2", - "integrations": { - "All": true - }, - "messageId": "1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8", - "originalTimestamp": "2020-09-30T19:11:00.337Z", - "receivedAt": "2020-10-01T00:41:11.369+05:30", - "request_ip": "2405:201:8005:9856:7911:25e7:5603:5e18", - "sentAt": "2020-09-30T19:11:10.382Z", - "timestamp": "2020-10-01T00:41:01.324+05:30", - "type": "identify" - }, - "destination": { - "Config": { - "apiKey": "intercomApiKey", - "appId": "9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0", - "collectContext": false - } - } - }, - { - "message": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "channel": "mobile", - "context": { - "app": { - "build": "1.0", - "name": "Test_Example", - "namespace": "com.example.testapp", - "version": "1.0" - }, - "device": { - "id": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "manufacturer": "Apple", - "model": "iPhone", - "name": "iPod touch (7th generation)", - "type": "iOS" - }, - "library": { - "name": "test-ios-library", - "version": "1.0.7" - }, - "locale": "en-US", - "network": { - "bluetooth": false, - "carrier": "unavailable", - "cellular": false, - "wifi": true - }, - "os": { - "name": "iOS", - "version": "14.0" - }, - "screen": { - "density": 2, - "height": 320, - "width": 568 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "name": "Test Name", - "firstName": "Test", - "lastName": "Name", - "createdAt": "2020-09-30T19:11:00.337Z", - "userId": "test_user_id_1", - "email": "test_1@test.com", - "phone": "9876543210", - "key1": "value1" - }, - "userAgent": "unknown" - }, - "properties": { - "property1": 1, - "property2": "test", - "property3": true, - "property4": "2020-10-05T09:09:03.731Z", - "property5": { - "property1": 1, - "property2": "test", - "property3": { - "subProp1": { - "a": "a", - "b": "b" - }, - "subProp2": ["a", "b"] - } - }, - "properties6": null, - "revenue": { - "amount": 1232, - "currency": "inr", - "test": 123 - }, - "price": { - "amount": 3000, - "currency": "USD" - }, - "article": { - "url": "https://example.org/ab1de.html", - "value": "the dude abides" - } - }, - "event": "Test Event 2", - "integrations": { - "All": true - }, - "messageId": "1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8", - "originalTimestamp": "2020-09-30T19:11:00.337Z", - "receivedAt": "2020-10-01T00:41:11.369+05:30", - "request_ip": "2405:201:8005:9856:7911:25e7:5603:5e18", - "sentAt": "2020-09-30T19:11:10.382Z", - "timestamp": "2020-10-01T00:41:01.324+05:30", - "type": "track" - }, - "destination": { - "Config": { - "apiKey": "intercomApiKey", - "appId": "9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0", - "collectContext": false - } - } - }, - { - "message": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "channel": "mobile", - "context": { - "app": { - "build": "1.0", - "name": "Test_Example", - "namespace": "com.example.testapp", - "version": "1.0" - }, - "device": { - "id": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "manufacturer": "Apple", - "model": "iPhone", - "name": "iPod touch (7th generation)", - "type": "iOS" - }, - "library": { - "name": "test-ios-library", - "version": "1.0.7" - }, - "locale": "en-US", - "network": { - "bluetooth": false, - "carrier": "unavailable", - "cellular": false, - "wifi": true - }, - "os": { - "name": "iOS", - "version": "14.0" - }, - "screen": { - "density": 2, - "height": 320, - "width": 568 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "name": "Test Name", - "firstName": "Test", - "lastName": "Name", - "createdAt": "2020-09-30T19:11:00.337Z", - "email": "test_1@test.com", - "phone": "9876543210", - "key1": "value1" - }, - "userAgent": "unknown" - }, - "event": "Test Event 2", - "integrations": { - "All": true - }, - "messageId": "1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8", - "originalTimestamp": "2020-09-30T19:11:00.337Z", - "receivedAt": "2020-10-01T00:41:11.369+05:30", - "request_ip": "2405:201:8005:9856:7911:25e7:5603:5e18", - "sentAt": "2020-09-30T19:11:10.382Z", - "timestamp": "2020-10-01T00:41:01.324+05:30", - "type": "track" - }, - "destination": { - "Config": { - "apiKey": "intercomApiKey", - "appId": "9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0", - "collectContext": false - } - } - }, - { - "message": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "channel": "mobile", - "context": { - "app": { - "build": "1.0", - "name": "Test_Example", - "namespace": "com.example.testapp", - "version": "1.0" - }, - "device": { - "id": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "manufacturer": "Apple", - "model": "iPhone", - "name": "iPod touch (7th generation)", - "type": "iOS" - }, - "library": { - "name": "test-ios-library", - "version": "1.0.7" - }, - "locale": "en-US", - "network": { - "bluetooth": false, - "carrier": "unavailable", - "cellular": false, - "wifi": true - }, - "os": { - "name": "iOS", - "version": "14.0" - }, - "screen": { - "density": 2, - "height": 320, - "width": 568 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "name": "Test Name", - "firstName": "Test", - "lastName": "Name", - "createdAt": "2020-09-30T19:11:00.337Z", - "phone": "9876543210", - "key1": "value1" - }, - "userAgent": "unknown" - }, - "event": "Test Event 2", - "integrations": { - "All": true - }, - "messageId": "1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8", - "originalTimestamp": "2020-09-30T19:11:00.337Z", - "receivedAt": "2020-10-01T00:41:11.369+05:30", - "request_ip": "2405:201:8005:9856:7911:25e7:5603:5e18", - "sentAt": "2020-09-30T19:11:10.382Z", - "timestamp": "2020-10-01T00:41:01.324+05:30", - "type": "track" - }, - "destination": { - "Config": { - "apiKey": "intercomApiKey", - "appId": "9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0", - "collectContext": false - } - } - }, - { - "message": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "channel": "mobile", - "context": { - "app": { - "build": "1.0", - "name": "Test_Example", - "namespace": "com.example.testapp", - "version": "1.0" - }, - "externalId": [ - { - "identifierType": "email", - "id": "test@gmail.com" - } - ], - "mappedToDestination": true, - "device": { - "id": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "manufacturer": "Apple", - "model": "iPhone", - "name": "iPod touch (7th generation)", - "type": "iOS" - }, - "library": { - "name": "test-ios-library", - "version": "1.0.7" - }, - "locale": "en-US", - "network": { - "bluetooth": false, - "carrier": "unavailable", - "cellular": false, - "wifi": true - }, - "os": { - "name": "iOS", - "version": "14.0" - }, - "screen": { - "density": 2, - "height": 320, - "width": 568 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "name": "Test Name", - "firstName": "Test", - "lastName": "Name", - "createdAt": "2020-09-30T19:11:00.337Z", - "phone": "9876543210", - "key1": "value1" - }, - "userAgent": "unknown" - }, - "event": "Test Event 2", - "integrations": { - "All": true - }, - "messageId": "1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8", - "originalTimestamp": "2020-09-30T19:11:00.337Z", - "receivedAt": "2020-10-01T00:41:11.369+05:30", - "request_ip": "2405:201:8005:9856:7911:25e7:5603:5e18", - "sentAt": "2020-09-30T19:11:10.382Z", - "timestamp": "2020-10-01T00:41:01.324+05:30", - "type": "identify" - }, - "destination": { - "Config": { - "apiKey": "intercomApiKey", - "appId": "9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0", - "collectContext": false - } - } - }, - { - "message": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "channel": "mobile", - "context": { - "app": { - "build": "1.0", - "name": "Test_Example", - "namespace": "com.example.testapp", - "version": "1.0" - }, - "device": { - "id": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "manufacturer": "Apple", - "model": "iPhone", - "name": "iPod touch (7th generation)", - "type": "iOS" - }, - "library": { - "name": "test-ios-library", - "version": "1.0.7" - }, - "locale": "en-US", - "network": { - "bluetooth": false, - "carrier": "unavailable", - "cellular": false, - "wifi": true - }, - "os": { - "name": "iOS", - "version": "14.0" - }, - "screen": { - "density": 2, - "height": 320, - "width": 568 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "name": "Test Name", - "firstName": "Test", - "lastName": "Name", - "createdAt": "2020-09-30T19:11:00.337Z", - "phone": "9876543210", - "key1": "value1" - }, - "userAgent": "unknown" - }, - "event": "Test Event 2", - "integrations": { - "All": true - }, - "messageId": "1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8", - "originalTimestamp": "2020-09-30T19:11:00.337Z", - "receivedAt": "2020-10-01T00:41:11.369+05:30", - "request_ip": "2405:201:8005:9856:7911:25e7:5603:5e18", - "sentAt": "2020-09-30T19:11:10.382Z", - "timestamp": "2020-10-01T00:41:01.324+05:30", - "type": "identify" - }, - "destination": { - "Config": { - "apiKey": "intercomApiKey", - "appId": "9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0", - "collectContext": false, - "sendAnonymousId": true - } - } - }, - { - "message": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "channel": "mobile", - "context": { - "app": { - "build": "1.0", - "name": "Test_Example", - "namespace": "com.example.testapp", - "version": "1.0" - }, - "device": { - "id": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "manufacturer": "Apple", - "model": "iPhone", - "name": "iPod touch (7th generation)", - "type": "iOS" - }, - "library": { - "name": "test-ios-library", - "version": "1.0.7" - }, - "locale": "en-US", - "network": { - "bluetooth": false, - "carrier": "unavailable", - "cellular": false, - "wifi": true - }, - "os": { - "name": "iOS", - "version": "14.0" - }, - "screen": { - "density": 2, - "height": 320, - "width": 568 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "name": "Test Name", - "firstName": "Test", - "lastName": "Name", - "createdAt": "2020-09-30T19:11:00.337Z", - "phone": "9876543210", - "key1": "value1" - }, - "userAgent": "unknown" - }, - "event": "Test Event 2", - "integrations": { - "All": true - }, - "messageId": "1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8", - "originalTimestamp": "2020-09-30T19:11:00.337Z", - "receivedAt": "2020-10-01T00:41:11.369+05:30", - "request_ip": "2405:201:8005:9856:7911:25e7:5603:5e18", - "sentAt": "2020-09-30T19:11:10.382Z", - "timestamp": "2020-10-01T00:41:01.324+05:30", - "type": "identify" - }, - "destination": { - "Config": { - "apiKey": "intercomApiKey", - "appId": "9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0", - "collectContext": false, - "sendAnonymousId": false - } - } - }, - { - "message": { - "groupId": "test_company_id_wdasda", - "traits": { - "employees": 450, - "plan": "basic", - "userId": "sdfrsdfsdfsf", - "email": "test@test.com", - "name": "rudderUpdate", - "size": "50", - "industry": "IT", - "monthlySpend": "2131231", - "remoteCreatedAt": "1683017572", - "key1": "val1" - }, - "anonymousId": "sdfrsdfsdfsf", - "integrations": { - "All": true - }, - "type": "group", - "userId": "sdfrsdfsdfsf" - }, - "destination": { - "Config": { - "apiKey": "abcd=", - "appId": "asdasdasd", - "collectContext": false - } - } - }, - { - "message": { - "groupId": "test_company_id", - "traits": { - "plan": "basic", - "name": "rudderUpdate", - "size": 50, - "industry": "IT", - "monthlySpend": "2131231", - "email": "comanyemail@abc.com" - }, - "anonymousId": "12312312", - "context": { - "app": { - "build": "1.0", - "name": "Test_Example", - "namespace": "com.example.testapp", - "version": "1.0" - }, - "device": { - "id": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "manufacturer": "Apple", - "model": "iPhone", - "name": "iPod touch (7th generation)", - "type": "iOS" - }, - "library": { - "name": "test-ios-library", - "version": "1.0.7" - }, - "locale": "en-US", - "network": { - "bluetooth": false, - "carrier": "unavailable", - "cellular": false, - "wifi": true - }, - "os": { - "name": "iOS", - "version": "14.0" - }, - "screen": { - "density": 2, - "height": 320, - "width": 568 - }, - "timezone": "Asia/Kolkata", - "userAgent": "unknown" - }, - "integrations": { - "All": true - }, - "messageId": "1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8", - "type": "group" - }, - "destination": { - "Config": { - "apiKey": "abcd=", - "appId": "asdasdasd", - "collectContext": false - } - } - }, - { - "message": { - "groupId": "test_company_id_wdasda", - "context": { - "traits": { - "email": "testUser@test.com" - } - }, - "traits": { - "employees": 450, - "plan": "basic", - "email": "test@test.com", - "name": "rudderUpdate", - "size": "50", - "industry": "IT", - "website": "url", - "monthlySpend": "2131231", - "remoteCreatedAt": "1683017572", - "key1": "val1" - }, - "anonymousId": "sdfrsdfsdfsf", - "integrations": { - "All": true - }, - "type": "group", - "userId": "sdfrsdfsdfsf" - }, - "destination": { - "Config": { - "apiKey": "abcd=", - "appId": "asdasdasd", - "collectContext": false - } - } - }, - { - "message": { - "groupId": "test_company_id_wdasda", - "context": { - "traits": { - "email": "testUser@test.com" - } - }, - "traits": { - "employees": 450, - "plan": "basic", - "email": "test@test.com", - "name": "rudderUpdate", - "size": "50", - "industry": "IT", - "website": "url", - "monthlySpend": "2131231", - "remoteCreatedAt": "1683017572", - "key1": "val1", - "key2": { - "a": "a", - "b": "b" - }, - "key3": [1, 2, 3], - "key4": null - }, - "anonymousId": "anonId", - "integrations": { - "All": true - }, - "type": "group" - }, - "destination": { - "Config": { - "apiKey": "abcd=", - "appId": "asdasdasd", - "collectContext": false, - "sendAnonymousId": true - } - } - } -] diff --git a/test/__tests__/data/intercom_output.json b/test/__tests__/data/intercom_output.json deleted file mode 100644 index 64ad4133bf..0000000000 --- a/test/__tests__/data/intercom_output.json +++ /dev/null @@ -1,651 +0,0 @@ -[ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.intercom.io/users", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer intercomApiKey", - "Accept": "application/json", - "Intercom-Version": "1.4" - }, - "params": {}, - "body": { - "JSON": { - "email": "test_1@test.com", - "phone": "9876543210", - "name": "Test Name", - "signed_up_at": 1601493060, - "last_seen_user_agent": "unknown", - "update_last_request_at": true, - "user_id": "test_user_id_1", - "custom_attributes": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "key1": "value1", - "address.city": "Kolkata", - "address.state": "West Bengal", - "originalArray[0].nested_field": "nested value", - "originalArray[0].tags[0]": "tag_1", - "originalArray[0].tags[1]": "tag_2", - "originalArray[0].tags[2]": "tag_3", - "originalArray[1].nested_field": "nested value", - "originalArray[1].tags[0]": "tag_1", - "originalArray[2].nested_field": "nested value" - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.intercom.io/users", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer intercomApiKey", - "Accept": "application/json", - "Intercom-Version": "1.4" - }, - "params": {}, - "body": { - "JSON": { - "email": "test_1@test.com", - "phone": "9876543210", - "signed_up_at": 1601493060, - "name": "Test Name", - "last_seen_user_agent": "unknown", - "update_last_request_at": true, - "custom_attributes": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "key1": "value1" - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.intercom.io/users", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer intercomApiKey", - "Accept": "application/json", - "Intercom-Version": "1.4" - }, - "params": {}, - "body": { - "JSON": { - "email": "test_1@test.com", - "phone": "9876543210", - "signed_up_at": 1601493060, - "last_seen_user_agent": "unknown", - "update_last_request_at": true, - "custom_attributes": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "key1": "value1" - }, - "name": "Name" - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.intercom.io/users", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer intercomApiKey", - "Accept": "application/json", - "Intercom-Version": "1.4" - }, - "params": {}, - "body": { - "JSON": { - "email": "test_1@test.com", - "phone": "9876543210", - "signed_up_at": 1601493060, - "last_seen_user_agent": "unknown", - "update_last_request_at": true, - "custom_attributes": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "key1": "value1" - }, - "name": "Name" - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33" - }, - { - "statusCode": 400, - "error": "Either of `email` or `userId` is required for Identify call" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.intercom.io/users", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer intercomApiKey", - "Accept": "application/json", - "Intercom-Version": "1.4" - }, - "params": {}, - "body": { - "JSON": { - "email": "test_1@test.com", - "phone": "9876543210", - "signed_up_at": 1601493060, - "last_seen_user_agent": "unknown", - "update_last_request_at": true, - "custom_attributes": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "key1": "value1" - }, - "name": "Name", - "companies": [ - { - "company_id": "company_id", - "custom_attributes": { - "key1": "value1", - "key2": "{\"a\":\"a\"}", - "key3": "[1,2,3]" - }, - "name": "Test Comp", - "industry": "test industry" - } - ] - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.intercom.io/users", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer intercomApiKey", - "Accept": "application/json", - "Intercom-Version": "1.4" - }, - "params": {}, - "body": { - "JSON": { - "email": "test_1@test.com", - "phone": "9876543210", - "signed_up_at": 1601493060, - "last_seen_user_agent": "unknown", - "update_last_request_at": false, - "custom_attributes": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "key1": "value1" - }, - "name": "Name", - "companies": [ - { - "company_id": "c0277b5c814453e5135f515f943d085a", - "custom_attributes": { - "key1": "value1", - "key3": "[\"value1\",\"value2\"]", - "key4": "{\"foo\":\"bar\"}" - }, - "name": "Test Comp", - "industry": "test industry" - } - ] - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.intercom.io/users", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer intercomApiKey", - "Accept": "application/json", - "Intercom-Version": "1.4" - }, - "params": {}, - "body": { - "JSON": { - "email": "test_1@test.com", - "phone": "9876543210", - "signed_up_at": 1601493060, - "last_seen_user_agent": "unknown", - "update_last_request_at": true, - "custom_attributes": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "key1": "value1" - }, - "name": "Name", - "companies": [] - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.intercom.io/events", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer intercomApiKey", - "Accept": "application/json", - "Intercom-Version": "1.4" - }, - "params": {}, - "body": { - "JSON": { - "user_id": "test_user_id_1", - "email": "test_1@test.com", - "event_name": "Test Event 2", - "created": 1601493061, - "metadata": { - "property1": 1, - "property2": "test", - "property3": true, - "property4": "2020-10-05T09:09:03.731Z", - "property5.property1": 1, - "property5.property2": "test", - "property5.property3.subProp1.a": "a", - "property5.property3.subProp1.b": "b", - "property5.property3.subProp2[0]": "a", - "property5.property3.subProp2[1]": "b", - "properties6": null, - "revenue": { - "amount": 1232, - "currency": "inr", - "test": 123 - }, - "price": { - "amount": 3000, - "currency": "USD" - }, - "article": { - "url": "https://example.org/ab1de.html", - "value": "the dude abides" - } - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.intercom.io/events", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer intercomApiKey", - "Accept": "application/json", - "Intercom-Version": "1.4" - }, - "params": {}, - "body": { - "JSON": { - "email": "test_1@test.com", - "event_name": "Test Event 2", - "created": 1601493061 - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33" - }, - { - "statusCode": 400, - "error": "Either of `email` or `userId` is required for Track call" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.intercom.io/users", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer intercomApiKey", - "Accept": "application/json", - "Intercom-Version": "1.4" - }, - "params": {}, - "body": { - "JSON": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "name": "Test Name", - "firstName": "Test", - "lastName": "Name", - "createdAt": "2020-09-30T19:11:00.337Z", - "phone": "9876543210", - "key1": "value1", - "email": "test@gmail.com", - "update_last_request_at": true - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.intercom.io/users", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer intercomApiKey", - "Accept": "application/json", - "Intercom-Version": "1.4" - }, - "params": {}, - "body": { - "JSON": { - "phone": "9876543210", - "name": "Test Name", - "signed_up_at": 1601493060, - "last_seen_user_agent": "unknown", - "custom_attributes": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "key1": "value1" - }, - "user_id": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "update_last_request_at": true - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33" - }, - { - "statusCode": 400, - "error": "Either of `email` or `userId` is required for Identify call" - }, - [ - { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "name": "rudderUpdate", - "plan": "basic", - "size": 50, - "industry": "IT", - "company_id": "test_company_id_wdasda", - "monthly_spend": 2131231, - "remote_created_at": 1683017572, - "custom_attributes": { - "key1": "val1", - "employees": 450, - "email": "test@test.com" - } - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "sdfrsdfsdfsf", - "headers": { - "Accept": "application/json", - "Content-Type": "application/json", - "Authorization": "Bearer abcd=", - "Intercom-Version": "1.4" - }, - "version": "1", - "endpoint": "https://api.intercom.io/companies" - }, - { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "user_id": "sdfrsdfsdfsf", - "companies": [ - { - "name": "rudderUpdate", - "company_id": "test_company_id_wdasda" - } - ] - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "sdfrsdfsdfsf", - "headers": { - "Accept": "application/json", - "Content-Type": "application/json", - "Authorization": "Bearer abcd=", - "Intercom-Version": "1.4" - }, - "version": "1", - "endpoint": "https://api.intercom.io/users" - } - ], - [ - { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "name": "rudderUpdate", - "size": 50, - "industry": "IT", - "company_id": "test_company_id", - "monthly_spend": 2131231, - "plan": "basic", - "custom_attributes": { - "email": "comanyemail@abc.com" - } - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "12312312", - "headers": { - "Accept": "application/json", - "Content-Type": "application/json", - "Authorization": "Bearer abcd=", - "Intercom-Version": "1.4" - }, - "version": "1", - "endpoint": "https://api.intercom.io/companies" - } - ], - [ - { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "name": "rudderUpdate", - "plan": "basic", - "size": 50, - "industry": "IT", - "company_id": "test_company_id_wdasda", - "monthly_spend": 2131231, - "remote_created_at": 1683017572, - "website": "url", - "custom_attributes": { - "key1": "val1", - "employees": 450, - "email": "test@test.com" - } - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "sdfrsdfsdfsf", - "headers": { - "Accept": "application/json", - "Content-Type": "application/json", - "Authorization": "Bearer abcd=", - "Intercom-Version": "1.4" - }, - "version": "1", - "endpoint": "https://api.intercom.io/companies" - }, - { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "user_id": "sdfrsdfsdfsf", - "email": "testUser@test.com", - "companies": [ - { - "name": "rudderUpdate", - "company_id": "test_company_id_wdasda" - } - ] - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "sdfrsdfsdfsf", - "headers": { - "Accept": "application/json", - "Content-Type": "application/json", - "Authorization": "Bearer abcd=", - "Intercom-Version": "1.4" - }, - "version": "1", - "endpoint": "https://api.intercom.io/users" - } - ], - [ - { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "name": "rudderUpdate", - "plan": "basic", - "size": 50, - "industry": "IT", - "company_id": "test_company_id_wdasda", - "monthly_spend": 2131231, - "remote_created_at": 1683017572, - "website": "url", - "custom_attributes": { - "key1": "val1", - "employees": 450, - "email": "test@test.com", - "key2.a": "a", - "key2.b": "b", - "key3[0]": 1, - "key3[1]": 2, - "key3[2]": 3, - "key4": null - } - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "anonId", - "headers": { - "Accept": "application/json", - "Content-Type": "application/json", - "Authorization": "Bearer abcd=", - "Intercom-Version": "1.4" - }, - "version": "1", - "endpoint": "https://api.intercom.io/companies" - }, - { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "user_id": "anonId", - "email": "testUser@test.com", - "companies": [ - { - "name": "rudderUpdate", - "company_id": "test_company_id_wdasda" - } - ] - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "anonId", - "headers": { - "Accept": "application/json", - "Content-Type": "application/json", - "Authorization": "Bearer abcd=", - "Intercom-Version": "1.4" - }, - "version": "1", - "endpoint": "https://api.intercom.io/users" - } - ] -] diff --git a/test/__tests__/data/intercom_proxy_input.json b/test/__tests__/data/intercom_proxy_input.json deleted file mode 100644 index 0074202ceb..0000000000 --- a/test/__tests__/data/intercom_proxy_input.json +++ /dev/null @@ -1,44 +0,0 @@ -[ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.intercom.io/users/test1", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer intercomApiKey", - "Accept": "application/json", - "Intercom-Version": "1.4" - }, - "params": {}, - "body": { - "JSON": { - "email": "test_1@test.com", - "phone": "9876543210", - "name": "Test Name", - "signed_up_at": 1601493060, - "last_seen_user_agent": "unknown", - "update_last_request_at": true, - "user_id": "test_user_id_1", - "custom_attributes": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "key1": "value1", - "address.city": "Kolkata", - "address.state": "West Bengal", - "originalArray[0].nested_field": "nested value", - "originalArray[0].tags[0]": "tag_1", - "originalArray[0].tags[1]": "tag_2", - "originalArray[0].tags[2]": "tag_3", - "originalArray[1].nested_field": "nested value", - "originalArray[1].tags[0]": "tag_1", - "originalArray[2].nested_field": "nested value" - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33" - } -] diff --git a/test/__tests__/data/intercom_proxy_output.json b/test/__tests__/data/intercom_proxy_output.json deleted file mode 100644 index 5b6f9ef915..0000000000 --- a/test/__tests__/data/intercom_proxy_output.json +++ /dev/null @@ -1,31 +0,0 @@ -[ - { - "output": { - "status": 500, - "message": "[Intercom Response Handler] Request failed for destination intercom with status: 408", - "destinationResponse": { - "response": { - "type": "error.list", - "request_id": "000on04msi4jpk7d3u60", - "errors": [ - { - "code": "Request Timeout", - "message": "The server would not wait any longer for the client" - } - ] - }, - "status": 408 - }, - "statTags": { - "destType": "INTERCOM", - "errorCategory": "network", - "destinationId": "Non-determininable", - "workspaceId": "Non-determininable", - "errorType": "retryable", - "feature": "dataDelivery", - "implementation": "native", - "module": "destination" - } - } - } -] diff --git a/test/__tests__/data/intercom_router_input.json b/test/__tests__/data/intercom_router_input.json deleted file mode 100644 index a3eb28fc10..0000000000 --- a/test/__tests__/data/intercom_router_input.json +++ /dev/null @@ -1,150 +0,0 @@ -[ - { - "message": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "channel": "mobile", - "context": { - "app": { - "build": "1.0", - "name": "Test_Example", - "namespace": "com.example.testapp", - "version": "1.0" - }, - "device": { - "id": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "manufacturer": "Apple", - "model": "iPhone", - "name": "iPod touch (7th generation)", - "type": "iOS" - }, - "library": { - "name": "test-ios-library", - "version": "1.0.7" - }, - "locale": "en-US", - "network": { - "bluetooth": false, - "carrier": "unavailable", - "cellular": false, - "wifi": true - }, - "os": { - "name": "iOS", - "version": "14.0" - }, - "screen": { - "density": 2, - "height": 320, - "width": 568 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "name": "Test Name", - "firstName": "Test", - "lastName": "Name", - "createdAt": "2020-09-30T19:11:00.337Z", - "userId": "test_user_id_1", - "email": "test_1@test.com", - "phone": "9876543210", - "key1": "value1" - }, - "userAgent": "unknown" - }, - "event": "Test Event 2", - "integrations": { - "All": true - }, - "messageId": "1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8", - "originalTimestamp": "2020-09-30T19:11:00.337Z", - "receivedAt": "2020-10-01T00:41:11.369+05:30", - "request_ip": "2405:201:8005:9856:7911:25e7:5603:5e18", - "sentAt": "2020-09-30T19:11:10.382Z", - "timestamp": "2020-10-01T00:41:01.324+05:30", - "type": "identify" - }, - "metadata": { - "jobId": 1 - }, - "destination": { - "Config": { - "apiKey": "intercomApiKey", - "appId": "9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0", - "collectContext": false - } - } - }, - { - "message": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "channel": "mobile", - "context": { - "app": { - "build": "1.0", - "name": "Test_Example", - "namespace": "com.example.testapp", - "version": "1.0" - }, - "device": { - "id": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "manufacturer": "Apple", - "model": "iPhone", - "name": "iPod touch (7th generation)", - "type": "iOS" - }, - "library": { - "name": "test-ios-library", - "version": "1.0.7" - }, - "locale": "en-US", - "network": { - "bluetooth": false, - "carrier": "unavailable", - "cellular": false, - "wifi": true - }, - "os": { - "name": "iOS", - "version": "14.0" - }, - "screen": { - "density": 2, - "height": 320, - "width": 568 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "firstName": "Test", - "lastName": "Name", - "createdAt": "2020-09-30T19:11:00.337Z", - "email": "test_1@test.com", - "phone": "9876543210", - "key1": "value1" - }, - "userAgent": "unknown" - }, - "event": "Test Event 2", - "integrations": { - "All": true - }, - "messageId": "1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8", - "originalTimestamp": "2020-09-30T19:11:00.337Z", - "receivedAt": "2020-10-01T00:41:11.369+05:30", - "request_ip": "2405:201:8005:9856:7911:25e7:5603:5e18", - "sentAt": "2020-09-30T19:11:10.382Z", - "timestamp": "2020-10-01T00:41:01.324+05:30", - "type": "identify" - }, - "metadata": { - "jobId": 2 - }, - "destination": { - "Config": { - "apiKey": "intercomApiKey", - "appId": "9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0", - "collectContext": false - } - } - } -] diff --git a/test/__tests__/data/intercom_router_output.json b/test/__tests__/data/intercom_router_output.json deleted file mode 100644 index 494d15e97a..0000000000 --- a/test/__tests__/data/intercom_router_output.json +++ /dev/null @@ -1,99 +0,0 @@ -[ - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.intercom.io/users", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer intercomApiKey", - "Accept": "application/json", - "Intercom-Version": "1.4" - }, - "params": {}, - "body": { - "JSON": { - "email": "test_1@test.com", - "phone": "9876543210", - "name": "Test Name", - "signed_up_at": 1601493060, - "last_seen_user_agent": "unknown", - "update_last_request_at": true, - "user_id": "test_user_id_1", - "custom_attributes": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "key1": "value1" - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33" - }, - "metadata": [ - { - "jobId": 1 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "apiKey": "intercomApiKey", - "appId": "9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0", - "collectContext": false - } - } - }, - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.intercom.io/users", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer intercomApiKey", - "Accept": "application/json", - "Intercom-Version": "1.4" - }, - "params": {}, - "body": { - "JSON": { - "email": "test_1@test.com", - "phone": "9876543210", - "signed_up_at": 1601493060, - "name": "Test Name", - "last_seen_user_agent": "unknown", - "update_last_request_at": true, - "custom_attributes": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "key1": "value1" - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33" - }, - "metadata": [ - { - "jobId": 2 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "apiKey": "intercomApiKey", - "appId": "9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0", - "collectContext": false - } - } - } -] diff --git a/test/__tests__/data/marketo_input.json b/test/__tests__/data/marketo_input.json deleted file mode 100644 index 122525560e..0000000000 --- a/test/__tests__/data/marketo_input.json +++ /dev/null @@ -1,1157 +0,0 @@ -[ - { - "message": { - "channel": "sources", - "context": { - "externalId": [ - { - "id": "lynnanderson@smith.net", - "identifierType": "email", - "type": "MARKETO-new_user" - } - ], - "mappedToDestination": "true", - "sources": { - "batch_id": "f5f240d0-0acb-46e0-b043-57fb0aabbadd", - "job_id": "1zAj94bEy8komdqnYtSoDp0VmGs/Syncher", - "job_run_id": "c5tar6cqgmgmcjvupdhg", - "task_id": "tt_10_rows_check", - "task_run_id": "c5tar6cqgmgmcjvupdi0", - "version": "release.v1.6.8" - } - }, - "messageId": "2f052f7c-f694-4849-a7ed-a432f7ffa0a4", - "originalTimestamp": "2021-10-28T14:03:50.503Z", - "receivedAt": "2021-10-28T14:03:46.567Z", - "recordId": "8", - "request_ip": "10.1.94.92", - "rudderId": "c0f6843e-e3d6-4946-9752-fa339fbadef2", - "sentAt": "2021-10-28T14:03:50.503Z", - "timestamp": "2021-10-28T14:03:46.566Z", - "traits": { - "marketoGUID": "23", - "administrative_unit": "Minnesota", - "am_pm": "AM", - "boolean": true, - "firstname": "Jacqueline", - "pPower": "AM", - "userId": "Jacqueline" - }, - "type": "identify", - "userId": "lynnanderson@smith.net" - }, - "destination": { - "ID": "1zia9wKshXt80YksLmUdJnr7IHI", - "Name": "test_marketo", - "DestinationDefinition": { - "ID": "1iVQvTRMsPPyJzwol0ifH93QTQ6", - "Name": "MARKETO", - "DisplayName": "Marketo", - "Config": { - "destConfig": { - "defaultConfig": [] - }, - "excludeKeys": [], - "includeKeys": [], - "saveDestinationResponse": true, - "secretKeys": [], - "supportedMessageTypes": ["identify", "page", "screen", "track"], - "supportedSourceTypes": [ - "android", - "ios", - "web", - "unity", - "amp", - "cloud", - "warehouse", - "reactnative", - "flutter", - "cordova" - ], - "supportsVisualMapper": true, - "transformAt": "processor", - "transformAtV1": "processor" - }, - "ResponseRules": null - }, - "Config": { - "clientId": "marketo_client_id_success", - "clientSecret": "marketo_client_secret_success", - "accountId": "marketo_acct_id_success", - "rudderEventsMapping": [] - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": true - }, - "libraries": [], - "request": { - "query": {} - } - }, - { - "message": { - "anonymousId": "anon_id_success", - "channel": "mobile", - "context": { - "app": { - "build": "1", - "name": "TestAppName", - "namespace": "com.android.sample", - "version": "1.0" - }, - "device": { - "id": "anon_id_success", - "manufacturer": "Google", - "model": "Android SDK built for x86", - "name": "generic_x86", - "type": "android" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.1-beta.1" - }, - "locale": "en-US", - "network": { - "carrier": "Android", - "bluetooth": false, - "cellular": true, - "wifi": true - }, - "os": { - "name": "Android", - "version": "8.1.0" - }, - "screen": { - "density": 420, - "height": 1794, - "width": 1080 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "anon_id_success" - }, - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)" - }, - "event": "Product Clicked", - "integrations": { - "All": true - }, - "messageId": "id1", - "properties": { - "name": "Test Product" - }, - "originalTimestamp": "2020-12-17T21:00:59.176Z", - "type": "track", - "sentAt": "2020-03-12T09:05:03.421Z" - }, - "destination": { - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "Config": { - "accountId": "marketo_acct_id_success", - "clientId": "marketo_client_id_success", - "clientSecret": "marketo_client_secret_success", - "trackAnonymousEvents": true, - "customActivityPropertyMap": [ - { - "from": "name", - "to": "productName" - } - ], - "leadTraitMapping": [ - { - "from": "leadScore", - "to": "customLeadScore" - } - ], - "createIfNotExist": true, - "customActivityPrimaryKeyMap": [ - { - "from": "Product Clicked", - "to": "name" - } - ], - "customActivityEventMap": [ - { - "from": "Product Clicked", - "to": "100001" - } - ] - } - } - }, - { - "message": { - "anonymousId": "anon_id_success", - "channel": "mobile", - "context": { - "app": { - "build": "1", - "name": "TestAppName", - "namespace": "com.android.sample", - "version": "1.0" - }, - "device": { - "id": "anon_id_success", - "manufacturer": "Google", - "model": "Android SDK built for x86", - "name": "generic_x86", - "type": "android" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.1-beta.1" - }, - "locale": "en-US", - "network": { - "carrier": "Android", - "bluetooth": false, - "cellular": true, - "wifi": true - }, - "os": { - "name": "Android", - "version": "8.1.0" - }, - "screen": { - "density": 420, - "height": 1794, - "width": 1080 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "anon_id_success" - }, - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)" - }, - "event": "Product Clicked", - "integrations": { - "All": true - }, - "messageId": "id1", - "properties": { - "name": "Test Product", - "product_id": "prod_1" - }, - "originalTimestamp": "2020-12-17T21:00:59.176Z", - "type": "track", - "sentAt": "2020-12-17T21:00:59.176Z" - }, - "destination": { - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "Config": { - "accountId": "marketo_acct_id_success", - "clientId": "marketo_client_id_success", - "clientSecret": "marketo_client_secret_success", - "trackAnonymousEvents": true, - "customActivityPropertyMap": [ - { - "from": "name", - "to": "productName" - }, - { - "from": "product_id", - "to": "productId" - } - ], - "leadTraitMapping": [ - { - "from": "leadScore", - "to": "customLeadScore" - } - ], - "createIfNotExist": true, - "rudderEventsMapping": [ - { - "event": "Product Clicked", - "marketoPrimarykey": "name", - "marketoActivityId": "100001" - } - ] - } - } - }, - { - "message": { - "anonymousId": "anon_id_success", - "channel": "mobile", - "context": { - "app": { - "build": "1", - "name": "TestAppName", - "namespace": "com.android.sample", - "version": "1.0" - }, - "device": { - "id": "anon_id_success", - "manufacturer": "Google", - "model": "Android SDK built for x86", - "name": "generic_x86", - "type": "android" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.1-beta.1" - }, - "locale": "en-US", - "network": { - "carrier": "Android", - "bluetooth": false, - "cellular": true, - "wifi": true - }, - "os": { - "name": "Android", - "version": "8.1.0" - }, - "screen": { - "density": 420, - "height": 1794, - "width": 1080 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "anon_id_success" - }, - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)" - }, - "event": "Product Clicked", - "integrations": { - "All": true - }, - "messageId": "id1", - "properties": { - "name": "Test Product" - }, - "originalTimestamp": "2020-12-17T21:00:59.176Z", - "userId": "user_id_success", - "type": "track", - "sentAt": "2020-03-12T09:05:03.421Z" - }, - "destination": { - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "Config": { - "accountId": "marketo_acct_id_success", - "clientId": "marketo_client_id_success", - "clientSecret": "marketo_client_secret_success", - "trackAnonymousEvents": false, - "customActivityPropertyMap": [ - { - "from": "name", - "to": "productName" - } - ], - "leadTraitMapping": [ - { - "from": "leadScore", - "to": "customLeadScore" - } - ], - "createIfNotExist": true, - "rudderEventsMapping": [ - { - "event": "Product Clicked", - "marketoPrimarykey": "name", - "marketoActivityId": "100001" - } - ] - } - } - }, - { - "message": { - "anonymousId": "anon_id_success", - "channel": "mobile", - "context": { - "traits": { - "anonymousId": "anon_id_success" - }, - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)" - }, - "event": "Product Clicked", - "integrations": { - "All": true - }, - "messageId": "id1", - "properties": { - "name": "Test Product" - }, - "originalTimestamp": "2020-12-17T21:00:59.176Z", - "userId": "user_id_success", - "type": "track", - "sentAt": "2020-03-12T09:05:03.421Z" - }, - "destination": { - "ID": "1mMy5cqbtfuaKZv1IhVQKnBerte", - "Config": { - "accountId": "marketo_acct_id_token_failure", - "clientId": "marketo_acct_id_token_failure", - "clientSecret": "marketo_acct_id_token_failure", - "trackAnonymousEvents": false, - "customActivityPropertyMap": [ - { - "from": "name", - "to": "productName" - } - ], - "leadTraitMapping": [ - { - "from": "leadScore", - "to": "customLeadScore" - } - ], - "createIfNotExist": true, - "rudderEventsMapping": [ - { - "event": "Product Clicked", - "marketoPrimarykey": "name", - "marketoActivityId": "100001" - } - ] - } - } - }, - { - "message": { - "anonymousId": "anon_id_success", - "channel": "mobile", - "context": { - "app": { - "build": "1", - "name": "TestAppName", - "namespace": "com.android.sample", - "version": "1.0" - }, - "device": { - "id": "anon_id_success", - "manufacturer": "Google", - "model": "Android SDK built for x86", - "name": "generic_x86", - "type": "android" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.1-beta.1" - }, - "locale": "en-US", - "network": { - "carrier": "Android", - "bluetooth": false, - "cellular": true, - "wifi": true - }, - "os": { - "name": "Android", - "version": "8.1.0" - }, - "screen": { - "density": 420, - "height": 1794, - "width": 1080 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "anon_id_success" - }, - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)" - }, - "event": "Product Clicked", - "integrations": { - "All": true - }, - "messageId": "id1", - "properties": { - "name": "Test Product" - }, - "originalTimestamp": "2020-12-17T21:00:59.176Z", - "userId": "user_id_success", - "type": "track", - "sentAt": "2020-03-12T09:05:03.421Z" - }, - "destination": { - "ID": "1mMy5cqbtfuaKZv1IhVQKnBerte", - "Config": { - "accountId": "marketo_acct_id_failed", - "clientId": "marketo_client_id_success", - "clientSecret": "marketo_client_secret_success", - "trackAnonymousEvents": false, - "customActivityPropertyMap": [ - { - "from": "name", - "to": "productName" - } - ], - "leadTraitMapping": [ - { - "from": "leadScore", - "to": "customLeadScore" - } - ], - "createIfNotExist": true, - "rudderEventsMapping": [ - { - "event": "Product Clicked", - "marketoPrimarykey": "name", - "marketoActivityId": "100001" - } - ] - } - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "type": "identify", - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "00000000000000000000000000", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "Config": { - "accountId": "marketo_acct_id_success", - "clientId": "marketo_client_id_success", - "clientSecret": "marketo_client_secret_success", - "trackAnonymousEvents": true, - "customActivityPropertyMap": [ - { - "from": "name", - "to": "productName" - }, - { - "from": "product_id", - "to": "productId" - } - ], - "leadTraitMapping": [ - { - "from": "leadScore", - "to": "customLeadScore" - } - ], - "createIfNotExist": true, - "rudderEventsMapping": [ - { - "event": "Product Clicked", - "marketoPrimarykey": "name", - "marketoActivityId": "100001" - } - ] - } - } - }, - { - "message": { - "anonymousId": "anon_id_success", - "channel": "mobile", - "context": { - "app": { - "build": "1", - "name": "TestAppName", - "namespace": "com.android.sample", - "version": "1.0" - }, - "device": { - "id": "anon_id_success", - "manufacturer": "Google", - "model": "Android SDK built for x86", - "name": "generic_x86", - "type": "android" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.1-beta.1" - }, - "locale": "en-US", - "network": { - "carrier": "Android", - "bluetooth": false, - "cellular": true, - "wifi": true - }, - "os": { - "name": "Android", - "version": "8.1.0" - }, - "screen": { - "density": 420, - "height": 1794, - "width": 1080 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "anon_id_success" - }, - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)" - }, - "event": "Product Clicked", - "integrations": { - "All": true - }, - "messageId": "id1", - "properties": { - "name": "Test Product" - }, - "originalTimestamp": "2020-12-17T21:00:59.176Z", - "type": "track", - "sentAt": "2020-03-12T09:05:03.421Z" - }, - "destination": { - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "Config": { - "accountId": "marketo_acct_id_success", - "clientId": "marketo_client_id_success", - "clientSecret": "marketo_client_secret_success", - "trackAnonymousEvents": false, - "customActivityPropertyMap": [ - { - "from": "name", - "to": "productName" - } - ], - "leadTraitMapping": [ - { - "from": "leadScore", - "to": "customLeadScore" - } - ], - "createIfNotExist": true, - "rudderEventsMapping": [ - { - "event": "Product Clicked", - "marketoPrimarykey": "name", - "marketoActivityId": "100001" - } - ] - } - } - }, - { - "message": { - "anonymousId": "anon_id_success", - "channel": "mobile", - "context": { - "app": { - "build": "1", - "name": "TestAppName", - "namespace": "com.android.sample", - "version": "1.0" - }, - "device": { - "id": "anon_id_success", - "manufacturer": "Google", - "model": "Android SDK built for x86", - "name": "generic_x86", - "type": "android" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.1-beta.1" - }, - "locale": "en-US", - "network": { - "carrier": "Android", - "bluetooth": false, - "cellular": true, - "wifi": true - }, - "os": { - "name": "Android", - "version": "8.1.0" - }, - "screen": { - "density": 420, - "height": 1794, - "width": 1080 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "anon_id_success" - }, - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)" - }, - "event": "Product Purchased", - "integrations": { - "All": true - }, - "messageId": "id1", - "properties": { - "name": "Test Product" - }, - "originalTimestamp": "2020-12-17T21:00:59.176Z", - "type": "track", - "sentAt": "2020-03-12T09:05:03.421Z" - }, - "destination": { - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "Config": { - "accountId": "marketo_acct_id_success", - "clientId": "marketo_client_id_success", - "clientSecret": "marketo_client_secret_success", - "trackAnonymousEvents": true, - "customActivityPropertyMap": [ - { - "from": "name", - "to": "productName" - } - ], - "leadTraitMapping": [ - { - "from": "leadScore", - "to": "customLeadScore" - } - ], - "createIfNotExist": true, - "rudderEventsMapping": [ - { - "event": "Product Clicked", - "marketoPrimarykey": "name", - "marketoActivityId": "100001" - } - ] - } - } - }, - { - "message": { - "anonymousId": "anon_id_success", - "channel": "mobile", - "context": { - "app": { - "build": "1", - "name": "TestAppName", - "namespace": "com.android.sample", - "version": "1.0" - }, - "device": { - "id": "anon_id_success", - "manufacturer": "Google", - "model": "Android SDK built for x86", - "name": "generic_x86", - "type": "android" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.1-beta.1" - }, - "locale": "en-US", - "network": { - "carrier": "Android", - "bluetooth": false, - "cellular": true, - "wifi": true - }, - "os": { - "name": "Android", - "version": "8.1.0" - }, - "screen": { - "density": 420, - "height": 1794, - "width": 1080 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "anon_id_success" - }, - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)" - }, - "event": "Product Clicked", - "integrations": { - "All": true - }, - "messageId": "id1", - "properties": { - "product_name": "Test Product" - }, - "originalTimestamp": "2020-12-17T21:00:59.176Z", - "type": "track", - "sentAt": "2020-03-12T09:05:03.421Z" - }, - "destination": { - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "Config": { - "accountId": "marketo_acct_id_success", - "clientId": "marketo_client_id_success", - "clientSecret": "marketo_client_secret_success", - "trackAnonymousEvents": true, - "customActivityPropertyMap": [ - { - "from": "name", - "to": "productName" - } - ], - "leadTraitMapping": [ - { - "from": "leadScore", - "to": "customLeadScore" - } - ], - "createIfNotExist": true, - "rudderEventsMapping": [ - { - "event": "Product Clicked", - "marketoPrimarykey": "name", - "marketoActivityId": "100001" - } - ] - } - } - }, - { - "message": { - "anonymousId": "anon_id_success", - "channel": "mobile", - "context": { - "app": { - "build": "1", - "name": "TestAppName", - "namespace": "com.android.sample", - "version": "1.0" - }, - "device": { - "id": "anon_id_success", - "manufacturer": "Google", - "model": "Android SDK built for x86", - "name": "generic_x86", - "type": "android" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.1-beta.1" - }, - "locale": "en-US", - "network": { - "carrier": "Android", - "bluetooth": false, - "cellular": true, - "wifi": true - }, - "os": { - "name": "Android", - "version": "8.1.0" - }, - "screen": { - "density": 420, - "height": 1794, - "width": 1080 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "anon_id_success" - }, - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)" - }, - "event": "Product Clicked", - "integrations": { - "All": true - }, - "messageId": "id1", - "properties": { - "product_name": "Test Product" - }, - "originalTimestamp": "2020-12-17T21:00:59.176Z", - "sentAt": "2020-03-12T09:05:03.421Z" - }, - "destination": { - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "Config": { - "accountId": "marketo_acct_id_success", - "clientId": "marketo_client_id_success", - "clientSecret": "marketo_client_secret_success", - "trackAnonymousEvents": true, - "customActivityPropertyMap": [ - { - "from": "name", - "to": "productName" - } - ], - "leadTraitMapping": [ - { - "from": "leadScore", - "to": "customLeadScore" - } - ], - "createIfNotExist": true, - "rudderEventsMapping": [ - { - "event": "Product Clicked", - "marketoPrimarykey": "name", - "marketoActivityId": "100001" - } - ] - } - } - }, - { - "message": { - "anonymousId": "anon_id_success", - "channel": "mobile", - "context": { - "app": { - "build": "1", - "name": "TestAppName", - "namespace": "com.android.sample", - "version": "1.0" - }, - "device": { - "id": "anon_id_success", - "manufacturer": "Google", - "model": "Android SDK built for x86", - "name": "generic_x86", - "type": "android" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.1-beta.1" - }, - "locale": "en-US", - "network": { - "carrier": "Android", - "bluetooth": false, - "cellular": true, - "wifi": true - }, - "os": { - "name": "Android", - "version": "8.1.0" - }, - "screen": { - "density": 420, - "height": 1794, - "width": 1080 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "anon_id_success" - }, - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)" - }, - "event": "Product Clicked", - "integrations": { - "All": true - }, - "messageId": "id1", - "properties": { - "product_name": "Test Product" - }, - "originalTimestamp": "2020-12-17T21:00:59.176Z", - "type": "screen", - "sentAt": "2020-03-12T09:05:03.421Z" - }, - "destination": { - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "Config": { - "accountId": "marketo_acct_id_success", - "clientId": "marketo_client_id_success", - "clientSecret": "marketo_client_secret_success", - "trackAnonymousEvents": true, - "customActivityPropertyMap": [ - { - "from": "name", - "to": "productName" - } - ], - "leadTraitMapping": [ - { - "from": "leadScore", - "to": "customLeadScore" - } - ], - "createIfNotExist": true, - "rudderEventsMapping": [ - { - "event": "Product Clicked", - "marketoPrimarykey": "name", - "marketoActivityId": "100001" - } - ] - } - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "type": "identify", - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "00000000000000000000000000", - "integrations": { - "All": true - }, - "traits": { - "score": "0.5" - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "Config": { - "accountId": "marketo_acct_id_success", - "clientId": "marketo_client_id_success", - "clientSecret": "marketo_client_secret_success", - "trackAnonymousEvents": true, - "customActivityPropertyMap": [ - { - "from": "name", - "to": "productName" - }, - { - "from": "product_id", - "to": "productId" - } - ], - "leadTraitMapping": [ - { - "from": "score", - "to": "customLeadScore" - } - ], - "rudderEventsMapping": [ - { - "event": "Product Clicked", - "marketoPrimarykey": "name", - "marketoActivityId": "100001" - } - ] - } - } - }, - { - "message": { - "channel": "sources", - "context": { - "externalId": [ - { - "id": "lynnanderson@smith.net", - "identifierType": "email", - "type": "MARKETO-new_user" - } - ], - "traits": { - "marketoGUID": "23", - "administrative_unit": "Minnesota", - "am_pm": "AM", - "boolean": true, - "firstname": "Jacqueline", - "pPower": "AM", - "userId": "Jacqueline" - }, - "sources": { - "batch_id": "f5f240d0-0acb-46e0-b043-57fb0aabbadd", - "job_id": "1zAj94bEy8komdqnYtSoDp0VmGs/Syncher", - "job_run_id": "c5tar6cqgmgmcjvupdhg", - "task_id": "tt_10_rows_check", - "task_run_id": "c5tar6cqgmgmcjvupdi0", - "version": "release.v1.6.8" - } - }, - "messageId": "2f052f7c-f694-4849-a7ed-a432f7ffa0a4", - "originalTimestamp": "2021-10-28T14:03:50.503Z", - "receivedAt": "2021-10-28T14:03:46.567Z", - "recordId": "8", - "request_ip": "10.1.94.92", - "rudderId": "c0f6843e-e3d6-4946-9752-fa339fbadef2", - "sentAt": "2021-10-28T14:03:50.503Z", - "timestamp": "2021-10-28T14:03:46.566Z", - "type": "identify", - "userId": "dummyMail@dummyDomain.com" - }, - "destination": { - "ID": "1zia9wKshXt80YksLmUdJnr7IHI", - "Name": "test_marketo", - "DestinationDefinition": { - "ID": "1iVQvTRMsPPyJzwol0ifH93QTQ6", - "Name": "MARKETO", - "DisplayName": "Marketo", - "Config": { - "destConfig": { - "defaultConfig": [] - }, - "excludeKeys": [], - "includeKeys": [], - "saveDestinationResponse": true, - "secretKeys": [], - "supportedMessageTypes": ["identify", "page", "screen", "track"], - "supportedSourceTypes": [ - "android", - "ios", - "web", - "unity", - "amp", - "cloud", - "warehouse", - "reactnative", - "flutter", - "cordova" - ], - "supportsVisualMapper": true, - "transformAt": "processor", - "transformAtV1": "processor" - }, - "ResponseRules": null - }, - "Config": { - "clientId": "marketo_client_id_success", - "clientSecret": "marketo_client_secret_success", - "accountId": "marketo_acct_id_success", - "rudderEventsMapping": [] - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": true - }, - "libraries": [], - "request": { - "query": {} - } - } -] diff --git a/test/__tests__/data/marketo_output.json b/test/__tests__/data/marketo_output.json deleted file mode 100644 index 32d31ccaf8..0000000000 --- a/test/__tests__/data/marketo_output.json +++ /dev/null @@ -1,204 +0,0 @@ -[ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://marketo_acct_id_success.mktorest.com/rest/v1/customobjects/new_user.json", - "headers": { - "Authorization": "Bearer access_token_success", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "action": "createOrUpdate", - "dedupeBy": "dedupeFields", - "input": [ - { - "administrative_unit": "Minnesota", - "am_pm": "AM", - "boolean": true, - "firstname": "Jacqueline", - "pPower": "AM", - "userId": "Jacqueline", - "email": "lynnanderson@smith.net" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://marketo_acct_id_success.mktorest.com/rest/v1/activities/external.json", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer access_token_success" - }, - "params": {}, - "body": { - "JSON": { - "input": [ - { - "activityDate": "2020-12-17T21:00:59.176Z", - "activityTypeId": 100001, - "attributes": [], - "leadId": 4, - "primaryAttributeValue": "Test Product" - } - ] - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://marketo_acct_id_success.mktorest.com/rest/v1/activities/external.json", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer access_token_success" - }, - "params": {}, - "body": { - "JSON": { - "input": [ - { - "activityDate": "2020-12-17T21:00:59.176Z", - "activityTypeId": 100001, - "attributes": [ - { - "name": "productId", - "value": "prod_1" - } - ], - "leadId": 4, - "primaryAttributeValue": "Test Product" - } - ] - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://marketo_acct_id_success.mktorest.com/rest/v1/activities/external.json", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer access_token_success" - }, - "params": {}, - "body": { - "JSON": { - "input": [ - { - "activityDate": "2020-12-17T21:00:59.176Z", - "activityTypeId": 100001, - "attributes": [], - "leadId": 4, - "primaryAttributeValue": "Test Product" - } - ] - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - { - "statusCode": 500, - "error": "Request Failed for marketo, Access Token Expired (Retryable).During fetching auth token" - }, - { - "statusCode": 500, - "error": "Request Failed for marketo, Access Token Expired (Retryable).During fetching auth token" - }, - { - "statusCode": 400, - "error": "Invalid traits value for Marketo" - }, - { - "statusCode": 400, - "error": "Anonymous event tracking is turned off and invalid userId" - }, - { - "statusCode": 400, - "error": "Event is not mapped to Custom Activity" - }, - { - "statusCode": 400, - "error": "Primary Key value is invalid for the event" - }, - { - "statusCode": 400, - "error": "Message Type is not present. Aborting message." - }, - { - "statusCode": 400, - "error": "Message type not supported" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://marketo_acct_id_success.mktorest.com/rest/v1/leads.json", - "headers": { - "Authorization": "Bearer access_token_success", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "action": "createOrUpdate", - "input": [ - { - "customLeadScore": "0.5", - "id": 4 - } - ], - "lookupField": "id" - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://marketo_acct_id_success.mktorest.com/rest/v1/leads.json", - "headers": { - "Authorization": "Bearer access_token_success", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "action": "createOrUpdate", - "input": [{ "id": 4, "userId": "dummyMail@dummyDomain.com" }], - "lookupField": "id" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } -] diff --git a/test/__tests__/data/marketo_router_input.json b/test/__tests__/data/marketo_router_input.json deleted file mode 100644 index a7a40a221a..0000000000 --- a/test/__tests__/data/marketo_router_input.json +++ /dev/null @@ -1,996 +0,0 @@ -[ - { - "message": { - "anonymousId": "anon_id_success", - "channel": "mobile", - "context": { - "app": { - "build": "1", - "name": "TestAppName", - "namespace": "com.android.sample", - "version": "1.0" - }, - "device": { - "id": "anon_id_success", - "manufacturer": "Google", - "model": "Android SDK built for x86", - "name": "generic_x86", - "type": "android" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.1-beta.1" - }, - "locale": "en-US", - "network": { - "carrier": "Android", - "bluetooth": false, - "cellular": true, - "wifi": true - }, - "os": { - "name": "Android", - "version": "8.1.0" - }, - "screen": { - "density": 420, - "height": 1794, - "width": 1080 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "anon_id_success" - }, - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)" - }, - "event": "Product Clicked", - "integrations": { - "All": true - }, - "messageId": "id1", - "properties": { - "name": "Test Product" - }, - "originalTimestamp": "2020-12-17T21:00:59.176Z", - "type": "track", - "sentAt": "2020-03-12T09:05:03.421Z" - }, - "metadata": { - "jobId": 1 - }, - "destination": { - "Config": { - "accountId": "marketo_acct_id_success", - "clientId": "marketo_client_id_success", - "clientSecret": "marketo_client_secret_success", - "trackAnonymousEvents": true, - "customActivityPropertyMap": [ - { - "from": "name", - "to": "productName" - } - ], - "leadTraitMapping": [ - { - "from": "leadScore", - "to": "customLeadScore" - } - ], - "rudderEventsMapping": [ - { - "event": "Product Clicked", - "marketoPrimarykey": "name", - "marketoActivityId": "100001" - } - ] - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Marketo", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "config": { - "destConfig": { - "defaultConfig": [ - "accountId", - "clientId", - "clientSecret", - "trackAnonymousEvents", - "rudderEventsMapping", - "customActivityPropertyMap", - "leadTraitMapping" - ] - }, - "secretKeys": ["clientSecret"], - "excludeKeys": [], - "includeKeys": [], - "routerTransform": true, - "supportedSourceTypes": ["android", "ios", "web", "unity", "amp", "cloud", "reactnative"] - }, - "responseRules": { - "responseType": "JSON", - "rules": { - "retryable": [ - { - "success": "false", - "errors.0.code": 600 - }, - { - "success": "false", - "errors.0.code": 601 - }, - { - "success": "false", - "errors.0.code": 602 - }, - { - "success": "false", - "errors.0.code": 604 - }, - { - "success": "false", - "errors.0.code": 606 - }, - { - "success": "false", - "errors.0.code": 607 - }, - { - "success": "false", - "errors.0.code": 608 - }, - { - "success": "false", - "errors.0.code": 611 - } - ], - "abortable": [ - { - "success": "false", - "errors.0.code": 603 - }, - { - "success": "false", - "errors.0.code": 605 - }, - { - "success": "false", - "errors.0.code": 609 - }, - { - "success": "false", - "errors.0.code": 610 - } - ] - } - }, - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "MARKETO", - "displayName": "Marketo", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - }, - { - "message": { - "anonymousId": "anon_id_success", - "channel": "mobile", - "context": { - "app": { - "build": "1", - "name": "TestAppName", - "namespace": "com.android.sample", - "version": "1.0" - }, - "device": { - "id": "anon_id_success", - "manufacturer": "Google", - "model": "Android SDK built for x86", - "name": "generic_x86", - "type": "android" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.1-beta.1" - }, - "locale": "en-US", - "network": { - "carrier": "Android", - "bluetooth": false, - "cellular": true, - "wifi": true - }, - "os": { - "name": "Android", - "version": "8.1.0" - }, - "screen": { - "density": 420, - "height": 1794, - "width": 1080 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "anon_id_success" - }, - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)" - }, - "event": "Product Clicked", - "integrations": { - "All": true - }, - "messageId": "id1", - "properties": { - "name": "Test Product", - "product_id": "prod_1" - }, - "originalTimestamp": "2020-12-17T21:00:59.176Z", - "type": "track", - "sentAt": "2020-12-17T21:00:59.176Z" - }, - "metadata": { - "jobId": 2 - }, - "destination": { - "Config": { - "accountId": "marketo_acct_id_success", - "clientId": "marketo_client_id_success", - "clientSecret": "marketo_client_secret_success", - "trackAnonymousEvents": true, - "customActivityPropertyMap": [ - { - "from": "name", - "to": "productName" - } - ], - "leadTraitMapping": [ - { - "from": "leadScore", - "to": "customLeadScore" - } - ], - "rudderEventsMapping": [ - { - "event": "Product Clicked", - "marketoPrimarykey": "name", - "marketoActivityId": "100001" - } - ] - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Marketo", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "config": { - "destConfig": { - "defaultConfig": [ - "accountId", - "clientId", - "clientSecret", - "trackAnonymousEvents", - "rudderEventsMapping", - "customActivityPropertyMap", - "leadTraitMapping" - ] - }, - "secretKeys": ["clientSecret"], - "excludeKeys": [], - "includeKeys": [], - "routerTransform": true, - "supportedSourceTypes": ["android", "ios", "web", "unity", "amp", "cloud", "reactnative"] - }, - "responseRules": { - "responseType": "JSON", - "rules": { - "retryable": [ - { - "success": "false", - "errors.0.code": 600 - }, - { - "success": "false", - "errors.0.code": 601 - }, - { - "success": "false", - "errors.0.code": 602 - }, - { - "success": "false", - "errors.0.code": 604 - }, - { - "success": "false", - "errors.0.code": 606 - }, - { - "success": "false", - "errors.0.code": 607 - }, - { - "success": "false", - "errors.0.code": 608 - }, - { - "success": "false", - "errors.0.code": 611 - } - ], - "abortable": [ - { - "success": "false", - "errors.0.code": 603 - }, - { - "success": "false", - "errors.0.code": 605 - }, - { - "success": "false", - "errors.0.code": 609 - }, - { - "success": "false", - "errors.0.code": 610 - } - ] - } - }, - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "MARKETO", - "displayName": "Marketo", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - }, - { - "message": { - "type": "identify", - "sentAt": "2022-09-19T10:34:02.002Z", - "userId": "e17c5a5e-5e2f-430b-b497-fe3f1ea3a704", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "2.12.1", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "https://accounts.app.t2.broken.com/home", - "path": "/home", - "title": "Home", - "search": "", - "tab_url": "https://accounts.app.t2.broken.com/home", - "referrer": "https://ts50-cvii.core.broken.org/", - "initial_referrer": "https://ts50-cvii.core.broken.org/", - "referring_domain": "ts50-cvii.core.broken.org", - "initial_referring_domain": "ts50-cvii.core.broken.org" - }, - "locale": "en-IN", - "screen": { - "width": 1728, - "height": 1117, - "density": 2, - "innerWidth": 1728, - "innerHeight": 969 - }, - "traits": { - "name": "AM", - "email": "0c7b8b80-9c43-4f8e-b2d2-5e2448a25040@j.mail", - "lastName": "M", - "firstName": "A", - "accountName": "MACDEV", - "billingName": "g g", - "companyName": "macDev", - "currentTier": "Webinar Pro 250", - "billingCycle": "Annually", - "lastBillingDate": "2022-06-29T09:40:42.000Z", - "nextBillingDate": "2023-09-09T04:00:00.000Z", - "subscriptionType": "Webinar Pro 250", - "subscriptionStatus": "ACTIVE", - "lastWebinarEventDate": "2022-09-15T20:00:00.000Z", - "nextWebinarEventDate": "2022-09-16T06:15:00.000Z" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "2.12.1" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36" - }, - "rudderId": "73dc83ef-587f-4077-90f3-c36083e64019", - "messageId": "1663583642000200-e3f31c4c-6361-4f99-b643-7755303a6007", - "timestamp": "2022-09-19T10:34:02.954Z", - "receivedAt": "2022-09-19T10:34:02.956Z", - "request_ip": "11.105.44.120", - "anonymousId": "0c7b8b80-9c43-4f8e-b2d2-5e2448a25040", - "integrations": { - "All": true - }, - "originalTimestamp": "2022-09-19T10:34:02.000Z" - }, - "destination": { - "Config": { - "accountId": "valid_account_broken_event", - "clientId": "504300cd-76b2-a7l4-bhle-90a07420nx73", - "clientSecret": "3l3gJpzRsZagD6gu7tnTeKXz0bomLGnd", - "trackAnonymousEvents": false, - "createIfNotExist": true, - "rudderEventsMapping": [ - { - "event": "acq_signup_completed", - "marketoActivityId": "100026" - }, - { - "event": "act_createwebinarform_submit", - "marketoActivityId": "100025" - }, - { - "event": "act_presentation_style", - "marketoActivityId": "100025" - }, - { - "event": "act_webinar_view", - "marketoActivityId": "100025" - }, - { - "event": "act_webinar_join", - "marketoActivityId": "100025" - }, - { - "event": "act_presentation_addteammember", - "marketoActivityId": "100025" - }, - { - "event": "act_engagement_discussions_savediscussion", - "marketoActivityId": "100025" - }, - { - "event": "act_engagement_networking_savetime", - "marketoActivityId": "100025" - } - ] - }, - "destinationDefinition": { - "config": { - "destConfig": { - "defaultConfig": [ - "accountId", - "clientId", - "clientSecret", - "trackAnonymousEvents", - "rudderEventsMapping", - "customActivityPropertyMap", - "leadTraitMapping" - ] - }, - "secretKeys": ["clientSecret"], - "excludeKeys": [], - "includeKeys": [], - "routerTransform": true, - "supportedSourceTypes": ["android", "ios", "web", "unity", "amp", "cloud", "reactnative"] - }, - "responseRules": { - "responseType": "JSON", - "rules": { - "retryable": [ - { - "success": "false", - "errors.0.code": 600 - }, - { - "success": "false", - "errors.0.code": 601 - }, - { - "success": "false", - "errors.0.code": 602 - }, - { - "success": "false", - "errors.0.code": 604 - }, - { - "success": "false", - "errors.0.code": 606 - }, - { - "success": "false", - "errors.0.code": 607 - }, - { - "success": "false", - "errors.0.code": 608 - }, - { - "success": "false", - "errors.0.code": 611 - } - ], - "abortable": [ - { - "success": "false", - "errors.0.code": 603 - }, - { - "success": "false", - "errors.0.code": 605 - }, - { - "success": "false", - "errors.0.code": 609 - }, - { - "success": "false", - "errors.0.code": 610 - } - ] - } - }, - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "MARKETO", - "displayName": "Marketo", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVke", - "name": "Marketo", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmMd", - "deleted": false, - "createdAt": "2022-02-10T08:39:32.005Z", - "updatedAt": "2022-09-03T16:22:31.374Z", - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - }, - "metadata": { - "jobId": 3 - } - }, - { - "message": { - "type": "identify", - "sentAt": "2022-09-19T10:34:02.002Z", - "userId": "e17c5a5e-5e2f-430b-b497-fe3f1ea3a704", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "2.12.1", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "https://accounts.app.t2.broken.com/home", - "path": "/home", - "title": "Home", - "search": "", - "tab_url": "https://accounts.app.t2.broken.com/home", - "referrer": "https://ts50-cvii.core.broken.org/", - "initial_referrer": "https://ts50-cvii.core.broken.org/", - "referring_domain": "ts50-cvii.core.broken.org", - "initial_referring_domain": "ts50-cvii.core.broken.org" - }, - "locale": "en-IN", - "screen": { - "width": 1728, - "height": 1117, - "density": 2, - "innerWidth": 1728, - "innerHeight": 969 - }, - "traits": { - "name": "AM", - "email": "0c7b8b80-9c43-4f8e-b2d2-5e2448a25040@j.mail", - "lastName": "M", - "firstName": "A", - "accountName": "MACDEV", - "billingName": "g g", - "companyName": "macDev", - "currentTier": "Webinar Pro 250", - "billingCycle": "Annually", - "lastBillingDate": "2022-06-29T09:40:42.000Z", - "nextBillingDate": "2023-09-09T04:00:00.000Z", - "subscriptionType": "Webinar Pro 250", - "subscriptionStatus": "ACTIVE", - "lastWebinarEventDate": "2022-09-15T20:00:00.000Z", - "nextWebinarEventDate": "2022-09-16T06:15:00.000Z" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "2.12.1" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36" - }, - "rudderId": "73dc83ef-587f-4077-90f3-c36083e64019", - "messageId": "1663583642000200-e3f31c4c-6361-4f99-b643-7755303a6007", - "timestamp": "2022-09-19T10:34:02.954Z", - "receivedAt": "2022-09-19T10:34:02.956Z", - "request_ip": "11.105.44.120", - "anonymousId": "0c7b8b80-9c43-4f8e-b2d2-5e2448a25040", - "integrations": { - "All": true - }, - "originalTimestamp": "2022-09-19T10:34:02.000Z" - }, - "destination": { - "Config": { - "accountId": "unhandled_status_code", - "clientId": "504300cd-76b2-a7l4-bhle-90a07420nx73", - "clientSecret": "3l3gJpzRsZagD6gu7tnTeKXz0bomLGnd", - "trackAnonymousEvents": false, - "createIfNotExist": true, - "rudderEventsMapping": [ - { - "event": "acq_signup_completed", - "marketoActivityId": "100026" - }, - { - "event": "act_createwebinarform_submit", - "marketoActivityId": "100025" - }, - { - "event": "act_presentation_style", - "marketoActivityId": "100025" - }, - { - "event": "act_webinar_view", - "marketoActivityId": "100025" - }, - { - "event": "act_webinar_join", - "marketoActivityId": "100025" - }, - { - "event": "act_presentation_addteammember", - "marketoActivityId": "100025" - }, - { - "event": "act_engagement_discussions_savediscussion", - "marketoActivityId": "100025" - }, - { - "event": "act_engagement_networking_savetime", - "marketoActivityId": "100025" - } - ] - }, - "destinationDefinition": { - "config": { - "destConfig": { - "defaultConfig": [ - "accountId", - "clientId", - "clientSecret", - "trackAnonymousEvents", - "rudderEventsMapping", - "customActivityPropertyMap", - "leadTraitMapping" - ] - }, - "secretKeys": ["clientSecret"], - "excludeKeys": [], - "includeKeys": [], - "routerTransform": true, - "supportedSourceTypes": ["android", "ios", "web", "unity", "amp", "cloud", "reactnative"] - }, - "responseRules": { - "responseType": "JSON", - "rules": { - "retryable": [ - { - "success": "false", - "errors.0.code": 600 - }, - { - "success": "false", - "errors.0.code": 601 - }, - { - "success": "false", - "errors.0.code": 602 - }, - { - "success": "false", - "errors.0.code": 604 - }, - { - "success": "false", - "errors.0.code": 606 - }, - { - "success": "false", - "errors.0.code": 607 - }, - { - "success": "false", - "errors.0.code": 608 - }, - { - "success": "false", - "errors.0.code": 611 - } - ], - "abortable": [ - { - "success": "false", - "errors.0.code": 603 - }, - { - "success": "false", - "errors.0.code": 605 - }, - { - "success": "false", - "errors.0.code": 609 - }, - { - "success": "false", - "errors.0.code": 610 - } - ] - } - }, - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "MARKETO", - "displayName": "Marketo", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVke", - "name": "Marketo", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmMd", - "deleted": false, - "createdAt": "2022-02-10T08:39:32.005Z", - "updatedAt": "2022-09-03T16:22:31.374Z", - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - }, - "metadata": { - "jobId": 4 - } - }, - { - "message": { - "type": "identify", - "sentAt": "2022-09-19T10:34:02.002Z", - "userId": "e17c5a5e-5e2f-430b-b497-fe3f1ea3a704", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "2.12.1", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "https://accounts.app.t2.broken.com/home", - "path": "/home", - "title": "Home", - "search": "", - "tab_url": "https://accounts.app.t2.broken.com/home", - "referrer": "https://ts50-cvii.core.broken.org/", - "initial_referrer": "https://ts50-cvii.core.broken.org/", - "referring_domain": "ts50-cvii.core.broken.org", - "initial_referring_domain": "ts50-cvii.core.broken.org" - }, - "locale": "en-IN", - "screen": { - "width": 1728, - "height": 1117, - "density": 2, - "innerWidth": 1728, - "innerHeight": 969 - }, - "traits": { - "name": "AM", - "email": "0c7b8b80-9c43-4f8e-b2d2-5e2448a25040@j.mail", - "lastName": "M", - "firstName": "A", - "accountName": "MACDEV", - "billingName": "g g", - "companyName": "macDev", - "currentTier": "Webinar Pro 250", - "billingCycle": "Annually", - "lastBillingDate": "2022-06-29T09:40:42.000Z", - "nextBillingDate": "2023-09-09T04:00:00.000Z", - "subscriptionType": "Webinar Pro 250", - "subscriptionStatus": "ACTIVE", - "lastWebinarEventDate": "2022-09-15T20:00:00.000Z", - "nextWebinarEventDate": "2022-09-16T06:15:00.000Z" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "2.12.1" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36" - }, - "rudderId": "73dc83ef-587f-4077-90f3-c36083e64019", - "messageId": "1663583642000200-e3f31c4c-6361-4f99-b643-7755303a6007", - "timestamp": "2022-09-19T10:34:02.954Z", - "receivedAt": "2022-09-19T10:34:02.956Z", - "request_ip": "11.105.44.120", - "anonymousId": "0c7b8b80-9c43-4f8e-b2d2-5e2448a25040", - "integrations": { - "All": true - }, - "originalTimestamp": "2022-09-19T10:34:02.000Z" - }, - "destination": { - "Config": { - "accountId": "successful_identify_transformation", - "clientId": "504300cd-76b2-a7l4-bhle-90a07420nx73", - "clientSecret": "3l3gJpzRsZagD6gu7tnTeKXz0bomLGnd", - "trackAnonymousEvents": false, - "createIfNotExist": true, - "rudderEventsMapping": [ - { - "event": "acq_signup_completed", - "marketoActivityId": "100026" - }, - { - "event": "act_createwebinarform_submit", - "marketoActivityId": "100025" - }, - { - "event": "act_presentation_style", - "marketoActivityId": "100025" - }, - { - "event": "act_webinar_view", - "marketoActivityId": "100025" - }, - { - "event": "act_webinar_join", - "marketoActivityId": "100025" - }, - { - "event": "act_presentation_addteammember", - "marketoActivityId": "100025" - }, - { - "event": "act_engagement_discussions_savediscussion", - "marketoActivityId": "100025" - }, - { - "event": "act_engagement_networking_savetime", - "marketoActivityId": "100025" - } - ] - }, - "destinationDefinition": { - "config": { - "destConfig": { - "defaultConfig": [ - "accountId", - "clientId", - "clientSecret", - "trackAnonymousEvents", - "rudderEventsMapping", - "customActivityPropertyMap", - "leadTraitMapping" - ] - }, - "secretKeys": ["clientSecret"], - "excludeKeys": [], - "includeKeys": [], - "routerTransform": true, - "supportedSourceTypes": ["android", "ios", "web", "unity", "amp", "cloud", "reactnative"] - }, - "responseRules": { - "responseType": "JSON", - "rules": { - "retryable": [ - { - "success": "false", - "errors.0.code": 600 - }, - { - "success": "false", - "errors.0.code": 601 - }, - { - "success": "false", - "errors.0.code": 602 - }, - { - "success": "false", - "errors.0.code": 604 - }, - { - "success": "false", - "errors.0.code": 606 - }, - { - "success": "false", - "errors.0.code": 607 - }, - { - "success": "false", - "errors.0.code": 608 - }, - { - "success": "false", - "errors.0.code": 611 - } - ], - "abortable": [ - { - "success": "false", - "errors.0.code": 603 - }, - { - "success": "false", - "errors.0.code": 605 - }, - { - "success": "false", - "errors.0.code": 609 - }, - { - "success": "false", - "errors.0.code": 610 - } - ] - } - }, - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "MARKETO", - "displayName": "Marketo", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVke", - "name": "Marketo", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmMd", - "deleted": false, - "createdAt": "2022-02-10T08:39:32.005Z", - "updatedAt": "2022-09-03T16:22:31.374Z", - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - }, - "metadata": { - "jobId": 5 - } - } -] diff --git a/test/__tests__/data/marketo_router_metadata_input.json b/test/__tests__/data/marketo_router_metadata_input.json deleted file mode 100644 index b1e3a26f69..0000000000 --- a/test/__tests__/data/marketo_router_metadata_input.json +++ /dev/null @@ -1,163 +0,0 @@ -{ - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://marketo_acct_id_success.mktorest.com/rest/v1/activities/external.json", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer access_token_success" - }, - "params": {}, - "body": { - "JSON": { - "input": [ - { - "activityDate": "2020-12-17T21:00:59.176Z", - "activityTypeId": 100001, - "attributes": [], - "leadId": 4, - "primaryAttributeValue": "Test Product" - } - ] - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "jobId": 1 - }, - { - "jobId": 1 - }, - { - "jobId": 1 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "accountId": "marketo_acct_id_success", - "clientId": "marketo_client_id_success", - "clientSecret": "marketo_client_secret_success", - "trackAnonymousEvents": true, - "customActivityPropertyMap": [ - { - "from": "name", - "to": "productName" - } - ], - "rudderEventsMapping": [ - { - "event": "Product Clicked", - "marketoPrimarykey": "name", - "marketoActivityId": "100001" - } - ], - "leadTraitMapping": [ - { - "from": "leadScore", - "to": "customLeadScore" - } - ] - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Marketo", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "config": { - "destConfig": { - "defaultConfig": [ - "accountId", - "clientId", - "clientSecret", - "trackAnonymousEvents", - "customActivityPropertyMap", - "rudderEventsMapping", - "leadTraitMapping" - ] - }, - "secretKeys": ["clientSecret"], - "excludeKeys": [], - "includeKeys": [], - "routerTransform": true, - "supportedSourceTypes": ["android", "ios", "web", "unity", "amp", "cloud", "reactnative"] - }, - "responseRules": { - "responseType": "JSON", - "rules": { - "retryable": [ - { - "success": "false", - "errors.0.code": 600 - }, - { - "success": "false", - "errors.0.code": 601 - }, - { - "success": "false", - "errors.0.code": 602 - }, - { - "success": "false", - "errors.0.code": 604 - }, - { - "success": "false", - "errors.0.code": 606 - }, - { - "success": "false", - "errors.0.code": 607 - }, - { - "success": "false", - "errors.0.code": 608 - }, - { - "success": "false", - "errors.0.code": 611 - } - ], - "abortable": [ - { - "success": "false", - "errors.0.code": 603 - }, - { - "success": "false", - "errors.0.code": 605 - }, - { - "success": "false", - "errors.0.code": 609 - }, - { - "success": "false", - "errors.0.code": 610 - } - ] - } - }, - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "MARKETO", - "displayName": "Marketo", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } -} diff --git a/test/__tests__/data/marketo_router_metadata_output.json b/test/__tests__/data/marketo_router_metadata_output.json deleted file mode 100644 index 4fb7308fe4..0000000000 --- a/test/__tests__/data/marketo_router_metadata_output.json +++ /dev/null @@ -1,20 +0,0 @@ -[ - { - "destInfo": { - "authKey": "1mMy5cqbtfuaKZv1IhVQKnBdVwe" - }, - "jobId": 1 - }, - { - "destInfo": { - "authKey": "1mMy5cqbtfuaKZv1IhVQKnBdVwe" - }, - "jobId": 1 - }, - { - "destInfo": { - "authKey": "1mMy5cqbtfuaKZv1IhVQKnBdVwe" - }, - "jobId": 1 - } -] diff --git a/test/__tests__/data/marketo_router_output.json b/test/__tests__/data/marketo_router_output.json deleted file mode 100644 index c4b59b396d..0000000000 --- a/test/__tests__/data/marketo_router_output.json +++ /dev/null @@ -1,792 +0,0 @@ -[ - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://marketo_acct_id_success.mktorest.com/rest/v1/activities/external.json", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer access_token_success" - }, - "params": {}, - "body": { - "JSON": { - "input": [ - { - "activityDate": "2020-12-17T21:00:59.176Z", - "activityTypeId": 100001, - "attributes": [], - "leadId": 4, - "primaryAttributeValue": "Test Product" - } - ] - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "jobId": 1 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "accountId": "marketo_acct_id_success", - "clientId": "marketo_client_id_success", - "clientSecret": "marketo_client_secret_success", - "trackAnonymousEvents": true, - "customActivityPropertyMap": [ - { - "from": "name", - "to": "productName" - } - ], - "leadTraitMapping": [ - { - "from": "leadScore", - "to": "customLeadScore" - } - ], - "rudderEventsMapping": [ - { - "event": "Product Clicked", - "marketoPrimarykey": "name", - "marketoActivityId": "100001" - } - ] - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Marketo", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "config": { - "destConfig": { - "defaultConfig": [ - "accountId", - "clientId", - "clientSecret", - "trackAnonymousEvents", - "rudderEventsMapping", - "customActivityPropertyMap", - "leadTraitMapping" - ] - }, - "secretKeys": ["clientSecret"], - "excludeKeys": [], - "includeKeys": [], - "routerTransform": true, - "supportedSourceTypes": ["android", "ios", "web", "unity", "amp", "cloud", "reactnative"] - }, - "responseRules": { - "responseType": "JSON", - "rules": { - "retryable": [ - { - "success": "false", - "errors.0.code": 600 - }, - { - "success": "false", - "errors.0.code": 601 - }, - { - "success": "false", - "errors.0.code": 602 - }, - { - "success": "false", - "errors.0.code": 604 - }, - { - "success": "false", - "errors.0.code": 606 - }, - { - "success": "false", - "errors.0.code": 607 - }, - { - "success": "false", - "errors.0.code": 608 - }, - { - "success": "false", - "errors.0.code": 611 - } - ], - "abortable": [ - { - "success": "false", - "errors.0.code": 603 - }, - { - "success": "false", - "errors.0.code": 605 - }, - { - "success": "false", - "errors.0.code": 609 - }, - { - "success": "false", - "errors.0.code": 610 - } - ] - } - }, - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "MARKETO", - "displayName": "Marketo", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - }, - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://marketo_acct_id_success.mktorest.com/rest/v1/activities/external.json", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer access_token_success" - }, - "params": {}, - "body": { - "JSON": { - "input": [ - { - "activityDate": "2020-12-17T21:00:59.176Z", - "activityTypeId": 100001, - "attributes": [], - "leadId": 4, - "primaryAttributeValue": "Test Product" - } - ] - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "jobId": 2 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "accountId": "marketo_acct_id_success", - "clientId": "marketo_client_id_success", - "clientSecret": "marketo_client_secret_success", - "trackAnonymousEvents": true, - "customActivityPropertyMap": [ - { - "from": "name", - "to": "productName" - } - ], - "leadTraitMapping": [ - { - "from": "leadScore", - "to": "customLeadScore" - } - ], - "rudderEventsMapping": [ - { - "event": "Product Clicked", - "marketoPrimarykey": "name", - "marketoActivityId": "100001" - } - ] - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Marketo", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "config": { - "destConfig": { - "defaultConfig": [ - "accountId", - "clientId", - "clientSecret", - "trackAnonymousEvents", - "rudderEventsMapping", - "customActivityPropertyMap", - "leadTraitMapping" - ] - }, - "secretKeys": ["clientSecret"], - "excludeKeys": [], - "includeKeys": [], - "routerTransform": true, - "supportedSourceTypes": ["android", "ios", "web", "unity", "amp", "cloud", "reactnative"] - }, - "responseRules": { - "responseType": "JSON", - "rules": { - "retryable": [ - { - "success": "false", - "errors.0.code": 600 - }, - { - "success": "false", - "errors.0.code": 601 - }, - { - "success": "false", - "errors.0.code": 602 - }, - { - "success": "false", - "errors.0.code": 604 - }, - { - "success": "false", - "errors.0.code": 606 - }, - { - "success": "false", - "errors.0.code": 607 - }, - { - "success": "false", - "errors.0.code": 608 - }, - { - "success": "false", - "errors.0.code": 611 - } - ], - "abortable": [ - { - "success": "false", - "errors.0.code": 603 - }, - { - "success": "false", - "errors.0.code": 605 - }, - { - "success": "false", - "errors.0.code": 609 - }, - { - "success": "false", - "errors.0.code": 610 - } - ] - } - }, - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "MARKETO", - "displayName": "Marketo", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - }, - { - "batched": false, - "statusCode": 400, - "error": "{\"message\":\"Request Failed for marketo, Lookup field 'userId' not found (Aborted).[Marketo Transformer]: During lead look up using email\",\"destinationResponse\":{\"response\":{\"requestId\":\"142e4#1835b117b76\",\"success\":false,\"errors\":[{\"code\":\"1006\",\"message\":\"Lookup field 'userId' not found\"}]},\"status\":200}}", - "statTags": { - "errorCategory": "network", - "errorType": "aborted" - }, - "metadata": [ - { - "jobId": 3 - } - ], - "destination": { - "Config": { - "accountId": "valid_account_broken_event", - "clientId": "504300cd-76b2-a7l4-bhle-90a07420nx73", - "clientSecret": "3l3gJpzRsZagD6gu7tnTeKXz0bomLGnd", - "trackAnonymousEvents": false, - "createIfNotExist": true, - "rudderEventsMapping": [ - { - "event": "acq_signup_completed", - "marketoActivityId": "100026" - }, - { - "event": "act_createwebinarform_submit", - "marketoActivityId": "100025" - }, - { - "event": "act_presentation_style", - "marketoActivityId": "100025" - }, - { - "event": "act_webinar_view", - "marketoActivityId": "100025" - }, - { - "event": "act_webinar_join", - "marketoActivityId": "100025" - }, - { - "event": "act_presentation_addteammember", - "marketoActivityId": "100025" - }, - { - "event": "act_engagement_discussions_savediscussion", - "marketoActivityId": "100025" - }, - { - "event": "act_engagement_networking_savetime", - "marketoActivityId": "100025" - } - ] - }, - "destinationDefinition": { - "config": { - "destConfig": { - "defaultConfig": [ - "accountId", - "clientId", - "clientSecret", - "trackAnonymousEvents", - "rudderEventsMapping", - "customActivityPropertyMap", - "leadTraitMapping" - ] - }, - "secretKeys": ["clientSecret"], - "excludeKeys": [], - "includeKeys": [], - "routerTransform": true, - "supportedSourceTypes": ["android", "ios", "web", "unity", "amp", "cloud", "reactnative"] - }, - "responseRules": { - "responseType": "JSON", - "rules": { - "retryable": [ - { - "success": "false", - "errors.0.code": 600 - }, - { - "success": "false", - "errors.0.code": 601 - }, - { - "success": "false", - "errors.0.code": 602 - }, - { - "success": "false", - "errors.0.code": 604 - }, - { - "success": "false", - "errors.0.code": 606 - }, - { - "success": "false", - "errors.0.code": 607 - }, - { - "success": "false", - "errors.0.code": 608 - }, - { - "success": "false", - "errors.0.code": 611 - } - ], - "abortable": [ - { - "success": "false", - "errors.0.code": 603 - }, - { - "success": "false", - "errors.0.code": 605 - }, - { - "success": "false", - "errors.0.code": 609 - }, - { - "success": "false", - "errors.0.code": 610 - } - ] - } - }, - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "MARKETO", - "displayName": "Marketo", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVke", - "name": "Marketo", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmMd", - "deleted": false, - "createdAt": "2022-02-10T08:39:32.005Z", - "updatedAt": "2022-09-03T16:22:31.374Z", - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - }, - { - "batched": false, - "statusCode": 400, - "error": "{\"message\":\"Error occurred [Marketo Transformer]: During lead look up using email -> some other problem\",\"destinationResponse\":{\"response\":{\"requestId\":\"142e4#1835b117b76\",\"success\":false,\"errors\":[{\"code\":\"random_marketo_code\",\"message\":\"some other problem\"}]},\"status\":200}}", - "statTags": { - "errorCategory": "network", - "errorType": "aborted", - "meta": "unhandledStatusCode" - }, - "destination": { - "Config": { - "accountId": "unhandled_status_code", - "clientId": "504300cd-76b2-a7l4-bhle-90a07420nx73", - "clientSecret": "3l3gJpzRsZagD6gu7tnTeKXz0bomLGnd", - "trackAnonymousEvents": false, - "createIfNotExist": true, - "rudderEventsMapping": [ - { - "event": "acq_signup_completed", - "marketoActivityId": "100026" - }, - { - "event": "act_createwebinarform_submit", - "marketoActivityId": "100025" - }, - { - "event": "act_presentation_style", - "marketoActivityId": "100025" - }, - { - "event": "act_webinar_view", - "marketoActivityId": "100025" - }, - { - "event": "act_webinar_join", - "marketoActivityId": "100025" - }, - { - "event": "act_presentation_addteammember", - "marketoActivityId": "100025" - }, - { - "event": "act_engagement_discussions_savediscussion", - "marketoActivityId": "100025" - }, - { - "event": "act_engagement_networking_savetime", - "marketoActivityId": "100025" - } - ] - }, - "destinationDefinition": { - "config": { - "destConfig": { - "defaultConfig": [ - "accountId", - "clientId", - "clientSecret", - "trackAnonymousEvents", - "rudderEventsMapping", - "customActivityPropertyMap", - "leadTraitMapping" - ] - }, - "secretKeys": ["clientSecret"], - "excludeKeys": [], - "includeKeys": [], - "routerTransform": true, - "supportedSourceTypes": ["android", "ios", "web", "unity", "amp", "cloud", "reactnative"] - }, - "responseRules": { - "responseType": "JSON", - "rules": { - "retryable": [ - { - "success": "false", - "errors.0.code": 600 - }, - { - "success": "false", - "errors.0.code": 601 - }, - { - "success": "false", - "errors.0.code": 602 - }, - { - "success": "false", - "errors.0.code": 604 - }, - { - "success": "false", - "errors.0.code": 606 - }, - { - "success": "false", - "errors.0.code": 607 - }, - { - "success": "false", - "errors.0.code": 608 - }, - { - "success": "false", - "errors.0.code": 611 - } - ], - "abortable": [ - { - "success": "false", - "errors.0.code": 603 - }, - { - "success": "false", - "errors.0.code": 605 - }, - { - "success": "false", - "errors.0.code": 609 - }, - { - "success": "false", - "errors.0.code": 610 - } - ] - } - }, - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "MARKETO", - "displayName": "Marketo", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVke", - "name": "Marketo", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmMd", - "deleted": false, - "createdAt": "2022-02-10T08:39:32.005Z", - "updatedAt": "2022-09-03T16:22:31.374Z", - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - }, - "metadata": [ - { - "jobId": 4 - } - ] - }, - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://successful_identify_transformation.mktorest.com/rest/v1/leads.json", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer access_token_success" - }, - "params": {}, - "body": { - "JSON": { - "action": "createOrUpdate", - "input": [ - { - "Email": "0c7b8b80-9c43-4f8e-b2d2-5e2448a25040@j.mail", - "FirstName": "A", - "LastName": "M", - "id": 4, - "userId": "e17c5a5e-5e2f-430b-b497-fe3f1ea3a704" - } - ], - "lookupField": "id" - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "jobId": 5 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "accountId": "successful_identify_transformation", - "clientId": "504300cd-76b2-a7l4-bhle-90a07420nx73", - "clientSecret": "3l3gJpzRsZagD6gu7tnTeKXz0bomLGnd", - "trackAnonymousEvents": false, - "createIfNotExist": true, - "rudderEventsMapping": [ - { - "event": "acq_signup_completed", - "marketoActivityId": "100026" - }, - { - "event": "act_createwebinarform_submit", - "marketoActivityId": "100025" - }, - { - "event": "act_presentation_style", - "marketoActivityId": "100025" - }, - { - "event": "act_webinar_view", - "marketoActivityId": "100025" - }, - { - "event": "act_webinar_join", - "marketoActivityId": "100025" - }, - { - "event": "act_presentation_addteammember", - "marketoActivityId": "100025" - }, - { - "event": "act_engagement_discussions_savediscussion", - "marketoActivityId": "100025" - }, - { - "event": "act_engagement_networking_savetime", - "marketoActivityId": "100025" - } - ] - }, - "destinationDefinition": { - "config": { - "destConfig": { - "defaultConfig": [ - "accountId", - "clientId", - "clientSecret", - "trackAnonymousEvents", - "rudderEventsMapping", - "customActivityPropertyMap", - "leadTraitMapping" - ] - }, - "secretKeys": ["clientSecret"], - "excludeKeys": [], - "includeKeys": [], - "routerTransform": true, - "supportedSourceTypes": ["android", "ios", "web", "unity", "amp", "cloud", "reactnative"] - }, - "responseRules": { - "responseType": "JSON", - "rules": { - "retryable": [ - { - "success": "false", - "errors.0.code": 600 - }, - { - "success": "false", - "errors.0.code": 601 - }, - { - "success": "false", - "errors.0.code": 602 - }, - { - "success": "false", - "errors.0.code": 604 - }, - { - "success": "false", - "errors.0.code": 606 - }, - { - "success": "false", - "errors.0.code": 607 - }, - { - "success": "false", - "errors.0.code": 608 - }, - { - "success": "false", - "errors.0.code": 611 - } - ], - "abortable": [ - { - "success": "false", - "errors.0.code": 603 - }, - { - "success": "false", - "errors.0.code": 605 - }, - { - "success": "false", - "errors.0.code": 609 - }, - { - "success": "false", - "errors.0.code": 610 - } - ] - } - }, - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "MARKETO", - "displayName": "Marketo", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVke", - "name": "Marketo", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmMd", - "deleted": false, - "createdAt": "2022-02-10T08:39:32.005Z", - "updatedAt": "2022-09-03T16:22:31.374Z", - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - } -] diff --git a/test/__tests__/data/sf_input.json b/test/__tests__/data/sf_input.json deleted file mode 100644 index a10caa8d12..0000000000 --- a/test/__tests__/data/sf_input.json +++ /dev/null @@ -1,152 +0,0 @@ -[ - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "anonymousId": "123456" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "type": "identify", - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "123456", - "userId": "123456", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "trackingID": "abcd" - }, - "Enabled": true - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "test@rudderstack.com", - "anonymousId": "12345" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "type": "page", - "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", - "originalTimestamp": "2019-10-14T11:15:18.299Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "properties": { - "path": "/abc", - "referrer": "", - "search": "", - "title": "", - "url": "" - }, - "integrations": { - "All": true - }, - "name": "ApplicationLoaded", - "sentAt": "2019-10-14T11:15:53.296Z" - }, - "destination": { - "Config": { - "trackingID": "abcd" - }, - "Enabled": true - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "test@rudderstack.com", - "anonymousId": "12345" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "type": "track", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2019-10-14T11:15:18.300Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "event": "test track event GA3", - "properties": { - "user_actual_role": "system_admin, system_user", - "user_actual_id": 12345 - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T11:15:53.296Z" - }, - "destination": { - "Config": { - "trackingID": "UA-149602794-1" - }, - "Enabled": true - } - } -] diff --git a/test/__tests__/data/sf_output.json b/test/__tests__/data/sf_output.json deleted file mode 100644 index 9efe161599..0000000000 --- a/test/__tests__/data/sf_output.json +++ /dev/null @@ -1,43 +0,0 @@ -[ - { - "statusCode": 400, - "message": "message type not supported" - }, - { - "endpoint": "https://www.google-analytics.com/collect", - "requestConfig": { - "requestFormat": "PARAMS", - "requestMethod": "GET" - }, - "header": {}, - "userId": "00000000000000000000000000", - "payload": { - "v": "1", - "t": "pageview", - "tid": "abcd", - "cid": "00000000000000000000000000", - "dt": "", - "dl": "", - "dp": "/abc", - "dr": "" - }, - "statusCode": 200 - }, - { - "endpoint": "https://www.google-analytics.com/collect", - "requestConfig": { - "requestFormat": "PARAMS", - "requestMethod": "GET" - }, - "header": {}, - "userId": "00000000000000000000000000", - "payload": { - "v": "1", - "t": "event", - "tid": "UA-149602794-1", - "cid": "00000000000000000000000000", - "ea": "test track event GA3" - }, - "statusCode": 200 - } -] diff --git a/test/__tests__/intercom.test.js b/test/__tests__/intercom.test.js deleted file mode 100644 index 973b3e8a60..0000000000 --- a/test/__tests__/intercom.test.js +++ /dev/null @@ -1,49 +0,0 @@ -const integration = "intercom"; -const name = "Intercom"; - -const fs = require("fs"); -const path = require("path"); - -const version = "v0"; - -const transformer = require(`../../src/${version}/destinations/${integration}/transform`); -const inputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_input.json`) -); -const outputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_output.json`) -); -const inputData = JSON.parse(inputDataFile); -const expectedData = JSON.parse(outputDataFile); - -// Router Test Data -const inputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_input.json`) -); -const outputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_output.json`) -); -const inputRouterData = JSON.parse(inputRouterDataFile); -const expectedRouterData = JSON.parse(outputRouterDataFile); - -describe(`${name} Tests`, () => { - describe("Processor Tests", () => { - inputData.forEach((input, index) => { - it(`${name} - payload: ${index}`, async () => { - try { - const output = await transformer.process(input); - expect(output).toEqual(expectedData[index]); - } catch (error) { - expect(error.message).toEqual(expectedData[index].error); - } - }); - }); - }); - - describe("Router Tests", () => { - it("Payload", async () => { - const routerOutput = await transformer.processRouterDest(inputRouterData); - expect(routerOutput).toEqual(expectedRouterData); - }); - }); -}); diff --git a/test/__tests__/marketo.test.js b/test/__tests__/marketo.test.js deleted file mode 100644 index b300b20f10..0000000000 --- a/test/__tests__/marketo.test.js +++ /dev/null @@ -1,71 +0,0 @@ -jest.mock("axios"); - -const integration = "marketo"; -const name = "Marketo"; -const version = "v0"; - -const fs = require("fs"); -const path = require("path"); - -const transformer = require(`../../src/${version}/destinations/${integration}/transform`); - -// Processor Test files -const inputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_input.json`) -); -const outputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_output.json`) -); -const inputData = JSON.parse(inputDataFile); -const expectedData = JSON.parse(outputDataFile); - -// Router Test files -const inputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_input.json`) -); -const outputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_output.json`) -); -const inputRouterData = JSON.parse(inputRouterDataFile); -const expectedRouterData = JSON.parse(outputRouterDataFile); - -// Router Metadata Test files -const inputRouterMetadataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_metadata_input.json`) -); -const outputRouterMetadataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_metadata_output.json`) -); -const inputRouterMetadata = JSON.parse(inputRouterMetadataFile); -const expectedRouterMetadata = JSON.parse(outputRouterMetadataFile); - -describe(`${name} Tests`, () => { - describe("Processor", () => { - inputData.forEach(async (input, index) => { - it(`Payload - ${index}`, async () => { - try { - const output = await transformer.process(input); - expect(output).toEqual(expectedData[index]); - } catch (error) { - expect(error.message).toEqual(expectedData[index].error); - } - }); - }); - }); - - describe("Router Tests", () => { - it("Payload", async () => { - const routerOutput = await transformer.processRouterDest(inputRouterData); - expect(routerOutput).toEqual(expectedRouterData); - }); - }); - - describe("Router Metadata Tests", () => { - it("Payload", async () => { - const routerMetadataOutput = await transformer.processMetadataForRouter( - inputRouterMetadata - ); - expect(routerMetadataOutput).toEqual(expectedRouterMetadata); - }); - }); -}); diff --git a/test/integrations/destinations/am/batch/data.ts b/test/integrations/destinations/am/batch/data.ts new file mode 100644 index 0000000000..962bb476c4 --- /dev/null +++ b/test/integrations/destinations/am/batch/data.ts @@ -0,0 +1,3274 @@ +export const data = [ + { + name: 'am', + description: 'Test 0: ERROR - Both userId and deviceId cannot be undefined', + feature: 'batch', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + destType: 'am', + input: [ + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: [ + { + ip: '0.0.0.0', + time: 1603132665557, + os_name: '', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + library: 'rudderstack', + event_type: '$identify', + os_version: '', + session_id: -1, + app_version: '1.1.5', + user_properties: { + name: 'some campaign', + plan: 'Open source', + term: 'keyword', + test: 'other value', + email: 'test@rudderstack.com', + logins: 5, + medium: 'medium', + source: 'google', + content: 'some content', + category: 'SampleIdentify', + createdAt: 1599264000, + }, + }, + ], + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + options: { + min_id_length: 1, + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api.eu.amplitude.com/2/httpapi', + }, + metadata: { + job_id: 1, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'EU', + }, + }, + }, + ], + }, + }, + }, + output: { + response: { + status: 200, + body: [ + { + batched: false, + error: 'Both userId and deviceId cannot be undefined', + metadata: { + job_id: 1, + }, + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 1', + feature: 'batch', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + destType: 'am', + input: [ + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: [ + { + ip: '0.0.0.0', + time: 1603132665557, + os_name: '', + user_id: '123', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: '$identify', + os_version: '', + session_id: -1, + app_version: '1.1.5', + user_properties: { + name: 'some campaign', + plan: 'Open source', + term: 'keyword', + test: 'other value', + email: 'test@rudderstack.com', + logins: 5, + medium: 'medium', + source: 'google', + content: 'some content', + category: 'SampleIdentify', + createdAt: 1599264000, + }, + }, + ], + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + options: { + min_id_length: 1, + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api.eu.amplitude.com/2/httpapi', + }, + metadata: { + job_id: 1, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'EU', + }, + }, + }, + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: [ + { + ip: '[::1]', + time: 1603132712347, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: 'Simple track call', + os_version: '', + session_id: -1, + app_version: '1.1.5', + event_properties: { + key: 'val', + }, + }, + ], + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + options: { + min_id_length: 1, + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/2/httpapi', + }, + metadata: { + job_id: 2, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: [ + { + ip: '[::1]', + time: 1603132719505, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: 'Simple track call', + os_version: '', + session_id: -1, + app_version: '1.1.5', + event_properties: { + key: 'val', + }, + }, + ], + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + options: { + min_id_length: 1, + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/2/httpapi', + }, + metadata: { + job_id: 3, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: [ + { + ip: '[::1]', + time: 1603132726413, + groups: { + Company: 'Comapny-ABC', + }, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: '$identify', + os_version: '', + session_id: -1, + app_version: '1.1.5', + user_properties: { + Company: 'Comapny-ABC', + }, + }, + ], + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + options: { + min_id_length: 1, + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/2/httpapi', + }, + metadata: { + job_id: 4, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: [ + { + ip: '[::1]', + time: 1603132726413, + groups: { + Company: 'Comapny-ABC', + }, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: '$identify', + os_version: '', + session_id: -1, + app_version: '1.1.5', + user_properties: { + Company: 'Comapny-ABC', + }, + }, + ], + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + options: { + min_id_length: 1, + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/2/httpapi', + }, + metadata: { + job_id: 5, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: { + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + identification: [ + '{"group_type":"Company","group_value":"Comapny-ABC","group_properties":{"KEY_2":{"CHILD_KEY_102":"value_103","CHILD_KEY_92":"value_95"},"KEY_3":{"CHILD_KEY_102":"value_103","CHILD_KEY_92":"value_95"},"name_trait":"Company","value_trait":"Comapny-ABC"}}', + ], + }, + JSON: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: {}, + version: '1', + endpoint: 'https://api2.amplitude.com/groupidentify', + }, + metadata: { + job_id: 6, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: { + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + mapping: ['{"global_user_id":"newUserIdAlias","user_id":"sampleusrRudder3"}'], + }, + JSON: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: {}, + version: '1', + endpoint: 'https://api2.amplitude.com/usermap', + }, + metadata: { + job_id: 7, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + ], + }, + }, + }, + output: { + response: { + status: 200, + body: [ + { + batchedRequest: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: [ + { + ip: '0.0.0.0', + time: 1603132665557, + os_name: '', + user_id: '123', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: '$identify', + os_version: '', + session_id: -1, + app_version: '1.1.5', + user_properties: { + name: 'some campaign', + plan: 'Open source', + term: 'keyword', + test: 'other value', + email: 'test@rudderstack.com', + logins: 5, + medium: 'medium', + source: 'google', + content: 'some content', + category: 'SampleIdentify', + createdAt: 1599264000, + }, + }, + ], + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + options: { + min_id_length: 1, + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api.eu.amplitude.com/2/httpapi', + }, + metadata: [ + { + job_id: 1, + }, + ], + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'EU', + }, + }, + }, + { + batchedRequest: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: { + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + identification: [ + '{"group_type":"Company","group_value":"Comapny-ABC","group_properties":{"KEY_2":{"CHILD_KEY_102":"value_103","CHILD_KEY_92":"value_95"},"KEY_3":{"CHILD_KEY_102":"value_103","CHILD_KEY_92":"value_95"},"name_trait":"Company","value_trait":"Comapny-ABC"}}', + ], + }, + JSON: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: {}, + version: '1', + endpoint: 'https://api2.amplitude.com/groupidentify', + }, + metadata: [ + { + job_id: 6, + }, + ], + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + batchedRequest: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: { + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + mapping: ['{"global_user_id":"newUserIdAlias","user_id":"sampleusrRudder3"}'], + }, + JSON: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: {}, + version: '1', + endpoint: 'https://api2.amplitude.com/usermap', + }, + metadata: [ + { + job_id: 7, + }, + ], + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + batchedRequest: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: [ + { + ip: '[::1]', + time: 1603132712347, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: 'Simple track call', + os_version: '', + session_id: -1, + app_version: '1.1.5', + event_properties: { + key: 'val', + }, + }, + { + ip: '[::1]', + time: 1603132719505, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: 'Simple track call', + os_version: '', + session_id: -1, + app_version: '1.1.5', + event_properties: { + key: 'val', + }, + }, + { + ip: '[::1]', + time: 1603132726413, + groups: { + Company: 'Comapny-ABC', + }, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: '$identify', + os_version: '', + session_id: -1, + app_version: '1.1.5', + user_properties: { + Company: 'Comapny-ABC', + }, + }, + { + ip: '[::1]', + time: 1603132726413, + groups: { + Company: 'Comapny-ABC', + }, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: '$identify', + os_version: '', + session_id: -1, + app_version: '1.1.5', + user_properties: { + Company: 'Comapny-ABC', + }, + }, + ], + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/batch', + }, + metadata: [ + { + job_id: 2, + }, + { + job_id: 3, + }, + { + job_id: 4, + }, + { + job_id: 5, + }, + ], + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 2', + feature: 'batch', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + destType: 'am', + input: [ + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: { + ip: '0.0.0.0', + time: 1603132665557, + os_name: '', + user_id: '123', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: '$identify', + os_version: '', + session_id: -1, + app_version: '1.1.5', + user_properties: { + name: 'some campaign', + plan: 'Open source', + term: 'keyword', + test: 'other value', + email: 'test@rudderstack.com', + logins: 5, + medium: 'medium', + source: 'google', + content: 'some content', + category: 'SampleIdentify', + createdAt: 1599264000, + }, + }, + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + options: { + min_id_length: 1, + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/2/httpapi', + }, + metadata: { + job_id: 1, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: { + ip: '[::1]', + time: 1603132712347, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: 'Simple track call', + os_version: '', + session_id: -1, + app_version: '1.1.5', + event_properties: { + key: 'val', + }, + }, + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + options: { + min_id_length: 1, + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/2/httpapi', + }, + metadata: { + job_id: 2, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: { + ip: '[::1]', + time: 1603132719505, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: 'Simple track call', + os_version: '', + session_id: -1, + app_version: '1.1.5', + event_properties: { + key: 'val', + }, + }, + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + options: { + min_id_length: 1, + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/2/httpapi', + }, + metadata: { + job_id: 3, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: { + ip: '[::1]', + time: 1603132726413, + groups: { + Company: 'Comapny-ABC', + }, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: '$identify', + os_version: '', + session_id: -1, + app_version: '1.1.5', + user_properties: { + Company: 'Comapny-ABC', + }, + }, + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + options: { + min_id_length: 1, + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/2/httpapi', + }, + metadata: { + job_id: 4, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: { + ip: '[::1]', + time: 1603132726413, + groups: { + Company: 'Comapny-ABC', + }, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: '$identify', + os_version: '', + session_id: -1, + app_version: '1.1.5', + user_properties: { + Company: 'Comapny-ABC', + }, + }, + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + options: { + min_id_length: 1, + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/2/httpapi', + }, + metadata: { + job_id: 5, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: { + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + identification: [ + '{"group_type":"Company","group_value":"Comapny-ABC","group_properties":{"KEY_2":{"CHILD_KEY_102":"value_103","CHILD_KEY_92":"value_95"},"KEY_3":{"CHILD_KEY_102":"value_103","CHILD_KEY_92":"value_95"},"name_trait":"Company","value_trait":"Comapny-ABC"}}', + ], + }, + JSON: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: {}, + version: '1', + endpoint: 'https://api2.amplitude.com/groupidentify', + }, + metadata: { + job_id: 6, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: { + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + mapping: ['{"global_user_id":"newUserIdAlias","user_id":"sampleusrRudder3"}'], + }, + JSON: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: {}, + version: '1', + endpoint: 'https://api2.amplitude.com/usermap', + }, + metadata: { + job_id: 7, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + ], + }, + }, + }, + output: { + response: { + status: 200, + body: [ + { + batchedRequest: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: { + ip: '0.0.0.0', + time: 1603132665557, + os_name: '', + user_id: '123', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: '$identify', + os_version: '', + session_id: -1, + app_version: '1.1.5', + user_properties: { + name: 'some campaign', + plan: 'Open source', + term: 'keyword', + test: 'other value', + email: 'test@rudderstack.com', + logins: 5, + medium: 'medium', + source: 'google', + content: 'some content', + category: 'SampleIdentify', + createdAt: 1599264000, + }, + }, + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + options: { + min_id_length: 1, + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/2/httpapi', + }, + metadata: [ + { + job_id: 1, + }, + ], + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + batchedRequest: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: { + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + identification: [ + '{"group_type":"Company","group_value":"Comapny-ABC","group_properties":{"KEY_2":{"CHILD_KEY_102":"value_103","CHILD_KEY_92":"value_95"},"KEY_3":{"CHILD_KEY_102":"value_103","CHILD_KEY_92":"value_95"},"name_trait":"Company","value_trait":"Comapny-ABC"}}', + ], + }, + JSON: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: {}, + version: '1', + endpoint: 'https://api2.amplitude.com/groupidentify', + }, + metadata: [ + { + job_id: 6, + }, + ], + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + batchedRequest: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: { + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + mapping: ['{"global_user_id":"newUserIdAlias","user_id":"sampleusrRudder3"}'], + }, + JSON: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: {}, + version: '1', + endpoint: 'https://api2.amplitude.com/usermap', + }, + metadata: [ + { + job_id: 7, + }, + ], + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + batchedRequest: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: [ + { + ip: '[::1]', + time: 1603132712347, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: 'Simple track call', + os_version: '', + session_id: -1, + app_version: '1.1.5', + event_properties: { + key: 'val', + }, + }, + { + ip: '[::1]', + time: 1603132719505, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: 'Simple track call', + os_version: '', + session_id: -1, + app_version: '1.1.5', + event_properties: { + key: 'val', + }, + }, + { + ip: '[::1]', + time: 1603132726413, + groups: { + Company: 'Comapny-ABC', + }, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: '$identify', + os_version: '', + session_id: -1, + app_version: '1.1.5', + user_properties: { + Company: 'Comapny-ABC', + }, + }, + { + ip: '[::1]', + time: 1603132726413, + groups: { + Company: 'Comapny-ABC', + }, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: '$identify', + os_version: '', + session_id: -1, + app_version: '1.1.5', + user_properties: { + Company: 'Comapny-ABC', + }, + }, + ], + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/batch', + }, + metadata: [ + { + job_id: 2, + }, + { + job_id: 3, + }, + { + job_id: 4, + }, + { + job_id: 5, + }, + ], + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 3', + feature: 'batch', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + destType: 'am', + input: [ + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: { + ip: '[::1]', + time: 1565586510909, + carrier: 'Android', + app_name: 'RudderAndroidClient', + language: 'en-US', + device_id: 'anon_id', + library: 'rudderstack', + insert_id: 'dd4c4493-a3ff-49c9-9071-6cb72e37cd55', + event_type: 'Demo Track', + session_id: -1, + app_version: '1.0', + device_model: 'Android SDK built for x86', + event_properties: { + label: 'Demo Label', + value: 5, + category: 'Demo Category', + }, + device_manufacturer: 'Google', + }, + api_key: 'afasf', + options: { + min_id_length: 1, + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'anon_id', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/2/httpapi', + }, + metadata: { + userId: '90ca6da0-292e-4e79-9880-f8009e0ae4a3', + jobId: 12, + sourceId: '1fMCVYZboDlYlauh4GFsEo2JU77', + destinationId: '1gXSYmSd7vkfFfJ4vtMCL0i43Lb', + attemptNum: 0, + receivedAt: '2020-10-20T23:47:29.633+05:30', + createdAt: '2020-10-20T18:17:32.465Z', + }, + destination: { + ID: '1iuPwfigf4Fk5F5OBF2T3EVTGlY', + Name: 'braze dev', + DestinationDefinition: { + ID: '1XQoHKJnI6Uf67wN20RlvAQSUB9', + Name: 'BRAZE', + DisplayName: 'Braze', + Config: { + destConfig: { + android: ['useNativeSDK'], + defaultConfig: ['appKey', 'dataCenter', 'restApiKey'], + ios: ['useNativeSDK'], + web: ['useNativeSDK'], + }, + excludeKeys: [], + includeKeys: ['appKey', 'dataCenter'], + secretKeys: ['restApiKey'], + supportedSourceTypes: [ + 'android', + 'ios', + 'web', + 'unity', + 'amp', + 'cloud', + 'reactnative', + ], + }, + }, + Config: { + appKey: 'asdf', + dataCenter: 'asdfasdf', + residencyServer: 'standard', + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: false, + }, + }, + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: { + ip: '[::1]', + time: 1565586510909, + carrier: 'Android', + app_name: 'RudderAndroidClient', + language: 'en-US', + device_id: 'anon_id', + library: 'rudderstack', + insert_id: '69283c05-bbe9-4aba-bb98-3f065d39cf54', + event_type: 'Demo Track', + session_id: -1, + app_version: '1.0', + device_model: 'Android SDK built for x86', + event_properties: { + label: 'Demo Label', + value: 5, + category: 'Demo Category', + }, + device_manufacturer: 'Google', + }, + api_key: 'afasf', + options: { + min_id_length: 1, + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'anon_id', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/2/httpapi', + }, + metadata: { + userId: '90ca6da0-292e-4e79-9880-f8009e0ae4a3', + jobId: 13, + sourceId: '1fMCVYZboDlYlauh4GFsEo2JU77', + destinationId: '1gXSYmSd7vkfFfJ4vtMCL0i43Lb', + attemptNum: 0, + receivedAt: '2020-10-20T23:47:29.914+05:30', + createdAt: '2020-10-20T18:17:32.465Z', + }, + destination: { + ID: '1iuPwfigf4Fk5F5OBF2T3EVTGlY', + Name: 'braze dev', + DestinationDefinition: { + ID: '1XQoHKJnI6Uf67wN20RlvAQSUB9', + Name: 'BRAZE', + DisplayName: 'Braze', + Config: { + destConfig: { + android: ['useNativeSDK'], + defaultConfig: ['appKey', 'dataCenter', 'restApiKey'], + ios: ['useNativeSDK'], + web: ['useNativeSDK'], + }, + excludeKeys: [], + includeKeys: ['appKey', 'dataCenter'], + secretKeys: ['restApiKey'], + supportedSourceTypes: [ + 'android', + 'ios', + 'web', + 'unity', + 'amp', + 'cloud', + 'reactnative', + ], + }, + }, + Config: { + appKey: 'asdf', + dataCenter: 'asdfasdf', + residencyServer: 'standard', + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: false, + }, + }, + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: { + ip: '[::1]', + time: 1565586510909, + carrier: 'Android', + app_name: 'RudderAndroidClient', + language: 'en-US', + device_id: 'anon_id', + library: 'rudderstack', + insert_id: '39f7a1fa-ff79-4fd1-a329-d637f018de7e', + event_type: 'Demo Track', + session_id: -1, + app_version: '1.0', + device_model: 'Android SDK built for x86', + event_properties: { + label: 'Demo Label', + value: 5, + category: 'Demo Category', + }, + device_manufacturer: 'Google', + }, + api_key: 'afasf', + options: { + min_id_length: 1, + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'anon_id', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/2/httpapi', + }, + metadata: { + userId: '90ca6da0-292e-4e79-9880-f8009e0ae4a3', + jobId: 14, + sourceId: '1fMCVYZboDlYlauh4GFsEo2JU77', + destinationId: '1gXSYmSd7vkfFfJ4vtMCL0i43Lb', + attemptNum: 0, + receivedAt: '2020-10-20T23:47:30.166+05:30', + createdAt: '2020-10-20T18:17:32.465Z', + }, + destination: { + ID: '1iuPwfigf4Fk5F5OBF2T3EVTGlY', + Name: 'braze dev', + DestinationDefinition: { + ID: '1XQoHKJnI6Uf67wN20RlvAQSUB9', + Name: 'BRAZE', + DisplayName: 'Braze', + Config: { + destConfig: { + android: ['useNativeSDK'], + defaultConfig: ['appKey', 'dataCenter', 'restApiKey'], + ios: ['useNativeSDK'], + web: ['useNativeSDK'], + }, + excludeKeys: [], + includeKeys: ['appKey', 'dataCenter'], + secretKeys: ['restApiKey'], + supportedSourceTypes: [ + 'android', + 'ios', + 'web', + 'unity', + 'amp', + 'cloud', + 'reactnative', + ], + }, + }, + Config: { + appKey: 'asdf', + dataCenter: 'asdfasdf', + residencyServer: 'standard', + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: false, + }, + }, + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: { + ip: '[::1]', + time: 1565586510909, + carrier: 'Android', + app_name: 'RudderAndroidClient', + language: 'en-US', + device_id: 'anon_id', + library: 'rudderstack', + insert_id: '4314aa01-46a3-4f45-b67d-debe4bc01717', + event_type: 'Demo Track', + session_id: -1, + app_version: '1.0', + device_model: 'Android SDK built for x86', + event_properties: { + label: 'Demo Label', + value: 5, + category: 'Demo Category', + }, + device_manufacturer: 'Google', + }, + api_key: 'afasf', + options: { + min_id_length: 1, + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'anon_id', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/2/httpapi', + }, + metadata: { + userId: '90ca6da0-292e-4e79-9880-f8009e0ae4a3', + jobId: 15, + sourceId: '1fMCVYZboDlYlauh4GFsEo2JU77', + destinationId: '1gXSYmSd7vkfFfJ4vtMCL0i43Lb', + attemptNum: 0, + receivedAt: '2020-10-20T23:47:30.424+05:30', + createdAt: '2020-10-20T18:17:32.465Z', + }, + destination: { + ID: '1iuPwfigf4Fk5F5OBF2T3EVTGlY', + Name: 'braze dev', + DestinationDefinition: { + ID: '1XQoHKJnI6Uf67wN20RlvAQSUB9', + Name: 'BRAZE', + DisplayName: 'Braze', + Config: { + destConfig: { + android: ['useNativeSDK'], + defaultConfig: ['appKey', 'dataCenter', 'restApiKey'], + ios: ['useNativeSDK'], + web: ['useNativeSDK'], + }, + excludeKeys: [], + includeKeys: ['appKey', 'dataCenter'], + secretKeys: ['restApiKey'], + supportedSourceTypes: [ + 'android', + 'ios', + 'web', + 'unity', + 'amp', + 'cloud', + 'reactnative', + ], + }, + }, + Config: { + appKey: 'asdf', + dataCenter: 'asdfasdf', + residencyServer: 'standard', + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: false, + }, + }, + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: { + ip: '[::1]', + time: 1565586510909, + carrier: 'Android', + app_name: 'RudderAndroidClient', + language: 'en-US', + device_id: 'anon_id', + library: 'rudderstack', + insert_id: '4d958d40-2762-44aa-bf83-d47f881bc615', + event_type: 'Demo Track', + session_id: -1, + app_version: '1.0', + device_model: 'Android SDK built for x86', + event_properties: { + label: 'Demo Label', + value: 5, + category: 'Demo Category', + }, + device_manufacturer: 'Google', + }, + api_key: 'afasf', + options: { + min_id_length: 1, + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'anon_id', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/2/httpapi', + }, + metadata: { + userId: '90ca6da0-292e-4e79-9880-f8009e0ae4a3', + jobId: 16, + sourceId: '1fMCVYZboDlYlauh4GFsEo2JU77', + destinationId: '1gXSYmSd7vkfFfJ4vtMCL0i43Lb', + attemptNum: 0, + receivedAt: '2020-10-20T23:47:30.668+05:30', + createdAt: '2020-10-20T18:17:32.465Z', + }, + destination: { + ID: '1iuPwfigf4Fk5F5OBF2T3EVTGlY', + Name: 'braze dev', + DestinationDefinition: { + ID: '1XQoHKJnI6Uf67wN20RlvAQSUB9', + Name: 'BRAZE', + DisplayName: 'Braze', + Config: { + destConfig: { + android: ['useNativeSDK'], + defaultConfig: ['appKey', 'dataCenter', 'restApiKey'], + ios: ['useNativeSDK'], + web: ['useNativeSDK'], + }, + excludeKeys: [], + includeKeys: ['appKey', 'dataCenter'], + secretKeys: ['restApiKey'], + supportedSourceTypes: [ + 'android', + 'ios', + 'web', + 'unity', + 'amp', + 'cloud', + 'reactnative', + ], + }, + }, + Config: { + appKey: 'asdf', + dataCenter: 'asdfasdf', + residencyServer: 'standard', + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: false, + }, + }, + ], + }, + }, + }, + output: { + response: { + status: 200, + body: [ + { + batchedRequest: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: [ + { + ip: '[::1]', + time: 1565586510909, + carrier: 'Android', + app_name: 'RudderAndroidClient', + language: 'en-US', + device_id: 'anon_id', + library: 'rudderstack', + insert_id: 'dd4c4493-a3ff-49c9-9071-6cb72e37cd55', + event_type: 'Demo Track', + session_id: -1, + app_version: '1.0', + device_model: 'Android SDK built for x86', + event_properties: { + label: 'Demo Label', + value: 5, + category: 'Demo Category', + }, + device_manufacturer: 'Google', + }, + { + ip: '[::1]', + time: 1565586510909, + carrier: 'Android', + app_name: 'RudderAndroidClient', + language: 'en-US', + device_id: 'anon_id', + library: 'rudderstack', + insert_id: '69283c05-bbe9-4aba-bb98-3f065d39cf54', + event_type: 'Demo Track', + session_id: -1, + app_version: '1.0', + device_model: 'Android SDK built for x86', + event_properties: { + label: 'Demo Label', + value: 5, + category: 'Demo Category', + }, + device_manufacturer: 'Google', + }, + { + ip: '[::1]', + time: 1565586510909, + carrier: 'Android', + app_name: 'RudderAndroidClient', + language: 'en-US', + device_id: 'anon_id', + library: 'rudderstack', + insert_id: '39f7a1fa-ff79-4fd1-a329-d637f018de7e', + event_type: 'Demo Track', + session_id: -1, + app_version: '1.0', + device_model: 'Android SDK built for x86', + event_properties: { + label: 'Demo Label', + value: 5, + category: 'Demo Category', + }, + device_manufacturer: 'Google', + }, + { + ip: '[::1]', + time: 1565586510909, + carrier: 'Android', + app_name: 'RudderAndroidClient', + language: 'en-US', + device_id: 'anon_id', + library: 'rudderstack', + insert_id: '4314aa01-46a3-4f45-b67d-debe4bc01717', + event_type: 'Demo Track', + session_id: -1, + app_version: '1.0', + device_model: 'Android SDK built for x86', + event_properties: { + label: 'Demo Label', + value: 5, + category: 'Demo Category', + }, + device_manufacturer: 'Google', + }, + { + ip: '[::1]', + time: 1565586510909, + carrier: 'Android', + app_name: 'RudderAndroidClient', + language: 'en-US', + device_id: 'anon_id', + library: 'rudderstack', + insert_id: '4d958d40-2762-44aa-bf83-d47f881bc615', + event_type: 'Demo Track', + session_id: -1, + app_version: '1.0', + device_model: 'Android SDK built for x86', + event_properties: { + label: 'Demo Label', + value: 5, + category: 'Demo Category', + }, + device_manufacturer: 'Google', + }, + ], + api_key: 'afasf', + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'anon_id', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/batch', + }, + metadata: [ + { + userId: '90ca6da0-292e-4e79-9880-f8009e0ae4a3', + jobId: 12, + sourceId: '1fMCVYZboDlYlauh4GFsEo2JU77', + destinationId: '1gXSYmSd7vkfFfJ4vtMCL0i43Lb', + attemptNum: 0, + receivedAt: '2020-10-20T23:47:29.633+05:30', + createdAt: '2020-10-20T18:17:32.465Z', + }, + { + userId: '90ca6da0-292e-4e79-9880-f8009e0ae4a3', + jobId: 13, + sourceId: '1fMCVYZboDlYlauh4GFsEo2JU77', + destinationId: '1gXSYmSd7vkfFfJ4vtMCL0i43Lb', + attemptNum: 0, + receivedAt: '2020-10-20T23:47:29.914+05:30', + createdAt: '2020-10-20T18:17:32.465Z', + }, + { + userId: '90ca6da0-292e-4e79-9880-f8009e0ae4a3', + jobId: 14, + sourceId: '1fMCVYZboDlYlauh4GFsEo2JU77', + destinationId: '1gXSYmSd7vkfFfJ4vtMCL0i43Lb', + attemptNum: 0, + receivedAt: '2020-10-20T23:47:30.166+05:30', + createdAt: '2020-10-20T18:17:32.465Z', + }, + { + userId: '90ca6da0-292e-4e79-9880-f8009e0ae4a3', + jobId: 15, + sourceId: '1fMCVYZboDlYlauh4GFsEo2JU77', + destinationId: '1gXSYmSd7vkfFfJ4vtMCL0i43Lb', + attemptNum: 0, + receivedAt: '2020-10-20T23:47:30.424+05:30', + createdAt: '2020-10-20T18:17:32.465Z', + }, + { + userId: '90ca6da0-292e-4e79-9880-f8009e0ae4a3', + jobId: 16, + sourceId: '1fMCVYZboDlYlauh4GFsEo2JU77', + destinationId: '1gXSYmSd7vkfFfJ4vtMCL0i43Lb', + attemptNum: 0, + receivedAt: '2020-10-20T23:47:30.668+05:30', + createdAt: '2020-10-20T18:17:32.465Z', + }, + ], + destination: { + ID: '1iuPwfigf4Fk5F5OBF2T3EVTGlY', + Name: 'braze dev', + DestinationDefinition: { + ID: '1XQoHKJnI6Uf67wN20RlvAQSUB9', + Name: 'BRAZE', + DisplayName: 'Braze', + Config: { + destConfig: { + android: ['useNativeSDK'], + defaultConfig: ['appKey', 'dataCenter', 'restApiKey'], + ios: ['useNativeSDK'], + web: ['useNativeSDK'], + }, + excludeKeys: [], + includeKeys: ['appKey', 'dataCenter'], + secretKeys: ['restApiKey'], + supportedSourceTypes: [ + 'android', + 'ios', + 'web', + 'unity', + 'amp', + 'cloud', + 'reactnative', + ], + }, + }, + Config: { + appKey: 'asdf', + dataCenter: 'asdfasdf', + residencyServer: 'standard', + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: false, + }, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 4', + feature: 'batch', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + destType: 'am', + input: [ + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: [ + { + ip: '0.0.0.0', + time: 1603132665557, + os_name: '', + user_id: '123', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: '$identify', + os_version: '', + session_id: -1, + app_version: '1.1.5', + user_properties: { + name: 'some campaign', + plan: 'Open source', + term: 'keyword', + test: 'other value', + email: 'test@rudderstack.com', + logins: 5, + medium: 'medium', + source: 'google', + content: 'some content', + category: 'SampleIdentify', + createdAt: 1599264000, + }, + }, + ], + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + options: { + min_id_length: 1, + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/2/httpapi', + }, + metadata: { + job_id: 1, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: [ + { + ip: '[::1]', + time: 1603132712347, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: 'Simple track call', + os_version: '', + session_id: -1, + app_version: '1.1.5', + event_properties: { + key: 'val', + }, + }, + ], + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + options: { + min_id_length: 1, + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/2/httpapi', + }, + metadata: { + job_id: 2, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: [ + { + ip: '[::1]', + time: 1603132719505, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: 'Simple track call', + os_version: '', + session_id: -1, + app_version: '1.1.5', + event_properties: { + key: 'val', + }, + }, + ], + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + options: { + min_id_length: 1, + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/2/httpapi', + }, + metadata: { + job_id: 3, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: [ + { + ip: '[::1]', + time: 1603132726413, + groups: { + Company: 'Comapny-ABC', + }, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: '$identify', + os_version: '', + session_id: -1, + app_version: '1.1.5', + user_properties: { + Company: 'Comapny-ABC', + }, + }, + ], + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + options: { + min_id_length: 1, + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/2/httpapi', + }, + metadata: { + job_id: 4, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: [ + { + ip: '[::1]', + time: 1603132726413, + groups: { + Company: 'Comapny-ABC', + }, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: '$identify', + os_version: '', + session_id: -1, + app_version: '1.1.5', + user_properties: { + Company: 'Comapny-ABC', + }, + }, + ], + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + options: { + min_id_length: 1, + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/2/httpapi', + }, + metadata: { + job_id: 5, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: { + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + identification: [ + '{"group_type":"Company","group_value":"Comapny-ABC","group_properties":{"KEY_2":{"CHILD_KEY_102":"value_103","CHILD_KEY_92":"value_95"},"KEY_3":{"CHILD_KEY_102":"value_103","CHILD_KEY_92":"value_95"},"name_trait":"Company","value_trait":"Comapny-ABC"}}', + ], + }, + JSON: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: {}, + version: '1', + endpoint: 'https://api2.amplitude.com/groupidentify', + }, + metadata: { + job_id: 6, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: { + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + mapping: ['{"global_user_id":"newUserIdAlias","user_id":"sampleusrRudder3"}'], + }, + JSON: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: {}, + version: '1', + endpoint: 'https://api2.amplitude.com/usermap', + }, + metadata: { + job_id: 7, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + ], + }, + }, + }, + output: { + response: { + status: 200, + body: [ + { + batchedRequest: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: [ + { + ip: '0.0.0.0', + time: 1603132665557, + os_name: '', + user_id: '123', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: '$identify', + os_version: '', + session_id: -1, + app_version: '1.1.5', + user_properties: { + name: 'some campaign', + plan: 'Open source', + term: 'keyword', + test: 'other value', + email: 'test@rudderstack.com', + logins: 5, + medium: 'medium', + source: 'google', + content: 'some content', + category: 'SampleIdentify', + createdAt: 1599264000, + }, + }, + ], + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + options: { + min_id_length: 1, + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/2/httpapi', + }, + metadata: [ + { + job_id: 1, + }, + ], + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + batchedRequest: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: { + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + identification: [ + '{"group_type":"Company","group_value":"Comapny-ABC","group_properties":{"KEY_2":{"CHILD_KEY_102":"value_103","CHILD_KEY_92":"value_95"},"KEY_3":{"CHILD_KEY_102":"value_103","CHILD_KEY_92":"value_95"},"name_trait":"Company","value_trait":"Comapny-ABC"}}', + ], + }, + JSON: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: {}, + version: '1', + endpoint: 'https://api2.amplitude.com/groupidentify', + }, + metadata: [ + { + job_id: 6, + }, + ], + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + batchedRequest: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: { + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + mapping: ['{"global_user_id":"newUserIdAlias","user_id":"sampleusrRudder3"}'], + }, + JSON: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: {}, + version: '1', + endpoint: 'https://api2.amplitude.com/usermap', + }, + metadata: [ + { + job_id: 7, + }, + ], + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + batchedRequest: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: [ + { + ip: '[::1]', + time: 1603132712347, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: 'Simple track call', + os_version: '', + session_id: -1, + app_version: '1.1.5', + event_properties: { + key: 'val', + }, + }, + { + ip: '[::1]', + time: 1603132719505, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: 'Simple track call', + os_version: '', + session_id: -1, + app_version: '1.1.5', + event_properties: { + key: 'val', + }, + }, + { + ip: '[::1]', + time: 1603132726413, + groups: { + Company: 'Comapny-ABC', + }, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: '$identify', + os_version: '', + session_id: -1, + app_version: '1.1.5', + user_properties: { + Company: 'Comapny-ABC', + }, + }, + { + ip: '[::1]', + time: 1603132726413, + groups: { + Company: 'Comapny-ABC', + }, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: '$identify', + os_version: '', + session_id: -1, + app_version: '1.1.5', + user_properties: { + Company: 'Comapny-ABC', + }, + }, + ], + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/batch', + }, + metadata: [ + { + job_id: 2, + }, + { + job_id: 3, + }, + { + job_id: 4, + }, + { + job_id: 5, + }, + ], + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 5', + feature: 'batch', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + destType: 'am', + input: [ + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: [ + { + ip: '0.0.0.0', + time: 1603132665557, + os_name: '', + user_id: '123', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + library: 'rudderstack', + event_type: '$identify', + os_version: '', + session_id: -1, + app_version: '1.1.5', + user_properties: { + name: 'some campaign', + plan: 'Open source', + term: 'keyword', + test: 'other value', + email: 'test@rudderstack.com', + logins: 5, + medium: 'medium', + source: 'google', + content: 'some content', + category: 'SampleIdentify', + createdAt: 1599264000, + }, + }, + ], + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + options: { + min_id_length: 1, + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/2/httpapi', + }, + metadata: { + job_id: 1, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: [ + { + ip: '[::1]', + time: 1603132712347, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: 'Simple track call', + os_version: '', + session_id: -1, + app_version: '1.1.5', + event_properties: { + key: 'val', + }, + }, + ], + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + options: { + min_id_length: 1, + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/2/httpapi', + }, + metadata: { + job_id: 2, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: [ + { + ip: '[::1]', + time: 1603132719505, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: 'Simple track call', + os_version: '', + session_id: -1, + app_version: '1.1.5', + event_properties: { + key: 'val', + }, + }, + ], + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + options: { + min_id_length: 1, + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/2/httpapi', + }, + metadata: { + job_id: 3, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: [ + { + ip: '[::1]', + time: 1603132726413, + groups: { + Company: 'Comapny-ABC', + }, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: '$identify', + os_version: '', + session_id: -1, + app_version: '1.1.5', + user_properties: { + Company: 'Comapny-ABC', + }, + }, + ], + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + options: { + min_id_length: 1, + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/2/httpapi', + }, + metadata: { + job_id: 4, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: [ + { + ip: '[::1]', + time: 1603132726413, + groups: { + Company: 'Comapny-ABC', + }, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: '$identify', + os_version: '', + session_id: -1, + app_version: '1.1.5', + user_properties: { + Company: 'Comapny-ABC', + }, + }, + ], + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + options: { + min_id_length: 1, + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/2/httpapi', + }, + metadata: { + job_id: 5, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: { + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + identification: [ + '{"group_type":"Company","group_value":"Comapny-ABC","group_properties":{"KEY_2":{"CHILD_KEY_102":"value_103","CHILD_KEY_92":"value_95"},"KEY_3":{"CHILD_KEY_102":"value_103","CHILD_KEY_92":"value_95"},"name_trait":"Company","value_trait":"Comapny-ABC"}}', + ], + }, + JSON: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: {}, + version: '1', + endpoint: 'https://api2.amplitude.com/groupidentify', + }, + metadata: { + job_id: 6, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: { + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + mapping: ['{"global_user_id":"newUserIdAlias","user_id":"sampleusrRudder3"}'], + }, + JSON: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: {}, + version: '1', + endpoint: 'https://api2.amplitude.com/usermap', + }, + metadata: { + job_id: 7, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + ], + }, + }, + }, + output: { + response: { + status: 200, + body: [ + { + batchedRequest: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: [ + { + ip: '0.0.0.0', + time: 1603132665557, + os_name: '', + user_id: '123', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + library: 'rudderstack', + event_type: '$identify', + os_version: '', + session_id: -1, + app_version: '1.1.5', + user_properties: { + name: 'some campaign', + plan: 'Open source', + term: 'keyword', + test: 'other value', + email: 'test@rudderstack.com', + logins: 5, + medium: 'medium', + source: 'google', + content: 'some content', + category: 'SampleIdentify', + createdAt: 1599264000, + }, + }, + ], + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + options: { + min_id_length: 1, + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/2/httpapi', + }, + metadata: [ + { + job_id: 1, + }, + ], + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + batchedRequest: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: { + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + identification: [ + '{"group_type":"Company","group_value":"Comapny-ABC","group_properties":{"KEY_2":{"CHILD_KEY_102":"value_103","CHILD_KEY_92":"value_95"},"KEY_3":{"CHILD_KEY_102":"value_103","CHILD_KEY_92":"value_95"},"name_trait":"Company","value_trait":"Comapny-ABC"}}', + ], + }, + JSON: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: {}, + version: '1', + endpoint: 'https://api2.amplitude.com/groupidentify', + }, + metadata: [ + { + job_id: 6, + }, + ], + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + batchedRequest: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: { + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + mapping: ['{"global_user_id":"newUserIdAlias","user_id":"sampleusrRudder3"}'], + }, + JSON: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: {}, + version: '1', + endpoint: 'https://api2.amplitude.com/usermap', + }, + metadata: [ + { + job_id: 7, + }, + ], + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + batchedRequest: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: [ + { + ip: '[::1]', + time: 1603132712347, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: 'Simple track call', + os_version: '', + session_id: -1, + app_version: '1.1.5', + event_properties: { + key: 'val', + }, + }, + { + ip: '[::1]', + time: 1603132719505, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: 'Simple track call', + os_version: '', + session_id: -1, + app_version: '1.1.5', + event_properties: { + key: 'val', + }, + }, + { + ip: '[::1]', + time: 1603132726413, + groups: { + Company: 'Comapny-ABC', + }, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: '$identify', + os_version: '', + session_id: -1, + app_version: '1.1.5', + user_properties: { + Company: 'Comapny-ABC', + }, + }, + { + ip: '[::1]', + time: 1603132726413, + groups: { + Company: 'Comapny-ABC', + }, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: '$identify', + os_version: '', + session_id: -1, + app_version: '1.1.5', + user_properties: { + Company: 'Comapny-ABC', + }, + }, + ], + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/batch', + }, + metadata: [ + { + job_id: 2, + }, + { + job_id: 3, + }, + { + job_id: 4, + }, + { + job_id: 5, + }, + ], + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + ], + }, + }, + }, +]; diff --git a/test/integrations/destinations/am/processor/data.ts b/test/integrations/destinations/am/processor/data.ts new file mode 100644 index 0000000000..5e941e07f8 --- /dev/null +++ b/test/integrations/destinations/am/processor/data.ts @@ -0,0 +1,11322 @@ +export const data = [ + { + name: 'am', + description: 'Test 0: ERROR - Event not present. Please send event field', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + sentAt: '2020-08-14T05:30:30.118Z', + context: { + source: 'test', + traits: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + library: { + name: 'rudder-sdk-ruby-sync', + version: '1.0.6', + }, + }, + messageId: '7208bbb6-2c4e-45bb-bf5b-ad426f3593e9', + timestamp: '2020-08-14T05:30:30.118Z', + properties: { + tax: 2, + total: 27.5, + coupon: 'hasbros', + revenue: 48, + revenue_type: 'Purchased', + quantity: 2, + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + shipping: 3, + subtotal: 22.5, + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + }, + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + integrations: { + S3: false, + All: true, + }, + }, + destination: { + Config: { + apiKey: 'abcde', + groupTypeTrait: 'email', + groupValueTrait: 'age', + trackProductsOnce: true, + trackRevenuePerProduct: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: 'Event not present. Please send event field', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'AM', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 1: ERROR - message type not supported', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'UNSUPPORTED-TYPE', + event: 'Order Completed', + sentAt: '2020-08-14T05:30:30.118Z', + context: {}, + messageId: '7208bbb6-2c4e-45bb-bf5b-ad426f3593e9', + timestamp: '2020-08-14T05:30:30.118Z', + properties: {}, + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + integrations: { + S3: false, + All: true, + }, + }, + destination: { + Config: { + groupTypeTrait: 'email', + apiKey: 'abcde', + groupValueTrait: 'age', + trackProductsOnce: true, + trackRevenuePerProduct: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: 'message type not supported', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'AM', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 2: ERROR - No API Key is Found. Please Configure API key from dashbaord', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + event: 'Order Completed', + sentAt: '2020-08-14T05:30:30.118Z', + context: {}, + messageId: '7208bbb6-2c4e-45bb-bf5b-ad426f3593e9', + timestamp: '2020-08-14T05:30:30.118Z', + properties: {}, + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + integrations: { + S3: false, + All: true, + }, + }, + destination: { + Config: { + groupTypeTrait: 'email', + groupValueTrait: 'age', + trackProductsOnce: true, + trackRevenuePerProduct: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: 'No API Key is Found. Please Configure API key from dashbaord', + statTags: { + errorCategory: 'dataValidation', + errorType: 'configuration', + destType: 'AM', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 3', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + event: 'Order Completed', + sentAt: '2020-08-14T05:30:30.118Z', + context: { + source: 'test', + traits: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + library: { + name: 'rudder-sdk-ruby-sync', + version: '1.0.6', + }, + }, + messageId: '7208bbb6-2c4e-45bb-bf5b-ad426f3593e9', + timestamp: '2020-08-14T05:30:30.118Z', + properties: { + tax: 2, + total: 27.5, + coupon: 'hasbros', + revenue: 48, + revenue_type: 'Purchased', + quantity: 2, + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + shipping: 3, + subtotal: 22.5, + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + }, + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + integrations: { + S3: false, + All: true, + }, + }, + destination: { + Config: { + apiKey: 'abcde', + groupTypeTrait: 'email', + groupValueTrait: 'age', + trackProductsOnce: true, + trackRevenuePerProduct: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + device_id: '50be5c78-6c3f-4b60-be84-97805a316fb1', + quantity: 1, + revenue: 48, + revenueType: 'Purchased', + insert_id: '7208bbb6-2c4e-45bb-bf5b-ad426f3593e9', + user_properties: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + event_properties: { + tax: 2, + total: 27.5, + coupon: 'hasbros', + revenue_type: 'Purchased', + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + shipping: 3, + subtotal: 22.5, + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + }, + event_type: 'Order Completed', + price: 48, + time: 1597383030118, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 4', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + event: 'Order Completed', + sentAt: '2020-08-14T05:30:30.118Z', + context: { + source: 'test', + traits: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + library: { + name: 'rudder-sdk-ruby-sync', + version: '1.0.6', + }, + }, + messageId: '7208bbb6-2c4e-45bb-bf5b-ad426f3593e9', + timestamp: '2020-08-14T05:30:30.118Z', + properties: { + tax: 2, + total: 27.5, + coupon: 'hasbros', + revenue: 48, + quantity: 2, + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + products: [ + { + sku: '45790-32', + url: 'https://www.example.com/product/path', + name: 'Monopoly: 3rd Edition', + price: 19, + category: 'Games', + quantity: 1, + image_url: 'https:///www.example.com/product/path.jpg', + product_id: '507f1f77bcf86cd799439011', + }, + { + sku: '46493-32', + name: 'Uno Card Game', + price: 3, + category: 'Games', + quantity: 2, + product_id: '505bd76785ebb509fc183733', + }, + ], + shipping: 3, + subtotal: 22.5, + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + }, + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + integrations: { + S3: false, + All: true, + }, + }, + destination: { + Config: { + apiKey: 'abcde', + groupTypeTrait: 'email', + groupValueTrait: 'age', + trackProductsOnce: true, + trackRevenuePerProduct: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + device_id: '50be5c78-6c3f-4b60-be84-97805a316fb1', + insert_id: '7208bbb6-2c4e-45bb-bf5b-ad426f3593e9', + user_properties: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + event_properties: { + tax: 2, + total: 27.5, + coupon: 'hasbros', + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + products: [ + { + sku: '45790-32', + url: 'https://www.example.com/product/path', + name: 'Monopoly: 3rd Edition', + price: 19, + category: 'Games', + quantity: 1, + image_url: 'https:///www.example.com/product/path.jpg', + product_id: '507f1f77bcf86cd799439011', + }, + { + sku: '46493-32', + name: 'Uno Card Game', + price: 3, + category: 'Games', + quantity: 2, + product_id: '505bd76785ebb509fc183733', + }, + ], + shipping: 3, + subtotal: 22.5, + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + }, + event_type: 'Order Completed', + revenueType: 'Purchased', + price: 48, + quantity: 1, + revenue: 48, + time: 1597383030118, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 5', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + externalId: [ + { + id: 'lynnanderson@smith.net', + identifierType: 'device_id', + type: 'AM-users', + }, + ], + mappedToDestination: 'true', + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + anonymousId: '123456', + email: 'test@rudderstack.com', + address: { + country: 'India', + postalCode: 712136, + state: 'WB', + street: '', + os_version: 'test os', + }, + ip: '0.0.0.0', + age: 26, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + }, + traits: { + anonymousId: '123456', + email: 'test@rudderstack.com', + city: 'kolkata', + address: { + country: 'India', + postalCode: 712136, + state: 'WB', + street: '', + }, + os_version: 'test os', + ip: '0.0.0.0', + age: 26, + }, + type: 'identify', + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: '123456', + userId: '123456', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + metadata: { + jobId: 2, + }, + destination: { + Config: { + apiKey: 'abcde', + groupTypeTrait: 'email', + groupValueTrait: 'age', + traitsToIncrement: [ + { + traits: '', + }, + ], + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Chrome', + os_version: 'test os', + device_model: 'Mac', + platform: 'Web', + device_id: 'lynnanderson@smith.net', + app_name: 'RudderLabs JavaScript SDK', + app_version: '1.0.0', + language: 'en-US', + insert_id: '84e26acc-56a5-4835-8233-591137fca468', + ip: '0.0.0.0', + user_properties: { + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + anonymousId: '123456', + email: 'test@rudderstack.com', + postalCode: 712136, + state: 'WB', + street: '', + ip: '0.0.0.0', + age: 26, + device_id: 'lynnanderson@smith.net', + }, + event_type: '$identify', + time: 1571043797562, + user_id: '123456', + session_id: -1, + country: 'India', + city: 'kolkata', + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '123456', + }, + metadata: { + jobId: 2, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 6', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + externalId: [ + { + id: 'lynnanderson@smith.net', + identifierType: 'device_id', + type: 'AM-users', + }, + ], + mappedToDestination: 'true', + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + anonymousId: '123456', + email: 'test@rudderstack.com', + address: { + country: 'India', + postalCode: 712136, + state: 'WB', + street: '', + os_version: 'test os', + }, + ip: '0.0.0.0', + age: 26, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + }, + traits: { + anonymousId: '123456', + email: 'test@rudderstack.com', + city: 'kolkata', + address: { + country: 'India', + postalCode: 712136, + state: 'WB', + street: '', + }, + os_version: 'test os', + ip: '0.0.0.0', + age: 26, + }, + type: 'identify', + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: '123456', + userId: '123456', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + metadata: { + jobId: 2, + }, + destination: { + Config: { + apiKey: 'abcde', + groupTypeTrait: 'email', + groupValueTrait: 'age', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Chrome', + os_version: 'test os', + device_model: 'Mac', + platform: 'Web', + device_id: 'lynnanderson@smith.net', + app_name: 'RudderLabs JavaScript SDK', + app_version: '1.0.0', + language: 'en-US', + insert_id: '84e26acc-56a5-4835-8233-591137fca468', + ip: '0.0.0.0', + user_properties: { + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + anonymousId: '123456', + email: 'test@rudderstack.com', + postalCode: 712136, + state: 'WB', + street: '', + ip: '0.0.0.0', + age: 26, + device_id: 'lynnanderson@smith.net', + }, + event_type: '$identify', + time: 1571043797562, + user_id: '123456', + session_id: -1, + country: 'India', + city: 'kolkata', + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '123456', + }, + metadata: { + jobId: 2, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 7', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + anonymousId: '123456', + email: 'test@rudderstack.com', + address: { + city: 'kolkata', + country: 'India', + postalCode: 712136, + state: 'WB', + street: '', + }, + ip: '0.0.0.0', + age: 26, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + }, + type: 'identify', + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: '123456', + userId: '123456', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + apiKey: 'abcde', + groupTypeTrait: 'email', + groupValueTrait: 'age', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Chrome', + os_version: '77.0.3865.90', + device_model: 'Mac', + platform: 'Web', + device_id: '123456', + app_name: 'RudderLabs JavaScript SDK', + app_version: '1.0.0', + language: 'en-US', + insert_id: '84e26acc-56a5-4835-8233-591137fca468', + user_properties: { + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + anonymousId: '123456', + email: 'test@rudderstack.com', + postalCode: 712136, + state: 'WB', + street: '', + ip: '0.0.0.0', + age: 26, + }, + event_type: '$identify', + time: 1571043797562, + user_id: '123456', + session_id: -1, + country: 'India', + city: 'kolkata', + ip: '0.0.0.0', + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '123456', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 8', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'test@rudderstack.com', + anonymousId: '12345', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + }, + request_ip: '1.1.1.1', + type: 'page', + messageId: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T11:15:18.299Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + properties: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + integrations: { + All: true, + }, + name: 'ApplicationLoaded', + sentAt: '2019-10-14T11:15:53.296Z', + }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Chrome', + os_version: '77.0.3865.90', + device_model: 'Mac', + platform: 'Web', + device_id: '00000000000000000000000000', + app_name: 'RudderLabs JavaScript SDK', + app_version: '1.0.0', + language: 'en-US', + event_type: 'Viewed ApplicationLoaded Page', + event_properties: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + name: 'ApplicationLoaded', + }, + insert_id: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', + ip: '1.1.1.1', + user_properties: { + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + email: 'test@rudderstack.com', + anonymousId: '12345', + }, + user_id: '12345', + time: 1571051718299, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '00000000000000000000000000', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 9', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'test@rudderstack.com', + anonymousId: '12345', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + }, + request_ip: '1.1.1.1', + type: 'page', + messageId: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T11:15:18.299Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + properties: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + integrations: { + All: false, + Amplitude: { + groups: { + Company: 'ABC', + }, + }, + }, + name: 'ApplicationLoaded', + sentAt: '2019-10-14T11:15:53.296Z', + }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Chrome', + os_version: '77.0.3865.90', + device_model: 'Mac', + platform: 'Web', + device_id: '00000000000000000000000000', + app_name: 'RudderLabs JavaScript SDK', + app_version: '1.0.0', + language: 'en-US', + event_type: 'Viewed ApplicationLoaded Page', + event_properties: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + name: 'ApplicationLoaded', + }, + insert_id: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', + ip: '1.1.1.1', + user_properties: { + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + email: 'test@rudderstack.com', + anonymousId: '12345', + }, + user_id: '12345', + groups: { + Company: 'ABC', + }, + time: 1571051718299, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '00000000000000000000000000', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 10', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'test@rudderstack.com', + anonymousId: '12345', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + }, + type: 'track', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T11:15:18.300Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + event: 'test track event', + properties: { + user_actual_role: 'system_admin', + user_actual_id: 12345, + user_time_spent: 50000, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T11:15:53.296Z', + }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Chrome', + os_version: '77.0.3865.90', + device_model: 'Mac', + platform: 'Web', + device_id: '00000000000000000000000000', + app_name: 'RudderLabs JavaScript SDK', + app_version: '1.0.0', + language: 'en-US', + insert_id: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + user_properties: { + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + email: 'test@rudderstack.com', + anonymousId: '12345', + }, + event_properties: { + user_actual_role: 'system_admin', + user_actual_id: 12345, + user_time_spent: 50000, + }, + event_type: 'test track event', + user_id: '12345', + time: 1571051718300, + session_id: -1, + ip: '0.0.0.0', + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '00000000000000000000000000', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 11', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + address: { + city: 'Sealdah', + country: 'India', + postalCode: 700014, + state: 'WB', + street: '', + }, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + }, + traits: { + anonymousId: '123456', + email: 'test@rudderstack.com', + address: { + city: 'kolkata', + country: 'India', + postalCode: 712136, + state: 'WB', + street: '', + }, + ip: '0.0.0.0', + age: 26, + }, + type: 'identify', + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: '123456', + userId: '123456', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Chrome', + os_version: '77.0.3865.90', + device_model: 'Mac', + platform: 'Web', + device_id: '123456', + app_name: 'RudderLabs JavaScript SDK', + app_version: '1.0.0', + language: 'en-US', + insert_id: '84e26acc-56a5-4835-8233-591137fca468', + ip: '0.0.0.0', + user_properties: { + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + anonymousId: '123456', + email: 'test@rudderstack.com', + postalCode: 712136, + state: 'WB', + street: '', + ip: '0.0.0.0', + age: 26, + }, + event_type: '$identify', + time: 1571043797562, + user_id: '123456', + session_id: -1, + country: 'India', + city: 'kolkata', + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '123456', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 12', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'identify', + userId: 'ubcdfghi0001', + anonymousId: '123456', + session_id: '1598597129', + context: { + traits: { + device_id: 'adddd0001', + device_os: 'ios', + device_make: 'apple iphone', + app_version: 'v1.0', + timestamp: '2020-08-28 09:00:00', + }, + library: { + name: 'http', + }, + }, + }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + device_id: '123456', + user_properties: { + device_id: 'adddd0001', + device_os: 'ios', + device_make: 'apple iphone', + app_version: 'v1.0', + timestamp: '2020-08-28 09:00:00', + }, + event_type: '$identify', + time: 0, + user_id: 'ubcdfghi0001', + session_id: 1598597129, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '123456', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 13', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'identify', + userId: 'ubcdfghi0001', + anonymousId: '123456', + session_id: 'user:1598597129', + context: { + traits: { + device_id: 'adddd0001', + device_os: 'ios', + device_make: 'apple iphone', + app_version: 'v1.0', + timestamp: '2020-08-28 09:00:00', + }, + library: { + name: 'http', + }, + }, + }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + device_id: '123456', + user_properties: { + device_id: 'adddd0001', + device_os: 'ios', + device_make: 'apple iphone', + app_version: 'v1.0', + timestamp: '2020-08-28 09:00:00', + }, + event_type: '$identify', + time: 0, + user_id: 'ubcdfghi0001', + session_id: 1598597129, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '123456', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 14', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'identify', + userId: 'ubcdfghi0001', + anonymousId: '123456', + session_id: 1598597129, + context: { + traits: { + device_id: 'adddd0001', + device_os: 'ios', + device_make: 'apple iphone', + app_version: 'v1.0', + timestamp: '2020-08-28 09:00:00', + }, + library: { + name: 'http', + }, + }, + }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + device_id: '123456', + user_properties: { + device_id: 'adddd0001', + device_os: 'ios', + device_make: 'apple iphone', + app_version: 'v1.0', + timestamp: '2020-08-28 09:00:00', + }, + event_type: '$identify', + time: 0, + user_id: 'ubcdfghi0001', + session_id: 1598597129, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '123456', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 15', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'identify', + userId: 'ubcdfghi0001', + anonymousId: '123456', + context: { + traits: { + device_id: 'adddd0001', + device_os: 'ios', + device_make: 'apple iphone', + app_version: 'v1.0', + timestamp: '2020-08-28 09:00:00', + }, + library: { + name: 'http', + }, + }, + }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + device_id: '123456', + user_properties: { + device_id: 'adddd0001', + device_os: 'ios', + device_make: 'apple iphone', + app_version: 'v1.0', + timestamp: '2020-08-28 09:00:00', + }, + event_type: '$identify', + time: 0, + user_id: 'ubcdfghi0001', + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '123456', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 16', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.5', + }, + traits: { + name: 'Shehan Study', + category: 'SampleIdentify', + email: 'test@rudderstack.com', + plan: 'Open source', + logins: 5, + createdAt: 1599264000, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.5', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36', + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 0.8999999761581421, + }, + campaign: { + source: 'google', + medium: 'medium', + term: 'keyword', + content: 'some content', + name: 'some campaign', + test: 'other value', + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + }, + type: 'group', + messageId: 'e5034df0-a404-47b4-a463-76df99934fea', + originalTimestamp: '2020-10-20T07:54:58.983Z', + anonymousId: 'my-anonymous-id-new', + userId: 'sampleusrRudder3', + integrations: { + All: true, + Amplitude: { + groups: { + group_type: 'Company', + group_value: 'ABC', + }, + }, + }, + groupId: 'Sample_groupId23', + traits: { + KEY_3: { + CHILD_KEY_92: 'value_95', + CHILD_KEY_102: 'value_103', + }, + KEY_2: { + CHILD_KEY_92: 'value_95', + CHILD_KEY_102: 'value_103', + }, + name_trait: 'Company', + value_trait: 'ABC', + }, + sentAt: '2020-10-20T07:54:58.983Z', + }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Chrome', + os_version: '85.0.4183.121', + device_model: 'Mac', + platform: 'Web', + device_id: 'my-anonymous-id-new', + app_name: 'RudderLabs JavaScript SDK', + app_version: '1.1.5', + language: 'en-US', + user_properties: { + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + utm_source: 'google', + utm_medium: 'medium', + utm_term: 'keyword', + utm_content: 'some content', + utm_name: 'some campaign', + utm_test: 'other value', + Company: 'ABC', + }, + event_type: '$identify', + groups: { + Company: 'ABC', + }, + time: 1603180498983, + user_id: 'sampleusrRudder3', + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'my-anonymous-id-new', + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/groupidentify', + headers: {}, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: { + api_key: 'abcde', + identification: ['{"group_type":"Company","group_value":"ABC"}'], + }, + }, + files: {}, + userId: 'my-anonymous-id-new', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 17', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.5', + }, + traits: { + name: 'Shehan Study', + category: 'SampleIdentify', + email: 'test@rudderstack.com', + plan: 'Open source', + logins: 5, + createdAt: 1599264000, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.5', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36', + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 0.8999999761581421, + }, + campaign: { + source: 'google', + medium: 'medium', + term: 'keyword', + content: 'some content', + name: 'some campaign', + test: 'other value', + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + }, + type: 'group', + messageId: 'e5034df0-a404-47b4-a463-76df99934fea', + originalTimestamp: '2020-10-20T07:54:58.983Z', + anonymousId: 'my-anonymous-id-new', + userId: 'sampleusrRudder3', + integrations: { + All: true, + }, + groupId: 'Sample_groupId23', + traits: { + KEY_3: { + CHILD_KEY_92: 'value_95', + CHILD_KEY_102: 'value_103', + }, + KEY_2: { + CHILD_KEY_92: 'value_95', + CHILD_KEY_102: 'value_103', + }, + name_trait: 'Company', + value_trait: 'ABC', + }, + sentAt: '2020-10-20T07:54:58.983Z', + }, + destination: { + Config: { + apiKey: 'abcde', + groupTypeTrait: 'name_trait', + groupValueTrait: 'value_trait', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Chrome', + os_version: '85.0.4183.121', + device_model: 'Mac', + platform: 'Web', + device_id: 'my-anonymous-id-new', + app_name: 'RudderLabs JavaScript SDK', + app_version: '1.1.5', + language: 'en-US', + user_properties: { + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + utm_source: 'google', + utm_medium: 'medium', + utm_term: 'keyword', + utm_content: 'some content', + utm_name: 'some campaign', + utm_test: 'other value', + Company: 'ABC', + }, + event_type: '$identify', + groups: { + Company: 'ABC', + }, + time: 1603180498983, + user_id: 'sampleusrRudder3', + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'my-anonymous-id-new', + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/groupidentify', + headers: {}, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: { + api_key: 'abcde', + identification: [ + '{"group_type":"Company","group_value":"ABC","group_properties":{"KEY_3":{"CHILD_KEY_92":"value_95","CHILD_KEY_102":"value_103"},"KEY_2":{"CHILD_KEY_92":"value_95","CHILD_KEY_102":"value_103"},"name_trait":"Company","value_trait":"ABC"}}', + ], + }, + }, + files: {}, + userId: 'my-anonymous-id-new', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 18: ERROR - Group call parameters are not valid', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.5', + }, + traits: { + name: 'Shehan Study', + category: 'SampleIdentify', + email: 'test@rudderstack.com', + plan: 'Open source', + logins: 5, + createdAt: 1599264000, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.5', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36', + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 0.8999999761581421, + }, + campaign: { + source: 'google', + medium: 'medium', + term: 'keyword', + content: 'some content', + name: 'some campaign', + test: 'other value', + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + }, + type: 'group', + messageId: 'e5034df0-a404-47b4-a463-76df99934fea', + originalTimestamp: '2020-10-20T07:54:58.983Z', + anonymousId: 'my-anonymous-id-new', + userId: 'sampleusrRudder3', + integrations: { + All: true, + }, + groupId: 'Sample_groupId23', + traits: { + KEY_3: { + CHILD_KEY_92: 'value_95', + CHILD_KEY_102: 'value_103', + }, + KEY_2: { + CHILD_KEY_92: 'value_95', + CHILD_KEY_102: 'value_103', + }, + name_trait: 'Company', + value_trait: ['ABC'], + }, + sentAt: '2020-10-20T07:54:58.983Z', + }, + destination: { + Config: { + apiKey: 'abcde', + groupTypeTrait: 'name_trait', + groupValueTrait: 'value_trait', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: 'Group call parameters are not valid', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'AM', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 19', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.5', + }, + traits: { + name: 'Shehan Study', + category: 'SampleIdentify', + email: 'test@rudderstack.com', + plan: 'Open source', + logins: 5, + createdAt: 1599264000, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.5', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36', + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 0.8999999761581421, + }, + campaign: { + source: 'google', + medium: 'medium', + term: 'keyword', + content: 'some content', + name: 'some campaign', + test: 'other value', + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + }, + type: 'alias', + messageId: 'dd46338d-5f83-493b-bd28-3b48f55d0be8', + originalTimestamp: '2020-10-20T08:14:28.778Z', + anonymousId: 'my-anonymous-id-new', + userId: 'newUserIdAlias', + integrations: { + All: true, + }, + previousId: 'sampleusrRudder3', + sentAt: '2020-10-20T08:14:28.778Z', + }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/usermap', + headers: {}, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: { + api_key: 'abcde', + mapping: [ + '{"global_user_id":"newUserIdAlias","user_id":"sampleusrRudder3","user_properties":{"initial_referrer":"https://docs.rudderstack.com","initial_referring_domain":"docs.rudderstack.com","utm_source":"google","utm_medium":"medium","utm_term":"keyword","utm_content":"some content","utm_name":"some campaign","utm_test":"other value"}}', + ], + }, + }, + files: {}, + userId: 'my-anonymous-id-new', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 20', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.5', + }, + traits: { + name: 'Shehan Study', + category: 'SampleIdentify', + email: 'test@rudderstack.com', + plan: 'Open source', + logins: 5, + createdAt: 1599264000, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.5', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36', + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 0.8999999761581421, + }, + campaign: { + source: 'google', + medium: 'medium', + term: 'keyword', + content: 'some content', + name: 'some campaign', + test: 'other value', + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + }, + type: 'alias', + messageId: 'dd46338d-5f83-493b-bd28-3b48f55d0be8', + originalTimestamp: '2020-10-20T08:14:28.778Z', + anonymousId: 'my-anonymous-id-new', + userId: 'newUserIdAlias', + integrations: { + All: false, + Amplitude: { + unmap: 'sampleusrRudder3', + }, + }, + previousId: 'sampleusrRudder3', + sentAt: '2020-10-20T08:14:28.778Z', + }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/usermap', + headers: {}, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: { + api_key: 'abcde', + mapping: [ + '{"user_id":"sampleusrRudder3","user_properties":{"initial_referrer":"https://docs.rudderstack.com","initial_referring_domain":"docs.rudderstack.com","utm_source":"google","utm_medium":"medium","utm_term":"keyword","utm_content":"some content","utm_name":"some campaign","utm_test":"other value"},"unmap":true}', + ], + }, + }, + files: {}, + userId: 'my-anonymous-id-new', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 21', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + event: 'Sample track event BEFORE IDENTIFY1**', + sentAt: '2020-09-17T15:07:13.171Z', + userId: '0572f78fa49c648e', + channel: 'mobile', + context: { + os: { + name: 'Android', + version: '9', + }, + app: { + name: 'AMTestProject', + build: '1', + version: '1.0', + namespace: 'com.rudderstack.android.rudderstack.sampleAndroidApp', + }, + locale: 'en-US', + screen: { + width: 1080, + height: 2088, + density: 440, + }, + traits: { + id: '0572f78fa49c648e', + userId: '0572f78fa49c648e', + address: {}, + company: {}, + anonymousId: '0572f78fa49c648e', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.4', + }, + network: { + wifi: true, + carrier: 'Android', + cellular: true, + bluetooth: false, + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + timezone: 'Asia/Kolkata', + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)', + }, + messageId: '1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466', + anonymousId: '0572f78fa49c648e', + integrations: { + All: true, + }, + originalTimestamp: '2020-09-17T15:07:03.515Z', + }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Android', + os_version: '9', + device_id: '0572f78fa49c648e', + carrier: 'Android', + app_name: 'AMTestProject', + app_version: '1.0', + language: 'en-US', + insert_id: '1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466', + user_properties: { + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + id: '0572f78fa49c648e', + userId: '0572f78fa49c648e', + address: {}, + company: {}, + anonymousId: '0572f78fa49c648e', + }, + event_type: 'Sample track event BEFORE IDENTIFY1**', + user_id: '0572f78fa49c648e', + time: 1600355223515, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '0572f78fa49c648e', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 22', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + event: 'Sample track event BEFORE IDENTIFY1**', + sentAt: '2020-09-17T15:07:13.171Z', + userId: '0572f78fa49c648e', + channel: 'mobile', + context: { + os: { + name: 'Android', + version: '9', + }, + app: { + name: 'AMTestProject', + build: '1', + version: '1.0', + namespace: 'com.rudderstack.android.rudderstack.sampleAndroidApp', + }, + device: { + id: '0572f78fa49c648e', + name: 'generic_x86_arm', + type: 'Android', + model: 'AOSP on IA Emulator', + manufacturer: 'Google', + adTrackingEnabled: false, + }, + locale: 'en-US', + screen: { + width: 1080, + height: 2088, + density: 440, + }, + traits: { + id: '0572f78fa49c648e', + userId: '0572f78fa49c648e', + address: {}, + company: {}, + anonymousId: '0572f78fa49c648e', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.4', + }, + network: { + wifi: true, + carrier: 'Android', + cellular: true, + bluetooth: false, + }, + timezone: 'Asia/Kolkata', + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)', + }, + messageId: '1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466', + anonymousId: '0572f78fa49c648e', + integrations: { + All: true, + }, + originalTimestamp: '2020-09-17T15:07:03.515Z', + }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Android', + os_version: '9', + device_model: 'AOSP on IA Emulator', + device_manufacturer: 'Google', + platform: 'Android', + device_id: '0572f78fa49c648e', + carrier: 'Android', + app_name: 'AMTestProject', + app_version: '1.0', + language: 'en-US', + insert_id: '1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466', + user_properties: { + id: '0572f78fa49c648e', + userId: '0572f78fa49c648e', + address: {}, + company: {}, + anonymousId: '0572f78fa49c648e', + }, + event_type: 'Sample track event BEFORE IDENTIFY1**', + user_id: '0572f78fa49c648e', + device_brand: 'Google', + time: 1600355223515, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '0572f78fa49c648e', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 23', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + event: 'Sample track event BEFORE IDENTIFY1**', + sentAt: '2020-09-17T15:07:13.171Z', + userId: '0572f78fa49c648e', + channel: 'mobile', + context: { + os: { + name: 'Android', + version: '9', + }, + app: { + name: 'AMTestProject', + build: '1', + version: '1.0', + namespace: 'com.rudderstack.android.rudderstack.sampleAndroidApp', + }, + device: { + id: '0572f78fa49c648e', + name: 'generic_x86_arm', + type: 'Android', + model: 'AOSP on IA Emulator', + manufacturer: 'Google', + adTrackingEnabled: true, + advertisingId: '44c97318-9040-4361-8bc7-4eb30f665ca8', + }, + locale: 'en-US', + screen: { + width: 1080, + height: 2088, + density: 440, + }, + traits: { + id: '0572f78fa49c648e', + userId: '0572f78fa49c648e', + address: {}, + company: {}, + anonymousId: '0572f78fa49c648e', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.4', + }, + network: { + wifi: true, + carrier: 'Android', + cellular: true, + bluetooth: false, + }, + timezone: 'Asia/Kolkata', + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)', + }, + messageId: '1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466', + anonymousId: '0572f78fa49c648e', + integrations: { + All: true, + }, + originalTimestamp: '2020-09-17T15:07:03.515Z', + }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Android', + os_version: '9', + device_model: 'AOSP on IA Emulator', + device_manufacturer: 'Google', + platform: 'Android', + device_id: '0572f78fa49c648e', + carrier: 'Android', + app_name: 'AMTestProject', + app_version: '1.0', + language: 'en-US', + insert_id: '1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466', + user_properties: { + id: '0572f78fa49c648e', + userId: '0572f78fa49c648e', + address: {}, + company: {}, + anonymousId: '0572f78fa49c648e', + }, + event_type: 'Sample track event BEFORE IDENTIFY1**', + user_id: '0572f78fa49c648e', + device_brand: 'Google', + adid: '44c97318-9040-4361-8bc7-4eb30f665ca8', + time: 1600355223515, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '0572f78fa49c648e', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 24', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + event: 'Sample track event BEFORE IDENTIFY1**', + sentAt: '2020-09-17T15:07:13.171Z', + userId: '0572f78fa49c648e', + channel: 'mobile', + context: { + os: { + name: 'iOS', + version: '14.4.1', + }, + app: { + name: 'AMTestProject', + build: '1', + version: '1.0', + namespace: 'com.rudderstack.android.rudderstack.sampleAndroidApp', + }, + device: { + id: '0572f78fa49c648e', + name: 'iphone_xr_64', + type: 'iOS', + model: 'iPhone XR', + manufacturer: 'Apple', + adTrackingEnabled: false, + }, + locale: 'en-US', + screen: { + width: 1080, + height: 2088, + density: 440, + }, + traits: { + id: '0572f78fa49c648e', + userId: '0572f78fa49c648e', + address: {}, + company: {}, + anonymousId: '0572f78fa49c648e', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.4', + }, + network: { + wifi: true, + carrier: 'AT&T', + cellular: true, + bluetooth: false, + }, + timezone: 'Asia/Kolkata', + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)', + }, + messageId: '1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466', + anonymousId: '0572f78fa49c648e', + integrations: { + All: true, + }, + originalTimestamp: '2020-09-17T15:07:03.515Z', + }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'iOS', + os_version: '14.4.1', + device_model: 'iPhone XR', + device_manufacturer: 'Apple', + platform: 'iOS', + device_id: '0572f78fa49c648e', + carrier: 'AT&T', + app_name: 'AMTestProject', + app_version: '1.0', + language: 'en-US', + insert_id: '1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466', + user_properties: { + id: '0572f78fa49c648e', + userId: '0572f78fa49c648e', + address: {}, + company: {}, + anonymousId: '0572f78fa49c648e', + }, + event_type: 'Sample track event BEFORE IDENTIFY1**', + user_id: '0572f78fa49c648e', + device_brand: 'Apple', + idfv: '0572f78fa49c648e', + time: 1600355223515, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '0572f78fa49c648e', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 25', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + event: 'Sample track event BEFORE IDENTIFY1**', + sentAt: '2020-09-17T15:07:13.171Z', + userId: '0572f78fa49c648e', + channel: 'mobile', + context: { + os: { + name: 'iOS', + version: '14.4.1', + }, + app: { + name: 'AMTestProject', + build: '1', + version: '1.0', + namespace: 'com.rudderstack.android.rudderstack.sampleAndroidApp', + }, + device: { + id: '0572f78fa49c648e', + name: 'iphone_xr_64', + type: 'iOS', + model: 'iPhone XR', + manufacturer: 'Apple', + adTrackingEnabled: true, + advertisingId: '1606e649-c97e-4d5f-a2ef-b81dbc66741a', + }, + locale: 'en-US', + screen: { + width: 1080, + height: 2088, + density: 440, + }, + traits: { + id: '0572f78fa49c648e', + userId: '0572f78fa49c648e', + address: {}, + company: {}, + anonymousId: '0572f78fa49c648e', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.4', + }, + network: { + wifi: true, + carrier: 'AT&T', + cellular: true, + bluetooth: false, + }, + timezone: 'Asia/Kolkata', + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)', + }, + messageId: '1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466', + anonymousId: '0572f78fa49c648e', + integrations: { + All: true, + }, + originalTimestamp: '2020-09-17T15:07:03.515Z', + }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'iOS', + os_version: '14.4.1', + device_model: 'iPhone XR', + device_manufacturer: 'Apple', + platform: 'iOS', + device_id: '0572f78fa49c648e', + carrier: 'AT&T', + app_name: 'AMTestProject', + app_version: '1.0', + language: 'en-US', + insert_id: '1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466', + user_properties: { + id: '0572f78fa49c648e', + userId: '0572f78fa49c648e', + address: {}, + company: {}, + anonymousId: '0572f78fa49c648e', + }, + event_type: 'Sample track event BEFORE IDENTIFY1**', + user_id: '0572f78fa49c648e', + device_brand: 'Apple', + idfa: '1606e649-c97e-4d5f-a2ef-b81dbc66741a', + idfv: '0572f78fa49c648e', + time: 1600355223515, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '0572f78fa49c648e', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 26', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'screen', + userId: 'identified user id', + anonymousId: 'anon-id-new', + event: 'Screen View', + properties: { + prop1: '5', + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + device_id: 'anon-id-new', + event_properties: { + prop1: '5', + name: 'Screen View', + }, + user_properties: {}, + event_type: 'Viewed Screen View Screen', + user_id: 'identified user id', + time: 1580602989544, + session_id: -1, + ip: '14.5.67.21', + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'anon-id-new', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 27', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + event: 'Order Completed', + sentAt: '2020-08-14T05:30:30.118Z', + context: { + source: 'test', + traits: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + library: { + name: 'rudder-sdk-ruby-sync', + version: '1.0.6', + }, + }, + messageId: '7208bbb6-2c4e-45bb-bf5b-ad426f3593e9', + timestamp: '2020-08-14T05:30:30.118Z', + properties: { + tax: 2, + total: 27.5, + coupon: 'hasbros', + revenue: 48, + price: 25, + quantity: 2, + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + products: [ + { + sku: '45790-32', + url: 'https://www.example.com/product/path', + name: 'Monopoly: 3rd Edition', + price: 19, + category: 'Games', + quantity: 1, + image_url: 'https:///www.example.com/product/path.jpg', + product_id: '507f1f77bcf86cd799439011', + }, + { + sku: '46493-32', + name: 'Uno Card Game', + price: 3, + category: 'Games', + quantity: 2, + product_id: '505bd76785ebb509fc183733', + }, + ], + shipping: 3, + subtotal: 22.5, + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + }, + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + integrations: { + S3: false, + All: true, + }, + }, + destination: { + Config: { + apiKey: 'abcde', + groupTypeTrait: 'email', + groupValueTrait: 'age', + trackProductsOnce: false, + trackRevenuePerProduct: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + device_id: '50be5c78-6c3f-4b60-be84-97805a316fb1', + insert_id: '7208bbb6-2c4e-45bb-bf5b-ad426f3593e9', + user_properties: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + event_properties: { + tax: 2, + total: 27.5, + coupon: 'hasbros', + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + shipping: 3, + subtotal: 22.5, + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + }, + event_type: 'Order Completed', + revenueType: 'Purchased', + price: 25, + quantity: 2, + revenue: 48, + time: 1597383030118, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + device_id: '50be5c78-6c3f-4b60-be84-97805a316fb1', + event_type: 'Product Purchased', + insert_id: '7208bbb6-2c4e-45bb-bf5b-ad426f3593e9-1', + user_properties: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + event_properties: { + sku: '45790-32', + url: 'https://www.example.com/product/path', + name: 'Monopoly: 3rd Edition', + price: 19, + category: 'Games', + quantity: 1, + image_url: 'https:///www.example.com/product/path.jpg', + product_id: '507f1f77bcf86cd799439011', + }, + time: 1597383030118, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + device_id: '50be5c78-6c3f-4b60-be84-97805a316fb1', + event_type: 'Product Purchased', + insert_id: '7208bbb6-2c4e-45bb-bf5b-ad426f3593e9-2', + user_properties: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + event_properties: { + sku: '46493-32', + name: 'Uno Card Game', + price: 3, + category: 'Games', + quantity: 2, + product_id: '505bd76785ebb509fc183733', + }, + time: 1597383030118, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 28', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + event: 'Order Completed', + sentAt: '2020-08-14T05:30:30.118Z', + context: { + source: 'test', + traits: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + library: { + name: 'rudder-sdk-ruby-sync', + version: '1.0.6', + }, + }, + messageId: '7208bbb6-2c4e-45bb-bf5b-ad426f3593e9', + timestamp: '2020-08-14T05:30:30.118Z', + properties: { + tax: 2, + total: 27.5, + coupon: 'hasbros', + revenue: 48, + price: 25, + quantity: 2, + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + products: [ + { + sku: '45790-32', + url: 'https://www.example.com/product/path', + name: 'Monopoly: 3rd Edition', + price: 19, + category: 'Games', + quantity: 1, + image_url: 'https:///www.example.com/product/path.jpg', + product_id: '507f1f77bcf86cd799439011', + }, + { + sku: '46493-32', + name: 'Uno Card Game', + price: 3, + category: 'Games', + quantity: 2, + product_id: '505bd76785ebb509fc183733', + }, + ], + shipping: 3, + subtotal: 22.5, + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + }, + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + integrations: { + S3: false, + All: true, + }, + }, + destination: { + Config: { + apiKey: 'abcde', + groupTypeTrait: 'email', + groupValueTrait: 'age', + trackProductsOnce: true, + trackRevenuePerProduct: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + device_id: '50be5c78-6c3f-4b60-be84-97805a316fb1', + insert_id: '7208bbb6-2c4e-45bb-bf5b-ad426f3593e9', + user_properties: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + event_properties: { + tax: 2, + total: 27.5, + coupon: 'hasbros', + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + products: [ + { + sku: '45790-32', + url: 'https://www.example.com/product/path', + name: 'Monopoly: 3rd Edition', + price: 19, + category: 'Games', + quantity: 1, + image_url: 'https:///www.example.com/product/path.jpg', + product_id: '507f1f77bcf86cd799439011', + }, + { + sku: '46493-32', + name: 'Uno Card Game', + price: 3, + category: 'Games', + quantity: 2, + product_id: '505bd76785ebb509fc183733', + }, + ], + shipping: 3, + subtotal: 22.5, + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + }, + event_type: 'Order Completed', + revenueType: 'Purchased', + price: 25, + quantity: 2, + revenue: 48, + time: 1597383030118, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 29', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + event: 'Order Completed', + sentAt: '2020-08-14T05:30:30.118Z', + context: { + source: 'test', + traits: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + library: { + name: 'rudder-sdk-ruby-sync', + version: '1.0.6', + }, + }, + messageId: '7208bbb6-2c4e-45bb-bf5b-ad426f3593e9', + timestamp: '2020-08-14T05:30:30.118Z', + properties: { + tax: 2, + total: 27.5, + coupon: 'hasbros', + revenue: 48, + price: 25, + quantity: 2, + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + products: [ + { + sku: '45790-32', + url: 'https://www.example.com/product/path', + name: 'Monopoly: 3rd Edition', + price: 19, + category: 'Games', + quantity: 1, + image_url: 'https:///www.example.com/product/path.jpg', + product_id: '507f1f77bcf86cd799439011', + }, + { + sku: '46493-32', + name: 'Uno Card Game', + price: 3, + category: 'Games', + quantity: 2, + product_id: '505bd76785ebb509fc183733', + }, + ], + shipping: 3, + subtotal: 22.5, + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + }, + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + integrations: { + S3: false, + All: true, + }, + }, + destination: { + Config: { + apiKey: 'abcde', + groupTypeTrait: 'email', + groupValueTrait: 'age', + trackProductsOnce: false, + trackRevenuePerProduct: true, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + device_id: '50be5c78-6c3f-4b60-be84-97805a316fb1', + insert_id: '7208bbb6-2c4e-45bb-bf5b-ad426f3593e9', + user_properties: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + event_properties: { + tax: 2, + total: 27.5, + coupon: 'hasbros', + revenue: 48, + price: 25, + quantity: 2, + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + shipping: 3, + subtotal: 22.5, + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + }, + event_type: 'Order Completed', + time: 1597383030118, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + device_id: '50be5c78-6c3f-4b60-be84-97805a316fb1', + event_type: 'Product Purchased', + insert_id: '7208bbb6-2c4e-45bb-bf5b-ad426f3593e9-1', + user_properties: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + event_properties: { + sku: '45790-32', + url: 'https://www.example.com/product/path', + name: 'Monopoly: 3rd Edition', + category: 'Games', + image_url: 'https:///www.example.com/product/path.jpg', + }, + productId: '507f1f77bcf86cd799439011', + revenueType: 'Purchased', + price: 19, + quantity: 1, + time: 1597383030118, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + device_id: '50be5c78-6c3f-4b60-be84-97805a316fb1', + event_type: 'Product Purchased', + insert_id: '7208bbb6-2c4e-45bb-bf5b-ad426f3593e9-2', + user_properties: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + event_properties: { + sku: '46493-32', + name: 'Uno Card Game', + category: 'Games', + }, + productId: '505bd76785ebb509fc183733', + revenueType: 'Purchased', + price: 3, + quantity: 2, + time: 1597383030118, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 30', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + event: 'Order Completed', + sentAt: '2020-08-14T05:30:30.118Z', + context: { + source: 'test', + traits: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + library: { + name: 'rudder-sdk-ruby-sync', + version: '1.0.6', + }, + }, + messageId: '7208bbb6-2c4e-45bb-bf5b-ad426f3593e9', + timestamp: '2020-08-14T05:30:30.118Z', + properties: { + tax: 2, + total: 27.5, + coupon: 'hasbros', + revenue: 48, + price: 25, + quantity: 2, + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + products: [ + { + sku: '45790-32', + url: 'https://www.example.com/product/path', + name: 'Monopoly: 3rd Edition', + price: 19, + category: 'Games', + quantity: 1, + image_url: 'https:///www.example.com/product/path.jpg', + product_id: '507f1f77bcf86cd799439011', + }, + { + sku: '46493-32', + name: 'Uno Card Game', + price: 3, + category: 'Games', + quantity: 2, + product_id: '505bd76785ebb509fc183733', + }, + ], + shipping: 3, + subtotal: 22.5, + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + }, + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + integrations: { + S3: false, + All: true, + }, + }, + destination: { + Config: { + apiKey: 'abcde', + groupTypeTrait: 'email', + groupValueTrait: 'age', + trackProductsOnce: true, + trackRevenuePerProduct: true, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + device_id: '50be5c78-6c3f-4b60-be84-97805a316fb1', + insert_id: '7208bbb6-2c4e-45bb-bf5b-ad426f3593e9', + user_properties: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + event_properties: { + tax: 2, + total: 27.5, + coupon: 'hasbros', + revenue: 48, + price: 25, + quantity: 2, + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + products: [ + { + sku: '45790-32', + url: 'https://www.example.com/product/path', + name: 'Monopoly: 3rd Edition', + price: 19, + category: 'Games', + quantity: 1, + image_url: 'https:///www.example.com/product/path.jpg', + product_id: '507f1f77bcf86cd799439011', + }, + { + sku: '46493-32', + name: 'Uno Card Game', + price: 3, + category: 'Games', + quantity: 2, + product_id: '505bd76785ebb509fc183733', + }, + ], + shipping: 3, + subtotal: 22.5, + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + }, + event_type: 'Order Completed', + time: 1597383030118, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + device_id: '50be5c78-6c3f-4b60-be84-97805a316fb1', + event_type: 'Product Purchased', + insert_id: '7208bbb6-2c4e-45bb-bf5b-ad426f3593e9-1', + user_properties: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + event_properties: { + sku: '45790-32', + url: 'https://www.example.com/product/path', + name: 'Monopoly: 3rd Edition', + category: 'Games', + image_url: 'https:///www.example.com/product/path.jpg', + }, + productId: '507f1f77bcf86cd799439011', + revenueType: 'Purchased', + price: 19, + quantity: 1, + time: 1597383030118, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + device_id: '50be5c78-6c3f-4b60-be84-97805a316fb1', + event_type: 'Product Purchased', + insert_id: '7208bbb6-2c4e-45bb-bf5b-ad426f3593e9-2', + user_properties: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + event_properties: { + sku: '46493-32', + name: 'Uno Card Game', + category: 'Games', + }, + productId: '505bd76785ebb509fc183733', + revenueType: 'Purchased', + price: 3, + quantity: 2, + time: 1597383030118, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 31', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + event: 'Order Completed', + sentAt: '2020-08-14T05:30:30.118Z', + context: { + source: 'test', + traits: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + library: { + name: 'rudder-sdk-ruby-sync', + version: '1.0.6', + }, + }, + messageId: '7208bbb6-2c4e-45bb-bf5b-ad426f3593e9', + timestamp: '2020-08-14T05:30:30.118Z', + properties: { + tax: 2, + total: 27.5, + coupon: 'hasbros', + revenue: 48, + price: 25, + quantity: 2, + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + shipping: 3, + subtotal: 22.5, + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + }, + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + integrations: { + S3: false, + All: true, + }, + }, + destination: { + Config: { + apiKey: 'abcde', + groupTypeTrait: 'email', + groupValueTrait: 'age', + trackProductsOnce: true, + trackRevenuePerProduct: true, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + device_id: '50be5c78-6c3f-4b60-be84-97805a316fb1', + insert_id: '7208bbb6-2c4e-45bb-bf5b-ad426f3593e9', + user_properties: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + event_properties: { + tax: 2, + total: 27.5, + coupon: 'hasbros', + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + shipping: 3, + subtotal: 22.5, + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + }, + event_type: 'Order Completed', + revenueType: 'Purchased', + price: 25, + quantity: 2, + revenue: 48, + time: 1597383030118, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 32', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + event: 'Order Completed', + sentAt: '2020-08-14T05:30:30.118Z', + context: { + source: 'test', + traits: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + library: { + name: 'rudder-sdk-ruby-sync', + version: '1.0.6', + }, + }, + messageId: '7208bbb6-2c4e-45bb-bf5b-ad426f3593e9', + timestamp: '2020-08-14T05:30:30.118Z', + properties: { + tax: 2, + total: 27.5, + coupon: 'hasbros', + revenue: 48, + price: 25, + quantity: 2, + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + shipping: 3, + subtotal: 22.5, + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + }, + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + integrations: { + S3: false, + All: true, + }, + }, + destination: { + Config: { + apiKey: 'abcde', + groupTypeTrait: 'email', + groupValueTrait: 'age', + trackProductsOnce: true, + trackRevenuePerProduct: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + device_id: '50be5c78-6c3f-4b60-be84-97805a316fb1', + insert_id: '7208bbb6-2c4e-45bb-bf5b-ad426f3593e9', + user_properties: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + event_properties: { + tax: 2, + total: 27.5, + coupon: 'hasbros', + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + shipping: 3, + subtotal: 22.5, + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + }, + event_type: 'Order Completed', + revenueType: 'Purchased', + price: 25, + quantity: 2, + revenue: 48, + time: 1597383030118, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 33', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + event: 'Order Completed', + sentAt: '2020-08-14T05:30:30.118Z', + context: { + source: 'test', + traits: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + library: { + name: 'rudder-sdk-ruby-sync', + version: '1.0.6', + }, + }, + messageId: '7208bbb6-2c4e-45bb-bf5b-ad426f3593e9', + timestamp: '2020-08-14T05:30:30.118Z', + properties: { + tax: 2, + total: 27.5, + coupon: 'hasbros', + revenue: 48, + price: 25, + quantity: 2, + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + shipping: 3, + subtotal: 22.5, + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + }, + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + integrations: { + S3: false, + All: true, + }, + }, + destination: { + Config: { + apiKey: 'abcde', + groupTypeTrait: 'email', + groupValueTrait: 'age', + trackProductsOnce: false, + trackRevenuePerProduct: true, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + device_id: '50be5c78-6c3f-4b60-be84-97805a316fb1', + insert_id: '7208bbb6-2c4e-45bb-bf5b-ad426f3593e9', + user_properties: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + event_properties: { + tax: 2, + total: 27.5, + coupon: 'hasbros', + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + shipping: 3, + subtotal: 22.5, + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + }, + event_type: 'Order Completed', + revenueType: 'Purchased', + price: 25, + quantity: 2, + revenue: 48, + time: 1597383030118, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 34', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + event: 'Order Completed', + sentAt: '2020-08-14T05:30:30.118Z', + context: { + source: 'test', + traits: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + library: { + name: 'rudder-sdk-ruby-sync', + version: '1.0.6', + }, + }, + messageId: '7208bbb6-2c4e-45bb-bf5b-ad426f3593e9', + timestamp: '2020-08-14T05:30:30.118Z', + properties: { + tax: 2, + total: 27.5, + coupon: 'hasbros', + revenue: 48, + price: 25, + quantity: 2, + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + shipping: 3, + subtotal: 22.5, + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + }, + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + integrations: { + S3: false, + All: true, + }, + }, + destination: { + Config: { + apiKey: 'abcde', + groupTypeTrait: 'email', + groupValueTrait: 'age', + trackProductsOnce: false, + trackRevenuePerProduct: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + device_id: '50be5c78-6c3f-4b60-be84-97805a316fb1', + insert_id: '7208bbb6-2c4e-45bb-bf5b-ad426f3593e9', + user_properties: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + event_properties: { + tax: 2, + total: 27.5, + coupon: 'hasbros', + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + shipping: 3, + subtotal: 22.5, + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + }, + event_type: 'Order Completed', + revenueType: 'Purchased', + price: 25, + quantity: 2, + revenue: 48, + time: 1597383030118, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 35', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'identify', + sentAt: '2020-11-20T06:18:22.342Z', + userId: 'User_111', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.8', + namespace: 'com.rudderlabs.javascript', + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + locale: 'en-GB', + screen: { + density: 2.5, + }, + traits: { + city: 'Durgapur', + name: 'Manashi', + phone: '990099009900', + friends: 3, + age: 12, + subjects: 5, + experience: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.8', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36', + }, + rudderId: '7e00bf3d-5357-4448-886d-f8fc8abf932d', + messageId: '6f08cc45-95c3-40c1-90f2-2f44a92947ef', + anonymousId: '2f8b0ba7-d76e-4b91-9577-d1b6ebd68946', + integrations: { + All: true, + }, + originalTimestamp: '2020-11-20T06:18:22.342Z', + }, + destination: { + Config: { + apiKey: 'abcde', + groupTypeTrait: 'email', + groupValueTrait: 'age', + traitsToIncrement: [ + { + traits: 'age', + }, + { + traits: 'friends', + }, + ], + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Chrome', + os_version: '86.0.4240.198', + device_model: 'Mac', + platform: 'Web', + device_id: '2f8b0ba7-d76e-4b91-9577-d1b6ebd68946', + app_name: 'RudderLabs JavaScript SDK', + app_version: '1.1.8', + language: 'en-GB', + insert_id: '6f08cc45-95c3-40c1-90f2-2f44a92947ef', + user_properties: { + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + name: 'Manashi', + phone: '990099009900', + subjects: 5, + experience: 2, + $add: { + age: 12, + friends: 3, + }, + }, + event_type: '$identify', + time: 1605853102342, + user_id: 'User_111', + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '2f8b0ba7-d76e-4b91-9577-d1b6ebd68946', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 36', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'identify', + sentAt: '2020-11-20T06:18:22.342Z', + userId: 'User_111', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.8', + namespace: 'com.rudderlabs.javascript', + }, + page: { + url: 'http://localhost:1111/RudderAmplitude.html', + path: '/RudderAmplitude.html', + title: 'Amplitude Testing By Rudder', + search: '', + referrer: 'http://localhost:1111/', + }, + locale: 'en-GB', + screen: { + density: 2.5, + }, + traits: { + city: 'Durgapur', + name: 'Manashi', + phone: '990099009900', + friends: 3, + age: 12, + subjects: 5, + experience: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.8', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36', + }, + rudderId: '7e00bf3d-5357-4448-886d-f8fc8abf932d', + messageId: '6f08cc45-95c3-40c1-90f2-2f44a92947ef', + anonymousId: '2f8b0ba7-d76e-4b91-9577-d1b6ebd68946', + integrations: { + All: true, + }, + originalTimestamp: '2020-11-20T06:18:22.342Z', + }, + destination: { + Config: { + apiKey: 'abcde', + groupTypeTrait: 'email', + groupValueTrait: 'age', + traitsToSetOnce: [ + { + traits: 'subjects', + }, + { + traits: '', + }, + ], + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Chrome', + os_version: '86.0.4240.198', + device_model: 'Mac', + platform: 'Web', + device_id: '2f8b0ba7-d76e-4b91-9577-d1b6ebd68946', + app_name: 'RudderLabs JavaScript SDK', + app_version: '1.1.8', + language: 'en-GB', + insert_id: '6f08cc45-95c3-40c1-90f2-2f44a92947ef', + user_properties: { + name: 'Manashi', + phone: '990099009900', + friends: 3, + age: 12, + experience: 2, + $setOnce: { + subjects: 5, + }, + }, + event_type: '$identify', + time: 1605853102342, + user_id: 'User_111', + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '2f8b0ba7-d76e-4b91-9577-d1b6ebd68946', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 37', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'identify', + sentAt: '2020-11-20T06:18:22.342Z', + userId: 'User_111', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.8', + namespace: 'com.rudderlabs.javascript', + }, + page: { + url: 'http://localhost:1111/RudderAmplitude.html', + path: '/RudderAmplitude.html', + title: 'Amplitude Testing By Rudder', + search: '', + referrer: 'http://localhost:1111/', + }, + locale: 'en-GB', + screen: { + density: 2.5, + }, + traits: { + city: 'Durgapur', + name: 'Manashi', + phone: '990099009900', + friends: 3, + age: 12, + subjects: 5, + experience: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.8', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36', + }, + rudderId: '7e00bf3d-5357-4448-886d-f8fc8abf932d', + messageId: '6f08cc45-95c3-40c1-90f2-2f44a92947ef', + anonymousId: '2f8b0ba7-d76e-4b91-9577-d1b6ebd68946', + integrations: { + All: true, + }, + originalTimestamp: '2020-11-20T06:18:22.342Z', + }, + destination: { + Config: { + apiKey: 'abcde', + groupTypeTrait: 'email', + groupValueTrait: 'age', + traitsToAppend: [ + { + traits: 'name', + }, + { + traits: '', + }, + ], + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Chrome', + os_version: '86.0.4240.198', + device_model: 'Mac', + platform: 'Web', + device_id: '2f8b0ba7-d76e-4b91-9577-d1b6ebd68946', + app_name: 'RudderLabs JavaScript SDK', + app_version: '1.1.8', + language: 'en-GB', + insert_id: '6f08cc45-95c3-40c1-90f2-2f44a92947ef', + user_properties: { + phone: '990099009900', + friends: 3, + age: 12, + subjects: 5, + experience: 2, + $append: { + name: 'Manashi', + }, + }, + event_type: '$identify', + time: 1605853102342, + user_id: 'User_111', + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '2f8b0ba7-d76e-4b91-9577-d1b6ebd68946', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 38', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'identify', + sentAt: '2020-11-20T06:18:22.342Z', + userId: 'User_111', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.8', + namespace: 'com.rudderlabs.javascript', + }, + page: { + url: 'http://localhost:1111/RudderAmplitude.html', + path: '/RudderAmplitude.html', + title: 'Amplitude Testing By Rudder', + search: '', + referrer: 'http://localhost:1111/', + }, + locale: 'en-GB', + screen: { + density: 2.5, + }, + traits: { + city: 'Durgapur', + name: 'Manashi', + phone: '990099009900', + friends: 3, + age: 12, + subjects: 5, + experience: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.8', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36', + }, + rudderId: '7e00bf3d-5357-4448-886d-f8fc8abf932d', + messageId: '6f08cc45-95c3-40c1-90f2-2f44a92947ef', + anonymousId: '2f8b0ba7-d76e-4b91-9577-d1b6ebd68946', + integrations: { + All: true, + }, + originalTimestamp: '2020-11-20T06:18:22.342Z', + }, + destination: { + Config: { + apiKey: 'abcde', + groupTypeTrait: 'email', + groupValueTrait: 'age', + traitsToPrepend: [ + { + traits: 'experience', + }, + { + traits: '', + }, + ], + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Chrome', + os_version: '86.0.4240.198', + device_model: 'Mac', + platform: 'Web', + device_id: '2f8b0ba7-d76e-4b91-9577-d1b6ebd68946', + app_name: 'RudderLabs JavaScript SDK', + app_version: '1.1.8', + language: 'en-GB', + insert_id: '6f08cc45-95c3-40c1-90f2-2f44a92947ef', + user_properties: { + name: 'Manashi', + phone: '990099009900', + friends: 3, + age: 12, + subjects: 5, + $prepend: { + experience: 2, + }, + }, + event_type: '$identify', + time: 1605853102342, + user_id: 'User_111', + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '2f8b0ba7-d76e-4b91-9577-d1b6ebd68946', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 39', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'identify', + sentAt: '2020-11-20T06:18:22.342Z', + userId: 'User_111', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.8', + namespace: 'com.rudderlabs.javascript', + }, + page: { + url: 'http://localhost:1111/RudderAmplitude.html', + path: '/RudderAmplitude.html', + title: 'Amplitude Testing By Rudder', + search: '', + referrer: 'http://localhost:1111/', + }, + locale: 'en-GB', + screen: { + density: 2.5, + }, + traits: { + city: 'Durgapur', + name: 'Manashi', + phone: '990099009900', + friends: 3, + age: 12, + subjects: 5, + experience: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.8', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36', + }, + rudderId: '7e00bf3d-5357-4448-886d-f8fc8abf932d', + messageId: '6f08cc45-95c3-40c1-90f2-2f44a92947ef', + anonymousId: '2f8b0ba7-d76e-4b91-9577-d1b6ebd68946', + integrations: { + All: true, + }, + originalTimestamp: '2020-11-20T06:18:22.342Z', + }, + destination: { + Config: { + apiKey: 'abcde', + groupTypeTrait: 'email', + groupValueTrait: 'age', + traitsToIncrement: [ + { + traits: 'age', + }, + { + traits: 'friends', + }, + ], + traitsToSetOnce: [ + { + traits: 'subjects', + }, + { + traits: '', + }, + ], + traitsToAppend: [ + { + traits: 'name', + }, + { + traits: '', + }, + ], + traitsToPrepend: [ + { + traits: 'experience', + }, + { + traits: '', + }, + ], + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Chrome', + os_version: '86.0.4240.198', + device_model: 'Mac', + platform: 'Web', + device_id: '2f8b0ba7-d76e-4b91-9577-d1b6ebd68946', + app_name: 'RudderLabs JavaScript SDK', + app_version: '1.1.8', + language: 'en-GB', + insert_id: '6f08cc45-95c3-40c1-90f2-2f44a92947ef', + user_properties: { + phone: '990099009900', + $add: { + age: 12, + friends: 3, + }, + $setOnce: { + subjects: 5, + }, + $append: { + name: 'Manashi', + }, + $prepend: { + experience: 2, + }, + }, + event_type: '$identify', + time: 1605853102342, + user_id: 'User_111', + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '2f8b0ba7-d76e-4b91-9577-d1b6ebd68946', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 40', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + event: 'Order Completed', + sentAt: '2020-08-14T05:30:30.118Z', + userId: 'userID123', + context: { + source: 'test', + traits: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + address: { + city: 'kolkata', + country: 'India', + postalCode: 712136, + state: 'WB', + street: '', + }, + }, + locale: 'en-US', + network: { + carrier: 'T-Mobile', + }, + location: { + country: 'United States', + city: 'San Francisco', + region: 'California', + latitude: '37.7672319', + longitude: '-122.4021353', + dma: 'San Francisco-Oakland-San Jose, CA', + }, + library: { + name: 'rudder-sdk-ruby-sync', + version: '1.0.6', + }, + os: { + name: 'Android', + version: '11', + }, + app: { + version: '2.6.0 v3', + }, + device: { + type: 'Android', + model: 'SM-A025M', + manufacturer: 'samsung', + }, + }, + messageId: '7208abb6-2c4e-45bb-bf5b-aa426f3593a2', + timestamp: '2020-08-14T05:30:30.118Z', + properties: { + tax: 2, + total: 27.5, + coupon: 'hasbros', + revenue: 48, + price: 25, + quantity: 2, + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + products: [ + { + sku: '45790-32', + url: 'https://www.example.com/product/path', + name: 'Monopoly: 3rd Edition', + price: 19, + category: 'Games', + quantity: 1, + image_url: 'https:///www.example.com/product/path.jpg', + product_id: '507f1f77bcf86cd799439011', + }, + { + sku: '46493-32', + name: 'Uno Card Game', + price: 3, + category: 'Games', + quantity: 2, + product_id: '505bd76785ebb509fc183733', + }, + ], + shipping: 3, + subtotal: 22.5, + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + }, + anonymousId: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + integrations: { + S3: false, + All: true, + }, + }, + destination: { + Config: { + apiKey: 'abcde', + trackProductsOnce: false, + trackRevenuePerProduct: true, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Android', + os_version: '11', + device_model: 'SM-A025M', + device_manufacturer: 'samsung', + platform: 'Android', + device_id: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + carrier: 'T-Mobile', + app_version: '2.6.0 v3', + language: 'en-US', + insert_id: '7208abb6-2c4e-45bb-bf5b-aa426f3593a2', + user_properties: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + address: { + postalCode: 712136, + state: 'WB', + street: '', + }, + }, + event_properties: { + tax: 2, + total: 27.5, + coupon: 'hasbros', + revenue: 48, + price: 25, + quantity: 2, + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + shipping: 3, + subtotal: 22.5, + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + }, + event_type: 'Order Completed', + user_id: 'userID123', + time: 1597383030118, + session_id: -1, + region: 'California', + location_lat: '37.7672319', + location_lng: '-122.4021353', + dma: 'San Francisco-Oakland-San Jose, CA', + country: 'United States', + city: 'San Francisco', + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Android', + os_version: '11', + device_model: 'SM-A025M', + device_manufacturer: 'samsung', + platform: 'Android', + device_id: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + carrier: 'T-Mobile', + app_version: '2.6.0 v3', + language: 'en-US', + event_type: 'Product Purchased', + insert_id: '7208abb6-2c4e-45bb-bf5b-aa426f3593a2-1', + user_properties: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + address: { + postalCode: 712136, + state: 'WB', + street: '', + }, + }, + event_properties: { + sku: '45790-32', + url: 'https://www.example.com/product/path', + name: 'Monopoly: 3rd Edition', + category: 'Games', + image_url: 'https:///www.example.com/product/path.jpg', + }, + user_id: 'userID123', + productId: '507f1f77bcf86cd799439011', + revenueType: 'Purchased', + price: 19, + quantity: 1, + time: 1597383030118, + session_id: -1, + region: 'California', + location_lat: '37.7672319', + location_lng: '-122.4021353', + dma: 'San Francisco-Oakland-San Jose, CA', + country: 'United States', + city: 'San Francisco', + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Android', + os_version: '11', + device_model: 'SM-A025M', + device_manufacturer: 'samsung', + platform: 'Android', + device_id: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + carrier: 'T-Mobile', + app_version: '2.6.0 v3', + language: 'en-US', + event_type: 'Product Purchased', + insert_id: '7208abb6-2c4e-45bb-bf5b-aa426f3593a2-2', + user_properties: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + address: { + postalCode: 712136, + state: 'WB', + street: '', + }, + }, + event_properties: { + sku: '46493-32', + name: 'Uno Card Game', + category: 'Games', + }, + user_id: 'userID123', + productId: '505bd76785ebb509fc183733', + revenueType: 'Purchased', + price: 3, + quantity: 2, + time: 1597383030118, + session_id: -1, + region: 'California', + location_lat: '37.7672319', + location_lng: '-122.4021353', + dma: 'San Francisco-Oakland-San Jose, CA', + country: 'United States', + city: 'San Francisco', + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 41', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + event: 'Order Completed', + sentAt: '2020-08-14T05:30:30.118Z', + userId: 'userID123', + context: { + source: 'test', + traits: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + address: { + city: 'kolkata', + country: 'India', + postalCode: 712136, + state: 'WB', + street: '', + }, + }, + locale: 'en-US', + network: { + carrier: 'T-Mobile', + }, + location: { + latitude: '37.7672319', + longitude: '-122.4021353', + dma: 'San Francisco-Oakland-San Jose, CA', + }, + library: { + name: 'rudder-sdk-ruby-sync', + version: '1.0.6', + }, + os: { + name: 'Android', + version: '11', + }, + app: { + version: '2.6.0 v3', + }, + device: { + type: 'Android', + model: 'SM-A025M', + manufacturer: 'samsung', + }, + }, + messageId: '7208abb6-2c4e-45bb-bf5b-aa426f3593a2', + timestamp: '2020-08-14T05:30:30.118Z', + properties: { + tax: 2, + total: 27.5, + coupon: 'hasbros', + revenue: 48, + price: 25, + quantity: 2, + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + products: [ + { + sku: '45790-32', + url: 'https://www.example.com/product/path', + name: 'Monopoly: 3rd Edition', + price: 19, + category: 'Games', + quantity: 1, + image_url: 'https:///www.example.com/product/path.jpg', + product_id: '507f1f77bcf86cd799439011', + }, + { + sku: '46493-32', + name: 'Uno Card Game', + price: 3, + category: 'Games', + quantity: 2, + product_id: '505bd76785ebb509fc183733', + }, + ], + shipping: 3, + subtotal: 22.5, + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + }, + anonymousId: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + integrations: { + S3: false, + All: true, + }, + }, + destination: { + Config: { + apiKey: 'abcde', + trackProductsOnce: true, + trackRevenuePerProduct: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Android', + os_version: '11', + device_model: 'SM-A025M', + device_manufacturer: 'samsung', + platform: 'Android', + device_id: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + carrier: 'T-Mobile', + app_version: '2.6.0 v3', + language: 'en-US', + insert_id: '7208abb6-2c4e-45bb-bf5b-aa426f3593a2', + user_properties: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + address: { + postalCode: 712136, + state: 'WB', + street: '', + }, + }, + event_properties: { + tax: 2, + total: 27.5, + coupon: 'hasbros', + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + products: [ + { + sku: '45790-32', + url: 'https://www.example.com/product/path', + name: 'Monopoly: 3rd Edition', + price: 19, + category: 'Games', + quantity: 1, + image_url: 'https:///www.example.com/product/path.jpg', + product_id: '507f1f77bcf86cd799439011', + }, + { + sku: '46493-32', + name: 'Uno Card Game', + price: 3, + category: 'Games', + quantity: 2, + product_id: '505bd76785ebb509fc183733', + }, + ], + shipping: 3, + subtotal: 22.5, + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + }, + event_type: 'Order Completed', + user_id: 'userID123', + revenueType: 'Purchased', + price: 25, + quantity: 2, + revenue: 48, + time: 1597383030118, + session_id: -1, + location_lat: '37.7672319', + location_lng: '-122.4021353', + dma: 'San Francisco-Oakland-San Jose, CA', + country: 'India', + city: 'kolkata', + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 42', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + event: 'App_Opened', + sentAt: '2021-11-17T19:13:52.106Z', + userId: 'ab419c3a-47ce-11ec-82ac-16a1bb813a59', + channel: 'mobile', + context: { + source: 'test', + traits: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + address: { + city: 'kolkata', + country: 'India', + postalCode: 712136, + state: 'WB', + street: '', + }, + }, + locale: 'en-US', + network: { + carrier: 'T-Mobile', + }, + location: { + country: 'United States', + city: 'San Francisco', + latitude: '37.7672319', + longitude: '-122.4021353', + dma: 'San Francisco-Oakland-San Jose, CA', + }, + library: { + name: 'rudder-sdk-ruby-sync', + version: '1.0.6', + }, + os: { + name: 'Android', + version: '11', + }, + app: { + version: '2.6.0 v3', + }, + device: { + type: 'Android', + model: 'SM-A025M', + manufacturer: 'samsung', + }, + }, + messageId: '7208abb6-2c4e-45bb-bf5b-aa426f3593a2', + timestamp: '2020-08-14T05:30:30.118Z', + properties: { + externalID: '1637170658229-3961832492194264209', + }, + integrations: { + All: true, + }, + originalTimestamp: '2021-11-17T19:13:51.143Z', + }, + destination: { + Config: { + apiKey: 'abcde', + trackProductsOnce: true, + trackRevenuePerProduct: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Android', + os_version: '11', + device_model: 'SM-A025M', + device_manufacturer: 'samsung', + platform: 'Android', + carrier: 'T-Mobile', + app_version: '2.6.0 v3', + language: 'en-US', + insert_id: '7208abb6-2c4e-45bb-bf5b-aa426f3593a2', + user_properties: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + address: { + postalCode: 712136, + state: 'WB', + street: '', + }, + }, + event_properties: { + externalID: '1637170658229-3961832492194264209', + }, + event_type: 'App_Opened', + user_id: 'ab419c3a-47ce-11ec-82ac-16a1bb813a59', + device_brand: 'samsung', + time: 1597383030118, + session_id: -1, + location_lat: '37.7672319', + location_lng: '-122.4021353', + dma: 'San Francisco-Oakland-San Jose, CA', + country: 'United States', + city: 'San Francisco', + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 43', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'identify', + sentAt: '2020-11-20T06:18:22.342Z', + userId: 'User_111', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.8', + namespace: 'com.rudderlabs.javascript', + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + locale: 'en-GB', + screen: { + density: 2.5, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.8', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36', + }, + rudderId: '7e00bf3d-5357-4448-886d-f8fc8abf932d', + messageId: '6f08cc45-95c3-40c1-90f2-2f44a92947ef', + anonymousId: '2f8b0ba7-d76e-4b91-9577-d1b6ebd68946', + integrations: { + All: true, + }, + originalTimestamp: '2020-11-20T06:18:22.342Z', + }, + destination: { + Config: { + apiKey: 'abcde', + groupTypeTrait: 'email', + groupValueTrait: 'age', + traitsToIncrement: [ + { + traits: 'age', + }, + { + traits: 'friends', + }, + ], + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Chrome', + os_version: '86.0.4240.198', + device_model: 'Mac', + platform: 'Web', + device_id: '2f8b0ba7-d76e-4b91-9577-d1b6ebd68946', + app_name: 'RudderLabs JavaScript SDK', + app_version: '1.1.8', + language: 'en-GB', + insert_id: '6f08cc45-95c3-40c1-90f2-2f44a92947ef', + user_properties: { + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + event_type: '$identify', + time: 1605853102342, + user_id: 'User_111', + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '2f8b0ba7-d76e-4b91-9577-d1b6ebd68946', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 44', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + event: 'Order Completed', + sentAt: '2020-08-14T05:30:30.118Z', + userId: 'userID123', + context: { + source: 'test', + traits: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + address: { + city: 'kolkata', + country: 'India', + postalCode: 712136, + state: 'WB', + street: '', + }, + }, + locale: 'en-US', + network: { + carrier: 'T-Mobile', + }, + location: { + latitude: '37.7672319', + longitude: '-122.4021353', + dma: 'San Francisco-Oakland-San Jose, CA', + }, + library: { + name: 'rudder-sdk-ruby-sync', + version: '1.0.6', + }, + os: { + name: 'Android', + version: '11', + }, + app: { + version: '2.6.0 v3', + }, + device: { + type: 'Android', + model: 'SM-A025M', + manufacturer: 'samsung', + }, + }, + messageId: '7208abb6-2c4e-45bb-bf5b-aa426f3593a2', + timestamp: '2020-08-14T05:30:30.118Z', + properties: { + tax: 2, + total: 27.5, + coupon: 'hasbros', + revenue: 0, + price: 25, + quantity: 2, + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + products: [ + { + sku: '45790-32', + url: 'https://www.example.com/product/path', + name: 'Monopoly: 3rd Edition', + price: 19, + category: 'Games', + quantity: 1, + image_url: 'https:///www.example.com/product/path.jpg', + product_id: '507f1f77bcf86cd799439011', + }, + { + sku: '46493-32', + name: 'Uno Card Game', + price: 3, + category: 'Games', + quantity: 2, + product_id: '505bd76785ebb509fc183733', + }, + ], + shipping: 3, + subtotal: 22.5, + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + }, + anonymousId: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + integrations: { + S3: false, + All: true, + }, + }, + destination: { + Config: { + apiKey: 'abcde', + trackProductsOnce: true, + trackRevenuePerProduct: true, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Android', + os_version: '11', + device_model: 'SM-A025M', + device_manufacturer: 'samsung', + platform: 'Android', + device_id: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + carrier: 'T-Mobile', + app_version: '2.6.0 v3', + language: 'en-US', + insert_id: '7208abb6-2c4e-45bb-bf5b-aa426f3593a2', + user_properties: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + address: { + postalCode: 712136, + state: 'WB', + street: '', + }, + }, + event_properties: { + tax: 2, + total: 27.5, + coupon: 'hasbros', + revenue: 0, + price: 25, + quantity: 2, + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + products: [ + { + sku: '45790-32', + url: 'https://www.example.com/product/path', + name: 'Monopoly: 3rd Edition', + price: 19, + category: 'Games', + quantity: 1, + image_url: 'https:///www.example.com/product/path.jpg', + product_id: '507f1f77bcf86cd799439011', + }, + { + sku: '46493-32', + name: 'Uno Card Game', + price: 3, + category: 'Games', + quantity: 2, + product_id: '505bd76785ebb509fc183733', + }, + ], + shipping: 3, + subtotal: 22.5, + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + }, + event_type: 'Order Completed', + user_id: 'userID123', + time: 1597383030118, + session_id: -1, + location_lat: '37.7672319', + location_lng: '-122.4021353', + dma: 'San Francisco-Oakland-San Jose, CA', + country: 'India', + city: 'kolkata', + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Android', + os_version: '11', + device_model: 'SM-A025M', + device_manufacturer: 'samsung', + platform: 'Android', + device_id: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + carrier: 'T-Mobile', + app_version: '2.6.0 v3', + language: 'en-US', + event_type: 'Product Purchased', + insert_id: '7208abb6-2c4e-45bb-bf5b-aa426f3593a2-1', + user_properties: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + address: { + postalCode: 712136, + state: 'WB', + street: '', + }, + }, + event_properties: { + sku: '45790-32', + url: 'https://www.example.com/product/path', + name: 'Monopoly: 3rd Edition', + category: 'Games', + image_url: 'https:///www.example.com/product/path.jpg', + }, + user_id: 'userID123', + productId: '507f1f77bcf86cd799439011', + revenueType: 'Purchased', + price: 19, + quantity: 1, + time: 1597383030118, + session_id: -1, + location_lat: '37.7672319', + location_lng: '-122.4021353', + dma: 'San Francisco-Oakland-San Jose, CA', + country: 'India', + city: 'kolkata', + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Android', + os_version: '11', + device_model: 'SM-A025M', + device_manufacturer: 'samsung', + platform: 'Android', + device_id: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + carrier: 'T-Mobile', + app_version: '2.6.0 v3', + language: 'en-US', + event_type: 'Product Purchased', + insert_id: '7208abb6-2c4e-45bb-bf5b-aa426f3593a2-2', + user_properties: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + address: { + postalCode: 712136, + state: 'WB', + street: '', + }, + }, + event_properties: { + sku: '46493-32', + name: 'Uno Card Game', + category: 'Games', + }, + user_id: 'userID123', + productId: '505bd76785ebb509fc183733', + revenueType: 'Purchased', + price: 3, + quantity: 2, + time: 1597383030118, + session_id: -1, + location_lat: '37.7672319', + location_lng: '-122.4021353', + dma: 'San Francisco-Oakland-San Jose, CA', + country: 'India', + city: 'kolkata', + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 45', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'screen', + event: 'Home', + sentAt: '2021-12-09T14:55:17.074Z', + userId: '9e187bff-2867-11ec-82ac-02cdd434d6bf', + channel: 'mobile', + context: { + source: 'test', + traits: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + address: { + city: 'kolkata', + country: 'India', + postalCode: 712136, + state: 'WB', + street: '', + }, + }, + locale: 'en-US', + network: { + carrier: 'T-Mobile', + }, + location: { + country: 'United States', + city: 'San Francisco', + region: 'California', + latitude: '37.7672319', + longitude: '-122.4021353', + dma: 'San Francisco-Oakland-San Jose, CA', + }, + library: { + name: 'rudder-sdk-ruby-sync', + version: '1.0.6', + }, + os: { + name: 'Android', + version: '11', + }, + app: { + version: '2.6.0 v3', + }, + device: { + type: 'Android', + model: 'SM-A025M', + manufacturer: 'samsung', + }, + }, + rudderId: '004670a6-4559-4f2b-aa2a-f35cf81a9423', + messageId: '1639061715808-a934f1c2-7b55-4e78-bd4d-df209c30c8a1', + timestamp: '2021-12-09T14:55:15.914Z', + properties: { + name: 'Home', + externalID: '1637763064335-7225034711957140329', + }, + receivedAt: '2021-12-09T14:55:17.180Z', + request_ip: '186.54.216.75', + anonymousId: '066a37dc92b16284', + integrations: { + All: true, + }, + originalTimestamp: '2021-12-09T14:55:15.808Z', + }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Android', + os_version: '11', + device_model: 'SM-A025M', + device_manufacturer: 'samsung', + device_id: '066a37dc92b16284', + carrier: 'T-Mobile', + app_version: '2.6.0 v3', + platform: 'Android', + language: 'en-US', + event_properties: { + name: 'Home', + externalID: '1637763064335-7225034711957140329', + }, + insert_id: '1639061715808-a934f1c2-7b55-4e78-bd4d-df209c30c8a1', + ip: '186.54.216.75', + user_properties: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + address: { + postalCode: 712136, + state: 'WB', + street: '', + }, + }, + event_type: 'Viewed Home Screen', + user_id: '9e187bff-2867-11ec-82ac-02cdd434d6bf', + device_brand: 'samsung', + time: 1639061715914, + session_id: -1, + region: 'California', + location_lat: '37.7672319', + location_lng: '-122.4021353', + dma: 'San Francisco-Oakland-San Jose, CA', + country: 'United States', + city: 'San Francisco', + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '066a37dc92b16284', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 46', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'screen', + event: 'Home', + sentAt: '2021-12-09T14:55:17.074Z', + userId: 'abcdef123456cf', + channel: 'mobile', + context: { + source: 'test', + traits: { + anonymousId: '50be5c79-6c3f-4b60-be84-97805a32aaa1', + address: { + city: 'kolkata', + country: 'India', + postalCode: 712136, + state: 'WB', + street: '', + }, + }, + locale: 'en-US', + network: { + carrier: 'T-Mobile', + }, + library: { + name: 'rudder-sdk-ruby-sync', + version: '1.0.6', + }, + os: { + name: 'Android', + version: '11', + }, + app: { + version: '2.6.0 v3', + }, + device: { + type: 'Android', + model: 'SM-A025M', + manufacturer: 'samsung', + }, + }, + rudderId: '004670a6-4559-4f2b-aa1a-f12cf81a9423', + messageId: '1639061715808-a934f1c2-7b55-5e78-bd4d-df209c31d8a2', + timestamp: '2021-12-09T14:55:15.914Z', + properties: { + name: 'Home', + externalID: '1637763064336-7225034711957140329', + }, + receivedAt: '2021-12-09T14:55:17.180Z', + request_ip: '186.54.216.75', + anonymousId: '066a37dc92b16284', + integrations: { + All: true, + }, + originalTimestamp: '2021-12-09T14:55:15.808Z', + }, + destination: { + Config: { + apiKey: 'abcde', + groupTypeTrait: 'email', + groupValueTrait: 'age', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Android', + os_version: '11', + device_model: 'SM-A025M', + device_manufacturer: 'samsung', + device_id: '066a37dc92b16284', + carrier: 'T-Mobile', + app_version: '2.6.0 v3', + platform: 'Android', + language: 'en-US', + event_properties: { + name: 'Home', + externalID: '1637763064336-7225034711957140329', + }, + insert_id: '1639061715808-a934f1c2-7b55-5e78-bd4d-df209c31d8a2', + ip: '186.54.216.75', + user_properties: { + anonymousId: '50be5c79-6c3f-4b60-be84-97805a32aaa1', + address: { + postalCode: 712136, + state: 'WB', + street: '', + }, + }, + event_type: 'Viewed Home Screen', + user_id: 'abcdef123456cf', + device_brand: 'samsung', + time: 1639061715914, + session_id: -1, + country: 'India', + city: 'kolkata', + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '066a37dc92b16284', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 47', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + event: 'Sample track event BEFORE IDENTIFY1**', + sentAt: '2020-09-17T15:07:13.171Z', + userId: '0572f78fa49c648e', + channel: 'mobile', + context: { + app: { + name: 'AMTestProject', + build: '1', + version: '1.0', + namespace: 'com.rudderstack.android.rudderstack.sampleAndroidApp', + }, + device: { + id: '0572f78fa49c648e', + type: 'watchos', + manufacturer: 'Apple', + adTrackingEnabled: true, + advertisingId: '1606e649-c97e-4d5f-a2ef-b81dbc66741a', + }, + locale: 'en-US', + screen: { + width: 1080, + height: 2088, + density: 440, + }, + traits: { + id: '0572f78fa49c648e', + userId: '0572f78fa49c648e', + address: {}, + company: {}, + anonymousId: '0572f78fa49c648e', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.4', + }, + network: { + wifi: true, + carrier: 'AT&T', + cellular: true, + bluetooth: false, + }, + timezone: 'Asia/Kolkata', + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)', + }, + messageId: '1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466', + anonymousId: '0572f78fa49c648e', + integrations: { + All: true, + }, + originalTimestamp: '2020-09-17T15:07:03.515Z', + }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + device_manufacturer: 'Apple', + platform: 'watchos', + device_id: '0572f78fa49c648e', + carrier: 'AT&T', + app_name: 'AMTestProject', + app_version: '1.0', + language: 'en-US', + insert_id: '1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466', + user_properties: { + id: '0572f78fa49c648e', + userId: '0572f78fa49c648e', + address: {}, + company: {}, + anonymousId: '0572f78fa49c648e', + }, + event_type: 'Sample track event BEFORE IDENTIFY1**', + user_id: '0572f78fa49c648e', + device_brand: 'Apple', + idfa: '1606e649-c97e-4d5f-a2ef-b81dbc66741a', + idfv: '0572f78fa49c648e', + time: 1600355223515, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '0572f78fa49c648e', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 48', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + event: 'Sample track event BEFORE IDENTIFY1**', + sentAt: '2020-09-17T15:07:13.171Z', + userId: '0572f78fa49c648e', + channel: 'mobile', + context: { + app: { + name: 'AMTestProject', + build: '1', + version: '1.0', + namespace: 'com.rudderstack.android.rudderstack.sampleAndroidApp', + }, + device: { + id: '0572f78fa49c648e', + type: 'ipados', + manufacturer: 'Apple', + adTrackingEnabled: true, + advertisingId: '1606e649-c97e-4d5f-a2ef-b81dbc66741a', + }, + locale: 'en-US', + screen: { + width: 1080, + height: 2088, + density: 440, + }, + traits: { + id: '0572f78fa49c648e', + userId: '0572f78fa49c648e', + address: {}, + company: {}, + anonymousId: '0572f78fa49c648e', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.4', + }, + network: { + wifi: true, + carrier: 'AT&T', + cellular: true, + bluetooth: false, + }, + timezone: 'Asia/Kolkata', + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)', + }, + messageId: '1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466', + anonymousId: '0572f78fa49c648e', + integrations: { + All: true, + }, + originalTimestamp: '2020-09-17T15:07:03.515Z', + }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + device_manufacturer: 'Apple', + platform: 'ipados', + device_id: '0572f78fa49c648e', + carrier: 'AT&T', + app_name: 'AMTestProject', + app_version: '1.0', + language: 'en-US', + insert_id: '1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466', + user_properties: { + id: '0572f78fa49c648e', + userId: '0572f78fa49c648e', + address: {}, + company: {}, + anonymousId: '0572f78fa49c648e', + }, + event_type: 'Sample track event BEFORE IDENTIFY1**', + user_id: '0572f78fa49c648e', + device_brand: 'Apple', + idfa: '1606e649-c97e-4d5f-a2ef-b81dbc66741a', + idfv: '0572f78fa49c648e', + time: 1600355223515, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '0572f78fa49c648e', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 49', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + event: 'Sample track event BEFORE IDENTIFY1**', + sentAt: '2020-09-17T15:07:13.171Z', + userId: '0572f78fa49c648e', + channel: 'mobile', + context: { + app: { + name: 'AMTestProject', + build: '1', + version: '1.0', + namespace: 'com.rudderstack.android.rudderstack.sampleAndroidApp', + }, + device: { + id: '0572f78fa49c648e', + type: 'tvos', + manufacturer: 'Apple', + adTrackingEnabled: true, + advertisingId: '1606e649-c97e-4d5f-a2ef-b81dbc66741a', + }, + locale: 'en-US', + screen: { + width: 1080, + height: 2088, + density: 440, + }, + traits: { + id: '0572f78fa49c648e', + userId: '0572f78fa49c648e', + address: {}, + company: {}, + anonymousId: '0572f78fa49c648e', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.4', + }, + network: { + wifi: true, + carrier: 'AT&T', + cellular: true, + bluetooth: false, + }, + timezone: 'Asia/Kolkata', + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)', + }, + messageId: '1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466', + anonymousId: '0572f78fa49c648e', + integrations: { + All: true, + }, + originalTimestamp: '2020-09-17T15:07:03.515Z', + }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + device_manufacturer: 'Apple', + platform: 'tvos', + device_id: '0572f78fa49c648e', + carrier: 'AT&T', + app_name: 'AMTestProject', + app_version: '1.0', + language: 'en-US', + insert_id: '1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466', + user_properties: { + id: '0572f78fa49c648e', + userId: '0572f78fa49c648e', + address: {}, + company: {}, + anonymousId: '0572f78fa49c648e', + }, + event_type: 'Sample track event BEFORE IDENTIFY1**', + user_id: '0572f78fa49c648e', + device_brand: 'Apple', + idfa: '1606e649-c97e-4d5f-a2ef-b81dbc66741a', + idfv: '0572f78fa49c648e', + time: 1600355223515, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '0572f78fa49c648e', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 50', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + device: { + brand: 'testBrand', + manufacturer: 'testManufacturer', + }, + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + anonymousId: '123456', + email: 'test@rudderstack.com', + address: { + city: 'kolkata', + country: 'India', + postalCode: 712136, + state: 'WB', + street: '', + }, + ip: '0.0.0.0', + age: 26, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + }, + type: 'identify', + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: '123456', + userId: '123456', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + mapDeviceBrand: true, + apiKey: 'abcde', + groupTypeTrait: 'email', + groupValueTrait: 'age', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Chrome', + os_version: '77.0.3865.90', + device_model: 'Mac', + device_manufacturer: 'testManufacturer', + platform: 'Web', + device_brand: 'testBrand', + device_id: '123456', + app_name: 'RudderLabs JavaScript SDK', + app_version: '1.0.0', + language: 'en-US', + insert_id: '84e26acc-56a5-4835-8233-591137fca468', + user_properties: { + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + anonymousId: '123456', + email: 'test@rudderstack.com', + postalCode: 712136, + state: 'WB', + street: '', + ip: '0.0.0.0', + age: 26, + }, + event_type: '$identify', + time: 1571043797562, + user_id: '123456', + session_id: -1, + country: 'India', + city: 'kolkata', + ip: '0.0.0.0', + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '123456', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 51', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + event: 'Sample track event BEFORE IDENTIFY1**', + sentAt: '2020-09-17T15:07:13.171Z', + userId: '0572f78fa49c648e', + channel: 'mobile', + context: { + device: { + brand: 'testBrand', + manufacturer: 'testManufacturer', + }, + os: { + name: 'Android', + version: '9', + }, + app: { + name: 'AMTestProject', + build: '1', + version: '1.0', + namespace: 'com.rudderstack.android.rudderstack.sampleAndroidApp', + }, + locale: 'en-US', + screen: { + width: 1080, + height: 2088, + density: 440, + }, + traits: { + id: '0572f78fa49c648e', + userId: '0572f78fa49c648e', + address: {}, + company: {}, + anonymousId: '0572f78fa49c648e', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.4', + }, + network: { + wifi: true, + carrier: 'Android', + cellular: true, + bluetooth: false, + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + timezone: 'Asia/Kolkata', + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)', + }, + messageId: '1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466', + anonymousId: '0572f78fa49c648e', + integrations: { + All: true, + }, + originalTimestamp: '2020-09-17T15:07:03.515Z', + }, + destination: { + Config: { + mapDeviceBrand: true, + apiKey: 'abcde', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Android', + os_version: '9', + device_manufacturer: 'testManufacturer', + device_brand: 'testBrand', + device_id: '0572f78fa49c648e', + carrier: 'Android', + app_name: 'AMTestProject', + app_version: '1.0', + language: 'en-US', + insert_id: '1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466', + user_properties: { + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + id: '0572f78fa49c648e', + userId: '0572f78fa49c648e', + address: {}, + company: {}, + anonymousId: '0572f78fa49c648e', + }, + event_type: 'Sample track event BEFORE IDENTIFY1**', + user_id: '0572f78fa49c648e', + time: 1600355223515, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '0572f78fa49c648e', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 52', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'screen', + userId: 'identified user id', + anonymousId: 'anon-id-new', + event: 'Screen View', + channel: 'web', + properties: { + prop1: '5', + }, + context: { + ip: '14.5.67.21', + device: { + brand: 'testBrand', + manufacturer: 'testManufacturer', + }, + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + Config: { + apiKey: 'abcde', + mapDeviceBrand: true, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + device_manufacturer: 'testManufacturer', + device_brand: 'testBrand', + device_id: 'anon-id-new', + event_properties: { + prop1: '5', + name: 'Screen View', + }, + user_properties: {}, + event_type: 'Viewed Screen View Screen', + user_id: 'identified user id', + time: 1580602989544, + session_id: -1, + ip: '14.5.67.21', + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'anon-id-new', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 53', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + externalId: [ + { + id: 'lynnanderson@smith.net', + identifierType: 'device_id', + type: 'AM-users', + }, + ], + mappedToDestination: 'true', + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + anonymousId: '123456', + email: 'test@rudderstack.com', + address: { + country: 'India', + postalCode: 712136, + state: 'WB', + street: '', + os_version: 'test os', + }, + ip: '0.0.0.0', + age: 26, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + }, + traits: { + anonymousId: '123456', + email: 'test@rudderstack.com', + city: 'kolkata', + address: { + country: 'India', + postalCode: 712136, + state: 'WB', + street: '', + }, + os_version: 'test os', + ip: '0.0.0.0', + age: 26, + }, + type: 'identify', + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: '123456', + userId: '123456', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + metadata: { + jobId: 2, + }, + destination: { + Config: { + apiKey: 'abcde', + groupTypeTrait: 'email', + groupValueTrait: 'age', + residencyServer: 'EU', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.eu.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Chrome', + os_version: 'test os', + device_model: 'Mac', + platform: 'Web', + device_id: 'lynnanderson@smith.net', + app_name: 'RudderLabs JavaScript SDK', + app_version: '1.0.0', + language: 'en-US', + insert_id: '84e26acc-56a5-4835-8233-591137fca468', + ip: '0.0.0.0', + user_properties: { + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + anonymousId: '123456', + email: 'test@rudderstack.com', + postalCode: 712136, + state: 'WB', + street: '', + ip: '0.0.0.0', + age: 26, + device_id: 'lynnanderson@smith.net', + }, + event_type: '$identify', + time: 1571043797562, + user_id: '123456', + session_id: -1, + country: 'India', + city: 'kolkata', + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '123456', + }, + metadata: { + jobId: 2, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 54', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.5', + }, + traits: { + name: 'Shehan Study', + category: 'SampleIdentify', + email: 'test@rudderstack.com', + plan: 'Open source', + logins: 5, + createdAt: 1599264000, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.5', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36', + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 0.8999999761581421, + }, + campaign: { + source: 'google', + medium: 'medium', + term: 'keyword', + content: 'some content', + name: 'some campaign', + test: 'other value', + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + }, + type: 'group', + messageId: 'e5034df0-a404-47b4-a463-76df99934fea', + originalTimestamp: '2020-10-20T07:54:58.983Z', + anonymousId: 'my-anonymous-id-new', + userId: 'sampleusrRudder3', + integrations: { + All: true, + }, + groupId: 'Sample_groupId23', + traits: { + KEY_3: { + CHILD_KEY_92: 'value_95', + CHILD_KEY_102: 'value_103', + }, + KEY_2: { + CHILD_KEY_92: 'value_95', + CHILD_KEY_102: 'value_103', + }, + name_trait: 'Company', + value_trait: 'ABC', + }, + sentAt: '2020-10-20T07:54:58.983Z', + }, + destination: { + Config: { + apiKey: 'abcde', + groupTypeTrait: 'name_trait', + groupValueTrait: 'value_trait', + residencyServer: 'EU', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.eu.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Chrome', + os_version: '85.0.4183.121', + device_model: 'Mac', + platform: 'Web', + device_id: 'my-anonymous-id-new', + app_name: 'RudderLabs JavaScript SDK', + app_version: '1.1.5', + language: 'en-US', + user_properties: { + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + utm_source: 'google', + utm_medium: 'medium', + utm_term: 'keyword', + utm_content: 'some content', + utm_name: 'some campaign', + utm_test: 'other value', + Company: 'ABC', + }, + event_type: '$identify', + groups: { + Company: 'ABC', + }, + time: 1603180498983, + user_id: 'sampleusrRudder3', + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'my-anonymous-id-new', + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.eu.amplitude.com/groupidentify', + headers: {}, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: { + api_key: 'abcde', + identification: [ + '{"group_type":"Company","group_value":"ABC","group_properties":{"KEY_3":{"CHILD_KEY_92":"value_95","CHILD_KEY_102":"value_103"},"KEY_2":{"CHILD_KEY_92":"value_95","CHILD_KEY_102":"value_103"},"name_trait":"Company","value_trait":"ABC"}}', + ], + }, + }, + files: {}, + userId: 'my-anonymous-id-new', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 55', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.5', + }, + traits: { + name: 'Shehan Study', + category: 'SampleIdentify', + email: 'test@rudderstack.com', + plan: 'Open source', + logins: 5, + createdAt: 1599264000, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.5', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36', + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 0.8999999761581421, + }, + campaign: { + source: 'google', + medium: 'medium', + term: 'keyword', + content: 'some content', + name: 'some campaign', + test: 'other value', + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + }, + type: 'alias', + messageId: 'dd46338d-5f83-493b-bd28-3b48f55d0be8', + originalTimestamp: '2020-10-20T08:14:28.778Z', + anonymousId: 'my-anonymous-id-new', + userId: 'newUserIdAlias', + integrations: { + All: true, + }, + previousId: 'sampleusrRudder3', + sentAt: '2020-10-20T08:14:28.778Z', + }, + destination: { + Config: { + apiKey: 'abcde', + residencyServer: 'EU', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.eu.amplitude.com/usermap', + headers: {}, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: { + api_key: 'abcde', + mapping: [ + '{"global_user_id":"newUserIdAlias","user_id":"sampleusrRudder3","user_properties":{"initial_referrer":"https://docs.rudderstack.com","initial_referring_domain":"docs.rudderstack.com","utm_source":"google","utm_medium":"medium","utm_term":"keyword","utm_content":"some content","utm_name":"some campaign","utm_test":"other value"}}', + ], + }, + }, + files: {}, + userId: 'my-anonymous-id-new', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 56', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + event: 'App_Opened', + sentAt: '2021-11-17T19:13:52.106Z', + userId: 'ab419c3a-47ce-11ec-82ac-16a1bb813a59', + channel: 'mobile', + context: { + source: 'test', + traits: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + address: { + city: 'kolkata', + country: 'India', + postalCode: 712136, + state: 'WB', + street: '', + }, + }, + locale: 'en-US', + network: { + carrier: 'T-Mobile', + }, + location: { + country: 'United States', + city: 'San Francisco', + latitude: '37.7672319', + longitude: '-122.4021353', + dma: 'San Francisco-Oakland-San Jose, CA', + }, + library: { + name: 'rudder-sdk-ruby-sync', + version: '1.0.6', + }, + os: { + name: 'Android', + version: '11', + }, + app: { + version: '2.6.0 v3', + }, + device: { + type: 'Android', + model: 'SM-A025M', + manufacturer: 'samsung', + }, + }, + messageId: '7208abb6-2c4e-45bb-bf5b-aa426f3593a2', + timestamp: '2020-08-14T05:30:30.118Z', + properties: { + externalID: '1637170658229-3961832492194264209', + }, + integrations: { + All: true, + Amplitude: { + event_id: 3, + }, + }, + originalTimestamp: '2021-11-17T19:13:51.143Z', + }, + destination: { + Config: { + apiKey: 'abcde', + trackProductsOnce: true, + trackRevenuePerProduct: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Android', + os_version: '11', + device_model: 'SM-A025M', + device_manufacturer: 'samsung', + platform: 'Android', + event_id: 3, + carrier: 'T-Mobile', + app_version: '2.6.0 v3', + language: 'en-US', + insert_id: '7208abb6-2c4e-45bb-bf5b-aa426f3593a2', + user_properties: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + address: { + postalCode: 712136, + state: 'WB', + street: '', + }, + }, + event_properties: { + externalID: '1637170658229-3961832492194264209', + }, + event_type: 'App_Opened', + user_id: 'ab419c3a-47ce-11ec-82ac-16a1bb813a59', + device_brand: 'samsung', + time: 1597383030118, + session_id: -1, + location_lat: '37.7672319', + location_lng: '-122.4021353', + dma: 'San Francisco-Oakland-San Jose, CA', + country: 'United States', + city: 'San Francisco', + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 57', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + event: 'App_Opened', + sentAt: '2021-11-17T19:13:52.106Z', + userId: 'ab419c3a-47ce-11ec-82ac-16a1bb813a59', + channel: 'mobile', + context: { + source: 'test', + traits: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + address: { + city: 'kolkata', + country: 'India', + postalCode: 712136, + state: 'WB', + street: '', + }, + }, + locale: 'en-US', + network: { + carrier: 'T-Mobile', + }, + location: { + country: 'United States', + city: 'San Francisco', + latitude: '37.7672319', + longitude: '-122.4021353', + dma: 'San Francisco-Oakland-San Jose, CA', + }, + library: { + name: 'rudder-sdk-ruby-sync', + version: '1.0.6', + }, + os: { + name: 'Android', + version: '11', + }, + app: { + version: '2.6.0 v3', + }, + device: { + type: 'Android', + model: 'SM-A025M', + manufacturer: 'samsung', + }, + }, + messageId: '7208abb6-2c4e-45bb-bf5b-aa426f3593a2', + timestamp: '2020-08-14T05:30:30.118Z', + properties: { + externalID: '1637170658229-3961832492194264209', + }, + integrations: { + All: true, + Amplitude: { + event_id: 0, + }, + }, + originalTimestamp: '2021-11-17T19:13:51.143Z', + }, + destination: { + Config: { + apiKey: 'abcde', + trackProductsOnce: true, + trackRevenuePerProduct: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Android', + os_version: '11', + device_model: 'SM-A025M', + device_manufacturer: 'samsung', + platform: 'Android', + event_id: 0, + carrier: 'T-Mobile', + app_version: '2.6.0 v3', + language: 'en-US', + insert_id: '7208abb6-2c4e-45bb-bf5b-aa426f3593a2', + user_properties: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + address: { + postalCode: 712136, + state: 'WB', + street: '', + }, + }, + event_properties: { + externalID: '1637170658229-3961832492194264209', + }, + event_type: 'App_Opened', + user_id: 'ab419c3a-47ce-11ec-82ac-16a1bb813a59', + device_brand: 'samsung', + time: 1597383030118, + session_id: -1, + location_lat: '37.7672319', + location_lng: '-122.4021353', + dma: 'San Francisco-Oakland-San Jose, CA', + country: 'United States', + city: 'San Francisco', + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 58', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + event: 'App_Opened', + sentAt: '2021-11-17T19:13:52.106Z', + userId: 'ab419c3a-47ce-11ec-82ac-16a1bb813a59', + channel: 'mobile', + context: { + source: 'test', + traits: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + address: { + city: 'kolkata', + country: 'India', + postalCode: 712136, + state: 'WB', + street: '', + }, + }, + locale: 'en-US', + network: { + carrier: 'T-Mobile', + }, + location: { + country: 'United States', + city: 'San Francisco', + latitude: '37.7672319', + longitude: '-122.4021353', + dma: 'San Francisco-Oakland-San Jose, CA', + }, + library: { + name: 'rudder-sdk-ruby-sync', + version: '1.0.6', + }, + os: { + name: 'Android', + version: '11', + }, + app: { + version: '2.6.0 v3', + }, + device: { + type: 'Android', + model: 'SM-A025M', + manufacturer: 'samsung', + }, + }, + messageId: '7208abb6-2c4e-45bb-bf5b-aa426f3593a2', + timestamp: '2020-08-14T05:30:30.118Z', + properties: { + externalID: '1637170658229-3961832492194264209', + }, + integrations: { + All: true, + Amplitude: { + event_id: '0', + }, + }, + originalTimestamp: '2021-11-17T19:13:51.143Z', + }, + destination: { + Config: { + apiKey: 'abcde', + trackProductsOnce: true, + trackRevenuePerProduct: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Android', + os_version: '11', + device_model: 'SM-A025M', + device_manufacturer: 'samsung', + platform: 'Android', + carrier: 'T-Mobile', + app_version: '2.6.0 v3', + language: 'en-US', + insert_id: '7208abb6-2c4e-45bb-bf5b-aa426f3593a2', + user_properties: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + address: { + postalCode: 712136, + state: 'WB', + street: '', + }, + }, + event_properties: { + externalID: '1637170658229-3961832492194264209', + }, + event_type: 'App_Opened', + user_id: 'ab419c3a-47ce-11ec-82ac-16a1bb813a59', + device_brand: 'samsung', + time: 1597383030118, + session_id: -1, + location_lat: '37.7672319', + location_lng: '-122.4021353', + dma: 'San Francisco-Oakland-San Jose, CA', + country: 'United States', + city: 'San Francisco', + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 59', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + externalId: [ + { + id: 'lynnanderson@smith.net', + identifierType: 'device_id', + type: 'AM-users', + }, + ], + mappedToDestination: 'true', + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + anonymousId: '123456', + email: 'test@rudderstack.com', + address: { + country: 'India', + postalCode: 712136, + state: 'WB', + street: '', + os_version: 'test os', + }, + ip: '0.0.0.0', + age: 26, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + }, + traits: { + anonymousId: '123456', + email: 'test@rudderstack.com', + city: 'kolkata', + address: { + country: 'India', + postalCode: 712136, + state: 'WB', + street: '', + }, + os_version: 'test os', + ip: '0.0.0.0', + age: 26, + }, + type: 'identify', + messageId: '84e26acc-56a5-4835-8233-591137fca468', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: '123456', + userId: '123456', + integrations: { + All: true, + Amplitude: { + event_id: 6, + }, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + metadata: { + jobId: 2, + }, + destination: { + Config: { + apiKey: 'abcde', + groupTypeTrait: 'email', + groupValueTrait: 'age', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Chrome', + os_version: 'test os', + device_model: 'Mac', + platform: 'Web', + event_id: 6, + device_id: 'lynnanderson@smith.net', + app_name: 'RudderLabs JavaScript SDK', + app_version: '1.0.0', + language: 'en-US', + insert_id: '84e26acc-56a5-4835-8233-591137fca468', + ip: '0.0.0.0', + user_properties: { + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + anonymousId: '123456', + email: 'test@rudderstack.com', + postalCode: 712136, + state: 'WB', + street: '', + ip: '0.0.0.0', + age: 26, + device_id: 'lynnanderson@smith.net', + }, + event_type: '$identify', + time: 1571043797562, + user_id: '123456', + session_id: -1, + country: 'India', + city: 'kolkata', + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '123456', + }, + metadata: { + jobId: 2, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 60', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + externalId: [ + { + id: 'lynnanderson@smith.net', + identifierType: 'device_id', + type: 'AM-users', + }, + ], + mappedToDestination: 'true', + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + anonymousId: '123456', + email: 'test@rudderstack.com', + address: { + country: 'India', + postalCode: 712136, + state: 'WB', + street: '', + os_version: 'test os', + }, + ip: '0.0.0.0', + age: 26, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + }, + traits: { + anonymousId: '123456', + email: 'test@rudderstack.com', + city: 'kolkata', + address: { + country: 'India', + postalCode: 712136, + state: 'WB', + street: '', + }, + os_version: 'test os', + ip: '0.0.0.0', + age: 26, + }, + type: 'identify', + messageId: '84e26acc-56a5-4835-8233-591137fca468', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: '123456', + userId: '123456', + integrations: { + All: true, + Amplitude: { + event_id: 6, + }, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + metadata: { + jobId: 2, + }, + destination: { + Config: { + apiKey: 'abcde', + groupTypeTrait: 'email', + groupValueTrait: 'age', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Chrome', + os_version: 'test os', + device_model: 'Mac', + platform: 'Web', + event_id: 6, + device_id: 'lynnanderson@smith.net', + app_name: 'RudderLabs JavaScript SDK', + app_version: '1.0.0', + language: 'en-US', + insert_id: '84e26acc-56a5-4835-8233-591137fca468', + ip: '0.0.0.0', + user_properties: { + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + anonymousId: '123456', + email: 'test@rudderstack.com', + postalCode: 712136, + state: 'WB', + street: '', + ip: '0.0.0.0', + age: 26, + device_id: 'lynnanderson@smith.net', + }, + event_type: '$identify', + time: 1571043797562, + user_id: '123456', + session_id: -1, + country: 'India', + city: 'kolkata', + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '123456', + }, + metadata: { + jobId: 2, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 61', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.5', + }, + traits: { + name: 'Shehan Study', + category: 'SampleIdentify', + email: 'test@rudderstack.com', + plan: 'Open source', + logins: 5, + createdAt: 1599264000, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.5', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36', + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 0.8999999761581421, + }, + campaign: { + source: 'google', + medium: 'medium', + term: 'keyword', + content: 'some content', + name: 'some campaign', + test: 'other value', + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + }, + type: 'group', + messageId: 'e5034df0-a404-47b4-a463-76df99934fea', + originalTimestamp: '2020-10-20T07:54:58.983Z', + anonymousId: 'my-anonymous-id-new', + userId: 'sampleusrRudder3', + integrations: { + All: true, + Amplitude: { + event_id: 3, + }, + }, + groupId: 'Sample_groupId23', + traits: { + KEY_3: { + CHILD_KEY_92: 'value_95', + CHILD_KEY_102: 'value_103', + }, + KEY_2: { + CHILD_KEY_92: 'value_95', + CHILD_KEY_102: 'value_103', + }, + name_trait: 'Company', + value_trait: 'ABC', + }, + sentAt: '2020-10-20T07:54:58.983Z', + }, + destination: { + Config: { + apiKey: 'abcde', + groupTypeTrait: 'name_trait', + groupValueTrait: 'value_trait', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Chrome', + os_version: '85.0.4183.121', + device_model: 'Mac', + platform: 'Web', + event_id: 3, + device_id: 'my-anonymous-id-new', + app_name: 'RudderLabs JavaScript SDK', + app_version: '1.1.5', + language: 'en-US', + user_properties: { + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + utm_source: 'google', + utm_medium: 'medium', + utm_term: 'keyword', + utm_content: 'some content', + utm_name: 'some campaign', + utm_test: 'other value', + Company: 'ABC', + }, + event_type: '$identify', + groups: { + Company: 'ABC', + }, + time: 1603180498983, + user_id: 'sampleusrRudder3', + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'my-anonymous-id-new', + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/groupidentify', + headers: {}, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: { + api_key: 'abcde', + identification: [ + '{"group_type":"Company","group_value":"ABC","group_properties":{"KEY_3":{"CHILD_KEY_92":"value_95","CHILD_KEY_102":"value_103"},"KEY_2":{"CHILD_KEY_92":"value_95","CHILD_KEY_102":"value_103"},"name_trait":"Company","value_trait":"ABC"}}', + ], + }, + }, + files: {}, + userId: 'my-anonymous-id-new', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 62', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'screen', + userId: 'identified user id', + anonymousId: 'anon-id-new', + event: 'Screen View', + properties: { + prop1: '5', + event_id: 7, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + integrations: { + All: true, + Amplitude: { + event_id: 7, + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + event_id: 7, + device_id: 'anon-id-new', + event_properties: { + prop1: '5', + event_id: 7, + name: 'Screen View', + }, + user_properties: {}, + event_type: 'Viewed Screen View Screen', + user_id: 'identified user id', + time: 1580602989544, + session_id: -1, + ip: '14.5.67.21', + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'anon-id-new', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 63', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'test@rudderstack.com', + anonymousId: '12345', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + }, + request_ip: '1.1.1.1', + type: 'page', + messageId: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T11:15:18.299Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + properties: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + integrations: { + All: true, + Amplitude: { + event_id: 2, + }, + }, + name: 'ApplicationLoaded', + sentAt: '2019-10-14T11:15:53.296Z', + }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Chrome', + os_version: '77.0.3865.90', + device_model: 'Mac', + platform: 'Web', + device_id: '00000000000000000000000000', + app_name: 'RudderLabs JavaScript SDK', + app_version: '1.0.0', + language: 'en-US', + event_type: 'Viewed ApplicationLoaded Page', + event_properties: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + name: 'ApplicationLoaded', + }, + insert_id: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', + ip: '1.1.1.1', + event_id: 2, + user_properties: { + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + email: 'test@rudderstack.com', + anonymousId: '12345', + }, + user_id: '12345', + time: 1571051718299, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '00000000000000000000000000', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 64', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.5', + }, + traits: { + name: 'Shehan Study', + category: 'SampleIdentify', + email: 'test@rudderstack.com', + plan: 'Open source', + logins: 5, + createdAt: 1599264000, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.5', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36', + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 0.8999999761581421, + }, + campaign: { + source: 'google', + medium: 'medium', + term: 'keyword', + content: 'some content', + name: 'some campaign', + test: 'other value', + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + }, + type: 'alias', + messageId: 'dd46338d-5f83-493b-bd28-3b48f55d0be8', + originalTimestamp: '2020-10-20T08:14:28.778Z', + anonymousId: 'my-anonymous-id-new', + userId: 'newUserIdAlias', + integrations: { + All: true, + Amplitude: { + event_id: 67, + }, + }, + previousId: 'sampleusrRudder3', + sentAt: '2020-10-20T08:14:28.778Z', + }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/usermap', + headers: {}, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: { + api_key: 'abcde', + mapping: [ + '{"global_user_id":"newUserIdAlias","user_id":"sampleusrRudder3","event_id":67,"user_properties":{"initial_referrer":"https://docs.rudderstack.com","initial_referring_domain":"docs.rudderstack.com","utm_source":"google","utm_medium":"medium","utm_term":"keyword","utm_content":"some content","utm_name":"some campaign","utm_test":"other value"}}', + ], + }, + }, + files: {}, + userId: 'my-anonymous-id-new', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 65', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '5d205961641ee6c5', + channel: 'mobile', + context: { + app: { + build: '6', + name: 'Sample Kotlin', + namespace: 'com.example.testapp1mg', + version: '1.2', + }, + device: { + id: '5d205961641ee6c5', + manufacturer: 'Google', + model: 'Android SDK built for x86', + name: 'generic_x86', + type: 'Android', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.7.0', + }, + locale: 'en-US', + network: { + carrier: 'Android', + bluetooth: false, + cellular: true, + wifi: true, + }, + os: { + name: 'Android', + version: '7.1.1', + }, + screen: { + density: 440, + height: 2148, + width: 1080, + }, + sessionId: '1662393792', + timezone: 'Asia/Kolkata', + traits: { + anonymousId: '5d205961641ee6c5', + id: 'User Android', + userId: 'User Android', + }, + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 7.1.1; Android SDK built for x86 Build/NYC)', + }, + event: 'Screen event', + integrations: { + All: true, + }, + messageId: '1662393883248-509420bf-b812-4f8d-bdb2-8c811bfde87f', + properties: { + name: 'Screen event', + }, + originalTimestamp: '2022-09-05T16:04:43.250Z', + type: 'screen', + userId: 'User Android', + }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Android', + os_version: '7.1.1', + device_model: 'Android SDK built for x86', + device_manufacturer: 'Google', + device_id: '5d205961641ee6c5', + carrier: 'Android', + app_name: 'Sample Kotlin', + app_version: '1.2', + platform: 'Android', + language: 'en-US', + event_properties: { + name: 'Screen event', + }, + insert_id: '1662393883248-509420bf-b812-4f8d-bdb2-8c811bfde87f', + user_properties: { + anonymousId: '5d205961641ee6c5', + id: 'User Android', + userId: 'User Android', + }, + event_type: 'Viewed Screen event Screen', + user_id: 'User Android', + device_brand: 'Google', + time: 1662393883250, + session_id: 1662393792, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '5d205961641ee6c5', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 66', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '5d205961641ee6c5', + channel: 'mobile', + context: { + app: { + build: '6', + name: 'Sample Kotlin', + namespace: 'com.example.testapp1mg', + version: '1.2', + }, + device: { + id: '5d205961641ee6c5', + manufacturer: 'Google', + model: 'Android SDK built for x86', + name: 'generic_x86', + type: 'Android', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.7.0', + }, + locale: 'en-US', + network: { + carrier: 'Android', + bluetooth: false, + cellular: true, + wifi: true, + }, + os: { + name: 'Android', + version: '7.1.1', + }, + screen: { + density: 440, + height: 2148, + width: 1080, + }, + sessionId: '1662393792', + timezone: 'Asia/Kolkata', + traits: { + anonymousId: '5d205961641ee6c5', + id: 'User Android', + userId: 'User Android', + }, + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 7.1.1; Android SDK built for x86 Build/NYC)', + }, + integrations: { + All: true, + }, + messageId: '1662393883248-509420bf-b812-4f8d-bdb2-8c811bfde87f', + properties: {}, + originalTimestamp: '2022-09-05T16:04:43.250Z', + type: 'screen', + userId: 'User Android', + }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Android', + os_version: '7.1.1', + device_model: 'Android SDK built for x86', + device_manufacturer: 'Google', + device_id: '5d205961641ee6c5', + carrier: 'Android', + app_name: 'Sample Kotlin', + app_version: '1.2', + platform: 'Android', + language: 'en-US', + event_properties: {}, + insert_id: '1662393883248-509420bf-b812-4f8d-bdb2-8c811bfde87f', + user_properties: { + anonymousId: '5d205961641ee6c5', + id: 'User Android', + userId: 'User Android', + }, + event_type: 'Viewed Screen', + user_id: 'User Android', + device_brand: 'Google', + time: 1662393883250, + session_id: 1662393792, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '5d205961641ee6c5', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 67', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + externalId: [ + { + id: 'lynnanderson@smith.net', + identifierType: 'device_id', + type: 'AM-users', + }, + ], + mappedToDestination: 'true', + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + anonymousId: '123456', + email: 'test@rudderstack.com', + address: { + country: 'India', + postalCode: 712136, + state: 'WB', + street: '', + os_version: 'test os', + }, + ip: '0.0.0.0', + age: 26, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + sessionId: '1662393792', + }, + traits: { + anonymousId: '123456', + email: 'test@rudderstack.com', + city: 'kolkata', + address: { + country: 'India', + postalCode: 712136, + state: 'WB', + street: '', + }, + os_version: 'test os', + ip: '0.0.0.0', + age: 26, + }, + type: 'identify', + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: '123456', + userId: '123456', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Chrome', + os_version: 'test os', + device_model: 'Mac', + platform: 'Web', + device_id: 'lynnanderson@smith.net', + app_name: 'RudderLabs JavaScript SDK', + app_version: '1.0.0', + language: 'en-US', + insert_id: '84e26acc-56a5-4835-8233-591137fca468', + ip: '0.0.0.0', + user_properties: { + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + anonymousId: '123456', + email: 'test@rudderstack.com', + postalCode: 712136, + state: 'WB', + street: '', + ip: '0.0.0.0', + age: 26, + device_id: 'lynnanderson@smith.net', + }, + event_type: '$identify', + time: 1571043797562, + user_id: '123456', + session_id: 1662393792, + country: 'India', + city: 'kolkata', + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '123456', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 68', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '5d205961641ee6c5', + channel: 'mobile', + context: { + app: { + build: '6', + name: 'Sample Kotlin', + namespace: 'com.example.testapp1mg', + version: '1.2', + }, + device: { + id: '5d205961641ee6c5', + manufacturer: 'Google', + model: 'Android SDK built for x86', + name: 'generic_x86', + type: 'Android', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.7.0', + }, + locale: 'en-US', + network: { + carrier: 'Android', + bluetooth: false, + cellular: true, + wifi: true, + }, + os: { + name: 'Android', + version: '7.1.1', + }, + screen: { + density: 440, + height: 2148, + width: 1080, + }, + sessionId: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + timezone: 'Asia/Kolkata', + traits: { + anonymousId: '5d205961641ee6c5', + id: 'User Android', + userId: 'User Android', + }, + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 7.1.1; Android SDK built for x86 Build/NYC)', + }, + event: 'Screen event', + integrations: { + All: true, + }, + messageId: '1662393883248-509420bf-b812-4f8d-bdb2-8c811bfde87f', + properties: { + name: 'Screen event', + }, + originalTimestamp: '2022-09-05T16:04:43.250Z', + type: 'screen', + userId: 'User Android', + }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Android', + os_version: '7.1.1', + device_model: 'Android SDK built for x86', + device_manufacturer: 'Google', + device_id: '5d205961641ee6c5', + carrier: 'Android', + app_name: 'Sample Kotlin', + app_version: '1.2', + platform: 'Android', + language: 'en-US', + event_properties: { + name: 'Screen event', + }, + insert_id: '1662393883248-509420bf-b812-4f8d-bdb2-8c811bfde87f', + user_properties: { + anonymousId: '5d205961641ee6c5', + id: 'User Android', + userId: 'User Android', + }, + event_type: 'Viewed Screen event Screen', + user_id: 'User Android', + device_brand: 'Google', + time: 1662393883250, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '5d205961641ee6c5', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 69: ERROR - Either of user ID or device ID fields must be specified', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.5', + }, + traits: { + name: 'Shehan Study', + category: 'SampleIdentify', + email: 'test@rudderstack.com', + plan: 'Open source', + logins: 5, + createdAt: 1599264000, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.5', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36', + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 0.8999999761581421, + }, + campaign: { + source: 'google', + medium: 'medium', + term: 'keyword', + content: 'some content', + name: 'some campaign', + test: 'other value', + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + }, + type: 'group', + messageId: 'e5034df0-a404-47b4-a463-76df99934fea', + originalTimestamp: '2020-10-20T07:54:58.983Z', + integrations: { + All: true, + }, + groupId: 'Sample_groupId23', + traits: { + KEY_3: { + CHILD_KEY_92: 'value_95', + CHILD_KEY_102: 'value_103', + }, + KEY_2: { + CHILD_KEY_92: 'value_95', + CHILD_KEY_102: 'value_103', + }, + name_trait: 'Company', + value_trait: 'ABC', + }, + sentAt: '2020-10-20T07:54:58.983Z', + }, + destination: { + Config: { + apiKey: 'abcde', + groupTypeTrait: 'name_trait', + groupValueTrait: 'value_trait', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: 'Either of user ID or device ID fields must be specified', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'AM', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 70', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'test@rudderstack.com', + anonymousId: '12345', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + }, + request_ip: '1.1.1.1', + type: 'page', + messageId: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T11:15:18.299Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + properties: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + integrations: { + All: true, + Amplitude: { + event_id: 2, + }, + }, + name: 'ApplicationLoaded', + sentAt: '2019-10-14T11:15:53.296Z', + }, + destination: { + Config: { + apiKey: 'abcde', + useUserDefinedPageEventName: true, + userProvidedPageEventString: 'My custom Page Name is {{ name }} . Custom Name.', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Chrome', + os_version: '77.0.3865.90', + device_model: 'Mac', + platform: 'Web', + device_id: '00000000000000000000000000', + app_name: 'RudderLabs JavaScript SDK', + app_version: '1.0.0', + language: 'en-US', + event_type: 'My custom Page Name is ApplicationLoaded . Custom Name.', + event_properties: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + name: 'ApplicationLoaded', + }, + insert_id: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', + ip: '1.1.1.1', + event_id: 2, + user_properties: { + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + email: 'test@rudderstack.com', + anonymousId: '12345', + }, + user_id: '12345', + time: 1571051718299, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '00000000000000000000000000', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 71', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'test@rudderstack.com', + anonymousId: '12345', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + }, + request_ip: '1.1.1.1', + type: 'page', + messageId: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T11:15:18.299Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + properties: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + integrations: { + All: true, + Amplitude: { + event_id: 2, + }, + }, + name: 'ApplicationLoaded', + sentAt: '2019-10-14T11:15:53.296Z', + }, + destination: { + Config: { + apiKey: 'abcde', + useUserDefinedPageEventName: true, + userProvidedPageEventString: '{{name}}', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Chrome', + os_version: '77.0.3865.90', + device_model: 'Mac', + platform: 'Web', + device_id: '00000000000000000000000000', + app_name: 'RudderLabs JavaScript SDK', + app_version: '1.0.0', + language: 'en-US', + event_type: 'ApplicationLoaded', + event_properties: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + name: 'ApplicationLoaded', + }, + insert_id: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', + ip: '1.1.1.1', + event_id: 2, + user_properties: { + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + email: 'test@rudderstack.com', + anonymousId: '12345', + }, + user_id: '12345', + time: 1571051718299, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '00000000000000000000000000', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 72', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'test@rudderstack.com', + anonymousId: '12345', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + }, + request_ip: '1.1.1.1', + type: 'page', + messageId: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T11:15:18.299Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + properties: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + integrations: { + All: true, + Amplitude: { + event_id: 2, + }, + }, + name: 'ApplicationLoaded', + sentAt: '2019-10-14T11:15:53.296Z', + }, + destination: { + Config: { + apiKey: 'abcde', + useUserDefinedPageEventName: true, + userProvidedPageEventString: '', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Chrome', + os_version: '77.0.3865.90', + device_model: 'Mac', + platform: 'Web', + device_id: '00000000000000000000000000', + app_name: 'RudderLabs JavaScript SDK', + app_version: '1.0.0', + language: 'en-US', + event_type: 'ApplicationLoaded', + event_properties: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + name: 'ApplicationLoaded', + }, + insert_id: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', + ip: '1.1.1.1', + event_id: 2, + user_properties: { + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + email: 'test@rudderstack.com', + anonymousId: '12345', + }, + user_id: '12345', + time: 1571051718299, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '00000000000000000000000000', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 73', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'test@rudderstack.com', + anonymousId: '12345', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: 'Home Page', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + }, + request_ip: '1.1.1.1', + type: 'page', + messageId: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T11:15:18.299Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + properties: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + integrations: { + All: true, + Amplitude: { + event_id: 2, + }, + }, + sentAt: '2019-10-14T11:15:53.296Z', + }, + destination: { + Config: { + apiKey: 'abcde', + useUserDefinedPageEventName: false, + userProvidedPageEventString: 'Viewed {{context.page.title}} event.', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Chrome', + os_version: '77.0.3865.90', + device_model: 'Mac', + platform: 'Web', + device_id: '00000000000000000000000000', + app_name: 'RudderLabs JavaScript SDK', + app_version: '1.0.0', + language: 'en-US', + event_properties: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + insert_id: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', + ip: '1.1.1.1', + event_id: 2, + user_properties: { + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + email: 'test@rudderstack.com', + anonymousId: '12345', + }, + event_type: 'Viewed Page', + user_id: '12345', + time: 1571051718299, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '00000000000000000000000000', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 74', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'screen', + userId: 'identified user id', + anonymousId: 'anon-id-new', + event: 'Screen View', + properties: { + prop1: '5', + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + Config: { + apiKey: 'abcde', + useUserDefinedScreenEventName: true, + userProvidedScreenEventString: 'My {{ event }} event.', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + device_id: 'anon-id-new', + event_properties: { + prop1: '5', + name: 'Screen View', + }, + user_properties: {}, + event_type: 'My Screen View event.', + user_id: 'identified user id', + time: 1580602989544, + session_id: -1, + ip: '14.5.67.21', + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'anon-id-new', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 75', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'screen', + userId: 'identified user id', + anonymousId: 'anon-id-new', + event: 'Screen View', + properties: { + prop1: '5', + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + Config: { + apiKey: 'abcde', + useUserDefinedScreenEventName: false, + userProvidedScreenEventString: 'My {{ event }} event.', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + device_id: 'anon-id-new', + event_properties: { + prop1: '5', + name: 'Screen View', + }, + user_properties: {}, + event_type: 'Viewed Screen View Screen', + user_id: 'identified user id', + time: 1580602989544, + session_id: -1, + ip: '14.5.67.21', + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'anon-id-new', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 76', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'screen', + userId: 'identified user id', + anonymousId: 'anon-id-new', + event: 'Screen same as event', + properties: { + prop1: '5', + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + Config: { + apiKey: 'abcde', + useUserDefinedScreenEventName: true, + userProvidedScreenEventString: '{{ event }}', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + device_id: 'anon-id-new', + event_properties: { + prop1: '5', + name: 'Screen same as event', + }, + user_properties: {}, + event_type: 'Screen same as event', + user_id: 'identified user id', + time: 1580602989544, + session_id: -1, + ip: '14.5.67.21', + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'anon-id-new', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 77', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'screen', + userId: 'identified user id', + anonymousId: 'anon-id-new', + name: 'Screen', + properties: { + prop1: '5', + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + Config: { + apiKey: 'abcde', + useUserDefinedScreenEventName: true, + userProvidedScreenEventString: '', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + device_id: 'anon-id-new', + event_properties: { + prop1: '5', + name: 'Screen', + }, + user_properties: {}, + event_type: 'Screen', + user_id: 'identified user id', + time: 1580602989544, + session_id: -1, + ip: '14.5.67.21', + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'anon-id-new', + }, + statusCode: 200, + }, + ], + }, + }, + }, +]; diff --git a/test/integrations/destinations/am/router/data.ts b/test/integrations/destinations/am/router/data.ts new file mode 100644 index 0000000000..64701c78a1 --- /dev/null +++ b/test/integrations/destinations/am/router/data.ts @@ -0,0 +1,316 @@ +export const data = [ + { + name: 'am', + description: 'Test 0', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "traits": { + "anonymousId": "123456", + "email": "test@rudderstack.com", + "address": { + "city": "kolkata", + "country": "India", + "postalCode": 712136, + "state": "WB", + "street": "" + }, + "ip": "0.0.0.0", + "age": 26 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + }, + "page": { + "path": "/destinations/amplitude", + "referrer": "", + "search": "", + "title": "", + "url": "https://docs.rudderstack.com/destinations/amplitude", + "category": "destination", + "initial_referrer": "https://docs.rudderstack.com", + "initial_referring_domain": "docs.rudderstack.com" + } + }, + "type": "identify", + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "anonymousId": "123456", + "userId": "123456", + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + }, + "metadata": { + "jobId": 1 + }, + "destination": { + "Config": { + "apiKey": "abcde", + "groupTypeTrait": "email", + "groupValueTrait": "age" + } + } + }, + { + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "traits": { + "email": "test@rudderstack.com", + "anonymousId": "12345" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + }, + "page": { + "path": "/destinations/amplitude", + "referrer": "", + "search": "", + "title": "", + "url": "https://docs.rudderstack.com/destinations/amplitude", + "category": "destination", + "initial_referrer": "https://docs.rudderstack.com", + "initial_referring_domain": "docs.rudderstack.com" + } + }, + "request_ip": "1.1.1.1", + "type": "page", + "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T11:15:18.299Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "properties": { + "path": "/destinations/amplitude", + "referrer": "", + "search": "", + "title": "", + "url": "https://docs.rudderstack.com/destinations/amplitude", + "category": "destination", + "initial_referrer": "https://docs.rudderstack.com", + "initial_referring_domain": "docs.rudderstack.com" + }, + "integrations": { + "All": true + }, + "name": "ApplicationLoaded", + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "metadata": { + "jobId": 2 + }, + "destination": { + "Config": { + "apiKey": "abcde" + } + } + } + ], + destType: 'am', + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + "batchedRequest": [ + { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api2.amplitude.com/2/httpapi", + "headers": { + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "api_key": "abcde", + "events": [ + { + "os_name": "Chrome", + "os_version": "77.0.3865.90", + "device_model": "Mac", + "library": "rudderstack", + "platform": "Web", + "device_id": "123456", + "app_name": "RudderLabs JavaScript SDK", + "app_version": "1.0.0", + "language": "en-US", + "session_id": -1, + "insert_id": "84e26acc-56a5-4835-8233-591137fca468", + "city": "kolkata", + "country": "India", + "user_properties": { + "initial_referrer": "https://docs.rudderstack.com", + "initial_referring_domain": "docs.rudderstack.com", + "anonymousId": "123456", + "email": "test@rudderstack.com", + "postalCode": 712136, + "state": "WB", + "street": "", + "ip": "0.0.0.0", + "age": 26 + }, + "event_type": "$identify", + "time": 1571043797562, + "user_id": "123456", + "ip": "0.0.0.0" + } + ], + "options": { + "min_id_length": 1 + } + }, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "123456" + } + ], + "metadata": [ + { + "jobId": 1 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "Config": { + "apiKey": "abcde", + "groupTypeTrait": "email", + "groupValueTrait": "age" + } + } + }, + { + "batchedRequest": [ + { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api2.amplitude.com/2/httpapi", + "headers": { + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "api_key": "abcde", + "events": [ + { + "os_name": "Chrome", + "os_version": "77.0.3865.90", + "device_model": "Mac", + "library": "rudderstack", + "platform": "Web", + "device_id": "00000000000000000000000000", + "app_name": "RudderLabs JavaScript SDK", + "app_version": "1.0.0", + "language": "en-US", + "event_type": "Viewed ApplicationLoaded Page", + "event_properties": { + "path": "/destinations/amplitude", + "referrer": "", + "search": "", + "title": "", + "url": "https://docs.rudderstack.com/destinations/amplitude", + "category": "destination", + "initial_referrer": "https://docs.rudderstack.com", + "initial_referring_domain": "docs.rudderstack.com", + "name": "ApplicationLoaded" + }, + "session_id": -1, + "insert_id": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", + "ip": "1.1.1.1", + "user_properties": { + "initial_referrer": "https://docs.rudderstack.com", + "initial_referring_domain": "docs.rudderstack.com", + "email": "test@rudderstack.com", + "anonymousId": "12345" + }, + "user_id": "12345", + "time": 1571051718299 + } + ], + "options": { + "min_id_length": 1 + } + }, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + } + ], + "metadata": [ + { + "jobId": 2 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "Config": { + "apiKey": "abcde" + } + } + } + ], + }, + }, + }, + } +]; diff --git a/test/integrations/destinations/braze/network.ts b/test/integrations/destinations/braze/network.ts index 3db50ca32c..40d75c9d34 100644 --- a/test/integrations/destinations/braze/network.ts +++ b/test/integrations/destinations/braze/network.ts @@ -1,70 +1,4 @@ const dataDeliveryMocksData = [ - { - httpReq: { - url: 'https://api.amplitude.com/2/httpapi/test5', - data: { - api_key: 'c9d8a13b8bcab46a547f7be5200c483d', - events: [ - { - app_name: 'Rudder-CleverTap_Example', - app_version: '1.0', - time: 1619006730330, - user_id: 'gabi_userId_45', - user_properties: { - Residence: 'Shibuya', - city: 'Tokyo', - country: 'JP', - email: 'gabi29@gmail.com', - gender: 'M', - name: 'User2 Gabi2', - organization: 'Company', - region: 'ABC', - title: 'Owner', - zip: '100-0001', - }, - }, - ], - options: { min_id_length: 1 }, - }, - params: { destination: 'any' }, - headers: { 'Content-Type': 'application/json', 'User-Agent': 'RudderLabs' }, - method: 'POST', - }, - httpRes: { response: {} }, - }, - { - httpReq: { - url: 'https://api.amplitude.com/2/httpapi/test6', - data: { - api_key: 'c9d8a13b8bcab46a547f7be5200c483d', - events: [ - { - app_name: 'Rudder-CleverTap_Example', - app_version: '1.0', - time: 1619006730330, - user_id: 'gabi_userId_45', - user_properties: { - Residence: 'Shibuya', - city: 'Tokyo', - country: 'JP', - email: 'gabi29@gmail.com', - gender: 'M', - name: 'User2 Gabi2', - organization: 'Company', - region: 'ABC', - title: 'Owner', - zip: '100-0001', - }, - }, - ], - options: { min_id_length: 1 }, - }, - params: { destination: 'any' }, - headers: { 'Content-Type': 'application/json', 'User-Agent': 'RudderLabs' }, - method: 'POST', - }, - httpRes: {}, - }, { httpReq: { url: 'https://rest.iad-03.braze.com/users/identify/test1', @@ -463,5 +397,131 @@ const deleteNwData = [ status: 401, }, }, + { + httpReq: { + method: 'post', + data: { + external_ids: ['braze_test_user', 'user@50'], + user_aliases: [ + { alias_name: '77e278c9-e984-4cdd-950c-cd0b61befd03', alias_label: 'rudder_id' }, + { alias_name: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', alias_label: 'rudder_id' }, + ], + }, + headers: { Authorization: 'Bearer dummyApiKey' }, + url: 'https://rest.iad-03.braze.com/users/export/ids', + }, + httpRes: { + data: { + users: [ + { + created_at: '2023-03-17T20:51:58.297Z', + external_id: 'braze_test_user', + user_aliases: [], + appboy_id: '6414d2ee33326e3354e3040b', + braze_id: '6414d2ee33326e3354e3040b', + first_name: 'Jackson', + last_name: 'Miranda', + random_bucket: 8134, + email: 'jackson24miranda@gmail.com', + custom_attributes: { + pwa: false, + is_registered: true, + last_identify: 'GOOGLE_SIGN_IN', + account_region: 'ON', + is_pickup_selected: 'false', + has_tradein_attempt: false, + custom_obj_attr: { + key1: 'value1', + key2: 'value2', + key3: 'value3', + }, + custom_arr: [1, 2, 'str1'], + }, + custom_events: [ + { + name: 'Sign In Completed', + first: '2023-03-10T18:36:05.028Z', + last: '2023-03-10T18:36:05.028Z', + count: 2, + }, + ], + total_revenue: 0, + push_subscribe: 'subscribed', + email_subscribe: 'subscribed', + }, + ], + }, + message: 'success', + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + method: 'post', + url: 'https://rest.iad-01.braze.com/users/identify', + }, + httpRes: { + response: {}, + message: 'success', + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + method: 'post', + url: 'https://rest.iad-03.braze.com/users/identify', + }, + httpRes: { + response: {}, + message: 'success', + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://rest.iad-03.braze.com/users/track/testV1', + data: { + partner: 'RudderStack', + attributes: [ + { + email: '123@a.com', + city: 'Disney', + country: 'USA', + firstname: 'Mickey', + external_id: '456345345', + }, + { + email: '123@a.com', + city: 'Disney', + country: 'USA', + firstname: 'Mickey', + external_id: '456345345', + }, + { + email: '123@a.com', + city: 'Disney', + country: 'USA', + firstname: 'Mickey', + external_id: '456345345', + }, + ], + }, + params: { destination: 'braze' }, + headers: { + Accept: 'application/json', + Authorization: 'Bearer api_key', + 'Content-Type': 'application/json', + 'User-Agent': 'RudderLabs', + }, + method: 'POST', + }, + httpRes: { + data: '{"message":"Valid data must be provided in the \'attributes\', \'events\', or \'purchases\' fields.","errors":[{"type":"The value provided for the \'email\' field is not a valid email.","input_array":"attributes","index":0},{"type":"The value provided for the \'email\' field is not a valid email.","input_array":"attributes","index":1}]}', + status: 401, + }, + }, ]; export const networkCallsData = [...deleteNwData, ...dataDeliveryMocksData]; diff --git a/test/integrations/destinations/braze/processor/data.ts b/test/integrations/destinations/braze/processor/data.ts new file mode 100644 index 0000000000..9adde226a0 --- /dev/null +++ b/test/integrations/destinations/braze/processor/data.ts @@ -0,0 +1,3864 @@ +export const data = [ + { + name: 'braze', + description: 'Test 0', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + dataCenter: 'us-01', + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + message: { + anonymousId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.5', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + city: 'Disney', + country: 'USA', + email: 'mickey@disney.com', + firstname: 'Mickey', + closed_at: null, + orderTotal: 0, + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36', + }, + integrations: { + All: true, + }, + messageId: '2536eda4-d638-4c93-8014-8ffe3f083214', + originalTimestamp: '2020-01-24T06:29:02.362Z', + receivedAt: '2020-01-24T11:59:02.403+05:30', + request_ip: '[::1]:53709', + sentAt: '2020-01-24T06:29:02.363Z', + timestamp: '2020-01-24T11:59:02.402+05:30', + type: 'identify', + userId: '', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 200, + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rest.iad-01.braze.com/users/track', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + attributes: [ + { + email: 'mickey@disney.com', + city: 'Disney', + country: 'USA', + firstname: 'Mickey', + closed_at: null, + orderTotal: 0, + _update_existing_only: false, + user_alias: { + alias_name: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + alias_label: 'rudder_id', + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + }, + }, + ], + }, + }, + }, + { + name: 'braze', + description: 'Test 1: ERROR - No attributes found to update the user profile', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + dataCenter: 'us-01', + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + message: { + anonymousId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.5', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36', + }, + integrations: { + All: true, + }, + messageId: '2536eda4-d638-4c93-8014-8ffe3f083214', + originalTimestamp: '2020-01-24T06:29:02.362Z', + receivedAt: '2020-01-24T11:59:02.403+05:30', + request_ip: '[::1]:53709', + sentAt: '2020-01-24T06:29:02.363Z', + timestamp: '2020-01-24T11:59:02.402+05:30', + type: 'identify', + userId: 'mickeyMouse', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: 'No attributes found to update the user profile', + statTags: { + destType: 'BRAZE', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + }, + ], + }, + }, + }, + { + name: 'braze', + description: 'Test 2', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + message: { + anonymousId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.5', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36', + }, + event: 'braze revenue test', + integrations: { + All: true, + }, + messageId: 'a6a0ad5a-bd26-4f19-8f75-38484e580fc7', + originalTimestamp: '2020-01-24T06:29:02.364Z', + properties: { + currency: 'USD', + revenue: 50, + }, + receivedAt: '2020-01-24T11:59:02.403+05:30', + request_ip: '[::1]:53710', + sentAt: '2020-01-24T06:29:02.364Z', + timestamp: '2020-01-24T11:59:02.403+05:30', + type: 'track', + userId: 'mickeyMouse', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rest.fra-01.braze.eu/users/track', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + partner: 'RudderStack', + events: [ + { + name: 'braze revenue test', + time: '2020-01-24T11:59:02.403+05:30', + properties: { + revenue: 50, + }, + external_id: 'mickeyMouse', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'mickeyMouse', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'braze', + description: 'Test 3', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + message: { + anonymousId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.5', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + email: 'mickey@disney.com', + closed_at: null, + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36', + }, + event: 'braze revenue test', + integrations: { + All: true, + }, + messageId: 'a6a0ad5a-bd26-4f19-8f75-38484e580fc7', + originalTimestamp: '2020-01-24T06:29:02.364Z', + properties: { + currency: 'USD', + revenue: 50, + }, + receivedAt: '2020-01-24T11:59:02.403+05:30', + request_ip: '[::1]:53710', + sentAt: '2020-01-24T06:29:02.364Z', + timestamp: '2020-01-24T11:59:02.403+05:30', + type: 'track', + userId: 'mickeyMouse', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rest.fra-01.braze.eu/users/track', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + partner: 'RudderStack', + attributes: [ + { + email: 'mickey@disney.com', + closed_at: null, + external_id: 'mickeyMouse', + }, + ], + events: [ + { + name: 'braze revenue test', + time: '2020-01-24T11:59:02.403+05:30', + properties: { + revenue: 50, + }, + external_id: 'mickeyMouse', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'mickeyMouse', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'braze', + description: 'Test 4', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + dataCenter: 'eu-01', + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + message: { + anonymousId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.5', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36', + }, + integrations: { + All: true, + }, + messageId: 'dd266c67-9199-4a52-ba32-f46ddde67312', + originalTimestamp: '2020-01-24T06:29:02.358Z', + properties: { + path: '/tests/html/index2.html', + referrer: '', + search: '', + title: '', + url: 'http://localhost/tests/html/index2.html', + }, + receivedAt: '2020-01-24T11:59:02.403+05:30', + request_ip: '[::1]:53708', + sentAt: '2020-01-24T06:29:02.359Z', + timestamp: '2020-01-24T11:59:02.402+05:30', + type: 'page', + userId: '', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rest.fra-01.braze.eu/users/track', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + partner: 'RudderStack', + events: [ + { + name: 'Page Viewed', + time: '2020-01-24T11:59:02.402+05:30', + properties: { + path: '/tests/html/index2.html', + referrer: '', + search: '', + title: '', + url: 'http://localhost/tests/html/index2.html', + }, + _update_existing_only: false, + user_alias: { + alias_name: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + alias_label: 'rudder_id', + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'braze', + description: 'Test 5', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + dataCenter: 'us-01', + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + message: { + anonymousId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.5', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + city: 'Disney', + country: 'USA', + email: 'mickey@disney.com', + firstname: 'Mickey', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36', + }, + integrations: { + All: true, + }, + messageId: '2536eda4-d638-4c93-8014-8ffe3f083214', + originalTimestamp: '2020-01-24T06:29:02.362Z', + receivedAt: '2020-01-24T11:59:02.403+05:30', + request_ip: '[::1]:53709', + sentAt: '2020-01-24T06:29:02.363Z', + timestamp: '2020-01-24T11:59:02.402+05:30', + type: 'identify', + userId: '', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 200, + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rest.iad-01.braze.com/users/track', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + attributes: [ + { + city: 'Disney', + country: 'USA', + email: 'mickey@disney.com', + firstname: 'Mickey', + _update_existing_only: false, + user_alias: { + alias_name: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + alias_label: 'rudder_id', + }, + }, + ], + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + }, + }, + ], + }, + }, + }, + { + name: 'braze', + description: 'Test 6', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + enableNestedArrayOperations: false, + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + message: { + anonymousId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.5', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + city: 'Disney', + country: 'USA', + email: 'mickey@disney.com', + firstName: 'Mickey', + gender: 'woman', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36', + }, + event: 'braze revenue test', + integrations: { + All: true, + }, + messageId: 'a6a0ad5a-bd26-4f19-8f75-38484e580fc7', + originalTimestamp: '2020-01-24T06:29:02.364Z', + properties: { + currency: 'USD', + revenue: 50, + }, + receivedAt: '2020-01-24T11:59:02.403+05:30', + request_ip: '[::1]:53710', + sentAt: '2020-01-24T06:29:02.364Z', + timestamp: '2020-01-24T11:59:02.403+05:30', + type: 'track', + userId: '', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rest.fra-01.braze.eu/users/track', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + partner: 'RudderStack', + attributes: [ + { + email: 'mickey@disney.com', + first_name: 'Mickey', + gender: 'F', + city: 'Disney', + country: 'USA', + _update_existing_only: false, + user_alias: { + alias_name: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + alias_label: 'rudder_id', + }, + }, + ], + events: [ + { + name: 'braze revenue test', + time: '2020-01-24T11:59:02.403+05:30', + properties: { + revenue: 50, + }, + _update_existing_only: false, + user_alias: { + alias_name: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + alias_label: 'rudder_id', + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'braze', + description: 'Test 7', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + message: { + anonymousId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.5', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + city: 'Disney', + country: 'USA', + email: 'mickey@disney.com', + firstname: 'Mickey', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36', + }, + event: 'KM Order Completed', + integrations: { + All: true, + }, + messageId: 'aa5f5e44-8756-40ad-ad1e-b0d3b9fa710a', + originalTimestamp: '2020-01-24T06:29:02.367Z', + properties: { + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + coupon: 'hasbros', + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + products: [ + { + category: 'Games', + image_url: 'https:///www.example.com/product/path.jpg', + name: 'Monopoly: 3rd Edition', + price: 19, + product_id: '507f1f77bcf86cd799439011', + quantity: 1, + sku: '45790-32', + url: 'https://www.example.com/product/path', + }, + { + category: 'Games', + name: 'Uno Card Game', + price: 3, + product_id: '505bd76785ebb509fc183733', + quantity: 2, + sku: '46493-32', + }, + ], + revenue: 25, + shipping: 3, + subtotal: 22.5, + tax: 2, + total: 27.5, + }, + receivedAt: '2020-01-24T11:59:02.403+05:30', + request_ip: '[::1]:53712', + sentAt: '2020-01-24T06:29:02.368Z', + timestamp: '2020-01-24T11:59:02.402+05:30', + type: 'track', + userId: '', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rest.fra-01.braze.eu/users/track', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + partner: 'RudderStack', + attributes: [ + { + email: 'mickey@disney.com', + city: 'Disney', + country: 'USA', + firstname: 'Mickey', + _update_existing_only: false, + user_alias: { + alias_name: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + alias_label: 'rudder_id', + }, + }, + ], + events: [ + { + name: 'KM Order Completed', + time: '2020-01-24T11:59:02.402+05:30', + properties: { + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + coupon: 'hasbros', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + products: [ + { + category: 'Games', + image_url: 'https:///www.example.com/product/path.jpg', + name: 'Monopoly: 3rd Edition', + price: 19, + product_id: '507f1f77bcf86cd799439011', + quantity: 1, + sku: '45790-32', + url: 'https://www.example.com/product/path', + }, + { + category: 'Games', + name: 'Uno Card Game', + price: 3, + product_id: '505bd76785ebb509fc183733', + quantity: 2, + sku: '46493-32', + }, + ], + revenue: 25, + shipping: 3, + subtotal: 22.5, + tax: 2, + total: 27.5, + }, + _update_existing_only: false, + user_alias: { + alias_name: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + alias_label: 'rudder_id', + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'braze', + description: 'Test 8', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + event: 'Order Completed', + sentAt: '2020-09-14T12:09:37.491Z', + userId: 'Randomuser2222', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.3', + namespace: 'com.rudderlabs.javascript', + }, + page: { + url: 'file:///Users/manashi/Desktop/rudder-all-sdk-application-testing/Fullstory%20test%20By%20JS%20SDK/braze.html', + path: '/Users/manashi/Desktop/rudder-all-sdk-application-testing/Fullstory%20test%20By%20JS%20SDK/braze.html', + title: 'Fullstory Test', + search: '', + referrer: '', + }, + locale: 'en-GB', + screen: { + density: 2, + }, + traits: { + email: 'manashi@gmaiol.com', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.3', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36', + }, + messageId: '24ecc509-ce3e-473c-8483-ba1ea2c195cb', + properties: { + products: [ + { + sku: '45790-32', + url: 'https://www.example.com/product/path', + key1: { + key11: 'value1', + key22: 'value2', + }, + name: 'Monopoly: 3rd Edition', + price: 19, + category: 'Games', + quantity: 1, + image_url: 'https:///www.example.com/product/path.jpg', + currency78: 'USD', + product_id: '507f1f77bcf86cd799439011', + }, + { + sku: '46493-32', + name: 'Uno Card Game', + price23: 3, + category: 'Games', + quantity: 2, + currency78: 'USD', + product_id: '505bd76785ebb509fc183733', + }, + ], + }, + anonymousId: 'c6ff1462-b692-43d6-8f6a-659efedc99ea', + integrations: { + All: true, + }, + originalTimestamp: '2020-09-14T12:09:37.491Z', + }, + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: + 'Invalid Order Completed event: Message properties and product at index: 0 is missing currency', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'BRAZE', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'braze', + description: 'Test 9', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'group', + event: 'Order Completed', + sentAt: '2020-09-14T12:09:37.491Z', + userId: 'Randomuser2222', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.3', + namespace: 'com.rudderlabs.javascript', + }, + page: { + url: 'file:///Users/manashi/Desktop/rudder-all-sdk-application-testing/Fullstory%20test%20By%20JS%20SDK/braze.html', + path: '/Users/manashi/Desktop/rudder-all-sdk-application-testing/Fullstory%20test%20By%20JS%20SDK/braze.html', + title: 'Fullstory Test', + search: '', + referrer: '', + }, + locale: 'en-GB', + screen: { + density: 2, + }, + traits: { + email: 'manashi@gmaiol.com', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.3', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36', + }, + messageId: '24ecc509-ce3e-473c-8483-ba1ea2c195cb', + traits: { + groupId: '1234', + }, + anonymousId: 'c6ff1462-b692-43d6-8f6a-659efedc99ea', + integrations: { + All: true, + }, + originalTimestamp: '2020-09-14T12:09:37.491Z', + }, + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rest.fra-01.braze.eu/users/track', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + attributes: [ + { + ab_rudder_group_1234: true, + external_id: 'Randomuser2222', + }, + ], + partner: 'RudderStack', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'Randomuser2222', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'braze', + description: 'Test 10', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + dataCenter: 'us-01', + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + message: { + anonymousId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + channel: 'web', + context: { + mappedToDestination: true, + externalId: [ + { + identifierType: 'external_id', + id: 'mickey@disney.com', + }, + ], + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.5', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + home_city: 'Disney', + country: 'USA', + first_name: 'Mickey', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36', + }, + integrations: { + All: true, + }, + messageId: '2536eda4-d638-4c93-8014-8ffe3f083214', + originalTimestamp: '2020-01-24T06:29:02.362Z', + receivedAt: '2020-01-24T11:59:02.403+05:30', + request_ip: '[::1]:53709', + sentAt: '2020-01-24T06:29:02.363Z', + timestamp: '2020-01-24T11:59:02.402+05:30', + type: 'identify', + userId: '', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 200, + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rest.iad-01.braze.com/users/track', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + attributes: [ + { + home_city: 'Disney', + country: 'USA', + external_id: 'mickey@disney.com', + first_name: 'Mickey', + }, + ], + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: 'mickey@disney.com', + }, + }, + ], + }, + }, + }, + { + name: 'braze', + description: 'Test 11', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + message: { + anonymousId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.5', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + city: 'Disney', + country: 'USA', + email: 'mickey@disney.com', + firstname: 'Mickey', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36', + }, + event: 'Order Completed', + integrations: { + All: true, + }, + messageId: 'aa5f5e44-8756-40ad-ad1e-b0d3b9fa710a', + originalTimestamp: '2020-01-24T06:29:02.367Z', + properties: { + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + coupon: 'hasbros', + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + products: [ + { + category: 'Games', + image_url: 'https:///www.example.com/product/path.jpg', + name: 'Monopoly: 3rd Edition', + price: 0, + product_id: '507f1f77bcf86cd799439011', + quantity: 1, + sku: '45790-32', + url: 'https://www.example.com/product/path', + }, + { + category: 'Games', + name: 'Uno Card Game', + price: 0, + product_id: '505bd76785ebb509fc183733', + quantity: 2, + sku: '46493-32', + }, + ], + revenue: 25, + shipping: 3, + subtotal: 22.5, + tax: 2, + total: 27.5, + }, + receivedAt: '2020-01-24T11:59:02.403+05:30', + request_ip: '[::1]:53712', + sentAt: '2020-01-24T06:29:02.368Z', + timestamp: '2020-01-24T11:59:02.402+05:30', + type: 'track', + userId: '', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rest.fra-01.braze.eu/users/track', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + attributes: [ + { + email: 'mickey@disney.com', + city: 'Disney', + country: 'USA', + firstname: 'Mickey', + _update_existing_only: false, + user_alias: { + alias_name: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + alias_label: 'rudder_id', + }, + }, + ], + purchases: [ + { + product_id: '507f1f77bcf86cd799439011', + price: 0, + currency: 'USD', + quantity: 1, + time: '2020-01-24T11:59:02.402+05:30', + _update_existing_only: false, + user_alias: { + alias_name: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + alias_label: 'rudder_id', + }, + }, + { + product_id: '505bd76785ebb509fc183733', + price: 0, + currency: 'USD', + quantity: 2, + time: '2020-01-24T11:59:02.402+05:30', + _update_existing_only: false, + user_alias: { + alias_name: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + alias_label: 'rudder_id', + }, + }, + ], + partner: 'RudderStack', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'braze', + description: 'Test 12', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + message: { + anonymousId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.5', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + city: 'Disney', + country: 'USA', + email: 'mickey@disney.com', + firstname: 'Mickey', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36', + }, + event: 'Order Completed', + integrations: { + All: true, + }, + messageId: 'aa5f5e44-8756-40ad-ad1e-b0d3b9fa710a', + originalTimestamp: '2020-01-24T06:29:02.367Z', + properties: { + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + coupon: 'hasbros', + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + products: [ + { + category: 'Games', + image_url: 'https:///www.example.com/product/path.jpg', + name: 'Monopoly: 3rd Edition', + price: 0, + product_id: '507f1f77bcf86cd799439011', + quantity: 1, + sku: '45790-32', + url: 'https://www.example.com/product/path', + }, + { + category: 'Games', + name: 'Uno Card Game', + price: 10, + product_id: '505bd76785ebb509fc183733', + quantity: 2, + sku: '46493-32', + }, + ], + revenue: 25, + shipping: 3, + subtotal: 22.5, + tax: 2, + total: 27.5, + }, + receivedAt: '2020-01-24T11:59:02.403+05:30', + request_ip: '[::1]:53712', + sentAt: '2020-01-24T06:29:02.368Z', + timestamp: '2020-01-24T11:59:02.402+05:30', + type: 'track', + userId: '', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rest.fra-01.braze.eu/users/track', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + attributes: [ + { + email: 'mickey@disney.com', + city: 'Disney', + country: 'USA', + firstname: 'Mickey', + _update_existing_only: false, + user_alias: { + alias_name: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + alias_label: 'rudder_id', + }, + }, + ], + purchases: [ + { + product_id: '507f1f77bcf86cd799439011', + price: 0, + currency: 'USD', + quantity: 1, + time: '2020-01-24T11:59:02.402+05:30', + _update_existing_only: false, + user_alias: { + alias_name: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + alias_label: 'rudder_id', + }, + }, + { + product_id: '505bd76785ebb509fc183733', + price: 10, + currency: 'USD', + quantity: 2, + time: '2020-01-24T11:59:02.402+05:30', + _update_existing_only: false, + user_alias: { + alias_name: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + alias_label: 'rudder_id', + }, + }, + ], + partner: 'RudderStack', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'braze', + description: 'Test 13', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + enableNestedArrayOperations: true, + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + message: { + anonymousId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.5', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + cars2: { + update: [ + { + age: 30, + id: 2, + identifier: 'id', + name: 'abcd', + }, + { + age: 27, + id: 1, + identifier: 'id', + name: 'abcd', + }, + ], + }, + city: 'Disney', + country: 'USA', + email: 'mickey@disney.com', + firstName: 'Mickey', + gender: 'woman', + pets: { + add: [ + { + age: 27, + id: 1, + name: 'abc', + }, + ], + remove: [ + { + id: 3, + identifier: 'id', + }, + { + id: 4, + identifier: 'id', + }, + ], + update: [ + { + age: 27, + id: 2, + identifier: 'id', + name: 'abc', + }, + ], + }, + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36', + }, + event: 'braze revenue test', + integrations: { + All: true, + }, + messageId: '89140820-c187-4e62-9599-3c633771ee58', + originalTimestamp: '2023-03-14T02:06:26.501+05:30', + properties: { + currency: 'USD', + mergeObjectsUpdateOperation: false, + revenue: 50, + }, + receivedAt: '2023-03-14T02:06:22.433+05:30', + request_ip: '[::1]', + rudderId: '2686e376-7e08-42f7-8edc-ff67eb238a91', + sentAt: '2023-03-14T02:06:26.501+05:30', + timestamp: '2023-03-14T02:06:22.432+05:30', + type: 'track', + userId: 'finalUserTestCA', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rest.fra-01.braze.eu/users/track', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + partner: 'RudderStack', + attributes: [ + { + email: 'mickey@disney.com', + first_name: 'Mickey', + gender: 'F', + cars2: { + $update: [ + { + $identifier_key: 'id', + $identifier_value: 2, + $new_object: { + age: 30, + name: 'abcd', + }, + }, + { + $identifier_key: 'id', + $identifier_value: 1, + $new_object: { + age: 27, + name: 'abcd', + }, + }, + ], + }, + city: 'Disney', + country: 'USA', + pets: { + $update: [ + { + $identifier_key: 'id', + $identifier_value: 2, + $new_object: { + age: 27, + name: 'abc', + }, + }, + ], + $remove: [ + { + $identifier_key: 'id', + $identifier_value: 3, + }, + { + $identifier_key: 'id', + $identifier_value: 4, + }, + ], + $add: [ + { + age: 27, + id: 1, + name: 'abc', + }, + ], + }, + _merge_objects: false, + external_id: 'finalUserTestCA', + }, + ], + events: [ + { + name: 'braze revenue test', + time: '2023-03-14T02:06:22.432+05:30', + properties: { + mergeObjectsUpdateOperation: false, + revenue: 50, + }, + external_id: 'finalUserTestCA', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'finalUserTestCA', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'braze', + description: 'Test 14', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + enableNestedArrayOperations: true, + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + message: { + anonymousId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.5', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + cars: { + add: [ + { + age: 27, + id: 1, + name: 'abc', + }, + ], + update: [ + { + age: 30, + id: 2, + identifier: 'id', + name: 'abcd', + }, + { + age: 27, + id: 1, + identifier: 'id', + name: 'abcd', + }, + ], + }, + city: 'Disney', + country: 'USA', + email: 'mickey@disney.com', + firstName: 'Mickey', + gender: 'woman', + pets: [ + { + breed: 'beagle', + id: 1, + name: 'Gus', + type: 'dog', + }, + { + breed: 'calico', + id: 2, + name: 'Gerald', + type: 'cat', + }, + ], + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36', + }, + event: 'braze revenue test', + integrations: { + All: true, + }, + messageId: 'd1e049af-913c-46ee-8f5c-5b26966e896f', + originalTimestamp: '2023-03-14T02:13:10.758+05:30', + properties: { + currency: 'USD', + mergeObjectsUpdateOperation: false, + revenue: 50, + }, + receivedAt: '2023-03-14T02:13:10.519+05:30', + request_ip: '[::1]', + rudderId: '2686e376-7e08-42f7-8edc-ff67eb238a91', + sentAt: '2023-03-14T02:13:10.758+05:30', + timestamp: '2023-03-14T02:13:10.518+05:30', + type: 'track', + userId: 'finalUserTestCA', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rest.fra-01.braze.eu/users/track', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + partner: 'RudderStack', + attributes: [ + { + email: 'mickey@disney.com', + first_name: 'Mickey', + gender: 'F', + cars: { + $update: [ + { + $identifier_key: 'id', + $identifier_value: 2, + $new_object: { + age: 30, + name: 'abcd', + }, + }, + { + $identifier_key: 'id', + $identifier_value: 1, + $new_object: { + age: 27, + name: 'abcd', + }, + }, + ], + $add: [ + { + age: 27, + id: 1, + name: 'abc', + }, + ], + }, + city: 'Disney', + country: 'USA', + pets: [ + { + breed: 'beagle', + id: 1, + name: 'Gus', + type: 'dog', + }, + { + breed: 'calico', + id: 2, + name: 'Gerald', + type: 'cat', + }, + ], + _merge_objects: false, + external_id: 'finalUserTestCA', + }, + ], + events: [ + { + name: 'braze revenue test', + time: '2023-03-14T02:13:10.518+05:30', + properties: { + mergeObjectsUpdateOperation: false, + revenue: 50, + }, + external_id: 'finalUserTestCA', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'finalUserTestCA', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'braze', + description: 'Test 15', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + dataCenter: 'us-01', + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + message: { + channel: 'web', + context: { + traits: { + address: { + city: 'Mathura', + country: 'India', + }, + email: 'a@gmail.com', + phone: '9988123321', + firstName: 'anuj', + lastName: 'kumar', + gender: 'male', + birthday: '01/01/1971', + avatar: 'https://i.kym-cdn.com/entries/icons/mobile/000/034/772/anuj-1.jpg', + bio: 'Tech and tension go together', + language: 'en-IN', + job: 'Director', + company: 'Plinth India', + }, + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.5', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36', + }, + integrations: { + All: true, + }, + request_ip: '[::1]:53709', + type: 'identify', + userId: 'ank101', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rest.iad-01.braze.com/users/track', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + attributes: [ + { + country: 'India', + dob: '01/01/1971', + email: 'a@gmail.com', + first_name: 'anuj', + gender: 'M', + home_city: 'Mathura', + image_url: + 'https://i.kym-cdn.com/entries/icons/mobile/000/034/772/anuj-1.jpg', + last_name: 'kumar', + phone: '9988123321', + bio: 'Tech and tension go together', + language: 'en-IN', + job: 'Director', + company: 'Plinth India', + external_id: 'ank101', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'ank101', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'braze', + description: 'Test 16', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + dataCenter: 'us-01', + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + message: { + channel: 'web', + context: { + traits: { + address: { + city: 'Mathura', + country: 'India', + }, + email: 'a@gmail.com', + phone: '9988123321', + firstName: 'anuj', + lastName: 'kumar', + gender: null, + birthday: '01/01/1971', + avatar: 'https://i.kym-cdn.com/entries/icons/mobile/000/034/772/anuj-1.jpg', + bio: 'Tech and tension go together', + language: 'en-IN', + job: 'Director', + company: null, + }, + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.5', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36', + }, + integrations: { + All: true, + }, + request_ip: '[::1]:53709', + type: 'identify', + userId: 'ank101', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rest.iad-01.braze.com/users/track', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + attributes: [ + { + country: 'India', + dob: '01/01/1971', + email: 'a@gmail.com', + first_name: 'anuj', + gender: null, + home_city: 'Mathura', + image_url: + 'https://i.kym-cdn.com/entries/icons/mobile/000/034/772/anuj-1.jpg', + last_name: 'kumar', + phone: '9988123321', + bio: 'Tech and tension go together', + language: 'en-IN', + job: 'Director', + company: null, + external_id: 'ank101', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'ank101', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'braze', + description: 'Test 17', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + dataCenter: 'US-03', + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.5', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36', + }, + integrations: { + All: true, + }, + request_ip: '[::1]:53709', + type: 'alias', + previousId: 'userId', + userId: 'userMergeTest2', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rest.iad-03.braze.com/users/merge', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + merge_updates: [ + { + identifier_to_merge: { + external_id: 'userId', + }, + identifier_to_keep: { + external_id: 'userMergeTest2', + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'userMergeTest2', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'braze', + description: 'Test 18: ERROR - previousId is required for alias call', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + dataCenter: 'US-03', + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.5', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36', + }, + integrations: { + All: true, + }, + request_ip: '[::1]:53709', + type: 'alias', + userId: 'userMergeTest2', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: '[BRAZE]: previousId is required for alias call', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'BRAZE', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'braze', + description: 'Test 19: ERROR - userId is required for alias call', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + dataCenter: 'US-03', + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.5', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36', + }, + integrations: { + All: true, + }, + request_ip: '[::1]:53709', + type: 'alias', + previousId: 'userMergeTest2', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: '[BRAZE]: userId is required for alias call', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'BRAZE', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'braze', + description: 'Test 20', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + dataCenter: 'us-01', + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + metadata: { + sourceType: 'metadata.sourceType', + destinationType: 'metadata.destinationType', + k8_namespace: 'metadata.namespace', + }, + message: { + channel: 'web', + context: { + traits: { + email: 'A@HOTMAIL.COM', + phone: '9988123321', + firstName: 'anil', + lastName: 'kumar', + gender: null, + birthday: '01/01/1971', + avatar: 'https://i.kym-cdn.com/entries/icons/mobile/000/034/772/anuj-1.jpg', + bio: 'Tech and tension go together', + language: 'en-IN', + job: 'Director', + company: null, + }, + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.5', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36', + }, + integrations: { + All: true, + }, + request_ip: '[::1]:53709', + type: 'identify', + userId: 'ank101', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rest.iad-01.braze.com/users/track', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + attributes: [ + { + dob: '01/01/1971', + email: 'a@hotmail.com', + first_name: 'anil', + gender: null, + image_url: + 'https://i.kym-cdn.com/entries/icons/mobile/000/034/772/anuj-1.jpg', + last_name: 'kumar', + phone: '9988123321', + bio: 'Tech and tension go together', + language: 'en-IN', + job: 'Director', + company: null, + external_id: 'ank101', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'ank101', + }, + metadata: { + sourceType: 'metadata.sourceType', + destinationType: 'metadata.destinationType', + k8_namespace: 'metadata.namespace', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'braze', + description: 'Test 21', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + dataCenter: 'us-01', + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + metadata: { + sourceType: 'metadata.sourceType', + destinationType: 'metadata.destinationType', + k8_namespace: 'metadata.namespace', + }, + message: { + anonymousId: 'e6ab2c5e-1cda-34a9-g962-r2f62df18abc', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.5', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + city: 'Disney', + country: 'USA', + email: 'mickey@disney.com', + firstname: 'Mickey', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36', + }, + event: 'Order Completed', + integrations: { + All: true, + }, + messageId: 'aa5f5e44-8756-40ad-ad1e-b0d3b9fa710a', + originalTimestamp: '2020-01-24T06:29:02.367Z', + properties: { + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + coupon: 'hasbros', + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + products: [ + { + category: 'Games', + image_url: 'https:///www.example.com/product/path.jpg', + name: 'Monopoly: 3rd Edition', + price: 0, + product_id: '507f1f77bcf86cd799439011', + quantity: 1, + sku: '45790-32', + url: 'https://www.example.com/product/path', + }, + ], + revenue: 25, + shipping: 3, + subtotal: 22.5, + tax: 2, + total: 27.5, + }, + receivedAt: '2020-01-24T11:59:02.403+05:30', + request_ip: '[::1]:53712', + sentAt: '2020-01-24T06:29:02.368Z', + timestamp: '2020-01-24T11:59:02.402+05:30', + type: 'track', + userId: '', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rest.iad-01.braze.com/users/track', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + attributes: [ + { + email: 'mickey@disney.com', + city: 'Disney', + country: 'USA', + firstname: 'Mickey', + _update_existing_only: false, + user_alias: { + alias_name: 'e6ab2c5e-1cda-34a9-g962-r2f62df18abc', + alias_label: 'rudder_id', + }, + }, + ], + purchases: [ + { + product_id: '507f1f77bcf86cd799439011', + price: 0, + currency: 'USD', + quantity: 1, + time: '2020-01-24T11:59:02.402+05:30', + _update_existing_only: false, + user_alias: { + alias_name: 'e6ab2c5e-1cda-34a9-g962-r2f62df18abc', + alias_label: 'rudder_id', + }, + }, + ], + partner: 'RudderStack', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'e6ab2c5e-1cda-34a9-g962-r2f62df18abc', + }, + metadata: { + sourceType: 'metadata.sourceType', + destinationType: 'metadata.destinationType', + k8_namespace: 'metadata.namespace', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'braze', + description: 'Test 22', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'group', + event: 'Order Completed', + sentAt: '2020-09-14T12:09:37.491Z', + userId: 'Randomuser2222', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.3', + namespace: 'com.rudderlabs.javascript', + }, + page: { + url: 'file:///Users/manashi/Desktop/rudder-all-sdk-application-testing/Fullstory%20test%20By%20JS%20SDK/braze.html', + path: '/Users/manashi/Desktop/rudder-all-sdk-application-testing/Fullstory%20test%20By%20JS%20SDK/braze.html', + title: 'Fullstory Test', + search: '', + referrer: '', + }, + locale: 'en-GB', + screen: { + density: 2, + }, + traits: { + email: 'manashi@gmaiol.com', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.3', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36', + }, + messageId: '24ecc509-ce3e-473c-8483-ba1ea2c195cb', + groupId: '1234', + traits: { + phone: '5055077683', + subscriptionState: 'subscribed', + }, + anonymousId: 'c6ff1462-b692-43d6-8f6a-659efedc99ea', + integrations: { + All: true, + }, + originalTimestamp: '2020-09-14T12:09:37.491Z', + }, + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + enableSubscriptionGroupInGroupCall: true, + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rest.fra-01.braze.eu/v2/subscription/status/set', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + subscription_groups: [ + { + subscription_group_id: '1234', + subscription_state: 'subscribed', + external_id: ['Randomuser2222'], + phones: ['5055077683'], + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'braze', + description: 'Test 23', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'group', + event: 'Order Completed', + sentAt: '2020-09-14T12:09:37.491Z', + userId: 'Randomuser2222', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.3', + namespace: 'com.rudderlabs.javascript', + }, + page: { + url: 'file:///Users/manashi/Desktop/rudder-all-sdk-application-testing/Fullstory%20test%20By%20JS%20SDK/braze.html', + path: '/Users/manashi/Desktop/rudder-all-sdk-application-testing/Fullstory%20test%20By%20JS%20SDK/braze.html', + title: 'Fullstory Test', + search: '', + referrer: '', + }, + locale: 'en-GB', + screen: { + density: 2, + }, + traits: { + email: 'manashi@gmaiol.com', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.3', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36', + }, + messageId: '24ecc509-ce3e-473c-8483-ba1ea2c195cb', + groupId: '1234', + traits: { + email: 'abc@test.com', + subscriptionState: 'unsubscribed', + }, + anonymousId: 'c6ff1462-b692-43d6-8f6a-659efedc99ea', + integrations: { + All: true, + }, + originalTimestamp: '2020-09-14T12:09:37.491Z', + }, + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + enableSubscriptionGroupInGroupCall: true, + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rest.fra-01.braze.eu/v2/subscription/status/set', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + subscription_groups: [ + { + subscription_group_id: '1234', + subscription_state: 'unsubscribed', + external_id: ['Randomuser2222'], + emails: ['abc@test.com'], + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'braze', + description: 'Test 24', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + metadata: { + sourceType: '', + destinationType: '', + namespace: '', + }, + message: { + anonymousId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.5', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36', + }, + event: 'braze revenue test', + integrations: { + All: true, + braze: { + appId: '123', + }, + }, + messageId: 'a6a0ad5a-bd26-4f19-8f75-38484e580fc7', + originalTimestamp: '2020-01-24T06:29:02.364Z', + properties: { + currency: 'USD', + revenue: 50, + }, + receivedAt: '2020-01-24T11:59:02.403+05:30', + request_ip: '[::1]:53710', + sentAt: '2020-01-24T06:29:02.364Z', + timestamp: '2020-01-24T11:59:02.403+05:30', + type: 'track', + userId: 'mickeyMouse', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rest.fra-01.braze.eu/users/track', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + partner: 'RudderStack', + events: [ + { + name: 'braze revenue test', + time: '2020-01-24T11:59:02.403+05:30', + properties: { + revenue: 50, + }, + external_id: 'mickeyMouse', + app_id: '123', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'mickeyMouse', + }, + metadata: { + sourceType: '', + destinationType: '', + namespace: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'braze', + description: 'Test 25', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + sendPurchaseEventWithExtraProperties: true, + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + message: { + anonymousId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.5', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + city: 'Disney', + country: 'USA', + email: 'mickey@disney.com', + firstname: 'Mickey', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36', + }, + event: 'Order Completed', + integrations: { + All: true, + }, + messageId: 'aa5f5e44-8756-40ad-ad1e-b0d3b9fa710a', + originalTimestamp: '2020-01-24T06:29:02.367Z', + properties: { + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + coupon: 'hasbros', + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + products: [ + { + category: 'Games', + image_url: 'https:///www.example.com/product/path.jpg', + name: 'Monopoly: 3rd Edition', + price: 0, + product_id: '507f1f77bcf86cd799439023', + quantity: 1, + sku: '45790-32', + url: 'https://www.example.com/product/path', + }, + { + category: 'Games', + name: 'Uno Card Game', + price: 0, + product_id: '505bd76785ebb509fc183724', + quantity: 2, + sku: '46493-32', + }, + ], + revenue: 25, + shipping: 3, + subtotal: 22.5, + tax: 2, + total: 27.5, + }, + receivedAt: '2020-01-24T11:59:02.403+05:30', + request_ip: '[::1]:53712', + sentAt: '2020-01-24T06:29:02.368Z', + timestamp: '2020-01-24T11:59:02.402+05:30', + type: 'track', + userId: '', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rest.fra-01.braze.eu/users/track', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + attributes: [ + { + email: 'mickey@disney.com', + city: 'Disney', + country: 'USA', + firstname: 'Mickey', + _update_existing_only: false, + user_alias: { + alias_name: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + alias_label: 'rudder_id', + }, + }, + ], + purchases: [ + { + product_id: '507f1f77bcf86cd799439023', + price: 0, + currency: 'USD', + quantity: 1, + time: '2020-01-24T11:59:02.402+05:30', + properties: { + category: 'Games', + image_url: 'https:///www.example.com/product/path.jpg', + name: 'Monopoly: 3rd Edition', + url: 'https://www.example.com/product/path', + }, + _update_existing_only: false, + user_alias: { + alias_name: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + alias_label: 'rudder_id', + }, + }, + { + product_id: '505bd76785ebb509fc183724', + price: 0, + currency: 'USD', + quantity: 2, + time: '2020-01-24T11:59:02.402+05:30', + properties: { + category: 'Games', + name: 'Uno Card Game', + }, + _update_existing_only: false, + user_alias: { + alias_name: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + alias_label: 'rudder_id', + }, + }, + ], + partner: 'RudderStack', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'braze', + description: 'Test 25: ERROR - Invalid email, email must be a valid string', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + dataCenter: 'us-01', + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + message: { + anonymousId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + channel: 'web', + context: { + traits: { + city: 'Disney', + country: 'USA', + email: 123, + firstname: 'Mickey', + closed_at: null, + orderTotal: 0, + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36', + }, + integrations: { + All: true, + }, + messageId: '2536eda4-d638-4c93-8014-8ffe3f083214', + originalTimestamp: '2020-01-24T06:29:02.362Z', + receivedAt: '2020-01-24T11:59:02.403+05:30', + request_ip: '[::1]:53709', + sentAt: '2020-01-24T06:29:02.363Z', + timestamp: '2020-01-24T11:59:02.402+05:30', + type: 'identify', + userId: '', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Invalid email, email must be a valid string', + statTags: { + destType: 'BRAZE', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'braze', + description: 'Test 26', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + "destination": { + "Config": { + "restApiKey": "dummyApiKey", + "prefixProperties": true, + "useNativeSDK": false, + "sendPurchaseEventWithExtraProperties": true + }, + "DestinationDefinition": { + "DisplayName": "Braze", + "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", + "Name": "BRAZE" + }, + "Enabled": true, + "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", + "Name": "Braze", + "Transformations": [] + }, + "message": { + "anonymousId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", + "channel": "web", + "context": { + "traits": { + "city": "Disney", + "country": "USA", + "email": null, + "firstname": "Mickey" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" + }, + "event": "Order Completed", + "integrations": { + "All": true + }, + "messageId": "aa5f5e44-8756-40ad-ad1e-b0d3b9fa710a", + "originalTimestamp": "2020-01-24T06:29:02.367Z", + "properties": { + "affiliation": "Google Store", + "checkout_id": "fksdjfsdjfisjf9sdfjsd9f", + "coupon": "hasbros", + "currency": "USD", + "discount": 2.5, + "order_id": "50314b8e9bcf000000000000", + "products": [ + { + "category": "Games", + "image_url": "https:///www.example.com/product/path.jpg", + "name": "Monopoly: 3rd Edition", + "price": 0, + "product_id": "507f1f77bcf86cd799439023", + "quantity": 1, + "sku": "45790-32", + "url": "https://www.example.com/product/path" + }, + { + "category": "Games", + "name": "Uno Card Game", + "price": 0, + "product_id": "505bd76785ebb509fc183724", + "quantity": 2, + "sku": "46493-32" + } + ], + "revenue": 25, + "shipping": 3, + "subtotal": 22.5, + "tax": 2, + "total": 27.5 + }, + "receivedAt": "2020-01-24T11:59:02.403+05:30", + "request_ip": "[::1]:53712", + "sentAt": "2020-01-24T06:29:02.368Z", + "timestamp": "2020-01-24T11:59:02.402+05:30", + "type": "track", + "userId": "" + } + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [{ + output: { + "body": { + "FORM": {}, + "JSON": { + "attributes": [ + { + "_update_existing_only": false, + "city": "Disney", + "country": "USA", + "email": null, + "firstname": "Mickey", + "user_alias": { + "alias_label": "rudder_id", + "alias_name": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca" + } + } + ], + "partner": "RudderStack", + "purchases": [ + { + "_update_existing_only": false, + "currency": "USD", + "price": 0, + "product_id": "507f1f77bcf86cd799439023", + "properties": { + "category": "Games", + "image_url": "https:///www.example.com/product/path.jpg", + "name": "Monopoly: 3rd Edition", + "url": "https://www.example.com/product/path" + }, + "quantity": 1, + "time": "2020-01-24T11:59:02.402+05:30", + "user_alias": { + "alias_label": "rudder_id", + "alias_name": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca" + } + }, + { + "_update_existing_only": false, + "currency": "USD", + "price": 0, + "product_id": "505bd76785ebb509fc183724", + "properties": { + "category": "Games", + "name": "Uno Card Game" + }, + "quantity": 2, + "time": "2020-01-24T11:59:02.402+05:30", + "user_alias": { + "alias_label": "rudder_id", + "alias_name": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca" + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {} + }, + "endpoint": "https://rest.fra-01.braze.eu/users/track", + "files": {}, + "headers": { + "Accept": "application/json", + "Authorization": "Bearer dummyApiKey", + "Content-Type": "application/json" + }, + "method": "POST", + "params": {}, + "type": "REST", + "userId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", + "version": "1" + }, + statusCode: 200, + }, + ], + }, + }, + } +]; diff --git a/test/integrations/destinations/braze/router/data.ts b/test/integrations/destinations/braze/router/data.ts new file mode 100644 index 0000000000..240f1333dd --- /dev/null +++ b/test/integrations/destinations/braze/router/data.ts @@ -0,0 +1,919 @@ +export const data = [ + { + name: 'braze', + description: 'simple router tests', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + "destination": { + "Config": { + "restApiKey": "dummyApiKey", + "prefixProperties": true, + "useNativeSDK": false, + "dataCenter": "eu-01" + }, + "DestinationDefinition": { + "DisplayName": "Braze", + "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", + "Name": "BRAZE" + }, + "Enabled": true, + "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", + "Name": "Braze", + "Transformations": [] + }, + "metadata": { + "jobId": 1 + }, + "message": { + "anonymousId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.5" + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.5" + }, + "locale": "en-GB", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + }, + "traits": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" + }, + "integrations": { + "All": true + }, + "messageId": "dd266c67-9199-4a52-ba32-f46ddde67312", + "originalTimestamp": "2020-01-24T06:29:02.358Z", + "properties": { + "path": "/tests/html/index2.html", + "referrer": "", + "search": "", + "title": "", + "url": "http://localhost/tests/html/index2.html" + }, + "receivedAt": "2020-01-24T11:59:02.403+05:30", + "request_ip": "[::1]:53708", + "sentAt": "2020-01-24T06:29:02.359Z", + "timestamp": "2020-01-24T11:59:02.402+05:30", + "type": "page", + "userId": "" + } + }, + { + "destination": { + "Config": { + "restApiKey": "dummyApiKey", + "prefixProperties": true, + "useNativeSDK": false, + "dataCenter": "us-01" + }, + "DestinationDefinition": { + "DisplayName": "Braze", + "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", + "Name": "BRAZE" + }, + "Enabled": true, + "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", + "Name": "Braze", + "Transformations": [] + }, + "metadata": { + "jobId": 2 + }, + "message": { + "anonymousId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.5" + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.5" + }, + "locale": "en-GB", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + }, + "traits": { + "city": "Disney", + "country": "USA", + "email": "mickey@disney.com", + "firstname": "Mickey" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" + }, + "integrations": { + "All": true + }, + "messageId": "2536eda4-d638-4c93-8014-8ffe3f083214", + "originalTimestamp": "2020-01-24T06:29:02.362Z", + "receivedAt": "2020-01-24T11:59:02.403+05:30", + "request_ip": "[::1]:53709", + "sentAt": "2020-01-24T06:29:02.363Z", + "timestamp": "2020-01-24T11:59:02.402+05:30", + "type": "identify", + "userId": "" + } + }, + { + "destination": { + "Config": { + "restApiKey": "dummyApiKey", + "prefixProperties": true, + "useNativeSDK": false, + "dataCenter": "us-01", + "enableSubscriptionGroupInGroupCall": true + }, + "DestinationDefinition": { + "DisplayName": "Braze", + "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", + "Name": "BRAZE" + }, + "Enabled": true, + "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", + "Name": "Braze", + "Transformations": [] + }, + "metadata": { + "jobId": 3 + }, + "message": { + "anonymousId": "56yrtsdfgbgxcb-22b4-401d-aae5-1b994be9a969", + "groupId": "c90f0fd2-2a02-4f2f-bf07-7e7d2c2ed2b1", + "traits": { + "phone": "5055077683", + "subscriptionState": "subscribed" + }, + "userId": "user123", + "type": "group" + } + }, + { + "destination": { + "Config": { + "restApiKey": "dummyApiKey", + "prefixProperties": true, + "useNativeSDK": false, + "dataCenter": "us-01", + "enableSubscriptionGroupInGroupCall": true + }, + "DestinationDefinition": { + "DisplayName": "Braze", + "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", + "Name": "BRAZE" + }, + "Enabled": true, + "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", + "Name": "Braze", + "Transformations": [] + }, + "metadata": { + "jobId": 4 + }, + "message": { + "anonymousId": "dfgdfgdfg-22b4-401d-aae5-1b994be9a969", + "groupId": "58d0a278-b55b-4f10-b7d2-98d1c5dd4c30", + "traits": { + "phone": "5055077683", + "subscriptionState": "subscribed" + }, + "userId": "user877", + "type": "group" + } + }, + { + "destination": { + "Config": { + "restApiKey": "dummyApiKey", + "prefixProperties": true, + "useNativeSDK": false, + "dataCenter": "us-01", + "enableSubscriptionGroupInGroupCall": true + }, + "DestinationDefinition": { + "DisplayName": "Braze", + "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", + "Name": "BRAZE" + }, + "Enabled": true, + "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", + "Name": "Braze", + "Transformations": [] + }, + "metadata": { + "jobId": 5 + }, + "message": { + "type": "alias", + "previousId": "adsfsaf", + "userId": "dsafsdf" + } + }, + { + "destination": { + "Config": { + "restApiKey": "dummyApiKey", + "prefixProperties": true, + "useNativeSDK": false, + "dataCenter": "us-01", + "enableSubscriptionGroupInGroupCall": true + }, + "DestinationDefinition": { + "DisplayName": "Braze", + "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", + "Name": "BRAZE" + }, + "Enabled": true, + "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", + "Name": "Braze", + "Transformations": [] + }, + "metadata": { + "jobId": 6 + }, + "message": { + "type": "alias", + "previousId": "adsfsaf2", + "userId": "dsafsdf2" + } + } + ], + destType: 'braze', + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + "batchedRequest": [ + { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://rest.fra-01.braze.eu/users/track", + "headers": { + "Content-Type": "application/json", + "Accept": "application/json", + "Authorization": "Bearer dummyApiKey" + }, + "params": {}, + "body": { + "JSON": { + "partner": "RudderStack", + "events": [ + { + "name": "Page Viewed", + "time": "2020-01-24T11:59:02.402+05:30", + "properties": { + "path": "/tests/html/index2.html", + "referrer": "", + "search": "", + "title": "", + "url": "http://localhost/tests/html/index2.html" + }, + "_update_existing_only": false, + "user_alias": { + "alias_name": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", + "alias_label": "rudder_id" + } + } + ], + "attributes": [ + { + "email": "mickey@disney.com", + "city": "Disney", + "country": "USA", + "firstname": "Mickey", + "_update_existing_only": false, + "user_alias": { + "alias_name": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", + "alias_label": "rudder_id" + } + } + ] + }, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {} + }, + { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://rest.fra-01.braze.eu/v2/subscription/status/set", + "headers": { + "Content-Type": "application/json", + "Accept": "application/json", + "Authorization": "Bearer dummyApiKey" + }, + "params": {}, + "body": { + "JSON": { + "subscription_groups": [ + { + "external_id": ["user123"], + "phones": ["5055077683"], + "subscription_group_id": "c90f0fd2-2a02-4f2f-bf07-7e7d2c2ed2b1", + "subscription_state": "subscribed" + }, + { + "external_id": ["user877"], + "phones": ["5055077683"], + "subscription_group_id": "58d0a278-b55b-4f10-b7d2-98d1c5dd4c30", + "subscription_state": "subscribed" + } + ] + }, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {} + }, + { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://rest.fra-01.braze.eu/users/merge", + "headers": { + "Content-Type": "application/json", + "Accept": "application/json", + "Authorization": "Bearer dummyApiKey" + }, + "params": {}, + "body": { + "JSON": { + "merge_updates": [ + { + "identifier_to_keep": { + "external_id": "dsafsdf" + }, + "identifier_to_merge": { + "external_id": "adsfsaf" + } + }, + { + "identifier_to_keep": { + "external_id": "dsafsdf2" + }, + "identifier_to_merge": { + "external_id": "adsfsaf2" + } + } + ] + }, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {} + } + ], + "metadata": [ + { + "jobId": 1 + }, + { + "jobId": 2 + }, + { + "jobId": 3 + }, + { + "jobId": 4 + }, + { + "jobId": 5 + }, + { + "jobId": 6 + } + ], + "batched": true, + "statusCode": 200, + "destination": { + "Config": { + "restApiKey": "dummyApiKey", + "prefixProperties": true, + "useNativeSDK": false, + "dataCenter": "eu-01" + }, + "DestinationDefinition": { + "DisplayName": "Braze", + "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", + "Name": "BRAZE" + }, + "Enabled": true, + "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", + "Name": "Braze", + "Transformations": [] + } + } + ], + }, + }, + }, + }, + { + name: 'braze', + description: 'dedup enabled router tests', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + "destination": { + "ID": "2N9UakqKF0D35wfzSeofIxPdL8X", + "Name": "Braze-Test", + "Config": { + "appKey": "0e5440c3-226b-45d0-91b5-c64da56cde16", + "blacklistedEvents": [], + "dataCenter": "US-03", + "enableNestedArrayOperations": false, + "enableSubscriptionGroupInGroupCall": false, + "eventFilteringOption": "disable", + "oneTrustCookieCategories": [], + "restApiKey": "dummyApiKey", + "supportDedup": true, + "trackAnonymousUser": true, + "whitelistedEvents": [] + }, + "Enabled": true, + "WorkspaceID": "27O0bhB6p5ehfOWeeZlOSsSDTLg", + "Transformations": [], + "IsProcessorEnabled": true, + "RevisionID": "2N9Uaf2tWq2QRmatBWQm03Rz6qX" + }, + "metadata": { + "jobId": 1 + }, + "message": { + "type": "track", + "event": "Sign In Completed", + "sentAt": "2023-03-10T18:36:04.738Z", + "userId": "braze_test_user", + "channel": "web", + "context": { + "locale": "en-US", + "traits": { + "subscribe_once": true, + "pwa": true, + "email": "jackson24miranda@gmail.com", + "lastName": "Miranda", + "firstName": "Spencer", + "is_registered": true, + "last_identify": "GOOGLE_SIGN_IN", + "account_region": "ON", + "is_pickup_selected": "false", + "has_tradein_attempt": false, + "custom_obj_attr": { + "key1": "value1", + "key2": "value2", + "key4": "value4" + }, + "custom_arr": [1, 2, "str1"] + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "2.9.5" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36" + }, + "rudderId": "4118560d-e4fc-4fd1-a734-9c69eae2c047", + "messageId": "1a342814-a882-4b65-9cc9-347544997268", + "timestamp": "2023-03-10T18:36:05.028Z", + "properties": { + "cause": "/redirector", + "method": "GOOGLE", + "region": "ON", + "orderId": "6179367977099", + "order_id": "6179367977099", + "webhookurl": "https://my.test.com", + "countingMethod": "standard", + "is_first_time_signin": false + }, + "receivedAt": "2023-03-18T01:41:42.257+05:30", + "request_ip": "[::1]", + "anonymousId": "77e278c9-e984-4cdd-950c-cd0b61befd03", + "originalTimestamp": "2023-03-10T18:36:04.733Z" + } + }, + { + "destination": { + "ID": "2N9UakqKF0D35wfzSeofIxPdL8X", + "Name": "Braze-Test", + "Config": { + "appKey": "0e5440c3-226b-45d0-91b5-c64da56cde16", + "blacklistedEvents": [], + "dataCenter": "US-03", + "enableNestedArrayOperations": false, + "enableSubscriptionGroupInGroupCall": false, + "eventFilteringOption": "disable", + "oneTrustCookieCategories": [], + "restApiKey": "dummyApiKey", + "supportDedup": true, + "trackAnonymousUser": true, + "whitelistedEvents": [] + }, + "Enabled": true, + "WorkspaceID": "27O0bhB6p5ehfOWeeZlOSsSDTLg", + "Transformations": [], + "IsProcessorEnabled": true, + "RevisionID": "2N9Uaf2tWq2QRmatBWQm03Rz6qX" + }, + "metadata": { + "jobId": 2 + }, + "message": { + "type": "track", + "event": "Sign In Completed", + "sentAt": "2023-03-10T18:36:04.738Z", + "userId": "braze_test_user", + "channel": "web", + "context": { + "locale": "en-US", + "traits": { + "subscribe_once": true, + "pwa": true, + "email": "jackson24miranda@gmail.com", + "lastName": "Miranda 2", + "firstName": "Spencer", + "is_registered": true, + "last_identify": "GOOGLE_SIGN_IN", + "account_region": "ON", + "is_pickup_selected": "true", + "has_tradein_attempt": false, + "custom_obj_attr": { + "key1": "value1", + "key2": "value2", + "key4": "value4" + }, + "custom_arr": ["1", "2", "str1"] + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "2.9.5" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36" + }, + "rudderId": "4118560d-e4fc-4fd1-a734-9c69eae2c047", + "messageId": "1a342814-a882-4b65-9cc9-347544997268", + "timestamp": "2023-03-10T18:36:05.028Z", + "properties": { + "cause": "/redirector", + "method": "GOOGLE", + "region": "ON", + "orderId": "6179367977099", + "order_id": "6179367977099", + "webhookurl": "https://my.test.com", + "countingMethod": "standard", + "is_first_time_signin": false + }, + "receivedAt": "2023-03-18T01:41:42.257+05:30", + "request_ip": "[::1]", + "anonymousId": "77e278c9-e984-4cdd-950c-cd0b61befd03", + "originalTimestamp": "2023-03-10T18:36:04.733Z" + } + }, + { + "destination": { + "ID": "2N9UakqKF0D35wfzSeofIxPdL8X", + "Name": "Braze-Test", + "Config": { + "appKey": "0e5440c3-226b-45d0-91b5-c64da56cde16", + "blacklistedEvents": [], + "dataCenter": "US-03", + "enableNestedArrayOperations": false, + "enableSubscriptionGroupInGroupCall": false, + "eventFilteringOption": "disable", + "oneTrustCookieCategories": [], + "restApiKey": "dummyApiKey", + "supportDedup": true, + "trackAnonymousUser": true, + "whitelistedEvents": [] + }, + "Enabled": true, + "WorkspaceID": "27O0bhB6p5ehfOWeeZlOSsSDTLg", + "Transformations": [], + "IsProcessorEnabled": true, + "RevisionID": "2N9Uaf2tWq2QRmatBWQm03Rz6qX" + }, + "metadata": { + "jobId": 3 + }, + "message": { + "anonymousId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.5" + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.5" + }, + "locale": "en-GB", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + }, + "traits": { + "city": "Disney", + "country": "USA", + "email": "mickey@disney.com", + "firstName": "Mickey" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" + }, + "integrations": { + "All": true + }, + "messageId": "2536eda4-d638-4c93-8014-8ffe3f083214", + "type": "identify", + "userId": "user@50" + } + }, + { + "destination": { + "ID": "2N9UakqKF0D35wfzSeofIxPdL8X", + "Name": "Braze-Test", + "Config": { + "appKey": "0e5440c3-226b-45d0-91b5-c64da56cde16", + "blacklistedEvents": [], + "dataCenter": "US-03", + "enableNestedArrayOperations": false, + "enableSubscriptionGroupInGroupCall": false, + "eventFilteringOption": "disable", + "oneTrustCookieCategories": [], + "restApiKey": "dummyApiKey", + "supportDedup": true, + "trackAnonymousUser": true, + "whitelistedEvents": [] + }, + "Enabled": true, + "WorkspaceID": "27O0bhB6p5ehfOWeeZlOSsSDTLg", + "Transformations": [], + "IsProcessorEnabled": true, + "RevisionID": "2N9Uaf2tWq2QRmatBWQm03Rz6qX" + }, + "metadata": { + "jobId": 4 + }, + "message": { + "anonymousId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.5" + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.5" + }, + "locale": "en-GB", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + }, + "traits": { + "city": "Disney", + "country": "USA", + "email": "mickey@disney.com", + "firstName": "Mickey" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" + }, + "integrations": { + "All": true + }, + "messageId": "2536eda4-d638-4c93-8014-8ffe3f083214", + "type": "identify", + "userId": "user@50" + } + } + ], + destType: 'braze', + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + "batchedRequest": [ + { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://rest.iad-03.braze.com/users/track", + "headers": { + "Content-Type": "application/json", + "Accept": "application/json", + "Authorization": "Bearer dummyApiKey" + }, + "params": {}, + "body": { + "JSON": { + "partner": "RudderStack", + "attributes": [ + { + "first_name": "Spencer", + "subscribe_once": true, + "pwa": true, + "external_id": "braze_test_user", + "custom_obj_attr": { + "key1": "value1", + "key2": "value2", + "key4": "value4" + } + }, + { + "last_name": "Miranda 2", + "is_pickup_selected": "true", + "external_id": "braze_test_user", + "custom_arr": ["1", "2", "str1"] + }, + { + "city": "Disney", + "country": "USA", + "email": "mickey@disney.com", + "external_id": "user@50", + "first_name": "Mickey" + } + ], + "events": [ + { + "name": "Sign In Completed", + "time": "2023-03-10T18:36:05.028Z", + "properties": { + "cause": "/redirector", + "method": "GOOGLE", + "region": "ON", + "orderId": "6179367977099", + "order_id": "6179367977099", + "webhookurl": "https://my.test.com", + "countingMethod": "standard", + "is_first_time_signin": false + }, + "external_id": "braze_test_user" + }, + { + "name": "Sign In Completed", + "time": "2023-03-10T18:36:05.028Z", + "properties": { + "cause": "/redirector", + "method": "GOOGLE", + "region": "ON", + "orderId": "6179367977099", + "order_id": "6179367977099", + "webhookurl": "https://my.test.com", + "countingMethod": "standard", + "is_first_time_signin": false + }, + "external_id": "braze_test_user" + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {} + } + ], + "metadata": [ + { + "jobId": 1 + }, + { + "jobId": 2 + }, + { + "jobId": 3 + } + ], + "batched": true, + "statusCode": 200, + "destination": { + "ID": "2N9UakqKF0D35wfzSeofIxPdL8X", + "Name": "Braze-Test", + "Config": { + "appKey": "0e5440c3-226b-45d0-91b5-c64da56cde16", + "blacklistedEvents": [], + "dataCenter": "US-03", + "enableNestedArrayOperations": false, + "enableSubscriptionGroupInGroupCall": false, + "eventFilteringOption": "disable", + "oneTrustCookieCategories": [], + "restApiKey": "dummyApiKey", + "supportDedup": true, + "trackAnonymousUser": true, + "whitelistedEvents": [] + }, + "Enabled": true, + "WorkspaceID": "27O0bhB6p5ehfOWeeZlOSsSDTLg", + "Transformations": [], + "IsProcessorEnabled": true, + "RevisionID": "2N9Uaf2tWq2QRmatBWQm03Rz6qX" + } + }, + { + "error": "[Braze Deduplication]: Duplicate user detected, the user is dropped", + "statTags": { + "destType": "BRAZE", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "router", + "implementation": "native", + "module": "destination", + }, + "statusCode": 400, + "batched": false, + "metadata": [ + { + "jobId": 4 + } + ], + "destination": { + "ID": "2N9UakqKF0D35wfzSeofIxPdL8X", + "Name": "Braze-Test", + "Config": { + "appKey": "0e5440c3-226b-45d0-91b5-c64da56cde16", + "blacklistedEvents": [], + "dataCenter": "US-03", + "enableNestedArrayOperations": false, + "enableSubscriptionGroupInGroupCall": false, + "eventFilteringOption": "disable", + "oneTrustCookieCategories": [], + "restApiKey": "dummyApiKey", + "supportDedup": true, + "trackAnonymousUser": true, + "whitelistedEvents": [] + }, + "Enabled": true, + "WorkspaceID": "27O0bhB6p5ehfOWeeZlOSsSDTLg", + "Transformations": [], + "IsProcessorEnabled": true, + "RevisionID": "2N9Uaf2tWq2QRmatBWQm03Rz6qX" + } + } + ], + }, + }, + }, + } +]; diff --git a/test/integrations/destinations/clevertap/processor/data.ts b/test/integrations/destinations/clevertap/processor/data.ts new file mode 100644 index 0000000000..d79ebaa8da --- /dev/null +++ b/test/integrations/destinations/clevertap/processor/data.ts @@ -0,0 +1,2427 @@ +export const data = [ + { + name: 'clevertap', + description: 'Test 0', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + passcode: 'sample_passcode', + accountId: '476550467', + trackAnonymous: true, + enableObjectIdMapping: false, + }, + }, + message: { + channel: 'web', + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: 'anon_id', + type: 'identify', + traits: { + anonymousId: 'anon_id', + email: 'jamesDoe@gmail.com', + name: 'James Doe', + phone: '92374162212', + gender: 'M', + employed: true, + birthday: '1614775793', + education: 'Science', + graduate: true, + married: true, + customerType: 'Prime', + msg_push: true, + msgSms: true, + msgemail: true, + msgwhatsapp: false, + custom_tags: ['Test_User', 'Interested_User', 'DIY_Hobby'], + custom_mappings: { + Office: 'Trastkiv', + Country: 'Russia', + }, + address: { + city: 'kolkata', + country: 'India', + postalCode: 789223, + state: 'WB', + street: '', + }, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.clevertap.com/1/upload', + headers: { + 'X-CleverTap-Account-Id': '476550467', + 'X-CleverTap-Passcode': 'sample_passcode', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + d: [ + { + type: 'profile', + profileData: { + Email: 'jamesDoe@gmail.com', + Name: 'James Doe', + Phone: '92374162212', + Gender: 'M', + Employed: true, + DOB: '1614775793', + Education: 'Science', + Married: true, + 'Customer Type': 'Prime', + graduate: true, + msg_push: true, + msgSms: true, + msgemail: true, + msgwhatsapp: false, + custom_tags: '["Test_User","Interested_User","DIY_Hobby"]', + custom_mappings: '{"Office":"Trastkiv","Country":"Russia"}', + address: + '{"city":"kolkata","country":"India","postalCode":789223,"state":"WB","street":""}', + }, + identity: 'anon_id', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'clevertap', + description: 'Test 1', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + passcode: 'sample_passcode', + accountId: '476550467', + trackAnonymous: true, + enableObjectIdMapping: false, + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: 'anon_id', + type: 'identify', + traits: { + anonymousId: 'anon_id', + email: 'jamesDoe@gmail.com', + name: 'James Doe', + phone: '92374162212', + gender: 'M', + employed: true, + birthday: '1614775793', + education: 'Science', + graduate: true, + married: true, + customerType: 'Prime', + msg_push: true, + msgSms: true, + msgemail: true, + msgwhatsapp: false, + custom_tags: ['Test_User', 'Interested_User', 'DIY_Hobby'], + custom_mappings: { + Office: 'Trastkiv', + Country: 'Russia', + }, + address: { + city: 'kolkata', + country: 'India', + postalCode: 789223, + state: 'WB', + street: '', + }, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.clevertap.com/1/upload', + headers: { + 'X-CleverTap-Account-Id': '476550467', + 'X-CleverTap-Passcode': 'sample_passcode', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + d: [ + { + type: 'profile', + profileData: { + Email: 'jamesDoe@gmail.com', + Name: 'James Doe', + Phone: '92374162212', + Gender: 'M', + Employed: true, + DOB: '1614775793', + Education: 'Science', + Married: true, + 'Customer Type': 'Prime', + graduate: true, + msg_push: true, + msgSms: true, + msgemail: true, + msgwhatsapp: false, + custom_tags: '["Test_User","Interested_User","DIY_Hobby"]', + custom_mappings: '{"Office":"Trastkiv","Country":"Russia"}', + address: + '{"city":"kolkata","country":"India","postalCode":789223,"state":"WB","street":""}', + }, + identity: 'anon_id', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'clevertap', + description: 'Test 2', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + passcode: 'sample_passcode', + accountId: '476550467', + trackAnonymous: true, + enableObjectIdMapping: false, + }, + }, + message: { + type: 'page', + anonymousId: 'anon-id-new', + name: 'Rudder', + properties: { + title: 'Home', + path: '/', + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.clevertap.com/1/upload', + headers: { + 'X-CleverTap-Account-Id': '476550467', + 'X-CleverTap-Passcode': 'sample_passcode', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + d: [ + { + evtName: 'Web Page Viewed: Rudder', + evtData: { + title: 'Home', + path: '/', + }, + type: 'event', + identity: 'anon-id-new', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'clevertap', + description: 'Test 3', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + passcode: 'sample_passcode', + accountId: '476550467', + trackAnonymous: true, + enableObjectIdMapping: false, + }, + }, + message: { + type: 'screen', + userId: 'identified_user_id', + name: 'Rudder-Screen', + properties: { + prop1: '5', + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.clevertap.com/1/upload', + headers: { + 'X-CleverTap-Account-Id': '476550467', + 'X-CleverTap-Passcode': 'sample_passcode', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + d: [ + { + evtName: 'Screen Viewed: Rudder-Screen', + evtData: { + prop1: '5', + }, + type: 'event', + identity: 'identified_user_id', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'clevertap', + description: 'Test 4', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + passcode: 'sample_passcode', + accountId: '476550467', + trackAnonymous: true, + enableObjectIdMapping: false, + }, + }, + message: { + type: 'track', + userId: 'user123', + event: 'Product Purchased', + properties: { + name: "Rubik's Cube", + revenue: 4.99, + }, + context: { + ip: '14.5.67.21', + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.clevertap.com/1/upload', + headers: { + 'X-CleverTap-Account-Id': '476550467', + 'X-CleverTap-Passcode': 'sample_passcode', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + d: [ + { + evtName: 'Product Purchased', + evtData: { + name: "Rubik's Cube", + revenue: 4.99, + }, + type: 'event', + identity: 'user123', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'clevertap', + description: 'Test 5: ERROR - Message Type is not present. Aborting message.', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + passcode: 'sample_passcode', + accountId: '476550467', + trackAnonymous: true, + enableObjectIdMapping: false, + }, + }, + message: { + userId: 'user1234', + event: 'FailTest', + properties: { + name: 'Random', + revenue: 4.99, + }, + context: { + ip: '14.5.67.21', + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: 'Message Type is not present. Aborting message.', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'CLEVERTAP', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'clevertap', + description: 'Test 6: ERROR - Message type not supported', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + passcode: 'sample_passcode', + accountId: '476550467', + trackAnonymous: true, + enableObjectIdMapping: false, + }, + }, + message: { + type: 'Rndm', + userId: 'user1234', + event: 'FailTest', + properties: { + name: 'Random2', + revenue: 4.99, + }, + context: { + ip: '14.5.67.21', + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: 'Message type not supported', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'CLEVERTAP', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'clevertap', + description: 'Test 7', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + passcode: 'sample_passcode', + accountId: '476550467', + trackAnonymous: true, + enableObjectIdMapping: false, + }, + }, + message: { + type: 'track', + event: 'Order Completed', + sentAt: '2021-03-10T11:59:57.815Z', + userId: 'riverjohn', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.13', + namespace: 'com.rudderlabs.javascript', + }, + page: { + url: 'http://127.0.0.1:5500/test.html', + path: '/test.html', + title: 'sample source', + search: '', + referrer: 'http://127.0.0.1:5500/', + referring_domain: '127.0.0.1:5500', + }, + locale: 'en-US', + screen: { + density: 2, + }, + traits: { + email: 'riverjohn@gmail.com', + phone: '+12345678900', + avatar: 'https://homepages.cae.wisc.edu/~ece533/images/airplane.png', + testIng: true, + lastName: 'John', + firstname: 'River', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.13', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:86.0) Gecko/20100101 Firefox/86.0', + }, + rudderId: 'fd5d3d37-3ce6-471d-b416-2f351212a44f', + messageId: '8ff6fd1b-b381-43fc-883c-92bf8eb0e725', + properties: { + tax: 1, + total: 20, + coupon: 'ImagePro', + revenue: 15, + currency: 'USD', + discount: 1.5, + order_id: '1234', + ts: '2021-03-10T11:59:22.080Z', + products: [ + { + sku: 'G-32', + url: 'https://www.website.com/product/path', + name: 'Monopoly', + price: 14, + category: 'Games', + quantity: 1, + image_url: 'https://www.website.com/product/path.jpg', + product_id: '123', + }, + { + sku: 'F-32', + name: 'UNO', + price: 3.45, + category: 'Games', + quantity: 2, + product_id: '345', + }, + ], + shipping: 22, + affiliation: 'Apple Store', + checkout_id: '12345', + }, + anonymousId: 'b2e06708-dd2a-4aee-bb32-41855d2fbdab', + integrations: { + All: true, + }, + originalTimestamp: '2021-03-10T11:59:22.080Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.clevertap.com/1/upload', + headers: { + 'X-CleverTap-Account-Id': '476550467', + 'X-CleverTap-Passcode': 'sample_passcode', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + d: [ + { + evtName: 'Charged', + evtData: { + 'Charged ID': '12345', + Amount: 15, + Items: [ + { + sku: 'G-32', + url: 'https://www.website.com/product/path', + name: 'Monopoly', + price: 14, + category: 'Games', + quantity: 1, + image_url: 'https://www.website.com/product/path.jpg', + product_id: '123', + }, + { + sku: 'F-32', + name: 'UNO', + price: 3.45, + category: 'Games', + quantity: 2, + product_id: '345', + }, + ], + tax: 1, + total: 20, + coupon: 'ImagePro', + currency: 'USD', + discount: 1.5, + order_id: '1234', + shipping: 22, + affiliation: 'Apple Store', + }, + ts: 1615377562, + type: 'event', + identity: 'riverjohn', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'clevertap', + description: 'Test 8: ERROR - userId, not present cannot track anonymous user', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + passcode: 'sample_passcode', + accountId: '476550467', + trackAnonymous: false, + enableObjectIdMapping: false, + }, + }, + message: { + type: 'track', + anonymousId: 'random_anon_id', + event: 'FailTest_with_anon', + properties: { + name: 'Random2', + revenue: 4.99, + }, + context: { + ip: '14.5.67.21', + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: 'userId, not present cannot track anonymous user', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'CLEVERTAP', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'clevertap', + description: 'Test 9', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + passcode: 'sample_passcode', + accountId: '476550467', + trackAnonymous: true, + enableObjectIdMapping: false, + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: 'anon_id', + type: 'identify', + traits: { + anonymousId: 'anon_id', + email: 'jamesDoe@gmail.com', + name: 'James Doe', + phone: '92374162212', + gender: 'female', + employed: true, + birthday: '1614775793', + education: 'Science', + graduate: true, + married: true, + customerType: 'Prime', + msg_push: true, + msgSms: true, + msgemail: true, + msgwhatsapp: false, + custom_tags: ['Test_User', 'Interested_User', 'DIY_Hobby'], + custom_mappings: { + Office: 'Trastkiv', + Country: 'Russia', + }, + address: { + city: 'kolkata', + country: 'India', + postalCode: 789223, + state: 'WB', + street: '', + }, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.clevertap.com/1/upload', + headers: { + 'X-CleverTap-Account-Id': '476550467', + 'X-CleverTap-Passcode': 'sample_passcode', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + d: [ + { + type: 'profile', + profileData: { + Email: 'jamesDoe@gmail.com', + Name: 'James Doe', + Phone: '92374162212', + Gender: 'F', + Employed: true, + DOB: '1614775793', + Education: 'Science', + Married: true, + 'Customer Type': 'Prime', + graduate: true, + msg_push: true, + msgSms: true, + msgemail: true, + msgwhatsapp: false, + custom_tags: '["Test_User","Interested_User","DIY_Hobby"]', + custom_mappings: '{"Office":"Trastkiv","Country":"Russia"}', + address: + '{"city":"kolkata","country":"India","postalCode":789223,"state":"WB","street":""}', + }, + identity: 'anon_id', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'clevertap', + description: 'Test 10', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + passcode: 'sample_passcode', + accountId: '476550467', + trackAnonymous: true, + enableObjectIdMapping: false, + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: 'anon_id', + type: 'identify', + traits: { + anonymousId: 'anon_id', + email: 'jamesDoe@gmail.com', + name: 'James Doe', + phone: '92374162212', + gender: 'other', + employed: true, + birthday: '1614775793', + education: 'Science', + graduate: true, + married: true, + customerType: 'Prime', + msg_push: true, + msgSms: true, + msgemail: true, + msgwhatsapp: false, + custom_tags: ['Test_User', 'Interested_User', 'DIY_Hobby'], + custom_mappings: { + Office: 'Trastkiv', + Country: 'Russia', + }, + address: { + city: 'kolkata', + country: 'India', + postalCode: 789223, + state: 'WB', + street: '', + }, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.clevertap.com/1/upload', + headers: { + 'X-CleverTap-Account-Id': '476550467', + 'X-CleverTap-Passcode': 'sample_passcode', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + d: [ + { + type: 'profile', + profileData: { + Email: 'jamesDoe@gmail.com', + Name: 'James Doe', + Phone: '92374162212', + Employed: true, + DOB: '1614775793', + Education: 'Science', + Married: true, + 'Customer Type': 'Prime', + graduate: true, + msg_push: true, + msgSms: true, + msgemail: true, + msgwhatsapp: false, + custom_tags: '["Test_User","Interested_User","DIY_Hobby"]', + custom_mappings: '{"Office":"Trastkiv","Country":"Russia"}', + address: + '{"city":"kolkata","country":"India","postalCode":789223,"state":"WB","street":""}', + }, + identity: 'anon_id', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'clevertap', + description: 'Test 11', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + passcode: 'sample_passcode', + accountId: '476550467', + trackAnonymous: true, + enableObjectIdMapping: true, + }, + }, + message: { + type: 'identify', + event: 'identify', + sentAt: '2021-05-24T08:53:38.762Z', + userId: 'useran4', + channel: 'mobile', + context: { + os: { + name: 'Android', + version: '10', + }, + app: { + name: 'myfirstapp', + build: '1', + version: '1.0', + namespace: 'com.example.myfirstapp', + }, + device: { + id: 'f54bb572361c4fd1', + name: 'whyred', + type: 'Android', + model: 'Redmi Note 5 Pro', + manufacturer: 'Xiaomi', + token: 'frfsgvrwe:APfdsafsgdfsgghfgfgjkhfsfgdhjhbvcvnetry767456fxsasdf', + }, + locale: 'en-IN', + screen: { + width: 1080, + height: 2118, + density: 420, + }, + traits: { + id: 'useran4', + email: 'tony4an@testmail.com', + phone: '4444457700', + userId: 'useran4', + lastname: 'Stark', + firstname: 'Tony4AN', + anonymousId: 'f54bb572361c4fd1', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.12', + }, + network: { + wifi: true, + carrier: 'airtel', + cellular: true, + bluetooth: false, + }, + timezone: 'Asia/Kolkata', + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 10; Redmi Note 5 Pro Build/QQ3A.200805.001)', + }, + rudderId: 'd8dd4917-bdb2-4c17-8f62-24c79d87a937', + messageId: '1621846417928-7fbb739f-5f96-48ca-9ebb-5bfc4076a687', + anonymousId: 'f54bb572361c4fd1', + integrations: { + All: true, + }, + originalTimestamp: '2021-05-24T08:53:37.929Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.clevertap.com/1/upload', + headers: { + 'X-CleverTap-Account-Id': '476550467', + 'X-CleverTap-Passcode': 'sample_passcode', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + d: [ + { + type: 'profile', + profileData: { + Email: 'tony4an@testmail.com', + Phone: '4444457700', + Name: 'Tony4AN Stark', + identity: 'useran4', + }, + objectId: 'f54bb572361c4fd1', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.clevertap.com/1/upload', + headers: { + 'X-CleverTap-Account-Id': '476550467', + 'X-CleverTap-Passcode': 'sample_passcode', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + d: [ + { + type: 'token', + tokenData: { + id: 'frfsgvrwe:APfdsafsgdfsgghfgfgjkhfsfgdhjhbvcvnetry767456fxsasdf', + type: 'fcm', + }, + objectId: 'f54bb572361c4fd1', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'clevertap', + description: 'Test 12', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + passcode: 'sample_passcode', + accountId: '476550467', + trackAnonymous: true, + enableObjectIdMapping: true, + }, + }, + message: { + type: 'identify', + event: 'identify', + sentAt: '2021-04-21T12:05:42.383Z', + userId: 'ankur4', + channel: 'mobile', + context: { + os: { + name: 'iOS', + version: '13.0', + }, + app: { + name: 'Rudder-CleverTap_Example', + build: '1.0', + version: '1.0', + namespace: 'org.cocoapods.demo.Rudder-CleverTap-Example', + }, + device: { + id: 'cd3a4439-7df0-4475-acb9-6659c7c4dfe3', + name: 'iPhone 11 Pro Max', + type: 'iOS', + model: 'iPhone', + manufacturer: 'Apple', + token: 'frfsgvrwe:APfdsafsgdfsgghfgfgjkhfsfgdhjhbvcvnetry767456fxsasdf', + }, + locale: 'en-US', + screen: { + width: 896, + height: 414, + density: 3, + }, + traits: { + name: 'Ankur4 Mittal', + email: 'ankur4gmail', + phone: '8260294239', + userId: 'ankur4', + }, + library: { + name: 'rudder-ios-library', + version: '1.0.11', + }, + network: { + wifi: true, + carrier: 'unavailable', + cellular: false, + bluetooth: false, + }, + timezone: 'Asia/Kolkata', + userAgent: 'unknown', + }, + rudderId: 'f5bb9c22-4987-4ef2-9b58-52788035ffb7', + messageId: '1619006730-60fa60c0-3c77-4de7-95d4-e7dc58214947', + integrations: { + All: true, + }, + originalTimestamp: '2021-04-21T12:05:30.330Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.clevertap.com/1/upload', + headers: { + 'X-CleverTap-Account-Id': '476550467', + 'X-CleverTap-Passcode': 'sample_passcode', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + d: [ + { + type: 'profile', + profileData: { + Email: 'ankur4gmail', + Name: 'Ankur4 Mittal', + Phone: '8260294239', + }, + identity: 'ankur4', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'clevertap', + description: 'Test 13', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + passcode: 'sample_passcode', + accountId: '476550467', + trackAnonymous: true, + enableObjectIdMapping: true, + }, + }, + message: { + event: 'Random', + properties: { + country_region: 'India', + test: 'abc', + }, + receivedAt: '2021-08-20T12:49:07.691Z', + rudderId: '138c4214-b537-4f77-9dea-9abde70b5147', + type: 'track', + anonymousId: 'cd3a4439-7df0-4475-acb9-6659c7c4dfe3', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.clevertap.com/1/upload', + headers: { + 'X-CleverTap-Account-Id': '476550467', + 'X-CleverTap-Passcode': 'sample_passcode', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + d: [ + { + evtName: 'Random', + evtData: { + country_region: 'India', + test: 'abc', + }, + type: 'event', + objectId: 'cd3a4439-7df0-4475-acb9-6659c7c4dfe3', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'clevertap', + description: 'Test 14', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + passcode: 'sample_passcode', + accountId: '476550467', + trackAnonymous: true, + enableObjectIdMapping: true, + }, + }, + message: { + event: 'Random 2', + properties: { + country_region: 'India', + test: 'abc', + }, + receivedAt: '2021-08-20T12:49:07.691Z', + rudderId: '138c4214-b537-4f77-9dea-9abde70b5147', + type: 'track', + userId: 'ankur4', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.clevertap.com/1/upload', + headers: { + 'X-CleverTap-Account-Id': '476550467', + 'X-CleverTap-Passcode': 'sample_passcode', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + d: [ + { + evtName: 'Random 2', + evtData: { + country_region: 'India', + test: 'abc', + }, + type: 'event', + identity: 'ankur4', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'clevertap', + description: 'Test 15', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + passcode: 'sample_passcode', + accountId: '476550467', + trackAnonymous: true, + enableObjectIdMapping: false, + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: 'anon_id', + type: 'identify', + traits: { + anonymousId: 'anon_id', + email: 'jamesDoe@gmail.com', + name: 'James Doe', + phone: '92374162212', + gender: 'M', + employed: true, + birthday: '1614775793', + education: 'Science', + graduate: true, + married: true, + customerType: 'Prime', + ts: '2021-03-10T11:59:22.080Z', + msg_push: true, + msgSms: true, + msgemail: true, + msgwhatsapp: false, + custom_tags: ['Test_User', 'Interested_User', 'DIY_Hobby'], + custom_mappings: { + Office: 'Trastkiv', + Country: 'Russia', + }, + address: { + city: 'kolkata', + country: 'India', + postalCode: 789223, + state: 'WB', + street: '', + }, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.clevertap.com/1/upload', + headers: { + 'X-CleverTap-Account-Id': '476550467', + 'X-CleverTap-Passcode': 'sample_passcode', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + d: [ + { + type: 'profile', + profileData: { + Email: 'jamesDoe@gmail.com', + Name: 'James Doe', + Phone: '92374162212', + Gender: 'M', + Employed: true, + DOB: '1614775793', + Education: 'Science', + Married: true, + 'Customer Type': 'Prime', + graduate: true, + msg_push: true, + msgSms: true, + msgemail: true, + msgwhatsapp: false, + custom_tags: '["Test_User","Interested_User","DIY_Hobby"]', + custom_mappings: '{"Office":"Trastkiv","Country":"Russia"}', + address: + '{"city":"kolkata","country":"India","postalCode":789223,"state":"WB","street":""}', + }, + ts: 1615377562, + identity: 'anon_id', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'clevertap', + description: 'Test 16', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + passcode: 'sample_passcode', + accountId: '476550467', + trackAnonymous: true, + enableObjectIdMapping: true, + }, + }, + message: { + type: 'identify', + event: 'identify', + sentAt: '2021-05-24T08:53:38.762Z', + userId: 'useran4', + channel: 'mobile', + context: { + os: { + name: 'watchos', + }, + app: { + name: 'myfirstapp', + build: '1', + version: '1.0', + namespace: 'com.example.myfirstapp', + }, + device: { + id: 'cd3a4439-7df0-4475-acb9-6659c7c4dfe3', + type: 'watchos', + manufacturer: 'Apple', + token: 'frfsgvrwe:APfdsafsgdfsgghfgfgjkhfsfgdhjhbvcvnetry767456fxsasdf', + }, + locale: 'en-IN', + screen: { + width: 1080, + height: 2118, + density: 420, + }, + traits: { + id: 'useran4', + email: 'tony4an@testmail.com', + phone: '4444457700', + userId: 'useran4', + lastname: 'Stark', + firstname: 'Tony4AN', + anonymousId: 'f54bb572361c4fd1', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.12', + }, + network: { + wifi: true, + carrier: 'airtel', + cellular: true, + bluetooth: false, + }, + timezone: 'Asia/Kolkata', + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 10; Redmi Note 5 Pro Build/QQ3A.200805.001)', + }, + rudderId: 'd8dd4917-bdb2-4c17-8f62-24c79d87a937', + messageId: '1621846417928-7fbb739f-5f96-48ca-9ebb-5bfc4076a687', + anonymousId: 'f54bb572361c4fd1', + integrations: { + All: true, + }, + originalTimestamp: '2021-05-24T08:53:37.929Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.clevertap.com/1/upload', + headers: { + 'X-CleverTap-Account-Id': '476550467', + 'X-CleverTap-Passcode': 'sample_passcode', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + d: [ + { + type: 'profile', + profileData: { + Email: 'tony4an@testmail.com', + Phone: '4444457700', + Name: 'Tony4AN Stark', + identity: 'useran4', + }, + objectId: 'f54bb572361c4fd1', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.clevertap.com/1/upload', + headers: { + 'X-CleverTap-Account-Id': '476550467', + 'X-CleverTap-Passcode': 'sample_passcode', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + d: [ + { + type: 'token', + tokenData: { + id: 'frfsgvrwe:APfdsafsgdfsgghfgfgjkhfsfgdhjhbvcvnetry767456fxsasdf', + type: 'apns', + }, + objectId: 'f54bb572361c4fd1', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'clevertap', + description: 'Test 17', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + passcode: 'sample_passcode', + accountId: '476550467', + trackAnonymous: true, + enableObjectIdMapping: true, + }, + }, + message: { + type: 'alias', + userId: 'newaddedid001', + context: { + traits: { + ts: 1468308340, + }, + }, + rudderId: 'a8556b1b-9d11-478d-9242-be124d1f0c93', + messageId: '46c1a69c-cc24-4a49-8079-3fcbabf15eb8', + previousId: '1122121', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.clevertap.com/1/upload', + headers: { + 'X-CleverTap-Account-Id': '476550467', + 'X-CleverTap-Passcode': 'sample_passcode', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + d: [ + { + type: 'profile', + profileData: { + identity: 'newaddedid001', + }, + ts: 1468308340, + identity: '1122121', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'clevertap', + description: 'Test 18', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + passcode: 'sample_passcode', + accountId: '476550467', + trackAnonymous: true, + enableObjectIdMapping: false, + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: 'anon_id', + type: 'identify', + traits: { + anonymousId: 'anon_id', + email: 'johnDoe@gmail.com', + first_name: 'John', + last_name: 'Doe', + phone: '92374162212', + gender: 'M', + employed: true, + birthday: '1614775793', + education: 'Science', + graduate: true, + married: true, + customerType: 'Prime', + msg_push: true, + msgSms: true, + msgemail: true, + msgwhatsapp: false, + custom_tags: ['Test_User', 'Interested_User', 'DIY_Hobby'], + custom_mappings: { + Office: 'Trastkiv', + Country: 'Russia', + }, + address: { + city: 'kolkata', + country: 'India', + postalCode: 789223, + state: 'WB', + street: '', + }, + overrideFields: { + first_name: 'John', + last_name: 'Doe', + }, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.clevertap.com/1/upload', + headers: { + 'X-CleverTap-Account-Id': '476550467', + 'X-CleverTap-Passcode': 'sample_passcode', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + d: [ + { + type: 'profile', + profileData: { + Email: 'johnDoe@gmail.com', + Phone: '92374162212', + Gender: 'M', + Employed: true, + DOB: '1614775793', + Education: 'Science', + Married: true, + 'Customer Type': 'Prime', + Name: 'John Doe', + graduate: true, + msg_push: true, + msgSms: true, + msgemail: true, + msgwhatsapp: false, + custom_tags: '["Test_User","Interested_User","DIY_Hobby"]', + custom_mappings: '{"Office":"Trastkiv","Country":"Russia"}', + address: + '{"city":"kolkata","country":"India","postalCode":789223,"state":"WB","street":""}', + first_name: 'John', + last_name: 'Doe', + }, + identity: 'anon_id', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'clevertap', + description: 'Test 19', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + passcode: 'sample_passcode', + accountId: '476550467', + trackAnonymous: true, + enableObjectIdMapping: false, + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + overrideFields: { + first_name: 'John', + last_name: 'Doe', + }, + }, + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: 'anon_id', + type: 'identify', + traits: { + anonymousId: 'anon_id', + email: 'johnDoe@gmail.com', + first_name: 'John', + last_name: 'Doe', + phone: '92374162212', + gender: 'M', + employed: true, + birthday: '1614775793', + education: 'Science', + graduate: true, + married: true, + customerType: 'Prime', + msg_push: true, + msgSms: true, + msgemail: true, + msgwhatsapp: false, + custom_tags: ['Test_User', 'Interested_User', 'DIY_Hobby'], + custom_mappings: { + Office: 'Trastkiv', + Country: 'Russia', + }, + address: { + city: 'kolkata', + country: 'India', + postalCode: 789223, + state: 'WB', + street: '', + }, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.clevertap.com/1/upload', + headers: { + 'X-CleverTap-Account-Id': '476550467', + 'X-CleverTap-Passcode': 'sample_passcode', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + d: [ + { + type: 'profile', + profileData: { + Email: 'johnDoe@gmail.com', + Phone: '92374162212', + Gender: 'M', + Employed: true, + DOB: '1614775793', + Education: 'Science', + Married: true, + 'Customer Type': 'Prime', + Name: 'John Doe', + graduate: true, + msg_push: true, + msgSms: true, + msgemail: true, + msgwhatsapp: false, + custom_tags: '["Test_User","Interested_User","DIY_Hobby"]', + custom_mappings: '{"Office":"Trastkiv","Country":"Russia"}', + address: + '{"city":"kolkata","country":"India","postalCode":789223,"state":"WB","street":""}', + first_name: 'John', + last_name: 'Doe', + }, + identity: 'anon_id', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'clevertap', + description: 'Test 20: ERROR - Products property value must be an array of objects', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + passcode: 'sample_passcode', + accountId: '476550467', + trackAnonymous: true, + enableObjectIdMapping: false, + }, + }, + message: { + type: 'track', + event: 'Order Completed', + sentAt: '2021-03-10T11:59:57.815Z', + userId: 'riverjohn', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.13', + namespace: 'com.rudderlabs.javascript', + }, + page: { + url: 'http://127.0.0.1:5500/test.html', + path: '/test.html', + title: 'sample source', + search: '', + referrer: 'http://127.0.0.1:5500/', + referring_domain: '127.0.0.1:5500', + }, + locale: 'en-US', + screen: { + density: 2, + }, + traits: { + email: 'riverjohn@gmail.com', + phone: '+12345678900', + avatar: 'https://homepages.cae.wisc.edu/~ece533/images/airplane.png', + testIng: true, + lastName: 'John', + firstname: 'River', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.13', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:86.0) Gecko/20100101 Firefox/86.0', + }, + rudderId: 'fd5d3d37-3ce6-471d-b416-2f351212a44f', + messageId: '8ff6fd1b-b381-43fc-883c-92bf8eb0e725', + properties: { + tax: 1, + total: 20, + coupon: 'ImagePro', + revenue: 15, + currency: 'USD', + discount: 1.5, + order_id: '1234', + ts: '2021-03-10T11:59:22.080Z', + products: { + sku: 'G-32', + url: 'https://www.website.com/product/path', + name: 'Monopoly', + price: 14, + category: 'Games', + quantity: 1, + image_url: 'https://www.website.com/product/path.jpg', + product_id: '123', + }, + shipping: 22, + affiliation: 'Apple Store', + checkout_id: '12345', + }, + anonymousId: 'b2e06708-dd2a-4aee-bb32-41855d2fbdab', + integrations: { + All: true, + }, + originalTimestamp: '2021-03-10T11:59:22.080Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: 'Products property value must be an array of objects', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'CLEVERTAP', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'clevertap', + description: 'Test 21: ERROR - Unable to process without anonymousId or userId', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + passcode: 'sample_passcode', + accountId: '476550467', + trackAnonymous: true, + enableObjectIdMapping: true, + }, + }, + message: { + event: 'Random', + properties: { + country_region: 'India', + test: 'abc', + }, + receivedAt: '2021-08-20T12:49:07.691Z', + rudderId: '138c4214-b537-4f77-9dea-9abde70b5147', + type: 'track', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: 'Unable to process without anonymousId or userId', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'CLEVERTAP', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, +]; diff --git a/test/integrations/destinations/clevertap/router/data.ts b/test/integrations/destinations/clevertap/router/data.ts new file mode 100644 index 0000000000..380d6db00d --- /dev/null +++ b/test/integrations/destinations/clevertap/router/data.ts @@ -0,0 +1,274 @@ +export const data = [ + { + name: 'clevertap', + description: 'simple router tests', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + "destination": { + "Config": { + "passcode": "dummypasscode", + "accountId": "dummyAccountId", + "trackAnonymous": true, + "enableObjectIdMapping": true + } + }, + "metadata": { + "jobId": 1 + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "Android", + "version": "" + }, + "screen": { + "density": 2 + }, + "device": { + "id": "f54bb572361c4fd1", + "name": "whyred", + "type": "Android", + "model": "Redmi Note 5 Pro", + "manufacturer": "Xiaomi", + "token": "frfsgvrwe:APfdsafsgdfsgghfgfgjkhfsfgdhjhbvcvnetry767456fxsasdf" + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "anonymousId": "anon_id", + "type": "identify", + "traits": { + "ts": "2019-10-14T09:03:17.562Z", + "anonymousId": "anon_id", + "email": "dummyuser@gmail.com", + "name": "Dummy User", + "phone": "98765434210", + "gender": "M", + "employed": true, + "birthday": "1614775793", + "education": "Science", + "graduate": true, + "married": true, + "customerType": "Prime", + "msg_push": true, + "msgSms": true, + "msgemail": true, + "msgwhatsapp": false, + "custom_tags": ["Test_User", "Interested_User", "DIY_Hobby"], + "custom_mappings": { + "Office": "Trastkiv", + "Country": "Russia" + }, + "address": { + "city": "kolkata", + "country": "India", + "postalCode": 789223, + "state": "WB", + "street": "" + } + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + }, + { + "destination": { + "Config": { + "passcode": "dummypasscode", + "accountId": "dummyAccountId", + "trackAnonymous": true, + "enableObjectIdMapping": true + } + }, + "metadata": { + "jobId": 2 + }, + "message": { + "event": "Random", + "properties": { + "country_region": "India", + "test": "abc" + }, + "receivedAt": "2021-08-20T12:49:07.691Z", + "rudderId": "138c4214-b537-4f77-9dea-9abde70b5147", + "type": "track", + "anonymousId": "cd3a4439-7df0-4475-acb9-6659c7c4dfe3" + } + }, + { + "destination": { + "Config": { + "passcode": "dummypasscode", + "accountId": "dummyAccountId", + "trackAnonymous": true + } + }, + "metadata": { + "jobId": 3 + }, + "message": { + "type": "group", + "anonymousId": "anon-id-new", + "name": "Rudder", + "properties": { + "title": "Home", + "path": "/" + }, + "context": { + "ip": "14.5.67.21", + "library": { + "name": "http" + } + }, + "timestamp": "2020-02-02T00:23:09.544Z" + } + } + ], + destType: 'clevertap', + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + "batchedRequest": { + "version": "1", + "type": "REST", + "method": "POST", + "batched": true, + "endpoint": "https://api.clevertap.com/1/upload", + "headers": { + "X-CleverTap-Account-Id": "dummyAccountId", + "X-CleverTap-Passcode": "dummypasscode", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "d": [ + { + "type": "profile", + "ts": 1571043797, + "profileData": { + "Email": "dummyuser@gmail.com", + "Name": "Dummy User", + "Phone": "98765434210", + "Gender": "M", + "Employed": true, + "DOB": "1614775793", + "Education": "Science", + "Married": true, + "Customer Type": "Prime", + "graduate": true, + "msg_push": true, + "msgSms": true, + "msgemail": true, + "msgwhatsapp": false, + "custom_tags": "[\"Test_User\",\"Interested_User\",\"DIY_Hobby\"]", + "custom_mappings": "{\"Office\":\"Trastkiv\",\"Country\":\"Russia\"}", + "address": "{\"city\":\"kolkata\",\"country\":\"India\",\"postalCode\":789223,\"state\":\"WB\",\"street\":\"\"}" + }, + "objectId": "anon_id" + }, + { + "type": "token", + "tokenData": { + "id": "frfsgvrwe:APfdsafsgdfsgghfgfgjkhfsfgdhjhbvcvnetry767456fxsasdf", + "type": "fcm" + }, + "objectId": "anon_id" + }, + { + "evtName": "Random", + "evtData": { + "country_region": "India", + "test": "abc" + }, + "type": "event", + "objectId": "cd3a4439-7df0-4475-acb9-6659c7c4dfe3" + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {} + }, + "metadata": [ + { + "jobId": 1 + }, + { + "jobId": 2 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "Config": { + "passcode": "dummypasscode", + "accountId": "dummyAccountId", + "trackAnonymous": true, + "enableObjectIdMapping": true + } + } + }, + { + "metadata": [ + { + "jobId": 3 + } + ], + "batched": false, + "statusCode": 400, + "error": "Message type not supported", + "statTags": { + "destType": "CLEVERTAP", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "router", + "implementation": "native", + "module": "destination", + }, + "destination": { + "Config": { + "passcode": "dummypasscode", + "accountId": "dummyAccountId", + "trackAnonymous": true + } + } + } + ], + }, + }, + }, + } +]; diff --git a/test/integrations/destinations/intercom/processor/data.ts b/test/integrations/destinations/intercom/processor/data.ts new file mode 100644 index 0000000000..14d1884ba2 --- /dev/null +++ b/test/integrations/destinations/intercom/processor/data.ts @@ -0,0 +1,2311 @@ +export const data = [ + { + name: 'intercom', + description: 'Test 0', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + channel: 'mobile', + context: { + app: { + build: '1.0', + name: 'Test_Example', + namespace: 'com.example.testapp', + version: '1.0', + }, + device: { + id: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + manufacturer: 'Apple', + model: 'iPhone', + name: 'iPod touch (7th generation)', + type: 'iOS', + }, + library: { + name: 'test-ios-library', + version: '1.0.7', + }, + locale: 'en-US', + network: { + bluetooth: false, + carrier: 'unavailable', + cellular: false, + wifi: true, + }, + os: { + name: 'iOS', + version: '14.0', + }, + screen: { + density: 2, + height: 320, + width: 568, + }, + timezone: 'Asia/Kolkata', + traits: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + name: 'Test Name', + firstName: 'Test', + lastName: 'Name', + createdAt: '2020-09-30T19:11:00.337Z', + userId: 'test_user_id_1', + email: 'test_1@test.com', + phone: '9876543210', + key1: 'value1', + address: { + city: 'Kolkata', + state: 'West Bengal', + }, + originalArray: [ + { + nested_field: 'nested value', + tags: ['tag_1', 'tag_2', 'tag_3'], + }, + { + nested_field: 'nested value', + tags: ['tag_1'], + }, + { + nested_field: 'nested value', + }, + ], + }, + userAgent: 'unknown', + }, + event: 'Test Event 2', + integrations: { + All: true, + }, + messageId: '1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8', + originalTimestamp: '2020-09-30T19:11:00.337Z', + receivedAt: '2020-10-01T00:41:11.369+05:30', + request_ip: '2405:201:8005:9856:7911:25e7:5603:5e18', + sentAt: '2020-09-30T19:11:10.382Z', + timestamp: '2020-10-01T00:41:01.324+05:30', + type: 'identify', + }, + destination: { + Config: { + apiKey: 'intercomApiKey', + appId: '9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0', + collectContext: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.intercom.io/users', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer intercomApiKey', + Accept: 'application/json', + 'Intercom-Version': '1.4', + }, + params: {}, + body: { + JSON: { + user_id: 'test_user_id_1', + email: 'test_1@test.com', + phone: '9876543210', + name: 'Test Name', + signed_up_at: 1601493060, + last_seen_user_agent: 'unknown', + custom_attributes: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + key1: 'value1', + 'address.city': 'Kolkata', + 'address.state': 'West Bengal', + 'originalArray[0].nested_field': 'nested value', + 'originalArray[0].tags[0]': 'tag_1', + 'originalArray[0].tags[1]': 'tag_2', + 'originalArray[0].tags[2]': 'tag_3', + 'originalArray[1].nested_field': 'nested value', + 'originalArray[1].tags[0]': 'tag_1', + 'originalArray[2].nested_field': 'nested value', + }, + update_last_request_at: true, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'intercom', + description: 'Test 1', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + channel: 'mobile', + context: { + app: { + build: '1.0', + name: 'Test_Example', + namespace: 'com.example.testapp', + version: '1.0', + }, + device: { + id: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + manufacturer: 'Apple', + model: 'iPhone', + name: 'iPod touch (7th generation)', + type: 'iOS', + }, + library: { + name: 'test-ios-library', + version: '1.0.7', + }, + locale: 'en-US', + network: { + bluetooth: false, + carrier: 'unavailable', + cellular: false, + wifi: true, + }, + os: { + name: 'iOS', + version: '14.0', + }, + screen: { + density: 2, + height: 320, + width: 568, + }, + timezone: 'Asia/Kolkata', + traits: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + firstName: 'Test', + lastName: 'Name', + createdAt: '2020-09-30T19:11:00.337Z', + email: 'test_1@test.com', + phone: '9876543210', + key1: 'value1', + }, + userAgent: 'unknown', + }, + event: 'Test Event 2', + integrations: { + All: true, + }, + messageId: '1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8', + originalTimestamp: '2020-09-30T19:11:00.337Z', + receivedAt: '2020-10-01T00:41:11.369+05:30', + request_ip: '2405:201:8005:9856:7911:25e7:5603:5e18', + sentAt: '2020-09-30T19:11:10.382Z', + timestamp: '2020-10-01T00:41:01.324+05:30', + type: 'identify', + }, + destination: { + Config: { + apiKey: 'intercomApiKey', + appId: '9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0', + collectContext: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.intercom.io/users', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer intercomApiKey', + Accept: 'application/json', + 'Intercom-Version': '1.4', + }, + params: {}, + body: { + JSON: { + email: 'test_1@test.com', + phone: '9876543210', + signed_up_at: 1601493060, + last_seen_user_agent: 'unknown', + custom_attributes: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + key1: 'value1', + }, + update_last_request_at: true, + name: 'Test Name', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'intercom', + description: 'Test 2', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + channel: 'mobile', + context: { + app: { + build: '1.0', + name: 'Test_Example', + namespace: 'com.example.testapp', + version: '1.0', + }, + device: { + id: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + manufacturer: 'Apple', + model: 'iPhone', + name: 'iPod touch (7th generation)', + type: 'iOS', + }, + library: { + name: 'test-ios-library', + version: '1.0.7', + }, + locale: 'en-US', + network: { + bluetooth: false, + carrier: 'unavailable', + cellular: false, + wifi: true, + }, + os: { + name: 'iOS', + version: '14.0', + }, + screen: { + density: 2, + height: 320, + width: 568, + }, + timezone: 'Asia/Kolkata', + traits: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + lastName: 'Name', + createdAt: '2020-09-30T19:11:00.337Z', + email: 'test_1@test.com', + phone: '9876543210', + key1: 'value1', + }, + userAgent: 'unknown', + }, + event: 'Test Event 2', + integrations: { + All: true, + }, + messageId: '1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8', + originalTimestamp: '2020-09-30T19:11:00.337Z', + receivedAt: '2020-10-01T00:41:11.369+05:30', + request_ip: '2405:201:8005:9856:7911:25e7:5603:5e18', + sentAt: '2020-09-30T19:11:10.382Z', + timestamp: '2020-10-01T00:41:01.324+05:30', + type: 'identify', + }, + destination: { + Config: { + apiKey: 'intercomApiKey', + appId: '9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0', + collectContext: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.intercom.io/users', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer intercomApiKey', + Accept: 'application/json', + 'Intercom-Version': '1.4', + }, + params: {}, + body: { + JSON: { + email: 'test_1@test.com', + phone: '9876543210', + signed_up_at: 1601493060, + last_seen_user_agent: 'unknown', + custom_attributes: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + key1: 'value1', + }, + update_last_request_at: true, + name: 'Name', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'intercom', + description: 'Test 3', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + channel: 'mobile', + context: { + app: { + build: '1.0', + name: 'Test_Example', + namespace: 'com.example.testapp', + version: '1.0', + }, + device: { + id: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + manufacturer: 'Apple', + model: 'iPhone', + name: 'iPod touch (7th generation)', + type: 'iOS', + }, + library: { + name: 'test-ios-library', + version: '1.0.7', + }, + locale: 'en-US', + network: { + bluetooth: false, + carrier: 'unavailable', + cellular: false, + wifi: true, + }, + os: { + name: 'iOS', + version: '14.0', + }, + screen: { + density: 2, + height: 320, + width: 568, + }, + timezone: 'Asia/Kolkata', + traits: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + firstName: 'Name', + createdAt: '2020-09-30T19:11:00.337Z', + email: 'test_1@test.com', + phone: '9876543210', + key1: 'value1', + }, + userAgent: 'unknown', + }, + event: 'Test Event 2', + integrations: { + All: true, + }, + messageId: '1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8', + originalTimestamp: '2020-09-30T19:11:00.337Z', + receivedAt: '2020-10-01T00:41:11.369+05:30', + request_ip: '2405:201:8005:9856:7911:25e7:5603:5e18', + sentAt: '2020-09-30T19:11:10.382Z', + timestamp: '2020-10-01T00:41:01.324+05:30', + type: 'identify', + }, + destination: { + Config: { + apiKey: 'intercomApiKey', + appId: '9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0', + collectContext: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.intercom.io/users', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer intercomApiKey', + Accept: 'application/json', + 'Intercom-Version': '1.4', + }, + params: {}, + body: { + JSON: { + email: 'test_1@test.com', + phone: '9876543210', + signed_up_at: 1601493060, + last_seen_user_agent: 'unknown', + custom_attributes: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + key1: 'value1', + }, + update_last_request_at: true, + name: 'Name', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'intercom', + description: 'Test 4: ERROR - Either of `email` or `userId` is required for Identify call', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + channel: 'mobile', + context: { + app: { + build: '1.0', + name: 'Test_Example', + namespace: 'com.example.testapp', + version: '1.0', + }, + device: { + id: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + manufacturer: 'Apple', + model: 'iPhone', + name: 'iPod touch (7th generation)', + type: 'iOS', + }, + library: { + name: 'test-ios-library', + version: '1.0.7', + }, + locale: 'en-US', + network: { + bluetooth: false, + carrier: 'unavailable', + cellular: false, + wifi: true, + }, + os: { + name: 'iOS', + version: '14.0', + }, + screen: { + density: 2, + height: 320, + width: 568, + }, + timezone: 'Asia/Kolkata', + traits: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + firstName: 'Name', + createdAt: '2020-09-30T19:11:00.337Z', + phone: '9876543210', + key1: 'value1', + }, + userAgent: 'unknown', + }, + event: 'Test Event 2', + integrations: { + All: true, + }, + messageId: '1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8', + originalTimestamp: '2020-09-30T19:11:00.337Z', + receivedAt: '2020-10-01T00:41:11.369+05:30', + request_ip: '2405:201:8005:9856:7911:25e7:5603:5e18', + sentAt: '2020-09-30T19:11:10.382Z', + timestamp: '2020-10-01T00:41:01.324+05:30', + type: 'identify', + }, + destination: { + Config: { + apiKey: 'intercomApiKey', + appId: '9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0', + collectContext: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: 'Either of `email` or `userId` is required for Identify call', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'INTERCOM', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'intercom', + description: 'Test 5', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + channel: 'mobile', + context: { + app: { + build: '1.0', + name: 'Test_Example', + namespace: 'com.example.testapp', + version: '1.0', + }, + device: { + id: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + manufacturer: 'Apple', + model: 'iPhone', + name: 'iPod touch (7th generation)', + type: 'iOS', + }, + library: { + name: 'test-ios-library', + version: '1.0.7', + }, + locale: 'en-US', + network: { + bluetooth: false, + carrier: 'unavailable', + cellular: false, + wifi: true, + }, + os: { + name: 'iOS', + version: '14.0', + }, + screen: { + density: 2, + height: 320, + width: 568, + }, + timezone: 'Asia/Kolkata', + traits: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + lastName: 'Name', + createdAt: '2020-09-30T19:11:00.337Z', + email: 'test_1@test.com', + phone: '9876543210', + key1: 'value1', + company: { + name: 'Test Comp', + id: 'company_id', + industry: 'test industry', + key1: 'value1', + key2: { + a: 'a', + }, + key3: [1, 2, 3], + }, + }, + userAgent: 'unknown', + }, + event: 'Test Event 2', + integrations: { + All: true, + }, + messageId: '1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8', + originalTimestamp: '2020-09-30T19:11:00.337Z', + receivedAt: '2020-10-01T00:41:11.369+05:30', + request_ip: '2405:201:8005:9856:7911:25e7:5603:5e18', + sentAt: '2020-09-30T19:11:10.382Z', + timestamp: '2020-10-01T00:41:01.324+05:30', + type: 'identify', + }, + destination: { + Config: { + apiKey: 'intercomApiKey', + appId: '9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0', + collectContext: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.intercom.io/users', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer intercomApiKey', + Accept: 'application/json', + 'Intercom-Version': '1.4', + }, + params: {}, + body: { + JSON: { + email: 'test_1@test.com', + phone: '9876543210', + signed_up_at: 1601493060, + last_seen_user_agent: 'unknown', + custom_attributes: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + key1: 'value1', + }, + update_last_request_at: true, + name: 'Name', + companies: [ + { + company_id: 'company_id', + custom_attributes: { + key1: 'value1', + key2: '{"a":"a"}', + key3: '[1,2,3]', + }, + name: 'Test Comp', + industry: 'test industry', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'intercom', + description: 'Test 6', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + channel: 'mobile', + context: { + app: { + build: '1.0', + name: 'Test_Example', + namespace: 'com.example.testapp', + version: '1.0', + }, + device: { + id: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + manufacturer: 'Apple', + model: 'iPhone', + name: 'iPod touch (7th generation)', + type: 'iOS', + }, + library: { + name: 'test-ios-library', + version: '1.0.7', + }, + locale: 'en-US', + network: { + bluetooth: false, + carrier: 'unavailable', + cellular: false, + wifi: true, + }, + os: { + name: 'iOS', + version: '14.0', + }, + screen: { + density: 2, + height: 320, + width: 568, + }, + timezone: 'Asia/Kolkata', + traits: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + lastName: 'Name', + createdAt: '2020-09-30T19:11:00.337Z', + email: 'test_1@test.com', + phone: '9876543210', + key1: 'value1', + company: { + name: 'Test Comp', + industry: 'test industry', + key1: 'value1', + key2: null, + key3: ['value1', 'value2'], + key4: { + foo: 'bar', + }, + }, + }, + userAgent: 'unknown', + }, + event: 'Test Event 2', + integrations: { + All: true, + }, + messageId: '1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8', + originalTimestamp: '2020-09-30T19:11:00.337Z', + receivedAt: '2020-10-01T00:41:11.369+05:30', + request_ip: '2405:201:8005:9856:7911:25e7:5603:5e18', + sentAt: '2020-09-30T19:11:10.382Z', + timestamp: '2020-10-01T00:41:01.324+05:30', + type: 'identify', + }, + destination: { + Config: { + apiKey: 'intercomApiKey', + appId: '9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0', + collectContext: false, + updateLastRequestAt: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.intercom.io/users', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer intercomApiKey', + Accept: 'application/json', + 'Intercom-Version': '1.4', + }, + params: {}, + body: { + JSON: { + email: 'test_1@test.com', + phone: '9876543210', + signed_up_at: 1601493060, + last_seen_user_agent: 'unknown', + custom_attributes: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + key1: 'value1', + }, + update_last_request_at: false, + name: 'Name', + companies: [ + { + company_id: 'c0277b5c814453e5135f515f943d085a', + custom_attributes: { + key1: 'value1', + key3: '["value1","value2"]', + key4: '{"foo":"bar"}', + }, + name: 'Test Comp', + industry: 'test industry', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'intercom', + description: 'Test 7', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + channel: 'mobile', + context: { + app: { + build: '1.0', + name: 'Test_Example', + namespace: 'com.example.testapp', + version: '1.0', + }, + device: { + id: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + manufacturer: 'Apple', + model: 'iPhone', + name: 'iPod touch (7th generation)', + type: 'iOS', + }, + library: { + name: 'test-ios-library', + version: '1.0.7', + }, + locale: 'en-US', + network: { + bluetooth: false, + carrier: 'unavailable', + cellular: false, + wifi: true, + }, + os: { + name: 'iOS', + version: '14.0', + }, + screen: { + density: 2, + height: 320, + width: 568, + }, + timezone: 'Asia/Kolkata', + traits: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + lastName: 'Name', + createdAt: '2020-09-30T19:11:00.337Z', + email: 'test_1@test.com', + phone: '9876543210', + key1: 'value1', + company: { + industry: 'test industry', + key1: 'value1', + key2: null, + }, + }, + userAgent: 'unknown', + }, + event: 'Test Event 2', + integrations: { + All: true, + }, + messageId: '1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8', + originalTimestamp: '2020-09-30T19:11:00.337Z', + receivedAt: '2020-10-01T00:41:11.369+05:30', + request_ip: '2405:201:8005:9856:7911:25e7:5603:5e18', + sentAt: '2020-09-30T19:11:10.382Z', + timestamp: '2020-10-01T00:41:01.324+05:30', + type: 'identify', + }, + destination: { + Config: { + apiKey: 'intercomApiKey', + appId: '9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0', + collectContext: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.intercom.io/users', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer intercomApiKey', + Accept: 'application/json', + 'Intercom-Version': '1.4', + }, + params: {}, + body: { + JSON: { + email: 'test_1@test.com', + phone: '9876543210', + signed_up_at: 1601493060, + last_seen_user_agent: 'unknown', + custom_attributes: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + key1: 'value1', + }, + update_last_request_at: true, + name: 'Name', + companies: [], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'intercom', + description: 'Test 8', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + channel: 'mobile', + context: { + app: { + build: '1.0', + name: 'Test_Example', + namespace: 'com.example.testapp', + version: '1.0', + }, + device: { + id: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + manufacturer: 'Apple', + model: 'iPhone', + name: 'iPod touch (7th generation)', + type: 'iOS', + }, + library: { + name: 'test-ios-library', + version: '1.0.7', + }, + locale: 'en-US', + network: { + bluetooth: false, + carrier: 'unavailable', + cellular: false, + wifi: true, + }, + os: { + name: 'iOS', + version: '14.0', + }, + screen: { + density: 2, + height: 320, + width: 568, + }, + timezone: 'Asia/Kolkata', + traits: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + name: 'Test Name', + firstName: 'Test', + lastName: 'Name', + createdAt: '2020-09-30T19:11:00.337Z', + userId: 'test_user_id_1', + email: 'test_1@test.com', + phone: '9876543210', + key1: 'value1', + }, + userAgent: 'unknown', + }, + properties: { + property1: 1, + property2: 'test', + property3: true, + property4: '2020-10-05T09:09:03.731Z', + property5: { + property1: 1, + property2: 'test', + property3: { + subProp1: { + a: 'a', + b: 'b', + }, + subProp2: ['a', 'b'], + }, + }, + properties6: null, + revenue: { + amount: 1232, + currency: 'inr', + test: 123, + }, + price: { + amount: 3000, + currency: 'USD', + }, + article: { + url: 'https://example.org/ab1de.html', + value: 'the dude abides', + }, + }, + event: 'Test Event 2', + integrations: { + All: true, + }, + messageId: '1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8', + originalTimestamp: '2020-09-30T19:11:00.337Z', + receivedAt: '2020-10-01T00:41:11.369+05:30', + request_ip: '2405:201:8005:9856:7911:25e7:5603:5e18', + sentAt: '2020-09-30T19:11:10.382Z', + timestamp: '2020-10-01T00:41:01.324+05:30', + type: 'track', + }, + destination: { + Config: { + apiKey: 'intercomApiKey', + appId: '9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0', + collectContext: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.intercom.io/events', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer intercomApiKey', + Accept: 'application/json', + 'Intercom-Version': '1.4', + }, + params: {}, + body: { + JSON: { + user_id: 'test_user_id_1', + email: 'test_1@test.com', + event_name: 'Test Event 2', + created: 1601493061, + metadata: { + revenue: { + amount: 1232, + currency: 'inr', + test: 123, + }, + price: { + amount: 3000, + currency: 'USD', + }, + article: { + url: 'https://example.org/ab1de.html', + value: 'the dude abides', + }, + property1: 1, + property2: 'test', + property3: true, + property4: '2020-10-05T09:09:03.731Z', + 'property5.property1': 1, + 'property5.property2': 'test', + 'property5.property3.subProp1.a': 'a', + 'property5.property3.subProp1.b': 'b', + 'property5.property3.subProp2[0]': 'a', + 'property5.property3.subProp2[1]': 'b', + properties6: null, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'intercom', + description: 'Test 9', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + channel: 'mobile', + context: { + app: { + build: '1.0', + name: 'Test_Example', + namespace: 'com.example.testapp', + version: '1.0', + }, + device: { + id: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + manufacturer: 'Apple', + model: 'iPhone', + name: 'iPod touch (7th generation)', + type: 'iOS', + }, + library: { + name: 'test-ios-library', + version: '1.0.7', + }, + locale: 'en-US', + network: { + bluetooth: false, + carrier: 'unavailable', + cellular: false, + wifi: true, + }, + os: { + name: 'iOS', + version: '14.0', + }, + screen: { + density: 2, + height: 320, + width: 568, + }, + timezone: 'Asia/Kolkata', + traits: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + name: 'Test Name', + firstName: 'Test', + lastName: 'Name', + createdAt: '2020-09-30T19:11:00.337Z', + email: 'test_1@test.com', + phone: '9876543210', + key1: 'value1', + }, + userAgent: 'unknown', + }, + event: 'Test Event 2', + integrations: { + All: true, + }, + messageId: '1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8', + originalTimestamp: '2020-09-30T19:11:00.337Z', + receivedAt: '2020-10-01T00:41:11.369+05:30', + request_ip: '2405:201:8005:9856:7911:25e7:5603:5e18', + sentAt: '2020-09-30T19:11:10.382Z', + timestamp: '2020-10-01T00:41:01.324+05:30', + type: 'track', + }, + destination: { + Config: { + apiKey: 'intercomApiKey', + appId: '9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0', + collectContext: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.intercom.io/events', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer intercomApiKey', + Accept: 'application/json', + 'Intercom-Version': '1.4', + }, + params: {}, + body: { + JSON: { + email: 'test_1@test.com', + event_name: 'Test Event 2', + created: 1601493061, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'intercom', + description: 'Test 10: ERROR - Either of `email` or `userId` is required for Track call', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + channel: 'mobile', + context: { + app: { + build: '1.0', + name: 'Test_Example', + namespace: 'com.example.testapp', + version: '1.0', + }, + device: { + id: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + manufacturer: 'Apple', + model: 'iPhone', + name: 'iPod touch (7th generation)', + type: 'iOS', + }, + library: { + name: 'test-ios-library', + version: '1.0.7', + }, + locale: 'en-US', + network: { + bluetooth: false, + carrier: 'unavailable', + cellular: false, + wifi: true, + }, + os: { + name: 'iOS', + version: '14.0', + }, + screen: { + density: 2, + height: 320, + width: 568, + }, + timezone: 'Asia/Kolkata', + traits: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + name: 'Test Name', + firstName: 'Test', + lastName: 'Name', + createdAt: '2020-09-30T19:11:00.337Z', + phone: '9876543210', + key1: 'value1', + }, + userAgent: 'unknown', + }, + event: 'Test Event 2', + integrations: { + All: true, + }, + messageId: '1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8', + originalTimestamp: '2020-09-30T19:11:00.337Z', + receivedAt: '2020-10-01T00:41:11.369+05:30', + request_ip: '2405:201:8005:9856:7911:25e7:5603:5e18', + sentAt: '2020-09-30T19:11:10.382Z', + timestamp: '2020-10-01T00:41:01.324+05:30', + type: 'track', + }, + destination: { + Config: { + apiKey: 'intercomApiKey', + appId: '9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0', + collectContext: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: 'Either of `email` or `userId` is required for Track call', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'INTERCOM', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'intercom', + description: 'Test 11', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + channel: 'mobile', + context: { + app: { + build: '1.0', + name: 'Test_Example', + namespace: 'com.example.testapp', + version: '1.0', + }, + externalId: [ + { + identifierType: 'email', + id: 'test@gmail.com', + }, + ], + mappedToDestination: true, + device: { + id: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + manufacturer: 'Apple', + model: 'iPhone', + name: 'iPod touch (7th generation)', + type: 'iOS', + }, + library: { + name: 'test-ios-library', + version: '1.0.7', + }, + locale: 'en-US', + network: { + bluetooth: false, + carrier: 'unavailable', + cellular: false, + wifi: true, + }, + os: { + name: 'iOS', + version: '14.0', + }, + screen: { + density: 2, + height: 320, + width: 568, + }, + timezone: 'Asia/Kolkata', + traits: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + name: 'Test Name', + firstName: 'Test', + lastName: 'Name', + createdAt: '2020-09-30T19:11:00.337Z', + phone: '9876543210', + key1: 'value1', + }, + userAgent: 'unknown', + }, + event: 'Test Event 2', + integrations: { + All: true, + }, + messageId: '1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8', + originalTimestamp: '2020-09-30T19:11:00.337Z', + receivedAt: '2020-10-01T00:41:11.369+05:30', + request_ip: '2405:201:8005:9856:7911:25e7:5603:5e18', + sentAt: '2020-09-30T19:11:10.382Z', + timestamp: '2020-10-01T00:41:01.324+05:30', + type: 'identify', + }, + destination: { + Config: { + apiKey: 'intercomApiKey', + appId: '9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0', + collectContext: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.intercom.io/users', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer intercomApiKey', + Accept: 'application/json', + 'Intercom-Version': '1.4', + }, + params: {}, + body: { + JSON: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + name: 'Test Name', + firstName: 'Test', + lastName: 'Name', + createdAt: '2020-09-30T19:11:00.337Z', + phone: '9876543210', + key1: 'value1', + email: 'test@gmail.com', + update_last_request_at: true, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'intercom', + description: 'Test 12', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + channel: 'mobile', + context: { + app: { + build: '1.0', + name: 'Test_Example', + namespace: 'com.example.testapp', + version: '1.0', + }, + device: { + id: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + manufacturer: 'Apple', + model: 'iPhone', + name: 'iPod touch (7th generation)', + type: 'iOS', + }, + library: { + name: 'test-ios-library', + version: '1.0.7', + }, + locale: 'en-US', + network: { + bluetooth: false, + carrier: 'unavailable', + cellular: false, + wifi: true, + }, + os: { + name: 'iOS', + version: '14.0', + }, + screen: { + density: 2, + height: 320, + width: 568, + }, + timezone: 'Asia/Kolkata', + traits: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + name: 'Test Name', + firstName: 'Test', + lastName: 'Name', + createdAt: '2020-09-30T19:11:00.337Z', + phone: '9876543210', + key1: 'value1', + }, + userAgent: 'unknown', + }, + event: 'Test Event 2', + integrations: { + All: true, + }, + messageId: '1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8', + originalTimestamp: '2020-09-30T19:11:00.337Z', + receivedAt: '2020-10-01T00:41:11.369+05:30', + request_ip: '2405:201:8005:9856:7911:25e7:5603:5e18', + sentAt: '2020-09-30T19:11:10.382Z', + timestamp: '2020-10-01T00:41:01.324+05:30', + type: 'identify', + }, + destination: { + Config: { + apiKey: 'intercomApiKey', + appId: '9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0', + collectContext: false, + sendAnonymousId: true, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.intercom.io/users', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer intercomApiKey', + Accept: 'application/json', + 'Intercom-Version': '1.4', + }, + params: {}, + body: { + JSON: { + phone: '9876543210', + name: 'Test Name', + signed_up_at: 1601493060, + last_seen_user_agent: 'unknown', + custom_attributes: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + key1: 'value1', + }, + user_id: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + update_last_request_at: true, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'intercom', + description: 'Test 13: ERROR - Either of `email` or `userId` is required for Identify call', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + channel: 'mobile', + context: { + app: { + build: '1.0', + name: 'Test_Example', + namespace: 'com.example.testapp', + version: '1.0', + }, + device: { + id: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + manufacturer: 'Apple', + model: 'iPhone', + name: 'iPod touch (7th generation)', + type: 'iOS', + }, + library: { + name: 'test-ios-library', + version: '1.0.7', + }, + locale: 'en-US', + network: { + bluetooth: false, + carrier: 'unavailable', + cellular: false, + wifi: true, + }, + os: { + name: 'iOS', + version: '14.0', + }, + screen: { + density: 2, + height: 320, + width: 568, + }, + timezone: 'Asia/Kolkata', + traits: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + name: 'Test Name', + firstName: 'Test', + lastName: 'Name', + createdAt: '2020-09-30T19:11:00.337Z', + phone: '9876543210', + key1: 'value1', + }, + userAgent: 'unknown', + }, + event: 'Test Event 2', + integrations: { + All: true, + }, + messageId: '1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8', + originalTimestamp: '2020-09-30T19:11:00.337Z', + receivedAt: '2020-10-01T00:41:11.369+05:30', + request_ip: '2405:201:8005:9856:7911:25e7:5603:5e18', + sentAt: '2020-09-30T19:11:10.382Z', + timestamp: '2020-10-01T00:41:01.324+05:30', + type: 'identify', + }, + destination: { + Config: { + apiKey: 'intercomApiKey', + appId: '9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0', + collectContext: false, + sendAnonymousId: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: 'Either of `email` or `userId` is required for Identify call', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'INTERCOM', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'intercom', + description: 'Test 14', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + groupId: 'test_company_id_wdasda', + traits: { + employees: 450, + plan: 'basic', + userId: 'sdfrsdfsdfsf', + email: 'test@test.com', + name: 'rudderUpdate', + size: '50', + industry: 'IT', + monthlySpend: '2131231', + remoteCreatedAt: '1683017572', + key1: 'val1', + }, + anonymousId: 'sdfrsdfsdfsf', + integrations: { + All: true, + }, + type: 'group', + userId: 'sdfrsdfsdfsf', + }, + destination: { + Config: { + apiKey: 'abcd=', + appId: 'asdasdasd', + collectContext: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.intercom.io/companies', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer abcd=', + Accept: 'application/json', + 'Intercom-Version': '1.4', + }, + params: {}, + body: { + JSON: { + company_id: 'test_company_id_wdasda', + name: 'rudderUpdate', + plan: 'basic', + size: 50, + industry: 'IT', + monthly_spend: 2131231, + remote_created_at: 1683017572, + custom_attributes: { + employees: 450, + email: 'test@test.com', + key1: 'val1', + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'sdfrsdfsdfsf', + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.intercom.io/users', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer abcd=', + Accept: 'application/json', + 'Intercom-Version': '1.4', + }, + params: {}, + body: { + JSON: { + user_id: 'sdfrsdfsdfsf', + companies: [ + { + company_id: 'test_company_id_wdasda', + name: 'rudderUpdate', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'sdfrsdfsdfsf', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'intercom', + description: 'Test 15', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + groupId: 'test_company_id', + traits: { + plan: 'basic', + name: 'rudderUpdate', + size: 50, + industry: 'IT', + monthlySpend: '2131231', + email: 'comanyemail@abc.com', + }, + anonymousId: '12312312', + context: { + app: { + build: '1.0', + name: 'Test_Example', + namespace: 'com.example.testapp', + version: '1.0', + }, + device: { + id: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + manufacturer: 'Apple', + model: 'iPhone', + name: 'iPod touch (7th generation)', + type: 'iOS', + }, + library: { + name: 'test-ios-library', + version: '1.0.7', + }, + locale: 'en-US', + network: { + bluetooth: false, + carrier: 'unavailable', + cellular: false, + wifi: true, + }, + os: { + name: 'iOS', + version: '14.0', + }, + screen: { + density: 2, + height: 320, + width: 568, + }, + timezone: 'Asia/Kolkata', + userAgent: 'unknown', + }, + integrations: { + All: true, + }, + messageId: '1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8', + type: 'group', + }, + destination: { + Config: { + apiKey: 'abcd=', + appId: 'asdasdasd', + collectContext: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.intercom.io/companies', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer abcd=', + Accept: 'application/json', + 'Intercom-Version': '1.4', + }, + params: {}, + body: { + JSON: { + company_id: 'test_company_id', + name: 'rudderUpdate', + plan: 'basic', + size: 50, + industry: 'IT', + monthly_spend: 2131231, + custom_attributes: { + email: 'comanyemail@abc.com', + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '12312312', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'intercom', + description: 'Test 16', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + groupId: 'test_company_id_wdasda', + context: { + traits: { + email: 'testUser@test.com', + }, + }, + traits: { + employees: 450, + plan: 'basic', + email: 'test@test.com', + name: 'rudderUpdate', + size: '50', + industry: 'IT', + website: 'url', + monthlySpend: '2131231', + remoteCreatedAt: '1683017572', + key1: 'val1', + }, + anonymousId: 'sdfrsdfsdfsf', + integrations: { + All: true, + }, + type: 'group', + userId: 'sdfrsdfsdfsf', + }, + destination: { + Config: { + apiKey: 'abcd=', + appId: 'asdasdasd', + collectContext: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.intercom.io/companies', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer abcd=', + Accept: 'application/json', + 'Intercom-Version': '1.4', + }, + params: {}, + body: { + JSON: { + company_id: 'test_company_id_wdasda', + name: 'rudderUpdate', + plan: 'basic', + size: 50, + website: 'url', + industry: 'IT', + monthly_spend: 2131231, + remote_created_at: 1683017572, + custom_attributes: { + employees: 450, + email: 'test@test.com', + key1: 'val1', + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'sdfrsdfsdfsf', + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.intercom.io/users', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer abcd=', + Accept: 'application/json', + 'Intercom-Version': '1.4', + }, + params: {}, + body: { + JSON: { + user_id: 'sdfrsdfsdfsf', + email: 'testUser@test.com', + companies: [ + { + company_id: 'test_company_id_wdasda', + name: 'rudderUpdate', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'sdfrsdfsdfsf', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'intercom', + description: 'Test 17', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + groupId: 'test_company_id_wdasda', + context: { + traits: { + email: 'testUser@test.com', + }, + }, + traits: { + employees: 450, + plan: 'basic', + email: 'test@test.com', + name: 'rudderUpdate', + size: '50', + industry: 'IT', + website: 'url', + monthlySpend: '2131231', + remoteCreatedAt: '1683017572', + key1: 'val1', + key2: { + a: 'a', + b: 'b', + }, + key3: [1, 2, 3], + key4: null, + }, + anonymousId: 'anonId', + integrations: { + All: true, + }, + type: 'group', + }, + destination: { + Config: { + apiKey: 'abcd=', + appId: 'asdasdasd', + collectContext: false, + sendAnonymousId: true, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.intercom.io/companies', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer abcd=', + Accept: 'application/json', + 'Intercom-Version': '1.4', + }, + params: {}, + body: { + JSON: { + company_id: 'test_company_id_wdasda', + name: 'rudderUpdate', + plan: 'basic', + size: 50, + website: 'url', + industry: 'IT', + monthly_spend: 2131231, + remote_created_at: 1683017572, + custom_attributes: { + employees: 450, + email: 'test@test.com', + key1: 'val1', + 'key2.a': 'a', + 'key2.b': 'b', + 'key3[0]': 1, + 'key3[1]': 2, + 'key3[2]': 3, + key4: null, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'anonId', + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.intercom.io/users', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer abcd=', + Accept: 'application/json', + 'Intercom-Version': '1.4', + }, + params: {}, + body: { + JSON: { + user_id: 'anonId', + email: 'testUser@test.com', + companies: [ + { + company_id: 'test_company_id_wdasda', + name: 'rudderUpdate', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'anonId', + }, + statusCode: 200, + }, + ], + }, + }, + }, +]; diff --git a/test/integrations/destinations/intercom/router/data.ts b/test/integrations/destinations/intercom/router/data.ts new file mode 100644 index 0000000000..a956d358f0 --- /dev/null +++ b/test/integrations/destinations/intercom/router/data.ts @@ -0,0 +1,272 @@ +export const data = [ + { + name: 'intercom', + description: 'Test 0', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + "message": { + "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", + "channel": "mobile", + "context": { + "app": { + "build": "1.0", + "name": "Test_Example", + "namespace": "com.example.testapp", + "version": "1.0" + }, + "device": { + "id": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", + "manufacturer": "Apple", + "model": "iPhone", + "name": "iPod touch (7th generation)", + "type": "iOS" + }, + "library": { + "name": "test-ios-library", + "version": "1.0.7" + }, + "locale": "en-US", + "network": { + "bluetooth": false, + "carrier": "unavailable", + "cellular": false, + "wifi": true + }, + "os": { + "name": "iOS", + "version": "14.0" + }, + "screen": { + "density": 2, + "height": 320, + "width": 568 + }, + "timezone": "Asia/Kolkata", + "traits": { + "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", + "name": "Test Name", + "firstName": "Test", + "lastName": "Name", + "createdAt": "2020-09-30T19:11:00.337Z", + "userId": "test_user_id_1", + "email": "test_1@test.com", + "phone": "9876543210", + "key1": "value1" + }, + "userAgent": "unknown" + }, + "event": "Test Event 2", + "integrations": { + "All": true + }, + "messageId": "1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8", + "originalTimestamp": "2020-09-30T19:11:00.337Z", + "receivedAt": "2020-10-01T00:41:11.369+05:30", + "request_ip": "2405:201:8005:9856:7911:25e7:5603:5e18", + "sentAt": "2020-09-30T19:11:10.382Z", + "timestamp": "2020-10-01T00:41:01.324+05:30", + "type": "identify" + }, + "metadata": { + "jobId": 1 + }, + "destination": { + "Config": { + "apiKey": "intercomApiKey", + "appId": "9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0", + "collectContext": false + } + } + }, + { + "message": { + "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", + "channel": "mobile", + "context": { + "app": { + "build": "1.0", + "name": "Test_Example", + "namespace": "com.example.testapp", + "version": "1.0" + }, + "device": { + "id": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", + "manufacturer": "Apple", + "model": "iPhone", + "name": "iPod touch (7th generation)", + "type": "iOS" + }, + "library": { + "name": "test-ios-library", + "version": "1.0.7" + }, + "locale": "en-US", + "network": { + "bluetooth": false, + "carrier": "unavailable", + "cellular": false, + "wifi": true + }, + "os": { + "name": "iOS", + "version": "14.0" + }, + "screen": { + "density": 2, + "height": 320, + "width": 568 + }, + "timezone": "Asia/Kolkata", + "traits": { + "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", + "firstName": "Test", + "lastName": "Name", + "createdAt": "2020-09-30T19:11:00.337Z", + "email": "test_1@test.com", + "phone": "9876543210", + "key1": "value1" + }, + "userAgent": "unknown" + }, + "event": "Test Event 2", + "integrations": { + "All": true + }, + "messageId": "1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8", + "originalTimestamp": "2020-09-30T19:11:00.337Z", + "receivedAt": "2020-10-01T00:41:11.369+05:30", + "request_ip": "2405:201:8005:9856:7911:25e7:5603:5e18", + "sentAt": "2020-09-30T19:11:10.382Z", + "timestamp": "2020-10-01T00:41:01.324+05:30", + "type": "identify" + }, + "metadata": { + "jobId": 2 + }, + "destination": { + "Config": { + "apiKey": "intercomApiKey", + "appId": "9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0", + "collectContext": false + } + } + } + ], + destType: 'intercom', + }, + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + "batchedRequest": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.intercom.io/users", + "headers": { + "Content-Type": "application/json", + "Authorization": "Bearer intercomApiKey", + "Accept": "application/json", + "Intercom-Version": "1.4" + }, + "params": {}, + "body": { + "JSON": { + "email": "test_1@test.com", + "phone": "9876543210", + "name": "Test Name", + "signed_up_at": 1601493060, + "last_seen_user_agent": "unknown", + "update_last_request_at": true, + "user_id": "test_user_id_1", + "custom_attributes": { + "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", + "key1": "value1" + } + }, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33" + }, + "metadata": [ + { + "jobId": 1 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "Config": { + "apiKey": "intercomApiKey", + "appId": "9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0", + "collectContext": false + } + } + }, + { + "batchedRequest": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.intercom.io/users", + "headers": { + "Content-Type": "application/json", + "Authorization": "Bearer intercomApiKey", + "Accept": "application/json", + "Intercom-Version": "1.4" + }, + "params": {}, + "body": { + "JSON": { + "email": "test_1@test.com", + "phone": "9876543210", + "signed_up_at": 1601493060, + "name": "Test Name", + "last_seen_user_agent": "unknown", + "update_last_request_at": true, + "custom_attributes": { + "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", + "key1": "value1" + } + }, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33" + }, + "metadata": [ + { + "jobId": 2 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "Config": { + "apiKey": "intercomApiKey", + "appId": "9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0", + "collectContext": false + } + } + } + ], + }, + }, + }, + }, +]; diff --git a/test/integrations/destinations/marketo/network.ts b/test/integrations/destinations/marketo/network.ts index b0c6174281..b7ae48b23f 100644 --- a/test/integrations/destinations/marketo/network.ts +++ b/test/integrations/destinations/marketo/network.ts @@ -241,4 +241,732 @@ export const networkCallsData = [ statusText: 'OK', }, }, + { + httpReq: { + url: 'https://marketo_acct_id_success.mktorest.com/identity/oauth/token', + method: 'GET', + }, + httpRes: { + data: { + "access_token": "access_token_success", + "expires_in": 3599, + "scope": "integrations@rudderstack.com", + "token_type": "bearer" + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://marketo_acct_id_token_failure.mktorest.com/identity/oauth/token', + method: 'GET', + }, + httpRes: { + data: { + "access_token": "access_token_expired", + "expires_in": 0, + "scope": "integrations@rudderstack.com", + "token_type": "bearer" + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://marketo_acct_id_success.mktorest.com/rest/v1/leads.json', + method: 'get', + }, + httpRes: { + data: { + "requestId": "7ab2#17672a46a99", + "result": [ + { + "id": 4, + "status": "created" + } + ], + "success": true + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://marketo_acct_id_success.mktorest.com/rest/v1/leads.json?filterType=email&filterValues=arnab.compsc%40gmail.com', + method: 'GET', + }, + httpRes: { + data: { + "requestId": "107#17672aeadba", + "result": [], + "success": true + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://marketo_acct_id_success.mktorest.com/rest/v1/leads.json?filterType=userId&filterValues=test-user-6j55yr', + method: 'GET', + }, + httpRes: { + data: { + "requestId": "12093#17672aeaee6", + "result": [ + { + "createdAt": "2020-12-17T21:39:07Z", + "email": null, + "firstName": null, + "id": 4, + "lastName": null, + "updatedAt": "2020-12-17T21:39:07Z", + "userId": "test-user-6j55yr" + } + ], + "success": true + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://marketo_acct_id_failed.mktorest.com/identity/oauth/token', + method: 'GET', + }, + httpRes: { + data: { + "success": false, + "errors": [ + { + "code": "601", + "message": "Access Token Expired" + } + ] + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://munchkinId.mktorest.com/identity/oauth/token?client_id=b&client_secret=clientSecret&grant_type=client_credentials', + method: 'GET', + }, + httpRes: { + data: { + "access_token": "test_acess" + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://munchkinId.mktorest.com/identity/oauth/token?client_id=wrongClientId&client_secret=clientSecret&grant_type=client_credentials', + method: 'GET', + }, + httpRes: { + data: { + "access_token": "test_access_token" + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://munchkinId.mktorest.com/rest/v1/leads/describe2.json', + method: 'GET', + }, + httpRes: { + data: { + "requestId": "7fa1#17fd1da66fe", + "result": [ + { + "name": "API Lead", + "searchableFields": [["email"]], + "fields": [ + { + "name": "email", + "displayName": "Email Address", + "dataType": "email", + "length": 255, + "updateable": true, + "crmManaged": false + } + ] + } + ], + "success": true + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://munchkinId.mktorest.com/bulk/v1/leads.json', + method: 'GET', + }, + httpRes: { + data: { + "requestId": "5bdd#17fd1ff88cd", + "result": [ + { + "batchId": 2977, + "importId": "2977", + "status": "Queued" + } + ], + "success": true + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://a.mktorest.com/identity/oauth/token?client_id=b&client_secret=c&grant_type=client_credentials', + method: 'GET', + }, + httpRes: { + data: { + "access_token": "test_access_token" + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://a.mktorest.com/identity/oauth/token?client_id=b&client_secret=forThrottle&grant_type=client_credentials', + method: 'GET', + }, + httpRes: { + data: { + "access_token": "test_access_token" + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://a.mktorest.com/rest/v1/leads/describe2.json', + method: 'GET', + }, + httpRes: { + data: { + "requestId": "7fa1#17fd1da66fe", + "result": [ + { + "name": "API Lead", + "searchableFields": [["email"]], + "fields": [ + { + "name": "email", + "displayName": "Email Address", + "dataType": "email", + "length": 255, + "updateable": true, + "crmManaged": false + } + ] + } + ], + "success": true + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://testMunchkin4.mktorest.com/identity/oauth/token?client_id=b&client_secret=c&grant_type=client_credentials', + method: 'GET', + }, + httpRes: { + data: { + "access_token": "test_access_token" + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://testMunchkin4.mktorest.com/bulk/v1/leads/batch/1234.json', + method: 'GET', + }, + httpRes: { + data: { + "errors": [ + { + "message": "Any 400 error", + "code": 1000 + } + ] + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://testMunchkin3.mktorest.com/identity/oauth/token?client_id=b&client_secret=c&grant_type=client_credentials', + method: 'GET', + }, + httpRes: { + data: { + "access_token": "test_access_token" + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://testMunchkin500.mktorest.com/identity/oauth/token?client_id=b&client_secret=c&grant_type=client_credentials', + method: 'GET', + }, + httpRes: { + data: { + "access_token": "test_access_token" + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://testMunchkin500.mktorest.com/bulk/v1/leads/batch/1234.json', + method: 'GET', + }, + httpRes: { + data: { + "errors": [ + { + "message": "Any 500 error", + "code": 502 + } + ] + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://a.mktorest.com/bulk/v1/leads/batch/12345/warnings.json', + method: 'GET', + }, + httpRes: { + data: "data \n data", + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://a.mktorest.com/bulk/v1/leads/batch/12345/failures.json', + method: 'GET', + }, + httpRes: { + data: "data \n data", + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://testMunchkin1.mktorest.com/identity/oauth/token?client_id=b&client_secret=c&grant_type=client_credentials', + method: 'GET', + }, + httpRes: { + data: { + "access_token": "access_token_success", + "expires_in": 3599, + "scope": "integrations@rudderstack.com", + "token_type": "bearer" + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://testMunchkin1.mktorest.com/rest/v1/leads/describe2.json', + method: 'GET', + }, + httpRes: { + data: { + "requestId": "7fa1#17fd1da66fe", + "result": [ + { + "name": "API Lead", + "searchableFields": [["email"]], + "fields": [ + { + "name": "email", + "displayName": "Email Address", + "dataType": "email", + "length": 255, + "updateable": true, + "crmManaged": false + } + ] + } + ], + "success": true + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://testMunchkin1.mktorest.com/bulk/v1/leads.json', + method: 'GET', + }, + httpRes: { + data: { + "success": false, + "errors": [ + { + "code": 603 + } + ] + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://testMunchkin2.mktorest.com/identity/oauth/token?client_id=b&client_secret=c&grant_type=client_credentials', + method: 'GET', + }, + httpRes: { + data: { + "access_token": "access_token_success", + "expires_in": 3599, + "scope": "integrations@rudderstack.com", + "token_type": "bearer" + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://testMunchkin2.mktorest.com/rest/v1/leads/describe2.json', + method: 'GET', + }, + httpRes: { + data: { + "requestId": "7fa1#17fd1da66fe", + "result": [ + { + "name": "API Lead", + "searchableFields": [["email"]], + "fields": [ + { + "name": "Email", + "displayName": "Email Address", + "dataType": "email", + "length": 255, + "updateable": true, + "crmManaged": false + } + ] + } + ], + "success": true + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://testMunchkin2.mktorest.com/bulk/v1/leads.json', + method: 'GET', + }, + httpRes: { + data: { + "success": false, + "errors": [ + { + "message": "There are 10 imports currently being processed. Please try again later" + } + ] + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://testMunchkin3.mktorest.com/rest/v1/leads/describe2.json', + method: 'GET', + }, + httpRes: { + data: { + "requestId": "7fa1#17fd1da66fe", + "result": [ + { + "name": "API Lead", + "searchableFields": [["email"]], + "fields": [ + { + "name": "Email", + "displayName": "Email Address", + "dataType": "email", + "length": 255, + "updateable": true, + "crmManaged": false + } + ] + } + ], + "success": true + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://testMunchkin3.mktorest.com/bulk/v1/leads.json', + method: 'GET', + }, + httpRes: { + data: { + "success": false, + "errors": [ + { + "message": "Empty file" + } + ] + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://testMunchkin4.mktorest.com/rest/v1/leads/describe2.json', + method: 'GET', + }, + httpRes: { + data: { + "requestId": "7fa1#17fd1da66fe", + "result": [ + { + "name": "API Lead", + "searchableFields": [["email"]], + "fields": [ + { + "name": "Email", + "displayName": "Email Address", + "dataType": "email", + "length": 255, + "updateable": true, + "crmManaged": false + } + ] + } + ], + "success": true + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://testMunchkin4.mktorest.com/bulk/v1/leads.json', + method: 'GET', + }, + httpRes: { + data: { + "success": false, + "errors": [ + { + "message": "Any other error" + } + ] + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://valid_account_broken_event.mktorest.com/identity/oauth/token', + method: 'GET', + }, + httpRes: { + data: { + "access_token": "access_token_success", + "expires_in": 3599, + "scope": "integrations@rudderstack.com", + "token_type": "bearer" + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://valid_account_broken_event.mktorest.com/rest/v1/leads.json?filterType=email&filterValues=0c7b8b80-9c43-4f8e-b2d2-5e2448a25040@j.mail', + method: 'GET', + }, + httpRes: { + data: { + "requestId": "12093#17672aeaee6", + "result": [], + "success": true + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://valid_account_broken_event.mktorest.com/rest/v1/leads.json', + method: 'GET', + }, + httpRes: { + data: { + "requestId": "142e4#1835b117b76", + "success": false, + "errors": [ + { + "code": "1006", + "message": "Lookup field 'userId' not found" + } + ] + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://unhandled_status_code.mktorest.com/identity/oauth/token', + method: 'GET', + }, + httpRes: { + data: { + "access_token": "access_token_success", + "expires_in": 3599, + "scope": "integrations@rudderstack.com", + "token_type": "bearer" + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://unhandled_status_code.mktorest.com/rest/v1/leads.json?filterType=email&filterValues=0c7b8b80-9c43-4f8e-b2d2-5e2448a25040@j.mail', + method: 'GET', + }, + httpRes: { + data: { + "requestId": "12093#17672aeaee6", + "result": [], + "success": true + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://unhandled_status_code.mktorest.com/rest/v1/leads.json', + method: 'GET', + }, + httpRes: { + data: { + "requestId": "142e4#1835b117b76", + "success": false, + "errors": [ + { + "code": "random_marketo_code", + "message": "some other problem" + } + ] + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://successful_identify_transformation.mktorest.com/identity/oauth/token', + method: 'GET', + }, + httpRes: { + data: { + "access_token": "access_token_success", + "expires_in": 3599, + "scope": "integrations@rudderstack.com", + "token_type": "bearer" + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://successful_identify_transformation.mktorest.com/rest/v1/leads.json', + method: 'GET', + }, + httpRes: { + data: { + "requestId": "7ab2#17672a46a99", + "result": [ + { + "id": 4, + "status": "created" + } + ], + "success": true + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://successful_identify_transformation.mktorest.com/rest/v1/leads.json?filterType=email&filterValues=0c7b8b80-9c43-4f8e-b2d2-5e2448a25040@j.mail', + method: 'GET', + }, + httpRes: { + data: { + "requestId": "12093#17672aeaee6", + "result": [ + { + "createdAt": "2022-09-17T21:39:07Z", + "email": "0c7b8b80-9c43-4f8e-b2d2-5e2448a25040@j.mail", + "firstName": "random_first", + "id": 4, + "lastName": "random_last", + "updatedAt": "2022-09-20T21:48:07Z", + "userId": "test-user-957ue" + } + ], + "success": true + }, + status: 200, + statusText: 'OK', + }, + } ]; diff --git a/test/integrations/destinations/marketo/processor/data.ts b/test/integrations/destinations/marketo/processor/data.ts new file mode 100644 index 0000000000..38201bd60d --- /dev/null +++ b/test/integrations/destinations/marketo/processor/data.ts @@ -0,0 +1,1745 @@ +export const data = [ + { + name: 'marketo', + description: 'Test 0', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'sources', + context: { + externalId: [ + { + id: 'lynnanderson@smith.net', + identifierType: 'email', + type: 'MARKETO-new_user', + }, + ], + mappedToDestination: 'true', + sources: { + batch_id: 'f5f240d0-0acb-46e0-b043-57fb0aabbadd', + job_id: '1zAj94bEy8komdqnYtSoDp0VmGs/Syncher', + job_run_id: 'c5tar6cqgmgmcjvupdhg', + task_id: 'tt_10_rows_check', + task_run_id: 'c5tar6cqgmgmcjvupdi0', + version: 'release.v1.6.8', + }, + }, + messageId: '2f052f7c-f694-4849-a7ed-a432f7ffa0a4', + originalTimestamp: '2021-10-28T14:03:50.503Z', + receivedAt: '2021-10-28T14:03:46.567Z', + recordId: '8', + request_ip: '10.1.94.92', + rudderId: 'c0f6843e-e3d6-4946-9752-fa339fbadef2', + sentAt: '2021-10-28T14:03:50.503Z', + timestamp: '2021-10-28T14:03:46.566Z', + traits: { + marketoGUID: '23', + administrative_unit: 'Minnesota', + am_pm: 'AM', + boolean: true, + firstname: 'Jacqueline', + pPower: 'AM', + userId: 'Jacqueline', + }, + type: 'identify', + userId: 'lynnanderson@smith.net', + }, + destination: { + ID: '1zia9wKshXt80YksLmUdJnr7IHI', + Name: 'test_marketo', + DestinationDefinition: { + ID: '1iVQvTRMsPPyJzwol0ifH93QTQ6', + Name: 'MARKETO', + DisplayName: 'Marketo', + Config: { + destConfig: { + defaultConfig: [], + }, + excludeKeys: [], + includeKeys: [], + saveDestinationResponse: true, + secretKeys: [], + supportedMessageTypes: ['identify', 'page', 'screen', 'track'], + supportedSourceTypes: [ + 'android', + 'ios', + 'web', + 'unity', + 'amp', + 'cloud', + 'warehouse', + 'reactnative', + 'flutter', + 'cordova', + ], + supportsVisualMapper: true, + transformAt: 'processor', + transformAtV1: 'processor', + }, + ResponseRules: null, + }, + Config: { + clientId: 'marketo_client_id_success', + clientSecret: 'marketo_client_secret_success', + accountId: 'marketo_acct_id_success', + rudderEventsMapping: [], + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + libraries: [], + request: { + query: {}, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + userId: '', + method: 'POST', + endpoint: + 'https://marketo_acct_id_success.mktorest.com/rest/v1/customobjects/new_user.json', + headers: { + Authorization: 'Bearer access_token_success', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + action: 'createOrUpdate', + dedupeBy: 'dedupeFields', + input: [ + { + administrative_unit: 'Minnesota', + am_pm: 'AM', + boolean: true, + firstname: 'Jacqueline', + pPower: 'AM', + userId: 'Jacqueline', + email: 'lynnanderson@smith.net', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'marketo', + description: 'Test 1', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'anon_id_success', + channel: 'mobile', + context: { + app: { + build: '1', + name: 'TestAppName', + namespace: 'com.android.sample', + version: '1.0', + }, + device: { + id: 'anon_id_success', + manufacturer: 'Google', + model: 'Android SDK built for x86', + name: 'generic_x86', + type: 'android', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.1-beta.1', + }, + locale: 'en-US', + network: { + carrier: 'Android', + bluetooth: false, + cellular: true, + wifi: true, + }, + os: { + name: 'Android', + version: '8.1.0', + }, + screen: { + density: 420, + height: 1794, + width: 1080, + }, + timezone: 'Asia/Kolkata', + traits: { + anonymousId: 'anon_id_success', + }, + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)', + }, + event: 'Product Clicked', + integrations: { + All: true, + }, + messageId: 'id1', + properties: { + name: 'Test Product', + }, + originalTimestamp: '2020-12-17T21:00:59.176Z', + type: 'track', + sentAt: '2020-03-12T09:05:03.421Z', + }, + destination: { + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + Config: { + accountId: 'marketo_acct_id_success', + clientId: 'marketo_client_id_success', + clientSecret: 'marketo_client_secret_success', + trackAnonymousEvents: true, + customActivityPropertyMap: [ + { + from: 'name', + to: 'productName', + }, + ], + leadTraitMapping: [ + { + from: 'leadScore', + to: 'customLeadScore', + }, + ], + createIfNotExist: true, + customActivityPrimaryKeyMap: [ + { + from: 'Product Clicked', + to: 'name', + }, + ], + customActivityEventMap: [ + { + from: 'Product Clicked', + to: '100001', + }, + ], + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + userId: '', + method: 'POST', + endpoint: + 'https://marketo_acct_id_success.mktorest.com/rest/v1/activities/external.json', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer access_token_success', + }, + params: {}, + body: { + JSON: { + input: [ + { + activityDate: '2020-12-17T21:00:59.176Z', + activityTypeId: 100001, + attributes: [], + leadId: 4, + primaryAttributeValue: 'Test Product', + }, + ], + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'marketo', + description: 'Test 2', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'anon_id_success', + channel: 'mobile', + context: { + app: { + build: '1', + name: 'TestAppName', + namespace: 'com.android.sample', + version: '1.0', + }, + device: { + id: 'anon_id_success', + manufacturer: 'Google', + model: 'Android SDK built for x86', + name: 'generic_x86', + type: 'android', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.1-beta.1', + }, + locale: 'en-US', + network: { + carrier: 'Android', + bluetooth: false, + cellular: true, + wifi: true, + }, + os: { + name: 'Android', + version: '8.1.0', + }, + screen: { + density: 420, + height: 1794, + width: 1080, + }, + timezone: 'Asia/Kolkata', + traits: { + anonymousId: 'anon_id_success', + }, + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)', + }, + event: 'Product Clicked', + integrations: { + All: true, + }, + messageId: 'id1', + properties: { + name: 'Test Product', + product_id: 'prod_1', + }, + originalTimestamp: '2020-12-17T21:00:59.176Z', + type: 'track', + sentAt: '2020-12-17T21:00:59.176Z', + }, + destination: { + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + Config: { + accountId: 'marketo_acct_id_success', + clientId: 'marketo_client_id_success', + clientSecret: 'marketo_client_secret_success', + trackAnonymousEvents: true, + customActivityPropertyMap: [ + { + from: 'name', + to: 'productName', + }, + { + from: 'product_id', + to: 'productId', + }, + ], + leadTraitMapping: [ + { + from: 'leadScore', + to: 'customLeadScore', + }, + ], + createIfNotExist: true, + rudderEventsMapping: [ + { + event: 'Product Clicked', + marketoPrimarykey: 'name', + marketoActivityId: '100001', + }, + ], + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + userId: '', + method: 'POST', + endpoint: + 'https://marketo_acct_id_success.mktorest.com/rest/v1/activities/external.json', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer access_token_success', + }, + params: {}, + body: { + JSON: { + input: [ + { + activityDate: '2020-12-17T21:00:59.176Z', + activityTypeId: 100001, + attributes: [ + { + name: 'productId', + value: 'prod_1', + }, + ], + leadId: 4, + primaryAttributeValue: 'Test Product', + }, + ], + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'marketo', + description: 'Test 3', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'anon_id_success', + channel: 'mobile', + context: { + app: { + build: '1', + name: 'TestAppName', + namespace: 'com.android.sample', + version: '1.0', + }, + device: { + id: 'anon_id_success', + manufacturer: 'Google', + model: 'Android SDK built for x86', + name: 'generic_x86', + type: 'android', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.1-beta.1', + }, + locale: 'en-US', + network: { + carrier: 'Android', + bluetooth: false, + cellular: true, + wifi: true, + }, + os: { + name: 'Android', + version: '8.1.0', + }, + screen: { + density: 420, + height: 1794, + width: 1080, + }, + timezone: 'Asia/Kolkata', + traits: { + anonymousId: 'anon_id_success', + }, + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)', + }, + event: 'Product Clicked', + integrations: { + All: true, + }, + messageId: 'id1', + properties: { + name: 'Test Product', + }, + originalTimestamp: '2020-12-17T21:00:59.176Z', + userId: 'user_id_success', + type: 'track', + sentAt: '2020-03-12T09:05:03.421Z', + }, + destination: { + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + Config: { + accountId: 'marketo_acct_id_success', + clientId: 'marketo_client_id_success', + clientSecret: 'marketo_client_secret_success', + trackAnonymousEvents: false, + customActivityPropertyMap: [ + { + from: 'name', + to: 'productName', + }, + ], + leadTraitMapping: [ + { + from: 'leadScore', + to: 'customLeadScore', + }, + ], + createIfNotExist: true, + rudderEventsMapping: [ + { + event: 'Product Clicked', + marketoPrimarykey: 'name', + marketoActivityId: '100001', + }, + ], + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + userId: '', + method: 'POST', + endpoint: + 'https://marketo_acct_id_success.mktorest.com/rest/v1/activities/external.json', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer access_token_success', + }, + params: {}, + body: { + JSON: { + input: [ + { + activityDate: '2020-12-17T21:00:59.176Z', + activityTypeId: 100001, + attributes: [], + leadId: 4, + primaryAttributeValue: 'Test Product', + }, + ], + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'marketo', + description: 'Test 4: ERROR - Request Failed for marketo, Access Token Expired', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'anon_id_success', + channel: 'mobile', + context: { + traits: { + anonymousId: 'anon_id_success', + }, + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)', + }, + event: 'Product Clicked', + integrations: { + All: true, + }, + messageId: 'id1', + properties: { + name: 'Test Product', + }, + originalTimestamp: '2020-12-17T21:00:59.176Z', + userId: 'user_id_success', + type: 'track', + sentAt: '2020-03-12T09:05:03.421Z', + }, + destination: { + ID: '1mMy5cqbtfuaKZv1IhVQKnBerte', + Config: { + accountId: 'marketo_acct_id_token_failure', + clientId: 'marketo_acct_id_token_failure', + clientSecret: 'marketo_acct_id_token_failure', + trackAnonymousEvents: false, + customActivityPropertyMap: [ + { + from: 'name', + to: 'productName', + }, + ], + leadTraitMapping: [ + { + from: 'leadScore', + to: 'customLeadScore', + }, + ], + createIfNotExist: true, + rudderEventsMapping: [ + { + event: 'Product Clicked', + marketoPrimarykey: 'name', + marketoActivityId: '100001', + }, + ], + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 500, + error: + '{"message":"Request Failed for marketo, Access Token Expired (Retryable).During fetching auth token","destinationResponse":{"access_token":"access_token_expired","expires_in":0,"scope":"integrations@rudderstack.com","token_type":"bearer"}}', + statTags: { + errorCategory: 'network', + errorType: 'retryable', + destType: 'MARKETO', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'marketo', + description: 'Test 5: ERROR - Request Failed for marketo, Access Token Expired', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'anon_id_success', + channel: 'mobile', + context: { + app: { + build: '1', + name: 'TestAppName', + namespace: 'com.android.sample', + version: '1.0', + }, + device: { + id: 'anon_id_success', + manufacturer: 'Google', + model: 'Android SDK built for x86', + name: 'generic_x86', + type: 'android', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.1-beta.1', + }, + locale: 'en-US', + network: { + carrier: 'Android', + bluetooth: false, + cellular: true, + wifi: true, + }, + os: { + name: 'Android', + version: '8.1.0', + }, + screen: { + density: 420, + height: 1794, + width: 1080, + }, + timezone: 'Asia/Kolkata', + traits: { + anonymousId: 'anon_id_success', + }, + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)', + }, + event: 'Product Clicked', + integrations: { + All: true, + }, + messageId: 'id1', + properties: { + name: 'Test Product', + }, + originalTimestamp: '2020-12-17T21:00:59.176Z', + userId: 'user_id_success', + type: 'track', + sentAt: '2020-03-12T09:05:03.421Z', + }, + destination: { + ID: '1mMy5cqbtfuaKZv1IhVQKnBerte', + Config: { + accountId: 'marketo_acct_id_failed', + clientId: 'marketo_client_id_success', + clientSecret: 'marketo_client_secret_success', + trackAnonymousEvents: false, + customActivityPropertyMap: [ + { + from: 'name', + to: 'productName', + }, + ], + leadTraitMapping: [ + { + from: 'leadScore', + to: 'customLeadScore', + }, + ], + createIfNotExist: true, + rudderEventsMapping: [ + { + event: 'Product Clicked', + marketoPrimarykey: 'name', + marketoActivityId: '100001', + }, + ], + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 500, + error: + '{"message":"Request Failed for marketo, Access Token Expired (Retryable).During fetching auth token","destinationResponse":{"response":{"success":false,"errors":[{"code":"601","message":"Access Token Expired"}]},"status":200}}', + statTags: { + errorCategory: 'network', + errorType: 'retryable', + destType: 'MARKETO', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'marketo', + description: 'Test 6: ERROR - Invalid traits value for Marketo', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + type: 'identify', + messageId: '84e26acc-56a5-4835-8233-591137fca468', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: '00000000000000000000000000', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + Config: { + accountId: 'marketo_acct_id_success', + clientId: 'marketo_client_id_success', + clientSecret: 'marketo_client_secret_success', + trackAnonymousEvents: true, + customActivityPropertyMap: [ + { + from: 'name', + to: 'productName', + }, + { + from: 'product_id', + to: 'productId', + }, + ], + leadTraitMapping: [ + { + from: 'leadScore', + to: 'customLeadScore', + }, + ], + createIfNotExist: true, + rudderEventsMapping: [ + { + event: 'Product Clicked', + marketoPrimarykey: 'name', + marketoActivityId: '100001', + }, + ], + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: 'Invalid traits value for Marketo', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'MARKETO', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'marketo', + description: 'Test 7: ERROR - Anonymous event tracking is turned off and invalid userId', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'anon_id_success', + channel: 'mobile', + context: { + app: { + build: '1', + name: 'TestAppName', + namespace: 'com.android.sample', + version: '1.0', + }, + device: { + id: 'anon_id_success', + manufacturer: 'Google', + model: 'Android SDK built for x86', + name: 'generic_x86', + type: 'android', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.1-beta.1', + }, + locale: 'en-US', + network: { + carrier: 'Android', + bluetooth: false, + cellular: true, + wifi: true, + }, + os: { + name: 'Android', + version: '8.1.0', + }, + screen: { + density: 420, + height: 1794, + width: 1080, + }, + timezone: 'Asia/Kolkata', + traits: { + anonymousId: 'anon_id_success', + }, + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)', + }, + event: 'Product Clicked', + integrations: { + All: true, + }, + messageId: 'id1', + properties: { + name: 'Test Product', + }, + originalTimestamp: '2020-12-17T21:00:59.176Z', + type: 'track', + sentAt: '2020-03-12T09:05:03.421Z', + }, + destination: { + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + Config: { + accountId: 'marketo_acct_id_success', + clientId: 'marketo_client_id_success', + clientSecret: 'marketo_client_secret_success', + trackAnonymousEvents: false, + customActivityPropertyMap: [ + { + from: 'name', + to: 'productName', + }, + ], + leadTraitMapping: [ + { + from: 'leadScore', + to: 'customLeadScore', + }, + ], + createIfNotExist: true, + rudderEventsMapping: [ + { + event: 'Product Clicked', + marketoPrimarykey: 'name', + marketoActivityId: '100001', + }, + ], + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: 'Anonymous event tracking is turned off and invalid userId', + statTags: { + errorCategory: 'dataValidation', + errorType: 'configuration', + destType: 'MARKETO', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'marketo', + description: 'Test 8: ERROR - Event is not mapped to Custom Activity', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'anon_id_success', + channel: 'mobile', + context: { + app: { + build: '1', + name: 'TestAppName', + namespace: 'com.android.sample', + version: '1.0', + }, + device: { + id: 'anon_id_success', + manufacturer: 'Google', + model: 'Android SDK built for x86', + name: 'generic_x86', + type: 'android', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.1-beta.1', + }, + locale: 'en-US', + network: { + carrier: 'Android', + bluetooth: false, + cellular: true, + wifi: true, + }, + os: { + name: 'Android', + version: '8.1.0', + }, + screen: { + density: 420, + height: 1794, + width: 1080, + }, + timezone: 'Asia/Kolkata', + traits: { + anonymousId: 'anon_id_success', + }, + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)', + }, + event: 'Product Purchased', + integrations: { + All: true, + }, + messageId: 'id1', + properties: { + name: 'Test Product', + }, + originalTimestamp: '2020-12-17T21:00:59.176Z', + type: 'track', + sentAt: '2020-03-12T09:05:03.421Z', + }, + destination: { + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + Config: { + accountId: 'marketo_acct_id_success', + clientId: 'marketo_client_id_success', + clientSecret: 'marketo_client_secret_success', + trackAnonymousEvents: true, + customActivityPropertyMap: [ + { + from: 'name', + to: 'productName', + }, + ], + leadTraitMapping: [ + { + from: 'leadScore', + to: 'customLeadScore', + }, + ], + createIfNotExist: true, + rudderEventsMapping: [ + { + event: 'Product Clicked', + marketoPrimarykey: 'name', + marketoActivityId: '100001', + }, + ], + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: 'Event is not mapped to Custom Activity', + statTags: { + errorCategory: 'dataValidation', + errorType: 'configuration', + destType: 'MARKETO', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'marketo', + description: 'Test 9: ERROR - Primary Key value is invalid for the event', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'anon_id_success', + channel: 'mobile', + context: { + app: { + build: '1', + name: 'TestAppName', + namespace: 'com.android.sample', + version: '1.0', + }, + device: { + id: 'anon_id_success', + manufacturer: 'Google', + model: 'Android SDK built for x86', + name: 'generic_x86', + type: 'android', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.1-beta.1', + }, + locale: 'en-US', + network: { + carrier: 'Android', + bluetooth: false, + cellular: true, + wifi: true, + }, + os: { + name: 'Android', + version: '8.1.0', + }, + screen: { + density: 420, + height: 1794, + width: 1080, + }, + timezone: 'Asia/Kolkata', + traits: { + anonymousId: 'anon_id_success', + }, + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)', + }, + event: 'Product Clicked', + integrations: { + All: true, + }, + messageId: 'id1', + properties: { + product_name: 'Test Product', + }, + originalTimestamp: '2020-12-17T21:00:59.176Z', + type: 'track', + sentAt: '2020-03-12T09:05:03.421Z', + }, + destination: { + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + Config: { + accountId: 'marketo_acct_id_success', + clientId: 'marketo_client_id_success', + clientSecret: 'marketo_client_secret_success', + trackAnonymousEvents: true, + customActivityPropertyMap: [ + { + from: 'name', + to: 'productName', + }, + ], + leadTraitMapping: [ + { + from: 'leadScore', + to: 'customLeadScore', + }, + ], + createIfNotExist: true, + rudderEventsMapping: [ + { + event: 'Product Clicked', + marketoPrimarykey: 'name', + marketoActivityId: '100001', + }, + ], + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: 'Primary Key value is invalid for the event', + statTags: { + errorCategory: 'dataValidation', + errorType: 'configuration', + destType: 'MARKETO', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'marketo', + description: 'Test 10: ERROR - Message Type is not present. Aborting message.', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'anon_id_success', + channel: 'mobile', + context: { + app: { + build: '1', + name: 'TestAppName', + namespace: 'com.android.sample', + version: '1.0', + }, + device: { + id: 'anon_id_success', + manufacturer: 'Google', + model: 'Android SDK built for x86', + name: 'generic_x86', + type: 'android', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.1-beta.1', + }, + locale: 'en-US', + network: { + carrier: 'Android', + bluetooth: false, + cellular: true, + wifi: true, + }, + os: { + name: 'Android', + version: '8.1.0', + }, + screen: { + density: 420, + height: 1794, + width: 1080, + }, + timezone: 'Asia/Kolkata', + traits: { + anonymousId: 'anon_id_success', + }, + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)', + }, + event: 'Product Clicked', + integrations: { + All: true, + }, + messageId: 'id1', + properties: { + product_name: 'Test Product', + }, + originalTimestamp: '2020-12-17T21:00:59.176Z', + sentAt: '2020-03-12T09:05:03.421Z', + }, + destination: { + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + Config: { + accountId: 'marketo_acct_id_success', + clientId: 'marketo_client_id_success', + clientSecret: 'marketo_client_secret_success', + trackAnonymousEvents: true, + customActivityPropertyMap: [ + { + from: 'name', + to: 'productName', + }, + ], + leadTraitMapping: [ + { + from: 'leadScore', + to: 'customLeadScore', + }, + ], + createIfNotExist: true, + rudderEventsMapping: [ + { + event: 'Product Clicked', + marketoPrimarykey: 'name', + marketoActivityId: '100001', + }, + ], + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: 'Message Type is not present. Aborting message.', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'MARKETO', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'marketo', + description: 'Test 11: ERROR - Message type not supported', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'anon_id_success', + channel: 'mobile', + context: { + app: { + build: '1', + name: 'TestAppName', + namespace: 'com.android.sample', + version: '1.0', + }, + device: { + id: 'anon_id_success', + manufacturer: 'Google', + model: 'Android SDK built for x86', + name: 'generic_x86', + type: 'android', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.1-beta.1', + }, + locale: 'en-US', + network: { + carrier: 'Android', + bluetooth: false, + cellular: true, + wifi: true, + }, + os: { + name: 'Android', + version: '8.1.0', + }, + screen: { + density: 420, + height: 1794, + width: 1080, + }, + timezone: 'Asia/Kolkata', + traits: { + anonymousId: 'anon_id_success', + }, + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)', + }, + event: 'Product Clicked', + integrations: { + All: true, + }, + messageId: 'id1', + properties: { + product_name: 'Test Product', + }, + originalTimestamp: '2020-12-17T21:00:59.176Z', + type: 'screen', + sentAt: '2020-03-12T09:05:03.421Z', + }, + destination: { + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + Config: { + accountId: 'marketo_acct_id_success', + clientId: 'marketo_client_id_success', + clientSecret: 'marketo_client_secret_success', + trackAnonymousEvents: true, + customActivityPropertyMap: [ + { + from: 'name', + to: 'productName', + }, + ], + leadTraitMapping: [ + { + from: 'leadScore', + to: 'customLeadScore', + }, + ], + createIfNotExist: true, + rudderEventsMapping: [ + { + event: 'Product Clicked', + marketoPrimarykey: 'name', + marketoActivityId: '100001', + }, + ], + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: 'Message type not supported', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'MARKETO', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'marketo', + description: 'Test 12', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + type: 'identify', + messageId: '84e26acc-56a5-4835-8233-591137fca468', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: '00000000000000000000000000', + integrations: { + All: true, + }, + traits: { + score: '0.5', + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + Config: { + accountId: 'marketo_acct_id_success', + clientId: 'marketo_client_id_success', + clientSecret: 'marketo_client_secret_success', + trackAnonymousEvents: true, + customActivityPropertyMap: [ + { + from: 'name', + to: 'productName', + }, + { + from: 'product_id', + to: 'productId', + }, + ], + leadTraitMapping: [ + { + from: 'score', + to: 'customLeadScore', + }, + ], + rudderEventsMapping: [ + { + event: 'Product Clicked', + marketoPrimarykey: 'name', + marketoActivityId: '100001', + }, + ], + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + userId: '', + method: 'POST', + endpoint: 'https://marketo_acct_id_success.mktorest.com/rest/v1/leads.json', + headers: { + Authorization: 'Bearer access_token_success', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + action: 'createOrUpdate', + input: [ + { + customLeadScore: '0.5', + id: 4, + }, + ], + lookupField: 'id', + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'marketo', + description: 'Test 13', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'sources', + context: { + externalId: [ + { + id: 'lynnanderson@smith.net', + identifierType: 'email', + type: 'MARKETO-new_user', + }, + ], + traits: { + marketoGUID: '23', + administrative_unit: 'Minnesota', + am_pm: 'AM', + boolean: true, + firstname: 'Jacqueline', + pPower: 'AM', + userId: 'Jacqueline', + }, + sources: { + batch_id: 'f5f240d0-0acb-46e0-b043-57fb0aabbadd', + job_id: '1zAj94bEy8komdqnYtSoDp0VmGs/Syncher', + job_run_id: 'c5tar6cqgmgmcjvupdhg', + task_id: 'tt_10_rows_check', + task_run_id: 'c5tar6cqgmgmcjvupdi0', + version: 'release.v1.6.8', + }, + }, + messageId: '2f052f7c-f694-4849-a7ed-a432f7ffa0a4', + originalTimestamp: '2021-10-28T14:03:50.503Z', + receivedAt: '2021-10-28T14:03:46.567Z', + recordId: '8', + request_ip: '10.1.94.92', + rudderId: 'c0f6843e-e3d6-4946-9752-fa339fbadef2', + sentAt: '2021-10-28T14:03:50.503Z', + timestamp: '2021-10-28T14:03:46.566Z', + type: 'identify', + userId: 'dummyMail@dummyDomain.com', + }, + destination: { + ID: '1zia9wKshXt80YksLmUdJnr7IHI', + Name: 'test_marketo', + DestinationDefinition: { + ID: '1iVQvTRMsPPyJzwol0ifH93QTQ6', + Name: 'MARKETO', + DisplayName: 'Marketo', + Config: { + destConfig: { + defaultConfig: [], + }, + excludeKeys: [], + includeKeys: [], + saveDestinationResponse: true, + secretKeys: [], + supportedMessageTypes: ['identify', 'page', 'screen', 'track'], + supportedSourceTypes: [ + 'android', + 'ios', + 'web', + 'unity', + 'amp', + 'cloud', + 'warehouse', + 'reactnative', + 'flutter', + 'cordova', + ], + supportsVisualMapper: true, + transformAt: 'processor', + transformAtV1: 'processor', + }, + ResponseRules: null, + }, + Config: { + clientId: 'marketo_client_id_success', + clientSecret: 'marketo_client_secret_success', + accountId: 'marketo_acct_id_success', + rudderEventsMapping: [], + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + libraries: [], + request: { + query: {}, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + userId: '', + method: 'POST', + endpoint: 'https://marketo_acct_id_success.mktorest.com/rest/v1/leads.json', + headers: { + Authorization: 'Bearer access_token_success', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + action: 'createOrUpdate', + input: [{ id: 4, userId: 'dummyMail@dummyDomain.com' }], + lookupField: 'id', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + statusCode: 200, + }, + ], + }, + }, + }, +]; diff --git a/test/integrations/destinations/marketo/router/data.ts b/test/integrations/destinations/marketo/router/data.ts new file mode 100644 index 0000000000..327f470627 --- /dev/null +++ b/test/integrations/destinations/marketo/router/data.ts @@ -0,0 +1,2140 @@ +export const data = [ + { + name: 'marketo', + description: 'Test 0', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + "message": { + "anonymousId": "anon_id_success", + "channel": "mobile", + "context": { + "app": { + "build": "1", + "name": "TestAppName", + "namespace": "com.android.sample", + "version": "1.0" + }, + "device": { + "id": "anon_id_success", + "manufacturer": "Google", + "model": "Android SDK built for x86", + "name": "generic_x86", + "type": "android" + }, + "library": { + "name": "com.rudderstack.android.sdk.core", + "version": "1.0.1-beta.1" + }, + "locale": "en-US", + "network": { + "carrier": "Android", + "bluetooth": false, + "cellular": true, + "wifi": true + }, + "os": { + "name": "Android", + "version": "8.1.0" + }, + "screen": { + "density": 420, + "height": 1794, + "width": 1080 + }, + "timezone": "Asia/Kolkata", + "traits": { + "anonymousId": "anon_id_success" + }, + "userAgent": "Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)" + }, + "event": "Product Clicked", + "integrations": { + "All": true + }, + "messageId": "id1", + "properties": { + "name": "Test Product" + }, + "originalTimestamp": "2020-12-17T21:00:59.176Z", + "type": "track", + "sentAt": "2020-03-12T09:05:03.421Z" + }, + "metadata": { + "jobId": 1 + }, + "destination": { + "Config": { + "accountId": "marketo_acct_id_success", + "clientId": "marketo_client_id_success", + "clientSecret": "marketo_client_secret_success", + "trackAnonymousEvents": true, + "customActivityPropertyMap": [ + { + "from": "name", + "to": "productName" + } + ], + "leadTraitMapping": [ + { + "from": "leadScore", + "to": "customLeadScore" + } + ], + "rudderEventsMapping": [ + { + "event": "Product Clicked", + "marketoPrimarykey": "name", + "marketoActivityId": "100001" + } + ] + }, + "secretConfig": {}, + "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", + "name": "Marketo", + "enabled": true, + "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", + "deleted": false, + "createdAt": "2020-12-30T08:39:32.005Z", + "updatedAt": "2021-02-03T16:22:31.374Z", + "destinationDefinition": { + "config": { + "destConfig": { + "defaultConfig": [ + "accountId", + "clientId", + "clientSecret", + "trackAnonymousEvents", + "rudderEventsMapping", + "customActivityPropertyMap", + "leadTraitMapping" + ] + }, + "secretKeys": [ + "clientSecret" + ], + "excludeKeys": [], + "includeKeys": [], + "routerTransform": true, + "supportedSourceTypes": [ + "android", + "ios", + "web", + "unity", + "amp", + "cloud", + "reactnative" + ] + }, + "responseRules": { + "responseType": "JSON", + "rules": { + "retryable": [ + { + "success": "false", + "errors.0.code": 600 + }, + { + "success": "false", + "errors.0.code": 601 + }, + { + "success": "false", + "errors.0.code": 602 + }, + { + "success": "false", + "errors.0.code": 604 + }, + { + "success": "false", + "errors.0.code": 606 + }, + { + "success": "false", + "errors.0.code": 607 + }, + { + "success": "false", + "errors.0.code": 608 + }, + { + "success": "false", + "errors.0.code": 611 + } + ], + "abortable": [ + { + "success": "false", + "errors.0.code": 603 + }, + { + "success": "false", + "errors.0.code": 605 + }, + { + "success": "false", + "errors.0.code": 609 + }, + { + "success": "false", + "errors.0.code": 610 + } + ] + } + }, + "id": "1aIXqM806xAVm92nx07YwKbRrO9", + "name": "MARKETO", + "displayName": "Marketo", + "createdAt": "2020-04-09T09:24:31.794Z", + "updatedAt": "2021-01-11T11:03:28.103Z" + }, + "transformations": [], + "isConnectionEnabled": true, + "isProcessorEnabled": true + } + }, + { + "message": { + "anonymousId": "anon_id_success", + "channel": "mobile", + "context": { + "app": { + "build": "1", + "name": "TestAppName", + "namespace": "com.android.sample", + "version": "1.0" + }, + "device": { + "id": "anon_id_success", + "manufacturer": "Google", + "model": "Android SDK built for x86", + "name": "generic_x86", + "type": "android" + }, + "library": { + "name": "com.rudderstack.android.sdk.core", + "version": "1.0.1-beta.1" + }, + "locale": "en-US", + "network": { + "carrier": "Android", + "bluetooth": false, + "cellular": true, + "wifi": true + }, + "os": { + "name": "Android", + "version": "8.1.0" + }, + "screen": { + "density": 420, + "height": 1794, + "width": 1080 + }, + "timezone": "Asia/Kolkata", + "traits": { + "anonymousId": "anon_id_success" + }, + "userAgent": "Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)" + }, + "event": "Product Clicked", + "integrations": { + "All": true + }, + "messageId": "id1", + "properties": { + "name": "Test Product", + "product_id": "prod_1" + }, + "originalTimestamp": "2020-12-17T21:00:59.176Z", + "type": "track", + "sentAt": "2020-12-17T21:00:59.176Z" + }, + "metadata": { + "jobId": 2 + }, + "destination": { + "Config": { + "accountId": "marketo_acct_id_success", + "clientId": "marketo_client_id_success", + "clientSecret": "marketo_client_secret_success", + "trackAnonymousEvents": true, + "customActivityPropertyMap": [ + { + "from": "name", + "to": "productName" + } + ], + "leadTraitMapping": [ + { + "from": "leadScore", + "to": "customLeadScore" + } + ], + "rudderEventsMapping": [ + { + "event": "Product Clicked", + "marketoPrimarykey": "name", + "marketoActivityId": "100001" + } + ] + }, + "secretConfig": {}, + "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", + "name": "Marketo", + "enabled": true, + "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", + "deleted": false, + "createdAt": "2020-12-30T08:39:32.005Z", + "updatedAt": "2021-02-03T16:22:31.374Z", + "destinationDefinition": { + "config": { + "destConfig": { + "defaultConfig": [ + "accountId", + "clientId", + "clientSecret", + "trackAnonymousEvents", + "rudderEventsMapping", + "customActivityPropertyMap", + "leadTraitMapping" + ] + }, + "secretKeys": [ + "clientSecret" + ], + "excludeKeys": [], + "includeKeys": [], + "routerTransform": true, + "supportedSourceTypes": [ + "android", + "ios", + "web", + "unity", + "amp", + "cloud", + "reactnative" + ] + }, + "responseRules": { + "responseType": "JSON", + "rules": { + "retryable": [ + { + "success": "false", + "errors.0.code": 600 + }, + { + "success": "false", + "errors.0.code": 601 + }, + { + "success": "false", + "errors.0.code": 602 + }, + { + "success": "false", + "errors.0.code": 604 + }, + { + "success": "false", + "errors.0.code": 606 + }, + { + "success": "false", + "errors.0.code": 607 + }, + { + "success": "false", + "errors.0.code": 608 + }, + { + "success": "false", + "errors.0.code": 611 + } + ], + "abortable": [ + { + "success": "false", + "errors.0.code": 603 + }, + { + "success": "false", + "errors.0.code": 605 + }, + { + "success": "false", + "errors.0.code": 609 + }, + { + "success": "false", + "errors.0.code": 610 + } + ] + } + }, + "id": "1aIXqM806xAVm92nx07YwKbRrO9", + "name": "MARKETO", + "displayName": "Marketo", + "createdAt": "2020-04-09T09:24:31.794Z", + "updatedAt": "2021-01-11T11:03:28.103Z" + }, + "transformations": [], + "isConnectionEnabled": true, + "isProcessorEnabled": true + } + }, + { + "message": { + "type": "identify", + "sentAt": "2022-09-19T10:34:02.002Z", + "userId": "e17c5a5e-5e2f-430b-b497-fe3f1ea3a704", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "2.12.1", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "https://accounts.app.t2.broken.com/home", + "path": "/home", + "title": "Home", + "search": "", + "tab_url": "https://accounts.app.t2.broken.com/home", + "referrer": "https://ts50-cvii.core.broken.org/", + "initial_referrer": "https://ts50-cvii.core.broken.org/", + "referring_domain": "ts50-cvii.core.broken.org", + "initial_referring_domain": "ts50-cvii.core.broken.org" + }, + "locale": "en-IN", + "screen": { + "width": 1728, + "height": 1117, + "density": 2, + "innerWidth": 1728, + "innerHeight": 969 + }, + "traits": { + "name": "AM", + "email": "0c7b8b80-9c43-4f8e-b2d2-5e2448a25040@j.mail", + "lastName": "M", + "firstName": "A", + "accountName": "MACDEV", + "billingName": "g g", + "companyName": "macDev", + "currentTier": "Webinar Pro 250", + "billingCycle": "Annually", + "lastBillingDate": "2022-06-29T09:40:42.000Z", + "nextBillingDate": "2023-09-09T04:00:00.000Z", + "subscriptionType": "Webinar Pro 250", + "subscriptionStatus": "ACTIVE", + "lastWebinarEventDate": "2022-09-15T20:00:00.000Z", + "nextWebinarEventDate": "2022-09-16T06:15:00.000Z" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "2.12.1" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36" + }, + "rudderId": "73dc83ef-587f-4077-90f3-c36083e64019", + "messageId": "1663583642000200-e3f31c4c-6361-4f99-b643-7755303a6007", + "timestamp": "2022-09-19T10:34:02.954Z", + "receivedAt": "2022-09-19T10:34:02.956Z", + "request_ip": "11.105.44.120", + "anonymousId": "0c7b8b80-9c43-4f8e-b2d2-5e2448a25040", + "integrations": { + "All": true + }, + "originalTimestamp": "2022-09-19T10:34:02.000Z" + }, + "destination": { + "Config": { + "accountId": "valid_account_broken_event", + "clientId": "504300cd-76b2-a7l4-bhle-90a07420nx73", + "clientSecret": "3l3gJpzRsZagD6gu7tnTeKXz0bomLGnd", + "trackAnonymousEvents": false, + "createIfNotExist": true, + "rudderEventsMapping": [ + { + "event": "acq_signup_completed", + "marketoActivityId": "100026" + }, + { + "event": "act_createwebinarform_submit", + "marketoActivityId": "100025" + }, + { + "event": "act_presentation_style", + "marketoActivityId": "100025" + }, + { + "event": "act_webinar_view", + "marketoActivityId": "100025" + }, + { + "event": "act_webinar_join", + "marketoActivityId": "100025" + }, + { + "event": "act_presentation_addteammember", + "marketoActivityId": "100025" + }, + { + "event": "act_engagement_discussions_savediscussion", + "marketoActivityId": "100025" + }, + { + "event": "act_engagement_networking_savetime", + "marketoActivityId": "100025" + } + ] + }, + "destinationDefinition": { + "config": { + "destConfig": { + "defaultConfig": [ + "accountId", + "clientId", + "clientSecret", + "trackAnonymousEvents", + "rudderEventsMapping", + "customActivityPropertyMap", + "leadTraitMapping" + ] + }, + "secretKeys": [ + "clientSecret" + ], + "excludeKeys": [], + "includeKeys": [], + "routerTransform": true, + "supportedSourceTypes": [ + "android", + "ios", + "web", + "unity", + "amp", + "cloud", + "reactnative" + ] + }, + "responseRules": { + "responseType": "JSON", + "rules": { + "retryable": [ + { + "success": "false", + "errors.0.code": 600 + }, + { + "success": "false", + "errors.0.code": 601 + }, + { + "success": "false", + "errors.0.code": 602 + }, + { + "success": "false", + "errors.0.code": 604 + }, + { + "success": "false", + "errors.0.code": 606 + }, + { + "success": "false", + "errors.0.code": 607 + }, + { + "success": "false", + "errors.0.code": 608 + }, + { + "success": "false", + "errors.0.code": 611 + } + ], + "abortable": [ + { + "success": "false", + "errors.0.code": 603 + }, + { + "success": "false", + "errors.0.code": 605 + }, + { + "success": "false", + "errors.0.code": 609 + }, + { + "success": "false", + "errors.0.code": 610 + } + ] + } + }, + "id": "1aIXqM806xAVm92nx07YwKbRrO9", + "name": "MARKETO", + "displayName": "Marketo", + "createdAt": "2020-04-09T09:24:31.794Z", + "updatedAt": "2021-01-11T11:03:28.103Z" + }, + "secretConfig": {}, + "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVke", + "name": "Marketo", + "enabled": true, + "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmMd", + "deleted": false, + "createdAt": "2022-02-10T08:39:32.005Z", + "updatedAt": "2022-09-03T16:22:31.374Z", + "transformations": [], + "isConnectionEnabled": true, + "isProcessorEnabled": true + }, + "metadata": { + "jobId": 3 + } + }, + { + "message": { + "type": "identify", + "sentAt": "2022-09-19T10:34:02.002Z", + "userId": "e17c5a5e-5e2f-430b-b497-fe3f1ea3a704", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "2.12.1", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "https://accounts.app.t2.broken.com/home", + "path": "/home", + "title": "Home", + "search": "", + "tab_url": "https://accounts.app.t2.broken.com/home", + "referrer": "https://ts50-cvii.core.broken.org/", + "initial_referrer": "https://ts50-cvii.core.broken.org/", + "referring_domain": "ts50-cvii.core.broken.org", + "initial_referring_domain": "ts50-cvii.core.broken.org" + }, + "locale": "en-IN", + "screen": { + "width": 1728, + "height": 1117, + "density": 2, + "innerWidth": 1728, + "innerHeight": 969 + }, + "traits": { + "name": "AM", + "email": "0c7b8b80-9c43-4f8e-b2d2-5e2448a25040@j.mail", + "lastName": "M", + "firstName": "A", + "accountName": "MACDEV", + "billingName": "g g", + "companyName": "macDev", + "currentTier": "Webinar Pro 250", + "billingCycle": "Annually", + "lastBillingDate": "2022-06-29T09:40:42.000Z", + "nextBillingDate": "2023-09-09T04:00:00.000Z", + "subscriptionType": "Webinar Pro 250", + "subscriptionStatus": "ACTIVE", + "lastWebinarEventDate": "2022-09-15T20:00:00.000Z", + "nextWebinarEventDate": "2022-09-16T06:15:00.000Z" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "2.12.1" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36" + }, + "rudderId": "73dc83ef-587f-4077-90f3-c36083e64019", + "messageId": "1663583642000200-e3f31c4c-6361-4f99-b643-7755303a6007", + "timestamp": "2022-09-19T10:34:02.954Z", + "receivedAt": "2022-09-19T10:34:02.956Z", + "request_ip": "11.105.44.120", + "anonymousId": "0c7b8b80-9c43-4f8e-b2d2-5e2448a25040", + "integrations": { + "All": true + }, + "originalTimestamp": "2022-09-19T10:34:02.000Z" + }, + "destination": { + "Config": { + "accountId": "unhandled_status_code", + "clientId": "504300cd-76b2-a7l4-bhle-90a07420nx73", + "clientSecret": "3l3gJpzRsZagD6gu7tnTeKXz0bomLGnd", + "trackAnonymousEvents": false, + "createIfNotExist": true, + "rudderEventsMapping": [ + { + "event": "acq_signup_completed", + "marketoActivityId": "100026" + }, + { + "event": "act_createwebinarform_submit", + "marketoActivityId": "100025" + }, + { + "event": "act_presentation_style", + "marketoActivityId": "100025" + }, + { + "event": "act_webinar_view", + "marketoActivityId": "100025" + }, + { + "event": "act_webinar_join", + "marketoActivityId": "100025" + }, + { + "event": "act_presentation_addteammember", + "marketoActivityId": "100025" + }, + { + "event": "act_engagement_discussions_savediscussion", + "marketoActivityId": "100025" + }, + { + "event": "act_engagement_networking_savetime", + "marketoActivityId": "100025" + } + ] + }, + "destinationDefinition": { + "config": { + "destConfig": { + "defaultConfig": [ + "accountId", + "clientId", + "clientSecret", + "trackAnonymousEvents", + "rudderEventsMapping", + "customActivityPropertyMap", + "leadTraitMapping" + ] + }, + "secretKeys": [ + "clientSecret" + ], + "excludeKeys": [], + "includeKeys": [], + "routerTransform": true, + "supportedSourceTypes": [ + "android", + "ios", + "web", + "unity", + "amp", + "cloud", + "reactnative" + ] + }, + "responseRules": { + "responseType": "JSON", + "rules": { + "retryable": [ + { + "success": "false", + "errors.0.code": 600 + }, + { + "success": "false", + "errors.0.code": 601 + }, + { + "success": "false", + "errors.0.code": 602 + }, + { + "success": "false", + "errors.0.code": 604 + }, + { + "success": "false", + "errors.0.code": 606 + }, + { + "success": "false", + "errors.0.code": 607 + }, + { + "success": "false", + "errors.0.code": 608 + }, + { + "success": "false", + "errors.0.code": 611 + } + ], + "abortable": [ + { + "success": "false", + "errors.0.code": 603 + }, + { + "success": "false", + "errors.0.code": 605 + }, + { + "success": "false", + "errors.0.code": 609 + }, + { + "success": "false", + "errors.0.code": 610 + } + ] + } + }, + "id": "1aIXqM806xAVm92nx07YwKbRrO9", + "name": "MARKETO", + "displayName": "Marketo", + "createdAt": "2020-04-09T09:24:31.794Z", + "updatedAt": "2021-01-11T11:03:28.103Z" + }, + "secretConfig": {}, + "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVke", + "name": "Marketo", + "enabled": true, + "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmMd", + "deleted": false, + "createdAt": "2022-02-10T08:39:32.005Z", + "updatedAt": "2022-09-03T16:22:31.374Z", + "transformations": [], + "isConnectionEnabled": true, + "isProcessorEnabled": true + }, + "metadata": { + "jobId": 4 + } + }, + { + "message": { + "type": "identify", + "sentAt": "2022-09-19T10:34:02.002Z", + "userId": "e17c5a5e-5e2f-430b-b497-fe3f1ea3a704", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "2.12.1", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "https://accounts.app.t2.broken.com/home", + "path": "/home", + "title": "Home", + "search": "", + "tab_url": "https://accounts.app.t2.broken.com/home", + "referrer": "https://ts50-cvii.core.broken.org/", + "initial_referrer": "https://ts50-cvii.core.broken.org/", + "referring_domain": "ts50-cvii.core.broken.org", + "initial_referring_domain": "ts50-cvii.core.broken.org" + }, + "locale": "en-IN", + "screen": { + "width": 1728, + "height": 1117, + "density": 2, + "innerWidth": 1728, + "innerHeight": 969 + }, + "traits": { + "name": "AM", + "email": "0c7b8b80-9c43-4f8e-b2d2-5e2448a25040@j.mail", + "lastName": "M", + "firstName": "A", + "accountName": "MACDEV", + "billingName": "g g", + "companyName": "macDev", + "currentTier": "Webinar Pro 250", + "billingCycle": "Annually", + "lastBillingDate": "2022-06-29T09:40:42.000Z", + "nextBillingDate": "2023-09-09T04:00:00.000Z", + "subscriptionType": "Webinar Pro 250", + "subscriptionStatus": "ACTIVE", + "lastWebinarEventDate": "2022-09-15T20:00:00.000Z", + "nextWebinarEventDate": "2022-09-16T06:15:00.000Z" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "2.12.1" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36" + }, + "rudderId": "73dc83ef-587f-4077-90f3-c36083e64019", + "messageId": "1663583642000200-e3f31c4c-6361-4f99-b643-7755303a6007", + "timestamp": "2022-09-19T10:34:02.954Z", + "receivedAt": "2022-09-19T10:34:02.956Z", + "request_ip": "11.105.44.120", + "anonymousId": "0c7b8b80-9c43-4f8e-b2d2-5e2448a25040", + "integrations": { + "All": true + }, + "originalTimestamp": "2022-09-19T10:34:02.000Z" + }, + "destination": { + "Config": { + "accountId": "successful_identify_transformation", + "clientId": "504300cd-76b2-a7l4-bhle-90a07420nx73", + "clientSecret": "3l3gJpzRsZagD6gu7tnTeKXz0bomLGnd", + "trackAnonymousEvents": false, + "createIfNotExist": true, + "rudderEventsMapping": [ + { + "event": "acq_signup_completed", + "marketoActivityId": "100026" + }, + { + "event": "act_createwebinarform_submit", + "marketoActivityId": "100025" + }, + { + "event": "act_presentation_style", + "marketoActivityId": "100025" + }, + { + "event": "act_webinar_view", + "marketoActivityId": "100025" + }, + { + "event": "act_webinar_join", + "marketoActivityId": "100025" + }, + { + "event": "act_presentation_addteammember", + "marketoActivityId": "100025" + }, + { + "event": "act_engagement_discussions_savediscussion", + "marketoActivityId": "100025" + }, + { + "event": "act_engagement_networking_savetime", + "marketoActivityId": "100025" + } + ] + }, + "destinationDefinition": { + "config": { + "destConfig": { + "defaultConfig": [ + "accountId", + "clientId", + "clientSecret", + "trackAnonymousEvents", + "rudderEventsMapping", + "customActivityPropertyMap", + "leadTraitMapping" + ] + }, + "secretKeys": [ + "clientSecret" + ], + "excludeKeys": [], + "includeKeys": [], + "routerTransform": true, + "supportedSourceTypes": [ + "android", + "ios", + "web", + "unity", + "amp", + "cloud", + "reactnative" + ] + }, + "responseRules": { + "responseType": "JSON", + "rules": { + "retryable": [ + { + "success": "false", + "errors.0.code": 600 + }, + { + "success": "false", + "errors.0.code": 601 + }, + { + "success": "false", + "errors.0.code": 602 + }, + { + "success": "false", + "errors.0.code": 604 + }, + { + "success": "false", + "errors.0.code": 606 + }, + { + "success": "false", + "errors.0.code": 607 + }, + { + "success": "false", + "errors.0.code": 608 + }, + { + "success": "false", + "errors.0.code": 611 + } + ], + "abortable": [ + { + "success": "false", + "errors.0.code": 603 + }, + { + "success": "false", + "errors.0.code": 605 + }, + { + "success": "false", + "errors.0.code": 609 + }, + { + "success": "false", + "errors.0.code": 610 + } + ] + } + }, + "id": "1aIXqM806xAVm92nx07YwKbRrO9", + "name": "MARKETO", + "displayName": "Marketo", + "createdAt": "2020-04-09T09:24:31.794Z", + "updatedAt": "2021-01-11T11:03:28.103Z" + }, + "secretConfig": {}, + "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVke", + "name": "Marketo", + "enabled": true, + "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmMd", + "deleted": false, + "createdAt": "2022-02-10T08:39:32.005Z", + "updatedAt": "2022-09-03T16:22:31.374Z", + "transformations": [], + "isConnectionEnabled": true, + "isProcessorEnabled": true + }, + "metadata": { + "jobId": 5 + } + } + ], + destType: 'marketo', + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + "batchedRequest": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://marketo_acct_id_success.mktorest.com/rest/v1/activities/external.json", + "headers": { + "Content-Type": "application/json", + "Authorization": "Bearer access_token_success" + }, + "params": {}, + "body": { + "JSON": { + "input": [ + { + "activityDate": "2020-12-17T21:00:59.176Z", + "activityTypeId": 100001, + "attributes": [], + "leadId": 4, + "primaryAttributeValue": "Test Product" + } + ] + }, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {} + }, + "metadata": [ + { + "destInfo": { + "authKey": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", + }, + "jobId": 1 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "Config": { + "accountId": "marketo_acct_id_success", + "clientId": "marketo_client_id_success", + "clientSecret": "marketo_client_secret_success", + "trackAnonymousEvents": true, + "customActivityPropertyMap": [ + { + "from": "name", + "to": "productName" + } + ], + "leadTraitMapping": [ + { + "from": "leadScore", + "to": "customLeadScore" + } + ], + "rudderEventsMapping": [ + { + "event": "Product Clicked", + "marketoPrimarykey": "name", + "marketoActivityId": "100001" + } + ] + }, + "secretConfig": {}, + "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", + "name": "Marketo", + "enabled": true, + "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", + "deleted": false, + "createdAt": "2020-12-30T08:39:32.005Z", + "updatedAt": "2021-02-03T16:22:31.374Z", + "destinationDefinition": { + "config": { + "destConfig": { + "defaultConfig": [ + "accountId", + "clientId", + "clientSecret", + "trackAnonymousEvents", + "rudderEventsMapping", + "customActivityPropertyMap", + "leadTraitMapping" + ] + }, + "secretKeys": [ + "clientSecret" + ], + "excludeKeys": [], + "includeKeys": [], + "routerTransform": true, + "supportedSourceTypes": [ + "android", + "ios", + "web", + "unity", + "amp", + "cloud", + "reactnative" + ] + }, + "responseRules": { + "responseType": "JSON", + "rules": { + "retryable": [ + { + "success": "false", + "errors.0.code": 600 + }, + { + "success": "false", + "errors.0.code": 601 + }, + { + "success": "false", + "errors.0.code": 602 + }, + { + "success": "false", + "errors.0.code": 604 + }, + { + "success": "false", + "errors.0.code": 606 + }, + { + "success": "false", + "errors.0.code": 607 + }, + { + "success": "false", + "errors.0.code": 608 + }, + { + "success": "false", + "errors.0.code": 611 + } + ], + "abortable": [ + { + "success": "false", + "errors.0.code": 603 + }, + { + "success": "false", + "errors.0.code": 605 + }, + { + "success": "false", + "errors.0.code": 609 + }, + { + "success": "false", + "errors.0.code": 610 + } + ] + } + }, + "id": "1aIXqM806xAVm92nx07YwKbRrO9", + "name": "MARKETO", + "displayName": "Marketo", + "createdAt": "2020-04-09T09:24:31.794Z", + "updatedAt": "2021-01-11T11:03:28.103Z" + }, + "transformations": [], + "isConnectionEnabled": true, + "isProcessorEnabled": true + } + }, + { + "batchedRequest": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://marketo_acct_id_success.mktorest.com/rest/v1/activities/external.json", + "headers": { + "Content-Type": "application/json", + "Authorization": "Bearer access_token_success" + }, + "params": {}, + "body": { + "JSON": { + "input": [ + { + "activityDate": "2020-12-17T21:00:59.176Z", + "activityTypeId": 100001, + "attributes": [], + "leadId": 4, + "primaryAttributeValue": "Test Product" + } + ] + }, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {} + }, + "metadata": [ + { + "destInfo": { + "authKey": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", + }, + "jobId": 2 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "Config": { + "accountId": "marketo_acct_id_success", + "clientId": "marketo_client_id_success", + "clientSecret": "marketo_client_secret_success", + "trackAnonymousEvents": true, + "customActivityPropertyMap": [ + { + "from": "name", + "to": "productName" + } + ], + "leadTraitMapping": [ + { + "from": "leadScore", + "to": "customLeadScore" + } + ], + "rudderEventsMapping": [ + { + "event": "Product Clicked", + "marketoPrimarykey": "name", + "marketoActivityId": "100001" + } + ] + }, + "secretConfig": {}, + "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", + "name": "Marketo", + "enabled": true, + "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", + "deleted": false, + "createdAt": "2020-12-30T08:39:32.005Z", + "updatedAt": "2021-02-03T16:22:31.374Z", + "destinationDefinition": { + "config": { + "destConfig": { + "defaultConfig": [ + "accountId", + "clientId", + "clientSecret", + "trackAnonymousEvents", + "rudderEventsMapping", + "customActivityPropertyMap", + "leadTraitMapping" + ] + }, + "secretKeys": [ + "clientSecret" + ], + "excludeKeys": [], + "includeKeys": [], + "routerTransform": true, + "supportedSourceTypes": [ + "android", + "ios", + "web", + "unity", + "amp", + "cloud", + "reactnative" + ] + }, + "responseRules": { + "responseType": "JSON", + "rules": { + "retryable": [ + { + "success": "false", + "errors.0.code": 600 + }, + { + "success": "false", + "errors.0.code": 601 + }, + { + "success": "false", + "errors.0.code": 602 + }, + { + "success": "false", + "errors.0.code": 604 + }, + { + "success": "false", + "errors.0.code": 606 + }, + { + "success": "false", + "errors.0.code": 607 + }, + { + "success": "false", + "errors.0.code": 608 + }, + { + "success": "false", + "errors.0.code": 611 + } + ], + "abortable": [ + { + "success": "false", + "errors.0.code": 603 + }, + { + "success": "false", + "errors.0.code": 605 + }, + { + "success": "false", + "errors.0.code": 609 + }, + { + "success": "false", + "errors.0.code": 610 + } + ] + } + }, + "id": "1aIXqM806xAVm92nx07YwKbRrO9", + "name": "MARKETO", + "displayName": "Marketo", + "createdAt": "2020-04-09T09:24:31.794Z", + "updatedAt": "2021-01-11T11:03:28.103Z" + }, + "transformations": [], + "isConnectionEnabled": true, + "isProcessorEnabled": true + } + }, + { + "batched": false, + "statusCode": 400, + "error": "{\"message\":\"Request Failed for marketo, Lookup field 'userId' not found (Aborted).[Marketo Transformer]: During lead look up using email\",\"destinationResponse\":{\"response\":{\"requestId\":\"142e4#1835b117b76\",\"success\":false,\"errors\":[{\"code\":\"1006\",\"message\":\"Lookup field 'userId' not found\"}]},\"status\":200}}", + "statTags": { + "errorCategory": "network", + "errorType": "aborted" + }, + "metadata": [ + { + "destInfo": { + "authKey": "1mMy5cqbtfuaKZv1IhVQKnBdVke", + }, + "jobId": 3 + } + ], + "destination": { + "Config": { + "accountId": "valid_account_broken_event", + "clientId": "504300cd-76b2-a7l4-bhle-90a07420nx73", + "clientSecret": "3l3gJpzRsZagD6gu7tnTeKXz0bomLGnd", + "trackAnonymousEvents": false, + "createIfNotExist": true, + "rudderEventsMapping": [ + { + "event": "acq_signup_completed", + "marketoActivityId": "100026" + }, + { + "event": "act_createwebinarform_submit", + "marketoActivityId": "100025" + }, + { + "event": "act_presentation_style", + "marketoActivityId": "100025" + }, + { + "event": "act_webinar_view", + "marketoActivityId": "100025" + }, + { + "event": "act_webinar_join", + "marketoActivityId": "100025" + }, + { + "event": "act_presentation_addteammember", + "marketoActivityId": "100025" + }, + { + "event": "act_engagement_discussions_savediscussion", + "marketoActivityId": "100025" + }, + { + "event": "act_engagement_networking_savetime", + "marketoActivityId": "100025" + } + ] + }, + "destinationDefinition": { + "config": { + "destConfig": { + "defaultConfig": [ + "accountId", + "clientId", + "clientSecret", + "trackAnonymousEvents", + "rudderEventsMapping", + "customActivityPropertyMap", + "leadTraitMapping" + ] + }, + "secretKeys": [ + "clientSecret" + ], + "excludeKeys": [], + "includeKeys": [], + "routerTransform": true, + "supportedSourceTypes": [ + "android", + "ios", + "web", + "unity", + "amp", + "cloud", + "reactnative" + ] + }, + "responseRules": { + "responseType": "JSON", + "rules": { + "retryable": [ + { + "success": "false", + "errors.0.code": 600 + }, + { + "success": "false", + "errors.0.code": 601 + }, + { + "success": "false", + "errors.0.code": 602 + }, + { + "success": "false", + "errors.0.code": 604 + }, + { + "success": "false", + "errors.0.code": 606 + }, + { + "success": "false", + "errors.0.code": 607 + }, + { + "success": "false", + "errors.0.code": 608 + }, + { + "success": "false", + "errors.0.code": 611 + } + ], + "abortable": [ + { + "success": "false", + "errors.0.code": 603 + }, + { + "success": "false", + "errors.0.code": 605 + }, + { + "success": "false", + "errors.0.code": 609 + }, + { + "success": "false", + "errors.0.code": 610 + } + ] + } + }, + "id": "1aIXqM806xAVm92nx07YwKbRrO9", + "name": "MARKETO", + "displayName": "Marketo", + "createdAt": "2020-04-09T09:24:31.794Z", + "updatedAt": "2021-01-11T11:03:28.103Z" + }, + "secretConfig": {}, + "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVke", + "name": "Marketo", + "enabled": true, + "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmMd", + "deleted": false, + "createdAt": "2022-02-10T08:39:32.005Z", + "updatedAt": "2022-09-03T16:22:31.374Z", + "transformations": [], + "isConnectionEnabled": true, + "isProcessorEnabled": true + } + }, + { + "batched": false, + "statusCode": 400, + "error": "{\"message\":\"Error occurred [Marketo Transformer]: During lead look up using email -> some other problem\",\"destinationResponse\":{\"response\":{\"requestId\":\"142e4#1835b117b76\",\"success\":false,\"errors\":[{\"code\":\"random_marketo_code\",\"message\":\"some other problem\"}]},\"status\":200}}", + "statTags": { + "errorCategory": "network", + "errorType": "aborted", + "meta": "unhandledStatusCode" + }, + "destination": { + "Config": { + "accountId": "unhandled_status_code", + "clientId": "504300cd-76b2-a7l4-bhle-90a07420nx73", + "clientSecret": "3l3gJpzRsZagD6gu7tnTeKXz0bomLGnd", + "trackAnonymousEvents": false, + "createIfNotExist": true, + "rudderEventsMapping": [ + { + "event": "acq_signup_completed", + "marketoActivityId": "100026" + }, + { + "event": "act_createwebinarform_submit", + "marketoActivityId": "100025" + }, + { + "event": "act_presentation_style", + "marketoActivityId": "100025" + }, + { + "event": "act_webinar_view", + "marketoActivityId": "100025" + }, + { + "event": "act_webinar_join", + "marketoActivityId": "100025" + }, + { + "event": "act_presentation_addteammember", + "marketoActivityId": "100025" + }, + { + "event": "act_engagement_discussions_savediscussion", + "marketoActivityId": "100025" + }, + { + "event": "act_engagement_networking_savetime", + "marketoActivityId": "100025" + } + ] + }, + "destinationDefinition": { + "config": { + "destConfig": { + "defaultConfig": [ + "accountId", + "clientId", + "clientSecret", + "trackAnonymousEvents", + "rudderEventsMapping", + "customActivityPropertyMap", + "leadTraitMapping" + ] + }, + "secretKeys": [ + "clientSecret" + ], + "excludeKeys": [], + "includeKeys": [], + "routerTransform": true, + "supportedSourceTypes": [ + "android", + "ios", + "web", + "unity", + "amp", + "cloud", + "reactnative" + ] + }, + "responseRules": { + "responseType": "JSON", + "rules": { + "retryable": [ + { + "success": "false", + "errors.0.code": 600 + }, + { + "success": "false", + "errors.0.code": 601 + }, + { + "success": "false", + "errors.0.code": 602 + }, + { + "success": "false", + "errors.0.code": 604 + }, + { + "success": "false", + "errors.0.code": 606 + }, + { + "success": "false", + "errors.0.code": 607 + }, + { + "success": "false", + "errors.0.code": 608 + }, + { + "success": "false", + "errors.0.code": 611 + } + ], + "abortable": [ + { + "success": "false", + "errors.0.code": 603 + }, + { + "success": "false", + "errors.0.code": 605 + }, + { + "success": "false", + "errors.0.code": 609 + }, + { + "success": "false", + "errors.0.code": 610 + } + ] + } + }, + "id": "1aIXqM806xAVm92nx07YwKbRrO9", + "name": "MARKETO", + "displayName": "Marketo", + "createdAt": "2020-04-09T09:24:31.794Z", + "updatedAt": "2021-01-11T11:03:28.103Z" + }, + "secretConfig": {}, + "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVke", + "name": "Marketo", + "enabled": true, + "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmMd", + "deleted": false, + "createdAt": "2022-02-10T08:39:32.005Z", + "updatedAt": "2022-09-03T16:22:31.374Z", + "transformations": [], + "isConnectionEnabled": true, + "isProcessorEnabled": true + }, + "metadata": [ + { + "destInfo": { + "authKey": "1mMy5cqbtfuaKZv1IhVQKnBdVke", + }, + "jobId": 4 + } + ] + }, + { + "batchedRequest": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://successful_identify_transformation.mktorest.com/rest/v1/leads.json", + "headers": { + "Content-Type": "application/json", + "Authorization": "Bearer access_token_success" + }, + "params": {}, + "body": { + "JSON": { + "action": "createOrUpdate", + "input": [ + { + "Email": "0c7b8b80-9c43-4f8e-b2d2-5e2448a25040@j.mail", + "FirstName": "A", + "LastName": "M", + "id": 4, + "userId": "e17c5a5e-5e2f-430b-b497-fe3f1ea3a704" + } + ], + "lookupField": "id" + }, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {} + }, + "metadata": [ + { + "destInfo": { + "authKey": "1mMy5cqbtfuaKZv1IhVQKnBdVke", + }, + "jobId": 5 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "Config": { + "accountId": "successful_identify_transformation", + "clientId": "504300cd-76b2-a7l4-bhle-90a07420nx73", + "clientSecret": "3l3gJpzRsZagD6gu7tnTeKXz0bomLGnd", + "trackAnonymousEvents": false, + "createIfNotExist": true, + "rudderEventsMapping": [ + { + "event": "acq_signup_completed", + "marketoActivityId": "100026" + }, + { + "event": "act_createwebinarform_submit", + "marketoActivityId": "100025" + }, + { + "event": "act_presentation_style", + "marketoActivityId": "100025" + }, + { + "event": "act_webinar_view", + "marketoActivityId": "100025" + }, + { + "event": "act_webinar_join", + "marketoActivityId": "100025" + }, + { + "event": "act_presentation_addteammember", + "marketoActivityId": "100025" + }, + { + "event": "act_engagement_discussions_savediscussion", + "marketoActivityId": "100025" + }, + { + "event": "act_engagement_networking_savetime", + "marketoActivityId": "100025" + } + ] + }, + "destinationDefinition": { + "config": { + "destConfig": { + "defaultConfig": [ + "accountId", + "clientId", + "clientSecret", + "trackAnonymousEvents", + "rudderEventsMapping", + "customActivityPropertyMap", + "leadTraitMapping" + ] + }, + "secretKeys": [ + "clientSecret" + ], + "excludeKeys": [], + "includeKeys": [], + "routerTransform": true, + "supportedSourceTypes": [ + "android", + "ios", + "web", + "unity", + "amp", + "cloud", + "reactnative" + ] + }, + "responseRules": { + "responseType": "JSON", + "rules": { + "retryable": [ + { + "success": "false", + "errors.0.code": 600 + }, + { + "success": "false", + "errors.0.code": 601 + }, + { + "success": "false", + "errors.0.code": 602 + }, + { + "success": "false", + "errors.0.code": 604 + }, + { + "success": "false", + "errors.0.code": 606 + }, + { + "success": "false", + "errors.0.code": 607 + }, + { + "success": "false", + "errors.0.code": 608 + }, + { + "success": "false", + "errors.0.code": 611 + } + ], + "abortable": [ + { + "success": "false", + "errors.0.code": 603 + }, + { + "success": "false", + "errors.0.code": 605 + }, + { + "success": "false", + "errors.0.code": 609 + }, + { + "success": "false", + "errors.0.code": 610 + } + ] + } + }, + "id": "1aIXqM806xAVm92nx07YwKbRrO9", + "name": "MARKETO", + "displayName": "Marketo", + "createdAt": "2020-04-09T09:24:31.794Z", + "updatedAt": "2021-01-11T11:03:28.103Z" + }, + "secretConfig": {}, + "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVke", + "name": "Marketo", + "enabled": true, + "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmMd", + "deleted": false, + "createdAt": "2022-02-10T08:39:32.005Z", + "updatedAt": "2022-09-03T16:22:31.374Z", + "transformations": [], + "isConnectionEnabled": true, + "isProcessorEnabled": true + } + } + ], + }, + }, + }, + }, + { + name: 'marketo', + description: 'processMetadataForRouter function specific test', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + "message": { + "anonymousId": "anon_id_success", + "channel": "mobile", + "context": { + "app": { + "build": "1", + "name": "TestAppName", + "namespace": "com.android.sample", + "version": "1.0" + }, + "device": { + "id": "anon_id_success", + "manufacturer": "Google", + "model": "Android SDK built for x86", + "name": "generic_x86", + "type": "android" + }, + "library": { + "name": "com.rudderstack.android.sdk.core", + "version": "1.0.1-beta.1" + }, + "locale": "en-US", + "network": { + "carrier": "Android", + "bluetooth": false, + "cellular": true, + "wifi": true + }, + "os": { + "name": "Android", + "version": "8.1.0" + }, + "screen": { + "density": 420, + "height": 1794, + "width": 1080 + }, + "timezone": "Asia/Kolkata", + "traits": { + "anonymousId": "anon_id_success" + }, + "userAgent": "Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)" + }, + "event": "Product Clicked", + "integrations": { + "All": true + }, + "messageId": "id1", + "properties": { + "name": "Test Product", + "product_id": "prod_1" + }, + "originalTimestamp": "2020-12-17T21:00:59.176Z", + "type": "track", + "sentAt": "2020-12-17T21:00:59.176Z" + }, + "destination": { + "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", + "Config": { + "accountId": "marketo_acct_id_success", + "clientId": "marketo_client_id_success", + "clientSecret": "marketo_client_secret_success", + "trackAnonymousEvents": true, + "customActivityPropertyMap": [ + { + "from": "name", + "to": "productName" + }, + { + "from": "product_id", + "to": "productId" + } + ], + "leadTraitMapping": [ + { + "from": "leadScore", + "to": "customLeadScore" + } + ], + "createIfNotExist": true, + "rudderEventsMapping": [ + { + "event": "Product Clicked", + "marketoPrimarykey": "name", + "marketoActivityId": "100001" + } + ] + } + }, + "metadata": [ + { + "jobId": 1 + }, + { + "jobId": 1 + }, + { + "jobId": 1 + } + ], + "batched": false, + "statusCode": 200, + } + ], + destType: 'marketo', + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + "output": [ + { + "batchedRequest": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://marketo_acct_id_success.mktorest.com/rest/v1/activities/external.json", + "headers": { + "Authorization": "Bearer access_token_success", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "input": [ + { + "activityDate": "2020-12-17T21:00:59.176Z", + "activityTypeId": 100001, + "attributes": [ + { + "name": "productId", + "value": "prod_1" + } + ], + "leadId": 4, + "primaryAttributeValue": "Test Product" + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {} + }, + "metadata": [ + [ + { + "jobId": 1 + }, + { + "jobId": 1 + }, + { + "jobId": 1 + } + ] + ], + "batched": false, + "statusCode": 200, + "destination": { + "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", + "Config": { + "accountId": "marketo_acct_id_success", + "clientId": "marketo_client_id_success", + "clientSecret": "marketo_client_secret_success", + "trackAnonymousEvents": true, + "customActivityPropertyMap": [ + { + "from": "name", + "to": "productName" + }, + { + "from": "product_id", + "to": "productId" + } + ], + "leadTraitMapping": [ + { + "from": "leadScore", + "to": "customLeadScore" + } + ], + "createIfNotExist": true, + "rudderEventsMapping": [ + { + "event": "Product Clicked", + "marketoPrimarykey": "name", + "marketoActivityId": "100001" + } + ] + } + } + } + ], + }, + }, + }, + } +]; diff --git a/test/integrations/destinations/sendgrid/network.ts b/test/integrations/destinations/sendgrid/network.ts index 18a8a8d34d..c97bf7e66e 100644 --- a/test/integrations/destinations/sendgrid/network.ts +++ b/test/integrations/destinations/sendgrid/network.ts @@ -106,5 +106,165 @@ const deleteNwData = [ }, }, }, + { + httpReq: { + method: 'get', + url: 'https://api.sendgrid.com/v3/marketing/field_definitions', + headers: { + Authorization: 'Bearer apikey', + 'Content-Type': 'application/json' + }, + }, + httpRes: { + status: 200, + statusText: 'OK', + data: { + "custom_fields": [ + { + "id": "w1_T", + "name": "user_name", + "field_type": "Text", + "_metadata": { + "self": "https://api.sendgrid.com/v3/marketing/field_definitions/w1_T" + } + } + ], + "reserved_fields": [ + { + "id": "_rf0_T", + "name": "first_name", + "field_type": "Text" + }, + { + "id": "_rf1_T", + "name": "last_name", + "field_type": "Text" + }, + { + "id": "_rf2_T", + "name": "email", + "field_type": "Text" + }, + { + "id": "_rf3_T", + "name": "alternate_emails", + "field_type": "Text" + }, + { + "id": "_rf4_T", + "name": "address_line_1", + "field_type": "Text" + }, + { + "id": "_rf5_T", + "name": "address_line_2", + "field_type": "Text" + }, + { + "id": "_rf6_T", + "name": "city", + "field_type": "Text" + }, + { + "id": "_rf7_T", + "name": "state_province_region", + "field_type": "Text" + }, + { + "id": "_rf8_T", + "name": "postal_code", + "field_type": "Text" + }, + { + "id": "_rf9_T", + "name": "country", + "field_type": "Text" + }, + { + "id": "_rf10_T", + "name": "phone_number", + "field_type": "Text" + }, + { + "id": "_rf11_T", + "name": "whatsapp", + "field_type": "Text" + }, + { + "id": "_rf12_T", + "name": "line", + "field_type": "Text" + }, + { + "id": "_rf13_T", + "name": "facebook", + "field_type": "Text" + }, + { + "id": "_rf14_T", + "name": "unique_name", + "field_type": "Text" + }, + { + "id": "_rf15_T", + "name": "email_domains", + "field_type": "Text", + "read_only": true + }, + { + "id": "_rf16_D", + "name": "last_clicked", + "field_type": "Date", + "read_only": true + }, + { + "id": "_rf17_D", + "name": "last_opened", + "field_type": "Date", + "read_only": true + }, + { + "id": "_rf18_D", + "name": "last_emailed", + "field_type": "Date", + "read_only": true + }, + { + "id": "_rf19_T", + "name": "singlesend_id", + "field_type": "Text", + "read_only": true + }, + { + "id": "_rf20_T", + "name": "automation_id", + "field_type": "Text", + "read_only": true + }, + { + "id": "_rf21_D", + "name": "created_at", + "field_type": "Date", + "read_only": true + }, + { + "id": "_rf22_D", + "name": "updated_at", + "field_type": "Date", + "read_only": true + }, + { + "id": "_rf23_T", + "name": "contact_id", + "field_type": "Text", + "read_only": true + } + ], + "_metadata": { + "self": "https://api.sendgrid.com/v3/marketing/field_definitions" + } + }, + }, + } ]; export const networkCallsData = [...deleteNwData]; diff --git a/test/integrations/destinations/sendgrid/processor/data.ts b/test/integrations/destinations/sendgrid/processor/data.ts new file mode 100644 index 0000000000..3047d484ec --- /dev/null +++ b/test/integrations/destinations/sendgrid/processor/data.ts @@ -0,0 +1,1533 @@ +export const data = [ + { + "name": "sendgrid", + "description": "Identify call without an email", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "IPPoolName": "", + "apiKey": "apikey", + "attachments": [ + { + "content": "", + "contentId": "", + "disposition": "", + "filename": "", + "type": "" + } + ], + "clickTracking": true, + "clickTrackingEnableText": true, + "contents": [ + { + "type": "text/html", + "value": "

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

" + } + ], + "eventDelivery": false, + "eventDeliveryTS": 1668424218224, + "eventNamesSettings": [ + { + "event": "open" + } + ], + "footer": false, + "fromEmail": "a@g.com", + "fromName": "", + "ganalytics": false, + "group": "", + "groupsToDisplay": [ + { + "groupId": "" + } + ], + "html": "", + "listId": "list111", + "mailFromTraits": false, + "openTracking": false, + "openTrackingSubstitutionTag": "", + "replyToEmail": "", + "replyToName": "", + "sandboxMode": false, + "subject": "hello there from webflow", + "subscriptionTracking": false, + "substitutionTag": "", + "templateId": "", + "text": "" + } + }, + "message": { + "type": "identify", + "userId": "user@1", + "context": { + "traits": { + "age": "25", + "city": "Surat", + "phone": "+91 9876543210", + "lastName": "test", + "firstName": "rudder", + "state": "Gujarat" + } + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "statusCode": 400, + "error": "Parameter mail is required", + "statTags": { + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "destType": "SENDGRID", + "module": "destination", + "implementation": "native", + "feature": "processor" + } + } + ] + } + } + }, + { + "name": "sendgrid", + "description": "Identify call with list_id configured from web-app", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "IPPoolName": "", + "apiKey": "apikey", + "attachments": [ + { + "content": "", + "contentId": "", + "disposition": "", + "filename": "", + "type": "" + } + ], + "clickTracking": true, + "clickTrackingEnableText": true, + "contents": [ + { + "type": "text/html", + "value": "

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

" + } + ], + "eventDelivery": false, + "eventDeliveryTS": 1668424218224, + "eventNamesSettings": [ + { + "event": "open" + } + ], + "footer": false, + "fromEmail": "a@g.com", + "fromName": "", + "ganalytics": false, + "group": "", + "groupsToDisplay": [ + { + "groupId": "" + } + ], + "html": "", + "listId": "list111", + "mailFromTraits": false, + "openTracking": false, + "openTrackingSubstitutionTag": "", + "replyToEmail": "", + "replyToName": "", + "sandboxMode": false, + "subject": "hello there from webflow", + "subscriptionTracking": false, + "substitutionTag": "", + "templateId": "", + "text": "" + } + }, + "message": { + "type": "identify", + "userId": "user@1", + "context": { + "traits": { + "age": "25", + "city": "Surat", + "email": "test@rudderstack.com", + "phone": "+91 9876543210", + "lastName": "test", + "firstName": "rudder", + "state": "Gujarat" + } + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "PUT", + "endpoint": "https://api.sendgrid.com/v3/marketing/contacts", + "headers": { + "Content-Type": "application/json", + "Authorization": "Bearer apikey" + }, + "params": {}, + "body": { + "JSON": { + "contactDetails": { + "email": "test@rudderstack.com", + "phone_number": "+91 9876543210", + "first_name": "rudder", + "last_name": "test", + "custom_fields": {} + }, + "contactListIds": "list111" + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "sendgrid", + "description": "Identify call with no list-id given", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "ID": "2HOQOO6wWKaKjeQrEABXgiH6cmU", + "Config": { + "IPPoolName": "", + "apiKey": "apikey", + "attachments": [ + { + "content": "", + "contentId": "", + "disposition": "", + "filename": "", + "type": "" + } + ], + "clickTracking": true, + "clickTrackingEnableText": true, + "contents": [ + { + "type": "text/html", + "value": "

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

" + } + ], + "customFieldsMapping": [ + { + "from": "name", + "to": "user_name" + } + ], + "eventDelivery": false, + "eventDeliveryTS": 1668424218224, + "eventNamesSettings": [ + { + "event": "open" + } + ], + "footer": false, + "fromEmail": "a@g.com", + "fromName": "", + "ganalytics": false, + "group": "", + "groupsToDisplay": [ + { + "groupId": "" + } + ], + "html": "", + "mailFromTraits": false, + "openTracking": false, + "openTrackingSubstitutionTag": "", + "replyToEmail": "", + "replyToName": "", + "sandboxMode": false, + "subject": "hello there from webflow", + "subscriptionTracking": false, + "substitutionTag": "", + "templateId": "", + "text": "" + } + }, + "message": { + "type": "identify", + "userId": "user@1", + "context": { + "traits": { + "age": "25", + "city": "Surat", + "name": "rudder test", + "email": "test@rudderstack.com", + "phone": "+91 9876543210", + "lastName": "test", + "firstName": "rudder", + "state": "Gujarat" + } + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [{ + "output": { + "body": { + "XML": {}, + "FORM": {}, + "JSON": { + "contactDetails": { + "email": "test@rudderstack.com", + "last_name": "test", + "first_name": "rudder", + "unique_name": "rudder test", + "phone_number": "+91 9876543210", + "custom_fields": { + "w1_T": "rudder test" + } + }, + "contactListIds": "" + }, + "JSON_ARRAY": {} + }, + "type": "REST", + "userId": "", + "files": {}, + "method": "PUT", + "params": {}, + "headers": { + "Content-Type": "application/json", + "Authorization": "Bearer apikey" + }, + "version": "1", + "endpoint": "https://api.sendgrid.com/v3/marketing/contacts" + }, + "statusCode": 200 + } + + ] + } + } + }, + { + "name": "sendgrid", + "description": "Track Call", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "apikey", + "eventNamesSettings": [ + { + "event": "testing" + }, + { + "event": "clicked" + } + ], + "subject": "A sample subject", + "replyToEmail": "ankit@rudderstack.com", + "contents": [ + { + "type": "text/html", + "value": "

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

" + } + ], + "footer": false, + "bypassListManagement": false, + "sandboxMode": false, + "clickTracking": false, + "openTracking": false, + "ganalytics": false, + "subscriptionTracking": false, + "clickTrackingEnableText": false, + "text": null, + "utmContent": null + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "type": "track", + "event": "testing", + "properties": { + "personalizations": [ + { + "to": [ + { + "email": "a@g.com" + }, + { + "name": "hello" + } + ], + "subject": "hey there" + } + ], + "from": { + "email": "ankit@rudderstack.com" + } + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.sendgrid.com/v3/mail/send", + "headers": { + "Content-Type": "application/json", + "Authorization": "Bearer apikey" + }, + "params": {}, + "body": { + "JSON": { + "from": { + "email": "ankit@rudderstack.com" + }, + "personalizations": [ + { + "to": [ + { + "email": "a@g.com" + } + ], + "subject": "hey there" + } + ], + "content": [ + { + "type": "text/html", + "value": "

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

" + } + ], + "subject": "A sample subject", + "reply_to": { + "email": "ankit@rudderstack.com" + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "sendgrid", + "description": "Track Call", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "apikey", + "eventNamesSettings": [ + { + "event": "testing" + }, + { + "event": "clicked" + } + ], + "subject": "A sample subject", + "replyToEmail": "ankit@rudderstack.com", + "contents": [ + { + "type": "text/html", + "value": "

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

" + } + ], + "footer": false, + "footerText": "some text", + "bypassListManagement": false, + "sandboxMode": false, + "clickTracking": false, + "openTracking": false, + "ganalytics": false, + "subscriptionTracking": false, + "clickTrackingEnableText": false + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "type": "track", + "event": "testing", + "properties": { + "replyTo": { + "email": "testing@gmail.com" + }, + "personalizations": [ + { + "to": [ + { + "email": "a@g.com" + }, + { + "name": "hello" + } + ], + "subject": "hey there" + } + ], + "from": { + "email": "ankit@rudderstack.com" + } + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.sendgrid.com/v3/mail/send", + "headers": { + "Content-Type": "application/json", + "Authorization": "Bearer apikey" + }, + "params": {}, + "body": { + "JSON": { + "from": { + "email": "ankit@rudderstack.com" + }, + "personalizations": [ + { + "to": [ + { + "email": "a@g.com" + } + ], + "subject": "hey there" + } + ], + "reply_to": { + "email": "testing@gmail.com" + }, + "content": [ + { + "type": "text/html", + "value": "

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

" + } + ], + "subject": "A sample subject" + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "sendgrid", + "description": "Track Call", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "apikey", + "eventNamesSettings": [ + { + "event": "testing" + }, + { + "event": "clicked" + } + ], + "subject": "A sample subject", + "replyToEmail": "ankit@rudderstack.com", + "contents": [ + { + "type": "text/html", + "value": "

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

" + } + ], + "footer": false, + "footerText": "some text", + "bypassListManagement": false, + "sandboxMode": false, + "clickTracking": false, + "openTracking": false, + "ganalytics": false, + "subscriptionTracking": false, + "clickTrackingEnableText": false, + "group": "12345", + "groupsToDisplay": [ + { + "groupId": "12345" + }, + { + "groupId": "abc" + }, + { + "groupId": "12346" + } + ] + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "type": "track", + "event": "testing", + "properties": { + "replyTo": { + "email": "testing@gmail.com" + }, + "personalizations": [ + { + "to": [ + { + "email": "a@g.com" + }, + { + "name": "hello" + } + ], + "subject": "hey there" + } + ], + "from": { + "email": "ankit@rudderstack.com" + } + } + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.sendgrid.com/v3/mail/send", + "headers": { + "Content-Type": "application/json", + "Authorization": "Bearer apikey" + }, + "params": {}, + "body": { + "JSON": { + "from": { + "email": "ankit@rudderstack.com" + }, + "personalizations": [ + { + "to": [ + { + "email": "a@g.com" + } + ], + "subject": "hey there" + } + ], + "reply_to": { + "email": "testing@gmail.com" + }, + "content": [ + { + "type": "text/html", + "value": "

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

" + } + ], + "subject": "A sample subject", + "asm": { + "group_id": 12345, + "groups_to_display": [ + 12345, + 12346 + ] + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "sendgrid", + "description": "Track call without an event name", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "apikey", + "eventNamesSettings": [ + { + "event": "testing" + }, + { + "event": "clicked" + } + ], + "subject": "A sample subject", + "replyToEmail": "ankit@rudderstack.com", + "contents": [ + { + "type": "text/html", + "value": "

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

" + } + ], + "footer": false, + "footerText": "some text", + "bypassListManagement": false, + "sandboxMode": false, + "clickTracking": false, + "openTracking": false, + "ganalytics": false, + "subscriptionTracking": false, + "clickTrackingEnableText": false, + "group": "12345", + "groupsToDisplay": [ + { + "groupId": "12345" + }, + { + "groupId": "abc" + }, + { + "groupId": "12346" + } + ] + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "type": "track", + "event": "new event", + "properties": { + "replyTo": { + "email": "testing@gmail.com" + }, + "personalizations": [ + { + "to": [ + { + "email": "a@g.com" + }, + { + "name": "hello" + } + ], + "subject": "hey there" + } + ], + "from": { + "email": "ankit@rudderstack.com" + } + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "statusCode": 400, + "error": "Event not configured on dashboard", + "statTags": { + "errorCategory": "dataValidation", + "errorType": "configuration", + "destType": "SENDGRID", + "module": "destination", + "implementation": "native", + "feature": "processor" + } + } + ] + } + } + }, + { + "name": "sendgrid", + "description": "Track Call", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "apikey", + "eventNamesSettings": [ + { + "event": "testing" + }, + { + "event": "clicked" + } + ], + "subject": "A sample subject", + "replyToEmail": "ankit@rudderstack.com", + "contents": [ + { + "type": "text/html", + "value": "

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

" + } + ], + "footer": false, + "footerText": "some text", + "bypassListManagement": false, + "sandboxMode": false, + "clickTracking": false, + "openTracking": false, + "ganalytics": false, + "subscriptionTracking": false, + "clickTrackingEnableText": false, + "group": "12345", + "groupsToDisplay": [ + { + "groupId": "12345" + }, + { + "groupId": "abc" + }, + { + "groupId": "12346" + } + ], + "attachments": [ + { + "content": "YXNkZ2FmZ3FlcmRxZ2Iua2puYWRrbGpuYWtqc2Rmbg==", + "filename": "index.html" + } + ] + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "type": "track", + "event": "testing", + "properties": { + "replyTo": { + "email": "testing@gmail.com" + }, + "personalizations": [ + { + "to": [ + { + "email": "a@g.com" + }, + { + "name": "hello" + } + ], + "subject": "hey there" + } + ], + "from": { + "email": "ankit@rudderstack.com" + } + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.sendgrid.com/v3/mail/send", + "headers": { + "Content-Type": "application/json", + "Authorization": "Bearer apikey" + }, + "params": {}, + "body": { + "JSON": { + "from": { + "email": "ankit@rudderstack.com" + }, + "personalizations": [ + { + "to": [ + { + "email": "a@g.com" + } + ], + "subject": "hey there" + } + ], + "reply_to": { + "email": "testing@gmail.com" + }, + "attachments": [ + { + "content": "YXNkZ2FmZ3FlcmRxZ2Iua2puYWRrbGpuYWtqc2Rmbg==", + "filename": "index.html" + } + ], + "content": [ + { + "type": "text/html", + "value": "

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

" + } + ], + "subject": "A sample subject", + "asm": { + "group_id": 12345, + "groups_to_display": [ + 12345, + 12346 + ] + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "sendgrid", + "description": "Track Call", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "apikey", + "eventNamesSettings": [ + { + "event": "testing" + }, + { + "event": "clicked" + } + ], + "subject": "A sample subject", + "replyToEmail": "ankit@rudderstack.com", + "contents": [ + { + "type": "text/html", + "value": "

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

" + } + ], + "footer": false, + "footerText": "some text", + "bypassListManagement": false, + "sandboxMode": false, + "clickTracking": false, + "openTracking": false, + "ganalytics": false, + "subscriptionTracking": false, + "clickTrackingEnableText": false, + "group": "12345", + "groupsToDisplay": [ + { + "groupId": "12345" + }, + { + "groupId": "abc" + }, + { + "groupId": "12346" + } + ], + "attachments": [ + { + "content": "YXNkZ21hcyxkLm1mO29xd2llbGpmbWwuYWRrbXMuLGFtZHM=", + "filename": "index.html" + }, + { + "content": "bGFqa3NtZGZrZ2hxaWVybmtsYSBmZGtvamx3bWVGTC5NQW5kcy5rbmtmYWtkZg==" + } + ] + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "type": "track", + "event": "testing", + "properties": { + "replyTo": { + "email": "testing@gmail.com" + }, + "personalizations": [ + { + "to": [ + { + "email": "a@g.com" + }, + { + "name": "hello" + } + ], + "subject": "hey there" + } + ], + "from": { + "email": "ankit@rudderstack.com" + } + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.sendgrid.com/v3/mail/send", + "headers": { + "Content-Type": "application/json", + "Authorization": "Bearer apikey" + }, + "params": {}, + "body": { + "JSON": { + "from": { + "email": "ankit@rudderstack.com" + }, + "personalizations": [ + { + "to": [ + { + "email": "a@g.com" + } + ], + "subject": "hey there" + } + ], + "reply_to": { + "email": "testing@gmail.com" + }, + "attachments": [ + { + "content": "YXNkZ21hcyxkLm1mO29xd2llbGpmbWwuYWRrbXMuLGFtZHM=", + "filename": "index.html" + } + ], + "content": [ + { + "type": "text/html", + "value": "

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

" + } + ], + "subject": "A sample subject", + "asm": { + "group_id": 12345, + "groups_to_display": [ + 12345, + 12346 + ] + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "sendgrid", + "description": "Track Call", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "apikey", + "eventNamesSettings": [ + { + "event": "testing" + }, + { + "event": "clicked" + } + ], + "subject": "A sample subject", + "replyToEmail": "ankit@rudderstack.com", + "contents": [ + { + "type": "text/html", + "value": "

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

" + } + ], + "footer": false, + "footerText": "some text", + "bypassListManagement": false, + "sandboxMode": false, + "clickTracking": false, + "openTracking": false, + "ganalytics": false, + "subscriptionTracking": false, + "clickTrackingEnableText": false, + "group": "12345", + "groupsToDisplay": [ + { + "groupId": "12345" + }, + { + "groupId": "abc" + }, + { + "groupId": "12346" + } + ], + "attachments": [ + { + "content": "YXNkZ21hcyxkLm1mO29xd2llbGpmbWwuYWRrbXMuLGFtZHM=", + "filename": "index.html" + }, + { + "content": "bGFqa3NtZGZrZ2hxaWVybmtsYSBmZGtvamx3bWVGTC5NQW5kcy5rbmtmYWtkZg==" + } + ] + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "type": "track", + "event": "testing", + "properties": { + "replyTo": { + "email": "testing@gmail.com" + }, + "mailSettings": { + "bypassListManagement": true, + "footer": true + }, + "personalizations": [ + { + "to": [ + { + "email": "a@g.com" + }, + { + "name": "hello" + } + ], + "subject": "hey there" + } + ], + "from": { + "email": "ankit@rudderstack.com" + } + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.sendgrid.com/v3/mail/send", + "headers": { + "Content-Type": "application/json", + "Authorization": "Bearer apikey" + }, + "params": {}, + "body": { + "JSON": { + "from": { + "email": "ankit@rudderstack.com" + }, + "personalizations": [ + { + "to": [ + { + "email": "a@g.com" + } + ], + "subject": "hey there" + } + ], + "reply_to": { + "email": "testing@gmail.com" + }, + "attachments": [ + { + "content": "YXNkZ21hcyxkLm1mO29xd2llbGpmbWwuYWRrbXMuLGFtZHM=", + "filename": "index.html" + } + ], + "content": [ + { + "type": "text/html", + "value": "

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

" + } + ], + "subject": "A sample subject", + "asm": { + "group_id": 12345, + "groups_to_display": [ + 12345, + 12346 + ] + }, + "mail_settings": { + "bypass_list_management": { + "enable": true + }, + "footer": { + "enable": true, + "text": "some text" + } + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + } +] \ No newline at end of file diff --git a/test/integrations/destinations/sendgrid/router/data.ts b/test/integrations/destinations/sendgrid/router/data.ts new file mode 100644 index 0000000000..f10a6f0cab --- /dev/null +++ b/test/integrations/destinations/sendgrid/router/data.ts @@ -0,0 +1,173 @@ +import { FEATURES } from '../../../../../src/v0/util/tags'; + +export const data = [ + { + name: 'sendgrid', + description: 'Router Test Case', + feature: FEATURES.ROUTER, + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + "destination": { + "Config": { + "apiKey": "apikey", + "eventNamesSettings": [{ "event": "testing" }, { "event": "clicked" }], + "subject": "A sample subject", + "replyToEmail": "ankit@rudderstack.com", + "contents": [ + { + "type": "text/html", + "value": "

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

" + } + ], + "footer": false, + "bypassListManagement": false, + "sandboxMode": false, + "clickTracking": false, + "openTracking": false, + "ganalytics": false, + "subscriptionTracking": false, + "clickTrackingEnableText": false + } + }, + "metadata": { + "jobId": 2 + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { "name": "", "version": "" }, + "screen": { "density": 2 } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "type": "track", + "event": "testing", + "properties": { + "personalizations": [ + { + "to": [ + { + "email": "a@g.com" + }, + { + "name": "hello" + } + ], + "subject": "hey there" + } + ], + "from": { + "email": "ankit@rudderstack.com" + } + }, + "integrations": { "All": true }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ], + destType: 'sendgrid', + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + "batchedRequest": { + "body": { + "XML": {}, + "FORM": {}, + "JSON_ARRAY": {}, + "JSON": { + "personalizations": [ + { + "to": [ + { + "email": "a@g.com" + } + ], + "subject": "hey there" + } + ], + "from": { + "email": "ankit@rudderstack.com" + }, + "reply_to": { "email": "ankit@rudderstack.com" }, + "subject": "A sample subject", + "content": [ + { + "type": "text/html", + "value": "

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

" + } + ] + } + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": {}, + "headers": { + "Authorization": "Bearer apikey", + "Content-Type": "application/json" + }, + "version": "1", + "endpoint": "https://api.sendgrid.com/v3/mail/send" + }, + "metadata": [ + { + "jobId": 2 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "Config": { + "apiKey": "apikey", + "eventNamesSettings": [{ "event": "testing" }, { "event": "clicked" }], + "subject": "A sample subject", + "replyToEmail": "ankit@rudderstack.com", + "contents": [ + { + "type": "text/html", + "value": "

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

" + } + ], + "footer": false, + "bypassListManagement": false, + "sandboxMode": false, + "clickTracking": false, + "openTracking": false, + "ganalytics": false, + "subscriptionTracking": false, + "clickTrackingEnableText": false + } + } + } + ], + }, + }, + }, + } +]; From 3676039e39f8400efd4d55bcd9b6102a5692f11a Mon Sep 17 00:00:00 2001 From: Sudip Paul <67197965+ItsSudip@users.noreply.github.com> Date: Tue, 19 Dec 2023 10:18:46 +0530 Subject: [PATCH 093/135] chore: add component test cases for destinations without mock (#2910) chore: add component test cases for ga4, stormly, facebook_conversion --- test/__tests__/bingads_audience-cdk.test.ts | 60 - test/__tests__/data/bingads_audience.json | 503 - test/__tests__/data/bingads_audience_steps.ts | 155 - test/__tests__/data/facebook_conversions.json | 1157 -- .../facebook_conversions_router_input.json | 158 - .../facebook_conversions_router_output.json | 122 - test/__tests__/data/ga4.json | 12734 ------------- test/__tests__/data/stormly.json | 388 - test/__tests__/data/stormly_router_input.json | 55 - .../__tests__/data/stormly_router_output.json | 63 - test/__tests__/facebook_conversions.test.js | 48 - test/__tests__/ga4.test.js | 31 - test/__tests__/stormly.test.js | 47 - .../bingads_audience/processor/data.ts | 1130 ++ .../facebook_conversions/mocks.ts | 3 + .../facebook_conversions/processor/data.ts | 1433 ++ .../facebook_conversions/router/data.ts | 306 + test/integrations/destinations/ga4/mocks.ts | 3 + .../destinations/ga4/processor/data.ts | 14803 ++++++++++++++++ .../destinations/stormly/processor/data.ts | 566 + .../destinations/stormly/router/data.ts | 148 + 21 files changed, 18392 insertions(+), 15521 deletions(-) delete mode 100644 test/__tests__/bingads_audience-cdk.test.ts delete mode 100644 test/__tests__/data/bingads_audience.json delete mode 100644 test/__tests__/data/bingads_audience_steps.ts delete mode 100644 test/__tests__/data/facebook_conversions.json delete mode 100644 test/__tests__/data/facebook_conversions_router_input.json delete mode 100644 test/__tests__/data/facebook_conversions_router_output.json delete mode 100644 test/__tests__/data/ga4.json delete mode 100644 test/__tests__/data/stormly.json delete mode 100644 test/__tests__/data/stormly_router_input.json delete mode 100644 test/__tests__/data/stormly_router_output.json delete mode 100644 test/__tests__/facebook_conversions.test.js delete mode 100644 test/__tests__/ga4.test.js delete mode 100644 test/__tests__/stormly.test.js create mode 100644 test/integrations/destinations/bingads_audience/processor/data.ts create mode 100644 test/integrations/destinations/facebook_conversions/mocks.ts create mode 100644 test/integrations/destinations/facebook_conversions/processor/data.ts create mode 100644 test/integrations/destinations/facebook_conversions/router/data.ts create mode 100644 test/integrations/destinations/ga4/mocks.ts create mode 100644 test/integrations/destinations/ga4/processor/data.ts create mode 100644 test/integrations/destinations/stormly/processor/data.ts create mode 100644 test/integrations/destinations/stormly/router/data.ts diff --git a/test/__tests__/bingads_audience-cdk.test.ts b/test/__tests__/bingads_audience-cdk.test.ts deleted file mode 100644 index 577ac952d1..0000000000 --- a/test/__tests__/bingads_audience-cdk.test.ts +++ /dev/null @@ -1,60 +0,0 @@ -import fs from 'fs'; -import path from 'path'; -import { - processCdkV2Workflow, - executeStep, - getCachedWorkflowEngine, - getEmptyExecutionBindings, -} from '../../src/cdk/v2/handler'; -import tags from '../../src/v0/util/tags'; -import { data as stepsTestData } from './data/bingads_audience_steps'; - -const integration = 'bingads_audience'; -const destName = 'BingAds Audience'; - -// Processor Test files -const processorTestDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}.json`), - { - encoding: 'utf8', - }, -); -const processorTestData = JSON.parse(processorTestDataFile); - -describe(`${destName} Tests`, () => { - describe('Processor Tests', () => { - processorTestData.forEach((dataPoint, index) => { - it(`${destName} processor payload: ${index}`, async () => { - try { - const output = await processCdkV2Workflow( - integration, - dataPoint.input, - tags.FEATURES.PROCESSOR, - ); - expect(output).toEqual(dataPoint.output); - } catch (error: any) { - expect(error.message).toEqual(dataPoint.output.error); - } - }); - }); - }); - - describe('Step Tests', () => { - stepsTestData.forEach((dataPoint, index) => { - it(`${destName} steps payload: ${index}`, async () => { - const workflowEngine = await getCachedWorkflowEngine(integration, tags.FEATURES.PROCESSOR); - try { - const output = await executeStep( - workflowEngine, - dataPoint.stepName, - dataPoint.input, - dataPoint.bindings, - ); - expect(output.output).toEqual(dataPoint.output); - } catch (error: any) { - expect(error.message).toEqual(dataPoint.error); - } - }); - }); - }); -}); diff --git a/test/__tests__/data/bingads_audience.json b/test/__tests__/data/bingads_audience.json deleted file mode 100644 index b6db1fa608..0000000000 --- a/test/__tests__/data/bingads_audience.json +++ /dev/null @@ -1,503 +0,0 @@ -[ - { - "description": "unhashed email available with hashEmail as true in config", - "input": { - "message": { - "userId": "user 1", - "type": "audiencelist", - "properties": { - "listData": { - "add": [ - { - "email": "alex@email.com" - }, - { - "email": "amy@abc.com" - }, - { - "email": "van@abc.com" - } - ] - } - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - }, - "destination": { - "Config": { - "customerAccountId": "89236978", - "customerId": "78678678", - "audienceId": "564567", - "hashEmail": true - } - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "", - "headers": {}, - "params": {}, - "body": { - "JSON": { - "list": [ - { - "email": "alex@email.com", - "hashedEmail": "ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b" - }, - { - "email": "amy@abc.com", - "hashedEmail": "49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579" - }, - { - "email": "van@abc.com", - "hashedEmail": "2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c" - } - ], - "action": "Add" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "hashed email available with hashEmail as false in config", - "input": { - "message": { - "userId": "user 1", - "type": "audiencelist", - "properties": { - "listData": { - "add": [ - { - "email": "ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b" - }, - { - "email": "49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579" - }, - { - "email": "2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c" - } - ] - } - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - }, - "destination": { - "Config": { - "customerAccountId": "89236978", - "customerId": "78678678", - "audienceId": "564567", - "hashEmail": false - } - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "", - "headers": {}, - "params": {}, - "body": { - "JSON": { - "list": [ - { - "email": "ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b", - "hashedEmail": "ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b" - }, - { - "email": "49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579", - "hashedEmail": "49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579" - }, - { - "email": "2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c", - "hashedEmail": "2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c" - } - ], - "action": "Add" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "Unsupported action type", - "input": { - "message": { - "userId": "user 1", - "type": "audiencelist", - "properties": { - "listData": { - "addition": [ - { - "email": "alex@email.com" - }, - { - "email": "amy@abc.com" - }, - { - "email": "van@abc.com" - } - ] - } - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - }, - "destination": { - "Config": { - "customerAccountId": "89236978", - "customerId": "78678678", - "audienceId": "564567", - "hashEmail": true - } - } - }, - "output": { - "error": "unsupported action type. Aborting message." - } - }, - { - "description": "Unsupported event type", - "input": { - "message": { - "userId": "user 1", - "type": "track", - "properties": { - "listData": { - "add": [ - { - "email": "alex@email.com" - }, - { - "email": "amy@abc.com" - }, - { - "email": "van@abc.com" - } - ] - } - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - }, - "destination": { - "Config": { - "customerAccountId": "89236978", - "customerId": "78678678", - "audienceId": "564567", - "hashEmail": true - } - } - }, - "output": { - "error": "Event type track is not supported. Aborting message." - } - }, - { - "description": "event type not present", - "input": { - "message": { - "userId": "user 1", - "type": "", - "properties": { - "listData": { - "add": [ - { - "email": "alex@email.com" - }, - { - "email": "amy@abc.com" - }, - { - "email": "van@abc.com" - } - ] - } - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - }, - "destination": { - "Config": { - "customerAccountId": "89236978", - "customerId": "78678678", - "audienceId": "564567", - "hashEmail": true - } - } - }, - "output": { - "error": "message Type is not present. Aborting message." - } - }, - { - "description": "Message properties is not present", - "input": { - "message": { - "userId": "user 1", - "type": "audiencelist", - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - }, - "destination": { - "Config": { - "customerAccountId": "89236978", - "customerId": "78678678", - "audienceId": "564567", - "hashEmail": true - } - } - }, - "output": { - "error": "Message properties is not present. Aborting message." - } - }, - { - "description": "listData is not present in properties", - "input": { - "message": { - "userId": "user 1", - "type": "audiencelist", - "properties": {}, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - }, - "destination": { - "Config": { - "customerAccountId": "89236978", - "customerId": "78678678", - "audienceId": "564567", - "hashEmail": true - } - } - }, - "output": { - "error": "listData is not present inside properties. Aborting message." - } - }, - { - "description": "Both add and remove are present in listData", - "input": { - "message": { - "userId": "user 1", - "type": "audiencelist", - "properties": { - "listData": { - "remove": [ - { - "email": "ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b" - }, - { - "email": "49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579" - }, - { - "email": "2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c" - } - ], - "update": [ - { - "email": "ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b" - }, - { - "email": "49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579" - }, - { - "email": "2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c" - } - ] - } - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - }, - "destination": { - "Config": { - "customerAccountId": "89236978", - "customerId": "78678678", - "audienceId": "564567", - "hashEmail": false - } - } - }, - "output": [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "", - "headers": {}, - "params": {}, - "body": { - "JSON": { - "list": [ - { - "email": "ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b", - "hashedEmail": "ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b" - }, - { - "email": "49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579", - "hashedEmail": "49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579" - }, - { - "email": "2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c", - "hashedEmail": "2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c" - } - ], - "action": "Remove" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "", - "headers": {}, - "params": {}, - "body": { - "JSON": { - "list": [ - { - "email": "ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b", - "hashedEmail": "ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b" - }, - { - "email": "49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579", - "hashedEmail": "49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579" - }, - { - "email": "2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c", - "hashedEmail": "2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c" - } - ], - "action": "Replace" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ] - }, - { - "description": "Only single user data is present", - "input": { - "message": { - "userId": "user 1", - "type": "audiencelist", - "properties": { - "listData": { - "add": [ - { - "email": "alex@email.com" - } - ] - } - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - }, - "metadata": { - "sourceType": "", - "destinationType": "", - "namespace": "" - }, - "destination": { - "DestinationDefinition": { - "Config": { - "cdkV2Enabled": true - } - }, - "Config": { - "customerAccountId": "89236978", - "customerId": "78678678", - "audienceId": "564567", - "hashEmail": true - } - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "", - "headers": {}, - "params": {}, - "body": { - "JSON": { - "list": [ - { - "hashedEmail": "ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b", - "email": "alex@email.com" - } - ], - "action": "Add" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - } -] diff --git a/test/__tests__/data/bingads_audience_steps.ts b/test/__tests__/data/bingads_audience_steps.ts deleted file mode 100644 index a6f665956a..0000000000 --- a/test/__tests__/data/bingads_audience_steps.ts +++ /dev/null @@ -1,155 +0,0 @@ -export const data = [ - { - description: 'unhashed email available with hashEmail as true in config', - stepName: 'prepareIdentifiersList', - input: { - message: { - userId: 'user 1', - type: 'audiencelist', - properties: { - listData: { - add: [ - { - email: 'alex@email.com', - }, - { - email: 'amy@abc.com', - }, - { - email: 'van@abc.com', - }, - ], - }, - }, - context: { - ip: '14.5.67.21', - library: { - name: 'http', - }, - }, - timestamp: '2020-02-02T00:23:09.544Z', - }, - destination: { - Config: { - customerAccountId: '89236978', - customerId: '78678678', - audienceId: '564567', - hashEmail: true, - }, - }, - }, - output: [ - { - list: [ - { - hashedEmail: 'ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b', - email: 'alex@email.com', - }, - { - hashedEmail: '49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579', - email: 'amy@abc.com', - }, - { - hashedEmail: '2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c', - email: 'van@abc.com', - }, - ], - action: 'Add', - }, - ], - }, - { - description: 'hashed email available with hashEmail as false in config', - stepName: 'prepareIdentifiersList', - bindings: undefined, - input: { - message: { - userId: 'user 1', - type: 'audiencelist', - properties: { - listData: { - update: [ - { - email: 'ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b', - }, - { - email: '49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579', - }, - ], - remove: [ - { - email: '2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c', - }, - ], - }, - }, - context: { - ip: '14.5.67.21', - library: { - name: 'http', - }, - }, - timestamp: '2020-02-02T00:23:09.544Z', - }, - destination: { - Config: { - customerAccountId: '89236978', - customerId: '78678678', - audienceId: '564567', - hashEmail: false, - }, - }, - }, - output: [ - { - list: [ - { - hashedEmail: 'ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b', - email: 'ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b', - }, - { - hashedEmail: '49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579', - email: '49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579', - }, - ], - action: 'Replace', - }, - { - list: [ - { - hashedEmail: '2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c', - email: '2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c', - }, - ], - action: 'Remove', - }, - ], - }, - { - description: 'validateInput should fail when properties are missing', - stepName: 'validateInput', - bindings: undefined, - input: { - message: { - userId: 'user 1', - type: 'audiencelist', - context: { - ip: '14.5.67.21', - library: { - name: 'http', - }, - }, - timestamp: '2020-02-02T00:23:09.544Z', - }, - destination: { - Config: { - customerAccountId: '89236978', - customerId: '78678678', - audienceId: '564567', - hashEmail: false, - }, - }, - }, - error: 'Message properties is not present. Aborting message.', - }, -]; diff --git a/test/__tests__/data/facebook_conversions.json b/test/__tests__/data/facebook_conversions.json deleted file mode 100644 index cc4d9a1421..0000000000 --- a/test/__tests__/data/facebook_conversions.json +++ /dev/null @@ -1,1157 +0,0 @@ -[ - { - "description": "Timestamp validation. Events must be sent within seven days of their occurrence or up to one minute in the future", - "input": { - "message": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "channel": "web", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "screen": { - "height": "100", - "density": 50 - }, - "traits": { - "email": " aBc@gmail.com ", - "address": { - "zip": 1234 - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "randomevent", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "revenue": 400, - "additional_bet_index": 0 - }, - "timestamp": "2023-09-01T15:46:51.693229+05:30", - "type": "track" - }, - "destination": { - "Config": { - "limitedDataUsage": true, - "blacklistPiiProperties": [ - { - "blacklistPiiProperties": "", - "blacklistPiiHash": false - } - ], - "accessToken": "09876", - "datasetId": "dummyID", - "eventsToEvents": [ - { - "from": "", - "to": "" - } - ], - "eventCustomProperties": [ - { - "eventCustomProperties": "" - } - ], - "removeExternalId": true, - "whitelistPiiProperties": [ - { - "whitelistPiiProperties": "" - } - ] - }, - "Enabled": true - } - }, - "output": { - "error": "Events must be sent within seven days of their occurrence or up to one minute in the future." - } - }, - { - "description": "Track event without event property set", - "input": { - "message": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "channel": "web", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "screen": { - "height": "100", - "density": 50 - }, - "traits": { - "email": " aBc@gmail.com ", - "address": { - "zip": 1234 - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "revenue": 400, - "additional_bet_index": 0 - }, - "timestamp": "2023-11-12T15:46:51.693229+05:30", - "type": "track" - }, - "destination": { - "Config": { - "limitedDataUsage": true, - "blacklistPiiProperties": [ - { - "blacklistPiiProperties": "", - "blacklistPiiHash": false - } - ], - "accessToken": "09876", - "datasetId": "dummyID", - "eventsToEvents": [ - { - "from": "", - "to": "" - } - ], - "eventCustomProperties": [ - { - "eventCustomProperties": "" - } - ], - "removeExternalId": true, - "whitelistPiiProperties": [ - { - "whitelistPiiProperties": "" - } - ], - "actionSource": "website" - }, - "Enabled": true - } - }, - "output": { - "error": "'event' is required and should be a string" - } - }, - { - "description": "Simple track event", - "input": { - "message": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "channel": "web", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "screen": { - "height": "100", - "density": 50 - }, - "traits": { - "email": " aBc@gmail.com ", - "address": { - "zip": 1234 - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "spin_result", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "revenue": 400, - "additional_bet_index": 0 - }, - "timestamp": "2023-11-12T15:46:51.693229+05:30", - "type": "track" - }, - "destination": { - "Config": { - "limitedDataUsage": true, - "blacklistPiiProperties": [ - { - "blacklistPiiProperties": "", - "blacklistPiiHash": false - } - ], - "accessToken": "09876", - "datasetId": "dummyID", - "eventsToEvents": [ - { - "from": "", - "to": "" - } - ], - "eventCustomProperties": [ - { - "eventCustomProperties": "" - } - ], - "removeExternalId": true, - "whitelistPiiProperties": [ - { - "whitelistPiiProperties": "" - } - ], - "actionSource": "website" - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://graph.facebook.com/v18.0/dummyID/events?access_token=09876", - "headers": {}, - "params": {}, - "body": { - "JSON": {}, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "data": [ - "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"spin_result\",\"event_time\":1699784211,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"value\":400,\"currency\":\"USD\"}}" - ] - } - }, - "files": {} - } - }, - { - "description": "Track event with standard event products searched", - "input": { - "message": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "channel": "web", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "screen": { - "height": "100", - "density": 50 - }, - "traits": { - "email": " aBc@gmail.com ", - "address": { - "zip": 1234 - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "products searched", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "revenue": 400, - "additional_bet_index": 0 - }, - "timestamp": "2023-11-12T15:46:51.693229+05:30", - "type": "track" - }, - "destination": { - "Config": { - "limitedDataUsage": true, - "blacklistPiiProperties": [ - { - "blacklistPiiProperties": "", - "blacklistPiiHash": false - } - ], - "accessToken": "09876", - "datasetId": "dummyID", - "eventsToEvents": [ - { - "from": "", - "to": "" - } - ], - "eventCustomProperties": [ - { - "eventCustomProperties": "" - } - ], - "removeExternalId": true, - "whitelistPiiProperties": [ - { - "whitelistPiiProperties": "" - } - ], - "actionSource": "website" - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://graph.facebook.com/v18.0/dummyID/events?access_token=09876", - "headers": {}, - "params": {}, - "body": { - "JSON": {}, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "data": [ - "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"Search\",\"event_time\":1699784211,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"content_ids\":[],\"contents\":[],\"content_type\":\"product\",\"currency\":\"USD\",\"value\":400}}" - ] - } - }, - "files": {} - } - }, - { - "description": "Track event with standard event product added", - "input": { - "message": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "channel": "web", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "screen": { - "height": "100", - "density": 50 - }, - "traits": { - "email": " aBc@gmail.com ", - "address": { - "zip": 1234 - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "product added", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "revenue": 400, - "additional_bet_index": 0 - }, - "timestamp": "2023-11-12T15:46:51.693229+05:30", - "type": "track" - }, - "destination": { - "Config": { - "limitedDataUsage": true, - "blacklistPiiProperties": [ - { - "blacklistPiiProperties": "", - "blacklistPiiHash": false - } - ], - "accessToken": "09876", - "datasetId": "dummyID", - "eventsToEvents": [ - { - "from": "", - "to": "" - } - ], - "eventCustomProperties": [ - { - "eventCustomProperties": "" - } - ], - "removeExternalId": true, - "whitelistPiiProperties": [ - { - "whitelistPiiProperties": "" - } - ], - "actionSource": "website" - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://graph.facebook.com/v18.0/dummyID/events?access_token=09876", - "headers": {}, - "params": {}, - "body": { - "JSON": {}, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "data": [ - "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"AddToCart\",\"event_time\":1699784211,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"content_ids\":[],\"contents\":[],\"content_type\":\"product\",\"currency\":\"USD\",\"value\":400}}" - ] - } - }, - "files": {} - } - }, - { - "description": "Track event with standard event product viewed", - "input": { - "message": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "channel": "web", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "screen": { - "height": "100", - "density": 50 - }, - "traits": { - "email": " aBc@gmail.com ", - "address": { - "zip": 1234 - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "product viewed", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "revenue": 400, - "additional_bet_index": 0 - }, - "timestamp": "2023-11-12T15:46:51.693229+05:30", - "type": "track" - }, - "destination": { - "Config": { - "limitedDataUsage": true, - "blacklistPiiProperties": [ - { - "blacklistPiiProperties": "", - "blacklistPiiHash": false - } - ], - "accessToken": "09876", - "datasetId": "dummyID", - "eventsToEvents": [ - { - "from": "", - "to": "" - } - ], - "eventCustomProperties": [ - { - "eventCustomProperties": "" - } - ], - "removeExternalId": true, - "whitelistPiiProperties": [ - { - "whitelistPiiProperties": "" - } - ], - "actionSource": "website" - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://graph.facebook.com/v18.0/dummyID/events?access_token=09876", - "headers": {}, - "params": {}, - "body": { - "JSON": {}, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "data": [ - "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"ViewContent\",\"event_time\":1699784211,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"content_ids\":[],\"contents\":[],\"content_type\":\"product\",\"currency\":\"USD\",\"value\":400}}" - ] - } - }, - "files": {} - } - }, - { - "description": "Track event with standard event product list viewed", - "input": { - "message": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "channel": "web", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "screen": { - "height": "100", - "density": 50 - }, - "traits": { - "email": " aBc@gmail.com ", - "address": { - "zip": 1234 - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "product list viewed", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "revenue": 400, - "additional_bet_index": 0, - "products": [ - { - "product_id": 1234, - "quantity": 5, - "price": 55 - } - ] - }, - "timestamp": "2023-11-12T15:46:51.693229+05:30", - "type": "track" - }, - "destination": { - "Config": { - "limitedDataUsage": true, - "blacklistPiiProperties": [ - { - "blacklistPiiProperties": "", - "blacklistPiiHash": false - } - ], - "accessToken": "09876", - "datasetId": "dummyID", - "eventsToEvents": [ - { - "from": "", - "to": "" - } - ], - "eventCustomProperties": [ - { - "eventCustomProperties": "" - } - ], - "removeExternalId": true, - "whitelistPiiProperties": [ - { - "whitelistPiiProperties": "" - } - ], - "actionSource": "website" - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://graph.facebook.com/v18.0/dummyID/events?access_token=09876", - "headers": {}, - "params": {}, - "body": { - "JSON": {}, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "data": [ - "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"ViewContent\",\"event_time\":1699784211,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"products\":[{\"product_id\":1234,\"quantity\":5,\"price\":55}],\"content_ids\":[1234],\"contents\":[{\"id\":1234,\"quantity\":5,\"item_price\":55}],\"content_type\":\"product\",\"currency\":\"USD\",\"value\":400}}" - ] - } - }, - "files": {} - } - }, - { - "description": "Track event with standard event product list viewed without products array", - "input": { - "message": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "channel": "web", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "screen": { - "height": "100", - "density": 50 - }, - "traits": { - "email": " aBc@gmail.com ", - "address": { - "zip": 1234 - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "product list viewed", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "revenue": 400, - "additional_bet_index": 0, - "category": "randomCategory" - }, - "timestamp": "2023-11-12T15:46:51.693229+05:30", - "type": "track" - }, - "destination": { - "Config": { - "limitedDataUsage": true, - "blacklistPiiProperties": [ - { - "blacklistPiiProperties": "", - "blacklistPiiHash": false - } - ], - "accessToken": "09876", - "datasetId": "dummyID", - "eventsToEvents": [ - { - "from": "", - "to": "" - } - ], - "eventCustomProperties": [ - { - "eventCustomProperties": "" - } - ], - "removeExternalId": true, - "whitelistPiiProperties": [ - { - "whitelistPiiProperties": "" - } - ], - "actionSource": "website" - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://graph.facebook.com/v18.0/dummyID/events?access_token=09876", - "headers": {}, - "params": {}, - "body": { - "JSON": {}, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "data": [ - "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"ViewContent\",\"event_time\":1699784211,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"category\":\"randomCategory\",\"content_ids\":[\"randomCategory\"],\"contents\":[{\"id\":\"randomCategory\",\"quantity\":1}],\"content_type\":\"product_group\",\"content_category\":\"randomCategory\",\"currency\":\"USD\",\"value\":400}}" - ] - } - }, - "files": {} - } - }, - { - "description": "Track event with standard event product added to wishlist", - "input": { - "message": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "channel": "web", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "screen": { - "height": "100", - "density": 50 - }, - "traits": { - "email": " aBc@gmail.com ", - "address": { - "zip": 1234 - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "product added to wishlist", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "revenue": 400, - "additional_bet_index": 0 - }, - "timestamp": "2023-11-12T15:46:51.693229+05:30", - "type": "track" - }, - "destination": { - "Config": { - "limitedDataUsage": true, - "blacklistPiiProperties": [ - { - "blacklistPiiProperties": "", - "blacklistPiiHash": false - } - ], - "accessToken": "09876", - "datasetId": "dummyID", - "eventsToEvents": [ - { - "from": "", - "to": "" - } - ], - "eventCustomProperties": [ - { - "eventCustomProperties": "" - } - ], - "removeExternalId": true, - "whitelistPiiProperties": [ - { - "whitelistPiiProperties": "" - } - ], - "actionSource": "website" - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://graph.facebook.com/v18.0/dummyID/events?access_token=09876", - "headers": {}, - "params": {}, - "body": { - "JSON": {}, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "data": [ - "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"AddToWishlist\",\"event_time\":1699784211,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"content_ids\":[],\"contents\":[],\"currency\":\"USD\",\"value\":400}}" - ] - } - }, - "files": {} - } - }, - { - "description": "Track event with standard event payment info entered", - "input": { - "message": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "channel": "web", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "screen": { - "height": "100", - "density": 50 - }, - "traits": { - "email": " aBc@gmail.com ", - "address": { - "zip": 1234 - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "payment info entered", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "revenue": 400, - "additional_bet_index": 0 - }, - "timestamp": "2023-11-12T15:46:51.693229+05:30", - "type": "track" - }, - "destination": { - "Config": { - "limitedDataUsage": true, - "blacklistPiiProperties": [ - { - "blacklistPiiProperties": "", - "blacklistPiiHash": false - } - ], - "accessToken": "09876", - "datasetId": "dummyID", - "eventsToEvents": [ - { - "from": "", - "to": "" - } - ], - "eventCustomProperties": [ - { - "eventCustomProperties": "" - } - ], - "removeExternalId": true, - "whitelistPiiProperties": [ - { - "whitelistPiiProperties": "" - } - ], - "actionSource": "website" - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://graph.facebook.com/v18.0/dummyID/events?access_token=09876", - "headers": {}, - "params": {}, - "body": { - "JSON": {}, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "data": [ - "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"AddPaymentInfo\",\"event_time\":1699784211,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"content_ids\":[],\"contents\":[],\"currency\":\"USD\",\"value\":400}}" - ] - } - }, - "files": {} - } - }, - { - "description": "Track event with standard event order completed with delivery_category in products array", - "input": { - "message": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "channel": "web", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "screen": { - "height": "100", - "density": 50 - }, - "traits": { - "email": " aBc@gmail.com ", - "address": { - "zip": 1234 - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "order completed", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "revenue": 400, - "additional_bet_index": 0, - "products": [ - { - "product_id": 1234, - "quantity": 5, - "price": 55, - "delivery_category": "home_delivery" - } - ] - }, - "timestamp": "2023-11-12T15:46:51.693229+05:30", - "type": "track" - }, - "destination": { - "Config": { - "limitedDataUsage": true, - "blacklistPiiProperties": [ - { - "blacklistPiiProperties": "", - "blacklistPiiHash": false - } - ], - "accessToken": "09876", - "datasetId": "dummyID", - "eventsToEvents": [ - { - "from": "", - "to": "" - } - ], - "eventCustomProperties": [ - { - "eventCustomProperties": "" - } - ], - "removeExternalId": true, - "whitelistPiiProperties": [ - { - "whitelistPiiProperties": "" - } - ], - "actionSource": "website" - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://graph.facebook.com/v18.0/dummyID/events?access_token=09876", - "headers": {}, - "params": {}, - "body": { - "JSON": {}, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "data": [ - "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"Purchase\",\"event_time\":1699784211,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"products\":[{\"product_id\":1234,\"quantity\":5,\"price\":55,\"delivery_category\":\"home_delivery\"}],\"content_ids\":[1234],\"contents\":[{\"id\":1234,\"quantity\":5,\"item_price\":55,\"delivery_category\":\"home_delivery\"}],\"content_type\":\"product\",\"currency\":\"USD\",\"value\":400,\"num_items\":1}}" - ] - } - }, - "files": {} - } - }, - { - "description": "Track event with standard event order completed with delivery_category in properties", - "input": { - "message": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "channel": "web", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "screen": { - "height": "100", - "density": 50 - }, - "traits": { - "email": " aBc@gmail.com ", - "address": { - "zip": 1234 - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "order completed", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "revenue": 400, - "additional_bet_index": 0, - "delivery_category": "home_delivery", - "products": [ - { - "product_id": 1234, - "quantity": 5, - "price": 55 - } - ] - }, - "timestamp": "2023-11-12T15:46:51.693229+05:30", - "type": "track" - }, - "destination": { - "Config": { - "limitedDataUsage": true, - "blacklistPiiProperties": [ - { - "blacklistPiiProperties": "", - "blacklistPiiHash": false - } - ], - "accessToken": "09876", - "datasetId": "dummyID", - "eventsToEvents": [ - { - "from": "", - "to": "" - } - ], - "eventCustomProperties": [ - { - "eventCustomProperties": "" - } - ], - "removeExternalId": true, - "whitelistPiiProperties": [ - { - "whitelistPiiProperties": "" - } - ], - "actionSource": "website" - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://graph.facebook.com/v18.0/dummyID/events?access_token=09876", - "headers": {}, - "params": {}, - "body": { - "JSON": {}, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "data": [ - "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"Purchase\",\"event_time\":1699784211,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"delivery_category\":\"home_delivery\",\"products\":[{\"product_id\":1234,\"quantity\":5,\"price\":55}],\"content_ids\":[1234],\"contents\":[{\"id\":1234,\"quantity\":5,\"item_price\":55,\"delivery_category\":\"home_delivery\"}],\"content_type\":\"product\",\"currency\":\"USD\",\"value\":400,\"num_items\":1}}" - ] - } - }, - "files": {} - } - } -] diff --git a/test/__tests__/data/facebook_conversions_router_input.json b/test/__tests__/data/facebook_conversions_router_input.json deleted file mode 100644 index b8865d124e..0000000000 --- a/test/__tests__/data/facebook_conversions_router_input.json +++ /dev/null @@ -1,158 +0,0 @@ -[ - { - "metadata": { - "jobId": 1 - }, - "message": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "channel": "web", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "screen": { - "height": "100", - "density": 50 - }, - "traits": { - "email": " aBc@gmail.com ", - "address": { - "zip": 1234 - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "spin_result", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "revenue": 400, - "additional_bet_index": 0 - }, - "timestamp": "2023-11-12T15:46:51.693229+05:30", - "type": "track" - }, - "destination": { - "Config": { - "limitedDataUsage": true, - "blacklistPiiProperties": [ - { - "blacklistPiiProperties": "", - "blacklistPiiHash": false - } - ], - "accessToken": "09876", - "datasetId": "dummyID", - "eventsToEvents": [ - { - "from": "", - "to": "" - } - ], - "eventCustomProperties": [ - { - "eventCustomProperties": "" - } - ], - "removeExternalId": true, - "whitelistPiiProperties": [ - { - "whitelistPiiProperties": "" - } - ], - "actionSource": "website" - }, - "Enabled": true - } - }, - { - "metadata": { - "jobId": 2 - }, - "message": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "channel": "web", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "screen": { - "height": "100", - "density": 50 - }, - "traits": { - "email": " aBc@gmail.com ", - "address": { - "zip": 1234 - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "products searched", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "revenue": 400, - "additional_bet_index": 0 - }, - "timestamp": "2023-11-12T15:46:51.693229+05:30", - "type": "track" - }, - "destination": { - "Config": { - "limitedDataUsage": true, - "blacklistPiiProperties": [ - { - "blacklistPiiProperties": "", - "blacklistPiiHash": false - } - ], - "accessToken": "09876", - "datasetId": "dummyID", - "eventsToEvents": [ - { - "from": "", - "to": "" - } - ], - "eventCustomProperties": [ - { - "eventCustomProperties": "" - } - ], - "removeExternalId": true, - "whitelistPiiProperties": [ - { - "whitelistPiiProperties": "" - } - ], - "actionSource": "website" - }, - "Enabled": true - } - } -] diff --git a/test/__tests__/data/facebook_conversions_router_output.json b/test/__tests__/data/facebook_conversions_router_output.json deleted file mode 100644 index 542c173090..0000000000 --- a/test/__tests__/data/facebook_conversions_router_output.json +++ /dev/null @@ -1,122 +0,0 @@ -[ - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://graph.facebook.com/v18.0/dummyID/events?access_token=09876", - "headers": {}, - "params": {}, - "body": { - "JSON": {}, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "data": [ - "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"spin_result\",\"event_time\":1699784211,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"value\":400,\"currency\":\"USD\"}}" - ] - } - }, - "files": {} - }, - "metadata": [ - { - "jobId": 1 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "limitedDataUsage": true, - "blacklistPiiProperties": [ - { - "blacklistPiiProperties": "", - "blacklistPiiHash": false - } - ], - "accessToken": "09876", - "datasetId": "dummyID", - "eventsToEvents": [ - { - "from": "", - "to": "" - } - ], - "eventCustomProperties": [ - { - "eventCustomProperties": "" - } - ], - "removeExternalId": true, - "whitelistPiiProperties": [ - { - "whitelistPiiProperties": "" - } - ], - "actionSource": "website" - }, - "Enabled": true - } - }, - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://graph.facebook.com/v18.0/dummyID/events?access_token=09876", - "headers": {}, - "params": {}, - "body": { - "JSON": {}, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "data": [ - "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"Search\",\"event_time\":1699784211,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"content_ids\":[],\"contents\":[],\"content_type\":\"product\",\"currency\":\"USD\",\"value\":400}}" - ] - } - }, - "files": {} - }, - "metadata": [ - { - "jobId": 2 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "limitedDataUsage": true, - "blacklistPiiProperties": [ - { - "blacklistPiiProperties": "", - "blacklistPiiHash": false - } - ], - "accessToken": "09876", - "datasetId": "dummyID", - "eventsToEvents": [ - { - "from": "", - "to": "" - } - ], - "eventCustomProperties": [ - { - "eventCustomProperties": "" - } - ], - "removeExternalId": true, - "whitelistPiiProperties": [ - { - "whitelistPiiProperties": "" - } - ], - "actionSource": "website" - }, - "Enabled": true - } - } -] diff --git a/test/__tests__/data/ga4.json b/test/__tests__/data/ga4.json deleted file mode 100644 index 5645c51457..0000000000 --- a/test/__tests__/data/ga4.json +++ /dev/null @@ -1,12734 +0,0 @@ -[ - { - "description": "(gtag) check all property mappings for 'Products Searched' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99v4f979fb997ce453373900f891" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "Products Searched", - "properties": { - "query": "t-shirts" - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-22T10:57:58Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - } - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "timestamp_micros": 1650950229000000, - "events": [ - { - "name": "search", - "params": { - "search_term": "t-shirts", - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) check all property mappings for 'product list viewed' event", - "input": { - "message": { - "channel": "web", - "rudderId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99v4f979fb997ce453373900f891" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "product list viewed", - "properties": { - "list_id": "related_products", - "category": "Related_products", - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - } - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "view_item_list", - "params": { - "item_list_id": "related_products", - "item_list_name": "Related_products", - "items": [ - { - "item_id": "507f1f77bcf86cd799439011", - "item_name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "item_category": "Apparel", - "item_brand": "Google", - "item_variant": "green", - "price": 19, - "quantity": 2, - "index": 1, - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ], - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) check all property mappings for 'promotion viewed' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "promotion viewed", - "properties": { - "creative_name": "Summer Banner", - "creative_slot": "featured_app_1", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "0", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "creative_name": "summer_banner2", - "creative_slot": "featured_app_1" - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "client_id": "client_id", - "events": [ - { - "name": "view_promotion", - "params": { - "creative_name": "Summer Banner", - "creative_slot": "featured_app_1", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "engagement_time_msec": 1, - "items": [ - { - "item_id": "507f1f77bcf86cd799439011", - "item_name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "item_category": "Apparel", - "item_brand": "Google", - "item_variant": "green", - "price": 19, - "quantity": 2, - "index": 0, - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "creative_name": "summer_banner2", - "creative_slot": "featured_app_1" - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) check all property mappings for 'promotion clicked' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "promotion clicked", - "properties": { - "creative_name": "Summer Banner", - "creative_slot": "featured_app_1", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "0", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "creative_name": "summer_banner2", - "creative_slot": "featured_app_1" - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "select_promotion", - "params": { - "creative_name": "Summer Banner", - "creative_slot": "featured_app_1", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "engagement_time_msec": 1, - "items": [ - { - "item_id": "507f1f77bcf86cd799439011", - "item_name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "item_category": "Apparel", - "item_brand": "Google", - "item_variant": "green", - "price": 19, - "quantity": 2, - "index": 0, - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "creative_name": "summer_banner2", - "creative_slot": "featured_app_1" - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) exclude only 'products' property from 'promotion clicked' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "promotion clicked", - "properties": { - "creative_name": "Summer Banner", - "creative_slot": "featured_app_1", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale" - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "select_promotion", - "params": { - "creative_name": "Summer Banner", - "creative_slot": "featured_app_1", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) check all property mappings for 'product clicked' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "product clicked", - "properties": { - "list_id": "related_products", - "category": "Related_products", - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345", - "timezone": { - "name": "Europe/Tallinn" - }, - "engagementTimeMsec": 100, - "sessionId": 655 - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "select_item", - "params": { - "item_list_id": "related_products", - "item_list_name": "Related_products", - "items": [ - { - "item_id": "507f1f77bcf86cd799439011", - "item_name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "item_category": "Related_products", - "item_brand": "Google", - "item_variant": "green", - "price": 19, - "quantity": 2, - "index": 1, - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ], - "timezone_name": "Europe/Tallinn", - "engagement_time_msec": 100, - "session_id": 655 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) check all property mappings for 'product viewed' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "product viewed", - "properties": { - "currency": "USD", - "total": "7.77", - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "view_item", - "params": { - "currency": "USD", - "value": 7.77, - "engagement_time_msec": 1, - "items": [ - { - "item_id": "507f1f77bcf86cd799439011", - "item_name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "item_category": "Apparel", - "item_brand": "Google", - "item_variant": "green", - "price": 19, - "quantity": 2, - "index": 1, - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) check all property mappings for 'promotion clicked' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "promotion clicked", - "properties": { - "creative_name": "Summer Banner", - "creative_slot": "featured_app_1", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "0", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "creative_name": "summer_banner2", - "creative_slot": "featured_app_1" - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "typesOfClient": "gtag", - "firebaseAppId": "1:17864591371:android:7a9520d3c78962e21f9fee", - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "client_id": "client_id", - "events": [ - { - "name": "select_promotion", - "params": { - "creative_name": "Summer Banner", - "creative_slot": "featured_app_1", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "engagement_time_msec": 1, - "items": [ - { - "item_id": "507f1f77bcf86cd799439011", - "item_name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "item_category": "Apparel", - "item_brand": "Google", - "item_variant": "green", - "price": 19, - "quantity": 2, - "index": 0, - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "creative_name": "summer_banner2", - "creative_slot": "featured_app_1" - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(firebase) check all property mappings for 'promotion clicked' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "promotion clicked", - "properties": { - "creative_name": "Summer Banner", - "creative_slot": "featured_app_1", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "0", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "creative_name": "summer_banner2", - "creative_slot": "featured_app_1" - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "typesOfClient": "firebase", - "firebaseAppId": "1:17864591371:android:7a9520d3c78962e21f9fee", - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "firebase_app_id": "1:17864591371:android:7a9520d3c78962e21f9fee" - }, - "body": { - "JSON": { - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "app_instance_id": "f0dd99b6f979fb551ce583373900f937", - "events": [ - { - "name": "select_promotion", - "params": { - "creative_name": "Summer Banner", - "creative_slot": "featured_app_1", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "engagement_time_msec": 1, - "items": [ - { - "item_id": "507f1f77bcf86cd799439011", - "item_name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "item_category": "Apparel", - "item_brand": "Google", - "item_variant": "green", - "price": 19, - "quantity": 2, - "index": 0, - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "creative_name": "summer_banner2", - "creative_slot": "featured_app_1" - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) check all property mappings for 'product added' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "product added", - "properties": { - "currency": "USD", - "total": "7.77", - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "add_to_cart", - "params": { - "currency": "USD", - "value": 7.77, - "engagement_time_msec": 1, - "items": [ - { - "item_id": "507f1f77bcf86cd799439011", - "item_name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "item_category": "Apparel", - "item_brand": "Google", - "item_variant": "green", - "price": 19, - "quantity": 2, - "index": 1, - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) check all property mappings for 'product removed' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "product removed", - "properties": { - "currency": "USD", - "total": "7.77", - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ], - "engagementTimeMsec": 100, - "sessionId": 655 - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "remove_from_cart", - "params": { - "currency": "USD", - "value": 7.77, - "items": [ - { - "item_id": "507f1f77bcf86cd799439011", - "item_name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "item_category": "Apparel", - "item_brand": "Google", - "item_variant": "green", - "price": 19, - "quantity": 2, - "index": 1, - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ], - "engagement_time_msec": 100, - "session_id": 655 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) check all property mappings for 'cart viewed' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "cart viewed", - "properties": { - "currency": "USD", - "total": "7.77", - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "view_cart", - "params": { - "currency": "USD", - "value": 7.77, - "engagement_time_msec": 1, - "items": [ - { - "item_id": "507f1f77bcf86cd799439011", - "item_name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "item_category": "Apparel", - "item_brand": "Google", - "item_variant": "green", - "price": 19, - "quantity": 2, - "index": 1, - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) check all property mappings for 'checkout started' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "checkout started", - "properties": { - "currency": "USD", - "total": 7.77, - "coupon": "SUMMER_FUN", - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "begin_checkout", - "params": { - "currency": "USD", - "value": 7.77, - "coupon": "SUMMER_FUN", - "engagement_time_msec": 1, - "items": [ - { - "item_id": "507f1f77bcf86cd799439011", - "item_name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "item_category": "Apparel", - "item_brand": "Google", - "item_variant": "green", - "price": 19, - "quantity": 2, - "index": 1, - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) check all property mappings for 'payment info entered' -> 'add_payment_info' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "payment info entered", - "properties": { - "currency": "USD", - "value": "7.77", - "coupon": "SUMMER_FUN", - "payment_method": "Credit Card", - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "params": { - "currency": "USD", - "value": 7.77, - "coupon": "SUMMER_FUN", - "payment_type": "Credit Card", - "engagement_time_msec": 1, - "items": [ - { - "item_id": "507f1f77bcf86cd799439011", - "item_name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "item_category": "Apparel", - "item_brand": "Google", - "item_variant": "green", - "price": 19, - "quantity": 2, - "index": 1, - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - }, - "name": "add_payment_info" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) check all property mappings for 'checkout Step Completed' -> 'add_shipping_info' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "checkout Step Completed", - "properties": { - "currency": "USD", - "value": "7.77", - "coupon": "SUMMER_FUN", - "shipping_method": "Ground", - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "params": { - "currency": "USD", - "value": 7.77, - "coupon": "SUMMER_FUN", - "shipping_tier": "Ground", - "engagement_time_msec": 1, - "items": [ - { - "item_id": "507f1f77bcf86cd799439011", - "item_name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "item_category": "Apparel", - "item_brand": "Google", - "item_variant": "green", - "price": 19, - "quantity": 2, - "index": 1, - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - }, - "name": "add_shipping_info" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) check all property mappings for 'order completed' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "order completed", - "properties": { - "currency": "USD", - "order_id": "T_12345", - "total": 12.21, - "affiliation": "Google Store", - "coupon": "SUMMER_FUN", - "shipping": 3.33, - "tax": 1.11, - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "purchase", - "params": { - "currency": "USD", - "transaction_id": "T_12345", - "value": 12.21, - "affiliation": "Google Store", - "coupon": "SUMMER_FUN", - "shipping": 3.33, - "tax": 1.11, - "engagement_time_msec": 1, - "items": [ - { - "item_id": "507f1f77bcf86cd799439011", - "item_name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "item_category": "Apparel", - "item_brand": "Google", - "item_variant": "green", - "price": 19, - "quantity": 2, - "index": 1, - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) check all property mappings for 'order refunded' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "order refunded", - "properties": { - "currency": "USD", - "order_id": "T_12345", - "total": 12.21, - "affiliation": "Google Store", - "coupon": "SUMMER_FUN", - "shipping": 3.33, - "tax": 1.11, - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "refund", - "params": { - "currency": "USD", - "transaction_id": "T_12345", - "value": 12.21, - "affiliation": "Google Store", - "coupon": "SUMMER_FUN", - "shipping": 3.33, - "tax": 1.11, - "engagement_time_msec": 1, - "items": [ - { - "item_id": "507f1f77bcf86cd799439011", - "item_name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "item_category": "Apparel", - "item_brand": "Google", - "item_variant": "green", - "price": 19, - "quantity": 2, - "index": 1, - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) exclude only 'products' property from 'order refunded' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "order refunded", - "properties": { - "currency": "USD", - "order_id": "T_12345", - "total": 12.21, - "affiliation": "Google Store", - "coupon": "SUMMER_FUN", - "shipping": 3.33, - "tax": 1.11 - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "refund", - "params": { - "currency": "USD", - "transaction_id": "T_12345", - "value": 12.21, - "affiliation": "Google Store", - "coupon": "SUMMER_FUN", - "shipping": 3.33, - "tax": 1.11, - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) check all property mappings for 'product added to wishlist' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "product added to wishlist", - "properties": { - "currency": "USD", - "total": "7.77", - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "add_to_wishlist", - "params": { - "currency": "USD", - "value": 7.77, - "engagement_time_msec": 1, - "items": [ - { - "item_id": "507f1f77bcf86cd799439011", - "item_name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "item_category": "Apparel", - "item_brand": "Google", - "item_variant": "green", - "price": 19, - "quantity": 2, - "index": 1, - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) check all property mappings for 'product_shared' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "product_shared", - "properties": { - "share_via": "Twitter", - "content_type": "image", - "item_id": "C_12345" - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "share", - "params": { - "method": "Twitter", - "content_type": "image", - "item_id": "C_12345", - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) send only 'product_shared' event name without it's properties", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "product_shared", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "share", - "params": { - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) check all property mappings for 'cart Shared' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "cart Shared", - "properties": { - "share_via": "Twitter", - "content_type": "image", - "item_id": "C_12345" - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "share", - "params": { - "method": "Twitter", - "content_type": "image", - "item_id": "C_12345", - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) send only 'cart Shared' event name with empty properties: {}", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "cart Shared", - "properties": {}, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "share", - "params": { - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) check all property mappings for group call", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "group", - "properties": { - "group_id": "G_12345", - "engagementTimeMsec": 100, - "sessionId": 655 - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "group", - "params": { - "group_id": "G_12345", - "engagement_time_msec": 100, - "session_id": 655 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) group: send only group event name without it's properties", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "group", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "group", - "params": { - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) check all property mappings for 'earn virtual currency' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "earn virtual currency", - "properties": { - "virtual_currency_name": "Gems", - "value": 5 - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "earn_virtual_currency", - "params": { - "virtual_currency_name": "Gems", - "value": 5, - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) send only 'earn virtual currency' event name without it's properties", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "earn virtual currency", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "earn_virtual_currency", - "params": { - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) check all property mappings for 'generate_lead' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "generate_lead", - "properties": { - "currency": "USD", - "value": 99.99 - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "generate_lead", - "params": { - "currency": "USD", - "value": 99.99, - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) check all property mappings for 'level_up' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "level_up", - "properties": { - "level": 5, - "character": "Player 1" - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "level_up", - "params": { - "level": 5, - "character": "Player 1", - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) send only 'level_up' event name without it's properties", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "level_up", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "level_up", - "params": { - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) check all property mappings for 'login' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "login", - "properties": { - "method": "Google" - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "login", - "params": { - "method": "Google", - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) send only 'login' event name without it's properties", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "login", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "login", - "params": { - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) check all property mappings for 'post_score' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "post_score", - "properties": { - "score": 10000, - "level": 5, - "character": "Player 1" - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "post_score", - "params": { - "score": 10000, - "level": 5, - "character": "Player 1", - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) send only 'login' event name with its required `score` properties", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "post_score", - "properties": { - "score": 10000 - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "post_score", - "params": { - "score": 10000, - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) check all property mappings for 'select_content' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "select_content", - "properties": { - "content_type": "product", - "item_id": "I_12345" - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "select_content", - "params": { - "content_type": "product", - "item_id": "I_12345", - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) send only 'group' event name without it's properties", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "select_content", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "select_content", - "params": { - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) check all property mappings for 'sign_up' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "sign_up", - "properties": { - "method": "Google" - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "sign_up", - "params": { - "method": "Google", - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) send only 'sign_up' event name without it's properties", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "sign_up", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "sign_up", - "params": { - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) check all property mappings for 'spend_virtual_currency' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "spend_virtual_currency", - "properties": { - "value": 5, - "virtual_currency_name": "Gems", - "item_name": "Starter Boost" - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "spend_virtual_currency", - "params": { - "value": 5, - "virtual_currency_name": "Gems", - "item_name": "Starter Boost", - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) send only 'spend_virtual_currency' event name with it's required 'value' and 'virtual_currency_name' properties", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "spend_virtual_currency", - "properties": { - "value": 5, - "virtual_currency_name": "Gems" - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "spend_virtual_currency", - "params": { - "value": 5, - "virtual_currency_name": "Gems", - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) send 'tutorial_begin' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "tutorial_begin", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "tutorial_begin", - "params": { - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) send 'tutorial_complete' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "tutorial_complete", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "tutorial_complete", - "params": { - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) send all properties for 'unlock_achievement' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "unlock_achievement", - "properties": { - "achievement_id": "A_12345" - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "unlock_achievement", - "params": { - "achievement_id": "A_12345", - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) send all properties for 'view_search_results' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "view_search_results", - "properties": { - "search_term": "Clothing", - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "view_search_results", - "params": { - "search_term": "Clothing", - "engagement_time_msec": 1, - "items": [ - { - "item_id": "507f1f77bcf86cd799439011", - "item_name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "item_category": "Apparel", - "item_brand": "Google", - "item_variant": "green", - "price": 19, - "quantity": 2, - "index": 1, - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) pass only 'products: [...]' property for 'view_search_results' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "view_search_results", - "properties": { - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "view_search_results", - "params": { - "engagement_time_msec": 1, - "items": [ - { - "item_id": "507f1f77bcf86cd799439011", - "item_name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "item_category": "Apparel", - "item_brand": "Google", - "item_variant": "green", - "price": 19, - "quantity": 2, - "index": 1, - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) pass custom event name 'rudderstack event' to GA4 along with custom properties", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "rudderstack event", - "properties": { - "total": "10", - "timezone": { - "name": "Europe/Tallinn" - }, - "engagementTimeMsec": 100, - "sessionId": 655 - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "rudderstack_event", - "params": { - "total": "10", - "timezone_name": "Europe/Tallinn", - "engagement_time_msec": 100, - "session_id": 655 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) pass custom event name 'rudderstack event' to GA4 along with custom properties and user_properties", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "rudderstack event", - "properties": { - "total": "10", - "user_properties": { - "price": "19" - } - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "user_properties": { - "price": { - "value": "19" - } - }, - "events": [ - { - "name": "rudderstack_event", - "params": { - "total": "10", - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "[Error]: (gtag) pass reserved event name to GA4", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "ad_click", - "properties": { - "total": "10" - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "statusCode": 400, - "error": "track:: Reserved event names are not allowed", - "statTags": { - "destination": "ga4", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "[Exclusion]: (gtag) pass reserved property name to GA4 for custom events", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "rudderstack event", - "properties": { - "firebase_conversion": "firebase_conversion", - "google_id": "1234", - "ga_value": "ga_value", - "value": "10" - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "rudderstack_event", - "params": { - "value": "10", - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "[Exclusion]: (gtag) pass reserved property name and reserved properties in `user_properties` to GA4 for custom events", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "rudderstack event", - "properties": { - "firebase_conversion": "firebase_conversion", - "google_id": "1234", - "ga_value": "ga_value", - "value": "10", - "user_properties": { - "first_open_time": "first_open_time", - "user_id": "user_id", - "firebase_value": "firebase_value", - "price": "100" - } - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "user_properties": { - "price": { - "value": "100" - } - }, - "events": [ - { - "name": "rudderstack_event", - "params": { - "value": "10", - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "[Error]: (gtag) pass reserved event names along with reserved properties", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "app_remove", - "properties": { - "firebase_conversion": "firebase_conversion", - "google_id": "1234", - "ga_value": "ga_value", - "value": "10", - "user_properties": { - "first_open_time": "first_open_time", - "user_id": "user_id", - "firebase_value": "firebase_value", - "price": "100" - } - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "statusCode": 400, - "error": "track:: Reserved event names are not allowed", - "statTags": { - "destination": "ga4", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "[Error] (gtag) pass reserved custom prefix names to GA4 events", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "firebase_event1", - "properties": { - "firebase_conversion": "firebase_conversion", - "google_id": "1234", - "ga_value": "ga_value", - "value": "10" - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "statusCode": 400, - "error": "Reserved custom prefix names are not allowed", - "statTags": { - "destination": "ga4", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "(gtag) check all property mappings for 'product added' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "product added", - "properties": { - "currency": "USD", - "total": "7.77", - "google_data": "google_data", - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "add_to_cart", - "params": { - "currency": "USD", - "value": 7.77, - "engagement_time_msec": 1, - "items": [ - { - "item_id": "507f1f77bcf86cd799439011", - "item_name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "item_category": "Apparel", - "item_brand": "Google", - "item_variant": "green", - "price": 19, - "quantity": 2, - "index": 1, - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) pass custom event name with its properties", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "rudderstack event", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "rudderstack_event", - "params": { - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) map 'product added' properties to ga4 'add_to_cart' items array", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "product added", - "properties": { - "affiliation": "Google Merchandise Store", - "brand": "Google", - "category": "Related_products", - "coupon": "SUMMER_FUN", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "list_id": "related_products", - "location_id": "L_12345", - "name": "Monopoly: 3rd Edition", - "position": "1", - "price": "19", - "product_id": "507f1f77bcf86cd799439011", - "products": [], - "quantity": "2", - "total": "7.77", - "variant": "green" - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "body": { - "FORM": {}, - "JSON": { - "client_id": "client_id", - "events": [ - { - "name": "add_to_cart", - "params": { - "currency": "USD", - "engagement_time_msec": 1, - "items": [ - { - "affiliation": "Google Merchandise Store", - "coupon": "SUMMER_FUN", - "currency": "USD", - "discount": 2.22, - "index": 1, - "item_brand": "Google", - "item_category": "Related_products", - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_id": "507f1f77bcf86cd799439011", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "item_name": "Monopoly: 3rd Edition", - "item_variant": "green", - "location_id": "L_12345", - "price": 19, - "quantity": 2 - } - ], - "list_id": "related_products", - "value": 7.77 - } - } - ], - "non_personalized_ads": true, - "timestamp_micros": 1650950229000000 - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://www.google-analytics.com/mp/collect", - "files": {}, - "headers": { - "Content-Type": "application/json", - "HOST": "www.google-analytics.com" - }, - "method": "POST", - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "type": "REST", - "version": "1" - } - }, - { - "description": "(gtag) pass event name with invalid data type for products: {...} properties (when products parameter is optional)", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "product added", - "properties": { - "currency": "USD", - "total": "7.77", - "products": { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - }, - "affiliation": "Google Merchandise Store", - "brand": "Google", - "category": "Related_products", - "coupon": "SUMMER_FUN", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "list_id": "related_products", - "location_id": "L_12345", - "name": "Monopoly: 3rd Edition", - "position": "1", - "price": "19", - "product_id": "507f1f77bcf86cd799439011", - "quantity": "2", - "variant": "green" - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "body": { - "FORM": {}, - "JSON": { - "client_id": "client_id", - "events": [ - { - "name": "add_to_cart", - "params": { - "currency": "USD", - "engagement_time_msec": 1, - "items": [ - { - "affiliation": "Google Merchandise Store", - "coupon": "SUMMER_FUN", - "currency": "USD", - "discount": 2.22, - "index": 1, - "item_brand": "Google", - "item_category": "Related_products", - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_id": "507f1f77bcf86cd799439011", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "item_name": "Monopoly: 3rd Edition", - "item_variant": "green", - "location_id": "L_12345", - "price": 19, - "quantity": 2 - } - ], - "list_id": "related_products", - "value": 7.77 - } - } - ], - "non_personalized_ads": true, - "timestamp_micros": 1650950229000000 - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://www.google-analytics.com/mp/collect", - "files": {}, - "headers": { - "Content-Type": "application/json", - "HOST": "www.google-analytics.com" - }, - "method": "POST", - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "type": "REST", - "version": "1" - } - }, - { - "description": "[Error] (gtag) pass event name to GA4 with missing fields i.e required in products: [..]", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "product added", - "properties": { - "currency": "USD", - "total": "7.77", - "products": [ - { - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "statusCode": 400, - "error": "One of product_id or name is required", - "statTags": { - "destination": "ga4", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "[Error] (gtag) pass event name to GA4 with missing fields i.e required in properties", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "Product Viewed", - "properties": { - "currency": "USD", - "total": "7.77" - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "statusCode": 400, - "error": "One of product_id or name is required", - "statTags": { - "destination": "ga4", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "[Error] (gtag) missing API Secret", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "tutotial complete", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "statusCode": 400, - "error": "API Secret not found. Aborting ", - "statTags": { - "destination": "ga4", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "[Error] (gtag) missing measurementId", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "tutotial complete", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "statusCode": 400, - "error": "measurementId must be provided. Aborting", - "statTags": { - "destination": "ga4", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "(gtag) firing group event with event name. should take event name by default", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "group", - "event": "tutorial complete", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "client_id": "client_id", - "events": [ - { - "name": "join_group", - "params": { - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "[Error] (gtag) payload has missing message.type", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "event": "tutotial complete", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "statusCode": 400, - "error": "Message Type is not present. Aborting message.", - "statTags": { - "destination": "ga4", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "[Error] (gtag) payload has missing event name", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "statusCode": 400, - "error": "Event name is required", - "statTags": { - "destination": "ga4", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "(gtag) taking client_id from anonymousId", - "input": { - "message": { - "channel": "web", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "tutotial complete", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "client_id": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "events": [ - { - "name": "tutotial_complete", - "params": { - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "[Error] (firebase) payload has missing ga4AppInstanceId", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "tutotial complete", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "", - "firebaseAppId": "1:17864591371:android:7a9520d3c78962e21f9fee", - "blockPageViewEvent": false, - "typesOfClient": "firebase", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "statusCode": 400, - "error": "ga4AppInstanceId must be provided under externalId", - "statTags": { - "destination": "ga4", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "[Error] (firebase) pass reserved event name", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "app_store_subscription_cancel", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "", - "firebaseAppId": "1:17864591371:android:7a9520d3c78962e21f9fee", - "blockPageViewEvent": false, - "typesOfClient": "firebase", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "statusCode": 400, - "error": "Reserved custom event names are not allowed", - "statTags": { - "destination": "ga4", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "(gtag) check all property mappings for 'tutorial complete' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "tutorial complete", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "non_personalized_ads": true, - "events": [ - { - "name": "tutorial_complete", - "params": { - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) check all property mappings for 'cart viewed' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "cart viewed", - "properties": { - "currency": "USD", - "total": "7.77", - "products": [ - { - "product_id": 0, - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "view_cart", - "params": { - "currency": "USD", - "value": 7.77, - "engagement_time_msec": 1, - "items": [ - { - "item_id": 0, - "coupon": "SUMMER_FUN", - "item_category": "Apparel", - "item_brand": "Google", - "item_variant": "green", - "price": 19, - "quantity": 2, - "index": 1, - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "[Error]: (firebase) missing firebaseAppId", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "promotion clicked", - "properties": { - "creative_name": "Summer Banner", - "creative_slot": "featured_app_1", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "0", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "creative_name": "summer_banner2", - "creative_slot": "featured_app_1" - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "", - "typesOfClient": "firebase", - "firebaseAppId": "", - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "statusCode": 400, - "error": "firebaseAppId must be provided. Aborting", - "statTags": { - "destination": "ga4", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "(gtag) firing page call", - "input": { - "message": { - "channel": "web", - "rudderId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "page", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "typesOfClient": "gtag", - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "client_id": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "events": [ - { - "name": "page_view", - "params": { - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) firing page call with custom properties", - "input": { - "message": { - "channel": "web", - "rudderId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "page", - "event": "page view", - "properties": { - "view": "login" - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "typesOfClient": "gtag", - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "client_id": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "events": [ - { - "name": "page_view", - "params": { - "view": "login", - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "[Error]: (gtag) pass timestamp more than 72 hours into the past", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-20T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "tutotial complete", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "typesOfClient": "gtag", - "blockPageViewEvent": false, - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "statusCode": 400, - "error": "Allowed timestamp is [72 hours] into the past", - "statTags": { - "destination": "ga4", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "[Error]: (gtag) pass timestamp more than 15 min into the future", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-05-05T15:47:57Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "tutotial complete", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "typesOfClient": "gtag", - "blockPageViewEvent": false, - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "statusCode": 400, - "error": "Allowed timestamp is [15 minutes] into the future", - "statTags": { - "destination": "ga4", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "(gtag) pass custom properties along with products: [..] parameters to GA4 standard events along with its stated ones", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "order completed", - "properties": { - "checkout_id": "12345", - "order_id": "1234", - "myCustomProp": "My arbitray value", - "affiliation": "Apple Store", - "total": 20, - "revenue": 15.0, - "shipping": 22, - "tax": 1, - "discount": 1.5, - "coupon": "ImagePro", - "currency": "USD", - "products": [ - { - "product_id": "123", - "sku": "G-32", - "name": "Monopoly", - "price": 14, - "quantity": 1, - "category": "Games", - "item_category2": "Board games", - "url": "https://www.website.com/product/path", - "image_url": "https://www.website.com/product/path.jpg" - } - ], - "timezone": { - "name": "Europe/Tallinn" - } - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "purchase", - "params": { - "checkout_id": "12345", - "transaction_id": "1234", - "myCustomProp": "My arbitray value", - "affiliation": "Apple Store", - "value": 20, - "shipping": 22, - "tax": 1, - "discount": 1.5, - "coupon": "ImagePro", - "currency": "USD", - "engagement_time_msec": 1, - "items": [ - { - "item_id": "123", - "sku": "G-32", - "item_name": "Monopoly", - "price": 14, - "quantity": 1, - "item_category": "Games", - "item_category2": "Board games", - "url": "https://www.website.com/product/path", - "image_url": "https://www.website.com/product/path.jpg" - } - ], - "timezone_name": "Europe/Tallinn" - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) pass custom properties excluding products: [..] parameter to GA4 standard events along with its stated ones", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "promotion clicked", - "properties": { - "customProp-1": "check-1", - "customProp-2": "check-2", - "timezone": { - "name": "Europe/Tallinn" - }, - "creative_name": "Summer Banner", - "creative_slot": "featured_app_1", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale" - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "select_promotion", - "params": { - "customProp-1": "check-1", - "customProp-2": "check-2", - "timezone_name": "Europe/Tallinn", - "creative_name": "Summer Banner", - "creative_slot": "featured_app_1", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) message type group -> 'join_group' with custom event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "group", - "traits": { - "custom1": 1234, - "custom2": "custom2", - "timezone": { - "name": "Europe/Tallinn" - }, - "engagementTimeMsec": 100, - "sessionId": 655 - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "client_id": "client_id", - "events": [ - { - "name": "join_group", - "params": { - "custom1": 1234, - "custom2": "custom2", - "timezone_name": "Europe/Tallinn", - "engagement_time_msec": 100, - "session_id": 655 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag): check args keyword for price x currency multiplication", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "product added", - "properties": { - "currency": "USD", - "price": 2.4, - "quantity": 2, - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "client_id": "client_id", - "events": [ - { - "name": "add_to_cart", - "params": { - "currency": "USD", - "value": 4.8, - "engagement_time_msec": 1, - "items": [ - { - "item_id": "507f1f77bcf86cd799439011", - "item_name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "item_category": "Apparel", - "item_brand": "Google", - "item_variant": "green", - "price": 19, - "quantity": 2, - "index": 1, - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ], - "price": 2.4, - "quantity": 2 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag): take page properties from context.page for 'page' call along with custom properties", - "input": { - "message": { - "channel": "web", - "rudderId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "page": { - "url": "http://morkey.in", - "path": "/cart", - "title": "miphone", - "search": "MI", - "referrer": "morkey" - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "page", - "integrations": { - "All": true - }, - "properties": { - "cust1": 1234, - "engagementTimeMsec": 100, - "sessionId": 655 - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "client_id": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "events": [ - { - "name": "page_view", - "params": { - "page_referrer": "morkey", - "page_title": "miphone", - "page_location": "http://morkey.in", - "cust1": 1234, - "engagement_time_msec": 100, - "session_id": 655 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "[Error] GA4: event not as string", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": { - "name": "promotion_viewed" - }, - "properties": { - "creative_name": "Summer Banner", - "creative_slot": "featured_app_1", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "0", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "creative_name": "summer_banner2", - "creative_slot": "featured_app_1" - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "statusCode": 400, - "error": "track:: event name should be string", - "statTags": { - "destination": "ga4", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "[Error] GA4: client_id not found in all four path", - "input": { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "product added", - "properties": { - "currency": "USD", - "price": 2.4, - "quantity": 2, - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - }, - "integrations": { - "All": true - } - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6BET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": true, - "sendLoginSignup": true, - "newOrExistingUserTrait": "firstLogin", - "loginSignupMethod": "method", - "generateLead": true, - "generateLeadValueTrait": "value", - "generateLeadCurrencyTrait": "currency", - "clientIdFieldIdentifier": "properties.client_id" - }, - "Enabled": true - } - }, - "output": { - "statusCode": 400, - "error": "ga4ClientId, anonymousId or messageId must be provided", - "statTags": { - "destination": "ga4", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "client_id isn't sent from the path defined in the webapp config, falling back to default values i.e here it is anonymousId", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "product added", - "properties": { - "currency": "USD", - "price": 2.4, - "quantity": 2, - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - }, - "integrations": { - "All": true - } - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6BET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": true, - "sendLoginSignup": true, - "newOrExistingUserTrait": "firstLogin", - "loginSignupMethod": "method", - "generateLead": true, - "generateLeadValueTrait": "value", - "generateLeadCurrencyTrait": "currency", - "clientIdFieldIdentifier": "properties.client_id" - }, - "Enabled": true - } - }, - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "name": "add_to_cart", - "params": { - "items": [ - { - "index": 1, - "price": 19, - "coupon": "SUMMER_FUN", - "item_id": "507f1f77bcf86cd799439011", - "currency": "USD", - "discount": 2.22, - "quantity": 2, - "item_name": "Monopoly: 3rd Edition", - "item_brand": "Google", - "affiliation": "Google Merchandise Store", - "location_id": "L_12345", - "item_list_id": "related_products", - "item_variant": "green", - "item_category": "Apparel", - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_name": "Related Products" - } - ], - "price": 2.4, - "value": 4.8, - "currency": "USD", - "quantity": 2, - "engagement_time_msec": 1 - } - } - ], - "client_id": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "non_personalized_ads": true - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6BET4" - }, - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://www.google-analytics.com/mp/collect" - } - }, - { - "description": "any custom or item property with array value, is flattened with underscore delimeter", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "product added", - "originalTimestamp": "2022-04-26T05:17:09Z", - "properties": { - "currency": "USD", - "total": "7.77", - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345", - "address": { - "city": "kolkata", - "district": "24pgs" - }, - "categoryLevels": ["Furniture", "Bedroom Furniture", "Dressers & Chests"], - "products": [ - { - "product_id": "1234", - "product_details": { - "colour": "red", - "shape": "rectangle" - }, - "productLevels": ["test1", "test2", "test3"] - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-11-14T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "client_id": "client_id", - "events": [ - { - "name": "add_to_cart", - "params": { - "currency": "USD", - "value": 7.77, - "items": [ - { - "item_id": "1234", - "product_details_colour": "red", - "product_details_shape": "rectangle", - "productLevels_0": "test1", - "productLevels_1": "test2", - "productLevels_2": "test3" - } - ], - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345", - "address_city": "kolkata", - "address_district": "24pgs", - "categoryLevels_0": "Furniture", - "categoryLevels_1": "Bedroom Furniture", - "categoryLevels_2": "Dressers & Chests", - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "extract session_id from context.sessionId", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36", - "sessionId": 16678456735 - }, - "type": "track", - "event": "product added", - "properties": { - "currency": "USD", - "price": 2.4, - "quantity": 2, - "client_id": "client@1234", - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - }, - "integrations": { - "All": true - } - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6BET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": true, - "sendLoginSignup": true, - "newOrExistingUserTrait": "firstLogin", - "loginSignupMethod": "method", - "generateLead": true, - "generateLeadValueTrait": "value", - "generateLeadCurrencyTrait": "currency" - }, - "Enabled": true - } - }, - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "name": "add_to_cart", - "params": { - "items": [ - { - "index": 1, - "price": 19, - "coupon": "SUMMER_FUN", - "item_id": "507f1f77bcf86cd799439011", - "currency": "USD", - "discount": 2.22, - "quantity": 2, - "item_name": "Monopoly: 3rd Edition", - "item_brand": "Google", - "affiliation": "Google Merchandise Store", - "location_id": "L_12345", - "item_list_id": "related_products", - "item_variant": "green", - "item_category": "Apparel", - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_name": "Related Products" - } - ], - "price": 2.4, - "value": 4.8, - "currency": "USD", - "quantity": 2, - "session_id": 16678456735, - "engagement_time_msec": 1, - "client_id": "client@1234" - } - } - ], - "client_id": "client_id", - "non_personalized_ads": true - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6BET4" - }, - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://www.google-analytics.com/mp/collect" - } - }, - { - "description": "(gtag) send integer userId", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "userId": 34567, - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36", - "sessionId": 16678456735 - }, - "type": "track", - "event": "product added", - "properties": { - "currency": "USD", - "price": 2.4, - "quantity": 2, - "client_id": "client@1234", - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - }, - "integrations": { - "All": true - } - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6BET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": true, - "sendLoginSignup": true, - "newOrExistingUserTrait": "firstLogin", - "loginSignupMethod": "method", - "generateLead": true, - "generateLeadValueTrait": "value", - "generateLeadCurrencyTrait": "currency" - }, - "Enabled": true - } - }, - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "name": "add_to_cart", - "params": { - "items": [ - { - "index": 1, - "price": 19, - "coupon": "SUMMER_FUN", - "item_id": "507f1f77bcf86cd799439011", - "currency": "USD", - "discount": 2.22, - "quantity": 2, - "item_name": "Monopoly: 3rd Edition", - "item_brand": "Google", - "affiliation": "Google Merchandise Store", - "location_id": "L_12345", - "item_list_id": "related_products", - "item_variant": "green", - "item_category": "Apparel", - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_name": "Related Products" - } - ], - "price": 2.4, - "value": 4.8, - "currency": "USD", - "quantity": 2, - "session_id": 16678456735, - "engagement_time_msec": 1, - "client_id": "client@1234" - } - } - ], - "client_id": "client_id", - "user_id": "34567", - "non_personalized_ads": true - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6BET4" - }, - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://www.google-analytics.com/mp/collect" - } - }, - { - "description": "(gtag) login event with user_properties", - "input": { - "message": { - "userId": "user@1", - "channel": "web", - "anonymousId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "traits": { - "campaign": "advertizing" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "login", - "properties": { - "method": "facebook" - }, - "integrations": { - "All": true - } - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6BET4", - "firebaseAppId": "", - "typesOfClient": "gtag", - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "name": "login", - "params": { - "method": "facebook", - "engagement_time_msec": 1 - } - } - ], - "user_id": "user@1", - "user_properties": { - "campaign": { - "value": "advertizing" - } - }, - "client_id": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "non_personalized_ads": true - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6BET4" - }, - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://www.google-analytics.com/mp/collect" - } - }, - { - "description": "(gtag) sign_up event", - "input": { - "message": { - "userId": "user@1", - "channel": "web", - "anonymousId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "traits": { - "campaign": "advertizing" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "sign_up", - "properties": { - "method": "google" - }, - "integrations": { - "All": true - } - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6BET4", - "firebaseAppId": "", - "typesOfClient": "gtag", - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "name": "sign_up", - "params": { - "method": "google", - "engagement_time_msec": 1 - } - } - ], - "user_id": "user@1", - "user_properties": { - "campaign": { - "value": "advertizing" - } - }, - "client_id": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "non_personalized_ads": true - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6BET4" - }, - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://www.google-analytics.com/mp/collect" - } - }, - { - "description": "(gtag) generate_lead event", - "input": { - "message": { - "userId": "user@1", - "channel": "web", - "anonymousId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "traits": { - "campaign": "advertizing" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "generate_lead", - "properties": { - "source": "instagram", - "value": 20 - }, - "integrations": { - "All": true - } - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6BET4", - "firebaseAppId": "", - "typesOfClient": "gtag", - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "name": "generate_lead", - "params": { - "currency": "USD", - "value": 20, - "source": "instagram", - "engagement_time_msec": 1 - } - } - ], - "user_id": "user@1", - "user_properties": { - "campaign": { - "value": "advertizing" - } - }, - "client_id": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "non_personalized_ads": true - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6BET4" - }, - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://www.google-analytics.com/mp/collect" - } - }, - { - "description": "(gtag) track call with page information such as url, title, referrer", - "input": { - "message": { - "userId": "user@1", - "channel": "web", - "anonymousId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "page": { - "initial_referrer": "$direct", - "path": "/", - "referrer": "$direct", - "tab_url": "https://www.rudderstack.com/", - "title": "Document", - "url": "https://www.rudderstack.com/" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "generate_lead", - "properties": { - "source": "instagram", - "value": 20 - }, - "integrations": { - "All": true - } - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6BET4", - "firebaseAppId": "", - "typesOfClient": "gtag", - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "name": "generate_lead", - "params": { - "currency": "USD", - "value": 20, - "source": "instagram", - "page_location": "https://www.rudderstack.com/", - "page_referrer": "$direct", - "page_title": "Document", - "engagement_time_msec": 1 - } - } - ], - "user_id": "user@1", - "client_id": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "non_personalized_ads": true - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6BET4" - }, - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://www.google-analytics.com/mp/collect" - } - }, - { - "description": "(gtag) track event with hybrid connection mode using buffer cloud mode event approach", - "input": { - "message": { - "userId": "user@1", - "channel": "web", - "anonymousId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "traits": { - "campaign": "advertizing" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "generate_lead", - "properties": { - "source": "instagram", - "value": 20 - }, - "integrations": { - "All": true, - "Google Analytics 4 (GA4)": { - "clientId": "554581488.1683172875", - "sessionId": "1683172875" - } - } - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6BET4", - "firebaseAppId": "", - "typesOfClient": "gtag", - "eventFilteringOption": "disable", - "connectionMode": "hybrid", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "name": "generate_lead", - "params": { - "currency": "USD", - "value": 20, - "source": "instagram", - "session_id": "1683172875", - "engagement_time_msec": 1 - } - } - ], - "user_id": "user@1", - "user_properties": { - "campaign": { - "value": "advertizing" - } - }, - "client_id": "554581488.1683172875", - "non_personalized_ads": true - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6BET4" - }, - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://www.google-analytics.com/mp/collect" - } - }, - { - "description": "(gtag) track event with hybrid connection mode using override client_id and session_id approach", - "input": { - "message": { - "userId": "user@1", - "channel": "web", - "anonymousId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "traits": { - "campaign": "advertizing" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36", - "sessionId": 1683172874065 - }, - "type": "track", - "event": "generate_lead", - "properties": { - "source": "instagram", - "value": 20 - }, - "integrations": { - "All": true - } - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6BET4", - "firebaseAppId": "", - "typesOfClient": "gtag", - "eventFilteringOption": "disable", - "connectionMode": "hybrid", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "name": "generate_lead", - "params": { - "currency": "USD", - "value": 20, - "source": "instagram", - "session_id": 1683172874065, - "engagement_time_msec": 1 - } - } - ], - "user_id": "user@1", - "user_properties": { - "campaign": { - "value": "advertizing" - } - }, - "client_id": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "non_personalized_ads": true - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6BET4" - }, - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://www.google-analytics.com/mp/collect" - } - }, - { - "description": "(gtag) firing group calls with GA4 hybrid mode connection", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "group", - "event": "tutorial complete", - "integrations": { - "Google Analytics 4": { - "clientId": "4718026.1683606287", - "sessionId": "1683606287", - "sessionNumber": 1 - } - } - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "typesOfClient": "gtag", - "eventFilteringOption": "disable", - "connectionMode": "hybrid", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "non_personalized_ads": true, - "client_id": "4718026.1683606287", - "events": [ - { - "name": "join_group", - "params": { - "engagement_time_msec": 1, - "session_id": "1683606287", - "session_number": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) sign_up event with all data types of user_properties", - "input": { - "message": { - "userId": "user@1", - "channel": "web", - "anonymousId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "traits": { - "campaign": "advertizing", - "name": "rudder", - "age": 45, - "hobby": ["dancing", "singing", "reading"], - "enableEURegion": false, - "isEnterpriseUser": { - "value": false - } - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "sign_up", - "properties": { - "method": "google" - }, - "integrations": { - "All": true - } - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6BET4", - "firebaseAppId": "", - "typesOfClient": "gtag", - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "name": "sign_up", - "params": { - "method": "google", - "engagement_time_msec": 1 - } - } - ], - "user_id": "user@1", - "client_id": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "user_properties": { - "age": { - "value": 45 - }, - "name": { - "value": "rudder" - }, - "campaign": { - "value": "advertizing" - }, - "enableEURegion": { - "value": false - } - }, - "non_personalized_ads": true - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6BET4" - }, - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://www.google-analytics.com/mp/collect" - } - }, - { - "description": "[Error]: (gtag) event name starts with numbers", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "1234_sign_up", - "properties": { - "total": "10" - }, - "integrations": { - "All": true - } - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "typesOfClient": "gtag", - "eventFilteringOption": "disable", - "connectionMode": "cloud", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - "output": { - "statusCode": 400, - "error": "Event name must start with a letter and can only contain letters, numbers, and underscores", - "statTags": { - "destination": "ga4", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "(gtag) event having multiple empty array and object parameters", - "input": { - "message": { - "type": "track", - "event": "logIn", - "userId": "user@1", - "group_id": "group@1", - "anon_id": "78e95d6d-58c0-4237-b99e-2ef510b6d502", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "properties": { - "user_interest": "Moderate", - "company_interest": "", - "profile": [ - { - "is_6qa": true, - "product": null, - "product_fit": "Moderate", - "product_stage": "Purchase", - "intent_score": 89, - "profile_score": 52, - "product_display$name": "rudderstack" - } - ], - "user_company": "Analytics consulting", - "user_account": "1", - "user_id_mappings": "330098|245252|461224|282599", - "company_naics_6sense": "5173", - "usr_consent": null, - "firebase_user_id": "kdgMnP", - "google_user_id": "G-123456", - "company_domain": "consulting.net", - "company_region": "New Zealand", - "user_product_interests": { - "ids": [], - "list": [ - { - "id": 330098, - "name": [] - }, - { - "id": 245252, - "name": {} - } - ], - "names": [] - }, - "company_country": {}, - "company_industry": "Business Analytics", - "company_revenue": "$5M - $10M", - "company_annual_revenue": "5568000", - "company_sic_description": "", - "company_naics_description": [] - }, - "integrations": { - "All": true - } - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "typesOfClient": "gtag", - "eventFilteringOption": "disable", - "connectionMode": "cloud", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "name": "login", - "params": { - "company_annual_revenue": "5568000", - "company_domain": "consulting.net", - "company_industry": "Business Analytics", - "company_naics_6sense": "5173", - "company_region": "New Zealand", - "company_revenue": "$5M - $10M", - "engagement_time_msec": 1, - "profile_0_intent_score": 89, - "profile_0_is_6qa": true, - "profile_0_product_display$name": "rudderstack", - "profile_0_product_fit": "Moderate", - "profile_0_product_stage": "Purchase", - "profile_0_profile_score": 52, - "user_account": "1", - "user_company": "Analytics consulting", - "user_id_mappings": "330098|245252|461224|282599", - "user_interest": "Moderate", - "user_product_interests_list_0_id": 330098, - "user_product_interests_list_1_id": 245252 - } - } - ], - "user_id": "user@1", - "client_id": "client_id", - "non_personalized_ads": true - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://www.google-analytics.com/mp/collect" - } - }, - { - "description": "(gtag) campaign_details custom event", - "input": { - "message": { - "userId": "user@1", - "channel": "web", - "anonymousId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "campaign": { - "id": "google_1234", - "name": "Summer_fun", - "source": "google", - "medium": "cpc", - "term": "summer+travel", - "content": "logo link" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "Campaign Details", - "properties": {}, - "integrations": { - "All": true - } - }, - "destination": { - "Config": { - "apiSecret": "QyWKGHj8QhG2L4ePAPiXCA", - "measurementId": "G-T40PE6BET4", - "typesOfClient": "gtag", - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "name": "campaign_details", - "params": { - "campaign_id": "google_1234", - "campaign": "Summer_fun", - "source": "google", - "medium": "cpc", - "term": "summer+travel", - "content": "logo link", - "engagement_time_msec": 1 - } - } - ], - "user_id": "user@1", - "client_id": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "non_personalized_ads": true - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": { - "api_secret": "QyWKGHj8QhG2L4ePAPiXCA", - "measurement_id": "G-T40PE6BET4" - }, - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://www.google-analytics.com/mp/collect" - } - } -] diff --git a/test/__tests__/data/stormly.json b/test/__tests__/data/stormly.json deleted file mode 100644 index 2f0bb7f4d6..0000000000 --- a/test/__tests__/data/stormly.json +++ /dev/null @@ -1,388 +0,0 @@ -[ - { - "description": "Identify call without userId", - "input": { - "destination": { - "Config": { - "apiKey": "dummyApiKey" - }, - "ID": "stormly123" - }, - "message": { - "type": "identify", - "context": { - "traits": { - "name": "John Doe", - "email": "johndoe@gmail.com", - "age": 25 - } - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - "output": { - "error": "Missing required value from \"userIdOnly\"" - } - }, - { - "description": "Identify call with userId, traits", - "input": { - "destination": { - "Config": { - "apiKey": "dummyApiKey" - }, - "ID": "stormly123" - }, - "message": { - "type": "identify", - "sentAt": "2022-01-20T13:39:21.033Z", - "channel": "web", - "userId": "5136633649", - "context": { - "traits": { - "name": "John Doe", - "email": "johndoe@gmail.com", - "age": 25 - } - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rudderstack.t.stormly.com/webhook/rudderstack/identify", - "headers": { - "Content-Type": "application/json", - "Authorization": "Basic dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "userId": "5136633649", - "traits": { - "name": "John Doe", - "email": "johndoe@gmail.com", - "age": 25 - }, - "timestamp": "2022-01-20T13:39:21.032Z" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "Track call without userId", - "input": { - "destination": { - "Config": { - "apiKey": "dummyApiKey" - }, - "ID": "stormly123" - }, - "message": { - "type": "track", - "event": "Product Reviewed", - "properties": { - "review_id": "12345", - "product_id": "123", - "rating": 3.0, - "review_body": "Average product, expected much more.", - "groupId": "91Yb32830" - }, - "context": {}, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - "output": { - "error": "Missing required value from \"userIdOnly\"" - } - }, - { - "description": "Track call without groupId", - "input": { - "destination": { - "Config": { - "apiKey": "dummyApiKey" - }, - "ID": "stormly123" - }, - "message": { - "type": "track", - "event": "Product Reviewed", - "userId": "5136633649", - "properties": { - "review_id": "12345", - "product_id": "123", - "rating": 3.0, - "review_body": "Average product, expected much more." - }, - "context": {}, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rudderstack.t.stormly.com/webhook/rudderstack/track", - "headers": { - "Content-Type": "application/json", - "Authorization": "Basic dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "userId": "5136633649", - "event": "Product Reviewed", - "properties": { - "review_id": "12345", - "product_id": "123", - "rating": 3, - "review_body": "Average product, expected much more." - }, - "timestamp": "2022-01-20T13:39:21.032Z" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "Track call without properties", - "input": { - "destination": { - "Config": { - "apiKey": "dummyApiKey" - }, - "ID": "stormly123" - }, - "message": { - "type": "track", - "event": "Product Reviewed", - "userId": "5136633649", - "context": {}, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rudderstack.t.stormly.com/webhook/rudderstack/track", - "headers": { - "Content-Type": "application/json", - "Authorization": "Basic dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "userId": "5136633649", - "event": "Product Reviewed", - "timestamp": "2022-01-20T13:39:21.032Z" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "Track call with userId, groupId and properties", - "input": { - "destination": { - "Config": { - "apiKey": "dummyApiKey" - }, - "ID": "stormly123" - }, - "message": { - "type": "track", - "event": "Product Reviewed", - "userId": "5136633649", - "properties": { - "review_id": "12345", - "product_id": "123", - "rating": 3.0, - "review_body": "Average product, expected much more.", - "groupId": "91Yb32830" - }, - "context": {}, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rudderstack.t.stormly.com/webhook/rudderstack/track", - "headers": { - "Content-Type": "application/json", - "Authorization": "Basic dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "userId": "5136633649", - "event": "Product Reviewed", - "properties": { - "review_id": "12345", - "product_id": "123", - "rating": 3, - "review_body": "Average product, expected much more." - }, - "timestamp": "2022-01-20T13:39:21.032Z", - "context": { - "groupId": "91Yb32830" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "Track call with userId, groupId (from externalId) and properties", - "input": { - "destination": { - "Config": { - "apiKey": "dummyApiKey" - }, - "ID": "stormly123" - }, - "message": { - "type": "track", - "event": "Product Reviewed", - "userId": "5136633649", - "properties": { - "review_id": "12345", - "product_id": "123", - "rating": 3.0, - "review_body": "Average product, expected much more.", - "groupId": "test-12345" - }, - "context": { - "externalId": [ - { - "type": "stormlyGroupId", - "id": "91Yb32830" - } - ] - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rudderstack.t.stormly.com/webhook/rudderstack/track", - "headers": { - "Content-Type": "application/json", - "Authorization": "Basic dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "userId": "5136633649", - "event": "Product Reviewed", - "properties": { - "review_id": "12345", - "product_id": "123", - "rating": 3, - "review_body": "Average product, expected much more." - }, - "timestamp": "2022-01-20T13:39:21.032Z", - "context": { - "groupId": "91Yb32830" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "Group call with userId, groupId and traits", - "input": { - "destination": { - "Config": { - "apiKey": "dummyApiKey" - }, - "ID": "stormly123" - }, - "message": { - "type": "group", - "userId": "5136633649", - "traits": { - "name": "Initech", - "employees": 500, - "headquarters": "Redwood City, California, United States", - "ceo": "John Doe", - "revenue": 70000000, - "currency": "USD", - "groupId": "9230AUbd2138h" - }, - "context": {}, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rudderstack.t.stormly.com/webhook/rudderstack/group", - "headers": { - "Content-Type": "application/json", - "Authorization": "Basic dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "userId": "5136633649", - "groupId": "9230AUbd2138h", - "traits": { - "name": "Initech", - "employees": 500, - "headquarters": "Redwood City, California, United States", - "ceo": "John Doe", - "revenue": 70000000, - "currency": "USD" - }, - "timestamp": "2022-01-20T13:39:21.032Z" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - } -] diff --git a/test/__tests__/data/stormly_router_input.json b/test/__tests__/data/stormly_router_input.json deleted file mode 100644 index 3fa583ebc3..0000000000 --- a/test/__tests__/data/stormly_router_input.json +++ /dev/null @@ -1,55 +0,0 @@ -[ - { - "destination": { - "Config": { - "apiKey": "dummyApiKey" - }, - "ID": "stormly123" - }, - "metadata": { - "jobId": 1 - }, - "message": { - "type": "identify", - "sentAt": "2022-01-20T13:39:21.033Z", - "channel": "web", - "userId": "5136633649", - "context": { - "traits": { - "name": "John Doe", - "email": "johndoe@gmail.com", - "age": 25 - } - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey" - }, - "ID": "stormly123" - }, - "metadata": { - "jobId": 2 - }, - "message": { - "type": "track", - "event": "Product Reviewed", - "properties": { - "review_id": "12345", - "product_id": "123", - "rating": 3.0, - "review_body": "Average product, expected much more.", - "groupId": "91Yb32830" - }, - "context": {}, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - } -] diff --git a/test/__tests__/data/stormly_router_output.json b/test/__tests__/data/stormly_router_output.json deleted file mode 100644 index 2a129dfbaf..0000000000 --- a/test/__tests__/data/stormly_router_output.json +++ /dev/null @@ -1,63 +0,0 @@ -[ - { - "batched": false, - "batchedRequest": { - "body": { - "FORM": {}, - "JSON": { - "timestamp": "2022-01-20T13:39:21.032Z", - "traits": { - "age": 25, - "email": "johndoe@gmail.com", - "name": "John Doe" - }, - "userId": "5136633649" - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://rudderstack.t.stormly.com/webhook/rudderstack/identify", - "files": {}, - "headers": { - "Authorization": "Basic dummyApiKey", - "Content-Type": "application/json" - }, - "method": "POST", - "params": {}, - "type": "REST", - "version": "1" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey" - }, - "ID": "stormly123" - }, - "metadata": [ - { - "jobId": 1 - } - ], - "statusCode": 200 - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey" - }, - "ID": "stormly123" - }, - "batched": false, - "error": "Missing required value from \"userIdOnly\"", - "metadata": [ - { - "jobId": 2 - } - ], - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation" - }, - "statusCode": 400 - } -] diff --git a/test/__tests__/facebook_conversions.test.js b/test/__tests__/facebook_conversions.test.js deleted file mode 100644 index 5bb905b5c8..0000000000 --- a/test/__tests__/facebook_conversions.test.js +++ /dev/null @@ -1,48 +0,0 @@ -const integration = "facebook_conversions"; -const name = "facebook_conversions"; - -const fs = require("fs"); -const path = require("path"); - -const version = "v0"; -const transformer = require(`../../src/${version}/destinations/${integration}/transform`); - -// Processor Test Data -const testDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}.json`) -); -const testData = JSON.parse(testDataFile); - -// Router Test Data -const inputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_input.json`) -); -const outputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_output.json`) -); -const inputRouterData = JSON.parse(inputRouterDataFile); -const expectedRouterData = JSON.parse(outputRouterDataFile); - -Date.now = jest.fn(() => new Date("2023-11-12T15:46:51.000Z")); // 2023-11-12T15:46:51.693229+05:30 - -describe(`${name} Tests`, () => { - describe("Processor", () => { - testData.forEach((dataPoint, index) => { - it(`${index}. ${integration} - ${dataPoint.description}`, async () => { - try { - const output = await transformer.process(dataPoint.input); - expect(output).toEqual(dataPoint.output); - } catch (error) { - expect(error.message).toEqual(dataPoint.output.error); - } - }); - }); - }); - - describe("Router Tests", () => { - it("Payload", async () => { - const routerOutput = await transformer.processRouterDest(inputRouterData); - expect(routerOutput).toEqual(expectedRouterData); - }); - }); -}); diff --git a/test/__tests__/ga4.test.js b/test/__tests__/ga4.test.js deleted file mode 100644 index e685c5e432..0000000000 --- a/test/__tests__/ga4.test.js +++ /dev/null @@ -1,31 +0,0 @@ -const integration = "ga4"; -const name = "Google Analytics 4"; - -const fs = require("fs"); -const path = require("path"); -const version = "v0"; - -const transformer = require(`../../src/${version}/destinations/${integration}/transform`); - -// Processor Test files -const testDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}.json`) -); -const testData = JSON.parse(testDataFile); - -Date.now = jest.fn(() => new Date("2022-04-29T05:17:09Z")); - -describe(`${name} Tests`, () => { - describe("Processor", () => { - testData.forEach((dataPoint, index) => { - it(`${index}. ${integration} - ${dataPoint.description}`, () => { - try { - const output = transformer.process(dataPoint.input); - expect(output).toEqual(dataPoint.output); - } catch (error) { - expect(error.message).toEqual(dataPoint.output.error); - } - }); - }); - }); -}); diff --git a/test/__tests__/stormly.test.js b/test/__tests__/stormly.test.js deleted file mode 100644 index 2640440b3f..0000000000 --- a/test/__tests__/stormly.test.js +++ /dev/null @@ -1,47 +0,0 @@ -const integration = "stormly"; -const name = "STORMLY"; - -const fs = require("fs"); -const path = require("path"); - -const version = "v0"; - -const transformer = require(`../../src/${version}/destinations/${integration}/transform`); - -// Processor Test files -const testDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}.json`) -); -const testData = JSON.parse(testDataFile); - -// Router Test files -const inputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_input.json`) -); -const outputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_output.json`) -); -const inputRouterData = JSON.parse(inputRouterDataFile); -const expectedRouterData = JSON.parse(outputRouterDataFile); - -describe(`${name} Tests`, () => { - describe("Processor", () => { - testData.forEach(async (dataPoint, index) => { - it(`${index}. ${integration} - ${dataPoint.description}`, async () => { - try { - const output = await transformer.process(dataPoint.input); - expect(output).toEqual(dataPoint.output); - } catch (error) { - expect(error.message).toEqual(dataPoint.output.error); - } - }); - }); - }); - - describe("Router", () => { - it("Payload", async () => { - const routerOutput = await transformer.processRouterDest(inputRouterData); - expect(routerOutput).toEqual(expectedRouterData); - }); - }); -}); diff --git a/test/integrations/destinations/bingads_audience/processor/data.ts b/test/integrations/destinations/bingads_audience/processor/data.ts new file mode 100644 index 0000000000..138bac7e82 --- /dev/null +++ b/test/integrations/destinations/bingads_audience/processor/data.ts @@ -0,0 +1,1130 @@ +export const data = [ + { + "name": "bingads_audience", + "description": "unhashed email available with hashEmail as true in config", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "userId": "user 1", + "type": "audiencelist", + "properties": { + "listData": { + "add": [ + { + "email": "alex@email.com" + }, + { + "email": "amy@abc.com" + }, + { + "email": "van@abc.com" + } + ] + } + }, + "context": { + "ip": "14.5.67.21", + "library": { + "name": "http" + } + }, + "timestamp": "2020-02-02T00:23:09.544Z" + }, + "destination": { + "Config": { + "customerAccountId": "89236978", + "customerId": "78678678", + "audienceId": "564567", + "hashEmail": true + }, + "DestinationDefinition": { + "Config": { + "cdkV2Enabled": true + } + } + }, + "metadata": { + "destinationId": 1234 + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "", + "headers": {}, + "params": {}, + "body": { + "JSON": { + "list": [ + { + "hashedEmail": "ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b", + "email": "alex@email.com" + }, + { + "hashedEmail": "49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579", + "email": "amy@abc.com" + }, + { + "hashedEmail": "2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c", + "email": "van@abc.com" + } + ], + "action": "Add" + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "metadata": { + "destinationId": 1234 + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "bingads_audience", + "description": "hashed email available with hashEmail as false in config", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "userId": "user 1", + "type": "audiencelist", + "properties": { + "listData": { + "add": [ + { + "email": "ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b" + }, + { + "email": "49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579" + }, + { + "email": "2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c" + } + ] + } + }, + "context": { + "ip": "14.5.67.21", + "library": { + "name": "http" + } + }, + "timestamp": "2020-02-02T00:23:09.544Z" + }, + "destination": { + "Config": { + "customerAccountId": "89236978", + "customerId": "78678678", + "audienceId": "564567", + "hashEmail": false + }, + "DestinationDefinition": { + "Config": { + "cdkV2Enabled": true + } + } + }, + "metadata": { + "destinationId": 1234 + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "", + "headers": {}, + "params": {}, + "body": { + "JSON": { + "list": [ + { + "hashedEmail": "ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b", + "email": "ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b" + }, + { + "hashedEmail": "49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579", + "email": "49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579" + }, + { + "hashedEmail": "2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c", + "email": "2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c" + } + ], + "action": "Add" + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "metadata": { + "destinationId": 1234 + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "bingads_audience", + "description": "Unsupported action type", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "userId": "user 1", + "type": "audiencelist", + "properties": { + "listData": { + "addition": [ + { + "email": "alex@email.com" + }, + { + "email": "amy@abc.com" + }, + { + "email": "van@abc.com" + } + ] + } + }, + "context": { + "ip": "14.5.67.21", + "library": { + "name": "http" + } + }, + "timestamp": "2020-02-02T00:23:09.544Z" + }, + "destination": { + "Config": { + "customerAccountId": "89236978", + "customerId": "78678678", + "audienceId": "564567", + "hashEmail": true + }, + "DestinationDefinition": { + "Config": { + "cdkV2Enabled": true + } + } + }, + "metadata": { + "destinationId": 1234 + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "metadata": { + "destinationId": 1234 + }, + "statusCode": 400, + "error": "unsupported action type. Aborting message.: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: unsupported action type. Aborting message.", + "statTags": { + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "implementation": "cdkV2", + "destType": "BINGADS_AUDIENCE", + "module": "destination", + "feature": "processor", + "destinationId": 1234 + } + } + ] + } + } + }, + { + "name": "bingads_audience", + "description": "Unsupported event type", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "userId": "user 1", + "type": "track", + "properties": { + "listData": { + "add": [ + { + "email": "alex@email.com" + }, + { + "email": "amy@abc.com" + }, + { + "email": "van@abc.com" + } + ] + } + }, + "context": { + "ip": "14.5.67.21", + "library": { + "name": "http" + } + }, + "timestamp": "2020-02-02T00:23:09.544Z" + }, + "destination": { + "Config": { + "customerAccountId": "89236978", + "customerId": "78678678", + "audienceId": "564567", + "hashEmail": true + }, + "DestinationDefinition": { + "Config": { + "cdkV2Enabled": true + } + } + }, + "metadata": { + "destinationId": 1234 + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "metadata": { + "destinationId": 1234 + }, + "statusCode": 400, + "error": "Event type track is not supported. Aborting message.: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: Event type track is not supported. Aborting message.", + "statTags": { + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "implementation": "cdkV2", + "destType": "BINGADS_AUDIENCE", + "module": "destination", + "feature": "processor", + "destinationId": 1234 + } + } + ] + } + } + }, + { + "name": "bingads_audience", + "description": "event type not present", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "userId": "user 1", + "type": "", + "properties": { + "listData": { + "add": [ + { + "email": "alex@email.com" + }, + { + "email": "amy@abc.com" + }, + { + "email": "van@abc.com" + } + ] + } + }, + "context": { + "ip": "14.5.67.21", + "library": { + "name": "http" + } + }, + "timestamp": "2020-02-02T00:23:09.544Z" + }, + "destination": { + "Config": { + "customerAccountId": "89236978", + "customerId": "78678678", + "audienceId": "564567", + "hashEmail": true + }, + "DestinationDefinition": { + "Config": { + "cdkV2Enabled": true + } + } + }, + "metadata": { + "destinationId": 1234 + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "metadata": { + "destinationId": 1234 + }, + "statusCode": 400, + "error": "message Type is not present. Aborting message.: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: message Type is not present. Aborting message.", + "statTags": { + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "implementation": "cdkV2", + "destType": "BINGADS_AUDIENCE", + "module": "destination", + "feature": "processor", + "destinationId": 1234 + } + } + ] + } + } + }, + { + "name": "bingads_audience", + "description": "Message properties is not present", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "userId": "user 1", + "type": "audiencelist", + "context": { + "ip": "14.5.67.21", + "library": { + "name": "http" + } + }, + "timestamp": "2020-02-02T00:23:09.544Z" + }, + "destination": { + "Config": { + "customerAccountId": "89236978", + "customerId": "78678678", + "audienceId": "564567", + "hashEmail": true + }, + "DestinationDefinition": { + "Config": { + "cdkV2Enabled": true + } + } + }, + "metadata": { + "destinationId": 1234 + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "metadata": { + "destinationId": 1234 + }, + "statusCode": 400, + "error": "Message properties is not present. Aborting message.: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: Message properties is not present. Aborting message.", + "statTags": { + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "implementation": "cdkV2", + "destType": "BINGADS_AUDIENCE", + "module": "destination", + "feature": "processor", + "destinationId": 1234 + } + } + ] + } + } + }, + { + "name": "bingads_audience", + "description": "listData is not present in properties", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "userId": "user 1", + "type": "audiencelist", + "properties": {}, + "context": { + "ip": "14.5.67.21", + "library": { + "name": "http" + } + }, + "timestamp": "2020-02-02T00:23:09.544Z" + }, + "destination": { + "Config": { + "customerAccountId": "89236978", + "customerId": "78678678", + "audienceId": "564567", + "hashEmail": true + }, + "DestinationDefinition": { + "Config": { + "cdkV2Enabled": true + } + } + }, + "metadata": { + "destinationId": 1234 + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "metadata": { + "destinationId": 1234 + }, + "statusCode": 400, + "error": "listData is not present inside properties. Aborting message.: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: listData is not present inside properties. Aborting message.", + "statTags": { + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "implementation": "cdkV2", + "destType": "BINGADS_AUDIENCE", + "module": "destination", + "feature": "processor", + "destinationId": 1234 + } + } + ] + } + } + }, + { + "name": "bingads_audience", + "description": "Both add and remove are present in listData", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "userId": "user 1", + "type": "audiencelist", + "properties": { + "listData": { + "remove": [ + { + "email": "ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b" + }, + { + "email": "49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579" + }, + { + "email": "2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c" + } + ], + "update": [ + { + "email": "ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b" + }, + { + "email": "49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579" + }, + { + "email": "2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c" + } + ] + } + }, + "context": { + "ip": "14.5.67.21", + "library": { + "name": "http" + } + }, + "timestamp": "2020-02-02T00:23:09.544Z" + }, + "destination": { + "Config": { + "customerAccountId": "89236978", + "customerId": "78678678", + "audienceId": "564567", + "hashEmail": false + }, + "DestinationDefinition": { + "Config": { + "cdkV2Enabled": true + } + } + }, + "metadata": { + "destinationId": 1234 + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "", + "headers": {}, + "params": {}, + "body": { + "JSON": { + "list": [ + { + "hashedEmail": "ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b", + "email": "ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b" + }, + { + "hashedEmail": "49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579", + "email": "49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579" + }, + { + "hashedEmail": "2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c", + "email": "2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c" + } + ], + "action": "Remove" + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "metadata": { + "destinationId": 1234 + }, + "statusCode": 200 + }, + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "", + "headers": {}, + "params": {}, + "body": { + "JSON": { + "list": [ + { + "hashedEmail": "ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b", + "email": "ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b" + }, + { + "hashedEmail": "49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579", + "email": "49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579" + }, + { + "hashedEmail": "2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c", + "email": "2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c" + } + ], + "action": "Replace" + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "metadata": { + "destinationId": 1234 + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "bingads_audience", + "description": "Only single user data is present", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "userId": "user 1", + "type": "audiencelist", + "properties": { + "listData": { + "add": [ + { + "email": "alex@email.com" + } + ] + } + }, + "context": { + "ip": "14.5.67.21", + "library": { + "name": "http" + } + }, + "timestamp": "2020-02-02T00:23:09.544Z" + }, + "metadata": { + "sourceType": "", + "destinationType": "", + "namespace": "" + }, + "destination": { + "DestinationDefinition": { + "Config": { + "cdkV2Enabled": true + } + }, + "Config": { + "customerAccountId": "89236978", + "customerId": "78678678", + "audienceId": "564567", + "hashEmail": true + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "", + "headers": {}, + "params": {}, + "body": { + "JSON": { + "list": [ + { + "hashedEmail": "ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b", + "email": "alex@email.com" + } + ], + "action": "Add" + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "metadata": { + "sourceType": "", + "destinationType": "", + "namespace": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "bingads_audience", + "description": "unhashed email available with hashEmail as true in config", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + message: { + userId: 'user 1', + type: 'audiencelist', + properties: { + listData: { + add: [ + { + email: 'alex@email.com', + }, + { + email: 'amy@abc.com', + }, + { + email: 'van@abc.com', + }, + ], + }, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + DestinationDefinition: { + "Config": { + "cdkV2Enabled": true + } + }, + Config: { + customerAccountId: '89236978', + customerId: '78678678', + audienceId: '564567', + hashEmail: true, + }, + }, + "metadata": { + "sourceType": "", + "destinationType": "", + "namespace": "" + }, + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "metadata": { + "destinationType": "", + "namespace": "", + "sourceType": "", + }, + "output": { + "body": { + "FORM": {}, + "JSON": { + list: [ + { + hashedEmail: 'ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b', + email: 'alex@email.com', + }, + { + hashedEmail: '49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579', + email: 'amy@abc.com', + }, + { + hashedEmail: '2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c', + email: 'van@abc.com', + }, + ], + action: 'Add', + }, + "JSON_ARRAY": {}, + "XML": {}, + }, + "endpoint": "", + "files": {}, + "headers": {}, + "method": "POST", + "params": {}, + "type": "REST", + "userId": "", + "version": "1", + }, + "statusCode": 200, + } + ] + } + } + }, + { + "name": "bingads_audience", + "description": "hashed email available with hashEmail as false in config", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + message: { + userId: 'user 1', + type: 'audiencelist', + properties: { + listData: { + update: [ + { + email: 'ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b', + }, + { + email: '49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579', + }, + ], + remove: [ + { + email: '2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c', + }, + ], + }, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + "DestinationDefinition": { + "Config": { + "cdkV2Enabled": true + } + }, + Config: { + customerAccountId: '89236978', + customerId: '78678678', + audienceId: '564567', + hashEmail: false, + }, + }, + "metadata": { + "sourceType": "", + "destinationType": "", + "namespace": "" + }, + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "", + "headers": {}, + "params": {}, + "body": { + "JSON": { + "list": [ + { + "hashedEmail": "ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b", + "email": "ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b" + }, + { + "hashedEmail": "49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579", + "email": "49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579" + } + ], + "action": "Replace" + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "metadata": { + "sourceType": "", + "destinationType": "", + "namespace": "" + }, + "statusCode": 200 + }, + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "", + "headers": {}, + "params": {}, + "body": { + "JSON": { + "list": [ + { + "hashedEmail": "2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c", + "email": "2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c" + } + ], + "action": "Remove" + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "metadata": { + "sourceType": "", + "destinationType": "", + "namespace": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "bingads_audience", + "description": "validateInput should fail when properties are missing", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + message: { + userId: 'user 1', + type: 'audiencelist', + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + "DestinationDefinition": { + "Config": { + "cdkV2Enabled": true + } + }, + Config: { + customerAccountId: '89236978', + customerId: '78678678', + audienceId: '564567', + hashEmail: false, + }, + }, + "metadata": { + "sourceType": "", + "destinationType": "", + "namespace": "" + }, + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "metadata": { + "sourceType": "", + "destinationType": "", + "namespace": "" + }, + "statusCode": 400, + "error": "Message properties is not present. Aborting message.: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: Message properties is not present. Aborting message.", + "statTags": { + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "implementation": "cdkV2", + "destType": "BINGADS_AUDIENCE", + "module": "destination", + "feature": "processor" + } + } + ] + } + } + } +] \ No newline at end of file diff --git a/test/integrations/destinations/facebook_conversions/mocks.ts b/test/integrations/destinations/facebook_conversions/mocks.ts new file mode 100644 index 0000000000..ff6771fa1e --- /dev/null +++ b/test/integrations/destinations/facebook_conversions/mocks.ts @@ -0,0 +1,3 @@ +export const defaultMockFns = () => { + jest.spyOn(Date, 'now').mockImplementation(() => new Date("2023-11-12T15:46:51.000Z").valueOf()); +}; \ No newline at end of file diff --git a/test/integrations/destinations/facebook_conversions/processor/data.ts b/test/integrations/destinations/facebook_conversions/processor/data.ts new file mode 100644 index 0000000000..c8e20e5f20 --- /dev/null +++ b/test/integrations/destinations/facebook_conversions/processor/data.ts @@ -0,0 +1,1433 @@ +import { defaultMockFns } from "../mocks" + +export const data = [ + { + "name": "facebook_conversions", + "description": "Timestamp validation. Events must be sent within seven days of their occurrence or up to one minute in the future", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "channel": "web", + "context": { + "device": { + "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", + "manufacturer": "Xiaomi", + "model": "Redmi 6", + "name": "xiaomi" + }, + "network": { + "carrier": "Banglalink" + }, + "os": { + "name": "android", + "version": "8.1.0" + }, + "screen": { + "height": "100", + "density": 50 + }, + "traits": { + "email": " aBc@gmail.com ", + "address": { + "zip": 1234 + }, + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" + } + }, + "event": "randomevent", + "integrations": { + "All": true + }, + "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", + "properties": { + "revenue": 400, + "additional_bet_index": 0 + }, + "timestamp": "2023-09-01T15:46:51.693229+05:30", + "type": "track" + }, + "destination": { + "Config": { + "limitedDataUsage": true, + "blacklistPiiProperties": [ + { + "blacklistPiiProperties": "", + "blacklistPiiHash": false + } + ], + "accessToken": "09876", + "datasetId": "dummyID", + "eventsToEvents": [ + { + "from": "", + "to": "" + } + ], + "eventCustomProperties": [ + { + "eventCustomProperties": "" + } + ], + "removeExternalId": true, + "whitelistPiiProperties": [ + { + "whitelistPiiProperties": "" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Events must be sent within seven days of their occurrence or up to one minute in the future.", + "statusCode": 400, + "statTags": { + "destType": "FACEBOOK_CONVERSIONS", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination", + } + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "facebook_conversions", + "description": "Track event without event property set", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "channel": "web", + "context": { + "device": { + "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", + "manufacturer": "Xiaomi", + "model": "Redmi 6", + "name": "xiaomi" + }, + "network": { + "carrier": "Banglalink" + }, + "os": { + "name": "android", + "version": "8.1.0" + }, + "screen": { + "height": "100", + "density": 50 + }, + "traits": { + "email": " aBc@gmail.com ", + "address": { + "zip": 1234 + }, + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" + } + }, + "event": "", + "integrations": { + "All": true + }, + "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", + "properties": { + "revenue": 400, + "additional_bet_index": 0 + }, + "timestamp": "2023-11-12T15:46:51.693229+05:30", + "type": "track" + }, + "destination": { + "Config": { + "limitedDataUsage": true, + "blacklistPiiProperties": [ + { + "blacklistPiiProperties": "", + "blacklistPiiHash": false + } + ], + "accessToken": "09876", + "datasetId": "dummyID", + "eventsToEvents": [ + { + "from": "", + "to": "" + } + ], + "eventCustomProperties": [ + { + "eventCustomProperties": "" + } + ], + "removeExternalId": true, + "whitelistPiiProperties": [ + { + "whitelistPiiProperties": "" + } + ], + "actionSource": "website" + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "'event' is required and should be a string", + "statTags": { + "destType": "FACEBOOK_CONVERSIONS", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination", + }, + "statusCode": 400, + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "facebook_conversions", + "description": "Simple track event", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "channel": "web", + "context": { + "device": { + "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", + "manufacturer": "Xiaomi", + "model": "Redmi 6", + "name": "xiaomi" + }, + "network": { + "carrier": "Banglalink" + }, + "os": { + "name": "android", + "version": "8.1.0" + }, + "screen": { + "height": "100", + "density": 50 + }, + "traits": { + "email": " aBc@gmail.com ", + "address": { + "zip": 1234 + }, + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" + } + }, + "event": "spin_result", + "integrations": { + "All": true + }, + "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", + "properties": { + "revenue": 400, + "additional_bet_index": 0 + }, + "timestamp": "2023-11-12T15:46:51.693229+05:30", + "type": "track" + }, + "destination": { + "Config": { + "limitedDataUsage": true, + "blacklistPiiProperties": [ + { + "blacklistPiiProperties": "", + "blacklistPiiHash": false + } + ], + "accessToken": "09876", + "datasetId": "dummyID", + "eventsToEvents": [ + { + "from": "", + "to": "" + } + ], + "eventCustomProperties": [ + { + "eventCustomProperties": "" + } + ], + "removeExternalId": true, + "whitelistPiiProperties": [ + { + "whitelistPiiProperties": "" + } + ], + "actionSource": "website" + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://graph.facebook.com/v18.0/dummyID/events?access_token=09876", + "headers": {}, + "params": {}, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": { + "data": [ + "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"spin_result\",\"event_time\":1699784211,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"value\":400,\"currency\":\"USD\"}}" + ] + } + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "facebook_conversions", + "description": "Track event with standard event products searched", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "channel": "web", + "context": { + "device": { + "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", + "manufacturer": "Xiaomi", + "model": "Redmi 6", + "name": "xiaomi" + }, + "network": { + "carrier": "Banglalink" + }, + "os": { + "name": "android", + "version": "8.1.0" + }, + "screen": { + "height": "100", + "density": 50 + }, + "traits": { + "email": " aBc@gmail.com ", + "address": { + "zip": 1234 + }, + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" + } + }, + "event": "products searched", + "integrations": { + "All": true + }, + "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", + "properties": { + "revenue": 400, + "additional_bet_index": 0 + }, + "timestamp": "2023-11-12T15:46:51.693229+05:30", + "type": "track" + }, + "destination": { + "Config": { + "limitedDataUsage": true, + "blacklistPiiProperties": [ + { + "blacklistPiiProperties": "", + "blacklistPiiHash": false + } + ], + "accessToken": "09876", + "datasetId": "dummyID", + "eventsToEvents": [ + { + "from": "", + "to": "" + } + ], + "eventCustomProperties": [ + { + "eventCustomProperties": "" + } + ], + "removeExternalId": true, + "whitelistPiiProperties": [ + { + "whitelistPiiProperties": "" + } + ], + "actionSource": "website" + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://graph.facebook.com/v18.0/dummyID/events?access_token=09876", + "headers": {}, + "params": {}, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": { + "data": [ + "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"Search\",\"event_time\":1699784211,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"content_ids\":[],\"contents\":[],\"content_type\":\"product\",\"currency\":\"USD\",\"value\":400}}" + ] + } + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "facebook_conversions", + "description": "Track event with standard event product added", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "channel": "web", + "context": { + "device": { + "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", + "manufacturer": "Xiaomi", + "model": "Redmi 6", + "name": "xiaomi" + }, + "network": { + "carrier": "Banglalink" + }, + "os": { + "name": "android", + "version": "8.1.0" + }, + "screen": { + "height": "100", + "density": 50 + }, + "traits": { + "email": " aBc@gmail.com ", + "address": { + "zip": 1234 + }, + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" + } + }, + "event": "product added", + "integrations": { + "All": true + }, + "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", + "properties": { + "revenue": 400, + "additional_bet_index": 0 + }, + "timestamp": "2023-11-12T15:46:51.693229+05:30", + "type": "track" + }, + "destination": { + "Config": { + "limitedDataUsage": true, + "blacklistPiiProperties": [ + { + "blacklistPiiProperties": "", + "blacklistPiiHash": false + } + ], + "accessToken": "09876", + "datasetId": "dummyID", + "eventsToEvents": [ + { + "from": "", + "to": "" + } + ], + "eventCustomProperties": [ + { + "eventCustomProperties": "" + } + ], + "removeExternalId": true, + "whitelistPiiProperties": [ + { + "whitelistPiiProperties": "" + } + ], + "actionSource": "website" + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://graph.facebook.com/v18.0/dummyID/events?access_token=09876", + "headers": {}, + "params": {}, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": { + "data": [ + "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"AddToCart\",\"event_time\":1699784211,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"content_ids\":[],\"contents\":[],\"content_type\":\"product\",\"currency\":\"USD\",\"value\":400}}" + ] + } + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "facebook_conversions", + "description": "Track event with standard event product viewed", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "channel": "web", + "context": { + "device": { + "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", + "manufacturer": "Xiaomi", + "model": "Redmi 6", + "name": "xiaomi" + }, + "network": { + "carrier": "Banglalink" + }, + "os": { + "name": "android", + "version": "8.1.0" + }, + "screen": { + "height": "100", + "density": 50 + }, + "traits": { + "email": " aBc@gmail.com ", + "address": { + "zip": 1234 + }, + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" + } + }, + "event": "product viewed", + "integrations": { + "All": true + }, + "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", + "properties": { + "revenue": 400, + "additional_bet_index": 0 + }, + "timestamp": "2023-11-12T15:46:51.693229+05:30", + "type": "track" + }, + "destination": { + "Config": { + "limitedDataUsage": true, + "blacklistPiiProperties": [ + { + "blacklistPiiProperties": "", + "blacklistPiiHash": false + } + ], + "accessToken": "09876", + "datasetId": "dummyID", + "eventsToEvents": [ + { + "from": "", + "to": "" + } + ], + "eventCustomProperties": [ + { + "eventCustomProperties": "" + } + ], + "removeExternalId": true, + "whitelistPiiProperties": [ + { + "whitelistPiiProperties": "" + } + ], + "actionSource": "website" + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://graph.facebook.com/v18.0/dummyID/events?access_token=09876", + "headers": {}, + "params": {}, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": { + "data": [ + "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"ViewContent\",\"event_time\":1699784211,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"content_ids\":[],\"contents\":[],\"content_type\":\"product\",\"currency\":\"USD\",\"value\":400}}" + ] + } + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "facebook_conversions", + "description": "Track event with standard event product list viewed", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "channel": "web", + "context": { + "device": { + "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", + "manufacturer": "Xiaomi", + "model": "Redmi 6", + "name": "xiaomi" + }, + "network": { + "carrier": "Banglalink" + }, + "os": { + "name": "android", + "version": "8.1.0" + }, + "screen": { + "height": "100", + "density": 50 + }, + "traits": { + "email": " aBc@gmail.com ", + "address": { + "zip": 1234 + }, + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" + } + }, + "event": "product list viewed", + "integrations": { + "All": true + }, + "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", + "properties": { + "revenue": 400, + "additional_bet_index": 0, + "products": [ + { + "product_id": 1234, + "quantity": 5, + "price": 55 + } + ] + }, + "timestamp": "2023-11-12T15:46:51.693229+05:30", + "type": "track" + }, + "destination": { + "Config": { + "limitedDataUsage": true, + "blacklistPiiProperties": [ + { + "blacklistPiiProperties": "", + "blacklistPiiHash": false + } + ], + "accessToken": "09876", + "datasetId": "dummyID", + "eventsToEvents": [ + { + "from": "", + "to": "" + } + ], + "eventCustomProperties": [ + { + "eventCustomProperties": "" + } + ], + "removeExternalId": true, + "whitelistPiiProperties": [ + { + "whitelistPiiProperties": "" + } + ], + "actionSource": "website" + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://graph.facebook.com/v18.0/dummyID/events?access_token=09876", + "headers": {}, + "params": {}, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": { + "data": [ + "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"ViewContent\",\"event_time\":1699784211,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"products\":[{\"product_id\":1234,\"quantity\":5,\"price\":55}],\"content_ids\":[1234],\"contents\":[{\"id\":1234,\"quantity\":5,\"item_price\":55}],\"content_type\":\"product\",\"currency\":\"USD\",\"value\":400}}" + ] + } + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "facebook_conversions", + "description": "Track event with standard event product list viewed without products array", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "channel": "web", + "context": { + "device": { + "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", + "manufacturer": "Xiaomi", + "model": "Redmi 6", + "name": "xiaomi" + }, + "network": { + "carrier": "Banglalink" + }, + "os": { + "name": "android", + "version": "8.1.0" + }, + "screen": { + "height": "100", + "density": 50 + }, + "traits": { + "email": " aBc@gmail.com ", + "address": { + "zip": 1234 + }, + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" + } + }, + "event": "product list viewed", + "integrations": { + "All": true + }, + "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", + "properties": { + "revenue": 400, + "additional_bet_index": 0, + "category": "randomCategory" + }, + "timestamp": "2023-11-12T15:46:51.693229+05:30", + "type": "track" + }, + "destination": { + "Config": { + "limitedDataUsage": true, + "blacklistPiiProperties": [ + { + "blacklistPiiProperties": "", + "blacklistPiiHash": false + } + ], + "accessToken": "09876", + "datasetId": "dummyID", + "eventsToEvents": [ + { + "from": "", + "to": "" + } + ], + "eventCustomProperties": [ + { + "eventCustomProperties": "" + } + ], + "removeExternalId": true, + "whitelistPiiProperties": [ + { + "whitelistPiiProperties": "" + } + ], + "actionSource": "website" + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://graph.facebook.com/v18.0/dummyID/events?access_token=09876", + "headers": {}, + "params": {}, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": { + "data": [ + "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"ViewContent\",\"event_time\":1699784211,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"category\":\"randomCategory\",\"content_ids\":[\"randomCategory\"],\"contents\":[{\"id\":\"randomCategory\",\"quantity\":1}],\"content_type\":\"product_group\",\"content_category\":\"randomCategory\",\"currency\":\"USD\",\"value\":400}}" + ] + } + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "facebook_conversions", + "description": "Track event with standard event product added to wishlist", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "channel": "web", + "context": { + "device": { + "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", + "manufacturer": "Xiaomi", + "model": "Redmi 6", + "name": "xiaomi" + }, + "network": { + "carrier": "Banglalink" + }, + "os": { + "name": "android", + "version": "8.1.0" + }, + "screen": { + "height": "100", + "density": 50 + }, + "traits": { + "email": " aBc@gmail.com ", + "address": { + "zip": 1234 + }, + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" + } + }, + "event": "product added to wishlist", + "integrations": { + "All": true + }, + "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", + "properties": { + "revenue": 400, + "additional_bet_index": 0 + }, + "timestamp": "2023-11-12T15:46:51.693229+05:30", + "type": "track" + }, + "destination": { + "Config": { + "limitedDataUsage": true, + "blacklistPiiProperties": [ + { + "blacklistPiiProperties": "", + "blacklistPiiHash": false + } + ], + "accessToken": "09876", + "datasetId": "dummyID", + "eventsToEvents": [ + { + "from": "", + "to": "" + } + ], + "eventCustomProperties": [ + { + "eventCustomProperties": "" + } + ], + "removeExternalId": true, + "whitelistPiiProperties": [ + { + "whitelistPiiProperties": "" + } + ], + "actionSource": "website" + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://graph.facebook.com/v18.0/dummyID/events?access_token=09876", + "headers": {}, + "params": {}, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": { + "data": [ + "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"AddToWishlist\",\"event_time\":1699784211,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"content_ids\":[],\"contents\":[],\"currency\":\"USD\",\"value\":400}}" + ] + } + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "facebook_conversions", + "description": "Track event with standard event payment info entered", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "channel": "web", + "context": { + "device": { + "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", + "manufacturer": "Xiaomi", + "model": "Redmi 6", + "name": "xiaomi" + }, + "network": { + "carrier": "Banglalink" + }, + "os": { + "name": "android", + "version": "8.1.0" + }, + "screen": { + "height": "100", + "density": 50 + }, + "traits": { + "email": " aBc@gmail.com ", + "address": { + "zip": 1234 + }, + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" + } + }, + "event": "payment info entered", + "integrations": { + "All": true + }, + "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", + "properties": { + "revenue": 400, + "additional_bet_index": 0 + }, + "timestamp": "2023-11-12T15:46:51.693229+05:30", + "type": "track" + }, + "destination": { + "Config": { + "limitedDataUsage": true, + "blacklistPiiProperties": [ + { + "blacklistPiiProperties": "", + "blacklistPiiHash": false + } + ], + "accessToken": "09876", + "datasetId": "dummyID", + "eventsToEvents": [ + { + "from": "", + "to": "" + } + ], + "eventCustomProperties": [ + { + "eventCustomProperties": "" + } + ], + "removeExternalId": true, + "whitelistPiiProperties": [ + { + "whitelistPiiProperties": "" + } + ], + "actionSource": "website" + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://graph.facebook.com/v18.0/dummyID/events?access_token=09876", + "headers": {}, + "params": {}, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": { + "data": [ + "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"AddPaymentInfo\",\"event_time\":1699784211,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"content_ids\":[],\"contents\":[],\"currency\":\"USD\",\"value\":400}}" + ] + } + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "facebook_conversions", + "description": "Track event with standard event order completed with delivery_category in products array", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "channel": "web", + "context": { + "device": { + "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", + "manufacturer": "Xiaomi", + "model": "Redmi 6", + "name": "xiaomi" + }, + "network": { + "carrier": "Banglalink" + }, + "os": { + "name": "android", + "version": "8.1.0" + }, + "screen": { + "height": "100", + "density": 50 + }, + "traits": { + "email": " aBc@gmail.com ", + "address": { + "zip": 1234 + }, + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" + } + }, + "event": "order completed", + "integrations": { + "All": true + }, + "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", + "properties": { + "revenue": 400, + "additional_bet_index": 0, + "products": [ + { + "product_id": 1234, + "quantity": 5, + "price": 55, + "delivery_category": "home_delivery" + } + ] + }, + "timestamp": "2023-11-12T15:46:51.693229+05:30", + "type": "track" + }, + "destination": { + "Config": { + "limitedDataUsage": true, + "blacklistPiiProperties": [ + { + "blacklistPiiProperties": "", + "blacklistPiiHash": false + } + ], + "accessToken": "09876", + "datasetId": "dummyID", + "eventsToEvents": [ + { + "from": "", + "to": "" + } + ], + "eventCustomProperties": [ + { + "eventCustomProperties": "" + } + ], + "removeExternalId": true, + "whitelistPiiProperties": [ + { + "whitelistPiiProperties": "" + } + ], + "actionSource": "website" + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://graph.facebook.com/v18.0/dummyID/events?access_token=09876", + "headers": {}, + "params": {}, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": { + "data": [ + "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"Purchase\",\"event_time\":1699784211,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"products\":[{\"product_id\":1234,\"quantity\":5,\"price\":55,\"delivery_category\":\"home_delivery\"}],\"content_ids\":[1234],\"contents\":[{\"id\":1234,\"quantity\":5,\"item_price\":55,\"delivery_category\":\"home_delivery\"}],\"content_type\":\"product\",\"currency\":\"USD\",\"value\":400,\"num_items\":1}}" + ] + } + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "facebook_conversions", + "description": "Track event with standard event order completed with delivery_category in properties", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "channel": "web", + "context": { + "device": { + "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", + "manufacturer": "Xiaomi", + "model": "Redmi 6", + "name": "xiaomi" + }, + "network": { + "carrier": "Banglalink" + }, + "os": { + "name": "android", + "version": "8.1.0" + }, + "screen": { + "height": "100", + "density": 50 + }, + "traits": { + "email": " aBc@gmail.com ", + "address": { + "zip": 1234 + }, + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" + } + }, + "event": "order completed", + "integrations": { + "All": true + }, + "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", + "properties": { + "revenue": 400, + "additional_bet_index": 0, + "delivery_category": "home_delivery", + "products": [ + { + "product_id": 1234, + "quantity": 5, + "price": 55 + } + ] + }, + "timestamp": "2023-11-12T15:46:51.693229+05:30", + "type": "track" + }, + "destination": { + "Config": { + "limitedDataUsage": true, + "blacklistPiiProperties": [ + { + "blacklistPiiProperties": "", + "blacklistPiiHash": false + } + ], + "accessToken": "09876", + "datasetId": "dummyID", + "eventsToEvents": [ + { + "from": "", + "to": "" + } + ], + "eventCustomProperties": [ + { + "eventCustomProperties": "" + } + ], + "removeExternalId": true, + "whitelistPiiProperties": [ + { + "whitelistPiiProperties": "" + } + ], + "actionSource": "website" + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://graph.facebook.com/v18.0/dummyID/events?access_token=09876", + "headers": {}, + "params": {}, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": { + "data": [ + "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"Purchase\",\"event_time\":1699784211,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"delivery_category\":\"home_delivery\",\"products\":[{\"product_id\":1234,\"quantity\":5,\"price\":55}],\"content_ids\":[1234],\"contents\":[{\"id\":1234,\"quantity\":5,\"item_price\":55,\"delivery_category\":\"home_delivery\"}],\"content_type\":\"product\",\"currency\":\"USD\",\"value\":400,\"num_items\":1}}" + ] + } + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + } +] \ No newline at end of file diff --git a/test/integrations/destinations/facebook_conversions/router/data.ts b/test/integrations/destinations/facebook_conversions/router/data.ts new file mode 100644 index 0000000000..09145aa1e6 --- /dev/null +++ b/test/integrations/destinations/facebook_conversions/router/data.ts @@ -0,0 +1,306 @@ +import { defaultMockFns } from "../mocks" +export const data = [ + { + name: 'facebook_conversions', + description: 'Successfull Remove Group Call ', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + "metadata": { + "jobId": 1 + }, + "message": { + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "channel": "web", + "context": { + "device": { + "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", + "manufacturer": "Xiaomi", + "model": "Redmi 6", + "name": "xiaomi" + }, + "network": { + "carrier": "Banglalink" + }, + "os": { + "name": "android", + "version": "8.1.0" + }, + "screen": { + "height": "100", + "density": 50 + }, + "traits": { + "email": " aBc@gmail.com ", + "address": { + "zip": 1234 + }, + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" + } + }, + "event": "spin_result", + "integrations": { + "All": true + }, + "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", + "properties": { + "revenue": 400, + "additional_bet_index": 0 + }, + "timestamp": "2023-11-12T15:46:51.693229+05:30", + "type": "track" + }, + "destination": { + "Config": { + "limitedDataUsage": true, + "blacklistPiiProperties": [ + { + "blacklistPiiProperties": "", + "blacklistPiiHash": false + } + ], + "accessToken": "09876", + "datasetId": "dummyID", + "eventsToEvents": [ + { + "from": "", + "to": "" + } + ], + "eventCustomProperties": [ + { + "eventCustomProperties": "" + } + ], + "removeExternalId": true, + "whitelistPiiProperties": [ + { + "whitelistPiiProperties": "" + } + ], + "actionSource": "website" + }, + "Enabled": true + } + }, + { + "metadata": { + "jobId": 2 + }, + "message": { + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", + "channel": "web", + "context": { + "device": { + "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", + "manufacturer": "Xiaomi", + "model": "Redmi 6", + "name": "xiaomi" + }, + "network": { + "carrier": "Banglalink" + }, + "os": { + "name": "android", + "version": "8.1.0" + }, + "screen": { + "height": "100", + "density": 50 + }, + "traits": { + "email": " aBc@gmail.com ", + "address": { + "zip": 1234 + }, + "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" + } + }, + "event": "products searched", + "integrations": { + "All": true + }, + "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", + "properties": { + "revenue": 400, + "additional_bet_index": 0 + }, + "timestamp": "2023-11-12T15:46:51.693229+05:30", + "type": "track" + }, + "destination": { + "Config": { + "limitedDataUsage": true, + "blacklistPiiProperties": [ + { + "blacklistPiiProperties": "", + "blacklistPiiHash": false + } + ], + "accessToken": "09876", + "datasetId": "dummyID", + "eventsToEvents": [ + { + "from": "", + "to": "" + } + ], + "eventCustomProperties": [ + { + "eventCustomProperties": "" + } + ], + "removeExternalId": true, + "whitelistPiiProperties": [ + { + "whitelistPiiProperties": "" + } + ], + "actionSource": "website" + }, + "Enabled": true + } + } + ], + destType: 'facebook_conversions', + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + "batchedRequest": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://graph.facebook.com/v18.0/dummyID/events?access_token=09876", + "headers": {}, + "params": {}, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": { + "data": [ + "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"spin_result\",\"event_time\":1699784211,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"value\":400,\"currency\":\"USD\"}}" + ] + } + }, + "files": {} + }, + "metadata": [ + { + "jobId": 1 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "Config": { + "limitedDataUsage": true, + "blacklistPiiProperties": [ + { + "blacklistPiiProperties": "", + "blacklistPiiHash": false + } + ], + "accessToken": "09876", + "datasetId": "dummyID", + "eventsToEvents": [ + { + "from": "", + "to": "" + } + ], + "eventCustomProperties": [ + { + "eventCustomProperties": "" + } + ], + "removeExternalId": true, + "whitelistPiiProperties": [ + { + "whitelistPiiProperties": "" + } + ], + "actionSource": "website" + }, + "Enabled": true + } + }, + { + "batchedRequest": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://graph.facebook.com/v18.0/dummyID/events?access_token=09876", + "headers": {}, + "params": {}, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": { + "data": [ + "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"Search\",\"event_time\":1699784211,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"content_ids\":[],\"contents\":[],\"content_type\":\"product\",\"currency\":\"USD\",\"value\":400}}" + ] + } + }, + "files": {} + }, + "metadata": [ + { + "jobId": 2 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "Config": { + "limitedDataUsage": true, + "blacklistPiiProperties": [ + { + "blacklistPiiProperties": "", + "blacklistPiiHash": false + } + ], + "accessToken": "09876", + "datasetId": "dummyID", + "eventsToEvents": [ + { + "from": "", + "to": "" + } + ], + "eventCustomProperties": [ + { + "eventCustomProperties": "" + } + ], + "removeExternalId": true, + "whitelistPiiProperties": [ + { + "whitelistPiiProperties": "" + } + ], + "actionSource": "website" + }, + "Enabled": true + } + } + ], + }, + }, + }, + "mockFns": defaultMockFns + } +]; diff --git a/test/integrations/destinations/ga4/mocks.ts b/test/integrations/destinations/ga4/mocks.ts new file mode 100644 index 0000000000..a13e124d23 --- /dev/null +++ b/test/integrations/destinations/ga4/mocks.ts @@ -0,0 +1,3 @@ +export const defaultMockFns = () => { + jest.spyOn(Date, 'now').mockImplementation(() => new Date("2022-04-29T05:17:09Z").valueOf()); +}; \ No newline at end of file diff --git a/test/integrations/destinations/ga4/processor/data.ts b/test/integrations/destinations/ga4/processor/data.ts new file mode 100644 index 0000000000..99eca54468 --- /dev/null +++ b/test/integrations/destinations/ga4/processor/data.ts @@ -0,0 +1,14803 @@ +import { defaultMockFns } from "../mocks" +export const data = [ + { + "name": "ga4", + "description": "(gtag) check all property mappings for 'Products Searched' event", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99v4f979fb997ce453373900f891" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "Products Searched", + "properties": { + "query": "t-shirts" + }, + "integrations": { + "All": true + }, + "sentAt": "2022-04-22T10:57:58Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ] + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "body": { + "JSON": { + "client_id": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "timestamp_micros": 1650950229000000, + "events": [ + { + "name": "search", + "params": { + "search_term": "t-shirts", + "engagement_time_msec": 1 + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag) check all property mappings for 'product list viewed' event", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "rudderId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99v4f979fb997ce453373900f891" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "product list viewed", + "properties": { + "list_id": "related_products", + "category": "Related_products", + "products": [ + { + "product_id": "507f1f77bcf86cd799439011", + "name": "Monopoly: 3rd Edition", + "coupon": "SUMMER_FUN", + "category": "Apparel", + "brand": "Google", + "variant": "green", + "price": "19", + "quantity": "2", + "position": "1", + "affiliation": "Google Merchandise Store", + "currency": "USD", + "discount": 2.22, + "item_category2": "Adult", + "item_category3": "Shirts", + "item_category4": "Crew", + "item_category5": "Short sleeve", + "item_list_id": "related_products", + "item_list_name": "Related Products", + "location_id": "L_12345" + } + ] + }, + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ] + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "body": { + "JSON": { + "client_id": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "timestamp_micros": 1650950229000000, + "non_personalized_ads": true, + "events": [ + { + "name": "view_item_list", + "params": { + "item_list_id": "related_products", + "item_list_name": "Related_products", + "items": [ + { + "item_id": "507f1f77bcf86cd799439011", + "item_name": "Monopoly: 3rd Edition", + "coupon": "SUMMER_FUN", + "item_category": "Apparel", + "item_brand": "Google", + "item_variant": "green", + "price": 19, + "quantity": 2, + "index": 1, + "affiliation": "Google Merchandise Store", + "currency": "USD", + "discount": 2.22, + "item_category2": "Adult", + "item_category3": "Shirts", + "item_category4": "Crew", + "item_category5": "Short sleeve", + "item_list_id": "related_products", + "item_list_name": "Related Products", + "location_id": "L_12345" + } + ], + "engagement_time_msec": 1 + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag) check all property mappings for 'promotion viewed' event", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "promotion viewed", + "properties": { + "creative_name": "Summer Banner", + "creative_slot": "featured_app_1", + "location_id": "L_12345", + "promotion_id": "P_12345", + "promotion_name": "Summer Sale", + "products": [ + { + "product_id": "507f1f77bcf86cd799439011", + "name": "Monopoly: 3rd Edition", + "coupon": "SUMMER_FUN", + "category": "Apparel", + "brand": "Google", + "variant": "green", + "price": "19", + "quantity": "2", + "position": "0", + "affiliation": "Google Merchandise Store", + "currency": "USD", + "discount": 2.22, + "item_category2": "Adult", + "item_category3": "Shirts", + "item_category4": "Crew", + "item_category5": "Short sleeve", + "item_list_id": "related_products", + "item_list_name": "Related Products", + "location_id": "L_12345", + "promotion_id": "P_12345", + "promotion_name": "Summer Sale", + "creative_name": "summer_banner2", + "creative_slot": "featured_app_1" + } + ] + }, + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "body": { + "JSON": { + "timestamp_micros": 1650950229000000, + "non_personalized_ads": true, + "client_id": "client_id", + "events": [ + { + "name": "view_promotion", + "params": { + "creative_name": "Summer Banner", + "creative_slot": "featured_app_1", + "location_id": "L_12345", + "promotion_id": "P_12345", + "promotion_name": "Summer Sale", + "engagement_time_msec": 1, + "items": [ + { + "item_id": "507f1f77bcf86cd799439011", + "item_name": "Monopoly: 3rd Edition", + "coupon": "SUMMER_FUN", + "item_category": "Apparel", + "item_brand": "Google", + "item_variant": "green", + "price": 19, + "quantity": 2, + "index": 0, + "affiliation": "Google Merchandise Store", + "currency": "USD", + "discount": 2.22, + "item_category2": "Adult", + "item_category3": "Shirts", + "item_category4": "Crew", + "item_category5": "Short sleeve", + "item_list_id": "related_products", + "item_list_name": "Related Products", + "location_id": "L_12345", + "promotion_id": "P_12345", + "promotion_name": "Summer Sale", + "creative_name": "summer_banner2", + "creative_slot": "featured_app_1" + } + ] + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag) check all property mappings for 'promotion clicked' event", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "promotion clicked", + "properties": { + "creative_name": "Summer Banner", + "creative_slot": "featured_app_1", + "location_id": "L_12345", + "promotion_id": "P_12345", + "promotion_name": "Summer Sale", + "products": [ + { + "product_id": "507f1f77bcf86cd799439011", + "name": "Monopoly: 3rd Edition", + "coupon": "SUMMER_FUN", + "category": "Apparel", + "brand": "Google", + "variant": "green", + "price": "19", + "quantity": "2", + "position": "0", + "affiliation": "Google Merchandise Store", + "currency": "USD", + "discount": 2.22, + "item_category2": "Adult", + "item_category3": "Shirts", + "item_category4": "Crew", + "item_category5": "Short sleeve", + "item_list_id": "related_products", + "item_list_name": "Related Products", + "location_id": "L_12345", + "promotion_id": "P_12345", + "promotion_name": "Summer Sale", + "creative_name": "summer_banner2", + "creative_slot": "featured_app_1" + } + ] + }, + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "body": { + "JSON": { + "client_id": "client_id", + "timestamp_micros": 1650950229000000, + "non_personalized_ads": true, + "events": [ + { + "name": "select_promotion", + "params": { + "creative_name": "Summer Banner", + "creative_slot": "featured_app_1", + "location_id": "L_12345", + "promotion_id": "P_12345", + "promotion_name": "Summer Sale", + "engagement_time_msec": 1, + "items": [ + { + "item_id": "507f1f77bcf86cd799439011", + "item_name": "Monopoly: 3rd Edition", + "coupon": "SUMMER_FUN", + "item_category": "Apparel", + "item_brand": "Google", + "item_variant": "green", + "price": 19, + "quantity": 2, + "index": 0, + "affiliation": "Google Merchandise Store", + "currency": "USD", + "discount": 2.22, + "item_category2": "Adult", + "item_category3": "Shirts", + "item_category4": "Crew", + "item_category5": "Short sleeve", + "item_list_id": "related_products", + "item_list_name": "Related Products", + "location_id": "L_12345", + "promotion_id": "P_12345", + "promotion_name": "Summer Sale", + "creative_name": "summer_banner2", + "creative_slot": "featured_app_1" + } + ] + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag) exclude only 'products' property from 'promotion clicked' event", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "promotion clicked", + "properties": { + "creative_name": "Summer Banner", + "creative_slot": "featured_app_1", + "location_id": "L_12345", + "promotion_id": "P_12345", + "promotion_name": "Summer Sale" + }, + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "body": { + "JSON": { + "client_id": "client_id", + "timestamp_micros": 1650950229000000, + "non_personalized_ads": true, + "events": [ + { + "name": "select_promotion", + "params": { + "creative_name": "Summer Banner", + "creative_slot": "featured_app_1", + "location_id": "L_12345", + "promotion_id": "P_12345", + "promotion_name": "Summer Sale", + "engagement_time_msec": 1 + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag) check all property mappings for 'product clicked' event", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "product clicked", + "properties": { + "list_id": "related_products", + "category": "Related_products", + "product_id": "507f1f77bcf86cd799439011", + "name": "Monopoly: 3rd Edition", + "coupon": "SUMMER_FUN", + "brand": "Google", + "variant": "green", + "price": "19", + "quantity": "2", + "position": "1", + "affiliation": "Google Merchandise Store", + "currency": "USD", + "discount": 2.22, + "item_category2": "Adult", + "item_category3": "Shirts", + "item_category4": "Crew", + "item_category5": "Short sleeve", + "item_list_id": "related_products", + "item_list_name": "Related Products", + "location_id": "L_12345", + "timezone": { + "name": "Europe/Tallinn" + }, + "engagementTimeMsec": 100, + "sessionId": 655 + }, + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "body": { + "JSON": { + "client_id": "client_id", + "timestamp_micros": 1650950229000000, + "non_personalized_ads": true, + "events": [ + { + "name": "select_item", + "params": { + "item_list_id": "related_products", + "item_list_name": "Related_products", + "items": [ + { + "item_id": "507f1f77bcf86cd799439011", + "item_name": "Monopoly: 3rd Edition", + "coupon": "SUMMER_FUN", + "item_category": "Related_products", + "item_brand": "Google", + "item_variant": "green", + "price": 19, + "quantity": 2, + "index": 1, + "affiliation": "Google Merchandise Store", + "currency": "USD", + "discount": 2.22, + "item_category2": "Adult", + "item_category3": "Shirts", + "item_category4": "Crew", + "item_category5": "Short sleeve", + "item_list_id": "related_products", + "item_list_name": "Related Products", + "location_id": "L_12345" + } + ], + "timezone_name": "Europe/Tallinn", + "engagement_time_msec": 100, + "session_id": 655 + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag) check all property mappings for 'product viewed' event", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "product viewed", + "properties": { + "currency": "USD", + "total": "7.77", + "product_id": "507f1f77bcf86cd799439011", + "name": "Monopoly: 3rd Edition", + "coupon": "SUMMER_FUN", + "category": "Apparel", + "brand": "Google", + "variant": "green", + "price": "19", + "quantity": "2", + "position": "1", + "affiliation": "Google Merchandise Store", + "discount": 2.22, + "item_category2": "Adult", + "item_category3": "Shirts", + "item_category4": "Crew", + "item_category5": "Short sleeve", + "item_list_id": "related_products", + "item_list_name": "Related Products", + "location_id": "L_12345" + }, + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "body": { + "JSON": { + "client_id": "client_id", + "timestamp_micros": 1650950229000000, + "non_personalized_ads": true, + "events": [ + { + "name": "view_item", + "params": { + "currency": "USD", + "value": 7.77, + "engagement_time_msec": 1, + "items": [ + { + "item_id": "507f1f77bcf86cd799439011", + "item_name": "Monopoly: 3rd Edition", + "coupon": "SUMMER_FUN", + "item_category": "Apparel", + "item_brand": "Google", + "item_variant": "green", + "price": 19, + "quantity": 2, + "index": 1, + "affiliation": "Google Merchandise Store", + "currency": "USD", + "discount": 2.22, + "item_category2": "Adult", + "item_category3": "Shirts", + "item_category4": "Crew", + "item_category5": "Short sleeve", + "item_list_id": "related_products", + "item_list_name": "Related Products", + "location_id": "L_12345" + } + ] + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag) check all property mappings for 'promotion clicked' event", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "promotion clicked", + "properties": { + "creative_name": "Summer Banner", + "creative_slot": "featured_app_1", + "location_id": "L_12345", + "promotion_id": "P_12345", + "promotion_name": "Summer Sale", + "products": [ + { + "product_id": "507f1f77bcf86cd799439011", + "name": "Monopoly: 3rd Edition", + "coupon": "SUMMER_FUN", + "category": "Apparel", + "brand": "Google", + "variant": "green", + "price": "19", + "quantity": "2", + "position": "0", + "affiliation": "Google Merchandise Store", + "currency": "USD", + "discount": 2.22, + "item_category2": "Adult", + "item_category3": "Shirts", + "item_category4": "Crew", + "item_category5": "Short sleeve", + "item_list_id": "related_products", + "item_list_name": "Related Products", + "location_id": "L_12345", + "promotion_id": "P_12345", + "promotion_name": "Summer Sale", + "creative_name": "summer_banner2", + "creative_slot": "featured_app_1" + } + ] + }, + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "typesOfClient": "gtag", + "firebaseAppId": "1:17864591371:android:7a9520d3c78962e21f9fee", + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "body": { + "JSON": { + "timestamp_micros": 1650950229000000, + "non_personalized_ads": true, + "client_id": "client_id", + "events": [ + { + "name": "select_promotion", + "params": { + "creative_name": "Summer Banner", + "creative_slot": "featured_app_1", + "location_id": "L_12345", + "promotion_id": "P_12345", + "promotion_name": "Summer Sale", + "engagement_time_msec": 1, + "items": [ + { + "item_id": "507f1f77bcf86cd799439011", + "item_name": "Monopoly: 3rd Edition", + "coupon": "SUMMER_FUN", + "item_category": "Apparel", + "item_brand": "Google", + "item_variant": "green", + "price": 19, + "quantity": 2, + "index": 0, + "affiliation": "Google Merchandise Store", + "currency": "USD", + "discount": 2.22, + "item_category2": "Adult", + "item_category3": "Shirts", + "item_category4": "Crew", + "item_category5": "Short sleeve", + "item_list_id": "related_products", + "item_list_name": "Related Products", + "location_id": "L_12345", + "promotion_id": "P_12345", + "promotion_name": "Summer Sale", + "creative_name": "summer_banner2", + "creative_slot": "featured_app_1" + } + ] + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(firebase) check all property mappings for 'promotion clicked' event", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "promotion clicked", + "properties": { + "creative_name": "Summer Banner", + "creative_slot": "featured_app_1", + "location_id": "L_12345", + "promotion_id": "P_12345", + "promotion_name": "Summer Sale", + "products": [ + { + "product_id": "507f1f77bcf86cd799439011", + "name": "Monopoly: 3rd Edition", + "coupon": "SUMMER_FUN", + "category": "Apparel", + "brand": "Google", + "variant": "green", + "price": "19", + "quantity": "2", + "position": "0", + "affiliation": "Google Merchandise Store", + "currency": "USD", + "discount": 2.22, + "item_category2": "Adult", + "item_category3": "Shirts", + "item_category4": "Crew", + "item_category5": "Short sleeve", + "item_list_id": "related_products", + "item_list_name": "Related Products", + "location_id": "L_12345", + "promotion_id": "P_12345", + "promotion_name": "Summer Sale", + "creative_name": "summer_banner2", + "creative_slot": "featured_app_1" + } + ] + }, + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "typesOfClient": "firebase", + "firebaseAppId": "1:17864591371:android:7a9520d3c78962e21f9fee", + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "firebase_app_id": "1:17864591371:android:7a9520d3c78962e21f9fee" + }, + "body": { + "JSON": { + "timestamp_micros": 1650950229000000, + "non_personalized_ads": true, + "app_instance_id": "f0dd99b6f979fb551ce583373900f937", + "events": [ + { + "name": "select_promotion", + "params": { + "creative_name": "Summer Banner", + "creative_slot": "featured_app_1", + "location_id": "L_12345", + "promotion_id": "P_12345", + "promotion_name": "Summer Sale", + "engagement_time_msec": 1, + "items": [ + { + "item_id": "507f1f77bcf86cd799439011", + "item_name": "Monopoly: 3rd Edition", + "coupon": "SUMMER_FUN", + "item_category": "Apparel", + "item_brand": "Google", + "item_variant": "green", + "price": 19, + "quantity": 2, + "index": 0, + "affiliation": "Google Merchandise Store", + "currency": "USD", + "discount": 2.22, + "item_category2": "Adult", + "item_category3": "Shirts", + "item_category4": "Crew", + "item_category5": "Short sleeve", + "item_list_id": "related_products", + "item_list_name": "Related Products", + "location_id": "L_12345", + "promotion_id": "P_12345", + "promotion_name": "Summer Sale", + "creative_name": "summer_banner2", + "creative_slot": "featured_app_1" + } + ] + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag) check all property mappings for 'product added' event", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "product added", + "properties": { + "currency": "USD", + "total": "7.77", + "products": [ + { + "product_id": "507f1f77bcf86cd799439011", + "name": "Monopoly: 3rd Edition", + "coupon": "SUMMER_FUN", + "category": "Apparel", + "brand": "Google", + "variant": "green", + "price": "19", + "quantity": "2", + "position": "1", + "affiliation": "Google Merchandise Store", + "currency": "USD", + "discount": 2.22, + "item_category2": "Adult", + "item_category3": "Shirts", + "item_category4": "Crew", + "item_category5": "Short sleeve", + "item_list_id": "related_products", + "item_list_name": "Related Products", + "location_id": "L_12345" + } + ] + }, + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "body": { + "JSON": { + "client_id": "client_id", + "timestamp_micros": 1650950229000000, + "non_personalized_ads": true, + "events": [ + { + "name": "add_to_cart", + "params": { + "currency": "USD", + "value": 7.77, + "engagement_time_msec": 1, + "items": [ + { + "item_id": "507f1f77bcf86cd799439011", + "item_name": "Monopoly: 3rd Edition", + "coupon": "SUMMER_FUN", + "item_category": "Apparel", + "item_brand": "Google", + "item_variant": "green", + "price": 19, + "quantity": 2, + "index": 1, + "affiliation": "Google Merchandise Store", + "currency": "USD", + "discount": 2.22, + "item_category2": "Adult", + "item_category3": "Shirts", + "item_category4": "Crew", + "item_category5": "Short sleeve", + "item_list_id": "related_products", + "item_list_name": "Related Products", + "location_id": "L_12345" + } + ] + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag) check all property mappings for 'product removed' event", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "product removed", + "properties": { + "currency": "USD", + "total": "7.77", + "products": [ + { + "product_id": "507f1f77bcf86cd799439011", + "name": "Monopoly: 3rd Edition", + "coupon": "SUMMER_FUN", + "category": "Apparel", + "brand": "Google", + "variant": "green", + "price": "19", + "quantity": "2", + "position": "1", + "affiliation": "Google Merchandise Store", + "currency": "USD", + "discount": 2.22, + "item_category2": "Adult", + "item_category3": "Shirts", + "item_category4": "Crew", + "item_category5": "Short sleeve", + "item_list_id": "related_products", + "item_list_name": "Related Products", + "location_id": "L_12345" + } + ], + "engagementTimeMsec": 100, + "sessionId": 655 + }, + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "body": { + "JSON": { + "client_id": "client_id", + "timestamp_micros": 1650950229000000, + "non_personalized_ads": true, + "events": [ + { + "name": "remove_from_cart", + "params": { + "currency": "USD", + "value": 7.77, + "items": [ + { + "item_id": "507f1f77bcf86cd799439011", + "item_name": "Monopoly: 3rd Edition", + "coupon": "SUMMER_FUN", + "item_category": "Apparel", + "item_brand": "Google", + "item_variant": "green", + "price": 19, + "quantity": 2, + "index": 1, + "affiliation": "Google Merchandise Store", + "currency": "USD", + "discount": 2.22, + "item_category2": "Adult", + "item_category3": "Shirts", + "item_category4": "Crew", + "item_category5": "Short sleeve", + "item_list_id": "related_products", + "item_list_name": "Related Products", + "location_id": "L_12345" + } + ], + "engagement_time_msec": 100, + "session_id": 655 + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag) check all property mappings for 'cart viewed' event", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "cart viewed", + "properties": { + "currency": "USD", + "total": "7.77", + "products": [ + { + "product_id": "507f1f77bcf86cd799439011", + "name": "Monopoly: 3rd Edition", + "coupon": "SUMMER_FUN", + "category": "Apparel", + "brand": "Google", + "variant": "green", + "price": "19", + "quantity": "2", + "position": "1", + "affiliation": "Google Merchandise Store", + "currency": "USD", + "discount": 2.22, + "item_category2": "Adult", + "item_category3": "Shirts", + "item_category4": "Crew", + "item_category5": "Short sleeve", + "item_list_id": "related_products", + "item_list_name": "Related Products", + "location_id": "L_12345" + } + ] + }, + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "body": { + "JSON": { + "client_id": "client_id", + "timestamp_micros": 1650950229000000, + "non_personalized_ads": true, + "events": [ + { + "name": "view_cart", + "params": { + "currency": "USD", + "value": 7.77, + "engagement_time_msec": 1, + "items": [ + { + "item_id": "507f1f77bcf86cd799439011", + "item_name": "Monopoly: 3rd Edition", + "coupon": "SUMMER_FUN", + "item_category": "Apparel", + "item_brand": "Google", + "item_variant": "green", + "price": 19, + "quantity": 2, + "index": 1, + "affiliation": "Google Merchandise Store", + "currency": "USD", + "discount": 2.22, + "item_category2": "Adult", + "item_category3": "Shirts", + "item_category4": "Crew", + "item_category5": "Short sleeve", + "item_list_id": "related_products", + "item_list_name": "Related Products", + "location_id": "L_12345" + } + ] + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag) check all property mappings for 'checkout started' event", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "checkout started", + "properties": { + "currency": "USD", + "total": 7.77, + "coupon": "SUMMER_FUN", + "products": [ + { + "product_id": "507f1f77bcf86cd799439011", + "name": "Monopoly: 3rd Edition", + "coupon": "SUMMER_FUN", + "category": "Apparel", + "brand": "Google", + "variant": "green", + "price": "19", + "quantity": "2", + "position": "1", + "affiliation": "Google Merchandise Store", + "currency": "USD", + "discount": 2.22, + "item_category2": "Adult", + "item_category3": "Shirts", + "item_category4": "Crew", + "item_category5": "Short sleeve", + "item_list_id": "related_products", + "item_list_name": "Related Products", + "location_id": "L_12345" + } + ] + }, + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "body": { + "JSON": { + "client_id": "client_id", + "timestamp_micros": 1650950229000000, + "non_personalized_ads": true, + "events": [ + { + "name": "begin_checkout", + "params": { + "currency": "USD", + "value": 7.77, + "coupon": "SUMMER_FUN", + "engagement_time_msec": 1, + "items": [ + { + "item_id": "507f1f77bcf86cd799439011", + "item_name": "Monopoly: 3rd Edition", + "coupon": "SUMMER_FUN", + "item_category": "Apparel", + "item_brand": "Google", + "item_variant": "green", + "price": 19, + "quantity": 2, + "index": 1, + "affiliation": "Google Merchandise Store", + "currency": "USD", + "discount": 2.22, + "item_category2": "Adult", + "item_category3": "Shirts", + "item_category4": "Crew", + "item_category5": "Short sleeve", + "item_list_id": "related_products", + "item_list_name": "Related Products", + "location_id": "L_12345" + } + ] + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag) check all property mappings for 'payment info entered' -> 'add_payment_info' event", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "payment info entered", + "properties": { + "currency": "USD", + "value": "7.77", + "coupon": "SUMMER_FUN", + "payment_method": "Credit Card", + "products": [ + { + "product_id": "507f1f77bcf86cd799439011", + "name": "Monopoly: 3rd Edition", + "coupon": "SUMMER_FUN", + "category": "Apparel", + "brand": "Google", + "variant": "green", + "price": "19", + "quantity": "2", + "position": "1", + "affiliation": "Google Merchandise Store", + "currency": "USD", + "discount": 2.22, + "item_category2": "Adult", + "item_category3": "Shirts", + "item_category4": "Crew", + "item_category5": "Short sleeve", + "item_list_id": "related_products", + "item_list_name": "Related Products", + "location_id": "L_12345" + } + ] + }, + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "body": { + "JSON": { + "client_id": "client_id", + "timestamp_micros": 1650950229000000, + "non_personalized_ads": true, + "events": [ + { + "params": { + "currency": "USD", + "value": 7.77, + "coupon": "SUMMER_FUN", + "payment_type": "Credit Card", + "engagement_time_msec": 1, + "items": [ + { + "item_id": "507f1f77bcf86cd799439011", + "item_name": "Monopoly: 3rd Edition", + "coupon": "SUMMER_FUN", + "item_category": "Apparel", + "item_brand": "Google", + "item_variant": "green", + "price": 19, + "quantity": 2, + "index": 1, + "affiliation": "Google Merchandise Store", + "currency": "USD", + "discount": 2.22, + "item_category2": "Adult", + "item_category3": "Shirts", + "item_category4": "Crew", + "item_category5": "Short sleeve", + "item_list_id": "related_products", + "item_list_name": "Related Products", + "location_id": "L_12345" + } + ] + }, + "name": "add_payment_info" + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag) check all property mappings for 'checkout Step Completed' -> 'add_shipping_info' event", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "checkout Step Completed", + "properties": { + "currency": "USD", + "value": "7.77", + "coupon": "SUMMER_FUN", + "shipping_method": "Ground", + "products": [ + { + "product_id": "507f1f77bcf86cd799439011", + "name": "Monopoly: 3rd Edition", + "coupon": "SUMMER_FUN", + "category": "Apparel", + "brand": "Google", + "variant": "green", + "price": "19", + "quantity": "2", + "position": "1", + "affiliation": "Google Merchandise Store", + "currency": "USD", + "discount": 2.22, + "item_category2": "Adult", + "item_category3": "Shirts", + "item_category4": "Crew", + "item_category5": "Short sleeve", + "item_list_id": "related_products", + "item_list_name": "Related Products", + "location_id": "L_12345" + } + ] + }, + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "body": { + "JSON": { + "client_id": "client_id", + "timestamp_micros": 1650950229000000, + "non_personalized_ads": true, + "events": [ + { + "params": { + "currency": "USD", + "value": 7.77, + "coupon": "SUMMER_FUN", + "shipping_tier": "Ground", + "engagement_time_msec": 1, + "items": [ + { + "item_id": "507f1f77bcf86cd799439011", + "item_name": "Monopoly: 3rd Edition", + "coupon": "SUMMER_FUN", + "item_category": "Apparel", + "item_brand": "Google", + "item_variant": "green", + "price": 19, + "quantity": 2, + "index": 1, + "affiliation": "Google Merchandise Store", + "currency": "USD", + "discount": 2.22, + "item_category2": "Adult", + "item_category3": "Shirts", + "item_category4": "Crew", + "item_category5": "Short sleeve", + "item_list_id": "related_products", + "item_list_name": "Related Products", + "location_id": "L_12345" + } + ] + }, + "name": "add_shipping_info" + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag) check all property mappings for 'order completed' event", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "order completed", + "properties": { + "currency": "USD", + "order_id": "T_12345", + "total": 12.21, + "affiliation": "Google Store", + "coupon": "SUMMER_FUN", + "shipping": 3.33, + "tax": 1.11, + "products": [ + { + "product_id": "507f1f77bcf86cd799439011", + "name": "Monopoly: 3rd Edition", + "coupon": "SUMMER_FUN", + "category": "Apparel", + "brand": "Google", + "variant": "green", + "price": "19", + "quantity": "2", + "position": "1", + "affiliation": "Google Merchandise Store", + "currency": "USD", + "discount": 2.22, + "item_category2": "Adult", + "item_category3": "Shirts", + "item_category4": "Crew", + "item_category5": "Short sleeve", + "item_list_id": "related_products", + "item_list_name": "Related Products", + "location_id": "L_12345" + } + ] + }, + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "body": { + "JSON": { + "client_id": "client_id", + "timestamp_micros": 1650950229000000, + "non_personalized_ads": true, + "events": [ + { + "name": "purchase", + "params": { + "currency": "USD", + "transaction_id": "T_12345", + "value": 12.21, + "affiliation": "Google Store", + "coupon": "SUMMER_FUN", + "shipping": 3.33, + "tax": 1.11, + "engagement_time_msec": 1, + "items": [ + { + "item_id": "507f1f77bcf86cd799439011", + "item_name": "Monopoly: 3rd Edition", + "coupon": "SUMMER_FUN", + "item_category": "Apparel", + "item_brand": "Google", + "item_variant": "green", + "price": 19, + "quantity": 2, + "index": 1, + "affiliation": "Google Merchandise Store", + "currency": "USD", + "discount": 2.22, + "item_category2": "Adult", + "item_category3": "Shirts", + "item_category4": "Crew", + "item_category5": "Short sleeve", + "item_list_id": "related_products", + "item_list_name": "Related Products", + "location_id": "L_12345" + } + ] + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag) check all property mappings for 'order refunded' event", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "order refunded", + "properties": { + "currency": "USD", + "order_id": "T_12345", + "total": 12.21, + "affiliation": "Google Store", + "coupon": "SUMMER_FUN", + "shipping": 3.33, + "tax": 1.11, + "products": [ + { + "product_id": "507f1f77bcf86cd799439011", + "name": "Monopoly: 3rd Edition", + "coupon": "SUMMER_FUN", + "category": "Apparel", + "brand": "Google", + "variant": "green", + "price": "19", + "quantity": "2", + "position": "1", + "affiliation": "Google Merchandise Store", + "currency": "USD", + "discount": 2.22, + "item_category2": "Adult", + "item_category3": "Shirts", + "item_category4": "Crew", + "item_category5": "Short sleeve", + "item_list_id": "related_products", + "item_list_name": "Related Products", + "location_id": "L_12345" + } + ] + }, + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "body": { + "JSON": { + "client_id": "client_id", + "timestamp_micros": 1650950229000000, + "non_personalized_ads": true, + "events": [ + { + "name": "refund", + "params": { + "currency": "USD", + "transaction_id": "T_12345", + "value": 12.21, + "affiliation": "Google Store", + "coupon": "SUMMER_FUN", + "shipping": 3.33, + "tax": 1.11, + "engagement_time_msec": 1, + "items": [ + { + "item_id": "507f1f77bcf86cd799439011", + "item_name": "Monopoly: 3rd Edition", + "coupon": "SUMMER_FUN", + "item_category": "Apparel", + "item_brand": "Google", + "item_variant": "green", + "price": 19, + "quantity": 2, + "index": 1, + "affiliation": "Google Merchandise Store", + "currency": "USD", + "discount": 2.22, + "item_category2": "Adult", + "item_category3": "Shirts", + "item_category4": "Crew", + "item_category5": "Short sleeve", + "item_list_id": "related_products", + "item_list_name": "Related Products", + "location_id": "L_12345" + } + ] + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag) exclude only 'products' property from 'order refunded' event", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "order refunded", + "properties": { + "currency": "USD", + "order_id": "T_12345", + "total": 12.21, + "affiliation": "Google Store", + "coupon": "SUMMER_FUN", + "shipping": 3.33, + "tax": 1.11 + }, + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "body": { + "JSON": { + "client_id": "client_id", + "timestamp_micros": 1650950229000000, + "non_personalized_ads": true, + "events": [ + { + "name": "refund", + "params": { + "currency": "USD", + "transaction_id": "T_12345", + "value": 12.21, + "affiliation": "Google Store", + "coupon": "SUMMER_FUN", + "shipping": 3.33, + "tax": 1.11, + "engagement_time_msec": 1 + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag) check all property mappings for 'product added to wishlist' event", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "product added to wishlist", + "properties": { + "currency": "USD", + "total": "7.77", + "products": [ + { + "product_id": "507f1f77bcf86cd799439011", + "name": "Monopoly: 3rd Edition", + "coupon": "SUMMER_FUN", + "category": "Apparel", + "brand": "Google", + "variant": "green", + "price": "19", + "quantity": "2", + "position": "1", + "affiliation": "Google Merchandise Store", + "currency": "USD", + "discount": 2.22, + "item_category2": "Adult", + "item_category3": "Shirts", + "item_category4": "Crew", + "item_category5": "Short sleeve", + "item_list_id": "related_products", + "item_list_name": "Related Products", + "location_id": "L_12345" + } + ] + }, + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "body": { + "JSON": { + "client_id": "client_id", + "timestamp_micros": 1650950229000000, + "non_personalized_ads": true, + "events": [ + { + "name": "add_to_wishlist", + "params": { + "currency": "USD", + "value": 7.77, + "engagement_time_msec": 1, + "items": [ + { + "item_id": "507f1f77bcf86cd799439011", + "item_name": "Monopoly: 3rd Edition", + "coupon": "SUMMER_FUN", + "item_category": "Apparel", + "item_brand": "Google", + "item_variant": "green", + "price": 19, + "quantity": 2, + "index": 1, + "affiliation": "Google Merchandise Store", + "currency": "USD", + "discount": 2.22, + "item_category2": "Adult", + "item_category3": "Shirts", + "item_category4": "Crew", + "item_category5": "Short sleeve", + "item_list_id": "related_products", + "item_list_name": "Related Products", + "location_id": "L_12345" + } + ] + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag) check all property mappings for 'product_shared' event", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "product_shared", + "properties": { + "share_via": "Twitter", + "content_type": "image", + "item_id": "C_12345" + }, + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "body": { + "JSON": { + "client_id": "client_id", + "timestamp_micros": 1650950229000000, + "non_personalized_ads": true, + "events": [ + { + "name": "share", + "params": { + "method": "Twitter", + "content_type": "image", + "item_id": "C_12345", + "engagement_time_msec": 1 + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag) send only 'product_shared' event name without it's properties", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "product_shared", + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "body": { + "JSON": { + "client_id": "client_id", + "timestamp_micros": 1650950229000000, + "non_personalized_ads": true, + "events": [ + { + "name": "share", + "params": { + "engagement_time_msec": 1 + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag) check all property mappings for 'cart Shared' event", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "cart Shared", + "properties": { + "share_via": "Twitter", + "content_type": "image", + "item_id": "C_12345" + }, + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "body": { + "JSON": { + "client_id": "client_id", + "timestamp_micros": 1650950229000000, + "non_personalized_ads": true, + "events": [ + { + "name": "share", + "params": { + "method": "Twitter", + "content_type": "image", + "item_id": "C_12345", + "engagement_time_msec": 1 + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag) send only 'cart Shared' event name with empty properties: {}", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "cart Shared", + "properties": {}, + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "body": { + "JSON": { + "client_id": "client_id", + "timestamp_micros": 1650950229000000, + "non_personalized_ads": true, + "events": [ + { + "name": "share", + "params": { + "engagement_time_msec": 1 + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag) check all property mappings for group call", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "group", + "properties": { + "group_id": "G_12345", + "engagementTimeMsec": 100, + "sessionId": 655 + }, + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "body": { + "JSON": { + "client_id": "client_id", + "timestamp_micros": 1650950229000000, + "non_personalized_ads": true, + "events": [ + { + "name": "group", + "params": { + "group_id": "G_12345", + "engagement_time_msec": 100, + "session_id": 655 + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag) group: send only group event name without it's properties", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "group", + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "body": { + "JSON": { + "client_id": "client_id", + "timestamp_micros": 1650950229000000, + "non_personalized_ads": true, + "events": [ + { + "name": "group", + "params": { + "engagement_time_msec": 1 + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag) check all property mappings for 'earn virtual currency' event", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "earn virtual currency", + "properties": { + "virtual_currency_name": "Gems", + "value": 5 + }, + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "body": { + "JSON": { + "client_id": "client_id", + "timestamp_micros": 1650950229000000, + "non_personalized_ads": true, + "events": [ + { + "name": "earn_virtual_currency", + "params": { + "virtual_currency_name": "Gems", + "value": 5, + "engagement_time_msec": 1 + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag) send only 'earn virtual currency' event name without it's properties", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "earn virtual currency", + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "body": { + "JSON": { + "client_id": "client_id", + "timestamp_micros": 1650950229000000, + "non_personalized_ads": true, + "events": [ + { + "name": "earn_virtual_currency", + "params": { + "engagement_time_msec": 1 + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag) check all property mappings for 'generate_lead' event", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "generate_lead", + "properties": { + "currency": "USD", + "value": 99.99 + }, + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "body": { + "JSON": { + "client_id": "client_id", + "timestamp_micros": 1650950229000000, + "non_personalized_ads": true, + "events": [ + { + "name": "generate_lead", + "params": { + "currency": "USD", + "value": 99.99, + "engagement_time_msec": 1 + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag) check all property mappings for 'level_up' event", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "level_up", + "properties": { + "level": 5, + "character": "Player 1" + }, + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "body": { + "JSON": { + "client_id": "client_id", + "timestamp_micros": 1650950229000000, + "non_personalized_ads": true, + "events": [ + { + "name": "level_up", + "params": { + "level": 5, + "character": "Player 1", + "engagement_time_msec": 1 + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag) send only 'level_up' event name without it's properties", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "level_up", + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "body": { + "JSON": { + "client_id": "client_id", + "timestamp_micros": 1650950229000000, + "non_personalized_ads": true, + "events": [ + { + "name": "level_up", + "params": { + "engagement_time_msec": 1 + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag) check all property mappings for 'login' event", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "login", + "properties": { + "method": "Google" + }, + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "body": { + "JSON": { + "client_id": "client_id", + "timestamp_micros": 1650950229000000, + "non_personalized_ads": true, + "events": [ + { + "name": "login", + "params": { + "method": "Google", + "engagement_time_msec": 1 + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag) send only 'login' event name without it's properties", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "login", + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "body": { + "JSON": { + "client_id": "client_id", + "timestamp_micros": 1650950229000000, + "non_personalized_ads": true, + "events": [ + { + "name": "login", + "params": { + "engagement_time_msec": 1 + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag) check all property mappings for 'post_score' event", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "post_score", + "properties": { + "score": 10000, + "level": 5, + "character": "Player 1" + }, + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "body": { + "JSON": { + "client_id": "client_id", + "timestamp_micros": 1650950229000000, + "non_personalized_ads": true, + "events": [ + { + "name": "post_score", + "params": { + "score": 10000, + "level": 5, + "character": "Player 1", + "engagement_time_msec": 1 + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag) send only 'login' event name with its required `score` properties", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "post_score", + "properties": { + "score": 10000 + }, + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "body": { + "JSON": { + "client_id": "client_id", + "timestamp_micros": 1650950229000000, + "non_personalized_ads": true, + "events": [ + { + "name": "post_score", + "params": { + "score": 10000, + "engagement_time_msec": 1 + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag) check all property mappings for 'select_content' event", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "select_content", + "properties": { + "content_type": "product", + "item_id": "I_12345" + }, + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "body": { + "JSON": { + "client_id": "client_id", + "timestamp_micros": 1650950229000000, + "non_personalized_ads": true, + "events": [ + { + "name": "select_content", + "params": { + "content_type": "product", + "item_id": "I_12345", + "engagement_time_msec": 1 + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag) send only 'group' event name without it's properties", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "select_content", + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "body": { + "JSON": { + "client_id": "client_id", + "timestamp_micros": 1650950229000000, + "non_personalized_ads": true, + "events": [ + { + "name": "select_content", + "params": { + "engagement_time_msec": 1 + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag) check all property mappings for 'sign_up' event", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "sign_up", + "properties": { + "method": "Google" + }, + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "body": { + "JSON": { + "client_id": "client_id", + "timestamp_micros": 1650950229000000, + "non_personalized_ads": true, + "events": [ + { + "name": "sign_up", + "params": { + "method": "Google", + "engagement_time_msec": 1 + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag) send only 'sign_up' event name without it's properties", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "sign_up", + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "body": { + "JSON": { + "client_id": "client_id", + "timestamp_micros": 1650950229000000, + "non_personalized_ads": true, + "events": [ + { + "name": "sign_up", + "params": { + "engagement_time_msec": 1 + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag) check all property mappings for 'spend_virtual_currency' event", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "spend_virtual_currency", + "properties": { + "value": 5, + "virtual_currency_name": "Gems", + "item_name": "Starter Boost" + }, + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "body": { + "JSON": { + "client_id": "client_id", + "timestamp_micros": 1650950229000000, + "non_personalized_ads": true, + "events": [ + { + "name": "spend_virtual_currency", + "params": { + "value": 5, + "virtual_currency_name": "Gems", + "item_name": "Starter Boost", + "engagement_time_msec": 1 + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag) send only 'spend_virtual_currency' event name with it's required 'value' and 'virtual_currency_name' properties", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "spend_virtual_currency", + "properties": { + "value": 5, + "virtual_currency_name": "Gems" + }, + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "body": { + "JSON": { + "client_id": "client_id", + "timestamp_micros": 1650950229000000, + "non_personalized_ads": true, + "events": [ + { + "name": "spend_virtual_currency", + "params": { + "value": 5, + "virtual_currency_name": "Gems", + "engagement_time_msec": 1 + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag) send 'tutorial_begin' event", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "tutorial_begin", + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "body": { + "JSON": { + "client_id": "client_id", + "timestamp_micros": 1650950229000000, + "non_personalized_ads": true, + "events": [ + { + "name": "tutorial_begin", + "params": { + "engagement_time_msec": 1 + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag) send 'tutorial_complete' event", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "tutorial_complete", + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "body": { + "JSON": { + "client_id": "client_id", + "timestamp_micros": 1650950229000000, + "non_personalized_ads": true, + "events": [ + { + "name": "tutorial_complete", + "params": { + "engagement_time_msec": 1 + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag) send all properties for 'unlock_achievement' event", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "unlock_achievement", + "properties": { + "achievement_id": "A_12345" + }, + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "body": { + "JSON": { + "client_id": "client_id", + "timestamp_micros": 1650950229000000, + "non_personalized_ads": true, + "events": [ + { + "name": "unlock_achievement", + "params": { + "achievement_id": "A_12345", + "engagement_time_msec": 1 + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag) send all properties for 'view_search_results' event", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "view_search_results", + "properties": { + "search_term": "Clothing", + "products": [ + { + "product_id": "507f1f77bcf86cd799439011", + "name": "Monopoly: 3rd Edition", + "coupon": "SUMMER_FUN", + "category": "Apparel", + "brand": "Google", + "variant": "green", + "price": "19", + "quantity": "2", + "position": "1", + "affiliation": "Google Merchandise Store", + "currency": "USD", + "discount": 2.22, + "item_category2": "Adult", + "item_category3": "Shirts", + "item_category4": "Crew", + "item_category5": "Short sleeve", + "item_list_id": "related_products", + "item_list_name": "Related Products", + "location_id": "L_12345" + } + ] + }, + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "body": { + "JSON": { + "client_id": "client_id", + "timestamp_micros": 1650950229000000, + "non_personalized_ads": true, + "events": [ + { + "name": "view_search_results", + "params": { + "search_term": "Clothing", + "engagement_time_msec": 1, + "items": [ + { + "item_id": "507f1f77bcf86cd799439011", + "item_name": "Monopoly: 3rd Edition", + "coupon": "SUMMER_FUN", + "item_category": "Apparel", + "item_brand": "Google", + "item_variant": "green", + "price": 19, + "quantity": 2, + "index": 1, + "affiliation": "Google Merchandise Store", + "currency": "USD", + "discount": 2.22, + "item_category2": "Adult", + "item_category3": "Shirts", + "item_category4": "Crew", + "item_category5": "Short sleeve", + "item_list_id": "related_products", + "item_list_name": "Related Products", + "location_id": "L_12345" + } + ] + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag) pass only 'products: [...]' property for 'view_search_results' event", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "view_search_results", + "properties": { + "products": [ + { + "product_id": "507f1f77bcf86cd799439011", + "name": "Monopoly: 3rd Edition", + "coupon": "SUMMER_FUN", + "category": "Apparel", + "brand": "Google", + "variant": "green", + "price": "19", + "quantity": "2", + "position": "1", + "affiliation": "Google Merchandise Store", + "currency": "USD", + "discount": 2.22, + "item_category2": "Adult", + "item_category3": "Shirts", + "item_category4": "Crew", + "item_category5": "Short sleeve", + "item_list_id": "related_products", + "item_list_name": "Related Products", + "location_id": "L_12345" + } + ] + }, + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "body": { + "JSON": { + "client_id": "client_id", + "timestamp_micros": 1650950229000000, + "non_personalized_ads": true, + "events": [ + { + "name": "view_search_results", + "params": { + "engagement_time_msec": 1, + "items": [ + { + "item_id": "507f1f77bcf86cd799439011", + "item_name": "Monopoly: 3rd Edition", + "coupon": "SUMMER_FUN", + "item_category": "Apparel", + "item_brand": "Google", + "item_variant": "green", + "price": 19, + "quantity": 2, + "index": 1, + "affiliation": "Google Merchandise Store", + "currency": "USD", + "discount": 2.22, + "item_category2": "Adult", + "item_category3": "Shirts", + "item_category4": "Crew", + "item_category5": "Short sleeve", + "item_list_id": "related_products", + "item_list_name": "Related Products", + "location_id": "L_12345" + } + ] + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag) pass custom event name 'rudderstack event' to GA4 along with custom properties", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "rudderstack event", + "properties": { + "total": "10", + "timezone": { + "name": "Europe/Tallinn" + }, + "engagementTimeMsec": 100, + "sessionId": 655 + }, + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "body": { + "JSON": { + "client_id": "client_id", + "timestamp_micros": 1650950229000000, + "non_personalized_ads": true, + "events": [ + { + "name": "rudderstack_event", + "params": { + "total": "10", + "timezone_name": "Europe/Tallinn", + "engagement_time_msec": 100, + "session_id": 655 + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag) pass custom event name 'rudderstack event' to GA4 along with custom properties and user_properties", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "rudderstack event", + "properties": { + "total": "10", + "user_properties": { + "price": "19" + } + }, + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "body": { + "JSON": { + "client_id": "client_id", + "timestamp_micros": 1650950229000000, + "non_personalized_ads": true, + "user_properties": { + "price": { + "value": "19" + } + }, + "events": [ + { + "name": "rudderstack_event", + "params": { + "total": "10", + "engagement_time_msec": 1 + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "[Error]: (gtag) pass reserved event name to GA4", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "ad_click", + "properties": { + "total": "10" + }, + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "track:: Reserved event names are not allowed", + "statTags": { + "destType": "GA4", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "ga4", + "description": "[Exclusion]: (gtag) pass reserved property name to GA4 for custom events", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "rudderstack event", + "properties": { + "firebase_conversion": "firebase_conversion", + "google_id": "1234", + "ga_value": "ga_value", + "value": "10" + }, + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "body": { + "JSON": { + "client_id": "client_id", + "timestamp_micros": 1650950229000000, + "non_personalized_ads": true, + "events": [ + { + "name": "rudderstack_event", + "params": { + "value": "10", + "engagement_time_msec": 1 + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "[Exclusion]: (gtag) pass reserved property name and reserved properties in `user_properties` to GA4 for custom events", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "rudderstack event", + "properties": { + "firebase_conversion": "firebase_conversion", + "google_id": "1234", + "ga_value": "ga_value", + "value": "10", + "user_properties": { + "first_open_time": "first_open_time", + "user_id": "user_id", + "firebase_value": "firebase_value", + "price": "100" + } + }, + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "body": { + "JSON": { + "client_id": "client_id", + "timestamp_micros": 1650950229000000, + "non_personalized_ads": true, + "user_properties": { + "price": { + "value": "100" + } + }, + "events": [ + { + "name": "rudderstack_event", + "params": { + "value": "10", + "engagement_time_msec": 1 + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "[Error]: (gtag) pass reserved event names along with reserved properties", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "app_remove", + "properties": { + "firebase_conversion": "firebase_conversion", + "google_id": "1234", + "ga_value": "ga_value", + "value": "10", + "user_properties": { + "first_open_time": "first_open_time", + "user_id": "user_id", + "firebase_value": "firebase_value", + "price": "100" + } + }, + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "track:: Reserved event names are not allowed", + "statTags": { + "destType": "GA4", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "ga4", + "description": "[Error] (gtag) pass reserved custom prefix names to GA4 events", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "firebase_event1", + "properties": { + "firebase_conversion": "firebase_conversion", + "google_id": "1234", + "ga_value": "ga_value", + "value": "10" + }, + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Reserved custom prefix names are not allowed", + "statTags": { + "destType": "GA4", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "ga4", + "description": "(gtag) check all property mappings for 'product added' event", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "product added", + "properties": { + "currency": "USD", + "total": "7.77", + "google_data": "google_data", + "products": [ + { + "product_id": "507f1f77bcf86cd799439011", + "name": "Monopoly: 3rd Edition", + "coupon": "SUMMER_FUN", + "category": "Apparel", + "brand": "Google", + "variant": "green", + "price": "19", + "quantity": "2", + "position": "1", + "affiliation": "Google Merchandise Store", + "currency": "USD", + "discount": 2.22, + "item_category2": "Adult", + "item_category3": "Shirts", + "item_category4": "Crew", + "item_category5": "Short sleeve", + "item_list_id": "related_products", + "item_list_name": "Related Products", + "location_id": "L_12345" + } + ] + }, + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "body": { + "JSON": { + "client_id": "client_id", + "timestamp_micros": 1650950229000000, + "non_personalized_ads": true, + "events": [ + { + "name": "add_to_cart", + "params": { + "currency": "USD", + "value": 7.77, + "engagement_time_msec": 1, + "items": [ + { + "item_id": "507f1f77bcf86cd799439011", + "item_name": "Monopoly: 3rd Edition", + "coupon": "SUMMER_FUN", + "item_category": "Apparel", + "item_brand": "Google", + "item_variant": "green", + "price": 19, + "quantity": 2, + "index": 1, + "affiliation": "Google Merchandise Store", + "currency": "USD", + "discount": 2.22, + "item_category2": "Adult", + "item_category3": "Shirts", + "item_category4": "Crew", + "item_category5": "Short sleeve", + "item_list_id": "related_products", + "item_list_name": "Related Products", + "location_id": "L_12345" + } + ] + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag) pass custom event name with its properties", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "rudderstack event", + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "body": { + "JSON": { + "client_id": "client_id", + "timestamp_micros": 1650950229000000, + "non_personalized_ads": true, + "events": [ + { + "name": "rudderstack_event", + "params": { + "engagement_time_msec": 1 + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag) map 'product added' properties to ga4 'add_to_cart' items array", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "product added", + "properties": { + "affiliation": "Google Merchandise Store", + "brand": "Google", + "category": "Related_products", + "coupon": "SUMMER_FUN", + "currency": "USD", + "discount": 2.22, + "item_category2": "Adult", + "item_category3": "Shirts", + "item_category4": "Crew", + "item_category5": "Short sleeve", + "item_list_id": "related_products", + "item_list_name": "Related Products", + "list_id": "related_products", + "location_id": "L_12345", + "name": "Monopoly: 3rd Edition", + "position": "1", + "price": "19", + "product_id": "507f1f77bcf86cd799439011", + "products": [], + "quantity": "2", + "total": "7.77", + "variant": "green" + }, + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "FORM": {}, + "JSON": { + "client_id": "client_id", + "events": [ + { + "name": "add_to_cart", + "params": { + "currency": "USD", + "engagement_time_msec": 1, + "items": [ + { + "affiliation": "Google Merchandise Store", + "coupon": "SUMMER_FUN", + "currency": "USD", + "discount": 2.22, + "index": 1, + "item_brand": "Google", + "item_category": "Related_products", + "item_category2": "Adult", + "item_category3": "Shirts", + "item_category4": "Crew", + "item_category5": "Short sleeve", + "item_id": "507f1f77bcf86cd799439011", + "item_list_id": "related_products", + "item_list_name": "Related Products", + "item_name": "Monopoly: 3rd Edition", + "item_variant": "green", + "location_id": "L_12345", + "price": 19, + "quantity": 2 + } + ], + "list_id": "related_products", + "value": 7.77 + } + } + ], + "non_personalized_ads": true, + "timestamp_micros": 1650950229000000 + }, + "JSON_ARRAY": {}, + "XML": {} + }, + "endpoint": "https://www.google-analytics.com/mp/collect", + "files": {}, + "headers": { + "Content-Type": "application/json", + "HOST": "www.google-analytics.com" + }, + "method": "POST", + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "type": "REST", + "version": "1", + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag) pass event name with invalid data type for products: {...} properties (when products parameter is optional)", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "product added", + "properties": { + "currency": "USD", + "total": "7.77", + "products": { + "product_id": "507f1f77bcf86cd799439011", + "name": "Monopoly: 3rd Edition", + "coupon": "SUMMER_FUN", + "category": "Apparel", + "brand": "Google", + "variant": "green", + "price": "19", + "quantity": "2", + "position": "1", + "affiliation": "Google Merchandise Store", + "currency": "USD", + "discount": 2.22, + "item_category2": "Adult", + "item_category3": "Shirts", + "item_category4": "Crew", + "item_category5": "Short sleeve", + "item_list_id": "related_products", + "item_list_name": "Related Products", + "location_id": "L_12345" + }, + "affiliation": "Google Merchandise Store", + "brand": "Google", + "category": "Related_products", + "coupon": "SUMMER_FUN", + "discount": 2.22, + "item_category2": "Adult", + "item_category3": "Shirts", + "item_category4": "Crew", + "item_category5": "Short sleeve", + "item_list_id": "related_products", + "item_list_name": "Related Products", + "list_id": "related_products", + "location_id": "L_12345", + "name": "Monopoly: 3rd Edition", + "position": "1", + "price": "19", + "product_id": "507f1f77bcf86cd799439011", + "quantity": "2", + "variant": "green" + }, + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "FORM": {}, + "JSON": { + "client_id": "client_id", + "events": [ + { + "name": "add_to_cart", + "params": { + "currency": "USD", + "engagement_time_msec": 1, + "items": [ + { + "affiliation": "Google Merchandise Store", + "coupon": "SUMMER_FUN", + "currency": "USD", + "discount": 2.22, + "index": 1, + "item_brand": "Google", + "item_category": "Related_products", + "item_category2": "Adult", + "item_category3": "Shirts", + "item_category4": "Crew", + "item_category5": "Short sleeve", + "item_id": "507f1f77bcf86cd799439011", + "item_list_id": "related_products", + "item_list_name": "Related Products", + "item_name": "Monopoly: 3rd Edition", + "item_variant": "green", + "location_id": "L_12345", + "price": 19, + "quantity": 2 + } + ], + "list_id": "related_products", + "value": 7.77 + } + } + ], + "non_personalized_ads": true, + "timestamp_micros": 1650950229000000 + }, + "JSON_ARRAY": {}, + "XML": {} + }, + "endpoint": "https://www.google-analytics.com/mp/collect", + "files": {}, + "headers": { + "Content-Type": "application/json", + "HOST": "www.google-analytics.com" + }, + "method": "POST", + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "type": "REST", + "version": "1", + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "[Error] (gtag) pass event name to GA4 with missing fields i.e required in products: [..]", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "product added", + "properties": { + "currency": "USD", + "total": "7.77", + "products": [ + { + "coupon": "SUMMER_FUN", + "category": "Apparel", + "brand": "Google", + "variant": "green", + "price": "19", + "quantity": "2", + "position": "1", + "affiliation": "Google Merchandise Store", + "currency": "USD", + "discount": 2.22, + "item_category2": "Adult", + "item_category3": "Shirts", + "item_category4": "Crew", + "item_category5": "Short sleeve", + "item_list_id": "related_products", + "item_list_name": "Related Products", + "location_id": "L_12345" + } + ] + }, + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "One of product_id or name is required", + "statTags": { + "destType": "GA4", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "ga4", + "description": "[Error] (gtag) pass event name to GA4 with missing fields i.e required in properties", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "Product Viewed", + "properties": { + "currency": "USD", + "total": "7.77" + }, + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "One of product_id or name is required", + "statTags": { + "destType": "GA4", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "ga4", + "description": "[Error] (gtag) missing API Secret", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "tutotial complete", + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "API Secret not found. Aborting ", + "statTags": { + "destType": "GA4", + "errorCategory": "dataValidation", + "errorType": "configuration", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "ga4", + "description": "[Error] (gtag) missing measurementId", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "tutotial complete", + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "measurementId must be provided. Aborting", + "statTags": { + "destType": "GA4", + "errorCategory": "dataValidation", + "errorType": "configuration", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "ga4", + "description": "(gtag) firing group event with event name. should take event name by default", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "group", + "event": "tutorial complete", + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "body": { + "JSON": { + "timestamp_micros": 1650950229000000, + "non_personalized_ads": true, + "client_id": "client_id", + "events": [ + { + "name": "join_group", + "params": { + "engagement_time_msec": 1 + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "[Error] (gtag) payload has missing message.type", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "event": "tutotial complete", + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Message Type is not present. Aborting message.", + "statTags": { + "destType": "GA4", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "ga4", + "description": "[Error] (gtag) payload has missing event name", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Event name is required", + "statTags": { + "destType": "GA4", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "ga4", + "description": "(gtag) taking client_id from anonymousId", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "tutotial complete", + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "body": { + "JSON": { + "timestamp_micros": 1650950229000000, + "non_personalized_ads": true, + "client_id": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "events": [ + { + "name": "tutotial_complete", + "params": { + "engagement_time_msec": 1 + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "[Error] (firebase) payload has missing ga4AppInstanceId", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "tutotial complete", + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "", + "firebaseAppId": "1:17864591371:android:7a9520d3c78962e21f9fee", + "blockPageViewEvent": false, + "typesOfClient": "firebase", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "ga4AppInstanceId must be provided under externalId", + "statTags": { + "destType": "GA4", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "ga4", + "description": "[Error] (firebase) pass reserved event name", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "app_store_subscription_cancel", + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "", + "firebaseAppId": "1:17864591371:android:7a9520d3c78962e21f9fee", + "blockPageViewEvent": false, + "typesOfClient": "firebase", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Reserved custom event names are not allowed", + "statTags": { + "destType": "GA4", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "ga4", + "description": "(gtag) check all property mappings for 'tutorial complete' event", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "tutorial complete", + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "body": { + "JSON": { + "client_id": "client_id", + "non_personalized_ads": true, + "events": [ + { + "name": "tutorial_complete", + "params": { + "engagement_time_msec": 1 + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag) check all property mappings for 'cart viewed' event", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "cart viewed", + "properties": { + "currency": "USD", + "total": "7.77", + "products": [ + { + "product_id": 0, + "coupon": "SUMMER_FUN", + "category": "Apparel", + "brand": "Google", + "variant": "green", + "price": "19", + "quantity": "2", + "position": "1", + "affiliation": "Google Merchandise Store", + "currency": "USD", + "discount": 2.22, + "item_category2": "Adult", + "item_category3": "Shirts", + "item_category4": "Crew", + "item_category5": "Short sleeve", + "item_list_id": "related_products", + "item_list_name": "Related Products", + "location_id": "L_12345" + } + ] + }, + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "body": { + "JSON": { + "client_id": "client_id", + "timestamp_micros": 1650950229000000, + "non_personalized_ads": true, + "events": [ + { + "name": "view_cart", + "params": { + "currency": "USD", + "value": 7.77, + "engagement_time_msec": 1, + "items": [ + { + "item_id": 0, + "coupon": "SUMMER_FUN", + "item_category": "Apparel", + "item_brand": "Google", + "item_variant": "green", + "price": 19, + "quantity": 2, + "index": 1, + "affiliation": "Google Merchandise Store", + "currency": "USD", + "discount": 2.22, + "item_category2": "Adult", + "item_category3": "Shirts", + "item_category4": "Crew", + "item_category5": "Short sleeve", + "item_list_id": "related_products", + "item_list_name": "Related Products", + "location_id": "L_12345" + } + ] + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "[Error]: (firebase) missing firebaseAppId", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "promotion clicked", + "properties": { + "creative_name": "Summer Banner", + "creative_slot": "featured_app_1", + "location_id": "L_12345", + "promotion_id": "P_12345", + "promotion_name": "Summer Sale", + "products": [ + { + "product_id": "507f1f77bcf86cd799439011", + "name": "Monopoly: 3rd Edition", + "coupon": "SUMMER_FUN", + "category": "Apparel", + "brand": "Google", + "variant": "green", + "price": "19", + "quantity": "2", + "position": "0", + "affiliation": "Google Merchandise Store", + "currency": "USD", + "discount": 2.22, + "item_category2": "Adult", + "item_category3": "Shirts", + "item_category4": "Crew", + "item_category5": "Short sleeve", + "item_list_id": "related_products", + "item_list_name": "Related Products", + "location_id": "L_12345", + "promotion_id": "P_12345", + "promotion_name": "Summer Sale", + "creative_name": "summer_banner2", + "creative_slot": "featured_app_1" + } + ] + }, + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "", + "typesOfClient": "firebase", + "firebaseAppId": "", + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "firebaseAppId must be provided. Aborting", + "statTags": { + "destType": "GA4", + "errorCategory": "dataValidation", + "errorType": "configuration", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "ga4", + "description": "(gtag) firing page call", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "rudderId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "page", + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "typesOfClient": "gtag", + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "body": { + "JSON": { + "timestamp_micros": 1650950229000000, + "non_personalized_ads": true, + "client_id": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "events": [ + { + "name": "page_view", + "params": { + "engagement_time_msec": 1 + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag) firing page call with custom properties", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "rudderId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "page", + "event": "page view", + "properties": { + "view": "login" + }, + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "typesOfClient": "gtag", + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "body": { + "JSON": { + "timestamp_micros": 1650950229000000, + "non_personalized_ads": true, + "client_id": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "events": [ + { + "name": "page_view", + "params": { + "view": "login", + "engagement_time_msec": 1 + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "[Error]: (gtag) pass timestamp more than 72 hours into the past", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-20T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "tutotial complete", + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "typesOfClient": "gtag", + "blockPageViewEvent": false, + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Allowed timestamp is [72 hours] into the past", + "statTags": { + "destType": "GA4", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "ga4", + "description": "[Error]: (gtag) pass timestamp more than 15 min into the future", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-05-05T15:47:57Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "tutotial complete", + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "typesOfClient": "gtag", + "blockPageViewEvent": false, + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Allowed timestamp is [15 minutes] into the future", + "statTags": { + "destType": "GA4", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "ga4", + "description": "(gtag) pass custom properties along with products: [..] parameters to GA4 standard events along with its stated ones", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "order completed", + "properties": { + "checkout_id": "12345", + "order_id": "1234", + "myCustomProp": "My arbitray value", + "affiliation": "Apple Store", + "total": 20, + "revenue": 15, + "shipping": 22, + "tax": 1, + "discount": 1.5, + "coupon": "ImagePro", + "currency": "USD", + "products": [ + { + "product_id": "123", + "sku": "G-32", + "name": "Monopoly", + "price": 14, + "quantity": 1, + "category": "Games", + "item_category2": "Board games", + "url": "https://www.website.com/product/path", + "image_url": "https://www.website.com/product/path.jpg" + } + ], + "timezone": { + "name": "Europe/Tallinn" + } + }, + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "body": { + "JSON": { + "client_id": "client_id", + "timestamp_micros": 1650950229000000, + "non_personalized_ads": true, + "events": [ + { + "name": "purchase", + "params": { + "checkout_id": "12345", + "transaction_id": "1234", + "myCustomProp": "My arbitray value", + "affiliation": "Apple Store", + "value": 20, + "shipping": 22, + "tax": 1, + "discount": 1.5, + "coupon": "ImagePro", + "currency": "USD", + "engagement_time_msec": 1, + "items": [ + { + "item_id": "123", + "sku": "G-32", + "item_name": "Monopoly", + "price": 14, + "quantity": 1, + "item_category": "Games", + "item_category2": "Board games", + "url": "https://www.website.com/product/path", + "image_url": "https://www.website.com/product/path.jpg" + } + ], + "timezone_name": "Europe/Tallinn" + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag) pass custom properties excluding products: [..] parameter to GA4 standard events along with its stated ones", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "promotion clicked", + "properties": { + "customProp-1": "check-1", + "customProp-2": "check-2", + "timezone": { + "name": "Europe/Tallinn" + }, + "creative_name": "Summer Banner", + "creative_slot": "featured_app_1", + "location_id": "L_12345", + "promotion_id": "P_12345", + "promotion_name": "Summer Sale" + }, + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "body": { + "JSON": { + "client_id": "client_id", + "timestamp_micros": 1650950229000000, + "non_personalized_ads": true, + "events": [ + { + "name": "select_promotion", + "params": { + "customProp-1": "check-1", + "customProp-2": "check-2", + "timezone_name": "Europe/Tallinn", + "creative_name": "Summer Banner", + "creative_slot": "featured_app_1", + "location_id": "L_12345", + "promotion_id": "P_12345", + "promotion_name": "Summer Sale", + "engagement_time_msec": 1 + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag) message type group -> 'join_group' with custom event", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "group", + "traits": { + "custom1": 1234, + "custom2": "custom2", + "timezone": { + "name": "Europe/Tallinn" + }, + "engagementTimeMsec": 100, + "sessionId": 655 + }, + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "body": { + "JSON": { + "timestamp_micros": 1650950229000000, + "non_personalized_ads": true, + "client_id": "client_id", + "events": [ + { + "name": "join_group", + "params": { + "custom1": 1234, + "custom2": "custom2", + "timezone_name": "Europe/Tallinn", + "engagement_time_msec": 100, + "session_id": 655 + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag): check args keyword for price x currency multiplication", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "product added", + "properties": { + "currency": "USD", + "price": 2.4, + "quantity": 2, + "products": [ + { + "product_id": "507f1f77bcf86cd799439011", + "name": "Monopoly: 3rd Edition", + "coupon": "SUMMER_FUN", + "category": "Apparel", + "brand": "Google", + "variant": "green", + "price": "19", + "quantity": "2", + "position": "1", + "affiliation": "Google Merchandise Store", + "currency": "USD", + "discount": 2.22, + "item_category2": "Adult", + "item_category3": "Shirts", + "item_category4": "Crew", + "item_category5": "Short sleeve", + "item_list_id": "related_products", + "item_list_name": "Related Products", + "location_id": "L_12345" + } + ] + }, + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "body": { + "JSON": { + "timestamp_micros": 1650950229000000, + "non_personalized_ads": true, + "client_id": "client_id", + "events": [ + { + "name": "add_to_cart", + "params": { + "currency": "USD", + "value": 4.8, + "engagement_time_msec": 1, + "items": [ + { + "item_id": "507f1f77bcf86cd799439011", + "item_name": "Monopoly: 3rd Edition", + "coupon": "SUMMER_FUN", + "item_category": "Apparel", + "item_brand": "Google", + "item_variant": "green", + "price": 19, + "quantity": 2, + "index": 1, + "affiliation": "Google Merchandise Store", + "currency": "USD", + "discount": 2.22, + "item_category2": "Adult", + "item_category3": "Shirts", + "item_category4": "Crew", + "item_category5": "Short sleeve", + "item_list_id": "related_products", + "item_list_name": "Related Products", + "location_id": "L_12345" + } + ], + "price": 2.4, + "quantity": 2 + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag): take page properties from context.page for 'page' call along with custom properties", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "rudderId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "page": { + "url": "http://morkey.in", + "path": "/cart", + "title": "miphone", + "search": "MI", + "referrer": "morkey" + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "page", + "integrations": { + "All": true + }, + "properties": { + "cust1": 1234, + "engagementTimeMsec": 100, + "sessionId": 655 + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "body": { + "JSON": { + "timestamp_micros": 1650950229000000, + "non_personalized_ads": true, + "client_id": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "events": [ + { + "name": "page_view", + "params": { + "page_referrer": "morkey", + "page_title": "miphone", + "page_location": "http://morkey.in", + "cust1": 1234, + "engagement_time_msec": 100, + "session_id": 655 + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "[Error] GA4: event not as string", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-04-26T05:17:09Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": { + "name": "promotion_viewed" + }, + "properties": { + "creative_name": "Summer Banner", + "creative_slot": "featured_app_1", + "location_id": "L_12345", + "promotion_id": "P_12345", + "promotion_name": "Summer Sale", + "products": [ + { + "product_id": "507f1f77bcf86cd799439011", + "name": "Monopoly: 3rd Edition", + "coupon": "SUMMER_FUN", + "category": "Apparel", + "brand": "Google", + "variant": "green", + "price": "19", + "quantity": "2", + "position": "0", + "affiliation": "Google Merchandise Store", + "currency": "USD", + "discount": 2.22, + "item_category2": "Adult", + "item_category3": "Shirts", + "item_category4": "Crew", + "item_category5": "Short sleeve", + "item_list_id": "related_products", + "item_list_name": "Related Products", + "location_id": "L_12345", + "promotion_id": "P_12345", + "promotion_name": "Summer Sale", + "creative_name": "summer_banner2", + "creative_slot": "featured_app_1" + } + ] + }, + "integrations": { + "All": true + }, + "sentAt": "2022-04-20T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "track:: event name should be string", + "statTags": { + "destType": "GA4", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "ga4", + "description": "[Error] GA4: client_id not found in all four path", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "product added", + "properties": { + "currency": "USD", + "price": 2.4, + "quantity": 2, + "products": [ + { + "product_id": "507f1f77bcf86cd799439011", + "name": "Monopoly: 3rd Edition", + "coupon": "SUMMER_FUN", + "category": "Apparel", + "brand": "Google", + "variant": "green", + "price": "19", + "quantity": "2", + "position": "1", + "affiliation": "Google Merchandise Store", + "currency": "USD", + "discount": 2.22, + "item_category2": "Adult", + "item_category3": "Shirts", + "item_category4": "Crew", + "item_category5": "Short sleeve", + "item_list_id": "related_products", + "item_list_name": "Related Products", + "location_id": "L_12345" + } + ] + }, + "integrations": { + "All": true + } + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6BET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": true, + "sendLoginSignup": true, + "newOrExistingUserTrait": "firstLogin", + "loginSignupMethod": "method", + "generateLead": true, + "generateLeadValueTrait": "value", + "generateLeadCurrencyTrait": "currency", + "clientIdFieldIdentifier": "properties.client_id" + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "ga4ClientId, anonymousId or messageId must be provided", + "statTags": { + "destType": "GA4", + "errorCategory": "dataValidation", + "errorType": "configuration", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "ga4", + "description": "client_id isn't sent from the path defined in the webapp config, falling back to default values i.e here it is anonymousId", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "product added", + "properties": { + "currency": "USD", + "price": 2.4, + "quantity": 2, + "products": [ + { + "product_id": "507f1f77bcf86cd799439011", + "name": "Monopoly: 3rd Edition", + "coupon": "SUMMER_FUN", + "category": "Apparel", + "brand": "Google", + "variant": "green", + "price": "19", + "quantity": "2", + "position": "1", + "affiliation": "Google Merchandise Store", + "currency": "USD", + "discount": 2.22, + "item_category2": "Adult", + "item_category3": "Shirts", + "item_category4": "Crew", + "item_category5": "Short sleeve", + "item_list_id": "related_products", + "item_list_name": "Related Products", + "location_id": "L_12345" + } + ] + }, + "integrations": { + "All": true + } + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6BET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": true, + "sendLoginSignup": true, + "newOrExistingUserTrait": "firstLogin", + "loginSignupMethod": "method", + "generateLead": true, + "generateLeadValueTrait": "value", + "generateLeadCurrencyTrait": "currency", + "clientIdFieldIdentifier": "properties.client_id" + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "FORM": {}, + "JSON": { + "events": [ + { + "name": "add_to_cart", + "params": { + "items": [ + { + "index": 1, + "price": 19, + "coupon": "SUMMER_FUN", + "item_id": "507f1f77bcf86cd799439011", + "currency": "USD", + "discount": 2.22, + "quantity": 2, + "item_name": "Monopoly: 3rd Edition", + "item_brand": "Google", + "affiliation": "Google Merchandise Store", + "location_id": "L_12345", + "item_list_id": "related_products", + "item_variant": "green", + "item_category": "Apparel", + "item_category2": "Adult", + "item_category3": "Shirts", + "item_category4": "Crew", + "item_category5": "Short sleeve", + "item_list_name": "Related Products" + } + ], + "price": 2.4, + "value": 4.8, + "currency": "USD", + "quantity": 2, + "engagement_time_msec": 1 + } + } + ], + "client_id": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "non_personalized_ads": true + }, + "JSON_ARRAY": {} + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6BET4" + }, + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "version": "1", + "endpoint": "https://www.google-analytics.com/mp/collect", + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "any custom or item property with array value, is flattened with underscore delimeter", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "product added", + "originalTimestamp": "2022-04-26T05:17:09Z", + "properties": { + "currency": "USD", + "total": "7.77", + "product_id": "507f1f77bcf86cd799439011", + "name": "Monopoly: 3rd Edition", + "coupon": "SUMMER_FUN", + "category": "Apparel", + "brand": "Google", + "variant": "green", + "price": "19", + "quantity": "2", + "position": "1", + "affiliation": "Google Merchandise Store", + "discount": 2.22, + "item_category2": "Adult", + "item_category3": "Shirts", + "item_category4": "Crew", + "item_category5": "Short sleeve", + "item_list_id": "related_products", + "item_list_name": "Related Products", + "location_id": "L_12345", + "address": { + "city": "kolkata", + "district": "24pgs" + }, + "categoryLevels": [ + "Furniture", + "Bedroom Furniture", + "Dressers & Chests" + ], + "products": [ + { + "product_id": "1234", + "product_details": { + "colour": "red", + "shape": "rectangle" + }, + "productLevels": [ + "test1", + "test2", + "test3" + ] + } + ] + }, + "integrations": { + "All": true + }, + "sentAt": "2022-11-14T15:20:57Z" + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": false, + "sendLoginSignup": false, + "generateLead": false + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "body": { + "JSON": { + "timestamp_micros": 1650950229000000, + "non_personalized_ads": true, + "client_id": "client_id", + "events": [ + { + "name": "add_to_cart", + "params": { + "currency": "USD", + "value": 7.77, + "items": [ + { + "item_id": "1234", + "product_details_colour": "red", + "product_details_shape": "rectangle", + "productLevels_0": "test1", + "productLevels_1": "test2", + "productLevels_2": "test3" + } + ], + "product_id": "507f1f77bcf86cd799439011", + "name": "Monopoly: 3rd Edition", + "coupon": "SUMMER_FUN", + "category": "Apparel", + "brand": "Google", + "variant": "green", + "price": "19", + "quantity": "2", + "position": "1", + "affiliation": "Google Merchandise Store", + "discount": 2.22, + "item_category2": "Adult", + "item_category3": "Shirts", + "item_category4": "Crew", + "item_category5": "Short sleeve", + "item_list_id": "related_products", + "item_list_name": "Related Products", + "location_id": "L_12345", + "address_city": "kolkata", + "address_district": "24pgs", + "categoryLevels_0": "Furniture", + "categoryLevels_1": "Bedroom Furniture", + "categoryLevels_2": "Dressers & Chests", + "engagement_time_msec": 1 + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "extract session_id from context.sessionId", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36", + "sessionId": 16678456735 + }, + "type": "track", + "event": "product added", + "properties": { + "currency": "USD", + "price": 2.4, + "quantity": 2, + "client_id": "client@1234", + "products": [ + { + "product_id": "507f1f77bcf86cd799439011", + "name": "Monopoly: 3rd Edition", + "coupon": "SUMMER_FUN", + "category": "Apparel", + "brand": "Google", + "variant": "green", + "price": "19", + "quantity": "2", + "position": "1", + "affiliation": "Google Merchandise Store", + "currency": "USD", + "discount": 2.22, + "item_category2": "Adult", + "item_category3": "Shirts", + "item_category4": "Crew", + "item_category5": "Short sleeve", + "item_list_id": "related_products", + "item_list_name": "Related Products", + "location_id": "L_12345" + } + ] + }, + "integrations": { + "All": true + } + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6BET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": true, + "sendLoginSignup": true, + "newOrExistingUserTrait": "firstLogin", + "loginSignupMethod": "method", + "generateLead": true, + "generateLeadValueTrait": "value", + "generateLeadCurrencyTrait": "currency" + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "FORM": {}, + "JSON": { + "events": [ + { + "name": "add_to_cart", + "params": { + "items": [ + { + "index": 1, + "price": 19, + "coupon": "SUMMER_FUN", + "item_id": "507f1f77bcf86cd799439011", + "currency": "USD", + "discount": 2.22, + "quantity": 2, + "item_name": "Monopoly: 3rd Edition", + "item_brand": "Google", + "affiliation": "Google Merchandise Store", + "location_id": "L_12345", + "item_list_id": "related_products", + "item_variant": "green", + "item_category": "Apparel", + "item_category2": "Adult", + "item_category3": "Shirts", + "item_category4": "Crew", + "item_category5": "Short sleeve", + "item_list_name": "Related Products" + } + ], + "price": 2.4, + "value": 4.8, + "currency": "USD", + "quantity": 2, + "session_id": 16678456735, + "engagement_time_msec": 1, + "client_id": "client@1234" + } + } + ], + "client_id": "client_id", + "non_personalized_ads": true + }, + "JSON_ARRAY": {} + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6BET4" + }, + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "version": "1", + "endpoint": "https://www.google-analytics.com/mp/collect", + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag) send integer userId", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "userId": 34567, + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36", + "sessionId": 16678456735 + }, + "type": "track", + "event": "product added", + "properties": { + "currency": "USD", + "price": 2.4, + "quantity": 2, + "client_id": "client@1234", + "products": [ + { + "product_id": "507f1f77bcf86cd799439011", + "name": "Monopoly: 3rd Edition", + "coupon": "SUMMER_FUN", + "category": "Apparel", + "brand": "Google", + "variant": "green", + "price": "19", + "quantity": "2", + "position": "1", + "affiliation": "Google Merchandise Store", + "currency": "USD", + "discount": 2.22, + "item_category2": "Adult", + "item_category3": "Shirts", + "item_category4": "Crew", + "item_category5": "Short sleeve", + "item_list_id": "related_products", + "item_list_name": "Related Products", + "location_id": "L_12345" + } + ] + }, + "integrations": { + "All": true + } + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6BET4", + "firebaseAppId": "", + "blockPageViewEvent": false, + "typesOfClient": "gtag", + "extendPageViewParams": false, + "sendUserId": false, + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "enableServerSideIdentify": true, + "sendLoginSignup": true, + "newOrExistingUserTrait": "firstLogin", + "loginSignupMethod": "method", + "generateLead": true, + "generateLeadValueTrait": "value", + "generateLeadCurrencyTrait": "currency" + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "FORM": {}, + "JSON": { + "events": [ + { + "name": "add_to_cart", + "params": { + "items": [ + { + "index": 1, + "price": 19, + "coupon": "SUMMER_FUN", + "item_id": "507f1f77bcf86cd799439011", + "currency": "USD", + "discount": 2.22, + "quantity": 2, + "item_name": "Monopoly: 3rd Edition", + "item_brand": "Google", + "affiliation": "Google Merchandise Store", + "location_id": "L_12345", + "item_list_id": "related_products", + "item_variant": "green", + "item_category": "Apparel", + "item_category2": "Adult", + "item_category3": "Shirts", + "item_category4": "Crew", + "item_category5": "Short sleeve", + "item_list_name": "Related Products" + } + ], + "price": 2.4, + "value": 4.8, + "currency": "USD", + "quantity": 2, + "session_id": 16678456735, + "engagement_time_msec": 1, + "client_id": "client@1234" + } + } + ], + "client_id": "client_id", + "user_id": "34567", + "non_personalized_ads": true + }, + "JSON_ARRAY": {} + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6BET4" + }, + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "version": "1", + "endpoint": "https://www.google-analytics.com/mp/collect", + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag) login event with user_properties", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "userId": "user@1", + "channel": "web", + "anonymousId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "traits": { + "campaign": "advertizing" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "login", + "properties": { + "method": "facebook" + }, + "integrations": { + "All": true + } + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6BET4", + "firebaseAppId": "", + "typesOfClient": "gtag", + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "FORM": {}, + "JSON": { + "events": [ + { + "name": "login", + "params": { + "method": "facebook", + "engagement_time_msec": 1 + } + } + ], + "user_id": "user@1", + "user_properties": { + "campaign": { + "value": "advertizing" + } + }, + "client_id": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "non_personalized_ads": true + }, + "JSON_ARRAY": {} + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6BET4" + }, + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "version": "1", + "endpoint": "https://www.google-analytics.com/mp/collect", + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag) sign_up event", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "userId": "user@1", + "channel": "web", + "anonymousId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "traits": { + "campaign": "advertizing" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "sign_up", + "properties": { + "method": "google" + }, + "integrations": { + "All": true + } + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6BET4", + "firebaseAppId": "", + "typesOfClient": "gtag", + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "FORM": {}, + "JSON": { + "events": [ + { + "name": "sign_up", + "params": { + "method": "google", + "engagement_time_msec": 1 + } + } + ], + "user_id": "user@1", + "user_properties": { + "campaign": { + "value": "advertizing" + } + }, + "client_id": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "non_personalized_ads": true + }, + "JSON_ARRAY": {} + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6BET4" + }, + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "version": "1", + "endpoint": "https://www.google-analytics.com/mp/collect", + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag) generate_lead event", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "userId": "user@1", + "channel": "web", + "anonymousId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "traits": { + "campaign": "advertizing" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "generate_lead", + "properties": { + "source": "instagram", + "value": 20 + }, + "integrations": { + "All": true + } + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6BET4", + "firebaseAppId": "", + "typesOfClient": "gtag", + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "FORM": {}, + "JSON": { + "events": [ + { + "name": "generate_lead", + "params": { + "currency": "USD", + "value": 20, + "source": "instagram", + "engagement_time_msec": 1 + } + } + ], + "user_id": "user@1", + "user_properties": { + "campaign": { + "value": "advertizing" + } + }, + "client_id": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "non_personalized_ads": true + }, + "JSON_ARRAY": {} + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6BET4" + }, + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "version": "1", + "endpoint": "https://www.google-analytics.com/mp/collect", + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag) track call with page information such as url, title, referrer", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "userId": "user@1", + "channel": "web", + "anonymousId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "page": { + "initial_referrer": "$direct", + "path": "/", + "referrer": "$direct", + "tab_url": "https://www.rudderstack.com/", + "title": "Document", + "url": "https://www.rudderstack.com/" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "generate_lead", + "properties": { + "source": "instagram", + "value": 20 + }, + "integrations": { + "All": true + } + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6BET4", + "firebaseAppId": "", + "typesOfClient": "gtag", + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "FORM": {}, + "JSON": { + "events": [ + { + "name": "generate_lead", + "params": { + "currency": "USD", + "value": 20, + "source": "instagram", + "page_location": "https://www.rudderstack.com/", + "page_referrer": "$direct", + "page_title": "Document", + "engagement_time_msec": 1 + } + } + ], + "user_id": "user@1", + "client_id": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "non_personalized_ads": true + }, + "JSON_ARRAY": {} + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6BET4" + }, + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "version": "1", + "endpoint": "https://www.google-analytics.com/mp/collect", + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag) track event with hybrid connection mode using buffer cloud mode event approach", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "userId": "user@1", + "channel": "web", + "anonymousId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "traits": { + "campaign": "advertizing" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "generate_lead", + "properties": { + "source": "instagram", + "value": 20 + }, + "integrations": { + "All": true, + "Google Analytics 4 (GA4)": { + "clientId": "554581488.1683172875", + "sessionId": "1683172875" + } + } + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6BET4", + "firebaseAppId": "", + "typesOfClient": "gtag", + "eventFilteringOption": "disable", + "connectionMode": "hybrid", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "FORM": {}, + "JSON": { + "events": [ + { + "name": "generate_lead", + "params": { + "currency": "USD", + "value": 20, + "source": "instagram", + "session_id": "1683172875", + "engagement_time_msec": 1 + } + } + ], + "user_id": "user@1", + "user_properties": { + "campaign": { + "value": "advertizing" + } + }, + "client_id": "554581488.1683172875", + "non_personalized_ads": true + }, + "JSON_ARRAY": {} + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6BET4" + }, + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "version": "1", + "endpoint": "https://www.google-analytics.com/mp/collect", + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag) track event with hybrid connection mode using override client_id and session_id approach", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "userId": "user@1", + "channel": "web", + "anonymousId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "traits": { + "campaign": "advertizing" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36", + "sessionId": 1683172874065 + }, + "type": "track", + "event": "generate_lead", + "properties": { + "source": "instagram", + "value": 20 + }, + "integrations": { + "All": true + } + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6BET4", + "firebaseAppId": "", + "typesOfClient": "gtag", + "eventFilteringOption": "disable", + "connectionMode": "hybrid", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "FORM": {}, + "JSON": { + "events": [ + { + "name": "generate_lead", + "params": { + "currency": "USD", + "value": 20, + "source": "instagram", + "session_id": 1683172874065, + "engagement_time_msec": 1 + } + } + ], + "user_id": "user@1", + "user_properties": { + "campaign": { + "value": "advertizing" + } + }, + "client_id": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "non_personalized_ads": true + }, + "JSON_ARRAY": {} + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6BET4" + }, + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "version": "1", + "endpoint": "https://www.google-analytics.com/mp/collect", + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag) firing group calls with GA4 hybrid mode connection", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "group", + "event": "tutorial complete", + "integrations": { + "Google Analytics 4": { + "clientId": "4718026.1683606287", + "sessionId": "1683606287", + "sessionNumber": 1 + } + } + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "typesOfClient": "gtag", + "eventFilteringOption": "disable", + "connectionMode": "hybrid", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/mp/collect", + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "body": { + "JSON": { + "non_personalized_ads": true, + "client_id": "4718026.1683606287", + "events": [ + { + "name": "join_group", + "params": { + "engagement_time_msec": 1, + "session_id": "1683606287", + "session_number": 1 + } + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag) sign_up event with all data types of user_properties", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "userId": "user@1", + "channel": "web", + "anonymousId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "traits": { + "campaign": "advertizing", + "name": "rudder", + "age": 45, + "hobby": [ + "dancing", + "singing", + "reading" + ], + "enableEURegion": false, + "isEnterpriseUser": { + "value": false + } + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "sign_up", + "properties": { + "method": "google" + }, + "integrations": { + "All": true + } + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6BET4", + "firebaseAppId": "", + "typesOfClient": "gtag", + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "FORM": {}, + "JSON": { + "events": [ + { + "name": "sign_up", + "params": { + "method": "google", + "engagement_time_msec": 1 + } + } + ], + "user_id": "user@1", + "client_id": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "user_properties": { + "age": { + "value": 45 + }, + "name": { + "value": "rudder" + }, + "campaign": { + "value": "advertizing" + }, + "enableEURegion": { + "value": false + } + }, + "non_personalized_ads": true + }, + "JSON_ARRAY": {} + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6BET4" + }, + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "version": "1", + "endpoint": "https://www.google-analytics.com/mp/collect", + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "[Error]: (gtag) event name starts with numbers", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "1234_sign_up", + "properties": { + "total": "10" + }, + "integrations": { + "All": true + } + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "typesOfClient": "gtag", + "eventFilteringOption": "disable", + "connectionMode": "cloud", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Event name must start with a letter and can only contain letters, numbers, and underscores", + "statTags": { + "destType": "GA4", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "ga4", + "description": "(gtag) event having multiple empty array and object parameters", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "type": "track", + "event": "logIn", + "userId": "user@1", + "group_id": "group@1", + "anon_id": "78e95d6d-58c0-4237-b99e-2ef510b6d502", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "ga4AppInstanceId", + "id": "f0dd99b6f979fb551ce583373900f937" + }, + { + "type": "ga4ClientId", + "id": "client_id" + } + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "properties": { + "user_interest": "Moderate", + "company_interest": "", + "profile": [ + { + "is_6qa": true, + "product": null, + "product_fit": "Moderate", + "product_stage": "Purchase", + "intent_score": 89, + "profile_score": 52, + "product_display$name": "rudderstack" + } + ], + "user_company": "Analytics consulting", + "user_account": "1", + "user_id_mappings": "330098|245252|461224|282599", + "company_naics_6sense": "5173", + "usr_consent": null, + "firebase_user_id": "kdgMnP", + "google_user_id": "G-123456", + "company_domain": "consulting.net", + "company_region": "New Zealand", + "user_product_interests": { + "ids": [], + "list": [ + { + "id": 330098, + "name": [] + }, + { + "id": 245252, + "name": {} + } + ], + "names": [] + }, + "company_country": {}, + "company_industry": "Business Analytics", + "company_revenue": "$5M - $10M", + "company_annual_revenue": "5568000", + "company_sic_description": "", + "company_naics_description": [] + }, + "integrations": { + "All": true + } + }, + "destination": { + "Config": { + "apiSecret": "dummyApiSecret", + "measurementId": "G-T40PE6KET4", + "firebaseAppId": "", + "typesOfClient": "gtag", + "eventFilteringOption": "disable", + "connectionMode": "cloud", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "FORM": {}, + "JSON": { + "events": [ + { + "name": "login", + "params": { + "company_annual_revenue": "5568000", + "company_domain": "consulting.net", + "company_industry": "Business Analytics", + "company_naics_6sense": "5173", + "company_region": "New Zealand", + "company_revenue": "$5M - $10M", + "engagement_time_msec": 1, + "profile_0_intent_score": 89, + "profile_0_is_6qa": true, + "profile_0_product_display$name": "rudderstack", + "profile_0_product_fit": "Moderate", + "profile_0_product_stage": "Purchase", + "profile_0_profile_score": 52, + "user_account": "1", + "user_company": "Analytics consulting", + "user_id_mappings": "330098|245252|461224|282599", + "user_interest": "Moderate", + "user_product_interests_list_0_id": 330098, + "user_product_interests_list_1_id": 245252 + } + } + ], + "user_id": "user@1", + "client_id": "client_id", + "non_personalized_ads": true + }, + "JSON_ARRAY": {} + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": { + "api_secret": "dummyApiSecret", + "measurement_id": "G-T40PE6KET4" + }, + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "version": "1", + "endpoint": "https://www.google-analytics.com/mp/collect", + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + }, + { + "name": "ga4", + "description": "(gtag) campaign_details custom event", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "userId": "user@1", + "channel": "web", + "anonymousId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "adTrackingEnabled": "false", + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "ip": "0.0.0.0", + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "campaign": { + "id": "google_1234", + "name": "Summer_fun", + "source": "google", + "medium": "cpc", + "term": "summer+travel", + "content": "logo link" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" + }, + "type": "track", + "event": "Campaign Details", + "properties": {}, + "integrations": { + "All": true + } + }, + "destination": { + "Config": { + "apiSecret": "QyWKGHj8QhG2L4ePAPiXCA", + "measurementId": "G-T40PE6BET4", + "typesOfClient": "gtag", + "eventFilteringOption": "disable", + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "whitelistedEvents": [ + { + "eventName": "" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "FORM": {}, + "JSON": { + "events": [ + { + "name": "campaign_details", + "params": { + "campaign_id": "google_1234", + "campaign": "Summer_fun", + "source": "google", + "medium": "cpc", + "term": "summer+travel", + "content": "logo link", + "engagement_time_msec": 1 + } + } + ], + "user_id": "user@1", + "client_id": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "non_personalized_ads": true + }, + "JSON_ARRAY": {} + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": { + "api_secret": "QyWKGHj8QhG2L4ePAPiXCA", + "measurement_id": "G-T40PE6BET4" + }, + "headers": { + "HOST": "www.google-analytics.com", + "Content-Type": "application/json" + }, + "version": "1", + "endpoint": "https://www.google-analytics.com/mp/collect", + "userId": "" + }, + "statusCode": 200 + } + ] + } + }, + "mockFns": defaultMockFns + } +] \ No newline at end of file diff --git a/test/integrations/destinations/stormly/processor/data.ts b/test/integrations/destinations/stormly/processor/data.ts new file mode 100644 index 0000000000..cfa16beced --- /dev/null +++ b/test/integrations/destinations/stormly/processor/data.ts @@ -0,0 +1,566 @@ +export const data = [ + { + "name": "stormly", + "description": "Identify call without userId", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey" + }, + "ID": "stormly123" + }, + "message": { + "type": "identify", + "context": { + "traits": { + "name": "John Doe", + "email": "johndoe@gmail.com", + "age": 25 + } + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "statusCode": 400, + "error": "Missing required value from \"userIdOnly\"", + "statTags": { + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "destType": "STORMLY", + "module": "destination", + "implementation": "native", + "feature": "processor" + } + } + ] + } + } + }, + { + "name": "stormly", + "description": "Identify call with userId, traits", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey" + }, + "ID": "stormly123" + }, + "message": { + "type": "identify", + "sentAt": "2022-01-20T13:39:21.033Z", + "channel": "web", + "userId": "5136633649", + "context": { + "traits": { + "name": "John Doe", + "email": "johndoe@gmail.com", + "age": 25 + } + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://rudderstack.t.stormly.com/webhook/rudderstack/identify", + "headers": { + "Content-Type": "application/json", + "Authorization": "Basic dummyApiKey" + }, + "params": {}, + "body": { + "JSON": { + "userId": "5136633649", + "timestamp": "2022-01-20T13:39:21.032Z", + "traits": { + "name": "John Doe", + "email": "johndoe@gmail.com", + "age": 25 + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "stormly", + "description": "Track call without userId", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey" + }, + "ID": "stormly123" + }, + "message": { + "type": "track", + "event": "Product Reviewed", + "properties": { + "review_id": "12345", + "product_id": "123", + "rating": 3, + "review_body": "Average product, expected much more.", + "groupId": "91Yb32830" + }, + "context": {}, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "statusCode": 400, + "error": "Missing required value from \"userIdOnly\"", + "statTags": { + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "destType": "STORMLY", + "module": "destination", + "implementation": "native", + "feature": "processor" + } + } + ] + } + } + }, + { + "name": "stormly", + "description": "Track call without groupId", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey" + }, + "ID": "stormly123" + }, + "message": { + "type": "track", + "event": "Product Reviewed", + "userId": "5136633649", + "properties": { + "review_id": "12345", + "product_id": "123", + "rating": 3, + "review_body": "Average product, expected much more." + }, + "context": {}, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://rudderstack.t.stormly.com/webhook/rudderstack/track", + "headers": { + "Content-Type": "application/json", + "Authorization": "Basic dummyApiKey" + }, + "params": {}, + "body": { + "JSON": { + "userId": "5136633649", + "event": "Product Reviewed", + "properties": { + "review_id": "12345", + "product_id": "123", + "rating": 3, + "review_body": "Average product, expected much more." + }, + "timestamp": "2022-01-20T13:39:21.032Z" + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "stormly", + "description": "Track call without properties", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey" + }, + "ID": "stormly123" + }, + "message": { + "type": "track", + "event": "Product Reviewed", + "userId": "5136633649", + "context": {}, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://rudderstack.t.stormly.com/webhook/rudderstack/track", + "headers": { + "Content-Type": "application/json", + "Authorization": "Basic dummyApiKey" + }, + "params": {}, + "body": { + "JSON": { + "userId": "5136633649", + "event": "Product Reviewed", + "timestamp": "2022-01-20T13:39:21.032Z" + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "stormly", + "description": "Track call with userId, groupId and properties", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey" + }, + "ID": "stormly123" + }, + "message": { + "type": "track", + "event": "Product Reviewed", + "userId": "5136633649", + "properties": { + "review_id": "12345", + "product_id": "123", + "rating": 3, + "review_body": "Average product, expected much more.", + "groupId": "91Yb32830" + }, + "context": {}, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://rudderstack.t.stormly.com/webhook/rudderstack/track", + "headers": { + "Content-Type": "application/json", + "Authorization": "Basic dummyApiKey" + }, + "params": {}, + "body": { + "JSON": { + "userId": "5136633649", + "event": "Product Reviewed", + "properties": { + "review_id": "12345", + "product_id": "123", + "rating": 3, + "review_body": "Average product, expected much more." + }, + "timestamp": "2022-01-20T13:39:21.032Z", + "context": { + "groupId": "91Yb32830" + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "stormly", + "description": "Track call with userId, groupId (from externalId) and properties", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey" + }, + "ID": "stormly123" + }, + "message": { + "type": "track", + "event": "Product Reviewed", + "userId": "5136633649", + "properties": { + "review_id": "12345", + "product_id": "123", + "rating": 3, + "review_body": "Average product, expected much more.", + "groupId": "test-12345" + }, + "context": { + "externalId": [ + { + "type": "stormlyGroupId", + "id": "91Yb32830" + } + ] + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://rudderstack.t.stormly.com/webhook/rudderstack/track", + "headers": { + "Content-Type": "application/json", + "Authorization": "Basic dummyApiKey" + }, + "params": {}, + "body": { + "JSON": { + "userId": "5136633649", + "event": "Product Reviewed", + "properties": { + "review_id": "12345", + "product_id": "123", + "rating": 3, + "review_body": "Average product, expected much more." + }, + "timestamp": "2022-01-20T13:39:21.032Z", + "context": { + "groupId": "91Yb32830" + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "stormly", + "description": "Group call with userId, groupId and traits", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey" + }, + "ID": "stormly123" + }, + "message": { + "type": "group", + "userId": "5136633649", + "traits": { + "name": "Initech", + "employees": 500, + "headquarters": "Redwood City, California, United States", + "ceo": "John Doe", + "revenue": 70000000, + "currency": "USD", + "groupId": "9230AUbd2138h" + }, + "context": {}, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://rudderstack.t.stormly.com/webhook/rudderstack/group", + "headers": { + "Content-Type": "application/json", + "Authorization": "Basic dummyApiKey" + }, + "params": {}, + "body": { + "JSON": { + "userId": "5136633649", + "groupId": "9230AUbd2138h", + "timestamp": "2022-01-20T13:39:21.032Z", + "traits": { + "name": "Initech", + "employees": 500, + "headquarters": "Redwood City, California, United States", + "ceo": "John Doe", + "revenue": 70000000, + "currency": "USD" + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + } +] \ No newline at end of file diff --git a/test/integrations/destinations/stormly/router/data.ts b/test/integrations/destinations/stormly/router/data.ts new file mode 100644 index 0000000000..bbc9c7af2e --- /dev/null +++ b/test/integrations/destinations/stormly/router/data.ts @@ -0,0 +1,148 @@ +import { FEATURES } from '../../../../../src/v0/util/tags'; + +export const data = [ + { + name: 'stormly', + description: 'Test 0', + feature: FEATURES.ROUTER, + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey" + }, + "ID": "stormly123" + }, + "metadata": { + "jobId": 1 + }, + "message": { + "type": "identify", + "sentAt": "2022-01-20T13:39:21.033Z", + "channel": "web", + "userId": "5136633649", + "context": { + "traits": { + "name": "John Doe", + "email": "johndoe@gmail.com", + "age": 25 + } + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + }, + { + "destination": { + "Config": { + "apiKey": "dummyApiKey" + }, + "ID": "stormly123" + }, + "metadata": { + "jobId": 2 + }, + "message": { + "type": "track", + "event": "Product Reviewed", + "properties": { + "review_id": "12345", + "product_id": "123", + "rating": 3.0, + "review_body": "Average product, expected much more.", + "groupId": "91Yb32830" + }, + "context": {}, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + } + ], + destType: 'stormly', + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + "batched": false, + "batchedRequest": { + "body": { + "FORM": {}, + "JSON": { + "timestamp": "2022-01-20T13:39:21.032Z", + "traits": { + "age": 25, + "email": "johndoe@gmail.com", + "name": "John Doe" + }, + "userId": "5136633649" + }, + "JSON_ARRAY": {}, + "XML": {} + }, + "endpoint": "https://rudderstack.t.stormly.com/webhook/rudderstack/identify", + "files": {}, + "headers": { + "Authorization": "Basic dummyApiKey", + "Content-Type": "application/json" + }, + "method": "POST", + "params": {}, + "type": "REST", + "version": "1" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey" + }, + "ID": "stormly123" + }, + "metadata": [ + { + "jobId": 1 + } + ], + "statusCode": 200 + }, + { + "destination": { + "Config": { + "apiKey": "dummyApiKey" + }, + "ID": "stormly123" + }, + "batched": false, + "error": "Missing required value from \"userIdOnly\"", + "metadata": [ + { + "jobId": 2 + } + ], + "statTags": { + "destType": "STORMLY", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "router", + "implementation": "native", + "module": "destination", + }, + "statusCode": 400 + } + ], + }, + }, + }, + } +]; From d0e24d3bc1d7c782a12991993fa35fde9fb9b73c Mon Sep 17 00:00:00 2001 From: Sudip Paul <67197965+ItsSudip@users.noreply.github.com> Date: Wed, 20 Dec 2023 12:10:07 +0530 Subject: [PATCH 094/135] chore: add component test cases for some destinations part1 (#2915) * chore: add component test cases for some destinations * chore: add method to network.ts --- test/__mocks__/axios.js | 56 +- test/__mocks__/clickup.mock.js | 36 - test/__mocks__/custify.mock.js | 36 - test/__mocks__/data/clickup/response.json | 229 -- test/__mocks__/data/custify/response.json | 27 - .../data/freshmarketer/response.json | 430 --- test/__mocks__/data/freshsales/response.json | 430 --- test/__mocks__/delighted.mock.js | 12 - test/__mocks__/drip.mock.js | 8 - test/__mocks__/freshmarketer.mock.js | 52 - test/__mocks__/freshsales.mock.js | 52 - test/__tests__/clickup.test.js | 47 - test/__tests__/custify.test.js | 47 - test/__tests__/data/clickup.json | 513 --- test/__tests__/data/clickup_router_input.json | 192 - .../__tests__/data/clickup_router_output.json | 249 -- test/__tests__/data/custify.json | 511 --- test/__tests__/data/custify_router_input.json | 99 - .../__tests__/data/custify_router_output.json | 119 - test/__tests__/data/delighted_input.json | 392 --- test/__tests__/data/delighted_output.json | 121 - .../data/delighted_router_input.json | 83 - .../data/delighted_router_output.json | 83 - test/__tests__/data/drip_input.json | 720 ---- test/__tests__/data/drip_output.json | 319 -- test/__tests__/data/drip_router_input.json | 90 - test/__tests__/data/drip_router_output.json | 96 - test/__tests__/data/freshmarketer.json | 2507 ------------- .../data/freshmarketer_router_input.json | 174 - .../data/freshmarketer_router_output.json | 163 - test/__tests__/data/freshsales.json | 2173 ------------ .../data/freshsales_router_input.json | 78 - .../data/freshsales_router_output.json | 83 - test/__tests__/delighted.test.js | 48 - test/__tests__/drip.test.js | 47 - test/__tests__/freshmarketer.test.js | 46 - test/__tests__/freshsales.test.js | 45 - .../destinations/clickup/network.ts | 247 ++ .../destinations/clickup/processor/data.ts | 829 +++++ .../destinations/clickup/router/data.ts | 471 +++ .../destinations/custify/network.ts | 36 + .../destinations/custify/processor/data.ts | 695 ++++ .../destinations/custify/router/data.ts | 242 ++ .../destinations/delighted/network.ts | 30 + .../destinations/delighted/processor/data.ts | 937 +++++ .../destinations/delighted/router/data.ts | 191 + .../integrations/destinations/drip/network.ts | 30 + .../destinations/drip/processor/data.ts | 1487 ++++++++ .../destinations/drip/router/data.ts | 210 ++ .../destinations/freshmarketer/network.ts | 487 +++ .../freshmarketer/processor/data.ts | 3130 +++++++++++++++++ .../destinations/freshmarketer/router/data.ts | 361 ++ .../destinations/freshsales/network.ts | 484 +++ .../destinations/freshsales/processor/data.ts | 2668 ++++++++++++++ .../destinations/freshsales/router/data.ts | 185 + 55 files changed, 12722 insertions(+), 10411 deletions(-) delete mode 100644 test/__mocks__/clickup.mock.js delete mode 100644 test/__mocks__/custify.mock.js delete mode 100644 test/__mocks__/data/clickup/response.json delete mode 100644 test/__mocks__/data/custify/response.json delete mode 100644 test/__mocks__/data/freshmarketer/response.json delete mode 100644 test/__mocks__/data/freshsales/response.json delete mode 100644 test/__mocks__/delighted.mock.js delete mode 100644 test/__mocks__/drip.mock.js delete mode 100644 test/__mocks__/freshmarketer.mock.js delete mode 100644 test/__mocks__/freshsales.mock.js delete mode 100644 test/__tests__/clickup.test.js delete mode 100644 test/__tests__/custify.test.js delete mode 100644 test/__tests__/data/clickup.json delete mode 100644 test/__tests__/data/clickup_router_input.json delete mode 100644 test/__tests__/data/clickup_router_output.json delete mode 100644 test/__tests__/data/custify.json delete mode 100644 test/__tests__/data/custify_router_input.json delete mode 100644 test/__tests__/data/custify_router_output.json delete mode 100644 test/__tests__/data/delighted_input.json delete mode 100644 test/__tests__/data/delighted_output.json delete mode 100644 test/__tests__/data/delighted_router_input.json delete mode 100644 test/__tests__/data/delighted_router_output.json delete mode 100644 test/__tests__/data/drip_input.json delete mode 100644 test/__tests__/data/drip_output.json delete mode 100644 test/__tests__/data/drip_router_input.json delete mode 100644 test/__tests__/data/drip_router_output.json delete mode 100644 test/__tests__/data/freshmarketer.json delete mode 100644 test/__tests__/data/freshmarketer_router_input.json delete mode 100644 test/__tests__/data/freshmarketer_router_output.json delete mode 100644 test/__tests__/data/freshsales.json delete mode 100644 test/__tests__/data/freshsales_router_input.json delete mode 100644 test/__tests__/data/freshsales_router_output.json delete mode 100644 test/__tests__/delighted.test.js delete mode 100644 test/__tests__/drip.test.js delete mode 100644 test/__tests__/freshmarketer.test.js delete mode 100644 test/__tests__/freshsales.test.js create mode 100644 test/integrations/destinations/clickup/network.ts create mode 100644 test/integrations/destinations/clickup/processor/data.ts create mode 100644 test/integrations/destinations/clickup/router/data.ts create mode 100644 test/integrations/destinations/custify/network.ts create mode 100644 test/integrations/destinations/custify/processor/data.ts create mode 100644 test/integrations/destinations/custify/router/data.ts create mode 100644 test/integrations/destinations/delighted/network.ts create mode 100644 test/integrations/destinations/delighted/processor/data.ts create mode 100644 test/integrations/destinations/delighted/router/data.ts create mode 100644 test/integrations/destinations/drip/network.ts create mode 100644 test/integrations/destinations/drip/processor/data.ts create mode 100644 test/integrations/destinations/drip/router/data.ts create mode 100644 test/integrations/destinations/freshmarketer/network.ts create mode 100644 test/integrations/destinations/freshmarketer/processor/data.ts create mode 100644 test/integrations/destinations/freshmarketer/router/data.ts create mode 100644 test/integrations/destinations/freshsales/network.ts create mode 100644 test/integrations/destinations/freshsales/processor/data.ts create mode 100644 test/integrations/destinations/freshsales/router/data.ts diff --git a/test/__mocks__/axios.js b/test/__mocks__/axios.js index e8a4d3c6b3..1ed76a1ca7 100644 --- a/test/__mocks__/axios.js +++ b/test/__mocks__/axios.js @@ -15,27 +15,15 @@ const mailchimpGetRequestHandler = require("./mailchimp.mock"); const yahooDspPostRequestHandler = require("./yahoo_dsp.mock"); const { gainsightPXGetRequestHandler } = require("./gainsight_px.mock"); const { hsGetRequestHandler, hsPostRequestHandler } = require("./hs.mock"); -const { delightedGetRequestHandler } = require("./delighted.mock"); -const { dripPostRequestHandler } = require("./drip.mock"); const profitwellGetRequestHandler = require("./profitwell.mock"); const cannyPostRequestHandler = require("./canny.mock"); -const custifyPostRequestHandler = require("./custify.mock"); const { wootricGetRequestHandler, wootricPostRequestHandler } = require("./wootric.mock"); const { userGetRequestHandler, userPutRequestHandler } = require("./user.mock"); const { mixpanelPostRequestHandler } = require("./mixpanel.mock"); -const { clickUpGetRequestHandler } = require("./clickup.mock"); -const { - freshmarketerPostRequestHandler, - freshmarketerGetRequestHandler -} = require("./freshmarketer.mock"); const { mondayPostRequestHandler } = require("./monday.mock"); -const { - freshsalesGetRequestHandler, - freshsalesPostRequestHandler -} = require("./freshsales.mock"); const { sendgridGetRequestHandler } = require("./sendgrid.mock"); const { sendinblueGetRequestHandler } = require("./sendinblue.mock"); const { courierGetRequestHandler } = require("./courier.mock"); @@ -109,26 +97,9 @@ function get(url, options) { if (url.includes("https://api.hubapi.com")) { return hsGetRequestHandler(url, mockData); } - if (url.includes("https://api.delighted.com/v1/people.json")) { - return delightedGetRequestHandler(options); - } if (url.includes("https://api.profitwell.com")) { return profitwellGetRequestHandler(url, mockData); } - if ( - url.includes( - "https://api.getdrip.com/v2/1809802/subscribers/identified_user@gmail.com" - ) - ) { - return Promise.resolve({ status: 200 }); - } - if ( - url.includes( - "https://api.getdrip.com/v2/1809802/subscribers/unidentified_user@gmail.com" - ) - ) { - return Promise.reject({ status: 404 }); - } if (url.includes("https://api.wootric.com")) { return new Promise((resolve, reject) => { resolve(wootricGetRequestHandler(url)); @@ -139,15 +110,6 @@ function get(url, options) { resolve(userGetRequestHandler(url)); }); } - if (url.includes("https://api.clickup.com")) { - return Promise.resolve(clickUpGetRequestHandler(url)); - } - if (url.includes("https://domain-rudder.myfreshworks.com/crm/sales/api")) { - return Promise.resolve(freshmarketerGetRequestHandler(url)); - } - if (url.includes("https://domain-rudder.myfreshworks.com/crm/sales/api")) { - return Promise.resolve(freshsalesGetRequestHandler(url)); - } if (url.includes("https://api.sendgrid.com/v3/marketing/field_definitions")) { return Promise.resolve(sendgridGetRequestHandler(url)); } @@ -197,9 +159,6 @@ function post(url, payload) { resolve(yahooDspPostRequestHandler(url, payload)); }); } - if (url.includes("https://api.getdrip.com/v2/1809802/subscribers")) { - return dripPostRequestHandler(url, payload); - } if (url.includes("https://canny.io/api/v1/users/retrieve")) { return new Promise((resolve, reject) => { resolve(cannyPostRequestHandler(url)); @@ -221,16 +180,7 @@ function post(url, payload) { resolve(mixpanelPostRequestHandler(url, payload)); }); } - if (url.includes("https://domain-rudder.myfreshworks.com/crm/sales/api")) { - return new Promise((resolve, reject) => { - resolve(freshmarketerPostRequestHandler(url)); - }); - } - if (url.includes("https://domain-rudder.myfreshworks.com/crm/sales/api")) { - return new Promise((resolve, reject) => { - resolve(freshsalesPostRequestHandler(url)); - }); - } + if ( url.includes("https://api.monday.com") && payload.query.includes("query") @@ -239,9 +189,7 @@ function post(url, payload) { resolve(mondayPostRequestHandler(payload)); }); } - if (url.includes("https://api.custify.com")) { - return Promise.resolve(custifyPostRequestHandler(url)); - } + return new Promise((resolve, reject) => { if (mockData) { resolve({ data: mockData, status: 200 }); diff --git a/test/__mocks__/clickup.mock.js b/test/__mocks__/clickup.mock.js deleted file mode 100644 index beb73505f6..0000000000 --- a/test/__mocks__/clickup.mock.js +++ /dev/null @@ -1,36 +0,0 @@ -const fs = require("fs"); -const path = require("path"); - -const urlDirectoryMap = { - "api.clickup.com": "clickup" -}; - -const getData = url => { - let directory = ""; - Object.keys(urlDirectoryMap).forEach(key => { - if (url.includes(key)) { - directory = urlDirectoryMap[key]; - } - }); - if (directory) { - const dataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${directory}/response.json`) - ); - const data = JSON.parse(dataFile); - return data[url]; - } - return {}; -}; - -const clickUpGetRequestHandler = url => { - const mockData = getData(url); - if (mockData) { - return { data: mockData, status: 200 }; - } - - return Promise.resolve({ error: "Request failed", status: 404 }); -}; - -module.exports = { - clickUpGetRequestHandler -}; diff --git a/test/__mocks__/custify.mock.js b/test/__mocks__/custify.mock.js deleted file mode 100644 index 4d94207d57..0000000000 --- a/test/__mocks__/custify.mock.js +++ /dev/null @@ -1,36 +0,0 @@ -const fs = require("fs"); -const path = require("path"); - -const urlDirectoryMap = { - "api.custify.com": "custify" -}; - -const getData = url => { - let directory = ""; - Object.keys(urlDirectoryMap).forEach(key => { - if (url.includes(key)) { - directory = urlDirectoryMap[key]; - } - }); - if (directory) { - const dataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${directory}/response.json`) - ); - const data = JSON.parse(dataFile); - return data[url]; - } - return {}; -}; - -const custifyPostRequestHandler = url => { - const mockData = getData(url); - if (mockData) { - // resolve with status 200 - return { data: mockData, status: 201 }; - } - return new Promise((resolve, reject) => { - resolve({ error: "Request failed", status: 500 }); - }); -}; - -module.exports = custifyPostRequestHandler; diff --git a/test/__mocks__/data/clickup/response.json b/test/__mocks__/data/clickup/response.json deleted file mode 100644 index 7fbba92ce4..0000000000 --- a/test/__mocks__/data/clickup/response.json +++ /dev/null @@ -1,229 +0,0 @@ -{ - "https://api.clickup.com/api/v2/list/correctListId123/field": { - "fields": [ - { - "id": "19d3ac4e-2b1e-4569-b33e-ff86c7d94d6e", - "name": "Labels", - "type": "labels", - "type_config": { - "options": [ - { - "id": "32c81c1c-cf53-4829-92f5-0f0270d27a45", - "label": "Option 1", - "color": {} - }, - { - "id": "7e24f329-9dd9-4e68-b426-2c70af6f9347", - "label": "Option 2", - "color": {} - } - ] - }, - "date_created": "1661964865880", - "hide_from_guests": false, - "required": false - }, - { - "id": "22eaffee-ffec-4c3b-bdae-56e69d55eecd", - "name": "Payment Status", - "type": "drop_down", - "type_config": { - "default": 0, - "placeholder": {}, - "new_drop_down": true, - "options": [ - { - "id": "e109e36b-a052-4a31-af16-25da7324990f", - "name": "Sent Request", - "color": "#FF7FAB", - "orderindex": 0 - }, - { - "id": "3a3b4512-2896-44f7-8075-2ff37777fe24", - "name": "Quote sent", - "color": "#EA80FC", - "orderindex": 1 - }, - { - "id": "7afcb6fb-cec8-41d8-bf0c-039a9db28460", - "name": "Pending", - "color": "#ff7800", - "orderindex": 2 - }, - { - "id": "890ecf28-bdd4-4f53-92cc-bc4edb696fcd", - "name": "Payment Recieved", - "color": "#2ecd6f", - "orderindex": 3 - }, - { - "id": "e89f7dd7-fd24-4b32-ac4d-f174d8ca914f", - "name": "n/a", - "color": "#b5bcc2", - "orderindex": 4 - } - ] - }, - "date_created": "1660124553414", - "hide_from_guests": false, - "required": {} - }, - { - "id": "4b7a29be-e261-4340-8f3f-e6de838473e5", - "name": "Plan", - "type": "drop_down", - "type_config": { - "default": 0, - "placeholder": {}, - "new_drop_down": true, - "options": [ - { - "id": "4b9366a7-2592-4b7a-909a-ed4af705e27c", - "name": "Unlimited", - "color": "#02BCD4", - "orderindex": 0 - }, - { - "id": "c5032049-8c05-44e9-a000-3a071d457b8f", - "name": "Business", - "color": "#1bbc9c", - "orderindex": 1 - }, - { - "id": "9fb08801-1130-4650-8e2e-28578344ff3c", - "name": "Enterprise", - "color": "#2ecd6f", - "orderindex": 2 - } - ] - }, - "date_created": "1660124553414", - "hide_from_guests": false, - "required": {} - }, - { - "id": "4bfebc00-9d4a-40d1-aef8-5a87b610186c", - "name": "Contact Title", - "type": "text", - "type_config": {}, - "date_created": "1660124553414", - "hide_from_guests": false, - "required": {} - }, - { - "id": "666f74bf-6d87-41f3-8735-ccf0efe066dd", - "name": "Date", - "type": "date", - "type_config": {}, - "date_created": "1662379321069", - "hide_from_guests": false, - "required": false - }, - { - "id": "a5f5044a-cbad-4caf-bcbb-4cd32bd8db7c", - "name": "Industry", - "type": "drop_down", - "type_config": { - "default": 0, - "placeholder": {}, - "options": [ - { - "id": "75173398-257f-42b6-8bae-4cf767fa99ab", - "name": "Engineering", - "color": "#04A9F4", - "orderindex": 0 - }, - { - "id": "c7f9b6f5-cd98-4609-af10-68a8710cc1bf", - "name": "Retail", - "color": "#ff7800", - "orderindex": 1 - }, - { - "id": "dbe84940-b4e8-4a29-8491-e1aa5f2be4e2", - "name": "Hospitality", - "color": "#2ecd6f", - "orderindex": 2 - } - ] - }, - "date_created": "1660124553414", - "hide_from_guests": false, - "required": {} - }, - { - "id": "b01b32fd-94d3-43e6-9f31-2c855ff169cd", - "name": "Url", - "type": "url", - "type_config": {}, - "date_created": "1661970432587", - "hide_from_guests": false, - "required": false - }, - { - "id": "c9b83d91-b979-4b34-b4bd-88bf9cf2b9a6", - "name": "Phone Number", - "type": "phone", - "type_config": {}, - "date_created": "1661970795061", - "hide_from_guests": false, - "required": false - }, - { - "id": "d0201829-ddcd-4b97-b71f-0f9e672488f2", - "name": "Account Size", - "type": "number", - "type_config": {}, - "date_created": "1660124553414", - "hide_from_guests": false, - "required": {} - }, - { - "id": "ea6c1e48-2abf-4328-b228-79c213e147c8", - "name": "Location", - "type": "location", - "type_config": {}, - "date_created": "1662229589329", - "hide_from_guests": false, - "required": false - }, - { - "id": "ebe825fb-92de-41ce-a29c-25018da039b4", - "name": "Email", - "type": "email", - "type_config": {}, - "date_created": "1660124553414", - "hide_from_guests": false, - "required": {} - }, - { - "id": "f431cda3-a575-4a05-ba8d-583d9b6cb2df", - "name": "Rating", - "type": "emoji", - "type_config": { - "count": 5, - "code_point": "2b50" - }, - "date_created": "1661963909454", - "hide_from_guests": false, - "required": false - }, - { - "id": "ffbe4f03-cbc3-4077-8fea-9e5d08b4dceb", - "name": "Money In INR", - "type": "currency", - "type_config": { - "default": {}, - "precision": 2, - "currency_type": "INR" - }, - "date_created": "1661428276019", - "hide_from_guests": false, - "required": false - } - ] - }, - "https://api.clickup.com/api/v2/list/correctListId456/field": { - "fields": [] - } -} diff --git a/test/__mocks__/data/custify/response.json b/test/__mocks__/data/custify/response.json deleted file mode 100644 index 86d85026d1..0000000000 --- a/test/__mocks__/data/custify/response.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "https://api.custify.com/company": { - "company_id": "6", - "name": "Pizzeria Presto", - "signed_up_at": "2019-05-30T12:00:00.000Z", - "size": 15, - "website": "www.pizzeriapresto.com", - "industry": "Restaurant", - "plan": "Platinum", - "monthly_revenue": 1234567, - "churned": false, - "owners_csm": "john.doe@mail.com", - "owners_account": "john.doe@mail.com", - "parent_companies": [ - { - "id": "5ec50c9829d3c17c7cf455f2" - }, - { - "id": "5ec50c9829d3c17c7cf457f2" - } - ], - "custom_attributes": { - "restaurants": 5, - "custom": "template" - } - } -} diff --git a/test/__mocks__/data/freshmarketer/response.json b/test/__mocks__/data/freshmarketer/response.json deleted file mode 100644 index 3b0d0af192..0000000000 --- a/test/__mocks__/data/freshmarketer/response.json +++ /dev/null @@ -1,430 +0,0 @@ -{ - "https://domain-rudder.myfreshworks.com/crm/sales/api/sales_accounts/upsert": { - "sales_account": { - "id": 70003771396, - "name": "postman2.0", - "address": "Red Colony", - "city": "Pune", - "state": "Goa", - "zipcode": null, - "country": null, - "number_of_employees": 11, - "annual_revenue": 1000, - "website": null, - "owner_id": null, - "phone": "919191919191", - "open_deals_amount": null, - "open_deals_count": null, - "won_deals_amount": null, - "won_deals_count": null, - "last_contacted": null, - "last_contacted_mode": null, - "facebook": null, - "twitter": null, - "linkedin": null, - "links": { - "conversations": "/crm/sales/sales_accounts/70003771396/conversations/all?include=email_conversation_recipients%2Ctargetable%2Cphone_number%2Cphone_caller%2Cnote%2Cuser&per_page=3", - "document_associations": "/crm/sales/sales_accounts/70003771396/document_associations", - "notes": "/crm/sales/sales_accounts/70003771396/notes?include=creater", - "tasks": "/crm/sales/sales_accounts/70003771396/tasks?include=creater,owner,updater,targetable,users,task_type", - "appointments": "/crm/sales/sales_accounts/70003771396/appointments?include=creater,owner,updater,targetable,appointment_attendees,conference,note" - }, - "custom_field": {}, - "created_at": "2022-08-17T04:15:00-04:00", - "updated_at": "2022-08-24T06:03:31-04:00", - "avatar": null, - "parent_sales_account_id": null, - "recent_note": null, - "last_contacted_via_sales_activity": null, - "last_contacted_sales_activity_mode": null, - "completed_sales_sequences": null, - "active_sales_sequences": null, - "last_assigned_at": null, - "tags": [], - "is_deleted": false, - "team_user_ids": null, - "has_connections": false, - "record_type_id": "71010794477" - } - }, - "https://domain-rudder.myfreshworks.com/crm/sales/api/contacts/upsert?include=sales_accounts": { - "contact": { - "id": 70042006456, - "first_name": "Rk", - "last_name": "Mishra", - "display_name": "Rk Mishra", - "avatar": null, - "job_title": null, - "city": null, - "state": null, - "zipcode": null, - "country": null, - "email": "testuser@google.com", - "emails": [ - { - "id": 70037311213, - "value": "testuser@google.com", - "is_primary": true, - "label": null, - "_destroy": false - } - ], - "time_zone": "IST", - "work_number": "9988776655", - "mobile_number": "19265559504", - "address": null, - "last_seen": null, - "lead_score": 26, - "last_contacted": null, - "open_deals_amount": null, - "won_deals_amount": null, - "links": { - "conversations": "/crm/sales/contacts/70042006456/conversations/all?include=email_conversation_recipients%2Ctargetable%2Cphone_number%2Cphone_caller%2Cnote%2Cuser&per_page=3", - "timeline_feeds": "/crm/sales/contacts/70042006456/timeline_feeds", - "document_associations": "/crm/sales/contacts/70042006456/document_associations", - "notes": "/crm/sales/contacts/70042006456/notes?include=creater", - "tasks": "/crm/sales/contacts/70042006456/tasks?include=creater,owner,updater,targetable,users,task_type", - "appointments": "/crm/sales/contacts/70042006456/appointments?include=creater,owner,updater,targetable,appointment_attendees,conference,note", - "reminders": "/crm/sales/contacts/70042006456/reminders?include=creater,owner,updater,targetable", - "duplicates": "/crm/sales/contacts/70042006456/duplicates", - "connections": "/crm/sales/contacts/70042006456/connections" - }, - "last_contacted_sales_activity_mode": null, - "custom_field": {}, - "created_at": "2022-08-09T03:22:12-04:00", - "updated_at": "2022-08-30T00:33:27-04:00", - "keyword": "drilling", - "medium": "facebook", - "last_contacted_mode": null, - "recent_note": null, - "won_deals_count": null, - "last_contacted_via_sales_activity": null, - "completed_sales_sequences": null, - "active_sales_sequences": null, - "web_form_ids": null, - "open_deals_count": null, - "last_assigned_at": "2022-08-29T05:51:24-04:00", - "tags": [], - "facebook": null, - "twitter": null, - "linkedin": null, - "is_deleted": false, - "team_user_ids": null, - "external_id": "ea5cfab2-3961-4d8a-8187-3d1858c99099", - "work_email": null, - "subscription_status": 1, - "subscription_types": "2;3;4;5;1", - "customer_fit": 2, - "record_type_id": "71010794476", - "whatsapp_subscription_status": 2, - "sms_subscription_status": 2, - "last_seen_chat": null, - "first_seen_chat": null, - "locale": null, - "total_sessions": null, - "phone_numbers": [], - "sales_accounts": [ - { - "partial": true, - "id": 70003771198, - "name": "div-quer", - "avatar": null, - "website": null, - "last_contacted": null, - "record_type_id": "71010794477", - "is_primary": true - }, - { - "partial": true, - "id": 70003825177, - "name": "BisleriGroup", - "avatar": null, - "website": null, - "last_contacted": null, - "record_type_id": "71010794477", - "is_primary": false - } - ] - } - }, - "https://domain-rudder.myfreshworks.com/crm/sales/api/selector/sales_activity_types": { - "sales_activity_types": [ - { - "partial": true, - "id": 70000666879, - "name": "own-calender", - "internal_name": "cappointment", - "show_in_conversation": true, - "position": 1, - "is_default": false, - "is_checkedin": false - }, - { - "partial": true, - "id": 70000663932, - "name": "fb-support", - "internal_name": "facebook", - "show_in_conversation": true, - "position": 2, - "is_default": false, - "is_checkedin": false - }, - { - "partial": true, - "id": 70000663746, - "name": "twitter sales", - "internal_name": "twitter", - "show_in_conversation": true, - "position": 3, - "is_default": false, - "is_checkedin": false - }, - { - "partial": true, - "id": 70000646396, - "name": "linked sales", - "internal_name": "linkedin", - "show_in_conversation": true, - "position": 4, - "is_default": false, - "is_checkedin": false - }, - { - "partial": true, - "id": 70000642330, - "name": "facebook sales", - "internal_name": "facebook", - "show_in_conversation": true, - "position": 5, - "is_default": false, - "is_checkedin": false - }, - { - "partial": true, - "id": 70000612897, - "name": "Chat", - "internal_name": "chat", - "show_in_conversation": true, - "position": 6, - "is_default": true, - "is_checkedin": false - }, - { - "partial": true, - "id": 70000612898, - "name": "Phone", - "internal_name": "phone", - "show_in_conversation": true, - "position": 7, - "is_default": true, - "is_checkedin": false - }, - { - "partial": true, - "id": 70000612899, - "name": "Meeting", - "internal_name": "appointment", - "show_in_conversation": true, - "position": 8, - "is_default": true, - "is_checkedin": true - }, - { - "partial": true, - "id": 70000612900, - "name": "Task", - "internal_name": "task", - "show_in_conversation": true, - "position": 9, - "is_default": true, - "is_checkedin": false - }, - { - "partial": true, - "id": 70000612901, - "name": "Email", - "internal_name": "email", - "show_in_conversation": true, - "position": 10, - "is_default": true, - "is_checkedin": false - }, - { - "partial": true, - "id": 70000612902, - "name": "SMS Outgoing", - "internal_name": "sms_outgoing", - "show_in_conversation": true, - "position": 11, - "is_default": true, - "is_checkedin": false - }, - { - "partial": true, - "id": 70000612903, - "name": "Reminder", - "internal_name": "reminder", - "show_in_conversation": false, - "position": 12, - "is_default": true, - "is_checkedin": false - }, - { - "partial": true, - "id": 70000612904, - "name": "SMS Incoming", - "internal_name": "sms_incoming", - "show_in_conversation": true, - "position": 13, - "is_default": true, - "is_checkedin": false - } - ] - }, - "https://domain-rudder.myfreshworks.com/crm/sales/api/contacts/upsert": { - "contact": { - "id": 70054866612, - "first_name": null, - "last_name": null, - "display_name": "jamessampleton120@gmail.com", - "avatar": null, - "job_title": null, - "city": null, - "state": null, - "zipcode": null, - "country": null, - "email": "jamessampleton120@gmail.com", - "emails": [ - { - "id": 70047409219, - "value": "jamessampleton120@gmail.com", - "is_primary": true, - "label": null, - "_destroy": false - } - ], - "time_zone": null, - "work_number": null, - "mobile_number": null, - "address": null, - "last_seen": null, - "lead_score": 0, - "last_contacted": null, - "open_deals_amount": null, - "won_deals_amount": null, - "links": { - "conversations": "/crm/sales/contacts/70054866612/conversations/all?include=email_conversation_recipients%2Ctargetable%2Cphone_number%2Cphone_caller%2Cnote%2Cuser&per_page=3", - "timeline_feeds": "/crm/sales/contacts/70054866612/timeline_feeds", - "document_associations": "/crm/sales/contacts/70054866612/document_associations", - "notes": "/crm/sales/contacts/70054866612/notes?include=creater", - "tasks": "/crm/sales/contacts/70054866612/tasks?include=creater,owner,updater,targetable,users,task_type", - "appointments": "/crm/sales/contacts/70054866612/appointments?include=creater,owner,updater,targetable,appointment_attendees,conference,note", - "reminders": "/crm/sales/contacts/70054866612/reminders?include=creater,owner,updater,targetable", - "duplicates": "/crm/sales/contacts/70054866612/duplicates", - "connections": "/crm/sales/contacts/70054866612/connections" - }, - "last_contacted_sales_activity_mode": null, - "custom_field": {}, - "created_at": "2022-10-11T08:42:15-04:00", - "updated_at": "2022-10-11T08:42:15-04:00", - "keyword": null, - "medium": null, - "last_contacted_mode": null, - "recent_note": null, - "won_deals_count": null, - "last_contacted_via_sales_activity": null, - "completed_sales_sequences": null, - "active_sales_sequences": null, - "web_form_ids": null, - "open_deals_count": null, - "last_assigned_at": null, - "tags": [], - "facebook": null, - "twitter": null, - "linkedin": null, - "is_deleted": false, - "team_user_ids": null, - "external_id": null, - "work_email": null, - "subscription_status": 1, - "subscription_types": "2;3;4;5;1", - "customer_fit": 0, - "record_type_id": "71012139284", - "whatsapp_subscription_status": 2, - "sms_subscription_status": 2, - "last_seen_chat": null, - "first_seen_chat": null, - "locale": null, - "total_sessions": null, - "phone_numbers": [] - } - }, - "https://domain-rudder.myfreshworks.com/crm/sales/api/lists": { - "lists": [ - { - "id": 70000053624, - "name": "Sample list" - }, - { - "id": 70000056575, - "name": "list1-test" - }, - { - "id": 70000058627, - "name": "Jio 5G Group" - }, - { - "id": 70000058628, - "name": "Airtel 5G Group" - }, - { - "id": 70000059716, - "name": "Voda 5G" - } - ], - "meta": { - "total_pages": 1, - "total": 5 - } - }, - "https://domain-rudder.myfreshworks.com/crm/sales/api/selector/lifecycle_stages": { - "lifecycle_stages": [ - { - "id": 71012139274, - "name": "Sales Qualified Lead start", - "position": 1, - "disabled": false, - "default": true, - "type": "Sales Qualified Lead", - "contact_status_ids": [70000697858, 70000697859, 70000697860] - }, - { - "id": 71012139273, - "name": "Lead", - "position": 2, - "disabled": false, - "default": true, - "type": "Lead", - "contact_status_ids": [70000697854, 70000697855, 70000697856, 70000697857] - }, - { - "id": 71012806409, - "name": "final Customer", - "position": 3, - "disabled": false, - "default": false, - "type": "Custom", - "contact_status_ids": [70000736543, 70000736544] - }, - { - "id": 71012139275, - "name": "Customer", - "position": 4, - "disabled": false, - "default": true, - "type": "Customer", - "contact_status_ids": [70000697861, 70000697862] - } - ] - } -} diff --git a/test/__mocks__/data/freshsales/response.json b/test/__mocks__/data/freshsales/response.json deleted file mode 100644 index 3b0d0af192..0000000000 --- a/test/__mocks__/data/freshsales/response.json +++ /dev/null @@ -1,430 +0,0 @@ -{ - "https://domain-rudder.myfreshworks.com/crm/sales/api/sales_accounts/upsert": { - "sales_account": { - "id": 70003771396, - "name": "postman2.0", - "address": "Red Colony", - "city": "Pune", - "state": "Goa", - "zipcode": null, - "country": null, - "number_of_employees": 11, - "annual_revenue": 1000, - "website": null, - "owner_id": null, - "phone": "919191919191", - "open_deals_amount": null, - "open_deals_count": null, - "won_deals_amount": null, - "won_deals_count": null, - "last_contacted": null, - "last_contacted_mode": null, - "facebook": null, - "twitter": null, - "linkedin": null, - "links": { - "conversations": "/crm/sales/sales_accounts/70003771396/conversations/all?include=email_conversation_recipients%2Ctargetable%2Cphone_number%2Cphone_caller%2Cnote%2Cuser&per_page=3", - "document_associations": "/crm/sales/sales_accounts/70003771396/document_associations", - "notes": "/crm/sales/sales_accounts/70003771396/notes?include=creater", - "tasks": "/crm/sales/sales_accounts/70003771396/tasks?include=creater,owner,updater,targetable,users,task_type", - "appointments": "/crm/sales/sales_accounts/70003771396/appointments?include=creater,owner,updater,targetable,appointment_attendees,conference,note" - }, - "custom_field": {}, - "created_at": "2022-08-17T04:15:00-04:00", - "updated_at": "2022-08-24T06:03:31-04:00", - "avatar": null, - "parent_sales_account_id": null, - "recent_note": null, - "last_contacted_via_sales_activity": null, - "last_contacted_sales_activity_mode": null, - "completed_sales_sequences": null, - "active_sales_sequences": null, - "last_assigned_at": null, - "tags": [], - "is_deleted": false, - "team_user_ids": null, - "has_connections": false, - "record_type_id": "71010794477" - } - }, - "https://domain-rudder.myfreshworks.com/crm/sales/api/contacts/upsert?include=sales_accounts": { - "contact": { - "id": 70042006456, - "first_name": "Rk", - "last_name": "Mishra", - "display_name": "Rk Mishra", - "avatar": null, - "job_title": null, - "city": null, - "state": null, - "zipcode": null, - "country": null, - "email": "testuser@google.com", - "emails": [ - { - "id": 70037311213, - "value": "testuser@google.com", - "is_primary": true, - "label": null, - "_destroy": false - } - ], - "time_zone": "IST", - "work_number": "9988776655", - "mobile_number": "19265559504", - "address": null, - "last_seen": null, - "lead_score": 26, - "last_contacted": null, - "open_deals_amount": null, - "won_deals_amount": null, - "links": { - "conversations": "/crm/sales/contacts/70042006456/conversations/all?include=email_conversation_recipients%2Ctargetable%2Cphone_number%2Cphone_caller%2Cnote%2Cuser&per_page=3", - "timeline_feeds": "/crm/sales/contacts/70042006456/timeline_feeds", - "document_associations": "/crm/sales/contacts/70042006456/document_associations", - "notes": "/crm/sales/contacts/70042006456/notes?include=creater", - "tasks": "/crm/sales/contacts/70042006456/tasks?include=creater,owner,updater,targetable,users,task_type", - "appointments": "/crm/sales/contacts/70042006456/appointments?include=creater,owner,updater,targetable,appointment_attendees,conference,note", - "reminders": "/crm/sales/contacts/70042006456/reminders?include=creater,owner,updater,targetable", - "duplicates": "/crm/sales/contacts/70042006456/duplicates", - "connections": "/crm/sales/contacts/70042006456/connections" - }, - "last_contacted_sales_activity_mode": null, - "custom_field": {}, - "created_at": "2022-08-09T03:22:12-04:00", - "updated_at": "2022-08-30T00:33:27-04:00", - "keyword": "drilling", - "medium": "facebook", - "last_contacted_mode": null, - "recent_note": null, - "won_deals_count": null, - "last_contacted_via_sales_activity": null, - "completed_sales_sequences": null, - "active_sales_sequences": null, - "web_form_ids": null, - "open_deals_count": null, - "last_assigned_at": "2022-08-29T05:51:24-04:00", - "tags": [], - "facebook": null, - "twitter": null, - "linkedin": null, - "is_deleted": false, - "team_user_ids": null, - "external_id": "ea5cfab2-3961-4d8a-8187-3d1858c99099", - "work_email": null, - "subscription_status": 1, - "subscription_types": "2;3;4;5;1", - "customer_fit": 2, - "record_type_id": "71010794476", - "whatsapp_subscription_status": 2, - "sms_subscription_status": 2, - "last_seen_chat": null, - "first_seen_chat": null, - "locale": null, - "total_sessions": null, - "phone_numbers": [], - "sales_accounts": [ - { - "partial": true, - "id": 70003771198, - "name": "div-quer", - "avatar": null, - "website": null, - "last_contacted": null, - "record_type_id": "71010794477", - "is_primary": true - }, - { - "partial": true, - "id": 70003825177, - "name": "BisleriGroup", - "avatar": null, - "website": null, - "last_contacted": null, - "record_type_id": "71010794477", - "is_primary": false - } - ] - } - }, - "https://domain-rudder.myfreshworks.com/crm/sales/api/selector/sales_activity_types": { - "sales_activity_types": [ - { - "partial": true, - "id": 70000666879, - "name": "own-calender", - "internal_name": "cappointment", - "show_in_conversation": true, - "position": 1, - "is_default": false, - "is_checkedin": false - }, - { - "partial": true, - "id": 70000663932, - "name": "fb-support", - "internal_name": "facebook", - "show_in_conversation": true, - "position": 2, - "is_default": false, - "is_checkedin": false - }, - { - "partial": true, - "id": 70000663746, - "name": "twitter sales", - "internal_name": "twitter", - "show_in_conversation": true, - "position": 3, - "is_default": false, - "is_checkedin": false - }, - { - "partial": true, - "id": 70000646396, - "name": "linked sales", - "internal_name": "linkedin", - "show_in_conversation": true, - "position": 4, - "is_default": false, - "is_checkedin": false - }, - { - "partial": true, - "id": 70000642330, - "name": "facebook sales", - "internal_name": "facebook", - "show_in_conversation": true, - "position": 5, - "is_default": false, - "is_checkedin": false - }, - { - "partial": true, - "id": 70000612897, - "name": "Chat", - "internal_name": "chat", - "show_in_conversation": true, - "position": 6, - "is_default": true, - "is_checkedin": false - }, - { - "partial": true, - "id": 70000612898, - "name": "Phone", - "internal_name": "phone", - "show_in_conversation": true, - "position": 7, - "is_default": true, - "is_checkedin": false - }, - { - "partial": true, - "id": 70000612899, - "name": "Meeting", - "internal_name": "appointment", - "show_in_conversation": true, - "position": 8, - "is_default": true, - "is_checkedin": true - }, - { - "partial": true, - "id": 70000612900, - "name": "Task", - "internal_name": "task", - "show_in_conversation": true, - "position": 9, - "is_default": true, - "is_checkedin": false - }, - { - "partial": true, - "id": 70000612901, - "name": "Email", - "internal_name": "email", - "show_in_conversation": true, - "position": 10, - "is_default": true, - "is_checkedin": false - }, - { - "partial": true, - "id": 70000612902, - "name": "SMS Outgoing", - "internal_name": "sms_outgoing", - "show_in_conversation": true, - "position": 11, - "is_default": true, - "is_checkedin": false - }, - { - "partial": true, - "id": 70000612903, - "name": "Reminder", - "internal_name": "reminder", - "show_in_conversation": false, - "position": 12, - "is_default": true, - "is_checkedin": false - }, - { - "partial": true, - "id": 70000612904, - "name": "SMS Incoming", - "internal_name": "sms_incoming", - "show_in_conversation": true, - "position": 13, - "is_default": true, - "is_checkedin": false - } - ] - }, - "https://domain-rudder.myfreshworks.com/crm/sales/api/contacts/upsert": { - "contact": { - "id": 70054866612, - "first_name": null, - "last_name": null, - "display_name": "jamessampleton120@gmail.com", - "avatar": null, - "job_title": null, - "city": null, - "state": null, - "zipcode": null, - "country": null, - "email": "jamessampleton120@gmail.com", - "emails": [ - { - "id": 70047409219, - "value": "jamessampleton120@gmail.com", - "is_primary": true, - "label": null, - "_destroy": false - } - ], - "time_zone": null, - "work_number": null, - "mobile_number": null, - "address": null, - "last_seen": null, - "lead_score": 0, - "last_contacted": null, - "open_deals_amount": null, - "won_deals_amount": null, - "links": { - "conversations": "/crm/sales/contacts/70054866612/conversations/all?include=email_conversation_recipients%2Ctargetable%2Cphone_number%2Cphone_caller%2Cnote%2Cuser&per_page=3", - "timeline_feeds": "/crm/sales/contacts/70054866612/timeline_feeds", - "document_associations": "/crm/sales/contacts/70054866612/document_associations", - "notes": "/crm/sales/contacts/70054866612/notes?include=creater", - "tasks": "/crm/sales/contacts/70054866612/tasks?include=creater,owner,updater,targetable,users,task_type", - "appointments": "/crm/sales/contacts/70054866612/appointments?include=creater,owner,updater,targetable,appointment_attendees,conference,note", - "reminders": "/crm/sales/contacts/70054866612/reminders?include=creater,owner,updater,targetable", - "duplicates": "/crm/sales/contacts/70054866612/duplicates", - "connections": "/crm/sales/contacts/70054866612/connections" - }, - "last_contacted_sales_activity_mode": null, - "custom_field": {}, - "created_at": "2022-10-11T08:42:15-04:00", - "updated_at": "2022-10-11T08:42:15-04:00", - "keyword": null, - "medium": null, - "last_contacted_mode": null, - "recent_note": null, - "won_deals_count": null, - "last_contacted_via_sales_activity": null, - "completed_sales_sequences": null, - "active_sales_sequences": null, - "web_form_ids": null, - "open_deals_count": null, - "last_assigned_at": null, - "tags": [], - "facebook": null, - "twitter": null, - "linkedin": null, - "is_deleted": false, - "team_user_ids": null, - "external_id": null, - "work_email": null, - "subscription_status": 1, - "subscription_types": "2;3;4;5;1", - "customer_fit": 0, - "record_type_id": "71012139284", - "whatsapp_subscription_status": 2, - "sms_subscription_status": 2, - "last_seen_chat": null, - "first_seen_chat": null, - "locale": null, - "total_sessions": null, - "phone_numbers": [] - } - }, - "https://domain-rudder.myfreshworks.com/crm/sales/api/lists": { - "lists": [ - { - "id": 70000053624, - "name": "Sample list" - }, - { - "id": 70000056575, - "name": "list1-test" - }, - { - "id": 70000058627, - "name": "Jio 5G Group" - }, - { - "id": 70000058628, - "name": "Airtel 5G Group" - }, - { - "id": 70000059716, - "name": "Voda 5G" - } - ], - "meta": { - "total_pages": 1, - "total": 5 - } - }, - "https://domain-rudder.myfreshworks.com/crm/sales/api/selector/lifecycle_stages": { - "lifecycle_stages": [ - { - "id": 71012139274, - "name": "Sales Qualified Lead start", - "position": 1, - "disabled": false, - "default": true, - "type": "Sales Qualified Lead", - "contact_status_ids": [70000697858, 70000697859, 70000697860] - }, - { - "id": 71012139273, - "name": "Lead", - "position": 2, - "disabled": false, - "default": true, - "type": "Lead", - "contact_status_ids": [70000697854, 70000697855, 70000697856, 70000697857] - }, - { - "id": 71012806409, - "name": "final Customer", - "position": 3, - "disabled": false, - "default": false, - "type": "Custom", - "contact_status_ids": [70000736543, 70000736544] - }, - { - "id": 71012139275, - "name": "Customer", - "position": 4, - "disabled": false, - "default": true, - "type": "Customer", - "contact_status_ids": [70000697861, 70000697862] - } - ] - } -} diff --git a/test/__mocks__/delighted.mock.js b/test/__mocks__/delighted.mock.js deleted file mode 100644 index a1a70c2983..0000000000 --- a/test/__mocks__/delighted.mock.js +++ /dev/null @@ -1,12 +0,0 @@ -const delightedGetRequestHandler = options => { - const { params } = options; - if (params.email === "identified_user@email.com") { - return Promise.resolve({ data: ["user data"], status: 200 }); - } - if (params.email === "unidentified_user@email.com") { - return Promise.resolve({ data: [], status: 200 }); - } - return Promise.resolve({ data: [], status: 200 }); -}; - -module.exports = { delightedGetRequestHandler }; diff --git a/test/__mocks__/drip.mock.js b/test/__mocks__/drip.mock.js deleted file mode 100644 index fd25b4b1d5..0000000000 --- a/test/__mocks__/drip.mock.js +++ /dev/null @@ -1,8 +0,0 @@ -const dripPostRequestHandler = (url, payload) => { - if (url === "https://api.getdrip.com/v2/1809802/subscriber") - return Promise.resolve({ data: payload, status: 200 }); - - return Promise.resolve({ data: payload, status: 200 }); -}; - -module.exports = { dripPostRequestHandler }; diff --git a/test/__mocks__/freshmarketer.mock.js b/test/__mocks__/freshmarketer.mock.js deleted file mode 100644 index 607ce7130d..0000000000 --- a/test/__mocks__/freshmarketer.mock.js +++ /dev/null @@ -1,52 +0,0 @@ -const fs = require("fs"); -const path = require("path"); - -const urlDirectoryMap = { - "myfreshworks.com/crm/sales/api": "freshmarketer" -}; - -const getData = url => { - let directory = "freshmarketer"; - Object.keys(urlDirectoryMap).forEach(key => { - if (url.includes(key)) { - directory = urlDirectoryMap[key]; - } - }); - if (directory) { - const dataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${directory}/response.json`) - ); - const data = JSON.parse(dataFile); - return data[url]; - } - return {}; -}; - -const freshmarketerPostRequestHandler = (url, payload) => { - const mockData = getData(url); - if (mockData) { - return { - data: mockData, - status: 200 - }; - } - return new Promise((resolve, reject) => { - resolve({ error: "Request failed", status: 404 }); - }); -}; - -const freshmarketerGetRequestHandler = url => { - const mockData = getData(url); - if (mockData) { - //resolve with status 200 - return Promise.resolve({ data: mockData, status: 200 }); - } - return new Promise((resolve, reject) => { - resolve({ error: "Request failed", status: 404 }); - }); -}; - -module.exports = { - freshmarketerPostRequestHandler, - freshmarketerGetRequestHandler -}; diff --git a/test/__mocks__/freshsales.mock.js b/test/__mocks__/freshsales.mock.js deleted file mode 100644 index edbf2de43f..0000000000 --- a/test/__mocks__/freshsales.mock.js +++ /dev/null @@ -1,52 +0,0 @@ -const fs = require("fs"); -const path = require("path"); - -const urlDirectoryMap = { - "myfreshworks.com/crm/sales/api": "freshsales" -}; - -const getData = url => { - let directory = "freshsales"; - Object.keys(urlDirectoryMap).forEach(key => { - if (url.includes(key)) { - directory = urlDirectoryMap[key]; - } - }); - if (directory) { - const dataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${directory}/response.json`) - ); - const data = JSON.parse(dataFile); - return data[url]; - } - return {}; -}; - -const freshsalesPostRequestHandler = (url, payload) => { - const mockData = getData(url); - if (mockData) { - return { - data: mockData, - status: 200 - }; - } - return new Promise((resolve, reject) => { - resolve({ error: "Request failed", status: 404 }); - }); -}; - -const freshsalesGetRequestHandler = url => { - const mockData = getData(url); - if (mockData) { - //resolve with status 200 - return Promise.resolve({ data: mockData, status: 200 }); - } - return new Promise((resolve, reject) => { - resolve({ error: "Request failed", status: 404 }); - }); -}; - -module.exports = { - freshsalesPostRequestHandler, - freshsalesGetRequestHandler -}; diff --git a/test/__tests__/clickup.test.js b/test/__tests__/clickup.test.js deleted file mode 100644 index 8890d6050b..0000000000 --- a/test/__tests__/clickup.test.js +++ /dev/null @@ -1,47 +0,0 @@ -const integration = "clickup"; -const name = "ClickUp"; - -const fs = require("fs"); -const path = require("path"); - -const version = "v0"; - -const transformer = require(`../../src/${version}/destinations/${integration}/transform`); - -// Processor Test files -const testDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}.json`) -); -const testData = JSON.parse(testDataFile); - -// Router Test files -const inputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_input.json`) -); -const outputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_output.json`) -); -const inputRouterData = JSON.parse(inputRouterDataFile); -const expectedRouterData = JSON.parse(outputRouterDataFile); - -describe(`${name} Tests`, () => { - describe("Processor", () => { - testData.forEach(async (dataPoint, index) => { - it(`${index}. ${integration} - ${dataPoint.description}`, async () => { - try { - const output = await transformer.process(dataPoint.input); - expect(output).toEqual(dataPoint.output); - } catch (error) { - expect(error.message).toEqual(dataPoint.output.error); - } - }); - }); - }); - - describe("Router", () => { - it("Payload", async () => { - const routerOutput = await transformer.processRouterDest(inputRouterData); - expect(routerOutput).toEqual(expectedRouterData); - }); - }); -}); diff --git a/test/__tests__/custify.test.js b/test/__tests__/custify.test.js deleted file mode 100644 index a4c55a5504..0000000000 --- a/test/__tests__/custify.test.js +++ /dev/null @@ -1,47 +0,0 @@ -const integration = "custify"; -const name = "Custify"; - -const fs = require("fs"); -const path = require("path"); - -const version = "v0"; - -const transformer = require(`../../src/${version}/destinations/${integration}/transform`); - -// Processor Test files -const testDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}.json`) -); -const testData = JSON.parse(testDataFile); - -// Router Test files -const inputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_input.json`) -); -const outputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_output.json`) -); -const inputRouterData = JSON.parse(inputRouterDataFile); -const expectedRouterData = JSON.parse(outputRouterDataFile); - -describe(`${name} Tests`, () => { - describe("Processor", () => { - testData.forEach(async (dataPoint, index) => { - it(`${index}. ${integration} - ${dataPoint.description}`, async () => { - try { - const output = await transformer.process(dataPoint.input); - expect(output).toEqual(dataPoint.output); - } catch (error) { - expect(error.message).toEqual(dataPoint.output.error); - } - }); - }); - }); - - describe("Router", () => { - it("Payload", async () => { - const routerOutput = await transformer.processRouterDest(inputRouterData); - expect(routerOutput).toEqual(expectedRouterData); - }); - }); -}); diff --git a/test/__tests__/data/clickup.json b/test/__tests__/data/clickup.json deleted file mode 100644 index 5bd246004a..0000000000 --- a/test/__tests__/data/clickup.json +++ /dev/null @@ -1,513 +0,0 @@ -[ - { - "description": "Invalid priority", - "input": { - "destination": { - "Config": { - "apiToken": "pk_123", - "listId": "correctListId123" - }, - "ID": "clickup-1234" - }, - "message": { - "type": "track", - "event": "Product Viewed", - "properties": { "priority": 0 }, - "context": {}, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c" - } - }, - "output": { - "error": "Invalid value specified for priority. Value must be Integer and in range \"[1,4]\"" - } - }, - { - "description": "Custom field: Invalid phone number", - "input": { - "destination": { - "Config": { - "apiToken": "pk_123", - "listId": "correctListId123", - "keyToCustomFieldName": [ - { - "from": "phone", - "to": "Phone Number" - } - ] - }, - "ID": "clickup-1234" - }, - "message": { - "type": "track", - "event": "Product Viewed", - "properties": { "phone": "9999999999" }, - "context": {}, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c" - } - }, - "output": { - "error": "The provided phone number is invalid" - } - }, - { - "description": "Custom field: Invalid email", - "input": { - "destination": { - "Config": { - "apiToken": "pk_123", - "listId": "correctListId123", - "keyToCustomFieldName": [ - { - "from": "email", - "to": "Email" - } - ] - }, - "ID": "clickup-1234" - }, - "message": { - "type": "track", - "event": "Product Viewed", - "properties": { "email": "test.com" }, - "context": {}, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c" - } - }, - "output": { - "error": "The provided email is invalid" - } - }, - { - "description": "Custom field: Invalid url", - "input": { - "destination": { - "Config": { - "apiToken": "pk_123", - "listId": "correctListId123", - "keyToCustomFieldName": [ - { - "from": "url", - "to": "Url" - } - ] - }, - "ID": "clickup-1234" - }, - "message": { - "type": "track", - "event": "Product Viewed", - "properties": { "url": "www.test.com" }, - "context": {}, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c" - } - }, - "output": { - "error": "The provided url is invalid" - } - }, - { - "description": "Custom field: Invalid location latitude", - "input": { - "destination": { - "Config": { - "apiToken": "pk_123", - "listId": "correctListId123", - "keyToCustomFieldName": [ - { - "from": "location", - "to": "Location" - } - ] - }, - "ID": "clickup-1234" - }, - "message": { - "type": "track", - "event": "Product Viewed", - "properties": { - "location": { - "lat": -100, - "lng": 124, - "formattedAddress": "Gold Coast QLD, Australia" - } - }, - "context": {}, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c" - } - }, - "output": { - "error": "Invalid value specified for latitude. Latitude must be in range \"[-90, 90]\"" - } - }, - { - "description": "Custom field: Invalid rating", - "input": { - "destination": { - "Config": { - "apiToken": "pk_123", - "listId": "correctListId123", - "keyToCustomFieldName": [ - { - "from": "rating", - "to": "Rating" - } - ] - }, - "ID": "clickup-1234" - }, - "message": { - "type": "track", - "event": "Product Viewed", - "properties": { "rating": "7" }, - "context": {}, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c" - } - }, - "output": { - "error": "Invalid value specified for rating. Value must be in range \"[0,5]\"" - } - }, - { - "description": "Creating task with valid custom fields values", - "input": { - "destination": { - "Config": { - "apiToken": "pk_123", - "listId": "correctListId123", - "keyToCustomFieldName": [ - { - "from": "industry", - "to": "Industry" - }, - { - "from": "Payment Status", - "to": "Payment Status" - }, - { - "from": "labelKey", - "to": "Labels" - }, - { - "from": "locationKey", - "to": "Location" - }, - { - "from": "phone", - "to": "Phone Number" - }, - { - "from": "email", - "to": "Email" - }, - { - "from": "url", - "to": "Url" - }, - { - "from": "rating", - "to": "Rating" - }, - { - "from": "plan", - "to": "Plan" - }, - { - "from": "contactTitle", - "to": "Contact Title" - }, - { - "from": "date", - "to": "Date" - } - ] - }, - "ID": "clickup-1234" - }, - "message": { - "type": "track", - "event": "Product Viewed", - "properties": { - "description": "Creating task with valid custom fields values", - "tags": ["testing", "custom fields"], - "timeEstimate": 10800000, - "status": "Ready", - "priority": 1, - "dueDate": "2022-02-25T13:39:21.032Z", - "includeDueDateTime": true, - "startDate": "2022-01-20T13:39:21.032Z", - "includeStartDateTime": "true", - "notifyAll": false, - "industry": "Retail", - "Payment Status": "Pending", - "labelKey": ["option 1", "option 2", "option 3"], - "locationKey": { - "lat": -20, - "lng": 124, - "formattedAddress": "Gold Coast QLD, Australia" - }, - "phone": "+12233445567", - "email": "test123@example.com", - "url": "https://www.rudderstack.com/", - "rating": 3, - "plan": "Business", - "contactTitle": "VP of Operations", - "date": "2022-02-25T13:39:21.032Z" - }, - "context": {}, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.clickup.com/api/v2/list/correctListId123/task", - "headers": { - "Content-Type": "application/json", - "Authorization": "pk_123" - }, - "params": {}, - "body": { - "JSON": { - "name": "Product Viewed", - "description": "Creating task with valid custom fields values", - "tags": ["testing", "custom fields"], - "time_estimate": 10800000, - "status": "Ready", - "priority": 1, - "due_date": 1645796361032, - "due_date_time": true, - "start_date": 1642685961032, - "start_date_time": "true", - "notify_all": false, - "custom_fields": [ - { - "id": "a5f5044a-cbad-4caf-bcbb-4cd32bd8db7c", - "value": "c7f9b6f5-cd98-4609-af10-68a8710cc1bf" - }, - { - "id": "22eaffee-ffec-4c3b-bdae-56e69d55eecd", - "value": "7afcb6fb-cec8-41d8-bf0c-039a9db28460" - }, - { - "id": "19d3ac4e-2b1e-4569-b33e-ff86c7d94d6e", - "value": [ - "32c81c1c-cf53-4829-92f5-0f0270d27a45", - "7e24f329-9dd9-4e68-b426-2c70af6f9347" - ] - }, - { - "id": "ea6c1e48-2abf-4328-b228-79c213e147c8", - "value": { - "location": { - "lat": -20, - "lng": 124 - }, - "formatted_address": "Gold Coast QLD, Australia" - } - }, - { - "id": "c9b83d91-b979-4b34-b4bd-88bf9cf2b9a6", - "value": "+12233445567" - }, - { - "id": "ebe825fb-92de-41ce-a29c-25018da039b4", - "value": "test123@example.com" - }, - { - "id": "b01b32fd-94d3-43e6-9f31-2c855ff169cd", - "value": "https://www.rudderstack.com/" - }, - { - "id": "f431cda3-a575-4a05-ba8d-583d9b6cb2df", - "value": 3 - }, - { - "id": "4b7a29be-e261-4340-8f3f-e6de838473e5", - "value": "c5032049-8c05-44e9-a000-3a071d457b8f" - }, - { - "id": "4bfebc00-9d4a-40d1-aef8-5a87b610186c", - "value": "VP of Operations" - }, - { - "id": "666f74bf-6d87-41f3-8735-ccf0efe066dd", - "value": 1645796361032 - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "Creating task with assignees", - "input": { - "destination": { - "Config": { - "apiToken": "pk_123", - "listId": "correctListId123" - }, - "ID": "clickup-1234" - }, - "message": { - "type": "track", - "event": "Product Viewed", - "properties": { - "taskName": "Transformer Testing" - }, - "context": { - "externalId": [ - { - "type": "clickUpAssigneeId", - "id": 61205104 - }, - { - "type": "clickUpAssigneeId", - "id": 61217234 - }, - { - "type": "clickUpAssigneeId", - "id": 61228575 - } - ] - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.clickup.com/api/v2/list/correctListId123/task", - "headers": { - "Content-Type": "application/json", - "Authorization": "pk_123" - }, - "params": {}, - "body": { - "JSON": { - "name": "Transformer Testing", - "assignees": [61205104, 61217234, 61228575] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "Event filtering : Sending non whitelisted event when some events are whitelisted", - "input": { - "destination": { - "Config": { - "apiToken": "pk_123", - "listId": "correctListId123", - "whitelistedEvents": [ - { "eventName": "Anonymous Page Visit" }, - { "eventName": "Product Viewed" }, - { "eventName": "" } - ] - }, - "ID": "clickup-1234" - }, - "message": { - "type": "track", - "event": "Credit Card Added", - "context": {}, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c" - } - }, - "output": { - "error": "The event was discarded as it was not allow listed in the destination configuration" - } - }, - { - "description": "Event filtering : No event is whitelisted", - "input": { - "destination": { - "Config": { - "apiToken": "pk_123", - "listId": "correctListId123", - "whitelistedEvents": [{ "eventName": "" }, { "eventName": "" }, { "eventName": "" }] - }, - "ID": "clickup-1234" - }, - "message": { - "type": "track", - "event": "Credit Card Added", - "context": {}, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c" - } - }, - "output": { - "error": "The event was discarded as it was not allow listed in the destination configuration" - } - }, - { - "description": "Creating task using listId from externalId array", - "input": { - "destination": { - "Config": { - "apiToken": "pk_123", - "listId": "correctListId123" - }, - "ID": "clickup-1234" - }, - "message": { - "type": "track", - "event": "anonymous page visit", - "context": { - "externalId": [{ "type": "clickUpListId", "id": "correctListId456" }] - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.clickup.com/api/v2/list/correctListId456/task", - "headers": { - "Content-Type": "application/json", - "Authorization": "pk_123" - }, - "params": {}, - "body": { - "JSON": { - "name": "anonymous page visit" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - } -] diff --git a/test/__tests__/data/clickup_router_input.json b/test/__tests__/data/clickup_router_input.json deleted file mode 100644 index 1393310371..0000000000 --- a/test/__tests__/data/clickup_router_input.json +++ /dev/null @@ -1,192 +0,0 @@ -[ - { - "description": "Creating task using listId from externalId array", - "destination": { - "Config": { - "apiToken": "pk_123", - "listId": "correctListId123" - }, - "ID": "clickup-1234" - }, - "metadata": { - "jobId": 1 - }, - "message": { - "type": "track", - "event": "anonymous page visit", - "context": { - "externalId": [{ "type": "clickUpListId", "id": "correctListId456" }] - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c" - } - }, - { - "description": "Creating task with assignees", - "destination": { - "Config": { - "apiToken": "pk_123", - "listId": "correctListId123" - }, - "ID": "clickup-1234" - }, - "metadata": { - "jobId": 2 - }, - "message": { - "type": "track", - "event": "Product Viewed", - "properties": { - "taskName": "Transformer Testing" - }, - "context": { - "externalId": [ - { - "type": "clickUpAssigneeId", - "id": 61205104 - }, - { - "type": "clickUpAssigneeId", - "id": 61217234 - }, - { - "type": "clickUpAssigneeId", - "id": 61228575 - } - ] - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c" - } - }, - { - "description": "Creating task with valid custom fields values", - "destination": { - "Config": { - "apiToken": "pk_123", - "listId": "correctListId123", - "keyToCustomFieldName": [ - { - "from": "industry", - "to": "Industry" - }, - { - "from": "Payment Status", - "to": "Payment Status" - }, - { - "from": "labelKey", - "to": "Labels" - }, - { - "from": "locationKey", - "to": "Location" - }, - { - "from": "phone", - "to": "Phone Number" - }, - { - "from": "email", - "to": "Email" - }, - { - "from": "url", - "to": "Url" - }, - { - "from": "rating", - "to": "Rating" - }, - { - "from": "plan", - "to": "Plan" - }, - { - "from": "contactTitle", - "to": "Contact Title" - }, - { - "from": "date", - "to": "Date" - } - ] - }, - "ID": "clickup-1234" - }, - "metadata": { - "jobId": 3 - }, - "message": { - "type": "track", - "event": "Product Viewed", - "properties": { - "description": "Creating task with valid custom fields values", - "tags": ["testing", "custom fields"], - "timeEstimate": 10800000, - "status": "Ready", - "priority": 1, - "dueDate": "2022-02-25T13:39:21.032Z", - "includeDueDateTime": true, - "startDate": "2022-01-20T13:39:21.032Z", - "includeStartDateTime": "true", - "notifyAll": false, - "industry": "Retail", - "Payment Status": "Pending", - "labelKey": ["option 1", "option 2", "option 3"], - "locationKey": { - "lat": -20, - "lng": 124, - "formattedAddress": "Gold Coast QLD, Australia" - }, - "phone": "+12233445567", - "email": "test123@example.com", - "url": "https://www.rudderstack.com/", - "rating": 3, - "plan": "Business", - "contactTitle": "VP of Operations", - "date": "2022-02-25T13:39:21.032Z" - }, - "context": {}, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c" - } - }, - { - "description": "Custom field: Invalid location latitude", - "destination": { - "Config": { - "apiToken": "pk_123", - "listId": "correctListId123", - "keyToCustomFieldName": [ - { - "from": "location", - "to": "Location" - } - ] - }, - "ID": "clickup-1234" - }, - "metadata": { - "jobId": 4 - }, - "message": { - "type": "track", - "event": "Product Viewed", - "properties": { - "location": { - "lat": -100, - "lng": 124, - "formattedAddress": "Gold Coast QLD, Australia" - } - }, - "context": {}, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c" - } - } -] diff --git a/test/__tests__/data/clickup_router_output.json b/test/__tests__/data/clickup_router_output.json deleted file mode 100644 index 467bbec962..0000000000 --- a/test/__tests__/data/clickup_router_output.json +++ /dev/null @@ -1,249 +0,0 @@ -[ - { - "batched": false, - "batchedRequest": { - "body": { - "FORM": {}, - "JSON": { - "name": "anonymous page visit" - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://api.clickup.com/api/v2/list/correctListId456/task", - "files": {}, - "headers": { - "Authorization": "pk_123", - "Content-Type": "application/json" - }, - "method": "POST", - "params": {}, - "type": "REST", - "version": "1" - }, - "destination": { - "Config": { - "apiToken": "pk_123", - "listId": "correctListId123" - }, - "ID": "clickup-1234" - }, - "metadata": [ - { - "jobId": 1 - } - ], - "statusCode": 200 - }, - { - "batched": false, - "batchedRequest": { - "body": { - "FORM": {}, - "JSON": { - "assignees": [61205104, 61217234, 61228575], - "name": "Transformer Testing" - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://api.clickup.com/api/v2/list/correctListId123/task", - "files": {}, - "headers": { - "Authorization": "pk_123", - "Content-Type": "application/json" - }, - "method": "POST", - "params": {}, - "type": "REST", - "version": "1" - }, - "destination": { - "Config": { - "apiToken": "pk_123", - "listId": "correctListId123" - }, - "ID": "clickup-1234" - }, - "metadata": [ - { - "jobId": 2 - } - ], - "statusCode": 200 - }, - { - "batched": false, - "batchedRequest": { - "body": { - "FORM": {}, - "JSON": { - "custom_fields": [ - { - "id": "a5f5044a-cbad-4caf-bcbb-4cd32bd8db7c", - "value": "c7f9b6f5-cd98-4609-af10-68a8710cc1bf" - }, - { - "id": "22eaffee-ffec-4c3b-bdae-56e69d55eecd", - "value": "7afcb6fb-cec8-41d8-bf0c-039a9db28460" - }, - { - "id": "19d3ac4e-2b1e-4569-b33e-ff86c7d94d6e", - "value": [ - "32c81c1c-cf53-4829-92f5-0f0270d27a45", - "7e24f329-9dd9-4e68-b426-2c70af6f9347" - ] - }, - { - "id": "ea6c1e48-2abf-4328-b228-79c213e147c8", - "value": { - "formatted_address": "Gold Coast QLD, Australia", - "location": { - "lat": -20, - "lng": 124 - } - } - }, - { - "id": "c9b83d91-b979-4b34-b4bd-88bf9cf2b9a6", - "value": "+12233445567" - }, - { - "id": "ebe825fb-92de-41ce-a29c-25018da039b4", - "value": "test123@example.com" - }, - { - "id": "b01b32fd-94d3-43e6-9f31-2c855ff169cd", - "value": "https://www.rudderstack.com/" - }, - { - "id": "f431cda3-a575-4a05-ba8d-583d9b6cb2df", - "value": 3 - }, - { - "id": "4b7a29be-e261-4340-8f3f-e6de838473e5", - "value": "c5032049-8c05-44e9-a000-3a071d457b8f" - }, - { - "id": "4bfebc00-9d4a-40d1-aef8-5a87b610186c", - "value": "VP of Operations" - }, - { - "id": "666f74bf-6d87-41f3-8735-ccf0efe066dd", - "value": 1645796361032 - } - ], - "name": "Product Viewed", - "description": "Creating task with valid custom fields values", - "tags": ["testing", "custom fields"], - "time_estimate": 10800000, - "status": "Ready", - "priority": 1, - "due_date": 1645796361032, - "due_date_time": true, - "start_date": 1642685961032, - "start_date_time": "true", - "notify_all": false - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://api.clickup.com/api/v2/list/correctListId123/task", - "files": {}, - "headers": { - "Authorization": "pk_123", - "Content-Type": "application/json" - }, - "method": "POST", - "params": {}, - "type": "REST", - "version": "1" - }, - "destination": { - "Config": { - "apiToken": "pk_123", - "keyToCustomFieldName": [ - { - "from": "industry", - "to": "Industry" - }, - { - "from": "Payment Status", - "to": "Payment Status" - }, - { - "from": "labelKey", - "to": "Labels" - }, - { - "from": "locationKey", - "to": "Location" - }, - { - "from": "phone", - "to": "Phone Number" - }, - { - "from": "email", - "to": "Email" - }, - { - "from": "url", - "to": "Url" - }, - { - "from": "rating", - "to": "Rating" - }, - { - "from": "plan", - "to": "Plan" - }, - { - "from": "contactTitle", - "to": "Contact Title" - }, - { - "from": "date", - "to": "Date" - } - ], - "listId": "correctListId123" - }, - "ID": "clickup-1234" - }, - "metadata": [ - { - "jobId": 3 - } - ], - "statusCode": 200 - }, - { - "destination": { - "Config": { - "apiToken": "pk_123", - "listId": "correctListId123", - "keyToCustomFieldName": [ - { - "from": "location", - "to": "Location" - } - ] - }, - "ID": "clickup-1234" - }, - "batched": false, - "error": "Invalid value specified for latitude. Latitude must be in range \"[-90, 90]\"", - "metadata": [ - { - "jobId": 4 - } - ], - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation" - }, - "statusCode": 400 - } -] diff --git a/test/__tests__/data/custify.json b/test/__tests__/data/custify.json deleted file mode 100644 index 7a83a6a0c3..0000000000 --- a/test/__tests__/data/custify.json +++ /dev/null @@ -1,511 +0,0 @@ -[ - { - "description": "Identify Call with all traits and adding to company", - "input": { - "destination": { - "Config": { - "apiKey": "apiKey_key_test_001", - "sendAnonymousId": false - }, - "ID": "custify-1234" - }, - "message": { - "type": "identify", - "userId": "user_1234", - "context": { - "traits": { - "email": "user111@gmail.com", - "firstName": "New", - "lastName": "User", - "phone": 9830311522, - "sessionCount": 23, - "unsubscribedFromEmails": false, - "unsubscribedFromCalls": false, - - "signed_up_at": "2022-04-27T13:56:13.012Z", - "custom_prop1": "custom_value1", - "custom_prop2": 123, - "custom_prop3": false, - "custom_prop4": { "test": "test" }, - "custom_prop5": [1, 3, 4], - "createdAt": "2022-04-27T13:56:13.012Z", - "company": { - "id": "company_123" - } - } - }, - "timestamp": "2022-04-27T13:56:13.012Z", - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.custify.com/people", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer apiKey_key_test_001", - "Accept": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "user_id": "user_1234", - "email": "user111@gmail.com", - "phone": 9830311522, - "session_count": 23, - "unsubscribed_from_emails": false, - "unsubscribed_from_calls": false, - "signed_up_at": "2022-04-27T13:56:13.012Z", - "custom_attributes": { - "firstName": "New", - "lastName": "User", - "sessionCount": 23, - "unsubscribedFromEmails": false, - "unsubscribedFromCalls": false, - "custom_prop1": "custom_value1", - "custom_prop2": 123, - "custom_prop3": false, - "createdAt": "2022-04-27T13:56:13.012Z" - }, - "name": "New User", - "companies": [ - { - "company_id": "company_123", - "remove": false - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "user_1234" - } - }, - { - "description": "Identify Call removing the user from company", - "input": { - "destination": { - "Config": { - "apiKey": "apiKey_key_test_001", - "sendAnonymousId": false - }, - "ID": "custify-1234" - }, - "message": { - "type": "identify", - "userId": "user_1234", - "context": { - "traits": { - "email": "user111@gmail.com", - "firstName": "New", - "lastName": "User", - "phone": 9830311522, - "sessionCount": 23, - "unsubscribedFromEmails": false, - "unsubscribedFromCalls": false, - - "signed_up_at": "2022-04-27T13:56:13.012Z", - "custom_prop1": "custom_value1", - "custom_prop2": 123, - "custom_prop3": false, - "custom_prop4": { "test": "test" }, - "custom_prop5": [1, 3, 4], - "createdAt": "2022-04-27T13:56:13.012Z", - "company": { - "id": "company_123", - "remove": true - } - } - }, - "timestamp": "2022-04-27T13:56:13.012Z", - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.custify.com/people", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer apiKey_key_test_001", - "Accept": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "user_id": "user_1234", - "email": "user111@gmail.com", - "phone": 9830311522, - "session_count": 23, - "unsubscribed_from_emails": false, - "unsubscribed_from_calls": false, - "signed_up_at": "2022-04-27T13:56:13.012Z", - "custom_attributes": { - "firstName": "New", - "lastName": "User", - "sessionCount": 23, - "unsubscribedFromEmails": false, - "unsubscribedFromCalls": false, - "custom_prop1": "custom_value1", - "custom_prop2": 123, - "custom_prop3": false, - "createdAt": "2022-04-27T13:56:13.012Z" - }, - "name": "New User", - "companies": [ - { - "company_id": "company_123", - "remove": true - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "user_1234" - } - }, - { - "description": "Identify Call without userId and email and anoymousId", - "input": { - "destination": { - "Config": { - "apiKey": "apiKey_key_test_001", - "sendAnonymousId": false - }, - "ID": "custify-1234" - }, - "message": { - "type": "identify", - "context": { - "traits": { - "firstName": "New", - "lastName": "User", - "phone": 9830311522, - "sessionCount": 23, - "unsubscribedFromEmails": false, - "unsubscribedFromCalls": false, - "signed_up_at": "2022-04-27T13:56:13.012Z", - "custom_prop1": "custom_value1", - "custom_prop2": 123, - "custom_prop3": false, - "custom_prop4": { "test": "test" }, - "custom_prop5": [1, 3, 4], - "createdAt": "2022-04-27T13:56:13.012Z", - "company": { - "id": "company_123", - "remove": true - } - } - }, - "timestamp": "2022-04-27T13:56:13.012Z", - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04" - } - }, - "output": { - "error": "Email or userId is mandatory" - } - }, - { - "description": "Identify Call without userId and email and sendAnonymous is false", - "input": { - "destination": { - "Config": { - "apiKey": "apiKey_key_test_001", - "sendAnonymousId": false - }, - "ID": "custify-1234" - }, - "message": { - "type": "identify", - "context": { - "traits": { - "firstName": "New", - "lastName": "User", - "phone": 9830311522, - "sessionCount": 23, - "unsubscribedFromEmails": false, - "unsubscribedFromCalls": false, - "signed_up_at": "2022-04-27T13:56:13.012Z", - "custom_prop1": "custom_value1", - "custom_prop2": 123, - "custom_prop3": false, - "custom_prop4": { "test": "test" }, - "custom_prop5": [1, 3, 4], - "createdAt": "2022-04-27T13:56:13.012Z", - "company": { - "id": "company_123", - "remove": true - } - } - }, - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "timestamp": "2022-04-27T13:56:13.012Z", - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04" - } - }, - "output": { - "error": "Email or userId is mandatory" - } - }, - { - "description": "Identify Call without userId and email and sendAnonymous is true", - "input": { - "destination": { - "Config": { - "apiKey": "apiKey_key_test_001", - "sendAnonymousId": true - }, - "ID": "custify-1234" - }, - "message": { - "type": "identify", - "context": { - "traits": { - "firstName": "New", - "lastName": "User", - "phone": 9830311522, - "sessionCount": 23, - "unsubscribedFromEmails": false, - "unsubscribedFromCalls": false, - "signed_up_at": "2022-04-27T13:56:13.012Z", - "custom_prop1": "custom_value1", - "custom_prop2": 123, - "custom_prop3": false, - "custom_prop4": { "test": "test" }, - "custom_prop5": [1, 3, 4], - "createdAt": "2022-04-27T13:56:13.012Z", - "company": { - "id": "company_123", - "remove": true - } - } - }, - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "timestamp": "2022-04-27T13:56:13.012Z", - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.custify.com/people", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer apiKey_key_test_001", - "Accept": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "phone": 9830311522, - "session_count": 23, - "unsubscribed_from_emails": false, - "unsubscribed_from_calls": false, - "signed_up_at": "2022-04-27T13:56:13.012Z", - "custom_attributes": { - "firstName": "New", - "lastName": "User", - "sessionCount": 23, - "unsubscribedFromEmails": false, - "unsubscribedFromCalls": false, - "custom_prop1": "custom_value1", - "custom_prop2": 123, - "custom_prop3": false, - "createdAt": "2022-04-27T13:56:13.012Z" - }, - "user_id": "bf412108-0357-4330-b119-7305e767823c", - "name": "New User", - "companies": [ - { - "company_id": "company_123", - "remove": true - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "bf412108-0357-4330-b119-7305e767823c" - } - }, - { - "description": "Track call with all properties", - "input": { - "destination": { - "Config": { - "apiKey": "apiKey_key_test_001", - "sendAnonymousId": false - }, - "ID": "custify-1234" - }, - "message": { - "type": "track", - "event": "Order Completed Version 2", - "sentAt": "2021-08-26T14:16:47.321Z", - "userId": "user_111", - "context": { - "library": { - "name": "analytics-node", - "version": "1.0.3" - }, - "traits": { - "email": "user111@gmail.com" - }, - "page": { - "url": "https://www.website.com/product/path" - } - }, - "rudderId": "70612f39-0607-45bb-8236-bf0995fde4fa", - "_metadata": { - "nodeVersion": "10.24.1" - }, - "messageId": "node-84952e4eb9c6debbda735c49d08a8b31-fcbfed6a-38cf-42c5-881c-f590f59311b1", - "properties": { - "product": "Cube", - "revenue": 9002, - "organization_id": "company_123" - }, - "originalTimestamp": "2021-08-26T14:16:47.317Z" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.custify.com/event", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer apiKey_key_test_001", - "Accept": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "user_id": "user_111", - "email": "user111@gmail.com", - "name": "Order Completed Version 2", - "created_at": "2021-08-26T14:16:47.317Z", - "company_id": "company_123", - "metadata": { - "product": "Cube", - "revenue": 9002, - "organization_id": "company_123", - "user_id": "user_111" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "user_111" - } - }, - { - "description": "Group call with all fields success scenario", - "input": { - "destination": { - "Config": { - "apiKey": "apiKey_key_test_001", - "sendAnonymousId": false - }, - "ID": "custify-1234" - }, - "message": { - "type": "group", - "userId": "user_111", - "groupId": "company_222", - "traits": { - "name": "Absolute Company", - "industry": " Absolute", - "employees": 121, - "size": 100, - "website": "www.rudder.com", - "plan": "GOLD", - "monthly_revenue": 8000, - "churned": false, - "test_att1": "test_att_val1" - }, - "context": { - "traits": { - "firstName": "Absolute", - "lastName": "User", - "phone": 9830311522, - "session_count": 23, - "signed_up_at": "2022-04-27T13:56:13.012Z", - "custom_prop1": "custom_value1", - "custom_prop2": 123, - "custom_prop3": false, - "custom_prop4": { - "test": "test" - }, - "custom_prop5": [1, 3, 4], - "createdAt": "2022-04-27T13:56:13.012Z" - }, - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-01-21T00:21:34.208Z" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.custify.com/people", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer apiKey_key_test_001", - "Accept": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "user_id": "user_111", - "phone": 9830311522, - "signed_up_at": "2020-01-21T00:21:34.208Z", - "custom_attributes": { - "firstName": "Absolute", - "lastName": "User", - "custom_prop1": "custom_value1", - "custom_prop2": 123, - "custom_prop3": false, - "createdAt": "2022-04-27T13:56:13.012Z" - }, - "name": "Absolute User", - "companies": [ - { - "company_id": "company_222", - "remove": false - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "user_111" - } - } -] diff --git a/test/__tests__/data/custify_router_input.json b/test/__tests__/data/custify_router_input.json deleted file mode 100644 index 23efc4bdad..0000000000 --- a/test/__tests__/data/custify_router_input.json +++ /dev/null @@ -1,99 +0,0 @@ -[ - { - "description": "Group callw with all parameters", - "destination": { - "Config": { - "apiKey": "apiKey_key_test_001", - "sendAnonymousId": false - }, - "ID": "custify-1234" - }, - "metadata": { - "jobId": 1 - }, - "message": { - "type": "group", - "userId": "user_111", - "groupId": "company_222", - "traits": { - "name": "Absolute Company", - "industry": " Absolute", - "employees": 121, - "size": 100, - "website": "www.rudder.com", - "plan": "GOLD", - "monthly_revenue": 8000, - "churned": false, - "test_att1": "test_att_val1" - }, - "context": { - "traits": { - "firstName": "Absolute", - "lastName": "User", - "phone": 9830311522, - "session_count": 23, - "signed_up_at": "2022-04-27T13:56:13.012Z", - "custom_prop1": "custom_value1", - "custom_prop2": 123, - "custom_prop3": false, - "custom_prop4": { - "test": "test" - }, - "custom_prop5": [1, 3, 4], - "createdAt": "2022-04-27T13:56:13.012Z" - }, - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-01-21T00:21:34.208Z" - } - }, - { - "description": "Identify with all parameters", - "destination": { - "Config": { - "apiKeyToken": "pk_123", - "listId": "correctListId123" - }, - "ID": "custify-1234" - }, - "metadata": { - "jobId": 2 - }, - "message": { - "type": "identify", - "userId": "user_1234", - "context": { - "traits": { - "email": "user111@gmail.com", - "firstName": "New", - "lastName": "User", - "phone": 9830311522, - "sessionCount": 23, - "unsubscribedFromEmails": false, - "unsubscribedFromCalls": false, - - "signed_up_at": "2022-04-27T13:56:13.012Z", - "custom_prop1": "custom_value1", - "custom_prop2": 123, - "custom_prop3": false, - "custom_prop4": { "test": "test" }, - "custom_prop5": [1, 3, 4], - "createdAt": "2022-04-27T13:56:13.012Z", - "company": { - "id": "company_123" - } - } - }, - "timestamp": "2022-04-27T13:56:13.012Z", - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c" - } -] diff --git a/test/__tests__/data/custify_router_output.json b/test/__tests__/data/custify_router_output.json deleted file mode 100644 index 17a129a4cc..0000000000 --- a/test/__tests__/data/custify_router_output.json +++ /dev/null @@ -1,119 +0,0 @@ -[ - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.custify.com/people", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer apiKey_key_test_001", - "Accept": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "user_id": "user_111", - "phone": 9830311522, - "signed_up_at": "2020-01-21T00:21:34.208Z", - "custom_attributes": { - "firstName": "Absolute", - "lastName": "User", - "custom_prop1": "custom_value1", - "custom_prop2": 123, - "custom_prop3": false, - "createdAt": "2022-04-27T13:56:13.012Z" - }, - "name": "Absolute User", - "companies": [ - { - "company_id": "company_222", - "remove": false - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "user_111" - }, - "metadata": [ - { - "jobId": 1 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "apiKey": "apiKey_key_test_001", - "sendAnonymousId": false - }, - "ID": "custify-1234" - } - }, - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.custify.com/people", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer undefined", - "Accept": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "user_id": "user_1234", - "email": "user111@gmail.com", - "phone": 9830311522, - "session_count": 23, - "unsubscribed_from_emails": false, - "unsubscribed_from_calls": false, - "signed_up_at": "2022-04-27T13:56:13.012Z", - "custom_attributes": { - "firstName": "New", - "lastName": "User", - "sessionCount": 23, - "unsubscribedFromEmails": false, - "unsubscribedFromCalls": false, - "custom_prop1": "custom_value1", - "custom_prop2": 123, - "custom_prop3": false, - "createdAt": "2022-04-27T13:56:13.012Z" - }, - "name": "New User", - "companies": [ - { - "company_id": "company_123", - "remove": false - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "user_1234" - }, - "metadata": [ - { - "jobId": 2 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "apiKeyToken": "pk_123", - "listId": "correctListId123" - }, - "ID": "custify-1234" - } - } -] diff --git a/test/__tests__/data/delighted_input.json b/test/__tests__/data/delighted_input.json deleted file mode 100644 index fa8b118387..0000000000 --- a/test/__tests__/data/delighted_input.json +++ /dev/null @@ -1,392 +0,0 @@ -[ - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "channel": "email", - "delay": 0, - "eventNamesSettings": [{ "event": "" }] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "identify", - "userId": "abc@123.com", - "traits": { - "firstName": "James", - "lastName": "Doe", - "phone": "+91237416221", - "last_sent_at": "1626698350" - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "channel": "email", - "delay": 0, - "eventNamesSettings": [{ "event": "" }] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "alias", - "previousId": "123@abc.com", - "userId": "abc@123.com", - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "channel": "email", - "delay": 0, - "eventNamesSettings": [{ "event": "Product Reviewed" }] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "track", - "userId": "identified_user@email.com", - "event": "Product Reviewed", - "properties": { - "review_id": "12345", - "product_id": "123", - "rating": 3.0, - "review_body": "Average product, expected much more." - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "channel": "email", - "delay": 0, - "eventNamesSettings": [{ "event": "Product Reviewed" }] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "track", - "userId": "unidentified_user@email.com", - "event": "Product Reviewed", - "properties": { - "review_id": "12345", - "product_id": "123", - "rating": 3.0, - "review_body": "Average product, expected much more." - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "channel": "email", - "delay": 0, - "eventNamesSettings": [{ "event": "" }] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "track", - "userId": "identified_user@email.com", - "event": "Product Reviewed", - "properties": { - "review_id": "12345", - "product_id": "123", - "rating": 3.0, - "review_body": "Average product, expected much more." - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "channel": "email", - "delay": 0, - "eventNamesSettings": [{ "event": "Product Reviewed" }] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "track", - "anonymousId": "identified_user@email.com", - "event": "Product Reviewed", - "properties": { - "review_id": "12345", - "product_id": "123", - "rating": 3.0, - "review_body": "Average product, expected much more." - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "channel": "email", - "delay": 0, - "eventNamesSettings": [{ "event": "" }] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "alias", - "previousId": "123@abc.com", - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "channel": "email", - "delay": 0, - "eventNamesSettings": [{ "event": "" }] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "externalId": [{ "id": "sms", "type": "delightedChannelType" }], - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "alias", - "userId": "abc@123.com", - "previousId": "123@abc.com", - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "channel": "email", - "delay": 0, - "eventNamesSettings": [{ "event": "" }] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "externalId": [{ "id": "sms", "type": "delightedChannelType" }], - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "identify", - "userId": "abc@123.com", - "traits": { - "firstName": "James", - "lastName": "Doe", - "phone": "+91237416221", - "last_sent_at": "1626698350" - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "channel": "email", - "delay": 0, - "eventNamesSettings": [{ "event": "" }] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "externalId": [{ "id": "sms", "type": "delightedChannelType" }], - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "identify", - "userId": "+911234567890", - "traits": { - "firstName": "James", - "lastName": "Doe", - "last_sent_at": "1626698350" - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - } -] diff --git a/test/__tests__/data/delighted_output.json b/test/__tests__/data/delighted_output.json deleted file mode 100644 index fc95d51bac..0000000000 --- a/test/__tests__/data/delighted_output.json +++ /dev/null @@ -1,121 +0,0 @@ -[ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.delighted.com/v1/people.json", - "headers": { - "Authorization": "Basic ZHVtbXlBcGlLZXk=", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "email": "abc@123.com", - "send": false, - "channel": "email", - "delay": 0, - "name": "James Doe", - "phone_number": "+91237416221", - "last_sent_at": "1626698350" - } - }, - "files": {} - }, - { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "email": "123@abc.com", - "email_update": "abc@123.com" - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Authorization": "Basic ZHVtbXlBcGlLZXk=", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api.delighted.com/v1/people.json" - }, - { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "properties": { - "review_id": "12345", - "product_id": "123", - "rating": 3.0, - "review_body": "Average product, expected much more." - }, - "send": true, - "channel": "email", - "delay": 0, - "email": "identified_user@email.com" - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Authorization": "Basic ZHVtbXlBcGlLZXk=", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api.delighted.com/v1/people.json" - }, - { - "error": "user unidentified_user@email.com doesn't exist" - }, - { - "error": "Event is not configured on your Rudderstack Dashboard" - }, - { - "error": "userId is required." - }, - { - "error": "userId is required." - }, - { - "error": "User Id and Previous Id should be of same type i.e. phone/sms" - }, - { - "error": "Channel is set to sms. Enter correct phone number i.e. E.164" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.delighted.com/v1/people.json", - "headers": { - "Authorization": "Basic ZHVtbXlBcGlLZXk=", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "send": false, - "channel": "sms", - "delay": 0, - "name": "James Doe", - "phone_number": "+911234567890", - "last_sent_at": "1626698350" - } - }, - "files": {} - } -] diff --git a/test/__tests__/data/delighted_router_input.json b/test/__tests__/data/delighted_router_input.json deleted file mode 100644 index 4c39370e9e..0000000000 --- a/test/__tests__/data/delighted_router_input.json +++ /dev/null @@ -1,83 +0,0 @@ -[ - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "channel": "email", - "delay": 0, - "eventNamesSettings": [{ "event": "" }] - } - }, - "metadata": { - "jobId": 1 - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "identify", - "userId": "abc@123.com", - "traits": { - "firstName": "James", - "lastName": "Doe", - "phone": "+92374162212", - "last_sent_at": "1626698350" - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "channel": "email", - "delay": 0, - "eventNamesSettings": [{ "event": "" }] - } - }, - "metadata": { - "jobId": 2 - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "alias", - "previousId": "123@abc.com", - "userId": "abc@123.com", - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - } -] diff --git a/test/__tests__/data/delighted_router_output.json b/test/__tests__/data/delighted_router_output.json deleted file mode 100644 index 40b770a3bd..0000000000 --- a/test/__tests__/data/delighted_router_output.json +++ /dev/null @@ -1,83 +0,0 @@ -[ - { - "batchedRequest": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "email": "abc@123.com", - "send": false, - "channel": "email", - "delay": 0, - "last_sent_at": "1626698350", - "name": "James Doe", - "phone_number": "+92374162212" - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Authorization": "Basic ZHVtbXlBcGlLZXk=", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api.delighted.com/v1/people.json" - }, - "metadata": [ - { - "jobId": 1 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "channel": "email", - "delay": 0, - "eventNamesSettings": [{ "event": "" }] - } - } - }, - { - "batchedRequest": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "email": "123@abc.com", - "email_update": "abc@123.com" - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Authorization": "Basic ZHVtbXlBcGlLZXk=", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api.delighted.com/v1/people.json" - }, - "metadata": [ - { - "jobId": 2 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "channel": "email", - "delay": 0, - "eventNamesSettings": [{ "event": "" }] - } - } - } -] diff --git a/test/__tests__/data/drip_input.json b/test/__tests__/data/drip_input.json deleted file mode 100644 index 17ad0ce376..0000000000 --- a/test/__tests__/data/drip_input.json +++ /dev/null @@ -1,720 +0,0 @@ -[ - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "accountId": "1809802", - "campaignId": "", - "enableUserCreation": true - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "identify", - "traits": { - "email": "test1@gmail.com", - "firstName": "James", - "lastName": "Doe", - "phone": "237416221", - "customFields": { - "filter1": "filterval1" - } - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "accountId": "1809802", - "campaignId": "", - "enableUserCreation": true - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "identify", - "traits": { - "email": "12324adfgs", - "firstName": "James", - "lastName": "Doe", - "phone": "237416221", - "customFields": { - "filter1": "filterval1" - } - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "accountId": "1809802", - "campaignId": "", - "enableUserCreation": true - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "identify", - "traits": { - "email": "test1@gmail.com", - "name": "James Doe", - "phone": "237416221", - "filter1": "filterval1", - "filter2": "filterval2" - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "accountId": "1809802", - "campaignId": "915194776", - "enableUserCreation": true - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "identify", - "traits": { - "email": "test1@gmail.com", - "name": "James Doe", - "phone": "237416221", - "filter1": "filterval1", - "filter2": "filterval2", - "tags": ["tag1", "tag2"], - "startingEmailIndex": 1 - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "accountId": "1809802", - "campaignId": "915194776", - "enableUserCreation": true - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "track", - "event": "testing", - "properties": { - "email": "user1@gmail.com", - "customFields": { - "field1": "val1" - } - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "accountId": "1809802", - "campaignId": "915194776", - "enableUserCreation": true - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "track", - "event": "", - "properties": { - "email": "user1@gmail.com", - "custom_fields": { - "field1": "val1" - } - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "accountId": "1809802", - "campaignId": "915194776", - "enableUserCreation": false - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "track", - "event": "testing", - "properties": { - "email": "identified_user@gmail.com", - "customFields": { - "field1": "val1" - } - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "accountId": "1809802", - "campaignId": "915194776", - "enableUserCreation": false - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "track", - "event": "testing", - "properties": { - "email": "identified_user@gmail.com", - "field1": "val1" - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "accountId": "1809802", - "campaignId": "915194776", - "enableUserCreation": false - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "track", - "event": "testing", - "properties": { - "email": "unidentified_user@gmail.com", - "field1": "val1" - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "accountId": "1809802", - "campaignId": "915194776", - "enableUserCreation": false - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "track", - "event": "checkout started", - "properties": { - "email": "identified_user@gmail.com", - "field1": "val1", - "affiliation": "my_custom_order", - "order_id": "456445746" - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "accountId": "1809802", - "campaignId": "915194776", - "enableUserCreation": false - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "track", - "event": "checkout started", - "properties": { - "email": "identified_user@gmail.com", - "field1": "val1", - "affiliation": "my_custom_order", - "order_id": "456445746", - "products": [ - { - "name": "shirt", - "price": 11.16 - } - ] - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "accountId": "1809802", - "campaignId": "915194776", - "enableUserCreation": false - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "track", - "event": "checkout", - "properties": { - "email": "identified_user@gmail.com", - "field1": "val1", - "customFields": { - "field2": "val2" - } - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "accountId": "1809802", - "campaignId": "", - "enableUserCreation": true - } - }, - "message": { - "type": "identify", - "event": "identify", - "userId": "user@1", - "channel": "mobile", - "context": { - "os": { - "name": "Android", - "version": "13" - }, - "app": { - "name": "rudderstack", - "build": "5425", - "version": "2.4.1" - }, - "device": { - "id": "8b048b94cbec4fcf", - "name": "o1q", - "type": "Android", - "model": "SM-G991U", - "manufacturer": "samsung" - }, - "locale": "en-US", - "traits": { - "id": "ruddertest@gmail.com", - "email": "ruddertest@gmail.com", - "title": "Social Impact Program Manager", - "skills": [ - { - "id": 134, - "name": "Business Development", - "tagGroupId": 2, - "parentTagId": 134, - "huddleVisible": false, - "onboardVisible": false - }, - { - "id": 96, - "name": "Communications", - "tagGroupId": 2, - "parentTagId": 96, - "huddleVisible": true, - "onboardVisible": true - }, - { - "id": 489, - "name": "Construction", - "tagGroupId": 2, - "parentTagId": 489, - "huddleVisible": false, - "onboardVisible": false - }, - { - "id": 671, - "name": "Data Analysis", - "tagGroupId": 2, - "parentTagId": 671, - "huddleVisible": false, - "onboardVisible": false - }, - { - "id": 676, - "name": "Engineering: Mechanical", - "tagGroupId": 2, - "parentTagId": 676, - "huddleVisible": false, - "onboardVisible": false - }, - { - "id": 189, - "name": "Operations", - "tagGroupId": 2, - "parentTagId": 189, - "huddleVisible": true, - "onboardVisible": true - }, - { - "id": 194, - "name": "Product Management", - "tagGroupId": 2, - "parentTagId": 194, - "huddleVisible": true, - "onboardVisible": true - }, - { - "id": 195, - "name": "Program Management", - "tagGroupId": 2, - "parentTagId": 195, - "huddleVisible": false, - "onboardVisible": false - }, - { - "id": 199, - "name": "R&D", - "tagGroupId": 2, - "parentTagId": 199, - "huddleVisible": false, - "onboardVisible": false - }, - { - "id": 102, - "name": "Sales", - "tagGroupId": 2, - "parentTagId": 102, - "huddleVisible": true, - "onboardVisible": true - } - ], - "userId": "ruddertest@gmail.com", - "address": "Chicago, IL, USA", - "industry": "Education", - "lastName": "test", - "lastname": "test", - "verified": false, - "firstName": "rudder", - "firstname": "rudder", - "interests": [ - { - "id": 649, - "name": "Adaptation", - "tagGroupId": 4, - "parentTagId": 745, - "huddleVisible": false, - "onboardVisible": false - }, - { - "id": 663, - "name": "Carbon removal and sequestration", - "tagGroupId": 4, - "parentTagId": 761, - "huddleVisible": false, - "onboardVisible": false - }, - { - "id": 664, - "name": "Clean Energy and Energy Efficiency", - "tagGroupId": 4, - "parentTagId": 259, - "huddleVisible": false, - "onboardVisible": false - }, - { - "id": 654, - "name": "Climate Science and Earth Systems", - "tagGroupId": 4, - "parentTagId": 744, - "huddleVisible": false, - "onboardVisible": false - }, - { - "id": 650, - "name": "Corporate Sustainability", - "tagGroupId": 4, - "parentTagId": 650, - "huddleVisible": false, - "onboardVisible": false - }, - { - "id": 651, - "name": "Finance & Risk", - "tagGroupId": 4, - "parentTagId": 651, - "huddleVisible": false, - "onboardVisible": false - }, - { - "id": 652, - "name": "Food and Agriculture", - "tagGroupId": 4, - "parentTagId": 652, - "huddleVisible": false, - "onboardVisible": false - }, - { - "id": 665, - "name": "Transport", - "tagGroupId": 4, - "parentTagId": 665, - "huddleVisible": false, - "onboardVisible": false - } - ], - "isDeleted": false, - "anonymousId": "8b048b94cbec4fcf", - "jobFunction": "Program manager", - "reminderType": 1, - "jobPreferences": { - "motivationStr": "I am looking for a job in climate change.,I want to learn about climate change.,I’d like to connect with other climate enthusiasts.", - "searchUrgency": "As soon as possible", - "maxCompensation": 0, - "minCompensation": 0 - }, - "visibilityType": "public", - "Linkedin-Signin": true, - "hubbleOnboarded": false, - "sharePreference": false, - "notificationType": 0, - "shortDescription": "Social Impact Program Manager", - "jobProfileComplete": false, - "noOfMonthExperience": 0, - "onboarding_completed": "Yes" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.8.1" - }, - "timezone": "America/Chicago", - "sessionId": 1681096824, - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 13; SM-G991U Build/TP1A.220624.014)" - }, - "rudderId": "f701966c-5568-4500-92ba-4e9023c8fe31", - "messageId": "77b53247-177f-4ca3-a6b4-aa7558fec280", - "request_ip": "75.209.176.135", - "anonymousId": "8b048b94cbec4fcf", - "integrations": { - "All": true - } - } - } -] diff --git a/test/__tests__/data/drip_output.json b/test/__tests__/data/drip_output.json deleted file mode 100644 index dbf9cf6a75..0000000000 --- a/test/__tests__/data/drip_output.json +++ /dev/null @@ -1,319 +0,0 @@ -[ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.getdrip.com/v2/1809802/subscribers", - "headers": { - "Authorization": "Basic ZHVtbXlBcGlLZXk=", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "subscribers": [ - { - "email": "test1@gmail.com", - "first_name": "James", - "last_name": "Doe", - "phone": "237416221", - "ip_address": "0.0.0.0", - "custom_fields": { - "filter1": "filterval1" - } - } - ] - } - }, - "files": {} - }, - { - "error": "dripId or email is required for the call" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.getdrip.com/v2/1809802/subscribers", - "headers": { - "Authorization": "Basic ZHVtbXlBcGlLZXk=", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "subscribers": [ - { - "email": "test1@gmail.com", - "first_name": "James", - "last_name": "Doe", - "phone": "237416221", - "ip_address": "0.0.0.0", - "custom_fields": { - "filter1": "filterval1", - "filter2": "filterval2" - } - } - ] - } - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.getdrip.com/v2/1809802/campaigns/915194776/subscribers", - "headers": { - "Authorization": "Basic ZHVtbXlBcGlLZXk=", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "subscribers": [ - { - "email": "test1@gmail.com", - "starting_email_index": 1 - } - ] - } - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.getdrip.com/v2/1809802/events", - "headers": { - "Authorization": "Basic ZHVtbXlBcGlLZXk=", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "email": "user1@gmail.com", - "properties": { - "field1": "val1" - }, - "action": "testing", - "occurred_at": "2019-10-14T09:03:17.562Z" - } - ] - } - }, - "files": {} - }, - { - "error": "Event name is required" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.getdrip.com/v2/1809802/events", - "headers": { - "Authorization": "Basic ZHVtbXlBcGlLZXk=", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "email": "identified_user@gmail.com", - "properties": { - "field1": "val1" - }, - "action": "testing", - "occurred_at": "2019-10-14T09:03:17.562Z" - } - ] - } - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.getdrip.com/v2/1809802/events", - "headers": { - "Authorization": "Basic ZHVtbXlBcGlLZXk=", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "email": "identified_user@gmail.com", - "properties": { - "field1": "val1" - }, - "action": "testing", - "occurred_at": "2019-10-14T09:03:17.562Z" - } - ] - } - }, - "files": {} - }, - { - "error": "Error occurred while checking user : " - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.getdrip.com/v3/1809802/shopper_activity/order", - "headers": { - "Authorization": "Basic ZHVtbXlBcGlLZXk=", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "action": "placed", - "email": "identified_user@gmail.com", - "occurred_at": "2019-10-14T09:03:17.562Z", - "order_id": "456445746", - "provider": "my_custom_order" - } - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.getdrip.com/v3/1809802/shopper_activity/order", - "headers": { - "Authorization": "Basic ZHVtbXlBcGlLZXk=", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "action": "placed", - "email": "identified_user@gmail.com", - "occurred_at": "2019-10-14T09:03:17.562Z", - "order_id": "456445746", - "provider": "my_custom_order", - "items": [ - { - "name": "shirt", - "price": 11.16 - } - ] - } - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.getdrip.com/v2/1809802/events", - "headers": { - "Authorization": "Basic ZHVtbXlBcGlLZXk=", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "action": "checkout", - "email": "identified_user@gmail.com", - "occurred_at": "2019-10-14T09:03:17.562Z", - "properties": { - "field2": "val2" - } - } - ] - } - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.getdrip.com/v2/1809802/subscribers", - "headers": { - "Authorization": "Basic ZHVtbXlBcGlLZXk=", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "subscribers": [ - { - "email": "ruddertest@gmail.com", - "user_id": "user@1", - "address1": "Chicago, IL, USA", - "last_name": "test", - "first_name": "rudder", - "custom_fields": { - "title": "Social Impact Program Manager", - "industry": "Education", - "verified": false, - "isDeleted": false, - "jobFunction": "Program manager", - "reminderType": 1, - "jobPreferences": { - "motivationStr": "I am looking for a job in climate change.,I want to learn about climate change.,I’d like to connect with other climate enthusiasts.", - "searchUrgency": "As soon as possible", - "maxCompensation": 0, - "minCompensation": 0 - }, - "visibilityType": "public", - "hubbleOnboarded": false, - "sharePreference": false, - "notificationType": 0, - "shortDescription": "Social Impact Program Manager", - "jobProfileComplete": false, - "noOfMonthExperience": 0, - "onboarding_completed": "Yes" - } - } - ] - } - }, - "files": {} - } -] diff --git a/test/__tests__/data/drip_router_input.json b/test/__tests__/data/drip_router_input.json deleted file mode 100644 index 1cabfe9498..0000000000 --- a/test/__tests__/data/drip_router_input.json +++ /dev/null @@ -1,90 +0,0 @@ -[ - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "accountId": "1809802", - "campaignId": "", - "enableUserCreation": true - } - }, - "metadata": { - "jobId": 1 - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "identify", - "traits": { - "email": "test1@gmail.com", - "firstName": "James", - "lastName": "Doe", - "phone": "237416221", - "customFields": { - "filter1": "filterval1" - } - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "accountId": "1809802", - "campaignId": "915194776", - "enableUserCreation": true - } - }, - "metadata": { - "jobId": 2 - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "track", - "event": "testing", - "properties": { - "email": "user1@gmail.com", - "customFields": { - "field1": "val1" - } - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - } -] diff --git a/test/__tests__/data/drip_router_output.json b/test/__tests__/data/drip_router_output.json deleted file mode 100644 index d1efdf48f7..0000000000 --- a/test/__tests__/data/drip_router_output.json +++ /dev/null @@ -1,96 +0,0 @@ -[ - { - "batchedRequest": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "subscribers": [ - { - "email": "test1@gmail.com", - "first_name": "James", - "last_name": "Doe", - "phone": "237416221", - "ip_address": "0.0.0.0", - "custom_fields": { - "filter1": "filterval1" - } - } - ] - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Authorization": "Basic ZHVtbXlBcGlLZXk=", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api.getdrip.com/v2/1809802/subscribers" - }, - "metadata": [ - { - "jobId": 1 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "accountId": "1809802", - "campaignId": "", - "enableUserCreation": true - } - } - }, - { - "batchedRequest": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "email": "user1@gmail.com", - "properties": { - "field1": "val1" - }, - "action": "testing", - "occurred_at": "2019-10-14T09:03:17.562Z" - } - ] - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Authorization": "Basic ZHVtbXlBcGlLZXk=", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api.getdrip.com/v2/1809802/events" - }, - "metadata": [ - { - "jobId": 2 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "accountId": "1809802", - "campaignId": "915194776", - "enableUserCreation": true - } - } - } -] diff --git a/test/__tests__/data/freshmarketer.json b/test/__tests__/data/freshmarketer.json deleted file mode 100644 index 390c0fb44e..0000000000 --- a/test/__tests__/data/freshmarketer.json +++ /dev/null @@ -1,2507 +0,0 @@ -[ - { - "description": "Identify call for creating new user", - "input": { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "rudderstack-476952domain3105.myfreshworks.com" - } - }, - "message": { - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-06-22T10:57:58Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99099", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - } - }, - "traits": { - "email": "testuser@google.com", - "first_name": "Rk", - "last_name": "Mishra", - "mobileNumber": "1-926-555-9504", - "lifecycleStageId": 71010794467, - "phone": "9988776655", - "owner_id": "70000090119" - }, - "type": "identify", - "sentAt": "2022-04-22T10:57:58Z" - } - }, - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "contact": { - "emails": "testuser@google.com", - "last_name": "Mishra", - "created_at": "2022-06-22T10:57:58Z", - "first_name": "Rk", - "updated_at": "2022-06-22T10:57:58Z", - "external_id": "ea5cfab2-3961-4d8a-8187-3d1858c99099", - "work_number": "9988776655", - "mobile_number": "1-926-555-9504", - "lifecycle_stage_id": 71010794467 - }, - "unique_identifier": { - "emails": "testuser@google.com" - } - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Content-Type": "application/json", - "Authorization": "Token token=dummyApiKey" - }, - "version": "1", - "endpoint": "https://rudderstack-476952domain3105.myfreshworks.com/crm/sales/api/contacts/upsert" - } - }, - { - "description": "Identify call with numbers in lifecycleStageId, ownerId", - "input": { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "rudderstack-476952domain3105.myfreshworks.com" - } - }, - "message": { - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-06-22T10:57:58Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99099", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - } - }, - "traits": { - "email": "testuser@google.com", - "first_name": "Rk", - "last_name": "Mishra", - "mobileNumber": "1-926-555-9504", - "lifecycleStageId": 71010794467, - "phone": "9988776655", - "owner_id": "70000090119" - }, - "type": "identify", - "sentAt": "2022-04-22T10:57:58Z" - } - }, - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "contact": { - "emails": "testuser@google.com", - "last_name": "Mishra", - "created_at": "2022-06-22T10:57:58Z", - "first_name": "Rk", - "updated_at": "2022-06-22T10:57:58Z", - "external_id": "ea5cfab2-3961-4d8a-8187-3d1858c99099", - "work_number": "9988776655", - "mobile_number": "1-926-555-9504", - "lifecycle_stage_id": 71010794467 - }, - "unique_identifier": { - "emails": "testuser@google.com" - } - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Content-Type": "application/json", - "Authorization": "Token token=dummyApiKey" - }, - "version": "1", - "endpoint": "https://rudderstack-476952domain3105.myfreshworks.com/crm/sales/api/contacts/upsert" - } - }, - { - "description": "Identify call with wrong data type in lifecycleStageId, ownerId", - "input": { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "rudderstack-476952domain3105.myfreshworks.com" - } - }, - "message": { - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-06-22T10:57:58Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99099", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - } - }, - "traits": { - "email": "testuser@google.com", - "first_name": "Rk", - "last_name": "Mishra", - "mobileNumber": "1-926-555-9504", - "lifecycleStageId": "rudderSample", - "phone": "9988776655", - "ownerId": "rudderSample" - }, - "type": "identify", - "sentAt": "2022-04-22T10:57:58Z" - } - }, - "output": { - "statusCode": 400, - "error": "owner_id,lifecycle_stage_id: invalid number format", - "statTags": { - "destination": "freshmarketer", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "Identify call, email is not provided.", - "input": { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "rudderstack-476952domain3105.myfreshworks.com" - } - }, - "message": { - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-06-22T10:57:58Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99099", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - } - }, - "traits": { - "first_name": "Rk", - "last_name": "Mishra", - "mobileNumber": "1-926-555-9504", - "lifecycleStageId": "rudderSample", - "phone": "9988776655", - "owner_id": "rudderSample" - }, - "type": "identify", - "sentAt": "2022-04-22T10:57:58Z" - } - }, - "output": { - "statusCode": 400, - "error": "Missing required value from \"email\"", - "statTags": { - "destination": "freshmarketer", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "Group call: testing with mock api", - "input": { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - }, - "message": { - "messageId": "sadjb-1e2r3fhgb-12bvbbj", - "originalTimestamp": "2022-06-22T10:57:58Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "traits": { - "email": "testuser@google.com" - } - }, - "traits": { - "groupType": "accounts", - "name": "Mark Twain", - "phone": "919191919191", - "numberOfEmployees": 51, - "annualRevenue": 1000, - "address": "Red Colony", - "city": "Colony", - "state": "Haryana" - }, - "type": "group", - "sentAt": "2022-04-22T10:57:58Z" - } - }, - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "contact": { - "sales_accounts": [ - { - "id": 70003771198, - "name": "div-quer", - "avatar": null, - "partial": true, - "website": null, - "is_primary": true, - "last_contacted": null, - "record_type_id": "71010794477" - }, - { - "id": 70003825177, - "name": "BisleriGroup", - "avatar": null, - "partial": true, - "website": null, - "is_primary": false, - "last_contacted": null, - "record_type_id": "71010794477" - }, - { - "id": 70003771396, - "is_primary": false - } - ] - }, - "unique_identifier": { - "emails": "testuser@google.com" - } - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Content-Type": "application/json", - "Authorization": "Token token=dummyApiKey" - }, - "version": "1", - "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/contacts/upsert" - } - }, - { - "description": "Group call: name is required field.", - "input": { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - }, - "message": { - "messageId": "sadjb-1e2r3fhgb-12bvbbj", - "originalTimestamp": "2022-06-22T10:57:58Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "traits": { - "email": "testuser@google.com" - } - }, - "traits": { - "groupType": "accounts", - "phone": "919191919191", - "numberOfEmployees": 51, - "annualRevenue": 1000, - "address": "Red Colony", - "city": "Colony", - "state": "Haryana" - }, - "type": "group", - "sentAt": "2022-04-22T10:57:58Z" - } - }, - "output": { - "error": "Missing required value from \"name\"", - "stage": "dest_transformer", - "record_id": null, - "source_id": "2DnU7R3Ksf0O1IypvleCHNp4X7m", - "status_code": 400, - "destination_id": "2DnUEc7Ka4thYmPsPCdigkwaGkn", - "source_job_run_id": "", - "source_task_run_id": "" - } - }, - { - "description": "missing message type", - "input": { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - }, - "message": { - "messageId": "sadjb-1e2r3fhgb-12bvbbj", - "originalTimestamp": "2022-06-22T10:57:58Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "traits": { - "email": "testuser4google.com" - } - }, - "traits": { - "name": "Mark Twain", - "phone": "919191919191", - "numberOfEmployees": 51, - "annualRevenue": 1000, - "address": "Red Colony", - "city": "Colony", - "state": "Haryana" - }, - "sentAt": "2022-04-22T10:57:58Z" - } - }, - "output": { - "statusCode": 400, - "error": "Message Type is not present. Aborting message.", - "statTags": { - "destination": "freshmarketer", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "Wrong message type", - "input": { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - }, - "message": { - "messageId": "sadjb-1e2r3fhgb-12bvbbj", - "originalTimestamp": "2022-06-22T10:57:58Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "traits": { - "email": "testuser4google.com" - } - }, - "traits": { - "name": "Mark Twain", - "phone": "919191919191", - "numberOfEmployees": 51, - "annualRevenue": 1000, - "address": "Red Colony", - "city": "Colony", - "state": "Haryana" - }, - "type": "page", - "sentAt": "2022-04-22T10:57:58Z" - } - }, - "output": { - "statusCode": 400, - "error": "message type page not supported", - "statTags": { - "errorAt": "proc", - "destType": "FRESHMARKETER", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "Group call: user email is missing", - "input": { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - }, - "message": { - "messageId": "sadjb-1e2r3fhgb-12bvbbj", - "originalTimestamp": "2022-06-22T10:57:58Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "traits": {} - }, - "traits": { - "groupType": "accounts", - "name": "div-quer", - "phone": "919191919191", - "numberOfEmployees": 51, - "annualRevenue": 1000, - "address": "Red Colony", - "city": "Lal colony", - "state": "Haryana" - }, - "type": "group", - "sentAt": "2022-04-22T10:57:58Z" - } - }, - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "sales_account": { - "city": "Lal colony", - "name": "div-quer", - "phone": "919191919191", - "state": "Haryana", - "address": "Red Colony", - "created_at": "2022-06-22T10:57:58Z", - "updated_at": "2022-06-22T10:57:58Z", - "annual_revenue": 1000, - "number_of_employees": 51 - }, - "unique_identifier": { - "name": "div-quer" - } - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Content-Type": "application/json", - "Authorization": "Token token=dummyApiKey" - }, - "version": "1", - "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/sales_accounts/upsert" - } - }, - { - "description": "Identify call: Email is not present", - "input": { - "message": { - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-06-22T10:57:58Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99099", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - } - }, - "traits": { - "first_name": "Rk", - "last_name": "Narayan", - "mobileNumber": "1-926-555-9504", - "phone": "9988776655" - }, - "type": "identify", - "sentAt": "2022-04-22T10:57:58Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "error": "Missing required value from \"email\"", - "stage": "dest_transformer", - "record_id": null, - "source_id": "2DnU7R3Ksf0O1IypvleCHNp4X7m", - "status_code": 400, - "destination_id": "2DnUEc7Ka4thYmPsPCdigkwaGkn", - "source_job_run_id": "", - "source_task_run_id": "" - } - }, - { - "description": "Track call, event is not supported.", - "input": { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "email": "test@rudderstack.com", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "type": "track", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "properties": { - "product_name": "Shirt", - "brand": "Wrogn" - }, - "event": "Add to Cart", - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "statusCode": 400, - "error": "event name Add to Cart is not supported. Aborting!", - "statTags": { - "errorAt": "proc", - "destType": "FRESHMARKETER", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "Track call: some required properties is missing for sales_activity", - "input": { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "email": "test@rudderstack.com", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "type": "track", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "email": "test@rudderstack.com", - "properties": { - "product_name": "Shirt", - "brand": "Wrogn" - }, - "event": "sales_activity", - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "error": "Missing required value from \"properties.title\"", - "stage": "dest_transformer", - "record_id": null, - "source_id": "2EfN23bGjskM5qAM310n619XABT", - "status_code": 400, - "destination_id": "2FvdYen6HyqE0WlxkC6ZboEaDjR", - "source_job_run_id": "", - "source_task_run_id": "" - } - }, - { - "description": "Track call: for salesActivityName", - "input": { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "email": "test@rudderstack.com", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - }, - "externalId": { - "type": "Contact" - } - }, - "type": "track", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "email": "test@rudderstack.com", - "properties": { - "product_name": "Shirt", - "brand": "Wrogn", - "salesActivityName": "own-calender", - "title": "new Contact", - "startDate": "2021-05-04T17:00:00+05:30", - "endDate": "2022-06-04T17:30:00+05:30", - "ownerId": "70054866612" - }, - "event": "sales_activity", - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "sales_activity": { - "title": "new Contact", - "end_date": "2022-06-04T17:30:00+05:30", - "owner_id": "70054866612", - "start_date": "2021-05-04T17:00:00+05:30", - "created_at": "2020-10-20T08:14:28.778Z", - "updated_at": "2020-10-20T08:14:28.778Z", - "targetable_id": 70054866612, - "targetable_type": "Contact", - "sales_activity_name": "own-calender", - "sales_activity_type_id": 70000666879 - } - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Content-Type": "application/json", - "Authorization": "Token token=dummyApiKey" - }, - "version": "1", - "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/sales_activities" - } - }, - { - "description": "Track call: lifecycle_stage_id", - "input": { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "type": "track", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "properties": { - "email": "jamessampleton3@gmail.com", - "lifecycleStageId": "71012139273", - "title": "new Contact", - "startDate": "2021-05-04T17:00:00+05:30", - "endDate": "2022-06-04T17:30:00+05:30", - "ownerId": "70054866612", - "targetableType": "Contact" - }, - "event": "lifecycle_stage", - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/contacts/upsert", - "headers": { - "Authorization": "Token token=dummyApiKey", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "contact": { - "lifecycle_stage_id": "71012139273" - }, - "unique_identifier": { - "emails": "jamessampleton3@gmail.com" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "Track call: In lifecycle stage, email is missing", - "input": { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "type": "track", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "properties": { - "lifecycleStageId": "71012139273", - "title": "new Contact", - "startDate": "2021-05-04T17:00:00+05:30", - "endDate": "2022-06-04T17:30:00+05:30", - "ownerId": "70054866612", - "targetableType": "Contact" - }, - "event": "lifecycle_stage", - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "error": "email is required for updating life Cycle Stages. Aborting!", - "stage": "dest_transformer", - "record_id": null, - "source_id": "2EfN23bGjskM5qAM310n619XABT", - "status_code": 400, - "destination_id": "2FvdYen6HyqE0WlxkC6ZboEaDjR", - "source_job_run_id": "", - "source_task_run_id": "" - } - }, - { - "description": "Track call: Either of lifecycleStageName or lifecycleStageId is required", - "input": { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "email": "test@rudderstack.com", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "type": "track", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "email": "jamessampleton3@gmail.com", - "properties": { - "title": "new Contact", - "startDate": "2021-05-04T17:00:00+05:30", - "endDate": "2022-06-04T17:30:00+05:30", - "ownerId": "70054866612", - "targetableType": "Contact" - }, - "event": "lifecycle_stage", - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "error": "Either of lifecycleStageName or lifecycleStageId is required. Aborting!", - "stage": "dest_transformer", - "record_id": null, - "source_id": "2EfN23bGjskM5qAM310n619XABT", - "status_code": 400, - "destination_id": "2FvdYen6HyqE0WlxkC6ZboEaDjR", - "source_job_run_id": "", - "source_task_run_id": "" - } - }, - { - "description": "Track call: Either of sales activity name or sales activity type id is required", - "input": { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "email": "test@rudderstack.com", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - }, - "externalId": { - "type": "Contact" - } - }, - "type": "track", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "email": "test@rudderstack.com", - "properties": { - "product_name": "Shirt", - "brand": "Wrogn", - "title": "new Contact", - "startDate": "2021-05-04T17:00:00+05:30", - "endDate": "2022-06-04T17:30:00+05:30", - "ownerId": "70054866612" - }, - "event": "sales_activity", - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "error": "Either of sales activity name or sales activity type id is required. Aborting!", - "stage": "dest_transformer", - "record_id": null, - "source_id": "2EfN23bGjskM5qAM310n619XABT", - "status_code": 400, - "destination_id": "2FvdYen6HyqE0WlxkC6ZboEaDjR", - "source_job_run_id": "", - "source_task_run_id": "" - } - }, - { - "description": "Track call: Either of email or targetable_id is required for creating sales activity.", - "input": { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - }, - "externalId": { - "type": "Contact" - } - }, - "type": "track", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "properties": { - "product_name": "Shirt", - "brand": "Wrogn", - "salesActivityName": "own-calender", - "title": "new Contact", - "startDate": "2021-05-04T17:00:00+05:30", - "endDate": "2022-06-04T17:30:00+05:30", - "ownerId": "70054866612" - }, - "event": "sales_activity", - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "error": "Either of email or targetable_id is required for creating sales activity. Aborting!", - "stage": "dest_transformer", - "record_id": null, - "source_id": "2EfN23bGjskM5qAM310n619XABT", - "status_code": 400, - "destination_id": "2FvdYen6HyqE0WlxkC6ZboEaDjR", - "source_job_run_id": "", - "source_task_run_id": "" - } - }, - { - "description": "Track call: sales activity with salesActivityTypeId", - "input": { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "email": "test@rudderstack.com", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - }, - "externalId": { - "type": "Contact" - } - }, - "type": "track", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "email": "jamessampleton3@gmail.com", - "properties": { - "salesActivityTypeId": "70000663932", - "title": "new Contact", - "startDate": "2021-05-04T17:00:00+05:30", - "endDate": "2022-06-04T17:30:00+05:30", - "ownerId": "70054866612" - }, - "event": "sales_activity", - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "sales_activity": { - "title": "new Contact", - "end_date": "2022-06-04T17:30:00+05:30", - "owner_id": "70054866612", - "start_date": "2021-05-04T17:00:00+05:30", - "created_at": "2020-10-20T08:14:28.778Z", - "updated_at": "2020-10-20T08:14:28.778Z", - "targetable_id": 70054866612, - "targetable_type": "Contact", - "sales_activity_type_id": "70000663932" - } - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Content-Type": "application/json", - "Authorization": "Token token=dummyApiKey" - }, - "version": "1", - "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/sales_activities" - } - }, - { - "description": "Track call: updated sales activity with salesActivityTypeId and targetableId", - "input": { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "email": "test@rudderstack.com", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - }, - "externalId": { - "id": "70052305908", - "type": "Contact" - } - }, - "type": "track", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "properties": { - "salesActivityTypeId": "70000663932", - "title": "new Contact", - "startDate": "2021-05-04T17:00:00+05:30", - "endDate": "2022-06-04T17:30:00+05:30", - "ownerId": "70054866612" - }, - "event": "sales_activity", - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "sales_activity": { - "title": "new Contact", - "end_date": "2022-06-04T17:30:00+05:30", - "owner_id": "70054866612", - "start_date": "2021-05-04T17:00:00+05:30", - "created_at": "2020-10-20T08:14:28.778Z", - "updated_at": "2020-10-20T08:14:28.778Z", - "targetable_id": "70052305908", - "targetable_type": "Contact", - "sales_activity_type_id": "70000663932" - } - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Content-Type": "application/json", - "Authorization": "Token token=dummyApiKey" - }, - "version": "1", - "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/sales_activities" - } - }, - { - "description": "Unsupported message Type", - "input": { - "message": { - "channel": "web", - "type": "page", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "email": "jamessampleton3@gmail.com", - "properties": { - "lifecycleStageId": "71012139273", - "title": "new Contact", - "startDate": "2021-05-04T17:00:00+05:30", - "endDate": "2022-06-04T17:30:00+05:30", - "ownerId": "70054866612", - "targetableType": "Contact" - }, - "event": "lifecycle_stage", - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "statusCode": 400, - "error": "message type page not supported", - "statTags": { - "errorAt": "proc", - "destType": "FRESHMARKETER", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "Group call: email is required for adding contacts to marketing lists", - "input": { - "message": { - "messageId": "sadjb-1e2r3fhgb-12bvbbj", - "originalTimestamp": "2022-06-22T10:57:58Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "traits": { - "groupType": "marketing_lists" - }, - "type": "group", - "sentAt": "2022-04-22T10:57:58Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "statusCode": 400, - "error": "email is required for adding in the marketing lists. Aborting!", - "statTags": { - "errorAt": "proc", - "destType": "FRESHMARKETER", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "Group call: group type is not present", - "input": { - "message": { - "messageId": "sadjb-1e2r3fhgb-12bvbbj", - "originalTimestamp": "2022-06-22T10:57:58Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "traits": { - "name": "Mark Twain", - "phone": "919191919191", - "numberOfEmployees": 51, - "annualRevenue": 1000, - "address": "Red Colony", - "city": "Colony", - "state": "Haryana" - }, - "type": "group", - "sentAt": "2022-04-22T10:57:58Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "error": "groupType is required for Group call", - "stage": "dest_transformer", - "record_id": null, - "source_id": "2EfN23bGjskM5qAM310n619XABT", - "status_code": 400, - "destination_id": "2FvdYen6HyqE0WlxkC6ZboEaDjR", - "source_job_run_id": "", - "source_task_run_id": "" - } - }, - { - "description": "Group call: add contacts in existing marketing lists", - "input": { - "message": { - "messageId": "sadjb-1e2r3fhgb-12bvbbj", - "originalTimestamp": "2022-06-22T10:57:58Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "traits": { - "email": "jamessampleton1@gmail.com" - } - }, - "traits": { - "groupType": "marketing_lists", - "listName": "Voda 5G", - "address": "Red Colony", - "city": "Colony", - "state": "Haryana" - }, - "type": "group", - "sentAt": "2022-04-22T10:57:58Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "ids": [70054866612] - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "PUT", - "params": {}, - "headers": { - "Content-Type": "application/json", - "Authorization": "Token token=dummyApiKey" - }, - "version": "1", - "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/lists/70000059716/add_contacts" - } - }, - { - "description": "Group call: groupType is not supported", - "input": { - "message": { - "messageId": "sadjb-1e2r3fhgb-12bvbbj", - "originalTimestamp": "2022-06-22T10:57:58Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "traits": { - "groupType": "marketing", - "listName": "Voda 5G", - "address": "Red Colony", - "city": "Colony", - "state": "Haryana" - }, - "type": "group", - "sentAt": "2022-04-22T10:57:58Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "error": "groupType marketing is not supported. Aborting!", - "stage": "dest_transformer", - "record_id": null, - "source_id": "2EfN23bGjskM5qAM310n619XABT", - "status_code": 400, - "destination_id": "2FvdYen6HyqE0WlxkC6ZboEaDjR", - "source_job_run_id": "", - "source_task_run_id": "" - } - }, - { - "description": "Group call: listId or listName is required", - "input": { - "message": { - "messageId": "sadjb-1e2r3fhgb-12bvbbj", - "originalTimestamp": "2022-06-22T10:57:58Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "traits": { - "email": "jamessampleton1@gmail.com" - } - }, - "traits": { - "groupType": "marketing_lists", - "address": "Red Colony", - "city": "Colony", - "state": "Haryana" - }, - "type": "group", - "sentAt": "2022-04-22T10:57:58Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "error": "listId or listName is required. Aborting!", - "stage": "dest_transformer", - "record_id": null, - "source_id": "2EfN23bGjskM5qAM310n619XABT", - "status_code": 400, - "destination_id": "2FvdYen6HyqE0WlxkC6ZboEaDjR", - "source_job_run_id": "", - "source_task_run_id": "" - } - }, - { - "description": "Group call: add marketing lists with listId", - "input": { - "message": { - "messageId": "sadjb-1e2r3fhgb-12bvbbj", - "originalTimestamp": "2022-06-22T10:57:58Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "traits": { - "email": "jamessampleton1@gmail.com" - } - }, - "traits": { - "listId": "70000058627", - "groupType": "marketing_lists", - "address": "Red Colony", - "city": "Colony", - "state": "Haryana" - }, - "type": "group", - "sentAt": "2022-04-22T10:57:58Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "ids": [70054866612] - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "PUT", - "params": {}, - "headers": { - "Content-Type": "application/json", - "Authorization": "Token token=dummyApiKey" - }, - "version": "1", - "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/lists/70000058627/add_contacts" - } - }, - { - "description": "Track call: with wrong sales activity name", - "input": { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "email": "test@rudderstack.com", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - }, - "externalId": { - "type": "Contact" - } - }, - "type": "track", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "email": "test@rudderstack.com", - "properties": { - "product_name": "Shirt", - "brand": "Wrogn", - "salesActivityName": "own-list", - "title": "new Contact", - "startDate": "2021-05-04T17:00:00+05:30", - "endDate": "2022-06-04T17:30:00+05:30", - "ownerId": "70054866612" - }, - "event": "sales_activity", - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "error": "sales Activity own-list doesn't exists. Aborting!", - "stage": "dest_transformer", - "record_id": null, - "source_id": "2EfN23bGjskM5qAM310n619XABT", - "status_code": 400, - "destination_id": "2FvdYen6HyqE0WlxkC6ZboEaDjR", - "source_job_run_id": "", - "source_task_run_id": "" - } - }, - { - "description": "Track call: update contacts with sales Activity name", - "input": { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "type": "track", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "properties": { - "email": "jamessampleton6@gmail.com", - "lifecycleStageName": "final Customer", - "title": "new Contact", - "startDate": "2021-05-04T17:00:00+05:30", - "endDate": "2022-06-04T17:30:00+05:30", - "ownerId": "70054866612", - "targetableType": "Contact" - }, - "event": "lifecycle_stage", - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "contact": { - "lifecycle_stage_id": 71012806409 - }, - "unique_identifier": { - "emails": "jamessampleton6@gmail.com" - } - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Content-Type": "application/json", - "Authorization": "Token token=dummyApiKey" - }, - "version": "1", - "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/contacts/upsert" - } - }, - { - "description": "Track call: with wrong lifecycleStageName", - "input": { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "type": "track", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "properties": { - "email": "jamessampleton6@gmail.com", - "lifecycleStageName": "final ExCustomer", - "title": "new Contact", - "startDate": "2021-05-04T17:00:00+05:30", - "endDate": "2022-06-04T17:30:00+05:30", - "ownerId": "70054866612", - "targetableType": "Contact" - }, - "event": "lifecycle_stage", - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "error": "failed to fetch lifeCycleStages with final ExCustomer", - "stage": "dest_transformer", - "record_id": null, - "source_id": "2EfN23bGjskM5qAM310n619XABT", - "status_code": 400, - "destination_id": "2FvdYen6HyqE0WlxkC6ZboEaDjR", - "source_job_run_id": "", - "source_task_run_id": "" - } - }, - { - "description": "Track call: Multiplexing", - "input": { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "email": "test@rudderstack.com", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - }, - "externalId": { - "type": "Contact" - } - }, - "type": "track", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "email": "test@rudderstack.com", - "properties": { - "product_name": "Shirt", - "brand": "Wrogn", - "salesActivityName": "own-calender", - "title": "new Contact", - "startDate": "2021-05-04T17:00:00+05:30", - "endDate": "2022-06-04T17:30:00+05:30", - "ownerId": "70054866612", - "lifecycleStageId": "71012139273" - }, - "event": "test_activity", - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com", - "rudderEventsToFreshmarketerEvents": [ - { - "from": "test_activity", - "to": "sales_activity" - }, - { - "from": "test_activity", - "to": "lifecycle_stage" - }, - { - "from": "test_event", - "to": "lifecycle_stage" - } - ] - } - } - }, - "output": [ - { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "sales_activity": { - "title": "new Contact", - "end_date": "2022-06-04T17:30:00+05:30", - "owner_id": "70054866612", - "start_date": "2021-05-04T17:00:00+05:30", - "created_at": "2020-10-20T08:14:28.778Z", - "updated_at": "2020-10-20T08:14:28.778Z", - "targetable_id": 70054866612, - "targetable_type": "Contact", - "sales_activity_name": "own-calender", - "sales_activity_type_id": 70000666879 - } - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Content-Type": "application/json", - "Authorization": "Token token=dummyApiKey" - }, - "version": "1", - "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/sales_activities" - }, - { - "body": { - "JSON": { - "contact": { - "lifecycle_stage_id": "71012139273" - }, - "unique_identifier": { - "emails": "test@rudderstack.com" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Authorization": "Token token=dummyApiKey", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/contacts/upsert" - } - ] - } -] diff --git a/test/__tests__/data/freshmarketer_router_input.json b/test/__tests__/data/freshmarketer_router_input.json deleted file mode 100644 index 2cc5ce58de..0000000000 --- a/test/__tests__/data/freshmarketer_router_input.json +++ /dev/null @@ -1,174 +0,0 @@ -[ - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "rudderstack-476952domain3105.myfreshworks.com" - } - }, - "metadata": { - "jobId": 1 - }, - "message": { - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-06-22T10:57:58Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99099", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - } - }, - "traits": { - "email": "testuser@google.com", - "first_name": "Rk", - "last_name": "Mishra", - "mobileNumber": "1-926-555-9504", - "lifecycleStageId": 71010794467, - "phone": "9988776655", - "owner_id": "70000090119" - }, - "type": "identify", - "sentAt": "2022-04-22T10:57:58Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "rudderstack-476952domain3105.myfreshworks.com" - } - }, - "metadata": { - "jobId": 2 - }, - "message": { - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-06-22T10:57:58Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99099", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - } - }, - "traits": { - "email": "testuser@google.com", - "first_name": "Rk", - "last_name": "Mishra", - "mobileNumber": "1-926-555-9504", - "lifecycleStageId": 71010794467, - "phone": "9988776655", - "owner_id": "70000090119" - }, - "type": "identify", - "sentAt": "2022-04-22T10:57:58Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - }, - "metadata": { - "jobId": 3 - }, - "message": { - "messageId": "sadjb-1e2r3fhgb-12bvbbj", - "originalTimestamp": "2022-06-22T10:57:58Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "traits": { - "email": "testuser@google.com" - } - }, - "traits": { - "groupType": "accounts", - "name": "Mark Twain", - "phone": "919191919191", - "numberOfEmployees": 51, - "annualRevenue": 1000, - "address": "Red Colony", - "city": "Colony", - "state": "Haryana" - }, - "type": "group", - "sentAt": "2022-04-22T10:57:58Z" - } - } -] diff --git a/test/__tests__/data/freshmarketer_router_output.json b/test/__tests__/data/freshmarketer_router_output.json deleted file mode 100644 index 3525e4bb16..0000000000 --- a/test/__tests__/data/freshmarketer_router_output.json +++ /dev/null @@ -1,163 +0,0 @@ -[ - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rudderstack-476952domain3105.myfreshworks.com/crm/sales/api/contacts/upsert", - "headers": { - "Authorization": "Token token=dummyApiKey", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "contact": { - "emails": "testuser@google.com", - "first_name": "Rk", - "last_name": "Mishra", - "work_number": "9988776655", - "external_id": "ea5cfab2-3961-4d8a-8187-3d1858c99099", - "mobile_number": "1-926-555-9504", - "created_at": "2022-06-22T10:57:58Z", - "updated_at": "2022-06-22T10:57:58Z", - "lifecycle_stage_id": 71010794467 - }, - "unique_identifier": { - "emails": "testuser@google.com" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "jobId": 1 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "rudderstack-476952domain3105.myfreshworks.com" - } - } - }, - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rudderstack-476952domain3105.myfreshworks.com/crm/sales/api/contacts/upsert", - "headers": { - "Authorization": "Token token=dummyApiKey", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "contact": { - "emails": "testuser@google.com", - "first_name": "Rk", - "last_name": "Mishra", - "work_number": "9988776655", - "external_id": "ea5cfab2-3961-4d8a-8187-3d1858c99099", - "mobile_number": "1-926-555-9504", - "created_at": "2022-06-22T10:57:58Z", - "updated_at": "2022-06-22T10:57:58Z", - "lifecycle_stage_id": 71010794467 - }, - "unique_identifier": { - "emails": "testuser@google.com" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "jobId": 2 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "rudderstack-476952domain3105.myfreshworks.com" - } - } - }, - { - "batchedRequest": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "contact": { - "sales_accounts": [ - { - "id": 70003771198, - "name": "div-quer", - "avatar": null, - "partial": true, - "website": null, - "is_primary": true, - "last_contacted": null, - "record_type_id": "71010794477" - }, - { - "id": 70003825177, - "name": "BisleriGroup", - "avatar": null, - "partial": true, - "website": null, - "is_primary": false, - "last_contacted": null, - "record_type_id": "71010794477" - }, - { - "id": 70003771396, - "is_primary": false - } - ] - }, - "unique_identifier": { - "emails": "testuser@google.com" - } - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Content-Type": "application/json", - "Authorization": "Token token=dummyApiKey" - }, - "version": "1", - "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/contacts/upsert" - }, - "metadata": [ - { - "jobId": 3 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - } -] diff --git a/test/__tests__/data/freshsales.json b/test/__tests__/data/freshsales.json deleted file mode 100644 index 55193532f4..0000000000 --- a/test/__tests__/data/freshsales.json +++ /dev/null @@ -1,2173 +0,0 @@ -[ - { - "description": "Track call, event is not supported.", - "input": { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "email": "test@rudderstack.com", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "type": "track", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "properties": { - "product_name": "Shirt", - "brand": "Wrogn" - }, - "event": { - "name": "Add to Cart" - }, - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "statusCode": 400, - "error": "Event is a required field and should be a string", - "statTags": { - "errorAt": "proc", - "destType": "FRESHMARKETER", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "Identify call for creating new user", - "input": { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "rudderstack-476952domain3105.myfreshworks.com" - } - }, - "message": { - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-06-22T10:57:58Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99099", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - } - }, - "traits": { - "email": "testuser@google.com", - "first_name": "Rk", - "last_name": "Mishra", - "mobileNumber": "1-926-555-9504", - "lifecycleStageId": 71010794467, - "phone": "9988776655", - "owner_id": "70000090119" - }, - "type": "identify", - "sentAt": "2022-04-22T10:57:58Z" - } - }, - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "contact": { - "emails": "testuser@google.com", - "last_name": "Mishra", - "created_at": "2022-06-22T10:57:58Z", - "first_name": "Rk", - "updated_at": "2022-06-22T10:57:58Z", - "external_id": "ea5cfab2-3961-4d8a-8187-3d1858c99099", - "work_number": "9988776655", - "mobile_number": "1-926-555-9504", - "lifecycle_stage_id": 71010794467 - }, - "unique_identifier": { - "emails": "testuser@google.com" - } - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Content-Type": "application/json", - "Authorization": "Token token=dummyApiKey" - }, - "version": "1", - "endpoint": "https://rudderstack-476952domain3105.myfreshworks.com/crm/sales/api/contacts/upsert" - } - }, - { - "description": "Identify call with numbers in lifecycleStageId, ownerId", - "input": { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "rudderstack-476952domain3105.myfreshworks.com" - } - }, - "message": { - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-06-22T10:57:58Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99099", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - } - }, - "traits": { - "email": "testuser@google.com", - "first_name": "Rk", - "last_name": "Mishra", - "mobileNumber": "1-926-555-9504", - "lifecycleStageId": 71010794467, - "phone": "9988776655", - "owner_id": "70000090119" - }, - "type": "identify", - "sentAt": "2022-04-22T10:57:58Z" - } - }, - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "contact": { - "emails": "testuser@google.com", - "last_name": "Mishra", - "created_at": "2022-06-22T10:57:58Z", - "first_name": "Rk", - "updated_at": "2022-06-22T10:57:58Z", - "external_id": "ea5cfab2-3961-4d8a-8187-3d1858c99099", - "work_number": "9988776655", - "mobile_number": "1-926-555-9504", - "lifecycle_stage_id": 71010794467 - }, - "unique_identifier": { - "emails": "testuser@google.com" - } - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Content-Type": "application/json", - "Authorization": "Token token=dummyApiKey" - }, - "version": "1", - "endpoint": "https://rudderstack-476952domain3105.myfreshworks.com/crm/sales/api/contacts/upsert" - } - }, - { - "description": "Identify call with wrong data type in lifecycleStageId, ownerId", - "input": { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "rudderstack-476952domain3105.myfreshworks.com" - } - }, - "message": { - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-06-22T10:57:58Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99099", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - } - }, - "traits": { - "email": "testuser@google.com", - "first_name": "Rk", - "last_name": "Mishra", - "mobileNumber": "1-926-555-9504", - "lifecycleStageId": "rudderSample", - "phone": "9988776655", - "ownerId": "rudderSample" - }, - "type": "identify", - "sentAt": "2022-04-22T10:57:58Z" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rudderstack-476952domain3105.myfreshworks.com/crm/sales/api/contacts/upsert", - "headers": { - "Authorization": "Token token=dummyApiKey", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "contact": { - "emails": "testuser@google.com", - "first_name": "Rk", - "last_name": "Mishra", - "work_number": "9988776655", - "external_id": "ea5cfab2-3961-4d8a-8187-3d1858c99099", - "mobile_number": "1-926-555-9504", - "created_at": "2022-06-22T10:57:58Z", - "updated_at": "2022-06-22T10:57:58Z" - }, - "unique_identifier": { - "emails": "testuser@google.com" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "Identify call, email is not provided.", - "input": { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "rudderstack-476952domain3105.myfreshworks.com" - } - }, - "message": { - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-06-22T10:57:58Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99099", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - } - }, - "traits": { - "first_name": "Rk", - "last_name": "Mishra", - "mobileNumber": "1-926-555-9504", - "lifecycleStageId": "rudderSample", - "phone": "9988776655", - "owner_id": "rudderSample" - }, - "type": "identify", - "sentAt": "2022-04-22T10:57:58Z" - } - }, - "output": { - "statusCode": 400, - "error": "Missing required value from \"email\"", - "statTags": { - "errorAt": "proc", - "destType": "FRESHSALES", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "Group call: testing with mock api", - "input": { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - }, - "message": { - "messageId": "sadjb-1e2r3fhgb-12bvbbj", - "originalTimestamp": "2022-06-22T10:57:58Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "traits": { - "email": "testuser@google.com" - } - }, - "traits": { - "groupType": "accounts", - "name": "Mark Twain", - "phone": "919191919191", - "numberOfEmployees": 51, - "annualRevenue": 1000, - "address": "Red Colony", - "city": "Colony", - "state": "Haryana" - }, - "type": "group", - "sentAt": "2022-04-22T10:57:58Z" - } - }, - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "contact": { - "sales_accounts": [ - { - "id": 70003771198, - "name": "div-quer", - "avatar": null, - "partial": true, - "website": null, - "is_primary": true, - "last_contacted": null, - "record_type_id": "71010794477" - }, - { - "id": 70003825177, - "name": "BisleriGroup", - "avatar": null, - "partial": true, - "website": null, - "is_primary": false, - "last_contacted": null, - "record_type_id": "71010794477" - }, - { - "id": 70003771396, - "is_primary": false - } - ] - }, - "unique_identifier": { - "emails": "testuser@google.com" - } - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Content-Type": "application/json", - "Authorization": "Token token=dummyApiKey" - }, - "version": "1", - "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/contacts/upsert" - } - }, - { - "description": "Group call: name is required field.", - "input": { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - }, - "message": { - "messageId": "sadjb-1e2r3fhgb-12bvbbj", - "originalTimestamp": "2022-06-22T10:57:58Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "traits": { - "email": "testuser@google.com" - } - }, - "traits": { - "groupType": "accounts", - "phone": "919191919191", - "numberOfEmployees": 51, - "annualRevenue": 1000, - "address": "Red Colony", - "city": "Colony", - "state": "Haryana" - }, - "type": "group", - "sentAt": "2022-04-22T10:57:58Z" - } - }, - "output": { - "error": "Missing required value from \"name\"", - "stage": "dest_transformer", - "record_id": null, - "source_id": "2DnU7R3Ksf0O1IypvleCHNp4X7m", - "status_code": 400, - "destination_id": "2DnUEc7Ka4thYmPsPCdigkwaGkn", - "source_job_run_id": "", - "source_task_run_id": "" - } - }, - { - "description": "missing message type", - "input": { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - }, - "message": { - "messageId": "sadjb-1e2r3fhgb-12bvbbj", - "originalTimestamp": "2022-06-22T10:57:58Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "traits": { - "email": "testuser4google.com" - } - }, - "traits": { - "name": "Mark Twain", - "phone": "919191919191", - "numberOfEmployees": 51, - "annualRevenue": 1000, - "address": "Red Colony", - "city": "Colony", - "state": "Haryana" - }, - "sentAt": "2022-04-22T10:57:58Z" - } - }, - "output": { - "statusCode": 400, - "error": "Message Type is not present. Aborting message.", - "statTags": { - "destination": "freshmarketer", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "Wrong message type", - "input": { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - }, - "message": { - "messageId": "sadjb-1e2r3fhgb-12bvbbj", - "originalTimestamp": "2022-06-22T10:57:58Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "traits": { - "email": "testuser4google.com" - } - }, - "traits": { - "name": "Mark Twain", - "phone": "919191919191", - "numberOfEmployees": 51, - "annualRevenue": 1000, - "address": "Red Colony", - "city": "Colony", - "state": "Haryana" - }, - "type": "page", - "sentAt": "2022-04-22T10:57:58Z" - } - }, - "output": { - "statusCode": 400, - "error": "message type page not supported", - "statTags": { - "errorAt": "proc", - "destType": "FRESHMARKETER", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "Group call: user email is missing", - "input": { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - }, - "message": { - "messageId": "sadjb-1e2r3fhgb-12bvbbj", - "originalTimestamp": "2022-06-22T10:57:58Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "traits": {} - }, - "traits": { - "groupType": "accounts", - "name": "div-quer", - "phone": "919191919191", - "numberOfEmployees": 51, - "annualRevenue": 1000, - "address": "Red Colony", - "city": "Lal colony", - "state": "Haryana" - }, - "type": "group", - "sentAt": "2022-04-22T10:57:58Z" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/sales_accounts/upsert", - "headers": { - "Authorization": "Token token=dummyApiKey", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "unique_identifier": { - "name": "div-quer" - }, - "sales_account": { - "name": "div-quer", - "phone": "919191919191", - "number_of_employees": 51, - "annual_revenue": 1000, - "address": "", - "city": "Lal colony", - "state": "Haryana", - "created_at": "2022-06-22T10:57:58Z", - "updated_at": "2022-06-22T10:57:58Z" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "Identify call: Email is not present", - "input": { - "message": { - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-06-22T10:57:58Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99099", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - } - }, - "traits": { - "first_name": "Rk", - "last_name": "Narayan", - "mobileNumber": "1-926-555-9504", - "phone": "9988776655" - }, - "type": "identify", - "sentAt": "2022-04-22T10:57:58Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "error": "Missing required value from \"email\"", - "stage": "dest_transformer", - "record_id": null, - "source_id": "2DnU7R3Ksf0O1IypvleCHNp4X7m", - "status_code": 400, - "destination_id": "2DnUEc7Ka4thYmPsPCdigkwaGkn", - "source_job_run_id": "", - "source_task_run_id": "" - } - }, - { - "description": "Track call, event is not supported.", - "input": { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "email": "test@rudderstack.com", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "type": "track", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "properties": { - "product_name": "Shirt", - "brand": "Wrogn" - }, - "event": "Add to Cart", - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "statusCode": 400, - "error": "event name Add to Cart is not supported. Aborting!", - "statTags": { - "errorAt": "proc", - "destType": "FRESHMARKETER", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "Track call: some required properties is missing for sales_activity", - "input": { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "email": "test@rudderstack.com", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "type": "track", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "email": "test@rudderstack.com", - "properties": { - "product_name": "Shirt", - "brand": "Wrogn" - }, - "event": "sales_activity", - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "error": "Missing required value from \"properties.title\"", - "stage": "dest_transformer", - "record_id": null, - "source_id": "2EfN23bGjskM5qAM310n619XABT", - "status_code": 400, - "destination_id": "2FvdYen6HyqE0WlxkC6ZboEaDjR", - "source_job_run_id": "", - "source_task_run_id": "" - } - }, - { - "description": "Track call: for salesActivityName", - "input": { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "email": "test@rudderstack.com", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - }, - "externalId": { - "type": "Contact" - } - }, - "type": "track", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "email": "test@rudderstack.com", - "properties": { - "product_name": "Shirt", - "brand": "Wrogn", - "salesActivityName": "own-calender", - "title": "new Contact", - "startDate": "2021-05-04T17:00:00+05:30", - "endDate": "2022-06-04T17:30:00+05:30", - "ownerId": "70054866612" - }, - "event": "test", - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com", - "rudderEventsToFreshsalesEvents": [ - { - "from": "test", - "to": "sales_activity" - } - ] - } - } - }, - "output": [ - { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "sales_activity": { - "title": "new Contact", - "created_at": "2020-10-20T08:14:28.778Z", - "end_date": "2022-06-04T17:30:00+05:30", - "owner_id": "70054866612", - "start_date": "2021-05-04T17:00:00+05:30", - "updated_at": "2020-10-20T08:14:28.778Z", - "targetable_id": 70054866612, - "targetable_type": "Contact", - "sales_activity_name": "own-calender", - "sales_activity_type_id": 70000666879 - } - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Content-Type": "application/json", - "Authorization": "Token token=dummyApiKey" - }, - "version": "1", - "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/sales_activities" - } - ] - }, - { - "description": "Track call: lifecycle_stage_id", - "input": { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "type": "track", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "properties": { - "email": "jamessampleton3@gmail.com", - "lifecycleStageId": "71012139273", - "title": "new Contact", - "startDate": "2021-05-04T17:00:00+05:30", - "endDate": "2022-06-04T17:30:00+05:30", - "ownerId": "70054866612", - "targetableType": "Contact" - }, - "event": "lifecycle_stage", - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/contacts/upsert", - "headers": { - "Authorization": "Token token=dummyApiKey", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "contact": { - "lifecycle_stage_id": "71012139273" - }, - "unique_identifier": { - "emails": "jamessampleton3@gmail.com" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "Track call: In lifecycle stage, email is missing", - "input": { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "type": "track", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "properties": { - "lifecycleStageId": "71012139273", - "title": "new Contact", - "startDate": "2021-05-04T17:00:00+05:30", - "endDate": "2022-06-04T17:30:00+05:30", - "ownerId": "70054866612", - "targetableType": "Contact" - }, - "event": "lifecycle_stage", - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "error": "email is required for updating life Cycle Stages. Aborting!", - "stage": "dest_transformer", - "record_id": null, - "source_id": "2EfN23bGjskM5qAM310n619XABT", - "status_code": 400, - "destination_id": "2FvdYen6HyqE0WlxkC6ZboEaDjR", - "source_job_run_id": "", - "source_task_run_id": "" - } - }, - { - "description": "Track call: Either of lifecycleStageName or lifecycleStageId is required", - "input": { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "email": "test@rudderstack.com", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "type": "track", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "email": "jamessampleton3@gmail.com", - "properties": { - "title": "new Contact", - "startDate": "2021-05-04T17:00:00+05:30", - "endDate": "2022-06-04T17:30:00+05:30", - "ownerId": "70054866612", - "targetableType": "Contact" - }, - "event": "lifecycle_stage", - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "error": "Either of lifecycleStageName or lifecycleStageId is required. Aborting!", - "stage": "dest_transformer", - "record_id": null, - "source_id": "2EfN23bGjskM5qAM310n619XABT", - "status_code": 400, - "destination_id": "2FvdYen6HyqE0WlxkC6ZboEaDjR", - "source_job_run_id": "", - "source_task_run_id": "" - } - }, - { - "description": "Track call: Either of sales activity name or sales activity type id is required", - "input": { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "email": "test@rudderstack.com", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - }, - "externalId": { - "type": "Contact" - } - }, - "type": "track", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "email": "test@rudderstack.com", - "properties": { - "product_name": "Shirt", - "brand": "Wrogn", - "title": "new Contact", - "startDate": "2021-05-04T17:00:00+05:30", - "endDate": "2022-06-04T17:30:00+05:30", - "ownerId": "70054866612" - }, - "event": "sales_activity", - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "error": "Either of sales activity name or sales activity type id is required. Aborting!", - "stage": "dest_transformer", - "record_id": null, - "source_id": "2EfN23bGjskM5qAM310n619XABT", - "status_code": 400, - "destination_id": "2FvdYen6HyqE0WlxkC6ZboEaDjR", - "source_job_run_id": "", - "source_task_run_id": "" - } - }, - { - "description": "Track call: Either of email or targetable_id is required for creating sales activity.", - "input": { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - }, - "externalId": { - "type": "Contact" - } - }, - "type": "track", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "properties": { - "product_name": "Shirt", - "brand": "Wrogn", - "salesActivityName": "own-calender", - "title": "new Contact", - "startDate": "2021-05-04T17:00:00+05:30", - "endDate": "2022-06-04T17:30:00+05:30", - "ownerId": "70054866612" - }, - "event": "sales_activity", - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "error": "Either of email or targetable_id is required for creating sales activity. Aborting!", - "stage": "dest_transformer", - "record_id": null, - "source_id": "2EfN23bGjskM5qAM310n619XABT", - "status_code": 400, - "destination_id": "2FvdYen6HyqE0WlxkC6ZboEaDjR", - "source_job_run_id": "", - "source_task_run_id": "" - } - }, - { - "description": "Track call: sales activity with salesActivityTypeId", - "input": { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "email": "test@rudderstack.com", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - }, - "externalId": { - "type": "Contact" - } - }, - "type": "track", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "email": "jamessampleton3@gmail.com", - "properties": { - "salesActivityTypeId": "70000663932", - "title": "new Contact", - "startDate": "2021-05-04T17:00:00+05:30", - "endDate": "2022-06-04T17:30:00+05:30", - "ownerId": "70054866612" - }, - "event": "sales_activity", - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "sales_activity": { - "title": "new Contact", - "created_at": "2020-10-20T08:14:28.778Z", - "end_date": "2022-06-04T17:30:00+05:30", - "owner_id": "70054866612", - "start_date": "2021-05-04T17:00:00+05:30", - "updated_at": "2020-10-20T08:14:28.778Z", - "targetable_id": 70054866612, - "targetable_type": "Contact", - "sales_activity_type_id": "70000663932" - } - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Content-Type": "application/json", - "Authorization": "Token token=dummyApiKey" - }, - "version": "1", - "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/sales_activities" - } - }, - { - "description": "Track call: updated sales activity with salesActivityTypeId and targetableId", - "input": { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "email": "test@rudderstack.com", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - }, - "externalId": { - "id": "70052305908", - "type": "Contact" - } - }, - "type": "track", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "properties": { - "salesActivityTypeId": "70000663932", - "title": "new Contact", - "startDate": "2021-05-04T17:00:00+05:30", - "endDate": "2022-06-04T17:30:00+05:30", - "ownerId": "70054866612" - }, - "event": "sales_activity", - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "sales_activity": { - "title": "new Contact", - "created_at": "2020-10-20T08:14:28.778Z", - "end_date": "2022-06-04T17:30:00+05:30", - "owner_id": "70054866612", - "start_date": "2021-05-04T17:00:00+05:30", - "updated_at": "2020-10-20T08:14:28.778Z", - "targetable_id": "70052305908", - "targetable_type": "Contact", - "sales_activity_type_id": "70000663932" - } - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Content-Type": "application/json", - "Authorization": "Token token=dummyApiKey" - }, - "version": "1", - "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/sales_activities" - } - }, - { - "description": "Unsupported message Type", - "input": { - "message": { - "channel": "web", - "type": "page", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "email": "jamessampleton3@gmail.com", - "properties": { - "lifecycleStageId": "71012139273", - "title": "new Contact", - "startDate": "2021-05-04T17:00:00+05:30", - "endDate": "2022-06-04T17:30:00+05:30", - "ownerId": "70054866612", - "targetableType": "Contact" - }, - "event": "lifecycle_stage", - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "statusCode": 400, - "error": "message type page not supported", - "statTags": { - "errorAt": "proc", - "destType": "FRESHMARKETER", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "Track call: with wrong sales activity name", - "input": { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "email": "test@rudderstack.com", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - }, - "externalId": { - "type": "Contact" - } - }, - "type": "track", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "email": "test@rudderstack.com", - "properties": { - "product_name": "Shirt", - "brand": "Wrogn", - "salesActivityName": "own-list", - "title": "new Contact", - "startDate": "2021-05-04T17:00:00+05:30", - "endDate": "2022-06-04T17:30:00+05:30", - "ownerId": "70054866612" - }, - "event": "sales_activity", - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "error": "sales Activity own-list doesn't exists. Aborting!", - "stage": "dest_transformer", - "record_id": null, - "source_id": "2EfN23bGjskM5qAM310n619XABT", - "status_code": 400, - "destination_id": "2FvdYen6HyqE0WlxkC6ZboEaDjR", - "source_job_run_id": "", - "source_task_run_id": "" - } - }, - { - "description": "Track call: update contacts with sales Activity name", - "input": { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "type": "track", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "properties": { - "email": "jamessampleton6@gmail.com", - "lifecycleStageName": "final Customer", - "title": "new Contact", - "startDate": "2021-05-04T17:00:00+05:30", - "endDate": "2022-06-04T17:30:00+05:30", - "ownerId": "70054866612", - "targetableType": "Contact" - }, - "event": "lifecycle_stage", - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "contact": { - "lifecycle_stage_id": 71012806409 - }, - "unique_identifier": { - "emails": "jamessampleton6@gmail.com" - } - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Content-Type": "application/json", - "Authorization": "Token token=dummyApiKey" - }, - "version": "1", - "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/contacts/upsert" - } - }, - { - "description": "Track call: with wrong lifecycleStageName", - "input": { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "type": "track", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "properties": { - "email": "jamessampleton6@gmail.com", - "lifecycleStageName": "final ExCustomer", - "title": "new Contact", - "startDate": "2021-05-04T17:00:00+05:30", - "endDate": "2022-06-04T17:30:00+05:30", - "ownerId": "70054866612", - "targetableType": "Contact" - }, - "event": "lifecycle_stage", - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "error": "failed to fetch lifeCycleStages with final ExCustomer", - "stage": "dest_transformer", - "record_id": null, - "source_id": "2EfN23bGjskM5qAM310n619XABT", - "status_code": 400, - "destination_id": "2FvdYen6HyqE0WlxkC6ZboEaDjR", - "source_job_run_id": "", - "source_task_run_id": "" - } - } -] diff --git a/test/__tests__/data/freshsales_router_input.json b/test/__tests__/data/freshsales_router_input.json deleted file mode 100644 index ea4b9887dd..0000000000 --- a/test/__tests__/data/freshsales_router_input.json +++ /dev/null @@ -1,78 +0,0 @@ -[ - { - "message": { - "context": { - "device": { - "name": "Mi", - "token": "dummyDeviceToken" - }, - "os": { - "name": "android" - }, - "traits": { - "address": { - "city": "city", - "country": "country", - "postalCode": "postalCode", - "state": "state", - "street": "street" - }, - "email": "user112@mail.com", - "firstName": "sample1", - "lastName": "user1" - } - }, - "messageId": "8184ebd7-3a19-45a3-a340-d6f449c63d27", - "originalTimestamp": "2022-08-30T11:28:48.429+05:30", - "receivedAt": "2022-08-30T11:28:43.648+05:30", - "request_ip": "[::1]", - "rudderId": "ed33ef22-569d-44b1-a6cb-063c69dca8f0", - "sentAt": "2022-08-30T11:28:48.429+05:30", - "timestamp": "2022-08-30T11:28:43.647+05:30", - "type": "identify", - "userId": "user113" - }, - "destination": { - "ID": "2E3xCNR3sae33y3AkGzuQ3ym05v", - "Name": "test", - "DestinationDefinition": { - "ID": "2E3x3AwySRvh6vXgYslvYApyFPb", - "Name": "FRESHSALES", - "DisplayName": "Freshsales", - "Config": { - "destConfig": { - "defaultConfig": ["apiKey", "domain"] - }, - "excludeKeys": [], - "includeKeys": ["apiKey", "domain"], - "saveDestinationResponse": true, - "supportedMessageTypes": ["identify", "group"], - "supportedSourceTypes": [ - "amp", - "android", - "cordova", - "cloud", - "flutter", - "ios", - "reactnative", - "unity", - "warehouse", - "web" - ], - "transformAt": "processor", - "transformAtV1": "processor" - }, - "ResponseRules": {} - }, - "Config": { - "apiKey": "hrkjfergeferf", - "domain": "rudderstack-479541159204968909.myfreshworks.com" - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": true, - "RevisionID": "2E3xCLWeb83vOGDh0mkN4Auei3i" - }, - "metadata": {} - } -] diff --git a/test/__tests__/data/freshsales_router_output.json b/test/__tests__/data/freshsales_router_output.json deleted file mode 100644 index 69d259ff00..0000000000 --- a/test/__tests__/data/freshsales_router_output.json +++ /dev/null @@ -1,83 +0,0 @@ -[ - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rudderstack-479541159204968909.myfreshworks.com/crm/sales/api/contacts/upsert", - "headers": { - "Authorization": "Token token=hrkjfergeferf", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "contact": { - "emails": "user112@mail.com", - "first_name": "sample1", - "last_name": "user1", - "external_id": "user113", - "address": "street city state country postalCode", - "city": "city", - "state": "state", - "country": "country", - "zipcode": "postalCode", - "created_at": "2022-08-30T11:28:43.647+05:30", - "updated_at": "2022-08-30T11:28:43.647+05:30" - }, - "unique_identifier": { - "emails": "user112@mail.com" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [{}], - "batched": false, - "statusCode": 200, - "destination": { - "ID": "2E3xCNR3sae33y3AkGzuQ3ym05v", - "Name": "test", - "DestinationDefinition": { - "ID": "2E3x3AwySRvh6vXgYslvYApyFPb", - "Name": "FRESHSALES", - "DisplayName": "Freshsales", - "Config": { - "destConfig": { - "defaultConfig": ["apiKey", "domain"] - }, - "excludeKeys": [], - "includeKeys": ["apiKey", "domain"], - "saveDestinationResponse": true, - "supportedMessageTypes": ["identify", "group"], - "supportedSourceTypes": [ - "amp", - "android", - "cordova", - "cloud", - "flutter", - "ios", - "reactnative", - "unity", - "warehouse", - "web" - ], - "transformAt": "processor", - "transformAtV1": "processor" - }, - "ResponseRules": {} - }, - "Config": { - "apiKey": "hrkjfergeferf", - "domain": "rudderstack-479541159204968909.myfreshworks.com" - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": true, - "RevisionID": "2E3xCLWeb83vOGDh0mkN4Auei3i" - } - } -] diff --git a/test/__tests__/delighted.test.js b/test/__tests__/delighted.test.js deleted file mode 100644 index 9b5cdefb07..0000000000 --- a/test/__tests__/delighted.test.js +++ /dev/null @@ -1,48 +0,0 @@ -const integration = "delighted"; -const name = "delighted"; - -const fs = require("fs"); -const path = require("path"); -const version = "v0"; - -const transformer = require(`../../src/${version}/destinations/${integration}/transform`); -const inputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_input.json`) -); -const outputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_output.json`) -); -const inputData = JSON.parse(inputDataFile); -const expectedData = JSON.parse(outputDataFile); - -//for router test -const inputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_input.json`) -); -const outputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_output.json`) -); -const inputRouterData = JSON.parse(inputRouterDataFile); -const expectedRouterData = JSON.parse(outputRouterDataFile); - -describe(`${name} Tests`, () => { - describe("Processor Tests", () => { - inputData.forEach((input, index) => { - it(`${name} - payload: ${index}`, async () => { - try { - const output = await transformer.process(input); - expect(output).toEqual(expectedData[index]); - } catch (error) { - expect(error.message).toEqual(expectedData[index].error); - } - }); - }); - }); - - describe("Router Tests", () => { - it("Payload", async () => { - const routerOutput = await transformer.processRouterDest(inputRouterData); - expect(routerOutput).toEqual(expectedRouterData); - }); - }); -}); diff --git a/test/__tests__/drip.test.js b/test/__tests__/drip.test.js deleted file mode 100644 index 3f5b34c7eb..0000000000 --- a/test/__tests__/drip.test.js +++ /dev/null @@ -1,47 +0,0 @@ -const integration = "drip"; -const name = "drip"; - -const fs = require("fs"); -const path = require("path"); -const version = "v0"; - -const transformer = require(`../../src/${version}/destinations/${integration}/transform`); -const inputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_input.json`) -); -const outputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_output.json`) -); -const inputData = JSON.parse(inputDataFile); -const expectedData = JSON.parse(outputDataFile); - -const inputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_input.json`) -); -const outputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_output.json`) -); -const inputRouterData = JSON.parse(inputRouterDataFile); -const expectedRouterData = JSON.parse(outputRouterDataFile); - -describe(`${name} Tests`, () => { - describe("Processor Tests", () => { - inputData.forEach((input, index) => { - it(`${name} - payload: ${index}`, async () => { - try { - const output = await transformer.process(input); - expect(output).toEqual(expectedData[index]); - } catch (error) { - expect(error.message).toEqual(expectedData[index].error); - } - }); - }); - }); - - describe("Router Tests", () => { - it("Payload", async () => { - const routerOutput = await transformer.processRouterDest(inputRouterData); - expect(routerOutput).toEqual(expectedRouterData); - }); - }); -}); diff --git a/test/__tests__/freshmarketer.test.js b/test/__tests__/freshmarketer.test.js deleted file mode 100644 index 5938938b6e..0000000000 --- a/test/__tests__/freshmarketer.test.js +++ /dev/null @@ -1,46 +0,0 @@ -const fs = require("fs"); -const path = require("path"); - -const integration = "freshmarketer"; -const name = "Freshmarketer"; -const version = "v0"; - -const transformer = require(`../../src/${version}/destinations/${integration}/transform`); - -// Processor Test Data -const testDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}.json`) -); -const testData = JSON.parse(testDataFile); - -// // Router Test Data -const inputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_input.json`) -); -const outputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_output.json`) -); -const inputRouterData = JSON.parse(inputRouterDataFile); -const expectedRouterData = JSON.parse(outputRouterDataFile); - -describe(`${name} Tests`, () => { - describe("Processor", () => { - testData.forEach((dataPoint, index) => { - it(`${index}. ${integration} - ${dataPoint.description}`, async () => { - try { - const output = await transformer.process(dataPoint.input); - expect(output).toEqual(dataPoint.output); - } catch (error) { - expect(error.message).toEqual(dataPoint.output.error); - } - }); - }); - }); - - describe("Router Tests", () => { - it("Payload", async () => { - const routerOutput = await transformer.processRouterDest(inputRouterData); - expect(routerOutput).toEqual(expectedRouterData); - }); - }); -}); diff --git a/test/__tests__/freshsales.test.js b/test/__tests__/freshsales.test.js deleted file mode 100644 index 2a9234133a..0000000000 --- a/test/__tests__/freshsales.test.js +++ /dev/null @@ -1,45 +0,0 @@ -const integration = "freshsales"; -const name = "Freshsales"; - -const fs = require("fs"); -const path = require("path"); -const version = "v0"; -const transformer = require(`../../src/${version}/destinations/${integration}/transform`); - -// Processor Test Data -const testDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}.json`) -); -const testData = JSON.parse(testDataFile); - -// Router Test Data -const inputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_input.json`) -); -const outputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_output.json`) -); -const inputRouterData = JSON.parse(inputRouterDataFile); -const expectedRouterData = JSON.parse(outputRouterDataFile); - -describe(`${name} Tests`, () => { - describe("Processor", () => { - testData.forEach((dataPoint, index) => { - it(`${index}. ${integration} - ${dataPoint.description}`, async () => { - try { - const output = await transformer.process(dataPoint.input); - expect(output).toEqual(dataPoint.output); - } catch (error) { - expect(error.message).toEqual(dataPoint.output.error); - } - }); - }); - }); - - describe("Router Tests", () => { - it("Payload", async () => { - const routerOutput = await transformer.processRouterDest(inputRouterData); - expect(routerOutput).toEqual(expectedRouterData); - }); - }); -}); diff --git a/test/integrations/destinations/clickup/network.ts b/test/integrations/destinations/clickup/network.ts new file mode 100644 index 0000000000..1a26209923 --- /dev/null +++ b/test/integrations/destinations/clickup/network.ts @@ -0,0 +1,247 @@ +export const networkCallsData = [ + { + httpReq: { + url: 'https://api.clickup.com/api/v2/list/correctListId123/field', + method: 'GET', + }, + httpRes: { + data: { + "fields": [ + { + "id": "19d3ac4e-2b1e-4569-b33e-ff86c7d94d6e", + "name": "Labels", + "type": "labels", + "type_config": { + "options": [ + { + "id": "32c81c1c-cf53-4829-92f5-0f0270d27a45", + "label": "Option 1", + "color": {} + }, + { + "id": "7e24f329-9dd9-4e68-b426-2c70af6f9347", + "label": "Option 2", + "color": {} + } + ] + }, + "date_created": "1661964865880", + "hide_from_guests": false, + "required": false + }, + { + "id": "22eaffee-ffec-4c3b-bdae-56e69d55eecd", + "name": "Payment Status", + "type": "drop_down", + "type_config": { + "default": 0, + "placeholder": {}, + "new_drop_down": true, + "options": [ + { + "id": "e109e36b-a052-4a31-af16-25da7324990f", + "name": "Sent Request", + "color": "#FF7FAB", + "orderindex": 0 + }, + { + "id": "3a3b4512-2896-44f7-8075-2ff37777fe24", + "name": "Quote sent", + "color": "#EA80FC", + "orderindex": 1 + }, + { + "id": "7afcb6fb-cec8-41d8-bf0c-039a9db28460", + "name": "Pending", + "color": "#ff7800", + "orderindex": 2 + }, + { + "id": "890ecf28-bdd4-4f53-92cc-bc4edb696fcd", + "name": "Payment Recieved", + "color": "#2ecd6f", + "orderindex": 3 + }, + { + "id": "e89f7dd7-fd24-4b32-ac4d-f174d8ca914f", + "name": "n/a", + "color": "#b5bcc2", + "orderindex": 4 + } + ] + }, + "date_created": "1660124553414", + "hide_from_guests": false, + "required": {} + }, + { + "id": "4b7a29be-e261-4340-8f3f-e6de838473e5", + "name": "Plan", + "type": "drop_down", + "type_config": { + "default": 0, + "placeholder": {}, + "new_drop_down": true, + "options": [ + { + "id": "4b9366a7-2592-4b7a-909a-ed4af705e27c", + "name": "Unlimited", + "color": "#02BCD4", + "orderindex": 0 + }, + { + "id": "c5032049-8c05-44e9-a000-3a071d457b8f", + "name": "Business", + "color": "#1bbc9c", + "orderindex": 1 + }, + { + "id": "9fb08801-1130-4650-8e2e-28578344ff3c", + "name": "Enterprise", + "color": "#2ecd6f", + "orderindex": 2 + } + ] + }, + "date_created": "1660124553414", + "hide_from_guests": false, + "required": {} + }, + { + "id": "4bfebc00-9d4a-40d1-aef8-5a87b610186c", + "name": "Contact Title", + "type": "text", + "type_config": {}, + "date_created": "1660124553414", + "hide_from_guests": false, + "required": {} + }, + { + "id": "666f74bf-6d87-41f3-8735-ccf0efe066dd", + "name": "Date", + "type": "date", + "type_config": {}, + "date_created": "1662379321069", + "hide_from_guests": false, + "required": false + }, + { + "id": "a5f5044a-cbad-4caf-bcbb-4cd32bd8db7c", + "name": "Industry", + "type": "drop_down", + "type_config": { + "default": 0, + "placeholder": {}, + "options": [ + { + "id": "75173398-257f-42b6-8bae-4cf767fa99ab", + "name": "Engineering", + "color": "#04A9F4", + "orderindex": 0 + }, + { + "id": "c7f9b6f5-cd98-4609-af10-68a8710cc1bf", + "name": "Retail", + "color": "#ff7800", + "orderindex": 1 + }, + { + "id": "dbe84940-b4e8-4a29-8491-e1aa5f2be4e2", + "name": "Hospitality", + "color": "#2ecd6f", + "orderindex": 2 + } + ] + }, + "date_created": "1660124553414", + "hide_from_guests": false, + "required": {} + }, + { + "id": "b01b32fd-94d3-43e6-9f31-2c855ff169cd", + "name": "Url", + "type": "url", + "type_config": {}, + "date_created": "1661970432587", + "hide_from_guests": false, + "required": false + }, + { + "id": "c9b83d91-b979-4b34-b4bd-88bf9cf2b9a6", + "name": "Phone Number", + "type": "phone", + "type_config": {}, + "date_created": "1661970795061", + "hide_from_guests": false, + "required": false + }, + { + "id": "d0201829-ddcd-4b97-b71f-0f9e672488f2", + "name": "Account Size", + "type": "number", + "type_config": {}, + "date_created": "1660124553414", + "hide_from_guests": false, + "required": {} + }, + { + "id": "ea6c1e48-2abf-4328-b228-79c213e147c8", + "name": "Location", + "type": "location", + "type_config": {}, + "date_created": "1662229589329", + "hide_from_guests": false, + "required": false + }, + { + "id": "ebe825fb-92de-41ce-a29c-25018da039b4", + "name": "Email", + "type": "email", + "type_config": {}, + "date_created": "1660124553414", + "hide_from_guests": false, + "required": {} + }, + { + "id": "f431cda3-a575-4a05-ba8d-583d9b6cb2df", + "name": "Rating", + "type": "emoji", + "type_config": { + "count": 5, + "code_point": "2b50" + }, + "date_created": "1661963909454", + "hide_from_guests": false, + "required": false + }, + { + "id": "ffbe4f03-cbc3-4077-8fea-9e5d08b4dceb", + "name": "Money In INR", + "type": "currency", + "type_config": { + "default": {}, + "precision": 2, + "currency_type": "INR" + }, + "date_created": "1661428276019", + "hide_from_guests": false, + "required": false + } + ] + }, + status: 200 + }, + }, + { + httpReq: { + url: 'https://api.clickup.com/api/v2/list/correctListId456/field', + method: 'GET', + }, + httpRes: { + data: { + "fields": [] + }, + status: 200 + }, + } +]; diff --git a/test/integrations/destinations/clickup/processor/data.ts b/test/integrations/destinations/clickup/processor/data.ts new file mode 100644 index 0000000000..296f0fb8e1 --- /dev/null +++ b/test/integrations/destinations/clickup/processor/data.ts @@ -0,0 +1,829 @@ +export const data = [ + { + "name": "clickup", + "description": "Invalid priority", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiToken": "pk_123", + "listId": "correctListId123" + }, + "ID": "clickup-1234" + }, + "message": { + "type": "track", + "event": "Product Viewed", + "properties": { + "priority": 0 + }, + "context": {}, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Invalid value specified for priority. Value must be Integer and in range \"[1,4]\"", + "statTags": { + "destType": "CLICKUP", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "clickup", + "description": "Custom field: Invalid phone number", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiToken": "pk_123", + "listId": "correctListId123", + "keyToCustomFieldName": [ + { + "from": "phone", + "to": "Phone Number" + } + ] + }, + "ID": "clickup-1234" + }, + "message": { + "type": "track", + "event": "Product Viewed", + "properties": { + "phone": "9999999999" + }, + "context": {}, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "The provided phone number is invalid", + "statTags": { + "destType": "CLICKUP", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "clickup", + "description": "Custom field: Invalid email", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiToken": "pk_123", + "listId": "correctListId123", + "keyToCustomFieldName": [ + { + "from": "email", + "to": "Email" + } + ] + }, + "ID": "clickup-1234" + }, + "message": { + "type": "track", + "event": "Product Viewed", + "properties": { + "email": "test.com" + }, + "context": {}, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "The provided email is invalid", + "statTags": { + "destType": "CLICKUP", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "clickup", + "description": "Custom field: Invalid url", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiToken": "pk_123", + "listId": "correctListId123", + "keyToCustomFieldName": [ + { + "from": "url", + "to": "Url" + } + ] + }, + "ID": "clickup-1234" + }, + "message": { + "type": "track", + "event": "Product Viewed", + "properties": { + "url": "www.test.com" + }, + "context": {}, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "The provided url is invalid", + "statTags": { + "destType": "CLICKUP", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "clickup", + "description": "Custom field: Invalid location latitude", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiToken": "pk_123", + "listId": "correctListId123", + "keyToCustomFieldName": [ + { + "from": "location", + "to": "Location" + } + ] + }, + "ID": "clickup-1234" + }, + "message": { + "type": "track", + "event": "Product Viewed", + "properties": { + "location": { + "lat": -100, + "lng": 124, + "formattedAddress": "Gold Coast QLD, Australia" + } + }, + "context": {}, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Invalid value specified for latitude. Latitude must be in range \"[-90, 90]\"", + "statTags": { + "destType": "CLICKUP", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "clickup", + "description": "Custom field: Invalid rating", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiToken": "pk_123", + "listId": "correctListId123", + "keyToCustomFieldName": [ + { + "from": "rating", + "to": "Rating" + } + ] + }, + "ID": "clickup-1234" + }, + "message": { + "type": "track", + "event": "Product Viewed", + "properties": { + "rating": "7" + }, + "context": {}, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Invalid value specified for rating. Value must be in range \"[0,5]\"", + "statTags": { + "destType": "CLICKUP", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "clickup", + "description": "Creating task with valid custom fields values", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiToken": "pk_123", + "listId": "correctListId123", + "keyToCustomFieldName": [ + { + "from": "industry", + "to": "Industry" + }, + { + "from": "Payment Status", + "to": "Payment Status" + }, + { + "from": "labelKey", + "to": "Labels" + }, + { + "from": "locationKey", + "to": "Location" + }, + { + "from": "phone", + "to": "Phone Number" + }, + { + "from": "email", + "to": "Email" + }, + { + "from": "url", + "to": "Url" + }, + { + "from": "rating", + "to": "Rating" + }, + { + "from": "plan", + "to": "Plan" + }, + { + "from": "contactTitle", + "to": "Contact Title" + }, + { + "from": "date", + "to": "Date" + } + ] + }, + "ID": "clickup-1234" + }, + "message": { + "type": "track", + "event": "Product Viewed", + "properties": { + "description": "Creating task with valid custom fields values", + "tags": [ + "testing", + "custom fields" + ], + "timeEstimate": 10800000, + "status": "Ready", + "priority": 1, + "dueDate": "2022-02-25T13:39:21.032Z", + "includeDueDateTime": true, + "startDate": "2022-01-20T13:39:21.032Z", + "includeStartDateTime": "true", + "notifyAll": false, + "industry": "Retail", + "Payment Status": "Pending", + "labelKey": [ + "option 1", + "option 2", + "option 3" + ], + "locationKey": { + "lat": -20, + "lng": 124, + "formattedAddress": "Gold Coast QLD, Australia" + }, + "phone": "+12233445567", + "email": "test123@example.com", + "url": "https://www.rudderstack.com/", + "rating": 3, + "plan": "Business", + "contactTitle": "VP of Operations", + "date": "2022-02-25T13:39:21.032Z" + }, + "context": {}, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.clickup.com/api/v2/list/correctListId123/task", + "headers": { + "Content-Type": "application/json", + "Authorization": "pk_123" + }, + "params": {}, + "body": { + "JSON": { + "name": "Product Viewed", + "description": "Creating task with valid custom fields values", + "tags": [ + "testing", + "custom fields" + ], + "time_estimate": 10800000, + "status": "Ready", + "priority": 1, + "due_date": 1645796361032, + "due_date_time": true, + "start_date": 1642685961032, + "start_date_time": "true", + "notify_all": false, + "custom_fields": [ + { + "id": "a5f5044a-cbad-4caf-bcbb-4cd32bd8db7c", + "value": "c7f9b6f5-cd98-4609-af10-68a8710cc1bf" + }, + { + "id": "22eaffee-ffec-4c3b-bdae-56e69d55eecd", + "value": "7afcb6fb-cec8-41d8-bf0c-039a9db28460" + }, + { + "id": "19d3ac4e-2b1e-4569-b33e-ff86c7d94d6e", + "value": [ + "32c81c1c-cf53-4829-92f5-0f0270d27a45", + "7e24f329-9dd9-4e68-b426-2c70af6f9347" + ] + }, + { + "id": "ea6c1e48-2abf-4328-b228-79c213e147c8", + "value": { + "location": { + "lat": -20, + "lng": 124 + }, + "formatted_address": "Gold Coast QLD, Australia" + } + }, + { + "id": "c9b83d91-b979-4b34-b4bd-88bf9cf2b9a6", + "value": "+12233445567" + }, + { + "id": "ebe825fb-92de-41ce-a29c-25018da039b4", + "value": "test123@example.com" + }, + { + "id": "b01b32fd-94d3-43e6-9f31-2c855ff169cd", + "value": "https://www.rudderstack.com/" + }, + { + "id": "f431cda3-a575-4a05-ba8d-583d9b6cb2df", + "value": 3 + }, + { + "id": "4b7a29be-e261-4340-8f3f-e6de838473e5", + "value": "c5032049-8c05-44e9-a000-3a071d457b8f" + }, + { + "id": "4bfebc00-9d4a-40d1-aef8-5a87b610186c", + "value": "VP of Operations" + }, + { + "id": "666f74bf-6d87-41f3-8735-ccf0efe066dd", + "value": 1645796361032 + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "clickup", + "description": "Creating task with assignees", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiToken": "pk_123", + "listId": "correctListId123" + }, + "ID": "clickup-1234" + }, + "message": { + "type": "track", + "event": "Product Viewed", + "properties": { + "taskName": "Transformer Testing" + }, + "context": { + "externalId": [ + { + "type": "clickUpAssigneeId", + "id": 61205104 + }, + { + "type": "clickUpAssigneeId", + "id": 61217234 + }, + { + "type": "clickUpAssigneeId", + "id": 61228575 + } + ] + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.clickup.com/api/v2/list/correctListId123/task", + "headers": { + "Content-Type": "application/json", + "Authorization": "pk_123" + }, + "params": {}, + "body": { + "JSON": { + "name": "Transformer Testing", + "assignees": [ + 61205104, + 61217234, + 61228575 + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "clickup", + "description": "Event filtering : Sending non whitelisted event when some events are whitelisted", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiToken": "pk_123", + "listId": "correctListId123", + "whitelistedEvents": [ + { + "eventName": "Anonymous Page Visit" + }, + { + "eventName": "Product Viewed" + }, + { + "eventName": "" + } + ] + }, + "ID": "clickup-1234" + }, + "message": { + "type": "track", + "event": "Credit Card Added", + "context": {}, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "The event was discarded as it was not allow listed in the destination configuration", + "statTags": { + "destType": "CLICKUP", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "clickup", + "description": "Event filtering : No event is whitelisted", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiToken": "pk_123", + "listId": "correctListId123", + "whitelistedEvents": [ + { + "eventName": "" + }, + { + "eventName": "" + }, + { + "eventName": "" + } + ] + }, + "ID": "clickup-1234" + }, + "message": { + "type": "track", + "event": "Credit Card Added", + "context": {}, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "The event was discarded as it was not allow listed in the destination configuration", + "statTags": { + "destType": "CLICKUP", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "clickup", + "description": "Creating task using listId from externalId array", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiToken": "pk_123", + "listId": "correctListId123" + }, + "ID": "clickup-1234" + }, + "message": { + "type": "track", + "event": "anonymous page visit", + "context": { + "externalId": [ + { + "type": "clickUpListId", + "id": "correctListId456" + } + ] + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.clickup.com/api/v2/list/correctListId456/task", + "headers": { + "Content-Type": "application/json", + "Authorization": "pk_123" + }, + "params": {}, + "body": { + "JSON": { + "name": "anonymous page visit" + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + } +] \ No newline at end of file diff --git a/test/integrations/destinations/clickup/router/data.ts b/test/integrations/destinations/clickup/router/data.ts new file mode 100644 index 0000000000..8888024b4f --- /dev/null +++ b/test/integrations/destinations/clickup/router/data.ts @@ -0,0 +1,471 @@ +export const data = [ + { + name: 'clickup', + description: 'Test 0', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + "description": "Creating task using listId from externalId array", + "destination": { + "Config": { + "apiToken": "pk_123", + "listId": "correctListId123" + }, + "ID": "clickup-1234" + }, + "metadata": { + "jobId": 1 + }, + "message": { + "type": "track", + "event": "anonymous page visit", + "context": { + "externalId": [{ "type": "clickUpListId", "id": "correctListId456" }] + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c" + } + }, + { + "description": "Creating task with assignees", + "destination": { + "Config": { + "apiToken": "pk_123", + "listId": "correctListId123" + }, + "ID": "clickup-1234" + }, + "metadata": { + "jobId": 2 + }, + "message": { + "type": "track", + "event": "Product Viewed", + "properties": { + "taskName": "Transformer Testing" + }, + "context": { + "externalId": [ + { + "type": "clickUpAssigneeId", + "id": 61205104 + }, + { + "type": "clickUpAssigneeId", + "id": 61217234 + }, + { + "type": "clickUpAssigneeId", + "id": 61228575 + } + ] + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c" + } + }, + { + "description": "Creating task with valid custom fields values", + "destination": { + "Config": { + "apiToken": "pk_123", + "listId": "correctListId123", + "keyToCustomFieldName": [ + { + "from": "industry", + "to": "Industry" + }, + { + "from": "Payment Status", + "to": "Payment Status" + }, + { + "from": "labelKey", + "to": "Labels" + }, + { + "from": "locationKey", + "to": "Location" + }, + { + "from": "phone", + "to": "Phone Number" + }, + { + "from": "email", + "to": "Email" + }, + { + "from": "url", + "to": "Url" + }, + { + "from": "rating", + "to": "Rating" + }, + { + "from": "plan", + "to": "Plan" + }, + { + "from": "contactTitle", + "to": "Contact Title" + }, + { + "from": "date", + "to": "Date" + } + ] + }, + "ID": "clickup-1234" + }, + "metadata": { + "jobId": 3 + }, + "message": { + "type": "track", + "event": "Product Viewed", + "properties": { + "description": "Creating task with valid custom fields values", + "tags": ["testing", "custom fields"], + "timeEstimate": 10800000, + "status": "Ready", + "priority": 1, + "dueDate": "2022-02-25T13:39:21.032Z", + "includeDueDateTime": true, + "startDate": "2022-01-20T13:39:21.032Z", + "includeStartDateTime": "true", + "notifyAll": false, + "industry": "Retail", + "Payment Status": "Pending", + "labelKey": ["option 1", "option 2", "option 3"], + "locationKey": { + "lat": -20, + "lng": 124, + "formattedAddress": "Gold Coast QLD, Australia" + }, + "phone": "+12233445567", + "email": "test123@example.com", + "url": "https://www.rudderstack.com/", + "rating": 3, + "plan": "Business", + "contactTitle": "VP of Operations", + "date": "2022-02-25T13:39:21.032Z" + }, + "context": {}, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c" + } + }, + { + "description": "Custom field: Invalid location latitude", + "destination": { + "Config": { + "apiToken": "pk_123", + "listId": "correctListId123", + "keyToCustomFieldName": [ + { + "from": "location", + "to": "Location" + } + ] + }, + "ID": "clickup-1234" + }, + "metadata": { + "jobId": 4 + }, + "message": { + "type": "track", + "event": "Product Viewed", + "properties": { + "location": { + "lat": -100, + "lng": 124, + "formattedAddress": "Gold Coast QLD, Australia" + } + }, + "context": {}, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c" + } + } + ] + , + destType: 'clickup', + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + "batched": false, + "batchedRequest": { + "body": { + "FORM": {}, + "JSON": { + "name": "anonymous page visit" + }, + "JSON_ARRAY": {}, + "XML": {} + }, + "endpoint": "https://api.clickup.com/api/v2/list/correctListId456/task", + "files": {}, + "headers": { + "Authorization": "pk_123", + "Content-Type": "application/json" + }, + "method": "POST", + "params": {}, + "type": "REST", + "version": "1" + }, + "destination": { + "Config": { + "apiToken": "pk_123", + "listId": "correctListId123" + }, + "ID": "clickup-1234" + }, + "metadata": [ + { + "jobId": 1 + } + ], + "statusCode": 200 + }, + { + "batched": false, + "batchedRequest": { + "body": { + "FORM": {}, + "JSON": { + "assignees": [61205104, 61217234, 61228575], + "name": "Transformer Testing" + }, + "JSON_ARRAY": {}, + "XML": {} + }, + "endpoint": "https://api.clickup.com/api/v2/list/correctListId123/task", + "files": {}, + "headers": { + "Authorization": "pk_123", + "Content-Type": "application/json" + }, + "method": "POST", + "params": {}, + "type": "REST", + "version": "1" + }, + "destination": { + "Config": { + "apiToken": "pk_123", + "listId": "correctListId123" + }, + "ID": "clickup-1234" + }, + "metadata": [ + { + "jobId": 2 + } + ], + "statusCode": 200 + }, + { + "batched": false, + "batchedRequest": { + "body": { + "FORM": {}, + "JSON": { + "custom_fields": [ + { + "id": "a5f5044a-cbad-4caf-bcbb-4cd32bd8db7c", + "value": "c7f9b6f5-cd98-4609-af10-68a8710cc1bf" + }, + { + "id": "22eaffee-ffec-4c3b-bdae-56e69d55eecd", + "value": "7afcb6fb-cec8-41d8-bf0c-039a9db28460" + }, + { + "id": "19d3ac4e-2b1e-4569-b33e-ff86c7d94d6e", + "value": [ + "32c81c1c-cf53-4829-92f5-0f0270d27a45", + "7e24f329-9dd9-4e68-b426-2c70af6f9347" + ] + }, + { + "id": "ea6c1e48-2abf-4328-b228-79c213e147c8", + "value": { + "formatted_address": "Gold Coast QLD, Australia", + "location": { + "lat": -20, + "lng": 124 + } + } + }, + { + "id": "c9b83d91-b979-4b34-b4bd-88bf9cf2b9a6", + "value": "+12233445567" + }, + { + "id": "ebe825fb-92de-41ce-a29c-25018da039b4", + "value": "test123@example.com" + }, + { + "id": "b01b32fd-94d3-43e6-9f31-2c855ff169cd", + "value": "https://www.rudderstack.com/" + }, + { + "id": "f431cda3-a575-4a05-ba8d-583d9b6cb2df", + "value": 3 + }, + { + "id": "4b7a29be-e261-4340-8f3f-e6de838473e5", + "value": "c5032049-8c05-44e9-a000-3a071d457b8f" + }, + { + "id": "4bfebc00-9d4a-40d1-aef8-5a87b610186c", + "value": "VP of Operations" + }, + { + "id": "666f74bf-6d87-41f3-8735-ccf0efe066dd", + "value": 1645796361032 + } + ], + "name": "Product Viewed", + "description": "Creating task with valid custom fields values", + "tags": ["testing", "custom fields"], + "time_estimate": 10800000, + "status": "Ready", + "priority": 1, + "due_date": 1645796361032, + "due_date_time": true, + "start_date": 1642685961032, + "start_date_time": "true", + "notify_all": false + }, + "JSON_ARRAY": {}, + "XML": {} + }, + "endpoint": "https://api.clickup.com/api/v2/list/correctListId123/task", + "files": {}, + "headers": { + "Authorization": "pk_123", + "Content-Type": "application/json" + }, + "method": "POST", + "params": {}, + "type": "REST", + "version": "1" + }, + "destination": { + "Config": { + "apiToken": "pk_123", + "keyToCustomFieldName": [ + { + "from": "industry", + "to": "Industry" + }, + { + "from": "Payment Status", + "to": "Payment Status" + }, + { + "from": "labelKey", + "to": "Labels" + }, + { + "from": "locationKey", + "to": "Location" + }, + { + "from": "phone", + "to": "Phone Number" + }, + { + "from": "email", + "to": "Email" + }, + { + "from": "url", + "to": "Url" + }, + { + "from": "rating", + "to": "Rating" + }, + { + "from": "plan", + "to": "Plan" + }, + { + "from": "contactTitle", + "to": "Contact Title" + }, + { + "from": "date", + "to": "Date" + } + ], + "listId": "correctListId123" + }, + "ID": "clickup-1234" + }, + "metadata": [ + { + "jobId": 3 + } + ], + "statusCode": 200 + }, + { + "destination": { + "Config": { + "apiToken": "pk_123", + "listId": "correctListId123", + "keyToCustomFieldName": [ + { + "from": "location", + "to": "Location" + } + ] + }, + "ID": "clickup-1234" + }, + "batched": false, + "error": "Invalid value specified for latitude. Latitude must be in range \"[-90, 90]\"", + "metadata": [ + { + "jobId": 4 + } + ], + "statTags": { + "destType": "CLICKUP", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "router", + "implementation": "native", + "module": "destination", + }, + "statusCode": 400 + } + ] + , + }, + }, + }, + }, +]; diff --git a/test/integrations/destinations/custify/network.ts b/test/integrations/destinations/custify/network.ts new file mode 100644 index 0000000000..4af6545f9f --- /dev/null +++ b/test/integrations/destinations/custify/network.ts @@ -0,0 +1,36 @@ +export const networkCallsData = [ + { + httpReq: { + url: 'https://api.custify.com/company', + method: 'POST', + }, + httpRes: { + data: { + "company_id": "6", + "name": "Pizzeria Presto", + "signed_up_at": "2019-05-30T12:00:00.000Z", + "size": 15, + "website": "www.pizzeriapresto.com", + "industry": "Restaurant", + "plan": "Platinum", + "monthly_revenue": 1234567, + "churned": false, + "owners_csm": "john.doe@mail.com", + "owners_account": "john.doe@mail.com", + "parent_companies": [ + { + "id": "5ec50c9829d3c17c7cf455f2" + }, + { + "id": "5ec50c9829d3c17c7cf457f2" + } + ], + "custom_attributes": { + "restaurants": 5, + "custom": "template" + } + }, + status: 200 + }, + } +]; diff --git a/test/integrations/destinations/custify/processor/data.ts b/test/integrations/destinations/custify/processor/data.ts new file mode 100644 index 0000000000..f3a3448b86 --- /dev/null +++ b/test/integrations/destinations/custify/processor/data.ts @@ -0,0 +1,695 @@ +export const data = [ + { + "name": "custify", + "description": "Identify Call with all traits and adding to company", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "apiKey_key_test_001", + "sendAnonymousId": false + }, + "ID": "custify-1234" + }, + "message": { + "type": "identify", + "userId": "user_1234", + "context": { + "traits": { + "email": "user111@gmail.com", + "firstName": "New", + "lastName": "User", + "phone": 9830311522, + "sessionCount": 23, + "unsubscribedFromEmails": false, + "unsubscribedFromCalls": false, + "signed_up_at": "2022-04-27T13:56:13.012Z", + "custom_prop1": "custom_value1", + "custom_prop2": 123, + "custom_prop3": false, + "custom_prop4": { + "test": "test" + }, + "custom_prop5": [ + 1, + 3, + 4 + ], + "createdAt": "2022-04-27T13:56:13.012Z", + "company": { + "id": "company_123" + } + } + }, + "timestamp": "2022-04-27T13:56:13.012Z", + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.custify.com/people", + "headers": { + "Content-Type": "application/json", + "Authorization": "Bearer apiKey_key_test_001", + "Accept": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "user_id": "user_1234", + "email": "user111@gmail.com", + "phone": 9830311522, + "session_count": 23, + "unsubscribed_from_emails": false, + "unsubscribed_from_calls": false, + "signed_up_at": "2022-04-27T13:56:13.012Z", + "custom_attributes": { + "firstName": "New", + "lastName": "User", + "sessionCount": 23, + "unsubscribedFromEmails": false, + "unsubscribedFromCalls": false, + "custom_prop1": "custom_value1", + "custom_prop2": 123, + "custom_prop3": false, + "createdAt": "2022-04-27T13:56:13.012Z" + }, + "name": "New User", + "companies": [ + { + "company_id": "company_123", + "remove": false + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "user_1234" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "custify", + "description": "Identify Call removing the user from company", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "apiKey_key_test_001", + "sendAnonymousId": false + }, + "ID": "custify-1234" + }, + "message": { + "type": "identify", + "userId": "user_1234", + "context": { + "traits": { + "email": "user111@gmail.com", + "firstName": "New", + "lastName": "User", + "phone": 9830311522, + "sessionCount": 23, + "unsubscribedFromEmails": false, + "unsubscribedFromCalls": false, + "signed_up_at": "2022-04-27T13:56:13.012Z", + "custom_prop1": "custom_value1", + "custom_prop2": 123, + "custom_prop3": false, + "custom_prop4": { + "test": "test" + }, + "custom_prop5": [ + 1, + 3, + 4 + ], + "createdAt": "2022-04-27T13:56:13.012Z", + "company": { + "id": "company_123", + "remove": true + } + } + }, + "timestamp": "2022-04-27T13:56:13.012Z", + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.custify.com/people", + "headers": { + "Content-Type": "application/json", + "Authorization": "Bearer apiKey_key_test_001", + "Accept": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "user_id": "user_1234", + "email": "user111@gmail.com", + "phone": 9830311522, + "session_count": 23, + "unsubscribed_from_emails": false, + "unsubscribed_from_calls": false, + "signed_up_at": "2022-04-27T13:56:13.012Z", + "custom_attributes": { + "firstName": "New", + "lastName": "User", + "sessionCount": 23, + "unsubscribedFromEmails": false, + "unsubscribedFromCalls": false, + "custom_prop1": "custom_value1", + "custom_prop2": 123, + "custom_prop3": false, + "createdAt": "2022-04-27T13:56:13.012Z" + }, + "name": "New User", + "companies": [ + { + "company_id": "company_123", + "remove": true + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "user_1234" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "custify", + "description": "Identify Call without userId and email and anoymousId", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "apiKey_key_test_001", + "sendAnonymousId": false + }, + "ID": "custify-1234" + }, + "message": { + "type": "identify", + "context": { + "traits": { + "firstName": "New", + "lastName": "User", + "phone": 9830311522, + "sessionCount": 23, + "unsubscribedFromEmails": false, + "unsubscribedFromCalls": false, + "signed_up_at": "2022-04-27T13:56:13.012Z", + "custom_prop1": "custom_value1", + "custom_prop2": 123, + "custom_prop3": false, + "custom_prop4": { + "test": "test" + }, + "custom_prop5": [ + 1, + 3, + 4 + ], + "createdAt": "2022-04-27T13:56:13.012Z", + "company": { + "id": "company_123", + "remove": true + } + } + }, + "timestamp": "2022-04-27T13:56:13.012Z", + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Email or userId is mandatory", + "statTags": { + "destType": "CUSTIFY", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "custify", + "description": "Identify Call without userId and email and sendAnonymous is false", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "apiKey_key_test_001", + "sendAnonymousId": false + }, + "ID": "custify-1234" + }, + "message": { + "type": "identify", + "context": { + "traits": { + "firstName": "New", + "lastName": "User", + "phone": 9830311522, + "sessionCount": 23, + "unsubscribedFromEmails": false, + "unsubscribedFromCalls": false, + "signed_up_at": "2022-04-27T13:56:13.012Z", + "custom_prop1": "custom_value1", + "custom_prop2": 123, + "custom_prop3": false, + "custom_prop4": { + "test": "test" + }, + "custom_prop5": [ + 1, + 3, + 4 + ], + "createdAt": "2022-04-27T13:56:13.012Z", + "company": { + "id": "company_123", + "remove": true + } + } + }, + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "timestamp": "2022-04-27T13:56:13.012Z", + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Email or userId is mandatory", + "statTags": { + "destType": "CUSTIFY", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "custify", + "description": "Identify Call without userId and email and sendAnonymous is true", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "apiKey_key_test_001", + "sendAnonymousId": true + }, + "ID": "custify-1234" + }, + "message": { + "type": "identify", + "context": { + "traits": { + "firstName": "New", + "lastName": "User", + "phone": 9830311522, + "sessionCount": 23, + "unsubscribedFromEmails": false, + "unsubscribedFromCalls": false, + "signed_up_at": "2022-04-27T13:56:13.012Z", + "custom_prop1": "custom_value1", + "custom_prop2": 123, + "custom_prop3": false, + "custom_prop4": { + "test": "test" + }, + "custom_prop5": [ + 1, + 3, + 4 + ], + "createdAt": "2022-04-27T13:56:13.012Z", + "company": { + "id": "company_123", + "remove": true + } + } + }, + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "timestamp": "2022-04-27T13:56:13.012Z", + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.custify.com/people", + "headers": { + "Content-Type": "application/json", + "Authorization": "Bearer apiKey_key_test_001", + "Accept": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "phone": 9830311522, + "session_count": 23, + "unsubscribed_from_emails": false, + "unsubscribed_from_calls": false, + "signed_up_at": "2022-04-27T13:56:13.012Z", + "custom_attributes": { + "firstName": "New", + "lastName": "User", + "sessionCount": 23, + "unsubscribedFromEmails": false, + "unsubscribedFromCalls": false, + "custom_prop1": "custom_value1", + "custom_prop2": 123, + "custom_prop3": false, + "createdAt": "2022-04-27T13:56:13.012Z" + }, + "user_id": "bf412108-0357-4330-b119-7305e767823c", + "name": "New User", + "companies": [ + { + "company_id": "company_123", + "remove": true + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "bf412108-0357-4330-b119-7305e767823c" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "custify", + "description": "Track call with all properties", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "apiKey_key_test_001", + "sendAnonymousId": false + }, + "ID": "custify-1234" + }, + "message": { + "type": "track", + "event": "Order Completed Version 2", + "sentAt": "2021-08-26T14:16:47.321Z", + "userId": "user_111", + "context": { + "library": { + "name": "analytics-node", + "version": "1.0.3" + }, + "traits": { + "email": "user111@gmail.com" + }, + "page": { + "url": "https://www.website.com/product/path" + } + }, + "rudderId": "70612f39-0607-45bb-8236-bf0995fde4fa", + "_metadata": { + "nodeVersion": "10.24.1" + }, + "messageId": "node-84952e4eb9c6debbda735c49d08a8b31-fcbfed6a-38cf-42c5-881c-f590f59311b1", + "properties": { + "product": "Cube", + "revenue": 9002, + "organization_id": "company_123" + }, + "originalTimestamp": "2021-08-26T14:16:47.317Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.custify.com/event", + "headers": { + "Content-Type": "application/json", + "Authorization": "Bearer apiKey_key_test_001", + "Accept": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "user_id": "user_111", + "email": "user111@gmail.com", + "name": "Order Completed Version 2", + "created_at": "2021-08-26T14:16:47.317Z", + "company_id": "company_123", + "metadata": { + "product": "Cube", + "revenue": 9002, + "organization_id": "company_123", + "user_id": "user_111" + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "user_111" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "custify", + "description": "Group call with all fields success scenario", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "apiKey_key_test_001", + "sendAnonymousId": false + }, + "ID": "custify-1234" + }, + "message": { + "type": "group", + "userId": "user_111", + "groupId": "company_222", + "traits": { + "name": "Absolute Company", + "industry": " Absolute", + "employees": 121, + "size": 100, + "website": "www.rudder.com", + "plan": "GOLD", + "monthly_revenue": 8000, + "churned": false, + "test_att1": "test_att_val1" + }, + "context": { + "traits": { + "firstName": "Absolute", + "lastName": "User", + "phone": 9830311522, + "session_count": 23, + "signed_up_at": "2022-04-27T13:56:13.012Z", + "custom_prop1": "custom_value1", + "custom_prop2": 123, + "custom_prop3": false, + "custom_prop4": { + "test": "test" + }, + "custom_prop5": [ + 1, + 3, + 4 + ], + "createdAt": "2022-04-27T13:56:13.012Z" + }, + "ip": "14.5.67.21", + "library": { + "name": "http" + } + }, + "timestamp": "2020-01-21T00:21:34.208Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.custify.com/people", + "headers": { + "Content-Type": "application/json", + "Authorization": "Bearer apiKey_key_test_001", + "Accept": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "user_id": "user_111", + "phone": 9830311522, + "signed_up_at": "2020-01-21T00:21:34.208Z", + "custom_attributes": { + "firstName": "Absolute", + "lastName": "User", + "custom_prop1": "custom_value1", + "custom_prop2": 123, + "custom_prop3": false, + "createdAt": "2022-04-27T13:56:13.012Z" + }, + "name": "Absolute User", + "companies": [ + { + "company_id": "company_222", + "remove": false + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "user_111" + }, + "statusCode": 200 + } + ] + } + } + } +] \ No newline at end of file diff --git a/test/integrations/destinations/custify/router/data.ts b/test/integrations/destinations/custify/router/data.ts new file mode 100644 index 0000000000..12639192f8 --- /dev/null +++ b/test/integrations/destinations/custify/router/data.ts @@ -0,0 +1,242 @@ +export const data = [ + { + name: 'custify', + description: 'Test 0', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + "description": "Group callw with all parameters", + "destination": { + "Config": { + "apiKey": "apiKey_key_test_001", + "sendAnonymousId": false + }, + "ID": "custify-1234" + }, + "metadata": { + "jobId": 1 + }, + "message": { + "type": "group", + "userId": "user_111", + "groupId": "company_222", + "traits": { + "name": "Absolute Company", + "industry": " Absolute", + "employees": 121, + "size": 100, + "website": "www.rudder.com", + "plan": "GOLD", + "monthly_revenue": 8000, + "churned": false, + "test_att1": "test_att_val1" + }, + "context": { + "traits": { + "firstName": "Absolute", + "lastName": "User", + "phone": 9830311522, + "session_count": 23, + "signed_up_at": "2022-04-27T13:56:13.012Z", + "custom_prop1": "custom_value1", + "custom_prop2": 123, + "custom_prop3": false, + "custom_prop4": { + "test": "test" + }, + "custom_prop5": [1, 3, 4], + "createdAt": "2022-04-27T13:56:13.012Z" + }, + "ip": "14.5.67.21", + "library": { + "name": "http" + } + }, + "timestamp": "2020-01-21T00:21:34.208Z" + } + }, + { + "description": "Identify with all parameters", + "destination": { + "Config": { + "apiKeyToken": "pk_123", + "listId": "correctListId123" + }, + "ID": "custify-1234" + }, + "metadata": { + "jobId": 2 + }, + "message": { + "type": "identify", + "userId": "user_1234", + "context": { + "traits": { + "email": "user111@gmail.com", + "firstName": "New", + "lastName": "User", + "phone": 9830311522, + "sessionCount": 23, + "unsubscribedFromEmails": false, + "unsubscribedFromCalls": false, + + "signed_up_at": "2022-04-27T13:56:13.012Z", + "custom_prop1": "custom_value1", + "custom_prop2": 123, + "custom_prop3": false, + "custom_prop4": { "test": "test" }, + "custom_prop5": [1, 3, 4], + "createdAt": "2022-04-27T13:56:13.012Z", + "company": { + "id": "company_123" + } + } + }, + "timestamp": "2022-04-27T13:56:13.012Z", + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c" + } + ], + destType: 'custify', + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + "batchedRequest": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.custify.com/people", + "headers": { + "Content-Type": "application/json", + "Authorization": "Bearer apiKey_key_test_001", + "Accept": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "user_id": "user_111", + "phone": 9830311522, + "signed_up_at": "2020-01-21T00:21:34.208Z", + "custom_attributes": { + "firstName": "Absolute", + "lastName": "User", + "custom_prop1": "custom_value1", + "custom_prop2": 123, + "custom_prop3": false, + "createdAt": "2022-04-27T13:56:13.012Z" + }, + "name": "Absolute User", + "companies": [ + { + "company_id": "company_222", + "remove": false + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "user_111" + }, + "metadata": [ + { + "jobId": 1 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "Config": { + "apiKey": "apiKey_key_test_001", + "sendAnonymousId": false + }, + "ID": "custify-1234" + } + }, + { + "batchedRequest": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.custify.com/people", + "headers": { + "Content-Type": "application/json", + "Authorization": "Bearer undefined", + "Accept": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "user_id": "user_1234", + "email": "user111@gmail.com", + "phone": 9830311522, + "session_count": 23, + "unsubscribed_from_emails": false, + "unsubscribed_from_calls": false, + "signed_up_at": "2022-04-27T13:56:13.012Z", + "custom_attributes": { + "firstName": "New", + "lastName": "User", + "sessionCount": 23, + "unsubscribedFromEmails": false, + "unsubscribedFromCalls": false, + "custom_prop1": "custom_value1", + "custom_prop2": 123, + "custom_prop3": false, + "createdAt": "2022-04-27T13:56:13.012Z" + }, + "name": "New User", + "companies": [ + { + "company_id": "company_123", + "remove": false + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "user_1234" + }, + "metadata": [ + { + "jobId": 2 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "Config": { + "apiKeyToken": "pk_123", + "listId": "correctListId123" + }, + "ID": "custify-1234" + } + } + ], + }, + }, + }, + }, +]; diff --git a/test/integrations/destinations/delighted/network.ts b/test/integrations/destinations/delighted/network.ts new file mode 100644 index 0000000000..15b0a414e6 --- /dev/null +++ b/test/integrations/destinations/delighted/network.ts @@ -0,0 +1,30 @@ +export const networkCallsData = [ + { + httpReq: { + url: 'https://api.delighted.com/v1/people.json', + method: 'GET', + headers: { Authorization: `Basic ZHVtbXlBcGlLZXk=` }, + params: { + email: "identified_user@email.com" + } + }, + httpRes: { + data: ["user data"], + status: 200 + }, + }, + { + httpReq: { + url: 'https://api.delighted.com/v1/people.json', + method: 'GET', + headers: { Authorization: `Basic ZHVtbXlBcGlLZXlmb3JmYWlsdXJl` }, + params: { + email: "unidentified_user@email.com" + } + }, + httpRes: { + data: [], + status: 200 + }, + } +]; diff --git a/test/integrations/destinations/delighted/processor/data.ts b/test/integrations/destinations/delighted/processor/data.ts new file mode 100644 index 0000000000..1bf6a28354 --- /dev/null +++ b/test/integrations/destinations/delighted/processor/data.ts @@ -0,0 +1,937 @@ +export const data = [ + { + "name": "delighted", + "description": "Test 0", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "channel": "email", + "delay": 0, + "eventNamesSettings": [ + { + "event": "" + } + ] + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "type": "identify", + "userId": "abc@123.com", + "traits": { + "firstName": "James", + "lastName": "Doe", + "phone": "+91237416221", + "last_sent_at": "1626698350" + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.delighted.com/v1/people.json", + "headers": { + "Authorization": "Basic ZHVtbXlBcGlLZXk=", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {}, + "JSON": { + "email": "abc@123.com", + "send": false, + "channel": "email", + "delay": 0, + "name": "James Doe", + "phone_number": "+91237416221", + "last_sent_at": "1626698350" + } + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "delighted", + "description": "Test 1", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "channel": "email", + "delay": 0, + "eventNamesSettings": [ + { + "event": "" + } + ] + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "type": "alias", + "previousId": "123@abc.com", + "userId": "abc@123.com", + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {}, + "JSON": { + "email": "123@abc.com", + "email_update": "abc@123.com" + } + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": {}, + "headers": { + "Authorization": "Basic ZHVtbXlBcGlLZXk=", + "Content-Type": "application/json" + }, + "version": "1", + "endpoint": "https://api.delighted.com/v1/people.json", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "delighted", + "description": "Test 2", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "channel": "email", + "delay": 0, + "eventNamesSettings": [ + { + "event": "Product Reviewed" + } + ] + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "type": "track", + "userId": "identified_user@email.com", + "event": "Product Reviewed", + "properties": { + "review_id": "12345", + "product_id": "123", + "rating": 3, + "review_body": "Average product, expected much more." + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {}, + "JSON": { + "properties": { + "review_id": "12345", + "product_id": "123", + "rating": 3, + "review_body": "Average product, expected much more." + }, + "send": true, + "channel": "email", + "delay": 0, + "email": "identified_user@email.com" + } + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": {}, + "headers": { + "Authorization": "Basic ZHVtbXlBcGlLZXk=", + "Content-Type": "application/json" + }, + "version": "1", + "endpoint": "https://api.delighted.com/v1/people.json", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "delighted", + "description": "Test 3", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKeyforfailure", + "channel": "email", + "delay": 0, + "eventNamesSettings": [ + { + "event": "Product Reviewed" + } + ] + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "type": "track", + "userId": "unidentified_user@email.com", + "event": "Product Reviewed", + "properties": { + "review_id": "12345", + "product_id": "123", + "rating": 3, + "review_body": "Average product, expected much more." + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "user unidentified_user@email.com doesn't exist", + "statTags": { + "destType": "DELIGHTED", + "errorCategory": "network", + "errorType": "aborted", + "feature": "processor", + "implementation": "native", + "meta": "instrumentation", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "delighted", + "description": "Test 4", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "channel": "email", + "delay": 0, + "eventNamesSettings": [ + { + "event": "" + } + ] + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "type": "track", + "userId": "identified_user@email.com", + "event": "Product Reviewed", + "properties": { + "review_id": "12345", + "product_id": "123", + "rating": 3, + "review_body": "Average product, expected much more." + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Event is not configured on your Rudderstack Dashboard", + "statTags": { + "destType": "DELIGHTED", + "errorCategory": "dataValidation", + "errorType": "configuration", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "delighted", + "description": "Test 5", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "channel": "email", + "delay": 0, + "eventNamesSettings": [ + { + "event": "Product Reviewed" + } + ] + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "type": "track", + "anonymousId": "identified_user@email.com", + "event": "Product Reviewed", + "properties": { + "review_id": "12345", + "product_id": "123", + "rating": 3, + "review_body": "Average product, expected much more." + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "userId is required.", + "statTags": { + "destType": "DELIGHTED", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "delighted", + "description": "Test 6", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "channel": "email", + "delay": 0, + "eventNamesSettings": [ + { + "event": "" + } + ] + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "type": "alias", + "previousId": "123@abc.com", + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "userId is required.", + "statTags": { + "destType": "DELIGHTED", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "delighted", + "description": "Test 7", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "channel": "email", + "delay": 0, + "eventNamesSettings": [ + { + "event": "" + } + ] + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "externalId": [ + { + "id": "sms", + "type": "delightedChannelType" + } + ], + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "type": "alias", + "userId": "abc@123.com", + "previousId": "123@abc.com", + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "User Id and Previous Id should be of same type i.e. phone/sms", + "statTags": { + "destType": "DELIGHTED", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "delighted", + "description": "Test 8", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "channel": "email", + "delay": 0, + "eventNamesSettings": [ + { + "event": "" + } + ] + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "externalId": [ + { + "id": "sms", + "type": "delightedChannelType" + } + ], + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "type": "identify", + "userId": "abc@123.com", + "traits": { + "firstName": "James", + "lastName": "Doe", + "phone": "+91237416221", + "last_sent_at": "1626698350" + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Channel is set to sms. Enter correct phone number i.e. E.164", + "statTags": { + "destType": "DELIGHTED", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "delighted", + "description": "Test 9", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "channel": "email", + "delay": 0, + "eventNamesSettings": [ + { + "event": "" + } + ] + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "externalId": [ + { + "id": "sms", + "type": "delightedChannelType" + } + ], + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "type": "identify", + "userId": "+911234567890", + "traits": { + "firstName": "James", + "lastName": "Doe", + "last_sent_at": "1626698350" + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.delighted.com/v1/people.json", + "headers": { + "Authorization": "Basic ZHVtbXlBcGlLZXk=", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {}, + "JSON": { + "send": false, + "channel": "sms", + "delay": 0, + "name": "James Doe", + "phone_number": "+911234567890", + "last_sent_at": "1626698350" + } + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + } +] \ No newline at end of file diff --git a/test/integrations/destinations/delighted/router/data.ts b/test/integrations/destinations/delighted/router/data.ts new file mode 100644 index 0000000000..115ac7b05e --- /dev/null +++ b/test/integrations/destinations/delighted/router/data.ts @@ -0,0 +1,191 @@ +export const data = [ + { + name: 'delighted', + description: 'Test 0', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "channel": "email", + "delay": 0, + "eventNamesSettings": [{ "event": "" }] + } + }, + "metadata": { + "jobId": 1 + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { "name": "", "version": "" }, + "screen": { "density": 2 } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "type": "identify", + "userId": "abc@123.com", + "traits": { + "firstName": "James", + "lastName": "Doe", + "phone": "+92374162212", + "last_sent_at": "1626698350" + }, + "integrations": { "All": true }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + }, + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "channel": "email", + "delay": 0, + "eventNamesSettings": [{ "event": "" }] + } + }, + "metadata": { + "jobId": 2 + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { "name": "", "version": "" }, + "screen": { "density": 2 } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "type": "alias", + "previousId": "123@abc.com", + "userId": "abc@123.com", + "integrations": { "All": true }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ], + destType: 'delighted', + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + "batchedRequest": { + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {}, + "JSON": { + "email": "abc@123.com", + "send": false, + "channel": "email", + "delay": 0, + "last_sent_at": "1626698350", + "name": "James Doe", + "phone_number": "+92374162212" + } + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": {}, + "headers": { + "Authorization": "Basic ZHVtbXlBcGlLZXk=", + "Content-Type": "application/json" + }, + "version": "1", + "endpoint": "https://api.delighted.com/v1/people.json" + }, + "metadata": [ + { + "jobId": 1 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "channel": "email", + "delay": 0, + "eventNamesSettings": [{ "event": "" }] + } + } + }, + { + "batchedRequest": { + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {}, + "JSON": { + "email": "123@abc.com", + "email_update": "abc@123.com" + } + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": {}, + "headers": { + "Authorization": "Basic ZHVtbXlBcGlLZXk=", + "Content-Type": "application/json" + }, + "version": "1", + "endpoint": "https://api.delighted.com/v1/people.json" + }, + "metadata": [ + { + "jobId": 2 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "channel": "email", + "delay": 0, + "eventNamesSettings": [{ "event": "" }] + } + } + } + ] + , + }, + }, + }, + }, +]; diff --git a/test/integrations/destinations/drip/network.ts b/test/integrations/destinations/drip/network.ts new file mode 100644 index 0000000000..cfce027426 --- /dev/null +++ b/test/integrations/destinations/drip/network.ts @@ -0,0 +1,30 @@ +export const networkCallsData = [ + { + httpReq: { + url: 'https://api.getdrip.com/v2/1809802/subscribers/identified_user@gmail.com', + method: 'GET', + }, + httpRes: { + status: 200, + }, + }, + { + httpReq: { + url: 'https://api.getdrip.com/v2/1809802/subscribers/unidentified_user@gmail.com', + method: 'GET', + }, + httpRes: { + status: 400, + }, + }, + , + { + httpReq: { + url: 'https://api.getdrip.com/v2/1809802/subscribers', + method: 'POST', + }, + httpRes: { + status: 200, + }, + }, +]; diff --git a/test/integrations/destinations/drip/processor/data.ts b/test/integrations/destinations/drip/processor/data.ts new file mode 100644 index 0000000000..17cf37d198 --- /dev/null +++ b/test/integrations/destinations/drip/processor/data.ts @@ -0,0 +1,1487 @@ +export const data = [ + { + "name": "drip", + "description": "Test 0", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "accountId": "1809802", + "campaignId": "", + "enableUserCreation": true + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "type": "identify", + "traits": { + "email": "test1@gmail.com", + "firstName": "James", + "lastName": "Doe", + "phone": "237416221", + "customFields": { + "filter1": "filterval1" + } + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.getdrip.com/v2/1809802/subscribers", + "headers": { + "Authorization": "Basic ZHVtbXlBcGlLZXk=", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {}, + "JSON": { + "subscribers": [ + { + "email": "test1@gmail.com", + "first_name": "James", + "last_name": "Doe", + "phone": "237416221", + "ip_address": "0.0.0.0", + "custom_fields": { + "filter1": "filterval1" + } + } + ] + } + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "drip", + "description": "Test 1", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "accountId": "1809802", + "campaignId": "", + "enableUserCreation": true + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "type": "identify", + "traits": { + "email": "12324adfgs", + "firstName": "James", + "lastName": "Doe", + "phone": "237416221", + "customFields": { + "filter1": "filterval1" + } + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "dripId or email is required for the call", + "statTags": { + "destType": "DRIP", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "drip", + "description": "Test 2", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "accountId": "1809802", + "campaignId": "", + "enableUserCreation": true + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "type": "identify", + "traits": { + "email": "test1@gmail.com", + "name": "James Doe", + "phone": "237416221", + "filter1": "filterval1", + "filter2": "filterval2" + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.getdrip.com/v2/1809802/subscribers", + "headers": { + "Authorization": "Basic ZHVtbXlBcGlLZXk=", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {}, + "JSON": { + "subscribers": [ + { + "email": "test1@gmail.com", + "first_name": "James", + "last_name": "Doe", + "phone": "237416221", + "ip_address": "0.0.0.0", + "custom_fields": { + "filter1": "filterval1", + "filter2": "filterval2" + } + } + ] + } + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "drip", + "description": "Test 3", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "accountId": "1809802", + "campaignId": "915194776", + "enableUserCreation": true + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "type": "identify", + "traits": { + "email": "test1@gmail.com", + "name": "James Doe", + "phone": "237416221", + "filter1": "filterval1", + "filter2": "filterval2", + "tags": [ + "tag1", + "tag2" + ], + "startingEmailIndex": 1 + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.getdrip.com/v2/1809802/campaigns/915194776/subscribers", + "headers": { + "Authorization": "Basic ZHVtbXlBcGlLZXk=", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {}, + "JSON": { + "subscribers": [ + { + "email": "test1@gmail.com", + "starting_email_index": 1 + } + ] + } + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "drip", + "description": "Test 4", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "accountId": "1809802", + "campaignId": "915194776", + "enableUserCreation": true + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "type": "track", + "event": "testing", + "properties": { + "email": "user1@gmail.com", + "customFields": { + "field1": "val1" + } + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.getdrip.com/v2/1809802/events", + "headers": { + "Authorization": "Basic ZHVtbXlBcGlLZXk=", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {}, + "JSON": { + "events": [ + { + "email": "user1@gmail.com", + "properties": { + "field1": "val1" + }, + "action": "testing", + "occurred_at": "2019-10-14T09:03:17.562Z" + } + ] + } + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "drip", + "description": "Test 5", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "accountId": "1809802", + "campaignId": "915194776", + "enableUserCreation": true + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "type": "track", + "event": "", + "properties": { + "email": "user1@gmail.com", + "custom_fields": { + "field1": "val1" + } + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Event name is required", + "statTags": { + "destType": "DRIP", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "drip", + "description": "Test 6", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "accountId": "1809802", + "campaignId": "915194776", + "enableUserCreation": false + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "type": "track", + "event": "testing", + "properties": { + "email": "identified_user@gmail.com", + "customFields": { + "field1": "val1" + } + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.getdrip.com/v2/1809802/events", + "headers": { + "Authorization": "Basic ZHVtbXlBcGlLZXk=", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {}, + "JSON": { + "events": [ + { + "email": "identified_user@gmail.com", + "properties": { + "field1": "val1" + }, + "action": "testing", + "occurred_at": "2019-10-14T09:03:17.562Z" + } + ] + } + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "drip", + "description": "Test 7", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "accountId": "1809802", + "campaignId": "915194776", + "enableUserCreation": false + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "type": "track", + "event": "testing", + "properties": { + "email": "identified_user@gmail.com", + "field1": "val1" + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.getdrip.com/v2/1809802/events", + "headers": { + "Authorization": "Basic ZHVtbXlBcGlLZXk=", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {}, + "JSON": { + "events": [ + { + "email": "identified_user@gmail.com", + "properties": { + "field1": "val1" + }, + "action": "testing", + "occurred_at": "2019-10-14T09:03:17.562Z" + } + ] + } + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "drip", + "description": "Test 8", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "accountId": "1809802", + "campaignId": "915194776", + "enableUserCreation": false + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "type": "track", + "event": "testing", + "properties": { + "email": "unidentified_user@gmail.com", + "field1": "val1" + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Error occurred while checking user : error response not found", + "statTags": { + "destType": "DRIP", + "errorCategory": "network", + "errorType": "aborted", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "drip", + "description": "Test 9", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "accountId": "1809802", + "campaignId": "915194776", + "enableUserCreation": false + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "type": "track", + "event": "checkout started", + "properties": { + "email": "identified_user@gmail.com", + "field1": "val1", + "affiliation": "my_custom_order", + "order_id": "456445746" + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.getdrip.com/v3/1809802/shopper_activity/order", + "headers": { + "Authorization": "Basic ZHVtbXlBcGlLZXk=", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {}, + "JSON": { + "action": "placed", + "email": "identified_user@gmail.com", + "occurred_at": "2019-10-14T09:03:17.562Z", + "order_id": "456445746", + "provider": "my_custom_order" + } + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "drip", + "description": "Test 10", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "accountId": "1809802", + "campaignId": "915194776", + "enableUserCreation": false + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "type": "track", + "event": "checkout started", + "properties": { + "email": "identified_user@gmail.com", + "field1": "val1", + "affiliation": "my_custom_order", + "order_id": "456445746", + "products": [ + { + "name": "shirt", + "price": 11.16 + } + ] + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.getdrip.com/v3/1809802/shopper_activity/order", + "headers": { + "Authorization": "Basic ZHVtbXlBcGlLZXk=", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {}, + "JSON": { + "action": "placed", + "email": "identified_user@gmail.com", + "occurred_at": "2019-10-14T09:03:17.562Z", + "order_id": "456445746", + "provider": "my_custom_order", + "items": [ + { + "name": "shirt", + "price": 11.16 + } + ] + } + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "drip", + "description": "Test 11", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "accountId": "1809802", + "campaignId": "915194776", + "enableUserCreation": false + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "type": "track", + "event": "checkout", + "properties": { + "email": "identified_user@gmail.com", + "field1": "val1", + "customFields": { + "field2": "val2" + } + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.getdrip.com/v2/1809802/events", + "headers": { + "Authorization": "Basic ZHVtbXlBcGlLZXk=", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {}, + "JSON": { + "events": [ + { + "action": "checkout", + "email": "identified_user@gmail.com", + "occurred_at": "2019-10-14T09:03:17.562Z", + "properties": { + "field2": "val2" + } + } + ] + } + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "drip", + "description": "Test 12", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "accountId": "1809802", + "campaignId": "", + "enableUserCreation": true + } + }, + "message": { + "type": "identify", + "event": "identify", + "userId": "user@1", + "channel": "mobile", + "context": { + "os": { + "name": "Android", + "version": "13" + }, + "app": { + "name": "rudderstack", + "build": "5425", + "version": "2.4.1" + }, + "device": { + "id": "8b048b94cbec4fcf", + "name": "o1q", + "type": "Android", + "model": "SM-G991U", + "manufacturer": "samsung" + }, + "locale": "en-US", + "traits": { + "id": "ruddertest@gmail.com", + "email": "ruddertest@gmail.com", + "title": "Social Impact Program Manager", + "skills": [ + { + "id": 134, + "name": "Business Development", + "tagGroupId": 2, + "parentTagId": 134, + "huddleVisible": false, + "onboardVisible": false + }, + { + "id": 96, + "name": "Communications", + "tagGroupId": 2, + "parentTagId": 96, + "huddleVisible": true, + "onboardVisible": true + }, + { + "id": 489, + "name": "Construction", + "tagGroupId": 2, + "parentTagId": 489, + "huddleVisible": false, + "onboardVisible": false + }, + { + "id": 671, + "name": "Data Analysis", + "tagGroupId": 2, + "parentTagId": 671, + "huddleVisible": false, + "onboardVisible": false + }, + { + "id": 676, + "name": "Engineering: Mechanical", + "tagGroupId": 2, + "parentTagId": 676, + "huddleVisible": false, + "onboardVisible": false + }, + { + "id": 189, + "name": "Operations", + "tagGroupId": 2, + "parentTagId": 189, + "huddleVisible": true, + "onboardVisible": true + }, + { + "id": 194, + "name": "Product Management", + "tagGroupId": 2, + "parentTagId": 194, + "huddleVisible": true, + "onboardVisible": true + }, + { + "id": 195, + "name": "Program Management", + "tagGroupId": 2, + "parentTagId": 195, + "huddleVisible": false, + "onboardVisible": false + }, + { + "id": 199, + "name": "R&D", + "tagGroupId": 2, + "parentTagId": 199, + "huddleVisible": false, + "onboardVisible": false + }, + { + "id": 102, + "name": "Sales", + "tagGroupId": 2, + "parentTagId": 102, + "huddleVisible": true, + "onboardVisible": true + } + ], + "userId": "ruddertest@gmail.com", + "address": "Chicago, IL, USA", + "industry": "Education", + "lastName": "test", + "lastname": "test", + "verified": false, + "firstName": "rudder", + "firstname": "rudder", + "interests": [ + { + "id": 649, + "name": "Adaptation", + "tagGroupId": 4, + "parentTagId": 745, + "huddleVisible": false, + "onboardVisible": false + }, + { + "id": 663, + "name": "Carbon removal and sequestration", + "tagGroupId": 4, + "parentTagId": 761, + "huddleVisible": false, + "onboardVisible": false + }, + { + "id": 664, + "name": "Clean Energy and Energy Efficiency", + "tagGroupId": 4, + "parentTagId": 259, + "huddleVisible": false, + "onboardVisible": false + }, + { + "id": 654, + "name": "Climate Science and Earth Systems", + "tagGroupId": 4, + "parentTagId": 744, + "huddleVisible": false, + "onboardVisible": false + }, + { + "id": 650, + "name": "Corporate Sustainability", + "tagGroupId": 4, + "parentTagId": 650, + "huddleVisible": false, + "onboardVisible": false + }, + { + "id": 651, + "name": "Finance & Risk", + "tagGroupId": 4, + "parentTagId": 651, + "huddleVisible": false, + "onboardVisible": false + }, + { + "id": 652, + "name": "Food and Agriculture", + "tagGroupId": 4, + "parentTagId": 652, + "huddleVisible": false, + "onboardVisible": false + }, + { + "id": 665, + "name": "Transport", + "tagGroupId": 4, + "parentTagId": 665, + "huddleVisible": false, + "onboardVisible": false + } + ], + "isDeleted": false, + "anonymousId": "8b048b94cbec4fcf", + "jobFunction": "Program manager", + "reminderType": 1, + "jobPreferences": { + "motivationStr": "I am looking for a job in climate change.,I want to learn about climate change.,I’d like to connect with other climate enthusiasts.", + "searchUrgency": "As soon as possible", + "maxCompensation": 0, + "minCompensation": 0 + }, + "visibilityType": "public", + "Linkedin-Signin": true, + "hubbleOnboarded": false, + "sharePreference": false, + "notificationType": 0, + "shortDescription": "Social Impact Program Manager", + "jobProfileComplete": false, + "noOfMonthExperience": 0, + "onboarding_completed": "Yes" + }, + "library": { + "name": "com.rudderstack.android.sdk.core", + "version": "1.8.1" + }, + "timezone": "America/Chicago", + "sessionId": 1681096824, + "userAgent": "Dalvik/2.1.0 (Linux; U; Android 13; SM-G991U Build/TP1A.220624.014)" + }, + "rudderId": "f701966c-5568-4500-92ba-4e9023c8fe31", + "messageId": "77b53247-177f-4ca3-a6b4-aa7558fec280", + "request_ip": "75.209.176.135", + "anonymousId": "8b048b94cbec4fcf", + "integrations": { + "All": true + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.getdrip.com/v2/1809802/subscribers", + "headers": { + "Authorization": "Basic ZHVtbXlBcGlLZXk=", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {}, + "JSON": { + "subscribers": [ + { + "email": "ruddertest@gmail.com", + "user_id": "user@1", + "address1": "Chicago, IL, USA", + "last_name": "test", + "first_name": "rudder", + "custom_fields": { + "title": "Social Impact Program Manager", + "industry": "Education", + "verified": false, + "isDeleted": false, + "jobFunction": "Program manager", + "reminderType": 1, + "jobPreferences": { + "motivationStr": "I am looking for a job in climate change.,I want to learn about climate change.,I’d like to connect with other climate enthusiasts.", + "searchUrgency": "As soon as possible", + "maxCompensation": 0, + "minCompensation": 0 + }, + "visibilityType": "public", + "hubbleOnboarded": false, + "sharePreference": false, + "notificationType": 0, + "shortDescription": "Social Impact Program Manager", + "jobProfileComplete": false, + "noOfMonthExperience": 0, + "onboarding_completed": "Yes" + } + } + ] + } + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + } +] \ No newline at end of file diff --git a/test/integrations/destinations/drip/router/data.ts b/test/integrations/destinations/drip/router/data.ts new file mode 100644 index 0000000000..d13c73a0d1 --- /dev/null +++ b/test/integrations/destinations/drip/router/data.ts @@ -0,0 +1,210 @@ +export const data = [ + { + name: 'drip', + description: 'Test 0', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "accountId": "1809802", + "campaignId": "", + "enableUserCreation": true + } + }, + "metadata": { + "jobId": 1 + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { "name": "", "version": "" }, + "screen": { "density": 2 } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "type": "identify", + "traits": { + "email": "test1@gmail.com", + "firstName": "James", + "lastName": "Doe", + "phone": "237416221", + "customFields": { + "filter1": "filterval1" + } + }, + "integrations": { "All": true }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + }, + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "accountId": "1809802", + "campaignId": "915194776", + "enableUserCreation": true + } + }, + "metadata": { + "jobId": 2 + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { "name": "", "version": "" }, + "screen": { "density": 2 } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "type": "track", + "event": "testing", + "properties": { + "email": "user1@gmail.com", + "customFields": { + "field1": "val1" + } + }, + "integrations": { "All": true }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ], + destType: 'drip', + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + "batchedRequest": { + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {}, + "JSON": { + "subscribers": [ + { + "email": "test1@gmail.com", + "first_name": "James", + "last_name": "Doe", + "phone": "237416221", + "ip_address": "0.0.0.0", + "custom_fields": { + "filter1": "filterval1" + } + } + ] + } + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": {}, + "headers": { + "Authorization": "Basic ZHVtbXlBcGlLZXk=", + "Content-Type": "application/json" + }, + "version": "1", + "endpoint": "https://api.getdrip.com/v2/1809802/subscribers" + }, + "metadata": [ + { + "jobId": 1 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "accountId": "1809802", + "campaignId": "", + "enableUserCreation": true + } + } + }, + { + "batchedRequest": { + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {}, + "JSON": { + "events": [ + { + "email": "user1@gmail.com", + "properties": { + "field1": "val1" + }, + "action": "testing", + "occurred_at": "2019-10-14T09:03:17.562Z" + } + ] + } + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": {}, + "headers": { + "Authorization": "Basic ZHVtbXlBcGlLZXk=", + "Content-Type": "application/json" + }, + "version": "1", + "endpoint": "https://api.getdrip.com/v2/1809802/events" + }, + "metadata": [ + { + "jobId": 2 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "accountId": "1809802", + "campaignId": "915194776", + "enableUserCreation": true + } + } + } + ], + }, + }, + }, + }, +]; diff --git a/test/integrations/destinations/freshmarketer/network.ts b/test/integrations/destinations/freshmarketer/network.ts new file mode 100644 index 0000000000..51f1a0c115 --- /dev/null +++ b/test/integrations/destinations/freshmarketer/network.ts @@ -0,0 +1,487 @@ +export const networkCallsData = [ + { + httpReq: { + url: 'https://domain-rudder.myfreshworks.com/crm/sales/api/sales_accounts/upsert', + method: 'POST' + }, + httpRes: { + data: { + "sales_account": { + "id": 70003771396, + "name": "postman2.0", + "address": "Red Colony", + "city": "Pune", + "state": "Goa", + "zipcode": null, + "country": null, + "number_of_employees": 11, + "annual_revenue": 1000, + "website": null, + "owner_id": null, + "phone": "919191919191", + "open_deals_amount": null, + "open_deals_count": null, + "won_deals_amount": null, + "won_deals_count": null, + "last_contacted": null, + "last_contacted_mode": null, + "facebook": null, + "twitter": null, + "linkedin": null, + "links": { + "conversations": "/crm/sales/sales_accounts/70003771396/conversations/all?include=email_conversation_recipients%2Ctargetable%2Cphone_number%2Cphone_caller%2Cnote%2Cuser&per_page=3", + "document_associations": "/crm/sales/sales_accounts/70003771396/document_associations", + "notes": "/crm/sales/sales_accounts/70003771396/notes?include=creater", + "tasks": "/crm/sales/sales_accounts/70003771396/tasks?include=creater,owner,updater,targetable,users,task_type", + "appointments": "/crm/sales/sales_accounts/70003771396/appointments?include=creater,owner,updater,targetable,appointment_attendees,conference,note" + }, + "custom_field": {}, + "created_at": "2022-08-17T04:15:00-04:00", + "updated_at": "2022-08-24T06:03:31-04:00", + "avatar": null, + "parent_sales_account_id": null, + "recent_note": null, + "last_contacted_via_sales_activity": null, + "last_contacted_sales_activity_mode": null, + "completed_sales_sequences": null, + "active_sales_sequences": null, + "last_assigned_at": null, + "tags": [], + "is_deleted": false, + "team_user_ids": null, + "has_connections": false, + "record_type_id": "71010794477" + } + }, + status: 200 + }, + }, + { + httpReq: { + url: 'https://domain-rudder.myfreshworks.com/crm/sales/api/contacts/upsert?include=sales_accounts', + method: 'POST' + }, + httpRes: { + data: { + "contact": { + "id": 70042006456, + "first_name": "Rk", + "last_name": "Mishra", + "display_name": "Rk Mishra", + "avatar": null, + "job_title": null, + "city": null, + "state": null, + "zipcode": null, + "country": null, + "email": "testuser@google.com", + "emails": [ + { + "id": 70037311213, + "value": "testuser@google.com", + "is_primary": true, + "label": null, + "_destroy": false + } + ], + "time_zone": "IST", + "work_number": "9988776655", + "mobile_number": "19265559504", + "address": null, + "last_seen": null, + "lead_score": 26, + "last_contacted": null, + "open_deals_amount": null, + "won_deals_amount": null, + "links": { + "conversations": "/crm/sales/contacts/70042006456/conversations/all?include=email_conversation_recipients%2Ctargetable%2Cphone_number%2Cphone_caller%2Cnote%2Cuser&per_page=3", + "timeline_feeds": "/crm/sales/contacts/70042006456/timeline_feeds", + "document_associations": "/crm/sales/contacts/70042006456/document_associations", + "notes": "/crm/sales/contacts/70042006456/notes?include=creater", + "tasks": "/crm/sales/contacts/70042006456/tasks?include=creater,owner,updater,targetable,users,task_type", + "appointments": "/crm/sales/contacts/70042006456/appointments?include=creater,owner,updater,targetable,appointment_attendees,conference,note", + "reminders": "/crm/sales/contacts/70042006456/reminders?include=creater,owner,updater,targetable", + "duplicates": "/crm/sales/contacts/70042006456/duplicates", + "connections": "/crm/sales/contacts/70042006456/connections" + }, + "last_contacted_sales_activity_mode": null, + "custom_field": {}, + "created_at": "2022-08-09T03:22:12-04:00", + "updated_at": "2022-08-30T00:33:27-04:00", + "keyword": "drilling", + "medium": "facebook", + "last_contacted_mode": null, + "recent_note": null, + "won_deals_count": null, + "last_contacted_via_sales_activity": null, + "completed_sales_sequences": null, + "active_sales_sequences": null, + "web_form_ids": null, + "open_deals_count": null, + "last_assigned_at": "2022-08-29T05:51:24-04:00", + "tags": [], + "facebook": null, + "twitter": null, + "linkedin": null, + "is_deleted": false, + "team_user_ids": null, + "external_id": "ea5cfab2-3961-4d8a-8187-3d1858c99099", + "work_email": null, + "subscription_status": 1, + "subscription_types": "2;3;4;5;1", + "customer_fit": 2, + "record_type_id": "71010794476", + "whatsapp_subscription_status": 2, + "sms_subscription_status": 2, + "last_seen_chat": null, + "first_seen_chat": null, + "locale": null, + "total_sessions": null, + "phone_numbers": [], + "sales_accounts": [ + { + "partial": true, + "id": 70003771198, + "name": "div-quer", + "avatar": null, + "website": null, + "last_contacted": null, + "record_type_id": "71010794477", + "is_primary": true + }, + { + "partial": true, + "id": 70003825177, + "name": "BisleriGroup", + "avatar": null, + "website": null, + "last_contacted": null, + "record_type_id": "71010794477", + "is_primary": false + } + ] + } + }, + status: 200 + }, + }, + { + httpReq: { + url: 'https://domain-rudder.myfreshworks.com/crm/sales/api/selector/sales_activity_types', + method: 'GET' + }, + httpRes: { + data: { + "sales_activity_types": [ + { + "partial": true, + "id": 70000666879, + "name": "own-calender", + "internal_name": "cappointment", + "show_in_conversation": true, + "position": 1, + "is_default": false, + "is_checkedin": false + }, + { + "partial": true, + "id": 70000663932, + "name": "fb-support", + "internal_name": "facebook", + "show_in_conversation": true, + "position": 2, + "is_default": false, + "is_checkedin": false + }, + { + "partial": true, + "id": 70000663746, + "name": "twitter sales", + "internal_name": "twitter", + "show_in_conversation": true, + "position": 3, + "is_default": false, + "is_checkedin": false + }, + { + "partial": true, + "id": 70000646396, + "name": "linked sales", + "internal_name": "linkedin", + "show_in_conversation": true, + "position": 4, + "is_default": false, + "is_checkedin": false + }, + { + "partial": true, + "id": 70000642330, + "name": "facebook sales", + "internal_name": "facebook", + "show_in_conversation": true, + "position": 5, + "is_default": false, + "is_checkedin": false + }, + { + "partial": true, + "id": 70000612897, + "name": "Chat", + "internal_name": "chat", + "show_in_conversation": true, + "position": 6, + "is_default": true, + "is_checkedin": false + }, + { + "partial": true, + "id": 70000612898, + "name": "Phone", + "internal_name": "phone", + "show_in_conversation": true, + "position": 7, + "is_default": true, + "is_checkedin": false + }, + { + "partial": true, + "id": 70000612899, + "name": "Meeting", + "internal_name": "appointment", + "show_in_conversation": true, + "position": 8, + "is_default": true, + "is_checkedin": true + }, + { + "partial": true, + "id": 70000612900, + "name": "Task", + "internal_name": "task", + "show_in_conversation": true, + "position": 9, + "is_default": true, + "is_checkedin": false + }, + { + "partial": true, + "id": 70000612901, + "name": "Email", + "internal_name": "email", + "show_in_conversation": true, + "position": 10, + "is_default": true, + "is_checkedin": false + }, + { + "partial": true, + "id": 70000612902, + "name": "SMS Outgoing", + "internal_name": "sms_outgoing", + "show_in_conversation": true, + "position": 11, + "is_default": true, + "is_checkedin": false + }, + { + "partial": true, + "id": 70000612903, + "name": "Reminder", + "internal_name": "reminder", + "show_in_conversation": false, + "position": 12, + "is_default": true, + "is_checkedin": false + }, + { + "partial": true, + "id": 70000612904, + "name": "SMS Incoming", + "internal_name": "sms_incoming", + "show_in_conversation": true, + "position": 13, + "is_default": true, + "is_checkedin": false + } + ] + }, + status: 200 + }, + }, + { + httpReq: { + url: 'https://domain-rudder.myfreshworks.com/crm/sales/api/contacts/upsert', + method: 'POST' + }, + httpRes: { + data: { + "contact": { + "id": 70054866612, + "first_name": null, + "last_name": null, + "display_name": "jamessampleton120@gmail.com", + "avatar": null, + "job_title": null, + "city": null, + "state": null, + "zipcode": null, + "country": null, + "email": "jamessampleton120@gmail.com", + "emails": [ + { + "id": 70047409219, + "value": "jamessampleton120@gmail.com", + "is_primary": true, + "label": null, + "_destroy": false + } + ], + "time_zone": null, + "work_number": null, + "mobile_number": null, + "address": null, + "last_seen": null, + "lead_score": 0, + "last_contacted": null, + "open_deals_amount": null, + "won_deals_amount": null, + "links": { + "conversations": "/crm/sales/contacts/70054866612/conversations/all?include=email_conversation_recipients%2Ctargetable%2Cphone_number%2Cphone_caller%2Cnote%2Cuser&per_page=3", + "timeline_feeds": "/crm/sales/contacts/70054866612/timeline_feeds", + "document_associations": "/crm/sales/contacts/70054866612/document_associations", + "notes": "/crm/sales/contacts/70054866612/notes?include=creater", + "tasks": "/crm/sales/contacts/70054866612/tasks?include=creater,owner,updater,targetable,users,task_type", + "appointments": "/crm/sales/contacts/70054866612/appointments?include=creater,owner,updater,targetable,appointment_attendees,conference,note", + "reminders": "/crm/sales/contacts/70054866612/reminders?include=creater,owner,updater,targetable", + "duplicates": "/crm/sales/contacts/70054866612/duplicates", + "connections": "/crm/sales/contacts/70054866612/connections" + }, + "last_contacted_sales_activity_mode": null, + "custom_field": {}, + "created_at": "2022-10-11T08:42:15-04:00", + "updated_at": "2022-10-11T08:42:15-04:00", + "keyword": null, + "medium": null, + "last_contacted_mode": null, + "recent_note": null, + "won_deals_count": null, + "last_contacted_via_sales_activity": null, + "completed_sales_sequences": null, + "active_sales_sequences": null, + "web_form_ids": null, + "open_deals_count": null, + "last_assigned_at": null, + "tags": [], + "facebook": null, + "twitter": null, + "linkedin": null, + "is_deleted": false, + "team_user_ids": null, + "external_id": null, + "work_email": null, + "subscription_status": 1, + "subscription_types": "2;3;4;5;1", + "customer_fit": 0, + "record_type_id": "71012139284", + "whatsapp_subscription_status": 2, + "sms_subscription_status": 2, + "last_seen_chat": null, + "first_seen_chat": null, + "locale": null, + "total_sessions": null, + "phone_numbers": [] + } + }, + status: 200 + }, + }, + { + httpReq: { + url: 'https://domain-rudder.myfreshworks.com/crm/sales/api/lists', + method: 'GET' + }, + httpRes: { + data: { + "lists": [ + { + "id": 70000053624, + "name": "Sample list" + }, + { + "id": 70000056575, + "name": "list1-test" + }, + { + "id": 70000058627, + "name": "Jio 5G Group" + }, + { + "id": 70000058628, + "name": "Airtel 5G Group" + }, + { + "id": 70000059716, + "name": "Voda 5G" + } + ], + "meta": { + "total_pages": 1, + "total": 5 + } + }, + status: 200 + }, + }, + { + httpReq: { + url: 'https://domain-rudder.myfreshworks.com/crm/sales/api/selector/lifecycle_stages', + method: 'GET' + }, + httpRes: { + data: { + "lifecycle_stages": [ + { + "id": 71012139274, + "name": "Sales Qualified Lead start", + "position": 1, + "disabled": false, + "default": true, + "type": "Sales Qualified Lead", + "contact_status_ids": [70000697858, 70000697859, 70000697860] + }, + { + "id": 71012139273, + "name": "Lead", + "position": 2, + "disabled": false, + "default": true, + "type": "Lead", + "contact_status_ids": [70000697854, 70000697855, 70000697856, 70000697857] + }, + { + "id": 71012806409, + "name": "final Customer", + "position": 3, + "disabled": false, + "default": false, + "type": "Custom", + "contact_status_ids": [70000736543, 70000736544] + }, + { + "id": 71012139275, + "name": "Customer", + "position": 4, + "disabled": false, + "default": true, + "type": "Customer", + "contact_status_ids": [70000697861, 70000697862] + } + ] + }, + status: 200 + }, + } +]; + + + diff --git a/test/integrations/destinations/freshmarketer/processor/data.ts b/test/integrations/destinations/freshmarketer/processor/data.ts new file mode 100644 index 0000000000..2af5728f9c --- /dev/null +++ b/test/integrations/destinations/freshmarketer/processor/data.ts @@ -0,0 +1,3130 @@ +export const data = [ + { + "name": "freshmarketer", + "description": "Identify call for creating new user", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "rudderstack-476952domain3105.myfreshworks.com" + } + }, + "message": { + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-06-22T10:57:58Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99099", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + } + }, + "traits": { + "email": "testuser@google.com", + "first_name": "Rk", + "last_name": "Mishra", + "mobileNumber": "1-926-555-9504", + "lifecycleStageId": 71010794467, + "phone": "9988776655", + "owner_id": "70000090119" + }, + "type": "identify", + "sentAt": "2022-04-22T10:57:58Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "FORM": {}, + "JSON": { + "contact": { + "emails": "testuser@google.com", + "last_name": "Mishra", + "created_at": "2022-06-22T10:57:58Z", + "first_name": "Rk", + "updated_at": "2022-06-22T10:57:58Z", + "external_id": "ea5cfab2-3961-4d8a-8187-3d1858c99099", + "work_number": "9988776655", + "mobile_number": "1-926-555-9504", + "lifecycle_stage_id": 71010794467 + }, + "unique_identifier": { + "emails": "testuser@google.com" + } + }, + "JSON_ARRAY": {} + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": {}, + "headers": { + "Content-Type": "application/json", + "Authorization": "Token token=dummyApiKey" + }, + "version": "1", + "endpoint": "https://rudderstack-476952domain3105.myfreshworks.com/crm/sales/api/contacts/upsert", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "freshmarketer", + "description": "Identify call with numbers in lifecycleStageId, ownerId", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "rudderstack-476952domain3105.myfreshworks.com" + } + }, + "message": { + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-06-22T10:57:58Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99099", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + } + }, + "traits": { + "email": "testuser@google.com", + "first_name": "Rk", + "last_name": "Mishra", + "mobileNumber": "1-926-555-9504", + "lifecycleStageId": 71010794467, + "phone": "9988776655", + "owner_id": "70000090119" + }, + "type": "identify", + "sentAt": "2022-04-22T10:57:58Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "FORM": {}, + "JSON": { + "contact": { + "emails": "testuser@google.com", + "last_name": "Mishra", + "created_at": "2022-06-22T10:57:58Z", + "first_name": "Rk", + "updated_at": "2022-06-22T10:57:58Z", + "external_id": "ea5cfab2-3961-4d8a-8187-3d1858c99099", + "work_number": "9988776655", + "mobile_number": "1-926-555-9504", + "lifecycle_stage_id": 71010794467 + }, + "unique_identifier": { + "emails": "testuser@google.com" + } + }, + "JSON_ARRAY": {} + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": {}, + "headers": { + "Content-Type": "application/json", + "Authorization": "Token token=dummyApiKey" + }, + "version": "1", + "endpoint": "https://rudderstack-476952domain3105.myfreshworks.com/crm/sales/api/contacts/upsert", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "freshmarketer", + "description": "Identify call with wrong data type in lifecycleStageId, ownerId", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "rudderstack-476952domain3105.myfreshworks.com" + } + }, + "message": { + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-06-22T10:57:58Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99099", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + } + }, + "traits": { + "email": "testuser@google.com", + "first_name": "Rk", + "last_name": "Mishra", + "mobileNumber": "1-926-555-9504", + "lifecycleStageId": "rudderSample", + "phone": "9988776655", + "ownerId": "rudderSample" + }, + "type": "identify", + "sentAt": "2022-04-22T10:57:58Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "owner_id,lifecycle_stage_id: invalid number format", + "statTags": { + "destType": "FRESHMARKETER", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshmarketer", + "description": "Identify call, email is not provided.", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "rudderstack-476952domain3105.myfreshworks.com" + } + }, + "message": { + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-06-22T10:57:58Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99099", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + } + }, + "traits": { + "first_name": "Rk", + "last_name": "Mishra", + "mobileNumber": "1-926-555-9504", + "lifecycleStageId": "rudderSample", + "phone": "9988776655", + "owner_id": "rudderSample" + }, + "type": "identify", + "sentAt": "2022-04-22T10:57:58Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Missing required value from \"email\"", + "statTags": { + "destType": "FRESHMARKETER", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshmarketer", + "description": "Group call: testing with mock api", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + }, + "message": { + "messageId": "sadjb-1e2r3fhgb-12bvbbj", + "originalTimestamp": "2022-06-22T10:57:58Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "traits": { + "email": "testuser@google.com" + } + }, + "traits": { + "groupType": "accounts", + "name": "Mark Twain", + "phone": "919191919191", + "numberOfEmployees": 51, + "annualRevenue": 1000, + "address": "Red Colony", + "city": "Colony", + "state": "Haryana" + }, + "type": "group", + "sentAt": "2022-04-22T10:57:58Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "FORM": {}, + "JSON": { + "contact": { + "sales_accounts": [ + { + "id": 70003771198, + "name": "div-quer", + "avatar": null, + "partial": true, + "website": null, + "is_primary": true, + "last_contacted": null, + "record_type_id": "71010794477" + }, + { + "id": 70003825177, + "name": "BisleriGroup", + "avatar": null, + "partial": true, + "website": null, + "is_primary": false, + "last_contacted": null, + "record_type_id": "71010794477" + }, + { + "id": 70003771396, + "is_primary": false + } + ] + }, + "unique_identifier": { + "emails": "testuser@google.com" + } + }, + "JSON_ARRAY": {} + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": {}, + "headers": { + "Content-Type": "application/json", + "Authorization": "Token token=dummyApiKey" + }, + "version": "1", + "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/contacts/upsert", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "freshmarketer", + "description": "Group call: name is required field.", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + }, + "message": { + "messageId": "sadjb-1e2r3fhgb-12bvbbj", + "originalTimestamp": "2022-06-22T10:57:58Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "traits": { + "email": "testuser@google.com" + } + }, + "traits": { + "groupType": "accounts", + "phone": "919191919191", + "numberOfEmployees": 51, + "annualRevenue": 1000, + "address": "Red Colony", + "city": "Colony", + "state": "Haryana" + }, + "type": "group", + "sentAt": "2022-04-22T10:57:58Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Missing required value from \"name\"", + "statTags": { + "destType": "FRESHMARKETER", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshmarketer", + "description": "missing message type", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + }, + "message": { + "messageId": "sadjb-1e2r3fhgb-12bvbbj", + "originalTimestamp": "2022-06-22T10:57:58Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "traits": { + "email": "testuser4google.com" + } + }, + "traits": { + "name": "Mark Twain", + "phone": "919191919191", + "numberOfEmployees": 51, + "annualRevenue": 1000, + "address": "Red Colony", + "city": "Colony", + "state": "Haryana" + }, + "sentAt": "2022-04-22T10:57:58Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Message Type is not present. Aborting message.", + "statTags": { + "destType": "FRESHMARKETER", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshmarketer", + "description": "Wrong message type", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + }, + "message": { + "messageId": "sadjb-1e2r3fhgb-12bvbbj", + "originalTimestamp": "2022-06-22T10:57:58Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "traits": { + "email": "testuser4google.com" + } + }, + "traits": { + "name": "Mark Twain", + "phone": "919191919191", + "numberOfEmployees": 51, + "annualRevenue": 1000, + "address": "Red Colony", + "city": "Colony", + "state": "Haryana" + }, + "type": "page", + "sentAt": "2022-04-22T10:57:58Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "message type page not supported", + "statTags": { + "destType": "FRESHMARKETER", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshmarketer", + "description": "Group call: user email is missing", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + }, + "message": { + "messageId": "sadjb-1e2r3fhgb-12bvbbj", + "originalTimestamp": "2022-06-22T10:57:58Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "traits": {} + }, + "traits": { + "groupType": "accounts", + "name": "div-quer", + "phone": "919191919191", + "numberOfEmployees": 51, + "annualRevenue": 1000, + "address": "Red Colony", + "city": "Lal colony", + "state": "Haryana" + }, + "type": "group", + "sentAt": "2022-04-22T10:57:58Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "FORM": {}, + "JSON": { + "sales_account": { + "city": "Lal colony", + "name": "div-quer", + "phone": "919191919191", + "state": "Haryana", + "address": "Red Colony", + "created_at": "2022-06-22T10:57:58Z", + "updated_at": "2022-06-22T10:57:58Z", + "annual_revenue": 1000, + "number_of_employees": 51 + }, + "unique_identifier": { + "name": "div-quer" + } + }, + "JSON_ARRAY": {} + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": {}, + "headers": { + "Content-Type": "application/json", + "Authorization": "Token token=dummyApiKey" + }, + "version": "1", + "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/sales_accounts/upsert", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "freshmarketer", + "description": "Identify call: Email is not present", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-06-22T10:57:58Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99099", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + } + }, + "traits": { + "first_name": "Rk", + "last_name": "Narayan", + "mobileNumber": "1-926-555-9504", + "phone": "9988776655" + }, + "type": "identify", + "sentAt": "2022-04-22T10:57:58Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Missing required value from \"email\"", + "statTags": { + "destType": "FRESHMARKETER", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshmarketer", + "description": "Track call, event is not supported.", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.1.5" + }, + "traits": { + "name": "Shehan Study", + "category": "SampleIdentify", + "email": "test@rudderstack.com", + "plan": "Open source", + "logins": 5, + "createdAt": 1599264000 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.5" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", + "locale": "en-US", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 0.8999999761581421 + }, + "campaign": { + "source": "google", + "medium": "medium", + "term": "keyword", + "content": "some content", + "name": "some campaign", + "test": "other value" + }, + "page": { + "path": "/destinations/amplitude", + "referrer": "", + "search": "", + "title": "", + "url": "https://docs.rudderstack.com/destinations/amplitude", + "category": "destination", + "initial_referrer": "https://docs.rudderstack.com", + "initial_referring_domain": "docs.rudderstack.com" + } + }, + "type": "track", + "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", + "originalTimestamp": "2020-10-20T08:14:28.778Z", + "anonymousId": "my-anonymous-id-new", + "userId": "newUserIdAlias", + "properties": { + "product_name": "Shirt", + "brand": "Wrogn" + }, + "event": "Add to Cart", + "previousId": "sampleusrRudder3", + "sentAt": "2020-10-20T08:14:28.778Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "event name Add to Cart is not supported. Aborting!", + "statTags": { + "destType": "FRESHMARKETER", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshmarketer", + "description": "Track call: some required properties is missing for sales_activity", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.1.5" + }, + "traits": { + "name": "Shehan Study", + "category": "SampleIdentify", + "email": "test@rudderstack.com", + "plan": "Open source", + "logins": 5, + "createdAt": 1599264000 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.5" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", + "locale": "en-US", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 0.8999999761581421 + }, + "campaign": { + "source": "google", + "medium": "medium", + "term": "keyword", + "content": "some content", + "name": "some campaign", + "test": "other value" + }, + "page": { + "path": "/destinations/amplitude", + "referrer": "", + "search": "", + "title": "", + "url": "https://docs.rudderstack.com/destinations/amplitude", + "category": "destination", + "initial_referrer": "https://docs.rudderstack.com", + "initial_referring_domain": "docs.rudderstack.com" + } + }, + "type": "track", + "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", + "originalTimestamp": "2020-10-20T08:14:28.778Z", + "anonymousId": "my-anonymous-id-new", + "userId": "newUserIdAlias", + "email": "test@rudderstack.com", + "properties": { + "product_name": "Shirt", + "brand": "Wrogn" + }, + "event": "sales_activity", + "previousId": "sampleusrRudder3", + "sentAt": "2020-10-20T08:14:28.778Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Missing required value from \"properties.title\"", + "statTags": { + "destType": "FRESHMARKETER", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshmarketer", + "description": "Track call: for salesActivityName", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.1.5" + }, + "traits": { + "name": "Shehan Study", + "category": "SampleIdentify", + "email": "test@rudderstack.com", + "plan": "Open source", + "logins": 5, + "createdAt": 1599264000 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.5" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", + "locale": "en-US", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 0.8999999761581421 + }, + "campaign": { + "source": "google", + "medium": "medium", + "term": "keyword", + "content": "some content", + "name": "some campaign", + "test": "other value" + }, + "page": { + "path": "/destinations/amplitude", + "referrer": "", + "search": "", + "title": "", + "url": "https://docs.rudderstack.com/destinations/amplitude", + "category": "destination", + "initial_referrer": "https://docs.rudderstack.com", + "initial_referring_domain": "docs.rudderstack.com" + }, + "externalId": { + "type": "Contact" + } + }, + "type": "track", + "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", + "originalTimestamp": "2020-10-20T08:14:28.778Z", + "anonymousId": "my-anonymous-id-new", + "userId": "newUserIdAlias", + "email": "test@rudderstack.com", + "properties": { + "product_name": "Shirt", + "brand": "Wrogn", + "salesActivityName": "own-calender", + "title": "new Contact", + "startDate": "2021-05-04T17:00:00+05:30", + "endDate": "2022-06-04T17:30:00+05:30", + "ownerId": "70054866612" + }, + "event": "sales_activity", + "previousId": "sampleusrRudder3", + "sentAt": "2020-10-20T08:14:28.778Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "FORM": {}, + "JSON": { + "sales_activity": { + "title": "new Contact", + "end_date": "2022-06-04T17:30:00+05:30", + "owner_id": "70054866612", + "start_date": "2021-05-04T17:00:00+05:30", + "created_at": "2020-10-20T08:14:28.778Z", + "updated_at": "2020-10-20T08:14:28.778Z", + "targetable_id": 70054866612, + "targetable_type": "Contact", + "sales_activity_name": "own-calender", + "sales_activity_type_id": 70000666879 + } + }, + "JSON_ARRAY": {} + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": {}, + "headers": { + "Content-Type": "application/json", + "Authorization": "Token token=dummyApiKey" + }, + "version": "1", + "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/sales_activities", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "freshmarketer", + "description": "Track call: lifecycle_stage_id", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.1.5" + }, + "traits": { + "name": "Shehan Study", + "category": "SampleIdentify", + "plan": "Open source", + "logins": 5, + "createdAt": 1599264000 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.5" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", + "locale": "en-US", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 0.8999999761581421 + }, + "campaign": { + "source": "google", + "medium": "medium", + "term": "keyword", + "content": "some content", + "name": "some campaign", + "test": "other value" + }, + "page": { + "path": "/destinations/amplitude", + "referrer": "", + "search": "", + "title": "", + "url": "https://docs.rudderstack.com/destinations/amplitude", + "category": "destination", + "initial_referrer": "https://docs.rudderstack.com", + "initial_referring_domain": "docs.rudderstack.com" + } + }, + "type": "track", + "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", + "originalTimestamp": "2020-10-20T08:14:28.778Z", + "anonymousId": "my-anonymous-id-new", + "userId": "newUserIdAlias", + "properties": { + "email": "jamessampleton3@gmail.com", + "lifecycleStageId": "71012139273", + "title": "new Contact", + "startDate": "2021-05-04T17:00:00+05:30", + "endDate": "2022-06-04T17:30:00+05:30", + "ownerId": "70054866612", + "targetableType": "Contact" + }, + "event": "lifecycle_stage", + "previousId": "sampleusrRudder3", + "sentAt": "2020-10-20T08:14:28.778Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/contacts/upsert", + "headers": { + "Authorization": "Token token=dummyApiKey", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "contact": { + "lifecycle_stage_id": "71012139273" + }, + "unique_identifier": { + "emails": "jamessampleton3@gmail.com" + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "freshmarketer", + "description": "Track call: In lifecycle stage, email is missing", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.1.5" + }, + "traits": { + "name": "Shehan Study", + "category": "SampleIdentify", + "plan": "Open source", + "logins": 5, + "createdAt": 1599264000 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.5" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", + "locale": "en-US", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 0.8999999761581421 + }, + "campaign": { + "source": "google", + "medium": "medium", + "term": "keyword", + "content": "some content", + "name": "some campaign", + "test": "other value" + }, + "page": { + "path": "/destinations/amplitude", + "referrer": "", + "search": "", + "title": "", + "url": "https://docs.rudderstack.com/destinations/amplitude", + "category": "destination", + "initial_referrer": "https://docs.rudderstack.com", + "initial_referring_domain": "docs.rudderstack.com" + } + }, + "type": "track", + "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", + "originalTimestamp": "2020-10-20T08:14:28.778Z", + "anonymousId": "my-anonymous-id-new", + "userId": "newUserIdAlias", + "properties": { + "lifecycleStageId": "71012139273", + "title": "new Contact", + "startDate": "2021-05-04T17:00:00+05:30", + "endDate": "2022-06-04T17:30:00+05:30", + "ownerId": "70054866612", + "targetableType": "Contact" + }, + "event": "lifecycle_stage", + "previousId": "sampleusrRudder3", + "sentAt": "2020-10-20T08:14:28.778Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "email is required for updating life Cycle Stages. Aborting!", + "statTags": { + "destType": "FRESHMARKETER", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshmarketer", + "description": "Track call: Either of lifecycleStageName or lifecycleStageId is required", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.1.5" + }, + "traits": { + "name": "Shehan Study", + "category": "SampleIdentify", + "email": "test@rudderstack.com", + "plan": "Open source", + "logins": 5, + "createdAt": 1599264000 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.5" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", + "locale": "en-US", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 0.8999999761581421 + }, + "campaign": { + "source": "google", + "medium": "medium", + "term": "keyword", + "content": "some content", + "name": "some campaign", + "test": "other value" + }, + "page": { + "path": "/destinations/amplitude", + "referrer": "", + "search": "", + "title": "", + "url": "https://docs.rudderstack.com/destinations/amplitude", + "category": "destination", + "initial_referrer": "https://docs.rudderstack.com", + "initial_referring_domain": "docs.rudderstack.com" + } + }, + "type": "track", + "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", + "originalTimestamp": "2020-10-20T08:14:28.778Z", + "anonymousId": "my-anonymous-id-new", + "userId": "newUserIdAlias", + "email": "jamessampleton3@gmail.com", + "properties": { + "title": "new Contact", + "startDate": "2021-05-04T17:00:00+05:30", + "endDate": "2022-06-04T17:30:00+05:30", + "ownerId": "70054866612", + "targetableType": "Contact" + }, + "event": "lifecycle_stage", + "previousId": "sampleusrRudder3", + "sentAt": "2020-10-20T08:14:28.778Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Either of lifecycleStageName or lifecycleStageId is required. Aborting!", + "statTags": { + "destType": "FRESHMARKETER", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshmarketer", + "description": "Track call: Either of sales activity name or sales activity type id is required", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.1.5" + }, + "traits": { + "name": "Shehan Study", + "category": "SampleIdentify", + "email": "test@rudderstack.com", + "plan": "Open source", + "logins": 5, + "createdAt": 1599264000 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.5" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", + "locale": "en-US", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 0.8999999761581421 + }, + "campaign": { + "source": "google", + "medium": "medium", + "term": "keyword", + "content": "some content", + "name": "some campaign", + "test": "other value" + }, + "page": { + "path": "/destinations/amplitude", + "referrer": "", + "search": "", + "title": "", + "url": "https://docs.rudderstack.com/destinations/amplitude", + "category": "destination", + "initial_referrer": "https://docs.rudderstack.com", + "initial_referring_domain": "docs.rudderstack.com" + }, + "externalId": { + "type": "Contact" + } + }, + "type": "track", + "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", + "originalTimestamp": "2020-10-20T08:14:28.778Z", + "anonymousId": "my-anonymous-id-new", + "userId": "newUserIdAlias", + "email": "test@rudderstack.com", + "properties": { + "product_name": "Shirt", + "brand": "Wrogn", + "title": "new Contact", + "startDate": "2021-05-04T17:00:00+05:30", + "endDate": "2022-06-04T17:30:00+05:30", + "ownerId": "70054866612" + }, + "event": "sales_activity", + "previousId": "sampleusrRudder3", + "sentAt": "2020-10-20T08:14:28.778Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Either of sales activity name or sales activity type id is required. Aborting!", + "statTags": { + "destType": "FRESHMARKETER", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshmarketer", + "description": "Track call: Either of email or targetable_id is required for creating sales activity.", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.1.5" + }, + "traits": { + "name": "Shehan Study", + "category": "SampleIdentify", + "plan": "Open source", + "logins": 5, + "createdAt": 1599264000 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.5" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", + "locale": "en-US", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 0.8999999761581421 + }, + "campaign": { + "source": "google", + "medium": "medium", + "term": "keyword", + "content": "some content", + "name": "some campaign", + "test": "other value" + }, + "page": { + "path": "/destinations/amplitude", + "referrer": "", + "search": "", + "title": "", + "url": "https://docs.rudderstack.com/destinations/amplitude", + "category": "destination", + "initial_referrer": "https://docs.rudderstack.com", + "initial_referring_domain": "docs.rudderstack.com" + }, + "externalId": { + "type": "Contact" + } + }, + "type": "track", + "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", + "originalTimestamp": "2020-10-20T08:14:28.778Z", + "anonymousId": "my-anonymous-id-new", + "userId": "newUserIdAlias", + "properties": { + "product_name": "Shirt", + "brand": "Wrogn", + "salesActivityName": "own-calender", + "title": "new Contact", + "startDate": "2021-05-04T17:00:00+05:30", + "endDate": "2022-06-04T17:30:00+05:30", + "ownerId": "70054866612" + }, + "event": "sales_activity", + "previousId": "sampleusrRudder3", + "sentAt": "2020-10-20T08:14:28.778Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Either of email or targetable_id is required for creating sales activity. Aborting!", + "statTags": { + "destType": "FRESHMARKETER", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshmarketer", + "description": "Track call: sales activity with salesActivityTypeId", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.1.5" + }, + "traits": { + "name": "Shehan Study", + "category": "SampleIdentify", + "email": "test@rudderstack.com", + "plan": "Open source", + "logins": 5, + "createdAt": 1599264000 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.5" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", + "locale": "en-US", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 0.8999999761581421 + }, + "campaign": { + "source": "google", + "medium": "medium", + "term": "keyword", + "content": "some content", + "name": "some campaign", + "test": "other value" + }, + "page": { + "path": "/destinations/amplitude", + "referrer": "", + "search": "", + "title": "", + "url": "https://docs.rudderstack.com/destinations/amplitude", + "category": "destination", + "initial_referrer": "https://docs.rudderstack.com", + "initial_referring_domain": "docs.rudderstack.com" + }, + "externalId": { + "type": "Contact" + } + }, + "type": "track", + "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", + "originalTimestamp": "2020-10-20T08:14:28.778Z", + "anonymousId": "my-anonymous-id-new", + "userId": "newUserIdAlias", + "email": "jamessampleton3@gmail.com", + "properties": { + "salesActivityTypeId": "70000663932", + "title": "new Contact", + "startDate": "2021-05-04T17:00:00+05:30", + "endDate": "2022-06-04T17:30:00+05:30", + "ownerId": "70054866612" + }, + "event": "sales_activity", + "previousId": "sampleusrRudder3", + "sentAt": "2020-10-20T08:14:28.778Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "FORM": {}, + "JSON": { + "sales_activity": { + "title": "new Contact", + "end_date": "2022-06-04T17:30:00+05:30", + "owner_id": "70054866612", + "start_date": "2021-05-04T17:00:00+05:30", + "created_at": "2020-10-20T08:14:28.778Z", + "updated_at": "2020-10-20T08:14:28.778Z", + "targetable_id": 70054866612, + "targetable_type": "Contact", + "sales_activity_type_id": "70000663932" + } + }, + "JSON_ARRAY": {} + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": {}, + "headers": { + "Content-Type": "application/json", + "Authorization": "Token token=dummyApiKey" + }, + "version": "1", + "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/sales_activities", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "freshmarketer", + "description": "Track call: updated sales activity with salesActivityTypeId and targetableId", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.1.5" + }, + "traits": { + "name": "Shehan Study", + "category": "SampleIdentify", + "email": "test@rudderstack.com", + "plan": "Open source", + "logins": 5, + "createdAt": 1599264000 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.5" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", + "locale": "en-US", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 0.8999999761581421 + }, + "campaign": { + "source": "google", + "medium": "medium", + "term": "keyword", + "content": "some content", + "name": "some campaign", + "test": "other value" + }, + "page": { + "path": "/destinations/amplitude", + "referrer": "", + "search": "", + "title": "", + "url": "https://docs.rudderstack.com/destinations/amplitude", + "category": "destination", + "initial_referrer": "https://docs.rudderstack.com", + "initial_referring_domain": "docs.rudderstack.com" + }, + "externalId": { + "id": "70052305908", + "type": "Contact" + } + }, + "type": "track", + "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", + "originalTimestamp": "2020-10-20T08:14:28.778Z", + "anonymousId": "my-anonymous-id-new", + "userId": "newUserIdAlias", + "properties": { + "salesActivityTypeId": "70000663932", + "title": "new Contact", + "startDate": "2021-05-04T17:00:00+05:30", + "endDate": "2022-06-04T17:30:00+05:30", + "ownerId": "70054866612" + }, + "event": "sales_activity", + "previousId": "sampleusrRudder3", + "sentAt": "2020-10-20T08:14:28.778Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "FORM": {}, + "JSON": { + "sales_activity": { + "title": "new Contact", + "end_date": "2022-06-04T17:30:00+05:30", + "owner_id": "70054866612", + "start_date": "2021-05-04T17:00:00+05:30", + "created_at": "2020-10-20T08:14:28.778Z", + "updated_at": "2020-10-20T08:14:28.778Z", + "targetable_id": "70052305908", + "targetable_type": "Contact", + "sales_activity_type_id": "70000663932" + } + }, + "JSON_ARRAY": {} + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": {}, + "headers": { + "Content-Type": "application/json", + "Authorization": "Token token=dummyApiKey" + }, + "version": "1", + "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/sales_activities", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "freshmarketer", + "description": "Unsupported message Type", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "type": "page", + "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", + "originalTimestamp": "2020-10-20T08:14:28.778Z", + "anonymousId": "my-anonymous-id-new", + "userId": "newUserIdAlias", + "email": "jamessampleton3@gmail.com", + "properties": { + "lifecycleStageId": "71012139273", + "title": "new Contact", + "startDate": "2021-05-04T17:00:00+05:30", + "endDate": "2022-06-04T17:30:00+05:30", + "ownerId": "70054866612", + "targetableType": "Contact" + }, + "event": "lifecycle_stage", + "previousId": "sampleusrRudder3", + "sentAt": "2020-10-20T08:14:28.778Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "message type page not supported", + "statTags": { + "destType": "FRESHMARKETER", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshmarketer", + "description": "Group call: email is required for adding contacts to marketing lists", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "messageId": "sadjb-1e2r3fhgb-12bvbbj", + "originalTimestamp": "2022-06-22T10:57:58Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "traits": { + "groupType": "marketing_lists" + }, + "type": "group", + "sentAt": "2022-04-22T10:57:58Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "email is required for adding in the marketing lists. Aborting!", + "statTags": { + "destType": "FRESHMARKETER", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshmarketer", + "description": "Group call: group type is not present", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "messageId": "sadjb-1e2r3fhgb-12bvbbj", + "originalTimestamp": "2022-06-22T10:57:58Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "traits": { + "name": "Mark Twain", + "phone": "919191919191", + "numberOfEmployees": 51, + "annualRevenue": 1000, + "address": "Red Colony", + "city": "Colony", + "state": "Haryana" + }, + "type": "group", + "sentAt": "2022-04-22T10:57:58Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "groupType is required for Group call", + "statTags": { + "destType": "FRESHMARKETER", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshmarketer", + "description": "Group call: add contacts in existing marketing lists", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "messageId": "sadjb-1e2r3fhgb-12bvbbj", + "originalTimestamp": "2022-06-22T10:57:58Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "traits": { + "email": "jamessampleton1@gmail.com" + } + }, + "traits": { + "groupType": "marketing_lists", + "listName": "Voda 5G", + "address": "Red Colony", + "city": "Colony", + "state": "Haryana" + }, + "type": "group", + "sentAt": "2022-04-22T10:57:58Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "FORM": {}, + "JSON": { + "ids": [ + 70054866612 + ] + }, + "JSON_ARRAY": {} + }, + "type": "REST", + "files": {}, + "method": "PUT", + "params": {}, + "headers": { + "Content-Type": "application/json", + "Authorization": "Token token=dummyApiKey" + }, + "version": "1", + "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/lists/70000059716/add_contacts", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "freshmarketer", + "description": "Group call: groupType is not supported", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "messageId": "sadjb-1e2r3fhgb-12bvbbj", + "originalTimestamp": "2022-06-22T10:57:58Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "traits": { + "groupType": "marketing", + "listName": "Voda 5G", + "address": "Red Colony", + "city": "Colony", + "state": "Haryana" + }, + "type": "group", + "sentAt": "2022-04-22T10:57:58Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "groupType marketing is not supported. Aborting!", + "statTags": { + "destType": "FRESHMARKETER", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshmarketer", + "description": "Group call: listId or listName is required", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "messageId": "sadjb-1e2r3fhgb-12bvbbj", + "originalTimestamp": "2022-06-22T10:57:58Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "traits": { + "email": "jamessampleton1@gmail.com" + } + }, + "traits": { + "groupType": "marketing_lists", + "address": "Red Colony", + "city": "Colony", + "state": "Haryana" + }, + "type": "group", + "sentAt": "2022-04-22T10:57:58Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "listId or listName is required. Aborting!", + "statTags": { + "destType": "FRESHMARKETER", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshmarketer", + "description": "Group call: add marketing lists with listId", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "messageId": "sadjb-1e2r3fhgb-12bvbbj", + "originalTimestamp": "2022-06-22T10:57:58Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "traits": { + "email": "jamessampleton1@gmail.com" + } + }, + "traits": { + "listId": "70000058627", + "groupType": "marketing_lists", + "address": "Red Colony", + "city": "Colony", + "state": "Haryana" + }, + "type": "group", + "sentAt": "2022-04-22T10:57:58Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "FORM": {}, + "JSON": { + "ids": [ + 70054866612 + ] + }, + "JSON_ARRAY": {} + }, + "type": "REST", + "files": {}, + "method": "PUT", + "params": {}, + "headers": { + "Content-Type": "application/json", + "Authorization": "Token token=dummyApiKey" + }, + "version": "1", + "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/lists/70000058627/add_contacts", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "freshmarketer", + "description": "Track call: with wrong sales activity name", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.1.5" + }, + "traits": { + "name": "Shehan Study", + "category": "SampleIdentify", + "email": "test@rudderstack.com", + "plan": "Open source", + "logins": 5, + "createdAt": 1599264000 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.5" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", + "locale": "en-US", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 0.8999999761581421 + }, + "campaign": { + "source": "google", + "medium": "medium", + "term": "keyword", + "content": "some content", + "name": "some campaign", + "test": "other value" + }, + "page": { + "path": "/destinations/amplitude", + "referrer": "", + "search": "", + "title": "", + "url": "https://docs.rudderstack.com/destinations/amplitude", + "category": "destination", + "initial_referrer": "https://docs.rudderstack.com", + "initial_referring_domain": "docs.rudderstack.com" + }, + "externalId": { + "type": "Contact" + } + }, + "type": "track", + "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", + "originalTimestamp": "2020-10-20T08:14:28.778Z", + "anonymousId": "my-anonymous-id-new", + "userId": "newUserIdAlias", + "email": "test@rudderstack.com", + "properties": { + "product_name": "Shirt", + "brand": "Wrogn", + "salesActivityName": "own-list", + "title": "new Contact", + "startDate": "2021-05-04T17:00:00+05:30", + "endDate": "2022-06-04T17:30:00+05:30", + "ownerId": "70054866612" + }, + "event": "sales_activity", + "previousId": "sampleusrRudder3", + "sentAt": "2020-10-20T08:14:28.778Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "sales Activity own-list doesn't exists. Aborting!", + "statTags": { + "destType": "FRESHMARKETER", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshmarketer", + "description": "Track call: update contacts with sales Activity name", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.1.5" + }, + "traits": { + "name": "Shehan Study", + "category": "SampleIdentify", + "plan": "Open source", + "logins": 5, + "createdAt": 1599264000 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.5" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", + "locale": "en-US", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 0.8999999761581421 + }, + "campaign": { + "source": "google", + "medium": "medium", + "term": "keyword", + "content": "some content", + "name": "some campaign", + "test": "other value" + }, + "page": { + "path": "/destinations/amplitude", + "referrer": "", + "search": "", + "title": "", + "url": "https://docs.rudderstack.com/destinations/amplitude", + "category": "destination", + "initial_referrer": "https://docs.rudderstack.com", + "initial_referring_domain": "docs.rudderstack.com" + } + }, + "type": "track", + "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", + "originalTimestamp": "2020-10-20T08:14:28.778Z", + "anonymousId": "my-anonymous-id-new", + "userId": "newUserIdAlias", + "properties": { + "email": "jamessampleton6@gmail.com", + "lifecycleStageName": "final Customer", + "title": "new Contact", + "startDate": "2021-05-04T17:00:00+05:30", + "endDate": "2022-06-04T17:30:00+05:30", + "ownerId": "70054866612", + "targetableType": "Contact" + }, + "event": "lifecycle_stage", + "previousId": "sampleusrRudder3", + "sentAt": "2020-10-20T08:14:28.778Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "FORM": {}, + "JSON": { + "contact": { + "lifecycle_stage_id": 71012806409 + }, + "unique_identifier": { + "emails": "jamessampleton6@gmail.com" + } + }, + "JSON_ARRAY": {} + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": {}, + "headers": { + "Content-Type": "application/json", + "Authorization": "Token token=dummyApiKey" + }, + "version": "1", + "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/contacts/upsert", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "freshmarketer", + "description": "Track call: with wrong lifecycleStageName", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.1.5" + }, + "traits": { + "name": "Shehan Study", + "category": "SampleIdentify", + "plan": "Open source", + "logins": 5, + "createdAt": 1599264000 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.5" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", + "locale": "en-US", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 0.8999999761581421 + }, + "campaign": { + "source": "google", + "medium": "medium", + "term": "keyword", + "content": "some content", + "name": "some campaign", + "test": "other value" + }, + "page": { + "path": "/destinations/amplitude", + "referrer": "", + "search": "", + "title": "", + "url": "https://docs.rudderstack.com/destinations/amplitude", + "category": "destination", + "initial_referrer": "https://docs.rudderstack.com", + "initial_referring_domain": "docs.rudderstack.com" + } + }, + "type": "track", + "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", + "originalTimestamp": "2020-10-20T08:14:28.778Z", + "anonymousId": "my-anonymous-id-new", + "userId": "newUserIdAlias", + "properties": { + "email": "jamessampleton6@gmail.com", + "lifecycleStageName": "final ExCustomer", + "title": "new Contact", + "startDate": "2021-05-04T17:00:00+05:30", + "endDate": "2022-06-04T17:30:00+05:30", + "ownerId": "70054866612", + "targetableType": "Contact" + }, + "event": "lifecycle_stage", + "previousId": "sampleusrRudder3", + "sentAt": "2020-10-20T08:14:28.778Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "failed to fetch lifeCycleStages with final ExCustomer", + "statTags": { + "destType": "FRESHMARKETER", + "errorCategory": "network", + "errorType": "aborted", + "feature": "processor", + "implementation": "native", + "meta": "instrumentation", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshmarketer", + "description": "Track call: Multiplexing", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.1.5" + }, + "traits": { + "name": "Shehan Study", + "category": "SampleIdentify", + "email": "test@rudderstack.com", + "plan": "Open source", + "logins": 5, + "createdAt": 1599264000 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.5" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", + "locale": "en-US", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 0.8999999761581421 + }, + "campaign": { + "source": "google", + "medium": "medium", + "term": "keyword", + "content": "some content", + "name": "some campaign", + "test": "other value" + }, + "page": { + "path": "/destinations/amplitude", + "referrer": "", + "search": "", + "title": "", + "url": "https://docs.rudderstack.com/destinations/amplitude", + "category": "destination", + "initial_referrer": "https://docs.rudderstack.com", + "initial_referring_domain": "docs.rudderstack.com" + }, + "externalId": { + "type": "Contact" + } + }, + "type": "track", + "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", + "originalTimestamp": "2020-10-20T08:14:28.778Z", + "anonymousId": "my-anonymous-id-new", + "userId": "newUserIdAlias", + "email": "test@rudderstack.com", + "properties": { + "product_name": "Shirt", + "brand": "Wrogn", + "salesActivityName": "own-calender", + "title": "new Contact", + "startDate": "2021-05-04T17:00:00+05:30", + "endDate": "2022-06-04T17:30:00+05:30", + "ownerId": "70054866612", + "lifecycleStageId": "71012139273" + }, + "event": "test_activity", + "previousId": "sampleusrRudder3", + "sentAt": "2020-10-20T08:14:28.778Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com", + "rudderEventsToFreshmarketerEvents": [ + { + "from": "test_activity", + "to": "sales_activity" + }, + { + "from": "test_activity", + "to": "lifecycle_stage" + }, + { + "from": "test_event", + "to": "lifecycle_stage" + } + ] + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "FORM": {}, + "JSON": { + "sales_activity": { + "title": "new Contact", + "end_date": "2022-06-04T17:30:00+05:30", + "owner_id": "70054866612", + "start_date": "2021-05-04T17:00:00+05:30", + "created_at": "2020-10-20T08:14:28.778Z", + "updated_at": "2020-10-20T08:14:28.778Z", + "targetable_id": 70054866612, + "targetable_type": "Contact", + "sales_activity_name": "own-calender", + "sales_activity_type_id": 70000666879 + } + }, + "JSON_ARRAY": {} + }, + "type": "REST", + "files": {}, + "method": "POST", + "userId": "", + "params": {}, + "headers": { + "Content-Type": "application/json", + "Authorization": "Token token=dummyApiKey" + }, + "version": "1", + "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/sales_activities" + }, + "statusCode": 200 + }, + { + "output": { + "body": { + "JSON": { + "contact": { + "lifecycle_stage_id": "71012139273" + }, + "unique_identifier": { + "emails": "test@rudderstack.com" + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "type": "REST", + "files": {}, + "userId": "", + "method": "POST", + "params": {}, + "headers": { + "Authorization": "Token token=dummyApiKey", + "Content-Type": "application/json" + }, + "version": "1", + "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/contacts/upsert" + }, + "statusCode": 200 + } + ] + } + } + } +] \ No newline at end of file diff --git a/test/integrations/destinations/freshmarketer/router/data.ts b/test/integrations/destinations/freshmarketer/router/data.ts new file mode 100644 index 0000000000..bffb361ba5 --- /dev/null +++ b/test/integrations/destinations/freshmarketer/router/data.ts @@ -0,0 +1,361 @@ +export const data = [ + { + name: 'freshmarketer', + description: 'Test 0', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "rudderstack-476952domain3105.myfreshworks.com" + } + }, + "metadata": { + "jobId": 1 + }, + "message": { + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-06-22T10:57:58Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99099", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + } + }, + "traits": { + "email": "testuser@google.com", + "first_name": "Rk", + "last_name": "Mishra", + "mobileNumber": "1-926-555-9504", + "lifecycleStageId": 71010794467, + "phone": "9988776655", + "owner_id": "70000090119" + }, + "type": "identify", + "sentAt": "2022-04-22T10:57:58Z" + } + }, + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "rudderstack-476952domain3105.myfreshworks.com" + } + }, + "metadata": { + "jobId": 2 + }, + "message": { + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-06-22T10:57:58Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99099", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + } + }, + "traits": { + "email": "testuser@google.com", + "first_name": "Rk", + "last_name": "Mishra", + "mobileNumber": "1-926-555-9504", + "lifecycleStageId": 71010794467, + "phone": "9988776655", + "owner_id": "70000090119" + }, + "type": "identify", + "sentAt": "2022-04-22T10:57:58Z" + } + }, + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + }, + "metadata": { + "jobId": 3 + }, + "message": { + "messageId": "sadjb-1e2r3fhgb-12bvbbj", + "originalTimestamp": "2022-06-22T10:57:58Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "traits": { + "email": "testuser@google.com" + } + }, + "traits": { + "groupType": "accounts", + "name": "Mark Twain", + "phone": "919191919191", + "numberOfEmployees": 51, + "annualRevenue": 1000, + "address": "Red Colony", + "city": "Colony", + "state": "Haryana" + }, + "type": "group", + "sentAt": "2022-04-22T10:57:58Z" + } + } + ], + destType: 'freshmarketer', + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + "batchedRequest": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://rudderstack-476952domain3105.myfreshworks.com/crm/sales/api/contacts/upsert", + "headers": { + "Authorization": "Token token=dummyApiKey", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "contact": { + "emails": "testuser@google.com", + "first_name": "Rk", + "last_name": "Mishra", + "work_number": "9988776655", + "external_id": "ea5cfab2-3961-4d8a-8187-3d1858c99099", + "mobile_number": "1-926-555-9504", + "created_at": "2022-06-22T10:57:58Z", + "updated_at": "2022-06-22T10:57:58Z", + "lifecycle_stage_id": 71010794467 + }, + "unique_identifier": { + "emails": "testuser@google.com" + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {} + }, + "metadata": [ + { + "jobId": 1 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "rudderstack-476952domain3105.myfreshworks.com" + } + } + }, + { + "batchedRequest": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://rudderstack-476952domain3105.myfreshworks.com/crm/sales/api/contacts/upsert", + "headers": { + "Authorization": "Token token=dummyApiKey", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "contact": { + "emails": "testuser@google.com", + "first_name": "Rk", + "last_name": "Mishra", + "work_number": "9988776655", + "external_id": "ea5cfab2-3961-4d8a-8187-3d1858c99099", + "mobile_number": "1-926-555-9504", + "created_at": "2022-06-22T10:57:58Z", + "updated_at": "2022-06-22T10:57:58Z", + "lifecycle_stage_id": 71010794467 + }, + "unique_identifier": { + "emails": "testuser@google.com" + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {} + }, + "metadata": [ + { + "jobId": 2 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "rudderstack-476952domain3105.myfreshworks.com" + } + } + }, + { + "batchedRequest": { + "body": { + "XML": {}, + "FORM": {}, + "JSON": { + "contact": { + "sales_accounts": [ + { + "id": 70003771198, + "name": "div-quer", + "avatar": null, + "partial": true, + "website": null, + "is_primary": true, + "last_contacted": null, + "record_type_id": "71010794477" + }, + { + "id": 70003825177, + "name": "BisleriGroup", + "avatar": null, + "partial": true, + "website": null, + "is_primary": false, + "last_contacted": null, + "record_type_id": "71010794477" + }, + { + "id": 70003771396, + "is_primary": false + } + ] + }, + "unique_identifier": { + "emails": "testuser@google.com" + } + }, + "JSON_ARRAY": {} + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": {}, + "headers": { + "Content-Type": "application/json", + "Authorization": "Token token=dummyApiKey" + }, + "version": "1", + "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/contacts/upsert" + }, + "metadata": [ + { + "jobId": 3 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ], + }, + }, + }, + }, +]; diff --git a/test/integrations/destinations/freshsales/network.ts b/test/integrations/destinations/freshsales/network.ts new file mode 100644 index 0000000000..f6043b265f --- /dev/null +++ b/test/integrations/destinations/freshsales/network.ts @@ -0,0 +1,484 @@ +export const networkCallsData = [ + { + httpReq: { + url: 'https://domain-rudder.myfreshworks.com/crm/sales/api/sales_accounts/upsert', + method: 'POST' + }, + httpRes: { + data: { + "sales_account": { + "id": 70003771396, + "name": "postman2.0", + "address": "Red Colony", + "city": "Pune", + "state": "Goa", + "zipcode": null, + "country": null, + "number_of_employees": 11, + "annual_revenue": 1000, + "website": null, + "owner_id": null, + "phone": "919191919191", + "open_deals_amount": null, + "open_deals_count": null, + "won_deals_amount": null, + "won_deals_count": null, + "last_contacted": null, + "last_contacted_mode": null, + "facebook": null, + "twitter": null, + "linkedin": null, + "links": { + "conversations": "/crm/sales/sales_accounts/70003771396/conversations/all?include=email_conversation_recipients%2Ctargetable%2Cphone_number%2Cphone_caller%2Cnote%2Cuser&per_page=3", + "document_associations": "/crm/sales/sales_accounts/70003771396/document_associations", + "notes": "/crm/sales/sales_accounts/70003771396/notes?include=creater", + "tasks": "/crm/sales/sales_accounts/70003771396/tasks?include=creater,owner,updater,targetable,users,task_type", + "appointments": "/crm/sales/sales_accounts/70003771396/appointments?include=creater,owner,updater,targetable,appointment_attendees,conference,note" + }, + "custom_field": {}, + "created_at": "2022-08-17T04:15:00-04:00", + "updated_at": "2022-08-24T06:03:31-04:00", + "avatar": null, + "parent_sales_account_id": null, + "recent_note": null, + "last_contacted_via_sales_activity": null, + "last_contacted_sales_activity_mode": null, + "completed_sales_sequences": null, + "active_sales_sequences": null, + "last_assigned_at": null, + "tags": [], + "is_deleted": false, + "team_user_ids": null, + "has_connections": false, + "record_type_id": "71010794477" + } + }, + status: 200 + }, + }, + { + httpReq: { + url: 'https://domain-rudder.myfreshworks.com/crm/sales/api/contacts/upsert?include=sales_accounts', + method: 'POST' + }, + httpRes: { + data: { + "contact": { + "id": 70042006456, + "first_name": "Rk", + "last_name": "Mishra", + "display_name": "Rk Mishra", + "avatar": null, + "job_title": null, + "city": null, + "state": null, + "zipcode": null, + "country": null, + "email": "testuser@google.com", + "emails": [ + { + "id": 70037311213, + "value": "testuser@google.com", + "is_primary": true, + "label": null, + "_destroy": false + } + ], + "time_zone": "IST", + "work_number": "9988776655", + "mobile_number": "19265559504", + "address": null, + "last_seen": null, + "lead_score": 26, + "last_contacted": null, + "open_deals_amount": null, + "won_deals_amount": null, + "links": { + "conversations": "/crm/sales/contacts/70042006456/conversations/all?include=email_conversation_recipients%2Ctargetable%2Cphone_number%2Cphone_caller%2Cnote%2Cuser&per_page=3", + "timeline_feeds": "/crm/sales/contacts/70042006456/timeline_feeds", + "document_associations": "/crm/sales/contacts/70042006456/document_associations", + "notes": "/crm/sales/contacts/70042006456/notes?include=creater", + "tasks": "/crm/sales/contacts/70042006456/tasks?include=creater,owner,updater,targetable,users,task_type", + "appointments": "/crm/sales/contacts/70042006456/appointments?include=creater,owner,updater,targetable,appointment_attendees,conference,note", + "reminders": "/crm/sales/contacts/70042006456/reminders?include=creater,owner,updater,targetable", + "duplicates": "/crm/sales/contacts/70042006456/duplicates", + "connections": "/crm/sales/contacts/70042006456/connections" + }, + "last_contacted_sales_activity_mode": null, + "custom_field": {}, + "created_at": "2022-08-09T03:22:12-04:00", + "updated_at": "2022-08-30T00:33:27-04:00", + "keyword": "drilling", + "medium": "facebook", + "last_contacted_mode": null, + "recent_note": null, + "won_deals_count": null, + "last_contacted_via_sales_activity": null, + "completed_sales_sequences": null, + "active_sales_sequences": null, + "web_form_ids": null, + "open_deals_count": null, + "last_assigned_at": "2022-08-29T05:51:24-04:00", + "tags": [], + "facebook": null, + "twitter": null, + "linkedin": null, + "is_deleted": false, + "team_user_ids": null, + "external_id": "ea5cfab2-3961-4d8a-8187-3d1858c99099", + "work_email": null, + "subscription_status": 1, + "subscription_types": "2;3;4;5;1", + "customer_fit": 2, + "record_type_id": "71010794476", + "whatsapp_subscription_status": 2, + "sms_subscription_status": 2, + "last_seen_chat": null, + "first_seen_chat": null, + "locale": null, + "total_sessions": null, + "phone_numbers": [], + "sales_accounts": [ + { + "partial": true, + "id": 70003771198, + "name": "div-quer", + "avatar": null, + "website": null, + "last_contacted": null, + "record_type_id": "71010794477", + "is_primary": true + }, + { + "partial": true, + "id": 70003825177, + "name": "BisleriGroup", + "avatar": null, + "website": null, + "last_contacted": null, + "record_type_id": "71010794477", + "is_primary": false + } + ] + } + }, + status: 200 + }, + }, + { + httpReq: { + url: 'https://domain-rudder.myfreshworks.com/crm/sales/api/selector/sales_activity_types', + method: 'GET' + }, + httpRes: { + data: { + "sales_activity_types": [ + { + "partial": true, + "id": 70000666879, + "name": "own-calender", + "internal_name": "cappointment", + "show_in_conversation": true, + "position": 1, + "is_default": false, + "is_checkedin": false + }, + { + "partial": true, + "id": 70000663932, + "name": "fb-support", + "internal_name": "facebook", + "show_in_conversation": true, + "position": 2, + "is_default": false, + "is_checkedin": false + }, + { + "partial": true, + "id": 70000663746, + "name": "twitter sales", + "internal_name": "twitter", + "show_in_conversation": true, + "position": 3, + "is_default": false, + "is_checkedin": false + }, + { + "partial": true, + "id": 70000646396, + "name": "linked sales", + "internal_name": "linkedin", + "show_in_conversation": true, + "position": 4, + "is_default": false, + "is_checkedin": false + }, + { + "partial": true, + "id": 70000642330, + "name": "facebook sales", + "internal_name": "facebook", + "show_in_conversation": true, + "position": 5, + "is_default": false, + "is_checkedin": false + }, + { + "partial": true, + "id": 70000612897, + "name": "Chat", + "internal_name": "chat", + "show_in_conversation": true, + "position": 6, + "is_default": true, + "is_checkedin": false + }, + { + "partial": true, + "id": 70000612898, + "name": "Phone", + "internal_name": "phone", + "show_in_conversation": true, + "position": 7, + "is_default": true, + "is_checkedin": false + }, + { + "partial": true, + "id": 70000612899, + "name": "Meeting", + "internal_name": "appointment", + "show_in_conversation": true, + "position": 8, + "is_default": true, + "is_checkedin": true + }, + { + "partial": true, + "id": 70000612900, + "name": "Task", + "internal_name": "task", + "show_in_conversation": true, + "position": 9, + "is_default": true, + "is_checkedin": false + }, + { + "partial": true, + "id": 70000612901, + "name": "Email", + "internal_name": "email", + "show_in_conversation": true, + "position": 10, + "is_default": true, + "is_checkedin": false + }, + { + "partial": true, + "id": 70000612902, + "name": "SMS Outgoing", + "internal_name": "sms_outgoing", + "show_in_conversation": true, + "position": 11, + "is_default": true, + "is_checkedin": false + }, + { + "partial": true, + "id": 70000612903, + "name": "Reminder", + "internal_name": "reminder", + "show_in_conversation": false, + "position": 12, + "is_default": true, + "is_checkedin": false + }, + { + "partial": true, + "id": 70000612904, + "name": "SMS Incoming", + "internal_name": "sms_incoming", + "show_in_conversation": true, + "position": 13, + "is_default": true, + "is_checkedin": false + } + ] + }, + status: 200 + }, + }, + { + httpReq: { + url: 'https://domain-rudder.myfreshworks.com/crm/sales/api/contacts/upsert', + method: 'POST' + }, + httpRes: { + data: { + "contact": { + "id": 70054866612, + "first_name": null, + "last_name": null, + "display_name": "jamessampleton120@gmail.com", + "avatar": null, + "job_title": null, + "city": null, + "state": null, + "zipcode": null, + "country": null, + "email": "jamessampleton120@gmail.com", + "emails": [ + { + "id": 70047409219, + "value": "jamessampleton120@gmail.com", + "is_primary": true, + "label": null, + "_destroy": false + } + ], + "time_zone": null, + "work_number": null, + "mobile_number": null, + "address": null, + "last_seen": null, + "lead_score": 0, + "last_contacted": null, + "open_deals_amount": null, + "won_deals_amount": null, + "links": { + "conversations": "/crm/sales/contacts/70054866612/conversations/all?include=email_conversation_recipients%2Ctargetable%2Cphone_number%2Cphone_caller%2Cnote%2Cuser&per_page=3", + "timeline_feeds": "/crm/sales/contacts/70054866612/timeline_feeds", + "document_associations": "/crm/sales/contacts/70054866612/document_associations", + "notes": "/crm/sales/contacts/70054866612/notes?include=creater", + "tasks": "/crm/sales/contacts/70054866612/tasks?include=creater,owner,updater,targetable,users,task_type", + "appointments": "/crm/sales/contacts/70054866612/appointments?include=creater,owner,updater,targetable,appointment_attendees,conference,note", + "reminders": "/crm/sales/contacts/70054866612/reminders?include=creater,owner,updater,targetable", + "duplicates": "/crm/sales/contacts/70054866612/duplicates", + "connections": "/crm/sales/contacts/70054866612/connections" + }, + "last_contacted_sales_activity_mode": null, + "custom_field": {}, + "created_at": "2022-10-11T08:42:15-04:00", + "updated_at": "2022-10-11T08:42:15-04:00", + "keyword": null, + "medium": null, + "last_contacted_mode": null, + "recent_note": null, + "won_deals_count": null, + "last_contacted_via_sales_activity": null, + "completed_sales_sequences": null, + "active_sales_sequences": null, + "web_form_ids": null, + "open_deals_count": null, + "last_assigned_at": null, + "tags": [], + "facebook": null, + "twitter": null, + "linkedin": null, + "is_deleted": false, + "team_user_ids": null, + "external_id": null, + "work_email": null, + "subscription_status": 1, + "subscription_types": "2;3;4;5;1", + "customer_fit": 0, + "record_type_id": "71012139284", + "whatsapp_subscription_status": 2, + "sms_subscription_status": 2, + "last_seen_chat": null, + "first_seen_chat": null, + "locale": null, + "total_sessions": null, + "phone_numbers": [] + } + }, + status: 200 + }, + }, + { + httpReq: { + url: 'https://domain-rudder.myfreshworks.com/crm/sales/api/lists', + method: 'GET' + }, + httpRes: { + data: { + "lists": [ + { + "id": 70000053624, + "name": "Sample list" + }, + { + "id": 70000056575, + "name": "list1-test" + }, + { + "id": 70000058627, + "name": "Jio 5G Group" + }, + { + "id": 70000058628, + "name": "Airtel 5G Group" + }, + { + "id": 70000059716, + "name": "Voda 5G" + } + ], + "meta": { + "total_pages": 1, + "total": 5 + } + }, + status: 200 + }, + }, + { + httpReq: { + url: 'https://domain-rudder.myfreshworks.com/crm/sales/api/selector/lifecycle_stages', + method: 'GET' + }, + httpRes: { + data: { + "lifecycle_stages": [ + { + "id": 71012139274, + "name": "Sales Qualified Lead start", + "position": 1, + "disabled": false, + "default": true, + "type": "Sales Qualified Lead", + "contact_status_ids": [70000697858, 70000697859, 70000697860] + }, + { + "id": 71012139273, + "name": "Lead", + "position": 2, + "disabled": false, + "default": true, + "type": "Lead", + "contact_status_ids": [70000697854, 70000697855, 70000697856, 70000697857] + }, + { + "id": 71012806409, + "name": "final Customer", + "position": 3, + "disabled": false, + "default": false, + "type": "Custom", + "contact_status_ids": [70000736543, 70000736544] + }, + { + "id": 71012139275, + "name": "Customer", + "position": 4, + "disabled": false, + "default": true, + "type": "Customer", + "contact_status_ids": [70000697861, 70000697862] + } + ] + }, + status: 200 + }, + } +]; \ No newline at end of file diff --git a/test/integrations/destinations/freshsales/processor/data.ts b/test/integrations/destinations/freshsales/processor/data.ts new file mode 100644 index 0000000000..e3e6a4176a --- /dev/null +++ b/test/integrations/destinations/freshsales/processor/data.ts @@ -0,0 +1,2668 @@ +export const data = [ + { + "name": "freshsales", + "description": "Track call, event is not supported.", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.1.5" + }, + "traits": { + "name": "Shehan Study", + "category": "SampleIdentify", + "email": "test@rudderstack.com", + "plan": "Open source", + "logins": 5, + "createdAt": 1599264000 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.5" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", + "locale": "en-US", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 0.8999999761581421 + }, + "campaign": { + "source": "google", + "medium": "medium", + "term": "keyword", + "content": "some content", + "name": "some campaign", + "test": "other value" + }, + "page": { + "path": "/destinations/amplitude", + "referrer": "", + "search": "", + "title": "", + "url": "https://docs.rudderstack.com/destinations/amplitude", + "category": "destination", + "initial_referrer": "https://docs.rudderstack.com", + "initial_referring_domain": "docs.rudderstack.com" + } + }, + "type": "track", + "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", + "originalTimestamp": "2020-10-20T08:14:28.778Z", + "anonymousId": "my-anonymous-id-new", + "userId": "newUserIdAlias", + "properties": { + "product_name": "Shirt", + "brand": "Wrogn" + }, + "event": { + "name": "Add to Cart" + }, + "previousId": "sampleusrRudder3", + "sentAt": "2020-10-20T08:14:28.778Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Event is a required field and should be a string", + "statTags": { + "destType": "FRESHSALES", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshsales", + "description": "Identify call for creating new user", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "rudderstack-476952domain3105.myfreshworks.com" + } + }, + "message": { + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-06-22T10:57:58Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99099", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + } + }, + "traits": { + "email": "testuser@google.com", + "first_name": "Rk", + "last_name": "Mishra", + "mobileNumber": "1-926-555-9504", + "lifecycleStageId": 71010794467, + "phone": "9988776655", + "owner_id": "70000090119" + }, + "type": "identify", + "sentAt": "2022-04-22T10:57:58Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "FORM": {}, + "JSON": { + "contact": { + "emails": "testuser@google.com", + "last_name": "Mishra", + "created_at": "2022-06-22T10:57:58Z", + "first_name": "Rk", + "updated_at": "2022-06-22T10:57:58Z", + "external_id": "ea5cfab2-3961-4d8a-8187-3d1858c99099", + "work_number": "9988776655", + "mobile_number": "1-926-555-9504", + "lifecycle_stage_id": 71010794467 + }, + "unique_identifier": { + "emails": "testuser@google.com" + } + }, + "JSON_ARRAY": {} + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": {}, + "headers": { + "Content-Type": "application/json", + "Authorization": "Token token=dummyApiKey" + }, + "version": "1", + "endpoint": "https://rudderstack-476952domain3105.myfreshworks.com/crm/sales/api/contacts/upsert", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "freshsales", + "description": "Identify call with numbers in lifecycleStageId, ownerId", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "rudderstack-476952domain3105.myfreshworks.com" + } + }, + "message": { + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-06-22T10:57:58Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99099", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + } + }, + "traits": { + "email": "testuser@google.com", + "first_name": "Rk", + "last_name": "Mishra", + "mobileNumber": "1-926-555-9504", + "lifecycleStageId": 71010794467, + "phone": "9988776655", + "owner_id": "70000090119" + }, + "type": "identify", + "sentAt": "2022-04-22T10:57:58Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "FORM": {}, + "JSON": { + "contact": { + "emails": "testuser@google.com", + "last_name": "Mishra", + "created_at": "2022-06-22T10:57:58Z", + "first_name": "Rk", + "updated_at": "2022-06-22T10:57:58Z", + "external_id": "ea5cfab2-3961-4d8a-8187-3d1858c99099", + "work_number": "9988776655", + "mobile_number": "1-926-555-9504", + "lifecycle_stage_id": 71010794467 + }, + "unique_identifier": { + "emails": "testuser@google.com" + } + }, + "JSON_ARRAY": {} + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": {}, + "headers": { + "Content-Type": "application/json", + "Authorization": "Token token=dummyApiKey" + }, + "version": "1", + "endpoint": "https://rudderstack-476952domain3105.myfreshworks.com/crm/sales/api/contacts/upsert", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "freshsales", + "description": "Identify call with wrong data type in lifecycleStageId, ownerId", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "rudderstack-476952domain3105.myfreshworks.com" + } + }, + "message": { + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-06-22T10:57:58Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99099", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + } + }, + "traits": { + "email": "testuser@google.com", + "first_name": "Rk", + "last_name": "Mishra", + "mobileNumber": "1-926-555-9504", + "lifecycleStageId": "rudderSample", + "phone": "9988776655", + "ownerId": "rudderSample" + }, + "type": "identify", + "sentAt": "2022-04-22T10:57:58Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://rudderstack-476952domain3105.myfreshworks.com/crm/sales/api/contacts/upsert", + "headers": { + "Authorization": "Token token=dummyApiKey", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "contact": { + "emails": "testuser@google.com", + "first_name": "Rk", + "last_name": "Mishra", + "work_number": "9988776655", + "external_id": "ea5cfab2-3961-4d8a-8187-3d1858c99099", + "mobile_number": "1-926-555-9504", + "created_at": "2022-06-22T10:57:58Z", + "updated_at": "2022-06-22T10:57:58Z" + }, + "unique_identifier": { + "emails": "testuser@google.com" + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "freshsales", + "description": "Identify call, email is not provided.", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "rudderstack-476952domain3105.myfreshworks.com" + } + }, + "message": { + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-06-22T10:57:58Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99099", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + } + }, + "traits": { + "first_name": "Rk", + "last_name": "Mishra", + "mobileNumber": "1-926-555-9504", + "lifecycleStageId": "rudderSample", + "phone": "9988776655", + "owner_id": "rudderSample" + }, + "type": "identify", + "sentAt": "2022-04-22T10:57:58Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Missing required value from \"email\"", + "statTags": { + "destType": "FRESHSALES", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshsales", + "description": "Group call: testing with mock api", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + }, + "message": { + "messageId": "sadjb-1e2r3fhgb-12bvbbj", + "originalTimestamp": "2022-06-22T10:57:58Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "traits": { + "email": "testuser@google.com" + } + }, + "traits": { + "groupType": "accounts", + "name": "Mark Twain", + "phone": "919191919191", + "numberOfEmployees": 51, + "annualRevenue": 1000, + "address": "Red Colony", + "city": "Colony", + "state": "Haryana" + }, + "type": "group", + "sentAt": "2022-04-22T10:57:58Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "FORM": {}, + "JSON": { + "contact": { + "sales_accounts": [ + { + "id": 70003771198, + "name": "div-quer", + "avatar": null, + "partial": true, + "website": null, + "is_primary": true, + "last_contacted": null, + "record_type_id": "71010794477" + }, + { + "id": 70003825177, + "name": "BisleriGroup", + "avatar": null, + "partial": true, + "website": null, + "is_primary": false, + "last_contacted": null, + "record_type_id": "71010794477" + }, + { + "id": 70003771396, + "is_primary": false + } + ] + }, + "unique_identifier": { + "emails": "testuser@google.com" + } + }, + "JSON_ARRAY": {} + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": {}, + "headers": { + "Content-Type": "application/json", + "Authorization": "Token token=dummyApiKey" + }, + "version": "1", + "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/contacts/upsert", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "freshsales", + "description": "Group call: name is required field.", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + }, + "message": { + "messageId": "sadjb-1e2r3fhgb-12bvbbj", + "originalTimestamp": "2022-06-22T10:57:58Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "traits": { + "email": "testuser@google.com" + } + }, + "traits": { + "groupType": "accounts", + "phone": "919191919191", + "numberOfEmployees": 51, + "annualRevenue": 1000, + "address": "Red Colony", + "city": "Colony", + "state": "Haryana" + }, + "type": "group", + "sentAt": "2022-04-22T10:57:58Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Missing required value from \"name\"", + "statTags": { + "destType": "FRESHSALES", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshsales", + "description": "missing message type", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + }, + "message": { + "messageId": "sadjb-1e2r3fhgb-12bvbbj", + "originalTimestamp": "2022-06-22T10:57:58Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "traits": { + "email": "testuser4google.com" + } + }, + "traits": { + "name": "Mark Twain", + "phone": "919191919191", + "numberOfEmployees": 51, + "annualRevenue": 1000, + "address": "Red Colony", + "city": "Colony", + "state": "Haryana" + }, + "sentAt": "2022-04-22T10:57:58Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Message Type is not present. Aborting message.", + "statTags": { + "destType": "FRESHSALES", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshsales", + "description": "Wrong message type", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + }, + "message": { + "messageId": "sadjb-1e2r3fhgb-12bvbbj", + "originalTimestamp": "2022-06-22T10:57:58Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "traits": { + "email": "testuser4google.com" + } + }, + "traits": { + "name": "Mark Twain", + "phone": "919191919191", + "numberOfEmployees": 51, + "annualRevenue": 1000, + "address": "Red Colony", + "city": "Colony", + "state": "Haryana" + }, + "type": "page", + "sentAt": "2022-04-22T10:57:58Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "message type page not supported", + "statTags": { + "destType": "FRESHSALES", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshsales", + "description": "Group call: user email is missing", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + }, + "message": { + "messageId": "sadjb-1e2r3fhgb-12bvbbj", + "originalTimestamp": "2022-06-22T10:57:58Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "traits": {} + }, + "traits": { + "groupType": "accounts", + "name": "div-quer", + "phone": "919191919191", + "numberOfEmployees": 51, + "annualRevenue": 1000, + "address": "Red Colony", + "city": "Lal colony", + "state": "Haryana" + }, + "type": "group", + "sentAt": "2022-04-22T10:57:58Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/sales_accounts/upsert", + "headers": { + "Authorization": "Token token=dummyApiKey", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "unique_identifier": { + "name": "div-quer" + }, + "sales_account": { + "name": "div-quer", + "phone": "919191919191", + "number_of_employees": 51, + "annual_revenue": 1000, + "address": "", + "city": "Lal colony", + "state": "Haryana", + "created_at": "2022-06-22T10:57:58Z", + "updated_at": "2022-06-22T10:57:58Z" + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "freshsales", + "description": "Identify call: Email is not present", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-06-22T10:57:58Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99099", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + } + }, + "traits": { + "first_name": "Rk", + "last_name": "Narayan", + "mobileNumber": "1-926-555-9504", + "phone": "9988776655" + }, + "type": "identify", + "sentAt": "2022-04-22T10:57:58Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Missing required value from \"email\"", + "statTags": { + "destType": "FRESHSALES", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshsales", + "description": "Track call, event is not supported.", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.1.5" + }, + "traits": { + "name": "Shehan Study", + "category": "SampleIdentify", + "email": "test@rudderstack.com", + "plan": "Open source", + "logins": 5, + "createdAt": 1599264000 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.5" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", + "locale": "en-US", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 0.8999999761581421 + }, + "campaign": { + "source": "google", + "medium": "medium", + "term": "keyword", + "content": "some content", + "name": "some campaign", + "test": "other value" + }, + "page": { + "path": "/destinations/amplitude", + "referrer": "", + "search": "", + "title": "", + "url": "https://docs.rudderstack.com/destinations/amplitude", + "category": "destination", + "initial_referrer": "https://docs.rudderstack.com", + "initial_referring_domain": "docs.rudderstack.com" + } + }, + "type": "track", + "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", + "originalTimestamp": "2020-10-20T08:14:28.778Z", + "anonymousId": "my-anonymous-id-new", + "userId": "newUserIdAlias", + "properties": { + "product_name": "Shirt", + "brand": "Wrogn" + }, + "event": "Add to Cart", + "previousId": "sampleusrRudder3", + "sentAt": "2020-10-20T08:14:28.778Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "event name Add to Cart is not supported. Aborting!", + "statTags": { + "destType": "FRESHSALES", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshsales", + "description": "Track call: some required properties is missing for sales_activity", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.1.5" + }, + "traits": { + "name": "Shehan Study", + "category": "SampleIdentify", + "email": "test@rudderstack.com", + "plan": "Open source", + "logins": 5, + "createdAt": 1599264000 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.5" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", + "locale": "en-US", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 0.8999999761581421 + }, + "campaign": { + "source": "google", + "medium": "medium", + "term": "keyword", + "content": "some content", + "name": "some campaign", + "test": "other value" + }, + "page": { + "path": "/destinations/amplitude", + "referrer": "", + "search": "", + "title": "", + "url": "https://docs.rudderstack.com/destinations/amplitude", + "category": "destination", + "initial_referrer": "https://docs.rudderstack.com", + "initial_referring_domain": "docs.rudderstack.com" + } + }, + "type": "track", + "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", + "originalTimestamp": "2020-10-20T08:14:28.778Z", + "anonymousId": "my-anonymous-id-new", + "userId": "newUserIdAlias", + "email": "test@rudderstack.com", + "properties": { + "product_name": "Shirt", + "brand": "Wrogn" + }, + "event": "sales_activity", + "previousId": "sampleusrRudder3", + "sentAt": "2020-10-20T08:14:28.778Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Missing required value from \"properties.title\"", + "statTags": { + "destType": "FRESHSALES", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshsales", + "description": "Track call: for salesActivityName", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.1.5" + }, + "traits": { + "name": "Shehan Study", + "category": "SampleIdentify", + "email": "test@rudderstack.com", + "plan": "Open source", + "logins": 5, + "createdAt": 1599264000 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.5" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", + "locale": "en-US", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 0.8999999761581421 + }, + "campaign": { + "source": "google", + "medium": "medium", + "term": "keyword", + "content": "some content", + "name": "some campaign", + "test": "other value" + }, + "page": { + "path": "/destinations/amplitude", + "referrer": "", + "search": "", + "title": "", + "url": "https://docs.rudderstack.com/destinations/amplitude", + "category": "destination", + "initial_referrer": "https://docs.rudderstack.com", + "initial_referring_domain": "docs.rudderstack.com" + }, + "externalId": { + "type": "Contact" + } + }, + "type": "track", + "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", + "originalTimestamp": "2020-10-20T08:14:28.778Z", + "anonymousId": "my-anonymous-id-new", + "userId": "newUserIdAlias", + "email": "test@rudderstack.com", + "properties": { + "product_name": "Shirt", + "brand": "Wrogn", + "salesActivityName": "own-calender", + "title": "new Contact", + "startDate": "2021-05-04T17:00:00+05:30", + "endDate": "2022-06-04T17:30:00+05:30", + "ownerId": "70054866612" + }, + "event": "test", + "previousId": "sampleusrRudder3", + "sentAt": "2020-10-20T08:14:28.778Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com", + "rudderEventsToFreshsalesEvents": [ + { + "from": "test", + "to": "sales_activity" + } + ] + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "FORM": {}, + "JSON": { + "sales_activity": { + "title": "new Contact", + "created_at": "2020-10-20T08:14:28.778Z", + "end_date": "2022-06-04T17:30:00+05:30", + "owner_id": "70054866612", + "start_date": "2021-05-04T17:00:00+05:30", + "updated_at": "2020-10-20T08:14:28.778Z", + "targetable_id": 70054866612, + "targetable_type": "Contact", + "sales_activity_name": "own-calender", + "sales_activity_type_id": 70000666879 + } + }, + "JSON_ARRAY": {} + }, + "type": "REST", + "userId": "", + "files": {}, + "method": "POST", + "params": {}, + "headers": { + "Content-Type": "application/json", + "Authorization": "Token token=dummyApiKey" + }, + "version": "1", + "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/sales_activities" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "freshsales", + "description": "Track call: lifecycle_stage_id", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.1.5" + }, + "traits": { + "name": "Shehan Study", + "category": "SampleIdentify", + "plan": "Open source", + "logins": 5, + "createdAt": 1599264000 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.5" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", + "locale": "en-US", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 0.8999999761581421 + }, + "campaign": { + "source": "google", + "medium": "medium", + "term": "keyword", + "content": "some content", + "name": "some campaign", + "test": "other value" + }, + "page": { + "path": "/destinations/amplitude", + "referrer": "", + "search": "", + "title": "", + "url": "https://docs.rudderstack.com/destinations/amplitude", + "category": "destination", + "initial_referrer": "https://docs.rudderstack.com", + "initial_referring_domain": "docs.rudderstack.com" + } + }, + "type": "track", + "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", + "originalTimestamp": "2020-10-20T08:14:28.778Z", + "anonymousId": "my-anonymous-id-new", + "userId": "newUserIdAlias", + "properties": { + "email": "jamessampleton3@gmail.com", + "lifecycleStageId": "71012139273", + "title": "new Contact", + "startDate": "2021-05-04T17:00:00+05:30", + "endDate": "2022-06-04T17:30:00+05:30", + "ownerId": "70054866612", + "targetableType": "Contact" + }, + "event": "lifecycle_stage", + "previousId": "sampleusrRudder3", + "sentAt": "2020-10-20T08:14:28.778Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/contacts/upsert", + "headers": { + "Authorization": "Token token=dummyApiKey", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "contact": { + "lifecycle_stage_id": "71012139273" + }, + "unique_identifier": { + "emails": "jamessampleton3@gmail.com" + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "freshsales", + "description": "Track call: In lifecycle stage, email is missing", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.1.5" + }, + "traits": { + "name": "Shehan Study", + "category": "SampleIdentify", + "plan": "Open source", + "logins": 5, + "createdAt": 1599264000 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.5" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", + "locale": "en-US", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 0.8999999761581421 + }, + "campaign": { + "source": "google", + "medium": "medium", + "term": "keyword", + "content": "some content", + "name": "some campaign", + "test": "other value" + }, + "page": { + "path": "/destinations/amplitude", + "referrer": "", + "search": "", + "title": "", + "url": "https://docs.rudderstack.com/destinations/amplitude", + "category": "destination", + "initial_referrer": "https://docs.rudderstack.com", + "initial_referring_domain": "docs.rudderstack.com" + } + }, + "type": "track", + "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", + "originalTimestamp": "2020-10-20T08:14:28.778Z", + "anonymousId": "my-anonymous-id-new", + "userId": "newUserIdAlias", + "properties": { + "lifecycleStageId": "71012139273", + "title": "new Contact", + "startDate": "2021-05-04T17:00:00+05:30", + "endDate": "2022-06-04T17:30:00+05:30", + "ownerId": "70054866612", + "targetableType": "Contact" + }, + "event": "lifecycle_stage", + "previousId": "sampleusrRudder3", + "sentAt": "2020-10-20T08:14:28.778Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "email is required for updating life Cycle Stages. Aborting!", + "statTags": { + "destType": "FRESHSALES", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshsales", + "description": "Track call: Either of lifecycleStageName or lifecycleStageId is required", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.1.5" + }, + "traits": { + "name": "Shehan Study", + "category": "SampleIdentify", + "email": "test@rudderstack.com", + "plan": "Open source", + "logins": 5, + "createdAt": 1599264000 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.5" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", + "locale": "en-US", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 0.8999999761581421 + }, + "campaign": { + "source": "google", + "medium": "medium", + "term": "keyword", + "content": "some content", + "name": "some campaign", + "test": "other value" + }, + "page": { + "path": "/destinations/amplitude", + "referrer": "", + "search": "", + "title": "", + "url": "https://docs.rudderstack.com/destinations/amplitude", + "category": "destination", + "initial_referrer": "https://docs.rudderstack.com", + "initial_referring_domain": "docs.rudderstack.com" + } + }, + "type": "track", + "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", + "originalTimestamp": "2020-10-20T08:14:28.778Z", + "anonymousId": "my-anonymous-id-new", + "userId": "newUserIdAlias", + "email": "jamessampleton3@gmail.com", + "properties": { + "title": "new Contact", + "startDate": "2021-05-04T17:00:00+05:30", + "endDate": "2022-06-04T17:30:00+05:30", + "ownerId": "70054866612", + "targetableType": "Contact" + }, + "event": "lifecycle_stage", + "previousId": "sampleusrRudder3", + "sentAt": "2020-10-20T08:14:28.778Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Either of lifecycleStageName or lifecycleStageId is required. Aborting!", + "statTags": { + "destType": "FRESHSALES", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshsales", + "description": "Track call: Either of sales activity name or sales activity type id is required", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.1.5" + }, + "traits": { + "name": "Shehan Study", + "category": "SampleIdentify", + "email": "test@rudderstack.com", + "plan": "Open source", + "logins": 5, + "createdAt": 1599264000 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.5" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", + "locale": "en-US", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 0.8999999761581421 + }, + "campaign": { + "source": "google", + "medium": "medium", + "term": "keyword", + "content": "some content", + "name": "some campaign", + "test": "other value" + }, + "page": { + "path": "/destinations/amplitude", + "referrer": "", + "search": "", + "title": "", + "url": "https://docs.rudderstack.com/destinations/amplitude", + "category": "destination", + "initial_referrer": "https://docs.rudderstack.com", + "initial_referring_domain": "docs.rudderstack.com" + }, + "externalId": { + "type": "Contact" + } + }, + "type": "track", + "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", + "originalTimestamp": "2020-10-20T08:14:28.778Z", + "anonymousId": "my-anonymous-id-new", + "userId": "newUserIdAlias", + "email": "test@rudderstack.com", + "properties": { + "product_name": "Shirt", + "brand": "Wrogn", + "title": "new Contact", + "startDate": "2021-05-04T17:00:00+05:30", + "endDate": "2022-06-04T17:30:00+05:30", + "ownerId": "70054866612" + }, + "event": "sales_activity", + "previousId": "sampleusrRudder3", + "sentAt": "2020-10-20T08:14:28.778Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Either of sales activity name or sales activity type id is required. Aborting!", + "statTags": { + "destType": "FRESHSALES", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshsales", + "description": "Track call: Either of email or targetable_id is required for creating sales activity.", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.1.5" + }, + "traits": { + "name": "Shehan Study", + "category": "SampleIdentify", + "plan": "Open source", + "logins": 5, + "createdAt": 1599264000 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.5" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", + "locale": "en-US", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 0.8999999761581421 + }, + "campaign": { + "source": "google", + "medium": "medium", + "term": "keyword", + "content": "some content", + "name": "some campaign", + "test": "other value" + }, + "page": { + "path": "/destinations/amplitude", + "referrer": "", + "search": "", + "title": "", + "url": "https://docs.rudderstack.com/destinations/amplitude", + "category": "destination", + "initial_referrer": "https://docs.rudderstack.com", + "initial_referring_domain": "docs.rudderstack.com" + }, + "externalId": { + "type": "Contact" + } + }, + "type": "track", + "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", + "originalTimestamp": "2020-10-20T08:14:28.778Z", + "anonymousId": "my-anonymous-id-new", + "userId": "newUserIdAlias", + "properties": { + "product_name": "Shirt", + "brand": "Wrogn", + "salesActivityName": "own-calender", + "title": "new Contact", + "startDate": "2021-05-04T17:00:00+05:30", + "endDate": "2022-06-04T17:30:00+05:30", + "ownerId": "70054866612" + }, + "event": "sales_activity", + "previousId": "sampleusrRudder3", + "sentAt": "2020-10-20T08:14:28.778Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Either of email or targetable_id is required for creating sales activity. Aborting!", + "statTags": { + "destType": "FRESHSALES", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshsales", + "description": "Track call: sales activity with salesActivityTypeId", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.1.5" + }, + "traits": { + "name": "Shehan Study", + "category": "SampleIdentify", + "email": "test@rudderstack.com", + "plan": "Open source", + "logins": 5, + "createdAt": 1599264000 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.5" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", + "locale": "en-US", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 0.8999999761581421 + }, + "campaign": { + "source": "google", + "medium": "medium", + "term": "keyword", + "content": "some content", + "name": "some campaign", + "test": "other value" + }, + "page": { + "path": "/destinations/amplitude", + "referrer": "", + "search": "", + "title": "", + "url": "https://docs.rudderstack.com/destinations/amplitude", + "category": "destination", + "initial_referrer": "https://docs.rudderstack.com", + "initial_referring_domain": "docs.rudderstack.com" + }, + "externalId": { + "type": "Contact" + } + }, + "type": "track", + "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", + "originalTimestamp": "2020-10-20T08:14:28.778Z", + "anonymousId": "my-anonymous-id-new", + "userId": "newUserIdAlias", + "email": "jamessampleton3@gmail.com", + "properties": { + "salesActivityTypeId": "70000663932", + "title": "new Contact", + "startDate": "2021-05-04T17:00:00+05:30", + "endDate": "2022-06-04T17:30:00+05:30", + "ownerId": "70054866612" + }, + "event": "sales_activity", + "previousId": "sampleusrRudder3", + "sentAt": "2020-10-20T08:14:28.778Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "FORM": {}, + "JSON": { + "sales_activity": { + "title": "new Contact", + "created_at": "2020-10-20T08:14:28.778Z", + "end_date": "2022-06-04T17:30:00+05:30", + "owner_id": "70054866612", + "start_date": "2021-05-04T17:00:00+05:30", + "updated_at": "2020-10-20T08:14:28.778Z", + "targetable_id": 70054866612, + "targetable_type": "Contact", + "sales_activity_type_id": "70000663932" + } + }, + "JSON_ARRAY": {} + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": {}, + "headers": { + "Content-Type": "application/json", + "Authorization": "Token token=dummyApiKey" + }, + "version": "1", + "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/sales_activities", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "freshsales", + "description": "Track call: updated sales activity with salesActivityTypeId and targetableId", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.1.5" + }, + "traits": { + "name": "Shehan Study", + "category": "SampleIdentify", + "email": "test@rudderstack.com", + "plan": "Open source", + "logins": 5, + "createdAt": 1599264000 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.5" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", + "locale": "en-US", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 0.8999999761581421 + }, + "campaign": { + "source": "google", + "medium": "medium", + "term": "keyword", + "content": "some content", + "name": "some campaign", + "test": "other value" + }, + "page": { + "path": "/destinations/amplitude", + "referrer": "", + "search": "", + "title": "", + "url": "https://docs.rudderstack.com/destinations/amplitude", + "category": "destination", + "initial_referrer": "https://docs.rudderstack.com", + "initial_referring_domain": "docs.rudderstack.com" + }, + "externalId": { + "id": "70052305908", + "type": "Contact" + } + }, + "type": "track", + "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", + "originalTimestamp": "2020-10-20T08:14:28.778Z", + "anonymousId": "my-anonymous-id-new", + "userId": "newUserIdAlias", + "properties": { + "salesActivityTypeId": "70000663932", + "title": "new Contact", + "startDate": "2021-05-04T17:00:00+05:30", + "endDate": "2022-06-04T17:30:00+05:30", + "ownerId": "70054866612" + }, + "event": "sales_activity", + "previousId": "sampleusrRudder3", + "sentAt": "2020-10-20T08:14:28.778Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "FORM": {}, + "JSON": { + "sales_activity": { + "title": "new Contact", + "created_at": "2020-10-20T08:14:28.778Z", + "end_date": "2022-06-04T17:30:00+05:30", + "owner_id": "70054866612", + "start_date": "2021-05-04T17:00:00+05:30", + "updated_at": "2020-10-20T08:14:28.778Z", + "targetable_id": "70052305908", + "targetable_type": "Contact", + "sales_activity_type_id": "70000663932" + } + }, + "JSON_ARRAY": {} + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": {}, + "headers": { + "Content-Type": "application/json", + "Authorization": "Token token=dummyApiKey" + }, + "version": "1", + "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/sales_activities", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "freshsales", + "description": "Unsupported message Type", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "type": "page", + "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", + "originalTimestamp": "2020-10-20T08:14:28.778Z", + "anonymousId": "my-anonymous-id-new", + "userId": "newUserIdAlias", + "email": "jamessampleton3@gmail.com", + "properties": { + "lifecycleStageId": "71012139273", + "title": "new Contact", + "startDate": "2021-05-04T17:00:00+05:30", + "endDate": "2022-06-04T17:30:00+05:30", + "ownerId": "70054866612", + "targetableType": "Contact" + }, + "event": "lifecycle_stage", + "previousId": "sampleusrRudder3", + "sentAt": "2020-10-20T08:14:28.778Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "message type page not supported", + "statTags": { + "destType": "FRESHSALES", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshsales", + "description": "Track call: with wrong sales activity name", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.1.5" + }, + "traits": { + "name": "Shehan Study", + "category": "SampleIdentify", + "email": "test@rudderstack.com", + "plan": "Open source", + "logins": 5, + "createdAt": 1599264000 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.5" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", + "locale": "en-US", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 0.8999999761581421 + }, + "campaign": { + "source": "google", + "medium": "medium", + "term": "keyword", + "content": "some content", + "name": "some campaign", + "test": "other value" + }, + "page": { + "path": "/destinations/amplitude", + "referrer": "", + "search": "", + "title": "", + "url": "https://docs.rudderstack.com/destinations/amplitude", + "category": "destination", + "initial_referrer": "https://docs.rudderstack.com", + "initial_referring_domain": "docs.rudderstack.com" + }, + "externalId": { + "type": "Contact" + } + }, + "type": "track", + "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", + "originalTimestamp": "2020-10-20T08:14:28.778Z", + "anonymousId": "my-anonymous-id-new", + "userId": "newUserIdAlias", + "email": "test@rudderstack.com", + "properties": { + "product_name": "Shirt", + "brand": "Wrogn", + "salesActivityName": "own-list", + "title": "new Contact", + "startDate": "2021-05-04T17:00:00+05:30", + "endDate": "2022-06-04T17:30:00+05:30", + "ownerId": "70054866612" + }, + "event": "sales_activity", + "previousId": "sampleusrRudder3", + "sentAt": "2020-10-20T08:14:28.778Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "sales Activity own-list doesn't exists. Aborting!", + "statTags": { + "destType": "FRESHSALES", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshsales", + "description": "Track call: update contacts with sales Activity name", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.1.5" + }, + "traits": { + "name": "Shehan Study", + "category": "SampleIdentify", + "plan": "Open source", + "logins": 5, + "createdAt": 1599264000 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.5" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", + "locale": "en-US", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 0.8999999761581421 + }, + "campaign": { + "source": "google", + "medium": "medium", + "term": "keyword", + "content": "some content", + "name": "some campaign", + "test": "other value" + }, + "page": { + "path": "/destinations/amplitude", + "referrer": "", + "search": "", + "title": "", + "url": "https://docs.rudderstack.com/destinations/amplitude", + "category": "destination", + "initial_referrer": "https://docs.rudderstack.com", + "initial_referring_domain": "docs.rudderstack.com" + } + }, + "type": "track", + "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", + "originalTimestamp": "2020-10-20T08:14:28.778Z", + "anonymousId": "my-anonymous-id-new", + "userId": "newUserIdAlias", + "properties": { + "email": "jamessampleton6@gmail.com", + "lifecycleStageName": "final Customer", + "title": "new Contact", + "startDate": "2021-05-04T17:00:00+05:30", + "endDate": "2022-06-04T17:30:00+05:30", + "ownerId": "70054866612", + "targetableType": "Contact" + }, + "event": "lifecycle_stage", + "previousId": "sampleusrRudder3", + "sentAt": "2020-10-20T08:14:28.778Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "FORM": {}, + "JSON": { + "contact": { + "lifecycle_stage_id": 71012806409 + }, + "unique_identifier": { + "emails": "jamessampleton6@gmail.com" + } + }, + "JSON_ARRAY": {} + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": {}, + "headers": { + "Content-Type": "application/json", + "Authorization": "Token token=dummyApiKey" + }, + "version": "1", + "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/contacts/upsert", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "freshsales", + "description": "Track call: with wrong lifecycleStageName", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.1.5" + }, + "traits": { + "name": "Shehan Study", + "category": "SampleIdentify", + "plan": "Open source", + "logins": 5, + "createdAt": 1599264000 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.5" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", + "locale": "en-US", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 0.8999999761581421 + }, + "campaign": { + "source": "google", + "medium": "medium", + "term": "keyword", + "content": "some content", + "name": "some campaign", + "test": "other value" + }, + "page": { + "path": "/destinations/amplitude", + "referrer": "", + "search": "", + "title": "", + "url": "https://docs.rudderstack.com/destinations/amplitude", + "category": "destination", + "initial_referrer": "https://docs.rudderstack.com", + "initial_referring_domain": "docs.rudderstack.com" + } + }, + "type": "track", + "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", + "originalTimestamp": "2020-10-20T08:14:28.778Z", + "anonymousId": "my-anonymous-id-new", + "userId": "newUserIdAlias", + "properties": { + "email": "jamessampleton6@gmail.com", + "lifecycleStageName": "final ExCustomer", + "title": "new Contact", + "startDate": "2021-05-04T17:00:00+05:30", + "endDate": "2022-06-04T17:30:00+05:30", + "ownerId": "70054866612", + "targetableType": "Contact" + }, + "event": "lifecycle_stage", + "previousId": "sampleusrRudder3", + "sentAt": "2020-10-20T08:14:28.778Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "failed to fetch lifeCycleStages with final ExCustomer", + "statTags": { + "destType": "FRESHSALES", + "errorCategory": "network", + "errorType": "aborted", + "feature": "processor", + "implementation": "native", + "meta": "instrumentation", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + } +] \ No newline at end of file diff --git a/test/integrations/destinations/freshsales/router/data.ts b/test/integrations/destinations/freshsales/router/data.ts new file mode 100644 index 0000000000..12cbacf576 --- /dev/null +++ b/test/integrations/destinations/freshsales/router/data.ts @@ -0,0 +1,185 @@ +export const data = [ + { + name: 'freshsales', + description: 'Test 0', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + "message": { + "context": { + "device": { + "name": "Mi", + "token": "dummyDeviceToken" + }, + "os": { + "name": "android" + }, + "traits": { + "address": { + "city": "city", + "country": "country", + "postalCode": "postalCode", + "state": "state", + "street": "street" + }, + "email": "user112@mail.com", + "firstName": "sample1", + "lastName": "user1" + } + }, + "messageId": "8184ebd7-3a19-45a3-a340-d6f449c63d27", + "originalTimestamp": "2022-08-30T11:28:48.429+05:30", + "receivedAt": "2022-08-30T11:28:43.648+05:30", + "request_ip": "[::1]", + "rudderId": "ed33ef22-569d-44b1-a6cb-063c69dca8f0", + "sentAt": "2022-08-30T11:28:48.429+05:30", + "timestamp": "2022-08-30T11:28:43.647+05:30", + "type": "identify", + "userId": "user113" + }, + "destination": { + "ID": "2E3xCNR3sae33y3AkGzuQ3ym05v", + "Name": "test", + "DestinationDefinition": { + "ID": "2E3x3AwySRvh6vXgYslvYApyFPb", + "Name": "FRESHSALES", + "DisplayName": "Freshsales", + "Config": { + "destConfig": { + "defaultConfig": ["apiKey", "domain"] + }, + "excludeKeys": [], + "includeKeys": ["apiKey", "domain"], + "saveDestinationResponse": true, + "supportedMessageTypes": ["identify", "group"], + "supportedSourceTypes": [ + "amp", + "android", + "cordova", + "cloud", + "flutter", + "ios", + "reactnative", + "unity", + "warehouse", + "web" + ], + "transformAt": "processor", + "transformAtV1": "processor" + }, + "ResponseRules": {} + }, + "Config": { + "apiKey": "hrkjfergeferf", + "domain": "rudderstack-479541159204968909.myfreshworks.com" + }, + "Enabled": true, + "Transformations": [], + "IsProcessorEnabled": true, + "RevisionID": "2E3xCLWeb83vOGDh0mkN4Auei3i" + }, + "metadata": {} + } + ], + destType: 'freshsales', + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + "batchedRequest": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://rudderstack-479541159204968909.myfreshworks.com/crm/sales/api/contacts/upsert", + "headers": { + "Authorization": "Token token=hrkjfergeferf", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "contact": { + "emails": "user112@mail.com", + "first_name": "sample1", + "last_name": "user1", + "external_id": "user113", + "address": "street city state country postalCode", + "city": "city", + "state": "state", + "country": "country", + "zipcode": "postalCode", + "created_at": "2022-08-30T11:28:43.647+05:30", + "updated_at": "2022-08-30T11:28:43.647+05:30" + }, + "unique_identifier": { + "emails": "user112@mail.com" + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {} + }, + "metadata": [{}], + "batched": false, + "statusCode": 200, + "destination": { + "ID": "2E3xCNR3sae33y3AkGzuQ3ym05v", + "Name": "test", + "DestinationDefinition": { + "ID": "2E3x3AwySRvh6vXgYslvYApyFPb", + "Name": "FRESHSALES", + "DisplayName": "Freshsales", + "Config": { + "destConfig": { + "defaultConfig": ["apiKey", "domain"] + }, + "excludeKeys": [], + "includeKeys": ["apiKey", "domain"], + "saveDestinationResponse": true, + "supportedMessageTypes": ["identify", "group"], + "supportedSourceTypes": [ + "amp", + "android", + "cordova", + "cloud", + "flutter", + "ios", + "reactnative", + "unity", + "warehouse", + "web" + ], + "transformAt": "processor", + "transformAtV1": "processor" + }, + "ResponseRules": {} + }, + "Config": { + "apiKey": "hrkjfergeferf", + "domain": "rudderstack-479541159204968909.myfreshworks.com" + }, + "Enabled": true, + "Transformations": [], + "IsProcessorEnabled": true, + "RevisionID": "2E3xCLWeb83vOGDh0mkN4Auei3i" + } + } + ], + }, + }, + }, + }, +]; From 99613a098a279f2cce55a394b62c53df78aa1e57 Mon Sep 17 00:00:00 2001 From: Sudip Paul <67197965+ItsSudip@users.noreply.github.com> Date: Wed, 20 Dec 2023 12:24:47 +0530 Subject: [PATCH 095/135] chore: added component test cases for desitnations part3 (#2927) * chore: added component test cases for desitnations * chore: added component test cases for wootric --- test/__mocks__/axios.js | 34 +- test/__mocks__/data/hs/response.json | 455 -- test/__mocks__/data/wootric/response.json | 107 - test/__mocks__/hs.mock.js | 123 - test/__mocks__/wootric.mock.js | 55 - test/__tests__/data/hs.json | 1 - test/__tests__/data/hs_input.json | 3185 ---------- test/__tests__/data/hs_output.json | 843 --- .../hs_router_associations_rEtl_input.json | 57 - .../hs_router_associations_rEtl_output.json | 49 - test/__tests__/data/hs_router_input.json | 573 -- .../data/hs_router_input_legacy.json | 281 - .../data/hs_router_legacy_rETL_input.json | 130 - .../data/hs_router_legacy_rETL_output.json | 129 - test/__tests__/data/hs_router_output.json | 321 - .../data/hs_router_output_legacy.json | 117 - test/__tests__/data/hs_router_rETL_input.json | 332 -- .../__tests__/data/hs_router_rETL_output.json | 231 - test/__tests__/data/wootric.json | 1467 ----- test/__tests__/data/wootric_router_input.json | 1076 ---- .../__tests__/data/wootric_router_output.json | 493 -- test/__tests__/hubspot.test.js | 139 - test/__tests__/wootric.test.js | 46 - test/integrations/destinations/hs/network.ts | 664 +++ .../destinations/hs/processor/data.ts | 5272 +++++++++++++++++ .../destinations/hs/router/data.ts | 2245 +++++++ .../marketo_bulk_upload/processor/data.ts | 499 ++ .../destinations/wootric/network.ts | 183 + .../destinations/wootric/processor/data.ts | 1825 ++++++ .../destinations/wootric/router/data.ts | 1622 +++++ 30 files changed, 12323 insertions(+), 10231 deletions(-) delete mode 100644 test/__mocks__/data/hs/response.json delete mode 100644 test/__mocks__/data/wootric/response.json delete mode 100644 test/__mocks__/hs.mock.js delete mode 100644 test/__mocks__/wootric.mock.js delete mode 100644 test/__tests__/data/hs.json delete mode 100644 test/__tests__/data/hs_input.json delete mode 100644 test/__tests__/data/hs_output.json delete mode 100644 test/__tests__/data/hs_router_associations_rEtl_input.json delete mode 100644 test/__tests__/data/hs_router_associations_rEtl_output.json delete mode 100644 test/__tests__/data/hs_router_input.json delete mode 100644 test/__tests__/data/hs_router_input_legacy.json delete mode 100644 test/__tests__/data/hs_router_legacy_rETL_input.json delete mode 100644 test/__tests__/data/hs_router_legacy_rETL_output.json delete mode 100644 test/__tests__/data/hs_router_output.json delete mode 100644 test/__tests__/data/hs_router_output_legacy.json delete mode 100644 test/__tests__/data/hs_router_rETL_input.json delete mode 100644 test/__tests__/data/hs_router_rETL_output.json delete mode 100644 test/__tests__/data/wootric.json delete mode 100644 test/__tests__/data/wootric_router_input.json delete mode 100644 test/__tests__/data/wootric_router_output.json delete mode 100644 test/__tests__/hubspot.test.js delete mode 100644 test/__tests__/wootric.test.js create mode 100644 test/integrations/destinations/hs/network.ts create mode 100644 test/integrations/destinations/hs/processor/data.ts create mode 100644 test/integrations/destinations/hs/router/data.ts create mode 100644 test/integrations/destinations/marketo_bulk_upload/processor/data.ts create mode 100644 test/integrations/destinations/wootric/network.ts create mode 100644 test/integrations/destinations/wootric/processor/data.ts create mode 100644 test/integrations/destinations/wootric/router/data.ts diff --git a/test/__mocks__/axios.js b/test/__mocks__/axios.js index 1ed76a1ca7..d0961d6acf 100644 --- a/test/__mocks__/axios.js +++ b/test/__mocks__/axios.js @@ -14,13 +14,8 @@ const gainsightRequestHandler = require("./gainsight.mock"); const mailchimpGetRequestHandler = require("./mailchimp.mock"); const yahooDspPostRequestHandler = require("./yahoo_dsp.mock"); const { gainsightPXGetRequestHandler } = require("./gainsight_px.mock"); -const { hsGetRequestHandler, hsPostRequestHandler } = require("./hs.mock"); const profitwellGetRequestHandler = require("./profitwell.mock"); const cannyPostRequestHandler = require("./canny.mock"); -const { - wootricGetRequestHandler, - wootricPostRequestHandler -} = require("./wootric.mock"); const { userGetRequestHandler, userPutRequestHandler } = require("./user.mock"); const { mixpanelPostRequestHandler } = require("./mixpanel.mock"); const { mondayPostRequestHandler } = require("./monday.mock"); @@ -29,7 +24,6 @@ const { sendinblueGetRequestHandler } = require("./sendinblue.mock"); const { courierGetRequestHandler } = require("./courier.mock"); const urlDirectoryMap = { - "api.hubapi.com": "hs", "zendesk.com": "zendesk", "salesforce.com": "salesforce", "mktorest.com": "marketo", @@ -94,16 +88,22 @@ function get(url, options) { if (url.includes("https://a.klaviyo.com/api/v2/people/search")) { return klaviyoGetRequestHandler(getParamEncodedUrl(url, options)); } - if (url.includes("https://api.hubapi.com")) { - return hsGetRequestHandler(url, mockData); - } if (url.includes("https://api.profitwell.com")) { return profitwellGetRequestHandler(url, mockData); } - if (url.includes("https://api.wootric.com")) { - return new Promise((resolve, reject) => { - resolve(wootricGetRequestHandler(url)); - }); + if ( + url.includes( + "https://api.getdrip.com/v2/1809802/subscribers/identified_user@gmail.com" + ) + ) { + return Promise.resolve({ status: 200 }); + } + if ( + url.includes( + "https://api.getdrip.com/v2/1809802/subscribers/unidentified_user@gmail.com" + ) + ) { + return Promise.reject({ status: 404 }); } if (url.includes("https://commander.user.com")) { return new Promise((resolve, reject) => { @@ -164,14 +164,6 @@ function post(url, payload) { resolve(cannyPostRequestHandler(url)); }); } - if (url.includes("https://api.hubapi.com")) { - return hsPostRequestHandler(payload, mockData); - } - if (url.includes("https://api.wootric.com")) { - return new Promise((resolve, reject) => { - resolve(wootricPostRequestHandler(url, payload)); - }); - } if ( url.includes("https://api.mixpanel.com/engage/") || url.includes("https://api-eu.mixpanel.com/engage/") diff --git a/test/__mocks__/data/hs/response.json b/test/__mocks__/data/hs/response.json deleted file mode 100644 index e552275466..0000000000 --- a/test/__mocks__/data/hs/response.json +++ /dev/null @@ -1,455 +0,0 @@ -{ - "https://api.hubapi.com/properties/v1/contacts/properties?hapikey=dummy-apikey": [ - { "name": "company_size", "type": "string" }, - { "name": "date_of_birth", "type": "string" }, - { "name": "days_to_close", "type": "number" }, - { - "name": "date_submitted", - "type": "date" - }, - { - "name": "days_create", - "type": "date" - }, - { - "name": "days_closed", - "type": "date" - }, - { "name": "degree", "type": "string" }, - { "name": "field_of_study", "type": "string" }, - { "name": "first_conversion_date", "type": "datetime" }, - { "name": "first_conversion_event_name", "type": "string" }, - { "name": "first_deal_created_date", "type": "datetime" }, - { "name": "gender", "type": "string" }, - { "name": "graduation_date", "type": "string" }, - { "name": "hs_additional_emails", "type": "enumeration" }, - { "name": "hs_all_contact_vids", "type": "enumeration" }, - { - "name": "hs_analytics_first_touch_converting_campaign", - "type": "string" - }, - { "name": "hs_analytics_last_touch_converting_campaign", "type": "string" }, - { "name": "hs_avatar_filemanager_key", "type": "string" }, - { "name": "hs_calculated_form_submissions", "type": "enumeration" }, - { "name": "hs_calculated_merged_vids", "type": "enumeration" }, - { "name": "hs_calculated_mobile_number", "type": "string" }, - { "name": "hs_calculated_phone_number", "type": "string" }, - { "name": "hs_calculated_phone_number_area_code", "type": "string" }, - { "name": "hs_calculated_phone_number_country_code", "type": "string" }, - { "name": "hs_calculated_phone_number_region_code", "type": "string" }, - { "name": "hs_content_membership_email_confirmed", "type": "bool" }, - { "name": "hs_content_membership_notes", "type": "string" }, - { "name": "hs_content_membership_registered_at", "type": "datetime" }, - { - "name": "hs_content_membership_registration_domain_sent_to", - "type": "string" - }, - { - "name": "hs_content_membership_registration_email_sent_at", - "type": "datetime" - }, - { "name": "hs_content_membership_status", "type": "enumeration" }, - { "name": "hs_conversations_visitor_email", "type": "string" }, - { "name": "hs_created_by_conversations", "type": "bool" }, - { "name": "hs_created_by_user_id", "type": "string" }, - { "name": "hs_createdate", "type": "datetime" }, - { "name": "hs_document_last_revisited", "type": "datetime" }, - { "name": "hs_email_domain", "type": "string" }, - { "name": "hs_email_quarantined", "type": "bool" }, - { "name": "hs_email_quarantined_reason", "type": "enumeration" }, - { "name": "hs_email_recipient_fatigue_recovery_time", "type": "datetime" }, - { "name": "hs_email_sends_since_last_engagement", "type": "number" }, - { "name": "hs_emailconfirmationstatus", "type": "enumeration" }, - { "name": "hs_facebook_ad_clicked", "type": "bool" }, - { "name": "hs_feedback_last_nps_follow_up", "type": "string" }, - { "name": "hs_feedback_last_nps_rating", "type": "enumeration" }, - { "name": "hs_feedback_last_survey_date", "type": "datetime" }, - { "name": "hs_feedback_show_nps_web_survey", "type": "bool" }, - { "name": "hs_google_click_id", "type": "string" }, - { "name": "hs_ip_timezone", "type": "string" }, - { "name": "hs_is_contact", "type": "bool" }, - { "name": "hs_last_sales_activity_date", "type": "datetime" }, - { "name": "hs_lastmodifieddate", "type": "datetime" }, - { "name": "hs_lead_status", "type": "enumeration" }, - { "name": "hs_legal_basis", "type": "enumeration" }, - { "name": "hs_merged_object_ids", "type": "enumeration" }, - { "name": "hs_object_id", "type": "number" }, - { "name": "hs_predictivecontactscore_v2", "type": "number" }, - { "name": "hs_predictivescoringtier", "type": "enumeration" }, - { "name": "hs_sales_email_last_clicked", "type": "datetime" }, - { "name": "hs_sales_email_last_opened", "type": "datetime" }, - { - "name": "hs_searchable_calculated_international_mobile_number", - "type": "phone_number" - }, - { - "name": "hs_searchable_calculated_international_phone_number", - "type": "phone_number" - }, - { - "name": "hs_searchable_calculated_mobile_number", - "type": "phone_number" - }, - { "name": "hs_searchable_calculated_phone_number", "type": "phone_number" }, - { "name": "hs_sequences_is_enrolled", "type": "bool" }, - { "name": "hs_updated_by_user_id", "type": "string" }, - { "name": "hubspot_owner_assigneddate", "type": "datetime" }, - { "name": "ip_city", "type": "string" }, - { "name": "ip_country", "type": "string" }, - { "name": "ip_country_code", "type": "string" }, - { "name": "ip_latlon", "type": "string" }, - { "name": "ip_state", "type": "string" }, - { "name": "ip_state_code", "type": "string" }, - { "name": "ip_zipcode", "type": "string" }, - { "name": "job_function", "type": "string" }, - { "name": "lastmodifieddate", "type": "datetime" }, - { "name": "marital_status", "type": "string" }, - { "name": "military_status", "type": "string" }, - { "name": "num_associated_deals", "type": "number" }, - { "name": "num_conversion_events", "type": "number" }, - { "name": "num_unique_conversion_events", "type": "number" }, - { "name": "recent_conversion_date", "type": "datetime" }, - { "name": "recent_conversion_event_name", "type": "string" }, - { "name": "recent_deal_amount", "type": "number" }, - { "name": "recent_deal_close_date", "type": "datetime" }, - { "name": "relationship_status", "type": "string" }, - { "name": "school", "type": "string" }, - { "name": "seniority", "type": "string" }, - { "name": "start_date", "type": "string" }, - { "name": "test_date", "type": "date" }, - { "name": "test_key", "type": "string" }, - { "name": "test_prop", "type": "string" }, - { "name": "test_property", "type": "string" }, - { "name": "total_revenue", "type": "number" }, - { "name": "work_email", "type": "string" }, - { "name": "firstname", "type": "string" }, - { "name": "hs_analytics_first_url", "type": "string" }, - { "name": "hs_email_delivered", "type": "number" }, - { "name": "hs_email_optout_7283808", "type": "enumeration" }, - { "name": "twitterhandle", "type": "string" }, - { "name": "currentlyinworkflow", "type": "enumeration" }, - { "name": "hs_analytics_last_url", "type": "string" }, - { "name": "hs_email_open", "type": "number" }, - { "name": "fax", "type": "string" }, - { "name": "hs_analytics_first_timestamp", "type": "datetime" }, - { "name": "hs_email_last_email_name", "type": "string" }, - { "name": "hs_email_last_send_date", "type": "datetime" }, - { "name": "address", "type": "string" }, - { "name": "engagements_last_meeting_booked", "type": "datetime" }, - { "name": "engagements_last_meeting_booked_campaign", "type": "string" }, - { "name": "engagements_last_meeting_booked_medium", "type": "string" }, - { "name": "engagements_last_meeting_booked_source", "type": "string" }, - { "name": "hs_analytics_first_visit_timestamp", "type": "datetime" }, - { "name": "hs_email_last_open_date", "type": "datetime" }, - { "name": "hs_sales_email_last_replied", "type": "datetime" }, - { "name": "hubspot_owner_id", "type": "enumeration" }, - { "name": "notes_last_contacted", "type": "datetime" }, - { "name": "notes_last_updated", "type": "datetime" }, - { "name": "notes_next_activity_date", "type": "datetime" }, - { "name": "num_contacted_notes", "type": "number" }, - { "name": "num_notes", "type": "number" }, - { "name": "surveymonkeyeventlastupdated", "type": "number" }, - { "name": "webinareventlastupdated", "type": "number" }, - { "name": "city", "type": "string" }, - { "name": "hs_analytics_last_timestamp", "type": "datetime" }, - { "name": "hs_email_last_click_date", "type": "datetime" }, - { "name": "hubspot_team_id", "type": "enumeration" }, - { "name": "hs_all_owner_ids", "type": "enumeration" }, - { "name": "hs_analytics_last_visit_timestamp", "type": "datetime" }, - { "name": "hs_email_first_send_date", "type": "datetime" }, - { "name": "state", "type": "string" }, - { "name": "hs_all_team_ids", "type": "enumeration" }, - { "name": "hs_analytics_source", "type": "enumeration" }, - { "name": "hs_email_first_open_date", "type": "datetime" }, - { "name": "zip", "type": "string" }, - { "name": "country", "type": "string" }, - { "name": "hs_all_accessible_team_ids", "type": "enumeration" }, - { "name": "hs_analytics_source_data_1", "type": "string" }, - { "name": "hs_email_first_click_date", "type": "datetime" }, - { "name": "hs_analytics_source_data_2", "type": "string" }, - { "name": "hs_email_is_ineligible", "type": "bool" }, - { "name": "hs_language", "type": "enumeration" }, - { "name": "hs_analytics_first_referrer", "type": "string" }, - { "name": "jobtitle", "type": "string" }, - { "name": "hs_analytics_last_referrer", "type": "string" }, - { "name": "message", "type": "string" }, - { "name": "closedate", "type": "datetime" }, - { "name": "hs_analytics_average_page_views", "type": "number" }, - { "name": "hs_analytics_revenue", "type": "number" }, - { "name": "hs_lifecyclestage_lead_date", "type": "datetime" }, - { - "name": "hs_lifecyclestage_marketingqualifiedlead_date", - "type": "datetime" - }, - { "name": "hs_lifecyclestage_opportunity_date", "type": "datetime" }, - { "name": "lifecyclestage", "type": "enumeration" }, - { "name": "hs_lifecyclestage_salesqualifiedlead_date", "type": "datetime" }, - { "name": "createdate", "type": "datetime" }, - { "name": "hs_lifecyclestage_evangelist_date", "type": "datetime" }, - { "name": "hs_lifecyclestage_customer_date", "type": "datetime" }, - { "name": "hubspotscore", "type": "number" }, - { "name": "company", "type": "string" }, - { "name": "hs_lifecyclestage_subscriber_date", "type": "datetime" }, - { "name": "hs_lifecyclestage_other_date", "type": "datetime" }, - { "name": "website", "type": "string" }, - { "name": "numemployees", "type": "enumeration" }, - { "name": "annualrevenue", "type": "string" }, - { "name": "industry", "type": "string" }, - { "name": "associatedcompanyid", "type": "number" }, - { "name": "associatedcompanylastupdated", "type": "number" }, - { "name": "hs_predictivecontactscorebucket", "type": "enumeration" }, - { "name": "hs_predictivecontactscore", "type": "number" } - ], - "https://api.hubapi.com/properties/v1/contacts/properties": [ - { "name": "company_size", "type": "string" }, - { "name": "date_of_birth", "type": "string" }, - { "name": "days_to_close", "type": "number" }, - { - "name": "date_submitted", - "type": "date" - }, - { - "name": "date_created", - "type": "date" - }, - { - "name": "date_closed", - "type": "date" - }, - { "name": "degree", "type": "string" }, - { "name": "field_of_study", "type": "string" }, - { "name": "first_conversion_date", "type": "datetime" }, - { "name": "first_conversion_event_name", "type": "string" }, - { "name": "first_deal_created_date", "type": "datetime" }, - { "name": "gender", "type": "string" }, - { "name": "graduation_date", "type": "string" }, - { "name": "hs_additional_emails", "type": "enumeration" }, - { "name": "hs_all_contact_vids", "type": "enumeration" }, - { - "name": "hs_analytics_first_touch_converting_campaign", - "type": "string" - }, - { "name": "hs_analytics_last_touch_converting_campaign", "type": "string" }, - { "name": "hs_avatar_filemanager_key", "type": "string" }, - { "name": "hs_calculated_form_submissions", "type": "enumeration" }, - { "name": "hs_calculated_merged_vids", "type": "enumeration" }, - { "name": "hs_calculated_mobile_number", "type": "string" }, - { "name": "hs_calculated_phone_number", "type": "string" }, - { "name": "hs_calculated_phone_number_area_code", "type": "string" }, - { "name": "hs_calculated_phone_number_country_code", "type": "string" }, - { "name": "hs_calculated_phone_number_region_code", "type": "string" }, - { "name": "hs_content_membership_email_confirmed", "type": "bool" }, - { "name": "hs_content_membership_notes", "type": "string" }, - { "name": "hs_content_membership_registered_at", "type": "datetime" }, - { - "name": "hs_content_membership_registration_domain_sent_to", - "type": "string" - }, - { - "name": "hs_content_membership_registration_email_sent_at", - "type": "datetime" - }, - { "name": "hs_content_membership_status", "type": "enumeration" }, - { "name": "hs_conversations_visitor_email", "type": "string" }, - { "name": "hs_created_by_conversations", "type": "bool" }, - { "name": "hs_created_by_user_id", "type": "string" }, - { "name": "hs_createdate", "type": "datetime" }, - { "name": "hs_document_last_revisited", "type": "datetime" }, - { "name": "hs_email_domain", "type": "string" }, - { "name": "hs_email_quarantined", "type": "bool" }, - { "name": "hs_email_quarantined_reason", "type": "enumeration" }, - { "name": "hs_email_recipient_fatigue_recovery_time", "type": "datetime" }, - { "name": "hs_email_sends_since_last_engagement", "type": "number" }, - { "name": "hs_emailconfirmationstatus", "type": "enumeration" }, - { "name": "hs_facebook_ad_clicked", "type": "bool" }, - { "name": "hs_feedback_last_nps_follow_up", "type": "string" }, - { "name": "hs_feedback_last_nps_rating", "type": "enumeration" }, - { "name": "hs_feedback_last_survey_date", "type": "datetime" }, - { "name": "hs_feedback_show_nps_web_survey", "type": "bool" }, - { "name": "hs_google_click_id", "type": "string" }, - { "name": "hs_ip_timezone", "type": "string" }, - { "name": "hs_is_contact", "type": "bool" }, - { "name": "hs_last_sales_activity_date", "type": "datetime" }, - { "name": "hs_lastmodifieddate", "type": "datetime" }, - { "name": "hs_lead_status", "type": "enumeration" }, - { "name": "hs_legal_basis", "type": "enumeration" }, - { "name": "hs_merged_object_ids", "type": "enumeration" }, - { "name": "hs_object_id", "type": "number" }, - { "name": "hs_predictivecontactscore_v2", "type": "number" }, - { "name": "hs_predictivescoringtier", "type": "enumeration" }, - { "name": "hs_sales_email_last_clicked", "type": "datetime" }, - { "name": "hs_sales_email_last_opened", "type": "datetime" }, - { - "name": "hs_searchable_calculated_international_mobile_number", - "type": "phone_number" - }, - { - "name": "hs_searchable_calculated_international_phone_number", - "type": "phone_number" - }, - { - "name": "hs_searchable_calculated_mobile_number", - "type": "phone_number" - }, - { "name": "hs_searchable_calculated_phone_number", "type": "phone_number" }, - { "name": "hs_sequences_is_enrolled", "type": "bool" }, - { "name": "hs_updated_by_user_id", "type": "string" }, - { "name": "hubspot_owner_assigneddate", "type": "datetime" }, - { "name": "ip_city", "type": "string" }, - { "name": "ip_country", "type": "string" }, - { "name": "ip_country_code", "type": "string" }, - { "name": "ip_latlon", "type": "string" }, - { "name": "ip_state", "type": "string" }, - { "name": "ip_state_code", "type": "string" }, - { "name": "ip_zipcode", "type": "string" }, - { "name": "job_function", "type": "string" }, - { "name": "lastmodifieddate", "type": "datetime" }, - { "name": "marital_status", "type": "string" }, - { "name": "military_status", "type": "string" }, - { "name": "num_associated_deals", "type": "number" }, - { "name": "num_conversion_events", "type": "number" }, - { "name": "num_unique_conversion_events", "type": "number" }, - { "name": "recent_conversion_date", "type": "datetime" }, - { "name": "recent_conversion_event_name", "type": "string" }, - { "name": "recent_deal_amount", "type": "number" }, - { "name": "recent_deal_close_date", "type": "datetime" }, - { "name": "relationship_status", "type": "string" }, - { "name": "school", "type": "string" }, - { "name": "seniority", "type": "string" }, - { "name": "start_date", "type": "string" }, - { "name": "test_date", "type": "date" }, - { "name": "test_key", "type": "string" }, - { "name": "test_prop", "type": "string" }, - { "name": "test_property", "type": "string" }, - { "name": "total_revenue", "type": "number" }, - { "name": "work_email", "type": "string" }, - { "name": "firstname", "type": "string" }, - { "name": "hs_analytics_first_url", "type": "string" }, - { "name": "hs_email_delivered", "type": "number" }, - { "name": "hs_email_optout_7283808", "type": "enumeration" }, - { "name": "twitterhandle", "type": "string" }, - { "name": "currentlyinworkflow", "type": "enumeration" }, - { "name": "hs_analytics_last_url", "type": "string" }, - { "name": "hs_email_open", "type": "number" }, - { "name": "fax", "type": "string" }, - { "name": "hs_analytics_first_timestamp", "type": "datetime" }, - { "name": "hs_email_last_email_name", "type": "string" }, - { "name": "hs_email_last_send_date", "type": "datetime" }, - { "name": "address", "type": "string" }, - { "name": "engagements_last_meeting_booked", "type": "datetime" }, - { "name": "engagements_last_meeting_booked_campaign", "type": "string" }, - { "name": "engagements_last_meeting_booked_medium", "type": "string" }, - { "name": "engagements_last_meeting_booked_source", "type": "string" }, - { "name": "hs_analytics_first_visit_timestamp", "type": "datetime" }, - { "name": "hs_email_last_open_date", "type": "datetime" }, - { "name": "hs_sales_email_last_replied", "type": "datetime" }, - { "name": "hubspot_owner_id", "type": "enumeration" }, - { "name": "notes_last_contacted", "type": "datetime" }, - { "name": "notes_last_updated", "type": "datetime" }, - { "name": "notes_next_activity_date", "type": "datetime" }, - { "name": "num_contacted_notes", "type": "number" }, - { "name": "num_notes", "type": "number" }, - { "name": "surveymonkeyeventlastupdated", "type": "number" }, - { "name": "webinareventlastupdated", "type": "number" }, - { "name": "city", "type": "string" }, - { "name": "hs_analytics_last_timestamp", "type": "datetime" }, - { "name": "hs_email_last_click_date", "type": "datetime" }, - { "name": "hubspot_team_id", "type": "enumeration" }, - { "name": "hs_all_owner_ids", "type": "enumeration" }, - { "name": "hs_analytics_last_visit_timestamp", "type": "datetime" }, - { "name": "hs_email_first_send_date", "type": "datetime" }, - { "name": "state", "type": "string" }, - { "name": "hs_all_team_ids", "type": "enumeration" }, - { "name": "hs_analytics_source", "type": "enumeration" }, - { "name": "hs_email_first_open_date", "type": "datetime" }, - { "name": "zip", "type": "string" }, - { "name": "country", "type": "string" }, - { "name": "hs_all_accessible_team_ids", "type": "enumeration" }, - { "name": "hs_analytics_source_data_1", "type": "string" }, - { "name": "hs_email_first_click_date", "type": "datetime" }, - { "name": "hs_analytics_source_data_2", "type": "string" }, - { "name": "hs_email_is_ineligible", "type": "bool" }, - { "name": "hs_language", "type": "enumeration" }, - { "name": "hs_analytics_first_referrer", "type": "string" }, - { "name": "jobtitle", "type": "string" }, - { "name": "hs_analytics_last_referrer", "type": "string" }, - { "name": "message", "type": "string" }, - { "name": "closedate", "type": "datetime" }, - { "name": "hs_analytics_average_page_views", "type": "number" }, - { "name": "hs_analytics_revenue", "type": "number" }, - { "name": "hs_lifecyclestage_lead_date", "type": "datetime" }, - { - "name": "hs_lifecyclestage_marketingqualifiedlead_date", - "type": "datetime" - }, - { "name": "hs_lifecyclestage_opportunity_date", "type": "datetime" }, - { "name": "lifecyclestage", "type": "enumeration" }, - { "name": "hs_lifecyclestage_salesqualifiedlead_date", "type": "datetime" }, - { "name": "createdate", "type": "datetime" }, - { "name": "hs_lifecyclestage_evangelist_date", "type": "datetime" }, - { "name": "hs_lifecyclestage_customer_date", "type": "datetime" }, - { "name": "hubspotscore", "type": "number" }, - { "name": "company", "type": "string" }, - { "name": "hs_lifecyclestage_subscriber_date", "type": "datetime" }, - { "name": "hs_lifecyclestage_other_date", "type": "datetime" }, - { "name": "website", "type": "string" }, - { "name": "numemployees", "type": "enumeration" }, - { "name": "annualrevenue", "type": "string" }, - { "name": "industry", "type": "string" }, - { "name": "associatedcompanyid", "type": "number" }, - { "name": "associatedcompanylastupdated", "type": "number" }, - { "name": "hs_predictivecontactscorebucket", "type": "enumeration" }, - { "name": "hs_predictivecontactscore", "type": "number" } - ], - "https://api.hubapi.com/crm/v3/objects/contacts/search": { - "total": 1, - "results": [ - { - "id": "103604", - "properties": { - "createdate": "2022-07-15T15:25:08.975Z", - "email": "testhubspot@email.com", - "hs_object_id": "103604", - "lastmodifieddate": "2022-07-15T15:26:49.590Z" - }, - "createdAt": "2022-07-15T15:25:08.975Z", - "updatedAt": "2022-07-15T15:26:49.590Z", - "archived": false - } - ] - }, - "https://api.hubapi.com/crm/v3/objects/lead/search": { - "total": 1, - "results": [ - { - "id": "103605", - "properties": { - "createdate": "2022-08-15T15:25:08.975Z", - "email": "testhubspot2@email.com", - "hs_object_id": "103605", - "lastmodifieddate": "2022-08-15T15:26:49.590Z" - }, - "createdAt": "2022-08-15T15:25:08.975Z", - "updatedAt": "2022-08-15T15:26:49.590Z", - "archived": false - } - ] - }, - "https://api.hubapi.com/crm/v3/objects/lead/search?hapikey=dummy-apikey": { - "total": 1, - "results": [ - { - "id": "103605", - "properties": { - "createdate": "2022-08-15T15:25:08.975Z", - "email": "testhubspot2@email.com", - "hs_object_id": "103605", - "lastmodifieddate": "2022-08-15T15:26:49.590Z" - }, - "createdAt": "2022-08-15T15:25:08.975Z", - "updatedAt": "2022-08-15T15:26:49.590Z", - "archived": false - } - ] - } -} diff --git a/test/__mocks__/data/wootric/response.json b/test/__mocks__/data/wootric/response.json deleted file mode 100644 index 48cdd44a83..0000000000 --- a/test/__mocks__/data/wootric/response.json +++ /dev/null @@ -1,107 +0,0 @@ -{ - "https://api.wootric.com/v1/end_users/dummyId1?lookup_by_external_id=true": { - "id": 486438462, - "created_at": "2022-08-10 11:39:50 -0700", - "updated_at": "2022-08-10 11:39:50 -0700", - "email": "dummyuser1@gmail.com", - "last_surveyed": "2022-01-20 05:39:21 -0800", - "external_created_at": 1611149961, - "last_seen_at": null, - "properties": { - "city": "Mumbai", - "name": "Dummy User 1", - "title": "SDE", - "gender": "Male", - "company": "Rudderstack" - }, - "phone_number": "+19123456789", - "external_id": "dummyId1", - "last_response": null, - "settings": { - "email_nps": true, - "mobile_nps": true, - "web_nps": true, - "force_mobile_survey": null, - "force_web_survey": null, - "surveys_disabled_by_end_user": null - } - }, - "https://api.wootric.com/v1/end_users/exclueFunTestId?lookup_by_external_id=true": { - "id": 486336190, - "created_at": "2022-08-10 07:30:50 -0700", - "updated_at": "2022-08-10 10:12:46 -0700", - "email": "excludeUser@gmail.com", - "last_surveyed": "2022-01-20 05:39:21 -0800", - "external_created_at": 1579755367, - "last_seen_at": null, - "properties": { - "city": "Mumbai", - "name": "exclude test user", - "email": "excludeUser@gmail.com", - "title": "AD", - "gender": "Male", - "company": "Rockstar" - }, - "phone_number": "+18324671283", - "external_id": "exclueFunTestId", - "last_response": null, - "settings": { - "email_nps": true, - "mobile_nps": true, - "web_nps": true, - "force_mobile_survey": null, - "force_web_survey": null, - "surveys_disabled_by_end_user": null - } - }, - "https://api.wootric.com/v1/end_users/my-external-id-1234?lookup_by_external_id=true": { - "type": "error_list", - "errors": [ - { - "status": "record_not_found", - "message": "The record could not be found", - "field": null - } - ] - }, - "https://api.wootric.com/v1/end_users/490635419": { - "id": 490635419, - "created_at": "2022-08-20 00:55:26 -0700", - "updated_at": "2022-08-22 11:17:05 -0700", - "email": "firstuser@gmail.com", - "last_surveyed": "2022-08-01 00:11:44 -0700", - "external_created_at": 1661002761, - "last_seen_at": null, - "properties": { - "Department": "Marketing", - "product_plan": "Web", - "revenue amount": "5000" - }, - "phone_number": "+8859133456781", - "external_id": "firstUserId123", - "last_response": { - "id": 101013218, - "score": 9, - "text": "Good !!!", - "survey": { - "channel": "web" - } - }, - "settings": { - "email_nps": true, - "mobile_nps": true, - "web_nps": true, - "force_mobile_survey": null, - "force_web_survey": null, - "surveys_disabled_by_end_user": null - } - }, - "https://api.wootric.com/oauth/token?account_token=NPS-dummyToken": { - "access_token": "2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c", - "token_type": "Bearer", - "expires_in": 7200, - "refresh_token": "f4033a61742e84405a5ef8b2e09b82395dc041f0259fd5fb715fc196a1b9cd52", - "scope": "delete_account admin respond export read survey invalidate_response", - "created_at": 1660292389 - } -} diff --git a/test/__mocks__/hs.mock.js b/test/__mocks__/hs.mock.js deleted file mode 100644 index ae88ed776b..0000000000 --- a/test/__mocks__/hs.mock.js +++ /dev/null @@ -1,123 +0,0 @@ -const hsGetRequestHandler = (url, mockData) => { - if (url.includes("invalid-api-key")) { - return Promise.reject({ - response: { - data: { - status: "error", - message: - "The API key provided is invalid. View or manage your API key here: https://app.hubspot.com/l/api-key/", - correlationId: "4d39ff11-e121-4514-bcd8-132a9dd1ff50", - category: "INVALID_AUTHENTICATION", - links: { - "api key": "https://app.hubspot.com/l/api-key/" - } - }, - status: 401 - } - }); - } - if (url.includes("rate-limit-id")) { - return Promise.reject({ - response: { - data: { - status: "error", - message: "Request Rate Limit reached", - correlationId: "4d39ff11-e121-4514-bcd8-132a9dd1ff50", - category: "RATE-LIMIT_REACHED", - links: { - "api key": "https://app.hubspot.com/l/api-key/" - } - }, - status: 429 - } - }); - } - if (mockData) { - //resolve with status 200 - return Promise.resolve({ data: mockData, status: 200 }); - } else { - return Promise.reject({ - response: { - data: { - status: "error", - message: "404 not found", - correlationId: "4d39ff11-e121-4514-bcd8-132a9dd1ff50", - category: "DATA_NOT_DOUND", - links: { - "api key": "https://app.hubspot.com/l/api-key/" - } - }, - status: 404 - } - }); - } -}; - -const hsPostRequestHandler = (payload, mockData) => { - if (payload.filterGroups[0].filters[0].value === "noname@email.com") { - // no contact found for noname@gmail.com (email) - return Promise.resolve({ - data: { - total: 0, - results: [] - }, - status: 200 - }); - } else if (payload.filterGroups[0].filters[0].value === "Jhon") { - // multiple contact found for Jhon (firstname) - return Promise.resolve({ - data: { - total: 2, - results: [ - { - id: "103601", - properties: { - createdate: "2022-07-14T15:25:08.975Z", - email: "testhubspot8@email.com", - firstname: "Alex", - hs_object_id: "103601", - lastmodifieddate: "2022-07-14T15:26:49.590Z" - }, - createdAt: "2022-07-14T15:25:08.975Z", - updatedAt: "2022-07-14T15:26:49.590Z", - archived: false - }, - { - id: "103602", - properties: { - createdate: "2022-07-14T15:27:08.975Z", - email: "testhubspot9@email.com", - firstname: "Jhon", - hs_object_id: "103602", - lastmodifieddate: "2022-07-14T15:28:49.590Z" - }, - createdAt: "2022-07-14T15:27:08.975Z", - updatedAt: "2022-07-14T15:28:49.590Z", - archived: false - } - ] - }, - status: 200 - }); - } else if (mockData) { - //resolve with status 200 - return Promise.resolve({ data: mockData, status: 200 }); - } - - return Promise.reject({ - response: { - data: { - status: "error", - message: "404 not found", - correlationId: "4d39ff11-e121-4514-bcd8-132a9dd1ff50", - category: "DATA_NOT_DOUND", - links: { - "api key": "https://app.hubspot.com/l/api-key/" - } - }, - status: 404 - } - }); -}; - -module.exports = { hsGetRequestHandler, hsPostRequestHandler }; diff --git a/test/__mocks__/wootric.mock.js b/test/__mocks__/wootric.mock.js deleted file mode 100644 index 0a1519f1d2..0000000000 --- a/test/__mocks__/wootric.mock.js +++ /dev/null @@ -1,55 +0,0 @@ -const fs = require("fs"); -const path = require("path"); - -const urlDirectoryMap = { - "api.wootric.com": "wootric" -}; - -const getData = url => { - let directory = ""; - Object.keys(urlDirectoryMap).forEach(key => { - if (url.includes(key)) { - directory = urlDirectoryMap[key]; - } - }); - if (directory) { - const dataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${directory}/response.json`) - ); - const data = JSON.parse(dataFile); - return data[url]; - } - return {}; -}; - -const wootricGetRequestHandler = url => { - const mockData = getData(url); - if (mockData) { - return { data: mockData, status: 200 }; - } - return new Promise((resolve, reject) => { - resolve({ error: "Request failed", status: 404 }); - }); -}; - -const wootricPostRequestHandler = (url, payload) => { - const mockData = getData(url); - if (mockData) { - return { data: mockData, status: 200 }; - } - return new Promise((resolve, reject) => { - reject({ - response: { - data: { - error: "Not found", - status: 404 - } - } - }); - }); -}; - -module.exports = { - wootricGetRequestHandler, - wootricPostRequestHandler -}; diff --git a/test/__tests__/data/hs.json b/test/__tests__/data/hs.json deleted file mode 100644 index fe51488c70..0000000000 --- a/test/__tests__/data/hs.json +++ /dev/null @@ -1 +0,0 @@ -[] diff --git a/test/__tests__/data/hs_input.json b/test/__tests__/data/hs_input.json deleted file mode 100644 index 0dab49824f..0000000000 --- a/test/__tests__/data/hs_input.json +++ /dev/null @@ -1,3185 +0,0 @@ -[ - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "testhubspot2@email.com", - "firstname": "Test Hubspot", - "anonymousId": "12345" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "", - "referrer": "", - "search": "", - "title": "", - "url": "" - } - }, - "type": "identify", - "messageId": "50360b9c-ea8d-409c-b672-c9230f91cce5", - "originalTimestamp": "2019-10-15T09:35:31.288Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "apiKey": "dummy-apikey", - "hubID": "dummy-hubId" - }, - "Enabled": true - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "testhubspot2@email.com", - "firstname": "Test Hubspot", - "anonymousId": "12345" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "type": "page", - "messageId": "e8585d9a-7137-4223-b295-68ab1b17dad7", - "originalTimestamp": "2019-10-15T09:35:31.289Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "properties": { - "path": "", - "referrer": "", - "search": "", - "title": "", - "url": "" - }, - "integrations": { - "All": true - }, - "name": "ApplicationLoaded", - "sentAt": "2019-10-14T11:15:53.296Z" - }, - "destination": { - "Config": { - "apiKey": "dummy-apikey", - "hubID": "dummy-hubId" - }, - "Enabled": true - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "testhubspot2@email.com", - "firstname": "Test Hubspot" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "type": "track", - "messageId": "08829772-d991-427c-b976-b4c4f4430b4e", - "originalTimestamp": "2019-10-15T09:35:31.291Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "event": "test track event HS", - "properties": { - "user_actual_role": "system_admin, system_user", - "user_actual_id": 12345 - }, - "sentAt": "2019-10-14T11:15:53.296Z" - }, - "destination": { - "Config": { - "apiKey": "dummy-apikey", - "hubID": "dummy-hubId" - }, - "Enabled": true - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "", - "referrer": "", - "search": "", - "title": "", - "url": "" - } - }, - "traits": { - "email": "testhubspot2@email.com", - "firstname": "Test Hubspot", - "anonymousId": "12345" - }, - "type": "identify", - "messageId": "50360b9c-ea8d-409c-b672-c9230f91cce5", - "originalTimestamp": "2019-10-15T09:35:31.288Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "apiKey": "dummy-apikey", - "hubID": "dummy-hubId" - }, - "Enabled": true - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "firstname": "Test Hubspot", - "anonymousId": "12345" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "", - "referrer": "", - "search": "", - "title": "", - "url": "" - } - }, - "type": "identify", - "messageId": "50360b9c-ea8d-409c-b672-c9230f91cce5", - "originalTimestamp": "2019-10-15T09:35:31.288Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "apiKey": "dummy-apikey", - "hubID": "dummy-hubId" - }, - "Enabled": true - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "testhubspot2@email.com", - "firstname": "Test Hubspot" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "type": "track", - "messageId": "08829772-d991-427c-b976-b4c4f4430b4e", - "originalTimestamp": "2019-10-15T09:35:31.291Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "event": "test track event HS", - "properties": { - "revenue": 4.99, - "user_actual_role": "system_admin, system_user", - "user_actual_id": 12345 - }, - "sentAt": "2019-10-14T11:15:53.296Z" - }, - "destination": { - "Config": { - "apiKey": "dummy-apikey", - "hubID": "dummy-hubId" - }, - "Enabled": true - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "testhubspot2@email.com", - "firstname": "Test Hubspot" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "type": "track", - "messageId": "08829772-d991-427c-b976-b4c4f4430b4e", - "originalTimestamp": "2019-10-15T09:35:31.291Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "event": "test track event HS", - "properties": { - "value": 4.99, - "user_actual_role": "system_admin, system_user", - "user_actual_id": 12345 - }, - "sentAt": "2019-10-14T11:15:53.296Z" - }, - "destination": { - "Config": { - "apiKey": "dummy-apikey", - "hubID": "dummy-hubId" - }, - "Enabled": true - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "testhubspot2@email.com", - "firstname": "Test Hubspot", - "anonymousId": "12345" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "", - "referrer": "", - "search": "", - "title": "", - "url": "" - } - }, - "type": "identify", - "messageId": "50360b9c-ea8d-409c-b672-c9230f91cce5", - "originalTimestamp": "2019-10-15T09:35:31.288Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "metadata": { - "jobId": 2 - }, - "destination": { - "Config": { - "apiKey": "invalid-api-key", - "hubID": "dummy-hubId" - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Hubspot", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "HS", - "displayName": "Hubspot", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "testhubspot2@email.com", - "firstname": "Test Hubspot", - "anonymousId": "12345" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "", - "referrer": "", - "search": "", - "title": "", - "url": "" - } - }, - "type": "identify", - "messageId": "50360b9c-ea8d-409c-b672-c9230f91cce5", - "originalTimestamp": "2019-10-15T09:35:31.288Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "metadata": { - "jobId": 2 - }, - "destination": { - "Config": { - "apiKey": "rate-limit-id", - "hubID": "dummy-hubId" - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Hubspot", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "HS", - "displayName": "Hubspot", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "testhubspot2@email.com", - "firstname": "Test Hubspot" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "type": "track", - "messageId": "08829772-d991-427c-b976-b4c4f4430b4e", - "originalTimestamp": "2019-10-15T09:35:31.291Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "event": "test track event HS", - "sentAt": "2019-10-14T11:15:53.296Z" - }, - "destination": { - "Config": { - "apiKey": "dummy-apikey", - "hubID": "dummy-hubId" - }, - "Enabled": true - } - }, - { - "description": "[HS] (legacyApiKey): trigger update all objects endpoint for rETL source", - "message": { - "channel": "web", - "context": { - "mappedToDestination": true, - "externalId": [ - { - "identifierType": "email", - "id": "testhubspot2@email.com", - "type": "HS-lead" - } - ], - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "", - "referrer": "", - "search": "", - "title": "", - "url": "" - } - }, - "type": "identify", - "traits": { - "firstname": "Test Hubspot", - "anonymousId": "12345", - "country": "India" - }, - "messageId": "50360b9c-ea8d-409c-b672-c9230f91cce5", - "originalTimestamp": "2019-10-15T09:35:31.288Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "apiKey": "dummy-apikey", - "hubID": "dummy-hubId" - }, - "Enabled": true - } - }, - { - "description": "[HS] (legacyApiKey): trigger create custom objects endpoint", - "message": { - "channel": "web", - "context": { - "mappedToDestination": true, - "externalId": [ - { - "identifierType": "email", - "id": "testhubspot@email.com", - "type": "HS-lead" - } - ], - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "", - "referrer": "", - "search": "", - "title": "", - "url": "" - } - }, - "type": "identify", - "traits": { - "firstname": "Test Hubspot", - "anonymousId": "12345", - "country": "India" - }, - "messageId": "50360b9c-ea8d-409c-b672-c9230f91cce5", - "originalTimestamp": "2019-10-15T09:35:31.288Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "apiKey": "dummy-apikey", - "hubID": "dummy-hubId" - }, - "Enabled": true - } - }, - { - "description": "[HS] (newApiKey): trigger create all objects endpoint for rETL source", - "message": { - "channel": "web", - "context": { - "mappedToDestination": true, - "externalId": [ - { - "identifierType": "email", - "id": "testhubspot@email.com", - "type": "HS-lead" - } - ], - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "", - "referrer": "", - "search": "", - "title": "", - "url": "" - } - }, - "type": "identify", - "traits": { - "firstname": "Test Hubspot", - "anonymousId": "12345", - "country": "India" - }, - "messageId": "50360b9c-ea8d-409c-b672-c9230f91cce5", - "originalTimestamp": "2019-10-15T09:35:31.288Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "authorizationType": "newPrivateAppApi", - "hubID": "", - "apiKey": "", - "accessToken": "dummy-access-token", - "apiVersion": "newApi", - "lookupField": "lookupField", - "hubspotEvents": [], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - { - "description": "[HS] (newApiKey): trigger update all objects endpoint for rETL source", - "message": { - "channel": "web", - "context": { - "mappedToDestination": true, - "externalId": [ - { - "identifierType": "email", - "id": "testhubspot2@email.com", - "type": "HS-lead" - } - ], - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "", - "referrer": "", - "search": "", - "title": "", - "url": "" - } - }, - "type": "identify", - "traits": { - "firstname": "Test Hubspot", - "anonymousId": "12345", - "country": "India" - }, - "messageId": "50360b9c-ea8d-409c-b672-c9230f91cce5", - "originalTimestamp": "2019-10-15T09:35:31.288Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "authorizationType": "newPrivateAppApi", - "hubID": "", - "apiKey": "", - "accessToken": "dummy-access-token", - "apiVersion": "newApi", - "lookupField": "lookupField", - "hubspotEvents": [], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": {}, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "type": "track", - "messageId": "08829772-d991-427c-b976-b4c4f4430b4e", - "originalTimestamp": "2019-10-15T09:35:31.291Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "event": "test track event HS", - "sentAt": "2019-10-14T11:15:53.296Z", - "properties": { - "email": "testhubspot2@email.com", - "firstname": "Test Hubspot" - } - }, - "destination": { - "Config": { - "apiKey": "dummy-apikey", - "hubID": "dummy-hubId" - }, - "Enabled": true - } - }, - { - "message": { - "description": "[HS] (legacyApi): use (API Key) - check external id i.e hubspotId", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "testhubspot2@email.com", - "firstname": "Test Hubspot" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "hubspotId", - "id": "6556" - } - ] - }, - "type": "track", - "messageId": "08829772-d991-427c-b976-b4c4f4430b4e", - "originalTimestamp": "2019-10-15T09:35:31.291Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "event": "test track event HS 2", - "properties": { - "user_actual_role": "system_admin, system_user", - "user_actual_id": 12345 - }, - "sentAt": "2019-10-14T11:15:53.296Z" - }, - "destination": { - "Config": { - "apiKey": "dummy-apikey", - "hubID": "dummy-hubId" - }, - "Enabled": true - } - }, - { - "message": { - "description": "[HS] (legacyApi): use (API Key) - check HS common config mappings", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "hubspotId", - "id": "6556" - } - ] - }, - "type": "track", - "messageId": "08829772-d991-427c-b976-b4c4f4430b4e", - "originalTimestamp": "2019-10-15T09:35:31.291Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "event": "test track event HS 2", - "properties": { - "user_actual_role": "system_admin, system_user", - "user_actual_id": 12345, - "address": { - "street": "24. park" - }, - "company": { - "name": "RudderStack" - } - }, - "sentAt": "2019-10-14T11:15:53.296Z" - }, - "destination": { - "Config": { - "apiKey": "dummy-apikey", - "hubID": "dummy-hubId" - }, - "Enabled": true - } - }, - { - "message": { - "description": "[HS] (legacyApi): use (newPrivateAppApi) for contact endpoint", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "testhubspot2@email.com", - "firstname": "Test Hubspot", - "anonymousId": "12345" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "", - "referrer": "", - "search": "", - "title": "", - "url": "" - } - }, - "type": "identify", - "messageId": "50360b9c-ea8d-409c-b672-c9230f91cce5", - "originalTimestamp": "2019-10-15T09:35:31.288Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "authorizationType": "newPrivateAppApi", - "hubID": "dummy-hubId", - "apiKey": "dummy-apikey", - "accessToken": "dummy-access-token", - "apiVersion": "legacyApi", - "lookupField": "", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - { - "message": { - "description": "[HS] (newApi): get contact from hs with email (lookupField) exactly matching with one contact", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "testhubspot@email.com", - "firstname": "Test Hubspot", - "anonymousId": "12345", - "lookupField": "email" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "", - "referrer": "", - "search": "", - "title": "", - "url": "" - } - }, - "type": "identify", - "messageId": "50360b9c-ea8d-409c-b672-c9230f91cce5", - "originalTimestamp": "2019-10-15T09:35:31.288Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "authorizationType": "newPrivateAppApi", - "accessToken": "dummy-access-token", - "hubID": "dummy-hubId", - "apiKey": "dummy-apikey", - "apiVersion": "newApi", - "lookupField": "lookupField", - "hubspotEvents": [], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - { - "message": { - "description": "[HS] (newApi): get contact from hs with email (lookupField) having no contacts", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "noname@email.com", - "firstname": "Test Hubspot", - "anonymousId": "12345", - "lookupField": "email" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "", - "referrer": "", - "search": "", - "title": "", - "url": "" - } - }, - "type": "identify", - "messageId": "50360b9c-ea8d-409c-b672-c9230f91cce5", - "originalTimestamp": "2019-10-15T09:35:31.288Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "authorizationType": "newPrivateAppApi", - "accessToken": "dummy-access-token", - "hubID": "dummy-hubId", - "apiKey": "dummy-apikey", - "apiVersion": "newApi", - "lookupField": "email", - "hubspotEvents": [], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - { - "message": { - "description": "[HS] (newApi): get contact from hs with firstname (lookupField) having more than one result", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "nonamess@email.com", - "firstname": "Jhon", - "anonymousId": "12345" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "", - "referrer": "", - "search": "", - "title": "", - "url": "" - } - }, - "type": "identify", - "messageId": "50360b9c-ea8d-409c-b672-c9230f91cce5", - "originalTimestamp": "2019-10-15T09:35:31.288Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "authorizationType": "newPrivateAppApi", - "accessToken": "dummy-access-token", - "hubID": "dummy-hubId", - "apiKey": "dummy-apikey", - "apiVersion": "newApi", - "lookupField": "firstname", - "hubspotEvents": [], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - { - "message": { - "description": "[HS] (newApi): Track - validate properties of custom behavioral events", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "testhubspot2@email.com", - "firstname": "Test Hubspot" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "type": "track", - "messageId": "08829772-d991-427c-b976-b4c4f4430b4e", - "originalTimestamp": "2019-10-15T09:35:31.291Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "event": "Purchase", - "properties": { - "user_actual_role": "system_admin, system_user", - "user_actual_id": 12345, - "Revenue": 100 - }, - "sentAt": "2019-10-14T11:15:53.296Z" - }, - "destination": { - "Config": { - "authorizationType": "newPrivateAppApi", - "hubID": "1", - "apiKey": "1", - "accessToken": "dummy-access-token", - "apiVersion": "newApi", - "lookupField": "lookupField", - "hubspotEvents": [ - { - "rsEventName": "Purchase", - "hubspotEventName": "pe22315509_rs_hub_test", - "eventProperties": [ - { - "from": "Revenue", - "to": "value" - }, - { - "from": "Price", - "to": "cost" - } - ] - }, - { - "rsEventName": "Order Complete", - "hubspotEventName": "pe22315509_rs_hub_chair", - "eventProperties": [ - { - "from": "firstName", - "to": "first_name" - }, - { - "from": "lastName", - "to": "last_name" - } - ] - } - ], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - { - "message": { - "description": "[HS] (legacyApi): (legacyApiKey) Identify - testing legacy api with new destination config", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "testhubspot2@email.com", - "firstname": "Test Hubspot", - "anonymousId": "12345" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "", - "referrer": "", - "search": "", - "title": "", - "url": "" - } - }, - "type": "identify", - "messageId": "50360b9c-ea8d-409c-b672-c9230f91cce5", - "originalTimestamp": "2019-10-15T09:35:31.288Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "authorizationType": "legacyApiKey", - "hubID": "dummy-hubId", - "apiKey": "dummy-apikey", - "accessToken": "", - "apiVersion": "legacyApi", - "lookupField": "lookupField", - "hubspotEvents": [ - { - "rsEventName": "Purchase", - "hubspotEventName": "pe22315509_rs_hub_test", - "eventProperties": [ - { - "from": "Revenue", - "to": "value" - }, - { - "from": "Price", - "to": "cost" - } - ] - }, - { - "rsEventName": "Order Complete", - "hubspotEventName": "pe22315509_rs_hub_chair", - "eventProperties": [ - { - "from": "firstName", - "to": "first_name" - }, - { - "from": "lastName", - "to": "last_name" - } - ] - } - ], - "eventFilteringOption": "disable", - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "blacklistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - { - "message": { - "description": "[HS] (legacyApi): (legacyApiKey) Track - testing legacy api with new destination config", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "testhubspot2@email.com", - "firstname": "Test Hubspot" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "type": "track", - "messageId": "08829772-d991-427c-b976-b4c4f4430b4e", - "originalTimestamp": "2019-10-15T09:35:31.291Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "event": "test track event HS", - "properties": { - "user_actual_role": "system_admin, system_user", - "user_actual_id": 12345 - }, - "sentAt": "2019-10-14T11:15:53.296Z" - }, - "destination": { - "Config": { - "authorizationType": "legacyApiKey", - "hubID": "dummy-hubId", - "apiKey": "dummy-apikey", - "accessToken": "", - "apiVersion": "legacyApi", - "lookupField": "lookupField", - "hubspotEvents": [ - { - "rsEventName": "Purchase", - "hubspotEventName": "pe22315509_rs_hub_test", - "eventProperties": [ - { - "from": "Revenue", - "to": "value" - }, - { - "from": "Price", - "to": "cost" - } - ] - }, - { - "rsEventName": "Order Complete", - "hubspotEventName": "pe22315509_rs_hub_chair", - "eventProperties": [ - { - "from": "firstName", - "to": "first_name" - }, - { - "from": "lastName", - "to": "last_name" - } - ] - } - ], - "eventFilteringOption": "disable", - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "blacklistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - { - "description": "[HS] (New API v3) - (newPrivateAppApi) check for email in traits which is the deafult lookup field", - "message": { - "type": "identify", - "traits": {}, - "context": { - "externalId": [ - { - "id": "osvaldocostaferreira98@gmail.com", - "type": "HS-contacts", - "identifierType": "email" - } - ], - "mappedToDestination": false - } - }, - "destination": { - "Config": { - "authorizationType": "newPrivateAppApi", - "hubID": "", - "apiKey": "", - "accessToken": "dummy-access-token", - "apiVersion": "newApi", - "lookupField": "lookupField", - "hubspotEvents": [ - { - "rsEventName": "Purchase", - "hubspotEventName": "pe22315509_rs_hub_test", - "eventProperties": [ - { - "from": "Revenue", - "to": "value" - }, - { - "from": "Price", - "to": "cost" - } - ] - }, - { - "rsEventName": "Order Complete", - "hubspotEventName": "pe22315509_rs_hub_chair", - "eventProperties": [ - { - "from": "firstName", - "to": "first_name" - }, - { - "from": "lastName", - "to": "last_name" - } - ] - } - ], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - { - "description": "[HS] (New API v3) - (newPrivateAppApi) email is present in traits as a default lookup field", - "message": { - "type": "identify", - "traits": { - "email": "noname@email.com" - }, - "context": { - "mappedToDestination": false - } - }, - "destination": { - "Config": { - "authorizationType": "newPrivateAppApi", - "hubID": "", - "apiKey": "", - "accessToken": "dummy-access-token", - "apiVersion": "newApi", - "lookupField": "lookupField", - "hubspotEvents": [ - { - "rsEventName": "Purchase", - "hubspotEventName": "pe22315509_rs_hub_test", - "eventProperties": [ - { - "from": "Revenue", - "to": "value" - }, - { - "from": "Price", - "to": "cost" - } - ] - }, - { - "rsEventName": "Order Complete", - "hubspotEventName": "pe22315509_rs_hub_chair", - "eventProperties": [ - { - "from": "firstName", - "to": "first_name" - }, - { - "from": "lastName", - "to": "last_name" - } - ] - } - ], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - { - "description": "[HS] (New API v3) - (newPrivateAppApi) - rETL source - minimum config check", - "message": { - "type": "identify", - "traits": {}, - "context": { - "externalId": [ - { - "id": "osvaldocostaferreira98@gmail.com", - "type": "HS-contacts", - "identifierType": "email" - } - ], - "mappedToDestination": "true" - } - }, - "destination": { - "Config": { - "authorizationType": "newPrivateAppApi", - "hubID": "", - "apiKey": "", - "accessToken": "dummy-access-token", - "apiVersion": "newApi", - "lookupField": "lookupField", - "hubspotEvents": [ - { - "rsEventName": "Purchase", - "hubspotEventName": "pe22315509_rs_hub_test", - "eventProperties": [ - { - "from": "Revenue", - "to": "value" - }, - { - "from": "Price", - "to": "cost" - } - ] - }, - { - "rsEventName": "Order Complete", - "hubspotEventName": "pe22315509_rs_hub_chair", - "eventProperties": [ - { - "from": "firstName", - "to": "first_name" - }, - { - "from": "lastName", - "to": "last_name" - } - ] - } - ], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - { - "description": "[HS] (New API v3) - (newPrivateAppApi) rETL - object type is not provided i.e externalId is empty", - "message": { - "type": "identify", - "traits": {}, - "context": { - "mappedToDestination": "true" - } - }, - "destination": { - "Config": { - "authorizationType": "newPrivateAppApi", - "hubID": "", - "apiKey": "", - "accessToken": "dummy-access-token", - "apiVersion": "newApi", - "lookupField": "lookupField", - "hubspotEvents": [ - { - "rsEventName": "Purchase", - "hubspotEventName": "pe22315509_rs_hub_test", - "eventProperties": [ - { - "from": "Revenue", - "to": "value" - }, - { - "from": "Price", - "to": "cost" - } - ] - }, - { - "rsEventName": "Order Complete", - "hubspotEventName": "pe22315509_rs_hub_chair", - "eventProperties": [ - { - "from": "firstName", - "to": "first_name" - }, - { - "from": "lastName", - "to": "last_name" - } - ] - } - ], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - { - "description": "[HS] (New API v3) - (newPrivateAppApi) sample track call for property check", - "message": { - "type": "track", - "traits": {}, - "context": { - "externalId": [ - { - "id": "osvaldocostaferreira98@gmail.com", - "type": "HS-contacts", - "identifierType": "email" - } - ] - }, - "event": "Purchase", - "properties": { - "Revenue": "name1" - } - }, - "destination": { - "Config": { - "authorizationType": "newPrivateAppApi", - "hubID": "", - "apiKey": "", - "accessToken": "dummy-access-token", - "apiVersion": "newApi", - "lookupField": "lookupField", - "hubspotEvents": [ - { - "rsEventName": "Purchase", - "hubspotEventName": "pe22315509_rs_hub_test", - "eventProperties": [ - { - "from": "Revenue", - "to": "value" - }, - { - "from": "Price", - "to": "cost" - } - ] - }, - { - "rsEventName": "Order Complete", - "hubspotEventName": "pe22315509_rs_hub_chair", - "eventProperties": [ - { - "from": "firstName", - "to": "first_name" - }, - { - "from": "lastName", - "to": "last_name" - } - ] - } - ], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - { - "description": "[HS] (New API v3) - (newPrivateAppApi) - check for accesstoken existence", - "message": { - "type": "identify", - "traits": { - "lookupField": "firstname", - "firstname": "Test" - }, - "context": { - "externalId": [ - { - "id": "osvaldocostaferreira98@gmail.com", - "type": "HS-contacts", - "identifierType": "email" - } - ] - }, - "event": "Purchase", - "properties": { - "revenue": "name1" - } - }, - "destination": { - "Config": { - "authorizationType": "newPrivateAppApi", - "hubID": "", - "apiKey": "", - "accessToken": "", - "apiVersion": "newApi", - "lookupField": "lookupField", - "hubspotEvents": [ - { - "rsEventName": "Purchase", - "hubspotEventName": "pe22315509_rs_hub_test", - "eventProperties": [ - { - "from": "Revenue", - "to": "value" - }, - { - "from": "Price", - "to": "cost" - } - ] - }, - { - "rsEventName": "Order Complete", - "hubspotEventName": "pe22315509_rs_hub_chair", - "eventProperties": [ - { - "from": "firstName", - "to": "first_name" - }, - { - "from": "lastName", - "to": "last_name" - } - ] - } - ], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - { - "description": "[HS] (New API v3) - (legacyApiKey) - check for hubId existence", - "message": { - "type": "identify", - "traits": { - "lookupField": "firstname", - "firstname": "Test" - }, - "context": { - "externalId": [ - { - "id": "osvaldocostaferreira98@gmail.com", - "type": "HS-contacts", - "identifierType": "email" - } - ] - }, - "event": "Purchase", - "properties": { - "revenue": "name1" - } - }, - "destination": { - "Config": { - "authorizationType": "legacyApiKey", - "hubID": "", - "apiKey": "", - "accessToken": "", - "apiVersion": "newApi", - "lookupField": "lookupField", - "hubspotEvents": [ - { - "rsEventName": "Purchase", - "hubspotEventName": "pe22315509_rs_hub_test", - "eventProperties": [ - { - "from": "Revenue", - "to": "value" - }, - { - "from": "Price", - "to": "cost" - } - ] - }, - { - "rsEventName": "Order Complete", - "hubspotEventName": "pe22315509_rs_hub_chair", - "eventProperties": [ - { - "from": "firstName", - "to": "first_name" - }, - { - "from": "lastName", - "to": "last_name" - } - ] - } - ], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - { - "description": "[HS] (New API v3) - (legacyApiKey) - check basic track call", - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "type": "track", - "messageId": "08829772-d991-427c-b976-b4c4f4430b4e", - "originalTimestamp": "2019-10-15T09:35:31.291Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "event": "Purchase", - "properties": { - "user_actual_role": "system_admin, system_user", - "user_actual_id": 12345, - "address": { - "city": "kolkata", - "country": "India" - }, - "objectId": "5005" - }, - "sentAt": "2019-10-14T11:15:53.296Z" - }, - "destination": { - "Config": { - "authorizationType": "legacyApiKey", - "hubID": "dummy-hubId", - "apiKey": "dummy-apikey", - "accessToken": "", - "apiVersion": "newApi", - "lookupField": "lookupField", - "hubspotEvents": [ - { - "rsEventName": "Purchase", - "hubspotEventName": "pe22315509_rs_hub_test", - "eventProperties": [ - { - "from": "Revenue", - "to": "value" - }, - { - "from": "Price", - "to": "cost" - } - ] - }, - { - "rsEventName": "Order Complete", - "hubspotEventName": "pe22315509_rs_hub_chair", - "eventProperties": [ - { - "from": "firstName", - "to": "first_name" - }, - { - "from": "lastName", - "to": "last_name" - } - ] - } - ], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - { - "description": "[HS] (New API v3) - (legacyApiKey) - either of email, utk or objectId must be present", - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "type": "track", - "messageId": "08829772-d991-427c-b976-b4c4f4430b4e", - "originalTimestamp": "2019-10-15T09:35:31.291Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "event": "Purchase", - "properties": { - "user_actual_role": "system_admin, system_user", - "user_actual_id": 12345, - "address": { - "city": "kolkata", - "country": "India" - } - }, - "sentAt": "2019-10-14T11:15:53.296Z" - }, - "destination": { - "Config": { - "authorizationType": "legacyApiKey", - "hubID": "dummy-hubId", - "apiKey": "dummy-apikey", - "accessToken": "", - "apiVersion": "newApi", - "lookupField": "lookupField", - "hubspotEvents": [ - { - "rsEventName": "Purchase", - "hubspotEventName": "pe22315509_rs_hub_test", - "eventProperties": [ - { - "from": "Revenue", - "to": "value" - }, - { - "from": "Price", - "to": "cost" - } - ] - }, - { - "rsEventName": "Order Complete", - "hubspotEventName": "pe22315509_rs_hub_chair", - "eventProperties": [ - { - "from": "firstName", - "to": "first_name" - }, - { - "from": "lastName", - "to": "last_name" - } - ] - } - ], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - { - "message": { - "description": "[HS] (newApi): check for legacyApiKey", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "noname@email.com", - "firstname": "Test Hubspot", - "anonymousId": "12345" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "", - "referrer": "", - "search": "", - "title": "", - "url": "" - } - }, - "type": "identify", - "messageId": "50360b9c-ea8d-409c-b672-c9230f91cce5", - "originalTimestamp": "2019-10-15T09:35:31.288Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "authorizationType": "legacyApiKey", - "accessToken": "dummy-access-token", - "hubID": "dummy-hubId", - "apiKey": "dummy-apikey", - "apiVersion": "newApi", - "lookupField": "email", - "hubspotEvents": [], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - { - "description": "[HS] (New API v3) - (newPrivateAppApi) message type not present", - "message": { - "traits": {}, - "context": { - "externalId": [ - { - "id": "osvaldocostaferreira98@gmail.com", - "type": "HS-contacts", - "identifierType": "email" - } - ] - }, - "event": "Purchase", - "properties": { - "revenue": "name1" - } - }, - "destination": { - "Config": { - "authorizationType": "newPrivateAppApi", - "hubID": "", - "apiKey": "", - "accessToken": "dummy-access-token", - "apiVersion": "newApi", - "lookupField": "lookupField", - "hubspotEvents": [ - { - "rsEventName": "Purchase", - "hubspotEventName": "pe22315509_rs_hub_test", - "eventProperties": [ - { - "from": "Revenue", - "to": "value" - }, - { - "from": "Price", - "to": "cost" - } - ] - }, - { - "rsEventName": "Order Complete", - "hubspotEventName": "pe22315509_rs_hub_chair", - "eventProperties": [ - { - "from": "firstName", - "to": "first_name" - }, - { - "from": "lastName", - "to": "last_name" - } - ] - } - ], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - { - "description": "[HS] (New API v3) - (legacyApiKey) - check for api key existence", - "message": { - "type": "identify", - "traits": { - "lookupField": "firstname", - "firstname": "Test" - }, - "context": { - "externalId": [ - { - "id": "osvaldocostaferreira98@gmail.com", - "type": "HS-contacts", - "identifierType": "email" - } - ] - }, - "event": "Purchase", - "properties": { - "revenue": "name1" - } - }, - "destination": { - "Config": { - "authorizationType": "legacyApiKey", - "hubID": "dummy-hubId", - "apiKey": "", - "accessToken": "", - "apiVersion": "newApi", - "lookupField": "lookupField", - "hubspotEvents": [ - { - "rsEventName": "Purchase", - "hubspotEventName": "pe22315509_rs_hub_test", - "eventProperties": [ - { - "from": "Revenue", - "to": "value" - }, - { - "from": "Price", - "to": "cost" - } - ] - }, - { - "rsEventName": "Order Complete", - "hubspotEventName": "pe22315509_rs_hub_chair", - "eventProperties": [ - { - "from": "firstName", - "to": "first_name" - }, - { - "from": "lastName", - "to": "last_name" - } - ] - } - ], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - { - "description": "[HS] (New API v3) - (newPrivateAppApi) Identify: traits is not supplied", - "message": { - "type": "identify", - "context": { - "mappedToDestination": false - } - }, - "destination": { - "Config": { - "authorizationType": "newPrivateAppApi", - "hubID": "", - "apiKey": "", - "accessToken": "dummy-access-token", - "apiVersion": "newApi", - "lookupField": "lookupField", - "hubspotEvents": [ - { - "rsEventName": "Purchase", - "hubspotEventName": "pe22315509_rs_hub_test", - "eventProperties": [ - { - "from": "Revenue", - "to": "value" - }, - { - "from": "Price", - "to": "cost" - } - ] - }, - { - "rsEventName": "Order Complete", - "hubspotEventName": "pe22315509_rs_hub_chair", - "eventProperties": [ - { - "from": "firstName", - "to": "first_name" - }, - { - "from": "lastName", - "to": "last_name" - } - ] - } - ], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - { - "description": "[HS] (New API v3) - (legacyApiKey) - event not found", - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "type": "track", - "messageId": "08829772-d991-427c-b976-b4c4f4430b4e", - "originalTimestamp": "2019-10-15T09:35:31.291Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "event": "Temp Event", - "properties": { - "user_actual_role": "system_admin, system_user", - "user_actual_id": 12345, - "address": { - "city": "kolkata", - "country": "India" - }, - "objectId": "5005" - }, - "sentAt": "2019-10-14T11:15:53.296Z" - }, - "destination": { - "Config": { - "authorizationType": "legacyApiKey", - "hubID": "dummy-hubId", - "apiKey": "dummy-apikey", - "accessToken": "", - "apiVersion": "newApi", - "lookupField": "lookupField", - "hubspotEvents": [ - { - "rsEventName": "Purchase", - "hubspotEventName": "pe22315509_rs_hub_test", - "eventProperties": [ - { - "from": "Revenue", - "to": "value" - }, - { - "from": "Price", - "to": "cost" - } - ] - }, - { - "rsEventName": "Order Complete", - "hubspotEventName": "pe22315509_rs_hub_chair", - "eventProperties": [ - { - "from": "firstName", - "to": "first_name" - }, - { - "from": "lastName", - "to": "last_name" - } - ] - } - ], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - { - "description": "[HS] (New API v3) - (legacyApiKey) - event name is required", - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "type": "track", - "messageId": "08829772-d991-427c-b976-b4c4f4430b4e", - "originalTimestamp": "2019-10-15T09:35:31.291Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "properties": { - "user_actual_role": "system_admin, system_user", - "user_actual_id": 12345, - "address": { - "city": "kolkata", - "country": "India" - }, - "objectId": "5005" - }, - "sentAt": "2019-10-14T11:15:53.296Z" - }, - "destination": { - "Config": { - "authorizationType": "legacyApiKey", - "hubID": "dummy-hubId", - "apiKey": "dummy-apikey", - "accessToken": "", - "apiVersion": "newApi", - "lookupField": "lookupField", - "hubspotEvents": [ - { - "rsEventName": "Purchase", - "hubspotEventName": "pe22315509_rs_hub_test", - "eventProperties": [ - { - "from": "Revenue", - "to": "value" - }, - { - "from": "Price", - "to": "cost" - } - ] - }, - { - "rsEventName": "Order Complete", - "hubspotEventName": "pe22315509_rs_hub_chair", - "eventProperties": [ - { - "from": "firstName", - "to": "first_name" - }, - { - "from": "lastName", - "to": "last_name" - } - ] - } - ], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - { - "description": "[HS] (Legacy API v1) - (newPrivateAppApi) rETL - object type is not provided i.e externalId is empty", - "message": { - "type": "identify", - "traits": {}, - "context": { - "mappedToDestination": "true" - } - }, - "destination": { - "Config": { - "authorizationType": "newPrivateAppApi", - "hubID": "", - "apiKey": "", - "accessToken": "dummy-access-token", - "apiVersion": "legacyApi", - "lookupField": "lookupField", - "hubspotEvents": [ - { - "rsEventName": "Purchase", - "hubspotEventName": "pe22315509_rs_hub_test", - "eventProperties": [ - { - "from": "Revenue", - "to": "value" - }, - { - "from": "Price", - "to": "cost" - } - ] - }, - { - "rsEventName": "Order Complete", - "hubspotEventName": "pe22315509_rs_hub_chair", - "eventProperties": [ - { - "from": "firstName", - "to": "first_name" - }, - { - "from": "lastName", - "to": "last_name" - } - ] - } - ], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - { - "description": "[HS] (Legacy API v1) - (newPrivateAppApi) - sample track call for legacy api with newPrivateAppApi", - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "testhubspot2@email.com", - "firstname": "Test Hubspot" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "type": "track", - "messageId": "08829772-d991-427c-b976-b4c4f4430b4e", - "originalTimestamp": "2019-10-15T09:35:31.291Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "event": "test track event HS", - "properties": { - "user_actual_role": "system_admin, system_user", - "user_actual_id": 12345 - }, - "sentAt": "2019-10-14T11:15:53.296Z" - }, - "destination": { - "Config": { - "apiKey": "dummy-apikey", - "hubID": "dummy-hubId", - "authorizationType": "newPrivateAppApi", - "accessToken": "dummy-access-token", - "apiVersion": "legacyApi" - }, - "Enabled": true - } - }, - { - "message": { - "channel": "web", - "context": { - "mappedToDestination": true, - "externalId": [ - { - "identifierType": "email", - "id": "testhubspot2@email.com", - "type": "HS-lead" - } - ], - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "", - "referrer": "", - "search": "", - "title": "", - "url": "" - } - }, - "type": "identify", - "traits": { - "firstname": "Test Hubspot", - "anonymousId": "12345", - "country": "India" - }, - "messageId": "50360b9c-ea8d-409c-b672-c9230f91cce5", - "originalTimestamp": "2019-10-15T09:35:31.288Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "metadata": { - "jobId": 2 - }, - "destination": { - "Config": { - "apiKey": "rate-limit-id", - "hubID": "dummy-hubId" - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Hubspot", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "HS", - "displayName": "Hubspot", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "", - "referrer": "", - "search": "", - "title": "", - "url": "" - }, - "traits": { - "email": "testhubspot2@email.com", - "firstname": "Test Hubspot", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "days_to_close": "29 days to close" - } - }, - "type": "identify", - "messageId": "50360b9c-ea8d-409c-b672-c9230f91cce5", - "originalTimestamp": "2023-04-11T09:35:31.288Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "userId": "user@1", - "integrations": { - "All": true - } - }, - "destination": { - "Config": { - "apiKey": "dummy-apikey", - "hubID": "dummy-hubId" - }, - "Enabled": true - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "testhubspot2@email.com", - "firstname": "Test Hubspot", - "anonymousId": "12345" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "type": "identify", - "messageId": "e8585d9a-7137-4223-b295-68ab1b17dad7", - "originalTimestamp": "2019-10-15T09:35:31.289Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "properties": {}, - "integrations": { - "All": true - }, - "name": "ApplicationLoaded", - "sentAt": "2019-10-14T11:15:53.296Z" - }, - "destination": { - "Config": { - "apiKey": "dummy-apikey", - "hubID": "dummy-hubId" - }, - "Enabled": true - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "testhubspot2@email.com", - "firstname": "Test Hubspot", - "anonymousId": "12345" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "type": "identify", - "messageId": "e8585d9a-7137-4223-b295-68ab1b17dad7", - "originalTimestamp": "2019-10-15T09:35:31.289Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "integrations": { - "All": true - }, - "name": "ApplicationLoaded", - "sentAt": "2019-10-14T11:15:53.296Z" - }, - "destination": { - "Config": { - "apiKey": "dummy-apikey", - "hubID": "dummy-hubId" - }, - "Enabled": true - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "testhubspot2@email.com", - "firstname": "Test Hubspot", - "anonymousId": "12345" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "type": "identify", - "messageId": "e8585d9a-7137-4223-b295-68ab1b17dad7", - "originalTimestamp": "2019-10-15T09:35:31.289Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "properties": "", - "integrations": { - "All": true - }, - "name": "ApplicationLoaded", - "sentAt": "2019-10-14T11:15:53.296Z" - }, - "destination": { - "Config": { - "apiKey": "dummy-apikey", - "hubID": "dummy-hubId" - }, - "Enabled": true - } - }, - { - "description": "[HS] (New API v3) - (newPrivateAppApi) sample track call when hubspotEvents is undefined", - "message": { - "type": "track", - "traits": {}, - "context": { - "externalId": [ - { - "id": "osvaldocostaferreira98@gmail.com", - "type": "HS-contacts", - "identifierType": "email" - } - ] - }, - "event": "Purchase", - "properties": { - "Revenue": "name1" - } - }, - "destination": { - "Config": { - "authorizationType": "newPrivateAppApi", - "hubID": "", - "apiKey": "", - "accessToken": "dummy-access-token", - "apiVersion": "newApi", - "lookupField": "lookupField", - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - } -] diff --git a/test/__tests__/data/hs_output.json b/test/__tests__/data/hs_output.json deleted file mode 100644 index 72fe50ba0d..0000000000 --- a/test/__tests__/data/hs_output.json +++ /dev/null @@ -1,843 +0,0 @@ -[ - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.hubapi.com/contacts/v1/contact/createOrUpdate/email/testhubspot2@email.com", - "headers": { - "Content-Type": "application/json" - }, - "params": { - "hapikey": "dummy-apikey" - }, - "body": { - "JSON": { - "properties": [ - { - "property": "email", - "value": "testhubspot2@email.com" - }, - { - "property": "firstname", - "value": "Test Hubspot" - } - ] - }, - "XML": {}, - "FORM": {}, - "JSON_ARRAY": {} - }, - "files": {} - } - ], - { - "statusCode": 400, - "error": "Message type page is not supported" - }, - { - "version": "1", - "type": "REST", - "method": "GET", - "messageType": "track", - "endpoint": "https://track.hubspot.com/v1/event", - "headers": { - "Content-Type": "application/json" - }, - "params": { - "_a": "dummy-hubId", - "_n": "test track event HS", - "email": "testhubspot2@email.com", - "firstname": "Test Hubspot" - }, - "body": { - "JSON": {}, - "XML": {}, - "FORM": {}, - "JSON_ARRAY": {} - }, - "files": {} - }, - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.hubapi.com/contacts/v1/contact/createOrUpdate/email/testhubspot2@email.com", - "headers": { - "Content-Type": "application/json" - }, - "params": { - "hapikey": "dummy-apikey" - }, - "body": { - "JSON": { - "properties": [ - { - "property": "email", - "value": "testhubspot2@email.com" - }, - { - "property": "firstname", - "value": "Test Hubspot" - } - ] - }, - "XML": {}, - "FORM": {}, - "JSON_ARRAY": {} - }, - "files": {} - } - ], - { - "statusCode": 400, - "error": "Identify without email is not supported." - }, - { - "version": "1", - "type": "REST", - "method": "GET", - "messageType": "track", - "endpoint": "https://track.hubspot.com/v1/event", - "headers": { - "Content-Type": "application/json" - }, - "params": { - "_a": "dummy-hubId", - "_n": "test track event HS", - "_m": 4.99, - "email": "testhubspot2@email.com", - "firstname": "Test Hubspot" - }, - "body": { - "JSON": {}, - "XML": {}, - "FORM": {}, - "JSON_ARRAY": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "GET", - "messageType": "track", - "endpoint": "https://track.hubspot.com/v1/event", - "headers": { - "Content-Type": "application/json" - }, - "params": { - "_a": "dummy-hubId", - "_n": "test track event HS", - "_m": 4.99, - "email": "testhubspot2@email.com", - "firstname": "Test Hubspot" - }, - "body": { - "JSON": {}, - "XML": {}, - "FORM": {}, - "JSON_ARRAY": {} - }, - "files": {} - }, - { - "error": "Failed to get hubspot properties: {\"status\":\"error\",\"message\":\"The API key provided is invalid. View or manage your API key here: https://app.hubspot.com/l/api-key/\",\"correlationId\":\"4d39ff11-e121-4514-bcd8-132a9dd1ff50\",\"category\":\"INVALID_AUTHENTICATION\",\"links\":{\"api key\":\"https://app.hubspot.com/l/api-key/\"}}" - }, - { - "error": "Failed to get hubspot properties: {\"status\":\"error\",\"message\":\"Request Rate Limit reached\",\"correlationId\":\"4d39ff11-e121-4514-bcd8-132a9dd1ff50\",\"category\":\"RATE-LIMIT_REACHED\",\"links\":{\"api key\":\"https://app.hubspot.com/l/api-key/\"}}" - }, - { - "version": "1", - "type": "REST", - "method": "GET", - "messageType": "track", - "endpoint": "https://track.hubspot.com/v1/event", - "headers": { - "Content-Type": "application/json" - }, - "params": { - "_a": "dummy-hubId", - "_n": "test track event HS", - "email": "testhubspot2@email.com", - "firstname": "Test Hubspot" - }, - "body": { - "JSON": {}, - "XML": {}, - "FORM": {}, - "JSON_ARRAY": {} - }, - "files": {} - }, - [ - { - "version": "1", - "type": "REST", - "method": "PATCH", - "endpoint": "https://api.hubapi.com/crm/v3/objects/lead/103605", - "source": "rETL", - "operation": "updateObject", - "headers": { - "Content-Type": "application/json" - }, - "params": { - "hapikey": "dummy-apikey" - }, - "body": { - "JSON": { - "properties": { - "firstname": "Test Hubspot", - "anonymousId": "12345", - "country": "India", - "email": "testhubspot2@email.com" - } - }, - "XML": {}, - "FORM": {}, - "JSON_ARRAY": {} - }, - "files": {} - } - ], - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.hubapi.com/crm/v3/objects/lead", - "source": "rETL", - "operation": "createObject", - "headers": { - "Content-Type": "application/json" - }, - "params": { - "hapikey": "dummy-apikey" - }, - "body": { - "JSON": { - "properties": { - "firstname": "Test Hubspot", - "anonymousId": "12345", - "country": "India", - "email": "testhubspot@email.com" - } - }, - "XML": {}, - "FORM": {}, - "JSON_ARRAY": {} - }, - "files": {} - } - ], - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.hubapi.com/crm/v3/objects/lead", - "source": "rETL", - "operation": "createObject", - "headers": { - "Authorization": "Bearer dummy-access-token", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "properties": { - "firstname": "Test Hubspot", - "anonymousId": "12345", - "country": "India", - "email": "testhubspot@email.com" - } - }, - "XML": {}, - "FORM": {}, - "JSON_ARRAY": {} - }, - "files": {} - } - ], - [ - { - "version": "1", - "type": "REST", - "method": "PATCH", - "endpoint": "https://api.hubapi.com/crm/v3/objects/lead/103605", - "source": "rETL", - "operation": "updateObject", - "headers": { - "Authorization": "Bearer dummy-access-token", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "properties": { - "firstname": "Test Hubspot", - "anonymousId": "12345", - "country": "India", - "email": "testhubspot2@email.com" - } - }, - "XML": {}, - "FORM": {}, - "JSON_ARRAY": {} - }, - "files": {} - } - ], - { - "version": "1", - "type": "REST", - "method": "GET", - "messageType": "track", - "endpoint": "https://track.hubspot.com/v1/event", - "headers": { - "Content-Type": "application/json" - }, - "params": { - "_a": "dummy-hubId", - "_n": "test track event HS", - "email": "testhubspot2@email.com", - "firstname": "Test Hubspot" - }, - "body": { - "JSON": {}, - "XML": {}, - "FORM": {}, - "JSON_ARRAY": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "GET", - "messageType": "track", - "endpoint": "https://track.hubspot.com/v1/event", - "headers": { - "Content-Type": "application/json" - }, - "params": { - "_a": "dummy-hubId", - "_n": "test track event HS 2", - "id": "6556", - "email": "testhubspot2@email.com", - "firstname": "Test Hubspot" - }, - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "GET", - "messageType": "track", - "endpoint": "https://track.hubspot.com/v1/event", - "headers": { - "Content-Type": "application/json" - }, - "params": { - "_a": "dummy-hubId", - "_n": "test track event HS 2", - "id": "6556", - "address": "24. park", - "company": "RudderStack" - }, - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.hubapi.com/contacts/v1/contact/createOrUpdate/email/testhubspot2@email.com", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer dummy-access-token" - }, - "params": {}, - "body": { - "JSON": { - "properties": [ - { - "property": "email", - "value": "testhubspot2@email.com" - }, - { - "property": "firstname", - "value": "Test Hubspot" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ], - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.hubapi.com/crm/v3/objects/contacts/103604", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer dummy-access-token" - }, - "params": {}, - "operation": "updateContacts", - "body": { - "JSON": { - "properties": { - "email": "testhubspot@email.com", - "firstname": "Test Hubspot" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ], - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.hubapi.com/crm/v3/objects/contacts", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer dummy-access-token" - }, - "params": {}, - "operation": "createContacts", - "body": { - "JSON": { - "properties": { - "email": "noname@email.com", - "firstname": "Test Hubspot" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ], - { - "statusCode": 400, - "error": "Unable to get single Hubspot contact. More than one contacts found. Retry with unique lookupPropertyName and lookupValue" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "messageType": "track", - "endpoint": "https://api.hubapi.com/events/v3/send", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer dummy-access-token" - }, - "params": {}, - "body": { - "JSON": { - "email": "testhubspot2@email.com", - "occurredAt": "2019-10-15T09:35:31.291Z", - "eventName": "pe22315509_rs_hub_test", - "properties": { - "value": 100 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.hubapi.com/contacts/v1/contact/createOrUpdate/email/testhubspot2@email.com", - "headers": { - "Content-Type": "application/json" - }, - "params": { - "hapikey": "dummy-apikey" - }, - "body": { - "JSON": { - "properties": [ - { - "property": "email", - "value": "testhubspot2@email.com" - }, - { - "property": "firstname", - "value": "Test Hubspot" - } - ] - }, - "XML": {}, - "FORM": {}, - "JSON_ARRAY": {} - }, - "files": {} - } - ], - { - "version": "1", - "type": "REST", - "method": "GET", - "messageType": "track", - "endpoint": "https://track.hubspot.com/v1/event", - "headers": { - "Content-Type": "application/json" - }, - "params": { - "_a": "dummy-hubId", - "_n": "test track event HS", - "email": "testhubspot2@email.com", - "firstname": "Test Hubspot" - }, - "body": { - "JSON": {}, - "XML": {}, - "FORM": {}, - "JSON_ARRAY": {} - }, - "files": {} - }, - { - "statusCode": 400, - "error": "Identify:: email i.e a default lookup field for contact lookup not found in traits", - "statTags": { - "destination": "hs", - "stage": "transform", - "scope": "exception" - } - }, - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.hubapi.com/crm/v3/objects/contacts", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer dummy-access-token" - }, - "params": {}, - "body": { - "JSON": { - "properties": { - "email": "noname@email.com" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "operation": "createContacts" - } - ], - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.hubapi.com/crm/v3/objects/contacts", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer dummy-access-token" - }, - "params": {}, - "body": { - "JSON": { - "properties": { - "email": "osvaldocostaferreira98@gmail.com" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "source": "rETL", - "operation": "createObject" - } - ], - { - "statusCode": 400, - "error": "rETL - external Id not found.", - "statTags": { - "destination": "hs", - "stage": "transform", - "scope": "exception" - } - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.hubapi.com/events/v3/send", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer dummy-access-token" - }, - "params": {}, - "body": { - "JSON": { - "email": "osvaldocostaferreira98@gmail.com", - "eventName": "pe22315509_rs_hub_test", - "properties": { - "value": "name1" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "messageType": "track" - }, - { - "statusCode": 400, - "error": "Access Token not found. Aborting", - "statTags": { - "destination": "hs", - "stage": "transform", - "scope": "exception" - } - }, - { - "statusCode": 400, - "error": "Hub ID not found. Aborting", - "statTags": { - "destination": "hs", - "stage": "transform", - "scope": "exception" - } - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.hubapi.com/events/v3/send?hapikey=dummy-apikey", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "occurredAt": "2019-10-15T09:35:31.291Z", - "objectId": "5005", - "eventName": "pe22315509_rs_hub_test", - "properties": { - "hs_city": "kolkata", - "hs_country": "India" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "messageType": "track" - }, - { - "statusCode": 400, - "error": "Either of email, utk or objectId is required for custom behavioral events", - "statTags": { - "destination": "hs", - "stage": "transform", - "scope": "exception" - } - }, - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.hubapi.com/crm/v3/objects/contacts", - "headers": { - "Content-Type": "application/json" - }, - "params": { - "hapikey": "dummy-apikey" - }, - "operation": "createContacts", - "body": { - "JSON": { - "properties": { - "email": "noname@email.com", - "firstname": "Test Hubspot" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ], - { - "statusCode": 400, - "error": "Message type is not present. Aborting message." - }, - { - "statusCode": 400, - "error": "API Key not found. Aborting" - }, - { - "statusCode": 400, - "error": "Identify - Invalid traits value for lookup field" - }, - { - "statusCode": 400, - "error": "Event name 'temp event' mappings are not configured in the destination" - }, - { - "statusCode": 400, - "error": "event name is required for track call" - }, - { - "statusCode": 400, - "error": "rETL - external Id not found.", - "statTags": { - "destination": "hs", - "stage": "transform", - "scope": "exception" - } - }, - { - "version": "1", - "type": "REST", - "method": "GET", - "messageType": "track", - "endpoint": "https://track.hubspot.com/v1/event", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer dummy-access-token" - }, - "params": { - "_a": "dummy-hubId", - "_n": "test track event HS", - "email": "testhubspot2@email.com", - "firstname": "Test Hubspot" - }, - "body": { - "JSON": {}, - "XML": {}, - "FORM": {}, - "JSON_ARRAY": {} - }, - "files": {} - }, - { - "error": "rETL - Error during searching object record. 404 not found" - }, - { - "error": "Property days_to_close data type string is not matching with Hubspot property data type number" - }, - [ - { - "body": { - "FORM": {}, - "JSON": { - "properties": [ - { "property": "email", "value": "testhubspot2@email.com" }, - { "property": "firstname", "value": "Test Hubspot" } - ] - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://api.hubapi.com/contacts/v1/contact/createOrUpdate/email/testhubspot2@email.com", - "files": {}, - "headers": { "Content-Type": "application/json" }, - "method": "POST", - "params": { "hapikey": "dummy-apikey" }, - "type": "REST", - "version": "1" - } - ], - [ - { - "body": { - "FORM": {}, - "JSON": { - "properties": [ - { "property": "email", "value": "testhubspot2@email.com" }, - { "property": "firstname", "value": "Test Hubspot" } - ] - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://api.hubapi.com/contacts/v1/contact/createOrUpdate/email/testhubspot2@email.com", - "files": {}, - "headers": { "Content-Type": "application/json" }, - "method": "POST", - "params": { "hapikey": "dummy-apikey" }, - "type": "REST", - "version": "1" - } - ], - [ - { - "body": { - "FORM": {}, - "JSON": { - "properties": [ - { "property": "email", "value": "testhubspot2@email.com" }, - { "property": "firstname", "value": "Test Hubspot" } - ] - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://api.hubapi.com/contacts/v1/contact/createOrUpdate/email/testhubspot2@email.com", - "files": {}, - "headers": { "Content-Type": "application/json" }, - "method": "POST", - "params": { "hapikey": "dummy-apikey" }, - "type": "REST", - "version": "1" - } - ], - - { - "statusCode": 400, - "error": "Event and property mappings are required for track call", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation", - "destType": "HS", - "module": "destination", - "implementation": "native", - "feature": "processor" - } - } -] diff --git a/test/__tests__/data/hs_router_associations_rEtl_input.json b/test/__tests__/data/hs_router_associations_rEtl_input.json deleted file mode 100644 index 4cd0ac8d43..0000000000 --- a/test/__tests__/data/hs_router_associations_rEtl_input.json +++ /dev/null @@ -1,57 +0,0 @@ -[ - { - "destination": { - "ID": "123", - "Config": { - "authorizationType": "newPrivateAppApi", - "accessToken": "pat-123", - "apiVersion": "newApi" - } - }, - "message": { - "type": "identify", - "sentAt": "2022-08-23T05:59:38.214Z", - "traits": { - "to": { - "id": 1 - }, - "from": { - "id": 9405415215 - } - }, - "userId": "1", - "channel": "sources", - "context": { - "sources": { - "job_id": "2DkDam0hJ8CXZA43zksWMdPAPRe/Syncher", - "task_id": "HUBSPOT_ASSOC_COMPANY_CONTACT", - "version": "v1.8.15", - "batch_id": "8d566f29-5f9b-4fa7-ad0c-d8087ca52d6a", - "job_run_id": "cc26p35qhlpr6fd4jrmg", - "task_run_id": "cc26p35qhlpr6fd4jrn0" - }, - "externalId": [ - { - "id": 1, - "type": "HS-association", - "toObjectType": "contacts", - "fromObjectType": "companies", - "identifierType": "id", - "associationTypeId": "engineer" - } - ], - "mappedToDestination": "true" - }, - "recordId": "1", - "rudderId": "3afcdbfe-b6ec-4bdd-8ba6-28696e3cc163", - "messageId": "e0c554aa-0a9a-4e24-9a9a-c951a71a0875", - "timestamp": "2022-08-23T05:59:33.758Z", - "receivedAt": "2022-08-23T05:59:33.759Z", - "request_ip": "10.1.90.32", - "originalTimestamp": "2022-08-23T05:59:38.214Z" - }, - "metadata": { - "jobId": 2 - } - } -] diff --git a/test/__tests__/data/hs_router_associations_rEtl_output.json b/test/__tests__/data/hs_router_associations_rEtl_output.json deleted file mode 100644 index e8535c48d2..0000000000 --- a/test/__tests__/data/hs_router_associations_rEtl_output.json +++ /dev/null @@ -1,49 +0,0 @@ -[ - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.hubapi.com/crm/v3/associations/companies/contacts/batch/create", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer pat-123" - }, - "params": {}, - "body": { - "JSON": { - "inputs": [ - { - "to": { - "id": 1 - }, - "from": { - "id": 9405415215 - }, - "type": "engineer" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "jobId": 2 - } - ], - "batched": true, - "statusCode": 200, - "destination": { - "ID": "123", - "Config": { - "authorizationType": "newPrivateAppApi", - "accessToken": "pat-123", - "apiVersion": "newApi" - } - } - } -] diff --git a/test/__tests__/data/hs_router_input.json b/test/__tests__/data/hs_router_input.json deleted file mode 100644 index 7f82f2f8d4..0000000000 --- a/test/__tests__/data/hs_router_input.json +++ /dev/null @@ -1,573 +0,0 @@ -[ - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "noname@email.com", - "firstname": "Test Hubspot22", - "anonymousId": "4444" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "", - "referrer": "", - "search": "", - "title": "", - "url": "" - } - }, - "type": "identify", - "messageId": "50360b9c-ea8d-409c-b672-c9230f91cce5", - "originalTimestamp": "2019-10-15T09:35:31.288Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "metadata": { - "jobId": 1 - }, - "destination": { - "Config": { - "authorizationType": "newPrivateAppApi", - "accessToken": "dummy-access-token", - "hubID": "dummy-hubId", - "apiKey": "dummy-apikey", - "apiVersion": "newApi", - "lookupField": "email", - "hubspotEvents": [ - { - "rsEventName": "Purchase", - "hubspotEventName": "pedummy-hubId_rs_hub_test", - "eventProperties": [ - { - "from": "Revenue", - "to": "value" - }, - { - "from": "Price", - "to": "cost" - } - ] - }, - { - "rsEventName": "Order Complete", - "hubspotEventName": "pedummy-hubId_rs_hub_chair", - "eventProperties": [ - { - "from": "firstName", - "to": "first_name" - }, - { - "from": "lastName", - "to": "last_name" - } - ] - } - ], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Hubspot", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "HS", - "displayName": "Hubspot", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "noname@email.com", - "firstname": "Test Hubspot44", - "anonymousId": "4444" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "", - "referrer": "", - "search": "", - "title": "", - "url": "" - } - }, - "type": "identify", - "messageId": "50360b9c-ea8d-409c-b672-c9230f91cce5", - "originalTimestamp": "2019-10-15T09:35:31.288Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "metadata": { - "jobId": 2 - }, - "destination": { - "Config": { - "authorizationType": "newPrivateAppApi", - "accessToken": "dummy-access-token", - "hubID": "dummy-hubId", - "apiKey": "dummy-apikey", - "apiVersion": "newApi", - "lookupField": "email", - "hubspotEvents": [ - { - "rsEventName": "Purchase", - "hubspotEventName": "pedummy-hubId_rs_hub_test", - "eventProperties": [ - { - "from": "Revenue", - "to": "value" - }, - { - "from": "Price", - "to": "cost" - } - ] - }, - { - "rsEventName": "Order Complete", - "hubspotEventName": "pedummy-hubId_rs_hub_chair", - "eventProperties": [ - { - "from": "firstName", - "to": "first_name" - }, - { - "from": "lastName", - "to": "last_name" - } - ] - } - ], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Hubspot", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "HS", - "displayName": "Hubspot", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - }, - { - "message": { - "type": "track", - "traits": {}, - "context": { - "externalId": [ - { - "id": "osvaldocostaferreira98@gmail.com", - "type": "HS-contacts", - "identifierType": "email" - } - ] - }, - "event": "Purchase", - "properties": { - "Revenue": "name1" - } - }, - "metadata": { - "jobId": 3 - }, - "destination": { - "Config": { - "authorizationType": "newPrivateAppApi", - "accessToken": "dummy-access-token", - "hubID": "dummy-hubId", - "apiKey": "dummy-apikey", - "apiVersion": "newApi", - "lookupField": "lookupField", - "hubspotEvents": [ - { - "rsEventName": "Purchase", - "hubspotEventName": "pedummy-hubId_rs_hub_test", - "eventProperties": [ - { - "from": "Revenue", - "to": "value" - }, - { - "from": "Price", - "to": "cost" - } - ] - }, - { - "rsEventName": "Order Complete", - "hubspotEventName": "pedummy-hubId_rs_hub_chair", - "eventProperties": [ - { - "from": "firstName", - "to": "first_name" - }, - { - "from": "lastName", - "to": "last_name" - } - ] - } - ], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Hubspot", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "HS", - "displayName": "Hubspot", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "testhubspot@email.com", - "firstname": "Test Hubspot22", - "anonymousId": "4444" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "", - "referrer": "", - "search": "", - "title": "", - "url": "" - } - }, - "type": "identify", - "messageId": "50360b9c-ea8d-409c-b672-c9230f91cce5", - "originalTimestamp": "2019-10-15T09:35:31.288Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "metadata": { - "jobId": 4 - }, - "destination": { - "Config": { - "authorizationType": "newPrivateAppApi", - "accessToken": "dummy-access-token", - "hubID": "dummy-hubId", - "apiKey": "dummy-apikey", - "apiVersion": "newApi", - "lookupField": "email", - "hubspotEvents": [ - { - "rsEventName": "Purchase", - "hubspotEventName": "pedummy-hubId_rs_hub_test", - "eventProperties": [ - { - "from": "Revenue", - "to": "value" - }, - { - "from": "Price", - "to": "cost" - } - ] - }, - { - "rsEventName": "Order Complete", - "hubspotEventName": "pedummy-hubId_rs_hub_chair", - "eventProperties": [ - { - "from": "firstName", - "to": "first_name" - }, - { - "from": "lastName", - "to": "last_name" - } - ] - } - ], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Hubspot", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "HS", - "displayName": "Hubspot", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "testhubspot@email.com", - "firstname": "Test Hubspot44", - "anonymousId": "4444" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "", - "referrer": "", - "search": "", - "title": "", - "url": "" - } - }, - "type": "identify", - "messageId": "50360b9c-ea8d-409c-b672-c9230f91cce5", - "originalTimestamp": "2019-10-15T09:35:31.288Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "metadata": { - "jobId": 5 - }, - "destination": { - "Config": { - "authorizationType": "newPrivateAppApi", - "accessToken": "dummy-access-token", - "hubID": "dummy-hubId", - "apiKey": "dummy-apikey", - "apiVersion": "newApi", - "lookupField": "email", - "hubspotEvents": [ - { - "rsEventName": "Purchase", - "hubspotEventName": "pedummy-hubId_rs_hub_test", - "eventProperties": [ - { - "from": "Revenue", - "to": "value" - }, - { - "from": "Price", - "to": "cost" - } - ] - }, - { - "rsEventName": "Order Complete", - "hubspotEventName": "pedummy-hubId_rs_hub_chair", - "eventProperties": [ - { - "from": "firstName", - "to": "first_name" - }, - { - "from": "lastName", - "to": "last_name" - } - ] - } - ], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Hubspot", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "HS", - "displayName": "Hubspot", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - } -] diff --git a/test/__tests__/data/hs_router_input_legacy.json b/test/__tests__/data/hs_router_input_legacy.json deleted file mode 100644 index 022aba7315..0000000000 --- a/test/__tests__/data/hs_router_input_legacy.json +++ /dev/null @@ -1,281 +0,0 @@ -[ - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "testhubspot1@email.com", - "firstname": "Test Hubspot1", - "anonymousId": "1111" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "", - "referrer": "", - "search": "", - "title": "", - "url": "" - } - }, - "type": "identify", - "messageId": "50360b9c-ea8d-409c-b672-c9230f91cce5", - "originalTimestamp": "2019-10-15T09:35:31.288Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "metadata": { - "jobId": 1 - }, - "destination": { - "Config": { - "apiKey": "dummy-apikey", - "hubID": "dummy-hubId" - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Hubspot", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "HS", - "displayName": "Hubspot", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "testhubspot2@email.com", - "firstname": "Test Hubspot2" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "type": "track", - "messageId": "08829772-d991-427c-b976-b4c4f4430b4e", - "originalTimestamp": "2019-10-15T09:35:31.291Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "event": "test track event HS", - "properties": { - "user_actual_role": "system_admin, system_user", - "user_actual_id": 12345 - }, - "sentAt": "2019-10-14T11:15:53.296Z" - }, - "metadata": { - "jobId": 2 - }, - "destination": { - "Config": { - "apiKey": "dummy-apikey", - "hubID": "dummy-hubId" - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Hubspot", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "HS", - "displayName": "Hubspot", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - }, - { - "message": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.hubapi.com/contacts/v1/contact/createOrUpdate/email/testhubspot2@email.com", - "headers": { - "Content-Type": "application/json" - }, - "userId": "00000000000000000000000000", - "params": { - "hapikey": "dummy-apikey" - }, - "body": { - "JSON": { - "properties": [ - { - "property": "email", - "value": "testhubspot3@email.com" - }, - { - "property": "firstname", - "value": "Test Hubspot3" - } - ] - }, - "XML": {}, - "FORM": {} - }, - "files": {}, - "statusCode": 200 - }, - "metadata": { - "jobId": 3 - }, - "destination": { - "Config": { - "apiKey": "dummy-apikey", - "hubID": "dummy-hubId" - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Hubspot", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "HS", - "displayName": "Hubspot", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "testhubspot4@email.com", - "firstname": "Test Hubspot4", - "anonymousId": "4444" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "", - "referrer": "", - "search": "", - "title": "", - "url": "" - } - }, - "type": "identify", - "messageId": "50360b9c-ea8d-409c-b672-c9230f91cce5", - "originalTimestamp": "2019-10-15T09:35:31.288Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "metadata": { - "jobId": 4 - }, - "destination": { - "Config": { - "apiKey": "rate-limit-id", - "hubID": "dummy-hubId" - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Hubspot", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "HS", - "displayName": "Hubspot", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - } -] diff --git a/test/__tests__/data/hs_router_legacy_rETL_input.json b/test/__tests__/data/hs_router_legacy_rETL_input.json deleted file mode 100644 index 6bba7d72de..0000000000 --- a/test/__tests__/data/hs_router_legacy_rETL_input.json +++ /dev/null @@ -1,130 +0,0 @@ -[ - { - "message": { - "channel": "web", - "context": { - "mappedToDestination": true, - "externalId": [ - { - "identifierType": "email", - "id": "testhubspot2@email.com", - "type": "HS-lead" - } - ], - "sources": { - "job_id": "24c5HJxHomh6YCngEOCgjS5r1KX/Syncher", - "task_id": "vw_rs_mailchimp_mocked_hg_data", - "version": "v1.8.1", - "batch_id": "f252c69d-c40d-450e-bcd2-2cf26cb62762", - "job_run_id": "c8el40l6e87v0c4hkbl0", - "task_run_id": "c8el40l6e87v0c4hkblg" - } - }, - "type": "identify", - "traits": { - "firstname": "Test Hubspot", - "anonymousId": "12345", - "country": "India" - }, - "messageId": "50360b9c-ea8d-409c-b672-c9230f91cce5", - "originalTimestamp": "2019-10-15T09:35:31.288Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "apiKey": "dummy-apikey", - "hubID": "dummy-hubId" - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Hubspot", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "HS", - "displayName": "Hubspot", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - }, - "metadata": { - "jobId": 2 - } - }, - { - "message": { - "channel": "web", - "context": { - "mappedToDestination": true, - "externalId": [ - { - "identifierType": "email", - "id": "testhubspot@email.com", - "type": "HS-lead" - } - ], - "sources": { - "job_id": "24c5HJxHomh6YCngEOCgjS5r1KX/Syncher", - "task_id": "vw_rs_mailchimp_mocked_hg_data", - "version": "v1.8.1", - "batch_id": "f252c69d-c40d-450e-bcd2-2cf26cb62762", - "job_run_id": "c8el40l6e87v0c4hkbl0", - "task_run_id": "c8el40l6e87v0c4hkblg" - } - }, - "type": "identify", - "traits": { - "firstname": "Test Hubspot 1", - "anonymousId": "123451", - "country": "India 1" - }, - "messageId": "50360b9c-ea8d-409c-b672-c9230f91cce5", - "originalTimestamp": "2019-10-15T09:35:31.288Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "apiKey": "dummy-apikey", - "hubID": "dummy-hubId" - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Hubspot", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "HS", - "displayName": "Hubspot", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - }, - "metadata": { - "jobId": 3 - } - } -] diff --git a/test/__tests__/data/hs_router_legacy_rETL_output.json b/test/__tests__/data/hs_router_legacy_rETL_output.json deleted file mode 100644 index dcd3ab91b1..0000000000 --- a/test/__tests__/data/hs_router_legacy_rETL_output.json +++ /dev/null @@ -1,129 +0,0 @@ -[ - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.hubapi.com/crm/v3/objects/lead/batch/create", - "headers": { - "Content-Type": "application/json" - }, - "params": { - "hapikey": "dummy-apikey" - }, - "body": { - "JSON": { - "inputs": [ - { - "properties": { - "firstname": "Test Hubspot 1", - "anonymousId": "123451", - "country": "India 1", - "email": "testhubspot@email.com" - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "jobId": 3 - } - ], - "batched": true, - "statusCode": 200, - "destination": { - "Config": { - "apiKey": "dummy-apikey", - "hubID": "dummy-hubId" - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Hubspot", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "HS", - "displayName": "Hubspot", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - }, - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.hubapi.com/crm/v3/objects/lead/batch/update", - "headers": { - "Content-Type": "application/json" - }, - "params": { - "hapikey": "dummy-apikey" - }, - "body": { - "JSON": { - "inputs": [ - { - "properties": { - "firstname": "Test Hubspot", - "anonymousId": "12345", - "country": "India", - "email": "testhubspot2@email.com" - }, - "id": "103605" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "jobId": 2 - } - ], - "batched": true, - "statusCode": 200, - "destination": { - "Config": { - "apiKey": "dummy-apikey", - "hubID": "dummy-hubId" - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Hubspot", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "HS", - "displayName": "Hubspot", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - } -] diff --git a/test/__tests__/data/hs_router_output.json b/test/__tests__/data/hs_router_output.json deleted file mode 100644 index bd0045e7e6..0000000000 --- a/test/__tests__/data/hs_router_output.json +++ /dev/null @@ -1,321 +0,0 @@ -[ - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.hubapi.com/crm/v3/objects/contacts/batch/create", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer dummy-access-token" - }, - "params": {}, - "body": { - "JSON": { - "inputs": [ - { - "properties": { - "email": "noname@email.com", - "firstname": "Test Hubspot44" - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "jobId": 1 - }, - { - "jobId": 2 - } - ], - "batched": true, - "statusCode": 200, - "destination": { - "Config": { - "authorizationType": "newPrivateAppApi", - "accessToken": "dummy-access-token", - "hubID": "dummy-hubId", - "apiKey": "dummy-apikey", - "apiVersion": "newApi", - "lookupField": "email", - "hubspotEvents": [ - { - "rsEventName": "Purchase", - "hubspotEventName": "pedummy-hubId_rs_hub_test", - "eventProperties": [ - { - "from": "Revenue", - "to": "value" - }, - { - "from": "Price", - "to": "cost" - } - ] - }, - { - "rsEventName": "Order Complete", - "hubspotEventName": "pedummy-hubId_rs_hub_chair", - "eventProperties": [ - { - "from": "firstName", - "to": "first_name" - }, - { - "from": "lastName", - "to": "last_name" - } - ] - } - ], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Hubspot", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "HS", - "displayName": "Hubspot", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - }, - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.hubapi.com/crm/v3/objects/contacts/batch/update", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer dummy-access-token" - }, - "params": {}, - "body": { - "JSON": { - "inputs": [ - { - "id": "103604", - "properties": { - "email": "testhubspot@email.com", - "firstname": "Test Hubspot44" - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "jobId": 4 - }, - { - "jobId": 5 - } - ], - "batched": true, - "statusCode": 200, - "destination": { - "Config": { - "authorizationType": "newPrivateAppApi", - "accessToken": "dummy-access-token", - "hubID": "dummy-hubId", - "apiKey": "dummy-apikey", - "apiVersion": "newApi", - "lookupField": "email", - "hubspotEvents": [ - { - "rsEventName": "Purchase", - "hubspotEventName": "pedummy-hubId_rs_hub_test", - "eventProperties": [ - { - "from": "Revenue", - "to": "value" - }, - { - "from": "Price", - "to": "cost" - } - ] - }, - { - "rsEventName": "Order Complete", - "hubspotEventName": "pedummy-hubId_rs_hub_chair", - "eventProperties": [ - { - "from": "firstName", - "to": "first_name" - }, - { - "from": "lastName", - "to": "last_name" - } - ] - } - ], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Hubspot", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "HS", - "displayName": "Hubspot", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - }, - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.hubapi.com/events/v3/send", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer dummy-access-token" - }, - "params": {}, - "body": { - "JSON": { - "email": "osvaldocostaferreira98@gmail.com", - "eventName": "pedummy-hubId_rs_hub_test", - "properties": { - "value": "name1" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "jobId": 3 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "authorizationType": "newPrivateAppApi", - "accessToken": "dummy-access-token", - "hubID": "dummy-hubId", - "apiKey": "dummy-apikey", - "apiVersion": "newApi", - "lookupField": "email", - "hubspotEvents": [ - { - "rsEventName": "Purchase", - "hubspotEventName": "pedummy-hubId_rs_hub_test", - "eventProperties": [ - { - "from": "Revenue", - "to": "value" - }, - { - "from": "Price", - "to": "cost" - } - ] - }, - { - "rsEventName": "Order Complete", - "hubspotEventName": "pedummy-hubId_rs_hub_chair", - "eventProperties": [ - { - "from": "firstName", - "to": "first_name" - }, - { - "from": "lastName", - "to": "last_name" - } - ] - } - ], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Hubspot", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "HS", - "displayName": "Hubspot", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - } -] diff --git a/test/__tests__/data/hs_router_output_legacy.json b/test/__tests__/data/hs_router_output_legacy.json deleted file mode 100644 index 7ce945a24a..0000000000 --- a/test/__tests__/data/hs_router_output_legacy.json +++ /dev/null @@ -1,117 +0,0 @@ -[ - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.hubapi.com/contacts/v1/contact/batch/", - "headers": { - "Content-Type": "application/json" - }, - "params": { - "hapikey": "dummy-apikey" - }, - "body": { - "JSON": {}, - "JSON_ARRAY": { - "batch": "[{\"email\":\"testhubspot3@email.com\",\"properties\":[{\"property\":\"firstname\",\"value\":\"Test Hubspot3\"}]},{\"email\":\"testhubspot1@email.com\",\"properties\":[{\"property\":\"firstname\",\"value\":\"Test Hubspot1\"}]},{\"email\":\"testhubspot4@email.com\",\"properties\":[{\"property\":\"firstname\",\"value\":\"Test Hubspot4\"}]}]" - }, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "jobId": 3 - }, - { - "jobId": 1 - }, - { - "jobId": 4 - } - ], - "batched": true, - "statusCode": 200, - "destination": { - "Config": { - "apiKey": "dummy-apikey", - "hubID": "dummy-hubId" - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Hubspot", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "HS", - "displayName": "Hubspot", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - }, - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "GET", - "endpoint": "https://track.hubspot.com/v1/event", - "headers": { - "Content-Type": "application/json" - }, - "params": { - "_a": "dummy-hubId", - "_n": "test track event HS", - "email": "testhubspot2@email.com", - "firstname": "Test Hubspot2" - }, - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "jobId": 2 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "apiKey": "dummy-apikey", - "hubID": "dummy-hubId" - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Hubspot", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "HS", - "displayName": "Hubspot", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - } -] diff --git a/test/__tests__/data/hs_router_rETL_input.json b/test/__tests__/data/hs_router_rETL_input.json deleted file mode 100644 index 3e855855b4..0000000000 --- a/test/__tests__/data/hs_router_rETL_input.json +++ /dev/null @@ -1,332 +0,0 @@ -[ - { - "message": { - "channel": "web", - "context": { - "mappedToDestination": true, - "externalId": [ - { - "identifierType": "email", - "id": "testhubspot2@email.com", - "type": "HS-lead" - } - ], - "sources": { - "job_id": "24c5HJxHomh6YCngEOCgjS5r1KX/Syncher", - "task_id": "vw_rs_mailchimp_mocked_hg_data", - "version": "v1.8.1", - "batch_id": "f252c69d-c40d-450e-bcd2-2cf26cb62762", - "job_run_id": "c8el40l6e87v0c4hkbl0", - "task_run_id": "c8el40l6e87v0c4hkblg" - } - }, - "type": "identify", - "traits": { - "firstname": "Test Hubspot", - "anonymousId": "12345", - "country": "India" - }, - "messageId": "50360b9c-ea8d-409c-b672-c9230f91cce5", - "originalTimestamp": "2019-10-15T09:35:31.288Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "authorizationType": "newPrivateAppApi", - "accessToken": "dummy-access-token", - "hubID": "dummy-hubId", - "apiKey": "dummy-apikey", - "apiVersion": "newApi", - "lookupField": "lookupField", - "hubspotEvents": [ - { - "rsEventName": "Purchase", - "hubspotEventName": "pedummy-hubId_rs_hub_test", - "eventProperties": [ - { - "from": "Revenue", - "to": "value" - }, - { - "from": "Price", - "to": "cost" - } - ] - }, - { - "rsEventName": "Order Complete", - "hubspotEventName": "pedummy-hubId_rs_hub_chair", - "eventProperties": [ - { - "from": "firstName", - "to": "first_name" - }, - { - "from": "lastName", - "to": "last_name" - } - ] - } - ], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Hubspot", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "HS", - "displayName": "Hubspot", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - }, - "metadata": { - "jobId": 2 - } - }, - { - "message": { - "channel": "web", - "context": { - "mappedToDestination": true, - "externalId": [ - { - "identifierType": "email", - "id": "testhubspot@email.com", - "type": "HS-lead" - } - ], - "sources": { - "job_id": "24c5HJxHomh6YCngEOCgjS5r1KX/Syncher", - "task_id": "vw_rs_mailchimp_mocked_hg_data", - "version": "v1.8.1", - "batch_id": "f252c69d-c40d-450e-bcd2-2cf26cb62762", - "job_run_id": "c8el40l6e87v0c4hkbl0", - "task_run_id": "c8el40l6e87v0c4hkblg" - } - }, - "type": "identify", - "traits": { - "firstname": "Test Hubspot 1", - "anonymousId": "123451", - "country": "India 1" - }, - "messageId": "50360b9c-ea8d-409c-b672-c9230f91cce5", - "originalTimestamp": "2019-10-15T09:35:31.288Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "authorizationType": "newPrivateAppApi", - "accessToken": "dummy-access-token", - "hubID": "dummy-hubId", - "apiKey": "dummy-apikey", - "apiVersion": "newApi", - "lookupField": "lookupField", - "hubspotEvents": [ - { - "rsEventName": "Purchase", - "hubspotEventName": "pedummy-hubId_rs_hub_test", - "eventProperties": [ - { - "from": "Revenue", - "to": "value" - }, - { - "from": "Price", - "to": "cost" - } - ] - }, - { - "rsEventName": "Order Complete", - "hubspotEventName": "pedummy-hubId_rs_hub_chair", - "eventProperties": [ - { - "from": "firstName", - "to": "first_name" - }, - { - "from": "lastName", - "to": "last_name" - } - ] - } - ], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Hubspot", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "HS", - "displayName": "Hubspot", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - }, - "metadata": { - "jobId": 3 - } - }, - { - "message": { - "channel": "web", - "context": { - "mappedToDestination": true, - "externalId": [ - { - "identifierType": "email", - "id": "testhubspotdatetime@email.com", - "type": "HS-lead" - } - ], - "sources": { - "job_id": "24c5HJxHomh6YCngEOCgjS5r1KX/Syncher", - "task_id": "vw_rs_mailchimp_mocked_hg_data", - "version": "v1.8.1", - "batch_id": "f252c69d-c40d-450e-bcd2-2cf26cb62762", - "job_run_id": "c8el40l6e87v0c4hkbl0", - "task_run_id": "c8el40l6e87v0c4hkblg" - } - }, - "type": "identify", - "traits": { - "firstname": "Test Hubspot", - "anonymousId": "123451", - "country": "India", - "date_submitted": "2023-09-25T17:31:04.128251Z", - "date_created": "2023-03-30T01:02:03.05Z", - "date_closed": "2023-10-18T04:38:59.229347Z" - }, - "messageId": "50360b9c-ea8d-409c-b672-c9230f91cce5", - "originalTimestamp": "2019-10-15T09:35:31.288Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "authorizationType": "newPrivateAppApi", - "accessToken": "dummy-access-token", - "hubID": "dummy-hubId", - "apiKey": "dummy-apikey", - "apiVersion": "newApi", - "lookupField": "lookupField", - "hubspotEvents": [ - { - "rsEventName": "Purchase", - "hubspotEventName": "pedummy-hubId_rs_hub_test", - "eventProperties": [ - { - "from": "Revenue", - "to": "value" - }, - { - "from": "Price", - "to": "cost" - } - ] - }, - { - "rsEventName": "Order Complete", - "hubspotEventName": "pedummy-hubId_rs_hub_chair", - "eventProperties": [ - { - "from": "firstName", - "to": "first_name" - }, - { - "from": "lastName", - "to": "last_name" - } - ] - } - ], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Hubspot", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "HS", - "displayName": "Hubspot", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - }, - "metadata": { - "jobId": 4 - } - } -] diff --git a/test/__tests__/data/hs_router_rETL_output.json b/test/__tests__/data/hs_router_rETL_output.json deleted file mode 100644 index c20694cdf4..0000000000 --- a/test/__tests__/data/hs_router_rETL_output.json +++ /dev/null @@ -1,231 +0,0 @@ -[ - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.hubapi.com/crm/v3/objects/lead/batch/create", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer dummy-access-token" - }, - "params": {}, - "body": { - "JSON": { - "inputs": [ - { - "properties": { - "firstname": "Test Hubspot 1", - "anonymousId": "123451", - "country": "India 1", - "email": "testhubspot@email.com" - } - }, - { - "properties": { - "firstname": "Test Hubspot", - "anonymousId": "123451", - "country": "India", - "email": "testhubspotdatetime@email.com", - "date_closed": 1697587200000, - "date_created": 1680134400000, - "date_submitted": 1695600000000 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "jobId": 3 - }, - { - "jobId": 4 - } - ], - "batched": true, - "statusCode": 200, - "destination": { - "Config": { - "authorizationType": "newPrivateAppApi", - "accessToken": "dummy-access-token", - "hubID": "dummy-hubId", - "apiKey": "dummy-apikey", - "apiVersion": "newApi", - "lookupField": "lookupField", - "hubspotEvents": [ - { - "rsEventName": "Purchase", - "hubspotEventName": "pedummy-hubId_rs_hub_test", - "eventProperties": [ - { - "from": "Revenue", - "to": "value" - }, - { - "from": "Price", - "to": "cost" - } - ] - }, - { - "rsEventName": "Order Complete", - "hubspotEventName": "pedummy-hubId_rs_hub_chair", - "eventProperties": [ - { - "from": "firstName", - "to": "first_name" - }, - { - "from": "lastName", - "to": "last_name" - } - ] - } - ], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Hubspot", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "HS", - "displayName": "Hubspot", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - }, - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.hubapi.com/crm/v3/objects/lead/batch/update", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer dummy-access-token" - }, - "params": {}, - "body": { - "JSON": { - "inputs": [ - { - "properties": { - "firstname": "Test Hubspot", - "anonymousId": "12345", - "country": "India", - "email": "testhubspot2@email.com" - }, - "id": "103605" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "jobId": 2 - } - ], - "batched": true, - "statusCode": 200, - "destination": { - "Config": { - "authorizationType": "newPrivateAppApi", - "accessToken": "dummy-access-token", - "hubID": "dummy-hubId", - "apiKey": "dummy-apikey", - "apiVersion": "newApi", - "lookupField": "lookupField", - "hubspotEvents": [ - { - "rsEventName": "Purchase", - "hubspotEventName": "pedummy-hubId_rs_hub_test", - "eventProperties": [ - { - "from": "Revenue", - "to": "value" - }, - { - "from": "Price", - "to": "cost" - } - ] - }, - { - "rsEventName": "Order Complete", - "hubspotEventName": "pedummy-hubId_rs_hub_chair", - "eventProperties": [ - { - "from": "firstName", - "to": "first_name" - }, - { - "from": "lastName", - "to": "last_name" - } - ] - } - ], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Hubspot", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "HS", - "displayName": "Hubspot", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - } -] diff --git a/test/__tests__/data/wootric.json b/test/__tests__/data/wootric.json deleted file mode 100644 index c7c63694f1..0000000000 --- a/test/__tests__/data/wootric.json +++ /dev/null @@ -1,1467 +0,0 @@ -[ - { - "description": "Wrong Account Token Passed", - "input": { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken12" - }, - "ID": "wootric-1234" - }, - "message": { - "type": "identify", - "sentAt": "2022-01-20T13:39:21.033Z", - "userId": "dummyId2", - "channel": "web", - "context": {}, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - "output": { - "statusCode": 400, - "error": "Access token could not be generated due to {\"error\":\"Not found\",\"status\":404}" - } - }, - { - "description": "Identify call for creating user", - "input": { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "wootric-1234" - }, - "message": { - "type": "identify", - "sentAt": "2022-01-20T13:39:21.033Z", - "userId": "dummyId2", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.2.20", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - }, - "locale": "en-US", - "screen": { - "width": 1440, - "height": 900, - "density": 2, - "innerWidth": 536, - "innerHeight": 689 - }, - "traits": { - "city": "Bangalore", - "name": "Dummy User 2", - "email": "dummyUser2@gmail.com", - "phone": "+19123456777", - "title": "SDE", - "gender": "Male", - "company": "Rudderstack", - "createdAt": "2021-01-20T13:39:21.032Z" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.2.20" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.wootric.com/v1/end_users", - "headers": { - "Content-Type": "application/x-www-form-urlencoded", - "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" - }, - "params": {}, - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": { - "email": "dummyUser2@gmail.com", - "phone_number": "+19123456777", - "last_surveyed": "1642685961", - "external_created_at": "1611149961", - "external_id": "dummyId2", - "properties[city]": "Bangalore", - "properties[name]": "Dummy User 2", - "properties[title]": "SDE", - "properties[gender]": "Male", - "properties[company]": "Rudderstack" - } - }, - "files": {} - } - }, - { - "description": "Identify call for creating user without-sending email and sending phone number", - "input": { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "wootric-1234" - }, - "message": { - "type": "identify", - "sentAt": "2022-01-20T13:39:21.033Z", - "userId": "dummyId2", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.2.20", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - }, - "locale": "en-US", - "screen": { - "width": 1440, - "height": 900, - "density": 2, - "innerWidth": 536, - "innerHeight": 689 - }, - "traits": { - "city": "Bangalore", - "name": "Dummy User 2", - "phone": "+19123456777", - "title": "SDE", - "gender": "Male", - "company": "Rudderstack", - "createdAt": "2021-01-20T13:39:21.032Z" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.2.20" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.wootric.com/v1/end_users", - "headers": { - "Content-Type": "application/x-www-form-urlencoded", - "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" - }, - "params": {}, - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": { - "phone_number": "+19123456777", - "last_surveyed": "1642685961", - "external_created_at": "1611149961", - "external_id": "dummyId2", - "properties[city]": "Bangalore", - "properties[name]": "Dummy User 2", - "properties[title]": "SDE", - "properties[gender]": "Male", - "properties[company]": "Rudderstack" - } - }, - "files": {} - } - }, - { - "description": "Identify call for creating user without-sending phone number and sending email", - "input": { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "wootric-1234" - }, - "message": { - "type": "identify", - "sentAt": "2022-01-20T13:39:21.033Z", - "userId": "dummyId2", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.2.20", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - }, - "locale": "en-US", - "screen": { - "width": 1440, - "height": 900, - "density": 2, - "innerWidth": 536, - "innerHeight": 689 - }, - "traits": { - "email": "dummyUser2@gmail.com", - "city": "Bangalore", - "name": "Dummy User 2", - "title": "SDE", - "gender": "Male", - "company": "Rudderstack", - "createdAt": "2021-01-20T13:39:21.032Z" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.2.20" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.wootric.com/v1/end_users", - "headers": { - "Content-Type": "application/x-www-form-urlencoded", - "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" - }, - "params": {}, - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": { - "email": "dummyUser2@gmail.com", - "last_surveyed": "1642685961", - "external_created_at": "1611149961", - "external_id": "dummyId2", - "properties[city]": "Bangalore", - "properties[name]": "Dummy User 2", - "properties[title]": "SDE", - "properties[gender]": "Male", - "properties[company]": "Rudderstack" - } - }, - "files": {} - } - }, - { - "description": "Identify call for creating user without sending traits", - "input": { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "wootric-1234" - }, - "message": { - "type": "identify", - "sentAt": "2022-01-20T13:39:21.033Z", - "userId": "dummyId2", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.2.20", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - }, - "locale": "en-US", - "screen": { - "width": 1440, - "height": 900, - "density": 2, - "innerWidth": 536, - "innerHeight": 689 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.2.20" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - "output": { - "statusCode": 400, - "error": "email/phone number are missing. At least one parameter must be provided", - "statTags": { - "destination": "wootric", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "Identify call for creating user without-sending (email and phone number)", - "input": { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "wootric-1234" - }, - "message": { - "type": "identify", - "sentAt": "2022-01-20T13:39:21.033Z", - "userId": "dummyId2", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.2.20", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - }, - "locale": "en-US", - "screen": { - "width": 1440, - "height": 900, - "density": 2, - "innerWidth": 536, - "innerHeight": 689 - }, - "traits": { - "city": "Mumbai", - "name": "Dummy User 1", - "title": "SDE", - "gender": "Male", - "company": "Rudderstack", - "createdAt": "2021-01-20T13:39:21.032Z" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.2.20" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - "output": { - "statusCode": 400, - "error": "email/phone number are missing. At least one parameter must be provided", - "statTags": { - "destination": "wootric", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "Identify call for updating existing user with wootric end user id", - "input": { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "wootric-1234" - }, - "message": { - "type": "identify", - "sentAt": "2022-01-20T13:39:21.033Z", - "userId": "dummyId1", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.2.20", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - }, - "locale": "en-US", - "screen": { - "width": 1440, - "height": 900, - "density": 2, - "innerWidth": 536, - "innerHeight": 689 - }, - "traits": { - "title": "VP", - "gender": "Male" - }, - "externalId": [ - { - "type": "wootricEndUserId", - "id": "490635419" - } - ], - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.2.20" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "PUT", - "endpoint": "https://api.wootric.com/v1/end_users/490635419", - "headers": { - "Content-Type": "application/x-www-form-urlencoded", - "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" - }, - "params": {}, - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": { - "last_surveyed": "1642685961", - "properties[Department]": "Marketing", - "properties[product_plan]": "Web", - "properties[revenue amount]": "5000", - "properties[title]": "VP", - "properties[gender]": "Male" - } - }, - "files": {} - } - }, - { - "description": "Identify call for updating existing user with (wootric externalId/ rudderstack userId)", - "input": { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "wootric-1234" - }, - "message": { - "type": "identify", - "sentAt": "2022-01-20T13:39:21.033Z", - "userId": "dummyId1", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.2.20", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - }, - "locale": "en-US", - "screen": { - "width": 1440, - "height": 900, - "density": 2, - "innerWidth": 536, - "innerHeight": 689 - }, - "traits": { - "title": "VP", - "gender": "Male" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.2.20" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "PUT", - "endpoint": "https://api.wootric.com/v1/end_users/486438462", - "headers": { - "Content-Type": "application/x-www-form-urlencoded", - "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" - }, - "params": {}, - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": { - "last_surveyed": "1642685961", - "properties[title]": "VP", - "properties[gender]": "Male", - "properties[city]": "Mumbai", - "properties[name]": "Dummy User 1", - "properties[company]": "Rudderstack" - } - }, - "files": {} - } - }, - { - "description": "Identify call for updating user traits/properties", - "input": { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "wootric-1234" - }, - "message": { - "type": "identify", - "sentAt": "2022-01-20T13:39:21.033Z", - "userId": "dummyId1", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.2.20", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - }, - "locale": "en-US", - "screen": { - "width": 1440, - "height": 900, - "density": 2, - "innerWidth": 536, - "innerHeight": 689 - }, - "traits": { - "city": "Udaipur", - "name": "Dummy User 1 New", - "title": "SDE-2", - "gender": "Male", - "company": "Rudderstack" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.2.20" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "PUT", - "endpoint": "https://api.wootric.com/v1/end_users/486438462", - "headers": { - "Content-Type": "application/x-www-form-urlencoded", - "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" - }, - "params": {}, - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": { - "last_surveyed": "1642685961", - "properties[city]": "Udaipur", - "properties[name]": "Dummy User 1 New", - "properties[title]": "SDE-2", - "properties[gender]": "Male", - "properties[company]": "Rudderstack" - } - }, - "files": {} - } - }, - { - "description": "Track call with existing userId and event type as create response", - "input": { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "wootric-1234" - }, - "message": { - "type": "track", - "sentAt": "2022-01-20T13:39:21.033Z", - "userId": "dummyId1", - "channel": "web", - "properties": { - "feedbackScore": 7, - "feedbackText": "Simple, Easy to use, Reliable, Affordable Product" - }, - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.2.20", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - }, - "locale": "en-US", - "ip": "0.0.0.0", - "screen": { - "width": 1440, - "height": 900, - "density": 2, - "innerWidth": 536, - "innerHeight": 689 - }, - "traits": { - "city": "Mumbai", - "name": "Dummy User 1", - "email": "dummyUser1@gmail.com", - "title": "SDE", - "gender": "Male", - "company": "Rudderstack", - "createdAt": "2021-01-20T13:39:21.032Z" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.2.20" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true, - "Wootric": { - "eventType": "create response" - } - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.wootric.com/v1/end_users/486438462/responses", - "headers": { - "Content-Type": "application/x-www-form-urlencoded", - "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" - }, - "params": {}, - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": { - "score": 7, - "ip_address": "0.0.0.0", - "origin_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "text": "Simple, Easy to use, Reliable, Affordable Product", - "created_at": "1611149961", - "end_user[properties][city]": "Mumbai", - "end_user[properties][name]": "Dummy User 1", - "end_user[properties][title]": "SDE", - "end_user[properties][gender]": "Male", - "end_user[properties][company]": "Rudderstack" - } - }, - "files": {} - } - }, - { - "description": "Track call with non-existing userId", - "input": { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "wootric-1234" - }, - "message": { - "type": "track", - "sentAt": "2022-01-20T13:39:21.033Z", - "userId": "dummyId2", - "channel": "web", - "properties": { - "feedbackScore": 7, - "feedbackText": "Simple, Easy to use, Reliable, Affordable Product" - }, - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.2.20", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - }, - "locale": "en-US", - "ip": "0.0.0.0", - "screen": { - "width": 1440, - "height": 900, - "density": 2, - "innerWidth": 536, - "innerHeight": 689 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.2.20" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true, - "Wootric": { - "eventType": "create response" - } - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - "output": { - "statusCode": 400, - "error": "No user found with userId : dummyId2", - "statTags": { - "destination": "wootric", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "Track call with non-existing wootricEndUserId", - "input": { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "wootric-1234" - }, - "message": { - "type": "track", - "sentAt": "2022-01-20T13:39:21.033Z", - "channel": "web", - "properties": { - "feedbackScore": 7, - "feedbackText": "Simple, Easy to use, Reliable, Affordable Product" - }, - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.2.20", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - }, - "locale": "en-US", - "ip": "0.0.0.0", - "screen": { - "width": 1440, - "height": 900, - "density": 2, - "innerWidth": 536, - "innerHeight": 689 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.2.20" - }, - "externalId": [{ "type": "wootricEndUserId", "id": "12345" }], - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true, - "Wootric": { - "eventType": "create response" - } - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - "output": { - "statusCode": 400, - "error": "No user found with wootric end user Id : 12345", - "statTags": { - "destination": "wootric", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "Track call with existing userId and event type as create response and score out of bound", - "input": { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "wootric-1234" - }, - "message": { - "type": "track", - "sentAt": "2022-01-20T13:39:21.033Z", - "userId": "dummyId1", - "channel": "web", - "properties": { - "feedbackScore": 12, - "feedbackText": "Simple, Easy to use, Reliable, Affordable Product" - }, - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.2.20", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - }, - "locale": "en-US", - "ip": "0.0.0.0", - "screen": { - "width": 1440, - "height": 900, - "density": 2, - "innerWidth": 536, - "innerHeight": 689 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.2.20" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true, - "Wootric": { - "eventType": "create response" - } - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - "output": { - "statusCode": 400, - "error": "Invalid Score", - "statTags": { - "destination": "wootric", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "Track call with existing userId and event type as create decline", - "input": { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "wootric-1234" - }, - "message": { - "type": "track", - "sentAt": "2022-01-20T13:39:21.033Z", - "userId": "dummyId1", - "channel": "web", - "properties": { - "feedbackScore": 9, - "feedbackText": "Simple, Easy to use, Reliable, Affordable Product" - }, - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.2.20", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - }, - "locale": "en-US", - "screen": { - "width": 1440, - "height": 900, - "density": 2, - "innerWidth": 536, - "innerHeight": 689 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.2.20" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true, - "Wootric": { - "eventType": "create decline" - } - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.wootric.com/v1/end_users/486438462/declines", - "headers": { - "Content-Type": "application/x-www-form-urlencoded", - "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" - }, - "params": {}, - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": { - "origin_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html" - } - }, - "files": {} - } - }, - { - "description": "Track call with non-existing userId and event type as create decline", - "input": { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "wootric-1234" - }, - "message": { - "type": "track", - "sentAt": "2022-01-20T13:39:21.033Z", - "userId": "dummyId2", - "channel": "web", - "properties": { - "feedbackScore": 9, - "feedbackText": "Simple, Easy to use, Reliable, Affordable Product" - }, - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.2.20", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - }, - "locale": "en-US", - "screen": { - "width": 1440, - "height": 900, - "density": 2, - "innerWidth": 536, - "innerHeight": 689 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.2.20" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true, - "Wootric": { - "eventType": "create decline" - } - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - "output": { - "statusCode": 400, - "error": "No user found with userId : dummyId2", - "statTags": { - "destination": "wootric", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "Track call with event type other than create response or decline", - "input": { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "wootric-1234" - }, - "message": { - "type": "track", - "sentAt": "2022-01-20T13:39:21.033Z", - "userId": "dummyId1", - "channel": "web", - "properties": { - "feedbackScore": 7, - "feedbackText": "Simple, Easy to use, Reliable, Affordable Product" - }, - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.2.20", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - }, - "locale": "en-US", - "ip": "0.0.0.0", - "screen": { - "width": 1440, - "height": 900, - "density": 2, - "innerWidth": 536, - "innerHeight": 689 - }, - "traits": { - "city": "Mumbai", - "name": "Dummy User 1", - "email": "dummyUser1@gmail.com", - "phone": "+19123456789", - "title": "SDE", - "gender": "Male", - "company": "Rudderstack", - "createdAt": "2021-01-20T13:39:21.032Z" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.2.20" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true, - "Wootric": { - "eventType": "random" - } - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - "output": { - "statusCode": 400, - "error": "Event Type not supported", - "statTags": { - "destination": "wootric", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "Track call with missing event type in integration object", - "input": { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "wootric-1234" - }, - "message": { - "type": "track", - "sentAt": "2022-01-20T13:39:21.033Z", - "userId": "dummyId1", - "channel": "web", - "properties": { - "feedbackScore": 3, - "feedbackText": "Too Slow!!!" - }, - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.2.20", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - }, - "locale": "en-US", - "ip": "0.0.0.0", - "screen": { - "width": 1440, - "height": 900, - "density": 2, - "innerWidth": 536, - "innerHeight": 689 - }, - "traits": { - "city": "Mumbai", - "name": "Dummy User 1", - "email": "dummyUser1@gmail.com", - "phone": "+19123456789", - "title": "SDE", - "gender": "Male", - "company": "Rudderstack", - "createdAt": "2021-01-20T13:39:21.032Z" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.2.20" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - "output": { - "statusCode": 400, - "error": "Event Type is missing from Integration object", - "statTags": { - "destination": "wootric", - "stage": "transform", - "scope": "exception" - } - } - } -] diff --git a/test/__tests__/data/wootric_router_input.json b/test/__tests__/data/wootric_router_input.json deleted file mode 100644 index 360c07afa5..0000000000 --- a/test/__tests__/data/wootric_router_input.json +++ /dev/null @@ -1,1076 +0,0 @@ -[ - { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" - }, - "metadata": { - "jobId": 1 - }, - "message": { - "type": "identify", - "sentAt": "2022-01-20T13:39:21.033Z", - "userId": "dummyId2", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.2.20", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - }, - "locale": "en-US", - "screen": { - "width": 1440, - "height": 900, - "density": 2, - "innerWidth": 536, - "innerHeight": 689 - }, - "traits": { - "city": "Bangalore", - "name": "Dummy User 2", - "email": "dummyUser2@gmail.com", - "phone": "+19123456777", - "title": "SDE", - "gender": "Male", - "company": "Rudderstack", - "createdAt": "2021-01-20T13:39:21.032Z" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.2.20" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" - }, - "metadata": { - "jobId": 2 - }, - "message": { - "type": "identify", - "sentAt": "2022-01-20T13:39:21.033Z", - "userId": "dummyId2", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.2.20", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - }, - "locale": "en-US", - "screen": { - "width": 1440, - "height": 900, - "density": 2, - "innerWidth": 536, - "innerHeight": 689 - }, - "traits": { - "city": "Bangalore", - "name": "Dummy User 2", - "phone": "+19123456777", - "title": "SDE", - "gender": "Male", - "company": "Rudderstack", - "createdAt": "2021-01-20T13:39:21.032Z" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.2.20" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" - }, - "metadata": { - "jobId": 3 - }, - "message": { - "type": "identify", - "sentAt": "2022-01-20T13:39:21.033Z", - "userId": "dummyId2", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.2.20", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - }, - "locale": "en-US", - "screen": { - "width": 1440, - "height": 900, - "density": 2, - "innerWidth": 536, - "innerHeight": 689 - }, - "traits": { - "email": "dummyUser2@gmail.com", - "city": "Bangalore", - "name": "Dummy User 2", - "title": "SDE", - "gender": "Male", - "company": "Rudderstack", - "createdAt": "2021-01-20T13:39:21.032Z" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.2.20" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" - }, - "metadata": { - "jobId": 5 - }, - "message": { - "type": "identify", - "sentAt": "2022-01-20T13:39:21.033Z", - "userId": "dummyId2", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.2.20", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - }, - "locale": "en-US", - "screen": { - "width": 1440, - "height": 900, - "density": 2, - "innerWidth": 536, - "innerHeight": 689 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.2.20" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" - }, - "metadata": { - "jobId": 6 - }, - "message": { - "type": "identify", - "sentAt": "2022-01-20T13:39:21.033Z", - "userId": "dummyId2", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.2.20", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - }, - "locale": "en-US", - "screen": { - "width": 1440, - "height": 900, - "density": 2, - "innerWidth": 536, - "innerHeight": 689 - }, - "traits": { - "city": "Mumbai", - "name": "Dummy User 1", - "title": "SDE", - "gender": "Male", - "company": "Rudderstack", - "createdAt": "2021-01-20T13:39:21.032Z" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.2.20" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" - }, - "metadata": { - "jobId": 7 - }, - "message": { - "type": "identify", - "sentAt": "2022-01-20T13:39:21.033Z", - "userId": "dummyId1", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.2.20", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - }, - "locale": "en-US", - "screen": { - "width": 1440, - "height": 900, - "density": 2, - "innerWidth": 536, - "innerHeight": 689 - }, - "traits": { - "email": "dummyuser1_01@gmail.com" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.2.20" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" - }, - "metadata": { - "jobId": 8 - }, - "message": { - "type": "identify", - "sentAt": "2022-01-20T13:39:21.033Z", - "userId": "dummyId1", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.2.20", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - }, - "locale": "en-US", - "screen": { - "width": 1440, - "height": 900, - "density": 2, - "innerWidth": 536, - "innerHeight": 689 - }, - "traits": { - "phone": "+19777777778" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.2.20" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" - }, - "metadata": { - "jobId": 9 - }, - "message": { - "type": "identify", - "sentAt": "2022-01-20T13:39:21.033Z", - "userId": "dummyId1", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.2.20", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - }, - "locale": "en-US", - "screen": { - "width": 1440, - "height": 900, - "density": 2, - "innerWidth": 536, - "innerHeight": 689 - }, - "traits": { - "city": "Udaipur", - "name": "Dummy User 1 New", - "title": "SDE-2", - "gender": "Male", - "company": "Rudderstack" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.2.20" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" - }, - "metadata": { - "jobId": 10 - }, - "message": { - "type": "track", - "sentAt": "2022-01-20T13:39:21.033Z", - "userId": "dummyId1", - "channel": "web", - "properties": { - "feedbackScore": 7, - "feedbackText": "Simple, Easy to use, Reliable, Affordable Product" - }, - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.2.20", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - }, - "locale": "en-US", - "ip": "0.0.0.0", - "screen": { - "width": 1440, - "height": 900, - "density": 2, - "innerWidth": 536, - "innerHeight": 689 - }, - "traits": { - "city": "Mumbai", - "name": "Dummy User 1", - "email": "dummyUser1@gmail.com", - "title": "SDE", - "gender": "Male", - "company": "Rudderstack", - "createdAt": "2021-01-20T13:39:21.032Z" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.2.20" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true, - "Wootric": { - "eventType": "create response" - } - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" - }, - "metadata": { - "jobId": 11 - }, - "message": { - "type": "track", - "sentAt": "2022-01-20T13:39:21.033Z", - "userId": "dummyId2", - "channel": "web", - "properties": { - "feedbackScore": 7, - "feedbackText": "Simple, Easy to use, Reliable, Affordable Product" - }, - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.2.20", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - }, - "locale": "en-US", - "ip": "0.0.0.0", - "screen": { - "width": 1440, - "height": 900, - "density": 2, - "innerWidth": 536, - "innerHeight": 689 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.2.20" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true, - "Wootric": { - "eventType": "create response" - } - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" - }, - "metadata": { - "jobId": 12 - }, - "message": { - "type": "track", - "sentAt": "2022-01-20T13:39:21.033Z", - "userId": "dummyId1", - "channel": "web", - "properties": { - "feedbackScore": 12, - "feedbackText": "Simple, Easy to use, Reliable, Affordable Product" - }, - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.2.20", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - }, - "locale": "en-US", - "ip": "0.0.0.0", - "screen": { - "width": 1440, - "height": 900, - "density": 2, - "innerWidth": 536, - "innerHeight": 689 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.2.20" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true, - "Wootric": { - "eventType": "create response" - } - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" - }, - "metadata": { - "jobId": 13 - }, - "message": { - "type": "track", - "sentAt": "2022-01-20T13:39:21.033Z", - "userId": "dummyId1", - "channel": "web", - "properties": { - "feedbackScore": 9, - "feedbackText": "Simple, Easy to use, Reliable, Affordable Product" - }, - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.2.20", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - }, - "locale": "en-US", - "screen": { - "width": 1440, - "height": 900, - "density": 2, - "innerWidth": 536, - "innerHeight": 689 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.2.20" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true, - "Wootric": { - "eventType": "create decline" - } - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" - }, - "metadata": { - "jobId": 14 - }, - "message": { - "type": "track", - "sentAt": "2022-01-20T13:39:21.033Z", - "userId": "dummyId2", - "channel": "web", - "properties": { - "feedbackScore": 9, - "feedbackText": "Simple, Easy to use, Reliable, Affordable Product" - }, - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.2.20", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - }, - "locale": "en-US", - "screen": { - "width": 1440, - "height": 900, - "density": 2, - "innerWidth": 536, - "innerHeight": 689 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.2.20" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true, - "Wootric": { - "eventType": "create decline" - } - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" - }, - "metadata": { - "jobId": 15 - }, - "message": { - "type": "track", - "sentAt": "2022-01-20T13:39:21.033Z", - "userId": "dummyId1", - "channel": "web", - "properties": { - "feedbackScore": 7, - "feedbackText": "Simple, Easy to use, Reliable, Affordable Product" - }, - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.2.20", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - }, - "locale": "en-US", - "ip": "0.0.0.0", - "screen": { - "width": 1440, - "height": 900, - "density": 2, - "innerWidth": 536, - "innerHeight": 689 - }, - "traits": { - "city": "Mumbai", - "name": "Dummy User 1", - "email": "dummyUser1@gmail.com", - "phone": "+19123456789", - "title": "SDE", - "gender": "Male", - "company": "Rudderstack", - "createdAt": "2021-01-20T13:39:21.032Z" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.2.20" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true, - "Wootric": { - "eventType": "random" - } - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" - }, - "metadata": { - "jobId": 16 - }, - "message": { - "type": "track", - "sentAt": "2022-01-20T13:39:21.033Z", - "userId": "dummyId1", - "channel": "web", - "properties": { - "feedbackScore": 3, - "feedbackText": "Too Slow!!!" - }, - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.2.20", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - }, - "locale": "en-US", - "ip": "0.0.0.0", - "screen": { - "width": 1440, - "height": 900, - "density": 2, - "innerWidth": 536, - "innerHeight": 689 - }, - "traits": { - "city": "Mumbai", - "name": "Dummy User 1", - "email": "dummyUser1@gmail.com", - "phone": "+19123456789", - "title": "SDE", - "gender": "Male", - "company": "Rudderstack", - "createdAt": "2021-01-20T13:39:21.032Z" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.2.20" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - } -] diff --git a/test/__tests__/data/wootric_router_output.json b/test/__tests__/data/wootric_router_output.json deleted file mode 100644 index 4d23a783c8..0000000000 --- a/test/__tests__/data/wootric_router_output.json +++ /dev/null @@ -1,493 +0,0 @@ -[ - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.wootric.com/v1/end_users", - "headers": { - "Content-Type": "application/x-www-form-urlencoded", - "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" - }, - "params": {}, - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": { - "email": "dummyUser2@gmail.com", - "phone_number": "+19123456777", - "last_surveyed": "1642685961", - "external_created_at": "1611149961", - "external_id": "dummyId2", - "properties[city]": "Bangalore", - "properties[name]": "Dummy User 2", - "properties[title]": "SDE", - "properties[gender]": "Male", - "properties[company]": "Rudderstack" - } - }, - "files": {} - }, - "metadata": [ - { - "jobId": 1 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG", - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - } - } - }, - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.wootric.com/v1/end_users", - "headers": { - "Content-Type": "application/x-www-form-urlencoded", - "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" - }, - "params": {}, - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": { - "phone_number": "+19123456777", - "last_surveyed": "1642685961", - "external_created_at": "1611149961", - "external_id": "dummyId2", - "properties[city]": "Bangalore", - "properties[name]": "Dummy User 2", - "properties[title]": "SDE", - "properties[gender]": "Male", - "properties[company]": "Rudderstack" - } - }, - "files": {} - }, - "metadata": [ - { - "jobId": 2 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG", - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - } - } - }, - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.wootric.com/v1/end_users", - "headers": { - "Content-Type": "application/x-www-form-urlencoded", - "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" - }, - "params": {}, - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": { - "email": "dummyUser2@gmail.com", - "last_surveyed": "1642685961", - "external_created_at": "1611149961", - "external_id": "dummyId2", - "properties[city]": "Bangalore", - "properties[name]": "Dummy User 2", - "properties[title]": "SDE", - "properties[gender]": "Male", - "properties[company]": "Rudderstack" - } - }, - "files": {} - }, - "metadata": [ - { - "jobId": 3 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG", - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - } - } - }, - { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" - }, - "metadata": [ - { - "jobId": 5 - } - ], - "batched": false, - "statusCode": 400, - "error": "email/phone number are missing. At least one parameter must be provided", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation" - } - }, - { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" - }, - "metadata": [ - { - "jobId": 6 - } - ], - "batched": false, - "statusCode": 400, - "error": "email/phone number are missing. At least one parameter must be provided", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation" - } - }, - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "PUT", - "endpoint": "https://api.wootric.com/v1/end_users/486438462", - "headers": { - "Content-Type": "application/x-www-form-urlencoded", - "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" - }, - "params": {}, - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": { - "email": "dummyuser1_01@gmail.com", - "last_surveyed": "1642685961" - } - }, - "files": {} - }, - "metadata": [ - { - "jobId": 7 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG", - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - } - } - }, - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "PUT", - "endpoint": "https://api.wootric.com/v1/end_users/486438462", - "headers": { - "Content-Type": "application/x-www-form-urlencoded", - "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" - }, - "params": {}, - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": { - "phone_number": "+19777777778", - "last_surveyed": "1642685961" - } - }, - "files": {} - }, - "metadata": [ - { - "jobId": 8 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG", - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - } - } - }, - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "PUT", - "endpoint": "https://api.wootric.com/v1/end_users/486438462", - "headers": { - "Content-Type": "application/x-www-form-urlencoded", - "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" - }, - "params": {}, - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": { - "last_surveyed": "1642685961", - "properties[city]": "Udaipur", - "properties[name]": "Dummy User 1 New", - "properties[title]": "SDE-2", - "properties[gender]": "Male", - "properties[company]": "Rudderstack" - } - }, - "files": {} - }, - "metadata": [ - { - "jobId": 9 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG", - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - } - } - }, - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.wootric.com/v1/end_users/486438462/responses", - "headers": { - "Content-Type": "application/x-www-form-urlencoded", - "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" - }, - "params": {}, - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": { - "score": 7, - "ip_address": "0.0.0.0", - "origin_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "text": "Simple, Easy to use, Reliable, Affordable Product", - "created_at": "1611149961", - "end_user[properties][city]": "Mumbai", - "end_user[properties][name]": "Dummy User 1", - "end_user[properties][title]": "SDE", - "end_user[properties][gender]": "Male", - "end_user[properties][company]": "Rudderstack" - } - }, - "files": {} - }, - "metadata": [ - { - "jobId": 10 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG", - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - } - } - }, - { - "metadata": [ - { - "jobId": 11 - } - ], - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" - }, - "batched": false, - "statusCode": 400, - "error": "No user found with userId : dummyId2", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation" - } - }, - { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" - }, - "metadata": [ - { - "jobId": 12 - } - ], - "batched": false, - "statusCode": 400, - "error": "Invalid Score", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation" - } - }, - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.wootric.com/v1/end_users/486438462/declines", - "headers": { - "Content-Type": "application/x-www-form-urlencoded", - "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" - }, - "params": {}, - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": { - "origin_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html" - } - }, - "files": {} - }, - "metadata": [ - { - "jobId": 13 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG", - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - } - } - }, - { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" - }, - "metadata": [ - { - "jobId": 14 - } - ], - "batched": false, - "statusCode": 400, - "error": "No user found with userId : dummyId2", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation" - } - }, - { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" - }, - "metadata": [ - { - "jobId": 15 - } - ], - "batched": false, - "statusCode": 400, - "error": "Event Type not supported", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation" - } - }, - { - "metadata": [ - { - "jobId": 16 - } - ], - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" - }, - "batched": false, - "statusCode": 400, - "error": "Event Type is missing from Integration object", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation" - } - } -] diff --git a/test/__tests__/hubspot.test.js b/test/__tests__/hubspot.test.js deleted file mode 100644 index 83f02f5a14..0000000000 --- a/test/__tests__/hubspot.test.js +++ /dev/null @@ -1,139 +0,0 @@ -jest.mock("axios"); - -const integration = "hs"; -const name = "Hubspot"; - -const fs = require("fs"); -const path = require("path"); - -const version = "v0"; - -const transformer = require(`../../src/${version}/destinations/${integration}/transform`); - -// Processor Test files -const inputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_input.json`) -); -const outputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_output.json`) -); -const inputData = JSON.parse(inputDataFile); -const expectedData = JSON.parse(outputDataFile); - -// Router Legacy Test files -const inputLegacyRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_input_legacy.json`) -); -const outputLegacyRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_output_legacy.json`) -); -const inputLegacyRouterData = JSON.parse(inputLegacyRouterDataFile); -const expectedLegacyRouterData = JSON.parse(outputLegacyRouterDataFile); - -// Router Test files (New API) -const inputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_input.json`) -); -const outputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_output.json`) -); -const inputRouterData = JSON.parse(inputRouterDataFile); -const expectedRouterData = JSON.parse(outputRouterDataFile); - -// Router Test files for rETL sources -const inputRouterDataFilerETL = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_rETL_input.json`) -); -const outputRouterDataFilerETL = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_rETL_output.json`) -); -const inputRouterDatarETL = JSON.parse(inputRouterDataFilerETL); -const expectedRouterDatarETL = JSON.parse(outputRouterDataFilerETL); - -// Router Test files for rETL sources (legacy) -const inputRouterDataFilerETLLegacy = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_legacy_rETL_input.json`) -); -const outputRouterDataFilerETLLegacy = fs.readFileSync( - path.resolve( - __dirname, - `./data/${integration}_router_legacy_rETL_output.json` - ) -); -const inputRouterDatarETLLegacy = JSON.parse(inputRouterDataFilerETLLegacy); -const expectedRouterDatarETLLegacy = JSON.parse(outputRouterDataFilerETLLegacy); - -describe(`${name} Tests`, () => { - describe("Processor", () => { - inputData.forEach(async (input, index) => { - it(`Payload - ${index}`, async () => { - try { - const output = await transformer.process(input); - expect(output).toEqual(expectedData[index]); - } catch (error) { - expect(error.message).toEqual(expectedData[index].error); - } - }); - }); - }); - - // Legacy API - // It has different test cases as this (NEW API) destination config can - // change in the middle of legacy batching causing issue with the existing flow - describe("Router Tests (Legacy API)", () => { - it("Payload", async () => { - const routerOutput = await transformer.processRouterDest( - inputLegacyRouterData - ); - expect(routerOutput).toEqual(expectedLegacyRouterData); - }); - }); - - // New API - describe("Router Tests (New API)", () => { - it("Payload", async () => { - const routerOutput = await transformer.processRouterDest(inputRouterData); - expect(routerOutput).toEqual(expectedRouterData); - }); - }); - - describe("Router Tests for rETL sources", () => { - it("Payload", async () => { - const routerOutputrETL = await transformer.processRouterDest( - inputRouterDatarETL - ); - expect(routerOutputrETL).toEqual(expectedRouterDatarETL); - }); - - it("should transform association events", async () => { - const assocInput = JSON.parse( - fs.readFileSync( - path.resolve( - __dirname, - `data/${integration}_router_associations_rEtl_input.json` - ) - ) - ); - const assocExpectedOutput = JSON.parse( - fs.readFileSync( - path.resolve( - __dirname, - `data/${integration}_router_associations_rEtl_output.json` - ) - ) - ); - const actualOutput = await transformer.processRouterDest(assocInput); - - expect(actualOutput).toEqual(assocExpectedOutput); - }); - }); - // rETL Sources - describe("Router Tests for rETL sources (Legacy)", () => { - it("Payload", async () => { - const routerOutputrETLLegacy = await transformer.processRouterDest( - inputRouterDatarETLLegacy - ); - expect(routerOutputrETLLegacy).toEqual(expectedRouterDatarETLLegacy); - }); - }); -}); diff --git a/test/__tests__/wootric.test.js b/test/__tests__/wootric.test.js deleted file mode 100644 index 7e7e81cd49..0000000000 --- a/test/__tests__/wootric.test.js +++ /dev/null @@ -1,46 +0,0 @@ -const integration = "wootric"; -const name = "Wootric"; - -const fs = require("fs"); -const path = require("path"); -const version = "v0"; - -const transformer = require(`../../src/${version}/destinations/${integration}/transform`); - -// Processor Test files -const testDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}.json`) -); -const testData = JSON.parse(testDataFile); - -// Router Test files -const inputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_input.json`) -); -const outputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_output.json`) -); -const inputRouterData = JSON.parse(inputRouterDataFile); -const expectedRouterData = JSON.parse(outputRouterDataFile); - -describe(`${name} Tests`, () => { - describe("Processor", () => { - testData.forEach(async (dataPoint, index) => { - it(`${index}. ${integration} - ${dataPoint.description}`, async () => { - try { - const output = await transformer.process(dataPoint.input); - expect(output).toEqual(dataPoint.output); - } catch (error) { - expect(error.message).toEqual(dataPoint.output.error); - } - }); - }); - }); - - describe("Router", () => { - it("Payload", async () => { - const routerOutput = await transformer.processRouterDest(inputRouterData); - expect(routerOutput).toEqual(expectedRouterData); - }); - }); -}); diff --git a/test/integrations/destinations/hs/network.ts b/test/integrations/destinations/hs/network.ts new file mode 100644 index 0000000000..e29cc27562 --- /dev/null +++ b/test/integrations/destinations/hs/network.ts @@ -0,0 +1,664 @@ +export const networkCallsData = [ + { + httpReq: { + url: 'https://api.hubapi.com/properties/v1/contacts/properties?hapikey=dummy-apikey', + method: 'GET', + }, + httpRes: { + status: 200, + data: [ + { name: 'company_size', type: 'string' }, + { name: 'date_of_birth', type: 'string' }, + { name: 'days_to_close', type: 'number' }, + { + name: 'date_submitted', + type: 'date', + }, + { + name: 'days_create', + type: 'date', + }, + { + name: 'days_closed', + type: 'date', + }, + { name: 'degree', type: 'string' }, + { name: 'field_of_study', type: 'string' }, + { name: 'first_conversion_date', type: 'datetime' }, + { name: 'first_conversion_event_name', type: 'string' }, + { name: 'first_deal_created_date', type: 'datetime' }, + { name: 'gender', type: 'string' }, + { name: 'graduation_date', type: 'string' }, + { name: 'hs_additional_emails', type: 'enumeration' }, + { name: 'hs_all_contact_vids', type: 'enumeration' }, + { + name: 'hs_analytics_first_touch_converting_campaign', + type: 'string', + }, + { name: 'hs_analytics_last_touch_converting_campaign', type: 'string' }, + { name: 'hs_avatar_filemanager_key', type: 'string' }, + { name: 'hs_calculated_form_submissions', type: 'enumeration' }, + { name: 'hs_calculated_merged_vids', type: 'enumeration' }, + { name: 'hs_calculated_mobile_number', type: 'string' }, + { name: 'hs_calculated_phone_number', type: 'string' }, + { name: 'hs_calculated_phone_number_area_code', type: 'string' }, + { name: 'hs_calculated_phone_number_country_code', type: 'string' }, + { name: 'hs_calculated_phone_number_region_code', type: 'string' }, + { name: 'hs_content_membership_email_confirmed', type: 'bool' }, + { name: 'hs_content_membership_notes', type: 'string' }, + { name: 'hs_content_membership_registered_at', type: 'datetime' }, + { + name: 'hs_content_membership_registration_domain_sent_to', + type: 'string', + }, + { + name: 'hs_content_membership_registration_email_sent_at', + type: 'datetime', + }, + { name: 'hs_content_membership_status', type: 'enumeration' }, + { name: 'hs_conversations_visitor_email', type: 'string' }, + { name: 'hs_created_by_conversations', type: 'bool' }, + { name: 'hs_created_by_user_id', type: 'string' }, + { name: 'hs_createdate', type: 'datetime' }, + { name: 'hs_document_last_revisited', type: 'datetime' }, + { name: 'hs_email_domain', type: 'string' }, + { name: 'hs_email_quarantined', type: 'bool' }, + { name: 'hs_email_quarantined_reason', type: 'enumeration' }, + { name: 'hs_email_recipient_fatigue_recovery_time', type: 'datetime' }, + { name: 'hs_email_sends_since_last_engagement', type: 'number' }, + { name: 'hs_emailconfirmationstatus', type: 'enumeration' }, + { name: 'hs_facebook_ad_clicked', type: 'bool' }, + { name: 'hs_feedback_last_nps_follow_up', type: 'string' }, + { name: 'hs_feedback_last_nps_rating', type: 'enumeration' }, + { name: 'hs_feedback_last_survey_date', type: 'datetime' }, + { name: 'hs_feedback_show_nps_web_survey', type: 'bool' }, + { name: 'hs_google_click_id', type: 'string' }, + { name: 'hs_ip_timezone', type: 'string' }, + { name: 'hs_is_contact', type: 'bool' }, + { name: 'hs_last_sales_activity_date', type: 'datetime' }, + { name: 'hs_lastmodifieddate', type: 'datetime' }, + { name: 'hs_lead_status', type: 'enumeration' }, + { name: 'hs_legal_basis', type: 'enumeration' }, + { name: 'hs_merged_object_ids', type: 'enumeration' }, + { name: 'hs_object_id', type: 'number' }, + { name: 'hs_predictivecontactscore_v2', type: 'number' }, + { name: 'hs_predictivescoringtier', type: 'enumeration' }, + { name: 'hs_sales_email_last_clicked', type: 'datetime' }, + { name: 'hs_sales_email_last_opened', type: 'datetime' }, + { + name: 'hs_searchable_calculated_international_mobile_number', + type: 'phone_number', + }, + { + name: 'hs_searchable_calculated_international_phone_number', + type: 'phone_number', + }, + { + name: 'hs_searchable_calculated_mobile_number', + type: 'phone_number', + }, + { name: 'hs_searchable_calculated_phone_number', type: 'phone_number' }, + { name: 'hs_sequences_is_enrolled', type: 'bool' }, + { name: 'hs_updated_by_user_id', type: 'string' }, + { name: 'hubspot_owner_assigneddate', type: 'datetime' }, + { name: 'ip_city', type: 'string' }, + { name: 'ip_country', type: 'string' }, + { name: 'ip_country_code', type: 'string' }, + { name: 'ip_latlon', type: 'string' }, + { name: 'ip_state', type: 'string' }, + { name: 'ip_state_code', type: 'string' }, + { name: 'ip_zipcode', type: 'string' }, + { name: 'job_function', type: 'string' }, + { name: 'lastmodifieddate', type: 'datetime' }, + { name: 'marital_status', type: 'string' }, + { name: 'military_status', type: 'string' }, + { name: 'num_associated_deals', type: 'number' }, + { name: 'num_conversion_events', type: 'number' }, + { name: 'num_unique_conversion_events', type: 'number' }, + { name: 'recent_conversion_date', type: 'datetime' }, + { name: 'recent_conversion_event_name', type: 'string' }, + { name: 'recent_deal_amount', type: 'number' }, + { name: 'recent_deal_close_date', type: 'datetime' }, + { name: 'relationship_status', type: 'string' }, + { name: 'school', type: 'string' }, + { name: 'seniority', type: 'string' }, + { name: 'start_date', type: 'string' }, + { name: 'test_date', type: 'date' }, + { name: 'test_key', type: 'string' }, + { name: 'test_prop', type: 'string' }, + { name: 'test_property', type: 'string' }, + { name: 'total_revenue', type: 'number' }, + { name: 'work_email', type: 'string' }, + { name: 'firstname', type: 'string' }, + { name: 'hs_analytics_first_url', type: 'string' }, + { name: 'hs_email_delivered', type: 'number' }, + { name: 'hs_email_optout_7283808', type: 'enumeration' }, + { name: 'twitterhandle', type: 'string' }, + { name: 'currentlyinworkflow', type: 'enumeration' }, + { name: 'hs_analytics_last_url', type: 'string' }, + { name: 'hs_email_open', type: 'number' }, + { name: 'fax', type: 'string' }, + { name: 'hs_analytics_first_timestamp', type: 'datetime' }, + { name: 'hs_email_last_email_name', type: 'string' }, + { name: 'hs_email_last_send_date', type: 'datetime' }, + { name: 'address', type: 'string' }, + { name: 'engagements_last_meeting_booked', type: 'datetime' }, + { name: 'engagements_last_meeting_booked_campaign', type: 'string' }, + { name: 'engagements_last_meeting_booked_medium', type: 'string' }, + { name: 'engagements_last_meeting_booked_source', type: 'string' }, + { name: 'hs_analytics_first_visit_timestamp', type: 'datetime' }, + { name: 'hs_email_last_open_date', type: 'datetime' }, + { name: 'hs_sales_email_last_replied', type: 'datetime' }, + { name: 'hubspot_owner_id', type: 'enumeration' }, + { name: 'notes_last_contacted', type: 'datetime' }, + { name: 'notes_last_updated', type: 'datetime' }, + { name: 'notes_next_activity_date', type: 'datetime' }, + { name: 'num_contacted_notes', type: 'number' }, + { name: 'num_notes', type: 'number' }, + { name: 'surveymonkeyeventlastupdated', type: 'number' }, + { name: 'webinareventlastupdated', type: 'number' }, + { name: 'city', type: 'string' }, + { name: 'hs_analytics_last_timestamp', type: 'datetime' }, + { name: 'hs_email_last_click_date', type: 'datetime' }, + { name: 'hubspot_team_id', type: 'enumeration' }, + { name: 'hs_all_owner_ids', type: 'enumeration' }, + { name: 'hs_analytics_last_visit_timestamp', type: 'datetime' }, + { name: 'hs_email_first_send_date', type: 'datetime' }, + { name: 'state', type: 'string' }, + { name: 'hs_all_team_ids', type: 'enumeration' }, + { name: 'hs_analytics_source', type: 'enumeration' }, + { name: 'hs_email_first_open_date', type: 'datetime' }, + { name: 'zip', type: 'string' }, + { name: 'country', type: 'string' }, + { name: 'hs_all_accessible_team_ids', type: 'enumeration' }, + { name: 'hs_analytics_source_data_1', type: 'string' }, + { name: 'hs_email_first_click_date', type: 'datetime' }, + { name: 'hs_analytics_source_data_2', type: 'string' }, + { name: 'hs_email_is_ineligible', type: 'bool' }, + { name: 'hs_language', type: 'enumeration' }, + { name: 'hs_analytics_first_referrer', type: 'string' }, + { name: 'jobtitle', type: 'string' }, + { name: 'hs_analytics_last_referrer', type: 'string' }, + { name: 'message', type: 'string' }, + { name: 'closedate', type: 'datetime' }, + { name: 'hs_analytics_average_page_views', type: 'number' }, + { name: 'hs_analytics_revenue', type: 'number' }, + { name: 'hs_lifecyclestage_lead_date', type: 'datetime' }, + { + name: 'hs_lifecyclestage_marketingqualifiedlead_date', + type: 'datetime', + }, + { name: 'hs_lifecyclestage_opportunity_date', type: 'datetime' }, + { name: 'lifecyclestage', type: 'enumeration' }, + { name: 'hs_lifecyclestage_salesqualifiedlead_date', type: 'datetime' }, + { name: 'createdate', type: 'datetime' }, + { name: 'hs_lifecyclestage_evangelist_date', type: 'datetime' }, + { name: 'hs_lifecyclestage_customer_date', type: 'datetime' }, + { name: 'hubspotscore', type: 'number' }, + { name: 'company', type: 'string' }, + { name: 'hs_lifecyclestage_subscriber_date', type: 'datetime' }, + { name: 'hs_lifecyclestage_other_date', type: 'datetime' }, + { name: 'website', type: 'string' }, + { name: 'numemployees', type: 'enumeration' }, + { name: 'annualrevenue', type: 'string' }, + { name: 'industry', type: 'string' }, + { name: 'associatedcompanyid', type: 'number' }, + { name: 'associatedcompanylastupdated', type: 'number' }, + { name: 'hs_predictivecontactscorebucket', type: 'enumeration' }, + { name: 'hs_predictivecontactscore', type: 'number' }, + ], + }, + }, + { + httpReq: { + url: 'https://api.hubapi.com/properties/v1/contacts/properties', + method: 'GET', + }, + httpRes: { + status: 200, + data: [ + { name: 'company_size', type: 'string' }, + { name: 'date_of_birth', type: 'string' }, + { name: 'days_to_close', type: 'number' }, + { + name: 'date_submitted', + type: 'date', + }, + { + name: 'date_created', + type: 'date', + }, + { + name: 'date_closed', + type: 'date', + }, + { name: 'degree', type: 'string' }, + { name: 'field_of_study', type: 'string' }, + { name: 'first_conversion_date', type: 'datetime' }, + { name: 'first_conversion_event_name', type: 'string' }, + { name: 'first_deal_created_date', type: 'datetime' }, + { name: 'gender', type: 'string' }, + { name: 'graduation_date', type: 'string' }, + { name: 'hs_additional_emails', type: 'enumeration' }, + { name: 'hs_all_contact_vids', type: 'enumeration' }, + { + name: 'hs_analytics_first_touch_converting_campaign', + type: 'string', + }, + { name: 'hs_analytics_last_touch_converting_campaign', type: 'string' }, + { name: 'hs_avatar_filemanager_key', type: 'string' }, + { name: 'hs_calculated_form_submissions', type: 'enumeration' }, + { name: 'hs_calculated_merged_vids', type: 'enumeration' }, + { name: 'hs_calculated_mobile_number', type: 'string' }, + { name: 'hs_calculated_phone_number', type: 'string' }, + { name: 'hs_calculated_phone_number_area_code', type: 'string' }, + { name: 'hs_calculated_phone_number_country_code', type: 'string' }, + { name: 'hs_calculated_phone_number_region_code', type: 'string' }, + { name: 'hs_content_membership_email_confirmed', type: 'bool' }, + { name: 'hs_content_membership_notes', type: 'string' }, + { name: 'hs_content_membership_registered_at', type: 'datetime' }, + { + name: 'hs_content_membership_registration_domain_sent_to', + type: 'string', + }, + { + name: 'hs_content_membership_registration_email_sent_at', + type: 'datetime', + }, + { name: 'hs_content_membership_status', type: 'enumeration' }, + { name: 'hs_conversations_visitor_email', type: 'string' }, + { name: 'hs_created_by_conversations', type: 'bool' }, + { name: 'hs_created_by_user_id', type: 'string' }, + { name: 'hs_createdate', type: 'datetime' }, + { name: 'hs_document_last_revisited', type: 'datetime' }, + { name: 'hs_email_domain', type: 'string' }, + { name: 'hs_email_quarantined', type: 'bool' }, + { name: 'hs_email_quarantined_reason', type: 'enumeration' }, + { name: 'hs_email_recipient_fatigue_recovery_time', type: 'datetime' }, + { name: 'hs_email_sends_since_last_engagement', type: 'number' }, + { name: 'hs_emailconfirmationstatus', type: 'enumeration' }, + { name: 'hs_facebook_ad_clicked', type: 'bool' }, + { name: 'hs_feedback_last_nps_follow_up', type: 'string' }, + { name: 'hs_feedback_last_nps_rating', type: 'enumeration' }, + { name: 'hs_feedback_last_survey_date', type: 'datetime' }, + { name: 'hs_feedback_show_nps_web_survey', type: 'bool' }, + { name: 'hs_google_click_id', type: 'string' }, + { name: 'hs_ip_timezone', type: 'string' }, + { name: 'hs_is_contact', type: 'bool' }, + { name: 'hs_last_sales_activity_date', type: 'datetime' }, + { name: 'hs_lastmodifieddate', type: 'datetime' }, + { name: 'hs_lead_status', type: 'enumeration' }, + { name: 'hs_legal_basis', type: 'enumeration' }, + { name: 'hs_merged_object_ids', type: 'enumeration' }, + { name: 'hs_object_id', type: 'number' }, + { name: 'hs_predictivecontactscore_v2', type: 'number' }, + { name: 'hs_predictivescoringtier', type: 'enumeration' }, + { name: 'hs_sales_email_last_clicked', type: 'datetime' }, + { name: 'hs_sales_email_last_opened', type: 'datetime' }, + { + name: 'hs_searchable_calculated_international_mobile_number', + type: 'phone_number', + }, + { + name: 'hs_searchable_calculated_international_phone_number', + type: 'phone_number', + }, + { + name: 'hs_searchable_calculated_mobile_number', + type: 'phone_number', + }, + { name: 'hs_searchable_calculated_phone_number', type: 'phone_number' }, + { name: 'hs_sequences_is_enrolled', type: 'bool' }, + { name: 'hs_updated_by_user_id', type: 'string' }, + { name: 'hubspot_owner_assigneddate', type: 'datetime' }, + { name: 'ip_city', type: 'string' }, + { name: 'ip_country', type: 'string' }, + { name: 'ip_country_code', type: 'string' }, + { name: 'ip_latlon', type: 'string' }, + { name: 'ip_state', type: 'string' }, + { name: 'ip_state_code', type: 'string' }, + { name: 'ip_zipcode', type: 'string' }, + { name: 'job_function', type: 'string' }, + { name: 'lastmodifieddate', type: 'datetime' }, + { name: 'marital_status', type: 'string' }, + { name: 'military_status', type: 'string' }, + { name: 'num_associated_deals', type: 'number' }, + { name: 'num_conversion_events', type: 'number' }, + { name: 'num_unique_conversion_events', type: 'number' }, + { name: 'recent_conversion_date', type: 'datetime' }, + { name: 'recent_conversion_event_name', type: 'string' }, + { name: 'recent_deal_amount', type: 'number' }, + { name: 'recent_deal_close_date', type: 'datetime' }, + { name: 'relationship_status', type: 'string' }, + { name: 'school', type: 'string' }, + { name: 'seniority', type: 'string' }, + { name: 'start_date', type: 'string' }, + { name: 'test_date', type: 'date' }, + { name: 'test_key', type: 'string' }, + { name: 'test_prop', type: 'string' }, + { name: 'test_property', type: 'string' }, + { name: 'total_revenue', type: 'number' }, + { name: 'work_email', type: 'string' }, + { name: 'firstname', type: 'string' }, + { name: 'hs_analytics_first_url', type: 'string' }, + { name: 'hs_email_delivered', type: 'number' }, + { name: 'hs_email_optout_7283808', type: 'enumeration' }, + { name: 'twitterhandle', type: 'string' }, + { name: 'currentlyinworkflow', type: 'enumeration' }, + { name: 'hs_analytics_last_url', type: 'string' }, + { name: 'hs_email_open', type: 'number' }, + { name: 'fax', type: 'string' }, + { name: 'hs_analytics_first_timestamp', type: 'datetime' }, + { name: 'hs_email_last_email_name', type: 'string' }, + { name: 'hs_email_last_send_date', type: 'datetime' }, + { name: 'address', type: 'string' }, + { name: 'engagements_last_meeting_booked', type: 'datetime' }, + { name: 'engagements_last_meeting_booked_campaign', type: 'string' }, + { name: 'engagements_last_meeting_booked_medium', type: 'string' }, + { name: 'engagements_last_meeting_booked_source', type: 'string' }, + { name: 'hs_analytics_first_visit_timestamp', type: 'datetime' }, + { name: 'hs_email_last_open_date', type: 'datetime' }, + { name: 'hs_sales_email_last_replied', type: 'datetime' }, + { name: 'hubspot_owner_id', type: 'enumeration' }, + { name: 'notes_last_contacted', type: 'datetime' }, + { name: 'notes_last_updated', type: 'datetime' }, + { name: 'notes_next_activity_date', type: 'datetime' }, + { name: 'num_contacted_notes', type: 'number' }, + { name: 'num_notes', type: 'number' }, + { name: 'surveymonkeyeventlastupdated', type: 'number' }, + { name: 'webinareventlastupdated', type: 'number' }, + { name: 'city', type: 'string' }, + { name: 'hs_analytics_last_timestamp', type: 'datetime' }, + { name: 'hs_email_last_click_date', type: 'datetime' }, + { name: 'hubspot_team_id', type: 'enumeration' }, + { name: 'hs_all_owner_ids', type: 'enumeration' }, + { name: 'hs_analytics_last_visit_timestamp', type: 'datetime' }, + { name: 'hs_email_first_send_date', type: 'datetime' }, + { name: 'state', type: 'string' }, + { name: 'hs_all_team_ids', type: 'enumeration' }, + { name: 'hs_analytics_source', type: 'enumeration' }, + { name: 'hs_email_first_open_date', type: 'datetime' }, + { name: 'zip', type: 'string' }, + { name: 'country', type: 'string' }, + { name: 'hs_all_accessible_team_ids', type: 'enumeration' }, + { name: 'hs_analytics_source_data_1', type: 'string' }, + { name: 'hs_email_first_click_date', type: 'datetime' }, + { name: 'hs_analytics_source_data_2', type: 'string' }, + { name: 'hs_email_is_ineligible', type: 'bool' }, + { name: 'hs_language', type: 'enumeration' }, + { name: 'hs_analytics_first_referrer', type: 'string' }, + { name: 'jobtitle', type: 'string' }, + { name: 'hs_analytics_last_referrer', type: 'string' }, + { name: 'message', type: 'string' }, + { name: 'closedate', type: 'datetime' }, + { name: 'hs_analytics_average_page_views', type: 'number' }, + { name: 'hs_analytics_revenue', type: 'number' }, + { name: 'hs_lifecyclestage_lead_date', type: 'datetime' }, + { + name: 'hs_lifecyclestage_marketingqualifiedlead_date', + type: 'datetime', + }, + { name: 'hs_lifecyclestage_opportunity_date', type: 'datetime' }, + { name: 'lifecyclestage', type: 'enumeration' }, + { name: 'hs_lifecyclestage_salesqualifiedlead_date', type: 'datetime' }, + { name: 'createdate', type: 'datetime' }, + { name: 'hs_lifecyclestage_evangelist_date', type: 'datetime' }, + { name: 'hs_lifecyclestage_customer_date', type: 'datetime' }, + { name: 'hubspotscore', type: 'number' }, + { name: 'company', type: 'string' }, + { name: 'hs_lifecyclestage_subscriber_date', type: 'datetime' }, + { name: 'hs_lifecyclestage_other_date', type: 'datetime' }, + { name: 'website', type: 'string' }, + { name: 'numemployees', type: 'enumeration' }, + { name: 'annualrevenue', type: 'string' }, + { name: 'industry', type: 'string' }, + { name: 'associatedcompanyid', type: 'number' }, + { name: 'associatedcompanylastupdated', type: 'number' }, + { name: 'hs_predictivecontactscorebucket', type: 'enumeration' }, + { name: 'hs_predictivecontactscore', type: 'number' }, + ], + }, + }, + { + httpReq: { + url: 'https://api.hubapi.com/crm/v3/objects/contacts/search', + method: 'POST', + headers: { + Authorization: 'Bearer dummy-access-token', + }, + }, + httpRes: { + status: 200, + }, + }, + { + httpReq: { + url: 'https://api.hubapi.com/crm/v3/objects/contacts/search', + method: 'POST', + headers: { + Authorization: 'Bearer dummy-access-tokensuccess', + }, + }, + httpRes: { + data: { + total: 1, + results: [ + { + id: '103604', + properties: { + createdate: '2022-07-15T15:25:08.975Z', + email: 'testhubspot@email.com', + hs_object_id: '103604', + lastmodifieddate: '2022-07-15T15:26:49.590Z', + }, + createdAt: '2022-07-15T15:25:08.975Z', + updatedAt: '2022-07-15T15:26:49.590Z', + archived: false, + }, + ], + }, + status: 200, + }, + }, + { + httpReq: { + url: 'https://api.hubapi.com/crm/v3/objects/contacts/search', + method: 'POST', + headers: { + Authorization: 'Bearer dummy-access-tokenmultiple', + }, + }, + httpRes: { + data: { + total: 2, + results: [ + { + id: '103604', + properties: { + createdate: '2022-07-15T15:25:08.975Z', + email: 'testhubspot@email.com', + hs_object_id: '103604', + lastmodifieddate: '2022-07-15T15:26:49.590Z', + }, + createdAt: '2022-07-15T15:25:08.975Z', + updatedAt: '2022-07-15T15:26:49.590Z', + archived: false, + }, + { + id: '103604', + properties: { + createdate: '2022-07-15T15:25:08.975Z', + email: 'testhubspot@email.com', + hs_object_id: '103604', + lastmodifieddate: '2022-07-15T15:26:49.590Z', + }, + createdAt: '2022-07-15T15:25:08.975Z', + updatedAt: '2022-07-15T15:26:49.590Z', + archived: false, + }, + ], + }, + status: 200, + }, + }, + { + httpReq: { + url: 'https://api.hubapi.com/crm/v3/objects/lead/search', + method: 'POST', + }, + httpRes: { + status: 200, + data: { + total: 1, + results: [ + { + id: '103605', + properties: { + createdate: '2022-08-15T15:25:08.975Z', + email: 'testhubspot2@email.com', + hs_object_id: '103605', + lastmodifieddate: '2022-08-15T15:26:49.590Z', + }, + createdAt: '2022-08-15T15:25:08.975Z', + updatedAt: '2022-08-15T15:26:49.590Z', + archived: false, + }, + ], + }, + }, + }, + { + httpReq: { + url: 'https://api.hubapi.com/crm/v3/objects/lead/search?hapikey=dummy-apikey', + method: 'POST', + }, + httpRes: { + data: { + total: 1, + results: [ + { + id: '103605', + properties: { + createdate: '2022-08-15T15:25:08.975Z', + email: 'testhubspot2@email.com', + hs_object_id: '103605', + lastmodifieddate: '2022-08-15T15:26:49.590Z', + }, + createdAt: '2022-08-15T15:25:08.975Z', + updatedAt: '2022-08-15T15:26:49.590Z', + archived: false, + }, + ], + }, + status: 200, + }, + }, + { + httpReq: { + url: 'https://api.hubapi.com/crm/v3/objects/lead/search?hapikey=rate-limit-id', + method: 'POST', + }, + httpRes: { + data: { + status: 'error', + message: 'Request Rate Limit reached', + correlationId: '4d39ff11-e121-4514-bcd8-132a9dd1ff50', + category: 'RATE-LIMIT_REACHED', + links: { + 'api key': 'https://app.hubspot.com/l/api-key/', + }, + }, + status: 429, + }, + }, + { + httpReq: { + url: 'https://api.hubapi.com/crm/v3/objects/contacts/search?hapikey=dummy-apikey', + method: 'POST', + }, + httpRes: { + data: { + total: 1, + results: [ + { + id: '103604', + properties: { + createdate: '2022-07-15T15:25:08.975Z', + email: 'testhubspot@email.com', + hs_object_id: '103604', + lastmodifieddate: '2022-07-15T15:26:49.590Z', + }, + createdAt: '2022-07-15T15:25:08.975Z', + updatedAt: '2022-07-15T15:26:49.590Z', + archived: false, + }, + ], + }, + status: 200, + }, + }, + { + httpReq: { + url: 'https://api.hubapi.com/crm/v3/objects/contacts/search?hapikey=dummy-apikeysuccess', + method: 'POST', + }, + httpRes: { + status: 200, + }, + }, + { + httpReq: { + url: 'https://api.hubapi.com/properties/v1/contacts/properties?hapikey=dummy-apikeysuccess', + method: 'GET', + }, + httpRes: { + status: 200, + }, + }, + { + httpReq: { + url: 'https://api.hubapi.com/properties/v1/contacts/properties?hapikey=rate-limit-id', + method: 'GET', + }, + httpRes: { + data: { + status: 'error', + message: 'Request Rate Limit reached', + correlationId: '4d39ff11-e121-4514-bcd8-132a9dd1ff50', + category: 'RATE-LIMIT_REACHED', + links: { + 'api key': 'https://app.hubspot.com/l/api-key/', + }, + }, + status: 429, + }, + }, + { + httpReq: { + url: 'https://api.hubapi.com/properties/v1/contacts/properties?hapikey=invalid-api-key', + method: 'GET', + }, + httpRes: { + data: { + status: 'error', + message: + 'The API key provided is invalid. View or manage your API key here: https://app.hubspot.com/l/api-key/', + correlationId: '4d39ff11-e121-4514-bcd8-132a9dd1ff50', + category: 'INVALID_AUTHENTICATION', + links: { + 'api key': 'https://app.hubspot.com/l/api-key/', + }, + }, + status: 401, + }, + }, + { + httpReq: { + url: 'https://api.hubapi.com/crm/v3/objects/association/search', + method: 'POST', + }, + httpRes: { + status: 200, + }, + }, +]; diff --git a/test/integrations/destinations/hs/processor/data.ts b/test/integrations/destinations/hs/processor/data.ts new file mode 100644 index 0000000000..5eaa109dc4 --- /dev/null +++ b/test/integrations/destinations/hs/processor/data.ts @@ -0,0 +1,5272 @@ +export const data = [ + { + name: 'hs', + description: 'Test 0', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'testhubspot2@email.com', + firstname: 'Test Hubspot', + anonymousId: '12345', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '', + referrer: '', + search: '', + title: '', + url: '', + }, + }, + type: 'identify', + messageId: '50360b9c-ea8d-409c-b672-c9230f91cce5', + originalTimestamp: '2019-10-15T09:35:31.288Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + apiKey: 'dummy-apikey', + hubID: 'dummy-hubId', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + userId: '', + method: 'POST', + endpoint: + 'https://api.hubapi.com/contacts/v1/contact/createOrUpdate/email/testhubspot2@email.com', + headers: { + 'Content-Type': 'application/json', + }, + params: { + hapikey: 'dummy-apikey', + }, + body: { + JSON: { + properties: [ + { + property: 'email', + value: 'testhubspot2@email.com', + }, + { + property: 'firstname', + value: 'Test Hubspot', + }, + ], + }, + XML: {}, + FORM: {}, + JSON_ARRAY: {}, + }, + files: {}, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'hs', + description: 'Test 1', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'testhubspot2@email.com', + firstname: 'Test Hubspot', + anonymousId: '12345', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + type: 'page', + messageId: 'e8585d9a-7137-4223-b295-68ab1b17dad7', + originalTimestamp: '2019-10-15T09:35:31.289Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + properties: { + path: '', + referrer: '', + search: '', + title: '', + url: '', + }, + integrations: { + All: true, + }, + name: 'ApplicationLoaded', + sentAt: '2019-10-14T11:15:53.296Z', + }, + destination: { + Config: { + apiKey: 'dummy-apikey', + hubID: 'dummy-hubId', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Message type page is not supported', + statTags: { + destType: 'HS', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'hs', + description: 'Test 2', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'testhubspot2@email.com', + firstname: 'Test Hubspot', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + type: 'track', + messageId: '08829772-d991-427c-b976-b4c4f4430b4e', + originalTimestamp: '2019-10-15T09:35:31.291Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + event: 'test track event HS', + properties: { + user_actual_role: 'system_admin, system_user', + user_actual_id: 12345, + }, + sentAt: '2019-10-14T11:15:53.296Z', + }, + destination: { + Config: { + apiKey: 'dummy-apikey', + hubID: 'dummy-hubId', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'GET', + messageType: 'track', + endpoint: 'https://track.hubspot.com/v1/event', + headers: { + 'Content-Type': 'application/json', + }, + params: { + _a: 'dummy-hubId', + _n: 'test track event HS', + email: 'testhubspot2@email.com', + firstname: 'Test Hubspot', + }, + body: { + JSON: {}, + XML: {}, + FORM: {}, + JSON_ARRAY: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'hs', + description: 'Test 3', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '', + referrer: '', + search: '', + title: '', + url: '', + }, + }, + traits: { + email: 'testhubspot2@email.com', + firstname: 'Test Hubspot', + anonymousId: '12345', + }, + type: 'identify', + messageId: '50360b9c-ea8d-409c-b672-c9230f91cce5', + originalTimestamp: '2019-10-15T09:35:31.288Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + apiKey: 'dummy-apikey', + hubID: 'dummy-hubId', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + userId: '', + method: 'POST', + endpoint: + 'https://api.hubapi.com/contacts/v1/contact/createOrUpdate/email/testhubspot2@email.com', + headers: { + 'Content-Type': 'application/json', + }, + params: { + hapikey: 'dummy-apikey', + }, + body: { + JSON: { + properties: [ + { + property: 'email', + value: 'testhubspot2@email.com', + }, + { + property: 'firstname', + value: 'Test Hubspot', + }, + ], + }, + XML: {}, + FORM: {}, + JSON_ARRAY: {}, + }, + files: {}, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'hs', + description: 'Test 4', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + firstname: 'Test Hubspot', + anonymousId: '12345', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '', + referrer: '', + search: '', + title: '', + url: '', + }, + }, + type: 'identify', + messageId: '50360b9c-ea8d-409c-b672-c9230f91cce5', + originalTimestamp: '2019-10-15T09:35:31.288Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + apiKey: 'dummy-apikey', + hubID: 'dummy-hubId', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Identify without email is not supported.', + statTags: { + destType: 'HS', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'hs', + description: 'Test 5', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'testhubspot2@email.com', + firstname: 'Test Hubspot', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + type: 'track', + messageId: '08829772-d991-427c-b976-b4c4f4430b4e', + originalTimestamp: '2019-10-15T09:35:31.291Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + event: 'test track event HS', + properties: { + revenue: 4.99, + user_actual_role: 'system_admin, system_user', + user_actual_id: 12345, + }, + sentAt: '2019-10-14T11:15:53.296Z', + }, + destination: { + Config: { + apiKey: 'dummy-apikey', + hubID: 'dummy-hubId', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'GET', + messageType: 'track', + endpoint: 'https://track.hubspot.com/v1/event', + headers: { + 'Content-Type': 'application/json', + }, + params: { + _a: 'dummy-hubId', + _n: 'test track event HS', + _m: 4.99, + email: 'testhubspot2@email.com', + firstname: 'Test Hubspot', + }, + body: { + JSON: {}, + XML: {}, + FORM: {}, + JSON_ARRAY: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'hs', + description: 'Test 6', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'testhubspot2@email.com', + firstname: 'Test Hubspot', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + type: 'track', + messageId: '08829772-d991-427c-b976-b4c4f4430b4e', + originalTimestamp: '2019-10-15T09:35:31.291Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + event: 'test track event HS', + properties: { + value: 4.99, + user_actual_role: 'system_admin, system_user', + user_actual_id: 12345, + }, + sentAt: '2019-10-14T11:15:53.296Z', + }, + destination: { + Config: { + apiKey: 'dummy-apikey', + hubID: 'dummy-hubId', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'GET', + messageType: 'track', + endpoint: 'https://track.hubspot.com/v1/event', + headers: { + 'Content-Type': 'application/json', + }, + params: { + _a: 'dummy-hubId', + _n: 'test track event HS', + _m: 4.99, + email: 'testhubspot2@email.com', + firstname: 'Test Hubspot', + }, + body: { + JSON: {}, + XML: {}, + FORM: {}, + JSON_ARRAY: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'hs', + description: 'Test 7', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'testhubspot2@email.com', + firstname: 'Test Hubspot', + anonymousId: '12345', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '', + referrer: '', + search: '', + title: '', + url: '', + }, + }, + type: 'identify', + messageId: '50360b9c-ea8d-409c-b672-c9230f91cce5', + originalTimestamp: '2019-10-15T09:35:31.288Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + metadata: { + jobId: 2, + }, + destination: { + Config: { + apiKey: 'invalid-api-key', + hubID: 'dummy-hubId', + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + name: 'Hubspot', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmLd', + deleted: false, + createdAt: '2020-12-30T08:39:32.005Z', + updatedAt: '2021-02-03T16:22:31.374Z', + destinationDefinition: { + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'HS', + displayName: 'Hubspot', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + jobId: 2, + }, + error: + '{"message":"Failed to get hubspot properties: {\\"status\\":\\"error\\",\\"message\\":\\"The API key provided is invalid. View or manage your API key here: https://app.hubspot.com/l/api-key/\\",\\"correlationId\\":\\"4d39ff11-e121-4514-bcd8-132a9dd1ff50\\",\\"category\\":\\"INVALID_AUTHENTICATION\\",\\"links\\":{\\"api key\\":\\"https://app.hubspot.com/l/api-key/\\"}}","destinationResponse":{"response":{"status":"error","message":"The API key provided is invalid. View or manage your API key here: https://app.hubspot.com/l/api-key/","correlationId":"4d39ff11-e121-4514-bcd8-132a9dd1ff50","category":"INVALID_AUTHENTICATION","links":{"api key":"https://app.hubspot.com/l/api-key/"}},"status":401}}', + statTags: { + destType: 'HS', + errorCategory: 'network', + errorType: 'aborted', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 401, + }, + ], + }, + }, + }, + { + name: 'hs', + description: 'Test 8', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'testhubspot2@email.com', + firstname: 'Test Hubspot', + anonymousId: '12345', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '', + referrer: '', + search: '', + title: '', + url: '', + }, + }, + type: 'identify', + messageId: '50360b9c-ea8d-409c-b672-c9230f91cce5', + originalTimestamp: '2019-10-15T09:35:31.288Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + metadata: { + jobId: 2, + }, + destination: { + Config: { + apiKey: 'rate-limit-id', + hubID: 'dummy-hubId', + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + name: 'Hubspot', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmLd', + deleted: false, + createdAt: '2020-12-30T08:39:32.005Z', + updatedAt: '2021-02-03T16:22:31.374Z', + destinationDefinition: { + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'HS', + displayName: 'Hubspot', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + jobId: 2, + }, + error: + '{"message":"Failed to get hubspot properties: {\\"status\\":\\"error\\",\\"message\\":\\"Request Rate Limit reached\\",\\"correlationId\\":\\"4d39ff11-e121-4514-bcd8-132a9dd1ff50\\",\\"category\\":\\"RATE-LIMIT_REACHED\\",\\"links\\":{\\"api key\\":\\"https://app.hubspot.com/l/api-key/\\"}}","destinationResponse":{"response":{"status":"error","message":"Request Rate Limit reached","correlationId":"4d39ff11-e121-4514-bcd8-132a9dd1ff50","category":"RATE-LIMIT_REACHED","links":{"api key":"https://app.hubspot.com/l/api-key/"}},"status":429}}', + statTags: { + destType: 'HS', + errorCategory: 'network', + errorType: 'throttled', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 429, + }, + ], + }, + }, + }, + { + name: 'hs', + description: 'Test 9', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'testhubspot2@email.com', + firstname: 'Test Hubspot', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + type: 'track', + messageId: '08829772-d991-427c-b976-b4c4f4430b4e', + originalTimestamp: '2019-10-15T09:35:31.291Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + event: 'test track event HS', + sentAt: '2019-10-14T11:15:53.296Z', + }, + destination: { + Config: { + apiKey: 'dummy-apikey', + hubID: 'dummy-hubId', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'GET', + messageType: 'track', + endpoint: 'https://track.hubspot.com/v1/event', + headers: { + 'Content-Type': 'application/json', + }, + params: { + _a: 'dummy-hubId', + _n: 'test track event HS', + email: 'testhubspot2@email.com', + firstname: 'Test Hubspot', + }, + body: { + JSON: {}, + XML: {}, + FORM: {}, + JSON_ARRAY: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'hs', + description: '[HS] (legacyApiKey): trigger update all objects endpoint for rETL source', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + description: '[HS] (legacyApiKey): trigger update all objects endpoint for rETL source', + message: { + channel: 'web', + context: { + mappedToDestination: true, + externalId: [ + { + identifierType: 'email', + id: 'testhubspot2@email.com', + type: 'HS-lead', + }, + ], + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '', + referrer: '', + search: '', + title: '', + url: '', + }, + }, + type: 'identify', + traits: { + firstname: 'Test Hubspot', + anonymousId: '12345', + country: 'India', + }, + messageId: '50360b9c-ea8d-409c-b672-c9230f91cce5', + originalTimestamp: '2019-10-15T09:35:31.288Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + apiKey: 'dummy-apikey', + hubID: 'dummy-hubId', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + userId: '', + method: 'PATCH', + endpoint: 'https://api.hubapi.com/crm/v3/objects/lead/103605', + source: 'rETL', + operation: 'updateObject', + headers: { + 'Content-Type': 'application/json', + }, + params: { + hapikey: 'dummy-apikey', + }, + body: { + JSON: { + properties: { + firstname: 'Test Hubspot', + anonymousId: '12345', + country: 'India', + email: 'testhubspot2@email.com', + }, + }, + XML: {}, + FORM: {}, + JSON_ARRAY: {}, + }, + files: {}, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'hs', + description: '[HS] (legacyApiKey): trigger create custom objects endpoint', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + description: '[HS] (legacyApiKey): trigger create custom objects endpoint', + message: { + channel: 'web', + context: { + mappedToDestination: true, + externalId: [ + { + identifierType: 'email', + id: 'testhubspot@email.com', + type: 'HS-lead', + }, + ], + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '', + referrer: '', + search: '', + title: '', + url: '', + }, + }, + type: 'identify', + traits: { + firstname: 'Test Hubspot', + anonymousId: '12345', + country: 'India', + }, + messageId: '50360b9c-ea8d-409c-b672-c9230f91cce5', + originalTimestamp: '2019-10-15T09:35:31.288Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + apiKey: 'dummy-apikey', + hubID: 'dummy-hubId', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + userId: '', + method: 'POST', + endpoint: 'https://api.hubapi.com/crm/v3/objects/lead', + source: 'rETL', + operation: 'createObject', + headers: { + 'Content-Type': 'application/json', + }, + params: { + hapikey: 'dummy-apikey', + }, + body: { + JSON: { + properties: { + firstname: 'Test Hubspot', + anonymousId: '12345', + country: 'India', + email: 'testhubspot@email.com', + }, + }, + XML: {}, + FORM: {}, + JSON_ARRAY: {}, + }, + files: {}, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'hs', + description: '[HS] (newApiKey): trigger create all objects endpoint for rETL source', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + description: '[HS] (newApiKey): trigger create all objects endpoint for rETL source', + message: { + channel: 'web', + context: { + mappedToDestination: true, + externalId: [ + { + identifierType: 'email', + id: 'testhubspot@email.com', + type: 'HS-lead', + }, + ], + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '', + referrer: '', + search: '', + title: '', + url: '', + }, + }, + type: 'identify', + traits: { + firstname: 'Test Hubspot', + anonymousId: '12345', + country: 'India', + }, + messageId: '50360b9c-ea8d-409c-b672-c9230f91cce5', + originalTimestamp: '2019-10-15T09:35:31.288Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + authorizationType: 'newPrivateAppApi', + hubID: '', + apiKey: '', + accessToken: 'dummy-access-token', + apiVersion: 'newApi', + lookupField: 'lookupField', + hubspotEvents: [], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + userId: '', + type: 'REST', + method: 'POST', + endpoint: 'https://api.hubapi.com/crm/v3/objects/lead', + source: 'rETL', + operation: 'createObject', + headers: { + Authorization: 'Bearer dummy-access-token', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + properties: { + firstname: 'Test Hubspot', + anonymousId: '12345', + country: 'India', + email: 'testhubspot@email.com', + }, + }, + XML: {}, + FORM: {}, + JSON_ARRAY: {}, + }, + files: {}, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'hs', + description: '[HS] (newApiKey): trigger update all objects endpoint for rETL source', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + description: '[HS] (newApiKey): trigger update all objects endpoint for rETL source', + message: { + channel: 'web', + context: { + mappedToDestination: true, + externalId: [ + { + identifierType: 'email', + id: 'testhubspot2@email.com', + type: 'HS-lead', + }, + ], + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '', + referrer: '', + search: '', + title: '', + url: '', + }, + }, + type: 'identify', + traits: { + firstname: 'Test Hubspot', + anonymousId: '12345', + country: 'India', + }, + messageId: '50360b9c-ea8d-409c-b672-c9230f91cce5', + originalTimestamp: '2019-10-15T09:35:31.288Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + authorizationType: 'newPrivateAppApi', + hubID: '', + apiKey: '', + accessToken: 'dummy-access-token', + apiVersion: 'newApi', + lookupField: 'lookupField', + hubspotEvents: [], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + userId: '', + method: 'PATCH', + endpoint: 'https://api.hubapi.com/crm/v3/objects/lead/103605', + source: 'rETL', + operation: 'updateObject', + headers: { + Authorization: 'Bearer dummy-access-token', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + properties: { + firstname: 'Test Hubspot', + anonymousId: '12345', + country: 'India', + email: 'testhubspot2@email.com', + }, + }, + XML: {}, + FORM: {}, + JSON_ARRAY: {}, + }, + files: {}, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'hs', + description: 'Test 14', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: {}, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + type: 'track', + messageId: '08829772-d991-427c-b976-b4c4f4430b4e', + originalTimestamp: '2019-10-15T09:35:31.291Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + event: 'test track event HS', + sentAt: '2019-10-14T11:15:53.296Z', + properties: { + email: 'testhubspot2@email.com', + firstname: 'Test Hubspot', + }, + }, + destination: { + Config: { + apiKey: 'dummy-apikey', + hubID: 'dummy-hubId', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'GET', + messageType: 'track', + endpoint: 'https://track.hubspot.com/v1/event', + headers: { + 'Content-Type': 'application/json', + }, + params: { + _a: 'dummy-hubId', + _n: 'test track event HS', + email: 'testhubspot2@email.com', + firstname: 'Test Hubspot', + }, + body: { + JSON: {}, + XML: {}, + FORM: {}, + JSON_ARRAY: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'hs', + description: 'Test 15', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + description: '[HS] (legacyApi): use (API Key) - check external id i.e hubspotId', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'testhubspot2@email.com', + firstname: 'Test Hubspot', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'hubspotId', + id: '6556', + }, + ], + }, + type: 'track', + messageId: '08829772-d991-427c-b976-b4c4f4430b4e', + originalTimestamp: '2019-10-15T09:35:31.291Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + event: 'test track event HS 2', + properties: { + user_actual_role: 'system_admin, system_user', + user_actual_id: 12345, + }, + sentAt: '2019-10-14T11:15:53.296Z', + }, + destination: { + Config: { + apiKey: 'dummy-apikey', + hubID: 'dummy-hubId', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'GET', + messageType: 'track', + endpoint: 'https://track.hubspot.com/v1/event', + headers: { + 'Content-Type': 'application/json', + }, + params: { + _a: 'dummy-hubId', + _n: 'test track event HS 2', + id: '6556', + email: 'testhubspot2@email.com', + firstname: 'Test Hubspot', + }, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'hs', + description: 'Test 16', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + description: '[HS] (legacyApi): use (API Key) - check HS common config mappings', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'hubspotId', + id: '6556', + }, + ], + }, + type: 'track', + messageId: '08829772-d991-427c-b976-b4c4f4430b4e', + originalTimestamp: '2019-10-15T09:35:31.291Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + event: 'test track event HS 2', + properties: { + user_actual_role: 'system_admin, system_user', + user_actual_id: 12345, + address: { + street: '24. park', + }, + company: { + name: 'RudderStack', + }, + }, + sentAt: '2019-10-14T11:15:53.296Z', + }, + destination: { + Config: { + apiKey: 'dummy-apikey', + hubID: 'dummy-hubId', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'GET', + messageType: 'track', + endpoint: 'https://track.hubspot.com/v1/event', + headers: { + 'Content-Type': 'application/json', + }, + params: { + _a: 'dummy-hubId', + _n: 'test track event HS 2', + id: '6556', + address: '24. park', + company: 'RudderStack', + }, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'hs', + description: 'Test 17', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + description: '[HS] (legacyApi): use (newPrivateAppApi) for contact endpoint', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'testhubspot2@email.com', + firstname: 'Test Hubspot', + anonymousId: '12345', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '', + referrer: '', + search: '', + title: '', + url: '', + }, + }, + type: 'identify', + messageId: '50360b9c-ea8d-409c-b672-c9230f91cce5', + originalTimestamp: '2019-10-15T09:35:31.288Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + authorizationType: 'newPrivateAppApi', + hubID: 'dummy-hubId', + apiKey: 'dummy-apikey', + accessToken: 'dummy-access-token', + apiVersion: 'legacyApi', + lookupField: '', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + userId: '', + method: 'POST', + endpoint: + 'https://api.hubapi.com/contacts/v1/contact/createOrUpdate/email/testhubspot2@email.com', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer dummy-access-token', + }, + params: {}, + body: { + JSON: { + properties: [ + { + property: 'email', + value: 'testhubspot2@email.com', + }, + { + property: 'firstname', + value: 'Test Hubspot', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'hs', + description: 'Test 18', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + description: + '[HS] (newApi): get contact from hs with email (lookupField) exactly matching with one contact', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'testhubspot@email.com', + firstname: 'Test Hubspot', + anonymousId: '12345', + lookupField: 'email', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '', + referrer: '', + search: '', + title: '', + url: '', + }, + }, + type: 'identify', + messageId: '50360b9c-ea8d-409c-b672-c9230f91cce5', + originalTimestamp: '2019-10-15T09:35:31.288Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + authorizationType: 'newPrivateAppApi', + accessToken: 'dummy-access-tokensuccess', + hubID: 'dummy-hubId', + apiKey: 'dummy-apikey', + apiVersion: 'newApi', + lookupField: 'lookupField', + hubspotEvents: [], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + userId: '', + method: 'POST', + endpoint: 'https://api.hubapi.com/crm/v3/objects/contacts/103604', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer dummy-access-tokensuccess', + }, + params: {}, + operation: 'updateContacts', + body: { + JSON: { + properties: { + email: 'testhubspot@email.com', + firstname: 'Test Hubspot', + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'hs', + description: 'Test 19', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + description: + '[HS] (newApi): get contact from hs with email (lookupField) having no contacts', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'noname@email.com', + firstname: 'Test Hubspot', + anonymousId: '12345', + lookupField: 'email', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '', + referrer: '', + search: '', + title: '', + url: '', + }, + }, + type: 'identify', + messageId: '50360b9c-ea8d-409c-b672-c9230f91cce5', + originalTimestamp: '2019-10-15T09:35:31.288Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + authorizationType: 'newPrivateAppApi', + accessToken: 'dummy-access-token', + hubID: 'dummy-hubId', + apiKey: 'dummy-apikey', + apiVersion: 'newApi', + lookupField: 'email', + hubspotEvents: [], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + userId: '', + method: 'POST', + endpoint: 'https://api.hubapi.com/crm/v3/objects/contacts', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer dummy-access-token', + }, + params: {}, + operation: 'createContacts', + body: { + JSON: { + properties: { + email: 'noname@email.com', + firstname: 'Test Hubspot', + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'hs', + description: 'Test 20', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + description: + '[HS] (newApi): get contact from hs with firstname (lookupField) having more than one result', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'nonamess@email.com', + firstname: 'Jhon', + anonymousId: '12345', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '', + referrer: '', + search: '', + title: '', + url: '', + }, + }, + type: 'identify', + messageId: '50360b9c-ea8d-409c-b672-c9230f91cce5', + originalTimestamp: '2019-10-15T09:35:31.288Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + authorizationType: 'newPrivateAppApi', + accessToken: 'dummy-access-tokenmultiple', + hubID: 'dummy-hubId', + apiKey: 'dummy-apikey', + apiVersion: 'newApi', + lookupField: 'firstname', + hubspotEvents: [], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: + 'Unable to get single Hubspot contact. More than one contacts found. Retry with unique lookupPropertyName and lookupValue', + statTags: { + destType: 'HS', + errorCategory: 'network', + errorType: 'aborted', + feature: 'processor', + implementation: 'native', + meta: 'instrumentation', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'hs', + description: 'Test 21', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + description: '[HS] (newApi): Track - validate properties of custom behavioral events', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'testhubspot2@email.com', + firstname: 'Test Hubspot', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + type: 'track', + messageId: '08829772-d991-427c-b976-b4c4f4430b4e', + originalTimestamp: '2019-10-15T09:35:31.291Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + event: 'Purchase', + properties: { + user_actual_role: 'system_admin, system_user', + user_actual_id: 12345, + Revenue: 100, + }, + sentAt: '2019-10-14T11:15:53.296Z', + }, + destination: { + Config: { + authorizationType: 'newPrivateAppApi', + hubID: '1', + apiKey: '1', + accessToken: 'dummy-access-token', + apiVersion: 'newApi', + lookupField: 'lookupField', + hubspotEvents: [ + { + rsEventName: 'Purchase', + hubspotEventName: 'pe22315509_rs_hub_test', + eventProperties: [ + { + from: 'Revenue', + to: 'value', + }, + { + from: 'Price', + to: 'cost', + }, + ], + }, + { + rsEventName: 'Order Complete', + hubspotEventName: 'pe22315509_rs_hub_chair', + eventProperties: [ + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, + ], + }, + ], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + messageType: 'track', + endpoint: 'https://api.hubapi.com/events/v3/send', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer dummy-access-token', + }, + params: {}, + body: { + JSON: { + email: 'testhubspot2@email.com', + occurredAt: '2019-10-15T09:35:31.291Z', + eventName: 'pe22315509_rs_hub_test', + properties: { + value: 100, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'hs', + description: 'Test 22', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + description: + '[HS] (legacyApi): (legacyApiKey) Identify - testing legacy api with new destination config', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'testhubspot2@email.com', + firstname: 'Test Hubspot', + anonymousId: '12345', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '', + referrer: '', + search: '', + title: '', + url: '', + }, + }, + type: 'identify', + messageId: '50360b9c-ea8d-409c-b672-c9230f91cce5', + originalTimestamp: '2019-10-15T09:35:31.288Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + authorizationType: 'legacyApiKey', + hubID: 'dummy-hubId', + apiKey: 'dummy-apikey', + accessToken: '', + apiVersion: 'legacyApi', + lookupField: 'lookupField', + hubspotEvents: [ + { + rsEventName: 'Purchase', + hubspotEventName: 'pe22315509_rs_hub_test', + eventProperties: [ + { + from: 'Revenue', + to: 'value', + }, + { + from: 'Price', + to: 'cost', + }, + ], + }, + { + rsEventName: 'Order Complete', + hubspotEventName: 'pe22315509_rs_hub_chair', + eventProperties: [ + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, + ], + }, + ], + eventFilteringOption: 'disable', + whitelistedEvents: [ + { + eventName: '', + }, + ], + blacklistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + userId: '', + method: 'POST', + endpoint: + 'https://api.hubapi.com/contacts/v1/contact/createOrUpdate/email/testhubspot2@email.com', + headers: { + 'Content-Type': 'application/json', + }, + params: { + hapikey: 'dummy-apikey', + }, + body: { + JSON: { + properties: [ + { + property: 'email', + value: 'testhubspot2@email.com', + }, + { + property: 'firstname', + value: 'Test Hubspot', + }, + ], + }, + XML: {}, + FORM: {}, + JSON_ARRAY: {}, + }, + files: {}, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'hs', + description: 'Test 23', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + description: + '[HS] (legacyApi): (legacyApiKey) Track - testing legacy api with new destination config', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'testhubspot2@email.com', + firstname: 'Test Hubspot', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + type: 'track', + messageId: '08829772-d991-427c-b976-b4c4f4430b4e', + originalTimestamp: '2019-10-15T09:35:31.291Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + event: 'test track event HS', + properties: { + user_actual_role: 'system_admin, system_user', + user_actual_id: 12345, + }, + sentAt: '2019-10-14T11:15:53.296Z', + }, + destination: { + Config: { + authorizationType: 'legacyApiKey', + hubID: 'dummy-hubId', + apiKey: 'dummy-apikey', + accessToken: '', + apiVersion: 'legacyApi', + lookupField: 'lookupField', + hubspotEvents: [ + { + rsEventName: 'Purchase', + hubspotEventName: 'pe22315509_rs_hub_test', + eventProperties: [ + { + from: 'Revenue', + to: 'value', + }, + { + from: 'Price', + to: 'cost', + }, + ], + }, + { + rsEventName: 'Order Complete', + hubspotEventName: 'pe22315509_rs_hub_chair', + eventProperties: [ + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, + ], + }, + ], + eventFilteringOption: 'disable', + whitelistedEvents: [ + { + eventName: '', + }, + ], + blacklistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'GET', + messageType: 'track', + endpoint: 'https://track.hubspot.com/v1/event', + headers: { + 'Content-Type': 'application/json', + }, + params: { + _a: 'dummy-hubId', + _n: 'test track event HS', + email: 'testhubspot2@email.com', + firstname: 'Test Hubspot', + }, + body: { + JSON: {}, + XML: {}, + FORM: {}, + JSON_ARRAY: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'hs', + description: + '[HS] (New API v3) - (newPrivateAppApi) check for email in traits which is the deafult lookup field', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + description: + '[HS] (New API v3) - (newPrivateAppApi) check for email in traits which is the deafult lookup field', + message: { + type: 'identify', + traits: {}, + context: { + externalId: [ + { + id: 'osvaldocostaferreira98@gmail.com', + type: 'HS-contacts', + identifierType: 'email', + }, + ], + mappedToDestination: false, + }, + }, + destination: { + Config: { + authorizationType: 'newPrivateAppApi', + hubID: '', + apiKey: '', + accessToken: 'dummy-access-token', + apiVersion: 'newApi', + lookupField: 'lookupField', + hubspotEvents: [ + { + rsEventName: 'Purchase', + hubspotEventName: 'pe22315509_rs_hub_test', + eventProperties: [ + { + from: 'Revenue', + to: 'value', + }, + { + from: 'Price', + to: 'cost', + }, + ], + }, + { + rsEventName: 'Order Complete', + hubspotEventName: 'pe22315509_rs_hub_chair', + eventProperties: [ + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, + ], + }, + ], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: + 'Identify:: email i.e a default lookup field for contact lookup not found in traits', + statTags: { + destType: 'HS', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'hs', + description: + '[HS] (New API v3) - (newPrivateAppApi) email is present in traits as a default lookup field', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + description: + '[HS] (New API v3) - (newPrivateAppApi) email is present in traits as a default lookup field', + message: { + type: 'identify', + traits: { + email: 'noname@email.com', + }, + context: { + mappedToDestination: false, + }, + }, + destination: { + Config: { + authorizationType: 'newPrivateAppApi', + hubID: '', + apiKey: '', + accessToken: 'dummy-access-token', + apiVersion: 'newApi', + lookupField: 'lookupField', + hubspotEvents: [ + { + rsEventName: 'Purchase', + hubspotEventName: 'pe22315509_rs_hub_test', + eventProperties: [ + { + from: 'Revenue', + to: 'value', + }, + { + from: 'Price', + to: 'cost', + }, + ], + }, + { + rsEventName: 'Order Complete', + hubspotEventName: 'pe22315509_rs_hub_chair', + eventProperties: [ + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, + ], + }, + ], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + userId: '', + method: 'POST', + endpoint: 'https://api.hubapi.com/crm/v3/objects/contacts', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer dummy-access-token', + }, + params: {}, + body: { + JSON: { + properties: { + email: 'noname@email.com', + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + operation: 'createContacts', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'hs', + description: '[HS] (New API v3) - (newPrivateAppApi) - rETL source - minimum config check', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + description: + '[HS] (New API v3) - (newPrivateAppApi) - rETL source - minimum config check', + message: { + type: 'identify', + traits: {}, + context: { + externalId: [ + { + id: 'osvaldocostaferreira98@gmail.com', + type: 'HS-contacts', + identifierType: 'email', + }, + ], + mappedToDestination: 'true', + }, + }, + destination: { + Config: { + authorizationType: 'newPrivateAppApi', + hubID: '', + apiKey: '', + accessToken: 'dummy-access-token', + apiVersion: 'newApi', + lookupField: 'lookupField', + hubspotEvents: [ + { + rsEventName: 'Purchase', + hubspotEventName: 'pe22315509_rs_hub_test', + eventProperties: [ + { + from: 'Revenue', + to: 'value', + }, + { + from: 'Price', + to: 'cost', + }, + ], + }, + { + rsEventName: 'Order Complete', + hubspotEventName: 'pe22315509_rs_hub_chair', + eventProperties: [ + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, + ], + }, + ], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + userId: '', + method: 'POST', + endpoint: 'https://api.hubapi.com/crm/v3/objects/contacts', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer dummy-access-token', + }, + params: {}, + body: { + JSON: { + properties: { + email: 'osvaldocostaferreira98@gmail.com', + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + source: 'rETL', + operation: 'createObject', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'hs', + description: + '[HS] (New API v3) - (newPrivateAppApi) rETL - object type is not provided i.e externalId is empty', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + description: + '[HS] (New API v3) - (newPrivateAppApi) rETL - object type is not provided i.e externalId is empty', + message: { + type: 'identify', + traits: {}, + context: { + mappedToDestination: 'true', + }, + }, + destination: { + Config: { + authorizationType: 'newPrivateAppApi', + hubID: '', + apiKey: '', + accessToken: 'dummy-access-token', + apiVersion: 'newApi', + lookupField: 'lookupField', + hubspotEvents: [ + { + rsEventName: 'Purchase', + hubspotEventName: 'pe22315509_rs_hub_test', + eventProperties: [ + { + from: 'Revenue', + to: 'value', + }, + { + from: 'Price', + to: 'cost', + }, + ], + }, + { + rsEventName: 'Order Complete', + hubspotEventName: 'pe22315509_rs_hub_chair', + eventProperties: [ + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, + ], + }, + ], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'rETL - external Id not found.', + statTags: { + destType: 'HS', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'hs', + description: '[HS] (New API v3) - (newPrivateAppApi) sample track call for property check', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + description: + '[HS] (New API v3) - (newPrivateAppApi) sample track call for property check', + message: { + type: 'track', + traits: {}, + context: { + externalId: [ + { + id: 'osvaldocostaferreira98@gmail.com', + type: 'HS-contacts', + identifierType: 'email', + }, + ], + }, + event: 'Purchase', + properties: { + Revenue: 'name1', + }, + }, + destination: { + Config: { + authorizationType: 'newPrivateAppApi', + hubID: '', + apiKey: '', + accessToken: 'dummy-access-token', + apiVersion: 'newApi', + lookupField: 'lookupField', + hubspotEvents: [ + { + rsEventName: 'Purchase', + hubspotEventName: 'pe22315509_rs_hub_test', + eventProperties: [ + { + from: 'Revenue', + to: 'value', + }, + { + from: 'Price', + to: 'cost', + }, + ], + }, + { + rsEventName: 'Order Complete', + hubspotEventName: 'pe22315509_rs_hub_chair', + eventProperties: [ + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, + ], + }, + ], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.hubapi.com/events/v3/send', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer dummy-access-token', + }, + params: {}, + body: { + JSON: { + email: 'osvaldocostaferreira98@gmail.com', + eventName: 'pe22315509_rs_hub_test', + properties: { + value: 'name1', + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + messageType: 'track', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'hs', + description: '[HS] (New API v3) - (newPrivateAppApi) - check for accesstoken existence', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + description: '[HS] (New API v3) - (newPrivateAppApi) - check for accesstoken existence', + message: { + type: 'identify', + traits: { + lookupField: 'firstname', + firstname: 'Test', + }, + context: { + externalId: [ + { + id: 'osvaldocostaferreira98@gmail.com', + type: 'HS-contacts', + identifierType: 'email', + }, + ], + }, + event: 'Purchase', + properties: { + revenue: 'name1', + }, + }, + destination: { + Config: { + authorizationType: 'newPrivateAppApi', + hubID: '', + apiKey: '', + accessToken: '', + apiVersion: 'newApi', + lookupField: 'lookupField', + hubspotEvents: [ + { + rsEventName: 'Purchase', + hubspotEventName: 'pe22315509_rs_hub_test', + eventProperties: [ + { + from: 'Revenue', + to: 'value', + }, + { + from: 'Price', + to: 'cost', + }, + ], + }, + { + rsEventName: 'Order Complete', + hubspotEventName: 'pe22315509_rs_hub_chair', + eventProperties: [ + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, + ], + }, + ], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Access Token not found. Aborting', + statTags: { + destType: 'HS', + errorCategory: 'dataValidation', + errorType: 'configuration', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'hs', + description: '[HS] (New API v3) - (legacyApiKey) - check for hubId existence', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + description: '[HS] (New API v3) - (legacyApiKey) - check for hubId existence', + message: { + type: 'identify', + traits: { + lookupField: 'firstname', + firstname: 'Test', + }, + context: { + externalId: [ + { + id: 'osvaldocostaferreira98@gmail.com', + type: 'HS-contacts', + identifierType: 'email', + }, + ], + }, + event: 'Purchase', + properties: { + revenue: 'name1', + }, + }, + destination: { + Config: { + authorizationType: 'legacyApiKey', + hubID: '', + apiKey: '', + accessToken: '', + apiVersion: 'newApi', + lookupField: 'lookupField', + hubspotEvents: [ + { + rsEventName: 'Purchase', + hubspotEventName: 'pe22315509_rs_hub_test', + eventProperties: [ + { + from: 'Revenue', + to: 'value', + }, + { + from: 'Price', + to: 'cost', + }, + ], + }, + { + rsEventName: 'Order Complete', + hubspotEventName: 'pe22315509_rs_hub_chair', + eventProperties: [ + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, + ], + }, + ], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Hub ID not found. Aborting', + statTags: { + destType: 'HS', + errorCategory: 'dataValidation', + errorType: 'configuration', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'hs', + description: '[HS] (New API v3) - (legacyApiKey) - check basic track call', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + description: '[HS] (New API v3) - (legacyApiKey) - check basic track call', + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + type: 'track', + messageId: '08829772-d991-427c-b976-b4c4f4430b4e', + originalTimestamp: '2019-10-15T09:35:31.291Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + event: 'Purchase', + properties: { + user_actual_role: 'system_admin, system_user', + user_actual_id: 12345, + address: { + city: 'kolkata', + country: 'India', + }, + objectId: '5005', + }, + sentAt: '2019-10-14T11:15:53.296Z', + }, + destination: { + Config: { + authorizationType: 'legacyApiKey', + hubID: 'dummy-hubId', + apiKey: 'dummy-apikey', + accessToken: '', + apiVersion: 'newApi', + lookupField: 'lookupField', + hubspotEvents: [ + { + rsEventName: 'Purchase', + hubspotEventName: 'pe22315509_rs_hub_test', + eventProperties: [ + { + from: 'Revenue', + to: 'value', + }, + { + from: 'Price', + to: 'cost', + }, + ], + }, + { + rsEventName: 'Order Complete', + hubspotEventName: 'pe22315509_rs_hub_chair', + eventProperties: [ + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, + ], + }, + ], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.hubapi.com/events/v3/send?hapikey=dummy-apikey', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + occurredAt: '2019-10-15T09:35:31.291Z', + objectId: '5005', + eventName: 'pe22315509_rs_hub_test', + properties: { + hs_city: 'kolkata', + hs_country: 'India', + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + messageType: 'track', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'hs', + description: + '[HS] (New API v3) - (legacyApiKey) - either of email, utk or objectId must be present', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + description: + '[HS] (New API v3) - (legacyApiKey) - either of email, utk or objectId must be present', + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + type: 'track', + messageId: '08829772-d991-427c-b976-b4c4f4430b4e', + originalTimestamp: '2019-10-15T09:35:31.291Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + event: 'Purchase', + properties: { + user_actual_role: 'system_admin, system_user', + user_actual_id: 12345, + address: { + city: 'kolkata', + country: 'India', + }, + }, + sentAt: '2019-10-14T11:15:53.296Z', + }, + destination: { + Config: { + authorizationType: 'legacyApiKey', + hubID: 'dummy-hubId', + apiKey: 'dummy-apikey', + accessToken: '', + apiVersion: 'newApi', + lookupField: 'lookupField', + hubspotEvents: [ + { + rsEventName: 'Purchase', + hubspotEventName: 'pe22315509_rs_hub_test', + eventProperties: [ + { + from: 'Revenue', + to: 'value', + }, + { + from: 'Price', + to: 'cost', + }, + ], + }, + { + rsEventName: 'Order Complete', + hubspotEventName: 'pe22315509_rs_hub_chair', + eventProperties: [ + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, + ], + }, + ], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Either of email, utk or objectId is required for custom behavioral events', + statTags: { + destType: 'HS', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'hs', + description: 'Test 33', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + description: '[HS] (newApi): check for legacyApiKey', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'noname@email.com', + firstname: 'Test Hubspot', + anonymousId: '12345', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '', + referrer: '', + search: '', + title: '', + url: '', + }, + }, + type: 'identify', + messageId: '50360b9c-ea8d-409c-b672-c9230f91cce5', + originalTimestamp: '2019-10-15T09:35:31.288Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + authorizationType: 'legacyApiKey', + accessToken: 'dummy-access-token', + hubID: 'dummy-hubId', + apiKey: 'dummy-apikeysuccess', + apiVersion: 'newApi', + lookupField: 'email', + hubspotEvents: [], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + userId: '', + method: 'POST', + endpoint: 'https://api.hubapi.com/crm/v3/objects/contacts', + headers: { + 'Content-Type': 'application/json', + }, + params: { + hapikey: 'dummy-apikeysuccess', + }, + operation: 'createContacts', + body: { + JSON: { + properties: { + email: 'noname@email.com', + firstname: 'Test Hubspot', + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'hs', + description: '[HS] (New API v3) - (newPrivateAppApi) message type not present', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + description: '[HS] (New API v3) - (newPrivateAppApi) message type not present', + message: { + traits: {}, + context: { + externalId: [ + { + id: 'osvaldocostaferreira98@gmail.com', + type: 'HS-contacts', + identifierType: 'email', + }, + ], + }, + event: 'Purchase', + properties: { + revenue: 'name1', + }, + }, + destination: { + Config: { + authorizationType: 'newPrivateAppApi', + hubID: '', + apiKey: '', + accessToken: 'dummy-access-token', + apiVersion: 'newApi', + lookupField: 'lookupField', + hubspotEvents: [ + { + rsEventName: 'Purchase', + hubspotEventName: 'pe22315509_rs_hub_test', + eventProperties: [ + { + from: 'Revenue', + to: 'value', + }, + { + from: 'Price', + to: 'cost', + }, + ], + }, + { + rsEventName: 'Order Complete', + hubspotEventName: 'pe22315509_rs_hub_chair', + eventProperties: [ + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, + ], + }, + ], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Message type is not present. Aborting message.', + statTags: { + destType: 'HS', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'hs', + description: '[HS] (New API v3) - (legacyApiKey) - check for api key existence', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + description: '[HS] (New API v3) - (legacyApiKey) - check for api key existence', + message: { + type: 'identify', + traits: { + lookupField: 'firstname', + firstname: 'Test', + }, + context: { + externalId: [ + { + id: 'osvaldocostaferreira98@gmail.com', + type: 'HS-contacts', + identifierType: 'email', + }, + ], + }, + event: 'Purchase', + properties: { + revenue: 'name1', + }, + }, + destination: { + Config: { + authorizationType: 'legacyApiKey', + hubID: 'dummy-hubId', + apiKey: '', + accessToken: '', + apiVersion: 'newApi', + lookupField: 'lookupField', + hubspotEvents: [ + { + rsEventName: 'Purchase', + hubspotEventName: 'pe22315509_rs_hub_test', + eventProperties: [ + { + from: 'Revenue', + to: 'value', + }, + { + from: 'Price', + to: 'cost', + }, + ], + }, + { + rsEventName: 'Order Complete', + hubspotEventName: 'pe22315509_rs_hub_chair', + eventProperties: [ + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, + ], + }, + ], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'API Key not found. Aborting', + statTags: { + destType: 'HS', + errorCategory: 'dataValidation', + errorType: 'configuration', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'hs', + description: '[HS] (New API v3) - (newPrivateAppApi) Identify: traits is not supplied', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + description: '[HS] (New API v3) - (newPrivateAppApi) Identify: traits is not supplied', + message: { + type: 'identify', + context: { + mappedToDestination: false, + }, + }, + destination: { + Config: { + authorizationType: 'newPrivateAppApi', + hubID: '', + apiKey: '', + accessToken: 'dummy-access-token', + apiVersion: 'newApi', + lookupField: 'lookupField', + hubspotEvents: [ + { + rsEventName: 'Purchase', + hubspotEventName: 'pe22315509_rs_hub_test', + eventProperties: [ + { + from: 'Revenue', + to: 'value', + }, + { + from: 'Price', + to: 'cost', + }, + ], + }, + { + rsEventName: 'Order Complete', + hubspotEventName: 'pe22315509_rs_hub_chair', + eventProperties: [ + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, + ], + }, + ], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Identify - Invalid traits value for lookup field', + statTags: { + destType: 'HS', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'hs', + description: '[HS] (New API v3) - (legacyApiKey) - event not found', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + description: '[HS] (New API v3) - (legacyApiKey) - event not found', + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + type: 'track', + messageId: '08829772-d991-427c-b976-b4c4f4430b4e', + originalTimestamp: '2019-10-15T09:35:31.291Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + event: 'Temp Event', + properties: { + user_actual_role: 'system_admin, system_user', + user_actual_id: 12345, + address: { + city: 'kolkata', + country: 'India', + }, + objectId: '5005', + }, + sentAt: '2019-10-14T11:15:53.296Z', + }, + destination: { + Config: { + authorizationType: 'legacyApiKey', + hubID: 'dummy-hubId', + apiKey: 'dummy-apikey', + accessToken: '', + apiVersion: 'newApi', + lookupField: 'lookupField', + hubspotEvents: [ + { + rsEventName: 'Purchase', + hubspotEventName: 'pe22315509_rs_hub_test', + eventProperties: [ + { + from: 'Revenue', + to: 'value', + }, + { + from: 'Price', + to: 'cost', + }, + ], + }, + { + rsEventName: 'Order Complete', + hubspotEventName: 'pe22315509_rs_hub_chair', + eventProperties: [ + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, + ], + }, + ], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: "Event name 'temp event' mappings are not configured in the destination", + statTags: { + destType: 'HS', + errorCategory: 'dataValidation', + errorType: 'configuration', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'hs', + description: '[HS] (New API v3) - (legacyApiKey) - event name is required', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + description: '[HS] (New API v3) - (legacyApiKey) - event name is required', + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + type: 'track', + messageId: '08829772-d991-427c-b976-b4c4f4430b4e', + originalTimestamp: '2019-10-15T09:35:31.291Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + properties: { + user_actual_role: 'system_admin, system_user', + user_actual_id: 12345, + address: { + city: 'kolkata', + country: 'India', + }, + objectId: '5005', + }, + sentAt: '2019-10-14T11:15:53.296Z', + }, + destination: { + Config: { + authorizationType: 'legacyApiKey', + hubID: 'dummy-hubId', + apiKey: 'dummy-apikey', + accessToken: '', + apiVersion: 'newApi', + lookupField: 'lookupField', + hubspotEvents: [ + { + rsEventName: 'Purchase', + hubspotEventName: 'pe22315509_rs_hub_test', + eventProperties: [ + { + from: 'Revenue', + to: 'value', + }, + { + from: 'Price', + to: 'cost', + }, + ], + }, + { + rsEventName: 'Order Complete', + hubspotEventName: 'pe22315509_rs_hub_chair', + eventProperties: [ + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, + ], + }, + ], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'event name is required for track call', + statTags: { + destType: 'HS', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'hs', + description: + '[HS] (Legacy API v1) - (newPrivateAppApi) rETL - object type is not provided i.e externalId is empty', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + description: + '[HS] (Legacy API v1) - (newPrivateAppApi) rETL - object type is not provided i.e externalId is empty', + message: { + type: 'identify', + traits: {}, + context: { + mappedToDestination: 'true', + }, + }, + destination: { + Config: { + authorizationType: 'newPrivateAppApi', + hubID: '', + apiKey: '', + accessToken: 'dummy-access-token', + apiVersion: 'legacyApi', + lookupField: 'lookupField', + hubspotEvents: [ + { + rsEventName: 'Purchase', + hubspotEventName: 'pe22315509_rs_hub_test', + eventProperties: [ + { + from: 'Revenue', + to: 'value', + }, + { + from: 'Price', + to: 'cost', + }, + ], + }, + { + rsEventName: 'Order Complete', + hubspotEventName: 'pe22315509_rs_hub_chair', + eventProperties: [ + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, + ], + }, + ], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'rETL - external Id not found.', + statTags: { + destType: 'HS', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'hs', + description: + '[HS] (Legacy API v1) - (newPrivateAppApi) - sample track call for legacy api with newPrivateAppApi', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + description: + '[HS] (Legacy API v1) - (newPrivateAppApi) - sample track call for legacy api with newPrivateAppApi', + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'testhubspot2@email.com', + firstname: 'Test Hubspot', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + type: 'track', + messageId: '08829772-d991-427c-b976-b4c4f4430b4e', + originalTimestamp: '2019-10-15T09:35:31.291Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + event: 'test track event HS', + properties: { + user_actual_role: 'system_admin, system_user', + user_actual_id: 12345, + }, + sentAt: '2019-10-14T11:15:53.296Z', + }, + destination: { + Config: { + apiKey: 'dummy-apikey', + hubID: 'dummy-hubId', + authorizationType: 'newPrivateAppApi', + accessToken: 'dummy-access-token', + apiVersion: 'legacyApi', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'GET', + messageType: 'track', + endpoint: 'https://track.hubspot.com/v1/event', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer dummy-access-token', + }, + params: { + _a: 'dummy-hubId', + _n: 'test track event HS', + email: 'testhubspot2@email.com', + firstname: 'Test Hubspot', + }, + body: { + JSON: {}, + XML: {}, + FORM: {}, + JSON_ARRAY: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'hs', + description: 'Test 41', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + mappedToDestination: true, + externalId: [ + { + identifierType: 'email', + id: 'testhubspot2@email.com', + type: 'HS-lead', + }, + ], + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '', + referrer: '', + search: '', + title: '', + url: '', + }, + }, + type: 'identify', + traits: { + firstname: 'Test Hubspot', + anonymousId: '12345', + country: 'India', + }, + messageId: '50360b9c-ea8d-409c-b672-c9230f91cce5', + originalTimestamp: '2019-10-15T09:35:31.288Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + metadata: { + jobId: 2, + }, + destination: { + Config: { + apiKey: 'rate-limit-id', + hubID: 'dummy-hubId', + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + name: 'Hubspot', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmLd', + deleted: false, + createdAt: '2020-12-30T08:39:32.005Z', + updatedAt: '2021-02-03T16:22:31.374Z', + destinationDefinition: { + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'HS', + displayName: 'Hubspot', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: + '{"message":"rETL - Error during searching object record. Request Rate Limit reached","destinationResponse":{"response":{"status":"error","message":"Request Rate Limit reached","correlationId":"4d39ff11-e121-4514-bcd8-132a9dd1ff50","category":"RATE-LIMIT_REACHED","links":{"api key":"https://app.hubspot.com/l/api-key/"}},"status":429}}', + metadata: { + jobId: 2, + }, + statTags: { + destType: 'HS', + errorCategory: 'network', + errorType: 'throttled', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 429, + }, + ], + }, + }, + }, + { + name: 'hs', + description: 'Test 42', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '', + referrer: '', + search: '', + title: '', + url: '', + }, + traits: { + email: 'testhubspot2@email.com', + firstname: 'Test Hubspot', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + days_to_close: '29 days to close', + }, + }, + type: 'identify', + messageId: '50360b9c-ea8d-409c-b672-c9230f91cce5', + originalTimestamp: '2023-04-11T09:35:31.288Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + userId: 'user@1', + integrations: { + All: true, + }, + }, + destination: { + Config: { + apiKey: 'dummy-apikey', + hubID: 'dummy-hubId', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: + 'Property days_to_close data type string is not matching with Hubspot property data type number', + statTags: { + destType: 'HS', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'hs', + description: 'Test 43', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'testhubspot2@email.com', + firstname: 'Test Hubspot', + anonymousId: '12345', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + type: 'identify', + messageId: 'e8585d9a-7137-4223-b295-68ab1b17dad7', + originalTimestamp: '2019-10-15T09:35:31.289Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + properties: {}, + integrations: { + All: true, + }, + name: 'ApplicationLoaded', + sentAt: '2019-10-14T11:15:53.296Z', + }, + destination: { + Config: { + apiKey: 'dummy-apikey', + hubID: 'dummy-hubId', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + FORM: {}, + JSON: { + properties: [ + { + property: 'email', + value: 'testhubspot2@email.com', + }, + { + property: 'firstname', + value: 'Test Hubspot', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + }, + endpoint: + 'https://api.hubapi.com/contacts/v1/contact/createOrUpdate/email/testhubspot2@email.com', + files: {}, + headers: { + 'Content-Type': 'application/json', + }, + method: 'POST', + params: { + hapikey: 'dummy-apikey', + }, + type: 'REST', + userId: '', + version: '1', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'hs', + description: 'Test 44', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'testhubspot2@email.com', + firstname: 'Test Hubspot', + anonymousId: '12345', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + type: 'identify', + messageId: 'e8585d9a-7137-4223-b295-68ab1b17dad7', + originalTimestamp: '2019-10-15T09:35:31.289Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + integrations: { + All: true, + }, + name: 'ApplicationLoaded', + sentAt: '2019-10-14T11:15:53.296Z', + }, + destination: { + Config: { + apiKey: 'dummy-apikey', + hubID: 'dummy-hubId', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + FORM: {}, + JSON: { + properties: [ + { + property: 'email', + value: 'testhubspot2@email.com', + }, + { + property: 'firstname', + value: 'Test Hubspot', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + }, + endpoint: + 'https://api.hubapi.com/contacts/v1/contact/createOrUpdate/email/testhubspot2@email.com', + files: {}, + headers: { + 'Content-Type': 'application/json', + }, + method: 'POST', + params: { + hapikey: 'dummy-apikey', + }, + type: 'REST', + userId: '', + version: '1', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'hs', + description: 'Test 45', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'testhubspot2@email.com', + firstname: 'Test Hubspot', + anonymousId: '12345', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + type: 'identify', + messageId: 'e8585d9a-7137-4223-b295-68ab1b17dad7', + originalTimestamp: '2019-10-15T09:35:31.289Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + properties: '', + integrations: { + All: true, + }, + name: 'ApplicationLoaded', + sentAt: '2019-10-14T11:15:53.296Z', + }, + destination: { + Config: { + apiKey: 'dummy-apikey', + hubID: 'dummy-hubId', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + FORM: {}, + JSON: { + properties: [ + { + property: 'email', + value: 'testhubspot2@email.com', + }, + { + property: 'firstname', + value: 'Test Hubspot', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + }, + endpoint: + 'https://api.hubapi.com/contacts/v1/contact/createOrUpdate/email/testhubspot2@email.com', + files: {}, + headers: { + 'Content-Type': 'application/json', + }, + method: 'POST', + params: { + hapikey: 'dummy-apikey', + }, + type: 'REST', + userId: '', + version: '1', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'hs', + description: + '[HS] (New API v3) - (newPrivateAppApi) sample track call when hubspotEvents is undefined', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + description: + '[HS] (New API v3) - (newPrivateAppApi) sample track call when hubspotEvents is undefined', + message: { + type: 'track', + traits: {}, + context: { + externalId: [ + { + id: 'osvaldocostaferreira98@gmail.com', + type: 'HS-contacts', + identifierType: 'email', + }, + ], + }, + event: 'Purchase', + properties: { + Revenue: 'name1', + }, + }, + destination: { + Config: { + authorizationType: 'newPrivateAppApi', + hubID: '', + apiKey: '', + accessToken: 'dummy-access-token', + apiVersion: 'newApi', + lookupField: 'lookupField', + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Event and property mappings are required for track call', + statTags: { + destType: 'HS', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, +]; diff --git a/test/integrations/destinations/hs/router/data.ts b/test/integrations/destinations/hs/router/data.ts new file mode 100644 index 0000000000..95d9d88212 --- /dev/null +++ b/test/integrations/destinations/hs/router/data.ts @@ -0,0 +1,2245 @@ +export const data = [ + { + name: 'hs', + description: 'router associated retl test', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + destination: { + ID: '123', + Config: { + authorizationType: 'newPrivateAppApi', + accessToken: 'pat-123', + apiVersion: 'newApi', + }, + }, + message: { + type: 'identify', + sentAt: '2022-08-23T05:59:38.214Z', + traits: { + to: { + id: 1, + }, + from: { + id: 9405415215, + }, + }, + userId: '1', + channel: 'sources', + context: { + sources: { + job_id: '2DkDam0hJ8CXZA43zksWMdPAPRe/Syncher', + task_id: 'HUBSPOT_ASSOC_COMPANY_CONTACT', + version: 'v1.8.15', + batch_id: '8d566f29-5f9b-4fa7-ad0c-d8087ca52d6a', + job_run_id: 'cc26p35qhlpr6fd4jrmg', + task_run_id: 'cc26p35qhlpr6fd4jrn0', + }, + externalId: [ + { + id: 1, + type: 'HS-association', + toObjectType: 'contacts', + fromObjectType: 'companies', + identifierType: 'id', + associationTypeId: 'engineer', + }, + ], + mappedToDestination: 'true', + }, + recordId: '1', + rudderId: '3afcdbfe-b6ec-4bdd-8ba6-28696e3cc163', + messageId: 'e0c554aa-0a9a-4e24-9a9a-c951a71a0875', + timestamp: '2022-08-23T05:59:33.758Z', + receivedAt: '2022-08-23T05:59:33.759Z', + request_ip: '10.1.90.32', + originalTimestamp: '2022-08-23T05:59:38.214Z', + }, + metadata: { + jobId: 2, + }, + }, + ], + destType: 'hs', + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://api.hubapi.com/crm/v3/associations/companies/contacts/batch/create', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer pat-123', + }, + params: {}, + body: { + JSON: { + inputs: [ + { + to: { + id: 1, + }, + from: { + id: 9405415215, + }, + type: 'engineer', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + metadata: [ + { + jobId: 2, + }, + ], + batched: true, + statusCode: 200, + destination: { + ID: '123', + Config: { + authorizationType: 'newPrivateAppApi', + accessToken: 'pat-123', + apiVersion: 'newApi', + }, + }, + }, + ], + }, + }, + }, + }, + { + name: 'hs', + description: 'legacy router tests', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'testhubspot1@email.com', + firstname: 'Test Hubspot1', + anonymousId: '1111', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '', + referrer: '', + search: '', + title: '', + url: '', + }, + }, + type: 'identify', + messageId: '50360b9c-ea8d-409c-b672-c9230f91cce5', + originalTimestamp: '2019-10-15T09:35:31.288Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + metadata: { + jobId: 1, + }, + destination: { + Config: { + apiKey: 'dummy-apikey', + hubID: 'dummy-hubId', + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + name: 'Hubspot', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmLd', + deleted: false, + createdAt: '2020-12-30T08:39:32.005Z', + updatedAt: '2021-02-03T16:22:31.374Z', + destinationDefinition: { + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'HS', + displayName: 'Hubspot', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + }, + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'testhubspot2@email.com', + firstname: 'Test Hubspot2', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + type: 'track', + messageId: '08829772-d991-427c-b976-b4c4f4430b4e', + originalTimestamp: '2019-10-15T09:35:31.291Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + event: 'test track event HS', + properties: { + user_actual_role: 'system_admin, system_user', + user_actual_id: 12345, + }, + sentAt: '2019-10-14T11:15:53.296Z', + }, + metadata: { + jobId: 2, + }, + destination: { + Config: { + apiKey: 'dummy-apikey', + hubID: 'dummy-hubId', + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + name: 'Hubspot', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmLd', + deleted: false, + createdAt: '2020-12-30T08:39:32.005Z', + updatedAt: '2021-02-03T16:22:31.374Z', + destinationDefinition: { + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'HS', + displayName: 'Hubspot', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + }, + { + message: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://api.hubapi.com/contacts/v1/contact/createOrUpdate/email/testhubspot2@email.com', + headers: { + 'Content-Type': 'application/json', + }, + userId: '00000000000000000000000000', + params: { + hapikey: 'dummy-apikey', + }, + body: { + JSON: { + properties: [ + { + property: 'email', + value: 'testhubspot3@email.com', + }, + { + property: 'firstname', + value: 'Test Hubspot3', + }, + ], + }, + XML: {}, + FORM: {}, + }, + files: {}, + statusCode: 200, + }, + metadata: { + jobId: 3, + }, + destination: { + Config: { + apiKey: 'dummy-apikey', + hubID: 'dummy-hubId', + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + name: 'Hubspot', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmLd', + deleted: false, + createdAt: '2020-12-30T08:39:32.005Z', + updatedAt: '2021-02-03T16:22:31.374Z', + destinationDefinition: { + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'HS', + displayName: 'Hubspot', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + }, + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'testhubspot4@email.com', + firstname: 'Test Hubspot4', + anonymousId: '4444', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '', + referrer: '', + search: '', + title: '', + url: '', + }, + }, + type: 'identify', + messageId: '50360b9c-ea8d-409c-b672-c9230f91cce5', + originalTimestamp: '2019-10-15T09:35:31.288Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + metadata: { + jobId: 4, + }, + destination: { + Config: { + apiKey: 'rate-limit-id', + hubID: 'dummy-hubId', + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + name: 'Hubspot', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmLd', + deleted: false, + createdAt: '2020-12-30T08:39:32.005Z', + updatedAt: '2021-02-03T16:22:31.374Z', + destinationDefinition: { + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'HS', + displayName: 'Hubspot', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + }, + ], + destType: 'hs', + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.hubapi.com/contacts/v1/contact/batch/', + headers: { + 'Content-Type': 'application/json', + }, + params: { + hapikey: 'dummy-apikey', + }, + body: { + JSON: {}, + JSON_ARRAY: { + batch: + '[{"email":"testhubspot3@email.com","properties":[{"property":"firstname","value":"Test Hubspot3"}]},{"email":"testhubspot1@email.com","properties":[{"property":"firstname","value":"Test Hubspot1"}]},{"email":"testhubspot4@email.com","properties":[{"property":"firstname","value":"Test Hubspot4"}]}]', + }, + XML: {}, + FORM: {}, + }, + files: {}, + }, + metadata: [ + { + jobId: 3, + }, + { + jobId: 1, + }, + { + jobId: 4, + }, + ], + batched: true, + statusCode: 200, + destination: { + Config: { + apiKey: 'dummy-apikey', + hubID: 'dummy-hubId', + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + name: 'Hubspot', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmLd', + deleted: false, + createdAt: '2020-12-30T08:39:32.005Z', + updatedAt: '2021-02-03T16:22:31.374Z', + destinationDefinition: { + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'HS', + displayName: 'Hubspot', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + }, + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'GET', + endpoint: 'https://track.hubspot.com/v1/event', + headers: { + 'Content-Type': 'application/json', + }, + params: { + _a: 'dummy-hubId', + _n: 'test track event HS', + email: 'testhubspot2@email.com', + firstname: 'Test Hubspot2', + }, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + metadata: [ + { + jobId: 2, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + apiKey: 'dummy-apikey', + hubID: 'dummy-hubId', + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + name: 'Hubspot', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmLd', + deleted: false, + createdAt: '2020-12-30T08:39:32.005Z', + updatedAt: '2021-02-03T16:22:31.374Z', + destinationDefinition: { + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'HS', + displayName: 'Hubspot', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + }, + ], + }, + }, + }, + }, + { + name: 'hs', + description: 'legacy router retl tests', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + message: { + channel: 'web', + context: { + mappedToDestination: true, + externalId: [ + { + identifierType: 'email', + id: 'testhubspot2@email.com', + type: 'HS-lead', + }, + ], + sources: { + job_id: '24c5HJxHomh6YCngEOCgjS5r1KX/Syncher', + task_id: 'vw_rs_mailchimp_mocked_hg_data', + version: 'v1.8.1', + batch_id: 'f252c69d-c40d-450e-bcd2-2cf26cb62762', + job_run_id: 'c8el40l6e87v0c4hkbl0', + task_run_id: 'c8el40l6e87v0c4hkblg', + }, + }, + type: 'identify', + traits: { + firstname: 'Test Hubspot', + anonymousId: '12345', + country: 'India', + }, + messageId: '50360b9c-ea8d-409c-b672-c9230f91cce5', + originalTimestamp: '2019-10-15T09:35:31.288Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + apiKey: 'dummy-apikey', + hubID: 'dummy-hubId', + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + name: 'Hubspot', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmLd', + deleted: false, + createdAt: '2020-12-30T08:39:32.005Z', + updatedAt: '2021-02-03T16:22:31.374Z', + destinationDefinition: { + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'HS', + displayName: 'Hubspot', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + metadata: { + jobId: 2, + }, + }, + { + message: { + channel: 'web', + context: { + mappedToDestination: true, + externalId: [ + { + identifierType: 'email', + id: 'testhubspot@email.com', + type: 'HS-lead', + }, + ], + sources: { + job_id: '24c5HJxHomh6YCngEOCgjS5r1KX/Syncher', + task_id: 'vw_rs_mailchimp_mocked_hg_data', + version: 'v1.8.1', + batch_id: 'f252c69d-c40d-450e-bcd2-2cf26cb62762', + job_run_id: 'c8el40l6e87v0c4hkbl0', + task_run_id: 'c8el40l6e87v0c4hkblg', + }, + }, + type: 'identify', + traits: { + firstname: 'Test Hubspot 1', + anonymousId: '123451', + country: 'India 1', + }, + messageId: '50360b9c-ea8d-409c-b672-c9230f91cce5', + originalTimestamp: '2019-10-15T09:35:31.288Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + apiKey: 'dummy-apikey', + hubID: 'dummy-hubId', + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + name: 'Hubspot', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmLd', + deleted: false, + createdAt: '2020-12-30T08:39:32.005Z', + updatedAt: '2021-02-03T16:22:31.374Z', + destinationDefinition: { + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'HS', + displayName: 'Hubspot', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + metadata: { + jobId: 3, + }, + }, + ], + destType: 'hs', + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.hubapi.com/crm/v3/objects/lead/batch/create', + headers: { + 'Content-Type': 'application/json', + }, + params: { + hapikey: 'dummy-apikey', + }, + body: { + JSON: { + inputs: [ + { + properties: { + firstname: 'Test Hubspot 1', + anonymousId: '123451', + country: 'India 1', + email: 'testhubspot@email.com', + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + metadata: [ + { + jobId: 3, + }, + ], + batched: true, + statusCode: 200, + destination: { + Config: { + apiKey: 'dummy-apikey', + hubID: 'dummy-hubId', + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + name: 'Hubspot', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmLd', + deleted: false, + createdAt: '2020-12-30T08:39:32.005Z', + updatedAt: '2021-02-03T16:22:31.374Z', + destinationDefinition: { + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'HS', + displayName: 'Hubspot', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + }, + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.hubapi.com/crm/v3/objects/lead/batch/update', + headers: { + 'Content-Type': 'application/json', + }, + params: { + hapikey: 'dummy-apikey', + }, + body: { + JSON: { + inputs: [ + { + properties: { + firstname: 'Test Hubspot', + anonymousId: '12345', + country: 'India', + email: 'testhubspot2@email.com', + }, + id: '103605', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + metadata: [ + { + jobId: 2, + }, + ], + batched: true, + statusCode: 200, + destination: { + Config: { + apiKey: 'dummy-apikey', + hubID: 'dummy-hubId', + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + name: 'Hubspot', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmLd', + deleted: false, + createdAt: '2020-12-30T08:39:32.005Z', + updatedAt: '2021-02-03T16:22:31.374Z', + destinationDefinition: { + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'HS', + displayName: 'Hubspot', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + }, + ], + }, + }, + }, + }, + { + name: 'hs', + description: 'router retl tests', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + message: { + channel: 'web', + context: { + mappedToDestination: true, + externalId: [ + { + identifierType: 'email', + id: 'testhubspot2@email.com', + type: 'HS-lead', + }, + ], + sources: { + job_id: '24c5HJxHomh6YCngEOCgjS5r1KX/Syncher', + task_id: 'vw_rs_mailchimp_mocked_hg_data', + version: 'v1.8.1', + batch_id: 'f252c69d-c40d-450e-bcd2-2cf26cb62762', + job_run_id: 'c8el40l6e87v0c4hkbl0', + task_run_id: 'c8el40l6e87v0c4hkblg', + }, + }, + type: 'identify', + traits: { + firstname: 'Test Hubspot', + anonymousId: '12345', + country: 'India', + }, + messageId: '50360b9c-ea8d-409c-b672-c9230f91cce5', + originalTimestamp: '2019-10-15T09:35:31.288Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + authorizationType: 'newPrivateAppApi', + accessToken: 'dummy-access-token', + hubID: 'dummy-hubId', + apiKey: 'dummy-apikey', + apiVersion: 'newApi', + lookupField: 'lookupField', + hubspotEvents: [ + { + rsEventName: 'Purchase', + hubspotEventName: 'pedummy-hubId_rs_hub_test', + eventProperties: [ + { + from: 'Revenue', + to: 'value', + }, + { + from: 'Price', + to: 'cost', + }, + ], + }, + { + rsEventName: 'Order Complete', + hubspotEventName: 'pedummy-hubId_rs_hub_chair', + eventProperties: [ + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, + ], + }, + ], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + name: 'Hubspot', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmLd', + deleted: false, + createdAt: '2020-12-30T08:39:32.005Z', + updatedAt: '2021-02-03T16:22:31.374Z', + destinationDefinition: { + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'HS', + displayName: 'Hubspot', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + metadata: { + jobId: 2, + }, + }, + { + message: { + channel: 'web', + context: { + mappedToDestination: true, + externalId: [ + { + identifierType: 'email', + id: 'testhubspot@email.com', + type: 'HS-lead', + }, + ], + sources: { + job_id: '24c5HJxHomh6YCngEOCgjS5r1KX/Syncher', + task_id: 'vw_rs_mailchimp_mocked_hg_data', + version: 'v1.8.1', + batch_id: 'f252c69d-c40d-450e-bcd2-2cf26cb62762', + job_run_id: 'c8el40l6e87v0c4hkbl0', + task_run_id: 'c8el40l6e87v0c4hkblg', + }, + }, + type: 'identify', + traits: { + firstname: 'Test Hubspot 1', + anonymousId: '123451', + country: 'India 1', + }, + messageId: '50360b9c-ea8d-409c-b672-c9230f91cce5', + originalTimestamp: '2019-10-15T09:35:31.288Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + authorizationType: 'newPrivateAppApi', + accessToken: 'dummy-access-token', + hubID: 'dummy-hubId', + apiKey: 'dummy-apikey', + apiVersion: 'newApi', + lookupField: 'lookupField', + hubspotEvents: [ + { + rsEventName: 'Purchase', + hubspotEventName: 'pedummy-hubId_rs_hub_test', + eventProperties: [ + { + from: 'Revenue', + to: 'value', + }, + { + from: 'Price', + to: 'cost', + }, + ], + }, + { + rsEventName: 'Order Complete', + hubspotEventName: 'pedummy-hubId_rs_hub_chair', + eventProperties: [ + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, + ], + }, + ], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + name: 'Hubspot', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmLd', + deleted: false, + createdAt: '2020-12-30T08:39:32.005Z', + updatedAt: '2021-02-03T16:22:31.374Z', + destinationDefinition: { + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'HS', + displayName: 'Hubspot', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + metadata: { + jobId: 3, + }, + }, + { + message: { + channel: 'web', + context: { + mappedToDestination: true, + externalId: [ + { + identifierType: 'email', + id: 'testhubspotdatetime@email.com', + type: 'HS-lead', + }, + ], + sources: { + job_id: '24c5HJxHomh6YCngEOCgjS5r1KX/Syncher', + task_id: 'vw_rs_mailchimp_mocked_hg_data', + version: 'v1.8.1', + batch_id: 'f252c69d-c40d-450e-bcd2-2cf26cb62762', + job_run_id: 'c8el40l6e87v0c4hkbl0', + task_run_id: 'c8el40l6e87v0c4hkblg', + }, + }, + type: 'identify', + traits: { + firstname: 'Test Hubspot', + anonymousId: '123451', + country: 'India', + date_submitted: '2023-09-25T17:31:04.128251Z', + date_created: '2023-03-30T01:02:03.05Z', + date_closed: '2023-10-18T04:38:59.229347Z', + }, + messageId: '50360b9c-ea8d-409c-b672-c9230f91cce5', + originalTimestamp: '2019-10-15T09:35:31.288Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + authorizationType: 'newPrivateAppApi', + accessToken: 'dummy-access-token', + hubID: 'dummy-hubId', + apiKey: 'dummy-apikey', + apiVersion: 'newApi', + lookupField: 'lookupField', + hubspotEvents: [ + { + rsEventName: 'Purchase', + hubspotEventName: 'pedummy-hubId_rs_hub_test', + eventProperties: [ + { + from: 'Revenue', + to: 'value', + }, + { + from: 'Price', + to: 'cost', + }, + ], + }, + { + rsEventName: 'Order Complete', + hubspotEventName: 'pedummy-hubId_rs_hub_chair', + eventProperties: [ + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, + ], + }, + ], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + name: 'Hubspot', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmLd', + deleted: false, + createdAt: '2020-12-30T08:39:32.005Z', + updatedAt: '2021-02-03T16:22:31.374Z', + destinationDefinition: { + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'HS', + displayName: 'Hubspot', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + metadata: { + jobId: 4, + }, + }, + ], + destType: 'hs', + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.hubapi.com/crm/v3/objects/lead/batch/create', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer dummy-access-token', + }, + params: {}, + body: { + JSON: { + inputs: [ + { + properties: { + firstname: 'Test Hubspot 1', + anonymousId: '123451', + country: 'India 1', + email: 'testhubspot@email.com', + }, + }, + { + properties: { + firstname: 'Test Hubspot', + anonymousId: '123451', + country: 'India', + email: 'testhubspotdatetime@email.com', + date_closed: 1697587200000, + date_created: 1680134400000, + date_submitted: 1695600000000, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + metadata: [ + { + jobId: 3, + }, + { + jobId: 4, + }, + ], + batched: true, + statusCode: 200, + destination: { + Config: { + authorizationType: 'newPrivateAppApi', + accessToken: 'dummy-access-token', + hubID: 'dummy-hubId', + apiKey: 'dummy-apikey', + apiVersion: 'newApi', + lookupField: 'lookupField', + hubspotEvents: [ + { + rsEventName: 'Purchase', + hubspotEventName: 'pedummy-hubId_rs_hub_test', + eventProperties: [ + { + from: 'Revenue', + to: 'value', + }, + { + from: 'Price', + to: 'cost', + }, + ], + }, + { + rsEventName: 'Order Complete', + hubspotEventName: 'pedummy-hubId_rs_hub_chair', + eventProperties: [ + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, + ], + }, + ], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + name: 'Hubspot', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmLd', + deleted: false, + createdAt: '2020-12-30T08:39:32.005Z', + updatedAt: '2021-02-03T16:22:31.374Z', + destinationDefinition: { + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'HS', + displayName: 'Hubspot', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + }, + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.hubapi.com/crm/v3/objects/lead/batch/update', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer dummy-access-token', + }, + params: {}, + body: { + JSON: { + inputs: [ + { + properties: { + firstname: 'Test Hubspot', + anonymousId: '12345', + country: 'India', + email: 'testhubspot2@email.com', + }, + id: '103605', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + metadata: [ + { + jobId: 2, + }, + ], + batched: true, + statusCode: 200, + destination: { + Config: { + authorizationType: 'newPrivateAppApi', + accessToken: 'dummy-access-token', + hubID: 'dummy-hubId', + apiKey: 'dummy-apikey', + apiVersion: 'newApi', + lookupField: 'lookupField', + hubspotEvents: [ + { + rsEventName: 'Purchase', + hubspotEventName: 'pedummy-hubId_rs_hub_test', + eventProperties: [ + { + from: 'Revenue', + to: 'value', + }, + { + from: 'Price', + to: 'cost', + }, + ], + }, + { + rsEventName: 'Order Complete', + hubspotEventName: 'pedummy-hubId_rs_hub_chair', + eventProperties: [ + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, + ], + }, + ], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + name: 'Hubspot', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmLd', + deleted: false, + createdAt: '2020-12-30T08:39:32.005Z', + updatedAt: '2021-02-03T16:22:31.374Z', + destinationDefinition: { + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'HS', + displayName: 'Hubspot', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + }, + ], + }, + }, + }, + }, + { + name: 'hs', + description: 'router tests', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'noname@email.com', + firstname: 'Test Hubspot22', + anonymousId: '4444', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '', + referrer: '', + search: '', + title: '', + url: '', + }, + }, + type: 'identify', + messageId: '50360b9c-ea8d-409c-b672-c9230f91cce5', + originalTimestamp: '2019-10-15T09:35:31.288Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + metadata: { + jobId: 1, + }, + destination: { + Config: { + authorizationType: 'newPrivateAppApi', + accessToken: 'dummy-access-token', + hubID: 'dummy-hubId', + apiKey: 'dummy-apikey', + apiVersion: 'newApi', + lookupField: 'email', + hubspotEvents: [ + { + rsEventName: 'Purchase', + hubspotEventName: 'pedummy-hubId_rs_hub_test', + eventProperties: [ + { + from: 'Revenue', + to: 'value', + }, + { + from: 'Price', + to: 'cost', + }, + ], + }, + { + rsEventName: 'Order Complete', + hubspotEventName: 'pedummy-hubId_rs_hub_chair', + eventProperties: [ + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, + ], + }, + ], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + name: 'Hubspot', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmLd', + deleted: false, + createdAt: '2020-12-30T08:39:32.005Z', + updatedAt: '2021-02-03T16:22:31.374Z', + destinationDefinition: { + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'HS', + displayName: 'Hubspot', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + }, + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'noname@email.com', + firstname: 'Test Hubspot44', + anonymousId: '4444', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '', + referrer: '', + search: '', + title: '', + url: '', + }, + }, + type: 'identify', + messageId: '50360b9c-ea8d-409c-b672-c9230f91cce5', + originalTimestamp: '2019-10-15T09:35:31.288Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + metadata: { + jobId: 2, + }, + destination: { + Config: { + authorizationType: 'newPrivateAppApi', + accessToken: 'dummy-access-token', + hubID: 'dummy-hubId', + apiKey: 'dummy-apikey', + apiVersion: 'newApi', + lookupField: 'email', + hubspotEvents: [ + { + rsEventName: 'Purchase', + hubspotEventName: 'pedummy-hubId_rs_hub_test', + eventProperties: [ + { + from: 'Revenue', + to: 'value', + }, + { + from: 'Price', + to: 'cost', + }, + ], + }, + { + rsEventName: 'Order Complete', + hubspotEventName: 'pedummy-hubId_rs_hub_chair', + eventProperties: [ + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, + ], + }, + ], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + name: 'Hubspot', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmLd', + deleted: false, + createdAt: '2020-12-30T08:39:32.005Z', + updatedAt: '2021-02-03T16:22:31.374Z', + destinationDefinition: { + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'HS', + displayName: 'Hubspot', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + }, + { + message: { + type: 'track', + traits: {}, + context: { + externalId: [ + { + id: 'osvaldocostaferreira98@gmail.com', + type: 'HS-contacts', + identifierType: 'email', + }, + ], + }, + event: 'Purchase', + properties: { + Revenue: 'name1', + }, + }, + metadata: { + jobId: 3, + }, + destination: { + Config: { + authorizationType: 'newPrivateAppApi', + accessToken: 'dummy-access-token', + hubID: 'dummy-hubId', + apiKey: 'dummy-apikey', + apiVersion: 'newApi', + lookupField: 'lookupField', + hubspotEvents: [ + { + rsEventName: 'Purchase', + hubspotEventName: 'pedummy-hubId_rs_hub_test', + eventProperties: [ + { + from: 'Revenue', + to: 'value', + }, + { + from: 'Price', + to: 'cost', + }, + ], + }, + { + rsEventName: 'Order Complete', + hubspotEventName: 'pedummy-hubId_rs_hub_chair', + eventProperties: [ + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, + ], + }, + ], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + name: 'Hubspot', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmLd', + deleted: false, + createdAt: '2020-12-30T08:39:32.005Z', + updatedAt: '2021-02-03T16:22:31.374Z', + destinationDefinition: { + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'HS', + displayName: 'Hubspot', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + }, + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'testhubspot@email.com', + firstname: 'Test Hubspot22', + anonymousId: '4444', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '', + referrer: '', + search: '', + title: '', + url: '', + }, + }, + type: 'identify', + messageId: '50360b9c-ea8d-409c-b672-c9230f91cce5', + originalTimestamp: '2019-10-15T09:35:31.288Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + metadata: { + jobId: 4, + }, + destination: { + Config: { + authorizationType: 'newPrivateAppApi', + accessToken: 'dummy-access-token', + hubID: 'dummy-hubId', + apiKey: 'dummy-apikey', + apiVersion: 'newApi', + lookupField: 'email', + hubspotEvents: [ + { + rsEventName: 'Purchase', + hubspotEventName: 'pedummy-hubId_rs_hub_test', + eventProperties: [ + { + from: 'Revenue', + to: 'value', + }, + { + from: 'Price', + to: 'cost', + }, + ], + }, + { + rsEventName: 'Order Complete', + hubspotEventName: 'pedummy-hubId_rs_hub_chair', + eventProperties: [ + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, + ], + }, + ], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + name: 'Hubspot', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmLd', + deleted: false, + createdAt: '2020-12-30T08:39:32.005Z', + updatedAt: '2021-02-03T16:22:31.374Z', + destinationDefinition: { + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'HS', + displayName: 'Hubspot', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + }, + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'testhubspot@email.com', + firstname: 'Test Hubspot44', + anonymousId: '4444', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '', + referrer: '', + search: '', + title: '', + url: '', + }, + }, + type: 'identify', + messageId: '50360b9c-ea8d-409c-b672-c9230f91cce5', + originalTimestamp: '2019-10-15T09:35:31.288Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + metadata: { + jobId: 5, + }, + destination: { + Config: { + authorizationType: 'newPrivateAppApi', + accessToken: 'dummy-access-token', + hubID: 'dummy-hubId', + apiKey: 'dummy-apikey', + apiVersion: 'newApi', + lookupField: 'email', + hubspotEvents: [ + { + rsEventName: 'Purchase', + hubspotEventName: 'pedummy-hubId_rs_hub_test', + eventProperties: [ + { + from: 'Revenue', + to: 'value', + }, + { + from: 'Price', + to: 'cost', + }, + ], + }, + { + rsEventName: 'Order Complete', + hubspotEventName: 'pedummy-hubId_rs_hub_chair', + eventProperties: [ + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, + ], + }, + ], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + name: 'Hubspot', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmLd', + deleted: false, + createdAt: '2020-12-30T08:39:32.005Z', + updatedAt: '2021-02-03T16:22:31.374Z', + destinationDefinition: { + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'HS', + displayName: 'Hubspot', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + }, + ], + destType: 'hs', + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.hubapi.com/crm/v3/objects/contacts/batch/create', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer dummy-access-token', + }, + params: {}, + body: { + JSON: { + inputs: [ + { + properties: { + email: 'noname@email.com', + firstname: 'Test Hubspot44', + }, + }, + { + properties: { + email: 'testhubspot@email.com', + firstname: 'Test Hubspot44', + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + metadata: [ + { + jobId: 1, + }, + { + jobId: 2, + }, + { + jobId: 4, + }, + { + jobId: 5, + }, + ], + batched: true, + statusCode: 200, + destination: { + Config: { + authorizationType: 'newPrivateAppApi', + accessToken: 'dummy-access-token', + hubID: 'dummy-hubId', + apiKey: 'dummy-apikey', + apiVersion: 'newApi', + lookupField: 'email', + hubspotEvents: [ + { + rsEventName: 'Purchase', + hubspotEventName: 'pedummy-hubId_rs_hub_test', + eventProperties: [ + { + from: 'Revenue', + to: 'value', + }, + { + from: 'Price', + to: 'cost', + }, + ], + }, + { + rsEventName: 'Order Complete', + hubspotEventName: 'pedummy-hubId_rs_hub_chair', + eventProperties: [ + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, + ], + }, + ], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + name: 'Hubspot', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmLd', + deleted: false, + createdAt: '2020-12-30T08:39:32.005Z', + updatedAt: '2021-02-03T16:22:31.374Z', + destinationDefinition: { + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'HS', + displayName: 'Hubspot', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + }, + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.hubapi.com/events/v3/send', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer dummy-access-token', + }, + params: {}, + body: { + JSON: { + email: 'osvaldocostaferreira98@gmail.com', + eventName: 'pedummy-hubId_rs_hub_test', + properties: { + value: 'name1', + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + metadata: [ + { + jobId: 3, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + authorizationType: 'newPrivateAppApi', + accessToken: 'dummy-access-token', + hubID: 'dummy-hubId', + apiKey: 'dummy-apikey', + apiVersion: 'newApi', + lookupField: 'email', + hubspotEvents: [ + { + rsEventName: 'Purchase', + hubspotEventName: 'pedummy-hubId_rs_hub_test', + eventProperties: [ + { + from: 'Revenue', + to: 'value', + }, + { + from: 'Price', + to: 'cost', + }, + ], + }, + { + rsEventName: 'Order Complete', + hubspotEventName: 'pedummy-hubId_rs_hub_chair', + eventProperties: [ + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, + ], + }, + ], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + name: 'Hubspot', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmLd', + deleted: false, + createdAt: '2020-12-30T08:39:32.005Z', + updatedAt: '2021-02-03T16:22:31.374Z', + destinationDefinition: { + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'HS', + displayName: 'Hubspot', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + }, + ], + }, + }, + }, + }, +]; diff --git a/test/integrations/destinations/marketo_bulk_upload/processor/data.ts b/test/integrations/destinations/marketo_bulk_upload/processor/data.ts new file mode 100644 index 0000000000..5c86afd372 --- /dev/null +++ b/test/integrations/destinations/marketo_bulk_upload/processor/data.ts @@ -0,0 +1,499 @@ +export const data = [ + { + "name": "marketo_bulk_upload", + "description": "Test 0", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "type": "identify", + "traits": { + "name": "Carlo Lombard", + "plan": "Quarterly Team+ Plan for Enuffsaid Media", + "email": "carlo@enuffsaid.media" + }, + "userId": 476335, + "context": { + "ip": "14.0.2.238", + "page": { + "url": "enuffsaid.proposify.com", + "path": "/settings", + "method": "POST", + "referrer": "https://enuffsaid.proposify.com/login" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "786dfec9-jfh", + "messageId": "5d9bc6e2-ekjh" + }, + "destination": { + "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", + "Config": { + "munchkinId": "XXXX", + "clientId": "YYYY", + "clientSecret": "ZZZZ", + "columnFieldsMapping": [ + { + "to": "name__c", + "from": "name" + }, + { + "to": "email__c", + "from": "email" + }, + { + "to": "plan__c", + "from": "plan" + } + ] + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "/fileUpload", + "headers": {}, + "params": {}, + "body": { + "JSON": { + "name__c": "Carlo Lombard", + "email__c": "carlo@enuffsaid.media", + "plan__c": "Quarterly Team+ Plan for Enuffsaid Media" + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "marketo_bulk_upload", + "description": "Test 1", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "traits": { + "name": "Carlo Lombard", + "plan": "Quarterly Team+ Plan for Enuffsaid Media", + "email": "carlo@enuffsaid.media" + }, + "userId": 476335, + "context": { + "ip": "14.0.2.238", + "page": { + "url": "enuffsaid.proposify.com", + "path": "/settings", + "method": "POST", + "referrer": "https://enuffsaid.proposify.com/login" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "786dfec9-jfh", + "messageId": "5d9bc6e2-ekjh" + }, + "destination": { + "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", + "Config": { + "munchkinId": "XXXX", + "clientId": "YYYY", + "clientSecret": "ZZZZ", + "columnFieldsMapping": [ + { + "to": "name__c", + "from": "name" + }, + { + "to": "email__c", + "from": "email" + }, + { + "to": "plan__c", + "from": "plan" + } + ] + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Event type is required", + "statTags": { + "destType": "MARKETO_BULK_UPLOAD", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "marketo_bulk_upload", + "description": "Test 2", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "type": "track", + "traits": { + "name": "Carlo Lombard", + "plan": "Quarterly Team+ Plan for Enuffsaid Media", + "email": "carlo@enuffsaid.media" + }, + "userId": 476335, + "context": { + "ip": "14.0.2.238", + "page": { + "url": "enuffsaid.proposify.com", + "path": "/settings", + "method": "POST", + "referrer": "https://enuffsaid.proposify.com/login" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "786dfec9-jfh", + "messageId": "5d9bc6e2-ekjh" + }, + "destination": { + "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", + "Config": { + "munchkinId": "XXXX", + "clientId": "YYYY", + "clientSecret": "ZZZZ", + "columnFieldsMapping": [ + { + "to": "name__c", + "from": "name" + }, + { + "to": "email__c", + "from": "email" + }, + { + "to": "plan__c", + "from": "plan" + } + ] + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Event type track is not supported", + "statTags": { + "destType": "MARKETO_BULK_UPLOAD", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "marketo_bulk_upload", + "description": "Test 3", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "type": "identify", + "traits": { + "name": "Carlo Lombard", + "plan": "Quarterly Team+ Plan for Enuffsaid Media", + "email": "carlo@enuffsaid.media" + }, + "userId": 476335, + "context": { + "ip": "14.0.2.238", + "page": { + "url": "enuffsaid.proposify.com", + "path": "/settings", + "method": "POST", + "referrer": "https://enuffsaid.proposify.com/login" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "786dfec9-jfh", + "messageId": "5d9bc6e2-ekjh" + }, + "destination": { + "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", + "Config": { + "munchkinId": "XXXX", + "clientId": "YYYY", + "clientSecret": "ZZZZ", + "columnFieldsMapping": [ + { + "to": "name__c", + "from": "1" + }, + { + "to": "email__c", + "from": "email1" + }, + { + "to": "plan__c", + "from": "plan1" + } + ] + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "/fileUpload", + "headers": {}, + "params": {}, + "body": { + "JSON": {}, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "marketo_bulk_upload", + "description": "Test 4", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "type": "identify", + "traits": { + "name": "Carlo Lombard", + "plan": "Quarterly Team+ Plan for Enuffsaid Media", + "email": "carlo@enuffsaid.media" + }, + "userId": 476335, + "context": { + "ip": "14.0.2.238", + "page": { + "url": "enuffsaid.proposify.com", + "path": "/settings", + "method": "POST", + "referrer": "https://enuffsaid.proposify.com/login" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "786dfec9-jfh", + "messageId": "5d9bc6e2-ekjh" + }, + "destination": { + "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", + "Config": { + "munchkinId": "XXXX", + "clientId": "YYYY", + "clientSecret": "ZZZZ", + "columnFieldsMapping": [ + { + "to": "name__c", + "from": "name" + }, + { + "to": "email__c", + "from": "email1" + }, + { + "to": "plan__c", + "from": "plan1" + } + ] + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "/fileUpload", + "headers": {}, + "params": {}, + "body": { + "JSON": { + "name__c": "Carlo Lombard" + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "marketo_bulk_upload", + "description": "Test 5", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "type": "identify", + "traits": { + "name": "Carlo Lombard", + "plan": 1 + }, + "userId": 476335, + "context": { + "ip": "14.0.2.238", + "page": { + "url": "enuffsaid.proposify.com", + "path": "/settings", + "method": "POST", + "referrer": "https://enuffsaid.proposify.com/login" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "786dfec9-jfh", + "messageId": "5d9bc6e2-ekjh" + }, + "destination": { + "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", + "Config": { + "munchkinId": "XXXX", + "clientId": "YYYY", + "clientSecret": "ZZZZ", + "columnFieldsMapping": [ + { + "to": "name__c", + "from": "name" + }, + { + "to": "email__c", + "from": "email" + }, + { + "to": "plan__c", + "from": "plan" + } + ] + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "/fileUpload", + "headers": {}, + "params": {}, + "body": { + "JSON": { + "name__c": "Carlo Lombard", + "plan__c": 1 + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + } +] \ No newline at end of file diff --git a/test/integrations/destinations/wootric/network.ts b/test/integrations/destinations/wootric/network.ts new file mode 100644 index 0000000000..2407efa62b --- /dev/null +++ b/test/integrations/destinations/wootric/network.ts @@ -0,0 +1,183 @@ +export const networkCallsData = [ + { + httpReq: { + url: 'https://api.wootric.com/v1/end_users/dummyId1?lookup_by_external_id=true', + method: 'GET', + }, + httpRes: { + status: 200, + data: { + "id": 486438462, + "created_at": "2022-08-10 11:39:50 -0700", + "updated_at": "2022-08-10 11:39:50 -0700", + "email": "dummyuser1@gmail.com", + "last_surveyed": "2022-01-20 05:39:21 -0800", + "external_created_at": 1611149961, + "last_seen_at": null, + "properties": { + "city": "Mumbai", + "name": "Dummy User 1", + "title": "SDE", + "gender": "Male", + "company": "Rudderstack" + }, + "phone_number": "+19123456789", + "external_id": "dummyId1", + "last_response": null, + "settings": { + "email_nps": true, + "mobile_nps": true, + "web_nps": true, + "force_mobile_survey": null, + "force_web_survey": null, + "surveys_disabled_by_end_user": null + } + }, + }, + }, + { + httpReq: { + url: 'https://api.wootric.com/v1/end_users/exclueFunTestId?lookup_by_external_id=true', + method: 'GET', + }, + httpRes: { + status: 200, + data: { + "id": 486336190, + "created_at": "2022-08-10 07:30:50 -0700", + "updated_at": "2022-08-10 10:12:46 -0700", + "email": "excludeUser@gmail.com", + "last_surveyed": "2022-01-20 05:39:21 -0800", + "external_created_at": 1579755367, + "last_seen_at": null, + "properties": { + "city": "Mumbai", + "name": "exclude test user", + "email": "excludeUser@gmail.com", + "title": "AD", + "gender": "Male", + "company": "Rockstar" + }, + "phone_number": "+18324671283", + "external_id": "exclueFunTestId", + "last_response": null, + "settings": { + "email_nps": true, + "mobile_nps": true, + "web_nps": true, + "force_mobile_survey": null, + "force_web_survey": null, + "surveys_disabled_by_end_user": null + } + }, + }, + }, + { + httpReq: { + url: 'https://api.wootric.com/v1/end_users/my-external-id-1234?lookup_by_external_id=true', + method: 'POST', + + }, + httpRes: { + status: 200, + data: { + "type": "error_list", + "errors": [ + { + "status": "record_not_found", + "message": "The record could not be found", + "field": null + } + ] + } + }, + }, + { + httpReq: { + url: 'https://api.wootric.com/v1/end_users/490635419', + method: 'GET' + }, + httpRes: { + data: { + "id": 490635419, + "created_at": "2022-08-20 00:55:26 -0700", + "updated_at": "2022-08-22 11:17:05 -0700", + "email": "firstuser@gmail.com", + "last_surveyed": "2022-08-01 00:11:44 -0700", + "external_created_at": 1661002761, + "last_seen_at": null, + "properties": { + "Department": "Marketing", + "product_plan": "Web", + "revenue amount": "5000" + }, + "phone_number": "+8859133456781", + "external_id": "firstUserId123", + "last_response": { + "id": 101013218, + "score": 9, + "text": "Good !!!", + "survey": { + "channel": "web" + } + }, + "settings": { + "email_nps": true, + "mobile_nps": true, + "web_nps": true, + "force_mobile_survey": null, + "force_web_survey": null, + "surveys_disabled_by_end_user": null + } + }, + status: 200, + }, + }, + { + httpReq: { + url: 'https://api.wootric.com/oauth/token?account_token=NPS-dummyToken', + method: 'POST' + }, + httpRes: { + data: { + "access_token": "2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c", + "token_type": "Bearer", + "expires_in": 7200, + "refresh_token": "f4033a61742e84405a5ef8b2e09b82395dc041f0259fd5fb715fc196a1b9cd52", + "scope": "delete_account admin respond export read survey invalidate_response", + "created_at": 1660292389 + }, + status: 200, + }, + }, + { + httpReq: { + url: 'https://api.wootric.com/v1/end_users/dummyId2?lookup_by_external_id=true', + method: 'GET' + }, + httpRes: { + status: 200, + }, + }, + { + httpReq: { + url: 'https://api.wootric.com/v1/end_users/12345', + method: 'GET' + }, + httpRes: { + status: 200, + }, + }, + { + httpReq: { + url: 'https://api.wootric.com/oauth/token?account_token=NPS-dummyToken12', + method: 'POST' + }, + httpRes: { + data: { + error: "Not found", + status: 404 + } + }, + } +]; diff --git a/test/integrations/destinations/wootric/processor/data.ts b/test/integrations/destinations/wootric/processor/data.ts new file mode 100644 index 0000000000..cdff2f1079 --- /dev/null +++ b/test/integrations/destinations/wootric/processor/data.ts @@ -0,0 +1,1825 @@ +export const data = [ + { + "name": "wootric", + "description": "Wrong Account Token Passed", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken12" + }, + "ID": "wootric-1234" + }, + "message": { + "type": "identify", + "sentAt": "2022-01-20T13:39:21.033Z", + "userId": "dummyId2", + "channel": "web", + "context": {}, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "{\"message\":\"Access token could not be generated due to {\\\"error\\\":\\\"Not found\\\",\\\"status\\\":404}\",\"destinationResponse\":{\"response\":{\"error\":\"Not found\",\"status\":404},\"status\":500}}", + "statTags": { + "destType": "WOOTRIC", + "errorCategory": "network", + "errorType": "retryable", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 500 + } + ] + } + } + }, + { + "name": "wootric", + "description": "Identify call for creating user", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "wootric-1234" + }, + "message": { + "type": "identify", + "sentAt": "2022-01-20T13:39:21.033Z", + "userId": "dummyId2", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.2.20", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", + "title": "Document", + "search": "", + "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", + "initial_referrer": "$direct", + "referring_domain": "127.0.0.1:7307", + "initial_referring_domain": "" + }, + "locale": "en-US", + "screen": { + "width": 1440, + "height": 900, + "density": 2, + "innerWidth": 536, + "innerHeight": 689 + }, + "traits": { + "city": "Bangalore", + "name": "Dummy User 2", + "email": "dummyUser2@gmail.com", + "phone": "+19123456777", + "title": "SDE", + "gender": "Male", + "company": "Rudderstack", + "createdAt": "2021-01-20T13:39:21.032Z" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.2.20" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.wootric.com/v1/end_users", + "headers": { + "Content-Type": "application/x-www-form-urlencoded", + "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" + }, + "params": {}, + "body": { + "JSON": {}, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": { + "email": "dummyUser2@gmail.com", + "phone_number": "+19123456777", + "last_surveyed": "1642685961", + "external_created_at": "1611149961", + "external_id": "dummyId2", + "properties[city]": "Bangalore", + "properties[name]": "Dummy User 2", + "properties[title]": "SDE", + "properties[gender]": "Male", + "properties[company]": "Rudderstack" + } + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "wootric", + "description": "Identify call for creating user without-sending email and sending phone number", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "wootric-1234" + }, + "message": { + "type": "identify", + "sentAt": "2022-01-20T13:39:21.033Z", + "userId": "dummyId2", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.2.20", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", + "title": "Document", + "search": "", + "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", + "initial_referrer": "$direct", + "referring_domain": "127.0.0.1:7307", + "initial_referring_domain": "" + }, + "locale": "en-US", + "screen": { + "width": 1440, + "height": 900, + "density": 2, + "innerWidth": 536, + "innerHeight": 689 + }, + "traits": { + "city": "Bangalore", + "name": "Dummy User 2", + "phone": "+19123456777", + "title": "SDE", + "gender": "Male", + "company": "Rudderstack", + "createdAt": "2021-01-20T13:39:21.032Z" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.2.20" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.wootric.com/v1/end_users", + "headers": { + "Content-Type": "application/x-www-form-urlencoded", + "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" + }, + "params": {}, + "body": { + "JSON": {}, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": { + "phone_number": "+19123456777", + "last_surveyed": "1642685961", + "external_created_at": "1611149961", + "external_id": "dummyId2", + "properties[city]": "Bangalore", + "properties[name]": "Dummy User 2", + "properties[title]": "SDE", + "properties[gender]": "Male", + "properties[company]": "Rudderstack" + } + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "wootric", + "description": "Identify call for creating user without-sending phone number and sending email", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "wootric-1234" + }, + "message": { + "type": "identify", + "sentAt": "2022-01-20T13:39:21.033Z", + "userId": "dummyId2", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.2.20", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", + "title": "Document", + "search": "", + "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", + "initial_referrer": "$direct", + "referring_domain": "127.0.0.1:7307", + "initial_referring_domain": "" + }, + "locale": "en-US", + "screen": { + "width": 1440, + "height": 900, + "density": 2, + "innerWidth": 536, + "innerHeight": 689 + }, + "traits": { + "email": "dummyUser2@gmail.com", + "city": "Bangalore", + "name": "Dummy User 2", + "title": "SDE", + "gender": "Male", + "company": "Rudderstack", + "createdAt": "2021-01-20T13:39:21.032Z" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.2.20" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.wootric.com/v1/end_users", + "headers": { + "Content-Type": "application/x-www-form-urlencoded", + "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" + }, + "params": {}, + "body": { + "JSON": {}, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": { + "email": "dummyUser2@gmail.com", + "last_surveyed": "1642685961", + "external_created_at": "1611149961", + "external_id": "dummyId2", + "properties[city]": "Bangalore", + "properties[name]": "Dummy User 2", + "properties[title]": "SDE", + "properties[gender]": "Male", + "properties[company]": "Rudderstack" + } + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "wootric", + "description": "Identify call for creating user without sending traits", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "wootric-1234" + }, + "message": { + "type": "identify", + "sentAt": "2022-01-20T13:39:21.033Z", + "userId": "dummyId2", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.2.20", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", + "title": "Document", + "search": "", + "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", + "initial_referrer": "$direct", + "referring_domain": "127.0.0.1:7307", + "initial_referring_domain": "" + }, + "locale": "en-US", + "screen": { + "width": 1440, + "height": 900, + "density": 2, + "innerWidth": 536, + "innerHeight": 689 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.2.20" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "email/phone number are missing. At least one parameter must be provided", + "statTags": { + "destType": "WOOTRIC", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "wootric", + "description": "Identify call for creating user without-sending (email and phone number)", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "wootric-1234" + }, + "message": { + "type": "identify", + "sentAt": "2022-01-20T13:39:21.033Z", + "userId": "dummyId2", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.2.20", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", + "title": "Document", + "search": "", + "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", + "initial_referrer": "$direct", + "referring_domain": "127.0.0.1:7307", + "initial_referring_domain": "" + }, + "locale": "en-US", + "screen": { + "width": 1440, + "height": 900, + "density": 2, + "innerWidth": 536, + "innerHeight": 689 + }, + "traits": { + "city": "Mumbai", + "name": "Dummy User 1", + "title": "SDE", + "gender": "Male", + "company": "Rudderstack", + "createdAt": "2021-01-20T13:39:21.032Z" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.2.20" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "email/phone number are missing. At least one parameter must be provided", + "statTags": { + "destType": "WOOTRIC", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "wootric", + "description": "Identify call for updating existing user with wootric end user id", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "wootric-1234" + }, + "message": { + "type": "identify", + "sentAt": "2022-01-20T13:39:21.033Z", + "userId": "dummyId1", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.2.20", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", + "title": "Document", + "search": "", + "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", + "initial_referrer": "$direct", + "referring_domain": "127.0.0.1:7307", + "initial_referring_domain": "" + }, + "locale": "en-US", + "screen": { + "width": 1440, + "height": 900, + "density": 2, + "innerWidth": 536, + "innerHeight": 689 + }, + "traits": { + "title": "VP", + "gender": "Male" + }, + "externalId": [ + { + "type": "wootricEndUserId", + "id": "490635419" + } + ], + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.2.20" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "PUT", + "endpoint": "https://api.wootric.com/v1/end_users/490635419", + "headers": { + "Content-Type": "application/x-www-form-urlencoded", + "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" + }, + "params": {}, + "body": { + "JSON": {}, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": { + "last_surveyed": "1642685961", + "properties[Department]": "Marketing", + "properties[product_plan]": "Web", + "properties[revenue amount]": "5000", + "properties[title]": "VP", + "properties[gender]": "Male" + } + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "wootric", + "description": "Identify call for updating existing user with (wootric externalId/ rudderstack userId)", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "wootric-1234" + }, + "message": { + "type": "identify", + "sentAt": "2022-01-20T13:39:21.033Z", + "userId": "dummyId1", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.2.20", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", + "title": "Document", + "search": "", + "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", + "initial_referrer": "$direct", + "referring_domain": "127.0.0.1:7307", + "initial_referring_domain": "" + }, + "locale": "en-US", + "screen": { + "width": 1440, + "height": 900, + "density": 2, + "innerWidth": 536, + "innerHeight": 689 + }, + "traits": { + "title": "VP", + "gender": "Male" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.2.20" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "PUT", + "endpoint": "https://api.wootric.com/v1/end_users/486438462", + "headers": { + "Content-Type": "application/x-www-form-urlencoded", + "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" + }, + "params": {}, + "body": { + "JSON": {}, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": { + "last_surveyed": "1642685961", + "properties[title]": "VP", + "properties[gender]": "Male", + "properties[city]": "Mumbai", + "properties[name]": "Dummy User 1", + "properties[company]": "Rudderstack" + } + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "wootric", + "description": "Identify call for updating user traits/properties", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "wootric-1234" + }, + "message": { + "type": "identify", + "sentAt": "2022-01-20T13:39:21.033Z", + "userId": "dummyId1", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.2.20", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", + "title": "Document", + "search": "", + "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", + "initial_referrer": "$direct", + "referring_domain": "127.0.0.1:7307", + "initial_referring_domain": "" + }, + "locale": "en-US", + "screen": { + "width": 1440, + "height": 900, + "density": 2, + "innerWidth": 536, + "innerHeight": 689 + }, + "traits": { + "city": "Udaipur", + "name": "Dummy User 1 New", + "title": "SDE-2", + "gender": "Male", + "company": "Rudderstack" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.2.20" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "PUT", + "endpoint": "https://api.wootric.com/v1/end_users/486438462", + "headers": { + "Content-Type": "application/x-www-form-urlencoded", + "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" + }, + "params": {}, + "body": { + "JSON": {}, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": { + "last_surveyed": "1642685961", + "properties[city]": "Udaipur", + "properties[name]": "Dummy User 1 New", + "properties[title]": "SDE-2", + "properties[gender]": "Male", + "properties[company]": "Rudderstack" + } + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "wootric", + "description": "Track call with existing userId and event type as create response", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "wootric-1234" + }, + "message": { + "type": "track", + "sentAt": "2022-01-20T13:39:21.033Z", + "userId": "dummyId1", + "channel": "web", + "properties": { + "feedbackScore": 7, + "feedbackText": "Simple, Easy to use, Reliable, Affordable Product" + }, + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.2.20", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", + "title": "Document", + "search": "", + "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", + "initial_referrer": "$direct", + "referring_domain": "127.0.0.1:7307", + "initial_referring_domain": "" + }, + "locale": "en-US", + "ip": "0.0.0.0", + "screen": { + "width": 1440, + "height": 900, + "density": 2, + "innerWidth": 536, + "innerHeight": 689 + }, + "traits": { + "city": "Mumbai", + "name": "Dummy User 1", + "email": "dummyUser1@gmail.com", + "title": "SDE", + "gender": "Male", + "company": "Rudderstack", + "createdAt": "2021-01-20T13:39:21.032Z" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.2.20" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true, + "Wootric": { + "eventType": "create response" + } + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.wootric.com/v1/end_users/486438462/responses", + "headers": { + "Content-Type": "application/x-www-form-urlencoded", + "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" + }, + "params": {}, + "body": { + "JSON": {}, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": { + "score": 7, + "ip_address": "0.0.0.0", + "origin_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "text": "Simple, Easy to use, Reliable, Affordable Product", + "created_at": "1611149961", + "end_user[properties][city]": "Mumbai", + "end_user[properties][name]": "Dummy User 1", + "end_user[properties][title]": "SDE", + "end_user[properties][gender]": "Male", + "end_user[properties][company]": "Rudderstack" + } + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "wootric", + "description": "Track call with non-existing userId", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "wootric-1234" + }, + "message": { + "type": "track", + "sentAt": "2022-01-20T13:39:21.033Z", + "userId": "dummyId2", + "channel": "web", + "properties": { + "feedbackScore": 7, + "feedbackText": "Simple, Easy to use, Reliable, Affordable Product" + }, + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.2.20", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", + "title": "Document", + "search": "", + "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", + "initial_referrer": "$direct", + "referring_domain": "127.0.0.1:7307", + "initial_referring_domain": "" + }, + "locale": "en-US", + "ip": "0.0.0.0", + "screen": { + "width": 1440, + "height": 900, + "density": 2, + "innerWidth": 536, + "innerHeight": 689 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.2.20" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true, + "Wootric": { + "eventType": "create response" + } + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "No user found with userId : dummyId2", + "statTags": { + "destType": "WOOTRIC", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "wootric", + "description": "Track call with non-existing wootricEndUserId", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "wootric-1234" + }, + "message": { + "type": "track", + "sentAt": "2022-01-20T13:39:21.033Z", + "channel": "web", + "properties": { + "feedbackScore": 7, + "feedbackText": "Simple, Easy to use, Reliable, Affordable Product" + }, + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.2.20", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", + "title": "Document", + "search": "", + "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", + "initial_referrer": "$direct", + "referring_domain": "127.0.0.1:7307", + "initial_referring_domain": "" + }, + "locale": "en-US", + "ip": "0.0.0.0", + "screen": { + "width": 1440, + "height": 900, + "density": 2, + "innerWidth": 536, + "innerHeight": 689 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.2.20" + }, + "externalId": [ + { + "type": "wootricEndUserId", + "id": "12345" + } + ], + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true, + "Wootric": { + "eventType": "create response" + } + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "No user found with wootric end user Id : 12345", + "statTags": { + "destType": "WOOTRIC", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "wootric", + "description": "Track call with existing userId and event type as create response and score out of bound", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "wootric-1234" + }, + "message": { + "type": "track", + "sentAt": "2022-01-20T13:39:21.033Z", + "userId": "dummyId1", + "channel": "web", + "properties": { + "feedbackScore": 12, + "feedbackText": "Simple, Easy to use, Reliable, Affordable Product" + }, + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.2.20", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", + "title": "Document", + "search": "", + "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", + "initial_referrer": "$direct", + "referring_domain": "127.0.0.1:7307", + "initial_referring_domain": "" + }, + "locale": "en-US", + "ip": "0.0.0.0", + "screen": { + "width": 1440, + "height": 900, + "density": 2, + "innerWidth": 536, + "innerHeight": 689 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.2.20" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true, + "Wootric": { + "eventType": "create response" + } + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Invalid Score", + "statTags": { + "destType": "WOOTRIC", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "wootric", + "description": "Track call with existing userId and event type as create decline", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "wootric-1234" + }, + "message": { + "type": "track", + "sentAt": "2022-01-20T13:39:21.033Z", + "userId": "dummyId1", + "channel": "web", + "properties": { + "feedbackScore": 9, + "feedbackText": "Simple, Easy to use, Reliable, Affordable Product" + }, + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.2.20", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", + "title": "Document", + "search": "", + "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", + "initial_referrer": "$direct", + "referring_domain": "127.0.0.1:7307", + "initial_referring_domain": "" + }, + "locale": "en-US", + "screen": { + "width": 1440, + "height": 900, + "density": 2, + "innerWidth": 536, + "innerHeight": 689 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.2.20" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true, + "Wootric": { + "eventType": "create decline" + } + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.wootric.com/v1/end_users/486438462/declines", + "headers": { + "Content-Type": "application/x-www-form-urlencoded", + "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" + }, + "params": {}, + "body": { + "JSON": {}, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": { + "origin_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html" + } + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "wootric", + "description": "Track call with non-existing userId and event type as create decline", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "wootric-1234" + }, + "message": { + "type": "track", + "sentAt": "2022-01-20T13:39:21.033Z", + "userId": "dummyId2", + "channel": "web", + "properties": { + "feedbackScore": 9, + "feedbackText": "Simple, Easy to use, Reliable, Affordable Product" + }, + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.2.20", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", + "title": "Document", + "search": "", + "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", + "initial_referrer": "$direct", + "referring_domain": "127.0.0.1:7307", + "initial_referring_domain": "" + }, + "locale": "en-US", + "screen": { + "width": 1440, + "height": 900, + "density": 2, + "innerWidth": 536, + "innerHeight": 689 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.2.20" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true, + "Wootric": { + "eventType": "create decline" + } + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "No user found with userId : dummyId2", + "statTags": { + "destType": "WOOTRIC", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "wootric", + "description": "Track call with event type other than create response or decline", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "wootric-1234" + }, + "message": { + "type": "track", + "sentAt": "2022-01-20T13:39:21.033Z", + "userId": "dummyId1", + "channel": "web", + "properties": { + "feedbackScore": 7, + "feedbackText": "Simple, Easy to use, Reliable, Affordable Product" + }, + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.2.20", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", + "title": "Document", + "search": "", + "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", + "initial_referrer": "$direct", + "referring_domain": "127.0.0.1:7307", + "initial_referring_domain": "" + }, + "locale": "en-US", + "ip": "0.0.0.0", + "screen": { + "width": 1440, + "height": 900, + "density": 2, + "innerWidth": 536, + "innerHeight": 689 + }, + "traits": { + "city": "Mumbai", + "name": "Dummy User 1", + "email": "dummyUser1@gmail.com", + "phone": "+19123456789", + "title": "SDE", + "gender": "Male", + "company": "Rudderstack", + "createdAt": "2021-01-20T13:39:21.032Z" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.2.20" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true, + "Wootric": { + "eventType": "random" + } + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Event Type not supported", + "statTags": { + "destType": "WOOTRIC", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "wootric", + "description": "Track call with missing event type in integration object", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "wootric-1234" + }, + "message": { + "type": "track", + "sentAt": "2022-01-20T13:39:21.033Z", + "userId": "dummyId1", + "channel": "web", + "properties": { + "feedbackScore": 3, + "feedbackText": "Too Slow!!!" + }, + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.2.20", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", + "title": "Document", + "search": "", + "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", + "initial_referrer": "$direct", + "referring_domain": "127.0.0.1:7307", + "initial_referring_domain": "" + }, + "locale": "en-US", + "ip": "0.0.0.0", + "screen": { + "width": 1440, + "height": 900, + "density": 2, + "innerWidth": 536, + "innerHeight": 689 + }, + "traits": { + "city": "Mumbai", + "name": "Dummy User 1", + "email": "dummyUser1@gmail.com", + "phone": "+19123456789", + "title": "SDE", + "gender": "Male", + "company": "Rudderstack", + "createdAt": "2021-01-20T13:39:21.032Z" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.2.20" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Event Type is missing from Integration object", + "statTags": { + "destType": "WOOTRIC", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + } +] \ No newline at end of file diff --git a/test/integrations/destinations/wootric/router/data.ts b/test/integrations/destinations/wootric/router/data.ts new file mode 100644 index 0000000000..724ba176f2 --- /dev/null +++ b/test/integrations/destinations/wootric/router/data.ts @@ -0,0 +1,1622 @@ +export const data = [ + { + name: 'wootric', + description: 'Succesfull Idenitfy Call', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" + }, + "metadata": { + "jobId": 1 + }, + "message": { + "type": "identify", + "sentAt": "2022-01-20T13:39:21.033Z", + "userId": "dummyId2", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.2.20", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", + "title": "Document", + "search": "", + "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", + "initial_referrer": "$direct", + "referring_domain": "127.0.0.1:7307", + "initial_referring_domain": "" + }, + "locale": "en-US", + "screen": { + "width": 1440, + "height": 900, + "density": 2, + "innerWidth": 536, + "innerHeight": 689 + }, + "traits": { + "city": "Bangalore", + "name": "Dummy User 2", + "email": "dummyUser2@gmail.com", + "phone": "+19123456777", + "title": "SDE", + "gender": "Male", + "company": "Rudderstack", + "createdAt": "2021-01-20T13:39:21.032Z" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.2.20" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + }, + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" + }, + "metadata": { + "jobId": 2 + }, + "message": { + "type": "identify", + "sentAt": "2022-01-20T13:39:21.033Z", + "userId": "dummyId2", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.2.20", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", + "title": "Document", + "search": "", + "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", + "initial_referrer": "$direct", + "referring_domain": "127.0.0.1:7307", + "initial_referring_domain": "" + }, + "locale": "en-US", + "screen": { + "width": 1440, + "height": 900, + "density": 2, + "innerWidth": 536, + "innerHeight": 689 + }, + "traits": { + "city": "Bangalore", + "name": "Dummy User 2", + "phone": "+19123456777", + "title": "SDE", + "gender": "Male", + "company": "Rudderstack", + "createdAt": "2021-01-20T13:39:21.032Z" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.2.20" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + }, + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" + }, + "metadata": { + "jobId": 3 + }, + "message": { + "type": "identify", + "sentAt": "2022-01-20T13:39:21.033Z", + "userId": "dummyId2", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.2.20", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", + "title": "Document", + "search": "", + "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", + "initial_referrer": "$direct", + "referring_domain": "127.0.0.1:7307", + "initial_referring_domain": "" + }, + "locale": "en-US", + "screen": { + "width": 1440, + "height": 900, + "density": 2, + "innerWidth": 536, + "innerHeight": 689 + }, + "traits": { + "email": "dummyUser2@gmail.com", + "city": "Bangalore", + "name": "Dummy User 2", + "title": "SDE", + "gender": "Male", + "company": "Rudderstack", + "createdAt": "2021-01-20T13:39:21.032Z" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.2.20" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + }, + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" + }, + "metadata": { + "jobId": 5 + }, + "message": { + "type": "identify", + "sentAt": "2022-01-20T13:39:21.033Z", + "userId": "dummyId2", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.2.20", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", + "title": "Document", + "search": "", + "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", + "initial_referrer": "$direct", + "referring_domain": "127.0.0.1:7307", + "initial_referring_domain": "" + }, + "locale": "en-US", + "screen": { + "width": 1440, + "height": 900, + "density": 2, + "innerWidth": 536, + "innerHeight": 689 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.2.20" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + }, + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" + }, + "metadata": { + "jobId": 6 + }, + "message": { + "type": "identify", + "sentAt": "2022-01-20T13:39:21.033Z", + "userId": "dummyId2", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.2.20", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", + "title": "Document", + "search": "", + "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", + "initial_referrer": "$direct", + "referring_domain": "127.0.0.1:7307", + "initial_referring_domain": "" + }, + "locale": "en-US", + "screen": { + "width": 1440, + "height": 900, + "density": 2, + "innerWidth": 536, + "innerHeight": 689 + }, + "traits": { + "city": "Mumbai", + "name": "Dummy User 1", + "title": "SDE", + "gender": "Male", + "company": "Rudderstack", + "createdAt": "2021-01-20T13:39:21.032Z" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.2.20" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + }, + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" + }, + "metadata": { + "jobId": 7 + }, + "message": { + "type": "identify", + "sentAt": "2022-01-20T13:39:21.033Z", + "userId": "dummyId1", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.2.20", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", + "title": "Document", + "search": "", + "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", + "initial_referrer": "$direct", + "referring_domain": "127.0.0.1:7307", + "initial_referring_domain": "" + }, + "locale": "en-US", + "screen": { + "width": 1440, + "height": 900, + "density": 2, + "innerWidth": 536, + "innerHeight": 689 + }, + "traits": { + "email": "dummyuser1_01@gmail.com" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.2.20" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + }, + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" + }, + "metadata": { + "jobId": 8 + }, + "message": { + "type": "identify", + "sentAt": "2022-01-20T13:39:21.033Z", + "userId": "dummyId1", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.2.20", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", + "title": "Document", + "search": "", + "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", + "initial_referrer": "$direct", + "referring_domain": "127.0.0.1:7307", + "initial_referring_domain": "" + }, + "locale": "en-US", + "screen": { + "width": 1440, + "height": 900, + "density": 2, + "innerWidth": 536, + "innerHeight": 689 + }, + "traits": { + "phone": "+19777777778" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.2.20" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + }, + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" + }, + "metadata": { + "jobId": 9 + }, + "message": { + "type": "identify", + "sentAt": "2022-01-20T13:39:21.033Z", + "userId": "dummyId1", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.2.20", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", + "title": "Document", + "search": "", + "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", + "initial_referrer": "$direct", + "referring_domain": "127.0.0.1:7307", + "initial_referring_domain": "" + }, + "locale": "en-US", + "screen": { + "width": 1440, + "height": 900, + "density": 2, + "innerWidth": 536, + "innerHeight": 689 + }, + "traits": { + "city": "Udaipur", + "name": "Dummy User 1 New", + "title": "SDE-2", + "gender": "Male", + "company": "Rudderstack" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.2.20" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + }, + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" + }, + "metadata": { + "jobId": 10 + }, + "message": { + "type": "track", + "sentAt": "2022-01-20T13:39:21.033Z", + "userId": "dummyId1", + "channel": "web", + "properties": { + "feedbackScore": 7, + "feedbackText": "Simple, Easy to use, Reliable, Affordable Product" + }, + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.2.20", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", + "title": "Document", + "search": "", + "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", + "initial_referrer": "$direct", + "referring_domain": "127.0.0.1:7307", + "initial_referring_domain": "" + }, + "locale": "en-US", + "ip": "0.0.0.0", + "screen": { + "width": 1440, + "height": 900, + "density": 2, + "innerWidth": 536, + "innerHeight": 689 + }, + "traits": { + "city": "Mumbai", + "name": "Dummy User 1", + "email": "dummyUser1@gmail.com", + "title": "SDE", + "gender": "Male", + "company": "Rudderstack", + "createdAt": "2021-01-20T13:39:21.032Z" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.2.20" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true, + "Wootric": { + "eventType": "create response" + } + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + }, + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" + }, + "metadata": { + "jobId": 11 + }, + "message": { + "type": "track", + "sentAt": "2022-01-20T13:39:21.033Z", + "userId": "dummyId2", + "channel": "web", + "properties": { + "feedbackScore": 7, + "feedbackText": "Simple, Easy to use, Reliable, Affordable Product" + }, + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.2.20", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", + "title": "Document", + "search": "", + "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", + "initial_referrer": "$direct", + "referring_domain": "127.0.0.1:7307", + "initial_referring_domain": "" + }, + "locale": "en-US", + "ip": "0.0.0.0", + "screen": { + "width": 1440, + "height": 900, + "density": 2, + "innerWidth": 536, + "innerHeight": 689 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.2.20" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true, + "Wootric": { + "eventType": "create response" + } + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + }, + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" + }, + "metadata": { + "jobId": 12 + }, + "message": { + "type": "track", + "sentAt": "2022-01-20T13:39:21.033Z", + "userId": "dummyId1", + "channel": "web", + "properties": { + "feedbackScore": 12, + "feedbackText": "Simple, Easy to use, Reliable, Affordable Product" + }, + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.2.20", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", + "title": "Document", + "search": "", + "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", + "initial_referrer": "$direct", + "referring_domain": "127.0.0.1:7307", + "initial_referring_domain": "" + }, + "locale": "en-US", + "ip": "0.0.0.0", + "screen": { + "width": 1440, + "height": 900, + "density": 2, + "innerWidth": 536, + "innerHeight": 689 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.2.20" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true, + "Wootric": { + "eventType": "create response" + } + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + }, + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" + }, + "metadata": { + "jobId": 13 + }, + "message": { + "type": "track", + "sentAt": "2022-01-20T13:39:21.033Z", + "userId": "dummyId1", + "channel": "web", + "properties": { + "feedbackScore": 9, + "feedbackText": "Simple, Easy to use, Reliable, Affordable Product" + }, + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.2.20", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", + "title": "Document", + "search": "", + "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", + "initial_referrer": "$direct", + "referring_domain": "127.0.0.1:7307", + "initial_referring_domain": "" + }, + "locale": "en-US", + "screen": { + "width": 1440, + "height": 900, + "density": 2, + "innerWidth": 536, + "innerHeight": 689 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.2.20" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true, + "Wootric": { + "eventType": "create decline" + } + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + }, + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" + }, + "metadata": { + "jobId": 14 + }, + "message": { + "type": "track", + "sentAt": "2022-01-20T13:39:21.033Z", + "userId": "dummyId2", + "channel": "web", + "properties": { + "feedbackScore": 9, + "feedbackText": "Simple, Easy to use, Reliable, Affordable Product" + }, + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.2.20", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", + "title": "Document", + "search": "", + "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", + "initial_referrer": "$direct", + "referring_domain": "127.0.0.1:7307", + "initial_referring_domain": "" + }, + "locale": "en-US", + "screen": { + "width": 1440, + "height": 900, + "density": 2, + "innerWidth": 536, + "innerHeight": 689 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.2.20" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true, + "Wootric": { + "eventType": "create decline" + } + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + }, + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" + }, + "metadata": { + "jobId": 15 + }, + "message": { + "type": "track", + "sentAt": "2022-01-20T13:39:21.033Z", + "userId": "dummyId1", + "channel": "web", + "properties": { + "feedbackScore": 7, + "feedbackText": "Simple, Easy to use, Reliable, Affordable Product" + }, + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.2.20", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", + "title": "Document", + "search": "", + "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", + "initial_referrer": "$direct", + "referring_domain": "127.0.0.1:7307", + "initial_referring_domain": "" + }, + "locale": "en-US", + "ip": "0.0.0.0", + "screen": { + "width": 1440, + "height": 900, + "density": 2, + "innerWidth": 536, + "innerHeight": 689 + }, + "traits": { + "city": "Mumbai", + "name": "Dummy User 1", + "email": "dummyUser1@gmail.com", + "phone": "+19123456789", + "title": "SDE", + "gender": "Male", + "company": "Rudderstack", + "createdAt": "2021-01-20T13:39:21.032Z" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.2.20" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true, + "Wootric": { + "eventType": "random" + } + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + }, + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" + }, + "metadata": { + "jobId": 16 + }, + "message": { + "type": "track", + "sentAt": "2022-01-20T13:39:21.033Z", + "userId": "dummyId1", + "channel": "web", + "properties": { + "feedbackScore": 3, + "feedbackText": "Too Slow!!!" + }, + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.2.20", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", + "title": "Document", + "search": "", + "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", + "initial_referrer": "$direct", + "referring_domain": "127.0.0.1:7307", + "initial_referring_domain": "" + }, + "locale": "en-US", + "ip": "0.0.0.0", + "screen": { + "width": 1440, + "height": 900, + "density": 2, + "innerWidth": 536, + "innerHeight": 689 + }, + "traits": { + "city": "Mumbai", + "name": "Dummy User 1", + "email": "dummyUser1@gmail.com", + "phone": "+19123456789", + "title": "SDE", + "gender": "Male", + "company": "Rudderstack", + "createdAt": "2021-01-20T13:39:21.032Z" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.2.20" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + } + ] + , + destType: 'wootric', + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + "batchedRequest": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.wootric.com/v1/end_users", + "headers": { + "Content-Type": "application/x-www-form-urlencoded", + "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" + }, + "params": {}, + "body": { + "JSON": {}, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": { + "email": "dummyUser2@gmail.com", + "phone_number": "+19123456777", + "last_surveyed": "1642685961", + "external_created_at": "1611149961", + "external_id": "dummyId2", + "properties[city]": "Bangalore", + "properties[name]": "Dummy User 2", + "properties[title]": "SDE", + "properties[gender]": "Male", + "properties[company]": "Rudderstack" + } + }, + "files": {} + }, + "metadata": [ + { + "jobId": 1 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG", + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + } + } + }, + { + "batchedRequest": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.wootric.com/v1/end_users", + "headers": { + "Content-Type": "application/x-www-form-urlencoded", + "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" + }, + "params": {}, + "body": { + "JSON": {}, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": { + "phone_number": "+19123456777", + "last_surveyed": "1642685961", + "external_created_at": "1611149961", + "external_id": "dummyId2", + "properties[city]": "Bangalore", + "properties[name]": "Dummy User 2", + "properties[title]": "SDE", + "properties[gender]": "Male", + "properties[company]": "Rudderstack" + } + }, + "files": {} + }, + "metadata": [ + { + "jobId": 2 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG", + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + } + } + }, + { + "batchedRequest": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.wootric.com/v1/end_users", + "headers": { + "Content-Type": "application/x-www-form-urlencoded", + "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" + }, + "params": {}, + "body": { + "JSON": {}, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": { + "email": "dummyUser2@gmail.com", + "last_surveyed": "1642685961", + "external_created_at": "1611149961", + "external_id": "dummyId2", + "properties[city]": "Bangalore", + "properties[name]": "Dummy User 2", + "properties[title]": "SDE", + "properties[gender]": "Male", + "properties[company]": "Rudderstack" + } + }, + "files": {} + }, + "metadata": [ + { + "jobId": 3 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG", + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + } + } + }, + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" + }, + "metadata": [ + { + "jobId": 5 + } + ], + "batched": false, + "statusCode": 400, + "error": "email/phone number are missing. At least one parameter must be provided", + "statTags": { + "destType": "WOOTRIC", + "feature": "router", + "implementation": "native", + "module": "destination", + "errorCategory": "dataValidation", + "errorType": "instrumentation" + } + }, + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" + }, + "metadata": [ + { + "jobId": 6 + } + ], + "batched": false, + "statusCode": 400, + "error": "email/phone number are missing. At least one parameter must be provided", + "statTags": { + "destType": "WOOTRIC", + "feature": "router", + "implementation": "native", + "module": "destination", + "errorCategory": "dataValidation", + "errorType": "instrumentation" + } + }, + { + "batchedRequest": { + "version": "1", + "type": "REST", + "method": "PUT", + "endpoint": "https://api.wootric.com/v1/end_users/486438462", + "headers": { + "Content-Type": "application/x-www-form-urlencoded", + "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" + }, + "params": {}, + "body": { + "JSON": {}, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": { + "email": "dummyuser1_01@gmail.com", + "last_surveyed": "1642685961" + } + }, + "files": {} + }, + "metadata": [ + { + "jobId": 7 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG", + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + } + } + }, + { + "batchedRequest": { + "version": "1", + "type": "REST", + "method": "PUT", + "endpoint": "https://api.wootric.com/v1/end_users/486438462", + "headers": { + "Content-Type": "application/x-www-form-urlencoded", + "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" + }, + "params": {}, + "body": { + "JSON": {}, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": { + "phone_number": "+19777777778", + "last_surveyed": "1642685961" + } + }, + "files": {} + }, + "metadata": [ + { + "jobId": 8 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG", + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + } + } + }, + { + "batchedRequest": { + "version": "1", + "type": "REST", + "method": "PUT", + "endpoint": "https://api.wootric.com/v1/end_users/486438462", + "headers": { + "Content-Type": "application/x-www-form-urlencoded", + "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" + }, + "params": {}, + "body": { + "JSON": {}, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": { + "last_surveyed": "1642685961", + "properties[city]": "Udaipur", + "properties[name]": "Dummy User 1 New", + "properties[title]": "SDE-2", + "properties[gender]": "Male", + "properties[company]": "Rudderstack" + } + }, + "files": {} + }, + "metadata": [ + { + "jobId": 9 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG", + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + } + } + }, + { + "batchedRequest": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.wootric.com/v1/end_users/486438462/responses", + "headers": { + "Content-Type": "application/x-www-form-urlencoded", + "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" + }, + "params": {}, + "body": { + "JSON": {}, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": { + "score": 7, + "ip_address": "0.0.0.0", + "origin_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "text": "Simple, Easy to use, Reliable, Affordable Product", + "created_at": "1611149961", + "end_user[properties][city]": "Mumbai", + "end_user[properties][name]": "Dummy User 1", + "end_user[properties][title]": "SDE", + "end_user[properties][gender]": "Male", + "end_user[properties][company]": "Rudderstack" + } + }, + "files": {} + }, + "metadata": [ + { + "jobId": 10 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG", + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + } + } + }, + { + "metadata": [ + { + "jobId": 11 + } + ], + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" + }, + "batched": false, + "statusCode": 400, + "error": "No user found with userId : dummyId2", + "statTags": { + "destType": "WOOTRIC", + "feature": "router", + "implementation": "native", + "module": "destination", + "errorCategory": "dataValidation", + "errorType": "instrumentation" + } + }, + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" + }, + "metadata": [ + { + "jobId": 12 + } + ], + "batched": false, + "statusCode": 400, + "error": "Invalid Score", + "statTags": { + "destType": "WOOTRIC", + "feature": "router", + "implementation": "native", + "module": "destination", + "errorCategory": "dataValidation", + "errorType": "instrumentation" + } + }, + { + "batchedRequest": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.wootric.com/v1/end_users/486438462/declines", + "headers": { + "Content-Type": "application/x-www-form-urlencoded", + "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" + }, + "params": {}, + "body": { + "JSON": {}, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": { + "origin_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html" + } + }, + "files": {} + }, + "metadata": [ + { + "jobId": 13 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG", + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + } + } + }, + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" + }, + "metadata": [ + { + "jobId": 14 + } + ], + "batched": false, + "statusCode": 400, + "error": "No user found with userId : dummyId2", + "statTags": { + "destType": "WOOTRIC", + "feature": "router", + "implementation": "native", + "module": "destination", + "errorCategory": "dataValidation", + "errorType": "instrumentation" + } + }, + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" + }, + "metadata": [ + { + "jobId": 15 + } + ], + "batched": false, + "statusCode": 400, + "error": "Event Type not supported", + "statTags": { + "destType": "WOOTRIC", + "feature": "router", + "implementation": "native", + "module": "destination", + "errorCategory": "dataValidation", + "errorType": "instrumentation" + } + }, + { + "metadata": [ + { + "jobId": 16 + } + ], + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" + }, + "batched": false, + "statusCode": 400, + "error": "Event Type is missing from Integration object", + "statTags": { + "destType": "WOOTRIC", + "feature": "router", + "implementation": "native", + "module": "destination", + "errorCategory": "dataValidation", + "errorType": "instrumentation" + } + } + ], + }, + }, + }, + } +]; From c864ff26b27cce323e21c33e6f5e21ed2855c1b0 Mon Sep 17 00:00:00 2001 From: Sudip Paul <67197965+ItsSudip@users.noreply.github.com> Date: Wed, 20 Dec 2023 13:46:30 +0530 Subject: [PATCH 096/135] chore: add component test cases for some destinations part2 (#2917) * chore: add component test cases for some destinations * chore: added component test cases for desitnations * chore: decrease coverageThreshold in jest.config.js * chore: decrease coverageThreshold in jest.default.config.js --- jest.config.js | 8 +- jest.default.config.js | 8 +- test/__mocks__/axios.js | 84 +- test/__mocks__/braze.mock.js | 29 + test/__mocks__/data/braze/proxy_response.json | 34 + test/__mocks__/data/braze/response.json | 46 + test/__mocks__/data/monday/response.json | 212 - test/__mocks__/data/profitwell/response.json | 34 - test/__mocks__/gainsight.mock.js | 33 - test/__mocks__/gainsight_px.mock.js | 23 - test/__mocks__/klaviyo.mock.js | 39 - test/__mocks__/kustomer.mock.js | 142 - test/__mocks__/mailchimp.mock.js | 49 - test/__mocks__/monday.mock.js | 32 - test/__mocks__/profitwell.mock.js | 16 - test/__mocks__/sendinblue.mock.js | 23 - test/__tests__/data/gainsight_input.json | 416 - test/__tests__/data/gainsight_output.json | 215 - test/__tests__/data/gainsight_px_input.json | 1087 - test/__tests__/data/gainsight_px_output.json | 368 - .../data/gainsight_px_router_input.json | 298 - .../data/gainsight_px_router_output.json | 236 - .../data/gainsight_router_input.json | 240 - .../data/gainsight_router_output.json | 188 - test/__tests__/data/klaviyo.json | 1970 - test/__tests__/data/klaviyo_router.json | 599 - test/__tests__/data/kustomer_input.json | 851 - test/__tests__/data/kustomer_output.json | 602 - .../__tests__/data/kustomer_router_input.json | 183 - .../data/kustomer_router_output.json | 184 - .../__tests__/data/mailchimp_batch_input.json | 225 - .../data/mailchimp_batch_output.json | 100 - test/__tests__/data/mailchimp_input.json | 1299 - test/__tests__/data/mailchimp_output.json | 498 - .../data/mailchimp_router_input.json | 347 - .../data/mailchimp_router_output.json | 238 - test/__tests__/data/monday.json | 1023 - test/__tests__/data/monday_router_input.json | 111 - test/__tests__/data/monday_router_output.json | 84 - test/__tests__/data/profitwell_input.json | 719 - test/__tests__/data/profitwell_output.json | 166 - .../data/profitwell_router_input.json | 45 - .../data/profitwell_router_output.json | 44 - test/__tests__/data/sendinblue.json | 1196 - .../data/sendinblue_router_input.json | 187 - .../data/sendinblue_router_output.json | 196 - test/__tests__/gainsight.test.js | 48 - test/__tests__/gainsight_px.test.js | 48 - test/__tests__/klaviyo.test.js | 47 - test/__tests__/kustomer.test.js | 49 - test/__tests__/mailchimp.test.js | 67 - test/__tests__/monday.test.js | 46 - test/__tests__/profitwell.test.js | 62 - test/__tests__/sendinblue.test.js | 47 - .../destinations/am/router/data.ts | 612 +- .../bingads_audience/processor/data.ts | 2283 +- .../destinations/braze/processor/data.ts | 288 +- .../destinations/braze/router/data.ts | 1782 +- .../destinations/clevertap/router/data.ts | 528 +- .../facebook_conversions/mocks.ts | 4 +- .../facebook_conversions/processor/data.ts | 2866 +- .../facebook_conversions/router/data.ts | 590 +- test/integrations/destinations/ga4/mocks.ts | 4 +- .../destinations/ga4/processor/data.ts | 29704 ++++++++-------- .../destinations/gainsight/network.ts | 71 + .../destinations/gainsight/processor/data.ts | 970 + .../destinations/gainsight/router/data.ts | 451 + .../destinations/gainsight_px/network.ts | 222 + .../gainsight_px/processor/data.ts | 1857 + .../destinations/gainsight_px/router/data.ts | 558 + .../destinations/intercom/router/data.ts | 524 +- .../destinations/klaviyo/network.ts | 75 + .../destinations/klaviyo/processor/data.ts | 2430 ++ .../destinations/klaviyo/router/data.ts | 464 + .../destinations/kustomer/network.ts | 423 + .../destinations/kustomer/processor/data.ts | 1901 + .../destinations/kustomer/router/data.ts | 393 + .../destinations/mailchimp/network.ts | 80 + .../destinations/mailchimp/processor/data.ts | 2259 ++ .../destinations/mailchimp/router/data.ts | 977 + .../destinations/marketo/network.ts | 456 +- .../destinations/marketo/router/data.ts | 4224 ++- .../destinations/monday/network.ts | 242 + .../destinations/monday/processor/data.ts | 1399 + .../destinations/monday/router/data.ts | 228 + .../destinations/profitwell/network.ts | 94 + .../destinations/profitwell/processor/data.ts | 1241 + .../destinations/profitwell/router/data.ts | 113 + .../destinations/sendgrid/network.ts | 192 +- .../destinations/sendgrid/processor/data.ts | 3019 +- .../destinations/sendgrid/router/data.ts | 324 +- .../destinations/sendinblue/network.ts | 92 + .../destinations/sendinblue/processor/data.ts | 1722 + .../destinations/sendinblue/router/data.ts | 410 + .../destinations/stormly/processor/data.ts | 1130 +- .../destinations/stormly/router/data.ts | 274 +- 96 files changed, 43270 insertions(+), 39347 deletions(-) create mode 100644 test/__mocks__/braze.mock.js create mode 100644 test/__mocks__/data/braze/proxy_response.json create mode 100644 test/__mocks__/data/braze/response.json delete mode 100644 test/__mocks__/data/monday/response.json delete mode 100644 test/__mocks__/data/profitwell/response.json delete mode 100644 test/__mocks__/gainsight.mock.js delete mode 100644 test/__mocks__/gainsight_px.mock.js delete mode 100644 test/__mocks__/klaviyo.mock.js delete mode 100644 test/__mocks__/kustomer.mock.js delete mode 100644 test/__mocks__/mailchimp.mock.js delete mode 100644 test/__mocks__/monday.mock.js delete mode 100644 test/__mocks__/profitwell.mock.js delete mode 100644 test/__mocks__/sendinblue.mock.js delete mode 100644 test/__tests__/data/gainsight_input.json delete mode 100644 test/__tests__/data/gainsight_output.json delete mode 100644 test/__tests__/data/gainsight_px_input.json delete mode 100644 test/__tests__/data/gainsight_px_output.json delete mode 100644 test/__tests__/data/gainsight_px_router_input.json delete mode 100644 test/__tests__/data/gainsight_px_router_output.json delete mode 100644 test/__tests__/data/gainsight_router_input.json delete mode 100644 test/__tests__/data/gainsight_router_output.json delete mode 100644 test/__tests__/data/klaviyo.json delete mode 100644 test/__tests__/data/klaviyo_router.json delete mode 100644 test/__tests__/data/kustomer_input.json delete mode 100644 test/__tests__/data/kustomer_output.json delete mode 100644 test/__tests__/data/kustomer_router_input.json delete mode 100644 test/__tests__/data/kustomer_router_output.json delete mode 100644 test/__tests__/data/mailchimp_batch_input.json delete mode 100644 test/__tests__/data/mailchimp_batch_output.json delete mode 100644 test/__tests__/data/mailchimp_input.json delete mode 100644 test/__tests__/data/mailchimp_output.json delete mode 100644 test/__tests__/data/mailchimp_router_input.json delete mode 100644 test/__tests__/data/mailchimp_router_output.json delete mode 100644 test/__tests__/data/monday.json delete mode 100644 test/__tests__/data/monday_router_input.json delete mode 100644 test/__tests__/data/monday_router_output.json delete mode 100644 test/__tests__/data/profitwell_input.json delete mode 100644 test/__tests__/data/profitwell_output.json delete mode 100644 test/__tests__/data/profitwell_router_input.json delete mode 100644 test/__tests__/data/profitwell_router_output.json delete mode 100644 test/__tests__/data/sendinblue.json delete mode 100644 test/__tests__/data/sendinblue_router_input.json delete mode 100644 test/__tests__/data/sendinblue_router_output.json delete mode 100644 test/__tests__/gainsight.test.js delete mode 100644 test/__tests__/gainsight_px.test.js delete mode 100644 test/__tests__/klaviyo.test.js delete mode 100644 test/__tests__/kustomer.test.js delete mode 100644 test/__tests__/mailchimp.test.js delete mode 100644 test/__tests__/monday.test.js delete mode 100644 test/__tests__/profitwell.test.js delete mode 100644 test/__tests__/sendinblue.test.js create mode 100644 test/integrations/destinations/gainsight/network.ts create mode 100644 test/integrations/destinations/gainsight/processor/data.ts create mode 100644 test/integrations/destinations/gainsight/router/data.ts create mode 100644 test/integrations/destinations/gainsight_px/network.ts create mode 100644 test/integrations/destinations/gainsight_px/processor/data.ts create mode 100644 test/integrations/destinations/gainsight_px/router/data.ts create mode 100644 test/integrations/destinations/klaviyo/network.ts create mode 100644 test/integrations/destinations/klaviyo/processor/data.ts create mode 100644 test/integrations/destinations/klaviyo/router/data.ts create mode 100644 test/integrations/destinations/kustomer/network.ts create mode 100644 test/integrations/destinations/kustomer/processor/data.ts create mode 100644 test/integrations/destinations/kustomer/router/data.ts create mode 100644 test/integrations/destinations/mailchimp/network.ts create mode 100644 test/integrations/destinations/mailchimp/processor/data.ts create mode 100644 test/integrations/destinations/mailchimp/router/data.ts create mode 100644 test/integrations/destinations/monday/network.ts create mode 100644 test/integrations/destinations/monday/processor/data.ts create mode 100644 test/integrations/destinations/monday/router/data.ts create mode 100644 test/integrations/destinations/profitwell/network.ts create mode 100644 test/integrations/destinations/profitwell/processor/data.ts create mode 100644 test/integrations/destinations/profitwell/router/data.ts create mode 100644 test/integrations/destinations/sendinblue/network.ts create mode 100644 test/integrations/destinations/sendinblue/processor/data.ts create mode 100644 test/integrations/destinations/sendinblue/router/data.ts diff --git a/jest.config.js b/jest.config.js index 412d8d2733..6ccb91259a 100644 --- a/jest.config.js +++ b/jest.config.js @@ -35,10 +35,10 @@ module.exports = { // An object that configures minimum threshold enforcement for coverage results coverageThreshold: { global: { - branches: 60, - functions: 75, - lines: 75, - statements: 75, + branches: 30, + functions: 40, + lines: 50, + statements: 50, }, }, diff --git a/jest.default.config.js b/jest.default.config.js index fed1dcef31..2d591cd833 100644 --- a/jest.default.config.js +++ b/jest.default.config.js @@ -35,10 +35,10 @@ module.exports = { // An object that configures minimum threshold enforcement for coverage results coverageThreshold: { global: { - branches: 60, - functions: 75, - lines: 75, - statements: 75, + branches: 30, + functions: 40, + lines: 50, + statements: 50, }, }, diff --git a/test/__mocks__/axios.js b/test/__mocks__/axios.js index d0961d6acf..44abc8728d 100644 --- a/test/__mocks__/axios.js +++ b/test/__mocks__/axios.js @@ -3,36 +3,23 @@ /// ///////////////////////////////////////////////////////////////////////////// const axios = jest.genMockFromModule("axios"); const acPostRequestHandler = require("./active_campaign.mock"); -const { - klaviyoPostRequestHandler, - klaviyoGetRequestHandler -} = require("./klaviyo.mock"); -const kustomerGetRequestHandler = require("./kustomer.mock"); const trengoGetRequestHandler = require("./trengo.mock"); -const gainsightRequestHandler = require("./gainsight.mock"); -const mailchimpGetRequestHandler = require("./mailchimp.mock"); const yahooDspPostRequestHandler = require("./yahoo_dsp.mock"); -const { gainsightPXGetRequestHandler } = require("./gainsight_px.mock"); -const profitwellGetRequestHandler = require("./profitwell.mock"); const cannyPostRequestHandler = require("./canny.mock"); const { userGetRequestHandler, userPutRequestHandler } = require("./user.mock"); const { mixpanelPostRequestHandler } = require("./mixpanel.mock"); -const { mondayPostRequestHandler } = require("./monday.mock"); const { sendgridGetRequestHandler } = require("./sendgrid.mock"); -const { sendinblueGetRequestHandler } = require("./sendinblue.mock"); const { courierGetRequestHandler } = require("./courier.mock"); +const { brazePostRequestHandler } = require("./braze.mock"); const urlDirectoryMap = { "zendesk.com": "zendesk", "salesforce.com": "salesforce", "mktorest.com": "marketo", "active.campaigns.rudder.com": "active_campaigns", - "api.aptrinsic.com": "gainsight_px", - "api.profitwell.com": "profitwell", "ruddertest2.mautic.net": "mautic", "api.sendgrid.com": "sendgrid", - "api.sendinblue.com": "sendinblue", "api.criteo.com": "criteo_audience", "api.courier.com": "courier", }; @@ -40,14 +27,6 @@ const urlDirectoryMap = { const fs = require("fs"); const path = require("path"); -const getParamEncodedUrl = (url, options) => { - const { params } = options; - const paramString = Object.keys(params) - .map(key => `${key}=${params[key]}`) - .join("&"); - return `${url}?${paramString}`; -}; - function getData(url) { let directory = ""; Object.keys(urlDirectoryMap).forEach(key => { @@ -67,44 +46,11 @@ function getData(url) { function get(url, options) { const mockData = getData(url); - if (url.includes("https://api.kustomerapp.com") || url.includes("https://api.prod2.kustomerapp.com")) { - return new Promise((resolve, reject) => { - resolve(kustomerGetRequestHandler(url)); - }); - } if (url.includes("https://app.trengo.com")) { return new Promise((resolve, reject) => { resolve(trengoGetRequestHandler(url)); }); } - if (url.includes("api.mailchimp.com")) { - return new Promise((resolve, reject) => { - resolve(mailchimpGetRequestHandler(url)); - }); - } - if (url.includes("https://api.aptrinsic.com")) { - return gainsightPXGetRequestHandler(url, mockData); - } - if (url.includes("https://a.klaviyo.com/api/v2/people/search")) { - return klaviyoGetRequestHandler(getParamEncodedUrl(url, options)); - } - if (url.includes("https://api.profitwell.com")) { - return profitwellGetRequestHandler(url, mockData); - } - if ( - url.includes( - "https://api.getdrip.com/v2/1809802/subscribers/identified_user@gmail.com" - ) - ) { - return Promise.resolve({ status: 200 }); - } - if ( - url.includes( - "https://api.getdrip.com/v2/1809802/subscribers/unidentified_user@gmail.com" - ) - ) { - return Promise.reject({ status: 404 }); - } if (url.includes("https://commander.user.com")) { return new Promise((resolve, reject) => { resolve(userGetRequestHandler(url)); @@ -113,9 +59,6 @@ function get(url, options) { if (url.includes("https://api.sendgrid.com/v3/marketing/field_definitions")) { return Promise.resolve(sendgridGetRequestHandler(url)); } - if (url.includes("https://api.sendinblue.com/v3/contacts/")) { - return Promise.resolve(sendinblueGetRequestHandler(url, mockData)); - } if (url.includes("https://api.courier.com")) { return Promise.resolve(courierGetRequestHandler(url, mockData)); } @@ -139,14 +82,9 @@ function post(url, payload) { resolve(acPostRequestHandler(url, payload)); }); } - if (url.includes("https://a.klaviyo.com")) { + if(url.includes("braze.com")) { return new Promise((resolve, reject) => { - resolve(klaviyoPostRequestHandler(url, payload)); - }); - } - if (url.includes("https://demo-domain.gainsightcloud.com")) { - return new Promise(resolve => { - resolve(gainsightRequestHandler(url, payload)); + resolve(brazePostRequestHandler(url, payload)); }); } if (url.includes("https://api.aptrinsic.com")) { @@ -172,16 +110,11 @@ function post(url, payload) { resolve(mixpanelPostRequestHandler(url, payload)); }); } - - if ( - url.includes("https://api.monday.com") && - payload.query.includes("query") - ) { + if(url.includes("braze.com")) { return new Promise((resolve, reject) => { - resolve(mondayPostRequestHandler(payload)); + resolve(brazePostRequestHandler(url, payload)); }); } - return new Promise((resolve, reject) => { if (mockData) { resolve({ data: mockData, status: 200 }); @@ -193,13 +126,6 @@ function post(url, payload) { function put(url, payload, options) { const mockData = getData(url); - if (url.includes("https://demo-domain.gainsightcloud.com")) { - return new Promise(resolve => { - resolve( - gainsightRequestHandler(getParamEncodedUrl(url, options), payload) - ); - }); - } if (url.includes("https://commander.user.com")) { return new Promise((resolve, reject) => { resolve(userPutRequestHandler(url)); diff --git a/test/__mocks__/braze.mock.js b/test/__mocks__/braze.mock.js new file mode 100644 index 0000000000..65f237d448 --- /dev/null +++ b/test/__mocks__/braze.mock.js @@ -0,0 +1,29 @@ +const fs = require("fs"); +const path = require("path"); +const getData = url => { + const dataFile = fs.readFileSync( + path.resolve(__dirname, "./data/braze/response.json") + ); + const data = JSON.parse(dataFile); + const response = data[url]; + return response || {}; +}; + +const brazePostRequestHandler = (url, payload) => { + const mockData = getData(url); + switch (url) { + case "https://rest.iad-03.braze.com": + //resolve with status 201 and response data contains value for contact created + return { data: mockData, status: 201 }; + default: + return new Promise((resolve, reject) => { + if (mockData) { + resolve({ data: mockData, status: 200 }); + } else { + resolve({ error: "Request failed" }); + } + }); + } +}; + +module.exports = { brazePostRequestHandler }; \ No newline at end of file diff --git a/test/__mocks__/data/braze/proxy_response.json b/test/__mocks__/data/braze/proxy_response.json new file mode 100644 index 0000000000..704c1a65e5 --- /dev/null +++ b/test/__mocks__/data/braze/proxy_response.json @@ -0,0 +1,34 @@ +{ + "https://rest.iad-03.braze.com/users/identify/test1": { + "data": { + "aliases_processed": 1, + "message": "success" + }, + "status": 201 + }, + "https://rest.iad-03.braze.com/users/identify/test2": { + "data": { + "message": "success", + "errors": ["minor error message"] + }, + "status": 201 + }, + "https://rest.iad-03.braze.com/users/identify/test3": { + "data": { + "message": "fatal error message", + "errors": ["minor error message"] + }, + "status": 201 + }, + "https://rest.iad-03.braze.com/users/identify/test4": { + "data": "", + "status": 201 + }, + "https://rest.iad-03.braze.com/users/identify/test5": {}, + "https://rest.iad-03.braze.com/users/identify/test6": { + "code": "[ENOTFOUND] :: DNS lookup failed" + }, + "https://rest.iad-03.braze.com/users/identify/test7": { + "response": {} + } +} diff --git a/test/__mocks__/data/braze/response.json b/test/__mocks__/data/braze/response.json new file mode 100644 index 0000000000..d4aad64f49 --- /dev/null +++ b/test/__mocks__/data/braze/response.json @@ -0,0 +1,46 @@ +{ + "https://rest.iad-03.braze.com/users/export/ids": { + "users": [ + { + "created_at": "2023-03-17T20:51:58.297Z", + "external_id": "braze_test_user", + "user_aliases": [], + "appboy_id": "6414d2ee33326e3354e3040b", + "braze_id": "6414d2ee33326e3354e3040b", + "first_name": "Jackson", + "last_name": "Miranda", + "random_bucket": 8134, + "email": "jackson24miranda@gmail.com", + "custom_attributes": { + "pwa": false, + "is_registered": true, + "last_identify": "GOOGLE_SIGN_IN", + "account_region": "ON", + "is_pickup_selected": "false", + "has_tradein_attempt": false, + "custom_obj_attr": { + "key1": "value1", + "key2": "value2", + "key3": "value3" + }, + "custom_arr": [1, 2, "str1"] + }, + "custom_events": [ + { + "name": "Sign In Completed", + "first": "2023-03-10T18:36:05.028Z", + "last": "2023-03-10T18:36:05.028Z", + "count": 2 + } + ], + "total_revenue": 0, + "push_subscribe": "subscribed", + "email_subscribe": "subscribed" + } + ], + "message": "success" + }, + "https://rest.iad-01.braze.com/users/identify": { + "response": {} + } +} diff --git a/test/__mocks__/data/monday/response.json b/test/__mocks__/data/monday/response.json deleted file mode 100644 index a6445f18ac..0000000000 --- a/test/__mocks__/data/monday/response.json +++ /dev/null @@ -1,212 +0,0 @@ -{ - "339283933": { - "data": { - "boards": [ - { - "name": "Planning", - "columns": [ - { - "id": "name", - "title": "Name", - "type": "name", - "description": null, - "settings_str": "{}" - }, - { - "id": "subitems", - "title": "Subitems", - "type": "subtasks", - "description": null, - "settings_str": "{\"allowMultipleItems\":true,\"itemTypeName\":\"column.subtasks.title\",\"displayType\":\"BOARD_INLINE\",\"boardIds\":[3160974974]}" - }, - { - "id": "person", - "title": "Person", - "type": "multiple-person", - "description": null, - "settings_str": "{}" - }, - { - "id": "status", - "title": "Status", - "type": "color", - "description": null, - "settings_str": "{\"labels\":{\"0\":\"Working on it\",\"1\":\"Done\",\"2\":\"Stuck\"},\"labels_positions_v2\":{\"0\":0,\"1\":2,\"2\":1,\"5\":3},\"labels_colors\":{\"0\":{\"color\":\"#fdab3d\",\"border\":\"#E99729\",\"var_name\":\"orange\"},\"1\":{\"color\":\"#00c875\",\"border\":\"#00B461\",\"var_name\":\"green-shadow\"},\"2\":{\"color\":\"#e2445c\",\"border\":\"#CE3048\",\"var_name\":\"red-shadow\"}}}" - }, - { - "id": "date4", - "title": "Date", - "type": "date", - "description": null, - "settings_str": "{}" - }, - { - "id": "checkbox", - "title": "Checkbox", - "type": "boolean", - "description": null, - "settings_str": "{}" - }, - { - "id": "connect_boards", - "title": "Connect boards", - "type": "board-relation", - "description": null, - "settings_str": "{\"allowCreateReflectionColumn\":false}" - }, - { - "id": "status_1", - "title": "Other", - "type": "color", - "description": null, - "settings_str": "{\"labels\":{\"0\":\"Working on it\",\"1\":\"Done\",\"2\":\"Stuck\"},\"labels_colors\":{\"0\":{\"color\":\"#fdab3d\",\"border\":\"#E99729\",\"var_name\":\"orange\"},\"1\":{\"color\":\"#00c875\",\"border\":\"#00B461\",\"var_name\":\"green-shadow\"},\"2\":{\"color\":\"#e2445c\",\"border\":\"#CE3048\",\"var_name\":\"red-shadow\"}}}" - }, - { - "id": "date_1", - "title": "Date 1", - "type": "date", - "description": null, - "settings_str": "{\"hide_footer\":false}" - }, - { - "id": "status_12", - "title": "new status", - "type": "color", - "description": null, - "settings_str": "{\"labels\":{\"0\":\"Working on it\",\"1\":\"Done\",\"2\":\"Stuck\"},\"labels_colors\":{\"0\":{\"color\":\"#fdab3d\",\"border\":\"#E99729\",\"var_name\":\"orange\"},\"1\":{\"color\":\"#00c875\",\"border\":\"#00B461\",\"var_name\":\"green-shadow\"},\"2\":{\"color\":\"#e2445c\",\"border\":\"#CE3048\",\"var_name\":\"red-shadow\"}}}" - }, - { - "id": "numbers", - "title": "Numbers", - "type": "numeric", - "description": null, - "settings_str": "{}" - }, - { - "id": "text", - "title": "Name", - "type": "text", - "description": null, - "settings_str": "{}" - }, - { - "id": "country", - "title": "Country", - "type": "country", - "description": null, - "settings_str": "{}" - }, - { - "id": "dropdown", - "title": "Dropdown", - "type": "dropdown", - "description": null, - "settings_str": "{\"hide_footer\":false,\"labels\":[{\"id\":1,\"name\":\"dropdown\"},{\"id\":2,\"name\":\"dropup\"}]}" - }, - { - "id": "email", - "title": "Email", - "type": "email", - "description": null, - "settings_str": "{}" - }, - { - "id": "location", - "title": "Location", - "type": "location", - "description": null, - "settings_str": "{}" - }, - { - "id": "phone", - "title": "Phone", - "type": "phone", - "description": null, - "settings_str": "{}" - }, - { - "id": "rating", - "title": "Rating", - "type": "rating", - "description": null, - "settings_str": "{}" - }, - { - "id": "timeline", - "title": "Timeline", - "type": "timerange", - "description": null, - "settings_str": "{\"hide_footer\":false}" - }, - { - "id": "dependent_on", - "title": "Dependent On", - "type": "dependency", - "description": "Choose the item your task will be dependent on. If the “dependent on” item’s date is changing, the other dates will adjust automatically", - "settings_str": "{\"boardIds\":[3142482015],\"dependencyNewInfra\":true,\"allowMultipleItems\":true}" - }, - { - "id": "long_text", - "title": "Long Text", - "type": "long-text", - "description": null, - "settings_str": "{}" - }, - { - "id": "link", - "title": "Link", - "type": "link", - "description": null, - "settings_str": "{}" - }, - { - "id": "tags", - "title": "Tags", - "type": "tag", - "description": null, - "settings_str": "{\"hide_footer\":false}" - }, - { - "id": "label", - "title": "Label", - "type": "color", - "description": "", - "settings_str": "{\"done_colors\":[1],\"labels\":{\"3\":\"Label 2\",\"105\":\"Label 1\",\"156\":\"Label 3\"},\"labels_positions_v2\":{\"3\":1,\"5\":3,\"105\":0,\"156\":2},\"labels_colors\":{\"3\":{\"color\":\"#0086c0\",\"border\":\"#3DB0DF\",\"var_name\":\"blue-links\"},\"105\":{\"color\":\"#9AADBD\",\"border\":\"#9AADBD\",\"var_name\":\"winter\"},\"156\":{\"color\":\"#9D99B9\",\"border\":\"#9D99B9\",\"var_name\":\"purple_gray\"}}}" - }, - { - "id": "world_clock", - "title": "World Clock", - "type": "timezone", - "description": null, - "settings_str": "{}" - }, - { - "id": "week", - "title": "Week", - "type": "week", - "description": null, - "settings_str": "{}" - } - ], - "groups": [ - { - "id": "topics", - "title": "This month" - }, - { - "id": "group_title", - "title": "Next month" - } - ] - } - ] - }, - "account_id": 13215538 - }, - "339283934": { - "data": { - "boards": [] - }, - "account_id": 16260452 - } -} diff --git a/test/__mocks__/data/profitwell/response.json b/test/__mocks__/data/profitwell/response.json deleted file mode 100644 index 21c4f240bc..0000000000 --- a/test/__mocks__/data/profitwell/response.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "https://api.profitwell.com/v2/users/pwu_Oea7HXV3bnTP/": [ - { - "user_id": "pwu_Oea7HXV3bnTP", - "subscription_id": "pws_FecTCEyo17rV", - "user_alias": "spiderman_1a", - "subscription_alias": "spiderman_sub_1a", - "email": "spiderman@profitwell.com", - "plan_id": "web_plan", - "plan_interval": "month", - "plan_currency": "usd", - "status": "active", - "value": 5000, - "effective_date": 1514764800, - "meta": {} - } - ], - "https://api.profitwell.com/v2/users/spiderman_1a/": [ - { - "user_id": "pwu_Oea7HXV3bnTP", - "subscription_id": "pws_FecTCEyo17rV", - "user_alias": "spiderman_1a", - "subscription_alias": "spiderman_sub_1a", - "email": "spiderman@profitwell.com", - "plan_id": "web_plan", - "plan_interval": "month", - "plan_currency": "usd", - "status": "active", - "value": 5000, - "effective_date": 1514764800, - "meta": {} - } - ] -} diff --git a/test/__mocks__/gainsight.mock.js b/test/__mocks__/gainsight.mock.js deleted file mode 100644 index 38ff21ebfd..0000000000 --- a/test/__mocks__/gainsight.mock.js +++ /dev/null @@ -1,33 +0,0 @@ -const fs = require("fs"); -const path = require("path"); - -const responseJson = fs.readFileSync( - path.resolve(__dirname, "./data/gainsight/response.json") -); -const responseData = JSON.parse(responseJson); - -// mock companies that exist in db -const companyNamesList = ["Seinfeld Corps", "Mr.Robot", "The Office"]; - -/** - * Single function to return mock data - * for all axios calls. - */ -const gainsightRequestHandler = (url, payload) => { - if (Object.keys(responseData).includes(url)) { - // for company lookup - if (payload.select && payload.where) { - const name = payload.where.conditions[0].value[0]; - if (companyNamesList.includes(name)) { - const resp = responseData[url]; - resp.data.records = [{ Name: name }]; - return { data: resp, status: 200 }; - } - return { data: responseData[url], status: 200 }; - } - return { data: responseData[url], status: 200 }; - } - return { error: "request failed: url not found in mock" }; -}; - -module.exports = gainsightRequestHandler; diff --git a/test/__mocks__/gainsight_px.mock.js b/test/__mocks__/gainsight_px.mock.js deleted file mode 100644 index bcd3a171fe..0000000000 --- a/test/__mocks__/gainsight_px.mock.js +++ /dev/null @@ -1,23 +0,0 @@ -const gainsightPXGetRequestHandler = (url, mockData) => { - if (url.includes("absent-id")) { - const errResponse = { - response: { - data: { - externalapierror: { - status: "NOT_FOUND", - message: "User was not found for parameters {id=absent-id}", - debugMessage: null, - subErrors: null - } - }, - status: 404 - } - }; - return Promise.reject(errResponse); - } - return Promise.resolve({ data: mockData, status: 200 }); -}; - -module.exports = { - gainsightPXGetRequestHandler -}; diff --git a/test/__mocks__/klaviyo.mock.js b/test/__mocks__/klaviyo.mock.js deleted file mode 100644 index 020387d1f2..0000000000 --- a/test/__mocks__/klaviyo.mock.js +++ /dev/null @@ -1,39 +0,0 @@ -const klaviyoPostRequestHandler = (url, payload) => { - switch (url) { - case 'https://a.klaviyo.com/api/v2/list/XUepkK/subscribe': - //resolve with status 200 - return { data: payload, status: 200 }; - case 'https://a.klaviyo.com/api/v2/list/XUepkK/members': - //resolve with status 200 - return { data: payload, status: 200 }; - case 'https://a.klaviyo.com/api/profiles': - if (payload.data.attributes.email === "test3@rudderstack.com") { - return { - status: 409, - data: { - } - }; - } - return { - status: 201, - data: { - data: { - id: '01GW3PHVY0MTCDGS0A1612HARX', - attributes: {} - }, - } - }; - default: - return new Promise((resolve, reject) => { - if (payload) { - resolve({ data: payload }); - } else { - resolve({ error: 'Request failed' }); - } - }); - } -}; - -module.exports = { - klaviyoPostRequestHandler, -}; diff --git a/test/__mocks__/kustomer.mock.js b/test/__mocks__/kustomer.mock.js deleted file mode 100644 index 0a1187595d..0000000000 --- a/test/__mocks__/kustomer.mock.js +++ /dev/null @@ -1,142 +0,0 @@ -const storedPayload = { - data: { - type: "customer", - id: "58210c3db0f09110006b7953", - attributes: { - name: "AnnoD", - displayName: "AnnoD", - displayColor: "yellow", - displayIcon: "flower", - externalId: "annodD", - externalIds: [ - { - externalId: "annodD", - verified: true, - id: null - } - ], - sharedExternalIds: [], - signedUpAt: null, - avatarUrl: null, - username: null, - emails: [ - { - email: "annod@kustomer.com", - verified: true, - type: "home", - id: null - } - ], - sharedEmails: [ - { - email: "annod@kustomer.com", - verified: false, - type: "home", - id: null - } - ], - phones: [], - sharedPhones: [], - socials: [], - sharedSocials: [], - urls: [], - locations: [], - activeUsers: [], - watchers: [], - recentLocation: { - updatedAt: "2016-11-07T23:22:01.746Z" - }, - locale: null, - timeZone: null, - birthdayAt: null, - gender: null, - presence: "offline", - createdAt: "2016-11-07T23:20:29.080Z", - updatedAt: "2016-11-09T04:47:07.036Z", - modifiedAt: "2016-11-09T04:47:07.036Z", - lastSeenAt: "2016-11-07T23:23:51.582Z", - lastActivityAt: "2016-11-09T04:47:07.036Z", - lastCustomerActivityAt: "2016-11-07T23:23:51.582Z", - lastMessageIn: { - sentAt: "2016-11-07T23:22:02.281Z", - sentiment: null - }, - lastConversation: { - id: "58210c99b0f09110006b7969", - sentiment: { - confidence: 0.649023, - polarity: 1 - }, - tags: [] - }, - conversationCounts: { - all: 3, - snoozed: 0, - open: 2, - done: 1 - }, - preview: { - previewAt: "2016-11-07T23:23:26.039Z", - type: "message_out", - text: "dfsd fsdsfdsfdsf", - subject: "Hi, do you guys have an XXL hoodie" - }, - tags: [], - sentiment: { - polarity: 1, - confidence: 0.649023 - }, - progressiveStatus: "open", - verified: true, - rev: 37 - }, - relationships: { - org: { - links: { - self: "/v1/orgs/57f29863a1dbf61100e6aa92" - }, - data: { - type: "org", - id: "57f29863a1dbf61100e6aa92" - } - }, - messages: { - links: { - self: "/v1/customers/58210c3db0f09110006b7953/messages" - } - }, - modifiedBy: { - links: { - self: "/v1/users/58190b991f2932100010d683" - }, - data: { - type: "user", - id: "58190b991f2932100010d683" - } - } - }, - links: { - self: "/v1/customers/58210c3db0f09110006b7953" - } - } -}; - -const kustomerGetRequestHandler = url => { - switch (url) { - case "https://api.kustomerapp.com/v1/customers/externalId=annodD": - //resolve with status 200 - return { data: storedPayload, status: 200 }; - case "https://api.kustomerapp.com/v1/customers/externalId=58210c3db0f09110006b7953": - //resolve with status 200 - return { data: storedPayload, status: 200 }; - case "https://api.prod2.kustomerapp.com/v1/customers/externalId=58210c3db0f09110006b7953": - //resolve with status 200 - return { data: storedPayload, status: 200 }; - default: - return new Promise((resolve, reject) => { - resolve({ error: "Request failed", status: 404 }); - }); - } -}; - -module.exports = kustomerGetRequestHandler; diff --git a/test/__mocks__/mailchimp.mock.js b/test/__mocks__/mailchimp.mock.js deleted file mode 100644 index e52814c822..0000000000 --- a/test/__mocks__/mailchimp.mock.js +++ /dev/null @@ -1,49 +0,0 @@ -const fs = require("fs"); -const path = require("path"); - -const urlDirectoryMap = { - "api.mailchimp.com": "mailchimp" -}; - -const getData = url => { - let directory = ""; - Object.keys(urlDirectoryMap).forEach(key => { - if (url.includes(key)) { - directory = urlDirectoryMap[key]; - } - }); - if (directory) { - const dataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${directory}/response.json`) - ); - const data = JSON.parse(dataFile); - return data[url]; - } - return {}; -}; - -const mailchimpGetRequestHandler = url => { - const mockData = getData(url); - if (mockData) { - if ( - url === - "https://usXX.api.mailchimp.com/3.0/lists/aud111/members/48cd6232dc124497369f59c33d3eb4ab" - ) { - return { data: mockData, status: 200 }; - } else if (url === "https://usXX.api.mailchimp.com/3.0/lists/aud111") { - return { data: mockData, status: 200 }; - } else if (url === "https://usXX.api.mailchimp.com/3.0/lists/aud112") { - return { data: mockData, status: 200 }; - } else { - return new Promise((resolve, reject) => { - reject({ error: "Request failed", status: mockData.status }); - }); - } - } else { - return new Promise((resolve, reject) => { - reject({ error: "Request failed", status: 404 }); - }); - } -}; - -module.exports = mailchimpGetRequestHandler; diff --git a/test/__mocks__/monday.mock.js b/test/__mocks__/monday.mock.js deleted file mode 100644 index 0a9eb627be..0000000000 --- a/test/__mocks__/monday.mock.js +++ /dev/null @@ -1,32 +0,0 @@ -const fs = require("fs"); -const path = require("path"); - -const getData = payload => { - const dataFile = fs.readFileSync( - path.resolve(__dirname, `./data/monday/response.json`) - ); - const data = JSON.parse(dataFile); - const boardId = payload.query.substring(21,30); - return data[boardId]; -}; - -const mondayPostRequestHandler = payload => { - const mockData = getData(payload); - if (mockData) { - return { data: mockData, status: 200 }; - } - return new Promise((resolve, reject) => { - reject({ - response: { - data: { - error: "Not found", - status: 404 - } - } - }); - }); -}; - -module.exports = { - mondayPostRequestHandler -}; diff --git a/test/__mocks__/profitwell.mock.js b/test/__mocks__/profitwell.mock.js deleted file mode 100644 index 5dce8fbe75..0000000000 --- a/test/__mocks__/profitwell.mock.js +++ /dev/null @@ -1,16 +0,0 @@ -const profitwellGetRequestHandler = (url, payload) => { - if (url === "https://api.profitwell.com/v2/users/pwu_Oea7HXV3bnTP/") - return Promise.resolve({ data: payload, status: 200 }); - else if (url === "https://api.profitwell.com/v2/users/spiderman_1a/") { - return Promise.resolve({ data: payload, status: 200 }); - } - return Promise.reject({ - response: { - message: "Request failed with status code 404", - status: 404, - statusText: "Not Found" - } - }); -}; - -module.exports = profitwellGetRequestHandler; diff --git a/test/__mocks__/sendinblue.mock.js b/test/__mocks__/sendinblue.mock.js deleted file mode 100644 index 53b3e84677..0000000000 --- a/test/__mocks__/sendinblue.mock.js +++ /dev/null @@ -1,23 +0,0 @@ -const sendinblueGetRequestHandler = (url, mockData) => { - if ( - url === - "https://api.sendinblue.com/v3/contacts/gordon_pittman%40example.com" || - url === "https://api.sendinblue.com/v3/contacts/42" - ) { - return { data: mockData, status: 200 }; - } - - return Promise.reject({ - response: { - data: { - code: "document_not_found", - message: "Contact does not exist" - }, - status: 404 - } - }); -}; - -module.exports = { - sendinblueGetRequestHandler -}; diff --git a/test/__tests__/data/gainsight_input.json b/test/__tests__/data/gainsight_input.json deleted file mode 100644 index 78c82d002d..0000000000 --- a/test/__tests__/data/gainsight_input.json +++ /dev/null @@ -1,416 +0,0 @@ -[ - { - "destination": { - "Config": { - "domain": "demo-domain.gainsightcloud.com", - "accessKey": "sample-access-key", - "personMap": [], - "companyMap": [], - "eventNameMap": [], - "eventVersionMap": [] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "anon_id", - "type": "identify", - "traits": { - "email": "cosmo@krammer.com", - "name": "Cosmo Krammer", - "linkedinUrl": "https://linkedin.com/cosmo-krammer", - "location": "New York", - "emailOptOut": true, - "masterAvatarTypeCode": 10 - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "domain": "demo-domain.gainsightcloud.com", - "accessKey": "sample-access-key", - "personMap": [{ "from": "age", "to": "age__gc" }], - "companyMap": [], - "eventNameMap": [], - "eventVersionMap": [] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "anon_id", - "type": "identify", - "traits": { - "email": "cosmo@krammer.com", - "name": "Cosmo Krammer", - "linkedinUrl": "https://linkedin.com/cosmo-krammer", - "location": "New York", - "emailOptOut": true, - "masterAvatarTypeCode": 10, - "age": 35, - "randomKey": "this should be dropped" - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "domain": "demo-domain.gainsightcloud.com", - "accessKey": "sample-access-key", - "personMap": [], - "companyMap": [], - "eventNameMap": [], - "eventVersionMap": [] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "anon_id", - "type": "identify", - "traits": { - "name": "Cosmo Krammer", - "linkedinUrl": "https://linkedin.com/cosmo-krammer", - "location": "New York", - "emailOptOut": true, - "masterAvatarTypeCode": 10 - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "domain": "demo-domain.gainsightcloud.com", - "accessKey": "sample-access-key", - "sharedSecret": "sample-shared-secret", - "eventNameMap": [{ "from": "Ticket Resolved", "to": "Ticket Resolved Event" }], - "eventVersionMap": [{ "from": "Ticket Resolved", "to": "1.0.0" }], - "topicName": "Ticket Actions", - "tenantId": "sample-tenant-id", - "personMap": [], - "companyMap": [] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "anon_id", - "type": "track", - "event": "Ticket Resolved", - "properties": { - "ticketId": "sample-ticket-id", - "actionEmail": "sample@email.com", - "status": "resovled" - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "domain": "demo-domain.gainsightcloud.com", - "accessKey": "sample-access-key", - "sharedSecret": "sample-shared-secret", - "personMap": [], - "companyMap": [], - "eventNameMap": [], - "eventVersionMap": [] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 }, - "traits": { - "email": "krammer@seinfeld.com" - } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "anon_id", - "type": "group", - "traits": { - "name": "Kramerica Industries", - "industry": "Sitcom", - "employees": "100", - "status": "complete", - "companyType": "spoof" - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "domain": "demo-domain.gainsightcloud.com", - "accessKey": "sample-access-key", - "sharedSecret": "sample-shared-secret", - "personMap": [], - "companyMap": [], - "eventNameMap": [], - "eventVersionMap": [] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 }, - "traits": { - "email": "krammer@seinfeld.com" - } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "anon_id", - "type": "group", - "traits": { - "name": "Seinfeld Corps", - "industry": "TV Series", - "employees": "50", - "status": "complete" - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "domain": "demo-domain.gainsightcloud.com", - "accessKey": "sample-access-key", - "personMap": [], - "companyMap": [], - "eventNameMap": [], - "eventVersionMap": [] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "anon_id", - "type": "identify", - "traits": { - "email": "cosmo@krammer.com", - "firstname": "Cosmo", - "lastname": "Krammer", - "linkedinUrl": "https://linkedin.com/cosmo-krammer", - "location": "New York", - "emailOptOut": true, - "masterAvatarTypeCode": 10 - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "domain": "demo-domain.gainsightcloud.com", - "accessKey": "sample-access-key", - "sharedSecret": "sample-shared-secret", - "eventNameMap": [{ "from": "Ticket Resolved", "to": "Ticket Resolved Event" }], - "eventVersionMap": [{ "from": "Ticket Resolved", "to": "1.0.0" }], - "topicName": "Ticket Actions", - "tenantId": "sample-tenant-id", - "personMap": [], - "companyMap": [], - "contractId": "externalId-shall-get-precedence" - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 }, - "externalId": [ - { - "type": "gainsightEventContractId", - "id": "sample-contract-id" - } - ] - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "anon_id", - "type": "track", - "event": "Ticket Resolved", - "properties": { - "ticketId": "sample-ticket-id", - "actionEmail": "sample@email.com", - "status": "resovled" - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "domain": "demo-domain.gainsightcloud.com", - "accessKey": "sample-access-key", - "personMap": [{ "from": "car", "to": "car__gc" }], - "companyMap": [], - "eventNameMap": [], - "eventVersionMap": [] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "anon_id", - "type": "identify", - "traits": { - "name": "Bruce Wayne", - "email": "ceo@waynefoundation.com", - "car": "Batmobile", - "comments": "I am Batman!", - "lastName": "Wayne", - "location": "Gotham Central", - "firstName": "Bruce", - "linkedinUrl": "https://www.linkedin.com/in/notyourBatman/" - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - } -] diff --git a/test/__tests__/data/gainsight_output.json b/test/__tests__/data/gainsight_output.json deleted file mode 100644 index 6ed0928121..0000000000 --- a/test/__tests__/data/gainsight_output.json +++ /dev/null @@ -1,215 +0,0 @@ -[ - { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "Email": "cosmo@krammer.com", - "Name": "Cosmo Krammer", - "LinkedinUrl": "https://linkedin.com/cosmo-krammer", - "Location": "New York", - "EmailOptOut": true, - "MasterAvatarTypeCode": 10 - } - }, - "type": "REST", - "files": {}, - "method": "PUT", - "params": {}, - "headers": { - "Accesskey": "sample-access-key", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://demo-domain.gainsightcloud.com/v1.0/api/people" - }, - { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "Email": "cosmo@krammer.com", - "Name": "Cosmo Krammer", - "LinkedinUrl": "https://linkedin.com/cosmo-krammer", - "Location": "New York", - "EmailOptOut": true, - "MasterAvatarTypeCode": 10, - "age__gc": 35 - } - }, - "type": "REST", - "files": {}, - "method": "PUT", - "params": {}, - "headers": { - "Accesskey": "sample-access-key", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://demo-domain.gainsightcloud.com/v1.0/api/people" - }, - { - "error": "email is required for identify" - }, - { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "ticketId": "sample-ticket-id", - "actionEmail": "sample@email.com", - "status": "resovled" - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Accesskey": "sample-access-key", - "tenantId": "sample-tenant-id", - "sharedSecret": "sample-shared-secret", - "Content-Type": "application/json", - "topicName": "Ticket Actions", - "eventName": "Ticket Resolved Event", - "eventVersion": "1.0.0" - }, - "version": "1", - "endpoint": "https://demo-domain.gainsightcloud.com/v1.0/api/eventManager/event" - }, - { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "Email": "krammer@seinfeld.com", - "companies": [ - { - "Company_ID": "1P0203VCESP7AUQMV9E953G" - } - ] - } - }, - "type": "REST", - "files": {}, - "method": "PUT", - "params": {}, - "headers": { - "Accesskey": "sample-access-key", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://demo-domain.gainsightcloud.com/v1.0/api/people" - }, - { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "Email": "krammer@seinfeld.com", - "companies": [ - { - "Company_ID": "1P0203VCESP7AUQMV9E953G" - } - ] - } - }, - "type": "REST", - "files": {}, - "method": "PUT", - "params": {}, - "headers": { - "Accesskey": "sample-access-key", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://demo-domain.gainsightcloud.com/v1.0/api/people" - }, - { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "Email": "cosmo@krammer.com", - "FirstName": "Cosmo", - "LastName": "Krammer", - "Name": "Cosmo Krammer", - "LinkedinUrl": "https://linkedin.com/cosmo-krammer", - "Location": "New York", - "EmailOptOut": true, - "MasterAvatarTypeCode": 10 - } - }, - "type": "REST", - "files": {}, - "method": "PUT", - "params": {}, - "headers": { - "Accesskey": "sample-access-key", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://demo-domain.gainsightcloud.com/v1.0/api/people" - }, - { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "ticketId": "sample-ticket-id", - "actionEmail": "sample@email.com", - "status": "resovled" - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Accesskey": "sample-access-key", - "tenantId": "sample-tenant-id", - "sharedSecret": "sample-shared-secret", - "Content-Type": "application/json", - "topicName": "Ticket Actions", - "eventName": "Ticket Resolved Event", - "eventVersion": "1.0.0", - "contractId": "sample-contract-id" - }, - "version": "1", - "endpoint": "https://demo-domain.gainsightcloud.com/v1.0/api/eventManager/event" - }, - { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "Name": "Bruce Wayne", - "Email": "ceo@waynefoundation.com", - "car__gc": "Batmobile", - "Comments": "I am Batman!", - "LastName": "Wayne", - "Location": "Gotham Central", - "FirstName": "Bruce", - "LinkedinUrl": "https://www.linkedin.com/in/notyourBatman/" - } - }, - "type": "REST", - "files": {}, - "method": "PUT", - "params": {}, - "headers": { - "Accesskey": "sample-access-key", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://demo-domain.gainsightcloud.com/v1.0/api/people" - } -] diff --git a/test/__tests__/data/gainsight_px_input.json b/test/__tests__/data/gainsight_px_input.json deleted file mode 100644 index 31123a46a9..0000000000 --- a/test/__tests__/data/gainsight_px_input.json +++ /dev/null @@ -1,1087 +0,0 @@ -[ - { - "destination": { - "Config": { - "apiKey": "sample-api-key", - "productTagKey": "AP-XABC-123", - "accountAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "userAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "globalContextMap": [ - { - "from": "projectId", - "to": "p-123" - }, - { - "from": "tag", - "to": "sample-category-tag" - } - ] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "userId": "sample-user-id", - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "sample-anon-id", - "type": "track", - "event": "Product Added", - "properties": { - "product_id": "123", - "sku": "F16", - "category": "Games", - "name": "Game", - "brand": "Gamepro", - "variant": "111", - "price": 13.49, - "quantity": 11, - "coupon": "DISC21", - "position": 1, - "url": "https://www.website.com/product/path", - "image_url": "https://www.website.com/product/path.png" - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "sample-api-key", - "productTagKey": "AP-XABC-123", - "accountAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "userAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "globalContextMap": [ - { - "from": "projectId", - "to": "p-123" - }, - { - "from": "tag", - "to": "sample-category-tag" - } - ] - } - }, - "message": { - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "version": "1.27.0", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:8887/", - "path": "/", - "title": "RudderStack in 5", - "search": "", - "tab_url": "http://127.0.0.1:8887/", - "referrer": "$direct", - "initial_referrer": "$direct", - "referring_domain": "", - "initial_referring_domain": "" - }, - "locale": "en-US", - "screen": { - "width": 1512, - "height": 982, - "density": 2, - "innerWidth": 774, - "innerHeight": 774 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.27.0" - }, - "campaign": {}, - "sessionId": 1679967592314, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36", - "properties": { - "email": "84@84.com", - "price": "56.0", - "quantity": "5" - } - }, - "userId": "sample-user-id", - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "sample-anon-id", - "type": "track", - "event": "Marketing - Plan Change Events", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "sample-api-key", - "productTagKey": "AP-XABC-123", - "accountAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "userAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "globalContextMap": [ - { - "from": "projectId", - "to": "p-123" - }, - { - "from": "tag", - "to": "sample-category-tag" - } - ] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "userId": "sample-user-id", - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "sample-anon-id", - "type": "track", - "event": "Track Me", - "properties": { - "description": "Sample Track call", - "globalContext": { - "testOverride": "some-value" - } - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "sample-api-key", - "productTagKey": "AP-XABC-123", - "accountAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "userAttributeMap": [ - { - "from": "hobbyCustomField", - "to": "hobby" - } - ], - "globalContextMap": [] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "userId": "sample-user-id", - "anonymousId": "sample-anon-id", - "type": "identify", - "traits": { - "type": "USER", - "gender": "MALE", - "email": "user@email.com", - "firstName": "Sample", - "lastName": "User", - "signUpDate": 1624431528295, - "title": "engineer", - "countryName": "USA", - "countryCode": "US", - "city": "New York", - "hobbyCustomField": "Sample Hobby" - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "sample-api-key", - "productTagKey": "AP-XABC-123", - "accountAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "userAttributeMap": [], - "globalContextMap": [] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "type": "USER", - "gender": "MALE", - "email": "user@email.com", - "firstName": "Sample", - "lastName": "User", - "medium": null - } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "sample-anon-id", - "userId": "sample-user-id", - "groupId": "ecorp-id", - "type": "group", - "traits": { - "name": "ECorp", - "industry": "software", - "numberOfEmployees": 400, - "website": "www.ecorp.com", - "plan": "premium" - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "sample-api-key", - "productTagKey": "AP-XABC-123", - "accountAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "userAttributeMap": [ - { - "from": "hobbyCustomField", - "to": "hobby" - } - ], - "globalContextMap": [] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "identify", - "traits": { - "type": "USER", - "gender": "MALE", - "email": "user@email.com", - "firstName": "Sample", - "lastName": "User", - "signUpDate": 1624431528295, - "title": "engineer", - "countryName": "USA", - "countryCode": "US", - "city": "New York", - "hobbyCustomField": "Sample Hobby" - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "sample-api-key", - "productTagKey": "AP-XABC-123", - "accountAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "userAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "globalContextMap": [ - { - "from": "projectId", - "to": "p-123" - }, - { - "from": "tag", - "to": "sample-category-tag" - } - ] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "track", - "event": "Product Added", - "properties": { - "product_id": "123", - "sku": "F16", - "category": "Games", - "name": "Game", - "brand": "Gamepro", - "variant": "111", - "price": 13.49, - "quantity": 11, - "coupon": "DISC21", - "position": 1, - "url": "https://www.website.com/product/path", - "image_url": "https://www.website.com/product/path.png" - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "sample-api-key", - "productTagKey": "AP-XABC-123", - "accountAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "userAttributeMap": [], - "globalContextMap": [] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "type": "USER", - "gender": "MALE", - "email": "user@email.com", - "firstName": "Sample", - "lastName": "User" - } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "sample-anon-id", - "userId": "sample-user-id", - "type": "group", - "traits": { - "name": "ECorp", - "industry": "software", - "numberOfEmployees": 400, - "website": "www.ecorp.com", - "plan": "premium" - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "sample-api-key", - "productTagKey": "AP-XABC-123", - "accountAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "userAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "globalContextMap": [ - { - "from": "projectId", - "to": "p-123" - }, - { - "from": "tag", - "to": "sample-category-tag" - } - ] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "userId": "sample-user-id", - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "sample-anon-id", - "type": "track", - "event": "Stringify Test", - "properties": { - "description": "Stringify test for object values", - "nested": { - "a": [1, 2, 3], - "b": { - "c": 1 - } - }, - "arr": [1, 2, 3] - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "sample-api-key", - "productTagKey": "AP-XABC-123", - "accountAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "userAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "globalContextMap": [ - { - "from": "projectId", - "to": "p-123" - }, - { - "from": "tag", - "to": "sample-category-tag" - } - ] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "userId": "sample-user-id", - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "sample-anon-id", - "type": "track", - "event": "Stringify Test", - "properties": { - "description": "Stringify test for object values", - "nested": { - "a": [1, 2, 3], - "b": { - "c": 1 - } - }, - "arr": [1, 2, 3], - "globalContext": { - "someKey": "someVal" - } - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "sample-api-key", - "productTagKey": "AP-XABC-123", - "accountAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "userAttributeMap": [], - "globalContextMap": [] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "type": "USER", - "gender": "MALE", - "email": "user@email.com", - "firstName": "Sample", - "lastName": "User" - } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "sample-anon-id", - "userId": "absent-id", - "groupId": "ecorp-id", - "type": "group", - "traits": { - "name": "ECorp", - "industry": "software", - "numberOfEmployees": 400, - "website": "www.ecorp.com", - "plan": "premium" - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "sample-api-key", - "productTagKey": "AP-XABC-123", - "accountAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "userAttributeMap": [ - { - "from": "hobbyCustomField", - "to": "hobby" - } - ], - "globalContextMap": [] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "userId": "absent-id", - "anonymousId": "sample-anon-id", - "type": "identify", - "traits": { - "type": "USER", - "gender": "MALE", - "email": "user@email.com", - "firstName": "Sample", - "lastName": "User", - "signUpDate": 1624431528295, - "title": "engineer", - "countryName": "USA", - "countryCode": "US", - "city": "New York", - "hobbyCustomField": "Sample Hobby" - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "sample-api-key", - "productTagKey": "AP-XABC-123", - "accountAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "userAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "globalContextMap": [] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "userId": "absent-id", - "anonymousId": "sample-anon-id", - "type": "identify", - "traits": { - "type": "USER", - "gender": "MALE", - "email": "user@email.com", - "firstName": "Sample", - "lastName": "User", - "signUpDate": 1624431528295, - "title": "engineer", - "countryName": "USA", - "countryCode": "US", - "city": "New York", - "hobbyCustomField": "Sample Hobby", - "accountId": 1234 - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "sample-api-key", - "productTagKey": "AP-XABC-123", - "accountAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "userAttributeMap": [], - "globalContextMap": [] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "type": "USER", - "gender": "MALE", - "email": "user@email.com", - "firstName": "Sample", - "lastName": "User" - } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "sample-anon-id", - "userId": "absent-id", - "groupId": "ecorp-id", - "type": "group", - "traits": { - "name": "ECorp", - "industry": "software", - "numberOfEmployees": 400, - "website": "www.ecorp.com", - "plan": "premium", - "term": null - }, - "integrations": { - "All": true, - "GAINSIGHT_PX": { - "limitAPIForGroup": true - } - }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "sample-api-key", - "productTagKey": "AP-XABC-123", - "accountAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "userAttributeMap": [ - { - "from": "hobbyCustomField", - "to": "hobby" - } - ], - "globalContextMap": [] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "userId": "sample-user-id", - "anonymousId": "sample-anon-id", - "type": "identify", - "traits": { - "type": "USER", - "gender": "MALE", - "email": "user@email.com", - "firstName": "Sample", - "lastName": "User", - "signUpDate": 1624431528295, - "title": "engineer", - "countryName": "USA", - "countryCode": "US", - "city": "New York", - "hobbyCustomField": "Sample Hobby", - "term": null, - "campaign": "" - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - } -] diff --git a/test/__tests__/data/gainsight_px_output.json b/test/__tests__/data/gainsight_px_output.json deleted file mode 100644 index 1b4a000821..0000000000 --- a/test/__tests__/data/gainsight_px_output.json +++ /dev/null @@ -1,368 +0,0 @@ -[ - { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "attributes": { - "product_id": "123", - "sku": "F16", - "category": "Games", - "name": "Game", - "brand": "Gamepro", - "variant": "111", - "price": 13.49, - "quantity": 11, - "coupon": "DISC21", - "position": 1, - "url": "https://www.website.com/product/path", - "image_url": "https://www.website.com/product/path.png" - }, - "propertyKey": "AP-XABC-123", - "userType": "USER", - "identifyId": "sample-user-id", - "date": 1571043797562, - "eventName": "Product Added", - "globalContext": { - "projectId": "p-123", - "tag": "sample-category-tag" - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "X-APTRINSIC-API-KEY": "sample-api-key", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api.aptrinsic.com/v1/events/custom" - }, - { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "attributes": {}, - "url": "http://127.0.0.1:8887/", - "propertyKey": "AP-XABC-123", - "userType": "USER", - "identifyId": "sample-user-id", - "referrer": "$direct", - "date": 1571043797562, - "sessionId": 1679967592314, - "eventName": "Marketing - Plan Change Events", - "globalContext": { - "projectId": "p-123", - "tag": "sample-category-tag" - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "X-APTRINSIC-API-KEY": "sample-api-key", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api.aptrinsic.com/v1/events/custom" - }, - { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "attributes": { - "description": "Sample Track call" - }, - "propertyKey": "AP-XABC-123", - "userType": "USER", - "identifyId": "sample-user-id", - "date": 1571043797562, - "eventName": "Track Me", - "globalContext": { - "testOverride": "some-value" - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "X-APTRINSIC-API-KEY": "sample-api-key", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api.aptrinsic.com/v1/events/custom" - }, - { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "type": "USER", - "gender": "MALE", - "email": "user@email.com", - "firstName": "Sample", - "lastName": "User", - "signUpDate": 1624431528295, - "createDate": 1571043797562, - "title": "engineer", - "propertyKeys": ["AP-XABC-123"], - "location": { - "countryName": "USA", - "countryCode": "US", - "city": "New York" - }, - "customAttributes": { - "hobby": "Sample Hobby" - } - } - }, - "type": "REST", - "files": {}, - "method": "PUT", - "params": {}, - "headers": { - "X-APTRINSIC-API-KEY": "sample-api-key", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api.aptrinsic.com/v1/users/sample-user-id" - }, - { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "accountId": "ecorp-id" - } - }, - "type": "REST", - "files": {}, - "method": "PUT", - "params": {}, - "headers": { - "X-APTRINSIC-API-KEY": "sample-api-key", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api.aptrinsic.com/v1/users/sample-user-id" - }, - { - "error": "userId or anonymousId is required for identify" - }, - { - "error": "Missing required value from \"userId\"" - }, - { - "error": "groupId is required for group" - }, - { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "attributes": { - "description": "Stringify test for object values", - "nested": "{\"a\":[1,2,3],\"b\":{\"c\":1}}", - "arr": "[1,2,3]" - }, - "propertyKey": "AP-XABC-123", - "userType": "USER", - "identifyId": "sample-user-id", - "date": 1571043797562, - "eventName": "Stringify Test", - "globalContext": { - "projectId": "p-123", - "tag": "sample-category-tag" - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "X-APTRINSIC-API-KEY": "sample-api-key", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api.aptrinsic.com/v1/events/custom" - }, - { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "attributes": { - "description": "Stringify test for object values", - "nested": "{\"a\":[1,2,3],\"b\":{\"c\":1}}", - "arr": "[1,2,3]" - }, - "propertyKey": "AP-XABC-123", - "userType": "USER", - "identifyId": "sample-user-id", - "date": 1571043797562, - "eventName": "Stringify Test", - "globalContext": { - "someKey": "someVal" - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "X-APTRINSIC-API-KEY": "sample-api-key", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api.aptrinsic.com/v1/events/custom" - }, - { - "error": "aborting group call: {\"status\":\"NOT_FOUND\",\"message\":\"User was not found for parameters {id=absent-id}\",\"debugMessage\":null,\"subErrors\":null}" - }, - { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "identifyId": "absent-id", - "type": "USER", - "gender": "MALE", - "email": "user@email.com", - "firstName": "Sample", - "lastName": "User", - "signUpDate": 1624431528295, - "createDate": 1571043797562, - "title": "engineer", - "propertyKeys": ["AP-XABC-123"], - "location": { - "countryName": "USA", - "countryCode": "US", - "city": "New York" - }, - "customAttributes": { - "hobby": "Sample Hobby" - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "X-APTRINSIC-API-KEY": "sample-api-key", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api.aptrinsic.com/v1/users" - }, - { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "identifyId": "absent-id", - "type": "USER", - "gender": "MALE", - "email": "user@email.com", - "firstName": "Sample", - "lastName": "User", - "signUpDate": 1624431528295, - "createDate": 1571043797562, - "title": "engineer", - "propertyKeys": ["AP-XABC-123"], - "accountId": "1234", - "location": { - "countryName": "USA", - "countryCode": "US", - "city": "New York" - }, - "customAttributes": {} - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "X-APTRINSIC-API-KEY": "sample-api-key", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api.aptrinsic.com/v1/users" - }, - { - "version": "1", - "type": "REST", - "method": "PUT", - "endpoint": "https://api.aptrinsic.com/v1/users/absent-id", - "headers": { - "X-APTRINSIC-API-KEY": "sample-api-key", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "accountId": "ecorp-id" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "type": "USER", - "gender": "MALE", - "email": "user@email.com", - "firstName": "Sample", - "lastName": "User", - "signUpDate": 1624431528295, - "createDate": 1571043797562, - "title": "engineer", - "propertyKeys": ["AP-XABC-123"], - "location": { - "countryName": "USA", - "countryCode": "US", - "city": "New York" - }, - "customAttributes": { - "hobby": "Sample Hobby" - } - } - }, - "type": "REST", - "files": {}, - "method": "PUT", - "params": {}, - "headers": { - "X-APTRINSIC-API-KEY": "sample-api-key", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api.aptrinsic.com/v1/users/sample-user-id" - } -] diff --git a/test/__tests__/data/gainsight_px_router_input.json b/test/__tests__/data/gainsight_px_router_input.json deleted file mode 100644 index 52b9404824..0000000000 --- a/test/__tests__/data/gainsight_px_router_input.json +++ /dev/null @@ -1,298 +0,0 @@ -[ - { - "message": { - "type": "identify", - "sentAt": "2021-06-25T08:59:52.891Z", - "userId": "stanley-kubrick", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.18", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "title": "Test", - "search": "", - "path": "index.html", - "url": "http://127.0.0.1:3003/index.html", - "tab_url": "http://127.0.0.1:3003/index.html", - "referrer": "$direct", - "initial_referrer": "$direct", - "referring_domain": "", - "initial_referring_domain": "" - }, - "locale": "en-GB", - "screen": { - "width": 1920, - "height": 1080, - "density": 1, - "innerWidth": 1920, - "innerHeight": 436 - }, - "traits": { - "name": "Stanley Kubrick", - "email": "stanley@kubrick.com", - "score": 100, - "title": "Director/Film Maker", - "gender": "Male", - "countryCode": "US", - "countryName": "USA", - "hobbyCustomField": "Making films. Being a genius" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.18" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36" - }, - "rudderId": "9a7820d0-0ff2-4451-b655-682cec15cbd2", - "messageId": "ff90d62e-a6e3-4e23-af20-03b4a249ef48", - "timestamp": "2021-06-25T14:29:52.911+05:30", - "receivedAt": "2021-06-25T14:29:52.911+05:30", - "request_ip": "[::1]", - "anonymousId": "1585ea2f-dddc-4d23-935f-c1196405d61e", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-06-25T08:59:52.891Z" - }, - "metadata": { - "userId": "9a7820d0-0ff2-4451-b655-682cec15cbd2", - "jobId": 1, - "sourceId": "1s9eG8UCer6YSKsD8ZlQCyLa3pj", - "destinationId": "1uLy1tqsoo9RhL1zLiqLQTKBIKL", - "attemptNum": 0, - "receivedAt": "2021-06-25T14:29:52.911+05:30", - "createdAt": "2021-06-25T08:59:56.329Z", - "firstAttemptedAt": "", - "transformAt": "router" - }, - "destination": { - "ID": "1uLy1tqsoo9RhL1zLiqLQTKBIKL", - "Name": "gainsight-px-dest", - "DestinationDefinition": { - "ID": "1uLuOdwPCqtei55ZKXewwPhjQPf", - "Name": "GAINSIGHT_PX", - "DisplayName": "Gainsight PX", - "Config": { - "destConfig": { - "defaultConfig": [ - "apiKey", - "productTagKey", - "userAttributeMap", - "accountAttributeMap", - "globalContextMap" - ] - }, - "excludeKeys": [], - "includeKeys": [], - "saveDestinationResponse": true, - "secretKeys": ["apiKey", "productTagKey"], - "supportedSourceTypes": [ - "android", - "ios", - "web", - "unity", - "amp", - "cloud", - "reactnative", - "flutter" - ], - "transformAt": "router", - "transformAtV1": "router" - }, - "ResponseRules": {} - }, - "Config": { - "accountAttributeMap": [ - { - "from": "cultureCustomField", - "to": "culture" - } - ], - "apiKey": "sample-api-key", - "eventDelivery": false, - "eventDeliveryTS": 1624472902670, - "globalContextMap": [ - { - "from": "kubrickTest", - "to": "value" - } - ], - "productTagKey": "AP-SAMPLE-2", - "userAttributeMap": [ - { - "from": "hobbyCustomField", - "to": "hobby" - } - ] - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": true - } - }, - { - "message": { - "type": "track", - "event": "nested test2", - "sentAt": "2021-06-26T10:41:22.316Z", - "userId": "adifhas9734", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.18", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "file:///Users/anurajguha/workspace/simple-html-test/index.html", - "path": "/Users/anurajguha/workspace/simple-html-test/index.html", - "title": "Test", - "search": "", - "tab_url": "file:///Users/anurajguha/workspace/simple-html-test/index.html", - "referrer": "$direct", - "initial_referrer": "$direct", - "referring_domain": "", - "initial_referring_domain": "" - }, - "locale": "en-GB", - "screen": { - "width": 1920, - "height": 1080, - "density": 1, - "innerWidth": 1920, - "innerHeight": 585 - }, - "traits": { - "name": "Update test unique", - "phone": "9900990899", - "lastname": "user6", - "firstname": "test", - "previousCompany": "testprevCompany2" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.18" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36" - }, - "rudderId": "a27a8a8a-9e81-4898-beeb-e6041fc1552d", - "messageId": "595dae36-5e4f-4feb-a2e4-8a7849615d38", - "timestamp": "2021-06-26T16:11:22.335+05:30", - "properties": { - "array": [1, 2, 3], - "nested": { - "json": "test" - }, - "status": "testing", - "description": "Example track call", - "fullyNested": [ - { - "a": 1, - "b": 2 - }, - { - "a": 1, - "b": [1, 2, 3] - } - ] - }, - "receivedAt": "2021-06-26T16:11:22.335+05:30", - "request_ip": "[::1]", - "anonymousId": "1585ea2f-dddc-4d23-935f-c1196405d61e", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-06-26T10:41:22.316Z" - }, - "metadata": { - "userId": "a27a8a8a-9e81-4898-beeb-e6041fc1552d", - "jobId": 2, - "sourceId": "1s9eG8UCer6YSKsD8ZlQCyLa3pj", - "destinationId": "1uLy1tqsoo9RhL1zLiqLQTKBIKL", - "attemptNum": 0, - "receivedAt": "2021-06-26T16:11:22.335+05:30", - "createdAt": "2021-06-26T10:41:24.126Z", - "firstAttemptedAt": "", - "transformAt": "router" - }, - "destination": { - "ID": "1uLy1tqsoo9RhL1zLiqLQTKBIKL", - "Name": "gainsight-px-dest", - "DestinationDefinition": { - "ID": "1uLuOdwPCqtei55ZKXewwPhjQPf", - "Name": "GAINSIGHT_PX", - "DisplayName": "Gainsight PX", - "Config": { - "destConfig": { - "defaultConfig": [ - "apiKey", - "productTagKey", - "userAttributeMap", - "accountAttributeMap", - "globalContextMap" - ] - }, - "excludeKeys": [], - "includeKeys": [], - "saveDestinationResponse": true, - "secretKeys": ["apiKey", "productTagKey"], - "supportedSourceTypes": [ - "android", - "ios", - "web", - "unity", - "amp", - "cloud", - "reactnative", - "flutter" - ], - "transformAt": "router", - "transformAtV1": "router" - }, - "ResponseRules": {} - }, - "Config": { - "accountAttributeMap": [ - { - "from": "cultureCustomField", - "to": "culture" - } - ], - "apiKey": "sample-api-key", - "eventDelivery": false, - "eventDeliveryTS": 1624472902670, - "globalContextMap": [ - { - "from": "kubrickTest", - "to": "value" - } - ], - "productTagKey": "AP-SAMPLE-2", - "userAttributeMap": [ - { - "from": "hobbyCustomField", - "to": "hobby" - } - ] - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": true - } - } -] diff --git a/test/__tests__/data/gainsight_px_router_output.json b/test/__tests__/data/gainsight_px_router_output.json deleted file mode 100644 index d76b5d34f1..0000000000 --- a/test/__tests__/data/gainsight_px_router_output.json +++ /dev/null @@ -1,236 +0,0 @@ -[ - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "PUT", - "endpoint": "https://api.aptrinsic.com/v1/users/stanley-kubrick", - "headers": { - "X-APTRINSIC-API-KEY": "sample-api-key", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "email": "stanley@kubrick.com", - "gender": "MALE", - "signUpDate": 1624611592911, - "title": "Director/Film Maker", - "score": 100, - "createDate": 1624611592911, - "location": { - "countryName": "USA", - "countryCode": "US" - }, - "firstName": "Stanley", - "lastName": "Kubrick", - "customAttributes": { - "hobby": "Making films. Being a genius" - }, - "propertyKeys": ["AP-SAMPLE-2"], - "type": "USER" - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "userId": "9a7820d0-0ff2-4451-b655-682cec15cbd2", - "jobId": 1, - "sourceId": "1s9eG8UCer6YSKsD8ZlQCyLa3pj", - "destinationId": "1uLy1tqsoo9RhL1zLiqLQTKBIKL", - "attemptNum": 0, - "receivedAt": "2021-06-25T14:29:52.911+05:30", - "createdAt": "2021-06-25T08:59:56.329Z", - "firstAttemptedAt": "", - "transformAt": "router" - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "ID": "1uLy1tqsoo9RhL1zLiqLQTKBIKL", - "Name": "gainsight-px-dest", - "DestinationDefinition": { - "ID": "1uLuOdwPCqtei55ZKXewwPhjQPf", - "Name": "GAINSIGHT_PX", - "DisplayName": "Gainsight PX", - "Config": { - "destConfig": { - "defaultConfig": [ - "apiKey", - "productTagKey", - "userAttributeMap", - "accountAttributeMap", - "globalContextMap" - ] - }, - "excludeKeys": [], - "includeKeys": [], - "saveDestinationResponse": true, - "secretKeys": ["apiKey", "productTagKey"], - "supportedSourceTypes": [ - "android", - "ios", - "web", - "unity", - "amp", - "cloud", - "reactnative", - "flutter" - ], - "transformAt": "router", - "transformAtV1": "router" - }, - "ResponseRules": {} - }, - "Config": { - "accountAttributeMap": [ - { - "from": "cultureCustomField", - "to": "culture" - } - ], - "apiKey": "sample-api-key", - "eventDelivery": false, - "eventDeliveryTS": 1624472902670, - "globalContextMap": [ - { - "from": "kubrickTest", - "to": "value" - } - ], - "productTagKey": "AP-SAMPLE-2", - "userAttributeMap": [ - { - "from": "hobbyCustomField", - "to": "hobby" - } - ] - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": true - } - }, - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.aptrinsic.com/v1/events/custom", - "headers": { - "X-APTRINSIC-API-KEY": "sample-api-key", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "identifyId": "adifhas9734", - "eventName": "nested test2", - "date": 1624704082335, - "attributes": { - "array": "[1,2,3]", - "nested": "{\"json\":\"test\"}", - "status": "testing", - "description": "Example track call", - "fullyNested": "[{\"a\":1,\"b\":2},{\"a\":1,\"b\":[1,2,3]}]" - }, - "url": "file:///Users/anurajguha/workspace/simple-html-test/index.html", - "referrer": "$direct", - "propertyKey": "AP-SAMPLE-2", - "userType": "USER", - "globalContext": { - "kubrickTest": "value" - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "userId": "a27a8a8a-9e81-4898-beeb-e6041fc1552d", - "jobId": 2, - "sourceId": "1s9eG8UCer6YSKsD8ZlQCyLa3pj", - "destinationId": "1uLy1tqsoo9RhL1zLiqLQTKBIKL", - "attemptNum": 0, - "receivedAt": "2021-06-26T16:11:22.335+05:30", - "createdAt": "2021-06-26T10:41:24.126Z", - "firstAttemptedAt": "", - "transformAt": "router" - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "ID": "1uLy1tqsoo9RhL1zLiqLQTKBIKL", - "Name": "gainsight-px-dest", - "DestinationDefinition": { - "ID": "1uLuOdwPCqtei55ZKXewwPhjQPf", - "Name": "GAINSIGHT_PX", - "DisplayName": "Gainsight PX", - "Config": { - "destConfig": { - "defaultConfig": [ - "apiKey", - "productTagKey", - "userAttributeMap", - "accountAttributeMap", - "globalContextMap" - ] - }, - "excludeKeys": [], - "includeKeys": [], - "saveDestinationResponse": true, - "secretKeys": ["apiKey", "productTagKey"], - "supportedSourceTypes": [ - "android", - "ios", - "web", - "unity", - "amp", - "cloud", - "reactnative", - "flutter" - ], - "transformAt": "router", - "transformAtV1": "router" - }, - "ResponseRules": {} - }, - "Config": { - "accountAttributeMap": [ - { - "from": "cultureCustomField", - "to": "culture" - } - ], - "apiKey": "sample-api-key", - "eventDelivery": false, - "eventDeliveryTS": 1624472902670, - "globalContextMap": [ - { - "from": "kubrickTest", - "to": "value" - } - ], - "productTagKey": "AP-SAMPLE-2", - "userAttributeMap": [ - { - "from": "hobbyCustomField", - "to": "hobby" - } - ] - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": true - } - } -] diff --git a/test/__tests__/data/gainsight_router_input.json b/test/__tests__/data/gainsight_router_input.json deleted file mode 100644 index 9432b7c5ef..0000000000 --- a/test/__tests__/data/gainsight_router_input.json +++ /dev/null @@ -1,240 +0,0 @@ -[ - { - "message": { - "type": "identify", - "sentAt": "2021-05-28T11:22:01.842Z", - "userId": "live-test", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.18", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "file:///Users/anurajguha/workspace/simple-html-test/index.html", - "path": "/Users/anurajguha/workspace/simple-html-test/index.html", - "title": "Test", - "search": "", - "tab_url": "file:///Users/anurajguha/workspace/simple-html-test/index.html", - "referrer": "$direct", - "initial_referrer": "$direct", - "referring_domain": "", - "initial_referring_domain": "" - }, - "locale": "en-GB", - "screen": { - "density": 2 - }, - "traits": { - "name": "Cosmo Krammer", - "email": "cosmo@krammer.com", - "location": "New York", - "emailOptOut": true, - "linkedinUrl": "https://linkedin.com/cosmo-krammer", - "masterAvatarTypeCode": 10 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.18" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36" - }, - "rudderId": "94d40f2f-5787-4798-8a03-34f3b02f5ede", - "messageId": "8274e525-d99c-4f55-b67a-bbc890d1444c", - "timestamp": "2021-05-28T16:52:01.859+05:30", - "receivedAt": "2021-05-28T16:52:01.859+05:30", - "request_ip": "[::1]", - "anonymousId": "1585ea2f-dddc-4d23-935f-c1196405d61e", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-05-28T11:22:01.842Z" - }, - "metadata": { - "userId": "94d40f2f-5787-4798-8a03-34f3b02f5ede", - "jobId": 1, - "sourceId": "1syvMwC0K62eIb4yAV9kFJtbDEA", - "destinationId": "1syvZAuiGo4l1SIsil0TxDEx34G", - "attemptNum": 0, - "receivedAt": "2021-05-28T16:52:01.859+05:30", - "createdAt": "2021-05-28T11:22:02.463Z", - "firstAttemptedAt": "", - "transformAt": "router" - }, - "destination": { - "ID": "1syvZAuiGo4l1SIsil0TxDEx34G", - "Name": "gainsight-dev-dest", - "DestinationDefinition": { - "ID": "1syuhEt4I8jpvlwJc4lr1IiLjPu", - "Name": "GAINSIGHT", - "DisplayName": "Gainsight", - "Config": { - "destConfig": { - "defaultConfig": [ - "accessKey", - "sharedSecret", - "tenantId", - "domain", - "personMap", - "companyMap", - "topicName", - "eventNameMap", - "eventVersionMap", - "contractId" - ] - }, - "excludeKeys": [], - "includeKeys": [], - "saveDestinationResponse": true, - "secretKeys": ["accessKey", "sharedSecret"], - "supportedSourceTypes": ["android", "ios", "web", "unity", "amp", "cloud", "reactnative"], - "transformAt": "router", - "transformAtV1": "router" - }, - "ResponseRules": {} - }, - "Config": { - "accessKey": "sample-access-key", - "contractId": "", - "domain": "demo-account.gainsightcloud.com", - "sharedSecret": "", - "tenantId": "", - "topicName": "" - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": true - } - }, - { - "message": { - "type": "track", - "event": "Demo Request", - "sentAt": "2021-05-28T11:52:12.893Z", - "userId": "", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.18", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "file:///Users/anurajguha/workspace/simple-html-test/index.html", - "path": "/Users/anurajguha/workspace/simple-html-test/index.html", - "title": "Test", - "search": "", - "tab_url": "file:///Users/anurajguha/workspace/simple-html-test/index.html", - "referrer": "$direct", - "initial_referrer": "$direct", - "referring_domain": "", - "initial_referring_domain": "" - }, - "locale": "en-GB", - "screen": { - "density": 2 - }, - "traits": {}, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.18" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36" - }, - "rudderId": "1a30a93f-916b-4c39-ad20-1ce7bbbd7754", - "messageId": "f5619b1a-8704-42a8-bab9-92bbeaa44896", - "timestamp": "2021-05-28T17:22:12.905+05:30", - "properties": { - "email": "sample@user.com", - "status": "active" - }, - "receivedAt": "2021-05-28T17:22:12.905+05:30", - "request_ip": "[::1]", - "anonymousId": "1585ea2f-dddc-4d23-935f-c1196405d61e", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-05-28T11:52:12.893Z" - }, - "metadata": { - "userId": "1a30a93f-916b-4c39-ad20-1ce7bbbd7754", - "jobId": 2, - "sourceId": "1syvMwC0K62eIb4yAV9kFJtbDEA", - "destinationId": "1syvZAuiGo4l1SIsil0TxDEx34G", - "attemptNum": 0, - "receivedAt": "2021-05-28T17:22:12.905+05:30", - "createdAt": "2021-05-28T11:52:15.283Z", - "firstAttemptedAt": "", - "transformAt": "router" - }, - "destination": { - "ID": "1syvZAuiGo4l1SIsil0TxDEx34G", - "Name": "gainsight-dev-dest", - "DestinationDefinition": { - "ID": "1syuhEt4I8jpvlwJc4lr1IiLjPu", - "Name": "GAINSIGHT", - "DisplayName": "Gainsight", - "Config": { - "destConfig": { - "defaultConfig": [ - "accessKey", - "sharedSecret", - "tenantId", - "domain", - "personMap", - "companyMap", - "topicName", - "eventNameMap", - "eventVersionMap", - "contractId" - ] - }, - "excludeKeys": [], - "includeKeys": [], - "saveDestinationResponse": true, - "secretKeys": ["accessKey", "sharedSecret"], - "supportedSourceTypes": ["android", "ios", "web", "unity", "amp", "cloud", "reactnative"], - "transformAt": "router", - "transformAtV1": "router" - }, - "ResponseRules": {} - }, - "Config": { - "accessKey": "sample-access-key", - "contractId": "sample-contract-id", - "domain": "demo-account.gainsightcloud.com", - "eventNameMap": [ - { - "from": "Demo Request", - "to": "Product Demo" - } - ], - "eventVersionMap": [ - { - "from": "Demo Request", - "to": "1.0.0" - } - ], - "sharedSecret": "sample-shared-secret", - "tenantId": "sample-tenant-id", - "topicName": "Support Tickets" - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": true - } - } -] diff --git a/test/__tests__/data/gainsight_router_output.json b/test/__tests__/data/gainsight_router_output.json deleted file mode 100644 index a432c3c4c7..0000000000 --- a/test/__tests__/data/gainsight_router_output.json +++ /dev/null @@ -1,188 +0,0 @@ -[ - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "PUT", - "endpoint": "https://demo-account.gainsightcloud.com/v1.0/api/people", - "headers": { - "Accesskey": "sample-access-key", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "Email": "cosmo@krammer.com", - "Name": "Cosmo Krammer", - "LinkedinUrl": "https://linkedin.com/cosmo-krammer", - "Location": "New York", - "EmailOptOut": true, - "MasterAvatarTypeCode": 10 - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "userId": "94d40f2f-5787-4798-8a03-34f3b02f5ede", - "jobId": 1, - "sourceId": "1syvMwC0K62eIb4yAV9kFJtbDEA", - "destinationId": "1syvZAuiGo4l1SIsil0TxDEx34G", - "attemptNum": 0, - "receivedAt": "2021-05-28T16:52:01.859+05:30", - "createdAt": "2021-05-28T11:22:02.463Z", - "firstAttemptedAt": "", - "transformAt": "router" - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "ID": "1syvZAuiGo4l1SIsil0TxDEx34G", - "Name": "gainsight-dev-dest", - "DestinationDefinition": { - "ID": "1syuhEt4I8jpvlwJc4lr1IiLjPu", - "Name": "GAINSIGHT", - "DisplayName": "Gainsight", - "Config": { - "destConfig": { - "defaultConfig": [ - "accessKey", - "sharedSecret", - "tenantId", - "domain", - "personMap", - "companyMap", - "topicName", - "eventNameMap", - "eventVersionMap", - "contractId" - ] - }, - "excludeKeys": [], - "includeKeys": [], - "saveDestinationResponse": true, - "secretKeys": ["accessKey", "sharedSecret"], - "supportedSourceTypes": ["android", "ios", "web", "unity", "amp", "cloud", "reactnative"], - "transformAt": "router", - "transformAtV1": "router" - }, - "ResponseRules": {} - }, - "Config": { - "accessKey": "sample-access-key", - "contractId": "", - "domain": "demo-account.gainsightcloud.com", - "sharedSecret": "", - "tenantId": "", - "topicName": "" - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": true - } - }, - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://demo-account.gainsightcloud.com/v1.0/api/eventManager/event", - "headers": { - "sharedSecret": "sample-shared-secret", - "topicName": "Support Tickets", - "tenantId": "sample-tenant-id", - "Content-Type": "application/json", - "eventName": "Product Demo", - "eventVersion": "1.0.0", - "contractId": "sample-contract-id", - "Accesskey": "sample-access-key" - }, - "params": {}, - "body": { - "JSON": { - "email": "sample@user.com", - "status": "active" - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "userId": "1a30a93f-916b-4c39-ad20-1ce7bbbd7754", - "jobId": 2, - "sourceId": "1syvMwC0K62eIb4yAV9kFJtbDEA", - "destinationId": "1syvZAuiGo4l1SIsil0TxDEx34G", - "attemptNum": 0, - "receivedAt": "2021-05-28T17:22:12.905+05:30", - "createdAt": "2021-05-28T11:52:15.283Z", - "firstAttemptedAt": "", - "transformAt": "router" - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "ID": "1syvZAuiGo4l1SIsil0TxDEx34G", - "Name": "gainsight-dev-dest", - "DestinationDefinition": { - "ID": "1syuhEt4I8jpvlwJc4lr1IiLjPu", - "Name": "GAINSIGHT", - "DisplayName": "Gainsight", - "Config": { - "destConfig": { - "defaultConfig": [ - "accessKey", - "sharedSecret", - "tenantId", - "domain", - "personMap", - "companyMap", - "topicName", - "eventNameMap", - "eventVersionMap", - "contractId" - ] - }, - "excludeKeys": [], - "includeKeys": [], - "saveDestinationResponse": true, - "secretKeys": ["accessKey", "sharedSecret"], - "supportedSourceTypes": ["android", "ios", "web", "unity", "amp", "cloud", "reactnative"], - "transformAt": "router", - "transformAtV1": "router" - }, - "ResponseRules": {} - }, - "Config": { - "accessKey": "sample-access-key", - "contractId": "sample-contract-id", - "domain": "demo-account.gainsightcloud.com", - "eventNameMap": [ - { - "from": "Demo Request", - "to": "Product Demo" - } - ], - "eventVersionMap": [ - { - "from": "Demo Request", - "to": "1.0.0" - } - ], - "sharedSecret": "sample-shared-secret", - "tenantId": "sample-tenant-id", - "topicName": "Support Tickets" - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": true - } - } -] diff --git a/test/__tests__/data/klaviyo.json b/test/__tests__/data/klaviyo.json deleted file mode 100644 index 623aa78cc4..0000000000 --- a/test/__tests__/data/klaviyo.json +++ /dev/null @@ -1,1970 +0,0 @@ -[ - { - "description": "Profile updating call and subscribe user (old transformer)", - "input": { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey" - } - }, - "message": { - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "user@1", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "traits": { - "firstName": "Test", - "lastName": "Rudderlabs", - "email": "test@rudderstack.com", - "phone": "+12 345 578 900", - "userId": "user@1", - "title": "Developer", - "organization": "Rudder", - "city": "Tokyo", - "region": "Kanto", - "country": "JP", - "zip": "100-0001", - "Flagged": false, - "Residence": "Shibuya", - "properties": { - "listId": "XUepkK", - "subscribe": true, - "consent": ["email", "sms"] - } - }, - "locale": "en-US", - "screen": { - "density": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.11" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - }, - "output": [ - { - "version": "1", - "type": "REST", - "method": "PATCH", - "endpoint": "https://a.klaviyo.com/api/profiles/01GW3PHVY0MTCDGS0A1612HARX", - "headers": { - "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", - "Content-Type": "application/json", - "Accept": "application/json", - "revision": "2023-02-22" - }, - "params": {}, - "body": { - "JSON": { - "data": { - "type": "profile", - "attributes": { - "external_id": "user@1", - "email": "test@rudderstack.com", - "first_name": "Test", - "last_name": "Rudderlabs", - "phone_number": "+12 345 578 900", - "title": "Developer", - "organization": "Rudder", - "location": { - "city": "Tokyo", - "region": "Kanto", - "country": "JP", - "zip": "100-0001" - }, - "properties": { - "Flagged": false, - "Residence": "Shibuya" - } - }, - "id": "01GW3PHVY0MTCDGS0A1612HARX" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://a.klaviyo.com/api/profile-subscription-bulk-create-jobs", - "headers": { - "Content-Type": "application/json", - "Accept": "application/json", - "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", - "revision": "2023-02-22" - }, - "params": {}, - "body": { - "JSON": { - "data": { - "type": "profile-subscription-bulk-create-job", - "attributes": { - "list_id": "XUepkK", - "subscriptions": [ - { - "email": "test@rudderstack.com", - "phone_number": "+12 345 578 900", - "channels": { - "email": ["MARKETING"], - "sms": ["MARKETING"] - } - } - ] - } - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ] - }, - { - "description": "Identify call for with flattenProperties enabled (old transformer)", - "input": { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey", - "flattenProperties": true - } - }, - "message": { - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "user@1", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "traits": { - "firstName": "Test", - "lastName": "Rudderlabs", - "email": "test@rudderstack.com", - "phone": "+12 345 578 900", - "userId": "user@1", - "title": "Developer", - "organization": "Rudder", - "city": "Tokyo", - "region": "Kanto", - "country": "JP", - "zip": "100-0001", - "Flagged": false, - "Residence": "Shibuya", - "friend": { - "names": { - "first": "Alice", - "last": "Smith" - }, - "age": 25 - }, - "properties": { - "listId": "XUepkK", - "subscribe": true, - "consent": ["email", "sms"] - } - }, - "locale": "en-US", - "screen": { - "density": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.11" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - }, - "output": [ - { - "version": "1", - "type": "REST", - "method": "PATCH", - "endpoint": "https://a.klaviyo.com/api/profiles/01GW3PHVY0MTCDGS0A1612HARX", - "headers": { - "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", - "Content-Type": "application/json", - "Accept": "application/json", - "revision": "2023-02-22" - }, - "params": {}, - "body": { - "JSON": { - "data": { - "type": "profile", - "attributes": { - "external_id": "user@1", - "email": "test@rudderstack.com", - "first_name": "Test", - "last_name": "Rudderlabs", - "phone_number": "+12 345 578 900", - "title": "Developer", - "organization": "Rudder", - "location": { - "city": "Tokyo", - "region": "Kanto", - "country": "JP", - "zip": "100-0001" - }, - "properties": { - "friend.age": 25, - "friend.names.first": "Alice", - "friend.names.last": "Smith", - "Flagged": false, - "Residence": "Shibuya" - } - }, - "id": "01GW3PHVY0MTCDGS0A1612HARX" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://a.klaviyo.com/api/profile-subscription-bulk-create-jobs", - "headers": { - "Content-Type": "application/json", - "Accept": "application/json", - "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", - "revision": "2023-02-22" - }, - "params": {}, - "body": { - "JSON": { - "data": { - "type": "profile-subscription-bulk-create-job", - "attributes": { - "list_id": "XUepkK", - "subscriptions": [ - { - "email": "test@rudderstack.com", - "phone_number": "+12 345 578 900", - "channels": { - "email": ["MARKETING"], - "sms": ["MARKETING"] - } - } - ] - } - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ] - }, - { - "description": "Profile updation call and subcribe user", - "input": { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey" - } - }, - "message": { - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "user@1", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "traits": { - "firstName": "Test", - "lastName": "Rudderlabs", - "email": "test3@rudderstack.com", - "phone": "+12 345 578 900", - "userId": "user@1", - "title": "Developer", - "organization": "Rudder", - "city": "Tokyo", - "region": "Kanto", - "country": "JP", - "zip": "100-0001", - "Flagged": false, - "Residence": "Shibuya", - "properties": { - "listId": "XUepkK", - "subscribe": true, - "consent": ["email", "sms"] - } - }, - "locale": "en-US", - "screen": { - "density": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.11" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - }, - "output": { - "error": "Failed to create user due to {}" - } - }, - { - "description": "Profile updation call listId is not provided for subscribing the user", - "input": { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey" - } - }, - "message": { - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "user@1", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "traits": { - "firstName": "Test", - "lastName": "Rudderlabs", - "email": "test@rudderstack.com", - "phone": "+12 345 578 900", - "userId": "user@1", - "title": "Developer", - "organization": "Rudder", - "city": "Tokyo", - "region": "Kanto", - "country": "JP", - "zip": "100-0001", - "Flagged": false, - "Residence": "Shibuya", - "properties": { - "subscribe": false, - "consent": ["email", "sms"] - } - }, - "locale": "en-US", - "screen": { - "density": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.11" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "PATCH", - "endpoint": "https://a.klaviyo.com/api/profiles/01GW3PHVY0MTCDGS0A1612HARX", - "headers": { - "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", - "Content-Type": "application/json", - "Accept": "application/json", - "revision": "2023-02-22" - }, - "params": {}, - "body": { - "JSON": { - "data": { - "type": "profile", - "attributes": { - "external_id": "user@1", - "email": "test@rudderstack.com", - "first_name": "Test", - "last_name": "Rudderlabs", - "phone_number": "+12 345 578 900", - "title": "Developer", - "organization": "Rudder", - "location": { - "city": "Tokyo", - "region": "Kanto", - "country": "JP", - "zip": "100-0001" - }, - "properties": { - "Flagged": false, - "Residence": "Shibuya" - } - }, - "id": "01GW3PHVY0MTCDGS0A1612HARX" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "Identify call with enforceEmailAsPrimary enabled from UI", - "input": { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey", - "enforceEmailAsPrimary": true - } - }, - "message": { - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "user@1", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "traits": { - "firstName": "Test", - "lastName": "Rudderlabs", - "email": "test@rudderstack.com", - "phone": "+12 345 578 900", - "userId": "user@1", - "title": "Developer", - "organization": "Rudder", - "city": "Tokyo", - "region": "Kanto", - "country": "JP", - "zip": "100-0001", - "Flagged": false, - "Residence": "Shibuya", - "properties": { - "listId": "XUepkK", - "subscribe": true, - "consent": ["email", "sms"] - } - }, - "locale": "en-US", - "screen": { - "density": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.11" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - }, - "output": [ - { - "version": "1", - "type": "REST", - "method": "PATCH", - "endpoint": "https://a.klaviyo.com/api/profiles/01GW3PHVY0MTCDGS0A1612HARX", - "headers": { - "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", - "Content-Type": "application/json", - "Accept": "application/json", - "revision": "2023-02-22" - }, - "params": {}, - "body": { - "JSON": { - "data": { - "type": "profile", - "attributes": { - "email": "test@rudderstack.com", - "first_name": "Test", - "last_name": "Rudderlabs", - "phone_number": "+12 345 578 900", - "title": "Developer", - "organization": "Rudder", - "location": { - "city": "Tokyo", - "region": "Kanto", - "country": "JP", - "zip": "100-0001" - }, - "properties": { - "Flagged": false, - "Residence": "Shibuya", - "_id": "user@1" - } - }, - "id": "01GW3PHVY0MTCDGS0A1612HARX" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://a.klaviyo.com/api/profile-subscription-bulk-create-jobs", - "headers": { - "Content-Type": "application/json", - "Accept": "application/json", - "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", - "revision": "2023-02-22" - }, - "params": {}, - "body": { - "JSON": { - "data": { - "type": "profile-subscription-bulk-create-job", - "attributes": { - "list_id": "XUepkK", - "subscriptions": [ - { - "email": "test@rudderstack.com", - "phone_number": "+12 345 578 900", - "channels": { - "email": ["MARKETING"], - "sms": ["MARKETING"] - } - } - ] - } - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ] - }, - { - "description": "Identify call without user custom Properties", - "input": { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey", - "enforceEmailAsPrimary": false - } - }, - "message": { - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "user@1", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "traits": { - "firstName": "Test", - "lastName": "Rudderlabs", - "email": "test@rudderstack.com", - "phone": "+12 345 578 900", - "userId": "user@1", - "title": "Developer", - "organization": "Rudder", - "city": "Tokyo", - "region": "Kanto", - "country": "JP", - "zip": "100-0001", - "properties": { - "listId": "XUepkK", - "subscribe": true, - "consent": ["email", "sms"] - } - }, - "locale": "en-US", - "screen": { - "density": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.11" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - }, - "output": [ - { - "version": "1", - "type": "REST", - "method": "PATCH", - "endpoint": "https://a.klaviyo.com/api/profiles/01GW3PHVY0MTCDGS0A1612HARX", - "headers": { - "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", - "Content-Type": "application/json", - "Accept": "application/json", - "revision": "2023-02-22" - }, - "params": {}, - "body": { - "JSON": { - "data": { - "type": "profile", - "attributes": { - "email": "test@rudderstack.com", - "first_name": "Test", - "last_name": "Rudderlabs", - "phone_number": "+12 345 578 900", - "external_id": "user@1", - "title": "Developer", - "organization": "Rudder", - "location": { - "city": "Tokyo", - "region": "Kanto", - "country": "JP", - "zip": "100-0001" - } - }, - "id": "01GW3PHVY0MTCDGS0A1612HARX" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://a.klaviyo.com/api/profile-subscription-bulk-create-jobs", - "headers": { - "Content-Type": "application/json", - "Accept": "application/json", - "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", - "revision": "2023-02-22" - }, - "params": {}, - "body": { - "JSON": { - "data": { - "type": "profile-subscription-bulk-create-job", - "attributes": { - "list_id": "XUepkK", - "subscriptions": [ - { - "email": "test@rudderstack.com", - "phone_number": "+12 345 578 900", - "channels": { - "email": ["MARKETING"], - "sms": ["MARKETING"] - } - } - ] - } - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ] - }, - { - "description": "Identify call without email and phone & enforceEmailAsPrimary enabled from UI", - "input": { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey", - "enforceEmailAsPrimary": true - } - }, - "message": { - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "user@1", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "traits": { - "firstName": "Test", - "lastName": "Rudderlabs", - "userId": "user@1", - "title": "Developer", - "organization": "Rudder", - "city": "Tokyo", - "region": "Kanto", - "country": "JP", - "zip": "100-0001", - "Flagged": false, - "Residence": "Shibuya", - "properties": { - "listId": "XUepkK", - "subscribe": true, - "consent": ["email", "sms"] - } - }, - "locale": "en-US", - "screen": { - "density": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.11" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - }, - "output": { - "error": "None of email and phone are present in the payload" - } - }, - { - "description": "Screen event call", - "input": { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey" - } - }, - "message": { - "type": "screen", - "event": "TestEven001", - "sentAt": "2021-01-25T16:12:02.048Z", - "userId": "sajal12", - "channel": "mobile", - "context": { - "os": { - "name": "Android", - "version": "10" - }, - "app": { - "name": "KlaviyoTest", - "build": "1", - "version": "1.0", - "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" - }, - "device": { - "id": "9c6bd77ea9da3e68", - "name": "raphaelin", - "type": "android", - "model": "Redmi K20 Pro", - "manufacturer": "Xiaomi" - }, - "locale": "en-IN", - "screen": { - "width": 1080, - "height": 2210, - "density": 440 - }, - "traits": { - "id": "user@1", - "age": "22", - "email": "test@rudderstack.com", - "phone": "9112340375", - "anonymousId": "9c6bd77ea9da3e68" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.2" - }, - "network": { - "wifi": true, - "carrier": "airtel", - "cellular": true, - "bluetooth": false - }, - "timezone": "Asia/Kolkata", - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)" - }, - "rudderId": "b7b24f86-f7bf-46d8-b2b4-ccafc080239c", - "messageId": "1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce", - "properties": { - "PreviouslyVicePresident": true, - "YearElected": 1801, - "VicePresidents": ["Aaron Burr", "George Clinton"] - }, - "anonymousId": "9c6bd77ea9da3e68", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-01-25T15:32:56.409Z" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://a.klaviyo.com/api/events", - "headers": { - "Accept": "application/json", - "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", - "Content-Type": "application/json", - "revision": "2023-02-22" - }, - "params": {}, - "body": { - "JSON": { - "data": { - "type": "event", - "attributes": { - "metric": { - "name": "TestEven001" - }, - "properties": { - "PreviouslyVicePresident": true, - "YearElected": 1801, - "VicePresidents": ["Aaron Burr", "George Clinton"] - }, - "profile": { - "$email": "test@rudderstack.com", - "$phone_number": "9112340375", - "$id": "sajal12", - "age": "22" - } - } - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "Track event call with flatten properties enabled", - "input": { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey", - "flattenProperties": true - } - }, - "message": { - "type": "track", - "event": "TestEven001", - "sentAt": "2021-01-25T16:12:02.048Z", - "userId": "sajal12", - "channel": "mobile", - "context": { - "os": { - "name": "Android", - "version": "10" - }, - "app": { - "name": "KlaviyoTest", - "build": "1", - "version": "1.0", - "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" - }, - "device": { - "id": "9c6bd77ea9da3e68", - "name": "raphaelin", - "type": "android", - "model": "Redmi K20 Pro", - "manufacturer": "Xiaomi" - }, - "locale": "en-IN", - "screen": { - "width": 1080, - "height": 2210, - "density": 440 - }, - "traits": { - "id": "user@1", - "age": "22", - "email": "test@rudderstack.com", - "phone": "9112340375", - "anonymousId": "9c6bd77ea9da3e68", - "plan_details": { - "plan_type": "gold", - "duration": "3 months" - } - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.2" - }, - "network": { - "wifi": true, - "carrier": "airtel", - "cellular": true, - "bluetooth": false - }, - "timezone": "Asia/Kolkata", - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)" - }, - "rudderId": "b7b24f86-f7bf-46d8-b2b4-ccafc080239c", - "messageId": "1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce", - "properties": { - "vicePresdentInfo": { - "PreviouslVicePresident": true, - "YearElected": 1801, - "VicePresidents": ["AaronBurr", "GeorgeClinton"] - } - }, - "anonymousId": "9c6bd77ea9da3e68", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-01-25T15:32:56.409Z" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://a.klaviyo.com/api/events", - "headers": { - "Accept": "application/json", - "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", - "Content-Type": "application/json", - "revision": "2023-02-22" - }, - "params": {}, - "body": { - "JSON": { - "data": { - "type": "event", - "attributes": { - "metric": { - "name": "TestEven001" - }, - "properties": { - "vicePresdentInfo.PreviouslVicePresident": true, - "vicePresdentInfo.VicePresidents": ["AaronBurr", "GeorgeClinton"], - "vicePresdentInfo.YearElected": 1801 - }, - "profile": { - "$email": "test@rudderstack.com", - "$phone_number": "9112340375", - "$id": "sajal12", - "age": "22", - "plan_details.plan_type": "gold", - "plan_details.duration": "3 months" - } - } - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "Track event call", - "input": { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey" - } - }, - "message": { - "type": "track", - "event": "TestEven002", - "sentAt": "2021-01-25T16:12:02.048Z", - "userId": "sajal12", - "channel": "mobile", - "context": { - "os": { - "name": "Android", - "version": "10" - }, - "app": { - "name": "KlaviyoTest", - "build": "1", - "version": "1.0", - "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" - }, - "device": { - "id": "9c6bd77ea9da3e68", - "name": "raphaelin", - "type": "android", - "model": "Redmi K20 Pro", - "manufacturer": "Xiaomi" - }, - "locale": "en-IN", - "screen": { - "width": 1080, - "height": 2210, - "density": 440 - }, - "traits": { - "id": "user@1", - "age": "22", - "name": "Test", - "email": "test@rudderstack.com", - "phone": "9112340375", - "anonymousId": "9c6bd77ea9da3e68", - "description": "Sample description" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.2" - }, - "network": { - "wifi": true, - "carrier": "airtel", - "cellular": true, - "bluetooth": false - }, - "timezone": "Asia/Kolkata", - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)" - }, - "rudderId": "b7b24f86-f7bf-46d8-b2b4-ccafc080239c", - "messageId": "1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce", - "properties": { - "PreviouslyVicePresident": true, - "YearElected": 1801, - "VicePresidents": ["Aaron Burr", "George Clinton"], - "revenue": 3000 - }, - "anonymousId": "9c6bd77ea9da3e68", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-01-25T15:32:56.409Z" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://a.klaviyo.com/api/events", - "headers": { - "Accept": "application/json", - "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", - "Content-Type": "application/json", - "revision": "2023-02-22" - }, - "params": {}, - "body": { - "JSON": { - "data": { - "type": "event", - "attributes": { - "metric": { - "name": "TestEven002" - }, - "properties": { - "PreviouslyVicePresident": true, - "YearElected": 1801, - "VicePresidents": ["Aaron Burr", "George Clinton"] - }, - "profile": { - "$email": "test@rudderstack.com", - "$phone_number": "9112340375", - "$id": "sajal12", - "age": "22", - "name": "Test", - "description": "Sample description" - }, - "value": 3000 - } - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "Track event call, with make email or phone as primary identifier toggle on", - "input": { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey", - "enforceEmailAsPrimary": true - } - }, - "message": { - "type": "track", - "event": "TestEven001", - "sentAt": "2021-01-25T16:12:02.048Z", - "userId": "sajal12", - "channel": "mobile", - "context": { - "os": { - "name": "Android", - "version": "10" - }, - "app": { - "name": "KlaviyoTest", - "build": "1", - "version": "1.0", - "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" - }, - "device": { - "id": "9c6bd77ea9da3e68", - "name": "raphaelin", - "type": "android", - "model": "Redmi K20 Pro", - "manufacturer": "Xiaomi" - }, - "locale": "en-IN", - "screen": { - "width": 1080, - "height": 2210, - "density": 440 - }, - "traits": { - "id": "user@1", - "age": "22", - "email": "test@rudderstack.com", - "phone": "9112340375", - "anonymousId": "9c6bd77ea9da3e68" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.2" - }, - "network": { - "wifi": true, - "carrier": "airtel", - "cellular": true, - "bluetooth": false - }, - "timezone": "Asia/Kolkata", - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)" - }, - "rudderId": "b7b24f86-f7bf-46d8-b2b4-ccafc080239c", - "messageId": "1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce", - "properties": { - "PreviouslyVicePresident": true, - "YearElected": 1801, - "VicePresidents": ["Aaron Burr", "George Clinton"] - }, - "anonymousId": "9c6bd77ea9da3e68", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-01-25T15:32:56.409Z" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://a.klaviyo.com/api/events", - "headers": { - "Accept": "application/json", - "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", - "Content-Type": "application/json", - "revision": "2023-02-22" - }, - "params": {}, - "body": { - "JSON": { - "data": { - "type": "event", - "attributes": { - "metric": { - "name": "TestEven001" - }, - "properties": { - "PreviouslyVicePresident": true, - "YearElected": 1801, - "VicePresidents": ["Aaron Burr", "George Clinton"] - }, - "profile": { - "$email": "test@rudderstack.com", - "$phone_number": "9112340375", - "age": "22", - "_id": "sajal12" - } - } - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "Track event call, without email and phone & with (make email or phone as primary identifier) toggle on", - "input": { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey", - "enforceEmailAsPrimary": true - } - }, - "message": { - "type": "track", - "event": "TestEven001", - "sentAt": "2021-01-25T16:12:02.048Z", - "userId": "sajal12", - "channel": "mobile", - "context": { - "os": { - "name": "Android", - "version": "10" - }, - "app": { - "name": "KlaviyoTest", - "build": "1", - "version": "1.0", - "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" - }, - "device": { - "id": "9c6bd77ea9da3e68", - "name": "raphaelin", - "type": "android", - "model": "Redmi K20 Pro", - "manufacturer": "Xiaomi" - }, - "locale": "en-IN", - "screen": { - "width": 1080, - "height": 2210, - "density": 440 - }, - "traits": { - "id": "user@1", - "age": "22", - "anonymousId": "9c6bd77ea9da3e68" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.2" - }, - "network": { - "wifi": true, - "carrier": "airtel", - "cellular": true, - "bluetooth": false - }, - "timezone": "Asia/Kolkata", - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)" - }, - "rudderId": "b7b24f86-f7bf-46d8-b2b4-ccafc080239c", - "messageId": "1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce", - "properties": { - "PreviouslyVicePresident": true, - "YearElected": 1801, - "VicePresidents": ["Aaron Burr", "George Clinton"] - }, - "anonymousId": "9c6bd77ea9da3e68", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-01-25T15:32:56.409Z" - } - }, - "output": { - "error": "None of email and phone are present in the payload" - } - }, - { - "description": "group call", - "input": { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey" - } - }, - "message": { - "userId": "user123", - "type": "group", - "groupId": "XUepkK", - "traits": { - "subscribe": true - }, - "context": { - "traits": { - "email": "test@rudderstack.com", - "phone": "+12 345 678 900", - "consent": ["email"] - }, - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-01-21T00:21:34.208Z" - } - }, - "output": [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://a.klaviyo.com/api/profile-subscription-bulk-create-jobs", - "headers": { - "Content-Type": "application/json", - "Accept": "application/json", - "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", - "revision": "2023-02-22" - }, - "params": {}, - "body": { - "JSON": { - "data": { - "type": "profile-subscription-bulk-create-job", - "attributes": { - "list_id": "XUepkK", - "subscriptions": [ - { - "email": "test@rudderstack.com", - "phone_number": "+12 345 678 900" - } - ] - } - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ] - }, - { - "description": "group call without groupId", - "input": { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey" - } - }, - "message": { - "userId": "user123", - "type": "group", - "groupId": "", - "traits": { - "subscribe": true - }, - "context": { - "traits": { - "email": "test@rudderstack.com", - "phone": "+12 345 678 900", - "consent": "email" - }, - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-01-21T00:21:34.208Z" - } - }, - "output": { - "error": "groupId is a required field for group events" - } - }, - { - "description": "[Error]: Check for unsupported message type", - "input": { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey" - } - }, - "message": { - "userId": "user123", - "type": "random", - "groupId": "XUepkK", - "traits": { - "subscribe": true - }, - "context": { - "traits": { - "email": "test@rudderstack.com", - "phone": "+12 345 678 900", - "consent": "email" - }, - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-01-21T00:21:34.208Z" - } - }, - "output": { - "error": "Event type random is not supported" - } - }, - { - "description": "Track call with Ecom events (Viewed Product)", - "input": { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey" - } - }, - "message": { - "type": "track", - "event": "product viewed", - "sentAt": "2021-01-25T16:12:02.048Z", - "userId": "sajal12", - "channel": "mobile", - "context": { - "os": { - "name": "Android", - "version": "10" - }, - "app": { - "name": "KlaviyoTest", - "build": "1", - "version": "1.0", - "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" - }, - "device": { - "id": "9c6bd77ea9da3e68", - "name": "raphaelin", - "type": "android", - "model": "Redmi K20 Pro", - "manufacturer": "Xiaomi" - }, - "locale": "en-IN", - "screen": { - "width": 1080, - "height": 2210, - "density": 440 - }, - "traits": { - "id": "user@1", - "age": "22", - "name": "Test", - "email": "test@rudderstack.com", - "phone": "9112340375", - "anonymousId": "9c6bd77ea9da3e68", - "description": "Sample description" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.2" - }, - "network": { - "wifi": true, - "carrier": "airtel", - "cellular": true, - "bluetooth": false - }, - "timezone": "Asia/Kolkata", - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)" - }, - "rudderId": "b7b24f86-f7bf-46d8-b2b4-ccafc080239c", - "messageId": "1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce", - "properties": { - "name": "test product", - "product_id": "1114", - "sku": "WINNIePuh12", - "image_url": "http://www.example.com/path/to/product/image.png", - "url": "http://www.example.com/path/to/product", - "brand": "Not for Kids", - "price": 9.9, - "categories": ["Fiction", "Children"] - }, - "anonymousId": "9c6bd77ea9da3e68", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-01-25T15:32:56.409Z" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://a.klaviyo.com/api/events", - "headers": { - "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", - "Content-Type": "application/json", - "Accept": "application/json", - "revision": "2023-02-22" - }, - "params": {}, - "body": { - "JSON": { - "data": { - "type": "event", - "attributes": { - "metric": { - "name": "Viewed Product" - }, - "profile": { - "$email": "test@rudderstack.com", - "$phone_number": "9112340375", - "$id": "sajal12", - "age": "22", - "name": "Test", - "description": "Sample description" - }, - "properties": { - "ProductName": "test product", - "ProductID": "1114", - "SKU": "WINNIePuh12", - "ImageURL": "http://www.example.com/path/to/product/image.png", - "URL": "http://www.example.com/path/to/product", - "Brand": "Not for Kids", - "Price": 9.9, - "Categories": ["Fiction", "Children"] - } - } - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "Track call with Ecom events (Checkout Started) with enabled flattenProperties", - "input": { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey", - "flattenProperties": true - } - }, - "message": { - "type": "track", - "event": "checkout started", - "sentAt": "2021-01-25T16:12:02.048Z", - "userId": "sajal12", - "channel": "mobile", - "context": { - "os": { - "name": "Android", - "version": "10" - }, - "app": { - "name": "KlaviyoTest", - "build": "1", - "version": "1.0", - "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" - }, - "device": { - "id": "9c6bd77ea9da3e68", - "name": "raphaelin", - "type": "android", - "model": "Redmi K20 Pro", - "manufacturer": "Xiaomi" - }, - "locale": "en-IN", - "screen": { - "width": 1080, - "height": 2210, - "density": 440 - }, - "traits": { - "id": "user@1", - "age": "22", - "name": "Test", - "email": "test@rudderstack.com", - "phone": "9112340375", - "anonymousId": "9c6bd77ea9da3e68", - "description": "Sample description" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.2" - }, - "network": { - "wifi": true, - "carrier": "airtel", - "cellular": true, - "bluetooth": false - }, - "timezone": "Asia/Kolkata", - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)" - }, - "rudderId": "b7b24f86-f7bf-46d8-b2b4-ccafc080239c", - "messageId": "1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce", - "properties": { - "order_id": "1234", - "affiliation": "Apple Store", - "value": 20, - "revenue": 15.0, - "shipping": 4, - "tax": 1, - "discount": 1.5, - "coupon": "ImagePro", - "currency": "USD", - "products": [ - { - "product_id": "123", - "sku": "G-32", - "name": "Monopoly", - "price": 14, - "quantity": 1, - "category": "Games", - "url": "https://www.website.com/product/path", - "image_url": "https://www.website.com/product/path.jpg" - }, - { - "product_id": "345", - "sku": "F-32", - "name": "UNO", - "price": 3.45, - "quantity": 2, - "category": "Games" - } - ] - }, - "anonymousId": "9c6bd77ea9da3e68", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-01-25T15:32:56.409Z" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://a.klaviyo.com/api/events", - "headers": { - "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", - "Content-Type": "application/json", - "Accept": "application/json", - "revision": "2023-02-22" - }, - "params": {}, - "body": { - "JSON": { - "data": { - "type": "event", - "attributes": { - "metric": { - "name": "Started Checkout" - }, - "properties": { - "$event_id": "1234", - "$value": 20, - "items[0].ProductID": "123", - "items[0].SKU": "G-32", - "items[0].ProductName": "Monopoly", - "items[0].Quantity": 1, - "items[0].ItemPrice": 14, - "items[0].ProductURL": "https://www.website.com/product/path", - "items[0].ImageURL": "https://www.website.com/product/path.jpg", - "items[1].ProductID": "345", - "items[1].SKU": "F-32", - "items[1].ProductName": "UNO", - "items[1].Quantity": 2, - "items[1].ItemPrice": 3.45 - }, - "profile": { - "$email": "test@rudderstack.com", - "$phone_number": "9112340375", - "$id": "sajal12", - "age": "22", - "name": "Test", - "description": "Sample description" - } - } - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "Track call with Ecom events (Added to Cart) with properties.products", - "input": { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey" - } - }, - "message": { - "type": "track", - "event": "product added", - "sentAt": "2021-01-25T16:12:02.048Z", - "userId": "sajal12", - "channel": "mobile", - "context": { - "os": { - "name": "Android", - "version": "10" - }, - "app": { - "name": "KlaviyoTest", - "build": "1", - "version": "1.0", - "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" - }, - "device": { - "id": "9c6bd77ea9da3e68", - "name": "raphaelin", - "type": "android", - "model": "Redmi K20 Pro", - "manufacturer": "Xiaomi" - }, - "locale": "en-IN", - "screen": { - "width": 1080, - "height": 2210, - "density": 440 - }, - "traits": { - "id": "user@1", - "age": "22", - "name": "Test", - "email": "test@rudderstack.com", - "phone": "9112340375", - "anonymousId": "9c6bd77ea9da3e68", - "description": "Sample description" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.2" - }, - "network": { - "wifi": true, - "carrier": "airtel", - "cellular": true, - "bluetooth": false - }, - "timezone": "Asia/Kolkata", - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)" - }, - "rudderId": "b7b24f86-f7bf-46d8-b2b4-ccafc080239c", - "messageId": "1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce", - "properties": { - "order_id": "1234", - "value": 12.12, - "categories": ["Fiction3", "Children3"], - "checkout_url": "http://www.heythere.com", - "item_names": ["book1", "book2"], - "products": [ - { - "product_id": "b1pid", - "sku": "123x", - "name": "book1", - "url": "heyther.com", - "price": 12.0 - }, - { - "product_id": "b2pid", - "sku": "123x", - "name": "book2", - "url": "heyther2.com", - "price": 14.0 - } - ] - }, - "anonymousId": "9c6bd77ea9da3e68", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-01-25T15:32:56.409Z" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://a.klaviyo.com/api/events", - "headers": { - "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", - "Content-Type": "application/json", - "Accept": "application/json", - "revision": "2023-02-22" - }, - "params": {}, - "body": { - "JSON": { - "data": { - "type": "event", - "attributes": { - "metric": { - "name": "Added to Cart" - }, - "profile": { - "$email": "test@rudderstack.com", - "$phone_number": "9112340375", - "$id": "sajal12", - "age": "22", - "name": "Test", - "description": "Sample description" - }, - "properties": { - "$value": 12.12, - "AddedItemCategories": ["Fiction3", "Children3"], - "ItemNames": ["book1", "book2"], - "CheckoutURL": "http://www.heythere.com", - "items": [ - { - "ProductID": "b1pid", - "SKU": "123x", - "ProductName": "book1", - "ItemPrice": 12, - "ProductURL": "heyther.com" - }, - { - "ProductID": "b2pid", - "SKU": "123x", - "ProductName": "book2", - "ItemPrice": 14, - "ProductURL": "heyther2.com" - } - ] - } - } - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - } -] diff --git a/test/__tests__/data/klaviyo_router.json b/test/__tests__/data/klaviyo_router.json deleted file mode 100644 index 7fae2ad90e..0000000000 --- a/test/__tests__/data/klaviyo_router.json +++ /dev/null @@ -1,599 +0,0 @@ -[ - { - "description": "Router tests", - "input": [ - { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey" - } - }, - "metadata": { - "jobId": 1 - }, - "message": { - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "test", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "traits": { - "firstName": "Test", - "lastName": "Rudderlabs", - "email": "test@rudderstack.com", - "phone": "+12 345 578 900", - "userId": "Testc", - "title": "Developer", - "organization": "Rudder", - "city": "Tokyo", - "region": "Kanto", - "country": "JP", - "zip": "100-0001", - "Flagged": false, - "Residence": "Shibuya", - "properties": { - "consent": ["email", "sms"] - } - }, - "locale": "en-US", - "screen": { - "density": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.11" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - }, - { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey" - } - }, - "metadata": { - "jobId": 2 - }, - "message": { - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "test", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "traits": { - "firstName": "Test", - "lastName": "Rudderlabs", - "email": "test@rudderstack.com", - "phone": "+12 345 578 900", - "userId": "test", - "title": "Developer", - "organization": "Rudder", - "city": "Tokyo", - "region": "Kanto", - "country": "JP", - "zip": "100-0001", - "Flagged": false, - "Residence": "Shibuya", - "properties": { - "listId": "XUepkK", - "subscribe": true, - "consent": ["email", "sms"] - } - }, - "locale": "en-US", - "screen": { - "density": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.11" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - }, - { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey" - } - }, - "metadata": { - "jobId": 3 - }, - "message": { - "userId": "user123", - "type": "group", - "groupId": "XUepkK", - "traits": { - "subscribe": true - }, - "context": { - "traits": { - "email": "test@rudderstack.com", - "phone": "+12 345 678 900", - "consent": ["email"] - }, - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-01-21T00:21:34.208Z" - } - }, - { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey" - } - }, - "metadata": { - "jobId": 4 - }, - "message": { - "userId": "user123", - "type": "random", - "groupId": "XUepkK", - "traits": { - "subscribe": true - }, - "context": { - "traits": { - "email": "test@rudderstack.com", - "phone": "+12 345 678 900", - "consent": "email" - }, - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-01-21T00:21:34.208Z" - } - }, - { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey" - } - }, - "metadata": { - "jobId": 5 - }, - "message": { - "userId": "user123", - "type": "group", - "groupId": "", - "traits": { - "subscribe": true - }, - "context": { - "traits": { - "email": "test@rudderstack.com", - "phone": "+12 345 678 900", - "consent": "email" - }, - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-01-21T00:21:34.208Z" - } - } - ], - "newTransformerOutput": [ - { - "batchedRequest": [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://a.klaviyo.com/api/profile-subscription-bulk-create-jobs", - "headers": { - "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", - "Content-Type": "application/json", - "Accept": "application/json", - "revision": "2023-02-22" - }, - "params": {}, - "body": { - "JSON": { - "data": { - "type": "profile-subscription-bulk-create-job", - "attributes": { - "list_id": "XUepkK", - "subscriptions": [ - { - "email": "test@rudderstack.com", - "phone_number": "+12 345 678 900" - }, - { - "email": "test@rudderstack.com", - "phone_number": "+12 345 578 900", - "channels": { - "email": ["MARKETING"], - "sms": ["MARKETING"] - } - } - ] - } - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ], - "metadata": [ - { - "jobId": 3 - }, - { - "jobId": 2 - } - ], - "batched": true, - "statusCode": 200, - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey" - } - } - }, - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "PATCH", - "endpoint": "https://a.klaviyo.com/api/profiles/01GW3PHVY0MTCDGS0A1612HARX", - "headers": { - "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", - "Content-Type": "application/json", - "Accept": "application/json", - "revision": "2023-02-22" - }, - "params": {}, - "body": { - "JSON": { - "data": { - "type": "profile", - "attributes": { - "external_id": "test", - "email": "test@rudderstack.com", - "first_name": "Test", - "last_name": "Rudderlabs", - "phone_number": "+12 345 578 900", - "title": "Developer", - "organization": "Rudder", - "location": { - "city": "Tokyo", - "region": "Kanto", - "country": "JP", - "zip": "100-0001" - }, - "properties": { - "Flagged": false, - "Residence": "Shibuya" - } - }, - "id": "01GW3PHVY0MTCDGS0A1612HARX" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - "error": "{\"id\":\"01GW3PHVY0MTCDGS0A1612HARX\",\"attributes\":{}}", - "metadata": [ - { - "jobId": 1 - } - ], - "batched": false, - "statusCode": 299, - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey" - } - } - }, - { - "error": "Event type random is not supported", - "metadata": [ - { - "jobId": 4 - } - ], - "batched": false, - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation" - }, - "statusCode": 400, - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey" - } - } - }, - { - "error": "groupId is a required field for group events", - "metadata": [ - { - "jobId": 5 - } - ], - "batched": false, - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation" - }, - "statusCode": 400, - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey" - } - } - } - ], - "oldTransformerOutput": [ - { - "batchedRequest": [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://a.klaviyo.com/api/profile-subscription-bulk-create-jobs", - "headers": { - "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", - "Content-Type": "application/json", - "Accept": "application/json", - "revision": "2023-02-22" - }, - "params": {}, - "body": { - "JSON": { - "data": { - "type": "profile-subscription-bulk-create-job", - "attributes": { - "list_id": "XUepkK", - "subscriptions": [ - { - "email": "test@rudderstack.com", - "phone_number": "+12 345 678 900" - }, - { - "email": "test@rudderstack.com", - "phone_number": "+12 345 578 900", - "channels": { - "email": ["MARKETING"], - "sms": ["MARKETING"] - } - } - ] - } - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "PATCH", - "endpoint": "https://a.klaviyo.com/api/profiles/01GW3PHVY0MTCDGS0A1612HARX", - "headers": { - "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", - "Content-Type": "application/json", - "Accept": "application/json", - "revision": "2023-02-22" - }, - "params": {}, - "body": { - "JSON": { - "data": { - "type": "profile", - "attributes": { - "external_id": "test", - "email": "test@rudderstack.com", - "first_name": "Test", - "last_name": "Rudderlabs", - "phone_number": "+12 345 578 900", - "title": "Developer", - "organization": "Rudder", - "location": { - "city": "Tokyo", - "region": "Kanto", - "country": "JP", - "zip": "100-0001" - }, - "properties": { - "Flagged": false, - "Residence": "Shibuya" - } - }, - "id": "01GW3PHVY0MTCDGS0A1612HARX" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ], - "metadata": [ - { - "jobId": 3 - }, - { - "jobId": 2 - } - ], - "batched": true, - "statusCode": 200, - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey" - } - } - }, - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "PATCH", - "endpoint": "https://a.klaviyo.com/api/profiles/01GW3PHVY0MTCDGS0A1612HARX", - "headers": { - "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", - "Content-Type": "application/json", - "Accept": "application/json", - "revision": "2023-02-22" - }, - "params": {}, - "body": { - "JSON": { - "data": { - "type": "profile", - "attributes": { - "external_id": "test", - "email": "test@rudderstack.com", - "first_name": "Test", - "last_name": "Rudderlabs", - "phone_number": "+12 345 578 900", - "title": "Developer", - "organization": "Rudder", - "location": { - "city": "Tokyo", - "region": "Kanto", - "country": "JP", - "zip": "100-0001" - }, - "properties": { - "Flagged": false, - "Residence": "Shibuya" - } - }, - "id": "01GW3PHVY0MTCDGS0A1612HARX" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "jobId": 1 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey" - } - } - }, - { - "metadata": [ - { - "jobId": 4 - } - ], - "batched": false, - "statusCode": 400, - "error": "Event type random is not supported", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation" - }, - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey" - } - } - }, - { - "metadata": [ - { - "jobId": 5 - } - ], - "batched": false, - "statusCode": 400, - "error": "groupId is a required field for group events", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation" - }, - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey" - } - } - } - ] - } -] diff --git a/test/__tests__/data/kustomer_input.json b/test/__tests__/data/kustomer_input.json deleted file mode 100644 index c711c2499c..0000000000 --- a/test/__tests__/data/kustomer_input.json +++ /dev/null @@ -1,851 +0,0 @@ -[ - { - "destination": { - "Config": { - "apiKey": "dummyApiKey" - } - }, - "message": { - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "Testc", - "channel": "web", - "context": { - "os": { "name": "", "version": "" }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "traits": { - "name": "Test Rudderlabs", - "email": "test@rudderstack.com", - "phone": "+12345578900", - "birthday": "2005-01-01T23:28:56.782Z", - "userId": "Testc", - "address": { - "street": "24 Dovers Lane", - "city": "Miami", - "state": "Florida", - "postalCode": "1890001" - }, - "userName": "Testc47", - "company": "Rudderstack", - "createdAt": "2015-04-17T12:37:42.146Z", - "lastActivityAt": "2016-04-17T12:37:42.146Z", - "lastCustomerActivityAt": "2017-04-17T12:37:42.146Z", - "lastSeenAt": "2017-04-17T12:37:42.146Z", - "avatar": "https://homepages.cae.wisc.edu/~ece533/images/boat.png", - "gender": "m", - "tags": ["happy", "satisfied"], - "website": "www.mattertoast873.com", - "socials": [ - { - "verified": true, - "userid": "100", - "type": "twitter", - "username": "@Testc", - "url": "http://twitter.com/Testc" - }, - { - "verified": false, - "userid": "200", - "type": "facebook", - "username": "Testc", - "url": "http://facebook.com/Testc" - } - ] - }, - "locale": "en-US", - "screen": { "density": 2 }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.1.11" }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "integrations": { "All": true }, - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey" - } - }, - "message": { - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "channel": "web", - "userId": "58210c3db0f09110006b7953", - "context": { - "os": { "name": "", "version": "" }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "traits": { - "name": "Ano Domeni", - "phone": "+12345578000", - "birthday": "2005-01-01T23:28:56.782Z" - }, - "locale": "en-US", - "screen": { "density": 2 }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.1.11" }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "integrations": { "All": true }, - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey" - } - }, - "message": { - "type": "screen", - "event": "Test-Event-Screen", - "sentAt": "2021-01-25T16:12:02.048Z", - "userId": "Testc", - "channel": "mobile", - "context": { - "os": { - "name": "Android", - "version": "10" - }, - "app": { - "name": "KlaviyoTest", - "build": "1", - "version": "1.0", - "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" - }, - "device": { - "id": "9c6bd77ea9da3e68", - "name": "raphaelin", - "type": "android", - "model": "Redmi K20 Pro", - "manufacturer": "Xiaomi" - }, - "locale": "en-IN", - "screen": { - "width": 1080, - "height": 2210, - "density": 440 - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.2" - }, - "network": { - "wifi": true, - "carrier": "airtel", - "cellular": true, - "bluetooth": false - }, - "timezone": "Asia/Kolkata", - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)" - }, - "rudderId": "b7b24f86-f7bf-46d8-b2b4-ccafc080239c", - "messageId": "1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce", - "properties": { - "hasAccount": "true", - "YearSelectedNum": 1801, - "originalServing": "2021-01-25T15:32:56.409Z" - }, - "anonymousId": "9c6bd77ea9da3e68", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-01-25T15:32:56.409Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey" - } - }, - "message": { - "name": "Cart-Viewed", - "type": "page", - "sentAt": "2021-01-03T17:02:53.197Z", - "userId": "user@doe", - "channel": "web", - "context": { - "os": { "name": "", "version": "" }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://morkey.in", - "path": "/cart", - "title": "miphone", - "search": "MI", - "referrer": "morkey" - }, - "locale": "en-US", - "screen": { "density": 2 }, - "traits": { - "userId": "userid", - "profession": "Student", - "anonymousId": "d80b66d5-b33d-412d-866f-r4fft5841af" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.1.11" }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "category": "Cart", - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "15129730-eb00-4db7-8db2-799566ccb2ef", - "properties": { - "url": "http://morkey.in", - "name": "Cart Viewed", - "path": "/cart", - "title": "miphone", - "search": "MI", - "category": "Cart", - "referrer": "morkey", - "domain": "morkey.com" - }, - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "integrations": { "All": true }, - "originalTimestamp": "2021-01-03T17:02:53.195Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey" - } - }, - "message": { - "type": "page", - "sentAt": "2021-01-03T17:02:53.197Z", - "userId": "user@doe", - "channel": "web", - "context": { - "os": { "name": "", "version": "" }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://morkey.in", - "path": "/cart", - "title": "miphone", - "search": "MI", - "referrer": "morkey" - }, - "locale": "en-US", - "screen": { "density": 2 }, - "traits": { - "userId": "userid", - "profession": "Student", - "anonymousId": "d80b66d5-b33d-412d-866f-r4fft5841af" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.1.11" }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "category": "Cart", - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "15129730-eb00-4db7-8db2-799566ccb2ef", - "properties": { - "url": "http://morkey.in", - "path": "/cart", - "title": "miphone", - "search": "MI", - "category": "Cart", - "referrer": "morkey", - "domain": "morkey.com", - "kustomerTrackingId": "829131sjad", - "kustomerSessionId": "hsad522" - }, - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "integrations": { "All": true }, - "originalTimestamp": "2021-01-03T17:02:53.195Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey" - } - }, - "message": { - "type": "track", - "event": "Tracking-Weekender", - "sentAt": "2021-01-03T17:02:53.197Z", - "userId": "user@doe", - "channel": "web", - "context": { - "os": { "name": "", "version": "" }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://morkey.in", - "path": "/cart", - "title": "miphone", - "search": "MI", - "referrer": "morkey" - }, - "locale": "en-US", - "screen": { "density": 2 }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.1.11" }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "15129730-eb00-4db7-8db2-799566ccb2ef", - "properties": { - "YearServicedNum": 211, - "region": "strapis", - "kustomerTrackingId": "sahetwiac", - "kustomerSessionId": "63nsa22" - }, - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "locale": "en-US", - "integrations": { "All": true }, - "originalTimestamp": "2021-01-03T17:02:53.195Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey" - } - }, - "message": { - "type": "track", - "event": "Tracking-Weekender2", - "sentAt": "2021-01-03T17:02:53.197Z", - "userId": "user@doe", - "channel": "web", - "context": { - "os": { "name": "", "version": "" }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://morkey.in", - "path": "/cart", - "title": "miphone", - "search": "MI", - "referrer": "morkey" - }, - "screen": { "density": 2 }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.1.11" }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "15129730-eb00-4db7-8db2-799566ccb2ef", - "properties": { - "YearServicedNum": 211, - "reg_8-821x": false, - "kustomer_tracking_id": "sahetwiac", - "kustomer_session_id": "63nsa22" - }, - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "integrations": { "All": true }, - "locale": "en-US", - "originalTimestamp": "2021-01-03T17:02:53.195Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "genericPage": true - } - }, - "message": { - "type": "page", - "name": "Unfinished page", - "sentAt": "2021-01-03T17:02:53.197Z", - "userId": "user@doe", - "channel": "web", - "context": { - "os": { "name": "", "version": "" }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://morkey.in", - "path": "/cart", - "title": "miphone", - "search": "MI", - "referrer": "morkey" - }, - "screen": { "density": 2 }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.1.11" }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "15129730-eb00-4db7-8db2-799566ccb2ef", - "properties": { - "url": "http://morkey.in", - "path": "/cart", - "title": "miphone", - "search": "MI", - "category": "Cart", - "referrer": "morkey", - "domain": "morkey.com" - }, - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "integrations": { "All": true }, - "locale": "en-US", - "originalTimestamp": "2021-01-03T17:02:53.195Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "genericScreen": true - } - }, - "message": { - "type": "screen", - "event": "Test-Event-Screen", - "sentAt": "2021-01-25T16:12:02.048Z", - "userId": "Testc", - "channel": "mobile", - "context": { - "os": { - "name": "Android", - "version": "10" - }, - "app": { - "name": "KlaviyoTest", - "build": "1", - "version": "1.0", - "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" - }, - "device": { - "id": "9c6bd77ea9da3e68", - "name": "raphaelin", - "type": "android", - "model": "Redmi K20 Pro", - "manufacturer": "Xiaomi" - }, - "locale": "en-IN", - "screen": { - "width": 1080, - "height": 2210, - "density": 440 - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.2" - }, - "network": { - "wifi": true, - "carrier": "airtel", - "cellular": true, - "bluetooth": false - }, - "timezone": "Asia/Kolkata", - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)" - }, - "rudderId": "b7b24f86-f7bf-46d8-b2b4-ccafc080239c", - "messageId": "1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce", - "properties": { - "hasAccount": "true", - "YearSelectedNum": 1801, - "originalServing": "2021-01-25T15:32:56.409Z" - }, - "anonymousId": "9c6bd77ea9da3e68", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-01-25T15:32:56.409Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey" - } - }, - "message": { - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "Testc", - "channel": "web", - "context": { - "os": { "name": "", "version": "" }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "traits": { - "firstName": "Test", - "lastName": "Rudderlabs", - "email": "test@rudderstack.com", - "phone": "+12345578900", - "birthday": "2005-01-01T23:28:56.782Z", - "userId": "Testc", - "address": { - "street": "24 Dovers Lane", - "city": "Miami", - "state": "Florida", - "postalCode": "1890001" - }, - "userName": "Testc47", - "company": "Rudderstack", - "createdAt": "2015-04-17T12:37:42.146Z", - "lastActivityAt": "2016-04-17T12:37:42.146Z", - "lastCustomerActivityAt": "2017-04-17T12:37:42.146Z", - "lastSeenAt": "2017-04-17T12:37:42.146Z", - "avatar": "https://homepages.cae.wisc.edu/~ece533/images/boat.png", - "gender": "m", - "tags": ["happy", "satisfied"], - "website": "www.mattertoast873.com", - "socials": [ - { - "verified": true, - "userid": "100", - "type": "twitter", - "username": "@Testc", - "url": "http://twitter.com/Testc" - }, - { - "verified": false, - "userid": "200", - "type": "facebook", - "username": "Testc", - "url": "http://facebook.com/Testc" - } - ] - }, - "locale": "en-US", - "screen": { "density": 2 }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.1.11" }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "integrations": { "All": true }, - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey" - } - }, - "message": { - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "Testc", - "channel": "web", - "context": { - "os": { "name": "", "version": "" }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "traits": { - "firstName": "Test", - "lastName": "Rudderlabs", - "emails": [ - { - "type": "home", - "email": "test@rudderstack.com" - } - ], - "phones": [ - { - "type": "home", - "phone": "+12345578900" - } - ], - "birthday": "2005-01-01T23:28:56.782Z", - "userId": "Testc", - "address": "test address string", - "userName": "Testc47", - "company": "Rudderstack", - "createdAt": "2015-04-17T12:37:42.146Z", - "lastActivityAt": "2016-04-17T12:37:42.146Z", - "lastCustomerActivityAt": "2017-04-17T12:37:42.146Z", - "lastSeenAt": "2017-04-17T12:37:42.146Z", - "avatar": "https://homepages.cae.wisc.edu/~ece533/images/boat.png", - "gender": "m", - "tags": ["happy", "satisfied"], - "website": "www.mattertoast873.com", - "socials": [ - { - "verified": true, - "userid": "100", - "type": "twitter", - "username": "@Testc", - "url": "http://twitter.com/Testc" - }, - { - "verified": false, - "userid": "200", - "type": "facebook", - "username": "Testc", - "url": "http://facebook.com/Testc" - } - ] - }, - "locale": "en-US", - "screen": { "density": 2 }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.1.11" }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "integrations": { "All": true }, - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey" - } - }, - "message": { - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "Testc", - "channel": "web", - "context": { - "os": { "name": "", "version": "" }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "traits": { - "firstName": "Test", - "lastName": "Rudderlabs", - "emails": [ - { - "type": "home", - "email": "test@rudderstack.com" - } - ], - "phones": [ - { - "type": "home", - "phone": "+12345578900" - } - ], - "birthday": "2005-01-01T23:28:56.782Z", - "userId": "Testc", - "address": "test address string", - "userName": "Testc47", - "company": "Rudderstack", - "createdAt": "2015-04-17T12:37:42.146Z", - "lastActivityAt": "2016-04-17T12:37:42.146Z", - "lastCustomerActivityAt": "2017-04-17T12:37:42.146Z", - "lastSeenAt": "2017-04-17T12:37:42.146Z", - "avatar": "https://homepages.cae.wisc.edu/~ece533/images/boat.png", - "gender": "m", - "tags": ["happy", "satisfied"], - "website": "www.mattertoast873.com", - "socials": [ - { - "verified": true, - "userid": "100", - "type": "twitter", - "username": "@Testc", - "url": "http://twitter.com/Testc" - }, - { - "verified": false, - "userid": "200", - "type": "facebook", - "username": "Testc", - "url": "http://facebook.com/Testc" - } - ] - }, - "locale": "en-US", - "screen": { "density": 2 }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.1.11" }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0", - "externalId": [ - { - "type": "kustomerId", - "id": "abcd1234" - } - ] - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "integrations": { "All": true }, - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "genericScreen": true - } - }, - "message": { - "type": "screen", - "event": "Test-Event-Screen", - "userId": "utsabc", - "channel": "mobile", - "context": { - "os": { - "name": "Android", - "version": "10" - }, - "app": { - "name": "KlaviyoTest", - "build": "1", - "version": "1.0", - "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" - }, - "device": { - "id": "9c6bd77ea9da3e68", - "name": "raphaelin", - "type": "android", - "model": "Redmi K20 Pro", - "manufacturer": "Xiaomi" - }, - "locale": "en-IN", - "screen": { - "width": 1080, - "height": 2210, - "density": 440 - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.2" - }, - "network": { - "wifi": true, - "carrier": "airtel", - "cellular": true, - "bluetooth": false - }, - "timezone": "Asia/Kolkata", - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)", - "sessionId": "hsad522" - }, - "rudderId": "b7b24f86-f7bf-46d8-b2b4-ccafc080239c", - "messageId": "1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce", - "properties": { - "hasAccount": "true", - "YearSelectedNum": 1801 - }, - "anonymousId": "9c6bd77ea9da3e68", - "integrations": { - "All": true - }, - "originalTimestamp": "2023-01-10T15:32:56.409Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyAPIkey", - "baseEndpoint": "https://api.prod2.kustomerapp.com", - "apiKey": "dummyApiKey", - "genericScreen": true - } - }, - "message": { - "type": "screen", - "event": "Test-Event-Screen", - "userId": "Testc", - "channel": "mobile", - "context": { - "os": { - "name": "Android", - "version": "10" - }, - "app": { - "name": "KlaviyoTest", - "build": "1", - "version": "1.0", - "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" - }, - "device": { - "id": "9c6bd77ea9da3e68", - "name": "raphaelin", - "type": "android", - "model": "Redmi K20 Pro", - "manufacturer": "Xiaomi" - }, - "locale": "en-IN", - "screen": { - "width": 1080, - "height": 2210, - "density": 440 - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.2" - }, - "network": { - "wifi": true, - "carrier": "airtel", - "cellular": true, - "bluetooth": false - }, - "timezone": "Asia/Kolkata", - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)", - "sessionId": "hsad522" - }, - "rudderId": "b7b24f86-f7bf-46d8-b2b4-ccafc080239c", - "messageId": "1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce", - "properties": { - "hasAccount": "true", - "YearSelectedNum": 1801 - }, - "anonymousId": "9c6bd77ea9da3e68", - "integrations": { - "All": true - }, - "originalTimestamp": "2023-01-10T15:32:56.409Z" - } - } -] diff --git a/test/__tests__/data/kustomer_output.json b/test/__tests__/data/kustomer_output.json deleted file mode 100644 index 0a0876d29a..0000000000 --- a/test/__tests__/data/kustomer_output.json +++ /dev/null @@ -1,602 +0,0 @@ -[ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.kustomerapp.com/v1/customers", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "name": "Test Rudderlabs", - "externalId": "Testc", - "username": "Testc47", - "company": "Rudderstack", - "signedUpAt": "2015-04-17T12:37:42.146Z", - "lastActivityAt": "2016-04-17T12:37:42.146Z", - "lastCustomerActivityAt": "2017-04-17T12:37:42.146Z", - "lastSeenAt": "2017-04-17T12:37:42.146Z", - "avatarUrl": "https://homepages.cae.wisc.edu/~ece533/images/boat.png", - "gender": "m", - "tags": ["happy", "satisfied"], - "locale": "en-US", - "socials": [ - { - "verified": true, - "userid": "100", - "type": "twitter", - "username": "@Testc", - "url": "http://twitter.com/Testc" - }, - { - "verified": false, - "userid": "200", - "type": "facebook", - "username": "Testc", - "url": "http://facebook.com/Testc" - } - ], - "birthdayAt": "2005-01-01T23:28:56.782Z", - "emails": [ - { - "type": "home", - "email": "test@rudderstack.com" - } - ], - "phones": [ - { - "type": "home", - "phone": "+12345578900" - } - ], - "urls": [ - { - "url": "www.mattertoast873.com" - } - ], - "locations": [ - { - "type": "home", - "address": "24 Dovers Lane Miami Florida 1890001" - } - ] - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "PUT", - "endpoint": "https://api.kustomerapp.com/v1/customers/58210c3db0f09110006b7953?replace=false", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "name": "Ano Domeni", - "externalId": "58210c3db0f09110006b7953", - "locale": "en-US", - "birthdayAt": "2005-01-01T23:28:56.782Z", - "phones": [ - { - "type": "home", - "phone": "+12345578000" - } - ] - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.kustomerapp.com/v1/tracking/identityEvent", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "identity": { - "externalId": "Testc" - }, - "event": { - "name": "Screen-Viewed-Test-Event-Screen", - "meta": { - "hasAccount": "true", - "YearSelectedNum": 1801, - "originalServing": "2021-01-25T15:32:56.409Z" - } - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.kustomerapp.com/v1/tracking/identityEvent", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "identity": { - "externalId": "user@doe" - }, - "event": { - "name": "Web-Page-Viewed-Cart-Viewed", - "meta": { - "url": "http://morkey.in", - "name": "Cart Viewed", - "path": "/cart", - "title": "miphone", - "search": "MI", - "category": "Cart", - "referrer": "morkey", - "domain": "morkey.com" - } - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.kustomerapp.com/v1/tracking/identityEvent", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "identity": { - "externalId": "user@doe" - }, - "event": { - "name": "Web-Page-Viewed", - "sessionId": "hsad522", - "trackingId": "829131sjad", - "meta": { - "url": "http://morkey.in", - "path": "/cart", - "title": "miphone", - "search": "MI", - "category": "Cart", - "referrer": "morkey", - "domain": "morkey.com" - } - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.kustomerapp.com/v1/tracking/identityEvent", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "identity": { - "externalId": "user@doe" - }, - "event": { - "name": "Tracking-Weekender", - "sessionId": "63nsa22", - "trackingId": "sahetwiac", - "meta": { - "YearServicedNum": 211, - "region": "strapis" - } - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.kustomerapp.com/v1/tracking/identityEvent", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "FORM": {}, - "JSON": { - "event": { - "meta": { - "YearServicedNum": 211, - "reg_8-821x": false - }, - "name": "Tracking-Weekender2", - "sessionId": "63nsa22", - "trackingId": "sahetwiac" - }, - "identity": { - "externalId": "user@doe" - } - }, - "XML": {}, - "JSON_ARRAY": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.kustomerapp.com/v1/tracking/identityEvent", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "identity": { - "externalId": "user@doe" - }, - "event": { - "name": "Web-Page-Viewed", - "meta": { - "url": "http://morkey.in", - "path": "/cart", - "title": "miphone", - "search": "MI", - "category": "Cart", - "referrer": "morkey", - "domain": "morkey.com" - } - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.kustomerapp.com/v1/tracking/identityEvent", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "identity": { - "externalId": "Testc" - }, - "event": { - "name": "Screen-Viewed", - "meta": { - "hasAccount": "true", - "YearSelectedNum": 1801, - "originalServing": "2021-01-25T15:32:56.409Z" - } - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.kustomerapp.com/v1/customers", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "name": "Test Rudderlabs", - "externalId": "Testc", - "username": "Testc47", - "company": "Rudderstack", - "signedUpAt": "2015-04-17T12:37:42.146Z", - "lastActivityAt": "2016-04-17T12:37:42.146Z", - "lastCustomerActivityAt": "2017-04-17T12:37:42.146Z", - "lastSeenAt": "2017-04-17T12:37:42.146Z", - "avatarUrl": "https://homepages.cae.wisc.edu/~ece533/images/boat.png", - "gender": "m", - "tags": ["happy", "satisfied"], - "locale": "en-US", - "socials": [ - { - "verified": true, - "userid": "100", - "type": "twitter", - "username": "@Testc", - "url": "http://twitter.com/Testc" - }, - { - "verified": false, - "userid": "200", - "type": "facebook", - "username": "Testc", - "url": "http://facebook.com/Testc" - } - ], - "birthdayAt": "2005-01-01T23:28:56.782Z", - "emails": [ - { - "type": "home", - "email": "test@rudderstack.com" - } - ], - "phones": [ - { - "type": "home", - "phone": "+12345578900" - } - ], - "urls": [ - { - "url": "www.mattertoast873.com" - } - ], - "locations": [ - { - "type": "home", - "address": "24 Dovers Lane Miami Florida 1890001" - } - ] - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.kustomerapp.com/v1/customers", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "name": "Test Rudderlabs", - "externalId": "Testc", - "username": "Testc47", - "company": "Rudderstack", - "signedUpAt": "2015-04-17T12:37:42.146Z", - "lastActivityAt": "2016-04-17T12:37:42.146Z", - "lastCustomerActivityAt": "2017-04-17T12:37:42.146Z", - "lastSeenAt": "2017-04-17T12:37:42.146Z", - "avatarUrl": "https://homepages.cae.wisc.edu/~ece533/images/boat.png", - "gender": "m", - "tags": ["happy", "satisfied"], - "locale": "en-US", - "socials": [ - { - "verified": true, - "userid": "100", - "type": "twitter", - "username": "@Testc", - "url": "http://twitter.com/Testc" - }, - { - "verified": false, - "userid": "200", - "type": "facebook", - "username": "Testc", - "url": "http://facebook.com/Testc" - } - ], - "birthdayAt": "2005-01-01T23:28:56.782Z", - "emails": [ - { - "type": "home", - "email": "test@rudderstack.com" - } - ], - "phones": [ - { - "type": "home", - "phone": "+12345578900" - } - ], - "urls": [ - { - "url": "www.mattertoast873.com" - } - ], - "locations": [ - { - "type": "home", - "address": "test address string" - } - ] - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "PUT", - "endpoint": "https://api.kustomerapp.com/v1/customers/abcd1234?replace=false", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "name": "Test Rudderlabs", - "externalId": "Testc", - "username": "Testc47", - "company": "Rudderstack", - "signedUpAt": "2015-04-17T12:37:42.146Z", - "lastActivityAt": "2016-04-17T12:37:42.146Z", - "lastCustomerActivityAt": "2017-04-17T12:37:42.146Z", - "lastSeenAt": "2017-04-17T12:37:42.146Z", - "avatarUrl": "https://homepages.cae.wisc.edu/~ece533/images/boat.png", - "gender": "m", - "tags": ["happy", "satisfied"], - "locale": "en-US", - "socials": [ - { - "verified": true, - "userid": "100", - "type": "twitter", - "username": "@Testc", - "url": "http://twitter.com/Testc" - }, - { - "verified": false, - "userid": "200", - "type": "facebook", - "username": "Testc", - "url": "http://facebook.com/Testc" - } - ], - "birthdayAt": "2005-01-01T23:28:56.782Z", - "emails": [ - { - "type": "home", - "email": "test@rudderstack.com" - } - ], - "phones": [ - { - "type": "home", - "phone": "+12345578900" - } - ], - "urls": [ - { - "url": "www.mattertoast873.com" - } - ], - "locations": [ - { - "type": "home", - "address": "test address string" - } - ] - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.kustomerapp.com/v1/tracking/identityEvent", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "identity": { - "externalId": "utsabc" - }, - "event": { - "name": "Screen-Viewed", - "sessionId": "hsad522", - "meta": { - "hasAccount": "true", - "YearSelectedNum": 1801 - } - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.prod2.kustomerapp.com/v1/tracking/identityEvent", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "identity": { - "externalId": "Testc" - }, - "event": { - "name": "Screen-Viewed", - "sessionId": "hsad522", - "meta": { - "hasAccount": "true", - "YearSelectedNum": 1801 - } - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - } -] diff --git a/test/__tests__/data/kustomer_router_input.json b/test/__tests__/data/kustomer_router_input.json deleted file mode 100644 index 0e4c88aa20..0000000000 --- a/test/__tests__/data/kustomer_router_input.json +++ /dev/null @@ -1,183 +0,0 @@ -[ - { - "message": { - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "testc", - "channel": "web", - "context": { - "os": { "name": "", "version": "" }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "traits": { - "name": "test Rudderlabs", - "email": "test@rudderstack.com", - "phone": "+12345578900", - "birthday": "2005-01-01T23:28:56.782Z", - "userId": "testc", - "address": { - "street": "24 Dovers Lane", - "city": "Miami", - "state": "Florida", - "postalCode": "1890001" - }, - "userName": "testc47", - "company": "Rudderstack", - "createdAt": "2015-04-17T12:37:42.146Z", - "lastActivityAt": "2016-04-17T12:37:42.146Z", - "lastCustomerActivityAt": "2017-04-17T12:37:42.146Z", - "lastSeenAt": "2017-04-17T12:37:42.146Z", - "avatar": "https://homepages.cae.wisc.edu/~ece533/images/boat.png", - "gender": "m", - "tags": ["happy", "satisfied"], - "website": "www.mattertoast873.com", - "socials": [ - { - "verified": true, - "userid": "100", - "type": "twitter", - "username": "@testc", - "url": "http://twitter.com/testc" - }, - { - "verified": false, - "userid": "200", - "type": "facebook", - "username": "testc", - "url": "http://facebook.com/testc" - } - ] - }, - "locale": "en-US", - "screen": { "density": 2 }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.1.11" }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "integrations": { "All": true }, - "originalTimestamp": "2021-01-03T17:02:53.193Z" - }, - "metadata": { - "jobId": 1 - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "genericPage": false, - "genericScreen": false - } - } - }, - { - "message": { - "type": "track", - "event": "Tracking-Weekender", - "sentAt": "2021-01-03T17:02:53.197Z", - "userId": "user@doe", - "channel": "web", - "context": { - "os": { "name": "", "version": "" }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://morkey.in", - "path": "/cart", - "title": "miphone", - "search": "MI", - "referrer": "morkey" - }, - "locale": "en-US", - "screen": { "density": 2 }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.1.11" }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "15129730-eb00-4db7-8db2-799566ccb2ef", - "properties": { - "YearServicedNum": 211, - "region": "strapis", - "kustomerTrackingId": "sahetwiac", - "kustomerSessionId": "63nsa22" - }, - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "locale": "en-US", - "integrations": { "All": true }, - "originalTimestamp": "2021-01-03T17:02:53.195Z" - }, - "metadata": { - "jobId": 2 - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "genericPage": false, - "genericScreen": false - } - } - }, - { - "message": { - "type": "track", - "event": "Tracking-Weekender", - "sentAt": "2021-01-03T17:02:53.197Z", - "userId": "user@doe", - "channel": "web", - "context": { - "os": { "name": "", "version": "" }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://morkey.in", - "path": "/cart", - "title": "miphone", - "search": "MI", - "referrer": "morkey" - }, - "locale": "en-US", - "screen": { "density": 2 }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.1.11" }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "15129730-eb00-4db7-8db2-799566ccb2ef", - "properties": { - "YearServicedNum": 211, - "region": "strapis", - "kustomerTrackingId": "sahetwiac", - "kustomerSessionId": "63nsa22" - }, - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "locale": "en-US", - "integrations": { "All": true }, - "originalTimestamp": "2021-01-03T17:02:53.195Z" - }, - "metadata": { - "jobId": 2 - }, - "destination": { - "Config": { - "baseEndpoint": "https://api.prod2.kustomerapp.com", - "apiKey": "dummyApiKey", - "genericPage": false, - "genericScreen": false - } - } - } -] diff --git a/test/__tests__/data/kustomer_router_output.json b/test/__tests__/data/kustomer_router_output.json deleted file mode 100644 index 0d3470f74a..0000000000 --- a/test/__tests__/data/kustomer_router_output.json +++ /dev/null @@ -1,184 +0,0 @@ -[ - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.kustomerapp.com/v1/customers", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "name": "test Rudderlabs", - "externalId": "testc", - "username": "testc47", - "company": "Rudderstack", - "signedUpAt": "2015-04-17T12:37:42.146Z", - "lastActivityAt": "2016-04-17T12:37:42.146Z", - "lastCustomerActivityAt": "2017-04-17T12:37:42.146Z", - "lastSeenAt": "2017-04-17T12:37:42.146Z", - "avatarUrl": "https://homepages.cae.wisc.edu/~ece533/images/boat.png", - "gender": "m", - "tags": ["happy", "satisfied"], - "locale": "en-US", - "socials": [ - { - "verified": true, - "userid": "100", - "type": "twitter", - "username": "@testc", - "url": "http://twitter.com/testc" - }, - { - "verified": false, - "userid": "200", - "type": "facebook", - "username": "testc", - "url": "http://facebook.com/testc" - } - ], - "birthdayAt": "2005-01-01T23:28:56.782Z", - "emails": [ - { - "type": "home", - "email": "test@rudderstack.com" - } - ], - "phones": [ - { - "type": "home", - "phone": "+12345578900" - } - ], - "urls": [ - { - "url": "www.mattertoast873.com" - } - ], - "locations": [ - { - "type": "home", - "address": "24 Dovers Lane Miami Florida 1890001" - } - ] - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "jobId": 1 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "genericPage": false, - "genericScreen": false - } - } - }, - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.kustomerapp.com/v1/tracking/identityEvent", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "identity": { - "externalId": "user@doe" - }, - "event": { - "name": "Tracking-Weekender", - "sessionId": "63nsa22", - "trackingId": "sahetwiac", - "meta": { - "YearServicedNum": 211, - "region": "strapis" - } - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "jobId": 2 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "genericPage": false, - "genericScreen": false - } - } - }, - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.prod2.kustomerapp.com/v1/tracking/identityEvent", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "identity": { - "externalId": "user@doe" - }, - "event": { - "name": "Tracking-Weekender", - "sessionId": "63nsa22", - "trackingId": "sahetwiac", - "meta": { - "YearServicedNum": 211, - "region": "strapis" - } - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "jobId": 2 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "baseEndpoint": "https://api.prod2.kustomerapp.com", - "apiKey": "dummyApiKey", - "genericPage": false, - "genericScreen": false - } - } - } -] diff --git a/test/__tests__/data/mailchimp_batch_input.json b/test/__tests__/data/mailchimp_batch_input.json deleted file mode 100644 index ea382b1d89..0000000000 --- a/test/__tests__/data/mailchimp_batch_input.json +++ /dev/null @@ -1,225 +0,0 @@ -[ - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "apiKey-dummyApiKey", - "audienceId": "1232yyqw22", - "datacenterId": "us20" - }, - "Enabled": true, - "Transformations": [] - }, - "metadata": { - "jobId": 2 - }, - "message": { - "anonymousId": "userId12345", - "channel": "web", - "context": { - "mappedToDestination": true, - "externalId": [ - { - "identifierType": "email_address", - "id": "bob.dole@initech.com", - "type": "audience" - } - ], - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36" - }, - "integrations": { - "All": true - }, - "traits": { - "merge_fields": { - "FIRSTNAME": "Bob" - }, - "status": "subscribed" - }, - "messageId": "21e475b2-3694-477b-afb6-5b94a81aac21", - "originalTimestamp": "2019-11-15T10:22:32Z", - "receivedAt": "2019-11-15T15:52:37+05:30", - "request_ip": "[::1]:62921", - "sentAt": "2019-11-15T10:22:37Z", - "source_id": "1TdhTcwsUVOeEMWyPUpQIgF3pYr", - "timestamp": "2019-11-15T15:52:32+05:30", - "type": "identify", - "userId": "userId12345" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "apiKey-dummyApiKey", - "audienceId": "1232yyqw22", - "datacenterId": "us20" - }, - "Enabled": true, - "Transformations": [] - }, - "metadata": { - "jobId": 3 - }, - "message": { - "type": "identify", - "traits": { - "status": "subscribed" - }, - "userId": "emrichardson820+22822@gmail.com", - "channel": "sources", - "context": { - "sources": { - "job_id": "24c5HJxHomh6YCngEOCgjS5r1KX/Syncher", - "task_id": "vw_rs_mailchimp_mocked_hg_data", - "version": "v1.8.1", - "batch_id": "f252c69d-c40d-450e-bcd2-2cf26cb62762", - "job_run_id": "c8el40l6e87v0c4hkbl0", - "task_run_id": "c8el40l6e87v0c4hkblg" - }, - "externalId": [ - { - "id": "emrichardson820+22822@gmail.com", - "type": "MAILCHIMP-92e1f1ad2c", - "identifierType": "email_address" - } - ], - "mappedToDestination": "true" - }, - "recordId": "1", - "rudderId": "4d5d0ed0-9db8-41cc-9bb0-a032f6bfa97a", - "messageId": "b3bee036-fc26-4f6d-9867-c17f85708a82" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "apiKey-dummyApiKey", - "audienceId": "1232yyqw22", - "datacenterId": "us20" - }, - "Enabled": true, - "Transformations": [] - }, - "metadata": { - "jobId": 4 - }, - "message": { - "type": "identify", - "traits": { - "status": "subscribed" - }, - "userId": "emrichardson820+22822@gmail.com", - "channel": "sources", - "context": { - "sources": { - "job_id": "24c5HJxHomh6YCngEOCgjS5r1KX/Syncher", - "task_id": "vw_rs_mailchimp_mocked_hg_data", - "version": "v1.8.1", - "batch_id": "f252c69d-c40d-450e-bcd2-2cf26cb62762", - "job_run_id": "c8el40l6e87v0c4hkbl0", - "task_run_id": "c8el40l6e87v0c4hkblg" - }, - "externalId": [ - { - "id": "emrichardson820+22822@gmail.com", - "type": "MAILCHIMP-92e1f1ad2c", - "identifierType": "email_address" - } - ], - "mappedToDestination": "true" - }, - "recordId": "1", - "rudderId": "4d5d0ed0-9db8-41cc-9bb0-a032f6bfa97a", - "messageId": "b3bee036-fc26-4f6d-9867-c17f85708a82" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "apiKey-dummyApiKey", - "audienceId": "1232yyqw22", - "datacenterId": "us20" - }, - "Enabled": true, - "Transformations": [] - }, - "metadata": { - "jobId": 5 - }, - "message": { - "type": "identify", - "traits": { - "status": "subscrib" - }, - "userId": "emrichardson820+22822@gmail.com", - "channel": "sources", - "context": { - "sources": { - "job_id": "24c5HJxHomh6YCngEOCgjS5r1KX/Syncher", - "task_id": "vw_rs_mailchimp_mocked_hg_data", - "version": "v1.8.1", - "batch_id": "f252c69d-c40d-450e-bcd2-2cf26cb62762", - "job_run_id": "c8el40l6e87v0c4hkbl0", - "task_run_id": "c8el40l6e87v0c4hkblg" - }, - "externalId": [ - { - "id": "emrichardson820+22822@gmail.com", - "type": "MAILCHIMP-92e1f1ad2c", - "identifierType": "email_address" - } - ], - "mappedToDestination": "true" - }, - "recordId": "1", - "rudderId": "4d5d0ed0-9db8-41cc-9bb0-a032f6bfa97a", - "messageId": "b3bee036-fc26-4f6d-9867-c17f85708a82" - } - } -] diff --git a/test/__tests__/data/mailchimp_batch_output.json b/test/__tests__/data/mailchimp_batch_output.json deleted file mode 100644 index fac07b6a46..0000000000 --- a/test/__tests__/data/mailchimp_batch_output.json +++ /dev/null @@ -1,100 +0,0 @@ -[ - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://us20.api.mailchimp.com/3.0/lists/1232yyqw22?skip_merge_validation=false&skip_duplicate_check=false", - "headers": { - "Content-Type": "application/json", - "Authorization": "Basic YXBpS2V5OmFwaUtleS1kdW1teUFwaUtleQ==" - }, - "params": {}, - "body": { - "JSON": { - "members": [ - { - "merge_fields": { - "FIRSTNAME": "Bob" - }, - "status": "subscribed", - "email_address": "bob.dole@initech.com" - }, - { - "status": "subscribed", - "email_address": "emrichardson820+22822@gmail.com" - }, - { - "status": "subscribed", - "email_address": "emrichardson820+22822@gmail.com" - } - ], - "update_existing": true - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "jobId": 2 - }, - { - "jobId": 3 - }, - { - "jobId": 4 - } - ], - "batched": true, - "statusCode": 200, - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "apiKey-dummyApiKey", - "audienceId": "1232yyqw22", - "datacenterId": "us20" - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "apiKey-dummyApiKey", - "audienceId": "1232yyqw22", - "datacenterId": "us20" - }, - "Enabled": true, - "Transformations": [] - }, - "metadata": [ - { - "jobId": 5 - } - ], - "batched": false, - "statusCode": 400, - "error": "The status must be one of [subscribed, unsubscribed, cleaned, pending, transactional]", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation" - } - } -] diff --git a/test/__tests__/data/mailchimp_input.json b/test/__tests__/data/mailchimp_input.json deleted file mode 100644 index 20b7ba0fc0..0000000000 --- a/test/__tests__/data/mailchimp_input.json +++ /dev/null @@ -1,1299 +0,0 @@ -[ - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "dummyApiKey", - "audienceId": "aud111", - "datacenterId": "usXX", - "enableMergeFields": true - }, - "Enabled": true, - "Transformations": [] - }, - "message": { - "anonymousId": "userId12345", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "anonymousId": "userId12345", - "email": "bob.dole@initech.com", - "firstName": "Bob", - "lastName": "Dole", - "zip": "123", - "state": "test", - "city": "test", - "addressLine1": "test", - "birthday": "2000-05-06" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36" - }, - "integrations": { - "All": true - }, - "messageId": "21e475b2-3694-477b-afb6-5b94a81aac21", - "originalTimestamp": "2019-11-15T10:22:32Z", - "receivedAt": "2019-11-15T15:52:37+05:30", - "request_ip": "[::1]:62921", - "sentAt": "2019-11-15T10:22:37Z", - "source_id": "1TdhTcwsUVOeEMWyPUpQIgF3pYr", - "timestamp": "2019-11-15T15:52:32+05:30", - "type": "identify", - "userId": "userId12345" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "dummyApiKey", - "audienceId": "aud111", - "datacenterId": "usXX", - "enableMergeFields": true - }, - "Enabled": true, - "Transformations": [] - }, - "message": { - "anonymousId": "userId12345", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "anonymousId": "userId12345", - "email": "bob.dole@initech.com" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36" - }, - "integrations": { - "MailChimp": { - "subscriptionStatus": "subscribed" - } - }, - "messageId": "6d1f3ca8-e2d0-4d34-9926-44596171af0c", - "originalTimestamp": "2019-11-15T10:26:53Z", - "receivedAt": "2019-11-15T15:56:58+05:30", - "request_ip": "[::1]:62921", - "sentAt": "2019-11-15T10:26:58Z", - "source_id": "1TdhTcwsUVOeEMWyPUpQIgF3pYr", - "timestamp": "2019-11-15T15:56:53+05:30", - "type": "identify", - "userId": "userId12345" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "Titli Test", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "apiKey-dummyApiKey", - "audienceId": "aud111", - "datacenterId": "usXX" - }, - "Enabled": true, - "Transformations": [] - }, - "message": { - "type": "identify", - "sentAt": "2021-05-18T06:58:57.186Z", - "userId": "test.rudderlabs@yara.com", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.18", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "https://app.rudderstack.com/sources/1qHR2Qzd894ievNGc4aBHmjltLD", - "path": "/sources/1qHR2Qzd894ievNGc4aBHmjltLD", - "title": "RudderStack", - "search": "", - "tab_url": "https://app.rudderstack.com/sources/1qHR2Qzd894ievNGc4aBHmjltLD", - "referrer": "$direct", - "initial_referrer": "https://www.google.com/", - "referring_domain": "", - "initial_referring_domain": "www.google.com" - }, - "locale": "en-US", - "screen": { - "width": 1792, - "height": 1120, - "density": 2 - }, - "traits": { - "name": "test rudderlabs", - "email": "test.rudderlabs@yara.com", - "userId": "1sWVaQTxoVwjvShC0295E6OqMaP", - "first_login": false, - "workspaceId": "1jWrHYPjNGSHbvKwzow0ZFPIQll", - "account_type": "invited" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.18" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36" - }, - "rudderId": "6d612dda-9c8c-4062-9d09-af9425b846ce", - "messageId": "c6d49688-89f2-45cf-b061-0ae3c212a4e5", - "timestamp": "2021-05-18T06:58:57.811Z", - "receivedAt": "2021-05-18T06:58:57.812Z", - "request_ip": "122.172.221.51", - "anonymousId": "6914679f-fd34-45ef-86e0-4930e6e8b91a", - "integrations": { - "Salesforce": true - }, - "originalTimestamp": "2021-05-18T06:58:57.185Z" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "Titli Test", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "dummyApiKey", - "audienceId": "aud111", - "datacenterId": "usXX" - }, - "Enabled": true, - "Transformations": [] - }, - "message": { - "type": "page", - "sentAt": "2021-05-18T07:02:17.675Z", - "userId": "", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.18", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "https://app.rudderstack.com/signup?type=freetrial", - "path": "/signup", - "title": "", - "search": "?type=freetrial", - "tab_url": "https://app.rudderstack.com/signup?type=freetrial", - "referrer": "https://rudderstack.medium.com/kafka-vs-postgresql-how-we-implemented-our-queueing-system-using-postgresql-ec128650e3e", - "initial_referrer": "https://rudderstack.medium.com/kafka-vs-postgresql-how-we-implemented-our-queueing-system-using-postgresql-ec128650e3e", - "referring_domain": "rudderstack.medium.com", - "initial_referring_domain": "rudderstack.medium.com" - }, - "locale": "en-GB", - "screen": { - "density": 2 - }, - "traits": {}, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.18" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36" - }, - "rudderId": "4dbe224c-6aea-4d89-8da6-09d27c0d2908", - "messageId": "72df8cb0-54ab-417c-8e87-e97e9d339feb", - "timestamp": "2021-05-18T07:02:18.566Z", - "properties": { - "url": "https://app.rudderstack.com/signup?type=freetrial", - "path": "/signup", - "title": "", - "search": "?type=freetrial", - "tab_url": "https://app.rudderstack.com/signup?type=freetrial", - "referrer": "https://rudderstack.medium.com/kafka-vs-postgresql-how-we-implemented-our-queueing-system-using-postgresql-ec128650e3e", - "initial_referrer": "https://rudderstack.medium.com/kafka-vs-postgresql-how-we-implemented-our-queueing-system-using-postgresql-ec128650e3e", - "referring_domain": "rudderstack.medium.com", - "initial_referring_domain": "rudderstack.medium.com" - }, - "receivedAt": "2021-05-18T07:02:18.566Z", - "request_ip": "162.44.150.11", - "anonymousId": "58ec7b39-48f1-4d83-9d45-a48c64f96fa0", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-05-18T07:02:17.675Z" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "dummyApiKey", - "audienceId": "aud111", - "datacenterId": "usXX" - }, - "Enabled": true, - "Transformations": [] - }, - "message": { - "anonymousId": "userId12345", - "channel": "web", - "context": { - "mappedToDestination": true, - "externalId": [ - { - "identifierType": "email_address", - "id": "bob.dole@initech.com", - "type": "audience" - } - ], - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36" - }, - "integrations": { - "All": true - }, - "traits": { - "merge_fields": { - "FIRSTNAME": "Bob" - }, - "status": "subscribed" - }, - "messageId": "21e475b2-3694-477b-afb6-5b94a81aac21", - "originalTimestamp": "2019-11-15T10:22:32Z", - "receivedAt": "2019-11-15T15:52:37+05:30", - "request_ip": "[::1]:62921", - "sentAt": "2019-11-15T10:22:37Z", - "source_id": "1TdhTcwsUVOeEMWyPUpQIgF3pYr", - "timestamp": "2019-11-15T15:52:32+05:30", - "type": "identify", - "userId": "userId12345" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "dummyApiKey", - "audienceId": "aud111", - "datacenterId": "usXX" - }, - "Enabled": true, - "Transformations": [] - }, - "message": { - "type": "identify", - "traits": { - "status": "subscri" - }, - "userId": "emrichardson820+22822@gmail.com", - "channel": "sources", - "context": { - "sources": { - "job_id": "24c5HJxHomh6YCngEOCgjS5r1KX/Syncher", - "task_id": "vw_rs_mailchimp_mocked_hg_data", - "version": "v1.8.1", - "batch_id": "f252c69d-c40d-450e-bcd2-2cf26cb62762", - "job_run_id": "c8el40l6e87v0c4hkbl0", - "task_run_id": "c8el40l6e87v0c4hkblg" - }, - "externalId": [ - { - "id": "emrichardson820+22822@gmail.com", - "type": "MAILCHIMP-92e1f1ad2c", - "identifierType": "email_address" - } - ], - "mappedToDestination": "true" - }, - "recordId": "1", - "rudderId": "4d5d0ed0-9db8-41cc-9bb0-a032f6bfa97a", - "messageId": "b3bee036-fc26-4f6d-9867-c17f85708a82" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "dummyApiKey", - "audienceId": "aud111", - "datacenterId": "usXX" - }, - "Enabled": true, - "Transformations": [] - }, - "message": { - "anonymousId": "userId12345", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36" - }, - "integrations": { - "All": true - }, - "messageId": "21e475b2-3694-477b-afb6-5b94a81aac21", - "originalTimestamp": "2019-11-15T10:22:32Z", - "receivedAt": "2019-11-15T15:52:37+05:30", - "request_ip": "[::1]:62921", - "sentAt": "2019-11-15T10:22:37Z", - "source_id": "1TdhTcwsUVOeEMWyPUpQIgF3pYr", - "timestamp": "2019-11-15T15:52:32+05:30", - "type": "identify", - "userId": "userId12345" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "dummyApiKey", - "audienceId": "aud112", - "datacenterId": "usXX" - }, - "Enabled": true, - "Transformations": [] - }, - "message": { - "anonymousId": "userId12345", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "email": "jhon@gmail.com" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36" - }, - "integrations": { - "All": true - }, - "messageId": "21e475b2-3694-477b-afb6-5b94a81aac21", - "originalTimestamp": "2019-11-15T10:22:32Z", - "receivedAt": "2019-11-15T15:52:37+05:30", - "request_ip": "[::1]:62921", - "sentAt": "2019-11-15T10:22:37Z", - "source_id": "1TdhTcwsUVOeEMWyPUpQIgF3pYr", - "timestamp": "2019-11-15T15:52:32+05:30", - "type": "identify", - "userId": "userId12345" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "dummyApiKey", - "audienceId": "aud111", - "datacenterId": "usXX" - }, - "Enabled": true, - "Transformations": [] - }, - "message": { - "anonymousId": "userId12345", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "email": "bob.dole@initech.com" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36" - }, - "integrations": { - "All": true - }, - "messageId": "21e475b2-3694-477b-afb6-5b94a81aac21", - "originalTimestamp": "2019-11-15T10:22:32Z", - "receivedAt": "2019-11-15T15:52:37+05:30", - "request_ip": "[::1]:62921", - "sentAt": "2019-11-15T10:22:37Z", - "source_id": "1TdhTcwsUVOeEMWyPUpQIgF3pYr", - "timestamp": "2019-11-15T15:52:32+05:30", - "type": "identify", - "userId": "userId12345" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "dummyApiKey", - "audienceId": "aud111", - "datacenterId": "usXX" - }, - "Enabled": true, - "Transformations": [] - }, - "message": { - "anonymousId": "userId12345", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "anonymousId": "userId12345", - "email": "bob.dole@initech.com" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36" - }, - "integrations": { - "MailChimp": { - "subscriptionStatus": "subscribed" - } - }, - "messageId": "6d1f3ca8-e2d0-4d34-9926-44596171af0c", - "originalTimestamp": "2019-11-15T10:26:53Z", - "receivedAt": "2019-11-15T15:56:58+05:30", - "request_ip": "[::1]:62921", - "sentAt": "2019-11-15T10:26:58Z", - "source_id": "1TdhTcwsUVOeEMWyPUpQIgF3pYr", - "timestamp": "2019-11-15T15:56:53+05:30", - "type": "identify", - "userId": "userId12345" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "", - "audienceId": "aud111", - "datacenterId": "usXX" - }, - "Enabled": true, - "Transformations": [] - }, - "message": { - "anonymousId": "userId12345", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "anonymousId": "test-rudderlabs", - "email": "test-rudderlabs-test@initech.com", - "firstName": "Test", - "lastName": "Rudderlabs" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36" - }, - "integrations": { - "All": true - }, - "messageId": "21e475b2-3694-477b-afb6-5b94a81aac21", - "originalTimestamp": "2019-11-15T10:22:32Z", - "receivedAt": "2019-11-15T15:52:37+05:30", - "request_ip": "[::1]:62921", - "sentAt": "2019-11-15T10:22:37Z", - "source_id": "1TdhTcwsUVOeEMWyPUpQIgF3pYr", - "timestamp": "2019-11-15T15:52:32+05:30", - "type": "identify", - "userId": "userId12345" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "dummyApiKey", - "datacenterId": "usXX" - }, - "Enabled": true, - "Transformations": [] - }, - "message": { - "anonymousId": "userId12345", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "anonymousId": "test-rudderlabs", - "email": "test-rudderlabs-test@initech.com", - "firstName": "Test", - "lastName": "Rudderlabs" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36" - }, - "integrations": { - "All": true - }, - "messageId": "21e475b2-3694-477b-afb6-5b94a81aac21", - "originalTimestamp": "2019-11-15T10:22:32Z", - "receivedAt": "2019-11-15T15:52:37+05:30", - "request_ip": "[::1]:62921", - "sentAt": "2019-11-15T10:22:37Z", - "source_id": "1TdhTcwsUVOeEMWyPUpQIgF3pYr", - "timestamp": "2019-11-15T15:52:32+05:30", - "type": "identify", - "userId": "userId12345" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "dummyApiKey", - "audienceId": "aud111", - "datacenterId": "" - }, - "Enabled": true, - "Transformations": [] - }, - "message": { - "anonymousId": "userId12345", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "anonymousId": "test-rudderlabs", - "email": "test-rudderlabs-test@initech.com", - "firstName": "Test", - "lastName": "Rudderlabs" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36" - }, - "integrations": { - "All": true - }, - "messageId": "21e475b2-3694-477b-afb6-5b94a81aac21", - "originalTimestamp": "2019-11-15T10:22:32Z", - "receivedAt": "2019-11-15T15:52:37+05:30", - "request_ip": "[::1]:62921", - "sentAt": "2019-11-15T10:22:37Z", - "source_id": "1TdhTcwsUVOeEMWyPUpQIgF3pYr", - "timestamp": "2019-11-15T15:52:32+05:30", - "type": "identify", - "userId": "userId12345" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "dummyApiKey", - "audienceId": "aud111", - "datacenterId": "usXX" - }, - "Enabled": true, - "Transformations": [] - }, - "message": { - "anonymousId": "userId12345", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "anonymousId": "test-rudderlabs", - "email": "test-rudderlabs-test@initech.com", - "firstName": "Test", - "lastName": "Rudderlabs" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36" - }, - "integrations": { - "All": true - }, - "messageId": "21e475b2-3694-477b-afb6-5b94a81aac21", - "originalTimestamp": "2019-11-15T10:22:32Z", - "receivedAt": "2019-11-15T15:52:37+05:30", - "request_ip": "[::1]:62921", - "sentAt": "2019-11-15T10:22:37Z", - "source_id": "1TdhTcwsUVOeEMWyPUpQIgF3pYr", - "timestamp": "2019-11-15T15:52:32+05:30", - "type": "group", - "userId": "userId12345" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "dummyApiKey", - "audienceId": "aud111", - "datacenterId": "usXX" - }, - "Enabled": true, - "Transformations": [] - }, - "message": { - "anonymousId": "userId12345", - "channel": "web", - "context": { - "traits": { - "anonymousId": "userId12345", - "email": "bob.dole@initech.com" - } - }, - "properties": { - "brand": "Aster", - "product": "Garments" - }, - "messageId": "6d1f3ca8-e2d0-4d34-9926-44596171af0c", - "originalTimestamp": "2019-11-15T10:26:53Z", - "receivedAt": "2019-11-15T15:56:58+05:30", - "sentAt": "2019-11-15T10:26:58Z", - "source_id": "1TdhTcwsUVOeEMWyPUpQIgF3pYr", - "timestamp": "2019-11-15T15:56:53+05:30", - "type": "track", - "event": "local testing", - "userId": "userId12345" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "dummyApiKey", - "audienceId": "aud111", - "datacenterId": "usXX" - }, - "Enabled": true, - "Transformations": [] - }, - "message": { - "anonymousId": "userId12345", - "channel": "web", - "context": { - "traits": { - "anonymousId": "userId12345", - "email": "bob.dole@initech.com" - } - }, - "properties": { - "brand": "Aster", - "product": "Garments", - "isSyncing": false - }, - "messageId": "6d1f3ca8-e2d0-4d34-9926-44596171af0c", - "originalTimestamp": "2019-11-15T10:26:53Z", - "receivedAt": "2019-11-15T15:56:58+05:30", - "sentAt": "2019-11-15T10:26:58Z", - "source_id": "1TdhTcwsUVOeEMWyPUpQIgF3pYr", - "timestamp": "2019-11-15T15:56:53+05:30", - "type": "track", - "event": "local testing", - "userId": "userId12345" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "dummyApiKey", - "audienceId": "aud111", - "datacenterId": "usXX" - }, - "Enabled": true, - "Transformations": [] - }, - "message": { - "anonymousId": "userId12345", - "channel": "web", - "context": { - "traits": { - "anonymousId": "userId12345" - } - }, - "messageId": "6d1f3ca8-e2d0-4d34-9926-44596171af0c", - "originalTimestamp": "2019-11-15T10:26:53Z", - "receivedAt": "2019-11-15T15:56:58+05:30", - "sentAt": "2019-11-15T10:26:58Z", - "source_id": "1TdhTcwsUVOeEMWyPUpQIgF3pYr", - "timestamp": "2019-11-15T15:56:53+05:30", - "type": "track", - "event": "local testing", - "userId": "userId12345" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "dummyApiKey", - "audienceId": "aud111", - "datacenterId": "usXX" - }, - "Enabled": true, - "Transformations": [] - }, - "message": { - "anonymousId": "userId12345", - "channel": "web", - "context": { - "traits": { - "anonymousId": "userId12345", - "email": "bob.dole@initech.com" - } - }, - "properties": { - "brand": "Aster", - "product": "Garments", - "isSyncing": false - }, - "messageId": "6d1f3ca8-e2d0-4d34-9926-44596171af0c", - "originalTimestamp": "2019-11-15T10:26:53Z", - "receivedAt": "2019-11-15T15:56:58+05:30", - "sentAt": "2019-11-15T10:26:58Z", - "source_id": "1TdhTcwsUVOeEMWyPUpQIgF3pYr", - "timestamp": "2019-11-15T15:56:53+05:30", - "type": "track", - "userId": "userId12345" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "dummyApiKey", - "audienceId": "aud111", - "datacenterId": "usXX" - }, - "Enabled": true, - "Transformations": [] - }, - "message": { - "anonymousId": "userId12345", - "channel": "web", - "context": { - "traits": { - "anonymousId": "userId12345", - "email": "bob.dole@initech.com" - } - }, - "messageId": "6d1f3ca8-e2d0-4d34-9926-44596171af0c", - "originalTimestamp": "2019-11-15T10:26:53Z", - "receivedAt": "2019-11-15T15:56:58+05:30", - "sentAt": "2019-11-15T10:26:58Z", - "source_id": "1TdhTcwsUVOeEMWyPUpQIgF3pYr", - "timestamp": "2019-11-15T15:56:53+05:30", - "type": "track", - "event": "local testing", - "userId": "userId12345" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "dummyApiKey", - "audienceId": "aud111", - "datacenterId": "usXX" - }, - "Enabled": true, - "Transformations": [] - }, - "message": { - "anonymousId": "userId12345", - "channel": "web", - "context": { - "traits": { - "anonymousId": "userId12345", - "email": "bob.dole@initech.com" - } - }, - "properties": { - "brand": "Aster", - "product": "Garments", - "isSyncing": false, - "products": [ - { - "product_id": "123", - "price": "14" - }, - { - "product_id": "123", - "price": 14 - } - ], - "purchased": false - }, - "messageId": "6d1f3ca8-e2d0-4d34-9926-44596171af0c", - "originalTimestamp": "2019-11-15T10:26:53Z", - "receivedAt": "2019-11-15T15:56:58+05:30", - "sentAt": "2019-11-15T10:26:58Z", - "source_id": "1TdhTcwsUVOeEMWyPUpQIgF3pYr", - "timestamp": "2019-11-15T15:56:53+05:30", - "type": "track", - "event": "local testing", - "userId": "userId12345" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "dummyApiKey", - "audienceId": "aud111", - "datacenterId": "usXX" - }, - "Enabled": true, - "Transformations": [] - }, - "message": { - "anonymousId": "userId12345", - "channel": "web", - "context": { - "traits": { - "anonymousId": "userId12345", - "email": "bob.dole@initech.com" - } - }, - "properties": { - "brand": "Aster", - "product": "Garments", - "isSyncing": false, - "products": [ - { - "product_id": "123", - "price": "14" - }, - { - "product_id": "123", - "price": 14 - } - ], - "purchased": false - }, - "messageId": "6d1f3ca8-e2d0-4d34-9926-44596171af0c", - "originalTimestamp": "2019-11-15T10:26:53Z", - "receivedAt": "2019-11-15T15:56:58+05:30", - "sentAt": "2019-11-15T10:26:58Z", - "source_id": "1TdhTcwsUVOeEMWyPUpQIgF3pYr", - "timestamp": "2019-11-15T15:56:53+05:30", - "type": "track", - "event": 22, - "userId": "userId12345" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "dummyApiKey", - "audienceId": "aud111", - "datacenterId": "usXX" - }, - "Enabled": true, - "Transformations": [] - }, - "message": { - "anonymousId": "userId12345", - "channel": "web", - "context": { - "traits": { - "anonymousId": "userId12345", - "email": "bob.dole@initech.com" - } - }, - "properties": { - "brand": "Aster", - "product": "Garments", - "isSyncing": false, - "products": [ - { - "product_id": "123", - "price": "14" - }, - { - "product_id": "123", - "price": 14 - } - ], - "purchased": false - }, - "messageId": "6d1f3ca8-e2d0-4d34-9926-44596171af0c", - "originalTimestamp": "2019-11-15T10:26:53Z", - "receivedAt": "2019-11-15T15:56:58+05:30", - "sentAt": "2019-11-15T10:26:58Z", - "source_id": "1TdhTcwsUVOeEMWyPUpQIgF3pYr", - "timestamp": "2019-11-15T15:56:53+05:30", - "type": "track", - "event": "E", - "userId": "userId12345" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "dummyApiKey", - "audienceId": "aud111", - "datacenterId": "usXX" - }, - "Enabled": true, - "Transformations": [] - }, - "message": { - "anonymousId": "userId12345", - "channel": "web", - "context": { - "traits": { - "anonymousId": "userId12345", - "email": "bob.dole@initech.com" - } - }, - "properties": { - "brand": "Aster", - "product": "Garments", - "isSyncing": false, - "products": [ - { - "product_id": "123", - "price": "14" - }, - { - "product_id": "123", - "price": 14 - } - ], - "purchased": false - }, - "messageId": "6d1f3ca8-e2d0-4d34-9926-44596171af0c", - "originalTimestamp": "2019-11-15T10:26:53Z", - "receivedAt": "2019-11-15T15:56:58+05:30", - "sentAt": "2019-11-15T10:26:58Z", - "source_id": "1TdhTcwsUVOeEMWyPUpQIgF3pYr", - "timestamp": "2019-11-15T15:56:53+05:30", - "type": "track", - "event": "Event Name more than 30 characters abcdefghijklmno", - "userId": "userId12345" - } - } -] diff --git a/test/__tests__/data/mailchimp_output.json b/test/__tests__/data/mailchimp_output.json deleted file mode 100644 index e1a8384242..0000000000 --- a/test/__tests__/data/mailchimp_output.json +++ /dev/null @@ -1,498 +0,0 @@ -[ - { - "version": "1", - "type": "REST", - "method": "PUT", - "endpoint": "https://usXX.api.mailchimp.com/3.0/lists/aud111/members/48cd6232dc124497369f59c33d3eb4ab", - "headers": { - "Content-Type": "application/json", - "Authorization": "Basic YXBpS2V5OmR1bW15QXBpS2V5" - }, - "params": {}, - "body": { - "JSON": { - "merge_fields": { - "ADDRESS": { - "addr1": "test", - "city": "test", - "state": "test", - "zip": "123" - }, - "FNAME": "Bob", - "LNAME": "Dole", - "ANONYMOUSI": "userId12345", - "BIRTHDAY": "05/06" - }, - "email_address": "bob.dole@initech.com", - "status": "subscribed" - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "audienceId": "aud111" - }, - { - "version": "1", - "type": "REST", - "method": "PUT", - "endpoint": "https://usXX.api.mailchimp.com/3.0/lists/aud111/members/48cd6232dc124497369f59c33d3eb4ab", - "headers": { - "Content-Type": "application/json", - "Authorization": "Basic YXBpS2V5OmR1bW15QXBpS2V5" - }, - "params": {}, - "body": { - "JSON": { - "status": "subscribed", - "email_address": "bob.dole@initech.com", - "merge_fields": { - "ANONYMOUSI": "userId12345" - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "audienceId": "aud111" - }, - { - "error": "User does not have access to the requested operation", - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "Titli Test", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "apiKey-dummyApiKey", - "audienceId": "aud111", - "datacenterId": "usXX" - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "Titli Test", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "apiKey", - "audienceId": "aud111", - "datacenterId": "usXX" - }, - "Enabled": true, - "Transformations": [] - }, - "error": "message type page is not supported" - }, - { - "version": "1", - "type": "REST", - "method": "PUT", - "endpoint": "https://usXX.api.mailchimp.com/3.0/lists/aud111/members/48cd6232dc124497369f59c33d3eb4ab", - "headers": { - "Content-Type": "application/json", - "Authorization": "Basic YXBpS2V5OmR1bW15QXBpS2V5" - }, - "params": {}, - "body": { - "JSON": { - "merge_fields": { - "FIRSTNAME": "Bob" - }, - "status": "subscribed", - "email_address": "bob.dole@initech.com" - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "audienceId": "aud111" - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "94f71917d8522770c97449b0c90caa4c-usXX", - "audienceId": "aud111", - "datacenterId": "usXX" - }, - "Enabled": true, - "Transformations": [] - }, - "error": "The status must be one of [subscribed, unsubscribed, cleaned, pending, transactional]" - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "dummyApiKey", - "audienceId": "ff21810ddc", - "datacenterId": "us14" - }, - "Enabled": true, - "Transformations": [] - }, - "statusCode": 400, - "error": "Email is required for identify", - "statTags": { - "destination": "mailchimp", - "stage": "transform", - "scope": "exception" - } - }, - { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "status": "subscribed", - "email_address": "jhon@gmail.com" - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "PUT", - "params": {}, - "headers": { - "Content-Type": "application/json", - "Authorization": "Basic YXBpS2V5OmR1bW15QXBpS2V5" - }, - "audienceId": "aud112", - "version": "1", - "endpoint": "https://usXX.api.mailchimp.com/3.0/lists/aud112/members/7f3863b197eeff650876bb89eca08e57" - }, - { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "email_address": "bob.dole@initech.com", - "status": "subscribed" - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "PUT", - "params": {}, - "audienceId": "aud111", - "headers": { - "Content-Type": "application/json", - "Authorization": "Basic YXBpS2V5OmR1bW15QXBpS2V5" - }, - "version": "1", - "endpoint": "https://usXX.api.mailchimp.com/3.0/lists/aud111/members/48cd6232dc124497369f59c33d3eb4ab" - }, - { - "version": "1", - "type": "REST", - "method": "PUT", - "endpoint": "https://usXX.api.mailchimp.com/3.0/lists/aud111/members/48cd6232dc124497369f59c33d3eb4ab", - "headers": { - "Content-Type": "application/json", - "Authorization": "Basic YXBpS2V5OmR1bW15QXBpS2V5" - }, - "params": {}, - "body": { - "JSON": { - "status": "subscribed", - "email_address": "bob.dole@initech.com" - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "audienceId": "aud111" - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "", - "audienceId": "aud111", - "datacenterId": "usXX" - }, - "Enabled": true, - "Transformations": [] - }, - "error": "API Key not found. Aborting" - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "awesrdcfgvhbjnkkjhgf", - "datacenterId": "usXX" - }, - "Enabled": true, - "Transformations": [] - }, - "error": "Audience Id not found. Aborting" - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "dummyApiKey", - "audienceId": "aud111", - "datacenterId": "" - }, - "Enabled": true, - "Transformations": [] - }, - "error": "DataCenter Id not found. Aborting" - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "zesrxdthfcjg345yruikyhntbgrafvd", - "audienceId": "aud111", - "datacenterId": "usXX" - }, - "Enabled": true, - "Transformations": [] - }, - "error": "message type group is not supported" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://usXX.api.mailchimp.com/3.0/lists/aud111/members/48cd6232dc124497369f59c33d3eb4ab/events", - "headers": { - "Content-Type": "application/json", - "Authorization": "Basic YXBpS2V5OmR1bW15QXBpS2V5" - }, - "params": {}, - "body": { - "JSON": { - "name": "local_testing", - "occurred_at": "2019-11-15T10:26:53+00:00", - "properties": { - "brand": "Aster", - "product": "Garments" - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "audienceId": "aud111" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://usXX.api.mailchimp.com/3.0/lists/aud111/members/48cd6232dc124497369f59c33d3eb4ab/events", - "headers": { - "Content-Type": "application/json", - "Authorization": "Basic YXBpS2V5OmR1bW15QXBpS2V5" - }, - "params": {}, - "body": { - "JSON": { - "name": "local_testing", - "occurred_at": "2019-11-15T10:26:53+00:00", - "is_syncing": false, - "properties": { - "brand": "Aster", - "product": "Garments" - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "audienceId": "aud111" - }, - { - "error": "Email is required for track" - }, - { - "error": "Missing required value from \"event\"" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://usXX.api.mailchimp.com/3.0/lists/aud111/members/48cd6232dc124497369f59c33d3eb4ab/events", - "headers": { - "Content-Type": "application/json", - "Authorization": "Basic YXBpS2V5OmR1bW15QXBpS2V5" - }, - "params": {}, - "body": { - "JSON": { - "name": "local_testing", - "occurred_at": "2019-11-15T10:26:53+00:00" - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "audienceId": "aud111" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://usXX.api.mailchimp.com/3.0/lists/aud111/members/48cd6232dc124497369f59c33d3eb4ab/events", - "headers": { - "Content-Type": "application/json", - "Authorization": "Basic YXBpS2V5OmR1bW15QXBpS2V5" - }, - "params": {}, - "body": { - "JSON": { - "name": "local_testing", - "occurred_at": "2019-11-15T10:26:53+00:00", - "is_syncing": false, - "properties": { - "brand": "Aster", - "product": "Garments", - "products": "[{\"product_id\":\"123\",\"price\":\"14\"},{\"product_id\":\"123\",\"price\":14}]", - "purchased": "false" - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "audienceId": "aud111" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://usXX.api.mailchimp.com/3.0/lists/aud111/members/48cd6232dc124497369f59c33d3eb4ab/events", - "headers": { - "Content-Type": "application/json", - "Authorization": "Basic YXBpS2V5OmR1bW15QXBpS2V5" - }, - "params": {}, - "body": { - "JSON": { - "name": "22", - "occurred_at": "2019-11-15T10:26:53+00:00", - "is_syncing": false, - "properties": { - "brand": "Aster", - "product": "Garments", - "products": "[{\"product_id\":\"123\",\"price\":\"14\"},{\"product_id\":\"123\",\"price\":14}]", - "purchased": "false" - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "audienceId": "aud111" - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "dummyApiKey", - "audienceId": "ff21810ddc", - "datacenterId": "us14" - }, - "Enabled": true, - "Transformations": [] - }, - "statusCode": 400, - "error": "Event name should be between 2 and 30 characters", - "statTags": { - "destination": "mailchimp", - "stage": "transform", - "scope": "exception" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "dummyApiKey", - "audienceId": "ff21810ddc", - "datacenterId": "us14" - }, - "Enabled": true, - "Transformations": [] - }, - "statusCode": 400, - "error": "Event name should be between 2 and 30 characters", - "statTags": { - "destination": "mailchimp", - "stage": "transform", - "scope": "exception" - } - } -] diff --git a/test/__tests__/data/mailchimp_router_input.json b/test/__tests__/data/mailchimp_router_input.json deleted file mode 100644 index e3cdbdddf5..0000000000 --- a/test/__tests__/data/mailchimp_router_input.json +++ /dev/null @@ -1,347 +0,0 @@ -[ - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "apikey", - "audienceId": "aud111", - "datacenterId": "usXX", - "enableMergeFields": true - }, - "Enabled": true, - "Transformations": [] - }, - "metadata": { - "jobId": 2 - }, - "message": { - "anonymousId": "userId12345", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "anonymousId": "userId12345", - "email": "bob.dole@initech.com", - "firstName": "Bob", - "lastName": "Dole" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36" - }, - "integrations": { - "All": true - }, - "messageId": "21e475b2-3694-477b-afb6-5b94a81aac21", - "originalTimestamp": "2019-11-15T10:22:32Z", - "receivedAt": "2019-11-15T15:52:37+05:30", - "request_ip": "[::1]:62921", - "sentAt": "2019-11-15T10:22:37Z", - "source_id": "1TdhTcwsUVOeEMWyPUpQIgF3pYr", - "timestamp": "2019-11-15T15:52:32+05:30", - "type": "identify", - "userId": "userId12345" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "apikey", - "audienceId": "aud111", - "datacenterId": "usXX", - "enableMergeFields": true - }, - "Enabled": true, - "Transformations": [] - }, - "metadata": { - "jobId": 3 - }, - "message": { - "anonymousId": "userId12345", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "anonymousId": "userId12345", - "email": "bob.dole@initech.com" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36" - }, - "integrations": { - "MailChimp": { - "subscriptionStatus": "subscribed" - } - }, - "messageId": "6d1f3ca8-e2d0-4d34-9926-44596171af0c", - "originalTimestamp": "2019-11-15T10:26:53Z", - "receivedAt": "2019-11-15T15:56:58+05:30", - "request_ip": "[::1]:62921", - "sentAt": "2019-11-15T10:26:58Z", - "source_id": "1TdhTcwsUVOeEMWyPUpQIgF3pYr", - "timestamp": "2019-11-15T15:56:53+05:30", - "type": "identify", - "userId": "userId12345" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "apikey", - "audienceId": "aud111", - "datacenterId": "usXX", - "enableMergeFields": true - }, - "Enabled": true, - "Transformations": [] - }, - "metadata": { - "jobId": 4 - }, - "message": { - "anonymousId": "userId12345", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "anonymousId": "userId12345", - "email": "bob.dole@initech.com" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36" - }, - "integrations": { - "MailChimp": { - "subscriptionStatus": "subscrib" - } - }, - "messageId": "6d1f3ca8-e2d0-4d34-9926-44596171af0c", - "originalTimestamp": "2019-11-15T10:26:53Z", - "receivedAt": "2019-11-15T15:56:58+05:30", - "request_ip": "[::1]:62921", - "sentAt": "2019-11-15T10:26:58Z", - "source_id": "1TdhTcwsUVOeEMWyPUpQIgF3pYr", - "timestamp": "2019-11-15T15:56:53+05:30", - "type": "identify", - "userId": "userId12345" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "apikey", - "audienceId": "aud111", - "datacenterId": "usXX", - "enableMergeFields": true - }, - "Enabled": true, - "Transformations": [] - }, - "metadata": { - "jobId": 5 - }, - "message": { - "anonymousId": "userId12345", - "channel": "web", - "context": { - "traits": { - "anonymousId": "userId12345", - "email": "bob.dole@initech.com" - } - }, - "properties": { - "brand": "Aster", - "product": "Garments" - }, - "messageId": "6d1f3ca8-e2d0-4d34-9926-44596171af0c", - "originalTimestamp": "2019-11-15T10:26:53Z", - "receivedAt": "2019-11-15T15:56:58+05:30", - "sentAt": "2019-11-15T10:26:58Z", - "source_id": "1TdhTcwsUVOeEMWyPUpQIgF3pYr", - "timestamp": "2019-11-15T15:56:53+05:30", - "type": "track", - "event": "local testing", - "userId": "userId12345" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "apikey", - "audienceId": "aud111", - "datacenterId": "usXX", - "enableMergeFields": true - }, - "Enabled": true, - "Transformations": [] - }, - "metadata": { - "jobId": 6 - }, - "message": { - "anonymousId": "userId12345", - "channel": "web", - "context": { - "traits": { - "anonymousId": "userId12345", - "email": "bob.dole@initech.com" - } - }, - "properties": { - "brand": "Aster", - "product": "Garments", - "is_syncing": false - }, - "messageId": "6d1f3ca8-e2d0-4d34-9926-44596171af0c", - "originalTimestamp": "2019-11-15T10:26:53Z", - "receivedAt": "2019-11-15T15:56:58+05:30", - "sentAt": "2019-11-15T10:26:58Z", - "source_id": "1TdhTcwsUVOeEMWyPUpQIgF3pYr", - "timestamp": "2019-11-15T15:56:53+05:30", - "type": "track", - "userId": "userId12345" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "apikey", - "audienceId": "aud111", - "datacenterId": "usXX", - "enableMergeFields": true - }, - "Enabled": true, - "Transformations": [] - }, - "metadata": { - "jobId": 7 - }, - "message": { - "anonymousId": "userId12345", - "channel": "web", - "context": { - "traits": { - "anonymousId": "userId12345", - "email": "bob.dole@initech.com" - } - }, - "properties": { - "brand": "Aster", - "product": "Garments", - "isSyncing": false, - "products": [ - { - "product_id": "123", - "price": "14" - }, - { - "product_id": "123", - "price": 14 - } - ], - "purchased": false - }, - "messageId": "6d1f3ca8-e2d0-4d34-9926-44596171af0c", - "originalTimestamp": "2019-11-15T10:26:53Z", - "receivedAt": "2019-11-15T15:56:58+05:30", - "sentAt": "2019-11-15T10:26:58Z", - "source_id": "1TdhTcwsUVOeEMWyPUpQIgF3pYr", - "timestamp": "2019-11-15T15:56:53+05:30", - "type": "track", - "event": "local testing", - "userId": "userId12345" - } - } -] diff --git a/test/__tests__/data/mailchimp_router_output.json b/test/__tests__/data/mailchimp_router_output.json deleted file mode 100644 index 3a3eec40a9..0000000000 --- a/test/__tests__/data/mailchimp_router_output.json +++ /dev/null @@ -1,238 +0,0 @@ -[ - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://usXX.api.mailchimp.com/3.0/lists/aud111?skip_merge_validation=true&skip_duplicate_check=false", - "headers": { - "Content-Type": "application/json", - "Authorization": "Basic YXBpS2V5OmFwaWtleQ==" - }, - "params": {}, - "body": { - "JSON": { - "members": [ - { - "email_address": "bob.dole@initech.com", - "merge_fields": { - "FNAME": "Bob", - "LNAME": "Dole", - "ANONYMOUSI": "userId12345" - }, - "status": "subscribed" - }, - { - "email_address": "bob.dole@initech.com", - "merge_fields": { - "ANONYMOUSI": "userId12345" - }, - "status": "subscribed" - } - ], - "update_existing": true - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "jobId": 2 - }, - { - "jobId": 3 - } - ], - "batched": true, - "statusCode": 200, - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "apikey", - "audienceId": "aud111", - "datacenterId": "usXX", - "enableMergeFields": true - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://usXX.api.mailchimp.com/3.0/lists/aud111/members/48cd6232dc124497369f59c33d3eb4ab/events", - "headers": { - "Content-Type": "application/json", - "Authorization": "Basic YXBpS2V5OmFwaWtleQ==" - }, - "params": {}, - "body": { - "JSON": { - "name": "local_testing", - "occurred_at": "2019-11-15T10:26:53+00:00", - "properties": { - "brand": "Aster", - "product": "Garments" - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "audienceId": "aud111" - }, - "metadata": [ - { - "jobId": 5 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "apikey", - "audienceId": "aud111", - "datacenterId": "usXX", - "enableMergeFields": true - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://usXX.api.mailchimp.com/3.0/lists/aud111/members/48cd6232dc124497369f59c33d3eb4ab/events", - "headers": { - "Content-Type": "application/json", - "Authorization": "Basic YXBpS2V5OmFwaWtleQ==" - }, - "params": {}, - "body": { - "JSON": { - "name": "local_testing", - "occurred_at": "2019-11-15T10:26:53+00:00", - "is_syncing": false, - "properties": { - "brand": "Aster", - "product": "Garments", - "products": "[{\"product_id\":\"123\",\"price\":\"14\"},{\"product_id\":\"123\",\"price\":14}]", - "purchased": "false" - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "audienceId": "aud111" - }, - "metadata": [ - { - "jobId": 7 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "apikey", - "audienceId": "aud111", - "datacenterId": "usXX", - "enableMergeFields": true - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "apikey", - "audienceId": "aud111", - "datacenterId": "usXX", - "enableMergeFields": true - }, - "Enabled": true, - "Transformations": [] - }, - "metadata": [ - { - "jobId": 6 - } - ], - "batched": false, - "statusCode": 400, - "error": "Missing required value from \"event\"", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "apikey", - "audienceId": "aud111", - "datacenterId": "usXX", - "enableMergeFields": true - }, - "Enabled": true, - "Transformations": [] - }, - "metadata": [ - { - "jobId": 4 - } - ], - "batched": false, - "statusCode": 400, - "error": "The status must be one of [subscribed, unsubscribed, cleaned, pending, transactional]", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation" - } - } -] diff --git a/test/__tests__/data/monday.json b/test/__tests__/data/monday.json deleted file mode 100644 index cec99959da..0000000000 --- a/test/__tests__/data/monday.json +++ /dev/null @@ -1,1023 +0,0 @@ -[ - { - "description": "Track call with empty columnToPropertyMapping", - "input": { - "destination": { - "Config": { - "apiToken": "eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih", - "boardId": "339283933", - "groupTitle": "", - "columnToPropertyMapping": [], - "whitelistedEvents": [ - { - "eventName": "create an item" - } - ] - } - }, - "message": { - "event": "create an item", - "type": "track", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "user@27", - "channel": "web", - "properties": { - "name": "Task 1" - }, - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "locale": "en-US", - "screen": { - "density": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.11" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - }, - "output": { - "body": { - "FORM": {}, - "JSON": { - "query": "mutation { create_item (board_id: 339283933, item_name: \"Task 1\", column_values: \"{}\") {id}}" - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://api.monday.com/v2", - "files": {}, - "headers": { - "Authorization": "eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih", - "Content-Type": "application/json" - }, - "method": "POST", - "params": {}, - "type": "REST", - "version": "1" - } - }, - { - "description": "Track call with undefined columnToPropertyMapping", - "input": { - "destination": { - "Config": { - "apiToken": "eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih", - "boardId": "339283933", - "groupTitle": "", - "whitelistedEvents": [ - { - "eventName": "create an item" - } - ] - } - }, - "message": { - "event": "create an item", - "type": "track", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "user@27", - "channel": "web", - "properties": { - "name": "Task 1" - }, - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "locale": "en-US", - "screen": { - "density": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.11" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - }, - "output": { - "body": { - "FORM": {}, - "JSON": { - "query": "mutation { create_item (board_id: 339283933, item_name: \"Task 1\", column_values: \"{}\") {id}}" - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://api.monday.com/v2", - "files": {}, - "headers": { - "Authorization": "eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih", - "Content-Type": "application/json" - }, - "method": "POST", - "params": {}, - "type": "REST", - "version": "1" - } - }, - { - "description": "Check Unsupported message type", - "input": { - "destination": { - "Config": { - "apiToken": "eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih", - "boardId": "339283933", - "groupTitle": "", - "columnToPropertyMapping": [], - "whitelistedEvents": [ - { - "eventName": "create an item" - } - ] - } - }, - "message": { - "event": "create an item", - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "user@27", - "channel": "web", - "properties": { - "name": "Task 1" - }, - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "locale": "en-US", - "screen": { - "density": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.11" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - }, - "output": { - "error": "Event type identify is not supported" - } - }, - { - "description": "Check for empty message type", - "input": { - "destination": { - "Config": { - "apiToken": "eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih", - "boardId": "339283933", - "groupTitle": "", - "columnToPropertyMapping": [], - "whitelistedEvents": [ - { - "eventName": "create an item" - } - ] - } - }, - "message": { - "event": "create an item", - "type": "", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "user@27", - "channel": "web", - "properties": { - "name": "Task 1" - }, - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "locale": "en-US", - "screen": { - "density": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.11" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - }, - "output": { - "error": "Event type is required" - } - }, - { - "description": "Check for empty API Token", - "input": { - "destination": { - "Config": { - "apiToken": "", - "boardId": "339283933", - "groupTitle": "", - "columnToPropertyMapping": [], - "whitelistedEvents": [ - { - "eventName": "create an item" - } - ] - } - }, - "message": { - "event": "create an item", - "type": "track", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "user@27", - "channel": "web", - "properties": { - "name": "Task 1" - }, - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "locale": "en-US", - "screen": { - "density": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.11" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - }, - "output": { - "error": "ApiToken is a required field" - } - }, - { - "description": "Check for empty board Id", - "input": { - "destination": { - "Config": { - "apiToken": "eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih", - "boardId": "", - "groupTitle": "", - "columnToPropertyMapping": [], - "whitelistedEvents": [ - { - "eventName": "create an item" - } - ] - } - }, - "message": { - "event": "create an item", - "type": "track", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "user@27", - "channel": "web", - "properties": { - "name": "Task 1" - }, - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "locale": "en-US", - "screen": { - "density": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.11" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - }, - "output": { - "error": "boardId is a required field" - } - }, - { - "description": "Check for event name", - "input": { - "destination": { - "Config": { - "apiToken": "eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih", - "boardId": "339283933", - "groupTitle": "", - "columnToPropertyMapping": [], - "whitelistedEvents": [ - { - "eventName": "create an item" - } - ] - } - }, - "message": { - "event": "", - "type": "track", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "user@27", - "channel": "web", - "properties": { - "name": "Task 1" - }, - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "locale": "en-US", - "screen": { - "density": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.11" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - }, - "output": { - "error": "Event is a required field and should be a string" - } - }, - { - "description": "Track call with columnToPropertyMapping and with empty groupTitle", - "input": { - "destination": { - "Config": { - "apiToken": "eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih", - "boardId": "339283933", - "groupTitle": "", - "columnToPropertyMapping": [ - { - "from": "Status", - "to": "status" - }, - { - "from": "Email", - "to": "emailId" - } - ], - "whitelistedEvents": [ - { - "eventName": "create an item" - } - ] - } - }, - "message": { - "event": "create an item", - "type": "track", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "user@27", - "channel": "web", - "properties": { - "name": "Task 1", - "status": "Done", - "emailId": "abc@email.com", - "emailText": "emailId" - }, - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "locale": "en-US", - "screen": { - "density": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.11" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.monday.com/v2", - "headers": { - "Content-Type": "application/json", - "Authorization": "eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih" - }, - "params": {}, - "body": { - "JSON": { - "query": "mutation { create_item (board_id: 339283933, item_name: \"Task 1\", column_values: \"{\\\"status\\\":{\\\"label\\\":\\\"Done\\\"},\\\"email\\\":{\\\"email\\\":\\\"abc@email.com\\\",\\\"text\\\":\\\"emailId\\\"}}\") {id}}" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "Track call with columnToPropertyMapping and with groupTitle", - "input": { - "destination": { - "Config": { - "apiToken": "eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih", - "boardId": "339283933", - "groupTitle": "Next month", - "columnToPropertyMapping": [ - { - "from": "Status", - "to": "status" - }, - { - "from": "Email", - "to": "emailId" - } - ], - "whitelistedEvents": [ - { - "eventName": "create an item" - } - ] - } - }, - "message": { - "event": "create an item", - "type": "track", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "user@27", - "channel": "web", - "properties": { - "name": "Task 1", - "status": "Done", - "emailId": "abc@email.com", - "emailText": "emailId" - }, - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "locale": "en-US", - "screen": { - "density": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.11" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.monday.com/v2", - "headers": { - "Content-Type": "application/json", - "Authorization": "eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih" - }, - "params": {}, - "body": { - "JSON": { - "query": "mutation { create_item (board_id: 339283933, group_id: group_title item_name: \"Task 1\", column_values: \"{\\\"status\\\":{\\\"label\\\":\\\"Done\\\"},\\\"email\\\":{\\\"email\\\":\\\"abc@email.com\\\",\\\"text\\\":\\\"emailId\\\"}}\") {id}}" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "Non-existing group title check", - "input": { - "destination": { - "Config": { - "apiToken": "eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih", - "boardId": "339283933", - "groupTitle": "Next year", - "columnToPropertyMapping": [ - { - "from": "Status", - "to": "status" - }, - { - "from": "Email", - "to": "emailId" - } - ], - "whitelistedEvents": [ - { - "eventName": "create an item" - } - ] - } - }, - "message": { - "event": "create an item", - "type": "track", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "user@27", - "channel": "web", - "properties": { - "name": "Task 1", - "status": "Done", - "emailId": "abc@email.com", - "emailText": "emailId" - }, - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "locale": "en-US", - "screen": { - "density": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.11" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - }, - "output": { - "error": "Group Next year doesn't exist in the board" - } - }, - { - "description": "check for item name", - "input": { - "destination": { - "Config": { - "apiToken": "eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih", - "boardId": "339283933", - "groupTitle": "Next month", - "columnToPropertyMapping": [ - { - "from": "Status", - "to": "status" - }, - { - "from": "Email", - "to": "emailId" - } - ], - "whitelistedEvents": [ - { - "eventName": "create an item" - } - ] - } - }, - "message": { - "event": "create an item", - "type": "track", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "user@27", - "channel": "web", - "properties": { - "name": "", - "status": "Done", - "emailId": "abc@email.com", - "emailText": "emailId" - }, - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "locale": "en-US", - "screen": { - "density": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.11" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - }, - "output": { - "error": "Item name is required to create an item" - } - }, - { - "description": "Track call with columnToPropertyMapping and with groupTitle with all supported columns", - "input": { - "destination": { - "Config": { - "apiToken": "eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih", - "boardId": "339283933", - "groupTitle": "Next month", - "columnToPropertyMapping": [ - { - "from": "Status", - "to": "status" - }, - { - "from": "Email", - "to": "emailId" - }, - { - "from": "Checkbox", - "to": "checked" - }, - { - "from": "Numbers", - "to": "number" - }, - { - "from": "Name", - "to": "textKey" - }, - { - "from": "Country", - "to": "countryName" - }, - { - "from": "Location", - "to": "address" - }, - { - "from": "Phone", - "to": "phone" - }, - { - "from": "Rating", - "to": "rating" - }, - { - "from": "Link", - "to": "url" - }, - { - "from": "Long Text", - "to": "description" - }, - { - "from": "World Clock", - "to": "timezone" - } - ], - "whitelistedEvents": [ - { - "eventName": "create an item" - } - ] - } - }, - "message": { - "event": "create an item", - "type": "track", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "user@27", - "channel": "web", - "properties": { - "name": "Task 1", - "status": "Done", - "emailId": "abc@email.com", - "emailText": "emailId", - "countryCode": "US", - "latitude": "51.23", - "longitude": "35.3", - "rating": "3", - "linkText": "websiteLink", - "checked": "true", - "number": "45", - "textKey": "texting", - "countryName": "Unites States", - "countryShortName": "US", - "address": "New York", - "phone": "2626277272", - "url": "demo.com", - "description": "property description", - "timezone": "America/New_York" - }, - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "locale": "en-US", - "screen": { - "density": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.11" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.monday.com/v2", - "headers": { - "Content-Type": "application/json", - "Authorization": "eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih" - }, - "params": {}, - "body": { - "JSON": { - "query": "mutation { create_item (board_id: 339283933, group_id: group_title item_name: \"Task 1\", column_values: \"{\\\"status\\\":{\\\"label\\\":\\\"Done\\\"},\\\"email\\\":{\\\"email\\\":\\\"abc@email.com\\\",\\\"text\\\":\\\"emailId\\\"},\\\"checkbox\\\":{\\\"checked\\\":true},\\\"numbers\\\":\\\"45\\\",\\\"text\\\":\\\"texting\\\",\\\"country\\\":{\\\"countryName\\\":\\\"Unites States\\\",\\\"countryCode\\\":\\\"US\\\"},\\\"location\\\":{\\\"address\\\":\\\"New York\\\",\\\"lat\\\":\\\"51.23\\\",\\\"lng\\\":\\\"35.3\\\"},\\\"phone\\\":{\\\"phone\\\":\\\"2626277272\\\",\\\"countryShortName\\\":\\\"US\\\"},\\\"rating\\\":3,\\\"link\\\":{\\\"url\\\":\\\"demo.com\\\",\\\"text\\\":\\\"websiteLink\\\"},\\\"long_text\\\":{\\\"text\\\":\\\"property description\\\"},\\\"world_clock\\\":{\\\"timezone\\\":\\\"America/New_York\\\"}}\") {id}}" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "check for allowed event name from UI", - "input": { - "destination": { - "Config": { - "apiToken": "eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih", - "boardId": "339283933", - "groupTitle": "Next month", - "columnToPropertyMapping": [ - { - "from": "Status", - "to": "status" - }, - { - "from": "Email", - "to": "emailId" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - } - }, - "message": { - "event": "create an item", - "type": "track", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "user@27", - "channel": "web", - "properties": { - "name": "", - "status": "Done", - "emailId": "abc@email.com", - "emailText": "emailId" - }, - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "locale": "en-US", - "screen": { - "density": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.11" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - }, - "output": { - "error": "Event Discarded. To allow this event, add this in Allowlist" - } - }, - { - "description": "check for deleted boards (configured boards are deleted)", - "input": { - "destination": { - "Config": { - "apiToken": "eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih", - "boardId": "339283934", - "groupTitle": "Next year", - "columnToPropertyMapping": [ - { - "from": "Status", - "to": "status" - }, - { - "from": "Email", - "to": "emailId" - } - ], - "whitelistedEvents": [ - { - "eventName": "create an item" - } - ] - } - }, - "message": { - "event": "create an item", - "type": "track", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "user@27", - "channel": "web", - "properties": { - "name": "Task 1", - "status": "Done", - "emailId": "abc@email.com", - "emailText": "emailId" - }, - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "locale": "en-US", - "screen": { - "density": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.11" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - }, - "output": { - "error": "The board with boardId 339283934 does not exist" - } - } -] diff --git a/test/__tests__/data/monday_router_input.json b/test/__tests__/data/monday_router_input.json deleted file mode 100644 index 2770d23cb2..0000000000 --- a/test/__tests__/data/monday_router_input.json +++ /dev/null @@ -1,111 +0,0 @@ -[ - { - "destination": { - "Config": { - "apiToken": "eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih", - "boardId": "339283933", - "groupTitle": "", - "columnToPropertyMapping": [], - "whitelistedEvents": [{ "eventName": "create an item" }] - } - }, - "metadata": { - "jobId": 1 - }, - "message": { - "event": "create an item", - "type": "track", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "user@27", - "channel": "web", - "properties": { - "name": "Task 1" - }, - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "locale": "en-US", - "screen": { - "density": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.11" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - }, - { - "destination": { - "Config": { - "apiToken": "eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih", - "boardId": "339283933", - "groupTitle": "Next month", - "columnToPropertyMapping": [ - { - "from": "Status", - "to": "status" - }, - { "from": "Email", "to": "emailId" } - ], - "whitelistedEvents": [{ "eventName": "create an item" }] - } - }, - "metadata": { - "jobId": 2 - }, - "message": { - "event": "create an item", - "type": "track", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "user@27", - "channel": "web", - "properties": { - "name": "Task 1", - "status": "Done", - "emailId": "abc@email.com", - "emailText": "emailId" - }, - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "locale": "en-US", - "screen": { - "density": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.11" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - } -] diff --git a/test/__tests__/data/monday_router_output.json b/test/__tests__/data/monday_router_output.json deleted file mode 100644 index b0beb35a10..0000000000 --- a/test/__tests__/data/monday_router_output.json +++ /dev/null @@ -1,84 +0,0 @@ -[ - { - "batchedRequest": { - "body": { - "FORM": {}, - "JSON": { - "query": "mutation { create_item (board_id: 339283933, item_name: \"Task 1\", column_values: \"{}\") {id}}" - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://api.monday.com/v2", - "files": {}, - "headers": { - "Authorization": "eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih", - "Content-Type": "application/json" - }, - "method": "POST", - "params": {}, - "type": "REST", - "version": "1" - }, - "metadata": [ - { - "jobId": 1 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "apiToken": "eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih", - "boardId": "339283933", - "groupTitle": "", - "columnToPropertyMapping": [], - "whitelistedEvents": [{ "eventName": "create an item" }] - } - } - }, - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.monday.com/v2", - "headers": { - "Content-Type": "application/json", - "Authorization": "eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih" - }, - "params": {}, - "body": { - "JSON": { - "query": "mutation { create_item (board_id: 339283933, group_id: group_title item_name: \"Task 1\", column_values: \"{\\\"status\\\":{\\\"label\\\":\\\"Done\\\"},\\\"email\\\":{\\\"email\\\":\\\"abc@email.com\\\",\\\"text\\\":\\\"emailId\\\"}}\") {id}}" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "jobId": 2 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "apiToken": "eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih", - "boardId": "339283933", - "groupTitle": "Next month", - "columnToPropertyMapping": [ - { - "from": "Status", - "to": "status" - }, - { "from": "Email", "to": "emailId" } - ], - "whitelistedEvents": [{ "eventName": "create an item" }] - } - } - } -] diff --git a/test/__tests__/data/profitwell_input.json b/test/__tests__/data/profitwell_input.json deleted file mode 100644 index e73a17ad37..0000000000 --- a/test/__tests__/data/profitwell_input.json +++ /dev/null @@ -1,719 +0,0 @@ -[ - { - "destination": { - "Config": { - "privateApiKey": "9270161a8e5abaa0e56efddfd9dbcb62" - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.9" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.9" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "email": "sample@sample.com", - "planId": "23", - "planInterval": "month", - "planCurrency": "usd", - "value": "23", - "subscriptionAlias": "samual", - "status": "active" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36" - }, - "messageId": "6a5f38c0-4e75-4268-a066-2b73fbcad01f", - "originalTimestamp": "2021-01-04T08:25:04.780Z", - "receivedAt": "2021-01-04T13:55:04.799+05:30", - "request_ip": "[::1]", - "rudderId": "79881a62-980a-4d76-89ca-7099440f8c13", - "sentAt": "2021-01-04T08:25:04.781Z", - "timestamp": "2021-09-06T14:15:06.798+05:30", - "type": "identify" - } - }, - { - "destination": { - "Config": { - "privateApiKey": "9270161a8e5abaa0e56efddfd9dbcb62" - } - }, - "message": { - "channel": "web", - "context": { - "externalId": [ - { - "type": "profitwellUserId", - "id": "23453" - } - ], - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.9" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.9" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "email": "sample@sample.com", - "planId": "23", - "planInterval": "month", - "planCurrency": "usd", - "value": "23", - "subscriptionAlias": "samual", - "status": "active" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36" - }, - "messageId": "6a5f38c0-4e75-4268-a066-2b73fbcad01f", - "originalTimestamp": "2021-01-04T08:25:04.780Z", - "receivedAt": "2021-01-04T13:55:04.799+05:30", - "request_ip": "[::1]", - "rudderId": "79881a62-980a-4d76-89ca-7099440f8c13", - "sentAt": "2021-01-04T08:25:04.781Z", - "timestamp": "2021-09-06T14:15:06.798+05:30", - "type": "identify" - } - }, - { - "destination": { - "Config": { - "privateApiKey": "9270161a8e5abaa0e56efddfd9dbcb62" - } - }, - "message": { - "channel": "web", - "userId": "sp_245", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.9" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.9" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - - "traits": { - "email": "sample@sample.com", - "planId": "23", - "planInterval": "month", - "planCurrency": "usd", - "value": "23", - "subscriptionAlias": "samual", - "status": "active" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36" - }, - "messageId": "6a5f38c0-4e75-4268-a066-2b73fbcad01f", - "originalTimestamp": "2021-01-04T08:25:04.780Z", - "receivedAt": "2021-01-04T13:55:04.799+05:30", - "request_ip": "[::1]", - "rudderId": "79881a62-980a-4d76-89ca-7099440f8c13", - "sentAt": "2021-01-04T08:25:04.781Z", - "timestamp": "2021-09-06T14:15:06.798+05:30", - "type": "identify" - } - }, - { - "destination": { - "Config": { - "privateApiKey": "9270161a8e5abaa0e56efddfd9dbcb62" - } - }, - "message": { - "channel": "web", - "userId": "sp_245", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.9" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.9" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "email": "sample@sample.com", - "planId": "23", - "planInterval": "month", - "planCurrency": "usd", - "value": "23", - "status": "active" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36" - }, - "messageId": "6a5f38c0-4e75-4268-a066-2b73fbcad01f", - "originalTimestamp": "2021-01-04T08:25:04.780Z", - "receivedAt": "2021-01-04T13:55:04.799+05:30", - "request_ip": "[::1]", - "rudderId": "79881a62-980a-4d76-89ca-7099440f8c13", - "sentAt": "2021-01-04T08:25:04.781Z", - "timestamp": "2021-09-06T14:15:06.798+05:30", - "type": "identify" - } - }, - { - "destination": { - "Config": { - "privateApiKey": "9270161a8e5abaa0e56efddfd9dbcb62" - } - }, - "message": { - "channel": "web", - "userId": "sp_245", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.9" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.9" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "profitwellUserId", - "id": "1234" - } - ], - "traits": { - "email": "sample@sample.com", - "planId": "23", - "planInterval": "month", - "planCurrency": "usd", - "value": "23", - "subscriptionAlias": "samual", - "status": "active" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36" - }, - "messageId": "6a5f38c0-4e75-4268-a066-2b73fbcad01f", - "originalTimestamp": "2021-01-04T08:25:04.780Z", - "receivedAt": "2021-01-04T13:55:04.799+05:30", - "request_ip": "[::1]", - "rudderId": "79881a62-980a-4d76-89ca-7099440f8c13", - "sentAt": "2021-01-04T08:25:04.781Z", - "timestamp": "2021-09-06T14:15:06.798+05:30", - "type": "identify" - } - }, - { - "destination": { - "Config": { - "privateApiKey": "9270161a8e5abaa0e56efddfd9dbcb62" - } - }, - "message": { - "channel": "web", - "userId": "sp_245", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.9" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.9" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "profitwellUserId", - "id": "pwu_Oea7HXV3bnTP" - } - ], - "traits": { - "email": "sample@sample.com", - "planId": "23", - "planInterval": "month", - "planCurrency": "usd", - "value": "23", - "subscriptionAlias": "samual", - "status": "active" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36" - }, - "messageId": "6a5f38c0-4e75-4268-a066-2b73fbcad01f", - "originalTimestamp": "2021-01-04T08:25:04.780Z", - "receivedAt": "2021-01-04T13:55:04.799+05:30", - "request_ip": "[::1]", - "rudderId": "79881a62-980a-4d76-89ca-7099440f8c13", - "sentAt": "2021-01-04T08:25:04.781Z", - "timestamp": "2021-09-06T14:15:06.798+05:30", - "type": "identify" - } - }, - { - "destination": { - "Config": { - "privateApiKey": "9270161a8e5abaa0e56efddfd9dbcb62" - } - }, - "message": { - "channel": "web", - "userId": "sp_245", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.9" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.9" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "profitwellUserId", - "id": "pwu_Oea7HXV3bnTP" - }, - { - "type": "profitwellSubscriptionId", - "id": "pws_FecTCEyo17rV" - } - ], - "traits": { - "email": "sample@sample.com", - "planId": "23", - "planInterval": "month", - "planCurrency": "usd", - "value": "23", - "subscriptionAlias": "samual", - "status": "active" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36" - }, - "messageId": "6a5f38c0-4e75-4268-a066-2b73fbcad01f", - "originalTimestamp": "2021-01-04T08:25:04.780Z", - "receivedAt": "2021-01-04T13:55:04.799+05:30", - "request_ip": "[::1]", - "rudderId": "79881a62-980a-4d76-89ca-7099440f8c13", - "sentAt": "2021-01-04T08:25:04.781Z", - "timestamp": "2021-09-06T14:15:06.798+05:30", - "type": "identify" - } - }, - { - "destination": { - "Config": { - "privateApiKey": "9270161a8e5abaa0e56efddfd9dbcb62" - } - }, - "message": { - "channel": "web", - "userId": "sp_245", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.9" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.9" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "profitwellUserId", - "id": "pwu_Oea7HXV3bnTP" - }, - { - "type": "profitwellSubscriptionId", - "id": "pws_FecTCEyo17rV" - } - ], - "traits": { - "email": "sample@sample.com", - "planId": "23", - "planInterval": "month", - "planCurrency": "usd", - "value": "23", - "subscriptionAlias": "samual", - "status": "active", - "effectiveDate": "1609748705" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36" - }, - "messageId": "6a5f38c0-4e75-4268-a066-2b73fbcad01f", - "originalTimestamp": "2021-01-04T08:25:04.780Z", - "receivedAt": "2021-01-04T13:55:04.799+05:30", - "request_ip": "[::1]", - "rudderId": "79881a62-980a-4d76-89ca-7099440f8c13", - "sentAt": "2021-01-04T08:25:04.781Z", - "timestamp": "2021-09-06T14:15:06.798+05:30", - "type": "identify" - } - }, - { - "destination": { - "Config": { - "privateApiKey": "9270161a8e5abaa0e56efddfd9dbcb62" - } - }, - "message": { - "channel": "web", - "userId": "sp_245", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.9" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.9" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "profitwellUserId", - "id": "pwu_Oea7HXV3bnTP" - }, - { - "type": "profitwellSubscriptionId", - "id": "pws_FecTCEyo17rV" - } - ], - "traits": { - "email": "sample@sample.com", - "planId": "23", - "planInterval": "monthly", - "planCurrency": "usd", - "value": "23", - "subscriptionAlias": "samual", - "status": "active", - "effectiveDate": "1609748705" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36" - }, - "messageId": "6a5f38c0-4e75-4268-a066-2b73fbcad01f", - "originalTimestamp": "2021-01-04T08:25:04.780Z", - "receivedAt": "2021-01-04T13:55:04.799+05:30", - "request_ip": "[::1]", - "rudderId": "79881a62-980a-4d76-89ca-7099440f8c13", - "sentAt": "2021-01-04T08:25:04.781Z", - "timestamp": "2021-09-06T14:15:06.798+05:30", - "type": "identify" - } - }, - { - "destination": { - "Config": { - "privateApiKey": "9270161a8e5abaa0e56efddfd9dbcb62" - } - }, - "message": { - "channel": "web", - "userId": "sp_245", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.9" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.9" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "profitwellUserId", - "id": "pwu_Oea7HXV3bnTP" - }, - { - "type": "profitwellSubscriptionId", - "id": "pws_FecTCEyo17rV" - } - ], - "traits": { - "email": "sample@sample.com", - "planId": "23", - "planInterval": "month", - "planCurrency": "usd", - "value": "23", - "subscriptionAlias": "samual", - "status": "activate", - "effectiveDate": "1609748705" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36" - }, - "messageId": "6a5f38c0-4e75-4268-a066-2b73fbcad01f", - "originalTimestamp": "2021-01-04T08:25:04.780Z", - "receivedAt": "2021-01-04T13:55:04.799+05:30", - "request_ip": "[::1]", - "rudderId": "79881a62-980a-4d76-89ca-7099440f8c13", - "sentAt": "2021-01-04T08:25:04.781Z", - "timestamp": "2021-09-06T14:15:06.798+05:30", - "type": "identify" - } - }, - { - "destination": { - "Config": {} - }, - "message": { - "channel": "web", - "userId": "sp_245", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.9" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.9" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "profitwellUserId", - "id": "pwu_Oea7HXV3bnTP" - }, - { - "type": "profitwellSubscriptionId", - "id": "pws_FecTCEyo17rV" - } - ], - "traits": { - "email": "sample@sample.com", - "planId": "23", - "planInterval": "month", - "planCurrency": "usd", - "value": "23", - "subscriptionAlias": "samual", - "status": "active", - "effectiveDate": "1609748705" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36" - }, - "messageId": "6a5f38c0-4e75-4268-a066-2b73fbcad01f", - "originalTimestamp": "2021-01-04T08:25:04.780Z", - "receivedAt": "2021-01-04T13:55:04.799+05:30", - "request_ip": "[::1]", - "rudderId": "79881a62-980a-4d76-89ca-7099440f8c13", - "sentAt": "2021-01-04T08:25:04.781Z", - "timestamp": "2021-09-06T14:15:06.798+05:30", - "type": "identify" - } - }, - { - "destination": { - "Config": { - "privateApiKey": "9270161a8e5abaa0e56efddfd9dbcb62" - } - }, - "message": { - "channel": "web", - "userId": "sp_245", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.9" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.9" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "profitwellUserId", - "id": "pwu_Oea7HXV3bnTP" - }, - { - "type": "profitwellSubscriptionId", - "id": "pws_FecTCEyo17" - } - ], - "traits": { - "email": "sample@sample.com", - "planId": "23", - "planInterval": "month", - "planCurrency": "usd", - "value": "23", - "subscriptionAlias": "samual", - "status": "active", - "effectiveDate": "1609748705" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36" - }, - "messageId": "6a5f38c0-4e75-4268-a066-2b73fbcad01f", - "originalTimestamp": "2021-01-04T08:25:04.780Z", - "receivedAt": "2021-01-04T13:55:04.799+05:30", - "request_ip": "[::1]", - "rudderId": "79881a62-980a-4d76-89ca-7099440f8c13", - "sentAt": "2021-01-04T08:25:04.781Z", - "timestamp": "2021-09-06T14:15:06.798+05:30", - "type": "identify" - } - }, - { - "destination": { - "Config": { - "privateApiKey": "9270161a8e5abaa0e56efddfd9dbcb62" - } - }, - "message": { - "channel": "web", - "userId": "sp_245", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.9" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.9" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "email": "sample@sample.com", - "planId": "23", - "planInterval": "month", - "planCurrency": "usd", - "value": "23", - "subscriptionAlias": "samual", - "status": "active", - "effectiveDate": 1609748705 - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36" - }, - "messageId": "6a5f38c0-4e75-4268-a066-2b73fbcad01f", - "originalTimestamp": "2021-01-04T08:25:04.780Z", - "receivedAt": "2021-01-04T13:55:04.799+05:30", - "request_ip": "[::1]", - "rudderId": "79881a62-980a-4d76-89ca-7099440f8c13", - "sentAt": "2021-01-04T08:25:04.781Z", - "timestamp": "2021-09-06T14:15:06.798+05:30", - "type": "identify" - } - } -] diff --git a/test/__tests__/data/profitwell_output.json b/test/__tests__/data/profitwell_output.json deleted file mode 100644 index 04be6d990f..0000000000 --- a/test/__tests__/data/profitwell_output.json +++ /dev/null @@ -1,166 +0,0 @@ -[ - { - "statusCode": 400, - "error": "userId or userAlias is required for identify" - }, - { - "statusCode": 400, - "error": "No user found for profitwell user_id" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.profitwell.com/v2/subscriptions/", - "headers": { - "Content-Type": "application/json", - "Authorization": "9270161a8e5abaa0e56efddfd9dbcb62" - }, - "params": {}, - "body": { - "JSON": { - "subscription_alias": "samual", - "email": "sample@sample.com", - "plan_id": "23", - "plan_interval": "month", - "plan_currency": "usd", - "status": "active", - "value": "23", - "user_alias": "sp_245", - "effective_date": 1630917906 - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - { - "statusCode": 400, - "error": "subscriptionId or subscriptionAlias is required for identify" - }, - { - "statusCode": 400, - "error": "No user found for profitwell user_id" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.profitwell.com/v2/subscriptions/", - "headers": { - "Content-Type": "application/json", - "Authorization": "9270161a8e5abaa0e56efddfd9dbcb62" - }, - "params": {}, - "body": { - "JSON": { - "subscription_alias": "samual", - "email": "sample@sample.com", - "plan_id": "23", - "plan_interval": "month", - "plan_currency": "usd", - "status": "active", - "value": "23", - "user_id": "pwu_Oea7HXV3bnTP", - "user_alias": "sp_245", - "effective_date": 1630917906 - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - { - "statusCode": 400, - "error": "Missing required value from [\"traits.effectiveDate\",\"context.traits.effectiveDate\"]" - }, - { - "version": "1", - "type": "REST", - "method": "PUT", - "endpoint": "https://api.profitwell.com/v2/subscriptions/pws_FecTCEyo17rV/", - "headers": { - "Content-Type": "application/json", - "Authorization": "9270161a8e5abaa0e56efddfd9dbcb62" - }, - "params": {}, - "body": { - "JSON": { - "plan_id": "23", - "plan_interval": "month", - "value": "23", - "status": "active", - "effective_date": 1609748705 - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - { - "statusCode": 400, - "error": "invalid format for planInterval. Aborting" - }, - { - "version": "1", - "type": "REST", - "method": "PUT", - "endpoint": "https://api.profitwell.com/v2/subscriptions/pws_FecTCEyo17rV/", - "headers": { - "Content-Type": "application/json", - "Authorization": "9270161a8e5abaa0e56efddfd9dbcb62" - }, - "params": {}, - "body": { - "JSON": { - "plan_id": "23", - "plan_interval": "month", - "value": "23", - "effective_date": 1609748705 - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - { - "statusCode": 400, - "error": "Private API Key not found. Aborting." - }, - { - "statusCode": 400, - "error": "Profitwell subscription_id not found" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.profitwell.com/v2/subscriptions/", - "headers": { - "Content-Type": "application/json", - "Authorization": "9270161a8e5abaa0e56efddfd9dbcb62" - }, - "params": {}, - "body": { - "JSON": { - "subscription_alias": "samual", - "email": "sample@sample.com", - "plan_id": "23", - "plan_interval": "month", - "plan_currency": "usd", - "status": "active", - "value": "23", - "effective_date": 1609748705, - "user_alias": "sp_245" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } -] diff --git a/test/__tests__/data/profitwell_router_input.json b/test/__tests__/data/profitwell_router_input.json deleted file mode 100644 index 50903283a7..0000000000 --- a/test/__tests__/data/profitwell_router_input.json +++ /dev/null @@ -1,45 +0,0 @@ -[ - { - "destination": { - "Config": { - "privateApiKey": "9270161a8e5abaa0e56efddfd9dbcb62" - } - }, - "metadata": { - "jobId": 2 - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "identify", - "userId": "samual", - "traits": { - "email": "sample@sample.com", - "planId": "23", - "planInterval": "month", - "planCurrency": "usd", - "value": "23", - "subscriptionAlias": "samual", - "status": "active" - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - } -] diff --git a/test/__tests__/data/profitwell_router_output.json b/test/__tests__/data/profitwell_router_output.json deleted file mode 100644 index ca98903838..0000000000 --- a/test/__tests__/data/profitwell_router_output.json +++ /dev/null @@ -1,44 +0,0 @@ -[ - { - "batchedRequest": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "subscription_alias": "samual", - "email": "sample@sample.com", - "plan_id": "23", - "plan_interval": "month", - "plan_currency": "usd", - "status": "active", - "value": "23", - "user_alias": "samual", - "effective_date": 1571043797 - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Content-Type": "application/json", - "Authorization": "9270161a8e5abaa0e56efddfd9dbcb62" - }, - "version": "1", - "endpoint": "https://api.profitwell.com/v2/subscriptions/" - }, - "metadata": [ - { - "jobId": 2 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "privateApiKey": "9270161a8e5abaa0e56efddfd9dbcb62" - } - } - } -] diff --git a/test/__tests__/data/sendinblue.json b/test/__tests__/data/sendinblue.json deleted file mode 100644 index 06b6df14d9..0000000000 --- a/test/__tests__/data/sendinblue.json +++ /dev/null @@ -1,1196 +0,0 @@ -[ - { - "description": "Page call without email or phone", - "input": { - "message": { - "type": "page", - "sentAt": "2021-01-03T17:02:53.195Z", - "channel": "web", - "name": "New Page", - "properties": { - "url": "https://www.google.com/", - "title": "Google home" - }, - "context": { - "traits": {}, - "page": { - "url": "http://127.0.0.1:7307/Testing/test/ourSdk.html", - "path": "/Testing/test/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/test/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/test/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - } - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - }, - "destination": { - "Config": { - "apiKey": "apiKey123", - "clientKey": "clientKey123", - "doi": false - } - } - }, - "output": { - "error": "At least one of `email` or `phone` is required" - } - }, - { - "description": "Page call", - "input": { - "message": { - "type": "page", - "sentAt": "2021-01-03T17:02:53.195Z", - "channel": "web", - "name": "New Page", - "properties": { - "url": "https://www.google.com/", - "title": "Google home" - }, - "context": { - "traits": { - "email": "john_doe@example.com" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/test/ourSdk.html", - "path": "/Testing/test/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/test/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/test/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - } - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - }, - "destination": { - "Config": { - "apiKey": "apiKey123", - "clientKey": "clientKey123", - "templateId": 3, - "doi": false, - "redirectionUrl": "https://app.sendinblue.com/marketing-dashboard" - } - } - }, - "output": { - "body": { - "FORM": {}, - "JSON": { - "email": "john_doe@example.com", - "page": "https://www.google.com/", - "properties": { - "ma_path": "/Testing/test/ourSdk.html", - "ma_referrer": "http://127.0.0.1:7307/Testing/test/", - "ma_title": "Google home", - "sib_name": "New Page" - } - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://in-automate.sendinblue.com/api/v2/trackPage", - "files": {}, - "headers": { - "Content-Type": "application/json", - "ma-key": "clientKey123" - }, - "method": "POST", - "params": {}, - "type": "REST", - "version": "1" - } - }, - { - "description": "Track call without email or phone", - "input": { - "message": { - "type": "track", - "sentAt": "2021-01-03T17:02:53.195Z", - "channel": "web", - "event": "Order Completed", - "properties": {}, - "context": { - "traits": { - "first_name": "John", - "lastName": "Doe" - } - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - }, - "destination": { - "Config": { - "apiKey": "apiKey123", - "clientKey": "clientKey123", - "doi": false - } - } - }, - "output": { - "error": "At least one of `email` or `phone` is required" - } - }, - { - "description": "Track call without event", - "input": { - "message": { - "type": "track", - "sentAt": "2021-01-03T17:02:53.195Z", - "channel": "web", - "properties": {}, - "context": {} - }, - "destination": { - "Config": { - "apiKey": "apiKey123", - "clientKey": "clientKey123", - "doi": false - } - } - }, - "output": { - "error": "Event name is required" - } - }, - { - "description": "Track events with sendTraitsInTrack flag set to true", - "input": { - "message": { - "type": "track", - "sentAt": "2021-01-03T17:02:53.195Z", - "channel": "web", - "event": "Order Completed", - "properties": {}, - "context": { - "traits": { - "first_name": "John", - "lastName": "Doe", - "age": 19, - "email": "john_doe@example.com", - "phone": "+919876543210", - "location": "Mumbai", - "role": "SDE" - } - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - }, - "destination": { - "Config": { - "apiKey": "apiKey123", - "clientKey": "clientKey123", - "doi": false, - "sendTraitsInTrack": true - } - } - }, - "output": { - "body": { - "FORM": {}, - "JSON": { - "email": "john_doe@example.com", - "event": "Order Completed", - "eventdata": {}, - "properties": { - "FIRSTNAME": "John", - "LASTNAME": "Doe", - "SMS": "+919876543210", - "age": 19, - "location": "Mumbai", - "role": "SDE" - } - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://in-automate.sendinblue.com/api/v2/trackEvent", - "files": {}, - "headers": { - "Content-Type": "application/json", - "ma-key": "clientKey123" - }, - "method": "POST", - "params": {}, - "type": "REST", - "version": "1" - } - }, - { - "description": "Track events with contactAttributeMapping provided in webapp", - "input": { - "message": { - "type": "track", - "sentAt": "2021-01-03T17:02:53.195Z", - "channel": "web", - "event": "Order Completed", - "properties": {}, - "context": { - "traits": { - "first_name": "John", - "lastName": "Doe", - "age": 19, - "email": "john_doe@example.com", - "phone": "+919876543210", - "location": "Mumbai", - "role": "SDE" - } - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - }, - "destination": { - "Config": { - "apiKey": "apiKey123", - "clientKey": "clientKey123", - "doi": false, - "contactAttributeMapping": [ - { - "from": "location", - "to": "LOCATION" - } - ], - "sendTraitsInTrack": true - } - } - }, - "output": { - "body": { - "FORM": {}, - "JSON": { - "email": "john_doe@example.com", - "event": "Order Completed", - "eventdata": {}, - "properties": { - "FIRSTNAME": "John", - "LASTNAME": "Doe", - "LOCATION": "Mumbai", - "SMS": "+919876543210", - "age": 19, - "role": "SDE" - } - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://in-automate.sendinblue.com/api/v2/trackEvent", - "files": {}, - "headers": { - "Content-Type": "application/json", - "ma-key": "clientKey123" - }, - "method": "POST", - "params": {}, - "type": "REST", - "version": "1" - } - }, - { - "description": "Track events with propertiesIdKey provided in integration object", - "input": { - "message": { - "type": "track", - "sentAt": "2021-01-03T17:02:53.195Z", - "channel": "web", - "event": "Order Completed", - "properties": { - "orderId": "1341394-3812392190", - "products": [ - { - "product_id": 1234, - "product_name": "Track Pants", - "amount": 1, - "price": 220 - }, - { - "product_id": 5768, - "product_name": "T-Shirt", - "amount": 5, - "price": 1058 - } - ] - }, - "context": { - "traits": { - "first_name": "John", - "lastName": "Doe", - "age": 19, - "email": "john_doe@example.com", - "phone": "+919876543210", - "location": "Mumbai", - "role": "SDE" - } - }, - "integrations": { - "All": true, - "sendinblue": { - "propertiesIdKey": "orderId" - } - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - }, - "destination": { - "Config": { - "apiKey": "apiKey123", - "clientKey": "clientKey123", - "doi": false, - "contactAttributeMapping": [ - { - "from": "location", - "to": "LOCATION" - } - ], - "sendTraitsInTrack": true - } - } - }, - "output": { - "body": { - "FORM": {}, - "JSON": { - "email": "john_doe@example.com", - "event": "Order Completed", - "eventdata": { - "data": { - "orderId": "1341394-3812392190", - "products": [ - { - "amount": 1, - "price": 220, - "product_id": 1234, - "product_name": "Track Pants" - }, - { - "amount": 5, - "price": 1058, - "product_id": 5768, - "product_name": "T-Shirt" - } - ] - }, - "id": "1341394-3812392190" - }, - "properties": { - "FIRSTNAME": "John", - "LASTNAME": "Doe", - "LOCATION": "Mumbai", - "SMS": "+919876543210", - "age": 19, - "role": "SDE" - } - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://in-automate.sendinblue.com/api/v2/trackEvent", - "files": {}, - "headers": { - "Content-Type": "application/json", - "ma-key": "clientKey123" - }, - "method": "POST", - "params": {}, - "type": "REST", - "version": "1" - } - }, - { - "description": "Track events with eventdata.id taken from messageId", - "input": { - "message": { - "type": "track", - "sentAt": "2021-01-03T17:02:53.195Z", - "channel": "web", - "event": "Order Completed", - "properties": { - "orderId": "1341394-3812392190", - "products": [ - { - "product_id": 1234, - "product_name": "Track Pants", - "amount": 1, - "price": 220 - }, - { - "product_id": 5768, - "product_name": "T-Shirt", - "amount": 5, - "price": 1058 - } - ] - }, - "context": { - "traits": { - "first_name": "John", - "lastName": "Doe", - "age": 19, - "email": "john_doe@example.com", - "phone": "+919876543210", - "location": "Mumbai", - "role": "SDE" - } - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - }, - "destination": { - "Config": { - "apiKey": "apiKey123", - "clientKey": "clientKey123", - "doi": false, - "contactAttributeMapping": [ - { - "from": "location", - "to": "LOCATION" - } - ], - "sendTraitsInTrack": true - } - } - }, - "output": { - "body": { - "FORM": {}, - "JSON": { - "email": "john_doe@example.com", - "event": "Order Completed", - "eventdata": { - "data": { - "orderId": "1341394-3812392190", - "products": [ - { - "amount": 1, - "price": 220, - "product_id": 1234, - "product_name": "Track Pants" - }, - { - "amount": 5, - "price": 1058, - "product_id": 5768, - "product_name": "T-Shirt" - } - ] - }, - "id": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff" - }, - "properties": { - "FIRSTNAME": "John", - "LASTNAME": "Doe", - "LOCATION": "Mumbai", - "SMS": "+919876543210", - "age": 19, - "role": "SDE" - } - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://in-automate.sendinblue.com/api/v2/trackEvent", - "files": {}, - "headers": { - "Content-Type": "application/json", - "ma-key": "clientKey123" - }, - "method": "POST", - "params": {}, - "type": "REST", - "version": "1" - } - }, - { - "description": "Track link without email or phone", - "input": { - "message": { - "type": "track", - "sentAt": "2021-01-03T17:02:53.195Z", - "channel": "web", - "event": "trackLink", - "properties": { - "link": "https://www.google.com/gmail/", - "emailCount": 19 - }, - "context": { - "traits": {} - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - }, - "destination": { - "Config": { - "apiKey": "apiKey123", - "clientKey": "clientKey123", - "doi": false - } - } - }, - "output": { - "error": "At least one of `email` or `phone` is required" - } - }, - { - "description": "Track link without link", - "input": { - "message": { - "type": "track", - "sentAt": "2021-01-03T17:02:53.195Z", - "channel": "web", - "event": "trackLink", - "properties": {}, - "context": { - "traits": { - "phone": "+919507545089" - } - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - }, - "destination": { - "Config": { - "apiKey": "apiKey123", - "clientKey": "clientKey123", - "doi": false - } - } - }, - "output": { - "error": "Missing required value from \"properties.link\"" - } - }, - { - "description": "Track link", - "input": { - "message": { - "type": "track", - "sentAt": "2021-01-03T17:02:53.195Z", - "channel": "web", - "event": "trackLink", - "properties": { - "link": "https://www.google.com/gmail/", - "emailCount": 19 - }, - "context": { - "traits": { - "phone": "+919507545089" - } - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - }, - "destination": { - "Config": { - "apiKey": "apiKey123", - "clientKey": "clientKey123", - "doi": false - } - } - }, - "output": { - "body": { - "FORM": {}, - "JSON": { - "email": "919507545089@mailin-sms.com", - "link": "https://www.google.com/gmail/", - "properties": { - "emailCount": 19 - } - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://in-automate.sendinblue.com/api/v2/trackLink", - "files": {}, - "headers": { - "Content-Type": "application/json", - "ma-key": "clientKey123" - }, - "method": "POST", - "params": {}, - "type": "REST", - "version": "1" - } - }, - { - "description": "Identify call with invalid email", - "input": { - "message": { - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "channel": "web", - "traits": { "email": "abc.com" }, - "context": {}, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - }, - "destination": { - "Config": { - "apiKey": "apiKey123", - "clientKey": "clientKey123", - "doi": false - } - } - }, - "output": { - "error": "The provided email is invalid" - } - }, - { - "description": "Identify call with invalid phone number", - "input": { - "message": { - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "channel": "web", - "traits": { "phone": "99999999" }, - "context": {}, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - }, - "destination": { - "Config": { - "apiKey": "apiKey123", - "clientKey": "clientKey123", - "doi": false - } - } - }, - "output": { - "error": "The provided phone number is invalid" - } - }, - { - "description": "Identify call to create or update a contact without email or phone", - "input": { - "message": { - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "channel": "web", - "context": {}, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - }, - "destination": { - "Config": { - "apiKey": "apiKey123", - "clientKey": "clientKey123", - "doi": false - } - } - }, - "output": { - "error": "At least one of `email` or `phone` is required" - } - }, - { - "description": "Identify call to create or update a contact", - "input": { - "message": { - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "channel": "web", - "traits": { - "first_name": "John", - "lastName": "Doe", - "age": 19, - "email": "john_doe@example.com", - "phone": "+919876543210", - "location": "Mumbai", - "newEmail": "alex_root@example.com", - "role": "SDE" - }, - "context": { - "externalId": [ - { - "type": "sendinblueIncludeListIds", - "id": [1, 2] - } - ] - }, - "integrations": { - "All": true, - "sendinblue": { - "emailBlacklisted": true - } - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - }, - "destination": { - "Config": { - "apiKey": "apiKey123", - "clientKey": "clientKey123", - "doi": false, - "contactAttributeMapping": [ - { - "from": "location", - "to": "LOCATION" - } - ] - } - } - }, - "output": { - "body": { - "FORM": {}, - "JSON": { - "attributes": { - "FIRSTNAME": "John", - "LASTNAME": "Doe", - "LOCATION": "Mumbai", - "SMS": "+919876543210", - "EMAIL": "alex_root@example.com", - "age": 19, - "role": "SDE" - }, - "email": "john_doe@example.com", - "emailBlacklisted": true, - "listIds": [1, 2], - "updateEnabled": true - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://api.sendinblue.com/v3/contacts", - "files": {}, - "headers": { - "Content-Type": "application/json", - "api-key": "apiKey123" - }, - "method": "POST", - "params": {}, - "type": "REST", - "version": "1" - } - }, - { - "description": "Identify call to create DOI contact with templatedId from externalId", - "input": { - "message": { - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "channel": "web", - "traits": { - "first_name": "John", - "lastName": "Doe", - "age": 19, - "email": "john_doe@example.com", - "phone": "+919876543210", - "location": "Mumbai", - "role": "SDE" - }, - "context": { - "externalId": [ - { - "type": "sendinblueIncludeListIds", - "id": [1, 2] - }, - { - "type": "sendinblueUnlinkListIds", - "id": [5] - }, - { - "type": "sendinblueTemplateId", - "id": 2 - } - ] - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - }, - "destination": { - "Config": { - "apiKey": "apiKey123", - "clientKey": "clientKey123", - "templateId": 3, - "doi": true, - "redirectionUrl": "https://app.sendinblue.com/marketing-dashboard" - } - } - }, - "output": { - "body": { - "FORM": {}, - "JSON": { - "attributes": { - "FIRSTNAME": "John", - "LASTNAME": "Doe", - "SMS": "+919876543210", - "age": 19, - "location": "Mumbai", - "role": "SDE" - }, - "email": "john_doe@example.com", - "includeListIds": [1, 2], - "redirectionUrl": "https://app.sendinblue.com/marketing-dashboard", - "templateId": 3 - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://api.sendinblue.com/v3/contacts/doubleOptinConfirmation", - "files": {}, - "headers": { - "Content-Type": "application/json", - "api-key": "apiKey123" - }, - "method": "POST", - "params": {}, - "type": "REST", - "version": "1" - } - }, - { - "description": "Identify call to create DOI contact without include list Ids", - "input": { - "message": { - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "channel": "web", - "traits": { - "first_name": "John", - "lastName": "Doe", - "age": 19, - "email": "john_doe@example.com", - "phone": "+919876543210", - "location": "Mumbai", - "role": "SDE" - }, - "context": {}, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - }, - "destination": { - "Config": { - "apiKey": "apiKey123", - "clientKey": "clientKey123", - "templateId": 3, - "doi": true, - "redirectionUrl": "https://app.sendinblue.com/marketing-dashboard" - } - } - }, - "output": { - "error": "sendinblueIncludeListIds is required to create a contact using DOI" - } - }, - { - "description": "Identify call to create DOI contact without template Id", - "input": { - "message": { - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "channel": "web", - "traits": { - "first_name": "John", - "lastName": "Doe", - "age": 19, - "email": "john_doe@example.com", - "phone": "+919876543210", - "location": "Mumbai", - "role": "SDE" - }, - "context": {}, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - }, - "destination": { - "Config": { - "apiKey": "apiKey123", - "clientKey": "clientKey123", - "doi": true, - "redirectionUrl": "https://app.sendinblue.com/marketing-dashboard" - } - } - }, - "output": { - "error": "templateId is required to create a contact using DOI" - } - }, - { - "description": "Identify call to update a DOI contact without an email or contact ID", - "input": { - "message": { - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "channel": "web", - "traits": { - "first_name": "Gordon", - "lastName": "Pittman", - "age": 19, - "location": "Mumbai", - "role": "SDE" - }, - "context": {}, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - }, - "destination": { - "Config": { - "apiKey": "apiKey123", - "clientKey": "clientKey123", - "templateId": 3, - "doi": true, - "redirectionUrl": "https://app.sendinblue.com/marketing-dashboard" - } - } - }, - "output": { - "error": "At least one of `email` or `contactId` is required to update the contact using DOI" - } - }, - { - "description": "Identify call to update a DOI contact using contactId as an Identifier and without include list Ids", - "input": { - "message": { - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "channel": "web", - "traits": { - "age": 36, - "location": "Mumbai", - "role": "SDE 2" - }, - "context": { - "externalId": [ - { - "type": "sendinblueContactId", - "id": 42 - } - ] - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - }, - "destination": { - "Config": { - "apiKey": "apiKey123", - "clientKey": "clientKey123", - "templateId": 3, - "doi": true, - "redirectionUrl": "https://app.sendinblue.com/marketing-dashboard" - } - } - }, - "output": { - "body": { - "FORM": {}, - "JSON": { - "attributes": { - "age": 36, - "location": "Mumbai", - "role": "SDE 2" - } - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://api.sendinblue.com/v3/contacts/42", - "files": {}, - "headers": { - "Content-Type": "application/json", - "api-key": "apiKey123" - }, - "method": "PUT", - "params": {}, - "type": "REST", - "version": "1" - } - }, - { - "description": "Identify call to update a DOI contact using email as an Identifier and without include list Ids", - "input": { - "message": { - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "channel": "web", - "traits": { - "age": 36, - "location": "Mumbai", - "role": "SDE 2", - "phone": "+918888888888", - "email": "gordon_pittman@example.com", - "newEmail": "gordon_pittman007@example.com" - }, - "context": { - "externalId": [ - { - "type": "sendinblueIncludeListIds", - "id": [1] - }, - { - "type": "sendinblueUnlinkListIds", - "id": [2] - } - ] - }, - "integrations": { - "All": true, - "sendinblue": { - "emailBlacklisted": true, - "smsBlacklisted": false - } - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - }, - "destination": { - "Config": { - "apiKey": "apiKey123", - "clientKey": "clientKey123", - "templateId": 3, - "doi": true, - "redirectionUrl": "https://app.sendinblue.com/marketing-dashboard" - } - } - }, - "output": { - "body": { - "FORM": {}, - "JSON": { - "attributes": { - "age": 36, - "location": "Mumbai", - "role": "SDE 2", - "SMS": "+918888888888", - "EMAIL": "gordon_pittman007@example.com" - }, - "emailBlacklisted": true, - "smsBlacklisted": false, - "listIds": [1], - "unlinkListIds": [2] - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://api.sendinblue.com/v3/contacts/gordon_pittman%40example.com", - "files": {}, - "headers": { - "Content-Type": "application/json", - "api-key": "apiKey123" - }, - "method": "PUT", - "params": {}, - "type": "REST", - "version": "1" - } - }, - { - "description": "Identify call to unlink a contact from given lists", - "input": { - "message": { - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "channel": "web", - "traits": { - "email": "eric_kim@example.com" - }, - "context": { - "externalId": [ - { - "type": "sendinblueUnlinkListIds", - "id": [2, 5] - } - ] - } - }, - "destination": { - "Config": { - "apiKey": "apiKey123", - "clientKey": "clientKey123", - "doi": false - } - } - }, - "output": [ - { - "body": { - "FORM": {}, - "JSON": { - "emails": ["eric_kim@example.com"] - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://api.sendinblue.com/v3/contacts/lists/2/contacts/remove", - "files": {}, - "headers": { - "Content-Type": "application/json", - "api-key": "apiKey123" - }, - "method": "POST", - "params": {}, - "type": "REST", - "version": "1" - }, - { - "body": { - "FORM": {}, - "JSON": { - "emails": ["eric_kim@example.com"] - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://api.sendinblue.com/v3/contacts/lists/5/contacts/remove", - "files": {}, - "headers": { - "Content-Type": "application/json", - "api-key": "apiKey123" - }, - "method": "POST", - "params": {}, - "type": "REST", - "version": "1" - } - ] - } -] diff --git a/test/__tests__/data/sendinblue_router_input.json b/test/__tests__/data/sendinblue_router_input.json deleted file mode 100644 index 1f2b8a1dc2..0000000000 --- a/test/__tests__/data/sendinblue_router_input.json +++ /dev/null @@ -1,187 +0,0 @@ -[ - { - "message": { - "type": "track", - "sentAt": "2021-01-03T17:02:53.195Z", - "channel": "web", - "event": "Order Completed", - "properties": { - "orderId": "1341394-3812392190", - "products": [ - { - "product_id": 1234, - "product_name": "Track Pants", - "amount": 1, - "price": 220 - }, - { - "product_id": 5768, - "product_name": "T-Shirt", - "amount": 5, - "price": 1058 - } - ] - }, - "context": { - "traits": { - "first_name": "John", - "lastName": "Doe", - "age": 19, - "email": "john_doe@example.com", - "phone": "+919876543210", - "location": "Mumbai", - "role": "SDE" - } - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - }, - "metadata": { - "jobId": 1 - }, - "destination": { - "Config": { - "apiKey": "apiKey123", - "clientKey": "clientKey123", - "doi": false, - "contactAttributeMapping": [ - { - "from": "location", - "to": "LOCATION" - } - ], - "sendTraitsInTrack": true - } - } - }, - { - "message": { - "type": "page", - "sentAt": "2021-01-03T17:02:53.195Z", - "channel": "web", - "name": "New Page", - "properties": { - "url": "https://www.google.com/", - "title": "Google home" - }, - "context": { - "traits": { - "email": "john_doe@example.com" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/test/ourSdk.html", - "path": "/Testing/test/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/test/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/test/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - } - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - }, - "metadata": { - "jobId": 2 - }, - "destination": { - "Config": { - "apiKey": "apiKey123", - "clientKey": "clientKey123", - "templateId": 3, - "doi": false, - "redirectionUrl": "https://app.sendinblue.com/marketing-dashboard" - } - } - }, - { - "message": { - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "channel": "web", - "traits": { - "first_name": "John", - "lastName": "Doe", - "age": 19, - "email": "john_doe@example.com", - "phone": "+919876543210", - "location": "Mumbai", - "newEmail": "alex_root@example.com", - "role": "SDE" - }, - "context": { - "externalId": [ - { - "type": "sendinblueIncludeListIds", - "id": [1, 2] - } - ] - }, - "integrations": { - "All": true, - "sendinblue": { - "emailBlacklisted": true - } - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - }, - "metadata": { - "jobId": 3 - }, - "destination": { - "Config": { - "apiKey": "apiKey123", - "clientKey": "clientKey123", - "doi": false, - "contactAttributeMapping": [ - { - "from": "location", - "to": "LOCATION" - } - ] - } - } - }, - { - "message": { - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "channel": "web", - "traits": { - "first_name": "John", - "lastName": "Doe", - "age": 19, - "email": "john_doe@example.com", - "phone": "+919876543210", - "location": "Mumbai", - "role": "SDE" - }, - "context": {}, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - }, - "metadata": { - "jobId": 4 - }, - "destination": { - "Config": { - "apiKey": "apiKey123", - "clientKey": "clientKey123", - "templateId": 3, - "doi": true, - "redirectionUrl": "https://app.sendinblue.com/marketing-dashboard" - } - } - } -] diff --git a/test/__tests__/data/sendinblue_router_output.json b/test/__tests__/data/sendinblue_router_output.json deleted file mode 100644 index c15c15205c..0000000000 --- a/test/__tests__/data/sendinblue_router_output.json +++ /dev/null @@ -1,196 +0,0 @@ -[ - { - "batched": false, - "batchedRequest": { - "body": { - "FORM": {}, - "JSON": { - "email": "john_doe@example.com", - "event": "Order Completed", - "eventdata": { - "data": { - "orderId": "1341394-3812392190", - "products": [ - { - "amount": 1, - "price": 220, - "product_id": 1234, - "product_name": "Track Pants" - }, - { - "amount": 5, - "price": 1058, - "product_id": 5768, - "product_name": "T-Shirt" - } - ] - }, - "id": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff" - }, - "properties": { - "FIRSTNAME": "John", - "LASTNAME": "Doe", - "LOCATION": "Mumbai", - "SMS": "+919876543210", - "age": 19, - "role": "SDE" - } - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://in-automate.sendinblue.com/api/v2/trackEvent", - "files": {}, - "headers": { - "Content-Type": "application/json", - "ma-key": "clientKey123" - }, - "method": "POST", - "params": {}, - "type": "REST", - "version": "1" - }, - "destination": { - "Config": { - "apiKey": "apiKey123", - "clientKey": "clientKey123", - "contactAttributeMapping": [ - { - "from": "location", - "to": "LOCATION" - } - ], - "doi": false, - "sendTraitsInTrack": true - } - }, - "metadata": [ - { - "jobId": 1 - } - ], - "statusCode": 200 - }, - { - "batched": false, - "batchedRequest": { - "body": { - "FORM": {}, - "JSON": { - "email": "john_doe@example.com", - "page": "https://www.google.com/", - "properties": { - "ma_path": "/Testing/test/ourSdk.html", - "ma_referrer": "http://127.0.0.1:7307/Testing/test/", - "ma_title": "Google home", - "sib_name": "New Page" - } - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://in-automate.sendinblue.com/api/v2/trackPage", - "files": {}, - "headers": { - "Content-Type": "application/json", - "ma-key": "clientKey123" - }, - "method": "POST", - "params": {}, - "type": "REST", - "version": "1" - }, - "destination": { - "Config": { - "apiKey": "apiKey123", - "clientKey": "clientKey123", - "doi": false, - "redirectionUrl": "https://app.sendinblue.com/marketing-dashboard", - "templateId": 3 - } - }, - "metadata": [ - { - "jobId": 2 - } - ], - "statusCode": 200 - }, - { - "batched": false, - "batchedRequest": { - "body": { - "FORM": {}, - "JSON": { - "attributes": { - "EMAIL": "alex_root@example.com", - "FIRSTNAME": "John", - "LASTNAME": "Doe", - "LOCATION": "Mumbai", - "SMS": "+919876543210", - "age": 19, - "role": "SDE" - }, - "email": "john_doe@example.com", - "emailBlacklisted": true, - "listIds": [1, 2], - "updateEnabled": true - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://api.sendinblue.com/v3/contacts", - "files": {}, - "headers": { - "Content-Type": "application/json", - "api-key": "apiKey123" - }, - "method": "POST", - "params": {}, - "type": "REST", - "version": "1" - }, - "destination": { - "Config": { - "apiKey": "apiKey123", - "clientKey": "clientKey123", - "contactAttributeMapping": [ - { - "from": "location", - "to": "LOCATION" - } - ], - "doi": false - } - }, - "metadata": [ - { - "jobId": 3 - } - ], - "statusCode": 200 - }, - { - "batched": false, - "error": "sendinblueIncludeListIds is required to create a contact using DOI", - "metadata": [ - { - "jobId": 4 - } - ], - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation" - }, - "statusCode": 400, - "destination": { - "Config": { - "apiKey": "apiKey123", - "clientKey": "clientKey123", - "templateId": 3, - "doi": true, - "redirectionUrl": "https://app.sendinblue.com/marketing-dashboard" - } - } - } -] diff --git a/test/__tests__/gainsight.test.js b/test/__tests__/gainsight.test.js deleted file mode 100644 index b0ff8d27b7..0000000000 --- a/test/__tests__/gainsight.test.js +++ /dev/null @@ -1,48 +0,0 @@ -const integration = "gainsight"; -const name = "Gainsight CS"; - -const fs = require("fs"); -const path = require("path"); -const version = "v0"; - -const transformer = require(`../../src/${version}/destinations/${integration}/transform`); -const inputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_input.json`) -); -const outputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_output.json`) -); -const inputData = JSON.parse(inputDataFile); -const expectedData = JSON.parse(outputDataFile); - -// Router Test Data -const inputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_input.json`) -); -const outputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_output.json`) -); -const inputRouterData = JSON.parse(inputRouterDataFile); -const expectedRouterData = JSON.parse(outputRouterDataFile); - -describe(`${name} Tests`, () => { - describe("Processor Tests", () => { - inputData.forEach((input, index) => { - it(`${name} - payload: ${index}`, async () => { - try { - const output = await transformer.process(input); - expect(output).toEqual(expectedData[index]); - } catch (error) { - expect(error.message).toEqual(expectedData[index].error); - } - }); - }); - }); - - describe("Router Tests", () => { - it("Payload", async () => { - const routerOutput = await transformer.processRouterDest(inputRouterData); - expect(routerOutput).toEqual(expectedRouterData); - }); - }); -}); diff --git a/test/__tests__/gainsight_px.test.js b/test/__tests__/gainsight_px.test.js deleted file mode 100644 index 24b96d008d..0000000000 --- a/test/__tests__/gainsight_px.test.js +++ /dev/null @@ -1,48 +0,0 @@ -const integration = "gainsight_px"; -const name = "Gainsight PX"; - -const fs = require("fs"); -const path = require("path"); -const version = "v0"; - -const transformer = require(`../../src/${version}/destinations/${integration}/transform`); -const inputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_input.json`) -); -const outputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_output.json`) -); -const inputData = JSON.parse(inputDataFile); -const expectedData = JSON.parse(outputDataFile); - -// Router Test Data -const inputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_input.json`) -); -const outputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_output.json`) -); -const inputRouterData = JSON.parse(inputRouterDataFile); -const expectedRouterData = JSON.parse(outputRouterDataFile); - -describe(`${name} Tests`, () => { - describe("Processor Tests", () => { - inputData.forEach((input, index) => { - it(`${name} - payload: ${index}`, async () => { - try { - const output = await transformer.process(input); - expect(output).toEqual(expectedData[index]); - } catch (error) { - expect(error.message).toEqual(expectedData[index].error); - } - }); - }); - }); - - describe("Router Tests", () => { - it("Payload", async () => { - const routerOutput = await transformer.processRouterDest(inputRouterData); - expect(routerOutput).toEqual(expectedRouterData); - }); - }); -}); diff --git a/test/__tests__/klaviyo.test.js b/test/__tests__/klaviyo.test.js deleted file mode 100644 index 209811b007..0000000000 --- a/test/__tests__/klaviyo.test.js +++ /dev/null @@ -1,47 +0,0 @@ -const fs = require("fs"); -const path = require("path"); - -const integration = "klaviyo"; -const name = "Klaviyo"; -const version = "v0"; - -const { FEATURE_FILTER_CODE } = require('../../src/v0/util/constant'); -const transformer = require(`../../src/${version}/destinations/${integration}/transform`); - -// Processor Test Data -const testDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}.json`) -); -const testData = JSON.parse(testDataFile); - -// Router Test Data -const routerTestDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router.json`) -); -const routerTestData = JSON.parse(routerTestDataFile); - -describe(`${name} Tests`, () => { - describe("Processor", () => { - testData.forEach((dataPoint, index) => { - it(`${index}. ${integration} - ${dataPoint.description}`, async () => { - try { - const output = await transformer.process(dataPoint.input); - expect(output).toEqual(dataPoint.output); - } catch (error) { - expect(error.message).toEqual(dataPoint.output.error); - } - }); - }); - }); - - describe("Router", () => { - routerTestData.forEach((dataPoint, index) => { - it(`${index}. ${integration} - ${dataPoint.description}`, async () => { - const oldTransformerOutput = await transformer.processRouterDest(dataPoint.input); - const newTransformerOutput = await transformer.processRouterDest(dataPoint.input, { features: { [FEATURE_FILTER_CODE]: true } }); - expect(oldTransformerOutput).toEqual(dataPoint.oldTransformerOutput); - expect(newTransformerOutput).toEqual(dataPoint.newTransformerOutput); - }); - }); - }); -}); diff --git a/test/__tests__/kustomer.test.js b/test/__tests__/kustomer.test.js deleted file mode 100644 index 89c5e844a9..0000000000 --- a/test/__tests__/kustomer.test.js +++ /dev/null @@ -1,49 +0,0 @@ -const integration = "kustomer"; -const name = "Kustomer"; - -const fs = require("fs"); -const path = require("path"); - -const version = "v0"; - -const transformer = require(`../../src/${version}/destinations/${integration}/transform`); -const inputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_input.json`) -); -const outputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_output.json`) -); -const inputData = JSON.parse(inputDataFile); -const expectedData = JSON.parse(outputDataFile); - -// Router Test files -const inputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_input.json`) -); -const outputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_output.json`) -); -const inputRouterData = JSON.parse(inputRouterDataFile); -const expectedRouterData = JSON.parse(outputRouterDataFile); - -describe(`${name} Tests`, () => { - describe("Processor", () => { - inputData.forEach(async (input, index) => { - it(`Payload - ${index}`, async () => { - try { - const output = await transformer.process(input); - expect(output).toEqual(expectedData[index]); - } catch (error) { - expect(error.message).toEqual(expectedData[index].error); - } - }); - }); - }); - - describe("Router Tests", () => { - it("Payload", async () => { - const routerOutput = await transformer.processRouterDest(inputRouterData); - expect(routerOutput).toEqual(expectedRouterData); - }); - }); -}); diff --git a/test/__tests__/mailchimp.test.js b/test/__tests__/mailchimp.test.js deleted file mode 100644 index 5da9d572f7..0000000000 --- a/test/__tests__/mailchimp.test.js +++ /dev/null @@ -1,67 +0,0 @@ -const integration = "mailchimp"; -const name = "Mailchimp"; - -const fs = require("fs"); -const path = require("path"); - -const version = "v0"; - -const transformer = require(`../../src/${version}/destinations/${integration}/transform`); -const inputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_input.json`) -); -const outputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_output.json`) -); -const inputData = JSON.parse(inputDataFile); -const expectedData = JSON.parse(outputDataFile); - -// Router Test Data -const inputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_input.json`) -); -const outputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_output.json`) -); -const inputRouterData = JSON.parse(inputRouterDataFile); -const expectedRouterData = JSON.parse(outputRouterDataFile); - -const batchInputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_batch_input.json`) -); -const batchOutputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_batch_output.json`) -); - -const batchInputData = JSON.parse(batchInputDataFile); -const batchExpectedData = JSON.parse(batchOutputDataFile); - -describe(`${name} Tests`, () => { - describe("Processor Tests", () => { - inputData.forEach((input, index) => { - it(`${name} - payload: ${index}`, async () => { - try { - const output = await transformer.process(input); - expect(output).toEqual(expectedData[index]); - } catch (error) { - expect(error.message).toEqual(expectedData[index].error); - } - }); - }); - }); - - describe("Router Tests", () => { - it("Payload", async () => { - const routerOutput = await transformer.processRouterDest(inputRouterData); - expect(routerOutput).toEqual(expectedRouterData); - }); - }); - - describe("Batching", () => { - it("Payload", async () => { - const output = await transformer.processRouterDest(batchInputData); - expect(Array.isArray(output)).toEqual(true); - expect(output).toEqual(batchExpectedData); - }); - }); -}); diff --git a/test/__tests__/monday.test.js b/test/__tests__/monday.test.js deleted file mode 100644 index 0344cfcf75..0000000000 --- a/test/__tests__/monday.test.js +++ /dev/null @@ -1,46 +0,0 @@ -const fs = require("fs"); -const path = require("path"); - -const integration = "monday"; -const name = "Monday"; -const version = "v0"; - -const transformer = require(`../../src/${version}/destinations/${integration}/transform`); - -// Processor Test Data -const testDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}.json`) -); -const testData = JSON.parse(testDataFile); - -// Router Test Data -const inputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_input.json`) -); -const outputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_output.json`) -); -const inputRouterData = JSON.parse(inputRouterDataFile); -const expectedRouterData = JSON.parse(outputRouterDataFile); - -describe(`${name} Tests`, () => { - describe("Processor", () => { - testData.forEach((dataPoint, index) => { - it(`${index}. ${integration} - ${dataPoint.description}`, async () => { - try { - const output = await transformer.process(dataPoint.input); - expect(output).toEqual(dataPoint.output); - } catch (error) { - expect(error.message).toEqual(dataPoint.output.error); - } - }); - }); - }); - - describe("Router Tests", () => { - it("Payload", async () => { - const routerOutput = await transformer.processRouterDest(inputRouterData); - expect(routerOutput).toEqual(expectedRouterData); - }); - }); -}); diff --git a/test/__tests__/profitwell.test.js b/test/__tests__/profitwell.test.js deleted file mode 100644 index 99ed1a4c43..0000000000 --- a/test/__tests__/profitwell.test.js +++ /dev/null @@ -1,62 +0,0 @@ -const fs = require("fs"); -const path = require("path"); -const { mockaxios } = require("../__mocks__/network"); - -const integration = "profitwell"; -const name = "profitwell"; -const version = "v0"; - -const transformer = require(`../../src/${version}/destinations/${integration}/transform`); - -// Processor Test files -const inputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_input.json`) -); -const outputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_output.json`) -); -const inputData = JSON.parse(inputDataFile); -const expectedData = JSON.parse(outputDataFile); - -// Router Test Data -const inputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_input.json`) -); -const outputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_output.json`) -); -const inputRouterData = JSON.parse(inputRouterDataFile); -const expectedRouterData = JSON.parse(outputRouterDataFile); - -jest.mock("../../src/adapters/network", () => { - const originalModule = jest.requireActual("../../src/adapters/network"); - - //Mock the default export and named export 'send' - return { - __esModule: true, - ...originalModule, - send: jest.fn(mockaxios) - }; -}); - -describe(`${name} Tests`, () => { - describe("Processor Tests", () => { - inputData.forEach((input, index) => { - it(`${name} - payload: ${index}`, async () => { - try { - const output = await transformer.process(input); - expect(output).toEqual(expectedData[index]); - } catch (error) { - expect(error.message).toEqual(expectedData[index].error); - } - }); - }); - }); - - describe("Router Tests", () => { - it("Payload", async () => { - const routerOutput = await transformer.processRouterDest(inputRouterData); - expect(routerOutput).toEqual(expectedRouterData); - }); - }); -}); diff --git a/test/__tests__/sendinblue.test.js b/test/__tests__/sendinblue.test.js deleted file mode 100644 index 063f5bf282..0000000000 --- a/test/__tests__/sendinblue.test.js +++ /dev/null @@ -1,47 +0,0 @@ -const integration = "sendinblue"; -const name = "Sendinblue"; - -const fs = require("fs"); -const path = require("path"); - -const version = "v0"; - -const transformer = require(`../../src/${version}/destinations/${integration}/transform`); - -// Processor Test files -const testDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}.json`) -); -const testData = JSON.parse(testDataFile); - -// Router Test files -const inputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_input.json`) -); -const outputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_output.json`) -); -const inputRouterData = JSON.parse(inputRouterDataFile); -const expectedRouterData = JSON.parse(outputRouterDataFile); - -describe(`${name} Tests`, () => { - describe("Processor", () => { - testData.forEach(async (dataPoint, index) => { - it(`${index}. ${integration} - ${dataPoint.description}`, async () => { - try { - const output = await transformer.process(dataPoint.input); - expect(output).toEqual(dataPoint.output); - } catch (error) { - expect(error.message).toEqual(dataPoint.output.error); - } - }); - }); - }); - - describe("Router", () => { - it("Payload", async () => { - const routerOutput = await transformer.processRouterDest(inputRouterData); - expect(routerOutput).toEqual(expectedRouterData); - }); - }); -}); diff --git a/test/integrations/destinations/am/router/data.ts b/test/integrations/destinations/am/router/data.ts index 64701c78a1..7f2e1d0329 100644 --- a/test/integrations/destinations/am/router/data.ts +++ b/test/integrations/destinations/am/router/data.ts @@ -1,316 +1,318 @@ export const data = [ - { - name: 'am', - description: 'Test 0', - feature: 'router', - module: 'destination', - version: 'v0', - input: { - request: { - body: { - input: [ - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "anonymousId": "123456", - "email": "test@rudderstack.com", - "address": { - "city": "kolkata", - "country": "India", - "postalCode": 712136, - "state": "WB", - "street": "" - }, - "ip": "0.0.0.0", - "age": 26 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "type": "identify", - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "123456", - "userId": "123456", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "metadata": { - "jobId": 1 - }, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "email", - "groupValueTrait": "age" - } - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "test@rudderstack.com", - "anonymousId": "12345" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "request_ip": "1.1.1.1", - "type": "page", - "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T11:15:18.299Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "properties": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - }, - "integrations": { - "All": true - }, - "name": "ApplicationLoaded", - "sentAt": "2019-10-14T11:15:53.296Z" - }, - "metadata": { - "jobId": 2 - }, - "destination": { - "Config": { - "apiKey": "abcde" - } - } - } - ], - destType: 'am', + { + name: 'am', + description: 'Test 0', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + anonymousId: '123456', + email: 'test@rudderstack.com', + address: { + city: 'kolkata', + country: 'India', + postalCode: 712136, + state: 'WB', + street: '', + }, + ip: '0.0.0.0', + age: 26, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + }, + type: 'identify', + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: '123456', + userId: '123456', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + metadata: { + jobId: 1, + }, + destination: { + Config: { + apiKey: 'abcde', + groupTypeTrait: 'email', + groupValueTrait: 'age', }, - method: 'POST', + }, }, + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'test@rudderstack.com', + anonymousId: '12345', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + }, + request_ip: '1.1.1.1', + type: 'page', + messageId: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T11:15:18.299Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + properties: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + integrations: { + All: true, + }, + name: 'ApplicationLoaded', + sentAt: '2019-10-14T11:15:53.296Z', + }, + metadata: { + jobId: 2, + }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, + }, + ], + destType: 'am', }, - output: { - response: { - status: 200, - body: { - output: [ + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: [ + { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ { - "batchedRequest": [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Chrome", - "os_version": "77.0.3865.90", - "device_model": "Mac", - "library": "rudderstack", - "platform": "Web", - "device_id": "123456", - "app_name": "RudderLabs JavaScript SDK", - "app_version": "1.0.0", - "language": "en-US", - "session_id": -1, - "insert_id": "84e26acc-56a5-4835-8233-591137fca468", - "city": "kolkata", - "country": "India", - "user_properties": { - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com", - "anonymousId": "123456", - "email": "test@rudderstack.com", - "postalCode": 712136, - "state": "WB", - "street": "", - "ip": "0.0.0.0", - "age": 26 - }, - "event_type": "$identify", - "time": 1571043797562, - "user_id": "123456", - "ip": "0.0.0.0" - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "123456" - } - ], - "metadata": [ - { - "jobId": 1 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "email", - "groupValueTrait": "age" - } - } + os_name: 'Chrome', + os_version: '77.0.3865.90', + device_model: 'Mac', + library: 'rudderstack', + platform: 'Web', + device_id: '123456', + app_name: 'RudderLabs JavaScript SDK', + app_version: '1.0.0', + language: 'en-US', + session_id: -1, + insert_id: '84e26acc-56a5-4835-8233-591137fca468', + city: 'kolkata', + country: 'India', + user_properties: { + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + anonymousId: '123456', + email: 'test@rudderstack.com', + postalCode: 712136, + state: 'WB', + street: '', + ip: '0.0.0.0', + age: 26, + }, + event_type: '$identify', + time: 1571043797562, + user_id: '123456', + ip: '0.0.0.0', }, + ], + options: { + min_id_length: 1, + }, + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: '123456', + }, + ], + metadata: [ + { + jobId: 1, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + apiKey: 'abcde', + groupTypeTrait: 'email', + groupValueTrait: 'age', + }, + }, + }, + { + batchedRequest: [ + { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ { - "batchedRequest": [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Chrome", - "os_version": "77.0.3865.90", - "device_model": "Mac", - "library": "rudderstack", - "platform": "Web", - "device_id": "00000000000000000000000000", - "app_name": "RudderLabs JavaScript SDK", - "app_version": "1.0.0", - "language": "en-US", - "event_type": "Viewed ApplicationLoaded Page", - "event_properties": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com", - "name": "ApplicationLoaded" - }, - "session_id": -1, - "insert_id": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", - "ip": "1.1.1.1", - "user_properties": { - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com", - "email": "test@rudderstack.com", - "anonymousId": "12345" - }, - "user_id": "12345", - "time": 1571051718299 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "00000000000000000000000000" - } - ], - "metadata": [ - { - "jobId": 2 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "apiKey": "abcde" - } - } - } - ], + os_name: 'Chrome', + os_version: '77.0.3865.90', + device_model: 'Mac', + library: 'rudderstack', + platform: 'Web', + device_id: '00000000000000000000000000', + app_name: 'RudderLabs JavaScript SDK', + app_version: '1.0.0', + language: 'en-US', + event_type: 'Viewed ApplicationLoaded Page', + event_properties: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + name: 'ApplicationLoaded', + }, + session_id: -1, + insert_id: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', + ip: '1.1.1.1', + user_properties: { + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + email: 'test@rudderstack.com', + anonymousId: '12345', + }, + user_id: '12345', + time: 1571051718299, + }, + ], + options: { + min_id_length: 1, + }, + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: '00000000000000000000000000', + }, + ], + metadata: [ + { + jobId: 2, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + apiKey: 'abcde', }, + }, }, + ], }, - } + }, + }, + }, ]; diff --git a/test/integrations/destinations/bingads_audience/processor/data.ts b/test/integrations/destinations/bingads_audience/processor/data.ts index 138bac7e82..b61f4efea8 100644 --- a/test/integrations/destinations/bingads_audience/processor/data.ts +++ b/test/integrations/destinations/bingads_audience/processor/data.ts @@ -1,1130 +1,1155 @@ export const data = [ - { - "name": "bingads_audience", - "description": "unhashed email available with hashEmail as true in config", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "userId": "user 1", - "type": "audiencelist", - "properties": { - "listData": { - "add": [ - { - "email": "alex@email.com" - }, - { - "email": "amy@abc.com" - }, - { - "email": "van@abc.com" - } - ] - } - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - }, - "destination": { - "Config": { - "customerAccountId": "89236978", - "customerId": "78678678", - "audienceId": "564567", - "hashEmail": true - }, - "DestinationDefinition": { - "Config": { - "cdkV2Enabled": true - } - } - }, - "metadata": { - "destinationId": 1234 - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "", - "headers": {}, - "params": {}, - "body": { - "JSON": { - "list": [ - { - "hashedEmail": "ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b", - "email": "alex@email.com" - }, - { - "hashedEmail": "49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579", - "email": "amy@abc.com" - }, - { - "hashedEmail": "2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c", - "email": "van@abc.com" - } - ], - "action": "Add" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "metadata": { - "destinationId": 1234 - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "bingads_audience", - "description": "hashed email available with hashEmail as false in config", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "userId": "user 1", - "type": "audiencelist", - "properties": { - "listData": { - "add": [ - { - "email": "ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b" - }, - { - "email": "49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579" - }, - { - "email": "2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c" - } - ] - } - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - }, - "destination": { - "Config": { - "customerAccountId": "89236978", - "customerId": "78678678", - "audienceId": "564567", - "hashEmail": false - }, - "DestinationDefinition": { - "Config": { - "cdkV2Enabled": true - } - } - }, - "metadata": { - "destinationId": 1234 - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "", - "headers": {}, - "params": {}, - "body": { - "JSON": { - "list": [ - { - "hashedEmail": "ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b", - "email": "ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b" - }, - { - "hashedEmail": "49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579", - "email": "49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579" - }, - { - "hashedEmail": "2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c", - "email": "2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c" - } - ], - "action": "Add" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "metadata": { - "destinationId": 1234 - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "bingads_audience", - "description": "Unsupported action type", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "userId": "user 1", - "type": "audiencelist", - "properties": { - "listData": { - "addition": [ - { - "email": "alex@email.com" - }, - { - "email": "amy@abc.com" - }, - { - "email": "van@abc.com" - } - ] - } - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - }, - "destination": { - "Config": { - "customerAccountId": "89236978", - "customerId": "78678678", - "audienceId": "564567", - "hashEmail": true - }, - "DestinationDefinition": { - "Config": { - "cdkV2Enabled": true - } - } - }, - "metadata": { - "destinationId": 1234 - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "metadata": { - "destinationId": 1234 - }, - "statusCode": 400, - "error": "unsupported action type. Aborting message.: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: unsupported action type. Aborting message.", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation", - "implementation": "cdkV2", - "destType": "BINGADS_AUDIENCE", - "module": "destination", - "feature": "processor", - "destinationId": 1234 - } - } - ] - } - } - }, - { - "name": "bingads_audience", - "description": "Unsupported event type", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "userId": "user 1", - "type": "track", - "properties": { - "listData": { - "add": [ - { - "email": "alex@email.com" - }, - { - "email": "amy@abc.com" - }, - { - "email": "van@abc.com" - } - ] - } - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - }, - "destination": { - "Config": { - "customerAccountId": "89236978", - "customerId": "78678678", - "audienceId": "564567", - "hashEmail": true - }, - "DestinationDefinition": { - "Config": { - "cdkV2Enabled": true - } - } - }, - "metadata": { - "destinationId": 1234 - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "metadata": { - "destinationId": 1234 - }, - "statusCode": 400, - "error": "Event type track is not supported. Aborting message.: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: Event type track is not supported. Aborting message.", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation", - "implementation": "cdkV2", - "destType": "BINGADS_AUDIENCE", - "module": "destination", - "feature": "processor", - "destinationId": 1234 - } - } - ] - } - } - }, - { - "name": "bingads_audience", - "description": "event type not present", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "userId": "user 1", - "type": "", - "properties": { - "listData": { - "add": [ - { - "email": "alex@email.com" - }, - { - "email": "amy@abc.com" - }, - { - "email": "van@abc.com" - } - ] - } - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - }, - "destination": { - "Config": { - "customerAccountId": "89236978", - "customerId": "78678678", - "audienceId": "564567", - "hashEmail": true - }, - "DestinationDefinition": { - "Config": { - "cdkV2Enabled": true - } - } - }, - "metadata": { - "destinationId": 1234 - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "metadata": { - "destinationId": 1234 - }, - "statusCode": 400, - "error": "message Type is not present. Aborting message.: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: message Type is not present. Aborting message.", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation", - "implementation": "cdkV2", - "destType": "BINGADS_AUDIENCE", - "module": "destination", - "feature": "processor", - "destinationId": 1234 - } - } - ] - } - } - }, - { - "name": "bingads_audience", - "description": "Message properties is not present", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "userId": "user 1", - "type": "audiencelist", - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - }, - "destination": { - "Config": { - "customerAccountId": "89236978", - "customerId": "78678678", - "audienceId": "564567", - "hashEmail": true - }, - "DestinationDefinition": { - "Config": { - "cdkV2Enabled": true - } - } - }, - "metadata": { - "destinationId": 1234 - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "metadata": { - "destinationId": 1234 - }, - "statusCode": 400, - "error": "Message properties is not present. Aborting message.: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: Message properties is not present. Aborting message.", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation", - "implementation": "cdkV2", - "destType": "BINGADS_AUDIENCE", - "module": "destination", - "feature": "processor", - "destinationId": 1234 - } - } - ] - } - } - }, - { - "name": "bingads_audience", - "description": "listData is not present in properties", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "userId": "user 1", - "type": "audiencelist", - "properties": {}, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - }, - "destination": { - "Config": { - "customerAccountId": "89236978", - "customerId": "78678678", - "audienceId": "564567", - "hashEmail": true - }, - "DestinationDefinition": { - "Config": { - "cdkV2Enabled": true - } - } - }, - "metadata": { - "destinationId": 1234 - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "metadata": { - "destinationId": 1234 - }, - "statusCode": 400, - "error": "listData is not present inside properties. Aborting message.: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: listData is not present inside properties. Aborting message.", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation", - "implementation": "cdkV2", - "destType": "BINGADS_AUDIENCE", - "module": "destination", - "feature": "processor", - "destinationId": 1234 - } - } - ] - } - } - }, - { - "name": "bingads_audience", - "description": "Both add and remove are present in listData", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "userId": "user 1", - "type": "audiencelist", - "properties": { - "listData": { - "remove": [ - { - "email": "ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b" - }, - { - "email": "49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579" - }, - { - "email": "2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c" - } - ], - "update": [ - { - "email": "ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b" - }, - { - "email": "49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579" - }, - { - "email": "2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c" - } - ] - } - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - }, - "destination": { - "Config": { - "customerAccountId": "89236978", - "customerId": "78678678", - "audienceId": "564567", - "hashEmail": false - }, - "DestinationDefinition": { - "Config": { - "cdkV2Enabled": true - } - } - }, - "metadata": { - "destinationId": 1234 - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "", - "headers": {}, - "params": {}, - "body": { - "JSON": { - "list": [ - { - "hashedEmail": "ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b", - "email": "ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b" - }, - { - "hashedEmail": "49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579", - "email": "49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579" - }, - { - "hashedEmail": "2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c", - "email": "2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c" - } - ], - "action": "Remove" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "metadata": { - "destinationId": 1234 - }, - "statusCode": 200 - }, - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "", - "headers": {}, - "params": {}, - "body": { - "JSON": { - "list": [ - { - "hashedEmail": "ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b", - "email": "ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b" - }, - { - "hashedEmail": "49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579", - "email": "49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579" - }, - { - "hashedEmail": "2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c", - "email": "2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c" - } - ], - "action": "Replace" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "metadata": { - "destinationId": 1234 - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "bingads_audience", - "description": "Only single user data is present", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "userId": "user 1", - "type": "audiencelist", - "properties": { - "listData": { - "add": [ - { - "email": "alex@email.com" - } - ] - } - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - }, - "metadata": { - "sourceType": "", - "destinationType": "", - "namespace": "" - }, - "destination": { - "DestinationDefinition": { - "Config": { - "cdkV2Enabled": true - } - }, - "Config": { - "customerAccountId": "89236978", - "customerId": "78678678", - "audienceId": "564567", - "hashEmail": true - } - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "", - "headers": {}, - "params": {}, - "body": { - "JSON": { - "list": [ - { - "hashedEmail": "ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b", - "email": "alex@email.com" - } - ], - "action": "Add" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "metadata": { - "sourceType": "", - "destinationType": "", - "namespace": "" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "bingads_audience", - "description": "unhashed email available with hashEmail as true in config", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - message: { - userId: 'user 1', - type: 'audiencelist', - properties: { - listData: { - add: [ - { - email: 'alex@email.com', - }, - { - email: 'amy@abc.com', - }, - { - email: 'van@abc.com', - }, - ], - }, - }, - context: { - ip: '14.5.67.21', - library: { - name: 'http', - }, - }, - timestamp: '2020-02-02T00:23:09.544Z', - }, - destination: { - DestinationDefinition: { - "Config": { - "cdkV2Enabled": true - } - }, - Config: { - customerAccountId: '89236978', - customerId: '78678678', - audienceId: '564567', - hashEmail: true, - }, - }, - "metadata": { - "sourceType": "", - "destinationType": "", - "namespace": "" - }, - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "metadata": { - "destinationType": "", - "namespace": "", - "sourceType": "", - }, - "output": { - "body": { - "FORM": {}, - "JSON": { - list: [ - { - hashedEmail: 'ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b', - email: 'alex@email.com', - }, - { - hashedEmail: '49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579', - email: 'amy@abc.com', - }, - { - hashedEmail: '2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c', - email: 'van@abc.com', - }, - ], - action: 'Add', - }, - "JSON_ARRAY": {}, - "XML": {}, - }, - "endpoint": "", - "files": {}, - "headers": {}, - "method": "POST", - "params": {}, - "type": "REST", - "userId": "", - "version": "1", - }, - "statusCode": 200, - } - ] - } - } - }, - { - "name": "bingads_audience", - "description": "hashed email available with hashEmail as false in config", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - message: { - userId: 'user 1', - type: 'audiencelist', - properties: { - listData: { - update: [ - { - email: 'ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b', - }, - { - email: '49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579', - }, - ], - remove: [ - { - email: '2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c', - }, - ], - }, - }, - context: { - ip: '14.5.67.21', - library: { - name: 'http', - }, - }, - timestamp: '2020-02-02T00:23:09.544Z', - }, - destination: { - "DestinationDefinition": { - "Config": { - "cdkV2Enabled": true - } - }, - Config: { - customerAccountId: '89236978', - customerId: '78678678', - audienceId: '564567', - hashEmail: false, - }, - }, - "metadata": { - "sourceType": "", - "destinationType": "", - "namespace": "" - }, - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "", - "headers": {}, - "params": {}, - "body": { - "JSON": { - "list": [ - { - "hashedEmail": "ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b", - "email": "ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b" - }, - { - "hashedEmail": "49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579", - "email": "49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579" - } - ], - "action": "Replace" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "metadata": { - "sourceType": "", - "destinationType": "", - "namespace": "" - }, - "statusCode": 200 - }, - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "", - "headers": {}, - "params": {}, - "body": { - "JSON": { - "list": [ - { - "hashedEmail": "2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c", - "email": "2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c" - } - ], - "action": "Remove" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "metadata": { - "sourceType": "", - "destinationType": "", - "namespace": "" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "bingads_audience", - "description": "validateInput should fail when properties are missing", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - message: { - userId: 'user 1', - type: 'audiencelist', - context: { - ip: '14.5.67.21', - library: { - name: 'http', - }, - }, - timestamp: '2020-02-02T00:23:09.544Z', - }, - destination: { - "DestinationDefinition": { - "Config": { - "cdkV2Enabled": true - } - }, - Config: { - customerAccountId: '89236978', - customerId: '78678678', - audienceId: '564567', - hashEmail: false, - }, - }, - "metadata": { - "sourceType": "", - "destinationType": "", - "namespace": "" - }, - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "metadata": { - "sourceType": "", - "destinationType": "", - "namespace": "" - }, - "statusCode": 400, - "error": "Message properties is not present. Aborting message.: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: Message properties is not present. Aborting message.", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation", - "implementation": "cdkV2", - "destType": "BINGADS_AUDIENCE", - "module": "destination", - "feature": "processor" - } - } - ] - } - } - } -] \ No newline at end of file + { + name: 'bingads_audience', + description: 'unhashed email available with hashEmail as true in config', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user 1', + type: 'audiencelist', + properties: { + listData: { + add: [ + { + email: 'alex@email.com', + }, + { + email: 'amy@abc.com', + }, + { + email: 'van@abc.com', + }, + ], + }, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + Config: { + customerAccountId: '89236978', + customerId: '78678678', + audienceId: '564567', + hashEmail: true, + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + metadata: { + destinationId: 1234, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: '', + headers: {}, + params: {}, + body: { + JSON: { + list: [ + { + hashedEmail: + 'ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b', + email: 'alex@email.com', + }, + { + hashedEmail: + '49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579', + email: 'amy@abc.com', + }, + { + hashedEmail: + '2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c', + email: 'van@abc.com', + }, + ], + action: 'Add', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + destinationId: 1234, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'bingads_audience', + description: 'hashed email available with hashEmail as false in config', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user 1', + type: 'audiencelist', + properties: { + listData: { + add: [ + { + email: 'ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b', + }, + { + email: '49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579', + }, + { + email: '2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c', + }, + ], + }, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + Config: { + customerAccountId: '89236978', + customerId: '78678678', + audienceId: '564567', + hashEmail: false, + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + metadata: { + destinationId: 1234, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: '', + headers: {}, + params: {}, + body: { + JSON: { + list: [ + { + hashedEmail: + 'ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b', + email: 'ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b', + }, + { + hashedEmail: + '49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579', + email: '49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579', + }, + { + hashedEmail: + '2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c', + email: '2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c', + }, + ], + action: 'Add', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + destinationId: 1234, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'bingads_audience', + description: 'Unsupported action type', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user 1', + type: 'audiencelist', + properties: { + listData: { + addition: [ + { + email: 'alex@email.com', + }, + { + email: 'amy@abc.com', + }, + { + email: 'van@abc.com', + }, + ], + }, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + Config: { + customerAccountId: '89236978', + customerId: '78678678', + audienceId: '564567', + hashEmail: true, + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + metadata: { + destinationId: 1234, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + destinationId: 1234, + }, + statusCode: 400, + error: + 'unsupported action type. Aborting message.: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: unsupported action type. Aborting message.', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + implementation: 'cdkV2', + destType: 'BINGADS_AUDIENCE', + module: 'destination', + feature: 'processor', + destinationId: 1234, + }, + }, + ], + }, + }, + }, + { + name: 'bingads_audience', + description: 'Unsupported event type', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user 1', + type: 'track', + properties: { + listData: { + add: [ + { + email: 'alex@email.com', + }, + { + email: 'amy@abc.com', + }, + { + email: 'van@abc.com', + }, + ], + }, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + Config: { + customerAccountId: '89236978', + customerId: '78678678', + audienceId: '564567', + hashEmail: true, + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + metadata: { + destinationId: 1234, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + destinationId: 1234, + }, + statusCode: 400, + error: + 'Event type track is not supported. Aborting message.: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: Event type track is not supported. Aborting message.', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + implementation: 'cdkV2', + destType: 'BINGADS_AUDIENCE', + module: 'destination', + feature: 'processor', + destinationId: 1234, + }, + }, + ], + }, + }, + }, + { + name: 'bingads_audience', + description: 'event type not present', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user 1', + type: '', + properties: { + listData: { + add: [ + { + email: 'alex@email.com', + }, + { + email: 'amy@abc.com', + }, + { + email: 'van@abc.com', + }, + ], + }, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + Config: { + customerAccountId: '89236978', + customerId: '78678678', + audienceId: '564567', + hashEmail: true, + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + metadata: { + destinationId: 1234, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + destinationId: 1234, + }, + statusCode: 400, + error: + 'message Type is not present. Aborting message.: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: message Type is not present. Aborting message.', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + implementation: 'cdkV2', + destType: 'BINGADS_AUDIENCE', + module: 'destination', + feature: 'processor', + destinationId: 1234, + }, + }, + ], + }, + }, + }, + { + name: 'bingads_audience', + description: 'Message properties is not present', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user 1', + type: 'audiencelist', + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + Config: { + customerAccountId: '89236978', + customerId: '78678678', + audienceId: '564567', + hashEmail: true, + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + metadata: { + destinationId: 1234, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + destinationId: 1234, + }, + statusCode: 400, + error: + 'Message properties is not present. Aborting message.: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: Message properties is not present. Aborting message.', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + implementation: 'cdkV2', + destType: 'BINGADS_AUDIENCE', + module: 'destination', + feature: 'processor', + destinationId: 1234, + }, + }, + ], + }, + }, + }, + { + name: 'bingads_audience', + description: 'listData is not present in properties', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user 1', + type: 'audiencelist', + properties: {}, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + Config: { + customerAccountId: '89236978', + customerId: '78678678', + audienceId: '564567', + hashEmail: true, + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + metadata: { + destinationId: 1234, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + destinationId: 1234, + }, + statusCode: 400, + error: + 'listData is not present inside properties. Aborting message.: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: listData is not present inside properties. Aborting message.', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + implementation: 'cdkV2', + destType: 'BINGADS_AUDIENCE', + module: 'destination', + feature: 'processor', + destinationId: 1234, + }, + }, + ], + }, + }, + }, + { + name: 'bingads_audience', + description: 'Both add and remove are present in listData', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user 1', + type: 'audiencelist', + properties: { + listData: { + remove: [ + { + email: 'ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b', + }, + { + email: '49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579', + }, + { + email: '2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c', + }, + ], + update: [ + { + email: 'ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b', + }, + { + email: '49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579', + }, + { + email: '2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c', + }, + ], + }, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + Config: { + customerAccountId: '89236978', + customerId: '78678678', + audienceId: '564567', + hashEmail: false, + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + metadata: { + destinationId: 1234, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: '', + headers: {}, + params: {}, + body: { + JSON: { + list: [ + { + hashedEmail: + 'ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b', + email: 'ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b', + }, + { + hashedEmail: + '49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579', + email: '49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579', + }, + { + hashedEmail: + '2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c', + email: '2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c', + }, + ], + action: 'Remove', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + destinationId: 1234, + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: '', + headers: {}, + params: {}, + body: { + JSON: { + list: [ + { + hashedEmail: + 'ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b', + email: 'ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b', + }, + { + hashedEmail: + '49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579', + email: '49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579', + }, + { + hashedEmail: + '2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c', + email: '2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c', + }, + ], + action: 'Replace', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + destinationId: 1234, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'bingads_audience', + description: 'Only single user data is present', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user 1', + type: 'audiencelist', + properties: { + listData: { + add: [ + { + email: 'alex@email.com', + }, + ], + }, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + metadata: { + sourceType: '', + destinationType: '', + namespace: '', + }, + destination: { + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + Config: { + customerAccountId: '89236978', + customerId: '78678678', + audienceId: '564567', + hashEmail: true, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: '', + headers: {}, + params: {}, + body: { + JSON: { + list: [ + { + hashedEmail: + 'ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b', + email: 'alex@email.com', + }, + ], + action: 'Add', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + sourceType: '', + destinationType: '', + namespace: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'bingads_audience', + description: 'unhashed email available with hashEmail as true in config', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user 1', + type: 'audiencelist', + properties: { + listData: { + add: [ + { + email: 'alex@email.com', + }, + { + email: 'amy@abc.com', + }, + { + email: 'van@abc.com', + }, + ], + }, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + Config: { + customerAccountId: '89236978', + customerId: '78678678', + audienceId: '564567', + hashEmail: true, + }, + }, + metadata: { + sourceType: '', + destinationType: '', + namespace: '', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + destinationType: '', + namespace: '', + sourceType: '', + }, + output: { + body: { + FORM: {}, + JSON: { + list: [ + { + hashedEmail: + 'ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b', + email: 'alex@email.com', + }, + { + hashedEmail: + '49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579', + email: 'amy@abc.com', + }, + { + hashedEmail: + '2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c', + email: 'van@abc.com', + }, + ], + action: 'Add', + }, + JSON_ARRAY: {}, + XML: {}, + }, + endpoint: '', + files: {}, + headers: {}, + method: 'POST', + params: {}, + type: 'REST', + userId: '', + version: '1', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'bingads_audience', + description: 'hashed email available with hashEmail as false in config', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user 1', + type: 'audiencelist', + properties: { + listData: { + update: [ + { + email: 'ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b', + }, + { + email: '49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579', + }, + ], + remove: [ + { + email: '2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c', + }, + ], + }, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + Config: { + customerAccountId: '89236978', + customerId: '78678678', + audienceId: '564567', + hashEmail: false, + }, + }, + metadata: { + sourceType: '', + destinationType: '', + namespace: '', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: '', + headers: {}, + params: {}, + body: { + JSON: { + list: [ + { + hashedEmail: + 'ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b', + email: 'ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b', + }, + { + hashedEmail: + '49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579', + email: '49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579', + }, + ], + action: 'Replace', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + sourceType: '', + destinationType: '', + namespace: '', + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: '', + headers: {}, + params: {}, + body: { + JSON: { + list: [ + { + hashedEmail: + '2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c', + email: '2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c', + }, + ], + action: 'Remove', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + sourceType: '', + destinationType: '', + namespace: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'bingads_audience', + description: 'validateInput should fail when properties are missing', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user 1', + type: 'audiencelist', + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + Config: { + customerAccountId: '89236978', + customerId: '78678678', + audienceId: '564567', + hashEmail: false, + }, + }, + metadata: { + sourceType: '', + destinationType: '', + namespace: '', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + sourceType: '', + destinationType: '', + namespace: '', + }, + statusCode: 400, + error: + 'Message properties is not present. Aborting message.: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: Message properties is not present. Aborting message.', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + implementation: 'cdkV2', + destType: 'BINGADS_AUDIENCE', + module: 'destination', + feature: 'processor', + }, + }, + ], + }, + }, + }, +]; diff --git a/test/integrations/destinations/braze/processor/data.ts b/test/integrations/destinations/braze/processor/data.ts index 9adde226a0..58c54bb232 100644 --- a/test/integrations/destinations/braze/processor/data.ts +++ b/test/integrations/destinations/braze/processor/data.ts @@ -3701,81 +3701,82 @@ export const data = [ request: { body: [ { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false, - "sendPurchaseEventWithExtraProperties": true - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "message": { - "anonymousId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "channel": "web", - "context": { - "traits": { - "city": "Disney", - "country": "USA", - "email": null, - "firstname": "Mickey" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" - }, - "event": "Order Completed", - "integrations": { - "All": true - }, - "messageId": "aa5f5e44-8756-40ad-ad1e-b0d3b9fa710a", - "originalTimestamp": "2020-01-24T06:29:02.367Z", - "properties": { - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f", - "coupon": "hasbros", - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "products": [ + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + sendPurchaseEventWithExtraProperties: true, + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + message: { + anonymousId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + channel: 'web', + context: { + traits: { + city: 'Disney', + country: 'USA', + email: null, + firstname: 'Mickey', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36', + }, + event: 'Order Completed', + integrations: { + All: true, + }, + messageId: 'aa5f5e44-8756-40ad-ad1e-b0d3b9fa710a', + originalTimestamp: '2020-01-24T06:29:02.367Z', + properties: { + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + coupon: 'hasbros', + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + products: [ { - "category": "Games", - "image_url": "https:///www.example.com/product/path.jpg", - "name": "Monopoly: 3rd Edition", - "price": 0, - "product_id": "507f1f77bcf86cd799439023", - "quantity": 1, - "sku": "45790-32", - "url": "https://www.example.com/product/path" + category: 'Games', + image_url: 'https:///www.example.com/product/path.jpg', + name: 'Monopoly: 3rd Edition', + price: 0, + product_id: '507f1f77bcf86cd799439023', + quantity: 1, + sku: '45790-32', + url: 'https://www.example.com/product/path', }, { - "category": "Games", - "name": "Uno Card Game", - "price": 0, - "product_id": "505bd76785ebb509fc183724", - "quantity": 2, - "sku": "46493-32" - } + category: 'Games', + name: 'Uno Card Game', + price: 0, + product_id: '505bd76785ebb509fc183724', + quantity: 2, + sku: '46493-32', + }, ], - "revenue": 25, - "shipping": 3, - "subtotal": 22.5, - "tax": 2, - "total": 27.5 - }, - "receivedAt": "2020-01-24T11:59:02.403+05:30", - "request_ip": "[::1]:53712", - "sentAt": "2020-01-24T06:29:02.368Z", - "timestamp": "2020-01-24T11:59:02.402+05:30", - "type": "track", - "userId": "" - } + revenue: 25, + shipping: 3, + subtotal: 22.5, + tax: 2, + total: 27.5, + }, + receivedAt: '2020-01-24T11:59:02.403+05:30', + request_ip: '[::1]:53712', + sentAt: '2020-01-24T06:29:02.368Z', + timestamp: '2020-01-24T11:59:02.402+05:30', + type: 'track', + userId: '', + }, }, ], }, @@ -3783,82 +3784,83 @@ export const data = [ output: { response: { status: 200, - body: [{ - output: { - "body": { - "FORM": {}, - "JSON": { - "attributes": [ - { - "_update_existing_only": false, - "city": "Disney", - "country": "USA", - "email": null, - "firstname": "Mickey", - "user_alias": { - "alias_label": "rudder_id", - "alias_name": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca" - } - } - ], - "partner": "RudderStack", - "purchases": [ - { - "_update_existing_only": false, - "currency": "USD", - "price": 0, - "product_id": "507f1f77bcf86cd799439023", - "properties": { - "category": "Games", - "image_url": "https:///www.example.com/product/path.jpg", - "name": "Monopoly: 3rd Edition", - "url": "https://www.example.com/product/path" + body: [ + { + output: { + body: { + FORM: {}, + JSON: { + attributes: [ + { + _update_existing_only: false, + city: 'Disney', + country: 'USA', + email: null, + firstname: 'Mickey', + user_alias: { + alias_label: 'rudder_id', + alias_name: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + }, }, - "quantity": 1, - "time": "2020-01-24T11:59:02.402+05:30", - "user_alias": { - "alias_label": "rudder_id", - "alias_name": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca" - } - }, - { - "_update_existing_only": false, - "currency": "USD", - "price": 0, - "product_id": "505bd76785ebb509fc183724", - "properties": { - "category": "Games", - "name": "Uno Card Game" + ], + partner: 'RudderStack', + purchases: [ + { + _update_existing_only: false, + currency: 'USD', + price: 0, + product_id: '507f1f77bcf86cd799439023', + properties: { + category: 'Games', + image_url: 'https:///www.example.com/product/path.jpg', + name: 'Monopoly: 3rd Edition', + url: 'https://www.example.com/product/path', + }, + quantity: 1, + time: '2020-01-24T11:59:02.402+05:30', + user_alias: { + alias_label: 'rudder_id', + alias_name: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + }, }, - "quantity": 2, - "time": "2020-01-24T11:59:02.402+05:30", - "user_alias": { - "alias_label": "rudder_id", - "alias_name": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca" - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://rest.fra-01.braze.eu/users/track", - "files": {}, - "headers": { - "Accept": "application/json", - "Authorization": "Bearer dummyApiKey", - "Content-Type": "application/json" - }, - "method": "POST", - "params": {}, - "type": "REST", - "userId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "version": "1" + { + _update_existing_only: false, + currency: 'USD', + price: 0, + product_id: '505bd76785ebb509fc183724', + properties: { + category: 'Games', + name: 'Uno Card Game', + }, + quantity: 2, + time: '2020-01-24T11:59:02.402+05:30', + user_alias: { + alias_label: 'rudder_id', + alias_name: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + }, + endpoint: 'https://rest.fra-01.braze.eu/users/track', + files: {}, + headers: { + Accept: 'application/json', + Authorization: 'Bearer dummyApiKey', + 'Content-Type': 'application/json', + }, + method: 'POST', + params: {}, + type: 'REST', + userId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + version: '1', + }, + statusCode: 200, }, - statusCode: 200, - }, ], }, }, - } + }, ]; diff --git a/test/integrations/destinations/braze/router/data.ts b/test/integrations/destinations/braze/router/data.ts index 240f1333dd..2e3be35b01 100644 --- a/test/integrations/destinations/braze/router/data.ts +++ b/test/integrations/destinations/braze/router/data.ts @@ -1,919 +1,925 @@ export const data = [ - { - name: 'braze', - description: 'simple router tests', - feature: 'router', - module: 'destination', - version: 'v0', - input: { - request: { - body: { - input: [ + { + name: 'braze', + description: 'simple router tests', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + dataCenter: 'eu-01', + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + metadata: { + jobId: 1, + }, + message: { + anonymousId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.5', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36', + }, + integrations: { + All: true, + }, + messageId: 'dd266c67-9199-4a52-ba32-f46ddde67312', + originalTimestamp: '2020-01-24T06:29:02.358Z', + properties: { + path: '/tests/html/index2.html', + referrer: '', + search: '', + title: '', + url: 'http://localhost/tests/html/index2.html', + }, + receivedAt: '2020-01-24T11:59:02.403+05:30', + request_ip: '[::1]:53708', + sentAt: '2020-01-24T06:29:02.359Z', + timestamp: '2020-01-24T11:59:02.402+05:30', + type: 'page', + userId: '', + }, + }, + { + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + dataCenter: 'us-01', + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + metadata: { + jobId: 2, + }, + message: { + anonymousId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.5', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + city: 'Disney', + country: 'USA', + email: 'mickey@disney.com', + firstname: 'Mickey', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36', + }, + integrations: { + All: true, + }, + messageId: '2536eda4-d638-4c93-8014-8ffe3f083214', + originalTimestamp: '2020-01-24T06:29:02.362Z', + receivedAt: '2020-01-24T11:59:02.403+05:30', + request_ip: '[::1]:53709', + sentAt: '2020-01-24T06:29:02.363Z', + timestamp: '2020-01-24T11:59:02.402+05:30', + type: 'identify', + userId: '', + }, + }, + { + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + dataCenter: 'us-01', + enableSubscriptionGroupInGroupCall: true, + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + metadata: { + jobId: 3, + }, + message: { + anonymousId: '56yrtsdfgbgxcb-22b4-401d-aae5-1b994be9a969', + groupId: 'c90f0fd2-2a02-4f2f-bf07-7e7d2c2ed2b1', + traits: { + phone: '5055077683', + subscriptionState: 'subscribed', + }, + userId: 'user123', + type: 'group', + }, + }, + { + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + dataCenter: 'us-01', + enableSubscriptionGroupInGroupCall: true, + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + metadata: { + jobId: 4, + }, + message: { + anonymousId: 'dfgdfgdfg-22b4-401d-aae5-1b994be9a969', + groupId: '58d0a278-b55b-4f10-b7d2-98d1c5dd4c30', + traits: { + phone: '5055077683', + subscriptionState: 'subscribed', + }, + userId: 'user877', + type: 'group', + }, + }, + { + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + dataCenter: 'us-01', + enableSubscriptionGroupInGroupCall: true, + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + metadata: { + jobId: 5, + }, + message: { + type: 'alias', + previousId: 'adsfsaf', + userId: 'dsafsdf', + }, + }, + { + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + dataCenter: 'us-01', + enableSubscriptionGroupInGroupCall: true, + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + metadata: { + jobId: 6, + }, + message: { + type: 'alias', + previousId: 'adsfsaf2', + userId: 'dsafsdf2', + }, + }, + ], + destType: 'braze', + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: [ + { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rest.fra-01.braze.eu/users/track', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + partner: 'RudderStack', + events: [ { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false, - "dataCenter": "eu-01" - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "metadata": { - "jobId": 1 - }, - "message": { - "anonymousId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.5" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.5" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" - }, - "integrations": { - "All": true - }, - "messageId": "dd266c67-9199-4a52-ba32-f46ddde67312", - "originalTimestamp": "2020-01-24T06:29:02.358Z", - "properties": { - "path": "/tests/html/index2.html", - "referrer": "", - "search": "", - "title": "", - "url": "http://localhost/tests/html/index2.html" - }, - "receivedAt": "2020-01-24T11:59:02.403+05:30", - "request_ip": "[::1]:53708", - "sentAt": "2020-01-24T06:29:02.359Z", - "timestamp": "2020-01-24T11:59:02.402+05:30", - "type": "page", - "userId": "" - } + name: 'Page Viewed', + time: '2020-01-24T11:59:02.402+05:30', + properties: { + path: '/tests/html/index2.html', + referrer: '', + search: '', + title: '', + url: 'http://localhost/tests/html/index2.html', + }, + _update_existing_only: false, + user_alias: { + alias_name: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + alias_label: 'rudder_id', + }, }, + ], + attributes: [ { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false, - "dataCenter": "us-01" - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "metadata": { - "jobId": 2 - }, - "message": { - "anonymousId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.5" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.5" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "city": "Disney", - "country": "USA", - "email": "mickey@disney.com", - "firstname": "Mickey" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" - }, - "integrations": { - "All": true - }, - "messageId": "2536eda4-d638-4c93-8014-8ffe3f083214", - "originalTimestamp": "2020-01-24T06:29:02.362Z", - "receivedAt": "2020-01-24T11:59:02.403+05:30", - "request_ip": "[::1]:53709", - "sentAt": "2020-01-24T06:29:02.363Z", - "timestamp": "2020-01-24T11:59:02.402+05:30", - "type": "identify", - "userId": "" - } + email: 'mickey@disney.com', + city: 'Disney', + country: 'USA', + firstname: 'Mickey', + _update_existing_only: false, + user_alias: { + alias_name: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + alias_label: 'rudder_id', + }, }, + ], + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + }, + { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rest.fra-01.braze.eu/v2/subscription/status/set', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + subscription_groups: [ { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false, - "dataCenter": "us-01", - "enableSubscriptionGroupInGroupCall": true - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "metadata": { - "jobId": 3 - }, - "message": { - "anonymousId": "56yrtsdfgbgxcb-22b4-401d-aae5-1b994be9a969", - "groupId": "c90f0fd2-2a02-4f2f-bf07-7e7d2c2ed2b1", - "traits": { - "phone": "5055077683", - "subscriptionState": "subscribed" - }, - "userId": "user123", - "type": "group" - } + external_id: ['user123'], + phones: ['5055077683'], + subscription_group_id: 'c90f0fd2-2a02-4f2f-bf07-7e7d2c2ed2b1', + subscription_state: 'subscribed', }, { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false, - "dataCenter": "us-01", - "enableSubscriptionGroupInGroupCall": true - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "metadata": { - "jobId": 4 - }, - "message": { - "anonymousId": "dfgdfgdfg-22b4-401d-aae5-1b994be9a969", - "groupId": "58d0a278-b55b-4f10-b7d2-98d1c5dd4c30", - "traits": { - "phone": "5055077683", - "subscriptionState": "subscribed" - }, - "userId": "user877", - "type": "group" - } + external_id: ['user877'], + phones: ['5055077683'], + subscription_group_id: '58d0a278-b55b-4f10-b7d2-98d1c5dd4c30', + subscription_state: 'subscribed', }, + ], + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + }, + { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rest.fra-01.braze.eu/users/merge', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + merge_updates: [ { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false, - "dataCenter": "us-01", - "enableSubscriptionGroupInGroupCall": true - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "metadata": { - "jobId": 5 - }, - "message": { - "type": "alias", - "previousId": "adsfsaf", - "userId": "dsafsdf" - } + identifier_to_keep: { + external_id: 'dsafsdf', + }, + identifier_to_merge: { + external_id: 'adsfsaf', + }, }, { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false, - "dataCenter": "us-01", - "enableSubscriptionGroupInGroupCall": true - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "metadata": { - "jobId": 6 - }, - "message": { - "type": "alias", - "previousId": "adsfsaf2", - "userId": "dsafsdf2" - } - } - ], - destType: 'braze', - }, - method: 'POST', + identifier_to_keep: { + external_id: 'dsafsdf2', + }, + identifier_to_merge: { + external_id: 'adsfsaf2', + }, + }, + ], + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + }, + ], + metadata: [ + { + jobId: 1, + }, + { + jobId: 2, + }, + { + jobId: 3, + }, + { + jobId: 4, + }, + { + jobId: 5, + }, + { + jobId: 6, + }, + ], + batched: true, + statusCode: 200, + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + dataCenter: 'eu-01', + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, }, + ], }, - output: { - response: { - status: 200, - body: { - output: [ - { - "batchedRequest": [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rest.fra-01.braze.eu/users/track", - "headers": { - "Content-Type": "application/json", - "Accept": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "partner": "RudderStack", - "events": [ - { - "name": "Page Viewed", - "time": "2020-01-24T11:59:02.402+05:30", - "properties": { - "path": "/tests/html/index2.html", - "referrer": "", - "search": "", - "title": "", - "url": "http://localhost/tests/html/index2.html" - }, - "_update_existing_only": false, - "user_alias": { - "alias_name": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "alias_label": "rudder_id" - } - } - ], - "attributes": [ - { - "email": "mickey@disney.com", - "city": "Disney", - "country": "USA", - "firstname": "Mickey", - "_update_existing_only": false, - "user_alias": { - "alias_name": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "alias_label": "rudder_id" - } - } - ] - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rest.fra-01.braze.eu/v2/subscription/status/set", - "headers": { - "Content-Type": "application/json", - "Accept": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "subscription_groups": [ - { - "external_id": ["user123"], - "phones": ["5055077683"], - "subscription_group_id": "c90f0fd2-2a02-4f2f-bf07-7e7d2c2ed2b1", - "subscription_state": "subscribed" - }, - { - "external_id": ["user877"], - "phones": ["5055077683"], - "subscription_group_id": "58d0a278-b55b-4f10-b7d2-98d1c5dd4c30", - "subscription_state": "subscribed" - } - ] - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rest.fra-01.braze.eu/users/merge", - "headers": { - "Content-Type": "application/json", - "Accept": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "merge_updates": [ - { - "identifier_to_keep": { - "external_id": "dsafsdf" - }, - "identifier_to_merge": { - "external_id": "adsfsaf" - } - }, - { - "identifier_to_keep": { - "external_id": "dsafsdf2" - }, - "identifier_to_merge": { - "external_id": "adsfsaf2" - } - } - ] - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - } - ], - "metadata": [ - { - "jobId": 1 - }, - { - "jobId": 2 - }, - { - "jobId": 3 - }, - { - "jobId": 4 - }, - { - "jobId": 5 - }, - { - "jobId": 6 - } - ], - "batched": true, - "statusCode": 200, - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false, - "dataCenter": "eu-01" - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - } - } - ], + }, + }, + }, + { + name: 'braze', + description: 'dedup enabled router tests', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + destination: { + ID: '2N9UakqKF0D35wfzSeofIxPdL8X', + Name: 'Braze-Test', + Config: { + appKey: '0e5440c3-226b-45d0-91b5-c64da56cde16', + blacklistedEvents: [], + dataCenter: 'US-03', + enableNestedArrayOperations: false, + enableSubscriptionGroupInGroupCall: false, + eventFilteringOption: 'disable', + oneTrustCookieCategories: [], + restApiKey: 'dummyApiKey', + supportDedup: true, + trackAnonymousUser: true, + whitelistedEvents: [], + }, + Enabled: true, + WorkspaceID: '27O0bhB6p5ehfOWeeZlOSsSDTLg', + Transformations: [], + IsProcessorEnabled: true, + RevisionID: '2N9Uaf2tWq2QRmatBWQm03Rz6qX', + }, + metadata: { + jobId: 1, + }, + message: { + type: 'track', + event: 'Sign In Completed', + sentAt: '2023-03-10T18:36:04.738Z', + userId: 'braze_test_user', + channel: 'web', + context: { + locale: 'en-US', + traits: { + subscribe_once: true, + pwa: true, + email: 'jackson24miranda@gmail.com', + lastName: 'Miranda', + firstName: 'Spencer', + is_registered: true, + last_identify: 'GOOGLE_SIGN_IN', + account_region: 'ON', + is_pickup_selected: 'false', + has_tradein_attempt: false, + custom_obj_attr: { + key1: 'value1', + key2: 'value2', + key4: 'value4', + }, + custom_arr: [1, 2, 'str1'], + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '2.9.5', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36', + }, + rudderId: '4118560d-e4fc-4fd1-a734-9c69eae2c047', + messageId: '1a342814-a882-4b65-9cc9-347544997268', + timestamp: '2023-03-10T18:36:05.028Z', + properties: { + cause: '/redirector', + method: 'GOOGLE', + region: 'ON', + orderId: '6179367977099', + order_id: '6179367977099', + webhookurl: 'https://my.test.com', + countingMethod: 'standard', + is_first_time_signin: false, + }, + receivedAt: '2023-03-18T01:41:42.257+05:30', + request_ip: '[::1]', + anonymousId: '77e278c9-e984-4cdd-950c-cd0b61befd03', + originalTimestamp: '2023-03-10T18:36:04.733Z', + }, + }, + { + destination: { + ID: '2N9UakqKF0D35wfzSeofIxPdL8X', + Name: 'Braze-Test', + Config: { + appKey: '0e5440c3-226b-45d0-91b5-c64da56cde16', + blacklistedEvents: [], + dataCenter: 'US-03', + enableNestedArrayOperations: false, + enableSubscriptionGroupInGroupCall: false, + eventFilteringOption: 'disable', + oneTrustCookieCategories: [], + restApiKey: 'dummyApiKey', + supportDedup: true, + trackAnonymousUser: true, + whitelistedEvents: [], + }, + Enabled: true, + WorkspaceID: '27O0bhB6p5ehfOWeeZlOSsSDTLg', + Transformations: [], + IsProcessorEnabled: true, + RevisionID: '2N9Uaf2tWq2QRmatBWQm03Rz6qX', + }, + metadata: { + jobId: 2, + }, + message: { + type: 'track', + event: 'Sign In Completed', + sentAt: '2023-03-10T18:36:04.738Z', + userId: 'braze_test_user', + channel: 'web', + context: { + locale: 'en-US', + traits: { + subscribe_once: true, + pwa: true, + email: 'jackson24miranda@gmail.com', + lastName: 'Miranda 2', + firstName: 'Spencer', + is_registered: true, + last_identify: 'GOOGLE_SIGN_IN', + account_region: 'ON', + is_pickup_selected: 'true', + has_tradein_attempt: false, + custom_obj_attr: { + key1: 'value1', + key2: 'value2', + key4: 'value4', + }, + custom_arr: ['1', '2', 'str1'], + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '2.9.5', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36', + }, + rudderId: '4118560d-e4fc-4fd1-a734-9c69eae2c047', + messageId: '1a342814-a882-4b65-9cc9-347544997268', + timestamp: '2023-03-10T18:36:05.028Z', + properties: { + cause: '/redirector', + method: 'GOOGLE', + region: 'ON', + orderId: '6179367977099', + order_id: '6179367977099', + webhookurl: 'https://my.test.com', + countingMethod: 'standard', + is_first_time_signin: false, + }, + receivedAt: '2023-03-18T01:41:42.257+05:30', + request_ip: '[::1]', + anonymousId: '77e278c9-e984-4cdd-950c-cd0b61befd03', + originalTimestamp: '2023-03-10T18:36:04.733Z', + }, + }, + { + destination: { + ID: '2N9UakqKF0D35wfzSeofIxPdL8X', + Name: 'Braze-Test', + Config: { + appKey: '0e5440c3-226b-45d0-91b5-c64da56cde16', + blacklistedEvents: [], + dataCenter: 'US-03', + enableNestedArrayOperations: false, + enableSubscriptionGroupInGroupCall: false, + eventFilteringOption: 'disable', + oneTrustCookieCategories: [], + restApiKey: 'dummyApiKey', + supportDedup: true, + trackAnonymousUser: true, + whitelistedEvents: [], + }, + Enabled: true, + WorkspaceID: '27O0bhB6p5ehfOWeeZlOSsSDTLg', + Transformations: [], + IsProcessorEnabled: true, + RevisionID: '2N9Uaf2tWq2QRmatBWQm03Rz6qX', + }, + metadata: { + jobId: 3, + }, + message: { + anonymousId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.5', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + city: 'Disney', + country: 'USA', + email: 'mickey@disney.com', + firstName: 'Mickey', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36', + }, + integrations: { + All: true, }, + messageId: '2536eda4-d638-4c93-8014-8ffe3f083214', + type: 'identify', + userId: 'user@50', + }, }, + { + destination: { + ID: '2N9UakqKF0D35wfzSeofIxPdL8X', + Name: 'Braze-Test', + Config: { + appKey: '0e5440c3-226b-45d0-91b5-c64da56cde16', + blacklistedEvents: [], + dataCenter: 'US-03', + enableNestedArrayOperations: false, + enableSubscriptionGroupInGroupCall: false, + eventFilteringOption: 'disable', + oneTrustCookieCategories: [], + restApiKey: 'dummyApiKey', + supportDedup: true, + trackAnonymousUser: true, + whitelistedEvents: [], + }, + Enabled: true, + WorkspaceID: '27O0bhB6p5ehfOWeeZlOSsSDTLg', + Transformations: [], + IsProcessorEnabled: true, + RevisionID: '2N9Uaf2tWq2QRmatBWQm03Rz6qX', + }, + metadata: { + jobId: 4, + }, + message: { + anonymousId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.5', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + city: 'Disney', + country: 'USA', + email: 'mickey@disney.com', + firstName: 'Mickey', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36', + }, + integrations: { + All: true, + }, + messageId: '2536eda4-d638-4c93-8014-8ffe3f083214', + type: 'identify', + userId: 'user@50', + }, + }, + ], + destType: 'braze', }, + method: 'POST', + }, }, - { - name: 'braze', - description: 'dedup enabled router tests', - feature: 'router', - module: 'destination', - version: 'v0', - input: { - request: { - body: { - input: [ + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: [ + { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rest.iad-03.braze.com/users/track', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + partner: 'RudderStack', + attributes: [ { - "destination": { - "ID": "2N9UakqKF0D35wfzSeofIxPdL8X", - "Name": "Braze-Test", - "Config": { - "appKey": "0e5440c3-226b-45d0-91b5-c64da56cde16", - "blacklistedEvents": [], - "dataCenter": "US-03", - "enableNestedArrayOperations": false, - "enableSubscriptionGroupInGroupCall": false, - "eventFilteringOption": "disable", - "oneTrustCookieCategories": [], - "restApiKey": "dummyApiKey", - "supportDedup": true, - "trackAnonymousUser": true, - "whitelistedEvents": [] - }, - "Enabled": true, - "WorkspaceID": "27O0bhB6p5ehfOWeeZlOSsSDTLg", - "Transformations": [], - "IsProcessorEnabled": true, - "RevisionID": "2N9Uaf2tWq2QRmatBWQm03Rz6qX" - }, - "metadata": { - "jobId": 1 - }, - "message": { - "type": "track", - "event": "Sign In Completed", - "sentAt": "2023-03-10T18:36:04.738Z", - "userId": "braze_test_user", - "channel": "web", - "context": { - "locale": "en-US", - "traits": { - "subscribe_once": true, - "pwa": true, - "email": "jackson24miranda@gmail.com", - "lastName": "Miranda", - "firstName": "Spencer", - "is_registered": true, - "last_identify": "GOOGLE_SIGN_IN", - "account_region": "ON", - "is_pickup_selected": "false", - "has_tradein_attempt": false, - "custom_obj_attr": { - "key1": "value1", - "key2": "value2", - "key4": "value4" - }, - "custom_arr": [1, 2, "str1"] - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "2.9.5" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36" - }, - "rudderId": "4118560d-e4fc-4fd1-a734-9c69eae2c047", - "messageId": "1a342814-a882-4b65-9cc9-347544997268", - "timestamp": "2023-03-10T18:36:05.028Z", - "properties": { - "cause": "/redirector", - "method": "GOOGLE", - "region": "ON", - "orderId": "6179367977099", - "order_id": "6179367977099", - "webhookurl": "https://my.test.com", - "countingMethod": "standard", - "is_first_time_signin": false - }, - "receivedAt": "2023-03-18T01:41:42.257+05:30", - "request_ip": "[::1]", - "anonymousId": "77e278c9-e984-4cdd-950c-cd0b61befd03", - "originalTimestamp": "2023-03-10T18:36:04.733Z" - } + first_name: 'Spencer', + subscribe_once: true, + pwa: true, + external_id: 'braze_test_user', + custom_obj_attr: { + key1: 'value1', + key2: 'value2', + key4: 'value4', + }, }, { - "destination": { - "ID": "2N9UakqKF0D35wfzSeofIxPdL8X", - "Name": "Braze-Test", - "Config": { - "appKey": "0e5440c3-226b-45d0-91b5-c64da56cde16", - "blacklistedEvents": [], - "dataCenter": "US-03", - "enableNestedArrayOperations": false, - "enableSubscriptionGroupInGroupCall": false, - "eventFilteringOption": "disable", - "oneTrustCookieCategories": [], - "restApiKey": "dummyApiKey", - "supportDedup": true, - "trackAnonymousUser": true, - "whitelistedEvents": [] - }, - "Enabled": true, - "WorkspaceID": "27O0bhB6p5ehfOWeeZlOSsSDTLg", - "Transformations": [], - "IsProcessorEnabled": true, - "RevisionID": "2N9Uaf2tWq2QRmatBWQm03Rz6qX" - }, - "metadata": { - "jobId": 2 - }, - "message": { - "type": "track", - "event": "Sign In Completed", - "sentAt": "2023-03-10T18:36:04.738Z", - "userId": "braze_test_user", - "channel": "web", - "context": { - "locale": "en-US", - "traits": { - "subscribe_once": true, - "pwa": true, - "email": "jackson24miranda@gmail.com", - "lastName": "Miranda 2", - "firstName": "Spencer", - "is_registered": true, - "last_identify": "GOOGLE_SIGN_IN", - "account_region": "ON", - "is_pickup_selected": "true", - "has_tradein_attempt": false, - "custom_obj_attr": { - "key1": "value1", - "key2": "value2", - "key4": "value4" - }, - "custom_arr": ["1", "2", "str1"] - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "2.9.5" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36" - }, - "rudderId": "4118560d-e4fc-4fd1-a734-9c69eae2c047", - "messageId": "1a342814-a882-4b65-9cc9-347544997268", - "timestamp": "2023-03-10T18:36:05.028Z", - "properties": { - "cause": "/redirector", - "method": "GOOGLE", - "region": "ON", - "orderId": "6179367977099", - "order_id": "6179367977099", - "webhookurl": "https://my.test.com", - "countingMethod": "standard", - "is_first_time_signin": false - }, - "receivedAt": "2023-03-18T01:41:42.257+05:30", - "request_ip": "[::1]", - "anonymousId": "77e278c9-e984-4cdd-950c-cd0b61befd03", - "originalTimestamp": "2023-03-10T18:36:04.733Z" - } + last_name: 'Miranda 2', + is_pickup_selected: 'true', + external_id: 'braze_test_user', + custom_arr: ['1', '2', 'str1'], }, { - "destination": { - "ID": "2N9UakqKF0D35wfzSeofIxPdL8X", - "Name": "Braze-Test", - "Config": { - "appKey": "0e5440c3-226b-45d0-91b5-c64da56cde16", - "blacklistedEvents": [], - "dataCenter": "US-03", - "enableNestedArrayOperations": false, - "enableSubscriptionGroupInGroupCall": false, - "eventFilteringOption": "disable", - "oneTrustCookieCategories": [], - "restApiKey": "dummyApiKey", - "supportDedup": true, - "trackAnonymousUser": true, - "whitelistedEvents": [] - }, - "Enabled": true, - "WorkspaceID": "27O0bhB6p5ehfOWeeZlOSsSDTLg", - "Transformations": [], - "IsProcessorEnabled": true, - "RevisionID": "2N9Uaf2tWq2QRmatBWQm03Rz6qX" - }, - "metadata": { - "jobId": 3 - }, - "message": { - "anonymousId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.5" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.5" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "city": "Disney", - "country": "USA", - "email": "mickey@disney.com", - "firstName": "Mickey" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" - }, - "integrations": { - "All": true - }, - "messageId": "2536eda4-d638-4c93-8014-8ffe3f083214", - "type": "identify", - "userId": "user@50" - } + city: 'Disney', + country: 'USA', + email: 'mickey@disney.com', + external_id: 'user@50', + first_name: 'Mickey', }, + ], + events: [ { - "destination": { - "ID": "2N9UakqKF0D35wfzSeofIxPdL8X", - "Name": "Braze-Test", - "Config": { - "appKey": "0e5440c3-226b-45d0-91b5-c64da56cde16", - "blacklistedEvents": [], - "dataCenter": "US-03", - "enableNestedArrayOperations": false, - "enableSubscriptionGroupInGroupCall": false, - "eventFilteringOption": "disable", - "oneTrustCookieCategories": [], - "restApiKey": "dummyApiKey", - "supportDedup": true, - "trackAnonymousUser": true, - "whitelistedEvents": [] - }, - "Enabled": true, - "WorkspaceID": "27O0bhB6p5ehfOWeeZlOSsSDTLg", - "Transformations": [], - "IsProcessorEnabled": true, - "RevisionID": "2N9Uaf2tWq2QRmatBWQm03Rz6qX" - }, - "metadata": { - "jobId": 4 - }, - "message": { - "anonymousId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.5" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.5" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "city": "Disney", - "country": "USA", - "email": "mickey@disney.com", - "firstName": "Mickey" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" - }, - "integrations": { - "All": true - }, - "messageId": "2536eda4-d638-4c93-8014-8ffe3f083214", - "type": "identify", - "userId": "user@50" - } - } - ], - destType: 'braze', - }, - method: 'POST', - }, - }, - output: { - response: { - status: 200, - body: { - output: [ - { - "batchedRequest": [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rest.iad-03.braze.com/users/track", - "headers": { - "Content-Type": "application/json", - "Accept": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "partner": "RudderStack", - "attributes": [ - { - "first_name": "Spencer", - "subscribe_once": true, - "pwa": true, - "external_id": "braze_test_user", - "custom_obj_attr": { - "key1": "value1", - "key2": "value2", - "key4": "value4" - } - }, - { - "last_name": "Miranda 2", - "is_pickup_selected": "true", - "external_id": "braze_test_user", - "custom_arr": ["1", "2", "str1"] - }, - { - "city": "Disney", - "country": "USA", - "email": "mickey@disney.com", - "external_id": "user@50", - "first_name": "Mickey" - } - ], - "events": [ - { - "name": "Sign In Completed", - "time": "2023-03-10T18:36:05.028Z", - "properties": { - "cause": "/redirector", - "method": "GOOGLE", - "region": "ON", - "orderId": "6179367977099", - "order_id": "6179367977099", - "webhookurl": "https://my.test.com", - "countingMethod": "standard", - "is_first_time_signin": false - }, - "external_id": "braze_test_user" - }, - { - "name": "Sign In Completed", - "time": "2023-03-10T18:36:05.028Z", - "properties": { - "cause": "/redirector", - "method": "GOOGLE", - "region": "ON", - "orderId": "6179367977099", - "order_id": "6179367977099", - "webhookurl": "https://my.test.com", - "countingMethod": "standard", - "is_first_time_signin": false - }, - "external_id": "braze_test_user" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ], - "metadata": [ - { - "jobId": 1 - }, - { - "jobId": 2 - }, - { - "jobId": 3 - } - ], - "batched": true, - "statusCode": 200, - "destination": { - "ID": "2N9UakqKF0D35wfzSeofIxPdL8X", - "Name": "Braze-Test", - "Config": { - "appKey": "0e5440c3-226b-45d0-91b5-c64da56cde16", - "blacklistedEvents": [], - "dataCenter": "US-03", - "enableNestedArrayOperations": false, - "enableSubscriptionGroupInGroupCall": false, - "eventFilteringOption": "disable", - "oneTrustCookieCategories": [], - "restApiKey": "dummyApiKey", - "supportDedup": true, - "trackAnonymousUser": true, - "whitelistedEvents": [] - }, - "Enabled": true, - "WorkspaceID": "27O0bhB6p5ehfOWeeZlOSsSDTLg", - "Transformations": [], - "IsProcessorEnabled": true, - "RevisionID": "2N9Uaf2tWq2QRmatBWQm03Rz6qX" - } + name: 'Sign In Completed', + time: '2023-03-10T18:36:05.028Z', + properties: { + cause: '/redirector', + method: 'GOOGLE', + region: 'ON', + orderId: '6179367977099', + order_id: '6179367977099', + webhookurl: 'https://my.test.com', + countingMethod: 'standard', + is_first_time_signin: false, + }, + external_id: 'braze_test_user', }, { - "error": "[Braze Deduplication]: Duplicate user detected, the user is dropped", - "statTags": { - "destType": "BRAZE", - "errorCategory": "dataValidation", - "errorType": "instrumentation", - "feature": "router", - "implementation": "native", - "module": "destination", - }, - "statusCode": 400, - "batched": false, - "metadata": [ - { - "jobId": 4 - } - ], - "destination": { - "ID": "2N9UakqKF0D35wfzSeofIxPdL8X", - "Name": "Braze-Test", - "Config": { - "appKey": "0e5440c3-226b-45d0-91b5-c64da56cde16", - "blacklistedEvents": [], - "dataCenter": "US-03", - "enableNestedArrayOperations": false, - "enableSubscriptionGroupInGroupCall": false, - "eventFilteringOption": "disable", - "oneTrustCookieCategories": [], - "restApiKey": "dummyApiKey", - "supportDedup": true, - "trackAnonymousUser": true, - "whitelistedEvents": [] - }, - "Enabled": true, - "WorkspaceID": "27O0bhB6p5ehfOWeeZlOSsSDTLg", - "Transformations": [], - "IsProcessorEnabled": true, - "RevisionID": "2N9Uaf2tWq2QRmatBWQm03Rz6qX" - } - } - ], + name: 'Sign In Completed', + time: '2023-03-10T18:36:05.028Z', + properties: { + cause: '/redirector', + method: 'GOOGLE', + region: 'ON', + orderId: '6179367977099', + order_id: '6179367977099', + webhookurl: 'https://my.test.com', + countingMethod: 'standard', + is_first_time_signin: false, + }, + external_id: 'braze_test_user', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, }, + ], + metadata: [ + { + jobId: 1, + }, + { + jobId: 2, + }, + { + jobId: 3, + }, + ], + batched: true, + statusCode: 200, + destination: { + ID: '2N9UakqKF0D35wfzSeofIxPdL8X', + Name: 'Braze-Test', + Config: { + appKey: '0e5440c3-226b-45d0-91b5-c64da56cde16', + blacklistedEvents: [], + dataCenter: 'US-03', + enableNestedArrayOperations: false, + enableSubscriptionGroupInGroupCall: false, + eventFilteringOption: 'disable', + oneTrustCookieCategories: [], + restApiKey: 'dummyApiKey', + supportDedup: true, + trackAnonymousUser: true, + whitelistedEvents: [], + }, + Enabled: true, + WorkspaceID: '27O0bhB6p5ehfOWeeZlOSsSDTLg', + Transformations: [], + IsProcessorEnabled: true, + RevisionID: '2N9Uaf2tWq2QRmatBWQm03Rz6qX', + }, }, + { + error: '[Braze Deduplication]: Duplicate user detected, the user is dropped', + statTags: { + destType: 'BRAZE', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'router', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + batched: false, + metadata: [ + { + jobId: 4, + }, + ], + destination: { + ID: '2N9UakqKF0D35wfzSeofIxPdL8X', + Name: 'Braze-Test', + Config: { + appKey: '0e5440c3-226b-45d0-91b5-c64da56cde16', + blacklistedEvents: [], + dataCenter: 'US-03', + enableNestedArrayOperations: false, + enableSubscriptionGroupInGroupCall: false, + eventFilteringOption: 'disable', + oneTrustCookieCategories: [], + restApiKey: 'dummyApiKey', + supportDedup: true, + trackAnonymousUser: true, + whitelistedEvents: [], + }, + Enabled: true, + WorkspaceID: '27O0bhB6p5ehfOWeeZlOSsSDTLg', + Transformations: [], + IsProcessorEnabled: true, + RevisionID: '2N9Uaf2tWq2QRmatBWQm03Rz6qX', + }, + }, + ], }, - } + }, + }, + }, ]; diff --git a/test/integrations/destinations/clevertap/router/data.ts b/test/integrations/destinations/clevertap/router/data.ts index 380d6db00d..2d6ec1dcf0 100644 --- a/test/integrations/destinations/clevertap/router/data.ts +++ b/test/integrations/destinations/clevertap/router/data.ts @@ -1,274 +1,276 @@ export const data = [ - { - name: 'clevertap', - description: 'simple router tests', - feature: 'router', - module: 'destination', - version: 'v0', - input: { - request: { - body: { - input: [ - { - "destination": { - "Config": { - "passcode": "dummypasscode", - "accountId": "dummyAccountId", - "trackAnonymous": true, - "enableObjectIdMapping": true - } - }, - "metadata": { - "jobId": 1 - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "Android", - "version": "" - }, - "screen": { - "density": 2 - }, - "device": { - "id": "f54bb572361c4fd1", - "name": "whyred", - "type": "Android", - "model": "Redmi Note 5 Pro", - "manufacturer": "Xiaomi", - "token": "frfsgvrwe:APfdsafsgdfsgghfgfgjkhfsfgdhjhbvcvnetry767456fxsasdf" - } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "anon_id", - "type": "identify", - "traits": { - "ts": "2019-10-14T09:03:17.562Z", - "anonymousId": "anon_id", - "email": "dummyuser@gmail.com", - "name": "Dummy User", - "phone": "98765434210", - "gender": "M", - "employed": true, - "birthday": "1614775793", - "education": "Science", - "graduate": true, - "married": true, - "customerType": "Prime", - "msg_push": true, - "msgSms": true, - "msgemail": true, - "msgwhatsapp": false, - "custom_tags": ["Test_User", "Interested_User", "DIY_Hobby"], - "custom_mappings": { - "Office": "Trastkiv", - "Country": "Russia" - }, - "address": { - "city": "kolkata", - "country": "India", - "postalCode": 789223, - "state": "WB", - "street": "" - } - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "passcode": "dummypasscode", - "accountId": "dummyAccountId", - "trackAnonymous": true, - "enableObjectIdMapping": true - } - }, - "metadata": { - "jobId": 2 - }, - "message": { - "event": "Random", - "properties": { - "country_region": "India", - "test": "abc" - }, - "receivedAt": "2021-08-20T12:49:07.691Z", - "rudderId": "138c4214-b537-4f77-9dea-9abde70b5147", - "type": "track", - "anonymousId": "cd3a4439-7df0-4475-acb9-6659c7c4dfe3" - } - }, - { - "destination": { - "Config": { - "passcode": "dummypasscode", - "accountId": "dummyAccountId", - "trackAnonymous": true - } - }, - "metadata": { - "jobId": 3 - }, - "message": { - "type": "group", - "anonymousId": "anon-id-new", - "name": "Rudder", - "properties": { - "title": "Home", - "path": "/" - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - } - ], - destType: 'clevertap', + { + name: 'clevertap', + description: 'simple router tests', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + destination: { + Config: { + passcode: 'dummypasscode', + accountId: 'dummyAccountId', + trackAnonymous: true, + enableObjectIdMapping: true, }, - method: 'POST', + }, + metadata: { + jobId: 1, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: 'Android', + version: '', + }, + screen: { + density: 2, + }, + device: { + id: 'f54bb572361c4fd1', + name: 'whyred', + type: 'Android', + model: 'Redmi Note 5 Pro', + manufacturer: 'Xiaomi', + token: 'frfsgvrwe:APfdsafsgdfsgghfgfgjkhfsfgdhjhbvcvnetry767456fxsasdf', + }, + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: 'anon_id', + type: 'identify', + traits: { + ts: '2019-10-14T09:03:17.562Z', + anonymousId: 'anon_id', + email: 'dummyuser@gmail.com', + name: 'Dummy User', + phone: '98765434210', + gender: 'M', + employed: true, + birthday: '1614775793', + education: 'Science', + graduate: true, + married: true, + customerType: 'Prime', + msg_push: true, + msgSms: true, + msgemail: true, + msgwhatsapp: false, + custom_tags: ['Test_User', 'Interested_User', 'DIY_Hobby'], + custom_mappings: { + Office: 'Trastkiv', + Country: 'Russia', + }, + address: { + city: 'kolkata', + country: 'India', + postalCode: 789223, + state: 'WB', + street: '', + }, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + { + destination: { + Config: { + passcode: 'dummypasscode', + accountId: 'dummyAccountId', + trackAnonymous: true, + enableObjectIdMapping: true, + }, + }, + metadata: { + jobId: 2, + }, + message: { + event: 'Random', + properties: { + country_region: 'India', + test: 'abc', + }, + receivedAt: '2021-08-20T12:49:07.691Z', + rudderId: '138c4214-b537-4f77-9dea-9abde70b5147', + type: 'track', + anonymousId: 'cd3a4439-7df0-4475-acb9-6659c7c4dfe3', + }, }, + { + destination: { + Config: { + passcode: 'dummypasscode', + accountId: 'dummyAccountId', + trackAnonymous: true, + }, + }, + metadata: { + jobId: 3, + }, + message: { + type: 'group', + anonymousId: 'anon-id-new', + name: 'Rudder', + properties: { + title: 'Home', + path: '/', + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + destType: 'clevertap', }, - output: { - response: { - status: 200, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + batched: true, + endpoint: 'https://api.clevertap.com/1/upload', + headers: { + 'X-CleverTap-Account-Id': 'dummyAccountId', + 'X-CleverTap-Passcode': 'dummypasscode', + 'Content-Type': 'application/json', + }, + params: {}, body: { - output: [ - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "batched": true, - "endpoint": "https://api.clevertap.com/1/upload", - "headers": { - "X-CleverTap-Account-Id": "dummyAccountId", - "X-CleverTap-Passcode": "dummypasscode", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "d": [ - { - "type": "profile", - "ts": 1571043797, - "profileData": { - "Email": "dummyuser@gmail.com", - "Name": "Dummy User", - "Phone": "98765434210", - "Gender": "M", - "Employed": true, - "DOB": "1614775793", - "Education": "Science", - "Married": true, - "Customer Type": "Prime", - "graduate": true, - "msg_push": true, - "msgSms": true, - "msgemail": true, - "msgwhatsapp": false, - "custom_tags": "[\"Test_User\",\"Interested_User\",\"DIY_Hobby\"]", - "custom_mappings": "{\"Office\":\"Trastkiv\",\"Country\":\"Russia\"}", - "address": "{\"city\":\"kolkata\",\"country\":\"India\",\"postalCode\":789223,\"state\":\"WB\",\"street\":\"\"}" - }, - "objectId": "anon_id" - }, - { - "type": "token", - "tokenData": { - "id": "frfsgvrwe:APfdsafsgdfsgghfgfgjkhfsfgdhjhbvcvnetry767456fxsasdf", - "type": "fcm" - }, - "objectId": "anon_id" - }, - { - "evtName": "Random", - "evtData": { - "country_region": "India", - "test": "abc" - }, - "type": "event", - "objectId": "cd3a4439-7df0-4475-acb9-6659c7c4dfe3" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "jobId": 1 - }, - { - "jobId": 2 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "passcode": "dummypasscode", - "accountId": "dummyAccountId", - "trackAnonymous": true, - "enableObjectIdMapping": true - } - } + JSON: { + d: [ + { + type: 'profile', + ts: 1571043797, + profileData: { + Email: 'dummyuser@gmail.com', + Name: 'Dummy User', + Phone: '98765434210', + Gender: 'M', + Employed: true, + DOB: '1614775793', + Education: 'Science', + Married: true, + 'Customer Type': 'Prime', + graduate: true, + msg_push: true, + msgSms: true, + msgemail: true, + msgwhatsapp: false, + custom_tags: '["Test_User","Interested_User","DIY_Hobby"]', + custom_mappings: '{"Office":"Trastkiv","Country":"Russia"}', + address: + '{"city":"kolkata","country":"India","postalCode":789223,"state":"WB","street":""}', + }, + objectId: 'anon_id', + }, + { + type: 'token', + tokenData: { + id: 'frfsgvrwe:APfdsafsgdfsgghfgfgjkhfsfgdhjhbvcvnetry767456fxsasdf', + type: 'fcm', + }, + objectId: 'anon_id', + }, + { + evtName: 'Random', + evtData: { + country_region: 'India', + test: 'abc', }, - { - "metadata": [ - { - "jobId": 3 - } - ], - "batched": false, - "statusCode": 400, - "error": "Message type not supported", - "statTags": { - "destType": "CLEVERTAP", - "errorCategory": "dataValidation", - "errorType": "instrumentation", - "feature": "router", - "implementation": "native", - "module": "destination", - }, - "destination": { - "Config": { - "passcode": "dummypasscode", - "accountId": "dummyAccountId", - "trackAnonymous": true - } - } - } + type: 'event', + objectId: 'cd3a4439-7df0-4475-acb9-6659c7c4dfe3', + }, ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + metadata: [ + { + jobId: 1, + }, + { + jobId: 2, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + passcode: 'dummypasscode', + accountId: 'dummyAccountId', + trackAnonymous: true, + enableObjectIdMapping: true, + }, + }, + }, + { + metadata: [ + { + jobId: 3, + }, + ], + batched: false, + statusCode: 400, + error: 'Message type not supported', + statTags: { + destType: 'CLEVERTAP', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'router', + implementation: 'native', + module: 'destination', + }, + destination: { + Config: { + passcode: 'dummypasscode', + accountId: 'dummyAccountId', + trackAnonymous: true, }, + }, }, + ], }, - } + }, + }, + }, ]; diff --git a/test/integrations/destinations/facebook_conversions/mocks.ts b/test/integrations/destinations/facebook_conversions/mocks.ts index ff6771fa1e..c155897bc4 100644 --- a/test/integrations/destinations/facebook_conversions/mocks.ts +++ b/test/integrations/destinations/facebook_conversions/mocks.ts @@ -1,3 +1,3 @@ export const defaultMockFns = () => { - jest.spyOn(Date, 'now').mockImplementation(() => new Date("2023-11-12T15:46:51.000Z").valueOf()); -}; \ No newline at end of file + jest.spyOn(Date, 'now').mockImplementation(() => new Date('2023-11-12T15:46:51.000Z').valueOf()); +}; diff --git a/test/integrations/destinations/facebook_conversions/processor/data.ts b/test/integrations/destinations/facebook_conversions/processor/data.ts index c8e20e5f20..beb7eb32aa 100644 --- a/test/integrations/destinations/facebook_conversions/processor/data.ts +++ b/test/integrations/destinations/facebook_conversions/processor/data.ts @@ -1,1433 +1,1437 @@ -import { defaultMockFns } from "../mocks" +import { defaultMockFns } from '../mocks'; export const data = [ - { - "name": "facebook_conversions", - "description": "Timestamp validation. Events must be sent within seven days of their occurrence or up to one minute in the future", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "channel": "web", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "screen": { - "height": "100", - "density": 50 - }, - "traits": { - "email": " aBc@gmail.com ", - "address": { - "zip": 1234 - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "randomevent", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "revenue": 400, - "additional_bet_index": 0 - }, - "timestamp": "2023-09-01T15:46:51.693229+05:30", - "type": "track" - }, - "destination": { - "Config": { - "limitedDataUsage": true, - "blacklistPiiProperties": [ - { - "blacklistPiiProperties": "", - "blacklistPiiHash": false - } - ], - "accessToken": "09876", - "datasetId": "dummyID", - "eventsToEvents": [ - { - "from": "", - "to": "" - } - ], - "eventCustomProperties": [ - { - "eventCustomProperties": "" - } - ], - "removeExternalId": true, - "whitelistPiiProperties": [ - { - "whitelistPiiProperties": "" - } - ] - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "error": "Events must be sent within seven days of their occurrence or up to one minute in the future.", - "statusCode": 400, - "statTags": { - "destType": "FACEBOOK_CONVERSIONS", - "errorCategory": "dataValidation", - "errorType": "instrumentation", - "feature": "processor", - "implementation": "native", - "module": "destination", - } - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "facebook_conversions", - "description": "Track event without event property set", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "channel": "web", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "screen": { - "height": "100", - "density": 50 - }, - "traits": { - "email": " aBc@gmail.com ", - "address": { - "zip": 1234 - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "revenue": 400, - "additional_bet_index": 0 - }, - "timestamp": "2023-11-12T15:46:51.693229+05:30", - "type": "track" - }, - "destination": { - "Config": { - "limitedDataUsage": true, - "blacklistPiiProperties": [ - { - "blacklistPiiProperties": "", - "blacklistPiiHash": false - } - ], - "accessToken": "09876", - "datasetId": "dummyID", - "eventsToEvents": [ - { - "from": "", - "to": "" - } - ], - "eventCustomProperties": [ - { - "eventCustomProperties": "" - } - ], - "removeExternalId": true, - "whitelistPiiProperties": [ - { - "whitelistPiiProperties": "" - } - ], - "actionSource": "website" - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "error": "'event' is required and should be a string", - "statTags": { - "destType": "FACEBOOK_CONVERSIONS", - "errorCategory": "dataValidation", - "errorType": "instrumentation", - "feature": "processor", - "implementation": "native", - "module": "destination", - }, - "statusCode": 400, - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "facebook_conversions", - "description": "Simple track event", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "channel": "web", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "screen": { - "height": "100", - "density": 50 - }, - "traits": { - "email": " aBc@gmail.com ", - "address": { - "zip": 1234 - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "spin_result", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "revenue": 400, - "additional_bet_index": 0 - }, - "timestamp": "2023-11-12T15:46:51.693229+05:30", - "type": "track" - }, - "destination": { - "Config": { - "limitedDataUsage": true, - "blacklistPiiProperties": [ - { - "blacklistPiiProperties": "", - "blacklistPiiHash": false - } - ], - "accessToken": "09876", - "datasetId": "dummyID", - "eventsToEvents": [ - { - "from": "", - "to": "" - } - ], - "eventCustomProperties": [ - { - "eventCustomProperties": "" - } - ], - "removeExternalId": true, - "whitelistPiiProperties": [ - { - "whitelistPiiProperties": "" - } - ], - "actionSource": "website" - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://graph.facebook.com/v18.0/dummyID/events?access_token=09876", - "headers": {}, - "params": {}, - "body": { - "JSON": {}, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "data": [ - "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"spin_result\",\"event_time\":1699784211,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"value\":400,\"currency\":\"USD\"}}" - ] - } - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "facebook_conversions", - "description": "Track event with standard event products searched", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "channel": "web", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "screen": { - "height": "100", - "density": 50 - }, - "traits": { - "email": " aBc@gmail.com ", - "address": { - "zip": 1234 - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "products searched", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "revenue": 400, - "additional_bet_index": 0 - }, - "timestamp": "2023-11-12T15:46:51.693229+05:30", - "type": "track" - }, - "destination": { - "Config": { - "limitedDataUsage": true, - "blacklistPiiProperties": [ - { - "blacklistPiiProperties": "", - "blacklistPiiHash": false - } - ], - "accessToken": "09876", - "datasetId": "dummyID", - "eventsToEvents": [ - { - "from": "", - "to": "" - } - ], - "eventCustomProperties": [ - { - "eventCustomProperties": "" - } - ], - "removeExternalId": true, - "whitelistPiiProperties": [ - { - "whitelistPiiProperties": "" - } - ], - "actionSource": "website" - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://graph.facebook.com/v18.0/dummyID/events?access_token=09876", - "headers": {}, - "params": {}, - "body": { - "JSON": {}, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "data": [ - "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"Search\",\"event_time\":1699784211,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"content_ids\":[],\"contents\":[],\"content_type\":\"product\",\"currency\":\"USD\",\"value\":400}}" - ] - } - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "facebook_conversions", - "description": "Track event with standard event product added", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "channel": "web", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "screen": { - "height": "100", - "density": 50 - }, - "traits": { - "email": " aBc@gmail.com ", - "address": { - "zip": 1234 - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "product added", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "revenue": 400, - "additional_bet_index": 0 - }, - "timestamp": "2023-11-12T15:46:51.693229+05:30", - "type": "track" - }, - "destination": { - "Config": { - "limitedDataUsage": true, - "blacklistPiiProperties": [ - { - "blacklistPiiProperties": "", - "blacklistPiiHash": false - } - ], - "accessToken": "09876", - "datasetId": "dummyID", - "eventsToEvents": [ - { - "from": "", - "to": "" - } - ], - "eventCustomProperties": [ - { - "eventCustomProperties": "" - } - ], - "removeExternalId": true, - "whitelistPiiProperties": [ - { - "whitelistPiiProperties": "" - } - ], - "actionSource": "website" - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://graph.facebook.com/v18.0/dummyID/events?access_token=09876", - "headers": {}, - "params": {}, - "body": { - "JSON": {}, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "data": [ - "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"AddToCart\",\"event_time\":1699784211,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"content_ids\":[],\"contents\":[],\"content_type\":\"product\",\"currency\":\"USD\",\"value\":400}}" - ] - } - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "facebook_conversions", - "description": "Track event with standard event product viewed", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "channel": "web", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "screen": { - "height": "100", - "density": 50 - }, - "traits": { - "email": " aBc@gmail.com ", - "address": { - "zip": 1234 - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "product viewed", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "revenue": 400, - "additional_bet_index": 0 - }, - "timestamp": "2023-11-12T15:46:51.693229+05:30", - "type": "track" - }, - "destination": { - "Config": { - "limitedDataUsage": true, - "blacklistPiiProperties": [ - { - "blacklistPiiProperties": "", - "blacklistPiiHash": false - } - ], - "accessToken": "09876", - "datasetId": "dummyID", - "eventsToEvents": [ - { - "from": "", - "to": "" - } - ], - "eventCustomProperties": [ - { - "eventCustomProperties": "" - } - ], - "removeExternalId": true, - "whitelistPiiProperties": [ - { - "whitelistPiiProperties": "" - } - ], - "actionSource": "website" - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://graph.facebook.com/v18.0/dummyID/events?access_token=09876", - "headers": {}, - "params": {}, - "body": { - "JSON": {}, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "data": [ - "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"ViewContent\",\"event_time\":1699784211,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"content_ids\":[],\"contents\":[],\"content_type\":\"product\",\"currency\":\"USD\",\"value\":400}}" - ] - } - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "facebook_conversions", - "description": "Track event with standard event product list viewed", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "channel": "web", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "screen": { - "height": "100", - "density": 50 - }, - "traits": { - "email": " aBc@gmail.com ", - "address": { - "zip": 1234 - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "product list viewed", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "revenue": 400, - "additional_bet_index": 0, - "products": [ - { - "product_id": 1234, - "quantity": 5, - "price": 55 - } - ] - }, - "timestamp": "2023-11-12T15:46:51.693229+05:30", - "type": "track" - }, - "destination": { - "Config": { - "limitedDataUsage": true, - "blacklistPiiProperties": [ - { - "blacklistPiiProperties": "", - "blacklistPiiHash": false - } - ], - "accessToken": "09876", - "datasetId": "dummyID", - "eventsToEvents": [ - { - "from": "", - "to": "" - } - ], - "eventCustomProperties": [ - { - "eventCustomProperties": "" - } - ], - "removeExternalId": true, - "whitelistPiiProperties": [ - { - "whitelistPiiProperties": "" - } - ], - "actionSource": "website" - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://graph.facebook.com/v18.0/dummyID/events?access_token=09876", - "headers": {}, - "params": {}, - "body": { - "JSON": {}, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "data": [ - "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"ViewContent\",\"event_time\":1699784211,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"products\":[{\"product_id\":1234,\"quantity\":5,\"price\":55}],\"content_ids\":[1234],\"contents\":[{\"id\":1234,\"quantity\":5,\"item_price\":55}],\"content_type\":\"product\",\"currency\":\"USD\",\"value\":400}}" - ] - } - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "facebook_conversions", - "description": "Track event with standard event product list viewed without products array", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "channel": "web", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "screen": { - "height": "100", - "density": 50 - }, - "traits": { - "email": " aBc@gmail.com ", - "address": { - "zip": 1234 - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "product list viewed", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "revenue": 400, - "additional_bet_index": 0, - "category": "randomCategory" - }, - "timestamp": "2023-11-12T15:46:51.693229+05:30", - "type": "track" - }, - "destination": { - "Config": { - "limitedDataUsage": true, - "blacklistPiiProperties": [ - { - "blacklistPiiProperties": "", - "blacklistPiiHash": false - } - ], - "accessToken": "09876", - "datasetId": "dummyID", - "eventsToEvents": [ - { - "from": "", - "to": "" - } - ], - "eventCustomProperties": [ - { - "eventCustomProperties": "" - } - ], - "removeExternalId": true, - "whitelistPiiProperties": [ - { - "whitelistPiiProperties": "" - } - ], - "actionSource": "website" - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://graph.facebook.com/v18.0/dummyID/events?access_token=09876", - "headers": {}, - "params": {}, - "body": { - "JSON": {}, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "data": [ - "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"ViewContent\",\"event_time\":1699784211,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"category\":\"randomCategory\",\"content_ids\":[\"randomCategory\"],\"contents\":[{\"id\":\"randomCategory\",\"quantity\":1}],\"content_type\":\"product_group\",\"content_category\":\"randomCategory\",\"currency\":\"USD\",\"value\":400}}" - ] - } - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "facebook_conversions", - "description": "Track event with standard event product added to wishlist", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "channel": "web", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "screen": { - "height": "100", - "density": 50 - }, - "traits": { - "email": " aBc@gmail.com ", - "address": { - "zip": 1234 - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "product added to wishlist", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "revenue": 400, - "additional_bet_index": 0 - }, - "timestamp": "2023-11-12T15:46:51.693229+05:30", - "type": "track" - }, - "destination": { - "Config": { - "limitedDataUsage": true, - "blacklistPiiProperties": [ - { - "blacklistPiiProperties": "", - "blacklistPiiHash": false - } - ], - "accessToken": "09876", - "datasetId": "dummyID", - "eventsToEvents": [ - { - "from": "", - "to": "" - } - ], - "eventCustomProperties": [ - { - "eventCustomProperties": "" - } - ], - "removeExternalId": true, - "whitelistPiiProperties": [ - { - "whitelistPiiProperties": "" - } - ], - "actionSource": "website" - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://graph.facebook.com/v18.0/dummyID/events?access_token=09876", - "headers": {}, - "params": {}, - "body": { - "JSON": {}, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "data": [ - "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"AddToWishlist\",\"event_time\":1699784211,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"content_ids\":[],\"contents\":[],\"currency\":\"USD\",\"value\":400}}" - ] - } - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "facebook_conversions", - "description": "Track event with standard event payment info entered", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "channel": "web", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "screen": { - "height": "100", - "density": 50 - }, - "traits": { - "email": " aBc@gmail.com ", - "address": { - "zip": 1234 - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "payment info entered", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "revenue": 400, - "additional_bet_index": 0 - }, - "timestamp": "2023-11-12T15:46:51.693229+05:30", - "type": "track" - }, - "destination": { - "Config": { - "limitedDataUsage": true, - "blacklistPiiProperties": [ - { - "blacklistPiiProperties": "", - "blacklistPiiHash": false - } - ], - "accessToken": "09876", - "datasetId": "dummyID", - "eventsToEvents": [ - { - "from": "", - "to": "" - } - ], - "eventCustomProperties": [ - { - "eventCustomProperties": "" - } - ], - "removeExternalId": true, - "whitelistPiiProperties": [ - { - "whitelistPiiProperties": "" - } - ], - "actionSource": "website" - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://graph.facebook.com/v18.0/dummyID/events?access_token=09876", - "headers": {}, - "params": {}, - "body": { - "JSON": {}, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "data": [ - "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"AddPaymentInfo\",\"event_time\":1699784211,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"content_ids\":[],\"contents\":[],\"currency\":\"USD\",\"value\":400}}" - ] - } - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "facebook_conversions", - "description": "Track event with standard event order completed with delivery_category in products array", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "channel": "web", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "screen": { - "height": "100", - "density": 50 - }, - "traits": { - "email": " aBc@gmail.com ", - "address": { - "zip": 1234 - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "order completed", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "revenue": 400, - "additional_bet_index": 0, - "products": [ - { - "product_id": 1234, - "quantity": 5, - "price": 55, - "delivery_category": "home_delivery" - } - ] - }, - "timestamp": "2023-11-12T15:46:51.693229+05:30", - "type": "track" - }, - "destination": { - "Config": { - "limitedDataUsage": true, - "blacklistPiiProperties": [ - { - "blacklistPiiProperties": "", - "blacklistPiiHash": false - } - ], - "accessToken": "09876", - "datasetId": "dummyID", - "eventsToEvents": [ - { - "from": "", - "to": "" - } - ], - "eventCustomProperties": [ - { - "eventCustomProperties": "" - } - ], - "removeExternalId": true, - "whitelistPiiProperties": [ - { - "whitelistPiiProperties": "" - } - ], - "actionSource": "website" - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://graph.facebook.com/v18.0/dummyID/events?access_token=09876", - "headers": {}, - "params": {}, - "body": { - "JSON": {}, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "data": [ - "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"Purchase\",\"event_time\":1699784211,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"products\":[{\"product_id\":1234,\"quantity\":5,\"price\":55,\"delivery_category\":\"home_delivery\"}],\"content_ids\":[1234],\"contents\":[{\"id\":1234,\"quantity\":5,\"item_price\":55,\"delivery_category\":\"home_delivery\"}],\"content_type\":\"product\",\"currency\":\"USD\",\"value\":400,\"num_items\":1}}" - ] - } - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "facebook_conversions", - "description": "Track event with standard event order completed with delivery_category in properties", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "channel": "web", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "screen": { - "height": "100", - "density": 50 - }, - "traits": { - "email": " aBc@gmail.com ", - "address": { - "zip": 1234 - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "order completed", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "revenue": 400, - "additional_bet_index": 0, - "delivery_category": "home_delivery", - "products": [ - { - "product_id": 1234, - "quantity": 5, - "price": 55 - } - ] - }, - "timestamp": "2023-11-12T15:46:51.693229+05:30", - "type": "track" - }, - "destination": { - "Config": { - "limitedDataUsage": true, - "blacklistPiiProperties": [ - { - "blacklistPiiProperties": "", - "blacklistPiiHash": false - } - ], - "accessToken": "09876", - "datasetId": "dummyID", - "eventsToEvents": [ - { - "from": "", - "to": "" - } - ], - "eventCustomProperties": [ - { - "eventCustomProperties": "" - } - ], - "removeExternalId": true, - "whitelistPiiProperties": [ - { - "whitelistPiiProperties": "" - } - ], - "actionSource": "website" - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://graph.facebook.com/v18.0/dummyID/events?access_token=09876", - "headers": {}, - "params": {}, - "body": { - "JSON": {}, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "data": [ - "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"Purchase\",\"event_time\":1699784211,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"delivery_category\":\"home_delivery\",\"products\":[{\"product_id\":1234,\"quantity\":5,\"price\":55}],\"content_ids\":[1234],\"contents\":[{\"id\":1234,\"quantity\":5,\"item_price\":55,\"delivery_category\":\"home_delivery\"}],\"content_type\":\"product\",\"currency\":\"USD\",\"value\":400,\"num_items\":1}}" - ] - } - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - } -] \ No newline at end of file + { + name: 'facebook_conversions', + description: + 'Timestamp validation. Events must be sent within seven days of their occurrence or up to one minute in the future', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + channel: 'web', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, + screen: { + height: '100', + density: 50, + }, + traits: { + email: ' aBc@gmail.com ', + address: { + zip: 1234, + }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'randomevent', + integrations: { + All: true, + }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + revenue: 400, + additional_bet_index: 0, + }, + timestamp: '2023-09-01T15:46:51.693229+05:30', + type: 'track', + }, + destination: { + Config: { + limitedDataUsage: true, + blacklistPiiProperties: [ + { + blacklistPiiProperties: '', + blacklistPiiHash: false, + }, + ], + accessToken: '09876', + datasetId: 'dummyID', + eventsToEvents: [ + { + from: '', + to: '', + }, + ], + eventCustomProperties: [ + { + eventCustomProperties: '', + }, + ], + removeExternalId: true, + whitelistPiiProperties: [ + { + whitelistPiiProperties: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: + 'Events must be sent within seven days of their occurrence or up to one minute in the future.', + statusCode: 400, + statTags: { + destType: 'FACEBOOK_CONVERSIONS', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'facebook_conversions', + description: 'Track event without event property set', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + channel: 'web', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, + screen: { + height: '100', + density: 50, + }, + traits: { + email: ' aBc@gmail.com ', + address: { + zip: 1234, + }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: '', + integrations: { + All: true, + }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + revenue: 400, + additional_bet_index: 0, + }, + timestamp: '2023-11-12T15:46:51.693229+05:30', + type: 'track', + }, + destination: { + Config: { + limitedDataUsage: true, + blacklistPiiProperties: [ + { + blacklistPiiProperties: '', + blacklistPiiHash: false, + }, + ], + accessToken: '09876', + datasetId: 'dummyID', + eventsToEvents: [ + { + from: '', + to: '', + }, + ], + eventCustomProperties: [ + { + eventCustomProperties: '', + }, + ], + removeExternalId: true, + whitelistPiiProperties: [ + { + whitelistPiiProperties: '', + }, + ], + actionSource: 'website', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: "'event' is required and should be a string", + statTags: { + destType: 'FACEBOOK_CONVERSIONS', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'facebook_conversions', + description: 'Simple track event', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + channel: 'web', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, + screen: { + height: '100', + density: 50, + }, + traits: { + email: ' aBc@gmail.com ', + address: { + zip: 1234, + }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'spin_result', + integrations: { + All: true, + }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + revenue: 400, + additional_bet_index: 0, + }, + timestamp: '2023-11-12T15:46:51.693229+05:30', + type: 'track', + }, + destination: { + Config: { + limitedDataUsage: true, + blacklistPiiProperties: [ + { + blacklistPiiProperties: '', + blacklistPiiHash: false, + }, + ], + accessToken: '09876', + datasetId: 'dummyID', + eventsToEvents: [ + { + from: '', + to: '', + }, + ], + eventCustomProperties: [ + { + eventCustomProperties: '', + }, + ], + removeExternalId: true, + whitelistPiiProperties: [ + { + whitelistPiiProperties: '', + }, + ], + actionSource: 'website', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://graph.facebook.com/v18.0/dummyID/events?access_token=09876', + headers: {}, + params: {}, + body: { + JSON: {}, + XML: {}, + JSON_ARRAY: {}, + FORM: { + data: [ + '{"user_data":{"em":"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08","zp":"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4"},"event_name":"spin_result","event_time":1699784211,"action_source":"website","custom_data":{"revenue":400,"additional_bet_index":0,"value":400,"currency":"USD"}}', + ], + }, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'facebook_conversions', + description: 'Track event with standard event products searched', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + channel: 'web', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, + screen: { + height: '100', + density: 50, + }, + traits: { + email: ' aBc@gmail.com ', + address: { + zip: 1234, + }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'products searched', + integrations: { + All: true, + }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + revenue: 400, + additional_bet_index: 0, + }, + timestamp: '2023-11-12T15:46:51.693229+05:30', + type: 'track', + }, + destination: { + Config: { + limitedDataUsage: true, + blacklistPiiProperties: [ + { + blacklistPiiProperties: '', + blacklistPiiHash: false, + }, + ], + accessToken: '09876', + datasetId: 'dummyID', + eventsToEvents: [ + { + from: '', + to: '', + }, + ], + eventCustomProperties: [ + { + eventCustomProperties: '', + }, + ], + removeExternalId: true, + whitelistPiiProperties: [ + { + whitelistPiiProperties: '', + }, + ], + actionSource: 'website', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://graph.facebook.com/v18.0/dummyID/events?access_token=09876', + headers: {}, + params: {}, + body: { + JSON: {}, + XML: {}, + JSON_ARRAY: {}, + FORM: { + data: [ + '{"user_data":{"em":"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08","zp":"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4"},"event_name":"Search","event_time":1699784211,"action_source":"website","custom_data":{"revenue":400,"additional_bet_index":0,"content_ids":[],"contents":[],"content_type":"product","currency":"USD","value":400}}', + ], + }, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'facebook_conversions', + description: 'Track event with standard event product added', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + channel: 'web', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, + screen: { + height: '100', + density: 50, + }, + traits: { + email: ' aBc@gmail.com ', + address: { + zip: 1234, + }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'product added', + integrations: { + All: true, + }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + revenue: 400, + additional_bet_index: 0, + }, + timestamp: '2023-11-12T15:46:51.693229+05:30', + type: 'track', + }, + destination: { + Config: { + limitedDataUsage: true, + blacklistPiiProperties: [ + { + blacklistPiiProperties: '', + blacklistPiiHash: false, + }, + ], + accessToken: '09876', + datasetId: 'dummyID', + eventsToEvents: [ + { + from: '', + to: '', + }, + ], + eventCustomProperties: [ + { + eventCustomProperties: '', + }, + ], + removeExternalId: true, + whitelistPiiProperties: [ + { + whitelistPiiProperties: '', + }, + ], + actionSource: 'website', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://graph.facebook.com/v18.0/dummyID/events?access_token=09876', + headers: {}, + params: {}, + body: { + JSON: {}, + XML: {}, + JSON_ARRAY: {}, + FORM: { + data: [ + '{"user_data":{"em":"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08","zp":"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4"},"event_name":"AddToCart","event_time":1699784211,"action_source":"website","custom_data":{"revenue":400,"additional_bet_index":0,"content_ids":[],"contents":[],"content_type":"product","currency":"USD","value":400}}', + ], + }, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'facebook_conversions', + description: 'Track event with standard event product viewed', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + channel: 'web', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, + screen: { + height: '100', + density: 50, + }, + traits: { + email: ' aBc@gmail.com ', + address: { + zip: 1234, + }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'product viewed', + integrations: { + All: true, + }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + revenue: 400, + additional_bet_index: 0, + }, + timestamp: '2023-11-12T15:46:51.693229+05:30', + type: 'track', + }, + destination: { + Config: { + limitedDataUsage: true, + blacklistPiiProperties: [ + { + blacklistPiiProperties: '', + blacklistPiiHash: false, + }, + ], + accessToken: '09876', + datasetId: 'dummyID', + eventsToEvents: [ + { + from: '', + to: '', + }, + ], + eventCustomProperties: [ + { + eventCustomProperties: '', + }, + ], + removeExternalId: true, + whitelistPiiProperties: [ + { + whitelistPiiProperties: '', + }, + ], + actionSource: 'website', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://graph.facebook.com/v18.0/dummyID/events?access_token=09876', + headers: {}, + params: {}, + body: { + JSON: {}, + XML: {}, + JSON_ARRAY: {}, + FORM: { + data: [ + '{"user_data":{"em":"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08","zp":"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4"},"event_name":"ViewContent","event_time":1699784211,"action_source":"website","custom_data":{"revenue":400,"additional_bet_index":0,"content_ids":[],"contents":[],"content_type":"product","currency":"USD","value":400}}', + ], + }, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'facebook_conversions', + description: 'Track event with standard event product list viewed', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + channel: 'web', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, + screen: { + height: '100', + density: 50, + }, + traits: { + email: ' aBc@gmail.com ', + address: { + zip: 1234, + }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'product list viewed', + integrations: { + All: true, + }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + revenue: 400, + additional_bet_index: 0, + products: [ + { + product_id: 1234, + quantity: 5, + price: 55, + }, + ], + }, + timestamp: '2023-11-12T15:46:51.693229+05:30', + type: 'track', + }, + destination: { + Config: { + limitedDataUsage: true, + blacklistPiiProperties: [ + { + blacklistPiiProperties: '', + blacklistPiiHash: false, + }, + ], + accessToken: '09876', + datasetId: 'dummyID', + eventsToEvents: [ + { + from: '', + to: '', + }, + ], + eventCustomProperties: [ + { + eventCustomProperties: '', + }, + ], + removeExternalId: true, + whitelistPiiProperties: [ + { + whitelistPiiProperties: '', + }, + ], + actionSource: 'website', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://graph.facebook.com/v18.0/dummyID/events?access_token=09876', + headers: {}, + params: {}, + body: { + JSON: {}, + XML: {}, + JSON_ARRAY: {}, + FORM: { + data: [ + '{"user_data":{"em":"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08","zp":"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4"},"event_name":"ViewContent","event_time":1699784211,"action_source":"website","custom_data":{"revenue":400,"additional_bet_index":0,"products":[{"product_id":1234,"quantity":5,"price":55}],"content_ids":[1234],"contents":[{"id":1234,"quantity":5,"item_price":55}],"content_type":"product","currency":"USD","value":400}}', + ], + }, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'facebook_conversions', + description: 'Track event with standard event product list viewed without products array', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + channel: 'web', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, + screen: { + height: '100', + density: 50, + }, + traits: { + email: ' aBc@gmail.com ', + address: { + zip: 1234, + }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'product list viewed', + integrations: { + All: true, + }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + revenue: 400, + additional_bet_index: 0, + category: 'randomCategory', + }, + timestamp: '2023-11-12T15:46:51.693229+05:30', + type: 'track', + }, + destination: { + Config: { + limitedDataUsage: true, + blacklistPiiProperties: [ + { + blacklistPiiProperties: '', + blacklistPiiHash: false, + }, + ], + accessToken: '09876', + datasetId: 'dummyID', + eventsToEvents: [ + { + from: '', + to: '', + }, + ], + eventCustomProperties: [ + { + eventCustomProperties: '', + }, + ], + removeExternalId: true, + whitelistPiiProperties: [ + { + whitelistPiiProperties: '', + }, + ], + actionSource: 'website', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://graph.facebook.com/v18.0/dummyID/events?access_token=09876', + headers: {}, + params: {}, + body: { + JSON: {}, + XML: {}, + JSON_ARRAY: {}, + FORM: { + data: [ + '{"user_data":{"em":"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08","zp":"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4"},"event_name":"ViewContent","event_time":1699784211,"action_source":"website","custom_data":{"revenue":400,"additional_bet_index":0,"category":"randomCategory","content_ids":["randomCategory"],"contents":[{"id":"randomCategory","quantity":1}],"content_type":"product_group","content_category":"randomCategory","currency":"USD","value":400}}', + ], + }, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'facebook_conversions', + description: 'Track event with standard event product added to wishlist', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + channel: 'web', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, + screen: { + height: '100', + density: 50, + }, + traits: { + email: ' aBc@gmail.com ', + address: { + zip: 1234, + }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'product added to wishlist', + integrations: { + All: true, + }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + revenue: 400, + additional_bet_index: 0, + }, + timestamp: '2023-11-12T15:46:51.693229+05:30', + type: 'track', + }, + destination: { + Config: { + limitedDataUsage: true, + blacklistPiiProperties: [ + { + blacklistPiiProperties: '', + blacklistPiiHash: false, + }, + ], + accessToken: '09876', + datasetId: 'dummyID', + eventsToEvents: [ + { + from: '', + to: '', + }, + ], + eventCustomProperties: [ + { + eventCustomProperties: '', + }, + ], + removeExternalId: true, + whitelistPiiProperties: [ + { + whitelistPiiProperties: '', + }, + ], + actionSource: 'website', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://graph.facebook.com/v18.0/dummyID/events?access_token=09876', + headers: {}, + params: {}, + body: { + JSON: {}, + XML: {}, + JSON_ARRAY: {}, + FORM: { + data: [ + '{"user_data":{"em":"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08","zp":"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4"},"event_name":"AddToWishlist","event_time":1699784211,"action_source":"website","custom_data":{"revenue":400,"additional_bet_index":0,"content_ids":[],"contents":[],"currency":"USD","value":400}}', + ], + }, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'facebook_conversions', + description: 'Track event with standard event payment info entered', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + channel: 'web', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, + screen: { + height: '100', + density: 50, + }, + traits: { + email: ' aBc@gmail.com ', + address: { + zip: 1234, + }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'payment info entered', + integrations: { + All: true, + }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + revenue: 400, + additional_bet_index: 0, + }, + timestamp: '2023-11-12T15:46:51.693229+05:30', + type: 'track', + }, + destination: { + Config: { + limitedDataUsage: true, + blacklistPiiProperties: [ + { + blacklistPiiProperties: '', + blacklistPiiHash: false, + }, + ], + accessToken: '09876', + datasetId: 'dummyID', + eventsToEvents: [ + { + from: '', + to: '', + }, + ], + eventCustomProperties: [ + { + eventCustomProperties: '', + }, + ], + removeExternalId: true, + whitelistPiiProperties: [ + { + whitelistPiiProperties: '', + }, + ], + actionSource: 'website', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://graph.facebook.com/v18.0/dummyID/events?access_token=09876', + headers: {}, + params: {}, + body: { + JSON: {}, + XML: {}, + JSON_ARRAY: {}, + FORM: { + data: [ + '{"user_data":{"em":"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08","zp":"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4"},"event_name":"AddPaymentInfo","event_time":1699784211,"action_source":"website","custom_data":{"revenue":400,"additional_bet_index":0,"content_ids":[],"contents":[],"currency":"USD","value":400}}', + ], + }, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'facebook_conversions', + description: + 'Track event with standard event order completed with delivery_category in products array', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + channel: 'web', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, + screen: { + height: '100', + density: 50, + }, + traits: { + email: ' aBc@gmail.com ', + address: { + zip: 1234, + }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'order completed', + integrations: { + All: true, + }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + revenue: 400, + additional_bet_index: 0, + products: [ + { + product_id: 1234, + quantity: 5, + price: 55, + delivery_category: 'home_delivery', + }, + ], + }, + timestamp: '2023-11-12T15:46:51.693229+05:30', + type: 'track', + }, + destination: { + Config: { + limitedDataUsage: true, + blacklistPiiProperties: [ + { + blacklistPiiProperties: '', + blacklistPiiHash: false, + }, + ], + accessToken: '09876', + datasetId: 'dummyID', + eventsToEvents: [ + { + from: '', + to: '', + }, + ], + eventCustomProperties: [ + { + eventCustomProperties: '', + }, + ], + removeExternalId: true, + whitelistPiiProperties: [ + { + whitelistPiiProperties: '', + }, + ], + actionSource: 'website', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://graph.facebook.com/v18.0/dummyID/events?access_token=09876', + headers: {}, + params: {}, + body: { + JSON: {}, + XML: {}, + JSON_ARRAY: {}, + FORM: { + data: [ + '{"user_data":{"em":"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08","zp":"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4"},"event_name":"Purchase","event_time":1699784211,"action_source":"website","custom_data":{"revenue":400,"additional_bet_index":0,"products":[{"product_id":1234,"quantity":5,"price":55,"delivery_category":"home_delivery"}],"content_ids":[1234],"contents":[{"id":1234,"quantity":5,"item_price":55,"delivery_category":"home_delivery"}],"content_type":"product","currency":"USD","value":400,"num_items":1}}', + ], + }, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'facebook_conversions', + description: + 'Track event with standard event order completed with delivery_category in properties', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + channel: 'web', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, + screen: { + height: '100', + density: 50, + }, + traits: { + email: ' aBc@gmail.com ', + address: { + zip: 1234, + }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'order completed', + integrations: { + All: true, + }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + revenue: 400, + additional_bet_index: 0, + delivery_category: 'home_delivery', + products: [ + { + product_id: 1234, + quantity: 5, + price: 55, + }, + ], + }, + timestamp: '2023-11-12T15:46:51.693229+05:30', + type: 'track', + }, + destination: { + Config: { + limitedDataUsage: true, + blacklistPiiProperties: [ + { + blacklistPiiProperties: '', + blacklistPiiHash: false, + }, + ], + accessToken: '09876', + datasetId: 'dummyID', + eventsToEvents: [ + { + from: '', + to: '', + }, + ], + eventCustomProperties: [ + { + eventCustomProperties: '', + }, + ], + removeExternalId: true, + whitelistPiiProperties: [ + { + whitelistPiiProperties: '', + }, + ], + actionSource: 'website', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://graph.facebook.com/v18.0/dummyID/events?access_token=09876', + headers: {}, + params: {}, + body: { + JSON: {}, + XML: {}, + JSON_ARRAY: {}, + FORM: { + data: [ + '{"user_data":{"em":"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08","zp":"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4"},"event_name":"Purchase","event_time":1699784211,"action_source":"website","custom_data":{"revenue":400,"additional_bet_index":0,"delivery_category":"home_delivery","products":[{"product_id":1234,"quantity":5,"price":55}],"content_ids":[1234],"contents":[{"id":1234,"quantity":5,"item_price":55,"delivery_category":"home_delivery"}],"content_type":"product","currency":"USD","value":400,"num_items":1}}', + ], + }, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, +]; diff --git a/test/integrations/destinations/facebook_conversions/router/data.ts b/test/integrations/destinations/facebook_conversions/router/data.ts index 09145aa1e6..1c7f316538 100644 --- a/test/integrations/destinations/facebook_conversions/router/data.ts +++ b/test/integrations/destinations/facebook_conversions/router/data.ts @@ -1,306 +1,306 @@ -import { defaultMockFns } from "../mocks" +import { defaultMockFns } from '../mocks'; export const data = [ - { - name: 'facebook_conversions', - description: 'Successfull Remove Group Call ', - feature: 'router', - module: 'destination', - version: 'v0', - input: { - request: { + { + name: 'facebook_conversions', + description: 'Successfull Remove Group Call ', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + metadata: { + jobId: 1, + }, + message: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + channel: 'web', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, + screen: { + height: '100', + density: 50, + }, + traits: { + email: ' aBc@gmail.com ', + address: { + zip: 1234, + }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'spin_result', + integrations: { + All: true, + }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + revenue: 400, + additional_bet_index: 0, + }, + timestamp: '2023-11-12T15:46:51.693229+05:30', + type: 'track', + }, + destination: { + Config: { + limitedDataUsage: true, + blacklistPiiProperties: [ + { + blacklistPiiProperties: '', + blacklistPiiHash: false, + }, + ], + accessToken: '09876', + datasetId: 'dummyID', + eventsToEvents: [ + { + from: '', + to: '', + }, + ], + eventCustomProperties: [ + { + eventCustomProperties: '', + }, + ], + removeExternalId: true, + whitelistPiiProperties: [ + { + whitelistPiiProperties: '', + }, + ], + actionSource: 'website', + }, + Enabled: true, + }, + }, + { + metadata: { + jobId: 2, + }, + message: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + channel: 'web', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, + screen: { + height: '100', + density: 50, + }, + traits: { + email: ' aBc@gmail.com ', + address: { + zip: 1234, + }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'products searched', + integrations: { + All: true, + }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + revenue: 400, + additional_bet_index: 0, + }, + timestamp: '2023-11-12T15:46:51.693229+05:30', + type: 'track', + }, + destination: { + Config: { + limitedDataUsage: true, + blacklistPiiProperties: [ + { + blacklistPiiProperties: '', + blacklistPiiHash: false, + }, + ], + accessToken: '09876', + datasetId: 'dummyID', + eventsToEvents: [ + { + from: '', + to: '', + }, + ], + eventCustomProperties: [ + { + eventCustomProperties: '', + }, + ], + removeExternalId: true, + whitelistPiiProperties: [ + { + whitelistPiiProperties: '', + }, + ], + actionSource: 'website', + }, + Enabled: true, + }, + }, + ], + destType: 'facebook_conversions', + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://graph.facebook.com/v18.0/dummyID/events?access_token=09876', + headers: {}, + params: {}, body: { - input: [ - { - "metadata": { - "jobId": 1 - }, - "message": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "channel": "web", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "screen": { - "height": "100", - "density": 50 - }, - "traits": { - "email": " aBc@gmail.com ", - "address": { - "zip": 1234 - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "spin_result", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "revenue": 400, - "additional_bet_index": 0 - }, - "timestamp": "2023-11-12T15:46:51.693229+05:30", - "type": "track" - }, - "destination": { - "Config": { - "limitedDataUsage": true, - "blacklistPiiProperties": [ - { - "blacklistPiiProperties": "", - "blacklistPiiHash": false - } - ], - "accessToken": "09876", - "datasetId": "dummyID", - "eventsToEvents": [ - { - "from": "", - "to": "" - } - ], - "eventCustomProperties": [ - { - "eventCustomProperties": "" - } - ], - "removeExternalId": true, - "whitelistPiiProperties": [ - { - "whitelistPiiProperties": "" - } - ], - "actionSource": "website" - }, - "Enabled": true - } - }, - { - "metadata": { - "jobId": 2 - }, - "message": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "channel": "web", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "screen": { - "height": "100", - "density": 50 - }, - "traits": { - "email": " aBc@gmail.com ", - "address": { - "zip": 1234 - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "products searched", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "revenue": 400, - "additional_bet_index": 0 - }, - "timestamp": "2023-11-12T15:46:51.693229+05:30", - "type": "track" - }, - "destination": { - "Config": { - "limitedDataUsage": true, - "blacklistPiiProperties": [ - { - "blacklistPiiProperties": "", - "blacklistPiiHash": false - } - ], - "accessToken": "09876", - "datasetId": "dummyID", - "eventsToEvents": [ - { - "from": "", - "to": "" - } - ], - "eventCustomProperties": [ - { - "eventCustomProperties": "" - } - ], - "removeExternalId": true, - "whitelistPiiProperties": [ - { - "whitelistPiiProperties": "" - } - ], - "actionSource": "website" - }, - "Enabled": true - } - } + JSON: {}, + XML: {}, + JSON_ARRAY: {}, + FORM: { + data: [ + '{"user_data":{"em":"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08","zp":"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4"},"event_name":"spin_result","event_time":1699784211,"action_source":"website","custom_data":{"revenue":400,"additional_bet_index":0,"value":400,"currency":"USD"}}', ], - destType: 'facebook_conversions', + }, }, - method: 'POST', + files: {}, + }, + metadata: [ + { + jobId: 1, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + limitedDataUsage: true, + blacklistPiiProperties: [ + { + blacklistPiiProperties: '', + blacklistPiiHash: false, + }, + ], + accessToken: '09876', + datasetId: 'dummyID', + eventsToEvents: [ + { + from: '', + to: '', + }, + ], + eventCustomProperties: [ + { + eventCustomProperties: '', + }, + ], + removeExternalId: true, + whitelistPiiProperties: [ + { + whitelistPiiProperties: '', + }, + ], + actionSource: 'website', + }, + Enabled: true, + }, }, - }, - output: { - response: { - status: 200, + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://graph.facebook.com/v18.0/dummyID/events?access_token=09876', + headers: {}, + params: {}, body: { - output: [ - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://graph.facebook.com/v18.0/dummyID/events?access_token=09876", - "headers": {}, - "params": {}, - "body": { - "JSON": {}, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "data": [ - "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"spin_result\",\"event_time\":1699784211,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"value\":400,\"currency\":\"USD\"}}" - ] - } - }, - "files": {} - }, - "metadata": [ - { - "jobId": 1 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "limitedDataUsage": true, - "blacklistPiiProperties": [ - { - "blacklistPiiProperties": "", - "blacklistPiiHash": false - } - ], - "accessToken": "09876", - "datasetId": "dummyID", - "eventsToEvents": [ - { - "from": "", - "to": "" - } - ], - "eventCustomProperties": [ - { - "eventCustomProperties": "" - } - ], - "removeExternalId": true, - "whitelistPiiProperties": [ - { - "whitelistPiiProperties": "" - } - ], - "actionSource": "website" - }, - "Enabled": true - } - }, - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://graph.facebook.com/v18.0/dummyID/events?access_token=09876", - "headers": {}, - "params": {}, - "body": { - "JSON": {}, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "data": [ - "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"Search\",\"event_time\":1699784211,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"content_ids\":[],\"contents\":[],\"content_type\":\"product\",\"currency\":\"USD\",\"value\":400}}" - ] - } - }, - "files": {} - }, - "metadata": [ - { - "jobId": 2 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "limitedDataUsage": true, - "blacklistPiiProperties": [ - { - "blacklistPiiProperties": "", - "blacklistPiiHash": false - } - ], - "accessToken": "09876", - "datasetId": "dummyID", - "eventsToEvents": [ - { - "from": "", - "to": "" - } - ], - "eventCustomProperties": [ - { - "eventCustomProperties": "" - } - ], - "removeExternalId": true, - "whitelistPiiProperties": [ - { - "whitelistPiiProperties": "" - } - ], - "actionSource": "website" - }, - "Enabled": true - } - } + JSON: {}, + XML: {}, + JSON_ARRAY: {}, + FORM: { + data: [ + '{"user_data":{"em":"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08","zp":"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4"},"event_name":"Search","event_time":1699784211,"action_source":"website","custom_data":{"revenue":400,"additional_bet_index":0,"content_ids":[],"contents":[],"content_type":"product","currency":"USD","value":400}}', ], + }, + }, + files: {}, + }, + metadata: [ + { + jobId: 2, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + limitedDataUsage: true, + blacklistPiiProperties: [ + { + blacklistPiiProperties: '', + blacklistPiiHash: false, + }, + ], + accessToken: '09876', + datasetId: 'dummyID', + eventsToEvents: [ + { + from: '', + to: '', + }, + ], + eventCustomProperties: [ + { + eventCustomProperties: '', + }, + ], + removeExternalId: true, + whitelistPiiProperties: [ + { + whitelistPiiProperties: '', + }, + ], + actionSource: 'website', }, + Enabled: true, + }, }, + ], }, - "mockFns": defaultMockFns - } + }, + }, + mockFns: defaultMockFns, + }, ]; diff --git a/test/integrations/destinations/ga4/mocks.ts b/test/integrations/destinations/ga4/mocks.ts index a13e124d23..7b47fe9f44 100644 --- a/test/integrations/destinations/ga4/mocks.ts +++ b/test/integrations/destinations/ga4/mocks.ts @@ -1,3 +1,3 @@ export const defaultMockFns = () => { - jest.spyOn(Date, 'now').mockImplementation(() => new Date("2022-04-29T05:17:09Z").valueOf()); -}; \ No newline at end of file + jest.spyOn(Date, 'now').mockImplementation(() => new Date('2022-04-29T05:17:09Z').valueOf()); +}; diff --git a/test/integrations/destinations/ga4/processor/data.ts b/test/integrations/destinations/ga4/processor/data.ts index 99eca54468..f96ca9e74a 100644 --- a/test/integrations/destinations/ga4/processor/data.ts +++ b/test/integrations/destinations/ga4/processor/data.ts @@ -1,14803 +1,14903 @@ -import { defaultMockFns } from "../mocks" +import { defaultMockFns } from '../mocks'; export const data = [ - { - "name": "ga4", - "description": "(gtag) check all property mappings for 'Products Searched' event", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99v4f979fb997ce453373900f891" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "Products Searched", - "properties": { - "query": "t-shirts" - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-22T10:57:58Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - } - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "timestamp_micros": 1650950229000000, - "events": [ - { - "name": "search", - "params": { - "search_term": "t-shirts", - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag) check all property mappings for 'product list viewed' event", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "rudderId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99v4f979fb997ce453373900f891" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "product list viewed", - "properties": { - "list_id": "related_products", - "category": "Related_products", - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - } - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "view_item_list", - "params": { - "item_list_id": "related_products", - "item_list_name": "Related_products", - "items": [ - { - "item_id": "507f1f77bcf86cd799439011", - "item_name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "item_category": "Apparel", - "item_brand": "Google", - "item_variant": "green", - "price": 19, - "quantity": 2, - "index": 1, - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ], - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag) check all property mappings for 'promotion viewed' event", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "promotion viewed", - "properties": { - "creative_name": "Summer Banner", - "creative_slot": "featured_app_1", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "0", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "creative_name": "summer_banner2", - "creative_slot": "featured_app_1" - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "client_id": "client_id", - "events": [ - { - "name": "view_promotion", - "params": { - "creative_name": "Summer Banner", - "creative_slot": "featured_app_1", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "engagement_time_msec": 1, - "items": [ - { - "item_id": "507f1f77bcf86cd799439011", - "item_name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "item_category": "Apparel", - "item_brand": "Google", - "item_variant": "green", - "price": 19, - "quantity": 2, - "index": 0, - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "creative_name": "summer_banner2", - "creative_slot": "featured_app_1" - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag) check all property mappings for 'promotion clicked' event", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "promotion clicked", - "properties": { - "creative_name": "Summer Banner", - "creative_slot": "featured_app_1", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "0", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "creative_name": "summer_banner2", - "creative_slot": "featured_app_1" - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "select_promotion", - "params": { - "creative_name": "Summer Banner", - "creative_slot": "featured_app_1", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "engagement_time_msec": 1, - "items": [ - { - "item_id": "507f1f77bcf86cd799439011", - "item_name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "item_category": "Apparel", - "item_brand": "Google", - "item_variant": "green", - "price": 19, - "quantity": 2, - "index": 0, - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "creative_name": "summer_banner2", - "creative_slot": "featured_app_1" - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag) exclude only 'products' property from 'promotion clicked' event", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "promotion clicked", - "properties": { - "creative_name": "Summer Banner", - "creative_slot": "featured_app_1", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale" - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "select_promotion", - "params": { - "creative_name": "Summer Banner", - "creative_slot": "featured_app_1", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag) check all property mappings for 'product clicked' event", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "product clicked", - "properties": { - "list_id": "related_products", - "category": "Related_products", - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345", - "timezone": { - "name": "Europe/Tallinn" - }, - "engagementTimeMsec": 100, - "sessionId": 655 - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "select_item", - "params": { - "item_list_id": "related_products", - "item_list_name": "Related_products", - "items": [ - { - "item_id": "507f1f77bcf86cd799439011", - "item_name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "item_category": "Related_products", - "item_brand": "Google", - "item_variant": "green", - "price": 19, - "quantity": 2, - "index": 1, - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ], - "timezone_name": "Europe/Tallinn", - "engagement_time_msec": 100, - "session_id": 655 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag) check all property mappings for 'product viewed' event", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "product viewed", - "properties": { - "currency": "USD", - "total": "7.77", - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "view_item", - "params": { - "currency": "USD", - "value": 7.77, - "engagement_time_msec": 1, - "items": [ - { - "item_id": "507f1f77bcf86cd799439011", - "item_name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "item_category": "Apparel", - "item_brand": "Google", - "item_variant": "green", - "price": 19, - "quantity": 2, - "index": 1, - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag) check all property mappings for 'promotion clicked' event", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "promotion clicked", - "properties": { - "creative_name": "Summer Banner", - "creative_slot": "featured_app_1", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "0", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "creative_name": "summer_banner2", - "creative_slot": "featured_app_1" - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "typesOfClient": "gtag", - "firebaseAppId": "1:17864591371:android:7a9520d3c78962e21f9fee", - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "client_id": "client_id", - "events": [ - { - "name": "select_promotion", - "params": { - "creative_name": "Summer Banner", - "creative_slot": "featured_app_1", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "engagement_time_msec": 1, - "items": [ - { - "item_id": "507f1f77bcf86cd799439011", - "item_name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "item_category": "Apparel", - "item_brand": "Google", - "item_variant": "green", - "price": 19, - "quantity": 2, - "index": 0, - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "creative_name": "summer_banner2", - "creative_slot": "featured_app_1" - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(firebase) check all property mappings for 'promotion clicked' event", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "promotion clicked", - "properties": { - "creative_name": "Summer Banner", - "creative_slot": "featured_app_1", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "0", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "creative_name": "summer_banner2", - "creative_slot": "featured_app_1" - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "typesOfClient": "firebase", - "firebaseAppId": "1:17864591371:android:7a9520d3c78962e21f9fee", - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "firebase_app_id": "1:17864591371:android:7a9520d3c78962e21f9fee" - }, - "body": { - "JSON": { - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "app_instance_id": "f0dd99b6f979fb551ce583373900f937", - "events": [ - { - "name": "select_promotion", - "params": { - "creative_name": "Summer Banner", - "creative_slot": "featured_app_1", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "engagement_time_msec": 1, - "items": [ - { - "item_id": "507f1f77bcf86cd799439011", - "item_name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "item_category": "Apparel", - "item_brand": "Google", - "item_variant": "green", - "price": 19, - "quantity": 2, - "index": 0, - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "creative_name": "summer_banner2", - "creative_slot": "featured_app_1" - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag) check all property mappings for 'product added' event", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "product added", - "properties": { - "currency": "USD", - "total": "7.77", - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "add_to_cart", - "params": { - "currency": "USD", - "value": 7.77, - "engagement_time_msec": 1, - "items": [ - { - "item_id": "507f1f77bcf86cd799439011", - "item_name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "item_category": "Apparel", - "item_brand": "Google", - "item_variant": "green", - "price": 19, - "quantity": 2, - "index": 1, - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag) check all property mappings for 'product removed' event", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "product removed", - "properties": { - "currency": "USD", - "total": "7.77", - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ], - "engagementTimeMsec": 100, - "sessionId": 655 - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "remove_from_cart", - "params": { - "currency": "USD", - "value": 7.77, - "items": [ - { - "item_id": "507f1f77bcf86cd799439011", - "item_name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "item_category": "Apparel", - "item_brand": "Google", - "item_variant": "green", - "price": 19, - "quantity": 2, - "index": 1, - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ], - "engagement_time_msec": 100, - "session_id": 655 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag) check all property mappings for 'cart viewed' event", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "cart viewed", - "properties": { - "currency": "USD", - "total": "7.77", - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "view_cart", - "params": { - "currency": "USD", - "value": 7.77, - "engagement_time_msec": 1, - "items": [ - { - "item_id": "507f1f77bcf86cd799439011", - "item_name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "item_category": "Apparel", - "item_brand": "Google", - "item_variant": "green", - "price": 19, - "quantity": 2, - "index": 1, - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag) check all property mappings for 'checkout started' event", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "checkout started", - "properties": { - "currency": "USD", - "total": 7.77, - "coupon": "SUMMER_FUN", - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "begin_checkout", - "params": { - "currency": "USD", - "value": 7.77, - "coupon": "SUMMER_FUN", - "engagement_time_msec": 1, - "items": [ - { - "item_id": "507f1f77bcf86cd799439011", - "item_name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "item_category": "Apparel", - "item_brand": "Google", - "item_variant": "green", - "price": 19, - "quantity": 2, - "index": 1, - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag) check all property mappings for 'payment info entered' -> 'add_payment_info' event", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "payment info entered", - "properties": { - "currency": "USD", - "value": "7.77", - "coupon": "SUMMER_FUN", - "payment_method": "Credit Card", - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "params": { - "currency": "USD", - "value": 7.77, - "coupon": "SUMMER_FUN", - "payment_type": "Credit Card", - "engagement_time_msec": 1, - "items": [ - { - "item_id": "507f1f77bcf86cd799439011", - "item_name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "item_category": "Apparel", - "item_brand": "Google", - "item_variant": "green", - "price": 19, - "quantity": 2, - "index": 1, - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - }, - "name": "add_payment_info" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag) check all property mappings for 'checkout Step Completed' -> 'add_shipping_info' event", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "checkout Step Completed", - "properties": { - "currency": "USD", - "value": "7.77", - "coupon": "SUMMER_FUN", - "shipping_method": "Ground", - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "params": { - "currency": "USD", - "value": 7.77, - "coupon": "SUMMER_FUN", - "shipping_tier": "Ground", - "engagement_time_msec": 1, - "items": [ - { - "item_id": "507f1f77bcf86cd799439011", - "item_name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "item_category": "Apparel", - "item_brand": "Google", - "item_variant": "green", - "price": 19, - "quantity": 2, - "index": 1, - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - }, - "name": "add_shipping_info" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag) check all property mappings for 'order completed' event", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "order completed", - "properties": { - "currency": "USD", - "order_id": "T_12345", - "total": 12.21, - "affiliation": "Google Store", - "coupon": "SUMMER_FUN", - "shipping": 3.33, - "tax": 1.11, - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "purchase", - "params": { - "currency": "USD", - "transaction_id": "T_12345", - "value": 12.21, - "affiliation": "Google Store", - "coupon": "SUMMER_FUN", - "shipping": 3.33, - "tax": 1.11, - "engagement_time_msec": 1, - "items": [ - { - "item_id": "507f1f77bcf86cd799439011", - "item_name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "item_category": "Apparel", - "item_brand": "Google", - "item_variant": "green", - "price": 19, - "quantity": 2, - "index": 1, - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag) check all property mappings for 'order refunded' event", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "order refunded", - "properties": { - "currency": "USD", - "order_id": "T_12345", - "total": 12.21, - "affiliation": "Google Store", - "coupon": "SUMMER_FUN", - "shipping": 3.33, - "tax": 1.11, - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "refund", - "params": { - "currency": "USD", - "transaction_id": "T_12345", - "value": 12.21, - "affiliation": "Google Store", - "coupon": "SUMMER_FUN", - "shipping": 3.33, - "tax": 1.11, - "engagement_time_msec": 1, - "items": [ - { - "item_id": "507f1f77bcf86cd799439011", - "item_name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "item_category": "Apparel", - "item_brand": "Google", - "item_variant": "green", - "price": 19, - "quantity": 2, - "index": 1, - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag) exclude only 'products' property from 'order refunded' event", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "order refunded", - "properties": { - "currency": "USD", - "order_id": "T_12345", - "total": 12.21, - "affiliation": "Google Store", - "coupon": "SUMMER_FUN", - "shipping": 3.33, - "tax": 1.11 - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "refund", - "params": { - "currency": "USD", - "transaction_id": "T_12345", - "value": 12.21, - "affiliation": "Google Store", - "coupon": "SUMMER_FUN", - "shipping": 3.33, - "tax": 1.11, - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag) check all property mappings for 'product added to wishlist' event", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "product added to wishlist", - "properties": { - "currency": "USD", - "total": "7.77", - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "add_to_wishlist", - "params": { - "currency": "USD", - "value": 7.77, - "engagement_time_msec": 1, - "items": [ - { - "item_id": "507f1f77bcf86cd799439011", - "item_name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "item_category": "Apparel", - "item_brand": "Google", - "item_variant": "green", - "price": 19, - "quantity": 2, - "index": 1, - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag) check all property mappings for 'product_shared' event", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "product_shared", - "properties": { - "share_via": "Twitter", - "content_type": "image", - "item_id": "C_12345" - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "share", - "params": { - "method": "Twitter", - "content_type": "image", - "item_id": "C_12345", - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag) send only 'product_shared' event name without it's properties", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "product_shared", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "share", - "params": { - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag) check all property mappings for 'cart Shared' event", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "cart Shared", - "properties": { - "share_via": "Twitter", - "content_type": "image", - "item_id": "C_12345" - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "share", - "params": { - "method": "Twitter", - "content_type": "image", - "item_id": "C_12345", - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag) send only 'cart Shared' event name with empty properties: {}", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "cart Shared", - "properties": {}, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "share", - "params": { - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag) check all property mappings for group call", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "group", - "properties": { - "group_id": "G_12345", - "engagementTimeMsec": 100, - "sessionId": 655 - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "group", - "params": { - "group_id": "G_12345", - "engagement_time_msec": 100, - "session_id": 655 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag) group: send only group event name without it's properties", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "group", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "group", - "params": { - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag) check all property mappings for 'earn virtual currency' event", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "earn virtual currency", - "properties": { - "virtual_currency_name": "Gems", - "value": 5 - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "earn_virtual_currency", - "params": { - "virtual_currency_name": "Gems", - "value": 5, - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag) send only 'earn virtual currency' event name without it's properties", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "earn virtual currency", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "earn_virtual_currency", - "params": { - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag) check all property mappings for 'generate_lead' event", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "generate_lead", - "properties": { - "currency": "USD", - "value": 99.99 - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "generate_lead", - "params": { - "currency": "USD", - "value": 99.99, - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag) check all property mappings for 'level_up' event", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "level_up", - "properties": { - "level": 5, - "character": "Player 1" - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "level_up", - "params": { - "level": 5, - "character": "Player 1", - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag) send only 'level_up' event name without it's properties", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "level_up", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "level_up", - "params": { - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag) check all property mappings for 'login' event", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "login", - "properties": { - "method": "Google" - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "login", - "params": { - "method": "Google", - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag) send only 'login' event name without it's properties", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "login", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "login", - "params": { - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag) check all property mappings for 'post_score' event", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "post_score", - "properties": { - "score": 10000, - "level": 5, - "character": "Player 1" - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "post_score", - "params": { - "score": 10000, - "level": 5, - "character": "Player 1", - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag) send only 'login' event name with its required `score` properties", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "post_score", - "properties": { - "score": 10000 - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "post_score", - "params": { - "score": 10000, - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag) check all property mappings for 'select_content' event", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "select_content", - "properties": { - "content_type": "product", - "item_id": "I_12345" - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "select_content", - "params": { - "content_type": "product", - "item_id": "I_12345", - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag) send only 'group' event name without it's properties", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "select_content", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "select_content", - "params": { - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag) check all property mappings for 'sign_up' event", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "sign_up", - "properties": { - "method": "Google" - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "sign_up", - "params": { - "method": "Google", - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag) send only 'sign_up' event name without it's properties", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "sign_up", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "sign_up", - "params": { - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag) check all property mappings for 'spend_virtual_currency' event", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "spend_virtual_currency", - "properties": { - "value": 5, - "virtual_currency_name": "Gems", - "item_name": "Starter Boost" - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "spend_virtual_currency", - "params": { - "value": 5, - "virtual_currency_name": "Gems", - "item_name": "Starter Boost", - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag) send only 'spend_virtual_currency' event name with it's required 'value' and 'virtual_currency_name' properties", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "spend_virtual_currency", - "properties": { - "value": 5, - "virtual_currency_name": "Gems" - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "spend_virtual_currency", - "params": { - "value": 5, - "virtual_currency_name": "Gems", - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag) send 'tutorial_begin' event", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "tutorial_begin", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "tutorial_begin", - "params": { - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag) send 'tutorial_complete' event", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "tutorial_complete", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "tutorial_complete", - "params": { - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag) send all properties for 'unlock_achievement' event", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "unlock_achievement", - "properties": { - "achievement_id": "A_12345" - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "unlock_achievement", - "params": { - "achievement_id": "A_12345", - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag) send all properties for 'view_search_results' event", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "view_search_results", - "properties": { - "search_term": "Clothing", - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "view_search_results", - "params": { - "search_term": "Clothing", - "engagement_time_msec": 1, - "items": [ - { - "item_id": "507f1f77bcf86cd799439011", - "item_name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "item_category": "Apparel", - "item_brand": "Google", - "item_variant": "green", - "price": 19, - "quantity": 2, - "index": 1, - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag) pass only 'products: [...]' property for 'view_search_results' event", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "view_search_results", - "properties": { - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "view_search_results", - "params": { - "engagement_time_msec": 1, - "items": [ - { - "item_id": "507f1f77bcf86cd799439011", - "item_name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "item_category": "Apparel", - "item_brand": "Google", - "item_variant": "green", - "price": 19, - "quantity": 2, - "index": 1, - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag) pass custom event name 'rudderstack event' to GA4 along with custom properties", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "rudderstack event", - "properties": { - "total": "10", - "timezone": { - "name": "Europe/Tallinn" - }, - "engagementTimeMsec": 100, - "sessionId": 655 - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "rudderstack_event", - "params": { - "total": "10", - "timezone_name": "Europe/Tallinn", - "engagement_time_msec": 100, - "session_id": 655 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag) pass custom event name 'rudderstack event' to GA4 along with custom properties and user_properties", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "rudderstack event", - "properties": { - "total": "10", - "user_properties": { - "price": "19" - } - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "user_properties": { - "price": { - "value": "19" - } - }, - "events": [ - { - "name": "rudderstack_event", - "params": { - "total": "10", - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "[Error]: (gtag) pass reserved event name to GA4", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "ad_click", - "properties": { - "total": "10" - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "error": "track:: Reserved event names are not allowed", - "statTags": { - "destType": "GA4", - "errorCategory": "dataValidation", - "errorType": "instrumentation", - "feature": "processor", - "implementation": "native", - "module": "destination" - }, - "statusCode": 400 - } - ] - } - } - }, - { - "name": "ga4", - "description": "[Exclusion]: (gtag) pass reserved property name to GA4 for custom events", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "rudderstack event", - "properties": { - "firebase_conversion": "firebase_conversion", - "google_id": "1234", - "ga_value": "ga_value", - "value": "10" - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "rudderstack_event", - "params": { - "value": "10", - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "[Exclusion]: (gtag) pass reserved property name and reserved properties in `user_properties` to GA4 for custom events", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "rudderstack event", - "properties": { - "firebase_conversion": "firebase_conversion", - "google_id": "1234", - "ga_value": "ga_value", - "value": "10", - "user_properties": { - "first_open_time": "first_open_time", - "user_id": "user_id", - "firebase_value": "firebase_value", - "price": "100" - } - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "user_properties": { - "price": { - "value": "100" - } - }, - "events": [ - { - "name": "rudderstack_event", - "params": { - "value": "10", - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "[Error]: (gtag) pass reserved event names along with reserved properties", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "app_remove", - "properties": { - "firebase_conversion": "firebase_conversion", - "google_id": "1234", - "ga_value": "ga_value", - "value": "10", - "user_properties": { - "first_open_time": "first_open_time", - "user_id": "user_id", - "firebase_value": "firebase_value", - "price": "100" - } - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "error": "track:: Reserved event names are not allowed", - "statTags": { - "destType": "GA4", - "errorCategory": "dataValidation", - "errorType": "instrumentation", - "feature": "processor", - "implementation": "native", - "module": "destination" - }, - "statusCode": 400 - } - ] - } - } - }, - { - "name": "ga4", - "description": "[Error] (gtag) pass reserved custom prefix names to GA4 events", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "firebase_event1", - "properties": { - "firebase_conversion": "firebase_conversion", - "google_id": "1234", - "ga_value": "ga_value", - "value": "10" - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "error": "Reserved custom prefix names are not allowed", - "statTags": { - "destType": "GA4", - "errorCategory": "dataValidation", - "errorType": "instrumentation", - "feature": "processor", - "implementation": "native", - "module": "destination" - }, - "statusCode": 400 - } - ] - } - } - }, - { - "name": "ga4", - "description": "(gtag) check all property mappings for 'product added' event", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "product added", - "properties": { - "currency": "USD", - "total": "7.77", - "google_data": "google_data", - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "add_to_cart", - "params": { - "currency": "USD", - "value": 7.77, - "engagement_time_msec": 1, - "items": [ - { - "item_id": "507f1f77bcf86cd799439011", - "item_name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "item_category": "Apparel", - "item_brand": "Google", - "item_variant": "green", - "price": 19, - "quantity": 2, - "index": 1, - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag) pass custom event name with its properties", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "rudderstack event", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "rudderstack_event", - "params": { - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag) map 'product added' properties to ga4 'add_to_cart' items array", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "product added", - "properties": { - "affiliation": "Google Merchandise Store", - "brand": "Google", - "category": "Related_products", - "coupon": "SUMMER_FUN", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "list_id": "related_products", - "location_id": "L_12345", - "name": "Monopoly: 3rd Edition", - "position": "1", - "price": "19", - "product_id": "507f1f77bcf86cd799439011", - "products": [], - "quantity": "2", - "total": "7.77", - "variant": "green" - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "body": { - "FORM": {}, - "JSON": { - "client_id": "client_id", - "events": [ - { - "name": "add_to_cart", - "params": { - "currency": "USD", - "engagement_time_msec": 1, - "items": [ - { - "affiliation": "Google Merchandise Store", - "coupon": "SUMMER_FUN", - "currency": "USD", - "discount": 2.22, - "index": 1, - "item_brand": "Google", - "item_category": "Related_products", - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_id": "507f1f77bcf86cd799439011", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "item_name": "Monopoly: 3rd Edition", - "item_variant": "green", - "location_id": "L_12345", - "price": 19, - "quantity": 2 - } - ], - "list_id": "related_products", - "value": 7.77 - } - } - ], - "non_personalized_ads": true, - "timestamp_micros": 1650950229000000 - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://www.google-analytics.com/mp/collect", - "files": {}, - "headers": { - "Content-Type": "application/json", - "HOST": "www.google-analytics.com" - }, - "method": "POST", - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "type": "REST", - "version": "1", - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag) pass event name with invalid data type for products: {...} properties (when products parameter is optional)", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "product added", - "properties": { - "currency": "USD", - "total": "7.77", - "products": { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - }, - "affiliation": "Google Merchandise Store", - "brand": "Google", - "category": "Related_products", - "coupon": "SUMMER_FUN", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "list_id": "related_products", - "location_id": "L_12345", - "name": "Monopoly: 3rd Edition", - "position": "1", - "price": "19", - "product_id": "507f1f77bcf86cd799439011", - "quantity": "2", - "variant": "green" - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "body": { - "FORM": {}, - "JSON": { - "client_id": "client_id", - "events": [ - { - "name": "add_to_cart", - "params": { - "currency": "USD", - "engagement_time_msec": 1, - "items": [ - { - "affiliation": "Google Merchandise Store", - "coupon": "SUMMER_FUN", - "currency": "USD", - "discount": 2.22, - "index": 1, - "item_brand": "Google", - "item_category": "Related_products", - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_id": "507f1f77bcf86cd799439011", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "item_name": "Monopoly: 3rd Edition", - "item_variant": "green", - "location_id": "L_12345", - "price": 19, - "quantity": 2 - } - ], - "list_id": "related_products", - "value": 7.77 - } - } - ], - "non_personalized_ads": true, - "timestamp_micros": 1650950229000000 - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://www.google-analytics.com/mp/collect", - "files": {}, - "headers": { - "Content-Type": "application/json", - "HOST": "www.google-analytics.com" - }, - "method": "POST", - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "type": "REST", - "version": "1", - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "[Error] (gtag) pass event name to GA4 with missing fields i.e required in products: [..]", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "product added", - "properties": { - "currency": "USD", - "total": "7.77", - "products": [ - { - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "error": "One of product_id or name is required", - "statTags": { - "destType": "GA4", - "errorCategory": "dataValidation", - "errorType": "instrumentation", - "feature": "processor", - "implementation": "native", - "module": "destination" - }, - "statusCode": 400 - } - ] - } - } - }, - { - "name": "ga4", - "description": "[Error] (gtag) pass event name to GA4 with missing fields i.e required in properties", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "Product Viewed", - "properties": { - "currency": "USD", - "total": "7.77" - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "error": "One of product_id or name is required", - "statTags": { - "destType": "GA4", - "errorCategory": "dataValidation", - "errorType": "instrumentation", - "feature": "processor", - "implementation": "native", - "module": "destination" - }, - "statusCode": 400 - } - ] - } - } - }, - { - "name": "ga4", - "description": "[Error] (gtag) missing API Secret", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "tutotial complete", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "error": "API Secret not found. Aborting ", - "statTags": { - "destType": "GA4", - "errorCategory": "dataValidation", - "errorType": "configuration", - "feature": "processor", - "implementation": "native", - "module": "destination" - }, - "statusCode": 400 - } - ] - } - } - }, - { - "name": "ga4", - "description": "[Error] (gtag) missing measurementId", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "tutotial complete", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "error": "measurementId must be provided. Aborting", - "statTags": { - "destType": "GA4", - "errorCategory": "dataValidation", - "errorType": "configuration", - "feature": "processor", - "implementation": "native", - "module": "destination" - }, - "statusCode": 400 - } - ] - } - } - }, - { - "name": "ga4", - "description": "(gtag) firing group event with event name. should take event name by default", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "group", - "event": "tutorial complete", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "client_id": "client_id", - "events": [ - { - "name": "join_group", - "params": { - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "[Error] (gtag) payload has missing message.type", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "event": "tutotial complete", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "error": "Message Type is not present. Aborting message.", - "statTags": { - "destType": "GA4", - "errorCategory": "dataValidation", - "errorType": "instrumentation", - "feature": "processor", - "implementation": "native", - "module": "destination" - }, - "statusCode": 400 - } - ] - } - } - }, - { - "name": "ga4", - "description": "[Error] (gtag) payload has missing event name", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "error": "Event name is required", - "statTags": { - "destType": "GA4", - "errorCategory": "dataValidation", - "errorType": "instrumentation", - "feature": "processor", - "implementation": "native", - "module": "destination" - }, - "statusCode": 400 - } - ] - } - } - }, - { - "name": "ga4", - "description": "(gtag) taking client_id from anonymousId", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "tutotial complete", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "client_id": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "events": [ - { - "name": "tutotial_complete", - "params": { - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "[Error] (firebase) payload has missing ga4AppInstanceId", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "tutotial complete", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "", - "firebaseAppId": "1:17864591371:android:7a9520d3c78962e21f9fee", - "blockPageViewEvent": false, - "typesOfClient": "firebase", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "error": "ga4AppInstanceId must be provided under externalId", - "statTags": { - "destType": "GA4", - "errorCategory": "dataValidation", - "errorType": "instrumentation", - "feature": "processor", - "implementation": "native", - "module": "destination" - }, - "statusCode": 400 - } - ] - } - } - }, - { - "name": "ga4", - "description": "[Error] (firebase) pass reserved event name", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "app_store_subscription_cancel", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "", - "firebaseAppId": "1:17864591371:android:7a9520d3c78962e21f9fee", - "blockPageViewEvent": false, - "typesOfClient": "firebase", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "error": "Reserved custom event names are not allowed", - "statTags": { - "destType": "GA4", - "errorCategory": "dataValidation", - "errorType": "instrumentation", - "feature": "processor", - "implementation": "native", - "module": "destination" - }, - "statusCode": 400 - } - ] - } - } - }, - { - "name": "ga4", - "description": "(gtag) check all property mappings for 'tutorial complete' event", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "tutorial complete", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "non_personalized_ads": true, - "events": [ - { - "name": "tutorial_complete", - "params": { - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag) check all property mappings for 'cart viewed' event", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "cart viewed", - "properties": { - "currency": "USD", - "total": "7.77", - "products": [ - { - "product_id": 0, - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "view_cart", - "params": { - "currency": "USD", - "value": 7.77, - "engagement_time_msec": 1, - "items": [ - { - "item_id": 0, - "coupon": "SUMMER_FUN", - "item_category": "Apparel", - "item_brand": "Google", - "item_variant": "green", - "price": 19, - "quantity": 2, - "index": 1, - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "[Error]: (firebase) missing firebaseAppId", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "promotion clicked", - "properties": { - "creative_name": "Summer Banner", - "creative_slot": "featured_app_1", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "0", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "creative_name": "summer_banner2", - "creative_slot": "featured_app_1" - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "", - "typesOfClient": "firebase", - "firebaseAppId": "", - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "error": "firebaseAppId must be provided. Aborting", - "statTags": { - "destType": "GA4", - "errorCategory": "dataValidation", - "errorType": "configuration", - "feature": "processor", - "implementation": "native", - "module": "destination" - }, - "statusCode": 400 - } - ] - } - } - }, - { - "name": "ga4", - "description": "(gtag) firing page call", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "rudderId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "page", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "typesOfClient": "gtag", - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "client_id": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "events": [ - { - "name": "page_view", - "params": { - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag) firing page call with custom properties", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "rudderId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "page", - "event": "page view", - "properties": { - "view": "login" - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "typesOfClient": "gtag", - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "client_id": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "events": [ - { - "name": "page_view", - "params": { - "view": "login", - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "[Error]: (gtag) pass timestamp more than 72 hours into the past", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-20T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "tutotial complete", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "typesOfClient": "gtag", - "blockPageViewEvent": false, - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "error": "Allowed timestamp is [72 hours] into the past", - "statTags": { - "destType": "GA4", - "errorCategory": "dataValidation", - "errorType": "instrumentation", - "feature": "processor", - "implementation": "native", - "module": "destination" - }, - "statusCode": 400 - } - ] - } - } - }, - { - "name": "ga4", - "description": "[Error]: (gtag) pass timestamp more than 15 min into the future", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-05-05T15:47:57Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "tutotial complete", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "typesOfClient": "gtag", - "blockPageViewEvent": false, - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "error": "Allowed timestamp is [15 minutes] into the future", - "statTags": { - "destType": "GA4", - "errorCategory": "dataValidation", - "errorType": "instrumentation", - "feature": "processor", - "implementation": "native", - "module": "destination" - }, - "statusCode": 400 - } - ] - } - } - }, - { - "name": "ga4", - "description": "(gtag) pass custom properties along with products: [..] parameters to GA4 standard events along with its stated ones", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "order completed", - "properties": { - "checkout_id": "12345", - "order_id": "1234", - "myCustomProp": "My arbitray value", - "affiliation": "Apple Store", - "total": 20, - "revenue": 15, - "shipping": 22, - "tax": 1, - "discount": 1.5, - "coupon": "ImagePro", - "currency": "USD", - "products": [ - { - "product_id": "123", - "sku": "G-32", - "name": "Monopoly", - "price": 14, - "quantity": 1, - "category": "Games", - "item_category2": "Board games", - "url": "https://www.website.com/product/path", - "image_url": "https://www.website.com/product/path.jpg" - } - ], - "timezone": { - "name": "Europe/Tallinn" - } - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "purchase", - "params": { - "checkout_id": "12345", - "transaction_id": "1234", - "myCustomProp": "My arbitray value", - "affiliation": "Apple Store", - "value": 20, - "shipping": 22, - "tax": 1, - "discount": 1.5, - "coupon": "ImagePro", - "currency": "USD", - "engagement_time_msec": 1, - "items": [ - { - "item_id": "123", - "sku": "G-32", - "item_name": "Monopoly", - "price": 14, - "quantity": 1, - "item_category": "Games", - "item_category2": "Board games", - "url": "https://www.website.com/product/path", - "image_url": "https://www.website.com/product/path.jpg" - } - ], - "timezone_name": "Europe/Tallinn" - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag) pass custom properties excluding products: [..] parameter to GA4 standard events along with its stated ones", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "promotion clicked", - "properties": { - "customProp-1": "check-1", - "customProp-2": "check-2", - "timezone": { - "name": "Europe/Tallinn" - }, - "creative_name": "Summer Banner", - "creative_slot": "featured_app_1", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale" - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "select_promotion", - "params": { - "customProp-1": "check-1", - "customProp-2": "check-2", - "timezone_name": "Europe/Tallinn", - "creative_name": "Summer Banner", - "creative_slot": "featured_app_1", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag) message type group -> 'join_group' with custom event", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "group", - "traits": { - "custom1": 1234, - "custom2": "custom2", - "timezone": { - "name": "Europe/Tallinn" - }, - "engagementTimeMsec": 100, - "sessionId": 655 - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "client_id": "client_id", - "events": [ - { - "name": "join_group", - "params": { - "custom1": 1234, - "custom2": "custom2", - "timezone_name": "Europe/Tallinn", - "engagement_time_msec": 100, - "session_id": 655 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag): check args keyword for price x currency multiplication", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "product added", - "properties": { - "currency": "USD", - "price": 2.4, - "quantity": 2, - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "client_id": "client_id", - "events": [ - { - "name": "add_to_cart", - "params": { - "currency": "USD", - "value": 4.8, - "engagement_time_msec": 1, - "items": [ - { - "item_id": "507f1f77bcf86cd799439011", - "item_name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "item_category": "Apparel", - "item_brand": "Google", - "item_variant": "green", - "price": 19, - "quantity": 2, - "index": 1, - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ], - "price": 2.4, - "quantity": 2 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag): take page properties from context.page for 'page' call along with custom properties", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "rudderId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "page": { - "url": "http://morkey.in", - "path": "/cart", - "title": "miphone", - "search": "MI", - "referrer": "morkey" - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "page", - "integrations": { - "All": true - }, - "properties": { - "cust1": 1234, - "engagementTimeMsec": 100, - "sessionId": 655 - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "client_id": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "events": [ - { - "name": "page_view", - "params": { - "page_referrer": "morkey", - "page_title": "miphone", - "page_location": "http://morkey.in", - "cust1": 1234, - "engagement_time_msec": 100, - "session_id": 655 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "[Error] GA4: event not as string", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": { - "name": "promotion_viewed" - }, - "properties": { - "creative_name": "Summer Banner", - "creative_slot": "featured_app_1", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "0", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "creative_name": "summer_banner2", - "creative_slot": "featured_app_1" - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "error": "track:: event name should be string", - "statTags": { - "destType": "GA4", - "errorCategory": "dataValidation", - "errorType": "instrumentation", - "feature": "processor", - "implementation": "native", - "module": "destination" - }, - "statusCode": 400 - } - ] - } - } - }, - { - "name": "ga4", - "description": "[Error] GA4: client_id not found in all four path", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "product added", - "properties": { - "currency": "USD", - "price": 2.4, - "quantity": 2, - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - }, - "integrations": { - "All": true - } - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6BET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": true, - "sendLoginSignup": true, - "newOrExistingUserTrait": "firstLogin", - "loginSignupMethod": "method", - "generateLead": true, - "generateLeadValueTrait": "value", - "generateLeadCurrencyTrait": "currency", - "clientIdFieldIdentifier": "properties.client_id" - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "error": "ga4ClientId, anonymousId or messageId must be provided", - "statTags": { - "destType": "GA4", - "errorCategory": "dataValidation", - "errorType": "configuration", - "feature": "processor", - "implementation": "native", - "module": "destination" - }, - "statusCode": 400 - } - ] - } - } - }, - { - "name": "ga4", - "description": "client_id isn't sent from the path defined in the webapp config, falling back to default values i.e here it is anonymousId", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "product added", - "properties": { - "currency": "USD", - "price": 2.4, - "quantity": 2, - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - }, - "integrations": { - "All": true - } - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6BET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": true, - "sendLoginSignup": true, - "newOrExistingUserTrait": "firstLogin", - "loginSignupMethod": "method", - "generateLead": true, - "generateLeadValueTrait": "value", - "generateLeadCurrencyTrait": "currency", - "clientIdFieldIdentifier": "properties.client_id" - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "name": "add_to_cart", - "params": { - "items": [ - { - "index": 1, - "price": 19, - "coupon": "SUMMER_FUN", - "item_id": "507f1f77bcf86cd799439011", - "currency": "USD", - "discount": 2.22, - "quantity": 2, - "item_name": "Monopoly: 3rd Edition", - "item_brand": "Google", - "affiliation": "Google Merchandise Store", - "location_id": "L_12345", - "item_list_id": "related_products", - "item_variant": "green", - "item_category": "Apparel", - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_name": "Related Products" - } - ], - "price": 2.4, - "value": 4.8, - "currency": "USD", - "quantity": 2, - "engagement_time_msec": 1 - } - } - ], - "client_id": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "non_personalized_ads": true - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6BET4" - }, - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://www.google-analytics.com/mp/collect", - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "any custom or item property with array value, is flattened with underscore delimeter", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "product added", - "originalTimestamp": "2022-04-26T05:17:09Z", - "properties": { - "currency": "USD", - "total": "7.77", - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345", - "address": { - "city": "kolkata", - "district": "24pgs" - }, - "categoryLevels": [ - "Furniture", - "Bedroom Furniture", - "Dressers & Chests" - ], - "products": [ - { - "product_id": "1234", - "product_details": { - "colour": "red", - "shape": "rectangle" - }, - "productLevels": [ - "test1", - "test2", - "test3" - ] - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-11-14T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "client_id": "client_id", - "events": [ - { - "name": "add_to_cart", - "params": { - "currency": "USD", - "value": 7.77, - "items": [ - { - "item_id": "1234", - "product_details_colour": "red", - "product_details_shape": "rectangle", - "productLevels_0": "test1", - "productLevels_1": "test2", - "productLevels_2": "test3" - } - ], - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345", - "address_city": "kolkata", - "address_district": "24pgs", - "categoryLevels_0": "Furniture", - "categoryLevels_1": "Bedroom Furniture", - "categoryLevels_2": "Dressers & Chests", - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "extract session_id from context.sessionId", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36", - "sessionId": 16678456735 - }, - "type": "track", - "event": "product added", - "properties": { - "currency": "USD", - "price": 2.4, - "quantity": 2, - "client_id": "client@1234", - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - }, - "integrations": { - "All": true - } - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6BET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": true, - "sendLoginSignup": true, - "newOrExistingUserTrait": "firstLogin", - "loginSignupMethod": "method", - "generateLead": true, - "generateLeadValueTrait": "value", - "generateLeadCurrencyTrait": "currency" - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "name": "add_to_cart", - "params": { - "items": [ - { - "index": 1, - "price": 19, - "coupon": "SUMMER_FUN", - "item_id": "507f1f77bcf86cd799439011", - "currency": "USD", - "discount": 2.22, - "quantity": 2, - "item_name": "Monopoly: 3rd Edition", - "item_brand": "Google", - "affiliation": "Google Merchandise Store", - "location_id": "L_12345", - "item_list_id": "related_products", - "item_variant": "green", - "item_category": "Apparel", - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_name": "Related Products" - } - ], - "price": 2.4, - "value": 4.8, - "currency": "USD", - "quantity": 2, - "session_id": 16678456735, - "engagement_time_msec": 1, - "client_id": "client@1234" - } - } - ], - "client_id": "client_id", - "non_personalized_ads": true - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6BET4" - }, - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://www.google-analytics.com/mp/collect", - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag) send integer userId", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "userId": 34567, - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36", - "sessionId": 16678456735 - }, - "type": "track", - "event": "product added", - "properties": { - "currency": "USD", - "price": 2.4, - "quantity": 2, - "client_id": "client@1234", - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - }, - "integrations": { - "All": true - } - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6BET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": true, - "sendLoginSignup": true, - "newOrExistingUserTrait": "firstLogin", - "loginSignupMethod": "method", - "generateLead": true, - "generateLeadValueTrait": "value", - "generateLeadCurrencyTrait": "currency" - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "name": "add_to_cart", - "params": { - "items": [ - { - "index": 1, - "price": 19, - "coupon": "SUMMER_FUN", - "item_id": "507f1f77bcf86cd799439011", - "currency": "USD", - "discount": 2.22, - "quantity": 2, - "item_name": "Monopoly: 3rd Edition", - "item_brand": "Google", - "affiliation": "Google Merchandise Store", - "location_id": "L_12345", - "item_list_id": "related_products", - "item_variant": "green", - "item_category": "Apparel", - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_name": "Related Products" - } - ], - "price": 2.4, - "value": 4.8, - "currency": "USD", - "quantity": 2, - "session_id": 16678456735, - "engagement_time_msec": 1, - "client_id": "client@1234" - } - } - ], - "client_id": "client_id", - "user_id": "34567", - "non_personalized_ads": true - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6BET4" - }, - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://www.google-analytics.com/mp/collect", - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag) login event with user_properties", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "userId": "user@1", - "channel": "web", - "anonymousId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "traits": { - "campaign": "advertizing" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "login", - "properties": { - "method": "facebook" - }, - "integrations": { - "All": true - } - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6BET4", - "firebaseAppId": "", - "typesOfClient": "gtag", - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "name": "login", - "params": { - "method": "facebook", - "engagement_time_msec": 1 - } - } - ], - "user_id": "user@1", - "user_properties": { - "campaign": { - "value": "advertizing" - } - }, - "client_id": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "non_personalized_ads": true - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6BET4" - }, - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://www.google-analytics.com/mp/collect", - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag) sign_up event", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "userId": "user@1", - "channel": "web", - "anonymousId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "traits": { - "campaign": "advertizing" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "sign_up", - "properties": { - "method": "google" - }, - "integrations": { - "All": true - } - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6BET4", - "firebaseAppId": "", - "typesOfClient": "gtag", - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "name": "sign_up", - "params": { - "method": "google", - "engagement_time_msec": 1 - } - } - ], - "user_id": "user@1", - "user_properties": { - "campaign": { - "value": "advertizing" - } - }, - "client_id": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "non_personalized_ads": true - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6BET4" - }, - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://www.google-analytics.com/mp/collect", - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag) generate_lead event", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "userId": "user@1", - "channel": "web", - "anonymousId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "traits": { - "campaign": "advertizing" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "generate_lead", - "properties": { - "source": "instagram", - "value": 20 - }, - "integrations": { - "All": true - } - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6BET4", - "firebaseAppId": "", - "typesOfClient": "gtag", - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "name": "generate_lead", - "params": { - "currency": "USD", - "value": 20, - "source": "instagram", - "engagement_time_msec": 1 - } - } - ], - "user_id": "user@1", - "user_properties": { - "campaign": { - "value": "advertizing" - } - }, - "client_id": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "non_personalized_ads": true - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6BET4" - }, - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://www.google-analytics.com/mp/collect", - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag) track call with page information such as url, title, referrer", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "userId": "user@1", - "channel": "web", - "anonymousId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "page": { - "initial_referrer": "$direct", - "path": "/", - "referrer": "$direct", - "tab_url": "https://www.rudderstack.com/", - "title": "Document", - "url": "https://www.rudderstack.com/" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "generate_lead", - "properties": { - "source": "instagram", - "value": 20 - }, - "integrations": { - "All": true - } - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6BET4", - "firebaseAppId": "", - "typesOfClient": "gtag", - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "name": "generate_lead", - "params": { - "currency": "USD", - "value": 20, - "source": "instagram", - "page_location": "https://www.rudderstack.com/", - "page_referrer": "$direct", - "page_title": "Document", - "engagement_time_msec": 1 - } - } - ], - "user_id": "user@1", - "client_id": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "non_personalized_ads": true - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6BET4" - }, - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://www.google-analytics.com/mp/collect", - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag) track event with hybrid connection mode using buffer cloud mode event approach", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "userId": "user@1", - "channel": "web", - "anonymousId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "traits": { - "campaign": "advertizing" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "generate_lead", - "properties": { - "source": "instagram", - "value": 20 - }, - "integrations": { - "All": true, - "Google Analytics 4 (GA4)": { - "clientId": "554581488.1683172875", - "sessionId": "1683172875" - } - } - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6BET4", - "firebaseAppId": "", - "typesOfClient": "gtag", - "eventFilteringOption": "disable", - "connectionMode": "hybrid", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "name": "generate_lead", - "params": { - "currency": "USD", - "value": 20, - "source": "instagram", - "session_id": "1683172875", - "engagement_time_msec": 1 - } - } - ], - "user_id": "user@1", - "user_properties": { - "campaign": { - "value": "advertizing" - } - }, - "client_id": "554581488.1683172875", - "non_personalized_ads": true - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6BET4" - }, - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://www.google-analytics.com/mp/collect", - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag) track event with hybrid connection mode using override client_id and session_id approach", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "userId": "user@1", - "channel": "web", - "anonymousId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "traits": { - "campaign": "advertizing" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36", - "sessionId": 1683172874065 - }, - "type": "track", - "event": "generate_lead", - "properties": { - "source": "instagram", - "value": 20 - }, - "integrations": { - "All": true - } - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6BET4", - "firebaseAppId": "", - "typesOfClient": "gtag", - "eventFilteringOption": "disable", - "connectionMode": "hybrid", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "name": "generate_lead", - "params": { - "currency": "USD", - "value": 20, - "source": "instagram", - "session_id": 1683172874065, - "engagement_time_msec": 1 - } - } - ], - "user_id": "user@1", - "user_properties": { - "campaign": { - "value": "advertizing" - } - }, - "client_id": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "non_personalized_ads": true - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6BET4" - }, - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://www.google-analytics.com/mp/collect", - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag) firing group calls with GA4 hybrid mode connection", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "group", - "event": "tutorial complete", - "integrations": { - "Google Analytics 4": { - "clientId": "4718026.1683606287", - "sessionId": "1683606287", - "sessionNumber": 1 - } - } - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "typesOfClient": "gtag", - "eventFilteringOption": "disable", - "connectionMode": "hybrid", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "non_personalized_ads": true, - "client_id": "4718026.1683606287", - "events": [ - { - "name": "join_group", - "params": { - "engagement_time_msec": 1, - "session_id": "1683606287", - "session_number": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag) sign_up event with all data types of user_properties", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "userId": "user@1", - "channel": "web", - "anonymousId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "traits": { - "campaign": "advertizing", - "name": "rudder", - "age": 45, - "hobby": [ - "dancing", - "singing", - "reading" - ], - "enableEURegion": false, - "isEnterpriseUser": { - "value": false - } - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "sign_up", - "properties": { - "method": "google" - }, - "integrations": { - "All": true - } - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6BET4", - "firebaseAppId": "", - "typesOfClient": "gtag", - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "name": "sign_up", - "params": { - "method": "google", - "engagement_time_msec": 1 - } - } - ], - "user_id": "user@1", - "client_id": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "user_properties": { - "age": { - "value": 45 - }, - "name": { - "value": "rudder" - }, - "campaign": { - "value": "advertizing" - }, - "enableEURegion": { - "value": false - } - }, - "non_personalized_ads": true - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6BET4" - }, - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://www.google-analytics.com/mp/collect", - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "[Error]: (gtag) event name starts with numbers", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "1234_sign_up", - "properties": { - "total": "10" - }, - "integrations": { - "All": true - } - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "typesOfClient": "gtag", - "eventFilteringOption": "disable", - "connectionMode": "cloud", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "error": "Event name must start with a letter and can only contain letters, numbers, and underscores", - "statTags": { - "destType": "GA4", - "errorCategory": "dataValidation", - "errorType": "instrumentation", - "feature": "processor", - "implementation": "native", - "module": "destination" - }, - "statusCode": 400 - } - ] - } - } - }, - { - "name": "ga4", - "description": "(gtag) event having multiple empty array and object parameters", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "type": "track", - "event": "logIn", - "userId": "user@1", - "group_id": "group@1", - "anon_id": "78e95d6d-58c0-4237-b99e-2ef510b6d502", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "properties": { - "user_interest": "Moderate", - "company_interest": "", - "profile": [ - { - "is_6qa": true, - "product": null, - "product_fit": "Moderate", - "product_stage": "Purchase", - "intent_score": 89, - "profile_score": 52, - "product_display$name": "rudderstack" - } - ], - "user_company": "Analytics consulting", - "user_account": "1", - "user_id_mappings": "330098|245252|461224|282599", - "company_naics_6sense": "5173", - "usr_consent": null, - "firebase_user_id": "kdgMnP", - "google_user_id": "G-123456", - "company_domain": "consulting.net", - "company_region": "New Zealand", - "user_product_interests": { - "ids": [], - "list": [ - { - "id": 330098, - "name": [] - }, - { - "id": 245252, - "name": {} - } - ], - "names": [] - }, - "company_country": {}, - "company_industry": "Business Analytics", - "company_revenue": "$5M - $10M", - "company_annual_revenue": "5568000", - "company_sic_description": "", - "company_naics_description": [] - }, - "integrations": { - "All": true - } - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "typesOfClient": "gtag", - "eventFilteringOption": "disable", - "connectionMode": "cloud", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "name": "login", - "params": { - "company_annual_revenue": "5568000", - "company_domain": "consulting.net", - "company_industry": "Business Analytics", - "company_naics_6sense": "5173", - "company_region": "New Zealand", - "company_revenue": "$5M - $10M", - "engagement_time_msec": 1, - "profile_0_intent_score": 89, - "profile_0_is_6qa": true, - "profile_0_product_display$name": "rudderstack", - "profile_0_product_fit": "Moderate", - "profile_0_product_stage": "Purchase", - "profile_0_profile_score": 52, - "user_account": "1", - "user_company": "Analytics consulting", - "user_id_mappings": "330098|245252|461224|282599", - "user_interest": "Moderate", - "user_product_interests_list_0_id": 330098, - "user_product_interests_list_1_id": 245252 - } - } - ], - "user_id": "user@1", - "client_id": "client_id", - "non_personalized_ads": true - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://www.google-analytics.com/mp/collect", - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - }, - { - "name": "ga4", - "description": "(gtag) campaign_details custom event", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "message": { - "userId": "user@1", - "channel": "web", - "anonymousId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "campaign": { - "id": "google_1234", - "name": "Summer_fun", - "source": "google", - "medium": "cpc", - "term": "summer+travel", - "content": "logo link" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "Campaign Details", - "properties": {}, - "integrations": { - "All": true - } - }, - "destination": { - "Config": { - "apiSecret": "QyWKGHj8QhG2L4ePAPiXCA", - "measurementId": "G-T40PE6BET4", - "typesOfClient": "gtag", - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "name": "campaign_details", - "params": { - "campaign_id": "google_1234", - "campaign": "Summer_fun", - "source": "google", - "medium": "cpc", - "term": "summer+travel", - "content": "logo link", - "engagement_time_msec": 1 - } - } - ], - "user_id": "user@1", - "client_id": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "non_personalized_ads": true - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": { - "api_secret": "QyWKGHj8QhG2L4ePAPiXCA", - "measurement_id": "G-T40PE6BET4" - }, - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://www.google-analytics.com/mp/collect", - "userId": "" - }, - "statusCode": 200 - } - ] - } - }, - "mockFns": defaultMockFns - } -] \ No newline at end of file + { + name: 'ga4', + description: "(gtag) check all property mappings for 'Products Searched' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99v4f979fb997ce453373900f891', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'Products Searched', + properties: { + query: 't-shirts', + }, + integrations: { + All: true, + }, + sentAt: '2022-04-22T10:57:58Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + timestamp_micros: 1650950229000000, + events: [ + { + name: 'search', + params: { + search_term: 't-shirts', + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) check all property mappings for 'product list viewed' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + rudderId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99v4f979fb997ce453373900f891', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'product list viewed', + properties: { + list_id: 'related_products', + category: 'Related_products', + products: [ + { + product_id: '507f1f77bcf86cd799439011', + name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + category: 'Apparel', + brand: 'Google', + variant: 'green', + price: '19', + quantity: '2', + position: '1', + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'view_item_list', + params: { + item_list_id: 'related_products', + item_list_name: 'Related_products', + items: [ + { + item_id: '507f1f77bcf86cd799439011', + item_name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + item_category: 'Apparel', + item_brand: 'Google', + item_variant: 'green', + price: 19, + quantity: 2, + index: 1, + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) check all property mappings for 'promotion viewed' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'promotion viewed', + properties: { + creative_name: 'Summer Banner', + creative_slot: 'featured_app_1', + location_id: 'L_12345', + promotion_id: 'P_12345', + promotion_name: 'Summer Sale', + products: [ + { + product_id: '507f1f77bcf86cd799439011', + name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + category: 'Apparel', + brand: 'Google', + variant: 'green', + price: '19', + quantity: '2', + position: '0', + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + promotion_id: 'P_12345', + promotion_name: 'Summer Sale', + creative_name: 'summer_banner2', + creative_slot: 'featured_app_1', + }, + ], + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + client_id: 'client_id', + events: [ + { + name: 'view_promotion', + params: { + creative_name: 'Summer Banner', + creative_slot: 'featured_app_1', + location_id: 'L_12345', + promotion_id: 'P_12345', + promotion_name: 'Summer Sale', + engagement_time_msec: 1, + items: [ + { + item_id: '507f1f77bcf86cd799439011', + item_name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + item_category: 'Apparel', + item_brand: 'Google', + item_variant: 'green', + price: 19, + quantity: 2, + index: 0, + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + promotion_id: 'P_12345', + promotion_name: 'Summer Sale', + creative_name: 'summer_banner2', + creative_slot: 'featured_app_1', + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) check all property mappings for 'promotion clicked' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'promotion clicked', + properties: { + creative_name: 'Summer Banner', + creative_slot: 'featured_app_1', + location_id: 'L_12345', + promotion_id: 'P_12345', + promotion_name: 'Summer Sale', + products: [ + { + product_id: '507f1f77bcf86cd799439011', + name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + category: 'Apparel', + brand: 'Google', + variant: 'green', + price: '19', + quantity: '2', + position: '0', + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + promotion_id: 'P_12345', + promotion_name: 'Summer Sale', + creative_name: 'summer_banner2', + creative_slot: 'featured_app_1', + }, + ], + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'select_promotion', + params: { + creative_name: 'Summer Banner', + creative_slot: 'featured_app_1', + location_id: 'L_12345', + promotion_id: 'P_12345', + promotion_name: 'Summer Sale', + engagement_time_msec: 1, + items: [ + { + item_id: '507f1f77bcf86cd799439011', + item_name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + item_category: 'Apparel', + item_brand: 'Google', + item_variant: 'green', + price: 19, + quantity: 2, + index: 0, + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + promotion_id: 'P_12345', + promotion_name: 'Summer Sale', + creative_name: 'summer_banner2', + creative_slot: 'featured_app_1', + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) exclude only 'products' property from 'promotion clicked' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'promotion clicked', + properties: { + creative_name: 'Summer Banner', + creative_slot: 'featured_app_1', + location_id: 'L_12345', + promotion_id: 'P_12345', + promotion_name: 'Summer Sale', + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'select_promotion', + params: { + creative_name: 'Summer Banner', + creative_slot: 'featured_app_1', + location_id: 'L_12345', + promotion_id: 'P_12345', + promotion_name: 'Summer Sale', + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) check all property mappings for 'product clicked' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'product clicked', + properties: { + list_id: 'related_products', + category: 'Related_products', + product_id: '507f1f77bcf86cd799439011', + name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + brand: 'Google', + variant: 'green', + price: '19', + quantity: '2', + position: '1', + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + timezone: { + name: 'Europe/Tallinn', + }, + engagementTimeMsec: 100, + sessionId: 655, + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'select_item', + params: { + item_list_id: 'related_products', + item_list_name: 'Related_products', + items: [ + { + item_id: '507f1f77bcf86cd799439011', + item_name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + item_category: 'Related_products', + item_brand: 'Google', + item_variant: 'green', + price: 19, + quantity: 2, + index: 1, + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + timezone_name: 'Europe/Tallinn', + engagement_time_msec: 100, + session_id: 655, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) check all property mappings for 'product viewed' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'product viewed', + properties: { + currency: 'USD', + total: '7.77', + product_id: '507f1f77bcf86cd799439011', + name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + category: 'Apparel', + brand: 'Google', + variant: 'green', + price: '19', + quantity: '2', + position: '1', + affiliation: 'Google Merchandise Store', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'view_item', + params: { + currency: 'USD', + value: 7.77, + engagement_time_msec: 1, + items: [ + { + item_id: '507f1f77bcf86cd799439011', + item_name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + item_category: 'Apparel', + item_brand: 'Google', + item_variant: 'green', + price: 19, + quantity: 2, + index: 1, + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) check all property mappings for 'promotion clicked' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'promotion clicked', + properties: { + creative_name: 'Summer Banner', + creative_slot: 'featured_app_1', + location_id: 'L_12345', + promotion_id: 'P_12345', + promotion_name: 'Summer Sale', + products: [ + { + product_id: '507f1f77bcf86cd799439011', + name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + category: 'Apparel', + brand: 'Google', + variant: 'green', + price: '19', + quantity: '2', + position: '0', + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + promotion_id: 'P_12345', + promotion_name: 'Summer Sale', + creative_name: 'summer_banner2', + creative_slot: 'featured_app_1', + }, + ], + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + typesOfClient: 'gtag', + firebaseAppId: '1:17864591371:android:7a9520d3c78962e21f9fee', + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + client_id: 'client_id', + events: [ + { + name: 'select_promotion', + params: { + creative_name: 'Summer Banner', + creative_slot: 'featured_app_1', + location_id: 'L_12345', + promotion_id: 'P_12345', + promotion_name: 'Summer Sale', + engagement_time_msec: 1, + items: [ + { + item_id: '507f1f77bcf86cd799439011', + item_name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + item_category: 'Apparel', + item_brand: 'Google', + item_variant: 'green', + price: 19, + quantity: 2, + index: 0, + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + promotion_id: 'P_12345', + promotion_name: 'Summer Sale', + creative_name: 'summer_banner2', + creative_slot: 'featured_app_1', + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(firebase) check all property mappings for 'promotion clicked' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'promotion clicked', + properties: { + creative_name: 'Summer Banner', + creative_slot: 'featured_app_1', + location_id: 'L_12345', + promotion_id: 'P_12345', + promotion_name: 'Summer Sale', + products: [ + { + product_id: '507f1f77bcf86cd799439011', + name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + category: 'Apparel', + brand: 'Google', + variant: 'green', + price: '19', + quantity: '2', + position: '0', + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + promotion_id: 'P_12345', + promotion_name: 'Summer Sale', + creative_name: 'summer_banner2', + creative_slot: 'featured_app_1', + }, + ], + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + typesOfClient: 'firebase', + firebaseAppId: '1:17864591371:android:7a9520d3c78962e21f9fee', + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + firebase_app_id: '1:17864591371:android:7a9520d3c78962e21f9fee', + }, + body: { + JSON: { + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + app_instance_id: 'f0dd99b6f979fb551ce583373900f937', + events: [ + { + name: 'select_promotion', + params: { + creative_name: 'Summer Banner', + creative_slot: 'featured_app_1', + location_id: 'L_12345', + promotion_id: 'P_12345', + promotion_name: 'Summer Sale', + engagement_time_msec: 1, + items: [ + { + item_id: '507f1f77bcf86cd799439011', + item_name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + item_category: 'Apparel', + item_brand: 'Google', + item_variant: 'green', + price: 19, + quantity: 2, + index: 0, + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + promotion_id: 'P_12345', + promotion_name: 'Summer Sale', + creative_name: 'summer_banner2', + creative_slot: 'featured_app_1', + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) check all property mappings for 'product added' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'product added', + properties: { + currency: 'USD', + total: '7.77', + products: [ + { + product_id: '507f1f77bcf86cd799439011', + name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + category: 'Apparel', + brand: 'Google', + variant: 'green', + price: '19', + quantity: '2', + position: '1', + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'add_to_cart', + params: { + currency: 'USD', + value: 7.77, + engagement_time_msec: 1, + items: [ + { + item_id: '507f1f77bcf86cd799439011', + item_name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + item_category: 'Apparel', + item_brand: 'Google', + item_variant: 'green', + price: 19, + quantity: 2, + index: 1, + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) check all property mappings for 'product removed' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'product removed', + properties: { + currency: 'USD', + total: '7.77', + products: [ + { + product_id: '507f1f77bcf86cd799439011', + name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + category: 'Apparel', + brand: 'Google', + variant: 'green', + price: '19', + quantity: '2', + position: '1', + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + engagementTimeMsec: 100, + sessionId: 655, + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'remove_from_cart', + params: { + currency: 'USD', + value: 7.77, + items: [ + { + item_id: '507f1f77bcf86cd799439011', + item_name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + item_category: 'Apparel', + item_brand: 'Google', + item_variant: 'green', + price: 19, + quantity: 2, + index: 1, + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + engagement_time_msec: 100, + session_id: 655, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) check all property mappings for 'cart viewed' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'cart viewed', + properties: { + currency: 'USD', + total: '7.77', + products: [ + { + product_id: '507f1f77bcf86cd799439011', + name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + category: 'Apparel', + brand: 'Google', + variant: 'green', + price: '19', + quantity: '2', + position: '1', + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'view_cart', + params: { + currency: 'USD', + value: 7.77, + engagement_time_msec: 1, + items: [ + { + item_id: '507f1f77bcf86cd799439011', + item_name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + item_category: 'Apparel', + item_brand: 'Google', + item_variant: 'green', + price: 19, + quantity: 2, + index: 1, + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) check all property mappings for 'checkout started' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'checkout started', + properties: { + currency: 'USD', + total: 7.77, + coupon: 'SUMMER_FUN', + products: [ + { + product_id: '507f1f77bcf86cd799439011', + name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + category: 'Apparel', + brand: 'Google', + variant: 'green', + price: '19', + quantity: '2', + position: '1', + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'begin_checkout', + params: { + currency: 'USD', + value: 7.77, + coupon: 'SUMMER_FUN', + engagement_time_msec: 1, + items: [ + { + item_id: '507f1f77bcf86cd799439011', + item_name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + item_category: 'Apparel', + item_brand: 'Google', + item_variant: 'green', + price: 19, + quantity: 2, + index: 1, + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: + "(gtag) check all property mappings for 'payment info entered' -> 'add_payment_info' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'payment info entered', + properties: { + currency: 'USD', + value: '7.77', + coupon: 'SUMMER_FUN', + payment_method: 'Credit Card', + products: [ + { + product_id: '507f1f77bcf86cd799439011', + name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + category: 'Apparel', + brand: 'Google', + variant: 'green', + price: '19', + quantity: '2', + position: '1', + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + params: { + currency: 'USD', + value: 7.77, + coupon: 'SUMMER_FUN', + payment_type: 'Credit Card', + engagement_time_msec: 1, + items: [ + { + item_id: '507f1f77bcf86cd799439011', + item_name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + item_category: 'Apparel', + item_brand: 'Google', + item_variant: 'green', + price: 19, + quantity: 2, + index: 1, + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + name: 'add_payment_info', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: + "(gtag) check all property mappings for 'checkout Step Completed' -> 'add_shipping_info' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'checkout Step Completed', + properties: { + currency: 'USD', + value: '7.77', + coupon: 'SUMMER_FUN', + shipping_method: 'Ground', + products: [ + { + product_id: '507f1f77bcf86cd799439011', + name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + category: 'Apparel', + brand: 'Google', + variant: 'green', + price: '19', + quantity: '2', + position: '1', + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + params: { + currency: 'USD', + value: 7.77, + coupon: 'SUMMER_FUN', + shipping_tier: 'Ground', + engagement_time_msec: 1, + items: [ + { + item_id: '507f1f77bcf86cd799439011', + item_name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + item_category: 'Apparel', + item_brand: 'Google', + item_variant: 'green', + price: 19, + quantity: 2, + index: 1, + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + name: 'add_shipping_info', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) check all property mappings for 'order completed' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'order completed', + properties: { + currency: 'USD', + order_id: 'T_12345', + total: 12.21, + affiliation: 'Google Store', + coupon: 'SUMMER_FUN', + shipping: 3.33, + tax: 1.11, + products: [ + { + product_id: '507f1f77bcf86cd799439011', + name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + category: 'Apparel', + brand: 'Google', + variant: 'green', + price: '19', + quantity: '2', + position: '1', + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'purchase', + params: { + currency: 'USD', + transaction_id: 'T_12345', + value: 12.21, + affiliation: 'Google Store', + coupon: 'SUMMER_FUN', + shipping: 3.33, + tax: 1.11, + engagement_time_msec: 1, + items: [ + { + item_id: '507f1f77bcf86cd799439011', + item_name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + item_category: 'Apparel', + item_brand: 'Google', + item_variant: 'green', + price: 19, + quantity: 2, + index: 1, + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) check all property mappings for 'order refunded' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'order refunded', + properties: { + currency: 'USD', + order_id: 'T_12345', + total: 12.21, + affiliation: 'Google Store', + coupon: 'SUMMER_FUN', + shipping: 3.33, + tax: 1.11, + products: [ + { + product_id: '507f1f77bcf86cd799439011', + name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + category: 'Apparel', + brand: 'Google', + variant: 'green', + price: '19', + quantity: '2', + position: '1', + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'refund', + params: { + currency: 'USD', + transaction_id: 'T_12345', + value: 12.21, + affiliation: 'Google Store', + coupon: 'SUMMER_FUN', + shipping: 3.33, + tax: 1.11, + engagement_time_msec: 1, + items: [ + { + item_id: '507f1f77bcf86cd799439011', + item_name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + item_category: 'Apparel', + item_brand: 'Google', + item_variant: 'green', + price: 19, + quantity: 2, + index: 1, + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) exclude only 'products' property from 'order refunded' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'order refunded', + properties: { + currency: 'USD', + order_id: 'T_12345', + total: 12.21, + affiliation: 'Google Store', + coupon: 'SUMMER_FUN', + shipping: 3.33, + tax: 1.11, + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'refund', + params: { + currency: 'USD', + transaction_id: 'T_12345', + value: 12.21, + affiliation: 'Google Store', + coupon: 'SUMMER_FUN', + shipping: 3.33, + tax: 1.11, + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) check all property mappings for 'product added to wishlist' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'product added to wishlist', + properties: { + currency: 'USD', + total: '7.77', + products: [ + { + product_id: '507f1f77bcf86cd799439011', + name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + category: 'Apparel', + brand: 'Google', + variant: 'green', + price: '19', + quantity: '2', + position: '1', + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'add_to_wishlist', + params: { + currency: 'USD', + value: 7.77, + engagement_time_msec: 1, + items: [ + { + item_id: '507f1f77bcf86cd799439011', + item_name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + item_category: 'Apparel', + item_brand: 'Google', + item_variant: 'green', + price: 19, + quantity: 2, + index: 1, + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) check all property mappings for 'product_shared' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'product_shared', + properties: { + share_via: 'Twitter', + content_type: 'image', + item_id: 'C_12345', + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'share', + params: { + method: 'Twitter', + content_type: 'image', + item_id: 'C_12345', + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) send only 'product_shared' event name without it's properties", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'product_shared', + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'share', + params: { + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) check all property mappings for 'cart Shared' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'cart Shared', + properties: { + share_via: 'Twitter', + content_type: 'image', + item_id: 'C_12345', + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'share', + params: { + method: 'Twitter', + content_type: 'image', + item_id: 'C_12345', + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) send only 'cart Shared' event name with empty properties: {}", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'cart Shared', + properties: {}, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'share', + params: { + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: '(gtag) check all property mappings for group call', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'group', + properties: { + group_id: 'G_12345', + engagementTimeMsec: 100, + sessionId: 655, + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'group', + params: { + group_id: 'G_12345', + engagement_time_msec: 100, + session_id: 655, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) group: send only group event name without it's properties", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'group', + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'group', + params: { + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) check all property mappings for 'earn virtual currency' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'earn virtual currency', + properties: { + virtual_currency_name: 'Gems', + value: 5, + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'earn_virtual_currency', + params: { + virtual_currency_name: 'Gems', + value: 5, + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) send only 'earn virtual currency' event name without it's properties", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'earn virtual currency', + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'earn_virtual_currency', + params: { + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) check all property mappings for 'generate_lead' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'generate_lead', + properties: { + currency: 'USD', + value: 99.99, + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'generate_lead', + params: { + currency: 'USD', + value: 99.99, + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) check all property mappings for 'level_up' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'level_up', + properties: { + level: 5, + character: 'Player 1', + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'level_up', + params: { + level: 5, + character: 'Player 1', + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) send only 'level_up' event name without it's properties", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'level_up', + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'level_up', + params: { + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) check all property mappings for 'login' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'login', + properties: { + method: 'Google', + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'login', + params: { + method: 'Google', + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) send only 'login' event name without it's properties", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'login', + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'login', + params: { + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) check all property mappings for 'post_score' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'post_score', + properties: { + score: 10000, + level: 5, + character: 'Player 1', + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'post_score', + params: { + score: 10000, + level: 5, + character: 'Player 1', + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) send only 'login' event name with its required `score` properties", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'post_score', + properties: { + score: 10000, + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'post_score', + params: { + score: 10000, + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) check all property mappings for 'select_content' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'select_content', + properties: { + content_type: 'product', + item_id: 'I_12345', + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'select_content', + params: { + content_type: 'product', + item_id: 'I_12345', + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) send only 'group' event name without it's properties", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'select_content', + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'select_content', + params: { + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) check all property mappings for 'sign_up' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'sign_up', + properties: { + method: 'Google', + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'sign_up', + params: { + method: 'Google', + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) send only 'sign_up' event name without it's properties", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'sign_up', + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'sign_up', + params: { + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) check all property mappings for 'spend_virtual_currency' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'spend_virtual_currency', + properties: { + value: 5, + virtual_currency_name: 'Gems', + item_name: 'Starter Boost', + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'spend_virtual_currency', + params: { + value: 5, + virtual_currency_name: 'Gems', + item_name: 'Starter Boost', + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: + "(gtag) send only 'spend_virtual_currency' event name with it's required 'value' and 'virtual_currency_name' properties", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'spend_virtual_currency', + properties: { + value: 5, + virtual_currency_name: 'Gems', + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'spend_virtual_currency', + params: { + value: 5, + virtual_currency_name: 'Gems', + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) send 'tutorial_begin' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'tutorial_begin', + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'tutorial_begin', + params: { + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) send 'tutorial_complete' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'tutorial_complete', + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'tutorial_complete', + params: { + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) send all properties for 'unlock_achievement' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'unlock_achievement', + properties: { + achievement_id: 'A_12345', + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'unlock_achievement', + params: { + achievement_id: 'A_12345', + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) send all properties for 'view_search_results' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'view_search_results', + properties: { + search_term: 'Clothing', + products: [ + { + product_id: '507f1f77bcf86cd799439011', + name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + category: 'Apparel', + brand: 'Google', + variant: 'green', + price: '19', + quantity: '2', + position: '1', + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'view_search_results', + params: { + search_term: 'Clothing', + engagement_time_msec: 1, + items: [ + { + item_id: '507f1f77bcf86cd799439011', + item_name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + item_category: 'Apparel', + item_brand: 'Google', + item_variant: 'green', + price: 19, + quantity: 2, + index: 1, + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) pass only 'products: [...]' property for 'view_search_results' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'view_search_results', + properties: { + products: [ + { + product_id: '507f1f77bcf86cd799439011', + name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + category: 'Apparel', + brand: 'Google', + variant: 'green', + price: '19', + quantity: '2', + position: '1', + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'view_search_results', + params: { + engagement_time_msec: 1, + items: [ + { + item_id: '507f1f77bcf86cd799439011', + item_name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + item_category: 'Apparel', + item_brand: 'Google', + item_variant: 'green', + price: 19, + quantity: 2, + index: 1, + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: + "(gtag) pass custom event name 'rudderstack event' to GA4 along with custom properties", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'rudderstack event', + properties: { + total: '10', + timezone: { + name: 'Europe/Tallinn', + }, + engagementTimeMsec: 100, + sessionId: 655, + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'rudderstack_event', + params: { + total: '10', + timezone_name: 'Europe/Tallinn', + engagement_time_msec: 100, + session_id: 655, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: + "(gtag) pass custom event name 'rudderstack event' to GA4 along with custom properties and user_properties", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'rudderstack event', + properties: { + total: '10', + user_properties: { + price: '19', + }, + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + user_properties: { + price: { + value: '19', + }, + }, + events: [ + { + name: 'rudderstack_event', + params: { + total: '10', + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: '[Error]: (gtag) pass reserved event name to GA4', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'ad_click', + properties: { + total: '10', + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'track:: Reserved event names are not allowed', + statTags: { + destType: 'GA4', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'ga4', + description: '[Exclusion]: (gtag) pass reserved property name to GA4 for custom events', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'rudderstack event', + properties: { + firebase_conversion: 'firebase_conversion', + google_id: '1234', + ga_value: 'ga_value', + value: '10', + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'rudderstack_event', + params: { + value: '10', + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: + '[Exclusion]: (gtag) pass reserved property name and reserved properties in `user_properties` to GA4 for custom events', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'rudderstack event', + properties: { + firebase_conversion: 'firebase_conversion', + google_id: '1234', + ga_value: 'ga_value', + value: '10', + user_properties: { + first_open_time: 'first_open_time', + user_id: 'user_id', + firebase_value: 'firebase_value', + price: '100', + }, + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + user_properties: { + price: { + value: '100', + }, + }, + events: [ + { + name: 'rudderstack_event', + params: { + value: '10', + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: '[Error]: (gtag) pass reserved event names along with reserved properties', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'app_remove', + properties: { + firebase_conversion: 'firebase_conversion', + google_id: '1234', + ga_value: 'ga_value', + value: '10', + user_properties: { + first_open_time: 'first_open_time', + user_id: 'user_id', + firebase_value: 'firebase_value', + price: '100', + }, + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'track:: Reserved event names are not allowed', + statTags: { + destType: 'GA4', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'ga4', + description: '[Error] (gtag) pass reserved custom prefix names to GA4 events', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'firebase_event1', + properties: { + firebase_conversion: 'firebase_conversion', + google_id: '1234', + ga_value: 'ga_value', + value: '10', + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Reserved custom prefix names are not allowed', + statTags: { + destType: 'GA4', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'ga4', + description: "(gtag) check all property mappings for 'product added' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'product added', + properties: { + currency: 'USD', + total: '7.77', + google_data: 'google_data', + products: [ + { + product_id: '507f1f77bcf86cd799439011', + name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + category: 'Apparel', + brand: 'Google', + variant: 'green', + price: '19', + quantity: '2', + position: '1', + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'add_to_cart', + params: { + currency: 'USD', + value: 7.77, + engagement_time_msec: 1, + items: [ + { + item_id: '507f1f77bcf86cd799439011', + item_name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + item_category: 'Apparel', + item_brand: 'Google', + item_variant: 'green', + price: 19, + quantity: 2, + index: 1, + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: '(gtag) pass custom event name with its properties', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'rudderstack event', + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'rudderstack_event', + params: { + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) map 'product added' properties to ga4 'add_to_cart' items array", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'product added', + properties: { + affiliation: 'Google Merchandise Store', + brand: 'Google', + category: 'Related_products', + coupon: 'SUMMER_FUN', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + list_id: 'related_products', + location_id: 'L_12345', + name: 'Monopoly: 3rd Edition', + position: '1', + price: '19', + product_id: '507f1f77bcf86cd799439011', + products: [], + quantity: '2', + total: '7.77', + variant: 'green', + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + FORM: {}, + JSON: { + client_id: 'client_id', + events: [ + { + name: 'add_to_cart', + params: { + currency: 'USD', + engagement_time_msec: 1, + items: [ + { + affiliation: 'Google Merchandise Store', + coupon: 'SUMMER_FUN', + currency: 'USD', + discount: 2.22, + index: 1, + item_brand: 'Google', + item_category: 'Related_products', + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_id: '507f1f77bcf86cd799439011', + item_list_id: 'related_products', + item_list_name: 'Related Products', + item_name: 'Monopoly: 3rd Edition', + item_variant: 'green', + location_id: 'L_12345', + price: 19, + quantity: 2, + }, + ], + list_id: 'related_products', + value: 7.77, + }, + }, + ], + non_personalized_ads: true, + timestamp_micros: 1650950229000000, + }, + JSON_ARRAY: {}, + XML: {}, + }, + endpoint: 'https://www.google-analytics.com/mp/collect', + files: {}, + headers: { + 'Content-Type': 'application/json', + HOST: 'www.google-analytics.com', + }, + method: 'POST', + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + type: 'REST', + version: '1', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: + '(gtag) pass event name with invalid data type for products: {...} properties (when products parameter is optional)', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'product added', + properties: { + currency: 'USD', + total: '7.77', + products: { + product_id: '507f1f77bcf86cd799439011', + name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + category: 'Apparel', + brand: 'Google', + variant: 'green', + price: '19', + quantity: '2', + position: '1', + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + affiliation: 'Google Merchandise Store', + brand: 'Google', + category: 'Related_products', + coupon: 'SUMMER_FUN', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + list_id: 'related_products', + location_id: 'L_12345', + name: 'Monopoly: 3rd Edition', + position: '1', + price: '19', + product_id: '507f1f77bcf86cd799439011', + quantity: '2', + variant: 'green', + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + FORM: {}, + JSON: { + client_id: 'client_id', + events: [ + { + name: 'add_to_cart', + params: { + currency: 'USD', + engagement_time_msec: 1, + items: [ + { + affiliation: 'Google Merchandise Store', + coupon: 'SUMMER_FUN', + currency: 'USD', + discount: 2.22, + index: 1, + item_brand: 'Google', + item_category: 'Related_products', + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_id: '507f1f77bcf86cd799439011', + item_list_id: 'related_products', + item_list_name: 'Related Products', + item_name: 'Monopoly: 3rd Edition', + item_variant: 'green', + location_id: 'L_12345', + price: 19, + quantity: 2, + }, + ], + list_id: 'related_products', + value: 7.77, + }, + }, + ], + non_personalized_ads: true, + timestamp_micros: 1650950229000000, + }, + JSON_ARRAY: {}, + XML: {}, + }, + endpoint: 'https://www.google-analytics.com/mp/collect', + files: {}, + headers: { + 'Content-Type': 'application/json', + HOST: 'www.google-analytics.com', + }, + method: 'POST', + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + type: 'REST', + version: '1', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: + '[Error] (gtag) pass event name to GA4 with missing fields i.e required in products: [..]', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'product added', + properties: { + currency: 'USD', + total: '7.77', + products: [ + { + coupon: 'SUMMER_FUN', + category: 'Apparel', + brand: 'Google', + variant: 'green', + price: '19', + quantity: '2', + position: '1', + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'One of product_id or name is required', + statTags: { + destType: 'GA4', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'ga4', + description: + '[Error] (gtag) pass event name to GA4 with missing fields i.e required in properties', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'Product Viewed', + properties: { + currency: 'USD', + total: '7.77', + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'One of product_id or name is required', + statTags: { + destType: 'GA4', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'ga4', + description: '[Error] (gtag) missing API Secret', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'tutotial complete', + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'API Secret not found. Aborting ', + statTags: { + destType: 'GA4', + errorCategory: 'dataValidation', + errorType: 'configuration', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'ga4', + description: '[Error] (gtag) missing measurementId', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'tutotial complete', + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: '', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'measurementId must be provided. Aborting', + statTags: { + destType: 'GA4', + errorCategory: 'dataValidation', + errorType: 'configuration', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'ga4', + description: '(gtag) firing group event with event name. should take event name by default', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'group', + event: 'tutorial complete', + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + client_id: 'client_id', + events: [ + { + name: 'join_group', + params: { + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: '[Error] (gtag) payload has missing message.type', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + event: 'tutotial complete', + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Message Type is not present. Aborting message.', + statTags: { + destType: 'GA4', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'ga4', + description: '[Error] (gtag) payload has missing event name', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Event name is required', + statTags: { + destType: 'GA4', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'ga4', + description: '(gtag) taking client_id from anonymousId', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'tutotial complete', + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + client_id: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + events: [ + { + name: 'tutotial_complete', + params: { + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: '[Error] (firebase) payload has missing ga4AppInstanceId', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'tutotial complete', + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: '', + firebaseAppId: '1:17864591371:android:7a9520d3c78962e21f9fee', + blockPageViewEvent: false, + typesOfClient: 'firebase', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'ga4AppInstanceId must be provided under externalId', + statTags: { + destType: 'GA4', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'ga4', + description: '[Error] (firebase) pass reserved event name', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'app_store_subscription_cancel', + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: '', + firebaseAppId: '1:17864591371:android:7a9520d3c78962e21f9fee', + blockPageViewEvent: false, + typesOfClient: 'firebase', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Reserved custom event names are not allowed', + statTags: { + destType: 'GA4', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'ga4', + description: "(gtag) check all property mappings for 'tutorial complete' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'tutorial complete', + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + non_personalized_ads: true, + events: [ + { + name: 'tutorial_complete', + params: { + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) check all property mappings for 'cart viewed' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'cart viewed', + properties: { + currency: 'USD', + total: '7.77', + products: [ + { + product_id: 0, + coupon: 'SUMMER_FUN', + category: 'Apparel', + brand: 'Google', + variant: 'green', + price: '19', + quantity: '2', + position: '1', + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'view_cart', + params: { + currency: 'USD', + value: 7.77, + engagement_time_msec: 1, + items: [ + { + item_id: 0, + coupon: 'SUMMER_FUN', + item_category: 'Apparel', + item_brand: 'Google', + item_variant: 'green', + price: 19, + quantity: 2, + index: 1, + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: '[Error]: (firebase) missing firebaseAppId', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'promotion clicked', + properties: { + creative_name: 'Summer Banner', + creative_slot: 'featured_app_1', + location_id: 'L_12345', + promotion_id: 'P_12345', + promotion_name: 'Summer Sale', + products: [ + { + product_id: '507f1f77bcf86cd799439011', + name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + category: 'Apparel', + brand: 'Google', + variant: 'green', + price: '19', + quantity: '2', + position: '0', + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + promotion_id: 'P_12345', + promotion_name: 'Summer Sale', + creative_name: 'summer_banner2', + creative_slot: 'featured_app_1', + }, + ], + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: '', + typesOfClient: 'firebase', + firebaseAppId: '', + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'firebaseAppId must be provided. Aborting', + statTags: { + destType: 'GA4', + errorCategory: 'dataValidation', + errorType: 'configuration', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'ga4', + description: '(gtag) firing page call', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + rudderId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'page', + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + typesOfClient: 'gtag', + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + client_id: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + events: [ + { + name: 'page_view', + params: { + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: '(gtag) firing page call with custom properties', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + rudderId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'page', + event: 'page view', + properties: { + view: 'login', + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + typesOfClient: 'gtag', + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + client_id: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + events: [ + { + name: 'page_view', + params: { + view: 'login', + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: '[Error]: (gtag) pass timestamp more than 72 hours into the past', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-20T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'tutotial complete', + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + typesOfClient: 'gtag', + blockPageViewEvent: false, + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Allowed timestamp is [72 hours] into the past', + statTags: { + destType: 'GA4', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'ga4', + description: '[Error]: (gtag) pass timestamp more than 15 min into the future', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-05-05T15:47:57Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'tutotial complete', + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + typesOfClient: 'gtag', + blockPageViewEvent: false, + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Allowed timestamp is [15 minutes] into the future', + statTags: { + destType: 'GA4', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'ga4', + description: + '(gtag) pass custom properties along with products: [..] parameters to GA4 standard events along with its stated ones', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'order completed', + properties: { + checkout_id: '12345', + order_id: '1234', + myCustomProp: 'My arbitray value', + affiliation: 'Apple Store', + total: 20, + revenue: 15, + shipping: 22, + tax: 1, + discount: 1.5, + coupon: 'ImagePro', + currency: 'USD', + products: [ + { + product_id: '123', + sku: 'G-32', + name: 'Monopoly', + price: 14, + quantity: 1, + category: 'Games', + item_category2: 'Board games', + url: 'https://www.website.com/product/path', + image_url: 'https://www.website.com/product/path.jpg', + }, + ], + timezone: { + name: 'Europe/Tallinn', + }, + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'purchase', + params: { + checkout_id: '12345', + transaction_id: '1234', + myCustomProp: 'My arbitray value', + affiliation: 'Apple Store', + value: 20, + shipping: 22, + tax: 1, + discount: 1.5, + coupon: 'ImagePro', + currency: 'USD', + engagement_time_msec: 1, + items: [ + { + item_id: '123', + sku: 'G-32', + item_name: 'Monopoly', + price: 14, + quantity: 1, + item_category: 'Games', + item_category2: 'Board games', + url: 'https://www.website.com/product/path', + image_url: 'https://www.website.com/product/path.jpg', + }, + ], + timezone_name: 'Europe/Tallinn', + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: + '(gtag) pass custom properties excluding products: [..] parameter to GA4 standard events along with its stated ones', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'promotion clicked', + properties: { + 'customProp-1': 'check-1', + 'customProp-2': 'check-2', + timezone: { + name: 'Europe/Tallinn', + }, + creative_name: 'Summer Banner', + creative_slot: 'featured_app_1', + location_id: 'L_12345', + promotion_id: 'P_12345', + promotion_name: 'Summer Sale', + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'select_promotion', + params: { + 'customProp-1': 'check-1', + 'customProp-2': 'check-2', + timezone_name: 'Europe/Tallinn', + creative_name: 'Summer Banner', + creative_slot: 'featured_app_1', + location_id: 'L_12345', + promotion_id: 'P_12345', + promotion_name: 'Summer Sale', + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) message type group -> 'join_group' with custom event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'group', + traits: { + custom1: 1234, + custom2: 'custom2', + timezone: { + name: 'Europe/Tallinn', + }, + engagementTimeMsec: 100, + sessionId: 655, + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + client_id: 'client_id', + events: [ + { + name: 'join_group', + params: { + custom1: 1234, + custom2: 'custom2', + timezone_name: 'Europe/Tallinn', + engagement_time_msec: 100, + session_id: 655, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: '(gtag): check args keyword for price x currency multiplication', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'product added', + properties: { + currency: 'USD', + price: 2.4, + quantity: 2, + products: [ + { + product_id: '507f1f77bcf86cd799439011', + name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + category: 'Apparel', + brand: 'Google', + variant: 'green', + price: '19', + quantity: '2', + position: '1', + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + client_id: 'client_id', + events: [ + { + name: 'add_to_cart', + params: { + currency: 'USD', + value: 4.8, + engagement_time_msec: 1, + items: [ + { + item_id: '507f1f77bcf86cd799439011', + item_name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + item_category: 'Apparel', + item_brand: 'Google', + item_variant: 'green', + price: 19, + quantity: 2, + index: 1, + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + price: 2.4, + quantity: 2, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: + "(gtag): take page properties from context.page for 'page' call along with custom properties", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + rudderId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + page: { + url: 'http://morkey.in', + path: '/cart', + title: 'miphone', + search: 'MI', + referrer: 'morkey', + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'page', + integrations: { + All: true, + }, + properties: { + cust1: 1234, + engagementTimeMsec: 100, + sessionId: 655, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + client_id: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + events: [ + { + name: 'page_view', + params: { + page_referrer: 'morkey', + page_title: 'miphone', + page_location: 'http://morkey.in', + cust1: 1234, + engagement_time_msec: 100, + session_id: 655, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: '[Error] GA4: event not as string', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: { + name: 'promotion_viewed', + }, + properties: { + creative_name: 'Summer Banner', + creative_slot: 'featured_app_1', + location_id: 'L_12345', + promotion_id: 'P_12345', + promotion_name: 'Summer Sale', + products: [ + { + product_id: '507f1f77bcf86cd799439011', + name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + category: 'Apparel', + brand: 'Google', + variant: 'green', + price: '19', + quantity: '2', + position: '0', + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + promotion_id: 'P_12345', + promotion_name: 'Summer Sale', + creative_name: 'summer_banner2', + creative_slot: 'featured_app_1', + }, + ], + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'track:: event name should be string', + statTags: { + destType: 'GA4', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'ga4', + description: '[Error] GA4: client_id not found in all four path', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'product added', + properties: { + currency: 'USD', + price: 2.4, + quantity: 2, + products: [ + { + product_id: '507f1f77bcf86cd799439011', + name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + category: 'Apparel', + brand: 'Google', + variant: 'green', + price: '19', + quantity: '2', + position: '1', + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + integrations: { + All: true, + }, + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6BET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: true, + sendLoginSignup: true, + newOrExistingUserTrait: 'firstLogin', + loginSignupMethod: 'method', + generateLead: true, + generateLeadValueTrait: 'value', + generateLeadCurrencyTrait: 'currency', + clientIdFieldIdentifier: 'properties.client_id', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'ga4ClientId, anonymousId or messageId must be provided', + statTags: { + destType: 'GA4', + errorCategory: 'dataValidation', + errorType: 'configuration', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'ga4', + description: + "client_id isn't sent from the path defined in the webapp config, falling back to default values i.e here it is anonymousId", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'product added', + properties: { + currency: 'USD', + price: 2.4, + quantity: 2, + products: [ + { + product_id: '507f1f77bcf86cd799439011', + name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + category: 'Apparel', + brand: 'Google', + variant: 'green', + price: '19', + quantity: '2', + position: '1', + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + integrations: { + All: true, + }, + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6BET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: true, + sendLoginSignup: true, + newOrExistingUserTrait: 'firstLogin', + loginSignupMethod: 'method', + generateLead: true, + generateLeadValueTrait: 'value', + generateLeadCurrencyTrait: 'currency', + clientIdFieldIdentifier: 'properties.client_id', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + FORM: {}, + JSON: { + events: [ + { + name: 'add_to_cart', + params: { + items: [ + { + index: 1, + price: 19, + coupon: 'SUMMER_FUN', + item_id: '507f1f77bcf86cd799439011', + currency: 'USD', + discount: 2.22, + quantity: 2, + item_name: 'Monopoly: 3rd Edition', + item_brand: 'Google', + affiliation: 'Google Merchandise Store', + location_id: 'L_12345', + item_list_id: 'related_products', + item_variant: 'green', + item_category: 'Apparel', + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_name: 'Related Products', + }, + ], + price: 2.4, + value: 4.8, + currency: 'USD', + quantity: 2, + engagement_time_msec: 1, + }, + }, + ], + client_id: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + non_personalized_ads: true, + }, + JSON_ARRAY: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6BET4', + }, + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://www.google-analytics.com/mp/collect', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: + 'any custom or item property with array value, is flattened with underscore delimeter', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'product added', + originalTimestamp: '2022-04-26T05:17:09Z', + properties: { + currency: 'USD', + total: '7.77', + product_id: '507f1f77bcf86cd799439011', + name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + category: 'Apparel', + brand: 'Google', + variant: 'green', + price: '19', + quantity: '2', + position: '1', + affiliation: 'Google Merchandise Store', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + address: { + city: 'kolkata', + district: '24pgs', + }, + categoryLevels: ['Furniture', 'Bedroom Furniture', 'Dressers & Chests'], + products: [ + { + product_id: '1234', + product_details: { + colour: 'red', + shape: 'rectangle', + }, + productLevels: ['test1', 'test2', 'test3'], + }, + ], + }, + integrations: { + All: true, + }, + sentAt: '2022-11-14T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + client_id: 'client_id', + events: [ + { + name: 'add_to_cart', + params: { + currency: 'USD', + value: 7.77, + items: [ + { + item_id: '1234', + product_details_colour: 'red', + product_details_shape: 'rectangle', + productLevels_0: 'test1', + productLevels_1: 'test2', + productLevels_2: 'test3', + }, + ], + product_id: '507f1f77bcf86cd799439011', + name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + category: 'Apparel', + brand: 'Google', + variant: 'green', + price: '19', + quantity: '2', + position: '1', + affiliation: 'Google Merchandise Store', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + address_city: 'kolkata', + address_district: '24pgs', + categoryLevels_0: 'Furniture', + categoryLevels_1: 'Bedroom Furniture', + categoryLevels_2: 'Dressers & Chests', + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: 'extract session_id from context.sessionId', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + sessionId: 16678456735, + }, + type: 'track', + event: 'product added', + properties: { + currency: 'USD', + price: 2.4, + quantity: 2, + client_id: 'client@1234', + products: [ + { + product_id: '507f1f77bcf86cd799439011', + name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + category: 'Apparel', + brand: 'Google', + variant: 'green', + price: '19', + quantity: '2', + position: '1', + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + integrations: { + All: true, + }, + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6BET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: true, + sendLoginSignup: true, + newOrExistingUserTrait: 'firstLogin', + loginSignupMethod: 'method', + generateLead: true, + generateLeadValueTrait: 'value', + generateLeadCurrencyTrait: 'currency', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + FORM: {}, + JSON: { + events: [ + { + name: 'add_to_cart', + params: { + items: [ + { + index: 1, + price: 19, + coupon: 'SUMMER_FUN', + item_id: '507f1f77bcf86cd799439011', + currency: 'USD', + discount: 2.22, + quantity: 2, + item_name: 'Monopoly: 3rd Edition', + item_brand: 'Google', + affiliation: 'Google Merchandise Store', + location_id: 'L_12345', + item_list_id: 'related_products', + item_variant: 'green', + item_category: 'Apparel', + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_name: 'Related Products', + }, + ], + price: 2.4, + value: 4.8, + currency: 'USD', + quantity: 2, + session_id: 16678456735, + engagement_time_msec: 1, + client_id: 'client@1234', + }, + }, + ], + client_id: 'client_id', + non_personalized_ads: true, + }, + JSON_ARRAY: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6BET4', + }, + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://www.google-analytics.com/mp/collect', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: '(gtag) send integer userId', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + userId: 34567, + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + sessionId: 16678456735, + }, + type: 'track', + event: 'product added', + properties: { + currency: 'USD', + price: 2.4, + quantity: 2, + client_id: 'client@1234', + products: [ + { + product_id: '507f1f77bcf86cd799439011', + name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + category: 'Apparel', + brand: 'Google', + variant: 'green', + price: '19', + quantity: '2', + position: '1', + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + integrations: { + All: true, + }, + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6BET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: true, + sendLoginSignup: true, + newOrExistingUserTrait: 'firstLogin', + loginSignupMethod: 'method', + generateLead: true, + generateLeadValueTrait: 'value', + generateLeadCurrencyTrait: 'currency', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + FORM: {}, + JSON: { + events: [ + { + name: 'add_to_cart', + params: { + items: [ + { + index: 1, + price: 19, + coupon: 'SUMMER_FUN', + item_id: '507f1f77bcf86cd799439011', + currency: 'USD', + discount: 2.22, + quantity: 2, + item_name: 'Monopoly: 3rd Edition', + item_brand: 'Google', + affiliation: 'Google Merchandise Store', + location_id: 'L_12345', + item_list_id: 'related_products', + item_variant: 'green', + item_category: 'Apparel', + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_name: 'Related Products', + }, + ], + price: 2.4, + value: 4.8, + currency: 'USD', + quantity: 2, + session_id: 16678456735, + engagement_time_msec: 1, + client_id: 'client@1234', + }, + }, + ], + client_id: 'client_id', + user_id: '34567', + non_personalized_ads: true, + }, + JSON_ARRAY: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6BET4', + }, + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://www.google-analytics.com/mp/collect', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: '(gtag) login event with user_properties', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user@1', + channel: 'web', + anonymousId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + traits: { + campaign: 'advertizing', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'login', + properties: { + method: 'facebook', + }, + integrations: { + All: true, + }, + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6BET4', + firebaseAppId: '', + typesOfClient: 'gtag', + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + FORM: {}, + JSON: { + events: [ + { + name: 'login', + params: { + method: 'facebook', + engagement_time_msec: 1, + }, + }, + ], + user_id: 'user@1', + user_properties: { + campaign: { + value: 'advertizing', + }, + }, + client_id: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + non_personalized_ads: true, + }, + JSON_ARRAY: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6BET4', + }, + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://www.google-analytics.com/mp/collect', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: '(gtag) sign_up event', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user@1', + channel: 'web', + anonymousId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + traits: { + campaign: 'advertizing', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'sign_up', + properties: { + method: 'google', + }, + integrations: { + All: true, + }, + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6BET4', + firebaseAppId: '', + typesOfClient: 'gtag', + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + FORM: {}, + JSON: { + events: [ + { + name: 'sign_up', + params: { + method: 'google', + engagement_time_msec: 1, + }, + }, + ], + user_id: 'user@1', + user_properties: { + campaign: { + value: 'advertizing', + }, + }, + client_id: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + non_personalized_ads: true, + }, + JSON_ARRAY: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6BET4', + }, + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://www.google-analytics.com/mp/collect', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: '(gtag) generate_lead event', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user@1', + channel: 'web', + anonymousId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + traits: { + campaign: 'advertizing', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'generate_lead', + properties: { + source: 'instagram', + value: 20, + }, + integrations: { + All: true, + }, + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6BET4', + firebaseAppId: '', + typesOfClient: 'gtag', + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + FORM: {}, + JSON: { + events: [ + { + name: 'generate_lead', + params: { + currency: 'USD', + value: 20, + source: 'instagram', + engagement_time_msec: 1, + }, + }, + ], + user_id: 'user@1', + user_properties: { + campaign: { + value: 'advertizing', + }, + }, + client_id: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + non_personalized_ads: true, + }, + JSON_ARRAY: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6BET4', + }, + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://www.google-analytics.com/mp/collect', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: '(gtag) track call with page information such as url, title, referrer', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user@1', + channel: 'web', + anonymousId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + page: { + initial_referrer: '$direct', + path: '/', + referrer: '$direct', + tab_url: 'https://www.rudderstack.com/', + title: 'Document', + url: 'https://www.rudderstack.com/', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'generate_lead', + properties: { + source: 'instagram', + value: 20, + }, + integrations: { + All: true, + }, + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6BET4', + firebaseAppId: '', + typesOfClient: 'gtag', + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + FORM: {}, + JSON: { + events: [ + { + name: 'generate_lead', + params: { + currency: 'USD', + value: 20, + source: 'instagram', + page_location: 'https://www.rudderstack.com/', + page_referrer: '$direct', + page_title: 'Document', + engagement_time_msec: 1, + }, + }, + ], + user_id: 'user@1', + client_id: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + non_personalized_ads: true, + }, + JSON_ARRAY: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6BET4', + }, + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://www.google-analytics.com/mp/collect', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: + '(gtag) track event with hybrid connection mode using buffer cloud mode event approach', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user@1', + channel: 'web', + anonymousId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + traits: { + campaign: 'advertizing', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'generate_lead', + properties: { + source: 'instagram', + value: 20, + }, + integrations: { + All: true, + 'Google Analytics 4 (GA4)': { + clientId: '554581488.1683172875', + sessionId: '1683172875', + }, + }, + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6BET4', + firebaseAppId: '', + typesOfClient: 'gtag', + eventFilteringOption: 'disable', + connectionMode: 'hybrid', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + FORM: {}, + JSON: { + events: [ + { + name: 'generate_lead', + params: { + currency: 'USD', + value: 20, + source: 'instagram', + session_id: '1683172875', + engagement_time_msec: 1, + }, + }, + ], + user_id: 'user@1', + user_properties: { + campaign: { + value: 'advertizing', + }, + }, + client_id: '554581488.1683172875', + non_personalized_ads: true, + }, + JSON_ARRAY: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6BET4', + }, + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://www.google-analytics.com/mp/collect', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: + '(gtag) track event with hybrid connection mode using override client_id and session_id approach', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user@1', + channel: 'web', + anonymousId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + traits: { + campaign: 'advertizing', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + sessionId: 1683172874065, + }, + type: 'track', + event: 'generate_lead', + properties: { + source: 'instagram', + value: 20, + }, + integrations: { + All: true, + }, + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6BET4', + firebaseAppId: '', + typesOfClient: 'gtag', + eventFilteringOption: 'disable', + connectionMode: 'hybrid', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + FORM: {}, + JSON: { + events: [ + { + name: 'generate_lead', + params: { + currency: 'USD', + value: 20, + source: 'instagram', + session_id: 1683172874065, + engagement_time_msec: 1, + }, + }, + ], + user_id: 'user@1', + user_properties: { + campaign: { + value: 'advertizing', + }, + }, + client_id: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + non_personalized_ads: true, + }, + JSON_ARRAY: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6BET4', + }, + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://www.google-analytics.com/mp/collect', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: '(gtag) firing group calls with GA4 hybrid mode connection', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'group', + event: 'tutorial complete', + integrations: { + 'Google Analytics 4': { + clientId: '4718026.1683606287', + sessionId: '1683606287', + sessionNumber: 1, + }, + }, + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + typesOfClient: 'gtag', + eventFilteringOption: 'disable', + connectionMode: 'hybrid', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + non_personalized_ads: true, + client_id: '4718026.1683606287', + events: [ + { + name: 'join_group', + params: { + engagement_time_msec: 1, + session_id: '1683606287', + session_number: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: '(gtag) sign_up event with all data types of user_properties', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user@1', + channel: 'web', + anonymousId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + traits: { + campaign: 'advertizing', + name: 'rudder', + age: 45, + hobby: ['dancing', 'singing', 'reading'], + enableEURegion: false, + isEnterpriseUser: { + value: false, + }, + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'sign_up', + properties: { + method: 'google', + }, + integrations: { + All: true, + }, + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6BET4', + firebaseAppId: '', + typesOfClient: 'gtag', + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + FORM: {}, + JSON: { + events: [ + { + name: 'sign_up', + params: { + method: 'google', + engagement_time_msec: 1, + }, + }, + ], + user_id: 'user@1', + client_id: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + user_properties: { + age: { + value: 45, + }, + name: { + value: 'rudder', + }, + campaign: { + value: 'advertizing', + }, + enableEURegion: { + value: false, + }, + }, + non_personalized_ads: true, + }, + JSON_ARRAY: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6BET4', + }, + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://www.google-analytics.com/mp/collect', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: '[Error]: (gtag) event name starts with numbers', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: '1234_sign_up', + properties: { + total: '10', + }, + integrations: { + All: true, + }, + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + typesOfClient: 'gtag', + eventFilteringOption: 'disable', + connectionMode: 'cloud', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: + 'Event name must start with a letter and can only contain letters, numbers, and underscores', + statTags: { + destType: 'GA4', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'ga4', + description: '(gtag) event having multiple empty array and object parameters', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + event: 'logIn', + userId: 'user@1', + group_id: 'group@1', + anon_id: '78e95d6d-58c0-4237-b99e-2ef510b6d502', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + properties: { + user_interest: 'Moderate', + company_interest: '', + profile: [ + { + is_6qa: true, + product: null, + product_fit: 'Moderate', + product_stage: 'Purchase', + intent_score: 89, + profile_score: 52, + product_display$name: 'rudderstack', + }, + ], + user_company: 'Analytics consulting', + user_account: '1', + user_id_mappings: '330098|245252|461224|282599', + company_naics_6sense: '5173', + usr_consent: null, + firebase_user_id: 'kdgMnP', + google_user_id: 'G-123456', + company_domain: 'consulting.net', + company_region: 'New Zealand', + user_product_interests: { + ids: [], + list: [ + { + id: 330098, + name: [], + }, + { + id: 245252, + name: {}, + }, + ], + names: [], + }, + company_country: {}, + company_industry: 'Business Analytics', + company_revenue: '$5M - $10M', + company_annual_revenue: '5568000', + company_sic_description: '', + company_naics_description: [], + }, + integrations: { + All: true, + }, + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + typesOfClient: 'gtag', + eventFilteringOption: 'disable', + connectionMode: 'cloud', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + FORM: {}, + JSON: { + events: [ + { + name: 'login', + params: { + company_annual_revenue: '5568000', + company_domain: 'consulting.net', + company_industry: 'Business Analytics', + company_naics_6sense: '5173', + company_region: 'New Zealand', + company_revenue: '$5M - $10M', + engagement_time_msec: 1, + profile_0_intent_score: 89, + profile_0_is_6qa: true, + profile_0_product_display$name: 'rudderstack', + profile_0_product_fit: 'Moderate', + profile_0_product_stage: 'Purchase', + profile_0_profile_score: 52, + user_account: '1', + user_company: 'Analytics consulting', + user_id_mappings: '330098|245252|461224|282599', + user_interest: 'Moderate', + user_product_interests_list_0_id: 330098, + user_product_interests_list_1_id: 245252, + }, + }, + ], + user_id: 'user@1', + client_id: 'client_id', + non_personalized_ads: true, + }, + JSON_ARRAY: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://www.google-analytics.com/mp/collect', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: '(gtag) campaign_details custom event', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user@1', + channel: 'web', + anonymousId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + campaign: { + id: 'google_1234', + name: 'Summer_fun', + source: 'google', + medium: 'cpc', + term: 'summer+travel', + content: 'logo link', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'Campaign Details', + properties: {}, + integrations: { + All: true, + }, + }, + destination: { + Config: { + apiSecret: 'QyWKGHj8QhG2L4ePAPiXCA', + measurementId: 'G-T40PE6BET4', + typesOfClient: 'gtag', + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + FORM: {}, + JSON: { + events: [ + { + name: 'campaign_details', + params: { + campaign_id: 'google_1234', + campaign: 'Summer_fun', + source: 'google', + medium: 'cpc', + term: 'summer+travel', + content: 'logo link', + engagement_time_msec: 1, + }, + }, + ], + user_id: 'user@1', + client_id: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + non_personalized_ads: true, + }, + JSON_ARRAY: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: { + api_secret: 'QyWKGHj8QhG2L4ePAPiXCA', + measurement_id: 'G-T40PE6BET4', + }, + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://www.google-analytics.com/mp/collect', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, +]; diff --git a/test/integrations/destinations/gainsight/network.ts b/test/integrations/destinations/gainsight/network.ts new file mode 100644 index 0000000000..c8adf871b9 --- /dev/null +++ b/test/integrations/destinations/gainsight/network.ts @@ -0,0 +1,71 @@ +export const networkCallsData = [ + { + httpReq: { + url: 'https://demo-domain.gainsightcloud.com/v1/data/objects/query/Company', + method: 'POST', + }, + httpRes: { + data: { + "result": true, + "errorCode": null, + "errorDesc": null, + "requestId": "47d9c8be-4912-4610-806c-0eec22b73236", + "data": { + "records": [] + }, + "message": null + }, + status: 200 + }, + }, + { + httpReq: { + url: 'https://demo-domain.gainsightcloud.com/v1/data/objects/Company', + method: 'POST', + }, + httpRes: { + data: { + "result": true, + "errorCode": null, + "errorDesc": null, + "requestId": "3ce46d4a-6a83-4a92-97b3-d9788a296af8", + "data": { + "count": 1, + "errors": null, + "records": [ + { + "Gsid": "1P0203VCESP7AUQMV9E953G" + } + ] + }, + "message": null + }, + status: 200 + }, + }, + { + httpReq: { + url: "https://demo-domain.gainsightcloud.com/v1/data/objects/Company?keys=Name", + method: 'GET', + }, + httpRes: { + data: { + "result": true, + "errorCode": null, + "errorDesc": null, + "requestId": "30630809-40a7-45d2-9673-ac2e80d06f33", + "data": { + "count": 1, + "errors": null, + "records": [ + { + "Gsid": "1P0203VCESP7AUQMV9E953G" + } + ] + }, + "message": null + }, + status: 200 + }, + } +]; diff --git a/test/integrations/destinations/gainsight/processor/data.ts b/test/integrations/destinations/gainsight/processor/data.ts new file mode 100644 index 0000000000..5844c22b65 --- /dev/null +++ b/test/integrations/destinations/gainsight/processor/data.ts @@ -0,0 +1,970 @@ +export const data = [ + { + "name": "gainsight", + "description": "Test 0", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "domain": "demo-domain.gainsightcloud.com", + "accessKey": "sample-access-key", + "personMap": [], + "companyMap": [], + "eventNameMap": [], + "eventVersionMap": [] + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "anonymousId": "anon_id", + "type": "identify", + "traits": { + "email": "cosmo@krammer.com", + "name": "Cosmo Krammer", + "linkedinUrl": "https://linkedin.com/cosmo-krammer", + "location": "New York", + "emailOptOut": true, + "masterAvatarTypeCode": 10 + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {}, + "JSON": { + "Email": "cosmo@krammer.com", + "Name": "Cosmo Krammer", + "LinkedinUrl": "https://linkedin.com/cosmo-krammer", + "Location": "New York", + "EmailOptOut": true, + "MasterAvatarTypeCode": 10 + } + }, + "type": "REST", + "files": {}, + "method": "PUT", + "params": {}, + "headers": { + "Accesskey": "sample-access-key", + "Content-Type": "application/json" + }, + "version": "1", + "endpoint": "https://demo-domain.gainsightcloud.com/v1.0/api/people", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "gainsight", + "description": "Test 1", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "domain": "demo-domain.gainsightcloud.com", + "accessKey": "sample-access-key", + "personMap": [ + { + "from": "age", + "to": "age__gc" + } + ], + "companyMap": [], + "eventNameMap": [], + "eventVersionMap": [] + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "anonymousId": "anon_id", + "type": "identify", + "traits": { + "email": "cosmo@krammer.com", + "name": "Cosmo Krammer", + "linkedinUrl": "https://linkedin.com/cosmo-krammer", + "location": "New York", + "emailOptOut": true, + "masterAvatarTypeCode": 10, + "age": 35, + "randomKey": "this should be dropped" + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {}, + "JSON": { + "Email": "cosmo@krammer.com", + "Name": "Cosmo Krammer", + "LinkedinUrl": "https://linkedin.com/cosmo-krammer", + "Location": "New York", + "EmailOptOut": true, + "MasterAvatarTypeCode": 10, + "age__gc": 35 + } + }, + "type": "REST", + "files": {}, + "method": "PUT", + "params": {}, + "headers": { + "Accesskey": "sample-access-key", + "Content-Type": "application/json" + }, + "version": "1", + "endpoint": "https://demo-domain.gainsightcloud.com/v1.0/api/people", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "gainsight", + "description": "Test 2", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "domain": "demo-domain.gainsightcloud.com", + "accessKey": "sample-access-key", + "personMap": [], + "companyMap": [], + "eventNameMap": [], + "eventVersionMap": [] + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "anonymousId": "anon_id", + "type": "identify", + "traits": { + "name": "Cosmo Krammer", + "linkedinUrl": "https://linkedin.com/cosmo-krammer", + "location": "New York", + "emailOptOut": true, + "masterAvatarTypeCode": 10 + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "email is required for identify", + "statTags": { + "destType": "GAINSIGHT", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "gainsight", + "description": "Test 3", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "domain": "demo-domain.gainsightcloud.com", + "accessKey": "sample-access-key", + "sharedSecret": "sample-shared-secret", + "eventNameMap": [ + { + "from": "Ticket Resolved", + "to": "Ticket Resolved Event" + } + ], + "eventVersionMap": [ + { + "from": "Ticket Resolved", + "to": "1.0.0" + } + ], + "topicName": "Ticket Actions", + "tenantId": "sample-tenant-id", + "personMap": [], + "companyMap": [] + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "anonymousId": "anon_id", + "type": "track", + "event": "Ticket Resolved", + "properties": { + "ticketId": "sample-ticket-id", + "actionEmail": "sample@email.com", + "status": "resovled" + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {}, + "JSON": { + "ticketId": "sample-ticket-id", + "actionEmail": "sample@email.com", + "status": "resovled" + } + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": {}, + "headers": { + "Accesskey": "sample-access-key", + "tenantId": "sample-tenant-id", + "sharedSecret": "sample-shared-secret", + "Content-Type": "application/json", + "topicName": "Ticket Actions", + "eventName": "Ticket Resolved Event", + "eventVersion": "1.0.0" + }, + "version": "1", + "endpoint": "https://demo-domain.gainsightcloud.com/v1.0/api/eventManager/event", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "gainsight", + "description": "Test 4", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "domain": "demo-domain.gainsightcloud.com", + "accessKey": "sample-access-key", + "sharedSecret": "sample-shared-secret", + "personMap": [], + "companyMap": [], + "eventNameMap": [], + "eventVersionMap": [] + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + }, + "traits": { + "email": "krammer@seinfeld.com" + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "anonymousId": "anon_id", + "type": "group", + "traits": { + "name": "Kramerica Industries", + "industry": "Sitcom", + "employees": "100", + "status": "complete", + "companyType": "spoof" + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {}, + "JSON": { + "Email": "krammer@seinfeld.com", + "companies": [ + { + "Company_ID": "1P0203VCESP7AUQMV9E953G" + } + ] + } + }, + "type": "REST", + "files": {}, + "method": "PUT", + "params": {}, + "headers": { + "Accesskey": "sample-access-key", + "Content-Type": "application/json" + }, + "version": "1", + "endpoint": "https://demo-domain.gainsightcloud.com/v1.0/api/people", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "gainsight", + "description": "Test 5", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "domain": "demo-domain.gainsightcloud.com", + "accessKey": "sample-access-key", + "sharedSecret": "sample-shared-secret", + "personMap": [], + "companyMap": [], + "eventNameMap": [], + "eventVersionMap": [] + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + }, + "traits": { + "email": "krammer@seinfeld.com" + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "anonymousId": "anon_id", + "type": "group", + "traits": { + "name": "Seinfeld Corps", + "industry": "TV Series", + "employees": "50", + "status": "complete" + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {}, + "JSON": { + "Email": "krammer@seinfeld.com", + "companies": [ + { + "Company_ID": "1P0203VCESP7AUQMV9E953G" + } + ] + } + }, + "type": "REST", + "files": {}, + "method": "PUT", + "params": {}, + "headers": { + "Accesskey": "sample-access-key", + "Content-Type": "application/json" + }, + "version": "1", + "endpoint": "https://demo-domain.gainsightcloud.com/v1.0/api/people", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "gainsight", + "description": "Test 6", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "domain": "demo-domain.gainsightcloud.com", + "accessKey": "sample-access-key", + "personMap": [], + "companyMap": [], + "eventNameMap": [], + "eventVersionMap": [] + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "anonymousId": "anon_id", + "type": "identify", + "traits": { + "email": "cosmo@krammer.com", + "firstname": "Cosmo", + "lastname": "Krammer", + "linkedinUrl": "https://linkedin.com/cosmo-krammer", + "location": "New York", + "emailOptOut": true, + "masterAvatarTypeCode": 10 + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {}, + "JSON": { + "Email": "cosmo@krammer.com", + "FirstName": "Cosmo", + "LastName": "Krammer", + "Name": "Cosmo Krammer", + "LinkedinUrl": "https://linkedin.com/cosmo-krammer", + "Location": "New York", + "EmailOptOut": true, + "MasterAvatarTypeCode": 10 + } + }, + "type": "REST", + "files": {}, + "method": "PUT", + "params": {}, + "headers": { + "Accesskey": "sample-access-key", + "Content-Type": "application/json" + }, + "version": "1", + "endpoint": "https://demo-domain.gainsightcloud.com/v1.0/api/people", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "gainsight", + "description": "Test 7", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "domain": "demo-domain.gainsightcloud.com", + "accessKey": "sample-access-key", + "sharedSecret": "sample-shared-secret", + "eventNameMap": [ + { + "from": "Ticket Resolved", + "to": "Ticket Resolved Event" + } + ], + "eventVersionMap": [ + { + "from": "Ticket Resolved", + "to": "1.0.0" + } + ], + "topicName": "Ticket Actions", + "tenantId": "sample-tenant-id", + "personMap": [], + "companyMap": [], + "contractId": "externalId-shall-get-precedence" + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "gainsightEventContractId", + "id": "sample-contract-id" + } + ] + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "anonymousId": "anon_id", + "type": "track", + "event": "Ticket Resolved", + "properties": { + "ticketId": "sample-ticket-id", + "actionEmail": "sample@email.com", + "status": "resovled" + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {}, + "JSON": { + "ticketId": "sample-ticket-id", + "actionEmail": "sample@email.com", + "status": "resovled" + } + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": {}, + "headers": { + "Accesskey": "sample-access-key", + "tenantId": "sample-tenant-id", + "sharedSecret": "sample-shared-secret", + "Content-Type": "application/json", + "topicName": "Ticket Actions", + "eventName": "Ticket Resolved Event", + "eventVersion": "1.0.0", + "contractId": "sample-contract-id" + }, + "version": "1", + "endpoint": "https://demo-domain.gainsightcloud.com/v1.0/api/eventManager/event", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "gainsight", + "description": "Test 8", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "domain": "demo-domain.gainsightcloud.com", + "accessKey": "sample-access-key", + "personMap": [ + { + "from": "car", + "to": "car__gc" + } + ], + "companyMap": [], + "eventNameMap": [], + "eventVersionMap": [] + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "anonymousId": "anon_id", + "type": "identify", + "traits": { + "name": "Bruce Wayne", + "email": "ceo@waynefoundation.com", + "car": "Batmobile", + "comments": "I am Batman!", + "lastName": "Wayne", + "location": "Gotham Central", + "firstName": "Bruce", + "linkedinUrl": "https://www.linkedin.com/in/notyourBatman/" + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {}, + "JSON": { + "Name": "Bruce Wayne", + "Email": "ceo@waynefoundation.com", + "car__gc": "Batmobile", + "Comments": "I am Batman!", + "LastName": "Wayne", + "Location": "Gotham Central", + "FirstName": "Bruce", + "LinkedinUrl": "https://www.linkedin.com/in/notyourBatman/" + } + }, + "type": "REST", + "files": {}, + "method": "PUT", + "params": {}, + "headers": { + "Accesskey": "sample-access-key", + "Content-Type": "application/json" + }, + "version": "1", + "endpoint": "https://demo-domain.gainsightcloud.com/v1.0/api/people", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + } +] \ No newline at end of file diff --git a/test/integrations/destinations/gainsight/router/data.ts b/test/integrations/destinations/gainsight/router/data.ts new file mode 100644 index 0000000000..d5873e8465 --- /dev/null +++ b/test/integrations/destinations/gainsight/router/data.ts @@ -0,0 +1,451 @@ +export const data = [ + { + name: 'gainsight', + description: 'Test 0', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + "message": { + "type": "identify", + "sentAt": "2021-05-28T11:22:01.842Z", + "userId": "live-test", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.1.18", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "file:///Users/anurajguha/workspace/simple-html-test/index.html", + "path": "/Users/anurajguha/workspace/simple-html-test/index.html", + "title": "Test", + "search": "", + "tab_url": "file:///Users/anurajguha/workspace/simple-html-test/index.html", + "referrer": "$direct", + "initial_referrer": "$direct", + "referring_domain": "", + "initial_referring_domain": "" + }, + "locale": "en-GB", + "screen": { + "density": 2 + }, + "traits": { + "name": "Cosmo Krammer", + "email": "cosmo@krammer.com", + "location": "New York", + "emailOptOut": true, + "linkedinUrl": "https://linkedin.com/cosmo-krammer", + "masterAvatarTypeCode": 10 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.18" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36" + }, + "rudderId": "94d40f2f-5787-4798-8a03-34f3b02f5ede", + "messageId": "8274e525-d99c-4f55-b67a-bbc890d1444c", + "timestamp": "2021-05-28T16:52:01.859+05:30", + "receivedAt": "2021-05-28T16:52:01.859+05:30", + "request_ip": "[::1]", + "anonymousId": "1585ea2f-dddc-4d23-935f-c1196405d61e", + "integrations": { + "All": true + }, + "originalTimestamp": "2021-05-28T11:22:01.842Z" + }, + "metadata": { + "userId": "94d40f2f-5787-4798-8a03-34f3b02f5ede", + "jobId": 1, + "sourceId": "1syvMwC0K62eIb4yAV9kFJtbDEA", + "destinationId": "1syvZAuiGo4l1SIsil0TxDEx34G", + "attemptNum": 0, + "receivedAt": "2021-05-28T16:52:01.859+05:30", + "createdAt": "2021-05-28T11:22:02.463Z", + "firstAttemptedAt": "", + "transformAt": "router" + }, + "destination": { + "ID": "1syvZAuiGo4l1SIsil0TxDEx34G", + "Name": "gainsight-dev-dest", + "DestinationDefinition": { + "ID": "1syuhEt4I8jpvlwJc4lr1IiLjPu", + "Name": "GAINSIGHT", + "DisplayName": "Gainsight", + "Config": { + "destConfig": { + "defaultConfig": [ + "accessKey", + "sharedSecret", + "tenantId", + "domain", + "personMap", + "companyMap", + "topicName", + "eventNameMap", + "eventVersionMap", + "contractId" + ] + }, + "excludeKeys": [], + "includeKeys": [], + "saveDestinationResponse": true, + "secretKeys": ["accessKey", "sharedSecret"], + "supportedSourceTypes": ["android", "ios", "web", "unity", "amp", "cloud", "reactnative"], + "transformAt": "router", + "transformAtV1": "router" + }, + "ResponseRules": {} + }, + "Config": { + "accessKey": "sample-access-key", + "contractId": "", + "domain": "demo-account.gainsightcloud.com", + "sharedSecret": "", + "tenantId": "", + "topicName": "" + }, + "Enabled": true, + "Transformations": [], + "IsProcessorEnabled": true + } + }, + { + "message": { + "type": "track", + "event": "Demo Request", + "sentAt": "2021-05-28T11:52:12.893Z", + "userId": "", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.1.18", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "file:///Users/anurajguha/workspace/simple-html-test/index.html", + "path": "/Users/anurajguha/workspace/simple-html-test/index.html", + "title": "Test", + "search": "", + "tab_url": "file:///Users/anurajguha/workspace/simple-html-test/index.html", + "referrer": "$direct", + "initial_referrer": "$direct", + "referring_domain": "", + "initial_referring_domain": "" + }, + "locale": "en-GB", + "screen": { + "density": 2 + }, + "traits": {}, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.18" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36" + }, + "rudderId": "1a30a93f-916b-4c39-ad20-1ce7bbbd7754", + "messageId": "f5619b1a-8704-42a8-bab9-92bbeaa44896", + "timestamp": "2021-05-28T17:22:12.905+05:30", + "properties": { + "email": "sample@user.com", + "status": "active" + }, + "receivedAt": "2021-05-28T17:22:12.905+05:30", + "request_ip": "[::1]", + "anonymousId": "1585ea2f-dddc-4d23-935f-c1196405d61e", + "integrations": { + "All": true + }, + "originalTimestamp": "2021-05-28T11:52:12.893Z" + }, + "metadata": { + "userId": "1a30a93f-916b-4c39-ad20-1ce7bbbd7754", + "jobId": 2, + "sourceId": "1syvMwC0K62eIb4yAV9kFJtbDEA", + "destinationId": "1syvZAuiGo4l1SIsil0TxDEx34G", + "attemptNum": 0, + "receivedAt": "2021-05-28T17:22:12.905+05:30", + "createdAt": "2021-05-28T11:52:15.283Z", + "firstAttemptedAt": "", + "transformAt": "router" + }, + "destination": { + "ID": "1syvZAuiGo4l1SIsil0TxDEx34G", + "Name": "gainsight-dev-dest", + "DestinationDefinition": { + "ID": "1syuhEt4I8jpvlwJc4lr1IiLjPu", + "Name": "GAINSIGHT", + "DisplayName": "Gainsight", + "Config": { + "destConfig": { + "defaultConfig": [ + "accessKey", + "sharedSecret", + "tenantId", + "domain", + "personMap", + "companyMap", + "topicName", + "eventNameMap", + "eventVersionMap", + "contractId" + ] + }, + "excludeKeys": [], + "includeKeys": [], + "saveDestinationResponse": true, + "secretKeys": ["accessKey", "sharedSecret"], + "supportedSourceTypes": ["android", "ios", "web", "unity", "amp", "cloud", "reactnative"], + "transformAt": "router", + "transformAtV1": "router" + }, + "ResponseRules": {} + }, + "Config": { + "accessKey": "sample-access-key", + "contractId": "sample-contract-id", + "domain": "demo-account.gainsightcloud.com", + "eventNameMap": [ + { + "from": "Demo Request", + "to": "Product Demo" + } + ], + "eventVersionMap": [ + { + "from": "Demo Request", + "to": "1.0.0" + } + ], + "sharedSecret": "sample-shared-secret", + "tenantId": "sample-tenant-id", + "topicName": "Support Tickets" + }, + "Enabled": true, + "Transformations": [], + "IsProcessorEnabled": true + } + } + ], + destType: 'gainsight', + }, + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + "batchedRequest": { + "version": "1", + "type": "REST", + "method": "PUT", + "endpoint": "https://demo-account.gainsightcloud.com/v1.0/api/people", + "headers": { + "Accesskey": "sample-access-key", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "Email": "cosmo@krammer.com", + "Name": "Cosmo Krammer", + "LinkedinUrl": "https://linkedin.com/cosmo-krammer", + "Location": "New York", + "EmailOptOut": true, + "MasterAvatarTypeCode": 10 + }, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {} + }, + "metadata": [ + { + "userId": "94d40f2f-5787-4798-8a03-34f3b02f5ede", + "jobId": 1, + "sourceId": "1syvMwC0K62eIb4yAV9kFJtbDEA", + "destinationId": "1syvZAuiGo4l1SIsil0TxDEx34G", + "attemptNum": 0, + "receivedAt": "2021-05-28T16:52:01.859+05:30", + "createdAt": "2021-05-28T11:22:02.463Z", + "firstAttemptedAt": "", + "transformAt": "router" + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "ID": "1syvZAuiGo4l1SIsil0TxDEx34G", + "Name": "gainsight-dev-dest", + "DestinationDefinition": { + "ID": "1syuhEt4I8jpvlwJc4lr1IiLjPu", + "Name": "GAINSIGHT", + "DisplayName": "Gainsight", + "Config": { + "destConfig": { + "defaultConfig": [ + "accessKey", + "sharedSecret", + "tenantId", + "domain", + "personMap", + "companyMap", + "topicName", + "eventNameMap", + "eventVersionMap", + "contractId" + ] + }, + "excludeKeys": [], + "includeKeys": [], + "saveDestinationResponse": true, + "secretKeys": ["accessKey", "sharedSecret"], + "supportedSourceTypes": ["android", "ios", "web", "unity", "amp", "cloud", "reactnative"], + "transformAt": "router", + "transformAtV1": "router" + }, + "ResponseRules": {} + }, + "Config": { + "accessKey": "sample-access-key", + "contractId": "", + "domain": "demo-account.gainsightcloud.com", + "sharedSecret": "", + "tenantId": "", + "topicName": "" + }, + "Enabled": true, + "Transformations": [], + "IsProcessorEnabled": true + } + }, + { + "batchedRequest": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://demo-account.gainsightcloud.com/v1.0/api/eventManager/event", + "headers": { + "sharedSecret": "sample-shared-secret", + "topicName": "Support Tickets", + "tenantId": "sample-tenant-id", + "Content-Type": "application/json", + "eventName": "Product Demo", + "eventVersion": "1.0.0", + "contractId": "sample-contract-id", + "Accesskey": "sample-access-key" + }, + "params": {}, + "body": { + "JSON": { + "email": "sample@user.com", + "status": "active" + }, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {} + }, + "metadata": [ + { + "userId": "1a30a93f-916b-4c39-ad20-1ce7bbbd7754", + "jobId": 2, + "sourceId": "1syvMwC0K62eIb4yAV9kFJtbDEA", + "destinationId": "1syvZAuiGo4l1SIsil0TxDEx34G", + "attemptNum": 0, + "receivedAt": "2021-05-28T17:22:12.905+05:30", + "createdAt": "2021-05-28T11:52:15.283Z", + "firstAttemptedAt": "", + "transformAt": "router" + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "ID": "1syvZAuiGo4l1SIsil0TxDEx34G", + "Name": "gainsight-dev-dest", + "DestinationDefinition": { + "ID": "1syuhEt4I8jpvlwJc4lr1IiLjPu", + "Name": "GAINSIGHT", + "DisplayName": "Gainsight", + "Config": { + "destConfig": { + "defaultConfig": [ + "accessKey", + "sharedSecret", + "tenantId", + "domain", + "personMap", + "companyMap", + "topicName", + "eventNameMap", + "eventVersionMap", + "contractId" + ] + }, + "excludeKeys": [], + "includeKeys": [], + "saveDestinationResponse": true, + "secretKeys": ["accessKey", "sharedSecret"], + "supportedSourceTypes": ["android", "ios", "web", "unity", "amp", "cloud", "reactnative"], + "transformAt": "router", + "transformAtV1": "router" + }, + "ResponseRules": {} + }, + "Config": { + "accessKey": "sample-access-key", + "contractId": "sample-contract-id", + "domain": "demo-account.gainsightcloud.com", + "eventNameMap": [ + { + "from": "Demo Request", + "to": "Product Demo" + } + ], + "eventVersionMap": [ + { + "from": "Demo Request", + "to": "1.0.0" + } + ], + "sharedSecret": "sample-shared-secret", + "tenantId": "sample-tenant-id", + "topicName": "Support Tickets" + }, + "Enabled": true, + "Transformations": [], + "IsProcessorEnabled": true + } + } + ], + }, + }, + }, + }, +]; diff --git a/test/integrations/destinations/gainsight_px/network.ts b/test/integrations/destinations/gainsight_px/network.ts new file mode 100644 index 0000000000..d9dd6bbaa0 --- /dev/null +++ b/test/integrations/destinations/gainsight_px/network.ts @@ -0,0 +1,222 @@ +export const networkCallsData = [ + { + httpReq: { + url: 'https://api.aptrinsic.com/v1/users/sample-user-id', + method: 'GET', + }, + httpRes: { + data: { + "aptrinsicId": "347c4c87-98c7-4ca6-a6da-678ed6924c22", + "identifyId": "sample-user-id", + "type": "USER", + "gender": "MALE", + "email": "user@email.com", + "firstName": "Sample", + "lastName": "User", + "lastSeenDate": 0, + "signUpDate": 1624431528295, + "firstVisitDate": 0, + "title": "engineer", + "phone": "", + "score": 0, + "role": "", + "subscriptionId": "", + "accountId": "", + "numberOfVisits": 1, + "location": { + "countryName": "USA", + "countryCode": "US", + "stateName": "", + "stateCode": "", + "city": "New York", + "street": "", + "postalCode": "", + "continent": "", + "regionName": "", + "timeZone": "", + "coordinates": { + "latitude": 0.0, + "longitude": 0.0 + } + }, + "propertyKeys": ["AP-XABC-123"], + "createDate": 1624431528295, + "lastModifiedDate": 1624431528295, + "customAttributes": null, + "globalUnsubscribe": false, + "sfdcContactId": "", + "lastVisitedUserAgentData": null, + "id": "sample-user-id", + "lastInferredLocation": { + "countryName": "", + "countryCode": "", + "stateName": "", + "stateCode": "", + "city": "", + "street": "", + "postalCode": "", + "continent": "", + "regionName": "", + "timeZone": "", + "coordinates": { + "latitude": 0.0, + "longitude": 0.0 + } + } + }, + status: 200 + }, + }, + { + httpReq: { + url: 'https://api.aptrinsic.com/v1/accounts/ecorp-id', + method: 'GET', + }, + httpRes: { + data: { + "id": "ecorp-id", + "name": "ECorp", + "trackedSubscriptionId": "", + "sfdcId": "", + "lastSeenDate": 0, + "dunsNumber": "", + "industry": "software", + "numberOfEmployees": 400, + "sicCode": "", + "website": "www.ecorp.com", + "naicsCode": "", + "plan": "premium", + "location": { + "countryName": "", + "countryCode": "", + "stateName": "", + "stateCode": "", + "city": "", + "street": "", + "postalCode": "", + "continent": "", + "regionName": "", + "timeZone": "", + "coordinates": { + "latitude": 0.0, + "longitude": 0.0 + } + }, + "numberOfUsers": 0, + "propertyKeys": ["AP-XABC-123"], + "createDate": 1624261864923, + "lastModifiedDate": 1624261864923, + "customAttributes": null, + "parentGroupId": "" + }, + status: 200 + }, + }, + { + httpReq: { + url: 'https://api.aptrinsic.com/v1/accounts/ecorp-id', + method: 'PUT', + }, + httpRes: { + data: { + "id": "ecorp-id", + "name": "ECorp", + "trackedSubscriptionId": "", + "sfdcId": "", + "lastSeenDate": 0, + "dunsNumber": "", + "industry": "software", + "numberOfEmployees": 400, + "sicCode": "", + "website": "www.ecorp.com", + "naicsCode": "", + "plan": "premium", + "location": { + "countryName": "", + "countryCode": "", + "stateName": "", + "stateCode": "", + "city": "", + "street": "", + "postalCode": "", + "continent": "", + "regionName": "", + "timeZone": "", + "coordinates": { + "latitude": 0.0, + "longitude": 0.0 + } + }, + "numberOfUsers": 0, + "propertyKeys": ["AP-XABC-123"], + "createDate": 1624261864923, + "lastModifiedDate": 1624261864923, + "customAttributes": null, + "parentGroupId": "" + }, + status: 204 + }, + }, + { + httpReq: { + url: 'https://api.aptrinsic.com/v1/users/absent-id', + method: 'GET', + }, + httpRes: { + data: { + externalapierror: { + status: "NOT_FOUND", + message: "User was not found for parameters {id=absent-id}", + debugMessage: null, + subErrors: null + } + }, + status: 404 + }, + }, + { + httpReq: { + url: 'https://api.aptrinsic.com/v1/users/stanley-kubrick', + method: 'GET', + }, + httpRes: { + data: { + "id": "ecorp-id", + "name": "ECorp", + "trackedSubscriptionId": "", + "sfdcId": "", + "lastSeenDate": 0, + "dunsNumber": "", + "industry": "software", + "numberOfEmployees": 400, + "sicCode": "", + "website": "www.ecorp.com", + "naicsCode": "", + "plan": "premium", + "location": { + "countryName": "", + "countryCode": "", + "stateName": "", + "stateCode": "", + "city": "", + "street": "", + "postalCode": "", + "continent": "", + "regionName": "", + "timeZone": "", + "coordinates": { + "latitude": 0.0, + "longitude": 0.0 + } + }, + "numberOfUsers": 0, + "propertyKeys": ["AP-XABC-123"], + "createDate": 1624261864923, + "lastModifiedDate": 1624261864923, + "customAttributes": null, + "parentGroupId": "" + }, + status: 200 + }, + } +]; diff --git a/test/integrations/destinations/gainsight_px/processor/data.ts b/test/integrations/destinations/gainsight_px/processor/data.ts new file mode 100644 index 0000000000..192c6969c4 --- /dev/null +++ b/test/integrations/destinations/gainsight_px/processor/data.ts @@ -0,0 +1,1857 @@ +export const data = [ + { + "name": "gainsight_px", + "description": "Test 0", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "sample-api-key", + "productTagKey": "AP-XABC-123", + "accountAttributeMap": [ + { + "from": "", + "to": "" + } + ], + "userAttributeMap": [ + { + "from": "", + "to": "" + } + ], + "globalContextMap": [ + { + "from": "projectId", + "to": "p-123" + }, + { + "from": "tag", + "to": "sample-category-tag" + } + ] + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "userId": "sample-user-id", + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "anonymousId": "sample-anon-id", + "type": "track", + "event": "Product Added", + "properties": { + "product_id": "123", + "sku": "F16", + "category": "Games", + "name": "Game", + "brand": "Gamepro", + "variant": "111", + "price": 13.49, + "quantity": 11, + "coupon": "DISC21", + "position": 1, + "url": "https://www.website.com/product/path", + "image_url": "https://www.website.com/product/path.png" + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {}, + "JSON": { + "attributes": { + "product_id": "123", + "sku": "F16", + "category": "Games", + "name": "Game", + "brand": "Gamepro", + "variant": "111", + "price": 13.49, + "quantity": 11, + "coupon": "DISC21", + "position": 1, + "url": "https://www.website.com/product/path", + "image_url": "https://www.website.com/product/path.png" + }, + "propertyKey": "AP-XABC-123", + "userType": "USER", + "identifyId": "sample-user-id", + "date": 1571043797562, + "eventName": "Product Added", + "globalContext": { + "projectId": "p-123", + "tag": "sample-category-tag" + } + } + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": {}, + "headers": { + "X-APTRINSIC-API-KEY": "sample-api-key", + "Content-Type": "application/json" + }, + "version": "1", + "endpoint": "https://api.aptrinsic.com/v1/events/custom", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "gainsight_px", + "description": "Test 1", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "sample-api-key", + "productTagKey": "AP-XABC-123", + "accountAttributeMap": [ + { + "from": "", + "to": "" + } + ], + "userAttributeMap": [ + { + "from": "", + "to": "" + } + ], + "globalContextMap": [ + { + "from": "projectId", + "to": "p-123" + }, + { + "from": "tag", + "to": "sample-category-tag" + } + ] + } + }, + "message": { + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "version": "1.27.0", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:8887/", + "path": "/", + "title": "RudderStack in 5", + "search": "", + "tab_url": "http://127.0.0.1:8887/", + "referrer": "$direct", + "initial_referrer": "$direct", + "referring_domain": "", + "initial_referring_domain": "" + }, + "locale": "en-US", + "screen": { + "width": 1512, + "height": 982, + "density": 2, + "innerWidth": 774, + "innerHeight": 774 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.27.0" + }, + "campaign": {}, + "sessionId": 1679967592314, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36", + "properties": { + "email": "84@84.com", + "price": "56.0", + "quantity": "5" + } + }, + "userId": "sample-user-id", + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "anonymousId": "sample-anon-id", + "type": "track", + "event": "Marketing - Plan Change Events", + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {}, + "JSON": { + "attributes": {}, + "url": "http://127.0.0.1:8887/", + "propertyKey": "AP-XABC-123", + "userType": "USER", + "identifyId": "sample-user-id", + "referrer": "$direct", + "date": 1571043797562, + "sessionId": 1679967592314, + "eventName": "Marketing - Plan Change Events", + "globalContext": { + "projectId": "p-123", + "tag": "sample-category-tag" + } + } + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": {}, + "headers": { + "X-APTRINSIC-API-KEY": "sample-api-key", + "Content-Type": "application/json" + }, + "version": "1", + "endpoint": "https://api.aptrinsic.com/v1/events/custom", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "gainsight_px", + "description": "Test 2", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "sample-api-key", + "productTagKey": "AP-XABC-123", + "accountAttributeMap": [ + { + "from": "", + "to": "" + } + ], + "userAttributeMap": [ + { + "from": "", + "to": "" + } + ], + "globalContextMap": [ + { + "from": "projectId", + "to": "p-123" + }, + { + "from": "tag", + "to": "sample-category-tag" + } + ] + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "userId": "sample-user-id", + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "anonymousId": "sample-anon-id", + "type": "track", + "event": "Track Me", + "properties": { + "description": "Sample Track call", + "globalContext": { + "testOverride": "some-value" + } + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {}, + "JSON": { + "attributes": { + "description": "Sample Track call" + }, + "propertyKey": "AP-XABC-123", + "userType": "USER", + "identifyId": "sample-user-id", + "date": 1571043797562, + "eventName": "Track Me", + "globalContext": { + "testOverride": "some-value" + } + } + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": {}, + "headers": { + "X-APTRINSIC-API-KEY": "sample-api-key", + "Content-Type": "application/json" + }, + "version": "1", + "endpoint": "https://api.aptrinsic.com/v1/events/custom", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "gainsight_px", + "description": "Test 3", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "sample-api-key", + "productTagKey": "AP-XABC-123", + "accountAttributeMap": [ + { + "from": "", + "to": "" + } + ], + "userAttributeMap": [ + { + "from": "hobbyCustomField", + "to": "hobby" + } + ], + "globalContextMap": [] + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "userId": "sample-user-id", + "anonymousId": "sample-anon-id", + "type": "identify", + "traits": { + "type": "USER", + "gender": "MALE", + "email": "user@email.com", + "firstName": "Sample", + "lastName": "User", + "signUpDate": 1624431528295, + "title": "engineer", + "countryName": "USA", + "countryCode": "US", + "city": "New York", + "hobbyCustomField": "Sample Hobby" + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {}, + "JSON": { + "type": "USER", + "gender": "MALE", + "email": "user@email.com", + "firstName": "Sample", + "lastName": "User", + "signUpDate": 1624431528295, + "createDate": 1571043797562, + "title": "engineer", + "propertyKeys": [ + "AP-XABC-123" + ], + "location": { + "countryName": "USA", + "countryCode": "US", + "city": "New York" + }, + "customAttributes": { + "hobby": "Sample Hobby" + } + } + }, + "type": "REST", + "files": {}, + "method": "PUT", + "params": {}, + "headers": { + "X-APTRINSIC-API-KEY": "sample-api-key", + "Content-Type": "application/json" + }, + "version": "1", + "endpoint": "https://api.aptrinsic.com/v1/users/sample-user-id", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "gainsight_px", + "description": "Test 4", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "sample-api-key", + "productTagKey": "AP-XABC-123", + "accountAttributeMap": [ + { + "from": "", + "to": "" + } + ], + "userAttributeMap": [], + "globalContextMap": [] + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + }, + "traits": { + "type": "USER", + "gender": "MALE", + "email": "user@email.com", + "firstName": "Sample", + "lastName": "User", + "medium": null + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "anonymousId": "sample-anon-id", + "userId": "sample-user-id", + "groupId": "ecorp-id", + "type": "group", + "traits": { + "name": "ECorp", + "industry": "software", + "numberOfEmployees": 400, + "website": "www.ecorp.com", + "plan": "premium" + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {}, + "JSON": { + "accountId": "ecorp-id" + } + }, + "type": "REST", + "files": {}, + "method": "PUT", + "params": {}, + "headers": { + "X-APTRINSIC-API-KEY": "sample-api-key", + "Content-Type": "application/json" + }, + "version": "1", + "endpoint": "https://api.aptrinsic.com/v1/users/sample-user-id", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "gainsight_px", + "description": "Test 5", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "sample-api-key", + "productTagKey": "AP-XABC-123", + "accountAttributeMap": [ + { + "from": "", + "to": "" + } + ], + "userAttributeMap": [ + { + "from": "hobbyCustomField", + "to": "hobby" + } + ], + "globalContextMap": [] + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "type": "identify", + "traits": { + "type": "USER", + "gender": "MALE", + "email": "user@email.com", + "firstName": "Sample", + "lastName": "User", + "signUpDate": 1624431528295, + "title": "engineer", + "countryName": "USA", + "countryCode": "US", + "city": "New York", + "hobbyCustomField": "Sample Hobby" + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "userId or anonymousId is required for identify", + "statTags": { + "destType": "GAINSIGHT_PX", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "gainsight_px", + "description": "Test 6", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "sample-api-key", + "productTagKey": "AP-XABC-123", + "accountAttributeMap": [ + { + "from": "", + "to": "" + } + ], + "userAttributeMap": [ + { + "from": "", + "to": "" + } + ], + "globalContextMap": [ + { + "from": "projectId", + "to": "p-123" + }, + { + "from": "tag", + "to": "sample-category-tag" + } + ] + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "type": "track", + "event": "Product Added", + "properties": { + "product_id": "123", + "sku": "F16", + "category": "Games", + "name": "Game", + "brand": "Gamepro", + "variant": "111", + "price": 13.49, + "quantity": 11, + "coupon": "DISC21", + "position": 1, + "url": "https://www.website.com/product/path", + "image_url": "https://www.website.com/product/path.png" + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Missing required value from \"userId\"", + "statTags": { + "destType": "GAINSIGHT_PX", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "gainsight_px", + "description": "Test 7", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "sample-api-key", + "productTagKey": "AP-XABC-123", + "accountAttributeMap": [ + { + "from": "", + "to": "" + } + ], + "userAttributeMap": [], + "globalContextMap": [] + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + }, + "traits": { + "type": "USER", + "gender": "MALE", + "email": "user@email.com", + "firstName": "Sample", + "lastName": "User" + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "anonymousId": "sample-anon-id", + "userId": "sample-user-id", + "type": "group", + "traits": { + "name": "ECorp", + "industry": "software", + "numberOfEmployees": 400, + "website": "www.ecorp.com", + "plan": "premium" + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "groupId is required for group", + "statTags": { + "destType": "GAINSIGHT_PX", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "gainsight_px", + "description": "Test 8", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "sample-api-key", + "productTagKey": "AP-XABC-123", + "accountAttributeMap": [ + { + "from": "", + "to": "" + } + ], + "userAttributeMap": [ + { + "from": "", + "to": "" + } + ], + "globalContextMap": [ + { + "from": "projectId", + "to": "p-123" + }, + { + "from": "tag", + "to": "sample-category-tag" + } + ] + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "userId": "sample-user-id", + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "anonymousId": "sample-anon-id", + "type": "track", + "event": "Stringify Test", + "properties": { + "description": "Stringify test for object values", + "nested": { + "a": [ + 1, + 2, + 3 + ], + "b": { + "c": 1 + } + }, + "arr": [ + 1, + 2, + 3 + ] + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {}, + "JSON": { + "attributes": { + "description": "Stringify test for object values", + "nested": "{\"a\":[1,2,3],\"b\":{\"c\":1}}", + "arr": "[1,2,3]" + }, + "propertyKey": "AP-XABC-123", + "userType": "USER", + "identifyId": "sample-user-id", + "date": 1571043797562, + "eventName": "Stringify Test", + "globalContext": { + "projectId": "p-123", + "tag": "sample-category-tag" + } + } + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": {}, + "headers": { + "X-APTRINSIC-API-KEY": "sample-api-key", + "Content-Type": "application/json" + }, + "version": "1", + "endpoint": "https://api.aptrinsic.com/v1/events/custom", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "gainsight_px", + "description": "Test 9", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "sample-api-key", + "productTagKey": "AP-XABC-123", + "accountAttributeMap": [ + { + "from": "", + "to": "" + } + ], + "userAttributeMap": [ + { + "from": "", + "to": "" + } + ], + "globalContextMap": [ + { + "from": "projectId", + "to": "p-123" + }, + { + "from": "tag", + "to": "sample-category-tag" + } + ] + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "userId": "sample-user-id", + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "anonymousId": "sample-anon-id", + "type": "track", + "event": "Stringify Test", + "properties": { + "description": "Stringify test for object values", + "nested": { + "a": [ + 1, + 2, + 3 + ], + "b": { + "c": 1 + } + }, + "arr": [ + 1, + 2, + 3 + ], + "globalContext": { + "someKey": "someVal" + } + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {}, + "JSON": { + "attributes": { + "description": "Stringify test for object values", + "nested": "{\"a\":[1,2,3],\"b\":{\"c\":1}}", + "arr": "[1,2,3]" + }, + "propertyKey": "AP-XABC-123", + "userType": "USER", + "identifyId": "sample-user-id", + "date": 1571043797562, + "eventName": "Stringify Test", + "globalContext": { + "someKey": "someVal" + } + } + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": {}, + "headers": { + "X-APTRINSIC-API-KEY": "sample-api-key", + "Content-Type": "application/json" + }, + "version": "1", + "endpoint": "https://api.aptrinsic.com/v1/events/custom", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "gainsight_px", + "description": "Test 10", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "sample-api-key", + "productTagKey": "AP-XABC-123", + "accountAttributeMap": [ + { + "from": "", + "to": "" + } + ], + "userAttributeMap": [], + "globalContextMap": [] + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + }, + "traits": { + "type": "USER", + "gender": "MALE", + "email": "user@email.com", + "firstName": "Sample", + "lastName": "User" + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "anonymousId": "sample-anon-id", + "userId": "absent-id", + "groupId": "ecorp-id", + "type": "group", + "traits": { + "name": "ECorp", + "industry": "software", + "numberOfEmployees": 400, + "website": "www.ecorp.com", + "plan": "premium" + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "aborting group call: {\"status\":\"NOT_FOUND\",\"message\":\"User was not found for parameters {id=absent-id}\",\"debugMessage\":null,\"subErrors\":null}", + "statTags": { + "destType": "GAINSIGHT_PX", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "gainsight_px", + "description": "Test 11", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "sample-api-key", + "productTagKey": "AP-XABC-123", + "accountAttributeMap": [ + { + "from": "", + "to": "" + } + ], + "userAttributeMap": [ + { + "from": "hobbyCustomField", + "to": "hobby" + } + ], + "globalContextMap": [] + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "userId": "absent-id", + "anonymousId": "sample-anon-id", + "type": "identify", + "traits": { + "type": "USER", + "gender": "MALE", + "email": "user@email.com", + "firstName": "Sample", + "lastName": "User", + "signUpDate": 1624431528295, + "title": "engineer", + "countryName": "USA", + "countryCode": "US", + "city": "New York", + "hobbyCustomField": "Sample Hobby" + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {}, + "JSON": { + "identifyId": "absent-id", + "type": "USER", + "gender": "MALE", + "email": "user@email.com", + "firstName": "Sample", + "lastName": "User", + "signUpDate": 1624431528295, + "createDate": 1571043797562, + "title": "engineer", + "propertyKeys": [ + "AP-XABC-123" + ], + "location": { + "countryName": "USA", + "countryCode": "US", + "city": "New York" + }, + "customAttributes": { + "hobby": "Sample Hobby" + } + } + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": {}, + "headers": { + "X-APTRINSIC-API-KEY": "sample-api-key", + "Content-Type": "application/json" + }, + "version": "1", + "endpoint": "https://api.aptrinsic.com/v1/users", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "gainsight_px", + "description": "Test 12", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "sample-api-key", + "productTagKey": "AP-XABC-123", + "accountAttributeMap": [ + { + "from": "", + "to": "" + } + ], + "userAttributeMap": [ + { + "from": "", + "to": "" + } + ], + "globalContextMap": [] + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "userId": "absent-id", + "anonymousId": "sample-anon-id", + "type": "identify", + "traits": { + "type": "USER", + "gender": "MALE", + "email": "user@email.com", + "firstName": "Sample", + "lastName": "User", + "signUpDate": 1624431528295, + "title": "engineer", + "countryName": "USA", + "countryCode": "US", + "city": "New York", + "hobbyCustomField": "Sample Hobby", + "accountId": 1234 + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {}, + "JSON": { + "identifyId": "absent-id", + "type": "USER", + "gender": "MALE", + "email": "user@email.com", + "firstName": "Sample", + "lastName": "User", + "signUpDate": 1624431528295, + "createDate": 1571043797562, + "title": "engineer", + "propertyKeys": [ + "AP-XABC-123" + ], + "accountId": "1234", + "location": { + "countryName": "USA", + "countryCode": "US", + "city": "New York" + }, + "customAttributes": {} + } + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": {}, + "headers": { + "X-APTRINSIC-API-KEY": "sample-api-key", + "Content-Type": "application/json" + }, + "version": "1", + "endpoint": "https://api.aptrinsic.com/v1/users", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "gainsight_px", + "description": "Test 13", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "sample-api-key", + "productTagKey": "AP-XABC-123", + "accountAttributeMap": [ + { + "from": "", + "to": "" + } + ], + "userAttributeMap": [], + "globalContextMap": [] + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + }, + "traits": { + "type": "USER", + "gender": "MALE", + "email": "user@email.com", + "firstName": "Sample", + "lastName": "User" + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "anonymousId": "sample-anon-id", + "userId": "absent-id", + "groupId": "ecorp-id", + "type": "group", + "traits": { + "name": "ECorp", + "industry": "software", + "numberOfEmployees": 400, + "website": "www.ecorp.com", + "plan": "premium", + "term": null + }, + "integrations": { + "All": true, + "GAINSIGHT_PX": { + "limitAPIForGroup": true + } + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "PUT", + "endpoint": "https://api.aptrinsic.com/v1/users/absent-id", + "headers": { + "X-APTRINSIC-API-KEY": "sample-api-key", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "accountId": "ecorp-id" + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "gainsight_px", + "description": "Test 14", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "sample-api-key", + "productTagKey": "AP-XABC-123", + "accountAttributeMap": [ + { + "from": "", + "to": "" + } + ], + "userAttributeMap": [ + { + "from": "hobbyCustomField", + "to": "hobby" + } + ], + "globalContextMap": [] + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "userId": "sample-user-id", + "anonymousId": "sample-anon-id", + "type": "identify", + "traits": { + "type": "USER", + "gender": "MALE", + "email": "user@email.com", + "firstName": "Sample", + "lastName": "User", + "signUpDate": 1624431528295, + "title": "engineer", + "countryName": "USA", + "countryCode": "US", + "city": "New York", + "hobbyCustomField": "Sample Hobby", + "term": null, + "campaign": "" + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {}, + "JSON": { + "type": "USER", + "gender": "MALE", + "email": "user@email.com", + "firstName": "Sample", + "lastName": "User", + "signUpDate": 1624431528295, + "createDate": 1571043797562, + "title": "engineer", + "propertyKeys": [ + "AP-XABC-123" + ], + "location": { + "countryName": "USA", + "countryCode": "US", + "city": "New York" + }, + "customAttributes": { + "hobby": "Sample Hobby" + } + } + }, + "type": "REST", + "files": {}, + "method": "PUT", + "params": {}, + "headers": { + "X-APTRINSIC-API-KEY": "sample-api-key", + "Content-Type": "application/json" + }, + "version": "1", + "endpoint": "https://api.aptrinsic.com/v1/users/sample-user-id", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + } +] \ No newline at end of file diff --git a/test/integrations/destinations/gainsight_px/router/data.ts b/test/integrations/destinations/gainsight_px/router/data.ts new file mode 100644 index 0000000000..4017a3ddb7 --- /dev/null +++ b/test/integrations/destinations/gainsight_px/router/data.ts @@ -0,0 +1,558 @@ +export const data = [ + { + name: 'gainsight_px', + description: 'Test 0', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + "message": { + "type": "identify", + "sentAt": "2021-06-25T08:59:52.891Z", + "userId": "stanley-kubrick", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.1.18", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "title": "Test", + "search": "", + "path": "index.html", + "url": "http://127.0.0.1:3003/index.html", + "tab_url": "http://127.0.0.1:3003/index.html", + "referrer": "$direct", + "initial_referrer": "$direct", + "referring_domain": "", + "initial_referring_domain": "" + }, + "locale": "en-GB", + "screen": { + "width": 1920, + "height": 1080, + "density": 1, + "innerWidth": 1920, + "innerHeight": 436 + }, + "traits": { + "name": "Stanley Kubrick", + "email": "stanley@kubrick.com", + "score": 100, + "title": "Director/Film Maker", + "gender": "Male", + "countryCode": "US", + "countryName": "USA", + "hobbyCustomField": "Making films. Being a genius" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.18" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36" + }, + "rudderId": "9a7820d0-0ff2-4451-b655-682cec15cbd2", + "messageId": "ff90d62e-a6e3-4e23-af20-03b4a249ef48", + "timestamp": "2021-06-25T14:29:52.911+05:30", + "receivedAt": "2021-06-25T14:29:52.911+05:30", + "request_ip": "[::1]", + "anonymousId": "1585ea2f-dddc-4d23-935f-c1196405d61e", + "integrations": { + "All": true + }, + "originalTimestamp": "2021-06-25T08:59:52.891Z" + }, + "metadata": { + "userId": "9a7820d0-0ff2-4451-b655-682cec15cbd2", + "jobId": 1, + "sourceId": "1s9eG8UCer6YSKsD8ZlQCyLa3pj", + "destinationId": "1uLy1tqsoo9RhL1zLiqLQTKBIKL", + "attemptNum": 0, + "receivedAt": "2021-06-25T14:29:52.911+05:30", + "createdAt": "2021-06-25T08:59:56.329Z", + "firstAttemptedAt": "", + "transformAt": "router" + }, + "destination": { + "ID": "1uLy1tqsoo9RhL1zLiqLQTKBIKL", + "Name": "gainsight-px-dest", + "DestinationDefinition": { + "ID": "1uLuOdwPCqtei55ZKXewwPhjQPf", + "Name": "GAINSIGHT_PX", + "DisplayName": "Gainsight PX", + "Config": { + "destConfig": { + "defaultConfig": [ + "apiKey", + "productTagKey", + "userAttributeMap", + "accountAttributeMap", + "globalContextMap" + ] + }, + "excludeKeys": [], + "includeKeys": [], + "saveDestinationResponse": true, + "secretKeys": ["apiKey", "productTagKey"], + "supportedSourceTypes": [ + "android", + "ios", + "web", + "unity", + "amp", + "cloud", + "reactnative", + "flutter" + ], + "transformAt": "router", + "transformAtV1": "router" + }, + "ResponseRules": {} + }, + "Config": { + "accountAttributeMap": [ + { + "from": "cultureCustomField", + "to": "culture" + } + ], + "apiKey": "sample-api-key", + "eventDelivery": false, + "eventDeliveryTS": 1624472902670, + "globalContextMap": [ + { + "from": "kubrickTest", + "to": "value" + } + ], + "productTagKey": "AP-SAMPLE-2", + "userAttributeMap": [ + { + "from": "hobbyCustomField", + "to": "hobby" + } + ] + }, + "Enabled": true, + "Transformations": [], + "IsProcessorEnabled": true + } + }, + { + "message": { + "type": "track", + "event": "nested test2", + "sentAt": "2021-06-26T10:41:22.316Z", + "userId": "adifhas9734", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.1.18", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "file:///Users/anurajguha/workspace/simple-html-test/index.html", + "path": "/Users/anurajguha/workspace/simple-html-test/index.html", + "title": "Test", + "search": "", + "tab_url": "file:///Users/anurajguha/workspace/simple-html-test/index.html", + "referrer": "$direct", + "initial_referrer": "$direct", + "referring_domain": "", + "initial_referring_domain": "" + }, + "locale": "en-GB", + "screen": { + "width": 1920, + "height": 1080, + "density": 1, + "innerWidth": 1920, + "innerHeight": 585 + }, + "traits": { + "name": "Update test unique", + "phone": "9900990899", + "lastname": "user6", + "firstname": "test", + "previousCompany": "testprevCompany2" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.18" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36" + }, + "rudderId": "a27a8a8a-9e81-4898-beeb-e6041fc1552d", + "messageId": "595dae36-5e4f-4feb-a2e4-8a7849615d38", + "timestamp": "2021-06-26T16:11:22.335+05:30", + "properties": { + "array": [1, 2, 3], + "nested": { + "json": "test" + }, + "status": "testing", + "description": "Example track call", + "fullyNested": [ + { + "a": 1, + "b": 2 + }, + { + "a": 1, + "b": [1, 2, 3] + } + ] + }, + "receivedAt": "2021-06-26T16:11:22.335+05:30", + "request_ip": "[::1]", + "anonymousId": "1585ea2f-dddc-4d23-935f-c1196405d61e", + "integrations": { + "All": true + }, + "originalTimestamp": "2021-06-26T10:41:22.316Z" + }, + "metadata": { + "userId": "a27a8a8a-9e81-4898-beeb-e6041fc1552d", + "jobId": 2, + "sourceId": "1s9eG8UCer6YSKsD8ZlQCyLa3pj", + "destinationId": "1uLy1tqsoo9RhL1zLiqLQTKBIKL", + "attemptNum": 0, + "receivedAt": "2021-06-26T16:11:22.335+05:30", + "createdAt": "2021-06-26T10:41:24.126Z", + "firstAttemptedAt": "", + "transformAt": "router" + }, + "destination": { + "ID": "1uLy1tqsoo9RhL1zLiqLQTKBIKL", + "Name": "gainsight-px-dest", + "DestinationDefinition": { + "ID": "1uLuOdwPCqtei55ZKXewwPhjQPf", + "Name": "GAINSIGHT_PX", + "DisplayName": "Gainsight PX", + "Config": { + "destConfig": { + "defaultConfig": [ + "apiKey", + "productTagKey", + "userAttributeMap", + "accountAttributeMap", + "globalContextMap" + ] + }, + "excludeKeys": [], + "includeKeys": [], + "saveDestinationResponse": true, + "secretKeys": ["apiKey", "productTagKey"], + "supportedSourceTypes": [ + "android", + "ios", + "web", + "unity", + "amp", + "cloud", + "reactnative", + "flutter" + ], + "transformAt": "router", + "transformAtV1": "router" + }, + "ResponseRules": {} + }, + "Config": { + "accountAttributeMap": [ + { + "from": "cultureCustomField", + "to": "culture" + } + ], + "apiKey": "sample-api-key", + "eventDelivery": false, + "eventDeliveryTS": 1624472902670, + "globalContextMap": [ + { + "from": "kubrickTest", + "to": "value" + } + ], + "productTagKey": "AP-SAMPLE-2", + "userAttributeMap": [ + { + "from": "hobbyCustomField", + "to": "hobby" + } + ] + }, + "Enabled": true, + "Transformations": [], + "IsProcessorEnabled": true + } + } + ] + , + destType: 'gainsight_px', + }, + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + "batchedRequest": { + "version": "1", + "type": "REST", + "method": "PUT", + "endpoint": "https://api.aptrinsic.com/v1/users/stanley-kubrick", + "headers": { + "X-APTRINSIC-API-KEY": "sample-api-key", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "email": "stanley@kubrick.com", + "gender": "MALE", + "signUpDate": 1624611592911, + "title": "Director/Film Maker", + "score": 100, + "createDate": 1624611592911, + "location": { + "countryName": "USA", + "countryCode": "US" + }, + "firstName": "Stanley", + "lastName": "Kubrick", + "customAttributes": { + "hobby": "Making films. Being a genius" + }, + "propertyKeys": ["AP-SAMPLE-2"], + "type": "USER" + }, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {} + }, + "metadata": [ + { + "userId": "9a7820d0-0ff2-4451-b655-682cec15cbd2", + "jobId": 1, + "sourceId": "1s9eG8UCer6YSKsD8ZlQCyLa3pj", + "destinationId": "1uLy1tqsoo9RhL1zLiqLQTKBIKL", + "attemptNum": 0, + "receivedAt": "2021-06-25T14:29:52.911+05:30", + "createdAt": "2021-06-25T08:59:56.329Z", + "firstAttemptedAt": "", + "transformAt": "router" + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "ID": "1uLy1tqsoo9RhL1zLiqLQTKBIKL", + "Name": "gainsight-px-dest", + "DestinationDefinition": { + "ID": "1uLuOdwPCqtei55ZKXewwPhjQPf", + "Name": "GAINSIGHT_PX", + "DisplayName": "Gainsight PX", + "Config": { + "destConfig": { + "defaultConfig": [ + "apiKey", + "productTagKey", + "userAttributeMap", + "accountAttributeMap", + "globalContextMap" + ] + }, + "excludeKeys": [], + "includeKeys": [], + "saveDestinationResponse": true, + "secretKeys": ["apiKey", "productTagKey"], + "supportedSourceTypes": [ + "android", + "ios", + "web", + "unity", + "amp", + "cloud", + "reactnative", + "flutter" + ], + "transformAt": "router", + "transformAtV1": "router" + }, + "ResponseRules": {} + }, + "Config": { + "accountAttributeMap": [ + { + "from": "cultureCustomField", + "to": "culture" + } + ], + "apiKey": "sample-api-key", + "eventDelivery": false, + "eventDeliveryTS": 1624472902670, + "globalContextMap": [ + { + "from": "kubrickTest", + "to": "value" + } + ], + "productTagKey": "AP-SAMPLE-2", + "userAttributeMap": [ + { + "from": "hobbyCustomField", + "to": "hobby" + } + ] + }, + "Enabled": true, + "Transformations": [], + "IsProcessorEnabled": true + } + }, + { + "batchedRequest": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.aptrinsic.com/v1/events/custom", + "headers": { + "X-APTRINSIC-API-KEY": "sample-api-key", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "identifyId": "adifhas9734", + "eventName": "nested test2", + "date": 1624704082335, + "attributes": { + "array": "[1,2,3]", + "nested": "{\"json\":\"test\"}", + "status": "testing", + "description": "Example track call", + "fullyNested": "[{\"a\":1,\"b\":2},{\"a\":1,\"b\":[1,2,3]}]" + }, + "url": "file:///Users/anurajguha/workspace/simple-html-test/index.html", + "referrer": "$direct", + "propertyKey": "AP-SAMPLE-2", + "userType": "USER", + "globalContext": { + "kubrickTest": "value" + } + }, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {} + }, + "metadata": [ + { + "userId": "a27a8a8a-9e81-4898-beeb-e6041fc1552d", + "jobId": 2, + "sourceId": "1s9eG8UCer6YSKsD8ZlQCyLa3pj", + "destinationId": "1uLy1tqsoo9RhL1zLiqLQTKBIKL", + "attemptNum": 0, + "receivedAt": "2021-06-26T16:11:22.335+05:30", + "createdAt": "2021-06-26T10:41:24.126Z", + "firstAttemptedAt": "", + "transformAt": "router" + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "ID": "1uLy1tqsoo9RhL1zLiqLQTKBIKL", + "Name": "gainsight-px-dest", + "DestinationDefinition": { + "ID": "1uLuOdwPCqtei55ZKXewwPhjQPf", + "Name": "GAINSIGHT_PX", + "DisplayName": "Gainsight PX", + "Config": { + "destConfig": { + "defaultConfig": [ + "apiKey", + "productTagKey", + "userAttributeMap", + "accountAttributeMap", + "globalContextMap" + ] + }, + "excludeKeys": [], + "includeKeys": [], + "saveDestinationResponse": true, + "secretKeys": ["apiKey", "productTagKey"], + "supportedSourceTypes": [ + "android", + "ios", + "web", + "unity", + "amp", + "cloud", + "reactnative", + "flutter" + ], + "transformAt": "router", + "transformAtV1": "router" + }, + "ResponseRules": {} + }, + "Config": { + "accountAttributeMap": [ + { + "from": "cultureCustomField", + "to": "culture" + } + ], + "apiKey": "sample-api-key", + "eventDelivery": false, + "eventDeliveryTS": 1624472902670, + "globalContextMap": [ + { + "from": "kubrickTest", + "to": "value" + } + ], + "productTagKey": "AP-SAMPLE-2", + "userAttributeMap": [ + { + "from": "hobbyCustomField", + "to": "hobby" + } + ] + }, + "Enabled": true, + "Transformations": [], + "IsProcessorEnabled": true + } + } + ], + }, + }, + }, + }, +]; diff --git a/test/integrations/destinations/intercom/router/data.ts b/test/integrations/destinations/intercom/router/data.ts index a956d358f0..74c514d082 100644 --- a/test/integrations/destinations/intercom/router/data.ts +++ b/test/integrations/destinations/intercom/router/data.ts @@ -1,272 +1,272 @@ export const data = [ - { - name: 'intercom', - description: 'Test 0', - feature: 'router', - module: 'destination', - version: 'v0', - input: { - request: { - body: { - input: [ - { - "message": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "channel": "mobile", - "context": { - "app": { - "build": "1.0", - "name": "Test_Example", - "namespace": "com.example.testapp", - "version": "1.0" - }, - "device": { - "id": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "manufacturer": "Apple", - "model": "iPhone", - "name": "iPod touch (7th generation)", - "type": "iOS" - }, - "library": { - "name": "test-ios-library", - "version": "1.0.7" - }, - "locale": "en-US", - "network": { - "bluetooth": false, - "carrier": "unavailable", - "cellular": false, - "wifi": true - }, - "os": { - "name": "iOS", - "version": "14.0" - }, - "screen": { - "density": 2, - "height": 320, - "width": 568 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "name": "Test Name", - "firstName": "Test", - "lastName": "Name", - "createdAt": "2020-09-30T19:11:00.337Z", - "userId": "test_user_id_1", - "email": "test_1@test.com", - "phone": "9876543210", - "key1": "value1" - }, - "userAgent": "unknown" - }, - "event": "Test Event 2", - "integrations": { - "All": true - }, - "messageId": "1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8", - "originalTimestamp": "2020-09-30T19:11:00.337Z", - "receivedAt": "2020-10-01T00:41:11.369+05:30", - "request_ip": "2405:201:8005:9856:7911:25e7:5603:5e18", - "sentAt": "2020-09-30T19:11:10.382Z", - "timestamp": "2020-10-01T00:41:01.324+05:30", - "type": "identify" - }, - "metadata": { - "jobId": 1 - }, - "destination": { - "Config": { - "apiKey": "intercomApiKey", - "appId": "9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0", - "collectContext": false - } - } - }, - { - "message": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "channel": "mobile", - "context": { - "app": { - "build": "1.0", - "name": "Test_Example", - "namespace": "com.example.testapp", - "version": "1.0" - }, - "device": { - "id": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "manufacturer": "Apple", - "model": "iPhone", - "name": "iPod touch (7th generation)", - "type": "iOS" - }, - "library": { - "name": "test-ios-library", - "version": "1.0.7" - }, - "locale": "en-US", - "network": { - "bluetooth": false, - "carrier": "unavailable", - "cellular": false, - "wifi": true - }, - "os": { - "name": "iOS", - "version": "14.0" - }, - "screen": { - "density": 2, - "height": 320, - "width": 568 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "firstName": "Test", - "lastName": "Name", - "createdAt": "2020-09-30T19:11:00.337Z", - "email": "test_1@test.com", - "phone": "9876543210", - "key1": "value1" - }, - "userAgent": "unknown" - }, - "event": "Test Event 2", - "integrations": { - "All": true - }, - "messageId": "1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8", - "originalTimestamp": "2020-09-30T19:11:00.337Z", - "receivedAt": "2020-10-01T00:41:11.369+05:30", - "request_ip": "2405:201:8005:9856:7911:25e7:5603:5e18", - "sentAt": "2020-09-30T19:11:10.382Z", - "timestamp": "2020-10-01T00:41:01.324+05:30", - "type": "identify" - }, - "metadata": { - "jobId": 2 - }, - "destination": { - "Config": { - "apiKey": "intercomApiKey", - "appId": "9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0", - "collectContext": false - } - } - } - ], - destType: 'intercom', + { + name: 'intercom', + description: 'Test 0', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + message: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + channel: 'mobile', + context: { + app: { + build: '1.0', + name: 'Test_Example', + namespace: 'com.example.testapp', + version: '1.0', + }, + device: { + id: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + manufacturer: 'Apple', + model: 'iPhone', + name: 'iPod touch (7th generation)', + type: 'iOS', + }, + library: { + name: 'test-ios-library', + version: '1.0.7', + }, + locale: 'en-US', + network: { + bluetooth: false, + carrier: 'unavailable', + cellular: false, + wifi: true, + }, + os: { + name: 'iOS', + version: '14.0', + }, + screen: { + density: 2, + height: 320, + width: 568, + }, + timezone: 'Asia/Kolkata', + traits: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + name: 'Test Name', + firstName: 'Test', + lastName: 'Name', + createdAt: '2020-09-30T19:11:00.337Z', + userId: 'test_user_id_1', + email: 'test_1@test.com', + phone: '9876543210', + key1: 'value1', + }, + userAgent: 'unknown', + }, + event: 'Test Event 2', + integrations: { + All: true, + }, + messageId: '1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8', + originalTimestamp: '2020-09-30T19:11:00.337Z', + receivedAt: '2020-10-01T00:41:11.369+05:30', + request_ip: '2405:201:8005:9856:7911:25e7:5603:5e18', + sentAt: '2020-09-30T19:11:10.382Z', + timestamp: '2020-10-01T00:41:01.324+05:30', + type: 'identify', + }, + metadata: { + jobId: 1, + }, + destination: { + Config: { + apiKey: 'intercomApiKey', + appId: '9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0', + collectContext: false, }, + }, }, + { + message: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + channel: 'mobile', + context: { + app: { + build: '1.0', + name: 'Test_Example', + namespace: 'com.example.testapp', + version: '1.0', + }, + device: { + id: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + manufacturer: 'Apple', + model: 'iPhone', + name: 'iPod touch (7th generation)', + type: 'iOS', + }, + library: { + name: 'test-ios-library', + version: '1.0.7', + }, + locale: 'en-US', + network: { + bluetooth: false, + carrier: 'unavailable', + cellular: false, + wifi: true, + }, + os: { + name: 'iOS', + version: '14.0', + }, + screen: { + density: 2, + height: 320, + width: 568, + }, + timezone: 'Asia/Kolkata', + traits: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + firstName: 'Test', + lastName: 'Name', + createdAt: '2020-09-30T19:11:00.337Z', + email: 'test_1@test.com', + phone: '9876543210', + key1: 'value1', + }, + userAgent: 'unknown', + }, + event: 'Test Event 2', + integrations: { + All: true, + }, + messageId: '1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8', + originalTimestamp: '2020-09-30T19:11:00.337Z', + receivedAt: '2020-10-01T00:41:11.369+05:30', + request_ip: '2405:201:8005:9856:7911:25e7:5603:5e18', + sentAt: '2020-09-30T19:11:10.382Z', + timestamp: '2020-10-01T00:41:01.324+05:30', + type: 'identify', + }, + metadata: { + jobId: 2, + }, + destination: { + Config: { + apiKey: 'intercomApiKey', + appId: '9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0', + collectContext: false, + }, + }, + }, + ], + destType: 'intercom', }, - output: { - response: { - status: 200, + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.intercom.io/users', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer intercomApiKey', + Accept: 'application/json', + 'Intercom-Version': '1.4', + }, + params: {}, body: { - output: [ - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.intercom.io/users", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer intercomApiKey", - "Accept": "application/json", - "Intercom-Version": "1.4" - }, - "params": {}, - "body": { - "JSON": { - "email": "test_1@test.com", - "phone": "9876543210", - "name": "Test Name", - "signed_up_at": 1601493060, - "last_seen_user_agent": "unknown", - "update_last_request_at": true, - "user_id": "test_user_id_1", - "custom_attributes": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "key1": "value1" - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33" - }, - "metadata": [ - { - "jobId": 1 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "apiKey": "intercomApiKey", - "appId": "9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0", - "collectContext": false - } - } - }, - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.intercom.io/users", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer intercomApiKey", - "Accept": "application/json", - "Intercom-Version": "1.4" - }, - "params": {}, - "body": { - "JSON": { - "email": "test_1@test.com", - "phone": "9876543210", - "signed_up_at": 1601493060, - "name": "Test Name", - "last_seen_user_agent": "unknown", - "update_last_request_at": true, - "custom_attributes": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "key1": "value1" - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33" - }, - "metadata": [ - { - "jobId": 2 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "apiKey": "intercomApiKey", - "appId": "9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0", - "collectContext": false - } - } - } - ], + JSON: { + email: 'test_1@test.com', + phone: '9876543210', + name: 'Test Name', + signed_up_at: 1601493060, + last_seen_user_agent: 'unknown', + update_last_request_at: true, + user_id: 'test_user_id_1', + custom_attributes: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + key1: 'value1', + }, + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + }, + metadata: [ + { + jobId: 1, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + apiKey: 'intercomApiKey', + appId: '9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0', + collectContext: false, + }, + }, + }, + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.intercom.io/users', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer intercomApiKey', + Accept: 'application/json', + 'Intercom-Version': '1.4', + }, + params: {}, + body: { + JSON: { + email: 'test_1@test.com', + phone: '9876543210', + signed_up_at: 1601493060, + name: 'Test Name', + last_seen_user_agent: 'unknown', + update_last_request_at: true, + custom_attributes: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + key1: 'value1', + }, + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + }, + metadata: [ + { + jobId: 2, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + apiKey: 'intercomApiKey', + appId: '9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0', + collectContext: false, }, + }, }, + ], }, + }, }, + }, ]; diff --git a/test/integrations/destinations/klaviyo/network.ts b/test/integrations/destinations/klaviyo/network.ts new file mode 100644 index 0000000000..aa788a60da --- /dev/null +++ b/test/integrations/destinations/klaviyo/network.ts @@ -0,0 +1,75 @@ +export const networkCallsData = [ + { + httpReq: { + url: 'https://a.klaviyo.com/api/v2/list/XUepkK/subscribe', + method: 'GET', + }, + httpRes: { + status: 200 + }, + }, + { + httpReq: { + url: 'https://a.klaviyo.com/api/v2/list/XUepkK/members', + method: 'GET', + }, + httpRes: { + status: 200 + }, + }, + { + httpReq: { + url: 'https://a.klaviyo.com/api/profiles', + method: 'GET', + data: { + attributes: { + email: "test3@rudderstack.com" + } + } + }, + httpRes: { + status: 409, + data: { + } + }, + }, + { + httpReq: { + url: 'https://a.klaviyo.com/api/profiles', + method: 'GET', + }, + httpRes: { + status: 201, + data: { + data: { + id: '01GW3PHVY0MTCDGS0A1612HARX', + attributes: {} + }, + } + }, + }, + { + httpReq: { + url: 'https://a.klaviyo.com/api/profiles', + method: 'POST', + headers: { Authorization: 'Klaviyo-API-Key dummyPrivateApiKeyforfailure' } + }, + httpRes: { + }, + }, + { + httpReq: { + url: 'https://a.klaviyo.com/api/profiles', + method: 'POST', + }, + httpRes: { + status: 201, + data: { + data: { + id: '01GW3PHVY0MTCDGS0A1612HARX', + attributes: {} + }, + } + }, + } +]; diff --git a/test/integrations/destinations/klaviyo/processor/data.ts b/test/integrations/destinations/klaviyo/processor/data.ts new file mode 100644 index 0000000000..2025957716 --- /dev/null +++ b/test/integrations/destinations/klaviyo/processor/data.ts @@ -0,0 +1,2430 @@ +export const data = [ + { + "name": "klaviyo", + "description": "Profile updating call and subscribe user (old transformer)", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "publicApiKey": "dummyPublicApiKey", + "privateApiKey": "dummyPrivateApiKey" + } + }, + "message": { + "type": "identify", + "sentAt": "2021-01-03T17:02:53.195Z", + "userId": "user@1", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.1.11", + "namespace": "com.rudderlabs.javascript" + }, + "traits": { + "firstName": "Test", + "lastName": "Rudderlabs", + "email": "test@rudderstack.com", + "phone": "+12 345 578 900", + "userId": "user@1", + "title": "Developer", + "organization": "Rudder", + "city": "Tokyo", + "region": "Kanto", + "country": "JP", + "zip": "100-0001", + "Flagged": false, + "Residence": "Shibuya", + "properties": { + "listId": "XUepkK", + "subscribe": true, + "consent": [ + "email", + "sms" + ] + } + }, + "locale": "en-US", + "screen": { + "density": 2 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.11" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" + }, + "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", + "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", + "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", + "integrations": { + "All": true + }, + "originalTimestamp": "2021-01-03T17:02:53.193Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": + { + "version": "1", + "type": "REST", + "userId": "", + "method": "PATCH", + "endpoint": "https://a.klaviyo.com/api/profiles/01GW3PHVY0MTCDGS0A1612HARX", + "headers": { + "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", + "Content-Type": "application/json", + "Accept": "application/json", + "revision": "2023-02-22" + }, + "params": {}, + "body": { + "JSON": { + "data": { + "type": "profile", + "attributes": { + "external_id": "user@1", + "email": "test@rudderstack.com", + "first_name": "Test", + "last_name": "Rudderlabs", + "phone_number": "+12 345 578 900", + "title": "Developer", + "organization": "Rudder", + "location": { + "city": "Tokyo", + "region": "Kanto", + "country": "JP", + "zip": "100-0001" + }, + "properties": { + "Flagged": false, + "Residence": "Shibuya" + } + }, + "id": "01GW3PHVY0MTCDGS0A1612HARX" + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {} + }, + "statusCode": 200 + }, { + "output": + { + "version": "1", + "type": "REST", + "method": "POST", + "userId": "", + "endpoint": "https://a.klaviyo.com/api/profile-subscription-bulk-create-jobs", + "headers": { + "Content-Type": "application/json", + "Accept": "application/json", + "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", + "revision": "2023-02-22" + }, + "params": {}, + "body": { + "JSON": { + "data": { + "type": "profile-subscription-bulk-create-job", + "attributes": { + "list_id": "XUepkK", + "subscriptions": [ + { + "email": "test@rudderstack.com", + "phone_number": "+12 345 578 900", + "channels": { + "email": [ + "MARKETING" + ], + "sms": [ + "MARKETING" + ] + } + } + ] + } + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {} + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "klaviyo", + "description": "Identify call for with flattenProperties enabled (old transformer)", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "publicApiKey": "dummyPublicApiKey", + "privateApiKey": "dummyPrivateApiKey", + "flattenProperties": true + } + }, + "message": { + "type": "identify", + "sentAt": "2021-01-03T17:02:53.195Z", + "userId": "user@1", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.1.11", + "namespace": "com.rudderlabs.javascript" + }, + "traits": { + "firstName": "Test", + "lastName": "Rudderlabs", + "email": "test@rudderstack.com", + "phone": "+12 345 578 900", + "userId": "user@1", + "title": "Developer", + "organization": "Rudder", + "city": "Tokyo", + "region": "Kanto", + "country": "JP", + "zip": "100-0001", + "Flagged": false, + "Residence": "Shibuya", + "friend": { + "names": { + "first": "Alice", + "last": "Smith" + }, + "age": 25 + }, + "properties": { + "listId": "XUepkK", + "subscribe": true, + "consent": [ + "email", + "sms" + ] + } + }, + "locale": "en-US", + "screen": { + "density": 2 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.11" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" + }, + "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", + "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", + "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", + "integrations": { + "All": true + }, + "originalTimestamp": "2021-01-03T17:02:53.193Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": + { + "version": "1", + "type": "REST", + "userId": "", + "method": "PATCH", + "endpoint": "https://a.klaviyo.com/api/profiles/01GW3PHVY0MTCDGS0A1612HARX", + "headers": { + "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", + "Content-Type": "application/json", + "Accept": "application/json", + "revision": "2023-02-22" + }, + "params": {}, + "body": { + "JSON": { + "data": { + "type": "profile", + "attributes": { + "external_id": "user@1", + "email": "test@rudderstack.com", + "first_name": "Test", + "last_name": "Rudderlabs", + "phone_number": "+12 345 578 900", + "title": "Developer", + "organization": "Rudder", + "location": { + "city": "Tokyo", + "region": "Kanto", + "country": "JP", + "zip": "100-0001" + }, + "properties": { + "friend.age": 25, + "friend.names.first": "Alice", + "friend.names.last": "Smith", + "Flagged": false, + "Residence": "Shibuya" + } + }, + "id": "01GW3PHVY0MTCDGS0A1612HARX" + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {} + }, + "statusCode": 200 + }, + { + "output": { + "version": "1", + "type": "REST", + "userId": "", + "method": "POST", + "endpoint": "https://a.klaviyo.com/api/profile-subscription-bulk-create-jobs", + "headers": { + "Content-Type": "application/json", + "Accept": "application/json", + "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", + "revision": "2023-02-22" + }, + "params": {}, + "body": { + "JSON": { + "data": { + "type": "profile-subscription-bulk-create-job", + "attributes": { + "list_id": "XUepkK", + "subscriptions": [ + { + "email": "test@rudderstack.com", + "phone_number": "+12 345 578 900", + "channels": { + "email": [ + "MARKETING" + ], + "sms": [ + "MARKETING" + ] + } + } + ] + } + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {} + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "klaviyo", + "description": "Profile updation call and subcribe user", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "publicApiKey": "dummyPublicApiKey", + "privateApiKey": "dummyPrivateApiKeyforfailure" + } + }, + "message": { + "type": "identify", + "sentAt": "2021-01-03T17:02:53.195Z", + "userId": "user@1", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.1.11", + "namespace": "com.rudderlabs.javascript" + }, + "traits": { + "firstName": "Test", + "lastName": "Rudderlabs", + "email": "test3@rudderstack.com", + "phone": "+12 345 578 900", + "userId": "user@1", + "title": "Developer", + "organization": "Rudder", + "city": "Tokyo", + "region": "Kanto", + "country": "JP", + "zip": "100-0001", + "Flagged": false, + "Residence": "Shibuya", + "properties": { + "listId": "XUepkK", + "subscribe": true, + "consent": [ + "email", + "sms" + ] + } + }, + "locale": "en-US", + "screen": { + "density": 2 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.11" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" + }, + "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", + "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", + "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", + "integrations": { + "All": true + }, + "originalTimestamp": "2021-01-03T17:02:53.193Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "{\"message\":\"Failed to create user due to \\\"\\\"\",\"destinationResponse\":\"\\\"\\\"\"}", + "statTags": { + "destType": "KLAVIYO", + "errorCategory": "network", + "errorType": "retryable", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 500 + } + ] + } + } + }, + { + "name": "klaviyo", + "description": "Profile updation call listId is not provided for subscribing the user", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "publicApiKey": "dummyPublicApiKey", + "privateApiKey": "dummyPrivateApiKey" + } + }, + "message": { + "type": "identify", + "sentAt": "2021-01-03T17:02:53.195Z", + "userId": "user@1", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.1.11", + "namespace": "com.rudderlabs.javascript" + }, + "traits": { + "firstName": "Test", + "lastName": "Rudderlabs", + "email": "test@rudderstack.com", + "phone": "+12 345 578 900", + "userId": "user@1", + "title": "Developer", + "organization": "Rudder", + "city": "Tokyo", + "region": "Kanto", + "country": "JP", + "zip": "100-0001", + "Flagged": false, + "Residence": "Shibuya", + "properties": { + "subscribe": false, + "consent": [ + "email", + "sms" + ] + } + }, + "locale": "en-US", + "screen": { + "density": 2 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.11" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" + }, + "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", + "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", + "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", + "integrations": { + "All": true + }, + "originalTimestamp": "2021-01-03T17:02:53.193Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "PATCH", + "endpoint": "https://a.klaviyo.com/api/profiles/01GW3PHVY0MTCDGS0A1612HARX", + "headers": { + "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", + "Content-Type": "application/json", + "Accept": "application/json", + "revision": "2023-02-22" + }, + "params": {}, + "body": { + "JSON": { + "data": { + "type": "profile", + "attributes": { + "external_id": "user@1", + "email": "test@rudderstack.com", + "first_name": "Test", + "last_name": "Rudderlabs", + "phone_number": "+12 345 578 900", + "title": "Developer", + "organization": "Rudder", + "location": { + "city": "Tokyo", + "region": "Kanto", + "country": "JP", + "zip": "100-0001" + }, + "properties": { + "Flagged": false, + "Residence": "Shibuya" + } + }, + "id": "01GW3PHVY0MTCDGS0A1612HARX" + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "klaviyo", + "description": "Identify call with enforceEmailAsPrimary enabled from UI", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "publicApiKey": "dummyPublicApiKey", + "privateApiKey": "dummyPrivateApiKey", + "enforceEmailAsPrimary": true + } + }, + "message": { + "type": "identify", + "sentAt": "2021-01-03T17:02:53.195Z", + "userId": "user@1", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.1.11", + "namespace": "com.rudderlabs.javascript" + }, + "traits": { + "firstName": "Test", + "lastName": "Rudderlabs", + "email": "test@rudderstack.com", + "phone": "+12 345 578 900", + "userId": "user@1", + "title": "Developer", + "organization": "Rudder", + "city": "Tokyo", + "region": "Kanto", + "country": "JP", + "zip": "100-0001", + "Flagged": false, + "Residence": "Shibuya", + "properties": { + "listId": "XUepkK", + "subscribe": true, + "consent": [ + "email", + "sms" + ] + } + }, + "locale": "en-US", + "screen": { + "density": 2 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.11" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" + }, + "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", + "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", + "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", + "integrations": { + "All": true + }, + "originalTimestamp": "2021-01-03T17:02:53.193Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": + { + "version": "1", + "type": "REST", + "userId": "", + "method": "PATCH", + "endpoint": "https://a.klaviyo.com/api/profiles/01GW3PHVY0MTCDGS0A1612HARX", + "headers": { + "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", + "Content-Type": "application/json", + "Accept": "application/json", + "revision": "2023-02-22" + }, + "params": {}, + "body": { + "JSON": { + "data": { + "type": "profile", + "attributes": { + "email": "test@rudderstack.com", + "first_name": "Test", + "last_name": "Rudderlabs", + "phone_number": "+12 345 578 900", + "title": "Developer", + "organization": "Rudder", + "location": { + "city": "Tokyo", + "region": "Kanto", + "country": "JP", + "zip": "100-0001" + }, + "properties": { + "Flagged": false, + "Residence": "Shibuya", + "_id": "user@1" + } + }, + "id": "01GW3PHVY0MTCDGS0A1612HARX" + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {} + }, + "statusCode": 200 + }, + { + "output": { + "version": "1", + "type": "REST", + "userId": "", + "method": "POST", + "endpoint": "https://a.klaviyo.com/api/profile-subscription-bulk-create-jobs", + "headers": { + "Content-Type": "application/json", + "Accept": "application/json", + "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", + "revision": "2023-02-22" + }, + "params": {}, + "body": { + "JSON": { + "data": { + "type": "profile-subscription-bulk-create-job", + "attributes": { + "list_id": "XUepkK", + "subscriptions": [ + { + "email": "test@rudderstack.com", + "phone_number": "+12 345 578 900", + "channels": { + "email": [ + "MARKETING" + ], + "sms": [ + "MARKETING" + ] + } + } + ] + } + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {} + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "klaviyo", + "description": "Identify call without user custom Properties", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "publicApiKey": "dummyPublicApiKey", + "privateApiKey": "dummyPrivateApiKey", + "enforceEmailAsPrimary": false + } + }, + "message": { + "type": "identify", + "sentAt": "2021-01-03T17:02:53.195Z", + "userId": "user@1", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.1.11", + "namespace": "com.rudderlabs.javascript" + }, + "traits": { + "firstName": "Test", + "lastName": "Rudderlabs", + "email": "test@rudderstack.com", + "phone": "+12 345 578 900", + "userId": "user@1", + "title": "Developer", + "organization": "Rudder", + "city": "Tokyo", + "region": "Kanto", + "country": "JP", + "zip": "100-0001", + "properties": { + "listId": "XUepkK", + "subscribe": true, + "consent": [ + "email", + "sms" + ] + } + }, + "locale": "en-US", + "screen": { + "density": 2 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.11" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" + }, + "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", + "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", + "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", + "integrations": { + "All": true + }, + "originalTimestamp": "2021-01-03T17:02:53.193Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "userId": "", + "method": "PATCH", + "endpoint": "https://a.klaviyo.com/api/profiles/01GW3PHVY0MTCDGS0A1612HARX", + "headers": { + "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", + "Content-Type": "application/json", + "Accept": "application/json", + "revision": "2023-02-22" + }, + "params": {}, + "body": { + "JSON": { + "data": { + "type": "profile", + "attributes": { + "email": "test@rudderstack.com", + "first_name": "Test", + "last_name": "Rudderlabs", + "phone_number": "+12 345 578 900", + "external_id": "user@1", + "title": "Developer", + "organization": "Rudder", + "location": { + "city": "Tokyo", + "region": "Kanto", + "country": "JP", + "zip": "100-0001" + } + }, + "id": "01GW3PHVY0MTCDGS0A1612HARX" + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {} + }, + "statusCode": 200 + }, + { + "output": { + "version": "1", + "type": "REST", + "userId": "", + "method": "POST", + "endpoint": "https://a.klaviyo.com/api/profile-subscription-bulk-create-jobs", + "headers": { + "Content-Type": "application/json", + "Accept": "application/json", + "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", + "revision": "2023-02-22" + }, + "params": {}, + "body": { + "JSON": { + "data": { + "type": "profile-subscription-bulk-create-job", + "attributes": { + "list_id": "XUepkK", + "subscriptions": [ + { + "email": "test@rudderstack.com", + "phone_number": "+12 345 578 900", + "channels": { + "email": [ + "MARKETING" + ], + "sms": [ + "MARKETING" + ] + } + } + ] + } + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {} + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "klaviyo", + "description": "Identify call without email and phone & enforceEmailAsPrimary enabled from UI", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "publicApiKey": "dummyPublicApiKey", + "privateApiKey": "dummyPrivateApiKey", + "enforceEmailAsPrimary": true + } + }, + "message": { + "type": "identify", + "sentAt": "2021-01-03T17:02:53.195Z", + "userId": "user@1", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.1.11", + "namespace": "com.rudderlabs.javascript" + }, + "traits": { + "firstName": "Test", + "lastName": "Rudderlabs", + "userId": "user@1", + "title": "Developer", + "organization": "Rudder", + "city": "Tokyo", + "region": "Kanto", + "country": "JP", + "zip": "100-0001", + "Flagged": false, + "Residence": "Shibuya", + "properties": { + "listId": "XUepkK", + "subscribe": true, + "consent": [ + "email", + "sms" + ] + } + }, + "locale": "en-US", + "screen": { + "density": 2 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.11" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" + }, + "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", + "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", + "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", + "integrations": { + "All": true + }, + "originalTimestamp": "2021-01-03T17:02:53.193Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "None of email and phone are present in the payload", + "statTags": { + "destType": "KLAVIYO", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "klaviyo", + "description": "Screen event call", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "publicApiKey": "dummyPublicApiKey", + "privateApiKey": "dummyPrivateApiKey" + } + }, + "message": { + "type": "screen", + "event": "TestEven001", + "sentAt": "2021-01-25T16:12:02.048Z", + "userId": "sajal12", + "channel": "mobile", + "context": { + "os": { + "name": "Android", + "version": "10" + }, + "app": { + "name": "KlaviyoTest", + "build": "1", + "version": "1.0", + "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" + }, + "device": { + "id": "9c6bd77ea9da3e68", + "name": "raphaelin", + "type": "android", + "model": "Redmi K20 Pro", + "manufacturer": "Xiaomi" + }, + "locale": "en-IN", + "screen": { + "width": 1080, + "height": 2210, + "density": 440 + }, + "traits": { + "id": "user@1", + "age": "22", + "email": "test@rudderstack.com", + "phone": "9112340375", + "anonymousId": "9c6bd77ea9da3e68" + }, + "library": { + "name": "com.rudderstack.android.sdk.core", + "version": "1.0.2" + }, + "network": { + "wifi": true, + "carrier": "airtel", + "cellular": true, + "bluetooth": false + }, + "timezone": "Asia/Kolkata", + "userAgent": "Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)" + }, + "rudderId": "b7b24f86-f7bf-46d8-b2b4-ccafc080239c", + "messageId": "1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce", + "properties": { + "PreviouslyVicePresident": true, + "YearElected": 1801, + "VicePresidents": [ + "Aaron Burr", + "George Clinton" + ] + }, + "anonymousId": "9c6bd77ea9da3e68", + "integrations": { + "All": true + }, + "originalTimestamp": "2021-01-25T15:32:56.409Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://a.klaviyo.com/api/events", + "headers": { + "Accept": "application/json", + "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", + "Content-Type": "application/json", + "revision": "2023-02-22" + }, + "params": {}, + "body": { + "JSON": { + "data": { + "type": "event", + "attributes": { + "metric": { + "name": "TestEven001" + }, + "properties": { + "PreviouslyVicePresident": true, + "YearElected": 1801, + "VicePresidents": [ + "Aaron Burr", + "George Clinton" + ] + }, + "profile": { + "$email": "test@rudderstack.com", + "$phone_number": "9112340375", + "$id": "sajal12", + "age": "22" + } + } + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "klaviyo", + "description": "Track event call with flatten properties enabled", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "publicApiKey": "dummyPublicApiKey", + "privateApiKey": "dummyPrivateApiKey", + "flattenProperties": true + } + }, + "message": { + "type": "track", + "event": "TestEven001", + "sentAt": "2021-01-25T16:12:02.048Z", + "userId": "sajal12", + "channel": "mobile", + "context": { + "os": { + "name": "Android", + "version": "10" + }, + "app": { + "name": "KlaviyoTest", + "build": "1", + "version": "1.0", + "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" + }, + "device": { + "id": "9c6bd77ea9da3e68", + "name": "raphaelin", + "type": "android", + "model": "Redmi K20 Pro", + "manufacturer": "Xiaomi" + }, + "locale": "en-IN", + "screen": { + "width": 1080, + "height": 2210, + "density": 440 + }, + "traits": { + "id": "user@1", + "age": "22", + "email": "test@rudderstack.com", + "phone": "9112340375", + "anonymousId": "9c6bd77ea9da3e68", + "plan_details": { + "plan_type": "gold", + "duration": "3 months" + } + }, + "library": { + "name": "com.rudderstack.android.sdk.core", + "version": "1.0.2" + }, + "network": { + "wifi": true, + "carrier": "airtel", + "cellular": true, + "bluetooth": false + }, + "timezone": "Asia/Kolkata", + "userAgent": "Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)" + }, + "rudderId": "b7b24f86-f7bf-46d8-b2b4-ccafc080239c", + "messageId": "1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce", + "properties": { + "vicePresdentInfo": { + "PreviouslVicePresident": true, + "YearElected": 1801, + "VicePresidents": [ + "AaronBurr", + "GeorgeClinton" + ] + } + }, + "anonymousId": "9c6bd77ea9da3e68", + "integrations": { + "All": true + }, + "originalTimestamp": "2021-01-25T15:32:56.409Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://a.klaviyo.com/api/events", + "headers": { + "Accept": "application/json", + "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", + "Content-Type": "application/json", + "revision": "2023-02-22" + }, + "params": {}, + "body": { + "JSON": { + "data": { + "type": "event", + "attributes": { + "metric": { + "name": "TestEven001" + }, + "properties": { + "vicePresdentInfo.PreviouslVicePresident": true, + "vicePresdentInfo.VicePresidents": [ + "AaronBurr", + "GeorgeClinton" + ], + "vicePresdentInfo.YearElected": 1801 + }, + "profile": { + "$email": "test@rudderstack.com", + "$phone_number": "9112340375", + "$id": "sajal12", + "age": "22", + "plan_details.plan_type": "gold", + "plan_details.duration": "3 months" + } + } + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "klaviyo", + "description": "Track event call", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "publicApiKey": "dummyPublicApiKey", + "privateApiKey": "dummyPrivateApiKey" + } + }, + "message": { + "type": "track", + "event": "TestEven002", + "sentAt": "2021-01-25T16:12:02.048Z", + "userId": "sajal12", + "channel": "mobile", + "context": { + "os": { + "name": "Android", + "version": "10" + }, + "app": { + "name": "KlaviyoTest", + "build": "1", + "version": "1.0", + "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" + }, + "device": { + "id": "9c6bd77ea9da3e68", + "name": "raphaelin", + "type": "android", + "model": "Redmi K20 Pro", + "manufacturer": "Xiaomi" + }, + "locale": "en-IN", + "screen": { + "width": 1080, + "height": 2210, + "density": 440 + }, + "traits": { + "id": "user@1", + "age": "22", + "name": "Test", + "email": "test@rudderstack.com", + "phone": "9112340375", + "anonymousId": "9c6bd77ea9da3e68", + "description": "Sample description" + }, + "library": { + "name": "com.rudderstack.android.sdk.core", + "version": "1.0.2" + }, + "network": { + "wifi": true, + "carrier": "airtel", + "cellular": true, + "bluetooth": false + }, + "timezone": "Asia/Kolkata", + "userAgent": "Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)" + }, + "rudderId": "b7b24f86-f7bf-46d8-b2b4-ccafc080239c", + "messageId": "1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce", + "properties": { + "PreviouslyVicePresident": true, + "YearElected": 1801, + "VicePresidents": [ + "Aaron Burr", + "George Clinton" + ], + "revenue": 3000 + }, + "anonymousId": "9c6bd77ea9da3e68", + "integrations": { + "All": true + }, + "originalTimestamp": "2021-01-25T15:32:56.409Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://a.klaviyo.com/api/events", + "headers": { + "Accept": "application/json", + "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", + "Content-Type": "application/json", + "revision": "2023-02-22" + }, + "params": {}, + "body": { + "JSON": { + "data": { + "type": "event", + "attributes": { + "metric": { + "name": "TestEven002" + }, + "properties": { + "PreviouslyVicePresident": true, + "YearElected": 1801, + "VicePresidents": [ + "Aaron Burr", + "George Clinton" + ] + }, + "profile": { + "$email": "test@rudderstack.com", + "$phone_number": "9112340375", + "$id": "sajal12", + "age": "22", + "name": "Test", + "description": "Sample description" + }, + "value": 3000 + } + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "klaviyo", + "description": "Track event call, with make email or phone as primary identifier toggle on", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "publicApiKey": "dummyPublicApiKey", + "privateApiKey": "dummyPrivateApiKey", + "enforceEmailAsPrimary": true + } + }, + "message": { + "type": "track", + "event": "TestEven001", + "sentAt": "2021-01-25T16:12:02.048Z", + "userId": "sajal12", + "channel": "mobile", + "context": { + "os": { + "name": "Android", + "version": "10" + }, + "app": { + "name": "KlaviyoTest", + "build": "1", + "version": "1.0", + "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" + }, + "device": { + "id": "9c6bd77ea9da3e68", + "name": "raphaelin", + "type": "android", + "model": "Redmi K20 Pro", + "manufacturer": "Xiaomi" + }, + "locale": "en-IN", + "screen": { + "width": 1080, + "height": 2210, + "density": 440 + }, + "traits": { + "id": "user@1", + "age": "22", + "email": "test@rudderstack.com", + "phone": "9112340375", + "anonymousId": "9c6bd77ea9da3e68" + }, + "library": { + "name": "com.rudderstack.android.sdk.core", + "version": "1.0.2" + }, + "network": { + "wifi": true, + "carrier": "airtel", + "cellular": true, + "bluetooth": false + }, + "timezone": "Asia/Kolkata", + "userAgent": "Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)" + }, + "rudderId": "b7b24f86-f7bf-46d8-b2b4-ccafc080239c", + "messageId": "1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce", + "properties": { + "PreviouslyVicePresident": true, + "YearElected": 1801, + "VicePresidents": [ + "Aaron Burr", + "George Clinton" + ] + }, + "anonymousId": "9c6bd77ea9da3e68", + "integrations": { + "All": true + }, + "originalTimestamp": "2021-01-25T15:32:56.409Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://a.klaviyo.com/api/events", + "headers": { + "Accept": "application/json", + "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", + "Content-Type": "application/json", + "revision": "2023-02-22" + }, + "params": {}, + "body": { + "JSON": { + "data": { + "type": "event", + "attributes": { + "metric": { + "name": "TestEven001" + }, + "properties": { + "PreviouslyVicePresident": true, + "YearElected": 1801, + "VicePresidents": [ + "Aaron Burr", + "George Clinton" + ] + }, + "profile": { + "$email": "test@rudderstack.com", + "$phone_number": "9112340375", + "age": "22", + "_id": "sajal12" + } + } + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "klaviyo", + "description": "Track event call, without email and phone & with (make email or phone as primary identifier) toggle on", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "publicApiKey": "dummyPublicApiKey", + "privateApiKey": "dummyPrivateApiKey", + "enforceEmailAsPrimary": true + } + }, + "message": { + "type": "track", + "event": "TestEven001", + "sentAt": "2021-01-25T16:12:02.048Z", + "userId": "sajal12", + "channel": "mobile", + "context": { + "os": { + "name": "Android", + "version": "10" + }, + "app": { + "name": "KlaviyoTest", + "build": "1", + "version": "1.0", + "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" + }, + "device": { + "id": "9c6bd77ea9da3e68", + "name": "raphaelin", + "type": "android", + "model": "Redmi K20 Pro", + "manufacturer": "Xiaomi" + }, + "locale": "en-IN", + "screen": { + "width": 1080, + "height": 2210, + "density": 440 + }, + "traits": { + "id": "user@1", + "age": "22", + "anonymousId": "9c6bd77ea9da3e68" + }, + "library": { + "name": "com.rudderstack.android.sdk.core", + "version": "1.0.2" + }, + "network": { + "wifi": true, + "carrier": "airtel", + "cellular": true, + "bluetooth": false + }, + "timezone": "Asia/Kolkata", + "userAgent": "Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)" + }, + "rudderId": "b7b24f86-f7bf-46d8-b2b4-ccafc080239c", + "messageId": "1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce", + "properties": { + "PreviouslyVicePresident": true, + "YearElected": 1801, + "VicePresidents": [ + "Aaron Burr", + "George Clinton" + ] + }, + "anonymousId": "9c6bd77ea9da3e68", + "integrations": { + "All": true + }, + "originalTimestamp": "2021-01-25T15:32:56.409Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "None of email and phone are present in the payload", + "statTags": { + "destType": "KLAVIYO", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "klaviyo", + "description": "group call", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "publicApiKey": "dummyPublicApiKey", + "privateApiKey": "dummyPrivateApiKey" + } + }, + "message": { + "userId": "user123", + "type": "group", + "groupId": "XUepkK", + "traits": { + "subscribe": true + }, + "context": { + "traits": { + "email": "test@rudderstack.com", + "phone": "+12 345 678 900", + "consent": [ + "email" + ] + }, + "ip": "14.5.67.21", + "library": { + "name": "http" + } + }, + "timestamp": "2020-01-21T00:21:34.208Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { "output": { "body": { "FORM": {}, "JSON": { "data": { "attributes": { "list_id": "XUepkK", "subscriptions": [{ "email": "test@rudderstack.com", "phone_number": "+12 345 678 900" }] }, "type": "profile-subscription-bulk-create-job" } }, "JSON_ARRAY": {}, "XML": {} }, "endpoint": "https://a.klaviyo.com/api/profile-subscription-bulk-create-jobs", "files": {}, "headers": { "Accept": "application/json", "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", "Content-Type": "application/json", "revision": "2023-02-22" }, "method": "POST", "params": {}, "type": "REST", "userId": "", "version": "1" }, "statusCode": 200 } + ] + } + } + }, + { + "name": "klaviyo", + "description": "group call without groupId", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "publicApiKey": "dummyPublicApiKey", + "privateApiKey": "dummyPrivateApiKey" + } + }, + "message": { + "userId": "user123", + "type": "group", + "groupId": "", + "traits": { + "subscribe": true + }, + "context": { + "traits": { + "email": "test@rudderstack.com", + "phone": "+12 345 678 900", + "consent": "email" + }, + "ip": "14.5.67.21", + "library": { + "name": "http" + } + }, + "timestamp": "2020-01-21T00:21:34.208Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "groupId is a required field for group events", + "statTags": { + "destType": "KLAVIYO", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "klaviyo", + "description": "[Error]: Check for unsupported message type", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "publicApiKey": "dummyPublicApiKey", + "privateApiKey": "dummyPrivateApiKey" + } + }, + "message": { + "userId": "user123", + "type": "random", + "groupId": "XUepkK", + "traits": { + "subscribe": true + }, + "context": { + "traits": { + "email": "test@rudderstack.com", + "phone": "+12 345 678 900", + "consent": "email" + }, + "ip": "14.5.67.21", + "library": { + "name": "http" + } + }, + "timestamp": "2020-01-21T00:21:34.208Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Event type random is not supported", + "statTags": { + "destType": "KLAVIYO", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "klaviyo", + "description": "Track call with Ecom events (Viewed Product)", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "publicApiKey": "dummyPublicApiKey", + "privateApiKey": "dummyPrivateApiKey" + } + }, + "message": { + "type": "track", + "event": "product viewed", + "sentAt": "2021-01-25T16:12:02.048Z", + "userId": "sajal12", + "channel": "mobile", + "context": { + "os": { + "name": "Android", + "version": "10" + }, + "app": { + "name": "KlaviyoTest", + "build": "1", + "version": "1.0", + "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" + }, + "device": { + "id": "9c6bd77ea9da3e68", + "name": "raphaelin", + "type": "android", + "model": "Redmi K20 Pro", + "manufacturer": "Xiaomi" + }, + "locale": "en-IN", + "screen": { + "width": 1080, + "height": 2210, + "density": 440 + }, + "traits": { + "id": "user@1", + "age": "22", + "name": "Test", + "email": "test@rudderstack.com", + "phone": "9112340375", + "anonymousId": "9c6bd77ea9da3e68", + "description": "Sample description" + }, + "library": { + "name": "com.rudderstack.android.sdk.core", + "version": "1.0.2" + }, + "network": { + "wifi": true, + "carrier": "airtel", + "cellular": true, + "bluetooth": false + }, + "timezone": "Asia/Kolkata", + "userAgent": "Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)" + }, + "rudderId": "b7b24f86-f7bf-46d8-b2b4-ccafc080239c", + "messageId": "1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce", + "properties": { + "name": "test product", + "product_id": "1114", + "sku": "WINNIePuh12", + "image_url": "http://www.example.com/path/to/product/image.png", + "url": "http://www.example.com/path/to/product", + "brand": "Not for Kids", + "price": 9.9, + "categories": [ + "Fiction", + "Children" + ] + }, + "anonymousId": "9c6bd77ea9da3e68", + "integrations": { + "All": true + }, + "originalTimestamp": "2021-01-25T15:32:56.409Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://a.klaviyo.com/api/events", + "headers": { + "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", + "Content-Type": "application/json", + "Accept": "application/json", + "revision": "2023-02-22" + }, + "params": {}, + "body": { + "JSON": { + "data": { + "type": "event", + "attributes": { + "metric": { + "name": "Viewed Product" + }, + "profile": { + "$email": "test@rudderstack.com", + "$phone_number": "9112340375", + "$id": "sajal12", + "age": "22", + "name": "Test", + "description": "Sample description" + }, + "properties": { + "ProductName": "test product", + "ProductID": "1114", + "SKU": "WINNIePuh12", + "ImageURL": "http://www.example.com/path/to/product/image.png", + "URL": "http://www.example.com/path/to/product", + "Brand": "Not for Kids", + "Price": 9.9, + "Categories": [ + "Fiction", + "Children" + ] + } + } + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "klaviyo", + "description": "Track call with Ecom events (Checkout Started) with enabled flattenProperties", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "publicApiKey": "dummyPublicApiKey", + "privateApiKey": "dummyPrivateApiKey", + "flattenProperties": true + } + }, + "message": { + "type": "track", + "event": "checkout started", + "sentAt": "2021-01-25T16:12:02.048Z", + "userId": "sajal12", + "channel": "mobile", + "context": { + "os": { + "name": "Android", + "version": "10" + }, + "app": { + "name": "KlaviyoTest", + "build": "1", + "version": "1.0", + "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" + }, + "device": { + "id": "9c6bd77ea9da3e68", + "name": "raphaelin", + "type": "android", + "model": "Redmi K20 Pro", + "manufacturer": "Xiaomi" + }, + "locale": "en-IN", + "screen": { + "width": 1080, + "height": 2210, + "density": 440 + }, + "traits": { + "id": "user@1", + "age": "22", + "name": "Test", + "email": "test@rudderstack.com", + "phone": "9112340375", + "anonymousId": "9c6bd77ea9da3e68", + "description": "Sample description" + }, + "library": { + "name": "com.rudderstack.android.sdk.core", + "version": "1.0.2" + }, + "network": { + "wifi": true, + "carrier": "airtel", + "cellular": true, + "bluetooth": false + }, + "timezone": "Asia/Kolkata", + "userAgent": "Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)" + }, + "rudderId": "b7b24f86-f7bf-46d8-b2b4-ccafc080239c", + "messageId": "1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce", + "properties": { + "order_id": "1234", + "affiliation": "Apple Store", + "value": 20, + "revenue": 15, + "shipping": 4, + "tax": 1, + "discount": 1.5, + "coupon": "ImagePro", + "currency": "USD", + "products": [ + { + "product_id": "123", + "sku": "G-32", + "name": "Monopoly", + "price": 14, + "quantity": 1, + "category": "Games", + "url": "https://www.website.com/product/path", + "image_url": "https://www.website.com/product/path.jpg" + }, + { + "product_id": "345", + "sku": "F-32", + "name": "UNO", + "price": 3.45, + "quantity": 2, + "category": "Games" + } + ] + }, + "anonymousId": "9c6bd77ea9da3e68", + "integrations": { + "All": true + }, + "originalTimestamp": "2021-01-25T15:32:56.409Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://a.klaviyo.com/api/events", + "headers": { + "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", + "Content-Type": "application/json", + "Accept": "application/json", + "revision": "2023-02-22" + }, + "params": {}, + "body": { + "JSON": { + "data": { + "type": "event", + "attributes": { + "metric": { + "name": "Started Checkout" + }, + "properties": { + "$event_id": "1234", + "$value": 20, + "items[0].ProductID": "123", + "items[0].SKU": "G-32", + "items[0].ProductName": "Monopoly", + "items[0].Quantity": 1, + "items[0].ItemPrice": 14, + "items[0].ProductURL": "https://www.website.com/product/path", + "items[0].ImageURL": "https://www.website.com/product/path.jpg", + "items[1].ProductID": "345", + "items[1].SKU": "F-32", + "items[1].ProductName": "UNO", + "items[1].Quantity": 2, + "items[1].ItemPrice": 3.45 + }, + "profile": { + "$email": "test@rudderstack.com", + "$phone_number": "9112340375", + "$id": "sajal12", + "age": "22", + "name": "Test", + "description": "Sample description" + } + } + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "klaviyo", + "description": "Track call with Ecom events (Added to Cart) with properties.products", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "publicApiKey": "dummyPublicApiKey", + "privateApiKey": "dummyPrivateApiKey" + } + }, + "message": { + "type": "track", + "event": "product added", + "sentAt": "2021-01-25T16:12:02.048Z", + "userId": "sajal12", + "channel": "mobile", + "context": { + "os": { + "name": "Android", + "version": "10" + }, + "app": { + "name": "KlaviyoTest", + "build": "1", + "version": "1.0", + "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" + }, + "device": { + "id": "9c6bd77ea9da3e68", + "name": "raphaelin", + "type": "android", + "model": "Redmi K20 Pro", + "manufacturer": "Xiaomi" + }, + "locale": "en-IN", + "screen": { + "width": 1080, + "height": 2210, + "density": 440 + }, + "traits": { + "id": "user@1", + "age": "22", + "name": "Test", + "email": "test@rudderstack.com", + "phone": "9112340375", + "anonymousId": "9c6bd77ea9da3e68", + "description": "Sample description" + }, + "library": { + "name": "com.rudderstack.android.sdk.core", + "version": "1.0.2" + }, + "network": { + "wifi": true, + "carrier": "airtel", + "cellular": true, + "bluetooth": false + }, + "timezone": "Asia/Kolkata", + "userAgent": "Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)" + }, + "rudderId": "b7b24f86-f7bf-46d8-b2b4-ccafc080239c", + "messageId": "1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce", + "properties": { + "order_id": "1234", + "value": 12.12, + "categories": [ + "Fiction3", + "Children3" + ], + "checkout_url": "http://www.heythere.com", + "item_names": [ + "book1", + "book2" + ], + "products": [ + { + "product_id": "b1pid", + "sku": "123x", + "name": "book1", + "url": "heyther.com", + "price": 12 + }, + { + "product_id": "b2pid", + "sku": "123x", + "name": "book2", + "url": "heyther2.com", + "price": 14 + } + ] + }, + "anonymousId": "9c6bd77ea9da3e68", + "integrations": { + "All": true + }, + "originalTimestamp": "2021-01-25T15:32:56.409Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://a.klaviyo.com/api/events", + "headers": { + "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", + "Content-Type": "application/json", + "Accept": "application/json", + "revision": "2023-02-22" + }, + "params": {}, + "body": { + "JSON": { + "data": { + "type": "event", + "attributes": { + "metric": { + "name": "Added to Cart" + }, + "profile": { + "$email": "test@rudderstack.com", + "$phone_number": "9112340375", + "$id": "sajal12", + "age": "22", + "name": "Test", + "description": "Sample description" + }, + "properties": { + "$value": 12.12, + "AddedItemCategories": [ + "Fiction3", + "Children3" + ], + "ItemNames": [ + "book1", + "book2" + ], + "CheckoutURL": "http://www.heythere.com", + "items": [ + { + "ProductID": "b1pid", + "SKU": "123x", + "ProductName": "book1", + "ItemPrice": 12, + "ProductURL": "heyther.com" + }, + { + "ProductID": "b2pid", + "SKU": "123x", + "ProductName": "book2", + "ItemPrice": 14, + "ProductURL": "heyther2.com" + } + ] + } + } + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + } +] \ No newline at end of file diff --git a/test/integrations/destinations/klaviyo/router/data.ts b/test/integrations/destinations/klaviyo/router/data.ts new file mode 100644 index 0000000000..0fb735d6bf --- /dev/null +++ b/test/integrations/destinations/klaviyo/router/data.ts @@ -0,0 +1,464 @@ +export const data = [ + { + name: 'klaviyo', + description: 'Test 0', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + destination: { + Config: { + publicApiKey: 'dummyPublicApiKey', + privateApiKey: 'dummyPrivateApiKey', + }, + }, + metadata: { + jobId: 1, + }, + message: { + type: 'identify', + sentAt: '2021-01-03T17:02:53.195Z', + userId: 'test', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + traits: { + firstName: 'Test', + lastName: 'Rudderlabs', + email: 'test@rudderstack.com', + phone: '+12 345 578 900', + userId: 'Testc', + title: 'Developer', + organization: 'Rudder', + city: 'Tokyo', + region: 'Kanto', + country: 'JP', + zip: '100-0001', + Flagged: false, + Residence: 'Shibuya', + properties: { + consent: ['email', 'sms'], + }, + }, + locale: 'en-US', + screen: { + density: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + integrations: { + All: true, + }, + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + }, + { + destination: { + Config: { + publicApiKey: 'dummyPublicApiKey', + privateApiKey: 'dummyPrivateApiKey', + }, + }, + metadata: { + jobId: 2, + }, + message: { + type: 'identify', + sentAt: '2021-01-03T17:02:53.195Z', + userId: 'test', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + traits: { + firstName: 'Test', + lastName: 'Rudderlabs', + email: 'test@rudderstack.com', + phone: '+12 345 578 900', + userId: 'test', + title: 'Developer', + organization: 'Rudder', + city: 'Tokyo', + region: 'Kanto', + country: 'JP', + zip: '100-0001', + Flagged: false, + Residence: 'Shibuya', + properties: { + listId: 'XUepkK', + subscribe: true, + consent: ['email', 'sms'], + }, + }, + locale: 'en-US', + screen: { + density: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + integrations: { + All: true, + }, + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + }, + { + destination: { + Config: { + publicApiKey: 'dummyPublicApiKey', + privateApiKey: 'dummyPrivateApiKey', + }, + }, + metadata: { + jobId: 3, + }, + message: { + userId: 'user123', + type: 'group', + groupId: 'XUepkK', + traits: { + subscribe: true, + }, + context: { + traits: { + email: 'test@rudderstack.com', + phone: '+12 345 678 900', + consent: ['email'], + }, + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-01-21T00:21:34.208Z', + }, + }, + { + destination: { + Config: { + publicApiKey: 'dummyPublicApiKey', + privateApiKey: 'dummyPrivateApiKey', + }, + }, + metadata: { + jobId: 4, + }, + message: { + userId: 'user123', + type: 'random', + groupId: 'XUepkK', + traits: { + subscribe: true, + }, + context: { + traits: { + email: 'test@rudderstack.com', + phone: '+12 345 678 900', + consent: 'email', + }, + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-01-21T00:21:34.208Z', + }, + }, + { + destination: { + Config: { + publicApiKey: 'dummyPublicApiKey', + privateApiKey: 'dummyPrivateApiKey', + }, + }, + metadata: { + jobId: 5, + }, + message: { + userId: 'user123', + type: 'group', + groupId: '', + traits: { + subscribe: true, + }, + context: { + traits: { + email: 'test@rudderstack.com', + phone: '+12 345 678 900', + consent: 'email', + }, + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-01-21T00:21:34.208Z', + }, + }, + ], + destType: 'klaviyo', + }, + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: [ + { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://a.klaviyo.com/api/profile-subscription-bulk-create-jobs', + headers: { + Authorization: 'Klaviyo-API-Key dummyPrivateApiKey', + 'Content-Type': 'application/json', + Accept: 'application/json', + revision: '2023-02-22', + }, + params: {}, + body: { + JSON: { + data: { + type: 'profile-subscription-bulk-create-job', + attributes: { + list_id: 'XUepkK', + subscriptions: [ + { + email: 'test@rudderstack.com', + phone_number: '+12 345 678 900', + }, + { + email: 'test@rudderstack.com', + phone_number: '+12 345 578 900', + channels: { + email: ['MARKETING'], + sms: ['MARKETING'], + }, + }, + ], + }, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + { + version: '1', + type: 'REST', + method: 'PATCH', + endpoint: 'https://a.klaviyo.com/api/profiles/01GW3PHVY0MTCDGS0A1612HARX', + headers: { + Authorization: 'Klaviyo-API-Key dummyPrivateApiKey', + 'Content-Type': 'application/json', + Accept: 'application/json', + revision: '2023-02-22', + }, + params: {}, + body: { + JSON: { + data: { + type: 'profile', + attributes: { + external_id: 'test', + email: 'test@rudderstack.com', + first_name: 'Test', + last_name: 'Rudderlabs', + phone_number: '+12 345 578 900', + title: 'Developer', + organization: 'Rudder', + location: { + city: 'Tokyo', + region: 'Kanto', + country: 'JP', + zip: '100-0001', + }, + properties: { + Flagged: false, + Residence: 'Shibuya', + }, + }, + id: '01GW3PHVY0MTCDGS0A1612HARX', + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + ], + metadata: [ + { + jobId: 3, + }, + { + jobId: 2, + }, + ], + batched: true, + statusCode: 200, + destination: { + Config: { + publicApiKey: 'dummyPublicApiKey', + privateApiKey: 'dummyPrivateApiKey', + }, + }, + }, + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'PATCH', + endpoint: 'https://a.klaviyo.com/api/profiles/01GW3PHVY0MTCDGS0A1612HARX', + headers: { + Authorization: 'Klaviyo-API-Key dummyPrivateApiKey', + 'Content-Type': 'application/json', + Accept: 'application/json', + revision: '2023-02-22', + }, + params: {}, + body: { + JSON: { + data: { + type: 'profile', + attributes: { + external_id: 'test', + email: 'test@rudderstack.com', + first_name: 'Test', + last_name: 'Rudderlabs', + phone_number: '+12 345 578 900', + title: 'Developer', + organization: 'Rudder', + location: { + city: 'Tokyo', + region: 'Kanto', + country: 'JP', + zip: '100-0001', + }, + properties: { + Flagged: false, + Residence: 'Shibuya', + }, + }, + id: '01GW3PHVY0MTCDGS0A1612HARX', + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + metadata: [ + { + jobId: 1, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + publicApiKey: 'dummyPublicApiKey', + privateApiKey: 'dummyPrivateApiKey', + }, + }, + }, + { + metadata: [ + { + jobId: 4, + }, + ], + batched: false, + statusCode: 400, + error: 'Event type random is not supported', + statTags: { + destType: 'KLAVIYO', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'router', + implementation: 'native', + module: 'destination', + }, + destination: { + Config: { + publicApiKey: 'dummyPublicApiKey', + privateApiKey: 'dummyPrivateApiKey', + }, + }, + }, + { + metadata: [ + { + jobId: 5, + }, + ], + batched: false, + statusCode: 400, + error: 'groupId is a required field for group events', + statTags: { + destType: 'KLAVIYO', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'router', + implementation: 'native', + module: 'destination', + }, + destination: { + Config: { + publicApiKey: 'dummyPublicApiKey', + privateApiKey: 'dummyPrivateApiKey', + }, + }, + }, + ], + }, + }, + }, + }, +]; diff --git a/test/integrations/destinations/kustomer/network.ts b/test/integrations/destinations/kustomer/network.ts new file mode 100644 index 0000000000..527b47ce2f --- /dev/null +++ b/test/integrations/destinations/kustomer/network.ts @@ -0,0 +1,423 @@ +export const networkCallsData = [ + { + httpReq: { + url: 'https://api.kustomerapp.com/v1/customers/externalId=annodD', + method: 'GET', + }, + httpRes: { + data: { + data: { + type: 'customer', + id: '58210c3db0f09110006b7953', + attributes: { + name: 'AnnoD', + displayName: 'AnnoD', + displayColor: 'yellow', + displayIcon: 'flower', + externalId: 'annodD', + externalIds: [ + { + externalId: 'annodD', + verified: true, + id: null, + }, + ], + sharedExternalIds: [], + signedUpAt: null, + avatarUrl: null, + username: null, + emails: [ + { + email: 'annod@kustomer.com', + verified: true, + type: 'home', + id: null, + }, + ], + sharedEmails: [ + { + email: 'annod@kustomer.com', + verified: false, + type: 'home', + id: null, + }, + ], + phones: [], + sharedPhones: [], + socials: [], + sharedSocials: [], + urls: [], + locations: [], + activeUsers: [], + watchers: [], + recentLocation: { + updatedAt: '2016-11-07T23:22:01.746Z', + }, + locale: null, + timeZone: null, + birthdayAt: null, + gender: null, + presence: 'offline', + createdAt: '2016-11-07T23:20:29.080Z', + updatedAt: '2016-11-09T04:47:07.036Z', + modifiedAt: '2016-11-09T04:47:07.036Z', + lastSeenAt: '2016-11-07T23:23:51.582Z', + lastActivityAt: '2016-11-09T04:47:07.036Z', + lastCustomerActivityAt: '2016-11-07T23:23:51.582Z', + lastMessageIn: { + sentAt: '2016-11-07T23:22:02.281Z', + sentiment: null, + }, + lastConversation: { + id: '58210c99b0f09110006b7969', + sentiment: { + confidence: 0.649023, + polarity: 1, + }, + tags: [], + }, + conversationCounts: { + all: 3, + snoozed: 0, + open: 2, + done: 1, + }, + preview: { + previewAt: '2016-11-07T23:23:26.039Z', + type: 'message_out', + text: 'dfsd fsdsfdsfdsf', + subject: 'Hi, do you guys have an XXL hoodie', + }, + tags: [], + sentiment: { + polarity: 1, + confidence: 0.649023, + }, + progressiveStatus: 'open', + verified: true, + rev: 37, + }, + relationships: { + org: { + links: { + self: '/v1/orgs/57f29863a1dbf61100e6aa92', + }, + data: { + type: 'org', + id: '57f29863a1dbf61100e6aa92', + }, + }, + messages: { + links: { + self: '/v1/customers/58210c3db0f09110006b7953/messages', + }, + }, + modifiedBy: { + links: { + self: '/v1/users/58190b991f2932100010d683', + }, + data: { + type: 'user', + id: '58190b991f2932100010d683', + }, + }, + }, + links: { + self: '/v1/customers/58210c3db0f09110006b7953', + }, + }, + }, + status: 200, + }, + }, + { + httpReq: { + url: 'https://api.kustomerapp.com/v1/customers/externalId=58210c3db0f09110006b7953', + method: 'GET', + }, + httpRes: { + data: { + data: { + type: 'customer', + id: '58210c3db0f09110006b7953', + attributes: { + name: 'AnnoD', + displayName: 'AnnoD', + displayColor: 'yellow', + displayIcon: 'flower', + externalId: 'annodD', + externalIds: [ + { + externalId: 'annodD', + verified: true, + id: null, + }, + ], + sharedExternalIds: [], + signedUpAt: null, + avatarUrl: null, + username: null, + emails: [ + { + email: 'annod@kustomer.com', + verified: true, + type: 'home', + id: null, + }, + ], + sharedEmails: [ + { + email: 'annod@kustomer.com', + verified: false, + type: 'home', + id: null, + }, + ], + phones: [], + sharedPhones: [], + socials: [], + sharedSocials: [], + urls: [], + locations: [], + activeUsers: [], + watchers: [], + recentLocation: { + updatedAt: '2016-11-07T23:22:01.746Z', + }, + locale: null, + timeZone: null, + birthdayAt: null, + gender: null, + presence: 'offline', + createdAt: '2016-11-07T23:20:29.080Z', + updatedAt: '2016-11-09T04:47:07.036Z', + modifiedAt: '2016-11-09T04:47:07.036Z', + lastSeenAt: '2016-11-07T23:23:51.582Z', + lastActivityAt: '2016-11-09T04:47:07.036Z', + lastCustomerActivityAt: '2016-11-07T23:23:51.582Z', + lastMessageIn: { + sentAt: '2016-11-07T23:22:02.281Z', + sentiment: null, + }, + lastConversation: { + id: '58210c99b0f09110006b7969', + sentiment: { + confidence: 0.649023, + polarity: 1, + }, + tags: [], + }, + conversationCounts: { + all: 3, + snoozed: 0, + open: 2, + done: 1, + }, + preview: { + previewAt: '2016-11-07T23:23:26.039Z', + type: 'message_out', + text: 'dfsd fsdsfdsfdsf', + subject: 'Hi, do you guys have an XXL hoodie', + }, + tags: [], + sentiment: { + polarity: 1, + confidence: 0.649023, + }, + progressiveStatus: 'open', + verified: true, + rev: 37, + }, + relationships: { + org: { + links: { + self: '/v1/orgs/57f29863a1dbf61100e6aa92', + }, + data: { + type: 'org', + id: '57f29863a1dbf61100e6aa92', + }, + }, + messages: { + links: { + self: '/v1/customers/58210c3db0f09110006b7953/messages', + }, + }, + modifiedBy: { + links: { + self: '/v1/users/58190b991f2932100010d683', + }, + data: { + type: 'user', + id: '58190b991f2932100010d683', + }, + }, + }, + links: { + self: '/v1/customers/58210c3db0f09110006b7953', + }, + }, + }, + status: 200, + }, + }, + { + httpReq: { + url: 'https://api.prod2.kustomerapp.com/v1/customers/externalId=58210c3db0f09110006b7953', + method: 'GET', + }, + httpRes: { + data: { + data: { + type: 'customer', + id: '58210c3db0f09110006b7953', + attributes: { + name: 'AnnoD', + displayName: 'AnnoD', + displayColor: 'yellow', + displayIcon: 'flower', + externalId: 'annodD', + externalIds: [ + { + externalId: 'annodD', + verified: true, + id: null, + }, + ], + sharedExternalIds: [], + signedUpAt: null, + avatarUrl: null, + username: null, + emails: [ + { + email: 'annod@kustomer.com', + verified: true, + type: 'home', + id: null, + }, + ], + sharedEmails: [ + { + email: 'annod@kustomer.com', + verified: false, + type: 'home', + id: null, + }, + ], + phones: [], + sharedPhones: [], + socials: [], + sharedSocials: [], + urls: [], + locations: [], + activeUsers: [], + watchers: [], + recentLocation: { + updatedAt: '2016-11-07T23:22:01.746Z', + }, + locale: null, + timeZone: null, + birthdayAt: null, + gender: null, + presence: 'offline', + createdAt: '2016-11-07T23:20:29.080Z', + updatedAt: '2016-11-09T04:47:07.036Z', + modifiedAt: '2016-11-09T04:47:07.036Z', + lastSeenAt: '2016-11-07T23:23:51.582Z', + lastActivityAt: '2016-11-09T04:47:07.036Z', + lastCustomerActivityAt: '2016-11-07T23:23:51.582Z', + lastMessageIn: { + sentAt: '2016-11-07T23:22:02.281Z', + sentiment: null, + }, + lastConversation: { + id: '58210c99b0f09110006b7969', + sentiment: { + confidence: 0.649023, + polarity: 1, + }, + tags: [], + }, + conversationCounts: { + all: 3, + snoozed: 0, + open: 2, + done: 1, + }, + preview: { + previewAt: '2016-11-07T23:23:26.039Z', + type: 'message_out', + text: 'dfsd fsdsfdsfdsf', + subject: 'Hi, do you guys have an XXL hoodie', + }, + tags: [], + sentiment: { + polarity: 1, + confidence: 0.649023, + }, + progressiveStatus: 'open', + verified: true, + rev: 37, + }, + relationships: { + org: { + links: { + self: '/v1/orgs/57f29863a1dbf61100e6aa92', + }, + data: { + type: 'org', + id: '57f29863a1dbf61100e6aa92', + }, + }, + messages: { + links: { + self: '/v1/customers/58210c3db0f09110006b7953/messages', + }, + }, + modifiedBy: { + links: { + self: '/v1/users/58190b991f2932100010d683', + }, + data: { + type: 'user', + id: '58190b991f2932100010d683', + }, + }, + }, + links: { + self: '/v1/customers/58210c3db0f09110006b7953', + }, + }, + }, + status: 204, + }, + }, + { + httpReq: { + url: 'https://api.kustomerapp.com/v1/customers/externalId=Testc', + method: 'GET', + }, + httpRes: { error: 'Request failed', status: 404 }, + }, + { + httpReq: { + url: 'https://api.kustomerapp.com/v1/customers/email=test@rudderstack.com', + method: 'GET', + }, + httpRes: { error: 'Request failed', status: 404 }, + }, + { + httpReq: { + url: 'https://api.kustomerapp.com/v1/customers/externalId=97c46c81-3140-456d-b2a9-690d70aaca35', + method: 'GET', + }, + httpRes: { error: 'Request failed', status: 404 }, + }, + { + httpReq: { + url: 'https://api.kustomerapp.com/v1/customers/externalId=testc', + method: 'GET', + }, + httpRes: { error: 'Request failed', status: 404 }, + }, +]; diff --git a/test/integrations/destinations/kustomer/processor/data.ts b/test/integrations/destinations/kustomer/processor/data.ts new file mode 100644 index 0000000000..ba8407baaf --- /dev/null +++ b/test/integrations/destinations/kustomer/processor/data.ts @@ -0,0 +1,1901 @@ +export const data = [ + { + name: 'kustomer', + description: 'Test 0', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'dummyApiKey', + }, + }, + message: { + type: 'identify', + sentAt: '2021-01-03T17:02:53.195Z', + userId: 'Testc', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + traits: { + name: 'Test Rudderlabs', + email: 'test@rudderstack.com', + phone: '+12345578900', + birthday: '2005-01-01T23:28:56.782Z', + userId: 'Testc', + address: { + street: '24 Dovers Lane', + city: 'Miami', + state: 'Florida', + postalCode: '1890001', + }, + userName: 'Testc47', + company: 'Rudderstack', + createdAt: '2015-04-17T12:37:42.146Z', + lastActivityAt: '2016-04-17T12:37:42.146Z', + lastCustomerActivityAt: '2017-04-17T12:37:42.146Z', + lastSeenAt: '2017-04-17T12:37:42.146Z', + avatar: 'https://homepages.cae.wisc.edu/~ece533/images/boat.png', + gender: 'm', + tags: ['happy', 'satisfied'], + website: 'www.mattertoast873.com', + socials: [ + { + verified: true, + userid: '100', + type: 'twitter', + username: '@Testc', + url: 'http://twitter.com/Testc', + }, + { + verified: false, + userid: '200', + type: 'facebook', + username: 'Testc', + url: 'http://facebook.com/Testc', + }, + ], + }, + locale: 'en-US', + screen: { + density: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + integrations: { + All: true, + }, + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.kustomerapp.com/v1/customers', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + name: 'Test Rudderlabs', + externalId: 'Testc', + username: 'Testc47', + company: 'Rudderstack', + signedUpAt: '2015-04-17T12:37:42.146Z', + lastActivityAt: '2016-04-17T12:37:42.146Z', + lastCustomerActivityAt: '2017-04-17T12:37:42.146Z', + lastSeenAt: '2017-04-17T12:37:42.146Z', + avatarUrl: 'https://homepages.cae.wisc.edu/~ece533/images/boat.png', + gender: 'm', + tags: ['happy', 'satisfied'], + locale: 'en-US', + socials: [ + { + verified: true, + userid: '100', + type: 'twitter', + username: '@Testc', + url: 'http://twitter.com/Testc', + }, + { + verified: false, + userid: '200', + type: 'facebook', + username: 'Testc', + url: 'http://facebook.com/Testc', + }, + ], + birthdayAt: '2005-01-01T23:28:56.782Z', + emails: [ + { + type: 'home', + email: 'test@rudderstack.com', + }, + ], + phones: [ + { + type: 'home', + phone: '+12345578900', + }, + ], + urls: [ + { + url: 'www.mattertoast873.com', + }, + ], + locations: [ + { + type: 'home', + address: '24 Dovers Lane Miami Florida 1890001', + }, + ], + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'kustomer', + description: 'Test 1', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'dummyApiKey', + }, + }, + message: { + type: 'identify', + sentAt: '2021-01-03T17:02:53.195Z', + channel: 'web', + userId: '58210c3db0f09110006b7953', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + traits: { + name: 'Ano Domeni', + phone: '+12345578000', + birthday: '2005-01-01T23:28:56.782Z', + }, + locale: 'en-US', + screen: { + density: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + integrations: { + All: true, + }, + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'PUT', + endpoint: + 'https://api.kustomerapp.com/v1/customers/58210c3db0f09110006b7953?replace=false', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + name: 'Ano Domeni', + externalId: '58210c3db0f09110006b7953', + locale: 'en-US', + birthdayAt: '2005-01-01T23:28:56.782Z', + phones: [ + { + type: 'home', + phone: '+12345578000', + }, + ], + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'kustomer', + description: 'Test 2', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'dummyApiKey', + }, + }, + message: { + type: 'screen', + event: 'Test-Event-Screen', + sentAt: '2021-01-25T16:12:02.048Z', + userId: 'Testc', + channel: 'mobile', + context: { + os: { + name: 'Android', + version: '10', + }, + app: { + name: 'KlaviyoTest', + build: '1', + version: '1.0', + namespace: 'com.rudderstack.android.rudderstack.sampleAndroidApp', + }, + device: { + id: '9c6bd77ea9da3e68', + name: 'raphaelin', + type: 'android', + model: 'Redmi K20 Pro', + manufacturer: 'Xiaomi', + }, + locale: 'en-IN', + screen: { + width: 1080, + height: 2210, + density: 440, + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.2', + }, + network: { + wifi: true, + carrier: 'airtel', + cellular: true, + bluetooth: false, + }, + timezone: 'Asia/Kolkata', + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)', + }, + rudderId: 'b7b24f86-f7bf-46d8-b2b4-ccafc080239c', + messageId: '1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce', + properties: { + hasAccount: 'true', + YearSelectedNum: 1801, + originalServing: '2021-01-25T15:32:56.409Z', + }, + anonymousId: '9c6bd77ea9da3e68', + integrations: { + All: true, + }, + originalTimestamp: '2021-01-25T15:32:56.409Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.kustomerapp.com/v1/tracking/identityEvent', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + identity: { + externalId: 'Testc', + }, + event: { + name: 'Screen-Viewed-Test-Event-Screen', + meta: { + hasAccount: 'true', + YearSelectedNum: 1801, + originalServing: '2021-01-25T15:32:56.409Z', + }, + }, + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'kustomer', + description: 'Test 3', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'dummyApiKey', + }, + }, + message: { + name: 'Cart-Viewed', + type: 'page', + sentAt: '2021-01-03T17:02:53.197Z', + userId: 'user@doe', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + page: { + url: 'http://morkey.in', + path: '/cart', + title: 'miphone', + search: 'MI', + referrer: 'morkey', + }, + locale: 'en-US', + screen: { + density: 2, + }, + traits: { + userId: 'userid', + profession: 'Student', + anonymousId: 'd80b66d5-b33d-412d-866f-r4fft5841af', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + category: 'Cart', + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '15129730-eb00-4db7-8db2-799566ccb2ef', + properties: { + url: 'http://morkey.in', + name: 'Cart Viewed', + path: '/cart', + title: 'miphone', + search: 'MI', + category: 'Cart', + referrer: 'morkey', + domain: 'morkey.com', + }, + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + integrations: { + All: true, + }, + originalTimestamp: '2021-01-03T17:02:53.195Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.kustomerapp.com/v1/tracking/identityEvent', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + identity: { + externalId: 'user@doe', + }, + event: { + name: 'Web-Page-Viewed-Cart-Viewed', + meta: { + url: 'http://morkey.in', + name: 'Cart Viewed', + path: '/cart', + title: 'miphone', + search: 'MI', + category: 'Cart', + referrer: 'morkey', + domain: 'morkey.com', + }, + }, + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'kustomer', + description: 'Test 4', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'dummyApiKey', + }, + }, + message: { + type: 'page', + sentAt: '2021-01-03T17:02:53.197Z', + userId: 'user@doe', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + page: { + url: 'http://morkey.in', + path: '/cart', + title: 'miphone', + search: 'MI', + referrer: 'morkey', + }, + locale: 'en-US', + screen: { + density: 2, + }, + traits: { + userId: 'userid', + profession: 'Student', + anonymousId: 'd80b66d5-b33d-412d-866f-r4fft5841af', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + category: 'Cart', + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '15129730-eb00-4db7-8db2-799566ccb2ef', + properties: { + url: 'http://morkey.in', + path: '/cart', + title: 'miphone', + search: 'MI', + category: 'Cart', + referrer: 'morkey', + domain: 'morkey.com', + kustomerTrackingId: '829131sjad', + kustomerSessionId: 'hsad522', + }, + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + integrations: { + All: true, + }, + originalTimestamp: '2021-01-03T17:02:53.195Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.kustomerapp.com/v1/tracking/identityEvent', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + identity: { + externalId: 'user@doe', + }, + event: { + name: 'Web-Page-Viewed', + sessionId: 'hsad522', + trackingId: '829131sjad', + meta: { + url: 'http://morkey.in', + path: '/cart', + title: 'miphone', + search: 'MI', + category: 'Cart', + referrer: 'morkey', + domain: 'morkey.com', + }, + }, + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'kustomer', + description: 'Test 5', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'dummyApiKey', + }, + }, + message: { + type: 'track', + event: 'Tracking-Weekender', + sentAt: '2021-01-03T17:02:53.197Z', + userId: 'user@doe', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + page: { + url: 'http://morkey.in', + path: '/cart', + title: 'miphone', + search: 'MI', + referrer: 'morkey', + }, + locale: 'en-US', + screen: { + density: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '15129730-eb00-4db7-8db2-799566ccb2ef', + properties: { + YearServicedNum: 211, + region: 'strapis', + kustomerTrackingId: 'sahetwiac', + kustomerSessionId: '63nsa22', + }, + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + locale: 'en-US', + integrations: { + All: true, + }, + originalTimestamp: '2021-01-03T17:02:53.195Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.kustomerapp.com/v1/tracking/identityEvent', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + identity: { + externalId: 'user@doe', + }, + event: { + name: 'Tracking-Weekender', + sessionId: '63nsa22', + trackingId: 'sahetwiac', + meta: { + YearServicedNum: 211, + region: 'strapis', + }, + }, + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'kustomer', + description: 'Test 6', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'dummyApiKey', + }, + }, + message: { + type: 'track', + event: 'Tracking-Weekender2', + sentAt: '2021-01-03T17:02:53.197Z', + userId: 'user@doe', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + page: { + url: 'http://morkey.in', + path: '/cart', + title: 'miphone', + search: 'MI', + referrer: 'morkey', + }, + screen: { + density: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '15129730-eb00-4db7-8db2-799566ccb2ef', + properties: { + YearServicedNum: 211, + 'reg_8-821x': false, + kustomer_tracking_id: 'sahetwiac', + kustomer_session_id: '63nsa22', + }, + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + integrations: { + All: true, + }, + locale: 'en-US', + originalTimestamp: '2021-01-03T17:02:53.195Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.kustomerapp.com/v1/tracking/identityEvent', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + FORM: {}, + JSON: { + event: { + meta: { + YearServicedNum: 211, + 'reg_8-821x': false, + }, + name: 'Tracking-Weekender2', + sessionId: '63nsa22', + trackingId: 'sahetwiac', + }, + identity: { + externalId: 'user@doe', + }, + }, + XML: {}, + JSON_ARRAY: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'kustomer', + description: 'Test 7', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'dummyApiKey', + genericPage: true, + }, + }, + message: { + type: 'page', + name: 'Unfinished page', + sentAt: '2021-01-03T17:02:53.197Z', + userId: 'user@doe', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + page: { + url: 'http://morkey.in', + path: '/cart', + title: 'miphone', + search: 'MI', + referrer: 'morkey', + }, + screen: { + density: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '15129730-eb00-4db7-8db2-799566ccb2ef', + properties: { + url: 'http://morkey.in', + path: '/cart', + title: 'miphone', + search: 'MI', + category: 'Cart', + referrer: 'morkey', + domain: 'morkey.com', + }, + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + integrations: { + All: true, + }, + locale: 'en-US', + originalTimestamp: '2021-01-03T17:02:53.195Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.kustomerapp.com/v1/tracking/identityEvent', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + identity: { + externalId: 'user@doe', + }, + event: { + name: 'Web-Page-Viewed', + meta: { + url: 'http://morkey.in', + path: '/cart', + title: 'miphone', + search: 'MI', + category: 'Cart', + referrer: 'morkey', + domain: 'morkey.com', + }, + }, + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'kustomer', + description: 'Test 8', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'dummyApiKey', + genericScreen: true, + }, + }, + message: { + type: 'screen', + event: 'Test-Event-Screen', + sentAt: '2021-01-25T16:12:02.048Z', + userId: 'Testc', + channel: 'mobile', + context: { + os: { + name: 'Android', + version: '10', + }, + app: { + name: 'KlaviyoTest', + build: '1', + version: '1.0', + namespace: 'com.rudderstack.android.rudderstack.sampleAndroidApp', + }, + device: { + id: '9c6bd77ea9da3e68', + name: 'raphaelin', + type: 'android', + model: 'Redmi K20 Pro', + manufacturer: 'Xiaomi', + }, + locale: 'en-IN', + screen: { + width: 1080, + height: 2210, + density: 440, + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.2', + }, + network: { + wifi: true, + carrier: 'airtel', + cellular: true, + bluetooth: false, + }, + timezone: 'Asia/Kolkata', + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)', + }, + rudderId: 'b7b24f86-f7bf-46d8-b2b4-ccafc080239c', + messageId: '1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce', + properties: { + hasAccount: 'true', + YearSelectedNum: 1801, + originalServing: '2021-01-25T15:32:56.409Z', + }, + anonymousId: '9c6bd77ea9da3e68', + integrations: { + All: true, + }, + originalTimestamp: '2021-01-25T15:32:56.409Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.kustomerapp.com/v1/tracking/identityEvent', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + identity: { + externalId: 'Testc', + }, + event: { + name: 'Screen-Viewed', + meta: { + hasAccount: 'true', + YearSelectedNum: 1801, + originalServing: '2021-01-25T15:32:56.409Z', + }, + }, + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'kustomer', + description: 'Test 9', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'dummyApiKey', + }, + }, + message: { + type: 'identify', + sentAt: '2021-01-03T17:02:53.195Z', + userId: 'Testc', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + traits: { + firstName: 'Test', + lastName: 'Rudderlabs', + email: 'test@rudderstack.com', + phone: '+12345578900', + birthday: '2005-01-01T23:28:56.782Z', + userId: 'Testc', + address: { + street: '24 Dovers Lane', + city: 'Miami', + state: 'Florida', + postalCode: '1890001', + }, + userName: 'Testc47', + company: 'Rudderstack', + createdAt: '2015-04-17T12:37:42.146Z', + lastActivityAt: '2016-04-17T12:37:42.146Z', + lastCustomerActivityAt: '2017-04-17T12:37:42.146Z', + lastSeenAt: '2017-04-17T12:37:42.146Z', + avatar: 'https://homepages.cae.wisc.edu/~ece533/images/boat.png', + gender: 'm', + tags: ['happy', 'satisfied'], + website: 'www.mattertoast873.com', + socials: [ + { + verified: true, + userid: '100', + type: 'twitter', + username: '@Testc', + url: 'http://twitter.com/Testc', + }, + { + verified: false, + userid: '200', + type: 'facebook', + username: 'Testc', + url: 'http://facebook.com/Testc', + }, + ], + }, + locale: 'en-US', + screen: { + density: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + integrations: { + All: true, + }, + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.kustomerapp.com/v1/customers', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + name: 'Test Rudderlabs', + externalId: 'Testc', + username: 'Testc47', + company: 'Rudderstack', + signedUpAt: '2015-04-17T12:37:42.146Z', + lastActivityAt: '2016-04-17T12:37:42.146Z', + lastCustomerActivityAt: '2017-04-17T12:37:42.146Z', + lastSeenAt: '2017-04-17T12:37:42.146Z', + avatarUrl: 'https://homepages.cae.wisc.edu/~ece533/images/boat.png', + gender: 'm', + tags: ['happy', 'satisfied'], + locale: 'en-US', + socials: [ + { + verified: true, + userid: '100', + type: 'twitter', + username: '@Testc', + url: 'http://twitter.com/Testc', + }, + { + verified: false, + userid: '200', + type: 'facebook', + username: 'Testc', + url: 'http://facebook.com/Testc', + }, + ], + birthdayAt: '2005-01-01T23:28:56.782Z', + emails: [ + { + type: 'home', + email: 'test@rudderstack.com', + }, + ], + phones: [ + { + type: 'home', + phone: '+12345578900', + }, + ], + urls: [ + { + url: 'www.mattertoast873.com', + }, + ], + locations: [ + { + type: 'home', + address: '24 Dovers Lane Miami Florida 1890001', + }, + ], + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'kustomer', + description: 'Test 10', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'dummyApiKey', + }, + }, + message: { + type: 'identify', + sentAt: '2021-01-03T17:02:53.195Z', + userId: 'Testc', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + traits: { + firstName: 'Test', + lastName: 'Rudderlabs', + emails: [ + { + type: 'home', + email: 'test@rudderstack.com', + }, + ], + phones: [ + { + type: 'home', + phone: '+12345578900', + }, + ], + birthday: '2005-01-01T23:28:56.782Z', + userId: 'Testc', + address: 'test address string', + userName: 'Testc47', + company: 'Rudderstack', + createdAt: '2015-04-17T12:37:42.146Z', + lastActivityAt: '2016-04-17T12:37:42.146Z', + lastCustomerActivityAt: '2017-04-17T12:37:42.146Z', + lastSeenAt: '2017-04-17T12:37:42.146Z', + avatar: 'https://homepages.cae.wisc.edu/~ece533/images/boat.png', + gender: 'm', + tags: ['happy', 'satisfied'], + website: 'www.mattertoast873.com', + socials: [ + { + verified: true, + userid: '100', + type: 'twitter', + username: '@Testc', + url: 'http://twitter.com/Testc', + }, + { + verified: false, + userid: '200', + type: 'facebook', + username: 'Testc', + url: 'http://facebook.com/Testc', + }, + ], + }, + locale: 'en-US', + screen: { + density: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + integrations: { + All: true, + }, + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.kustomerapp.com/v1/customers', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + name: 'Test Rudderlabs', + externalId: 'Testc', + username: 'Testc47', + company: 'Rudderstack', + signedUpAt: '2015-04-17T12:37:42.146Z', + lastActivityAt: '2016-04-17T12:37:42.146Z', + lastCustomerActivityAt: '2017-04-17T12:37:42.146Z', + lastSeenAt: '2017-04-17T12:37:42.146Z', + avatarUrl: 'https://homepages.cae.wisc.edu/~ece533/images/boat.png', + gender: 'm', + tags: ['happy', 'satisfied'], + locale: 'en-US', + socials: [ + { + verified: true, + userid: '100', + type: 'twitter', + username: '@Testc', + url: 'http://twitter.com/Testc', + }, + { + verified: false, + userid: '200', + type: 'facebook', + username: 'Testc', + url: 'http://facebook.com/Testc', + }, + ], + birthdayAt: '2005-01-01T23:28:56.782Z', + emails: [ + { + type: 'home', + email: 'test@rudderstack.com', + }, + ], + phones: [ + { + type: 'home', + phone: '+12345578900', + }, + ], + urls: [ + { + url: 'www.mattertoast873.com', + }, + ], + locations: [ + { + type: 'home', + address: 'test address string', + }, + ], + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'kustomer', + description: 'Test 11', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'dummyApiKey', + }, + }, + message: { + type: 'identify', + sentAt: '2021-01-03T17:02:53.195Z', + userId: 'Testc', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + traits: { + firstName: 'Test', + lastName: 'Rudderlabs', + emails: [ + { + type: 'home', + email: 'test@rudderstack.com', + }, + ], + phones: [ + { + type: 'home', + phone: '+12345578900', + }, + ], + birthday: '2005-01-01T23:28:56.782Z', + userId: 'Testc', + address: 'test address string', + userName: 'Testc47', + company: 'Rudderstack', + createdAt: '2015-04-17T12:37:42.146Z', + lastActivityAt: '2016-04-17T12:37:42.146Z', + lastCustomerActivityAt: '2017-04-17T12:37:42.146Z', + lastSeenAt: '2017-04-17T12:37:42.146Z', + avatar: 'https://homepages.cae.wisc.edu/~ece533/images/boat.png', + gender: 'm', + tags: ['happy', 'satisfied'], + website: 'www.mattertoast873.com', + socials: [ + { + verified: true, + userid: '100', + type: 'twitter', + username: '@Testc', + url: 'http://twitter.com/Testc', + }, + { + verified: false, + userid: '200', + type: 'facebook', + username: 'Testc', + url: 'http://facebook.com/Testc', + }, + ], + }, + locale: 'en-US', + screen: { + density: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + externalId: [ + { + type: 'kustomerId', + id: 'abcd1234', + }, + ], + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + integrations: { + All: true, + }, + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'PUT', + endpoint: 'https://api.kustomerapp.com/v1/customers/abcd1234?replace=false', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + name: 'Test Rudderlabs', + externalId: 'Testc', + username: 'Testc47', + company: 'Rudderstack', + signedUpAt: '2015-04-17T12:37:42.146Z', + lastActivityAt: '2016-04-17T12:37:42.146Z', + lastCustomerActivityAt: '2017-04-17T12:37:42.146Z', + lastSeenAt: '2017-04-17T12:37:42.146Z', + avatarUrl: 'https://homepages.cae.wisc.edu/~ece533/images/boat.png', + gender: 'm', + tags: ['happy', 'satisfied'], + locale: 'en-US', + socials: [ + { + verified: true, + userid: '100', + type: 'twitter', + username: '@Testc', + url: 'http://twitter.com/Testc', + }, + { + verified: false, + userid: '200', + type: 'facebook', + username: 'Testc', + url: 'http://facebook.com/Testc', + }, + ], + birthdayAt: '2005-01-01T23:28:56.782Z', + emails: [ + { + type: 'home', + email: 'test@rudderstack.com', + }, + ], + phones: [ + { + type: 'home', + phone: '+12345578900', + }, + ], + urls: [ + { + url: 'www.mattertoast873.com', + }, + ], + locations: [ + { + type: 'home', + address: 'test address string', + }, + ], + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'kustomer', + description: 'Test 12', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'dummyApiKey', + genericScreen: true, + }, + }, + message: { + type: 'screen', + event: 'Test-Event-Screen', + userId: 'utsabc', + channel: 'mobile', + context: { + os: { + name: 'Android', + version: '10', + }, + app: { + name: 'KlaviyoTest', + build: '1', + version: '1.0', + namespace: 'com.rudderstack.android.rudderstack.sampleAndroidApp', + }, + device: { + id: '9c6bd77ea9da3e68', + name: 'raphaelin', + type: 'android', + model: 'Redmi K20 Pro', + manufacturer: 'Xiaomi', + }, + locale: 'en-IN', + screen: { + width: 1080, + height: 2210, + density: 440, + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.2', + }, + network: { + wifi: true, + carrier: 'airtel', + cellular: true, + bluetooth: false, + }, + timezone: 'Asia/Kolkata', + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)', + sessionId: 'hsad522', + }, + rudderId: 'b7b24f86-f7bf-46d8-b2b4-ccafc080239c', + messageId: '1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce', + properties: { + hasAccount: 'true', + YearSelectedNum: 1801, + }, + anonymousId: '9c6bd77ea9da3e68', + integrations: { + All: true, + }, + originalTimestamp: '2023-01-10T15:32:56.409Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.kustomerapp.com/v1/tracking/identityEvent', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + identity: { + externalId: 'utsabc', + }, + event: { + name: 'Screen-Viewed', + sessionId: 'hsad522', + meta: { + hasAccount: 'true', + YearSelectedNum: 1801, + }, + }, + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'kustomer', + description: 'Test 13', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'dummyApiKey', + baseEndpoint: 'https://api.prod2.kustomerapp.com', + genericScreen: true, + }, + }, + message: { + type: 'screen', + event: 'Test-Event-Screen', + userId: 'Testc', + channel: 'mobile', + context: { + os: { + name: 'Android', + version: '10', + }, + app: { + name: 'KlaviyoTest', + build: '1', + version: '1.0', + namespace: 'com.rudderstack.android.rudderstack.sampleAndroidApp', + }, + device: { + id: '9c6bd77ea9da3e68', + name: 'raphaelin', + type: 'android', + model: 'Redmi K20 Pro', + manufacturer: 'Xiaomi', + }, + locale: 'en-IN', + screen: { + width: 1080, + height: 2210, + density: 440, + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.2', + }, + network: { + wifi: true, + carrier: 'airtel', + cellular: true, + bluetooth: false, + }, + timezone: 'Asia/Kolkata', + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)', + sessionId: 'hsad522', + }, + rudderId: 'b7b24f86-f7bf-46d8-b2b4-ccafc080239c', + messageId: '1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce', + properties: { + hasAccount: 'true', + YearSelectedNum: 1801, + }, + anonymousId: '9c6bd77ea9da3e68', + integrations: { + All: true, + }, + originalTimestamp: '2023-01-10T15:32:56.409Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.prod2.kustomerapp.com/v1/tracking/identityEvent', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + identity: { + externalId: 'Testc', + }, + event: { + name: 'Screen-Viewed', + sessionId: 'hsad522', + meta: { + hasAccount: 'true', + YearSelectedNum: 1801, + }, + }, + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, +]; diff --git a/test/integrations/destinations/kustomer/router/data.ts b/test/integrations/destinations/kustomer/router/data.ts new file mode 100644 index 0000000000..6dae5d5e76 --- /dev/null +++ b/test/integrations/destinations/kustomer/router/data.ts @@ -0,0 +1,393 @@ +export const data = [ + { + name: 'kustomer', + description: 'Test 0', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + message: { + type: 'identify', + sentAt: '2021-01-03T17:02:53.195Z', + userId: 'testc', + channel: 'web', + context: { + os: { name: '', version: '' }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + traits: { + name: 'test Rudderlabs', + email: 'test@rudderstack.com', + phone: '+12345578900', + birthday: '2005-01-01T23:28:56.782Z', + userId: 'testc', + address: { + street: '24 Dovers Lane', + city: 'Miami', + state: 'Florida', + postalCode: '1890001', + }, + userName: 'testc47', + company: 'Rudderstack', + createdAt: '2015-04-17T12:37:42.146Z', + lastActivityAt: '2016-04-17T12:37:42.146Z', + lastCustomerActivityAt: '2017-04-17T12:37:42.146Z', + lastSeenAt: '2017-04-17T12:37:42.146Z', + avatar: 'https://homepages.cae.wisc.edu/~ece533/images/boat.png', + gender: 'm', + tags: ['happy', 'satisfied'], + website: 'www.mattertoast873.com', + socials: [ + { + verified: true, + userid: '100', + type: 'twitter', + username: '@testc', + url: 'http://twitter.com/testc', + }, + { + verified: false, + userid: '200', + type: 'facebook', + username: 'testc', + url: 'http://facebook.com/testc', + }, + ], + }, + locale: 'en-US', + screen: { density: 2 }, + library: { name: 'RudderLabs JavaScript SDK', version: '1.1.11' }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + integrations: { All: true }, + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + metadata: { + jobId: 1, + }, + destination: { + Config: { + apiKey: 'dummyApiKey', + genericPage: false, + genericScreen: false, + }, + }, + }, + { + message: { + type: 'track', + event: 'Tracking-Weekender', + sentAt: '2021-01-03T17:02:53.197Z', + userId: 'user@doe', + channel: 'web', + context: { + os: { name: '', version: '' }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + page: { + url: 'http://morkey.in', + path: '/cart', + title: 'miphone', + search: 'MI', + referrer: 'morkey', + }, + locale: 'en-US', + screen: { density: 2 }, + library: { name: 'RudderLabs JavaScript SDK', version: '1.1.11' }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '15129730-eb00-4db7-8db2-799566ccb2ef', + properties: { + YearServicedNum: 211, + region: 'strapis', + kustomerTrackingId: 'sahetwiac', + kustomerSessionId: '63nsa22', + }, + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + locale: 'en-US', + integrations: { All: true }, + originalTimestamp: '2021-01-03T17:02:53.195Z', + }, + metadata: { + jobId: 2, + }, + destination: { + Config: { + apiKey: 'dummyApiKey', + genericPage: false, + genericScreen: false, + }, + }, + }, + { + message: { + type: 'track', + event: 'Tracking-Weekender', + sentAt: '2021-01-03T17:02:53.197Z', + userId: 'user@doe', + channel: 'web', + context: { + os: { name: '', version: '' }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + page: { + url: 'http://morkey.in', + path: '/cart', + title: 'miphone', + search: 'MI', + referrer: 'morkey', + }, + locale: 'en-US', + screen: { density: 2 }, + library: { name: 'RudderLabs JavaScript SDK', version: '1.1.11' }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '15129730-eb00-4db7-8db2-799566ccb2ef', + properties: { + YearServicedNum: 211, + region: 'strapis', + kustomerTrackingId: 'sahetwiac', + kustomerSessionId: '63nsa22', + }, + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + locale: 'en-US', + integrations: { All: true }, + originalTimestamp: '2021-01-03T17:02:53.195Z', + }, + metadata: { + jobId: 2, + }, + destination: { + Config: { + baseEndpoint: 'https://api.prod2.kustomerapp.com', + apiKey: 'dummyApiKey', + genericPage: false, + genericScreen: false, + }, + }, + }, + ], + destType: 'kustomer', + }, + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.kustomerapp.com/v1/customers', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + name: 'test Rudderlabs', + externalId: 'testc', + username: 'testc47', + company: 'Rudderstack', + signedUpAt: '2015-04-17T12:37:42.146Z', + lastActivityAt: '2016-04-17T12:37:42.146Z', + lastCustomerActivityAt: '2017-04-17T12:37:42.146Z', + lastSeenAt: '2017-04-17T12:37:42.146Z', + avatarUrl: 'https://homepages.cae.wisc.edu/~ece533/images/boat.png', + gender: 'm', + tags: ['happy', 'satisfied'], + locale: 'en-US', + socials: [ + { + verified: true, + userid: '100', + type: 'twitter', + username: '@testc', + url: 'http://twitter.com/testc', + }, + { + verified: false, + userid: '200', + type: 'facebook', + username: 'testc', + url: 'http://facebook.com/testc', + }, + ], + birthdayAt: '2005-01-01T23:28:56.782Z', + emails: [ + { + type: 'home', + email: 'test@rudderstack.com', + }, + ], + phones: [ + { + type: 'home', + phone: '+12345578900', + }, + ], + urls: [ + { + url: 'www.mattertoast873.com', + }, + ], + locations: [ + { + type: 'home', + address: '24 Dovers Lane Miami Florida 1890001', + }, + ], + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + }, + metadata: [ + { + jobId: 1, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + apiKey: 'dummyApiKey', + genericPage: false, + genericScreen: false, + }, + }, + }, + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.kustomerapp.com/v1/tracking/identityEvent', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + identity: { + externalId: 'user@doe', + }, + event: { + name: 'Tracking-Weekender', + sessionId: '63nsa22', + trackingId: 'sahetwiac', + meta: { + YearServicedNum: 211, + region: 'strapis', + }, + }, + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + }, + metadata: [ + { + jobId: 2, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + apiKey: 'dummyApiKey', + genericPage: false, + genericScreen: false, + }, + }, + }, + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.prod2.kustomerapp.com/v1/tracking/identityEvent', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + identity: { + externalId: 'user@doe', + }, + event: { + name: 'Tracking-Weekender', + sessionId: '63nsa22', + trackingId: 'sahetwiac', + meta: { + YearServicedNum: 211, + region: 'strapis', + }, + }, + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + }, + metadata: [ + { + jobId: 2, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + baseEndpoint: 'https://api.prod2.kustomerapp.com', + apiKey: 'dummyApiKey', + genericPage: false, + genericScreen: false, + }, + }, + }, + ], + }, + }, + }, + }, +]; diff --git a/test/integrations/destinations/mailchimp/network.ts b/test/integrations/destinations/mailchimp/network.ts new file mode 100644 index 0000000000..b036bf566c --- /dev/null +++ b/test/integrations/destinations/mailchimp/network.ts @@ -0,0 +1,80 @@ +export const networkCallsData = [ + { + httpReq: { + url: 'https://usXXX.api.mailchimp.com/3.0/lists/aud111/members/0b63fa319d113aede8b7b409e4fc6437', + method: 'GET', + }, + httpRes: { + data: { + data: { + type: 'https://mailchimp.com/developer/marketing/docs/errors/', + title: 'Forbidden', + status: 403, + detail: "The API key provided is linked to datacenter 'us6'", + instance: 'ff092056-4d86-aa05-bbe9-9e9466108d81', + }, + }, + status: 200, + }, + }, + { + httpReq: { + url: 'https://usXX.api.mailchimp.com/3.0/lists/aud111/members/48cd6232dc124497369f59c33d3eb4ab', + method: 'GET', + }, + httpRes: { + data: { + contact_id: 821932121, + }, + status: 200, + }, + }, + { + httpReq: { + url: 'https://usXX.api.mailchimp.com/3.0/lists/aud111/members/b599284b872e06d29bb796a260ae7c1f', + method: 'GET', + }, + httpRes: { + data: { + contact_id: 821932121, + }, + status: 204, + }, + }, + { + httpReq: { + url: 'https://usXX.api.mailchimp.com/3.0/lists/aud000', + method: 'GET', + }, + httpRes: { + data: { + double_optin: false, + }, + status: 200, + }, + }, + { + httpReq: { + url: 'https://usXX.api.mailchimp.com/3.0/lists/aud112', + method: 'GET', + }, + httpRes: { + data: { + double_optin: false, + }, + status: 200, + }, + }, + { + httpReq: { + url: 'https://usXX.api.mailchimp.com/3.0/lists/aud002', + method: 'GET', + }, + httpRes: { + data: { + double_optin: false, + }, + status: 200, + }, + }, +]; diff --git a/test/integrations/destinations/mailchimp/processor/data.ts b/test/integrations/destinations/mailchimp/processor/data.ts new file mode 100644 index 0000000000..a0ee5de3d3 --- /dev/null +++ b/test/integrations/destinations/mailchimp/processor/data.ts @@ -0,0 +1,2259 @@ +export const data = [ + { + name: 'mailchimp', + description: 'Test 0', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'dummyApiKey', + audienceId: 'aud111', + datacenterId: 'usXX', + enableMergeFields: true, + }, + Enabled: true, + Transformations: [], + }, + message: { + anonymousId: 'userId12345', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + anonymousId: 'userId12345', + email: 'bob.dole@initech.com', + firstName: 'Bob', + lastName: 'Dole', + zip: '123', + state: 'test', + city: 'test', + addressLine1: 'test', + birthday: '2000-05-06', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36', + }, + integrations: { + All: true, + }, + messageId: '21e475b2-3694-477b-afb6-5b94a81aac21', + originalTimestamp: '2019-11-15T10:22:32Z', + receivedAt: '2019-11-15T15:52:37+05:30', + request_ip: '[::1]:62921', + sentAt: '2019-11-15T10:22:37Z', + source_id: '1TdhTcwsUVOeEMWyPUpQIgF3pYr', + timestamp: '2019-11-15T15:52:32+05:30', + type: 'identify', + userId: 'userId12345', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'PUT', + endpoint: + 'https://usXX.api.mailchimp.com/3.0/lists/aud111/members/48cd6232dc124497369f59c33d3eb4ab', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Basic YXBpS2V5OmR1bW15QXBpS2V5', + }, + params: {}, + body: { + JSON: { + merge_fields: { + ADDRESS: { + addr1: 'test', + city: 'test', + state: 'test', + zip: '123', + }, + FNAME: 'Bob', + LNAME: 'Dole', + ANONYMOUSI: 'userId12345', + BIRTHDAY: '05/06', + }, + email_address: 'bob.dole@initech.com', + status: 'subscribed', + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + audienceId: 'aud111', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'mailchimp', + description: 'Test 1', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'dummyApiKey', + audienceId: 'aud111', + datacenterId: 'usXX', + enableMergeFields: true, + }, + Enabled: true, + Transformations: [], + }, + message: { + anonymousId: 'userId12345', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + anonymousId: 'userId12345', + email: 'bob.dole@initech.com', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36', + }, + integrations: { + MailChimp: { + subscriptionStatus: 'subscribed', + }, + }, + messageId: '6d1f3ca8-e2d0-4d34-9926-44596171af0c', + originalTimestamp: '2019-11-15T10:26:53Z', + receivedAt: '2019-11-15T15:56:58+05:30', + request_ip: '[::1]:62921', + sentAt: '2019-11-15T10:26:58Z', + source_id: '1TdhTcwsUVOeEMWyPUpQIgF3pYr', + timestamp: '2019-11-15T15:56:53+05:30', + type: 'identify', + userId: 'userId12345', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'PUT', + endpoint: + 'https://usXX.api.mailchimp.com/3.0/lists/aud111/members/48cd6232dc124497369f59c33d3eb4ab', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Basic YXBpS2V5OmR1bW15QXBpS2V5', + }, + params: {}, + body: { + JSON: { + status: 'subscribed', + email_address: 'bob.dole@initech.com', + merge_fields: { + ANONYMOUSI: 'userId12345', + }, + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + audienceId: 'aud111', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'mailchimp', + description: 'Test 2', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'Titli Test', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'apiKey-dummyApiKey', + audienceId: 'aud111', + datacenterId: 'usXX', + }, + Enabled: true, + Transformations: [], + }, + message: { + type: 'identify', + sentAt: '2021-05-18T06:58:57.186Z', + userId: 'test.rudderlabs@yara.com', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.18', + namespace: 'com.rudderlabs.javascript', + }, + page: { + url: 'https://app.rudderstack.com/sources/1qHR2Qzd894ievNGc4aBHmjltLD', + path: '/sources/1qHR2Qzd894ievNGc4aBHmjltLD', + title: 'RudderStack', + search: '', + tab_url: 'https://app.rudderstack.com/sources/1qHR2Qzd894ievNGc4aBHmjltLD', + referrer: '$direct', + initial_referrer: 'https://www.google.com/', + referring_domain: '', + initial_referring_domain: 'www.google.com', + }, + locale: 'en-US', + screen: { + width: 1792, + height: 1120, + density: 2, + }, + traits: { + name: 'test rudderlabs', + email: 'test.rudderlabs@yara.com', + userId: '1sWVaQTxoVwjvShC0295E6OqMaP', + first_login: false, + workspaceId: '1jWrHYPjNGSHbvKwzow0ZFPIQll', + account_type: 'invited', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.18', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36', + }, + rudderId: '6d612dda-9c8c-4062-9d09-af9425b846ce', + messageId: 'c6d49688-89f2-45cf-b061-0ae3c212a4e5', + timestamp: '2021-05-18T06:58:57.811Z', + receivedAt: '2021-05-18T06:58:57.812Z', + request_ip: '122.172.221.51', + anonymousId: '6914679f-fd34-45ef-86e0-4930e6e8b91a', + integrations: { + Salesforce: true, + }, + originalTimestamp: '2021-05-18T06:58:57.185Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'User does not have access to the requested operation', + statTags: { + destType: 'MAILCHIMP', + errorCategory: 'network', + errorType: 'aborted', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'mailchimp', + description: 'Test 3', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'Titli Test', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'dummyApiKey', + audienceId: 'aud111', + datacenterId: 'usXX', + }, + Enabled: true, + Transformations: [], + }, + message: { + type: 'page', + sentAt: '2021-05-18T07:02:17.675Z', + userId: '', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.18', + namespace: 'com.rudderlabs.javascript', + }, + page: { + url: 'https://app.rudderstack.com/signup?type=freetrial', + path: '/signup', + title: '', + search: '?type=freetrial', + tab_url: 'https://app.rudderstack.com/signup?type=freetrial', + referrer: + 'https://rudderstack.medium.com/kafka-vs-postgresql-how-we-implemented-our-queueing-system-using-postgresql-ec128650e3e', + initial_referrer: + 'https://rudderstack.medium.com/kafka-vs-postgresql-how-we-implemented-our-queueing-system-using-postgresql-ec128650e3e', + referring_domain: 'rudderstack.medium.com', + initial_referring_domain: 'rudderstack.medium.com', + }, + locale: 'en-GB', + screen: { + density: 2, + }, + traits: {}, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.18', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36', + }, + rudderId: '4dbe224c-6aea-4d89-8da6-09d27c0d2908', + messageId: '72df8cb0-54ab-417c-8e87-e97e9d339feb', + timestamp: '2021-05-18T07:02:18.566Z', + properties: { + url: 'https://app.rudderstack.com/signup?type=freetrial', + path: '/signup', + title: '', + search: '?type=freetrial', + tab_url: 'https://app.rudderstack.com/signup?type=freetrial', + referrer: + 'https://rudderstack.medium.com/kafka-vs-postgresql-how-we-implemented-our-queueing-system-using-postgresql-ec128650e3e', + initial_referrer: + 'https://rudderstack.medium.com/kafka-vs-postgresql-how-we-implemented-our-queueing-system-using-postgresql-ec128650e3e', + referring_domain: 'rudderstack.medium.com', + initial_referring_domain: 'rudderstack.medium.com', + }, + receivedAt: '2021-05-18T07:02:18.566Z', + request_ip: '162.44.150.11', + anonymousId: '58ec7b39-48f1-4d83-9d45-a48c64f96fa0', + integrations: { + All: true, + }, + originalTimestamp: '2021-05-18T07:02:17.675Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'message type page is not supported', + statTags: { + destType: 'MAILCHIMP', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'mailchimp', + description: 'Test 4', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'dummyApiKey', + audienceId: 'aud111', + datacenterId: 'usXX', + }, + Enabled: true, + Transformations: [], + }, + message: { + anonymousId: 'userId12345', + channel: 'web', + context: { + mappedToDestination: true, + externalId: [ + { + identifierType: 'email_address', + id: 'bob.dole@initech.com', + type: 'audience', + }, + ], + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36', + }, + integrations: { + All: true, + }, + traits: { + merge_fields: { + FIRSTNAME: 'Bob', + }, + status: 'subscribed', + }, + messageId: '21e475b2-3694-477b-afb6-5b94a81aac21', + originalTimestamp: '2019-11-15T10:22:32Z', + receivedAt: '2019-11-15T15:52:37+05:30', + request_ip: '[::1]:62921', + sentAt: '2019-11-15T10:22:37Z', + source_id: '1TdhTcwsUVOeEMWyPUpQIgF3pYr', + timestamp: '2019-11-15T15:52:32+05:30', + type: 'identify', + userId: 'userId12345', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'PUT', + endpoint: + 'https://usXX.api.mailchimp.com/3.0/lists/aud111/members/48cd6232dc124497369f59c33d3eb4ab', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Basic YXBpS2V5OmR1bW15QXBpS2V5', + }, + params: {}, + body: { + JSON: { + merge_fields: { + FIRSTNAME: 'Bob', + }, + status: 'subscribed', + email_address: 'bob.dole@initech.com', + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + audienceId: 'aud111', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'mailchimp', + description: 'Test 5', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'dummyApiKey', + audienceId: 'aud111', + datacenterId: 'usXX', + }, + Enabled: true, + Transformations: [], + }, + message: { + type: 'identify', + traits: { + status: 'subscri', + }, + userId: 'emrichardson820+22822@gmail.com', + channel: 'sources', + context: { + sources: { + job_id: '24c5HJxHomh6YCngEOCgjS5r1KX/Syncher', + task_id: 'vw_rs_mailchimp_mocked_hg_data', + version: 'v1.8.1', + batch_id: 'f252c69d-c40d-450e-bcd2-2cf26cb62762', + job_run_id: 'c8el40l6e87v0c4hkbl0', + task_run_id: 'c8el40l6e87v0c4hkblg', + }, + externalId: [ + { + id: 'emrichardson820+22822@gmail.com', + type: 'MAILCHIMP-92e1f1ad2c', + identifierType: 'email_address', + }, + ], + mappedToDestination: 'true', + }, + recordId: '1', + rudderId: '4d5d0ed0-9db8-41cc-9bb0-a032f6bfa97a', + messageId: 'b3bee036-fc26-4f6d-9867-c17f85708a82', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: + 'The status must be one of [subscribed, unsubscribed, cleaned, pending, transactional]', + statTags: { + destType: 'MAILCHIMP', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'mailchimp', + description: 'Test 6', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'dummyApiKey', + audienceId: 'aud111', + datacenterId: 'usXX', + }, + Enabled: true, + Transformations: [], + }, + message: { + anonymousId: 'userId12345', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36', + }, + integrations: { + All: true, + }, + messageId: '21e475b2-3694-477b-afb6-5b94a81aac21', + originalTimestamp: '2019-11-15T10:22:32Z', + receivedAt: '2019-11-15T15:52:37+05:30', + request_ip: '[::1]:62921', + sentAt: '2019-11-15T10:22:37Z', + source_id: '1TdhTcwsUVOeEMWyPUpQIgF3pYr', + timestamp: '2019-11-15T15:52:32+05:30', + type: 'identify', + userId: 'userId12345', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Email is required for identify', + statTags: { + destType: 'MAILCHIMP', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'mailchimp', + description: 'Test 7', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'dummyApiKey', + audienceId: 'aud112', + datacenterId: 'usXX', + }, + Enabled: true, + Transformations: [], + }, + message: { + anonymousId: 'userId12345', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + email: 'jhon@gmail.com', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36', + }, + integrations: { + All: true, + }, + messageId: '21e475b2-3694-477b-afb6-5b94a81aac21', + originalTimestamp: '2019-11-15T10:22:32Z', + receivedAt: '2019-11-15T15:52:37+05:30', + request_ip: '[::1]:62921', + sentAt: '2019-11-15T10:22:37Z', + source_id: '1TdhTcwsUVOeEMWyPUpQIgF3pYr', + timestamp: '2019-11-15T15:52:32+05:30', + type: 'identify', + userId: 'userId12345', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + FORM: {}, + JSON: { + status: 'subscribed', + email_address: 'jhon@gmail.com', + }, + JSON_ARRAY: {}, + }, + type: 'REST', + files: {}, + method: 'PUT', + params: {}, + headers: { + 'Content-Type': 'application/json', + Authorization: 'Basic YXBpS2V5OmR1bW15QXBpS2V5', + }, + audienceId: 'aud112', + version: '1', + endpoint: + 'https://usXX.api.mailchimp.com/3.0/lists/aud112/members/7f3863b197eeff650876bb89eca08e57', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'mailchimp', + description: 'Test 8', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'dummyApiKey', + audienceId: 'aud111', + datacenterId: 'usXX', + }, + Enabled: true, + Transformations: [], + }, + message: { + anonymousId: 'userId12345', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + email: 'bob.dole@initech.com', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36', + }, + integrations: { + All: true, + }, + messageId: '21e475b2-3694-477b-afb6-5b94a81aac21', + originalTimestamp: '2019-11-15T10:22:32Z', + receivedAt: '2019-11-15T15:52:37+05:30', + request_ip: '[::1]:62921', + sentAt: '2019-11-15T10:22:37Z', + source_id: '1TdhTcwsUVOeEMWyPUpQIgF3pYr', + timestamp: '2019-11-15T15:52:32+05:30', + type: 'identify', + userId: 'userId12345', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + FORM: {}, + JSON: { + email_address: 'bob.dole@initech.com', + status: 'subscribed', + }, + JSON_ARRAY: {}, + }, + type: 'REST', + files: {}, + method: 'PUT', + params: {}, + audienceId: 'aud111', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Basic YXBpS2V5OmR1bW15QXBpS2V5', + }, + version: '1', + endpoint: + 'https://usXX.api.mailchimp.com/3.0/lists/aud111/members/48cd6232dc124497369f59c33d3eb4ab', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'mailchimp', + description: 'Test 9', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'dummyApiKey', + audienceId: 'aud111', + datacenterId: 'usXX', + }, + Enabled: true, + Transformations: [], + }, + message: { + anonymousId: 'userId12345', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + anonymousId: 'userId12345', + email: 'bob.dole@initech.com', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36', + }, + integrations: { + MailChimp: { + subscriptionStatus: 'subscribed', + }, + }, + messageId: '6d1f3ca8-e2d0-4d34-9926-44596171af0c', + originalTimestamp: '2019-11-15T10:26:53Z', + receivedAt: '2019-11-15T15:56:58+05:30', + request_ip: '[::1]:62921', + sentAt: '2019-11-15T10:26:58Z', + source_id: '1TdhTcwsUVOeEMWyPUpQIgF3pYr', + timestamp: '2019-11-15T15:56:53+05:30', + type: 'identify', + userId: 'userId12345', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'PUT', + endpoint: + 'https://usXX.api.mailchimp.com/3.0/lists/aud111/members/48cd6232dc124497369f59c33d3eb4ab', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Basic YXBpS2V5OmR1bW15QXBpS2V5', + }, + params: {}, + body: { + JSON: { + status: 'subscribed', + email_address: 'bob.dole@initech.com', + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + audienceId: 'aud111', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'mailchimp', + description: 'Test 10', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: '', + audienceId: 'aud111', + datacenterId: 'usXX', + }, + Enabled: true, + Transformations: [], + }, + message: { + anonymousId: 'userId12345', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + anonymousId: 'test-rudderlabs', + email: 'test-rudderlabs-test@initech.com', + firstName: 'Test', + lastName: 'Rudderlabs', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36', + }, + integrations: { + All: true, + }, + messageId: '21e475b2-3694-477b-afb6-5b94a81aac21', + originalTimestamp: '2019-11-15T10:22:32Z', + receivedAt: '2019-11-15T15:52:37+05:30', + request_ip: '[::1]:62921', + sentAt: '2019-11-15T10:22:37Z', + source_id: '1TdhTcwsUVOeEMWyPUpQIgF3pYr', + timestamp: '2019-11-15T15:52:32+05:30', + type: 'identify', + userId: 'userId12345', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'API Key not found. Aborting', + statTags: { + destType: 'MAILCHIMP', + errorCategory: 'dataValidation', + errorType: 'configuration', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'mailchimp', + description: 'Test 11', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'dummyApiKey', + datacenterId: 'usXX', + }, + Enabled: true, + Transformations: [], + }, + message: { + anonymousId: 'userId12345', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + anonymousId: 'test-rudderlabs', + email: 'test-rudderlabs-test@initech.com', + firstName: 'Test', + lastName: 'Rudderlabs', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36', + }, + integrations: { + All: true, + }, + messageId: '21e475b2-3694-477b-afb6-5b94a81aac21', + originalTimestamp: '2019-11-15T10:22:32Z', + receivedAt: '2019-11-15T15:52:37+05:30', + request_ip: '[::1]:62921', + sentAt: '2019-11-15T10:22:37Z', + source_id: '1TdhTcwsUVOeEMWyPUpQIgF3pYr', + timestamp: '2019-11-15T15:52:32+05:30', + type: 'identify', + userId: 'userId12345', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Audience Id not found. Aborting', + statTags: { + destType: 'MAILCHIMP', + errorCategory: 'dataValidation', + errorType: 'configuration', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'mailchimp', + description: 'Test 12', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'dummyApiKey', + audienceId: 'aud111', + datacenterId: '', + }, + Enabled: true, + Transformations: [], + }, + message: { + anonymousId: 'userId12345', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + anonymousId: 'test-rudderlabs', + email: 'test-rudderlabs-test@initech.com', + firstName: 'Test', + lastName: 'Rudderlabs', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36', + }, + integrations: { + All: true, + }, + messageId: '21e475b2-3694-477b-afb6-5b94a81aac21', + originalTimestamp: '2019-11-15T10:22:32Z', + receivedAt: '2019-11-15T15:52:37+05:30', + request_ip: '[::1]:62921', + sentAt: '2019-11-15T10:22:37Z', + source_id: '1TdhTcwsUVOeEMWyPUpQIgF3pYr', + timestamp: '2019-11-15T15:52:32+05:30', + type: 'identify', + userId: 'userId12345', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'DataCenter Id not found. Aborting', + statTags: { + destType: 'MAILCHIMP', + errorCategory: 'dataValidation', + errorType: 'configuration', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'mailchimp', + description: 'Test 13', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'dummyApiKey', + audienceId: 'aud111', + datacenterId: 'usXX', + }, + Enabled: true, + Transformations: [], + }, + message: { + anonymousId: 'userId12345', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + anonymousId: 'test-rudderlabs', + email: 'test-rudderlabs-test@initech.com', + firstName: 'Test', + lastName: 'Rudderlabs', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36', + }, + integrations: { + All: true, + }, + messageId: '21e475b2-3694-477b-afb6-5b94a81aac21', + originalTimestamp: '2019-11-15T10:22:32Z', + receivedAt: '2019-11-15T15:52:37+05:30', + request_ip: '[::1]:62921', + sentAt: '2019-11-15T10:22:37Z', + source_id: '1TdhTcwsUVOeEMWyPUpQIgF3pYr', + timestamp: '2019-11-15T15:52:32+05:30', + type: 'group', + userId: 'userId12345', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'message type group is not supported', + statTags: { + destType: 'MAILCHIMP', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'mailchimp', + description: 'Test 14', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'dummyApiKey', + audienceId: 'aud111', + datacenterId: 'usXX', + }, + Enabled: true, + Transformations: [], + }, + message: { + anonymousId: 'userId12345', + channel: 'web', + context: { + traits: { + anonymousId: 'userId12345', + email: 'bob.dole@initech.com', + }, + }, + properties: { + brand: 'Aster', + product: 'Garments', + }, + messageId: '6d1f3ca8-e2d0-4d34-9926-44596171af0c', + originalTimestamp: '2019-11-15T10:26:53Z', + receivedAt: '2019-11-15T15:56:58+05:30', + sentAt: '2019-11-15T10:26:58Z', + source_id: '1TdhTcwsUVOeEMWyPUpQIgF3pYr', + timestamp: '2019-11-15T15:56:53+05:30', + type: 'track', + event: 'local testing', + userId: 'userId12345', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://usXX.api.mailchimp.com/3.0/lists/aud111/members/48cd6232dc124497369f59c33d3eb4ab/events', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Basic YXBpS2V5OmR1bW15QXBpS2V5', + }, + params: {}, + body: { + JSON: { + name: 'local_testing', + occurred_at: '2019-11-15T10:26:53+00:00', + properties: { + brand: 'Aster', + product: 'Garments', + }, + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + audienceId: 'aud111', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'mailchimp', + description: 'Test 15', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'dummyApiKey', + audienceId: 'aud111', + datacenterId: 'usXX', + }, + Enabled: true, + Transformations: [], + }, + message: { + anonymousId: 'userId12345', + channel: 'web', + context: { + traits: { + anonymousId: 'userId12345', + email: 'bob.dole@initech.com', + }, + }, + properties: { + brand: 'Aster', + product: 'Garments', + isSyncing: false, + }, + messageId: '6d1f3ca8-e2d0-4d34-9926-44596171af0c', + originalTimestamp: '2019-11-15T10:26:53Z', + receivedAt: '2019-11-15T15:56:58+05:30', + sentAt: '2019-11-15T10:26:58Z', + source_id: '1TdhTcwsUVOeEMWyPUpQIgF3pYr', + timestamp: '2019-11-15T15:56:53+05:30', + type: 'track', + event: 'local testing', + userId: 'userId12345', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://usXX.api.mailchimp.com/3.0/lists/aud111/members/48cd6232dc124497369f59c33d3eb4ab/events', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Basic YXBpS2V5OmR1bW15QXBpS2V5', + }, + params: {}, + body: { + JSON: { + name: 'local_testing', + occurred_at: '2019-11-15T10:26:53+00:00', + is_syncing: false, + properties: { + brand: 'Aster', + product: 'Garments', + }, + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + audienceId: 'aud111', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'mailchimp', + description: 'Test 16', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'dummyApiKey', + audienceId: 'aud111', + datacenterId: 'usXX', + }, + Enabled: true, + Transformations: [], + }, + message: { + anonymousId: 'userId12345', + channel: 'web', + context: { + traits: { + anonymousId: 'userId12345', + }, + }, + messageId: '6d1f3ca8-e2d0-4d34-9926-44596171af0c', + originalTimestamp: '2019-11-15T10:26:53Z', + receivedAt: '2019-11-15T15:56:58+05:30', + sentAt: '2019-11-15T10:26:58Z', + source_id: '1TdhTcwsUVOeEMWyPUpQIgF3pYr', + timestamp: '2019-11-15T15:56:53+05:30', + type: 'track', + event: 'local testing', + userId: 'userId12345', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Email is required for track', + statTags: { + destType: 'MAILCHIMP', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'mailchimp', + description: 'Test 17', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'dummyApiKey', + audienceId: 'aud111', + datacenterId: 'usXX', + }, + Enabled: true, + Transformations: [], + }, + message: { + anonymousId: 'userId12345', + channel: 'web', + context: { + traits: { + anonymousId: 'userId12345', + email: 'bob.dole@initech.com', + }, + }, + properties: { + brand: 'Aster', + product: 'Garments', + isSyncing: false, + }, + messageId: '6d1f3ca8-e2d0-4d34-9926-44596171af0c', + originalTimestamp: '2019-11-15T10:26:53Z', + receivedAt: '2019-11-15T15:56:58+05:30', + sentAt: '2019-11-15T10:26:58Z', + source_id: '1TdhTcwsUVOeEMWyPUpQIgF3pYr', + timestamp: '2019-11-15T15:56:53+05:30', + type: 'track', + userId: 'userId12345', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Missing required value from "event"', + statTags: { + destType: 'MAILCHIMP', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'mailchimp', + description: 'Test 18', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'dummyApiKey', + audienceId: 'aud111', + datacenterId: 'usXX', + }, + Enabled: true, + Transformations: [], + }, + message: { + anonymousId: 'userId12345', + channel: 'web', + context: { + traits: { + anonymousId: 'userId12345', + email: 'bob.dole@initech.com', + }, + }, + messageId: '6d1f3ca8-e2d0-4d34-9926-44596171af0c', + originalTimestamp: '2019-11-15T10:26:53Z', + receivedAt: '2019-11-15T15:56:58+05:30', + sentAt: '2019-11-15T10:26:58Z', + source_id: '1TdhTcwsUVOeEMWyPUpQIgF3pYr', + timestamp: '2019-11-15T15:56:53+05:30', + type: 'track', + event: 'local testing', + userId: 'userId12345', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://usXX.api.mailchimp.com/3.0/lists/aud111/members/48cd6232dc124497369f59c33d3eb4ab/events', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Basic YXBpS2V5OmR1bW15QXBpS2V5', + }, + params: {}, + body: { + JSON: { + name: 'local_testing', + occurred_at: '2019-11-15T10:26:53+00:00', + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + audienceId: 'aud111', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'mailchimp', + description: 'Test 19', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'dummyApiKey', + audienceId: 'aud111', + datacenterId: 'usXX', + }, + Enabled: true, + Transformations: [], + }, + message: { + anonymousId: 'userId12345', + channel: 'web', + context: { + traits: { + anonymousId: 'userId12345', + email: 'bob.dole@initech.com', + }, + }, + properties: { + brand: 'Aster', + product: 'Garments', + isSyncing: false, + products: [ + { + product_id: '123', + price: '14', + }, + { + product_id: '123', + price: 14, + }, + ], + purchased: false, + }, + messageId: '6d1f3ca8-e2d0-4d34-9926-44596171af0c', + originalTimestamp: '2019-11-15T10:26:53Z', + receivedAt: '2019-11-15T15:56:58+05:30', + sentAt: '2019-11-15T10:26:58Z', + source_id: '1TdhTcwsUVOeEMWyPUpQIgF3pYr', + timestamp: '2019-11-15T15:56:53+05:30', + type: 'track', + event: 'local testing', + userId: 'userId12345', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://usXX.api.mailchimp.com/3.0/lists/aud111/members/48cd6232dc124497369f59c33d3eb4ab/events', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Basic YXBpS2V5OmR1bW15QXBpS2V5', + }, + params: {}, + body: { + JSON: { + name: 'local_testing', + occurred_at: '2019-11-15T10:26:53+00:00', + is_syncing: false, + properties: { + brand: 'Aster', + product: 'Garments', + products: '[{"product_id":"123","price":"14"},{"product_id":"123","price":14}]', + purchased: 'false', + }, + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + audienceId: 'aud111', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'mailchimp', + description: 'Test 20', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'dummyApiKey', + audienceId: 'aud111', + datacenterId: 'usXX', + }, + Enabled: true, + Transformations: [], + }, + message: { + anonymousId: 'userId12345', + channel: 'web', + context: { + traits: { + anonymousId: 'userId12345', + email: 'bob.dole@initech.com', + }, + }, + properties: { + brand: 'Aster', + product: 'Garments', + isSyncing: false, + products: [ + { + product_id: '123', + price: '14', + }, + { + product_id: '123', + price: 14, + }, + ], + purchased: false, + }, + messageId: '6d1f3ca8-e2d0-4d34-9926-44596171af0c', + originalTimestamp: '2019-11-15T10:26:53Z', + receivedAt: '2019-11-15T15:56:58+05:30', + sentAt: '2019-11-15T10:26:58Z', + source_id: '1TdhTcwsUVOeEMWyPUpQIgF3pYr', + timestamp: '2019-11-15T15:56:53+05:30', + type: 'track', + event: 22, + userId: 'userId12345', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://usXX.api.mailchimp.com/3.0/lists/aud111/members/48cd6232dc124497369f59c33d3eb4ab/events', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Basic YXBpS2V5OmR1bW15QXBpS2V5', + }, + params: {}, + body: { + JSON: { + name: '22', + occurred_at: '2019-11-15T10:26:53+00:00', + is_syncing: false, + properties: { + brand: 'Aster', + product: 'Garments', + products: '[{"product_id":"123","price":"14"},{"product_id":"123","price":14}]', + purchased: 'false', + }, + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + audienceId: 'aud111', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'mailchimp', + description: 'Test 21', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'dummyApiKey', + audienceId: 'aud111', + datacenterId: 'usXX', + }, + Enabled: true, + Transformations: [], + }, + message: { + anonymousId: 'userId12345', + channel: 'web', + context: { + traits: { + anonymousId: 'userId12345', + email: 'bob.dole@initech.com', + }, + }, + properties: { + brand: 'Aster', + product: 'Garments', + isSyncing: false, + products: [ + { + product_id: '123', + price: '14', + }, + { + product_id: '123', + price: 14, + }, + ], + purchased: false, + }, + messageId: '6d1f3ca8-e2d0-4d34-9926-44596171af0c', + originalTimestamp: '2019-11-15T10:26:53Z', + receivedAt: '2019-11-15T15:56:58+05:30', + sentAt: '2019-11-15T10:26:58Z', + source_id: '1TdhTcwsUVOeEMWyPUpQIgF3pYr', + timestamp: '2019-11-15T15:56:53+05:30', + type: 'track', + event: 'E', + userId: 'userId12345', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Event name should be between 2 and 30 characters', + statTags: { + destType: 'MAILCHIMP', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'mailchimp', + description: 'Test 22', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'dummyApiKey', + audienceId: 'aud111', + datacenterId: 'usXX', + }, + Enabled: true, + Transformations: [], + }, + message: { + anonymousId: 'userId12345', + channel: 'web', + context: { + traits: { + anonymousId: 'userId12345', + email: 'bob.dole@initech.com', + }, + }, + properties: { + brand: 'Aster', + product: 'Garments', + isSyncing: false, + products: [ + { + product_id: '123', + price: '14', + }, + { + product_id: '123', + price: 14, + }, + ], + purchased: false, + }, + messageId: '6d1f3ca8-e2d0-4d34-9926-44596171af0c', + originalTimestamp: '2019-11-15T10:26:53Z', + receivedAt: '2019-11-15T15:56:58+05:30', + sentAt: '2019-11-15T10:26:58Z', + source_id: '1TdhTcwsUVOeEMWyPUpQIgF3pYr', + timestamp: '2019-11-15T15:56:53+05:30', + type: 'track', + event: 'Event Name more than 30 characters abcdefghijklmno', + userId: 'userId12345', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Event name should be between 2 and 30 characters', + statTags: { + destType: 'MAILCHIMP', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, +]; diff --git a/test/integrations/destinations/mailchimp/router/data.ts b/test/integrations/destinations/mailchimp/router/data.ts new file mode 100644 index 0000000000..f6a9627719 --- /dev/null +++ b/test/integrations/destinations/mailchimp/router/data.ts @@ -0,0 +1,977 @@ +export const data = [ + { + name: 'mailchimp', + description: 'Test 0', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'apikey', + audienceId: 'aud111', + datacenterId: 'usXX', + enableMergeFields: true, + }, + Enabled: true, + Transformations: [], + }, + metadata: { + jobId: 2, + }, + message: { + anonymousId: 'userId12345', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + anonymousId: 'userId12345', + email: 'bob.dole@initech.com', + firstName: 'Bob', + lastName: 'Dole', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36', + }, + integrations: { + All: true, + }, + messageId: '21e475b2-3694-477b-afb6-5b94a81aac21', + originalTimestamp: '2019-11-15T10:22:32Z', + receivedAt: '2019-11-15T15:52:37+05:30', + request_ip: '[::1]:62921', + sentAt: '2019-11-15T10:22:37Z', + source_id: '1TdhTcwsUVOeEMWyPUpQIgF3pYr', + timestamp: '2019-11-15T15:52:32+05:30', + type: 'identify', + userId: 'userId12345', + }, + }, + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'apikey', + audienceId: 'aud111', + datacenterId: 'usXX', + enableMergeFields: true, + }, + Enabled: true, + Transformations: [], + }, + metadata: { + jobId: 3, + }, + message: { + anonymousId: 'userId12345', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + anonymousId: 'userId12345', + email: 'bob.dole@initech.com', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36', + }, + integrations: { + MailChimp: { + subscriptionStatus: 'subscribed', + }, + }, + messageId: '6d1f3ca8-e2d0-4d34-9926-44596171af0c', + originalTimestamp: '2019-11-15T10:26:53Z', + receivedAt: '2019-11-15T15:56:58+05:30', + request_ip: '[::1]:62921', + sentAt: '2019-11-15T10:26:58Z', + source_id: '1TdhTcwsUVOeEMWyPUpQIgF3pYr', + timestamp: '2019-11-15T15:56:53+05:30', + type: 'identify', + userId: 'userId12345', + }, + }, + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'apikey', + audienceId: 'aud111', + datacenterId: 'usXX', + enableMergeFields: true, + }, + Enabled: true, + Transformations: [], + }, + metadata: { + jobId: 4, + }, + message: { + anonymousId: 'userId12345', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + anonymousId: 'userId12345', + email: 'bob.dole@initech.com', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36', + }, + integrations: { + MailChimp: { + subscriptionStatus: 'subscrib', + }, + }, + messageId: '6d1f3ca8-e2d0-4d34-9926-44596171af0c', + originalTimestamp: '2019-11-15T10:26:53Z', + receivedAt: '2019-11-15T15:56:58+05:30', + request_ip: '[::1]:62921', + sentAt: '2019-11-15T10:26:58Z', + source_id: '1TdhTcwsUVOeEMWyPUpQIgF3pYr', + timestamp: '2019-11-15T15:56:53+05:30', + type: 'identify', + userId: 'userId12345', + }, + }, + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'apikey', + audienceId: 'aud111', + datacenterId: 'usXX', + enableMergeFields: true, + }, + Enabled: true, + Transformations: [], + }, + metadata: { + jobId: 5, + }, + message: { + anonymousId: 'userId12345', + channel: 'web', + context: { + traits: { + anonymousId: 'userId12345', + email: 'bob.dole@initech.com', + }, + }, + properties: { + brand: 'Aster', + product: 'Garments', + }, + messageId: '6d1f3ca8-e2d0-4d34-9926-44596171af0c', + originalTimestamp: '2019-11-15T10:26:53Z', + receivedAt: '2019-11-15T15:56:58+05:30', + sentAt: '2019-11-15T10:26:58Z', + source_id: '1TdhTcwsUVOeEMWyPUpQIgF3pYr', + timestamp: '2019-11-15T15:56:53+05:30', + type: 'track', + event: 'local testing', + userId: 'userId12345', + }, + }, + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'apikey', + audienceId: 'aud111', + datacenterId: 'usXX', + enableMergeFields: true, + }, + Enabled: true, + Transformations: [], + }, + metadata: { + jobId: 6, + }, + message: { + anonymousId: 'userId12345', + channel: 'web', + context: { + traits: { + anonymousId: 'userId12345', + email: 'bob.dole@initech.com', + }, + }, + properties: { + brand: 'Aster', + product: 'Garments', + is_syncing: false, + }, + messageId: '6d1f3ca8-e2d0-4d34-9926-44596171af0c', + originalTimestamp: '2019-11-15T10:26:53Z', + receivedAt: '2019-11-15T15:56:58+05:30', + sentAt: '2019-11-15T10:26:58Z', + source_id: '1TdhTcwsUVOeEMWyPUpQIgF3pYr', + timestamp: '2019-11-15T15:56:53+05:30', + type: 'track', + userId: 'userId12345', + }, + }, + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'apikey', + audienceId: 'aud111', + datacenterId: 'usXX', + enableMergeFields: true, + }, + Enabled: true, + Transformations: [], + }, + metadata: { + jobId: 7, + }, + message: { + anonymousId: 'userId12345', + channel: 'web', + context: { + traits: { + anonymousId: 'userId12345', + email: 'bob.dole@initech.com', + }, + }, + properties: { + brand: 'Aster', + product: 'Garments', + isSyncing: false, + products: [ + { + product_id: '123', + price: '14', + }, + { + product_id: '123', + price: 14, + }, + ], + purchased: false, + }, + messageId: '6d1f3ca8-e2d0-4d34-9926-44596171af0c', + originalTimestamp: '2019-11-15T10:26:53Z', + receivedAt: '2019-11-15T15:56:58+05:30', + sentAt: '2019-11-15T10:26:58Z', + source_id: '1TdhTcwsUVOeEMWyPUpQIgF3pYr', + timestamp: '2019-11-15T15:56:53+05:30', + type: 'track', + event: 'local testing', + userId: 'userId12345', + }, + }, + ], + destType: 'mailchimp', + }, + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://usXX.api.mailchimp.com/3.0/lists/aud111?skip_merge_validation=true&skip_duplicate_check=false', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Basic YXBpS2V5OmFwaWtleQ==', + }, + params: {}, + body: { + JSON: { + members: [ + { + email_address: 'bob.dole@initech.com', + merge_fields: { + FNAME: 'Bob', + LNAME: 'Dole', + ANONYMOUSI: 'userId12345', + }, + status: 'subscribed', + }, + { + email_address: 'bob.dole@initech.com', + merge_fields: { + ANONYMOUSI: 'userId12345', + }, + status: 'subscribed', + }, + ], + update_existing: true, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + metadata: [ + { + jobId: 2, + }, + { + jobId: 3, + }, + ], + batched: true, + statusCode: 200, + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'apikey', + audienceId: 'aud111', + datacenterId: 'usXX', + enableMergeFields: true, + }, + Enabled: true, + Transformations: [], + }, + }, + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://usXX.api.mailchimp.com/3.0/lists/aud111/members/48cd6232dc124497369f59c33d3eb4ab/events', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Basic YXBpS2V5OmFwaWtleQ==', + }, + params: {}, + body: { + JSON: { + name: 'local_testing', + occurred_at: '2019-11-15T10:26:53+00:00', + properties: { + brand: 'Aster', + product: 'Garments', + }, + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + audienceId: 'aud111', + }, + metadata: [ + { + jobId: 5, + }, + ], + batched: false, + statusCode: 200, + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'apikey', + audienceId: 'aud111', + datacenterId: 'usXX', + enableMergeFields: true, + }, + Enabled: true, + Transformations: [], + }, + }, + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://usXX.api.mailchimp.com/3.0/lists/aud111/members/48cd6232dc124497369f59c33d3eb4ab/events', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Basic YXBpS2V5OmFwaWtleQ==', + }, + params: {}, + body: { + JSON: { + name: 'local_testing', + occurred_at: '2019-11-15T10:26:53+00:00', + is_syncing: false, + properties: { + brand: 'Aster', + product: 'Garments', + products: + '[{"product_id":"123","price":"14"},{"product_id":"123","price":14}]', + purchased: 'false', + }, + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + audienceId: 'aud111', + }, + metadata: [ + { + jobId: 7, + }, + ], + batched: false, + statusCode: 200, + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'apikey', + audienceId: 'aud111', + datacenterId: 'usXX', + enableMergeFields: true, + }, + Enabled: true, + Transformations: [], + }, + }, + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'apikey', + audienceId: 'aud111', + datacenterId: 'usXX', + enableMergeFields: true, + }, + Enabled: true, + Transformations: [], + }, + metadata: [ + { + jobId: 6, + }, + ], + batched: false, + statusCode: 400, + error: 'Missing required value from "event"', + statTags: { + destType: 'MAILCHIMP', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'router', + implementation: 'native', + module: 'destination', + }, + }, + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'apikey', + audienceId: 'aud111', + datacenterId: 'usXX', + enableMergeFields: true, + }, + Enabled: true, + Transformations: [], + }, + metadata: [ + { + jobId: 4, + }, + ], + batched: false, + statusCode: 400, + error: + 'The status must be one of [subscribed, unsubscribed, cleaned, pending, transactional]', + statTags: { + destType: 'MAILCHIMP', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'router', + implementation: 'native', + module: 'destination', + }, + }, + ], + }, + }, + }, + }, + { + name: 'mailchimp', + description: 'events batching', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'apiKey-dummyApiKey', + audienceId: '1232yyqw22', + datacenterId: 'us20', + }, + Enabled: true, + Transformations: [], + }, + metadata: { + jobId: 2, + }, + message: { + anonymousId: 'userId12345', + channel: 'web', + context: { + mappedToDestination: true, + externalId: [ + { + identifierType: 'email_address', + id: 'bob.dole@initech.com', + type: 'audience', + }, + ], + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36', + }, + integrations: { + All: true, + }, + traits: { + merge_fields: { + FIRSTNAME: 'Bob', + }, + status: 'subscribed', + }, + messageId: '21e475b2-3694-477b-afb6-5b94a81aac21', + originalTimestamp: '2019-11-15T10:22:32Z', + receivedAt: '2019-11-15T15:52:37+05:30', + request_ip: '[::1]:62921', + sentAt: '2019-11-15T10:22:37Z', + source_id: '1TdhTcwsUVOeEMWyPUpQIgF3pYr', + timestamp: '2019-11-15T15:52:32+05:30', + type: 'identify', + userId: 'userId12345', + }, + }, + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'apiKey-dummyApiKey', + audienceId: '1232yyqw22', + datacenterId: 'us20', + }, + Enabled: true, + Transformations: [], + }, + metadata: { + jobId: 3, + }, + message: { + type: 'identify', + traits: { + status: 'subscribed', + }, + userId: 'emrichardson820+22822@gmail.com', + channel: 'sources', + context: { + sources: { + job_id: '24c5HJxHomh6YCngEOCgjS5r1KX/Syncher', + task_id: 'vw_rs_mailchimp_mocked_hg_data', + version: 'v1.8.1', + batch_id: 'f252c69d-c40d-450e-bcd2-2cf26cb62762', + job_run_id: 'c8el40l6e87v0c4hkbl0', + task_run_id: 'c8el40l6e87v0c4hkblg', + }, + externalId: [ + { + id: 'emrichardson820+22822@gmail.com', + type: 'MAILCHIMP-92e1f1ad2c', + identifierType: 'email_address', + }, + ], + mappedToDestination: 'true', + }, + recordId: '1', + rudderId: '4d5d0ed0-9db8-41cc-9bb0-a032f6bfa97a', + messageId: 'b3bee036-fc26-4f6d-9867-c17f85708a82', + }, + }, + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'apiKey-dummyApiKey', + audienceId: '1232yyqw22', + datacenterId: 'us20', + }, + Enabled: true, + Transformations: [], + }, + metadata: { + jobId: 4, + }, + message: { + type: 'identify', + traits: { + status: 'subscribed', + }, + userId: 'emrichardson820+22822@gmail.com', + channel: 'sources', + context: { + sources: { + job_id: '24c5HJxHomh6YCngEOCgjS5r1KX/Syncher', + task_id: 'vw_rs_mailchimp_mocked_hg_data', + version: 'v1.8.1', + batch_id: 'f252c69d-c40d-450e-bcd2-2cf26cb62762', + job_run_id: 'c8el40l6e87v0c4hkbl0', + task_run_id: 'c8el40l6e87v0c4hkblg', + }, + externalId: [ + { + id: 'emrichardson820+22822@gmail.com', + type: 'MAILCHIMP-92e1f1ad2c', + identifierType: 'email_address', + }, + ], + mappedToDestination: 'true', + }, + recordId: '1', + rudderId: '4d5d0ed0-9db8-41cc-9bb0-a032f6bfa97a', + messageId: 'b3bee036-fc26-4f6d-9867-c17f85708a82', + }, + }, + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'apiKey-dummyApiKey', + audienceId: '1232yyqw22', + datacenterId: 'us20', + }, + Enabled: true, + Transformations: [], + }, + metadata: { + jobId: 5, + }, + message: { + type: 'identify', + traits: { + status: 'subscrib', + }, + userId: 'emrichardson820+22822@gmail.com', + channel: 'sources', + context: { + sources: { + job_id: '24c5HJxHomh6YCngEOCgjS5r1KX/Syncher', + task_id: 'vw_rs_mailchimp_mocked_hg_data', + version: 'v1.8.1', + batch_id: 'f252c69d-c40d-450e-bcd2-2cf26cb62762', + job_run_id: 'c8el40l6e87v0c4hkbl0', + task_run_id: 'c8el40l6e87v0c4hkblg', + }, + externalId: [ + { + id: 'emrichardson820+22822@gmail.com', + type: 'MAILCHIMP-92e1f1ad2c', + identifierType: 'email_address', + }, + ], + mappedToDestination: 'true', + }, + recordId: '1', + rudderId: '4d5d0ed0-9db8-41cc-9bb0-a032f6bfa97a', + messageId: 'b3bee036-fc26-4f6d-9867-c17f85708a82', + }, + }, + ], + destType: 'mailchimp', + }, + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://us20.api.mailchimp.com/3.0/lists/1232yyqw22?skip_merge_validation=false&skip_duplicate_check=false', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Basic YXBpS2V5OmFwaUtleS1kdW1teUFwaUtleQ==', + }, + params: {}, + body: { + JSON: { + members: [ + { + merge_fields: { + FIRSTNAME: 'Bob', + }, + status: 'subscribed', + email_address: 'bob.dole@initech.com', + }, + { + status: 'subscribed', + email_address: 'emrichardson820+22822@gmail.com', + }, + { + status: 'subscribed', + email_address: 'emrichardson820+22822@gmail.com', + }, + ], + update_existing: true, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + metadata: [ + { + jobId: 2, + }, + { + jobId: 3, + }, + { + jobId: 4, + }, + ], + batched: true, + statusCode: 200, + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'apiKey-dummyApiKey', + audienceId: '1232yyqw22', + datacenterId: 'us20', + }, + Enabled: true, + Transformations: [], + }, + }, + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'apiKey-dummyApiKey', + audienceId: '1232yyqw22', + datacenterId: 'us20', + }, + Enabled: true, + Transformations: [], + }, + metadata: [ + { + jobId: 5, + }, + ], + batched: false, + statusCode: 400, + error: + 'The status must be one of [subscribed, unsubscribed, cleaned, pending, transactional]', + statTags: { + destType: 'MAILCHIMP', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'router', + implementation: 'native', + module: 'destination', + }, + }, + ], + }, + }, + }, + }, +]; diff --git a/test/integrations/destinations/marketo/network.ts b/test/integrations/destinations/marketo/network.ts index b7ae48b23f..9c28a9aef1 100644 --- a/test/integrations/destinations/marketo/network.ts +++ b/test/integrations/destinations/marketo/network.ts @@ -248,10 +248,10 @@ export const networkCallsData = [ }, httpRes: { data: { - "access_token": "access_token_success", - "expires_in": 3599, - "scope": "integrations@rudderstack.com", - "token_type": "bearer" + access_token: 'access_token_success', + expires_in: 3599, + scope: 'integrations@rudderstack.com', + token_type: 'bearer', }, status: 200, statusText: 'OK', @@ -264,10 +264,10 @@ export const networkCallsData = [ }, httpRes: { data: { - "access_token": "access_token_expired", - "expires_in": 0, - "scope": "integrations@rudderstack.com", - "token_type": "bearer" + access_token: 'access_token_expired', + expires_in: 0, + scope: 'integrations@rudderstack.com', + token_type: 'bearer', }, status: 200, statusText: 'OK', @@ -280,14 +280,14 @@ export const networkCallsData = [ }, httpRes: { data: { - "requestId": "7ab2#17672a46a99", - "result": [ + requestId: '7ab2#17672a46a99', + result: [ { - "id": 4, - "status": "created" - } + id: 4, + status: 'created', + }, ], - "success": true + success: true, }, status: 200, statusText: 'OK', @@ -300,9 +300,9 @@ export const networkCallsData = [ }, httpRes: { data: { - "requestId": "107#17672aeadba", - "result": [], - "success": true + requestId: '107#17672aeadba', + result: [], + success: true, }, status: 200, statusText: 'OK', @@ -315,19 +315,19 @@ export const networkCallsData = [ }, httpRes: { data: { - "requestId": "12093#17672aeaee6", - "result": [ + requestId: '12093#17672aeaee6', + result: [ { - "createdAt": "2020-12-17T21:39:07Z", - "email": null, - "firstName": null, - "id": 4, - "lastName": null, - "updatedAt": "2020-12-17T21:39:07Z", - "userId": "test-user-6j55yr" - } + createdAt: '2020-12-17T21:39:07Z', + email: null, + firstName: null, + id: 4, + lastName: null, + updatedAt: '2020-12-17T21:39:07Z', + userId: 'test-user-6j55yr', + }, ], - "success": true + success: true, }, status: 200, statusText: 'OK', @@ -340,13 +340,13 @@ export const networkCallsData = [ }, httpRes: { data: { - "success": false, - "errors": [ + success: false, + errors: [ { - "code": "601", - "message": "Access Token Expired" - } - ] + code: '601', + message: 'Access Token Expired', + }, + ], }, status: 200, statusText: 'OK', @@ -359,7 +359,7 @@ export const networkCallsData = [ }, httpRes: { data: { - "access_token": "test_acess" + access_token: 'test_acess', }, status: 200, statusText: 'OK', @@ -372,7 +372,7 @@ export const networkCallsData = [ }, httpRes: { data: { - "access_token": "test_access_token" + access_token: 'test_access_token', }, status: 200, statusText: 'OK', @@ -385,24 +385,24 @@ export const networkCallsData = [ }, httpRes: { data: { - "requestId": "7fa1#17fd1da66fe", - "result": [ + requestId: '7fa1#17fd1da66fe', + result: [ { - "name": "API Lead", - "searchableFields": [["email"]], - "fields": [ + name: 'API Lead', + searchableFields: [['email']], + fields: [ { - "name": "email", - "displayName": "Email Address", - "dataType": "email", - "length": 255, - "updateable": true, - "crmManaged": false - } - ] - } + name: 'email', + displayName: 'Email Address', + dataType: 'email', + length: 255, + updateable: true, + crmManaged: false, + }, + ], + }, ], - "success": true + success: true, }, status: 200, statusText: 'OK', @@ -415,15 +415,15 @@ export const networkCallsData = [ }, httpRes: { data: { - "requestId": "5bdd#17fd1ff88cd", - "result": [ + requestId: '5bdd#17fd1ff88cd', + result: [ { - "batchId": 2977, - "importId": "2977", - "status": "Queued" - } + batchId: 2977, + importId: '2977', + status: 'Queued', + }, ], - "success": true + success: true, }, status: 200, statusText: 'OK', @@ -436,7 +436,7 @@ export const networkCallsData = [ }, httpRes: { data: { - "access_token": "test_access_token" + access_token: 'test_access_token', }, status: 200, statusText: 'OK', @@ -449,7 +449,7 @@ export const networkCallsData = [ }, httpRes: { data: { - "access_token": "test_access_token" + access_token: 'test_access_token', }, status: 200, statusText: 'OK', @@ -462,24 +462,24 @@ export const networkCallsData = [ }, httpRes: { data: { - "requestId": "7fa1#17fd1da66fe", - "result": [ + requestId: '7fa1#17fd1da66fe', + result: [ { - "name": "API Lead", - "searchableFields": [["email"]], - "fields": [ + name: 'API Lead', + searchableFields: [['email']], + fields: [ { - "name": "email", - "displayName": "Email Address", - "dataType": "email", - "length": 255, - "updateable": true, - "crmManaged": false - } - ] - } + name: 'email', + displayName: 'Email Address', + dataType: 'email', + length: 255, + updateable: true, + crmManaged: false, + }, + ], + }, ], - "success": true + success: true, }, status: 200, statusText: 'OK', @@ -492,7 +492,7 @@ export const networkCallsData = [ }, httpRes: { data: { - "access_token": "test_access_token" + access_token: 'test_access_token', }, status: 200, statusText: 'OK', @@ -505,12 +505,12 @@ export const networkCallsData = [ }, httpRes: { data: { - "errors": [ + errors: [ { - "message": "Any 400 error", - "code": 1000 - } - ] + message: 'Any 400 error', + code: 1000, + }, + ], }, status: 200, statusText: 'OK', @@ -523,7 +523,7 @@ export const networkCallsData = [ }, httpRes: { data: { - "access_token": "test_access_token" + access_token: 'test_access_token', }, status: 200, statusText: 'OK', @@ -536,7 +536,7 @@ export const networkCallsData = [ }, httpRes: { data: { - "access_token": "test_access_token" + access_token: 'test_access_token', }, status: 200, statusText: 'OK', @@ -549,12 +549,12 @@ export const networkCallsData = [ }, httpRes: { data: { - "errors": [ + errors: [ { - "message": "Any 500 error", - "code": 502 - } - ] + message: 'Any 500 error', + code: 502, + }, + ], }, status: 200, statusText: 'OK', @@ -566,7 +566,7 @@ export const networkCallsData = [ method: 'GET', }, httpRes: { - data: "data \n data", + data: 'data \n data', status: 200, statusText: 'OK', }, @@ -577,7 +577,7 @@ export const networkCallsData = [ method: 'GET', }, httpRes: { - data: "data \n data", + data: 'data \n data', status: 200, statusText: 'OK', }, @@ -589,10 +589,10 @@ export const networkCallsData = [ }, httpRes: { data: { - "access_token": "access_token_success", - "expires_in": 3599, - "scope": "integrations@rudderstack.com", - "token_type": "bearer" + access_token: 'access_token_success', + expires_in: 3599, + scope: 'integrations@rudderstack.com', + token_type: 'bearer', }, status: 200, statusText: 'OK', @@ -605,24 +605,24 @@ export const networkCallsData = [ }, httpRes: { data: { - "requestId": "7fa1#17fd1da66fe", - "result": [ + requestId: '7fa1#17fd1da66fe', + result: [ { - "name": "API Lead", - "searchableFields": [["email"]], - "fields": [ + name: 'API Lead', + searchableFields: [['email']], + fields: [ { - "name": "email", - "displayName": "Email Address", - "dataType": "email", - "length": 255, - "updateable": true, - "crmManaged": false - } - ] - } + name: 'email', + displayName: 'Email Address', + dataType: 'email', + length: 255, + updateable: true, + crmManaged: false, + }, + ], + }, ], - "success": true + success: true, }, status: 200, statusText: 'OK', @@ -635,12 +635,12 @@ export const networkCallsData = [ }, httpRes: { data: { - "success": false, - "errors": [ + success: false, + errors: [ { - "code": 603 - } - ] + code: 603, + }, + ], }, status: 200, statusText: 'OK', @@ -653,10 +653,10 @@ export const networkCallsData = [ }, httpRes: { data: { - "access_token": "access_token_success", - "expires_in": 3599, - "scope": "integrations@rudderstack.com", - "token_type": "bearer" + access_token: 'access_token_success', + expires_in: 3599, + scope: 'integrations@rudderstack.com', + token_type: 'bearer', }, status: 200, statusText: 'OK', @@ -669,24 +669,24 @@ export const networkCallsData = [ }, httpRes: { data: { - "requestId": "7fa1#17fd1da66fe", - "result": [ + requestId: '7fa1#17fd1da66fe', + result: [ { - "name": "API Lead", - "searchableFields": [["email"]], - "fields": [ + name: 'API Lead', + searchableFields: [['email']], + fields: [ { - "name": "Email", - "displayName": "Email Address", - "dataType": "email", - "length": 255, - "updateable": true, - "crmManaged": false - } - ] - } + name: 'Email', + displayName: 'Email Address', + dataType: 'email', + length: 255, + updateable: true, + crmManaged: false, + }, + ], + }, ], - "success": true + success: true, }, status: 200, statusText: 'OK', @@ -699,12 +699,12 @@ export const networkCallsData = [ }, httpRes: { data: { - "success": false, - "errors": [ + success: false, + errors: [ { - "message": "There are 10 imports currently being processed. Please try again later" - } - ] + message: 'There are 10 imports currently being processed. Please try again later', + }, + ], }, status: 200, statusText: 'OK', @@ -717,24 +717,24 @@ export const networkCallsData = [ }, httpRes: { data: { - "requestId": "7fa1#17fd1da66fe", - "result": [ + requestId: '7fa1#17fd1da66fe', + result: [ { - "name": "API Lead", - "searchableFields": [["email"]], - "fields": [ + name: 'API Lead', + searchableFields: [['email']], + fields: [ { - "name": "Email", - "displayName": "Email Address", - "dataType": "email", - "length": 255, - "updateable": true, - "crmManaged": false - } - ] - } + name: 'Email', + displayName: 'Email Address', + dataType: 'email', + length: 255, + updateable: true, + crmManaged: false, + }, + ], + }, ], - "success": true + success: true, }, status: 200, statusText: 'OK', @@ -747,12 +747,12 @@ export const networkCallsData = [ }, httpRes: { data: { - "success": false, - "errors": [ + success: false, + errors: [ { - "message": "Empty file" - } - ] + message: 'Empty file', + }, + ], }, status: 200, statusText: 'OK', @@ -765,24 +765,24 @@ export const networkCallsData = [ }, httpRes: { data: { - "requestId": "7fa1#17fd1da66fe", - "result": [ + requestId: '7fa1#17fd1da66fe', + result: [ { - "name": "API Lead", - "searchableFields": [["email"]], - "fields": [ + name: 'API Lead', + searchableFields: [['email']], + fields: [ { - "name": "Email", - "displayName": "Email Address", - "dataType": "email", - "length": 255, - "updateable": true, - "crmManaged": false - } - ] - } + name: 'Email', + displayName: 'Email Address', + dataType: 'email', + length: 255, + updateable: true, + crmManaged: false, + }, + ], + }, ], - "success": true + success: true, }, status: 200, statusText: 'OK', @@ -795,12 +795,12 @@ export const networkCallsData = [ }, httpRes: { data: { - "success": false, - "errors": [ + success: false, + errors: [ { - "message": "Any other error" - } - ] + message: 'Any other error', + }, + ], }, status: 200, statusText: 'OK', @@ -813,10 +813,10 @@ export const networkCallsData = [ }, httpRes: { data: { - "access_token": "access_token_success", - "expires_in": 3599, - "scope": "integrations@rudderstack.com", - "token_type": "bearer" + access_token: 'access_token_success', + expires_in: 3599, + scope: 'integrations@rudderstack.com', + token_type: 'bearer', }, status: 200, statusText: 'OK', @@ -829,9 +829,9 @@ export const networkCallsData = [ }, httpRes: { data: { - "requestId": "12093#17672aeaee6", - "result": [], - "success": true + requestId: '12093#17672aeaee6', + result: [], + success: true, }, status: 200, statusText: 'OK', @@ -844,14 +844,14 @@ export const networkCallsData = [ }, httpRes: { data: { - "requestId": "142e4#1835b117b76", - "success": false, - "errors": [ + requestId: '142e4#1835b117b76', + success: false, + errors: [ { - "code": "1006", - "message": "Lookup field 'userId' not found" - } - ] + code: '1006', + message: "Lookup field 'userId' not found", + }, + ], }, status: 200, statusText: 'OK', @@ -864,10 +864,10 @@ export const networkCallsData = [ }, httpRes: { data: { - "access_token": "access_token_success", - "expires_in": 3599, - "scope": "integrations@rudderstack.com", - "token_type": "bearer" + access_token: 'access_token_success', + expires_in: 3599, + scope: 'integrations@rudderstack.com', + token_type: 'bearer', }, status: 200, statusText: 'OK', @@ -880,9 +880,9 @@ export const networkCallsData = [ }, httpRes: { data: { - "requestId": "12093#17672aeaee6", - "result": [], - "success": true + requestId: '12093#17672aeaee6', + result: [], + success: true, }, status: 200, statusText: 'OK', @@ -895,14 +895,14 @@ export const networkCallsData = [ }, httpRes: { data: { - "requestId": "142e4#1835b117b76", - "success": false, - "errors": [ + requestId: '142e4#1835b117b76', + success: false, + errors: [ { - "code": "random_marketo_code", - "message": "some other problem" - } - ] + code: 'random_marketo_code', + message: 'some other problem', + }, + ], }, status: 200, statusText: 'OK', @@ -915,10 +915,10 @@ export const networkCallsData = [ }, httpRes: { data: { - "access_token": "access_token_success", - "expires_in": 3599, - "scope": "integrations@rudderstack.com", - "token_type": "bearer" + access_token: 'access_token_success', + expires_in: 3599, + scope: 'integrations@rudderstack.com', + token_type: 'bearer', }, status: 200, statusText: 'OK', @@ -931,14 +931,14 @@ export const networkCallsData = [ }, httpRes: { data: { - "requestId": "7ab2#17672a46a99", - "result": [ + requestId: '7ab2#17672a46a99', + result: [ { - "id": 4, - "status": "created" - } + id: 4, + status: 'created', + }, ], - "success": true + success: true, }, status: 200, statusText: 'OK', @@ -951,22 +951,22 @@ export const networkCallsData = [ }, httpRes: { data: { - "requestId": "12093#17672aeaee6", - "result": [ + requestId: '12093#17672aeaee6', + result: [ { - "createdAt": "2022-09-17T21:39:07Z", - "email": "0c7b8b80-9c43-4f8e-b2d2-5e2448a25040@j.mail", - "firstName": "random_first", - "id": 4, - "lastName": "random_last", - "updatedAt": "2022-09-20T21:48:07Z", - "userId": "test-user-957ue" - } + createdAt: '2022-09-17T21:39:07Z', + email: '0c7b8b80-9c43-4f8e-b2d2-5e2448a25040@j.mail', + firstName: 'random_first', + id: 4, + lastName: 'random_last', + updatedAt: '2022-09-20T21:48:07Z', + userId: 'test-user-957ue', + }, ], - "success": true + success: true, }, status: 200, statusText: 'OK', }, - } + }, ]; diff --git a/test/integrations/destinations/marketo/router/data.ts b/test/integrations/destinations/marketo/router/data.ts index 327f470627..0fa79b77df 100644 --- a/test/integrations/destinations/marketo/router/data.ts +++ b/test/integrations/destinations/marketo/router/data.ts @@ -1,2140 +1,2132 @@ export const data = [ - { - name: 'marketo', - description: 'Test 0', - feature: 'router', - module: 'destination', - version: 'v0', - input: { - request: { - body: { - input: [ + { + name: 'marketo', + description: 'Test 0', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + message: { + anonymousId: 'anon_id_success', + channel: 'mobile', + context: { + app: { + build: '1', + name: 'TestAppName', + namespace: 'com.android.sample', + version: '1.0', + }, + device: { + id: 'anon_id_success', + manufacturer: 'Google', + model: 'Android SDK built for x86', + name: 'generic_x86', + type: 'android', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.1-beta.1', + }, + locale: 'en-US', + network: { + carrier: 'Android', + bluetooth: false, + cellular: true, + wifi: true, + }, + os: { + name: 'Android', + version: '8.1.0', + }, + screen: { + density: 420, + height: 1794, + width: 1080, + }, + timezone: 'Asia/Kolkata', + traits: { + anonymousId: 'anon_id_success', + }, + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)', + }, + event: 'Product Clicked', + integrations: { + All: true, + }, + messageId: 'id1', + properties: { + name: 'Test Product', + }, + originalTimestamp: '2020-12-17T21:00:59.176Z', + type: 'track', + sentAt: '2020-03-12T09:05:03.421Z', + }, + metadata: { + jobId: 1, + }, + destination: { + Config: { + accountId: 'marketo_acct_id_success', + clientId: 'marketo_client_id_success', + clientSecret: 'marketo_client_secret_success', + trackAnonymousEvents: true, + customActivityPropertyMap: [ + { + from: 'name', + to: 'productName', + }, + ], + leadTraitMapping: [ + { + from: 'leadScore', + to: 'customLeadScore', + }, + ], + rudderEventsMapping: [ + { + event: 'Product Clicked', + marketoPrimarykey: 'name', + marketoActivityId: '100001', + }, + ], + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + name: 'Marketo', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmLd', + deleted: false, + createdAt: '2020-12-30T08:39:32.005Z', + updatedAt: '2021-02-03T16:22:31.374Z', + destinationDefinition: { + config: { + destConfig: { + defaultConfig: [ + 'accountId', + 'clientId', + 'clientSecret', + 'trackAnonymousEvents', + 'rudderEventsMapping', + 'customActivityPropertyMap', + 'leadTraitMapping', + ], + }, + secretKeys: ['clientSecret'], + excludeKeys: [], + includeKeys: [], + routerTransform: true, + supportedSourceTypes: [ + 'android', + 'ios', + 'web', + 'unity', + 'amp', + 'cloud', + 'reactnative', + ], + }, + responseRules: { + responseType: 'JSON', + rules: { + retryable: [ + { + success: 'false', + 'errors.0.code': 600, + }, + { + success: 'false', + 'errors.0.code': 601, + }, + { + success: 'false', + 'errors.0.code': 602, + }, + { + success: 'false', + 'errors.0.code': 604, + }, + { + success: 'false', + 'errors.0.code': 606, + }, + { + success: 'false', + 'errors.0.code': 607, + }, + { + success: 'false', + 'errors.0.code': 608, + }, { - "message": { - "anonymousId": "anon_id_success", - "channel": "mobile", - "context": { - "app": { - "build": "1", - "name": "TestAppName", - "namespace": "com.android.sample", - "version": "1.0" - }, - "device": { - "id": "anon_id_success", - "manufacturer": "Google", - "model": "Android SDK built for x86", - "name": "generic_x86", - "type": "android" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.1-beta.1" - }, - "locale": "en-US", - "network": { - "carrier": "Android", - "bluetooth": false, - "cellular": true, - "wifi": true - }, - "os": { - "name": "Android", - "version": "8.1.0" - }, - "screen": { - "density": 420, - "height": 1794, - "width": 1080 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "anon_id_success" - }, - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)" - }, - "event": "Product Clicked", - "integrations": { - "All": true - }, - "messageId": "id1", - "properties": { - "name": "Test Product" - }, - "originalTimestamp": "2020-12-17T21:00:59.176Z", - "type": "track", - "sentAt": "2020-03-12T09:05:03.421Z" - }, - "metadata": { - "jobId": 1 - }, - "destination": { - "Config": { - "accountId": "marketo_acct_id_success", - "clientId": "marketo_client_id_success", - "clientSecret": "marketo_client_secret_success", - "trackAnonymousEvents": true, - "customActivityPropertyMap": [ - { - "from": "name", - "to": "productName" - } - ], - "leadTraitMapping": [ - { - "from": "leadScore", - "to": "customLeadScore" - } - ], - "rudderEventsMapping": [ - { - "event": "Product Clicked", - "marketoPrimarykey": "name", - "marketoActivityId": "100001" - } - ] - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Marketo", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "config": { - "destConfig": { - "defaultConfig": [ - "accountId", - "clientId", - "clientSecret", - "trackAnonymousEvents", - "rudderEventsMapping", - "customActivityPropertyMap", - "leadTraitMapping" - ] - }, - "secretKeys": [ - "clientSecret" - ], - "excludeKeys": [], - "includeKeys": [], - "routerTransform": true, - "supportedSourceTypes": [ - "android", - "ios", - "web", - "unity", - "amp", - "cloud", - "reactnative" - ] - }, - "responseRules": { - "responseType": "JSON", - "rules": { - "retryable": [ - { - "success": "false", - "errors.0.code": 600 - }, - { - "success": "false", - "errors.0.code": 601 - }, - { - "success": "false", - "errors.0.code": 602 - }, - { - "success": "false", - "errors.0.code": 604 - }, - { - "success": "false", - "errors.0.code": 606 - }, - { - "success": "false", - "errors.0.code": 607 - }, - { - "success": "false", - "errors.0.code": 608 - }, - { - "success": "false", - "errors.0.code": 611 - } - ], - "abortable": [ - { - "success": "false", - "errors.0.code": 603 - }, - { - "success": "false", - "errors.0.code": 605 - }, - { - "success": "false", - "errors.0.code": 609 - }, - { - "success": "false", - "errors.0.code": 610 - } - ] - } - }, - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "MARKETO", - "displayName": "Marketo", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - }, - { - "message": { - "anonymousId": "anon_id_success", - "channel": "mobile", - "context": { - "app": { - "build": "1", - "name": "TestAppName", - "namespace": "com.android.sample", - "version": "1.0" - }, - "device": { - "id": "anon_id_success", - "manufacturer": "Google", - "model": "Android SDK built for x86", - "name": "generic_x86", - "type": "android" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.1-beta.1" - }, - "locale": "en-US", - "network": { - "carrier": "Android", - "bluetooth": false, - "cellular": true, - "wifi": true - }, - "os": { - "name": "Android", - "version": "8.1.0" - }, - "screen": { - "density": 420, - "height": 1794, - "width": 1080 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "anon_id_success" - }, - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)" - }, - "event": "Product Clicked", - "integrations": { - "All": true - }, - "messageId": "id1", - "properties": { - "name": "Test Product", - "product_id": "prod_1" - }, - "originalTimestamp": "2020-12-17T21:00:59.176Z", - "type": "track", - "sentAt": "2020-12-17T21:00:59.176Z" - }, - "metadata": { - "jobId": 2 - }, - "destination": { - "Config": { - "accountId": "marketo_acct_id_success", - "clientId": "marketo_client_id_success", - "clientSecret": "marketo_client_secret_success", - "trackAnonymousEvents": true, - "customActivityPropertyMap": [ - { - "from": "name", - "to": "productName" - } - ], - "leadTraitMapping": [ - { - "from": "leadScore", - "to": "customLeadScore" - } - ], - "rudderEventsMapping": [ - { - "event": "Product Clicked", - "marketoPrimarykey": "name", - "marketoActivityId": "100001" - } - ] - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Marketo", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "config": { - "destConfig": { - "defaultConfig": [ - "accountId", - "clientId", - "clientSecret", - "trackAnonymousEvents", - "rudderEventsMapping", - "customActivityPropertyMap", - "leadTraitMapping" - ] - }, - "secretKeys": [ - "clientSecret" - ], - "excludeKeys": [], - "includeKeys": [], - "routerTransform": true, - "supportedSourceTypes": [ - "android", - "ios", - "web", - "unity", - "amp", - "cloud", - "reactnative" - ] - }, - "responseRules": { - "responseType": "JSON", - "rules": { - "retryable": [ - { - "success": "false", - "errors.0.code": 600 - }, - { - "success": "false", - "errors.0.code": 601 - }, - { - "success": "false", - "errors.0.code": 602 - }, - { - "success": "false", - "errors.0.code": 604 - }, - { - "success": "false", - "errors.0.code": 606 - }, - { - "success": "false", - "errors.0.code": 607 - }, - { - "success": "false", - "errors.0.code": 608 - }, - { - "success": "false", - "errors.0.code": 611 - } - ], - "abortable": [ - { - "success": "false", - "errors.0.code": 603 - }, - { - "success": "false", - "errors.0.code": 605 - }, - { - "success": "false", - "errors.0.code": 609 - }, - { - "success": "false", - "errors.0.code": 610 - } - ] - } - }, - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "MARKETO", - "displayName": "Marketo", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - }, - { - "message": { - "type": "identify", - "sentAt": "2022-09-19T10:34:02.002Z", - "userId": "e17c5a5e-5e2f-430b-b497-fe3f1ea3a704", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "2.12.1", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "https://accounts.app.t2.broken.com/home", - "path": "/home", - "title": "Home", - "search": "", - "tab_url": "https://accounts.app.t2.broken.com/home", - "referrer": "https://ts50-cvii.core.broken.org/", - "initial_referrer": "https://ts50-cvii.core.broken.org/", - "referring_domain": "ts50-cvii.core.broken.org", - "initial_referring_domain": "ts50-cvii.core.broken.org" - }, - "locale": "en-IN", - "screen": { - "width": 1728, - "height": 1117, - "density": 2, - "innerWidth": 1728, - "innerHeight": 969 - }, - "traits": { - "name": "AM", - "email": "0c7b8b80-9c43-4f8e-b2d2-5e2448a25040@j.mail", - "lastName": "M", - "firstName": "A", - "accountName": "MACDEV", - "billingName": "g g", - "companyName": "macDev", - "currentTier": "Webinar Pro 250", - "billingCycle": "Annually", - "lastBillingDate": "2022-06-29T09:40:42.000Z", - "nextBillingDate": "2023-09-09T04:00:00.000Z", - "subscriptionType": "Webinar Pro 250", - "subscriptionStatus": "ACTIVE", - "lastWebinarEventDate": "2022-09-15T20:00:00.000Z", - "nextWebinarEventDate": "2022-09-16T06:15:00.000Z" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "2.12.1" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36" - }, - "rudderId": "73dc83ef-587f-4077-90f3-c36083e64019", - "messageId": "1663583642000200-e3f31c4c-6361-4f99-b643-7755303a6007", - "timestamp": "2022-09-19T10:34:02.954Z", - "receivedAt": "2022-09-19T10:34:02.956Z", - "request_ip": "11.105.44.120", - "anonymousId": "0c7b8b80-9c43-4f8e-b2d2-5e2448a25040", - "integrations": { - "All": true - }, - "originalTimestamp": "2022-09-19T10:34:02.000Z" - }, - "destination": { - "Config": { - "accountId": "valid_account_broken_event", - "clientId": "504300cd-76b2-a7l4-bhle-90a07420nx73", - "clientSecret": "3l3gJpzRsZagD6gu7tnTeKXz0bomLGnd", - "trackAnonymousEvents": false, - "createIfNotExist": true, - "rudderEventsMapping": [ - { - "event": "acq_signup_completed", - "marketoActivityId": "100026" - }, - { - "event": "act_createwebinarform_submit", - "marketoActivityId": "100025" - }, - { - "event": "act_presentation_style", - "marketoActivityId": "100025" - }, - { - "event": "act_webinar_view", - "marketoActivityId": "100025" - }, - { - "event": "act_webinar_join", - "marketoActivityId": "100025" - }, - { - "event": "act_presentation_addteammember", - "marketoActivityId": "100025" - }, - { - "event": "act_engagement_discussions_savediscussion", - "marketoActivityId": "100025" - }, - { - "event": "act_engagement_networking_savetime", - "marketoActivityId": "100025" - } - ] - }, - "destinationDefinition": { - "config": { - "destConfig": { - "defaultConfig": [ - "accountId", - "clientId", - "clientSecret", - "trackAnonymousEvents", - "rudderEventsMapping", - "customActivityPropertyMap", - "leadTraitMapping" - ] - }, - "secretKeys": [ - "clientSecret" - ], - "excludeKeys": [], - "includeKeys": [], - "routerTransform": true, - "supportedSourceTypes": [ - "android", - "ios", - "web", - "unity", - "amp", - "cloud", - "reactnative" - ] - }, - "responseRules": { - "responseType": "JSON", - "rules": { - "retryable": [ - { - "success": "false", - "errors.0.code": 600 - }, - { - "success": "false", - "errors.0.code": 601 - }, - { - "success": "false", - "errors.0.code": 602 - }, - { - "success": "false", - "errors.0.code": 604 - }, - { - "success": "false", - "errors.0.code": 606 - }, - { - "success": "false", - "errors.0.code": 607 - }, - { - "success": "false", - "errors.0.code": 608 - }, - { - "success": "false", - "errors.0.code": 611 - } - ], - "abortable": [ - { - "success": "false", - "errors.0.code": 603 - }, - { - "success": "false", - "errors.0.code": 605 - }, - { - "success": "false", - "errors.0.code": 609 - }, - { - "success": "false", - "errors.0.code": 610 - } - ] - } - }, - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "MARKETO", - "displayName": "Marketo", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVke", - "name": "Marketo", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmMd", - "deleted": false, - "createdAt": "2022-02-10T08:39:32.005Z", - "updatedAt": "2022-09-03T16:22:31.374Z", - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - }, - "metadata": { - "jobId": 3 - } - }, - { - "message": { - "type": "identify", - "sentAt": "2022-09-19T10:34:02.002Z", - "userId": "e17c5a5e-5e2f-430b-b497-fe3f1ea3a704", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "2.12.1", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "https://accounts.app.t2.broken.com/home", - "path": "/home", - "title": "Home", - "search": "", - "tab_url": "https://accounts.app.t2.broken.com/home", - "referrer": "https://ts50-cvii.core.broken.org/", - "initial_referrer": "https://ts50-cvii.core.broken.org/", - "referring_domain": "ts50-cvii.core.broken.org", - "initial_referring_domain": "ts50-cvii.core.broken.org" - }, - "locale": "en-IN", - "screen": { - "width": 1728, - "height": 1117, - "density": 2, - "innerWidth": 1728, - "innerHeight": 969 - }, - "traits": { - "name": "AM", - "email": "0c7b8b80-9c43-4f8e-b2d2-5e2448a25040@j.mail", - "lastName": "M", - "firstName": "A", - "accountName": "MACDEV", - "billingName": "g g", - "companyName": "macDev", - "currentTier": "Webinar Pro 250", - "billingCycle": "Annually", - "lastBillingDate": "2022-06-29T09:40:42.000Z", - "nextBillingDate": "2023-09-09T04:00:00.000Z", - "subscriptionType": "Webinar Pro 250", - "subscriptionStatus": "ACTIVE", - "lastWebinarEventDate": "2022-09-15T20:00:00.000Z", - "nextWebinarEventDate": "2022-09-16T06:15:00.000Z" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "2.12.1" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36" - }, - "rudderId": "73dc83ef-587f-4077-90f3-c36083e64019", - "messageId": "1663583642000200-e3f31c4c-6361-4f99-b643-7755303a6007", - "timestamp": "2022-09-19T10:34:02.954Z", - "receivedAt": "2022-09-19T10:34:02.956Z", - "request_ip": "11.105.44.120", - "anonymousId": "0c7b8b80-9c43-4f8e-b2d2-5e2448a25040", - "integrations": { - "All": true - }, - "originalTimestamp": "2022-09-19T10:34:02.000Z" - }, - "destination": { - "Config": { - "accountId": "unhandled_status_code", - "clientId": "504300cd-76b2-a7l4-bhle-90a07420nx73", - "clientSecret": "3l3gJpzRsZagD6gu7tnTeKXz0bomLGnd", - "trackAnonymousEvents": false, - "createIfNotExist": true, - "rudderEventsMapping": [ - { - "event": "acq_signup_completed", - "marketoActivityId": "100026" - }, - { - "event": "act_createwebinarform_submit", - "marketoActivityId": "100025" - }, - { - "event": "act_presentation_style", - "marketoActivityId": "100025" - }, - { - "event": "act_webinar_view", - "marketoActivityId": "100025" - }, - { - "event": "act_webinar_join", - "marketoActivityId": "100025" - }, - { - "event": "act_presentation_addteammember", - "marketoActivityId": "100025" - }, - { - "event": "act_engagement_discussions_savediscussion", - "marketoActivityId": "100025" - }, - { - "event": "act_engagement_networking_savetime", - "marketoActivityId": "100025" - } - ] - }, - "destinationDefinition": { - "config": { - "destConfig": { - "defaultConfig": [ - "accountId", - "clientId", - "clientSecret", - "trackAnonymousEvents", - "rudderEventsMapping", - "customActivityPropertyMap", - "leadTraitMapping" - ] - }, - "secretKeys": [ - "clientSecret" - ], - "excludeKeys": [], - "includeKeys": [], - "routerTransform": true, - "supportedSourceTypes": [ - "android", - "ios", - "web", - "unity", - "amp", - "cloud", - "reactnative" - ] - }, - "responseRules": { - "responseType": "JSON", - "rules": { - "retryable": [ - { - "success": "false", - "errors.0.code": 600 - }, - { - "success": "false", - "errors.0.code": 601 - }, - { - "success": "false", - "errors.0.code": 602 - }, - { - "success": "false", - "errors.0.code": 604 - }, - { - "success": "false", - "errors.0.code": 606 - }, - { - "success": "false", - "errors.0.code": 607 - }, - { - "success": "false", - "errors.0.code": 608 - }, - { - "success": "false", - "errors.0.code": 611 - } - ], - "abortable": [ - { - "success": "false", - "errors.0.code": 603 - }, - { - "success": "false", - "errors.0.code": 605 - }, - { - "success": "false", - "errors.0.code": 609 - }, - { - "success": "false", - "errors.0.code": 610 - } - ] - } - }, - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "MARKETO", - "displayName": "Marketo", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVke", - "name": "Marketo", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmMd", - "deleted": false, - "createdAt": "2022-02-10T08:39:32.005Z", - "updatedAt": "2022-09-03T16:22:31.374Z", - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - }, - "metadata": { - "jobId": 4 - } - }, - { - "message": { - "type": "identify", - "sentAt": "2022-09-19T10:34:02.002Z", - "userId": "e17c5a5e-5e2f-430b-b497-fe3f1ea3a704", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "2.12.1", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "https://accounts.app.t2.broken.com/home", - "path": "/home", - "title": "Home", - "search": "", - "tab_url": "https://accounts.app.t2.broken.com/home", - "referrer": "https://ts50-cvii.core.broken.org/", - "initial_referrer": "https://ts50-cvii.core.broken.org/", - "referring_domain": "ts50-cvii.core.broken.org", - "initial_referring_domain": "ts50-cvii.core.broken.org" - }, - "locale": "en-IN", - "screen": { - "width": 1728, - "height": 1117, - "density": 2, - "innerWidth": 1728, - "innerHeight": 969 - }, - "traits": { - "name": "AM", - "email": "0c7b8b80-9c43-4f8e-b2d2-5e2448a25040@j.mail", - "lastName": "M", - "firstName": "A", - "accountName": "MACDEV", - "billingName": "g g", - "companyName": "macDev", - "currentTier": "Webinar Pro 250", - "billingCycle": "Annually", - "lastBillingDate": "2022-06-29T09:40:42.000Z", - "nextBillingDate": "2023-09-09T04:00:00.000Z", - "subscriptionType": "Webinar Pro 250", - "subscriptionStatus": "ACTIVE", - "lastWebinarEventDate": "2022-09-15T20:00:00.000Z", - "nextWebinarEventDate": "2022-09-16T06:15:00.000Z" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "2.12.1" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36" - }, - "rudderId": "73dc83ef-587f-4077-90f3-c36083e64019", - "messageId": "1663583642000200-e3f31c4c-6361-4f99-b643-7755303a6007", - "timestamp": "2022-09-19T10:34:02.954Z", - "receivedAt": "2022-09-19T10:34:02.956Z", - "request_ip": "11.105.44.120", - "anonymousId": "0c7b8b80-9c43-4f8e-b2d2-5e2448a25040", - "integrations": { - "All": true - }, - "originalTimestamp": "2022-09-19T10:34:02.000Z" - }, - "destination": { - "Config": { - "accountId": "successful_identify_transformation", - "clientId": "504300cd-76b2-a7l4-bhle-90a07420nx73", - "clientSecret": "3l3gJpzRsZagD6gu7tnTeKXz0bomLGnd", - "trackAnonymousEvents": false, - "createIfNotExist": true, - "rudderEventsMapping": [ - { - "event": "acq_signup_completed", - "marketoActivityId": "100026" - }, - { - "event": "act_createwebinarform_submit", - "marketoActivityId": "100025" - }, - { - "event": "act_presentation_style", - "marketoActivityId": "100025" - }, - { - "event": "act_webinar_view", - "marketoActivityId": "100025" - }, - { - "event": "act_webinar_join", - "marketoActivityId": "100025" - }, - { - "event": "act_presentation_addteammember", - "marketoActivityId": "100025" - }, - { - "event": "act_engagement_discussions_savediscussion", - "marketoActivityId": "100025" - }, - { - "event": "act_engagement_networking_savetime", - "marketoActivityId": "100025" - } - ] - }, - "destinationDefinition": { - "config": { - "destConfig": { - "defaultConfig": [ - "accountId", - "clientId", - "clientSecret", - "trackAnonymousEvents", - "rudderEventsMapping", - "customActivityPropertyMap", - "leadTraitMapping" - ] - }, - "secretKeys": [ - "clientSecret" - ], - "excludeKeys": [], - "includeKeys": [], - "routerTransform": true, - "supportedSourceTypes": [ - "android", - "ios", - "web", - "unity", - "amp", - "cloud", - "reactnative" - ] - }, - "responseRules": { - "responseType": "JSON", - "rules": { - "retryable": [ - { - "success": "false", - "errors.0.code": 600 - }, - { - "success": "false", - "errors.0.code": 601 - }, - { - "success": "false", - "errors.0.code": 602 - }, - { - "success": "false", - "errors.0.code": 604 - }, - { - "success": "false", - "errors.0.code": 606 - }, - { - "success": "false", - "errors.0.code": 607 - }, - { - "success": "false", - "errors.0.code": 608 - }, - { - "success": "false", - "errors.0.code": 611 - } - ], - "abortable": [ - { - "success": "false", - "errors.0.code": 603 - }, - { - "success": "false", - "errors.0.code": 605 - }, - { - "success": "false", - "errors.0.code": 609 - }, - { - "success": "false", - "errors.0.code": 610 - } - ] - } - }, - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "MARKETO", - "displayName": "Marketo", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVke", - "name": "Marketo", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmMd", - "deleted": false, - "createdAt": "2022-02-10T08:39:32.005Z", - "updatedAt": "2022-09-03T16:22:31.374Z", - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - }, - "metadata": { - "jobId": 5 - } - } + success: 'false', + 'errors.0.code': 611, + }, + ], + abortable: [ + { + success: 'false', + 'errors.0.code': 603, + }, + { + success: 'false', + 'errors.0.code': 605, + }, + { + success: 'false', + 'errors.0.code': 609, + }, + { + success: 'false', + 'errors.0.code': 610, + }, + ], + }, + }, + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'MARKETO', + displayName: 'Marketo', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + }, + { + message: { + anonymousId: 'anon_id_success', + channel: 'mobile', + context: { + app: { + build: '1', + name: 'TestAppName', + namespace: 'com.android.sample', + version: '1.0', + }, + device: { + id: 'anon_id_success', + manufacturer: 'Google', + model: 'Android SDK built for x86', + name: 'generic_x86', + type: 'android', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.1-beta.1', + }, + locale: 'en-US', + network: { + carrier: 'Android', + bluetooth: false, + cellular: true, + wifi: true, + }, + os: { + name: 'Android', + version: '8.1.0', + }, + screen: { + density: 420, + height: 1794, + width: 1080, + }, + timezone: 'Asia/Kolkata', + traits: { + anonymousId: 'anon_id_success', + }, + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)', + }, + event: 'Product Clicked', + integrations: { + All: true, + }, + messageId: 'id1', + properties: { + name: 'Test Product', + product_id: 'prod_1', + }, + originalTimestamp: '2020-12-17T21:00:59.176Z', + type: 'track', + sentAt: '2020-12-17T21:00:59.176Z', + }, + metadata: { + jobId: 2, + }, + destination: { + Config: { + accountId: 'marketo_acct_id_success', + clientId: 'marketo_client_id_success', + clientSecret: 'marketo_client_secret_success', + trackAnonymousEvents: true, + customActivityPropertyMap: [ + { + from: 'name', + to: 'productName', + }, + ], + leadTraitMapping: [ + { + from: 'leadScore', + to: 'customLeadScore', + }, + ], + rudderEventsMapping: [ + { + event: 'Product Clicked', + marketoPrimarykey: 'name', + marketoActivityId: '100001', + }, + ], + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + name: 'Marketo', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmLd', + deleted: false, + createdAt: '2020-12-30T08:39:32.005Z', + updatedAt: '2021-02-03T16:22:31.374Z', + destinationDefinition: { + config: { + destConfig: { + defaultConfig: [ + 'accountId', + 'clientId', + 'clientSecret', + 'trackAnonymousEvents', + 'rudderEventsMapping', + 'customActivityPropertyMap', + 'leadTraitMapping', + ], + }, + secretKeys: ['clientSecret'], + excludeKeys: [], + includeKeys: [], + routerTransform: true, + supportedSourceTypes: [ + 'android', + 'ios', + 'web', + 'unity', + 'amp', + 'cloud', + 'reactnative', ], - destType: 'marketo', + }, + responseRules: { + responseType: 'JSON', + rules: { + retryable: [ + { + success: 'false', + 'errors.0.code': 600, + }, + { + success: 'false', + 'errors.0.code': 601, + }, + { + success: 'false', + 'errors.0.code': 602, + }, + { + success: 'false', + 'errors.0.code': 604, + }, + { + success: 'false', + 'errors.0.code': 606, + }, + { + success: 'false', + 'errors.0.code': 607, + }, + { + success: 'false', + 'errors.0.code': 608, + }, + { + success: 'false', + 'errors.0.code': 611, + }, + ], + abortable: [ + { + success: 'false', + 'errors.0.code': 603, + }, + { + success: 'false', + 'errors.0.code': 605, + }, + { + success: 'false', + 'errors.0.code': 609, + }, + { + success: 'false', + 'errors.0.code': 610, + }, + ], + }, + }, + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'MARKETO', + displayName: 'Marketo', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', }, - method: 'POST', + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, }, - }, - output: { - response: { - status: 200, - body: { - output: [ - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://marketo_acct_id_success.mktorest.com/rest/v1/activities/external.json", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer access_token_success" - }, - "params": {}, - "body": { - "JSON": { - "input": [ - { - "activityDate": "2020-12-17T21:00:59.176Z", - "activityTypeId": 100001, - "attributes": [], - "leadId": 4, - "primaryAttributeValue": "Test Product" - } - ] - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "destInfo": { - "authKey": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - }, - "jobId": 1 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "accountId": "marketo_acct_id_success", - "clientId": "marketo_client_id_success", - "clientSecret": "marketo_client_secret_success", - "trackAnonymousEvents": true, - "customActivityPropertyMap": [ - { - "from": "name", - "to": "productName" - } - ], - "leadTraitMapping": [ - { - "from": "leadScore", - "to": "customLeadScore" - } - ], - "rudderEventsMapping": [ - { - "event": "Product Clicked", - "marketoPrimarykey": "name", - "marketoActivityId": "100001" - } - ] - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Marketo", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "config": { - "destConfig": { - "defaultConfig": [ - "accountId", - "clientId", - "clientSecret", - "trackAnonymousEvents", - "rudderEventsMapping", - "customActivityPropertyMap", - "leadTraitMapping" - ] - }, - "secretKeys": [ - "clientSecret" - ], - "excludeKeys": [], - "includeKeys": [], - "routerTransform": true, - "supportedSourceTypes": [ - "android", - "ios", - "web", - "unity", - "amp", - "cloud", - "reactnative" - ] - }, - "responseRules": { - "responseType": "JSON", - "rules": { - "retryable": [ - { - "success": "false", - "errors.0.code": 600 - }, - { - "success": "false", - "errors.0.code": 601 - }, - { - "success": "false", - "errors.0.code": 602 - }, - { - "success": "false", - "errors.0.code": 604 - }, - { - "success": "false", - "errors.0.code": 606 - }, - { - "success": "false", - "errors.0.code": 607 - }, - { - "success": "false", - "errors.0.code": 608 - }, - { - "success": "false", - "errors.0.code": 611 - } - ], - "abortable": [ - { - "success": "false", - "errors.0.code": 603 - }, - { - "success": "false", - "errors.0.code": 605 - }, - { - "success": "false", - "errors.0.code": 609 - }, - { - "success": "false", - "errors.0.code": 610 - } - ] - } - }, - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "MARKETO", - "displayName": "Marketo", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - }, - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://marketo_acct_id_success.mktorest.com/rest/v1/activities/external.json", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer access_token_success" - }, - "params": {}, - "body": { - "JSON": { - "input": [ - { - "activityDate": "2020-12-17T21:00:59.176Z", - "activityTypeId": 100001, - "attributes": [], - "leadId": 4, - "primaryAttributeValue": "Test Product" - } - ] - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "destInfo": { - "authKey": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - }, - "jobId": 2 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "accountId": "marketo_acct_id_success", - "clientId": "marketo_client_id_success", - "clientSecret": "marketo_client_secret_success", - "trackAnonymousEvents": true, - "customActivityPropertyMap": [ - { - "from": "name", - "to": "productName" - } - ], - "leadTraitMapping": [ - { - "from": "leadScore", - "to": "customLeadScore" - } - ], - "rudderEventsMapping": [ - { - "event": "Product Clicked", - "marketoPrimarykey": "name", - "marketoActivityId": "100001" - } - ] - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Marketo", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "config": { - "destConfig": { - "defaultConfig": [ - "accountId", - "clientId", - "clientSecret", - "trackAnonymousEvents", - "rudderEventsMapping", - "customActivityPropertyMap", - "leadTraitMapping" - ] - }, - "secretKeys": [ - "clientSecret" - ], - "excludeKeys": [], - "includeKeys": [], - "routerTransform": true, - "supportedSourceTypes": [ - "android", - "ios", - "web", - "unity", - "amp", - "cloud", - "reactnative" - ] - }, - "responseRules": { - "responseType": "JSON", - "rules": { - "retryable": [ - { - "success": "false", - "errors.0.code": 600 - }, - { - "success": "false", - "errors.0.code": 601 - }, - { - "success": "false", - "errors.0.code": 602 - }, - { - "success": "false", - "errors.0.code": 604 - }, - { - "success": "false", - "errors.0.code": 606 - }, - { - "success": "false", - "errors.0.code": 607 - }, - { - "success": "false", - "errors.0.code": 608 - }, - { - "success": "false", - "errors.0.code": 611 - } - ], - "abortable": [ - { - "success": "false", - "errors.0.code": 603 - }, - { - "success": "false", - "errors.0.code": 605 - }, - { - "success": "false", - "errors.0.code": 609 - }, - { - "success": "false", - "errors.0.code": 610 - } - ] - } - }, - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "MARKETO", - "displayName": "Marketo", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - }, - { - "batched": false, - "statusCode": 400, - "error": "{\"message\":\"Request Failed for marketo, Lookup field 'userId' not found (Aborted).[Marketo Transformer]: During lead look up using email\",\"destinationResponse\":{\"response\":{\"requestId\":\"142e4#1835b117b76\",\"success\":false,\"errors\":[{\"code\":\"1006\",\"message\":\"Lookup field 'userId' not found\"}]},\"status\":200}}", - "statTags": { - "errorCategory": "network", - "errorType": "aborted" - }, - "metadata": [ - { - "destInfo": { - "authKey": "1mMy5cqbtfuaKZv1IhVQKnBdVke", - }, - "jobId": 3 - } - ], - "destination": { - "Config": { - "accountId": "valid_account_broken_event", - "clientId": "504300cd-76b2-a7l4-bhle-90a07420nx73", - "clientSecret": "3l3gJpzRsZagD6gu7tnTeKXz0bomLGnd", - "trackAnonymousEvents": false, - "createIfNotExist": true, - "rudderEventsMapping": [ - { - "event": "acq_signup_completed", - "marketoActivityId": "100026" - }, - { - "event": "act_createwebinarform_submit", - "marketoActivityId": "100025" - }, - { - "event": "act_presentation_style", - "marketoActivityId": "100025" - }, - { - "event": "act_webinar_view", - "marketoActivityId": "100025" - }, - { - "event": "act_webinar_join", - "marketoActivityId": "100025" - }, - { - "event": "act_presentation_addteammember", - "marketoActivityId": "100025" - }, - { - "event": "act_engagement_discussions_savediscussion", - "marketoActivityId": "100025" - }, - { - "event": "act_engagement_networking_savetime", - "marketoActivityId": "100025" - } - ] - }, - "destinationDefinition": { - "config": { - "destConfig": { - "defaultConfig": [ - "accountId", - "clientId", - "clientSecret", - "trackAnonymousEvents", - "rudderEventsMapping", - "customActivityPropertyMap", - "leadTraitMapping" - ] - }, - "secretKeys": [ - "clientSecret" - ], - "excludeKeys": [], - "includeKeys": [], - "routerTransform": true, - "supportedSourceTypes": [ - "android", - "ios", - "web", - "unity", - "amp", - "cloud", - "reactnative" - ] - }, - "responseRules": { - "responseType": "JSON", - "rules": { - "retryable": [ - { - "success": "false", - "errors.0.code": 600 - }, - { - "success": "false", - "errors.0.code": 601 - }, - { - "success": "false", - "errors.0.code": 602 - }, - { - "success": "false", - "errors.0.code": 604 - }, - { - "success": "false", - "errors.0.code": 606 - }, - { - "success": "false", - "errors.0.code": 607 - }, - { - "success": "false", - "errors.0.code": 608 - }, - { - "success": "false", - "errors.0.code": 611 - } - ], - "abortable": [ - { - "success": "false", - "errors.0.code": 603 - }, - { - "success": "false", - "errors.0.code": 605 - }, - { - "success": "false", - "errors.0.code": 609 - }, - { - "success": "false", - "errors.0.code": 610 - } - ] - } - }, - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "MARKETO", - "displayName": "Marketo", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVke", - "name": "Marketo", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmMd", - "deleted": false, - "createdAt": "2022-02-10T08:39:32.005Z", - "updatedAt": "2022-09-03T16:22:31.374Z", - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - }, - { - "batched": false, - "statusCode": 400, - "error": "{\"message\":\"Error occurred [Marketo Transformer]: During lead look up using email -> some other problem\",\"destinationResponse\":{\"response\":{\"requestId\":\"142e4#1835b117b76\",\"success\":false,\"errors\":[{\"code\":\"random_marketo_code\",\"message\":\"some other problem\"}]},\"status\":200}}", - "statTags": { - "errorCategory": "network", - "errorType": "aborted", - "meta": "unhandledStatusCode" - }, - "destination": { - "Config": { - "accountId": "unhandled_status_code", - "clientId": "504300cd-76b2-a7l4-bhle-90a07420nx73", - "clientSecret": "3l3gJpzRsZagD6gu7tnTeKXz0bomLGnd", - "trackAnonymousEvents": false, - "createIfNotExist": true, - "rudderEventsMapping": [ - { - "event": "acq_signup_completed", - "marketoActivityId": "100026" - }, - { - "event": "act_createwebinarform_submit", - "marketoActivityId": "100025" - }, - { - "event": "act_presentation_style", - "marketoActivityId": "100025" - }, - { - "event": "act_webinar_view", - "marketoActivityId": "100025" - }, - { - "event": "act_webinar_join", - "marketoActivityId": "100025" - }, - { - "event": "act_presentation_addteammember", - "marketoActivityId": "100025" - }, - { - "event": "act_engagement_discussions_savediscussion", - "marketoActivityId": "100025" - }, - { - "event": "act_engagement_networking_savetime", - "marketoActivityId": "100025" - } - ] - }, - "destinationDefinition": { - "config": { - "destConfig": { - "defaultConfig": [ - "accountId", - "clientId", - "clientSecret", - "trackAnonymousEvents", - "rudderEventsMapping", - "customActivityPropertyMap", - "leadTraitMapping" - ] - }, - "secretKeys": [ - "clientSecret" - ], - "excludeKeys": [], - "includeKeys": [], - "routerTransform": true, - "supportedSourceTypes": [ - "android", - "ios", - "web", - "unity", - "amp", - "cloud", - "reactnative" - ] - }, - "responseRules": { - "responseType": "JSON", - "rules": { - "retryable": [ - { - "success": "false", - "errors.0.code": 600 - }, - { - "success": "false", - "errors.0.code": 601 - }, - { - "success": "false", - "errors.0.code": 602 - }, - { - "success": "false", - "errors.0.code": 604 - }, - { - "success": "false", - "errors.0.code": 606 - }, - { - "success": "false", - "errors.0.code": 607 - }, - { - "success": "false", - "errors.0.code": 608 - }, - { - "success": "false", - "errors.0.code": 611 - } - ], - "abortable": [ - { - "success": "false", - "errors.0.code": 603 - }, - { - "success": "false", - "errors.0.code": 605 - }, - { - "success": "false", - "errors.0.code": 609 - }, - { - "success": "false", - "errors.0.code": 610 - } - ] - } - }, - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "MARKETO", - "displayName": "Marketo", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVke", - "name": "Marketo", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmMd", - "deleted": false, - "createdAt": "2022-02-10T08:39:32.005Z", - "updatedAt": "2022-09-03T16:22:31.374Z", - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - }, - "metadata": [ - { - "destInfo": { - "authKey": "1mMy5cqbtfuaKZv1IhVQKnBdVke", - }, - "jobId": 4 - } - ] - }, - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://successful_identify_transformation.mktorest.com/rest/v1/leads.json", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer access_token_success" - }, - "params": {}, - "body": { - "JSON": { - "action": "createOrUpdate", - "input": [ - { - "Email": "0c7b8b80-9c43-4f8e-b2d2-5e2448a25040@j.mail", - "FirstName": "A", - "LastName": "M", - "id": 4, - "userId": "e17c5a5e-5e2f-430b-b497-fe3f1ea3a704" - } - ], - "lookupField": "id" - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "destInfo": { - "authKey": "1mMy5cqbtfuaKZv1IhVQKnBdVke", - }, - "jobId": 5 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "accountId": "successful_identify_transformation", - "clientId": "504300cd-76b2-a7l4-bhle-90a07420nx73", - "clientSecret": "3l3gJpzRsZagD6gu7tnTeKXz0bomLGnd", - "trackAnonymousEvents": false, - "createIfNotExist": true, - "rudderEventsMapping": [ - { - "event": "acq_signup_completed", - "marketoActivityId": "100026" - }, - { - "event": "act_createwebinarform_submit", - "marketoActivityId": "100025" - }, - { - "event": "act_presentation_style", - "marketoActivityId": "100025" - }, - { - "event": "act_webinar_view", - "marketoActivityId": "100025" - }, - { - "event": "act_webinar_join", - "marketoActivityId": "100025" - }, - { - "event": "act_presentation_addteammember", - "marketoActivityId": "100025" - }, - { - "event": "act_engagement_discussions_savediscussion", - "marketoActivityId": "100025" - }, - { - "event": "act_engagement_networking_savetime", - "marketoActivityId": "100025" - } - ] - }, - "destinationDefinition": { - "config": { - "destConfig": { - "defaultConfig": [ - "accountId", - "clientId", - "clientSecret", - "trackAnonymousEvents", - "rudderEventsMapping", - "customActivityPropertyMap", - "leadTraitMapping" - ] - }, - "secretKeys": [ - "clientSecret" - ], - "excludeKeys": [], - "includeKeys": [], - "routerTransform": true, - "supportedSourceTypes": [ - "android", - "ios", - "web", - "unity", - "amp", - "cloud", - "reactnative" - ] - }, - "responseRules": { - "responseType": "JSON", - "rules": { - "retryable": [ - { - "success": "false", - "errors.0.code": 600 - }, - { - "success": "false", - "errors.0.code": 601 - }, - { - "success": "false", - "errors.0.code": 602 - }, - { - "success": "false", - "errors.0.code": 604 - }, - { - "success": "false", - "errors.0.code": 606 - }, - { - "success": "false", - "errors.0.code": 607 - }, - { - "success": "false", - "errors.0.code": 608 - }, - { - "success": "false", - "errors.0.code": 611 - } - ], - "abortable": [ - { - "success": "false", - "errors.0.code": 603 - }, - { - "success": "false", - "errors.0.code": 605 - }, - { - "success": "false", - "errors.0.code": 609 - }, - { - "success": "false", - "errors.0.code": 610 - } - ] - } - }, - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "MARKETO", - "displayName": "Marketo", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVke", - "name": "Marketo", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmMd", - "deleted": false, - "createdAt": "2022-02-10T08:39:32.005Z", - "updatedAt": "2022-09-03T16:22:31.374Z", - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - } + { + message: { + type: 'identify', + sentAt: '2022-09-19T10:34:02.002Z', + userId: 'e17c5a5e-5e2f-430b-b497-fe3f1ea3a704', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '2.12.1', + namespace: 'com.rudderlabs.javascript', + }, + page: { + url: 'https://accounts.app.t2.broken.com/home', + path: '/home', + title: 'Home', + search: '', + tab_url: 'https://accounts.app.t2.broken.com/home', + referrer: 'https://ts50-cvii.core.broken.org/', + initial_referrer: 'https://ts50-cvii.core.broken.org/', + referring_domain: 'ts50-cvii.core.broken.org', + initial_referring_domain: 'ts50-cvii.core.broken.org', + }, + locale: 'en-IN', + screen: { + width: 1728, + height: 1117, + density: 2, + innerWidth: 1728, + innerHeight: 969, + }, + traits: { + name: 'AM', + email: '0c7b8b80-9c43-4f8e-b2d2-5e2448a25040@j.mail', + lastName: 'M', + firstName: 'A', + accountName: 'MACDEV', + billingName: 'g g', + companyName: 'macDev', + currentTier: 'Webinar Pro 250', + billingCycle: 'Annually', + lastBillingDate: '2022-06-29T09:40:42.000Z', + nextBillingDate: '2023-09-09T04:00:00.000Z', + subscriptionType: 'Webinar Pro 250', + subscriptionStatus: 'ACTIVE', + lastWebinarEventDate: '2022-09-15T20:00:00.000Z', + nextWebinarEventDate: '2022-09-16T06:15:00.000Z', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '2.12.1', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36', + }, + rudderId: '73dc83ef-587f-4077-90f3-c36083e64019', + messageId: '1663583642000200-e3f31c4c-6361-4f99-b643-7755303a6007', + timestamp: '2022-09-19T10:34:02.954Z', + receivedAt: '2022-09-19T10:34:02.956Z', + request_ip: '11.105.44.120', + anonymousId: '0c7b8b80-9c43-4f8e-b2d2-5e2448a25040', + integrations: { + All: true, + }, + originalTimestamp: '2022-09-19T10:34:02.000Z', + }, + destination: { + Config: { + accountId: 'valid_account_broken_event', + clientId: '504300cd-76b2-a7l4-bhle-90a07420nx73', + clientSecret: '3l3gJpzRsZagD6gu7tnTeKXz0bomLGnd', + trackAnonymousEvents: false, + createIfNotExist: true, + rudderEventsMapping: [ + { + event: 'acq_signup_completed', + marketoActivityId: '100026', + }, + { + event: 'act_createwebinarform_submit', + marketoActivityId: '100025', + }, + { + event: 'act_presentation_style', + marketoActivityId: '100025', + }, + { + event: 'act_webinar_view', + marketoActivityId: '100025', + }, + { + event: 'act_webinar_join', + marketoActivityId: '100025', + }, + { + event: 'act_presentation_addteammember', + marketoActivityId: '100025', + }, + { + event: 'act_engagement_discussions_savediscussion', + marketoActivityId: '100025', + }, + { + event: 'act_engagement_networking_savetime', + marketoActivityId: '100025', + }, + ], + }, + destinationDefinition: { + config: { + destConfig: { + defaultConfig: [ + 'accountId', + 'clientId', + 'clientSecret', + 'trackAnonymousEvents', + 'rudderEventsMapping', + 'customActivityPropertyMap', + 'leadTraitMapping', + ], + }, + secretKeys: ['clientSecret'], + excludeKeys: [], + includeKeys: [], + routerTransform: true, + supportedSourceTypes: [ + 'android', + 'ios', + 'web', + 'unity', + 'amp', + 'cloud', + 'reactnative', ], + }, + responseRules: { + responseType: 'JSON', + rules: { + retryable: [ + { + success: 'false', + 'errors.0.code': 600, + }, + { + success: 'false', + 'errors.0.code': 601, + }, + { + success: 'false', + 'errors.0.code': 602, + }, + { + success: 'false', + 'errors.0.code': 604, + }, + { + success: 'false', + 'errors.0.code': 606, + }, + { + success: 'false', + 'errors.0.code': 607, + }, + { + success: 'false', + 'errors.0.code': 608, + }, + { + success: 'false', + 'errors.0.code': 611, + }, + ], + abortable: [ + { + success: 'false', + 'errors.0.code': 603, + }, + { + success: 'false', + 'errors.0.code': 605, + }, + { + success: 'false', + 'errors.0.code': 609, + }, + { + success: 'false', + 'errors.0.code': 610, + }, + ], + }, + }, + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'MARKETO', + displayName: 'Marketo', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVke', + name: 'Marketo', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmMd', + deleted: false, + createdAt: '2022-02-10T08:39:32.005Z', + updatedAt: '2022-09-03T16:22:31.374Z', + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + metadata: { + jobId: 3, + }, + }, + { + message: { + type: 'identify', + sentAt: '2022-09-19T10:34:02.002Z', + userId: 'e17c5a5e-5e2f-430b-b497-fe3f1ea3a704', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '2.12.1', + namespace: 'com.rudderlabs.javascript', + }, + page: { + url: 'https://accounts.app.t2.broken.com/home', + path: '/home', + title: 'Home', + search: '', + tab_url: 'https://accounts.app.t2.broken.com/home', + referrer: 'https://ts50-cvii.core.broken.org/', + initial_referrer: 'https://ts50-cvii.core.broken.org/', + referring_domain: 'ts50-cvii.core.broken.org', + initial_referring_domain: 'ts50-cvii.core.broken.org', + }, + locale: 'en-IN', + screen: { + width: 1728, + height: 1117, + density: 2, + innerWidth: 1728, + innerHeight: 969, + }, + traits: { + name: 'AM', + email: '0c7b8b80-9c43-4f8e-b2d2-5e2448a25040@j.mail', + lastName: 'M', + firstName: 'A', + accountName: 'MACDEV', + billingName: 'g g', + companyName: 'macDev', + currentTier: 'Webinar Pro 250', + billingCycle: 'Annually', + lastBillingDate: '2022-06-29T09:40:42.000Z', + nextBillingDate: '2023-09-09T04:00:00.000Z', + subscriptionType: 'Webinar Pro 250', + subscriptionStatus: 'ACTIVE', + lastWebinarEventDate: '2022-09-15T20:00:00.000Z', + nextWebinarEventDate: '2022-09-16T06:15:00.000Z', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '2.12.1', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36', + }, + rudderId: '73dc83ef-587f-4077-90f3-c36083e64019', + messageId: '1663583642000200-e3f31c4c-6361-4f99-b643-7755303a6007', + timestamp: '2022-09-19T10:34:02.954Z', + receivedAt: '2022-09-19T10:34:02.956Z', + request_ip: '11.105.44.120', + anonymousId: '0c7b8b80-9c43-4f8e-b2d2-5e2448a25040', + integrations: { + All: true, + }, + originalTimestamp: '2022-09-19T10:34:02.000Z', + }, + destination: { + Config: { + accountId: 'unhandled_status_code', + clientId: '504300cd-76b2-a7l4-bhle-90a07420nx73', + clientSecret: '3l3gJpzRsZagD6gu7tnTeKXz0bomLGnd', + trackAnonymousEvents: false, + createIfNotExist: true, + rudderEventsMapping: [ + { + event: 'acq_signup_completed', + marketoActivityId: '100026', + }, + { + event: 'act_createwebinarform_submit', + marketoActivityId: '100025', + }, + { + event: 'act_presentation_style', + marketoActivityId: '100025', + }, + { + event: 'act_webinar_view', + marketoActivityId: '100025', + }, + { + event: 'act_webinar_join', + marketoActivityId: '100025', + }, + { + event: 'act_presentation_addteammember', + marketoActivityId: '100025', + }, + { + event: 'act_engagement_discussions_savediscussion', + marketoActivityId: '100025', + }, + { + event: 'act_engagement_networking_savetime', + marketoActivityId: '100025', + }, + ], + }, + destinationDefinition: { + config: { + destConfig: { + defaultConfig: [ + 'accountId', + 'clientId', + 'clientSecret', + 'trackAnonymousEvents', + 'rudderEventsMapping', + 'customActivityPropertyMap', + 'leadTraitMapping', + ], + }, + secretKeys: ['clientSecret'], + excludeKeys: [], + includeKeys: [], + routerTransform: true, + supportedSourceTypes: [ + 'android', + 'ios', + 'web', + 'unity', + 'amp', + 'cloud', + 'reactnative', + ], + }, + responseRules: { + responseType: 'JSON', + rules: { + retryable: [ + { + success: 'false', + 'errors.0.code': 600, + }, + { + success: 'false', + 'errors.0.code': 601, + }, + { + success: 'false', + 'errors.0.code': 602, + }, + { + success: 'false', + 'errors.0.code': 604, + }, + { + success: 'false', + 'errors.0.code': 606, + }, + { + success: 'false', + 'errors.0.code': 607, + }, + { + success: 'false', + 'errors.0.code': 608, + }, + { + success: 'false', + 'errors.0.code': 611, + }, + ], + abortable: [ + { + success: 'false', + 'errors.0.code': 603, + }, + { + success: 'false', + 'errors.0.code': 605, + }, + { + success: 'false', + 'errors.0.code': 609, + }, + { + success: 'false', + 'errors.0.code': 610, + }, + ], + }, + }, + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'MARKETO', + displayName: 'Marketo', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVke', + name: 'Marketo', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmMd', + deleted: false, + createdAt: '2022-02-10T08:39:32.005Z', + updatedAt: '2022-09-03T16:22:31.374Z', + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + metadata: { + jobId: 4, + }, + }, + { + message: { + type: 'identify', + sentAt: '2022-09-19T10:34:02.002Z', + userId: 'e17c5a5e-5e2f-430b-b497-fe3f1ea3a704', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '2.12.1', + namespace: 'com.rudderlabs.javascript', + }, + page: { + url: 'https://accounts.app.t2.broken.com/home', + path: '/home', + title: 'Home', + search: '', + tab_url: 'https://accounts.app.t2.broken.com/home', + referrer: 'https://ts50-cvii.core.broken.org/', + initial_referrer: 'https://ts50-cvii.core.broken.org/', + referring_domain: 'ts50-cvii.core.broken.org', + initial_referring_domain: 'ts50-cvii.core.broken.org', + }, + locale: 'en-IN', + screen: { + width: 1728, + height: 1117, + density: 2, + innerWidth: 1728, + innerHeight: 969, + }, + traits: { + name: 'AM', + email: '0c7b8b80-9c43-4f8e-b2d2-5e2448a25040@j.mail', + lastName: 'M', + firstName: 'A', + accountName: 'MACDEV', + billingName: 'g g', + companyName: 'macDev', + currentTier: 'Webinar Pro 250', + billingCycle: 'Annually', + lastBillingDate: '2022-06-29T09:40:42.000Z', + nextBillingDate: '2023-09-09T04:00:00.000Z', + subscriptionType: 'Webinar Pro 250', + subscriptionStatus: 'ACTIVE', + lastWebinarEventDate: '2022-09-15T20:00:00.000Z', + nextWebinarEventDate: '2022-09-16T06:15:00.000Z', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '2.12.1', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36', + }, + rudderId: '73dc83ef-587f-4077-90f3-c36083e64019', + messageId: '1663583642000200-e3f31c4c-6361-4f99-b643-7755303a6007', + timestamp: '2022-09-19T10:34:02.954Z', + receivedAt: '2022-09-19T10:34:02.956Z', + request_ip: '11.105.44.120', + anonymousId: '0c7b8b80-9c43-4f8e-b2d2-5e2448a25040', + integrations: { + All: true, + }, + originalTimestamp: '2022-09-19T10:34:02.000Z', + }, + destination: { + Config: { + accountId: 'successful_identify_transformation', + clientId: '504300cd-76b2-a7l4-bhle-90a07420nx73', + clientSecret: '3l3gJpzRsZagD6gu7tnTeKXz0bomLGnd', + trackAnonymousEvents: false, + createIfNotExist: true, + rudderEventsMapping: [ + { + event: 'acq_signup_completed', + marketoActivityId: '100026', + }, + { + event: 'act_createwebinarform_submit', + marketoActivityId: '100025', + }, + { + event: 'act_presentation_style', + marketoActivityId: '100025', + }, + { + event: 'act_webinar_view', + marketoActivityId: '100025', + }, + { + event: 'act_webinar_join', + marketoActivityId: '100025', + }, + { + event: 'act_presentation_addteammember', + marketoActivityId: '100025', + }, + { + event: 'act_engagement_discussions_savediscussion', + marketoActivityId: '100025', + }, + { + event: 'act_engagement_networking_savetime', + marketoActivityId: '100025', + }, + ], + }, + destinationDefinition: { + config: { + destConfig: { + defaultConfig: [ + 'accountId', + 'clientId', + 'clientSecret', + 'trackAnonymousEvents', + 'rudderEventsMapping', + 'customActivityPropertyMap', + 'leadTraitMapping', + ], + }, + secretKeys: ['clientSecret'], + excludeKeys: [], + includeKeys: [], + routerTransform: true, + supportedSourceTypes: [ + 'android', + 'ios', + 'web', + 'unity', + 'amp', + 'cloud', + 'reactnative', + ], + }, + responseRules: { + responseType: 'JSON', + rules: { + retryable: [ + { + success: 'false', + 'errors.0.code': 600, + }, + { + success: 'false', + 'errors.0.code': 601, + }, + { + success: 'false', + 'errors.0.code': 602, + }, + { + success: 'false', + 'errors.0.code': 604, + }, + { + success: 'false', + 'errors.0.code': 606, + }, + { + success: 'false', + 'errors.0.code': 607, + }, + { + success: 'false', + 'errors.0.code': 608, + }, + { + success: 'false', + 'errors.0.code': 611, + }, + ], + abortable: [ + { + success: 'false', + 'errors.0.code': 603, + }, + { + success: 'false', + 'errors.0.code': 605, + }, + { + success: 'false', + 'errors.0.code': 609, + }, + { + success: 'false', + 'errors.0.code': 610, + }, + ], + }, + }, + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'MARKETO', + displayName: 'Marketo', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVke', + name: 'Marketo', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmMd', + deleted: false, + createdAt: '2022-02-10T08:39:32.005Z', + updatedAt: '2022-09-03T16:22:31.374Z', + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + metadata: { + jobId: 5, + }, }, + ], + destType: 'marketo', }, + method: 'POST', + }, }, - { - name: 'marketo', - description: 'processMetadataForRouter function specific test', - feature: 'router', - module: 'destination', - version: 'v0', - input: { - request: { + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://marketo_acct_id_success.mktorest.com/rest/v1/activities/external.json', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer access_token_success', + }, + params: {}, + body: { + JSON: { + input: [ + { + activityDate: '2020-12-17T21:00:59.176Z', + activityTypeId: 100001, + attributes: [], + leadId: 4, + primaryAttributeValue: 'Test Product', + }, + ], + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + }, + metadata: [ + { + destInfo: { + authKey: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + }, + jobId: 1, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + accountId: 'marketo_acct_id_success', + clientId: 'marketo_client_id_success', + clientSecret: 'marketo_client_secret_success', + trackAnonymousEvents: true, + customActivityPropertyMap: [ + { + from: 'name', + to: 'productName', + }, + ], + leadTraitMapping: [ + { + from: 'leadScore', + to: 'customLeadScore', + }, + ], + rudderEventsMapping: [ + { + event: 'Product Clicked', + marketoPrimarykey: 'name', + marketoActivityId: '100001', + }, + ], + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + name: 'Marketo', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmLd', + deleted: false, + createdAt: '2020-12-30T08:39:32.005Z', + updatedAt: '2021-02-03T16:22:31.374Z', + destinationDefinition: { + config: { + destConfig: { + defaultConfig: [ + 'accountId', + 'clientId', + 'clientSecret', + 'trackAnonymousEvents', + 'rudderEventsMapping', + 'customActivityPropertyMap', + 'leadTraitMapping', + ], + }, + secretKeys: ['clientSecret'], + excludeKeys: [], + includeKeys: [], + routerTransform: true, + supportedSourceTypes: [ + 'android', + 'ios', + 'web', + 'unity', + 'amp', + 'cloud', + 'reactnative', + ], + }, + responseRules: { + responseType: 'JSON', + rules: { + retryable: [ + { + success: 'false', + 'errors.0.code': 600, + }, + { + success: 'false', + 'errors.0.code': 601, + }, + { + success: 'false', + 'errors.0.code': 602, + }, + { + success: 'false', + 'errors.0.code': 604, + }, + { + success: 'false', + 'errors.0.code': 606, + }, + { + success: 'false', + 'errors.0.code': 607, + }, + { + success: 'false', + 'errors.0.code': 608, + }, + { + success: 'false', + 'errors.0.code': 611, + }, + ], + abortable: [ + { + success: 'false', + 'errors.0.code': 603, + }, + { + success: 'false', + 'errors.0.code': 605, + }, + { + success: 'false', + 'errors.0.code': 609, + }, + { + success: 'false', + 'errors.0.code': 610, + }, + ], + }, + }, + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'MARKETO', + displayName: 'Marketo', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + }, + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://marketo_acct_id_success.mktorest.com/rest/v1/activities/external.json', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer access_token_success', + }, + params: {}, body: { + JSON: { input: [ + { + activityDate: '2020-12-17T21:00:59.176Z', + activityTypeId: 100001, + attributes: [], + leadId: 4, + primaryAttributeValue: 'Test Product', + }, + ], + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + }, + metadata: [ + { + destInfo: { + authKey: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + }, + jobId: 2, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + accountId: 'marketo_acct_id_success', + clientId: 'marketo_client_id_success', + clientSecret: 'marketo_client_secret_success', + trackAnonymousEvents: true, + customActivityPropertyMap: [ + { + from: 'name', + to: 'productName', + }, + ], + leadTraitMapping: [ + { + from: 'leadScore', + to: 'customLeadScore', + }, + ], + rudderEventsMapping: [ + { + event: 'Product Clicked', + marketoPrimarykey: 'name', + marketoActivityId: '100001', + }, + ], + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + name: 'Marketo', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmLd', + deleted: false, + createdAt: '2020-12-30T08:39:32.005Z', + updatedAt: '2021-02-03T16:22:31.374Z', + destinationDefinition: { + config: { + destConfig: { + defaultConfig: [ + 'accountId', + 'clientId', + 'clientSecret', + 'trackAnonymousEvents', + 'rudderEventsMapping', + 'customActivityPropertyMap', + 'leadTraitMapping', + ], + }, + secretKeys: ['clientSecret'], + excludeKeys: [], + includeKeys: [], + routerTransform: true, + supportedSourceTypes: [ + 'android', + 'ios', + 'web', + 'unity', + 'amp', + 'cloud', + 'reactnative', + ], + }, + responseRules: { + responseType: 'JSON', + rules: { + retryable: [ + { + success: 'false', + 'errors.0.code': 600, + }, + { + success: 'false', + 'errors.0.code': 601, + }, + { + success: 'false', + 'errors.0.code': 602, + }, + { + success: 'false', + 'errors.0.code': 604, + }, + { + success: 'false', + 'errors.0.code': 606, + }, { - "message": { - "anonymousId": "anon_id_success", - "channel": "mobile", - "context": { - "app": { - "build": "1", - "name": "TestAppName", - "namespace": "com.android.sample", - "version": "1.0" - }, - "device": { - "id": "anon_id_success", - "manufacturer": "Google", - "model": "Android SDK built for x86", - "name": "generic_x86", - "type": "android" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.1-beta.1" - }, - "locale": "en-US", - "network": { - "carrier": "Android", - "bluetooth": false, - "cellular": true, - "wifi": true - }, - "os": { - "name": "Android", - "version": "8.1.0" - }, - "screen": { - "density": 420, - "height": 1794, - "width": 1080 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "anon_id_success" - }, - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)" - }, - "event": "Product Clicked", - "integrations": { - "All": true - }, - "messageId": "id1", - "properties": { - "name": "Test Product", - "product_id": "prod_1" - }, - "originalTimestamp": "2020-12-17T21:00:59.176Z", - "type": "track", - "sentAt": "2020-12-17T21:00:59.176Z" - }, - "destination": { - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "Config": { - "accountId": "marketo_acct_id_success", - "clientId": "marketo_client_id_success", - "clientSecret": "marketo_client_secret_success", - "trackAnonymousEvents": true, - "customActivityPropertyMap": [ - { - "from": "name", - "to": "productName" - }, - { - "from": "product_id", - "to": "productId" - } - ], - "leadTraitMapping": [ - { - "from": "leadScore", - "to": "customLeadScore" - } - ], - "createIfNotExist": true, - "rudderEventsMapping": [ - { - "event": "Product Clicked", - "marketoPrimarykey": "name", - "marketoActivityId": "100001" - } - ] - } - }, - "metadata": [ - { - "jobId": 1 - }, - { - "jobId": 1 - }, - { - "jobId": 1 - } - ], - "batched": false, - "statusCode": 200, - } + success: 'false', + 'errors.0.code': 607, + }, + { + success: 'false', + 'errors.0.code': 608, + }, + { + success: 'false', + 'errors.0.code': 611, + }, + ], + abortable: [ + { + success: 'false', + 'errors.0.code': 603, + }, + { + success: 'false', + 'errors.0.code': 605, + }, + { + success: 'false', + 'errors.0.code': 609, + }, + { + success: 'false', + 'errors.0.code': 610, + }, + ], + }, + }, + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'MARKETO', + displayName: 'Marketo', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + }, + { + batched: false, + statusCode: 400, + error: + '{"message":"Request Failed for marketo, Lookup field \'userId\' not found (Aborted).[Marketo Transformer]: During lead look up using email","destinationResponse":{"response":{"requestId":"142e4#1835b117b76","success":false,"errors":[{"code":"1006","message":"Lookup field \'userId\' not found"}]},"status":200}}', + statTags: { + errorCategory: 'network', + errorType: 'aborted', + }, + metadata: [ + { + destInfo: { + authKey: '1mMy5cqbtfuaKZv1IhVQKnBdVke', + }, + jobId: 3, + }, + ], + destination: { + Config: { + accountId: 'valid_account_broken_event', + clientId: '504300cd-76b2-a7l4-bhle-90a07420nx73', + clientSecret: '3l3gJpzRsZagD6gu7tnTeKXz0bomLGnd', + trackAnonymousEvents: false, + createIfNotExist: true, + rudderEventsMapping: [ + { + event: 'acq_signup_completed', + marketoActivityId: '100026', + }, + { + event: 'act_createwebinarform_submit', + marketoActivityId: '100025', + }, + { + event: 'act_presentation_style', + marketoActivityId: '100025', + }, + { + event: 'act_webinar_view', + marketoActivityId: '100025', + }, + { + event: 'act_webinar_join', + marketoActivityId: '100025', + }, + { + event: 'act_presentation_addteammember', + marketoActivityId: '100025', + }, + { + event: 'act_engagement_discussions_savediscussion', + marketoActivityId: '100025', + }, + { + event: 'act_engagement_networking_savetime', + marketoActivityId: '100025', + }, + ], + }, + destinationDefinition: { + config: { + destConfig: { + defaultConfig: [ + 'accountId', + 'clientId', + 'clientSecret', + 'trackAnonymousEvents', + 'rudderEventsMapping', + 'customActivityPropertyMap', + 'leadTraitMapping', + ], + }, + secretKeys: ['clientSecret'], + excludeKeys: [], + includeKeys: [], + routerTransform: true, + supportedSourceTypes: [ + 'android', + 'ios', + 'web', + 'unity', + 'amp', + 'cloud', + 'reactnative', ], - destType: 'marketo', + }, + responseRules: { + responseType: 'JSON', + rules: { + retryable: [ + { + success: 'false', + 'errors.0.code': 600, + }, + { + success: 'false', + 'errors.0.code': 601, + }, + { + success: 'false', + 'errors.0.code': 602, + }, + { + success: 'false', + 'errors.0.code': 604, + }, + { + success: 'false', + 'errors.0.code': 606, + }, + { + success: 'false', + 'errors.0.code': 607, + }, + { + success: 'false', + 'errors.0.code': 608, + }, + { + success: 'false', + 'errors.0.code': 611, + }, + ], + abortable: [ + { + success: 'false', + 'errors.0.code': 603, + }, + { + success: 'false', + 'errors.0.code': 605, + }, + { + success: 'false', + 'errors.0.code': 609, + }, + { + success: 'false', + 'errors.0.code': 610, + }, + ], + }, + }, + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'MARKETO', + displayName: 'Marketo', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVke', + name: 'Marketo', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmMd', + deleted: false, + createdAt: '2022-02-10T08:39:32.005Z', + updatedAt: '2022-09-03T16:22:31.374Z', + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + }, + { + batched: false, + statusCode: 400, + error: + '{"message":"Error occurred [Marketo Transformer]: During lead look up using email -> some other problem","destinationResponse":{"response":{"requestId":"142e4#1835b117b76","success":false,"errors":[{"code":"random_marketo_code","message":"some other problem"}]},"status":200}}', + statTags: { + errorCategory: 'network', + errorType: 'aborted', + meta: 'unhandledStatusCode', + }, + destination: { + Config: { + accountId: 'unhandled_status_code', + clientId: '504300cd-76b2-a7l4-bhle-90a07420nx73', + clientSecret: '3l3gJpzRsZagD6gu7tnTeKXz0bomLGnd', + trackAnonymousEvents: false, + createIfNotExist: true, + rudderEventsMapping: [ + { + event: 'acq_signup_completed', + marketoActivityId: '100026', + }, + { + event: 'act_createwebinarform_submit', + marketoActivityId: '100025', + }, + { + event: 'act_presentation_style', + marketoActivityId: '100025', + }, + { + event: 'act_webinar_view', + marketoActivityId: '100025', + }, + { + event: 'act_webinar_join', + marketoActivityId: '100025', + }, + { + event: 'act_presentation_addteammember', + marketoActivityId: '100025', + }, + { + event: 'act_engagement_discussions_savediscussion', + marketoActivityId: '100025', + }, + { + event: 'act_engagement_networking_savetime', + marketoActivityId: '100025', + }, + ], + }, + destinationDefinition: { + config: { + destConfig: { + defaultConfig: [ + 'accountId', + 'clientId', + 'clientSecret', + 'trackAnonymousEvents', + 'rudderEventsMapping', + 'customActivityPropertyMap', + 'leadTraitMapping', + ], + }, + secretKeys: ['clientSecret'], + excludeKeys: [], + includeKeys: [], + routerTransform: true, + supportedSourceTypes: [ + 'android', + 'ios', + 'web', + 'unity', + 'amp', + 'cloud', + 'reactnative', + ], + }, + responseRules: { + responseType: 'JSON', + rules: { + retryable: [ + { + success: 'false', + 'errors.0.code': 600, + }, + { + success: 'false', + 'errors.0.code': 601, + }, + { + success: 'false', + 'errors.0.code': 602, + }, + { + success: 'false', + 'errors.0.code': 604, + }, + { + success: 'false', + 'errors.0.code': 606, + }, + { + success: 'false', + 'errors.0.code': 607, + }, + { + success: 'false', + 'errors.0.code': 608, + }, + { + success: 'false', + 'errors.0.code': 611, + }, + ], + abortable: [ + { + success: 'false', + 'errors.0.code': 603, + }, + { + success: 'false', + 'errors.0.code': 605, + }, + { + success: 'false', + 'errors.0.code': 609, + }, + { + success: 'false', + 'errors.0.code': 610, + }, + ], + }, + }, + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'MARKETO', + displayName: 'Marketo', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVke', + name: 'Marketo', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmMd', + deleted: false, + createdAt: '2022-02-10T08:39:32.005Z', + updatedAt: '2022-09-03T16:22:31.374Z', + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + metadata: [ + { + destInfo: { + authKey: '1mMy5cqbtfuaKZv1IhVQKnBdVke', + }, + jobId: 4, }, + ], + }, + { + batchedRequest: { + version: '1', + type: 'REST', method: 'POST', + endpoint: + 'https://successful_identify_transformation.mktorest.com/rest/v1/leads.json', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer access_token_success', + }, + params: {}, + body: { + JSON: { + action: 'createOrUpdate', + input: [ + { + Email: '0c7b8b80-9c43-4f8e-b2d2-5e2448a25040@j.mail', + FirstName: 'A', + LastName: 'M', + id: 4, + userId: 'e17c5a5e-5e2f-430b-b497-fe3f1ea3a704', + }, + ], + lookupField: 'id', + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + }, + metadata: [ + { + destInfo: { + authKey: '1mMy5cqbtfuaKZv1IhVQKnBdVke', + }, + jobId: 5, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + accountId: 'successful_identify_transformation', + clientId: '504300cd-76b2-a7l4-bhle-90a07420nx73', + clientSecret: '3l3gJpzRsZagD6gu7tnTeKXz0bomLGnd', + trackAnonymousEvents: false, + createIfNotExist: true, + rudderEventsMapping: [ + { + event: 'acq_signup_completed', + marketoActivityId: '100026', + }, + { + event: 'act_createwebinarform_submit', + marketoActivityId: '100025', + }, + { + event: 'act_presentation_style', + marketoActivityId: '100025', + }, + { + event: 'act_webinar_view', + marketoActivityId: '100025', + }, + { + event: 'act_webinar_join', + marketoActivityId: '100025', + }, + { + event: 'act_presentation_addteammember', + marketoActivityId: '100025', + }, + { + event: 'act_engagement_discussions_savediscussion', + marketoActivityId: '100025', + }, + { + event: 'act_engagement_networking_savetime', + marketoActivityId: '100025', + }, + ], + }, + destinationDefinition: { + config: { + destConfig: { + defaultConfig: [ + 'accountId', + 'clientId', + 'clientSecret', + 'trackAnonymousEvents', + 'rudderEventsMapping', + 'customActivityPropertyMap', + 'leadTraitMapping', + ], + }, + secretKeys: ['clientSecret'], + excludeKeys: [], + includeKeys: [], + routerTransform: true, + supportedSourceTypes: [ + 'android', + 'ios', + 'web', + 'unity', + 'amp', + 'cloud', + 'reactnative', + ], + }, + responseRules: { + responseType: 'JSON', + rules: { + retryable: [ + { + success: 'false', + 'errors.0.code': 600, + }, + { + success: 'false', + 'errors.0.code': 601, + }, + { + success: 'false', + 'errors.0.code': 602, + }, + { + success: 'false', + 'errors.0.code': 604, + }, + { + success: 'false', + 'errors.0.code': 606, + }, + { + success: 'false', + 'errors.0.code': 607, + }, + { + success: 'false', + 'errors.0.code': 608, + }, + { + success: 'false', + 'errors.0.code': 611, + }, + ], + abortable: [ + { + success: 'false', + 'errors.0.code': 603, + }, + { + success: 'false', + 'errors.0.code': 605, + }, + { + success: 'false', + 'errors.0.code': 609, + }, + { + success: 'false', + 'errors.0.code': 610, + }, + ], + }, + }, + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'MARKETO', + displayName: 'Marketo', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVke', + name: 'Marketo', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmMd', + deleted: false, + createdAt: '2022-02-10T08:39:32.005Z', + updatedAt: '2022-09-03T16:22:31.374Z', + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + }, + ], + }, + }, + }, + }, + { + name: 'marketo', + description: 'processMetadataForRouter function specific test', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + message: { + anonymousId: 'anon_id_success', + channel: 'mobile', + context: { + app: { + build: '1', + name: 'TestAppName', + namespace: 'com.android.sample', + version: '1.0', + }, + device: { + id: 'anon_id_success', + manufacturer: 'Google', + model: 'Android SDK built for x86', + name: 'generic_x86', + type: 'android', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.1-beta.1', + }, + locale: 'en-US', + network: { + carrier: 'Android', + bluetooth: false, + cellular: true, + wifi: true, + }, + os: { + name: 'Android', + version: '8.1.0', + }, + screen: { + density: 420, + height: 1794, + width: 1080, + }, + timezone: 'Asia/Kolkata', + traits: { + anonymousId: 'anon_id_success', + }, + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)', + }, + event: 'Product Clicked', + integrations: { + All: true, + }, + messageId: 'id1', + properties: { + name: 'Test Product', + product_id: 'prod_1', + }, + originalTimestamp: '2020-12-17T21:00:59.176Z', + type: 'track', + sentAt: '2020-12-17T21:00:59.176Z', + }, + destination: { + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + Config: { + accountId: 'marketo_acct_id_success', + clientId: 'marketo_client_id_success', + clientSecret: 'marketo_client_secret_success', + trackAnonymousEvents: true, + customActivityPropertyMap: [ + { + from: 'name', + to: 'productName', + }, + { + from: 'product_id', + to: 'productId', + }, + ], + leadTraitMapping: [ + { + from: 'leadScore', + to: 'customLeadScore', + }, + ], + createIfNotExist: true, + rudderEventsMapping: [ + { + event: 'Product Clicked', + marketoPrimarykey: 'name', + marketoActivityId: '100001', + }, + ], + }, + }, + metadata: [ + { + jobId: 1, + }, + { + jobId: 1, + }, + { + jobId: 1, + }, + ], + batched: false, + statusCode: 200, }, + ], + destType: 'marketo', }, - output: { - response: { - status: 200, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://marketo_acct_id_success.mktorest.com/rest/v1/activities/external.json', + headers: { + Authorization: 'Bearer access_token_success', + 'Content-Type': 'application/json', + }, + params: {}, body: { - "output": [ - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://marketo_acct_id_success.mktorest.com/rest/v1/activities/external.json", - "headers": { - "Authorization": "Bearer access_token_success", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "input": [ - { - "activityDate": "2020-12-17T21:00:59.176Z", - "activityTypeId": 100001, - "attributes": [ - { - "name": "productId", - "value": "prod_1" - } - ], - "leadId": 4, - "primaryAttributeValue": "Test Product" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - [ - { - "jobId": 1 - }, - { - "jobId": 1 - }, - { - "jobId": 1 - } - ] - ], - "batched": false, - "statusCode": 200, - "destination": { - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "Config": { - "accountId": "marketo_acct_id_success", - "clientId": "marketo_client_id_success", - "clientSecret": "marketo_client_secret_success", - "trackAnonymousEvents": true, - "customActivityPropertyMap": [ - { - "from": "name", - "to": "productName" - }, - { - "from": "product_id", - "to": "productId" - } - ], - "leadTraitMapping": [ - { - "from": "leadScore", - "to": "customLeadScore" - } - ], - "createIfNotExist": true, - "rudderEventsMapping": [ - { - "event": "Product Clicked", - "marketoPrimarykey": "name", - "marketoActivityId": "100001" - } - ] - } - } - } + JSON: { + input: [ + { + activityDate: '2020-12-17T21:00:59.176Z', + activityTypeId: 100001, + attributes: [ + { + name: 'productId', + value: 'prod_1', + }, + ], + leadId: 4, + primaryAttributeValue: 'Test Product', + }, ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, }, + files: {}, + }, + metadata: [ + [ + { + jobId: 1, + }, + { + jobId: 1, + }, + { + jobId: 1, + }, + ], + ], + batched: false, + statusCode: 200, + destination: { + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + Config: { + accountId: 'marketo_acct_id_success', + clientId: 'marketo_client_id_success', + clientSecret: 'marketo_client_secret_success', + trackAnonymousEvents: true, + customActivityPropertyMap: [ + { + from: 'name', + to: 'productName', + }, + { + from: 'product_id', + to: 'productId', + }, + ], + leadTraitMapping: [ + { + from: 'leadScore', + to: 'customLeadScore', + }, + ], + createIfNotExist: true, + rudderEventsMapping: [ + { + event: 'Product Clicked', + marketoPrimarykey: 'name', + marketoActivityId: '100001', + }, + ], + }, + }, }, + ], }, - } + }, + }, + }, ]; diff --git a/test/integrations/destinations/monday/network.ts b/test/integrations/destinations/monday/network.ts new file mode 100644 index 0000000000..f23b9061f8 --- /dev/null +++ b/test/integrations/destinations/monday/network.ts @@ -0,0 +1,242 @@ +export const networkCallsData = [ + { + httpReq: { + url: 'https://api.monday.com/v2', + method: 'POST', + headers: { + Authorization: + 'eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih', + }, + }, + httpRes: { + data: { + data: { + boards: [ + { + name: 'Planning', + columns: [ + { + id: 'name', + title: 'Name', + type: 'name', + description: null, + settings_str: '{}', + }, + { + id: 'subitems', + title: 'Subitems', + type: 'subtasks', + description: null, + settings_str: + '{"allowMultipleItems":true,"itemTypeName":"column.subtasks.title","displayType":"BOARD_INLINE","boardIds":[3160974974]}', + }, + { + id: 'person', + title: 'Person', + type: 'multiple-person', + description: null, + settings_str: '{}', + }, + { + id: 'status', + title: 'Status', + type: 'color', + description: null, + settings_str: + '{"labels":{"0":"Working on it","1":"Done","2":"Stuck"},"labels_positions_v2":{"0":0,"1":2,"2":1,"5":3},"labels_colors":{"0":{"color":"#fdab3d","border":"#E99729","var_name":"orange"},"1":{"color":"#00c875","border":"#00B461","var_name":"green-shadow"},"2":{"color":"#e2445c","border":"#CE3048","var_name":"red-shadow"}}}', + }, + { + id: 'date4', + title: 'Date', + type: 'date', + description: null, + settings_str: '{}', + }, + { + id: 'checkbox', + title: 'Checkbox', + type: 'boolean', + description: null, + settings_str: '{}', + }, + { + id: 'connect_boards', + title: 'Connect boards', + type: 'board-relation', + description: null, + settings_str: '{"allowCreateReflectionColumn":false}', + }, + { + id: 'status_1', + title: 'Other', + type: 'color', + description: null, + settings_str: + '{"labels":{"0":"Working on it","1":"Done","2":"Stuck"},"labels_colors":{"0":{"color":"#fdab3d","border":"#E99729","var_name":"orange"},"1":{"color":"#00c875","border":"#00B461","var_name":"green-shadow"},"2":{"color":"#e2445c","border":"#CE3048","var_name":"red-shadow"}}}', + }, + { + id: 'date_1', + title: 'Date 1', + type: 'date', + description: null, + settings_str: '{"hide_footer":false}', + }, + { + id: 'status_12', + title: 'new status', + type: 'color', + description: null, + settings_str: + '{"labels":{"0":"Working on it","1":"Done","2":"Stuck"},"labels_colors":{"0":{"color":"#fdab3d","border":"#E99729","var_name":"orange"},"1":{"color":"#00c875","border":"#00B461","var_name":"green-shadow"},"2":{"color":"#e2445c","border":"#CE3048","var_name":"red-shadow"}}}', + }, + { + id: 'numbers', + title: 'Numbers', + type: 'numeric', + description: null, + settings_str: '{}', + }, + { + id: 'text', + title: 'Name', + type: 'text', + description: null, + settings_str: '{}', + }, + { + id: 'country', + title: 'Country', + type: 'country', + description: null, + settings_str: '{}', + }, + { + id: 'dropdown', + title: 'Dropdown', + type: 'dropdown', + description: null, + settings_str: + '{"hide_footer":false,"labels":[{"id":1,"name":"dropdown"},{"id":2,"name":"dropup"}]}', + }, + { + id: 'email', + title: 'Email', + type: 'email', + description: null, + settings_str: '{}', + }, + { + id: 'location', + title: 'Location', + type: 'location', + description: null, + settings_str: '{}', + }, + { + id: 'phone', + title: 'Phone', + type: 'phone', + description: null, + settings_str: '{}', + }, + { + id: 'rating', + title: 'Rating', + type: 'rating', + description: null, + settings_str: '{}', + }, + { + id: 'timeline', + title: 'Timeline', + type: 'timerange', + description: null, + settings_str: '{"hide_footer":false}', + }, + { + id: 'dependent_on', + title: 'Dependent On', + type: 'dependency', + description: + 'Choose the item your task will be dependent on. If the “dependent on” item’s date is changing, the other dates will adjust automatically', + settings_str: + '{"boardIds":[3142482015],"dependencyNewInfra":true,"allowMultipleItems":true}', + }, + { + id: 'long_text', + title: 'Long Text', + type: 'long-text', + description: null, + settings_str: '{}', + }, + { + id: 'link', + title: 'Link', + type: 'link', + description: null, + settings_str: '{}', + }, + { + id: 'tags', + title: 'Tags', + type: 'tag', + description: null, + settings_str: '{"hide_footer":false}', + }, + { + id: 'label', + title: 'Label', + type: 'color', + description: '', + settings_str: + '{"done_colors":[1],"labels":{"3":"Label 2","105":"Label 1","156":"Label 3"},"labels_positions_v2":{"3":1,"5":3,"105":0,"156":2},"labels_colors":{"3":{"color":"#0086c0","border":"#3DB0DF","var_name":"blue-links"},"105":{"color":"#9AADBD","border":"#9AADBD","var_name":"winter"},"156":{"color":"#9D99B9","border":"#9D99B9","var_name":"purple_gray"}}}', + }, + { + id: 'world_clock', + title: 'World Clock', + type: 'timezone', + description: null, + settings_str: '{}', + }, + { + id: 'week', + title: 'Week', + type: 'week', + description: null, + settings_str: '{}', + }, + ], + groups: [ + { + id: 'topics', + title: 'This month', + }, + { + id: 'group_title', + title: 'Next month', + }, + ], + }, + ], + }, + account_id: 13215538, + }, + status: 200, + }, + }, + { + httpReq: { + url: 'https://api.monday.com/v2', + method: 'POST', + headers: { + Authorization: 'failedApiToken', + }, + }, + httpRes: { + data: { + boards: [], + }, + status: 200, + }, + }, +]; diff --git a/test/integrations/destinations/monday/processor/data.ts b/test/integrations/destinations/monday/processor/data.ts new file mode 100644 index 0000000000..4e5280efcb --- /dev/null +++ b/test/integrations/destinations/monday/processor/data.ts @@ -0,0 +1,1399 @@ +export const data = [ + { + name: 'monday', + description: 'Track call with empty columnToPropertyMapping', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiToken: + 'eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih', + boardId: '339283933', + groupTitle: '', + columnToPropertyMapping: [], + whitelistedEvents: [ + { + eventName: 'create an item', + }, + ], + }, + }, + message: { + event: 'create an item', + type: 'track', + sentAt: '2021-01-03T17:02:53.195Z', + userId: 'user@27', + channel: 'web', + properties: { + name: 'Task 1', + }, + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + locale: 'en-US', + screen: { + density: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + FORM: {}, + JSON: { + query: + 'mutation { create_item (board_id: 339283933, item_name: "Task 1", column_values: "{}") {id}}', + }, + JSON_ARRAY: {}, + XML: {}, + }, + endpoint: 'https://api.monday.com/v2', + files: {}, + headers: { + Authorization: + 'eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih', + 'Content-Type': 'application/json', + }, + method: 'POST', + params: {}, + type: 'REST', + version: '1', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'monday', + description: 'Track call with undefined columnToPropertyMapping', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiToken: + 'eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih', + boardId: '339283933', + groupTitle: '', + whitelistedEvents: [ + { + eventName: 'create an item', + }, + ], + }, + }, + message: { + event: 'create an item', + type: 'track', + sentAt: '2021-01-03T17:02:53.195Z', + userId: 'user@27', + channel: 'web', + properties: { + name: 'Task 1', + }, + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + locale: 'en-US', + screen: { + density: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + FORM: {}, + JSON: { + query: + 'mutation { create_item (board_id: 339283933, item_name: "Task 1", column_values: "{}") {id}}', + }, + JSON_ARRAY: {}, + XML: {}, + }, + endpoint: 'https://api.monday.com/v2', + files: {}, + headers: { + Authorization: + 'eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih', + 'Content-Type': 'application/json', + }, + method: 'POST', + params: {}, + type: 'REST', + version: '1', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'monday', + description: 'Check Unsupported message type', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiToken: + 'eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih', + boardId: '339283933', + groupTitle: '', + columnToPropertyMapping: [], + whitelistedEvents: [ + { + eventName: 'create an item', + }, + ], + }, + }, + message: { + event: 'create an item', + type: 'identify', + sentAt: '2021-01-03T17:02:53.195Z', + userId: 'user@27', + channel: 'web', + properties: { + name: 'Task 1', + }, + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + locale: 'en-US', + screen: { + density: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Event type identify is not supported', + statTags: { + destType: 'MONDAY', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'monday', + description: 'Check for empty message type', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiToken: + 'eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih', + boardId: '339283933', + groupTitle: '', + columnToPropertyMapping: [], + whitelistedEvents: [ + { + eventName: 'create an item', + }, + ], + }, + }, + message: { + event: 'create an item', + type: '', + sentAt: '2021-01-03T17:02:53.195Z', + userId: 'user@27', + channel: 'web', + properties: { + name: 'Task 1', + }, + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + locale: 'en-US', + screen: { + density: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Event type is required', + statTags: { + destType: 'MONDAY', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'monday', + description: 'Check for empty API Token', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiToken: '', + boardId: '339283933', + groupTitle: '', + columnToPropertyMapping: [], + whitelistedEvents: [ + { + eventName: 'create an item', + }, + ], + }, + }, + message: { + event: 'create an item', + type: 'track', + sentAt: '2021-01-03T17:02:53.195Z', + userId: 'user@27', + channel: 'web', + properties: { + name: 'Task 1', + }, + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + locale: 'en-US', + screen: { + density: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'ApiToken is a required field', + statTags: { + destType: 'MONDAY', + errorCategory: 'dataValidation', + errorType: 'configuration', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'monday', + description: 'Check for empty board Id', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiToken: + 'eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih', + boardId: '', + groupTitle: '', + columnToPropertyMapping: [], + whitelistedEvents: [ + { + eventName: 'create an item', + }, + ], + }, + }, + message: { + event: 'create an item', + type: 'track', + sentAt: '2021-01-03T17:02:53.195Z', + userId: 'user@27', + channel: 'web', + properties: { + name: 'Task 1', + }, + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + locale: 'en-US', + screen: { + density: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'boardId is a required field', + statTags: { + destType: 'MONDAY', + errorCategory: 'dataValidation', + errorType: 'configuration', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'monday', + description: 'Check for event name', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiToken: + 'eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih', + boardId: '339283933', + groupTitle: '', + columnToPropertyMapping: [], + whitelistedEvents: [ + { + eventName: 'create an item', + }, + ], + }, + }, + message: { + event: '', + type: 'track', + sentAt: '2021-01-03T17:02:53.195Z', + userId: 'user@27', + channel: 'web', + properties: { + name: 'Task 1', + }, + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + locale: 'en-US', + screen: { + density: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Event is a required field and should be a string', + statTags: { + destType: 'MONDAY', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'monday', + description: 'Track call with columnToPropertyMapping and with empty groupTitle', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiToken: + 'eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih', + boardId: '339283933', + groupTitle: '', + columnToPropertyMapping: [ + { + from: 'Status', + to: 'status', + }, + { + from: 'Email', + to: 'emailId', + }, + ], + whitelistedEvents: [ + { + eventName: 'create an item', + }, + ], + }, + }, + message: { + event: 'create an item', + type: 'track', + sentAt: '2021-01-03T17:02:53.195Z', + userId: 'user@27', + channel: 'web', + properties: { + name: 'Task 1', + status: 'Done', + emailId: 'abc@email.com', + emailText: 'emailId', + }, + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + locale: 'en-US', + screen: { + density: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.monday.com/v2', + headers: { + 'Content-Type': 'application/json', + Authorization: + 'eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih', + }, + params: {}, + body: { + JSON: { + query: + 'mutation { create_item (board_id: 339283933, item_name: "Task 1", column_values: "{\\"status\\":{\\"label\\":\\"Done\\"},\\"email\\":{\\"email\\":\\"abc@email.com\\",\\"text\\":\\"emailId\\"}}") {id}}', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'monday', + description: 'Track call with columnToPropertyMapping and with groupTitle', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiToken: + 'eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih', + boardId: '339283933', + groupTitle: 'Next month', + columnToPropertyMapping: [ + { + from: 'Status', + to: 'status', + }, + { + from: 'Email', + to: 'emailId', + }, + ], + whitelistedEvents: [ + { + eventName: 'create an item', + }, + ], + }, + }, + message: { + event: 'create an item', + type: 'track', + sentAt: '2021-01-03T17:02:53.195Z', + userId: 'user@27', + channel: 'web', + properties: { + name: 'Task 1', + status: 'Done', + emailId: 'abc@email.com', + emailText: 'emailId', + }, + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + locale: 'en-US', + screen: { + density: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.monday.com/v2', + headers: { + 'Content-Type': 'application/json', + Authorization: + 'eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih', + }, + params: {}, + body: { + JSON: { + query: + 'mutation { create_item (board_id: 339283933, group_id: group_title item_name: "Task 1", column_values: "{\\"status\\":{\\"label\\":\\"Done\\"},\\"email\\":{\\"email\\":\\"abc@email.com\\",\\"text\\":\\"emailId\\"}}") {id}}', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'monday', + description: 'Non-existing group title check', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiToken: + 'eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih', + boardId: '339283933', + groupTitle: 'Next year', + columnToPropertyMapping: [ + { + from: 'Status', + to: 'status', + }, + { + from: 'Email', + to: 'emailId', + }, + ], + whitelistedEvents: [ + { + eventName: 'create an item', + }, + ], + }, + }, + message: { + event: 'create an item', + type: 'track', + sentAt: '2021-01-03T17:02:53.195Z', + userId: 'user@27', + channel: 'web', + properties: { + name: 'Task 1', + status: 'Done', + emailId: 'abc@email.com', + emailText: 'emailId', + }, + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + locale: 'en-US', + screen: { + density: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: "Group Next year doesn't exist in the board", + statTags: { + destType: 'MONDAY', + errorCategory: 'dataValidation', + errorType: 'configuration', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'monday', + description: 'check for item name', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiToken: + 'eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih', + boardId: '339283933', + groupTitle: 'Next month', + columnToPropertyMapping: [ + { + from: 'Status', + to: 'status', + }, + { + from: 'Email', + to: 'emailId', + }, + ], + whitelistedEvents: [ + { + eventName: 'create an item', + }, + ], + }, + }, + message: { + event: 'create an item', + type: 'track', + sentAt: '2021-01-03T17:02:53.195Z', + userId: 'user@27', + channel: 'web', + properties: { + name: '', + status: 'Done', + emailId: 'abc@email.com', + emailText: 'emailId', + }, + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + locale: 'en-US', + screen: { + density: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Item name is required to create an item', + statTags: { + destType: 'MONDAY', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'monday', + description: + 'Track call with columnToPropertyMapping and with groupTitle with all supported columns', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiToken: + 'eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih', + boardId: '339283933', + groupTitle: 'Next month', + columnToPropertyMapping: [ + { + from: 'Status', + to: 'status', + }, + { + from: 'Email', + to: 'emailId', + }, + { + from: 'Checkbox', + to: 'checked', + }, + { + from: 'Numbers', + to: 'number', + }, + { + from: 'Name', + to: 'textKey', + }, + { + from: 'Country', + to: 'countryName', + }, + { + from: 'Location', + to: 'address', + }, + { + from: 'Phone', + to: 'phone', + }, + { + from: 'Rating', + to: 'rating', + }, + { + from: 'Link', + to: 'url', + }, + { + from: 'Long Text', + to: 'description', + }, + { + from: 'World Clock', + to: 'timezone', + }, + ], + whitelistedEvents: [ + { + eventName: 'create an item', + }, + ], + }, + }, + message: { + event: 'create an item', + type: 'track', + sentAt: '2021-01-03T17:02:53.195Z', + userId: 'user@27', + channel: 'web', + properties: { + name: 'Task 1', + status: 'Done', + emailId: 'abc@email.com', + emailText: 'emailId', + countryCode: 'US', + latitude: '51.23', + longitude: '35.3', + rating: '3', + linkText: 'websiteLink', + checked: 'true', + number: '45', + textKey: 'texting', + countryName: 'Unites States', + countryShortName: 'US', + address: 'New York', + phone: '2626277272', + url: 'demo.com', + description: 'property description', + timezone: 'America/New_York', + }, + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + locale: 'en-US', + screen: { + density: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.monday.com/v2', + headers: { + 'Content-Type': 'application/json', + Authorization: + 'eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih', + }, + params: {}, + body: { + JSON: { + query: + 'mutation { create_item (board_id: 339283933, group_id: group_title item_name: "Task 1", column_values: "{\\"status\\":{\\"label\\":\\"Done\\"},\\"email\\":{\\"email\\":\\"abc@email.com\\",\\"text\\":\\"emailId\\"},\\"checkbox\\":{\\"checked\\":true},\\"numbers\\":\\"45\\",\\"text\\":\\"texting\\",\\"country\\":{\\"countryName\\":\\"Unites States\\",\\"countryCode\\":\\"US\\"},\\"location\\":{\\"address\\":\\"New York\\",\\"lat\\":\\"51.23\\",\\"lng\\":\\"35.3\\"},\\"phone\\":{\\"phone\\":\\"2626277272\\",\\"countryShortName\\":\\"US\\"},\\"rating\\":3,\\"link\\":{\\"url\\":\\"demo.com\\",\\"text\\":\\"websiteLink\\"},\\"long_text\\":{\\"text\\":\\"property description\\"},\\"world_clock\\":{\\"timezone\\":\\"America/New_York\\"}}") {id}}', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'monday', + description: 'check for allowed event name from UI', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiToken: + 'eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih', + boardId: '339283933', + groupTitle: 'Next month', + columnToPropertyMapping: [ + { + from: 'Status', + to: 'status', + }, + { + from: 'Email', + to: 'emailId', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + }, + message: { + event: 'create an item', + type: 'track', + sentAt: '2021-01-03T17:02:53.195Z', + userId: 'user@27', + channel: 'web', + properties: { + name: '', + status: 'Done', + emailId: 'abc@email.com', + emailText: 'emailId', + }, + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + locale: 'en-US', + screen: { + density: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Event Discarded. To allow this event, add this in Allowlist', + statTags: { + destType: 'MONDAY', + errorCategory: 'dataValidation', + errorType: 'configuration', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'monday', + description: 'check for deleted boards (configured boards are deleted)', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiToken: 'failedApiToken', + boardId: '339283934', + groupTitle: 'Next year', + columnToPropertyMapping: [ + { + from: 'Status', + to: 'status', + }, + { + from: 'Email', + to: 'emailId', + }, + ], + whitelistedEvents: [ + { + eventName: 'create an item', + }, + ], + }, + }, + message: { + event: 'create an item', + type: 'track', + sentAt: '2021-01-03T17:02:53.195Z', + userId: 'user@27', + channel: 'web', + properties: { + name: 'Task 1', + status: 'Done', + emailId: 'abc@email.com', + emailText: 'emailId', + }, + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + locale: 'en-US', + screen: { + density: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'The board with boardId 339283934 does not exist', + statTags: { + destType: 'MONDAY', + errorCategory: 'dataValidation', + errorType: 'configuration', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, +]; diff --git a/test/integrations/destinations/monday/router/data.ts b/test/integrations/destinations/monday/router/data.ts new file mode 100644 index 0000000000..eefc106274 --- /dev/null +++ b/test/integrations/destinations/monday/router/data.ts @@ -0,0 +1,228 @@ +export const data = [ + { + name: 'monday', + description: 'Test 0', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + destination: { + Config: { + apiToken: + 'eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih', + boardId: '339283933', + groupTitle: '', + columnToPropertyMapping: [], + whitelistedEvents: [{ eventName: 'create an item' }], + }, + }, + metadata: { + jobId: 1, + }, + message: { + event: 'create an item', + type: 'track', + sentAt: '2021-01-03T17:02:53.195Z', + userId: 'user@27', + channel: 'web', + properties: { + name: 'Task 1', + }, + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + locale: 'en-US', + screen: { + density: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + }, + { + destination: { + Config: { + apiToken: + 'eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih', + boardId: '339283933', + groupTitle: 'Next month', + columnToPropertyMapping: [ + { + from: 'Status', + to: 'status', + }, + { from: 'Email', to: 'emailId' }, + ], + whitelistedEvents: [{ eventName: 'create an item' }], + }, + }, + metadata: { + jobId: 2, + }, + message: { + event: 'create an item', + type: 'track', + sentAt: '2021-01-03T17:02:53.195Z', + userId: 'user@27', + channel: 'web', + properties: { + name: 'Task 1', + status: 'Done', + emailId: 'abc@email.com', + emailText: 'emailId', + }, + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + locale: 'en-US', + screen: { + density: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + }, + ], + destType: 'monday', + }, + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: { + body: { + FORM: {}, + JSON: { + query: + 'mutation { create_item (board_id: 339283933, item_name: "Task 1", column_values: "{}") {id}}', + }, + JSON_ARRAY: {}, + XML: {}, + }, + endpoint: 'https://api.monday.com/v2', + files: {}, + headers: { + Authorization: + 'eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih', + 'Content-Type': 'application/json', + }, + method: 'POST', + params: {}, + type: 'REST', + version: '1', + }, + metadata: [ + { + jobId: 1, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + apiToken: + 'eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih', + boardId: '339283933', + groupTitle: '', + columnToPropertyMapping: [], + whitelistedEvents: [{ eventName: 'create an item' }], + }, + }, + }, + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.monday.com/v2', + headers: { + 'Content-Type': 'application/json', + Authorization: + 'eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih', + }, + params: {}, + body: { + JSON: { + query: + 'mutation { create_item (board_id: 339283933, group_id: group_title item_name: "Task 1", column_values: "{\\"status\\":{\\"label\\":\\"Done\\"},\\"email\\":{\\"email\\":\\"abc@email.com\\",\\"text\\":\\"emailId\\"}}") {id}}', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + metadata: [ + { + jobId: 2, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + apiToken: + 'eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih', + boardId: '339283933', + groupTitle: 'Next month', + columnToPropertyMapping: [ + { + from: 'Status', + to: 'status', + }, + { from: 'Email', to: 'emailId' }, + ], + whitelistedEvents: [{ eventName: 'create an item' }], + }, + }, + }, + ], + }, + }, + }, + }, +]; diff --git a/test/integrations/destinations/profitwell/network.ts b/test/integrations/destinations/profitwell/network.ts new file mode 100644 index 0000000000..e4e7247c74 --- /dev/null +++ b/test/integrations/destinations/profitwell/network.ts @@ -0,0 +1,94 @@ +export const networkCallsData = [ + { + httpReq: { + url: 'https://api.profitwell.com/v2/users/pwu_Oea7HXV3bnTP/', + method: 'GET', + }, + httpRes: { + data: [ + { + user_id: 'pwu_Oea7HXV3bnTP', + subscription_id: 'pws_FecTCEyo17rV', + user_alias: 'spiderman_1a', + subscription_alias: 'spiderman_sub_1a', + email: 'spiderman@profitwell.com', + plan_id: 'web_plan', + plan_interval: 'month', + plan_currency: 'usd', + status: 'active', + value: 5000, + effective_date: 1514764800, + meta: {}, + }, + ], + status: 200, + }, + }, + { + httpReq: { + url: 'https://api.profitwell.com/v2/users/spiderman_1a/', + method: 'GET', + }, + httpRes: { + data: [ + { + user_id: 'pwu_Oea7HXV3bnTP', + subscription_id: 'pws_FecTCEyo17rV', + user_alias: 'spiderman_1a', + subscription_alias: 'spiderman_sub_1a', + email: 'spiderman@profitwell.com', + plan_id: 'web_plan', + plan_interval: 'month', + plan_currency: 'usd', + status: 'active', + value: 5000, + effective_date: 1514764800, + meta: {}, + }, + ], + status: 200, + }, + }, + { + httpReq: { + url: 'https://api.profitwell.com/v2/users/23453/', + method: 'GET', + }, + httpRes: { + status: 404, + }, + }, + { + httpReq: { + url: 'https://api.profitwell.com/v2/users/sp_245/', + method: 'GET', + }, + httpRes: { + message: 'Request failed with status code 404', + status: 404, + statusText: 'Not Found', + }, + }, + { + httpReq: { + url: 'https://api.profitwell.com/v2/users/1234/', + method: 'GET', + }, + httpRes: { + message: 'Request failed with status code 404', + status: 404, + statusText: 'Not Found', + }, + }, + { + httpReq: { + url: 'https://api.profitwell.com/v2/users/samual/', + method: 'GET', + }, + httpRes: { + message: 'Request failed with status code 404', + status: 404, + statusText: 'Not Found', + }, + }, +]; diff --git a/test/integrations/destinations/profitwell/processor/data.ts b/test/integrations/destinations/profitwell/processor/data.ts new file mode 100644 index 0000000000..58bd2ed35f --- /dev/null +++ b/test/integrations/destinations/profitwell/processor/data.ts @@ -0,0 +1,1241 @@ +export const data = [ + { + name: 'profitwell', + description: 'Test 0', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + privateApiKey: '9270161a8e5abaa0e56efddfd9dbcb62', + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.9', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.9', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + email: 'sample@sample.com', + planId: '23', + planInterval: 'month', + planCurrency: 'usd', + value: '23', + subscriptionAlias: 'samual', + status: 'active', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36', + }, + messageId: '6a5f38c0-4e75-4268-a066-2b73fbcad01f', + originalTimestamp: '2021-01-04T08:25:04.780Z', + receivedAt: '2021-01-04T13:55:04.799+05:30', + request_ip: '[::1]', + rudderId: '79881a62-980a-4d76-89ca-7099440f8c13', + sentAt: '2021-01-04T08:25:04.781Z', + timestamp: '2021-09-06T14:15:06.798+05:30', + type: 'identify', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'userId or userAlias is required for identify', + statTags: { + destType: 'PROFITWELL', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'profitwell', + description: 'Test 1', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + privateApiKey: '9270161a8e5abaa0e56efddfd9dbcb62', + }, + }, + message: { + channel: 'web', + context: { + externalId: [ + { + type: 'profitwellUserId', + id: '23453', + }, + ], + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.9', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.9', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + email: 'sample@sample.com', + planId: '23', + planInterval: 'month', + planCurrency: 'usd', + value: '23', + subscriptionAlias: 'samual', + status: 'active', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36', + }, + messageId: '6a5f38c0-4e75-4268-a066-2b73fbcad01f', + originalTimestamp: '2021-01-04T08:25:04.780Z', + receivedAt: '2021-01-04T13:55:04.799+05:30', + request_ip: '[::1]', + rudderId: '79881a62-980a-4d76-89ca-7099440f8c13', + sentAt: '2021-01-04T08:25:04.781Z', + timestamp: '2021-09-06T14:15:06.798+05:30', + type: 'identify', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'No user found for profitwell user_id', + statTags: { + destType: 'PROFITWELL', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'profitwell', + description: 'Test 2', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + privateApiKey: '9270161a8e5abaa0e56efddfd9dbcb62', + }, + }, + message: { + channel: 'web', + userId: 'sp_245', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.9', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.9', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + email: 'sample@sample.com', + planId: '23', + planInterval: 'month', + planCurrency: 'usd', + value: '23', + subscriptionAlias: 'samual', + status: 'active', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36', + }, + messageId: '6a5f38c0-4e75-4268-a066-2b73fbcad01f', + originalTimestamp: '2021-01-04T08:25:04.780Z', + receivedAt: '2021-01-04T13:55:04.799+05:30', + request_ip: '[::1]', + rudderId: '79881a62-980a-4d76-89ca-7099440f8c13', + sentAt: '2021-01-04T08:25:04.781Z', + timestamp: '2021-09-06T14:15:06.798+05:30', + type: 'identify', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.profitwell.com/v2/subscriptions/', + headers: { + 'Content-Type': 'application/json', + Authorization: '9270161a8e5abaa0e56efddfd9dbcb62', + }, + params: {}, + body: { + JSON: { + subscription_alias: 'samual', + email: 'sample@sample.com', + plan_id: '23', + plan_interval: 'month', + plan_currency: 'usd', + status: 'active', + value: '23', + user_alias: 'sp_245', + effective_date: 1630917906, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'profitwell', + description: 'Test 3', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + privateApiKey: '9270161a8e5abaa0e56efddfd9dbcb62', + }, + }, + message: { + channel: 'web', + userId: 'sp_245', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.9', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.9', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + email: 'sample@sample.com', + planId: '23', + planInterval: 'month', + planCurrency: 'usd', + value: '23', + status: 'active', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36', + }, + messageId: '6a5f38c0-4e75-4268-a066-2b73fbcad01f', + originalTimestamp: '2021-01-04T08:25:04.780Z', + receivedAt: '2021-01-04T13:55:04.799+05:30', + request_ip: '[::1]', + rudderId: '79881a62-980a-4d76-89ca-7099440f8c13', + sentAt: '2021-01-04T08:25:04.781Z', + timestamp: '2021-09-06T14:15:06.798+05:30', + type: 'identify', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'subscriptionId or subscriptionAlias is required for identify', + statTags: { + destType: 'PROFITWELL', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'profitwell', + description: 'Test 4', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + privateApiKey: '9270161a8e5abaa0e56efddfd9dbcb62', + }, + }, + message: { + channel: 'web', + userId: 'sp_245', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.9', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.9', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'profitwellUserId', + id: '1234', + }, + ], + traits: { + email: 'sample@sample.com', + planId: '23', + planInterval: 'month', + planCurrency: 'usd', + value: '23', + subscriptionAlias: 'samual', + status: 'active', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36', + }, + messageId: '6a5f38c0-4e75-4268-a066-2b73fbcad01f', + originalTimestamp: '2021-01-04T08:25:04.780Z', + receivedAt: '2021-01-04T13:55:04.799+05:30', + request_ip: '[::1]', + rudderId: '79881a62-980a-4d76-89ca-7099440f8c13', + sentAt: '2021-01-04T08:25:04.781Z', + timestamp: '2021-09-06T14:15:06.798+05:30', + type: 'identify', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'No user found for profitwell user_id', + statTags: { + destType: 'PROFITWELL', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'profitwell', + description: 'Test 5', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + privateApiKey: '9270161a8e5abaa0e56efddfd9dbcb62', + }, + }, + message: { + channel: 'web', + userId: 'sp_245', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.9', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.9', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'profitwellUserId', + id: 'pwu_Oea7HXV3bnTP', + }, + ], + traits: { + email: 'sample@sample.com', + planId: '23', + planInterval: 'month', + planCurrency: 'usd', + value: '23', + subscriptionAlias: 'samual', + status: 'active', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36', + }, + messageId: '6a5f38c0-4e75-4268-a066-2b73fbcad01f', + originalTimestamp: '2021-01-04T08:25:04.780Z', + receivedAt: '2021-01-04T13:55:04.799+05:30', + request_ip: '[::1]', + rudderId: '79881a62-980a-4d76-89ca-7099440f8c13', + sentAt: '2021-01-04T08:25:04.781Z', + timestamp: '2021-09-06T14:15:06.798+05:30', + type: 'identify', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.profitwell.com/v2/subscriptions/', + headers: { + 'Content-Type': 'application/json', + Authorization: '9270161a8e5abaa0e56efddfd9dbcb62', + }, + params: {}, + body: { + JSON: { + subscription_alias: 'samual', + email: 'sample@sample.com', + plan_id: '23', + plan_interval: 'month', + plan_currency: 'usd', + status: 'active', + value: '23', + user_id: 'pwu_Oea7HXV3bnTP', + user_alias: 'sp_245', + effective_date: 1630917906, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'profitwell', + description: 'Test 6', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + privateApiKey: '9270161a8e5abaa0e56efddfd9dbcb62', + }, + }, + message: { + channel: 'web', + userId: 'sp_245', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.9', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.9', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'profitwellUserId', + id: 'pwu_Oea7HXV3bnTP', + }, + { + type: 'profitwellSubscriptionId', + id: 'pws_FecTCEyo17rV', + }, + ], + traits: { + email: 'sample@sample.com', + planId: '23', + planInterval: 'month', + planCurrency: 'usd', + value: '23', + subscriptionAlias: 'samual', + status: 'active', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36', + }, + messageId: '6a5f38c0-4e75-4268-a066-2b73fbcad01f', + originalTimestamp: '2021-01-04T08:25:04.780Z', + receivedAt: '2021-01-04T13:55:04.799+05:30', + request_ip: '[::1]', + rudderId: '79881a62-980a-4d76-89ca-7099440f8c13', + sentAt: '2021-01-04T08:25:04.781Z', + timestamp: '2021-09-06T14:15:06.798+05:30', + type: 'identify', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: + 'Missing required value from ["traits.effectiveDate","context.traits.effectiveDate"]', + statTags: { + destType: 'PROFITWELL', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'profitwell', + description: 'Test 7', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + privateApiKey: '9270161a8e5abaa0e56efddfd9dbcb62', + }, + }, + message: { + channel: 'web', + userId: 'sp_245', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.9', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.9', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'profitwellUserId', + id: 'pwu_Oea7HXV3bnTP', + }, + { + type: 'profitwellSubscriptionId', + id: 'pws_FecTCEyo17rV', + }, + ], + traits: { + email: 'sample@sample.com', + planId: '23', + planInterval: 'month', + planCurrency: 'usd', + value: '23', + subscriptionAlias: 'samual', + status: 'active', + effectiveDate: '1609748705', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36', + }, + messageId: '6a5f38c0-4e75-4268-a066-2b73fbcad01f', + originalTimestamp: '2021-01-04T08:25:04.780Z', + receivedAt: '2021-01-04T13:55:04.799+05:30', + request_ip: '[::1]', + rudderId: '79881a62-980a-4d76-89ca-7099440f8c13', + sentAt: '2021-01-04T08:25:04.781Z', + timestamp: '2021-09-06T14:15:06.798+05:30', + type: 'identify', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'PUT', + endpoint: 'https://api.profitwell.com/v2/subscriptions/pws_FecTCEyo17rV/', + headers: { + 'Content-Type': 'application/json', + Authorization: '9270161a8e5abaa0e56efddfd9dbcb62', + }, + params: {}, + body: { + JSON: { + plan_id: '23', + plan_interval: 'month', + value: '23', + status: 'active', + effective_date: 1609748705, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'profitwell', + description: 'Test 8', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + privateApiKey: '9270161a8e5abaa0e56efddfd9dbcb62', + }, + }, + message: { + channel: 'web', + userId: 'sp_245', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.9', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.9', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'profitwellUserId', + id: 'pwu_Oea7HXV3bnTP', + }, + { + type: 'profitwellSubscriptionId', + id: 'pws_FecTCEyo17rV', + }, + ], + traits: { + email: 'sample@sample.com', + planId: '23', + planInterval: 'monthly', + planCurrency: 'usd', + value: '23', + subscriptionAlias: 'samual', + status: 'active', + effectiveDate: '1609748705', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36', + }, + messageId: '6a5f38c0-4e75-4268-a066-2b73fbcad01f', + originalTimestamp: '2021-01-04T08:25:04.780Z', + receivedAt: '2021-01-04T13:55:04.799+05:30', + request_ip: '[::1]', + rudderId: '79881a62-980a-4d76-89ca-7099440f8c13', + sentAt: '2021-01-04T08:25:04.781Z', + timestamp: '2021-09-06T14:15:06.798+05:30', + type: 'identify', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'invalid format for planInterval. Aborting', + statTags: { + destType: 'PROFITWELL', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'profitwell', + description: 'Test 9', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + privateApiKey: '9270161a8e5abaa0e56efddfd9dbcb62', + }, + }, + message: { + channel: 'web', + userId: 'sp_245', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.9', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.9', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'profitwellUserId', + id: 'pwu_Oea7HXV3bnTP', + }, + { + type: 'profitwellSubscriptionId', + id: 'pws_FecTCEyo17rV', + }, + ], + traits: { + email: 'sample@sample.com', + planId: '23', + planInterval: 'month', + planCurrency: 'usd', + value: '23', + subscriptionAlias: 'samual', + status: 'activate', + effectiveDate: '1609748705', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36', + }, + messageId: '6a5f38c0-4e75-4268-a066-2b73fbcad01f', + originalTimestamp: '2021-01-04T08:25:04.780Z', + receivedAt: '2021-01-04T13:55:04.799+05:30', + request_ip: '[::1]', + rudderId: '79881a62-980a-4d76-89ca-7099440f8c13', + sentAt: '2021-01-04T08:25:04.781Z', + timestamp: '2021-09-06T14:15:06.798+05:30', + type: 'identify', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'PUT', + endpoint: 'https://api.profitwell.com/v2/subscriptions/pws_FecTCEyo17rV/', + headers: { + 'Content-Type': 'application/json', + Authorization: '9270161a8e5abaa0e56efddfd9dbcb62', + }, + params: {}, + body: { + JSON: { + plan_id: '23', + plan_interval: 'month', + value: '23', + effective_date: 1609748705, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'profitwell', + description: 'Test 10', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: {}, + }, + message: { + channel: 'web', + userId: 'sp_245', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.9', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.9', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'profitwellUserId', + id: 'pwu_Oea7HXV3bnTP', + }, + { + type: 'profitwellSubscriptionId', + id: 'pws_FecTCEyo17rV', + }, + ], + traits: { + email: 'sample@sample.com', + planId: '23', + planInterval: 'month', + planCurrency: 'usd', + value: '23', + subscriptionAlias: 'samual', + status: 'active', + effectiveDate: '1609748705', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36', + }, + messageId: '6a5f38c0-4e75-4268-a066-2b73fbcad01f', + originalTimestamp: '2021-01-04T08:25:04.780Z', + receivedAt: '2021-01-04T13:55:04.799+05:30', + request_ip: '[::1]', + rudderId: '79881a62-980a-4d76-89ca-7099440f8c13', + sentAt: '2021-01-04T08:25:04.781Z', + timestamp: '2021-09-06T14:15:06.798+05:30', + type: 'identify', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Private API Key not found. Aborting.', + statTags: { + destType: 'PROFITWELL', + errorCategory: 'dataValidation', + errorType: 'configuration', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'profitwell', + description: 'Test 11', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + privateApiKey: '9270161a8e5abaa0e56efddfd9dbcb62', + }, + }, + message: { + channel: 'web', + userId: 'sp_245', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.9', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.9', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'profitwellUserId', + id: 'pwu_Oea7HXV3bnTP', + }, + { + type: 'profitwellSubscriptionId', + id: 'pws_FecTCEyo17', + }, + ], + traits: { + email: 'sample@sample.com', + planId: '23', + planInterval: 'month', + planCurrency: 'usd', + value: '23', + subscriptionAlias: 'samual', + status: 'active', + effectiveDate: '1609748705', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36', + }, + messageId: '6a5f38c0-4e75-4268-a066-2b73fbcad01f', + originalTimestamp: '2021-01-04T08:25:04.780Z', + receivedAt: '2021-01-04T13:55:04.799+05:30', + request_ip: '[::1]', + rudderId: '79881a62-980a-4d76-89ca-7099440f8c13', + sentAt: '2021-01-04T08:25:04.781Z', + timestamp: '2021-09-06T14:15:06.798+05:30', + type: 'identify', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Profitwell subscription_id not found', + statTags: { + destType: 'PROFITWELL', + errorCategory: 'network', + errorType: 'aborted', + feature: 'processor', + implementation: 'native', + meta: 'instrumentation', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'profitwell', + description: 'Test 12', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + privateApiKey: '9270161a8e5abaa0e56efddfd9dbcb62', + }, + }, + message: { + channel: 'web', + userId: 'sp_245', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.9', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.9', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + email: 'sample@sample.com', + planId: '23', + planInterval: 'month', + planCurrency: 'usd', + value: '23', + subscriptionAlias: 'samual', + status: 'active', + effectiveDate: 1609748705, + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36', + }, + messageId: '6a5f38c0-4e75-4268-a066-2b73fbcad01f', + originalTimestamp: '2021-01-04T08:25:04.780Z', + receivedAt: '2021-01-04T13:55:04.799+05:30', + request_ip: '[::1]', + rudderId: '79881a62-980a-4d76-89ca-7099440f8c13', + sentAt: '2021-01-04T08:25:04.781Z', + timestamp: '2021-09-06T14:15:06.798+05:30', + type: 'identify', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.profitwell.com/v2/subscriptions/', + headers: { + 'Content-Type': 'application/json', + Authorization: '9270161a8e5abaa0e56efddfd9dbcb62', + }, + params: {}, + body: { + JSON: { + subscription_alias: 'samual', + email: 'sample@sample.com', + plan_id: '23', + plan_interval: 'month', + plan_currency: 'usd', + status: 'active', + value: '23', + effective_date: 1609748705, + user_alias: 'sp_245', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, +]; diff --git a/test/integrations/destinations/profitwell/router/data.ts b/test/integrations/destinations/profitwell/router/data.ts new file mode 100644 index 0000000000..11f08c2139 --- /dev/null +++ b/test/integrations/destinations/profitwell/router/data.ts @@ -0,0 +1,113 @@ +export const data = [ + { + name: 'profitwell', + description: 'Test 0', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + destination: { + Config: { + privateApiKey: '9270161a8e5abaa0e56efddfd9dbcb62', + }, + }, + metadata: { + jobId: 2, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { name: '', version: '' }, + screen: { density: 2 }, + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + type: 'identify', + userId: 'samual', + traits: { + email: 'sample@sample.com', + planId: '23', + planInterval: 'month', + planCurrency: 'usd', + value: '23', + subscriptionAlias: 'samual', + status: 'active', + }, + integrations: { All: true }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + destType: 'profitwell', + }, + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: { + body: { + XML: {}, + FORM: {}, + JSON: { + subscription_alias: 'samual', + email: 'sample@sample.com', + plan_id: '23', + plan_interval: 'month', + plan_currency: 'usd', + status: 'active', + value: '23', + user_alias: 'samual', + effective_date: 1571043797, + }, + JSON_ARRAY: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + headers: { + 'Content-Type': 'application/json', + Authorization: '9270161a8e5abaa0e56efddfd9dbcb62', + }, + version: '1', + endpoint: 'https://api.profitwell.com/v2/subscriptions/', + }, + metadata: [ + { + jobId: 2, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + privateApiKey: '9270161a8e5abaa0e56efddfd9dbcb62', + }, + }, + }, + ], + }, + }, + }, + }, +]; diff --git a/test/integrations/destinations/sendgrid/network.ts b/test/integrations/destinations/sendgrid/network.ts index c97bf7e66e..29cfbf8446 100644 --- a/test/integrations/destinations/sendgrid/network.ts +++ b/test/integrations/destinations/sendgrid/network.ts @@ -112,159 +112,159 @@ const deleteNwData = [ url: 'https://api.sendgrid.com/v3/marketing/field_definitions', headers: { Authorization: 'Bearer apikey', - 'Content-Type': 'application/json' + 'Content-Type': 'application/json', }, }, httpRes: { status: 200, statusText: 'OK', data: { - "custom_fields": [ + custom_fields: [ { - "id": "w1_T", - "name": "user_name", - "field_type": "Text", - "_metadata": { - "self": "https://api.sendgrid.com/v3/marketing/field_definitions/w1_T" - } - } + id: 'w1_T', + name: 'user_name', + field_type: 'Text', + _metadata: { + self: 'https://api.sendgrid.com/v3/marketing/field_definitions/w1_T', + }, + }, ], - "reserved_fields": [ + reserved_fields: [ { - "id": "_rf0_T", - "name": "first_name", - "field_type": "Text" + id: '_rf0_T', + name: 'first_name', + field_type: 'Text', }, { - "id": "_rf1_T", - "name": "last_name", - "field_type": "Text" + id: '_rf1_T', + name: 'last_name', + field_type: 'Text', }, { - "id": "_rf2_T", - "name": "email", - "field_type": "Text" + id: '_rf2_T', + name: 'email', + field_type: 'Text', }, { - "id": "_rf3_T", - "name": "alternate_emails", - "field_type": "Text" + id: '_rf3_T', + name: 'alternate_emails', + field_type: 'Text', }, { - "id": "_rf4_T", - "name": "address_line_1", - "field_type": "Text" + id: '_rf4_T', + name: 'address_line_1', + field_type: 'Text', }, { - "id": "_rf5_T", - "name": "address_line_2", - "field_type": "Text" + id: '_rf5_T', + name: 'address_line_2', + field_type: 'Text', }, { - "id": "_rf6_T", - "name": "city", - "field_type": "Text" + id: '_rf6_T', + name: 'city', + field_type: 'Text', }, { - "id": "_rf7_T", - "name": "state_province_region", - "field_type": "Text" + id: '_rf7_T', + name: 'state_province_region', + field_type: 'Text', }, { - "id": "_rf8_T", - "name": "postal_code", - "field_type": "Text" + id: '_rf8_T', + name: 'postal_code', + field_type: 'Text', }, { - "id": "_rf9_T", - "name": "country", - "field_type": "Text" + id: '_rf9_T', + name: 'country', + field_type: 'Text', }, { - "id": "_rf10_T", - "name": "phone_number", - "field_type": "Text" + id: '_rf10_T', + name: 'phone_number', + field_type: 'Text', }, { - "id": "_rf11_T", - "name": "whatsapp", - "field_type": "Text" + id: '_rf11_T', + name: 'whatsapp', + field_type: 'Text', }, { - "id": "_rf12_T", - "name": "line", - "field_type": "Text" + id: '_rf12_T', + name: 'line', + field_type: 'Text', }, { - "id": "_rf13_T", - "name": "facebook", - "field_type": "Text" + id: '_rf13_T', + name: 'facebook', + field_type: 'Text', }, { - "id": "_rf14_T", - "name": "unique_name", - "field_type": "Text" + id: '_rf14_T', + name: 'unique_name', + field_type: 'Text', }, { - "id": "_rf15_T", - "name": "email_domains", - "field_type": "Text", - "read_only": true + id: '_rf15_T', + name: 'email_domains', + field_type: 'Text', + read_only: true, }, { - "id": "_rf16_D", - "name": "last_clicked", - "field_type": "Date", - "read_only": true + id: '_rf16_D', + name: 'last_clicked', + field_type: 'Date', + read_only: true, }, { - "id": "_rf17_D", - "name": "last_opened", - "field_type": "Date", - "read_only": true + id: '_rf17_D', + name: 'last_opened', + field_type: 'Date', + read_only: true, }, { - "id": "_rf18_D", - "name": "last_emailed", - "field_type": "Date", - "read_only": true + id: '_rf18_D', + name: 'last_emailed', + field_type: 'Date', + read_only: true, }, { - "id": "_rf19_T", - "name": "singlesend_id", - "field_type": "Text", - "read_only": true + id: '_rf19_T', + name: 'singlesend_id', + field_type: 'Text', + read_only: true, }, { - "id": "_rf20_T", - "name": "automation_id", - "field_type": "Text", - "read_only": true + id: '_rf20_T', + name: 'automation_id', + field_type: 'Text', + read_only: true, }, { - "id": "_rf21_D", - "name": "created_at", - "field_type": "Date", - "read_only": true + id: '_rf21_D', + name: 'created_at', + field_type: 'Date', + read_only: true, }, { - "id": "_rf22_D", - "name": "updated_at", - "field_type": "Date", - "read_only": true + id: '_rf22_D', + name: 'updated_at', + field_type: 'Date', + read_only: true, }, { - "id": "_rf23_T", - "name": "contact_id", - "field_type": "Text", - "read_only": true - } + id: '_rf23_T', + name: 'contact_id', + field_type: 'Text', + read_only: true, + }, ], - "_metadata": { - "self": "https://api.sendgrid.com/v3/marketing/field_definitions" - } + _metadata: { + self: 'https://api.sendgrid.com/v3/marketing/field_definitions', + }, }, }, - } + }, ]; export const networkCallsData = [...deleteNwData]; diff --git a/test/integrations/destinations/sendgrid/processor/data.ts b/test/integrations/destinations/sendgrid/processor/data.ts index 3047d484ec..b1550787b5 100644 --- a/test/integrations/destinations/sendgrid/processor/data.ts +++ b/test/integrations/destinations/sendgrid/processor/data.ts @@ -1,1533 +1,1544 @@ export const data = [ - { - "name": "sendgrid", - "description": "Identify call without an email", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "destination": { - "Config": { - "IPPoolName": "", - "apiKey": "apikey", - "attachments": [ - { - "content": "", - "contentId": "", - "disposition": "", - "filename": "", - "type": "" - } - ], - "clickTracking": true, - "clickTrackingEnableText": true, - "contents": [ - { - "type": "text/html", - "value": "

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

" - } - ], - "eventDelivery": false, - "eventDeliveryTS": 1668424218224, - "eventNamesSettings": [ - { - "event": "open" - } - ], - "footer": false, - "fromEmail": "a@g.com", - "fromName": "", - "ganalytics": false, - "group": "", - "groupsToDisplay": [ - { - "groupId": "" - } - ], - "html": "", - "listId": "list111", - "mailFromTraits": false, - "openTracking": false, - "openTrackingSubstitutionTag": "", - "replyToEmail": "", - "replyToName": "", - "sandboxMode": false, - "subject": "hello there from webflow", - "subscriptionTracking": false, - "substitutionTag": "", - "templateId": "", - "text": "" - } - }, - "message": { - "type": "identify", - "userId": "user@1", - "context": { - "traits": { - "age": "25", - "city": "Surat", - "phone": "+91 9876543210", - "lastName": "test", - "firstName": "rudder", - "state": "Gujarat" - } - } - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "statusCode": 400, - "error": "Parameter mail is required", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation", - "destType": "SENDGRID", - "module": "destination", - "implementation": "native", - "feature": "processor" - } - } - ] - } - } + { + name: 'sendgrid', + description: 'Identify call without an email', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + IPPoolName: '', + apiKey: 'apikey', + attachments: [ + { + content: '', + contentId: '', + disposition: '', + filename: '', + type: '', + }, + ], + clickTracking: true, + clickTrackingEnableText: true, + contents: [ + { + type: 'text/html', + value: + '

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

', + }, + ], + eventDelivery: false, + eventDeliveryTS: 1668424218224, + eventNamesSettings: [ + { + event: 'open', + }, + ], + footer: false, + fromEmail: 'a@g.com', + fromName: '', + ganalytics: false, + group: '', + groupsToDisplay: [ + { + groupId: '', + }, + ], + html: '', + listId: 'list111', + mailFromTraits: false, + openTracking: false, + openTrackingSubstitutionTag: '', + replyToEmail: '', + replyToName: '', + sandboxMode: false, + subject: 'hello there from webflow', + subscriptionTracking: false, + substitutionTag: '', + templateId: '', + text: '', + }, + }, + message: { + type: 'identify', + userId: 'user@1', + context: { + traits: { + age: '25', + city: 'Surat', + phone: '+91 9876543210', + lastName: 'test', + firstName: 'rudder', + state: 'Gujarat', + }, + }, + }, + }, + ], + }, }, - { - "name": "sendgrid", - "description": "Identify call with list_id configured from web-app", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "destination": { - "Config": { - "IPPoolName": "", - "apiKey": "apikey", - "attachments": [ - { - "content": "", - "contentId": "", - "disposition": "", - "filename": "", - "type": "" - } - ], - "clickTracking": true, - "clickTrackingEnableText": true, - "contents": [ - { - "type": "text/html", - "value": "

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

" - } - ], - "eventDelivery": false, - "eventDeliveryTS": 1668424218224, - "eventNamesSettings": [ - { - "event": "open" - } - ], - "footer": false, - "fromEmail": "a@g.com", - "fromName": "", - "ganalytics": false, - "group": "", - "groupsToDisplay": [ - { - "groupId": "" - } - ], - "html": "", - "listId": "list111", - "mailFromTraits": false, - "openTracking": false, - "openTrackingSubstitutionTag": "", - "replyToEmail": "", - "replyToName": "", - "sandboxMode": false, - "subject": "hello there from webflow", - "subscriptionTracking": false, - "substitutionTag": "", - "templateId": "", - "text": "" - } - }, - "message": { - "type": "identify", - "userId": "user@1", - "context": { - "traits": { - "age": "25", - "city": "Surat", - "email": "test@rudderstack.com", - "phone": "+91 9876543210", - "lastName": "test", - "firstName": "rudder", - "state": "Gujarat" - } - } - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "PUT", - "endpoint": "https://api.sendgrid.com/v3/marketing/contacts", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer apikey" - }, - "params": {}, - "body": { - "JSON": { - "contactDetails": { - "email": "test@rudderstack.com", - "phone_number": "+91 9876543210", - "first_name": "rudder", - "last_name": "test", - "custom_fields": {} - }, - "contactListIds": "list111" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - } + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: 'Parameter mail is required', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'SENDGRID', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, }, - { - "name": "sendgrid", - "description": "Identify call with no list-id given", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "destination": { - "ID": "2HOQOO6wWKaKjeQrEABXgiH6cmU", - "Config": { - "IPPoolName": "", - "apiKey": "apikey", - "attachments": [ - { - "content": "", - "contentId": "", - "disposition": "", - "filename": "", - "type": "" - } - ], - "clickTracking": true, - "clickTrackingEnableText": true, - "contents": [ - { - "type": "text/html", - "value": "

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

" - } - ], - "customFieldsMapping": [ - { - "from": "name", - "to": "user_name" - } - ], - "eventDelivery": false, - "eventDeliveryTS": 1668424218224, - "eventNamesSettings": [ - { - "event": "open" - } - ], - "footer": false, - "fromEmail": "a@g.com", - "fromName": "", - "ganalytics": false, - "group": "", - "groupsToDisplay": [ - { - "groupId": "" - } - ], - "html": "", - "mailFromTraits": false, - "openTracking": false, - "openTrackingSubstitutionTag": "", - "replyToEmail": "", - "replyToName": "", - "sandboxMode": false, - "subject": "hello there from webflow", - "subscriptionTracking": false, - "substitutionTag": "", - "templateId": "", - "text": "" - } - }, - "message": { - "type": "identify", - "userId": "user@1", - "context": { - "traits": { - "age": "25", - "city": "Surat", - "name": "rudder test", - "email": "test@rudderstack.com", - "phone": "+91 9876543210", - "lastName": "test", - "firstName": "rudder", - "state": "Gujarat" - } - } - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [{ - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "contactDetails": { - "email": "test@rudderstack.com", - "last_name": "test", - "first_name": "rudder", - "unique_name": "rudder test", - "phone_number": "+91 9876543210", - "custom_fields": { - "w1_T": "rudder test" - } - }, - "contactListIds": "" - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "userId": "", - "files": {}, - "method": "PUT", - "params": {}, - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer apikey" - }, - "version": "1", - "endpoint": "https://api.sendgrid.com/v3/marketing/contacts" + }, + { + name: 'sendgrid', + description: 'Identify call with list_id configured from web-app', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + IPPoolName: '', + apiKey: 'apikey', + attachments: [ + { + content: '', + contentId: '', + disposition: '', + filename: '', + type: '', + }, + ], + clickTracking: true, + clickTrackingEnableText: true, + contents: [ + { + type: 'text/html', + value: + '

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

', + }, + ], + eventDelivery: false, + eventDeliveryTS: 1668424218224, + eventNamesSettings: [ + { + event: 'open', + }, + ], + footer: false, + fromEmail: 'a@g.com', + fromName: '', + ganalytics: false, + group: '', + groupsToDisplay: [ + { + groupId: '', + }, + ], + html: '', + listId: 'list111', + mailFromTraits: false, + openTracking: false, + openTrackingSubstitutionTag: '', + replyToEmail: '', + replyToName: '', + sandboxMode: false, + subject: 'hello there from webflow', + subscriptionTracking: false, + substitutionTag: '', + templateId: '', + text: '', + }, + }, + message: { + type: 'identify', + userId: 'user@1', + context: { + traits: { + age: '25', + city: 'Surat', + email: 'test@rudderstack.com', + phone: '+91 9876543210', + lastName: 'test', + firstName: 'rudder', + state: 'Gujarat', + }, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'PUT', + endpoint: 'https://api.sendgrid.com/v3/marketing/contacts', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer apikey', + }, + params: {}, + body: { + JSON: { + contactDetails: { + email: 'test@rudderstack.com', + phone_number: '+91 9876543210', + first_name: 'rudder', + last_name: 'test', + custom_fields: {}, + }, + contactListIds: 'list111', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'sendgrid', + description: 'Identify call with no list-id given', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '2HOQOO6wWKaKjeQrEABXgiH6cmU', + Config: { + IPPoolName: '', + apiKey: 'apikey', + attachments: [ + { + content: '', + contentId: '', + disposition: '', + filename: '', + type: '', + }, + ], + clickTracking: true, + clickTrackingEnableText: true, + contents: [ + { + type: 'text/html', + value: + '

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

', + }, + ], + customFieldsMapping: [ + { + from: 'name', + to: 'user_name', + }, + ], + eventDelivery: false, + eventDeliveryTS: 1668424218224, + eventNamesSettings: [ + { + event: 'open', + }, + ], + footer: false, + fromEmail: 'a@g.com', + fromName: '', + ganalytics: false, + group: '', + groupsToDisplay: [ + { + groupId: '', + }, + ], + html: '', + mailFromTraits: false, + openTracking: false, + openTrackingSubstitutionTag: '', + replyToEmail: '', + replyToName: '', + sandboxMode: false, + subject: 'hello there from webflow', + subscriptionTracking: false, + substitutionTag: '', + templateId: '', + text: '', + }, + }, + message: { + type: 'identify', + userId: 'user@1', + context: { + traits: { + age: '25', + city: 'Surat', + name: 'rudder test', + email: 'test@rudderstack.com', + phone: '+91 9876543210', + lastName: 'test', + firstName: 'rudder', + state: 'Gujarat', + }, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + FORM: {}, + JSON: { + contactDetails: { + email: 'test@rudderstack.com', + last_name: 'test', + first_name: 'rudder', + unique_name: 'rudder test', + phone_number: '+91 9876543210', + custom_fields: { + w1_T: 'rudder test', }, - "statusCode": 200 - } - - ] - } - } + }, + contactListIds: '', + }, + JSON_ARRAY: {}, + }, + type: 'REST', + userId: '', + files: {}, + method: 'PUT', + params: {}, + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer apikey', + }, + version: '1', + endpoint: 'https://api.sendgrid.com/v3/marketing/contacts', + }, + statusCode: 200, + }, + ], + }, }, - { - "name": "sendgrid", - "description": "Track Call", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "destination": { - "Config": { - "apiKey": "apikey", - "eventNamesSettings": [ - { - "event": "testing" - }, - { - "event": "clicked" - } - ], - "subject": "A sample subject", - "replyToEmail": "ankit@rudderstack.com", - "contents": [ - { - "type": "text/html", - "value": "

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

" - } - ], - "footer": false, - "bypassListManagement": false, - "sandboxMode": false, - "clickTracking": false, - "openTracking": false, - "ganalytics": false, - "subscriptionTracking": false, - "clickTrackingEnableText": false, - "text": null, - "utmContent": null - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "track", - "event": "testing", - "properties": { - "personalizations": [ - { - "to": [ - { - "email": "a@g.com" - }, - { - "name": "hello" - } - ], - "subject": "hey there" - } - ], - "from": { - "email": "ankit@rudderstack.com" - } - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.sendgrid.com/v3/mail/send", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer apikey" - }, - "params": {}, - "body": { - "JSON": { - "from": { - "email": "ankit@rudderstack.com" - }, - "personalizations": [ - { - "to": [ - { - "email": "a@g.com" - } - ], - "subject": "hey there" - } - ], - "content": [ - { - "type": "text/html", - "value": "

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

" - } - ], - "subject": "A sample subject", - "reply_to": { - "email": "ankit@rudderstack.com" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - } + }, + { + name: 'sendgrid', + description: 'Track Call', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'apikey', + eventNamesSettings: [ + { + event: 'testing', + }, + { + event: 'clicked', + }, + ], + subject: 'A sample subject', + replyToEmail: 'ankit@rudderstack.com', + contents: [ + { + type: 'text/html', + value: + '

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

', + }, + ], + footer: false, + bypassListManagement: false, + sandboxMode: false, + clickTracking: false, + openTracking: false, + ganalytics: false, + subscriptionTracking: false, + clickTrackingEnableText: false, + text: null, + utmContent: null, + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + type: 'track', + event: 'testing', + properties: { + personalizations: [ + { + to: [ + { + email: 'a@g.com', + }, + { + name: 'hello', + }, + ], + subject: 'hey there', + }, + ], + from: { + email: 'ankit@rudderstack.com', + }, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + }, }, - { - "name": "sendgrid", - "description": "Track Call", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.sendgrid.com/v3/mail/send', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer apikey', + }, + params: {}, + body: { + JSON: { + from: { + email: 'ankit@rudderstack.com', + }, + personalizations: [ { - "destination": { - "Config": { - "apiKey": "apikey", - "eventNamesSettings": [ - { - "event": "testing" - }, - { - "event": "clicked" - } - ], - "subject": "A sample subject", - "replyToEmail": "ankit@rudderstack.com", - "contents": [ - { - "type": "text/html", - "value": "

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

" - } - ], - "footer": false, - "footerText": "some text", - "bypassListManagement": false, - "sandboxMode": false, - "clickTracking": false, - "openTracking": false, - "ganalytics": false, - "subscriptionTracking": false, - "clickTrackingEnableText": false - } + to: [ + { + email: 'a@g.com', }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "track", - "event": "testing", - "properties": { - "replyTo": { - "email": "testing@gmail.com" - }, - "personalizations": [ - { - "to": [ - { - "email": "a@g.com" - }, - { - "name": "hello" - } - ], - "subject": "hey there" - } - ], - "from": { - "email": "ankit@rudderstack.com" - } - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ + ], + subject: 'hey there', + }, + ], + content: [ { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.sendgrid.com/v3/mail/send", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer apikey" - }, - "params": {}, - "body": { - "JSON": { - "from": { - "email": "ankit@rudderstack.com" - }, - "personalizations": [ - { - "to": [ - { - "email": "a@g.com" - } - ], - "subject": "hey there" - } - ], - "reply_to": { - "email": "testing@gmail.com" - }, - "content": [ - { - "type": "text/html", - "value": "

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

" - } - ], - "subject": "A sample subject" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - } + type: 'text/html', + value: + '

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

', + }, + ], + subject: 'A sample subject', + reply_to: { + email: 'ankit@rudderstack.com', + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, }, - { - "name": "sendgrid", - "description": "Track Call", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ + }, + { + name: 'sendgrid', + description: 'Track Call', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'apikey', + eventNamesSettings: [ + { + event: 'testing', + }, + { + event: 'clicked', + }, + ], + subject: 'A sample subject', + replyToEmail: 'ankit@rudderstack.com', + contents: [ + { + type: 'text/html', + value: + '

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

', + }, + ], + footer: false, + footerText: 'some text', + bypassListManagement: false, + sandboxMode: false, + clickTracking: false, + openTracking: false, + ganalytics: false, + subscriptionTracking: false, + clickTrackingEnableText: false, + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + type: 'track', + event: 'testing', + properties: { + replyTo: { + email: 'testing@gmail.com', + }, + personalizations: [ + { + to: [ + { + email: 'a@g.com', + }, + { + name: 'hello', + }, + ], + subject: 'hey there', + }, + ], + from: { + email: 'ankit@rudderstack.com', + }, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.sendgrid.com/v3/mail/send', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer apikey', + }, + params: {}, + body: { + JSON: { + from: { + email: 'ankit@rudderstack.com', + }, + personalizations: [ { - "destination": { - "Config": { - "apiKey": "apikey", - "eventNamesSettings": [ - { - "event": "testing" - }, - { - "event": "clicked" - } - ], - "subject": "A sample subject", - "replyToEmail": "ankit@rudderstack.com", - "contents": [ - { - "type": "text/html", - "value": "

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

" - } - ], - "footer": false, - "footerText": "some text", - "bypassListManagement": false, - "sandboxMode": false, - "clickTracking": false, - "openTracking": false, - "ganalytics": false, - "subscriptionTracking": false, - "clickTrackingEnableText": false, - "group": "12345", - "groupsToDisplay": [ - { - "groupId": "12345" - }, - { - "groupId": "abc" - }, - { - "groupId": "12346" - } - ] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "track", - "event": "testing", - "properties": { - "replyTo": { - "email": "testing@gmail.com" - }, - "personalizations": [ - { - "to": [ - { - "email": "a@g.com" - }, - { - "name": "hello" - } - ], - "subject": "hey there" - } - ], - "from": { - "email": "ankit@rudderstack.com" - } - } - }, - "integrations": { - "All": true + to: [ + { + email: 'a@g.com', }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ + ], + subject: 'hey there', + }, + ], + reply_to: { + email: 'testing@gmail.com', + }, + content: [ { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.sendgrid.com/v3/mail/send", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer apikey" - }, - "params": {}, - "body": { - "JSON": { - "from": { - "email": "ankit@rudderstack.com" - }, - "personalizations": [ - { - "to": [ - { - "email": "a@g.com" - } - ], - "subject": "hey there" - } - ], - "reply_to": { - "email": "testing@gmail.com" - }, - "content": [ - { - "type": "text/html", - "value": "

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

" - } - ], - "subject": "A sample subject", - "asm": { - "group_id": 12345, - "groups_to_display": [ - 12345, - 12346 - ] - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - } + type: 'text/html', + value: + '

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

', + }, + ], + subject: 'A sample subject', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, }, - { - "name": "sendgrid", - "description": "Track call without an event name", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ + }, + { + name: 'sendgrid', + description: 'Track Call', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'apikey', + eventNamesSettings: [ + { + event: 'testing', + }, + { + event: 'clicked', + }, + ], + subject: 'A sample subject', + replyToEmail: 'ankit@rudderstack.com', + contents: [ + { + type: 'text/html', + value: + '

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

', + }, + ], + footer: false, + footerText: 'some text', + bypassListManagement: false, + sandboxMode: false, + clickTracking: false, + openTracking: false, + ganalytics: false, + subscriptionTracking: false, + clickTrackingEnableText: false, + group: '12345', + groupsToDisplay: [ + { + groupId: '12345', + }, + { + groupId: 'abc', + }, + { + groupId: '12346', + }, + ], + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + type: 'track', + event: 'testing', + properties: { + replyTo: { + email: 'testing@gmail.com', + }, + personalizations: [ + { + to: [ + { + email: 'a@g.com', + }, + { + name: 'hello', + }, + ], + subject: 'hey there', + }, + ], + from: { + email: 'ankit@rudderstack.com', + }, + }, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.sendgrid.com/v3/mail/send', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer apikey', + }, + params: {}, + body: { + JSON: { + from: { + email: 'ankit@rudderstack.com', + }, + personalizations: [ { - "destination": { - "Config": { - "apiKey": "apikey", - "eventNamesSettings": [ - { - "event": "testing" - }, - { - "event": "clicked" - } - ], - "subject": "A sample subject", - "replyToEmail": "ankit@rudderstack.com", - "contents": [ - { - "type": "text/html", - "value": "

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

" - } - ], - "footer": false, - "footerText": "some text", - "bypassListManagement": false, - "sandboxMode": false, - "clickTracking": false, - "openTracking": false, - "ganalytics": false, - "subscriptionTracking": false, - "clickTrackingEnableText": false, - "group": "12345", - "groupsToDisplay": [ - { - "groupId": "12345" - }, - { - "groupId": "abc" - }, - { - "groupId": "12346" - } - ] - } + to: [ + { + email: 'a@g.com', }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "track", - "event": "new event", - "properties": { - "replyTo": { - "email": "testing@gmail.com" - }, - "personalizations": [ - { - "to": [ - { - "email": "a@g.com" - }, - { - "name": "hello" - } - ], - "subject": "hey there" - } - ], - "from": { - "email": "ankit@rudderstack.com" - } - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ + ], + subject: 'hey there', + }, + ], + reply_to: { + email: 'testing@gmail.com', + }, + content: [ { - "statusCode": 400, - "error": "Event not configured on dashboard", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "configuration", - "destType": "SENDGRID", - "module": "destination", - "implementation": "native", - "feature": "processor" - } - } - ] - } - } + type: 'text/html', + value: + '

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

', + }, + ], + subject: 'A sample subject', + asm: { + group_id: 12345, + groups_to_display: [12345, 12346], + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'sendgrid', + description: 'Track call without an event name', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'apikey', + eventNamesSettings: [ + { + event: 'testing', + }, + { + event: 'clicked', + }, + ], + subject: 'A sample subject', + replyToEmail: 'ankit@rudderstack.com', + contents: [ + { + type: 'text/html', + value: + '

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

', + }, + ], + footer: false, + footerText: 'some text', + bypassListManagement: false, + sandboxMode: false, + clickTracking: false, + openTracking: false, + ganalytics: false, + subscriptionTracking: false, + clickTrackingEnableText: false, + group: '12345', + groupsToDisplay: [ + { + groupId: '12345', + }, + { + groupId: 'abc', + }, + { + groupId: '12346', + }, + ], + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + type: 'track', + event: 'new event', + properties: { + replyTo: { + email: 'testing@gmail.com', + }, + personalizations: [ + { + to: [ + { + email: 'a@g.com', + }, + { + name: 'hello', + }, + ], + subject: 'hey there', + }, + ], + from: { + email: 'ankit@rudderstack.com', + }, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + }, }, - { - "name": "sendgrid", - "description": "Track Call", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: 'Event not configured on dashboard', + statTags: { + errorCategory: 'dataValidation', + errorType: 'configuration', + destType: 'SENDGRID', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'sendgrid', + description: 'Track Call', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'apikey', + eventNamesSettings: [ + { + event: 'testing', + }, + { + event: 'clicked', + }, + ], + subject: 'A sample subject', + replyToEmail: 'ankit@rudderstack.com', + contents: [ + { + type: 'text/html', + value: + '

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

', + }, + ], + footer: false, + footerText: 'some text', + bypassListManagement: false, + sandboxMode: false, + clickTracking: false, + openTracking: false, + ganalytics: false, + subscriptionTracking: false, + clickTrackingEnableText: false, + group: '12345', + groupsToDisplay: [ + { + groupId: '12345', + }, + { + groupId: 'abc', + }, + { + groupId: '12346', + }, + ], + attachments: [ + { + content: 'YXNkZ2FmZ3FlcmRxZ2Iua2puYWRrbGpuYWtqc2Rmbg==', + filename: 'index.html', + }, + ], + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + type: 'track', + event: 'testing', + properties: { + replyTo: { + email: 'testing@gmail.com', + }, + personalizations: [ + { + to: [ + { + email: 'a@g.com', + }, + { + name: 'hello', + }, + ], + subject: 'hey there', + }, + ], + from: { + email: 'ankit@rudderstack.com', + }, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.sendgrid.com/v3/mail/send', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer apikey', + }, + params: {}, + body: { + JSON: { + from: { + email: 'ankit@rudderstack.com', + }, + personalizations: [ { - "destination": { - "Config": { - "apiKey": "apikey", - "eventNamesSettings": [ - { - "event": "testing" - }, - { - "event": "clicked" - } - ], - "subject": "A sample subject", - "replyToEmail": "ankit@rudderstack.com", - "contents": [ - { - "type": "text/html", - "value": "

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

" - } - ], - "footer": false, - "footerText": "some text", - "bypassListManagement": false, - "sandboxMode": false, - "clickTracking": false, - "openTracking": false, - "ganalytics": false, - "subscriptionTracking": false, - "clickTrackingEnableText": false, - "group": "12345", - "groupsToDisplay": [ - { - "groupId": "12345" - }, - { - "groupId": "abc" - }, - { - "groupId": "12346" - } - ], - "attachments": [ - { - "content": "YXNkZ2FmZ3FlcmRxZ2Iua2puYWRrbGpuYWtqc2Rmbg==", - "filename": "index.html" - } - ] - } + to: [ + { + email: 'a@g.com', }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "track", - "event": "testing", - "properties": { - "replyTo": { - "email": "testing@gmail.com" - }, - "personalizations": [ - { - "to": [ - { - "email": "a@g.com" - }, - { - "name": "hello" - } - ], - "subject": "hey there" - } - ], - "from": { - "email": "ankit@rudderstack.com" - } - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ + ], + subject: 'hey there', + }, + ], + reply_to: { + email: 'testing@gmail.com', + }, + attachments: [ { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.sendgrid.com/v3/mail/send", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer apikey" - }, - "params": {}, - "body": { - "JSON": { - "from": { - "email": "ankit@rudderstack.com" - }, - "personalizations": [ - { - "to": [ - { - "email": "a@g.com" - } - ], - "subject": "hey there" - } - ], - "reply_to": { - "email": "testing@gmail.com" - }, - "attachments": [ - { - "content": "YXNkZ2FmZ3FlcmRxZ2Iua2puYWRrbGpuYWtqc2Rmbg==", - "filename": "index.html" - } - ], - "content": [ - { - "type": "text/html", - "value": "

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

" - } - ], - "subject": "A sample subject", - "asm": { - "group_id": 12345, - "groups_to_display": [ - 12345, - 12346 - ] - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - } + content: 'YXNkZ2FmZ3FlcmRxZ2Iua2puYWRrbGpuYWtqc2Rmbg==', + filename: 'index.html', + }, + ], + content: [ + { + type: 'text/html', + value: + '

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

', + }, + ], + subject: 'A sample subject', + asm: { + group_id: 12345, + groups_to_display: [12345, 12346], + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'sendgrid', + description: 'Track Call', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'apikey', + eventNamesSettings: [ + { + event: 'testing', + }, + { + event: 'clicked', + }, + ], + subject: 'A sample subject', + replyToEmail: 'ankit@rudderstack.com', + contents: [ + { + type: 'text/html', + value: + '

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

', + }, + ], + footer: false, + footerText: 'some text', + bypassListManagement: false, + sandboxMode: false, + clickTracking: false, + openTracking: false, + ganalytics: false, + subscriptionTracking: false, + clickTrackingEnableText: false, + group: '12345', + groupsToDisplay: [ + { + groupId: '12345', + }, + { + groupId: 'abc', + }, + { + groupId: '12346', + }, + ], + attachments: [ + { + content: 'YXNkZ21hcyxkLm1mO29xd2llbGpmbWwuYWRrbXMuLGFtZHM=', + filename: 'index.html', + }, + { + content: 'bGFqa3NtZGZrZ2hxaWVybmtsYSBmZGtvamx3bWVGTC5NQW5kcy5rbmtmYWtkZg==', + }, + ], + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + type: 'track', + event: 'testing', + properties: { + replyTo: { + email: 'testing@gmail.com', + }, + personalizations: [ + { + to: [ + { + email: 'a@g.com', + }, + { + name: 'hello', + }, + ], + subject: 'hey there', + }, + ], + from: { + email: 'ankit@rudderstack.com', + }, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + }, }, - { - "name": "sendgrid", - "description": "Track Call", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.sendgrid.com/v3/mail/send', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer apikey', + }, + params: {}, + body: { + JSON: { + from: { + email: 'ankit@rudderstack.com', + }, + personalizations: [ { - "destination": { - "Config": { - "apiKey": "apikey", - "eventNamesSettings": [ - { - "event": "testing" - }, - { - "event": "clicked" - } - ], - "subject": "A sample subject", - "replyToEmail": "ankit@rudderstack.com", - "contents": [ - { - "type": "text/html", - "value": "

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

" - } - ], - "footer": false, - "footerText": "some text", - "bypassListManagement": false, - "sandboxMode": false, - "clickTracking": false, - "openTracking": false, - "ganalytics": false, - "subscriptionTracking": false, - "clickTrackingEnableText": false, - "group": "12345", - "groupsToDisplay": [ - { - "groupId": "12345" - }, - { - "groupId": "abc" - }, - { - "groupId": "12346" - } - ], - "attachments": [ - { - "content": "YXNkZ21hcyxkLm1mO29xd2llbGpmbWwuYWRrbXMuLGFtZHM=", - "filename": "index.html" - }, - { - "content": "bGFqa3NtZGZrZ2hxaWVybmtsYSBmZGtvamx3bWVGTC5NQW5kcy5rbmtmYWtkZg==" - } - ] - } + to: [ + { + email: 'a@g.com', }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "track", - "event": "testing", - "properties": { - "replyTo": { - "email": "testing@gmail.com" - }, - "personalizations": [ - { - "to": [ - { - "email": "a@g.com" - }, - { - "name": "hello" - } - ], - "subject": "hey there" - } - ], - "from": { - "email": "ankit@rudderstack.com" - } - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ + ], + subject: 'hey there', + }, + ], + reply_to: { + email: 'testing@gmail.com', + }, + attachments: [ { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.sendgrid.com/v3/mail/send", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer apikey" - }, - "params": {}, - "body": { - "JSON": { - "from": { - "email": "ankit@rudderstack.com" - }, - "personalizations": [ - { - "to": [ - { - "email": "a@g.com" - } - ], - "subject": "hey there" - } - ], - "reply_to": { - "email": "testing@gmail.com" - }, - "attachments": [ - { - "content": "YXNkZ21hcyxkLm1mO29xd2llbGpmbWwuYWRrbXMuLGFtZHM=", - "filename": "index.html" - } - ], - "content": [ - { - "type": "text/html", - "value": "

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

" - } - ], - "subject": "A sample subject", - "asm": { - "group_id": 12345, - "groups_to_display": [ - 12345, - 12346 - ] - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - } + content: 'YXNkZ21hcyxkLm1mO29xd2llbGpmbWwuYWRrbXMuLGFtZHM=', + filename: 'index.html', + }, + ], + content: [ + { + type: 'text/html', + value: + '

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

', + }, + ], + subject: 'A sample subject', + asm: { + group_id: 12345, + groups_to_display: [12345, 12346], + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, }, - { - "name": "sendgrid", - "description": "Track Call", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ + }, + { + name: 'sendgrid', + description: 'Track Call', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'apikey', + eventNamesSettings: [ + { + event: 'testing', + }, + { + event: 'clicked', + }, + ], + subject: 'A sample subject', + replyToEmail: 'ankit@rudderstack.com', + contents: [ + { + type: 'text/html', + value: + '

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

', + }, + ], + footer: false, + footerText: 'some text', + bypassListManagement: false, + sandboxMode: false, + clickTracking: false, + openTracking: false, + ganalytics: false, + subscriptionTracking: false, + clickTrackingEnableText: false, + group: '12345', + groupsToDisplay: [ + { + groupId: '12345', + }, + { + groupId: 'abc', + }, + { + groupId: '12346', + }, + ], + attachments: [ + { + content: 'YXNkZ21hcyxkLm1mO29xd2llbGpmbWwuYWRrbXMuLGFtZHM=', + filename: 'index.html', + }, + { + content: 'bGFqa3NtZGZrZ2hxaWVybmtsYSBmZGtvamx3bWVGTC5NQW5kcy5rbmtmYWtkZg==', + }, + ], + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + type: 'track', + event: 'testing', + properties: { + replyTo: { + email: 'testing@gmail.com', + }, + mailSettings: { + bypassListManagement: true, + footer: true, + }, + personalizations: [ + { + to: [ + { + email: 'a@g.com', + }, + { + name: 'hello', + }, + ], + subject: 'hey there', + }, + ], + from: { + email: 'ankit@rudderstack.com', + }, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.sendgrid.com/v3/mail/send', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer apikey', + }, + params: {}, + body: { + JSON: { + from: { + email: 'ankit@rudderstack.com', + }, + personalizations: [ { - "destination": { - "Config": { - "apiKey": "apikey", - "eventNamesSettings": [ - { - "event": "testing" - }, - { - "event": "clicked" - } - ], - "subject": "A sample subject", - "replyToEmail": "ankit@rudderstack.com", - "contents": [ - { - "type": "text/html", - "value": "

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

" - } - ], - "footer": false, - "footerText": "some text", - "bypassListManagement": false, - "sandboxMode": false, - "clickTracking": false, - "openTracking": false, - "ganalytics": false, - "subscriptionTracking": false, - "clickTrackingEnableText": false, - "group": "12345", - "groupsToDisplay": [ - { - "groupId": "12345" - }, - { - "groupId": "abc" - }, - { - "groupId": "12346" - } - ], - "attachments": [ - { - "content": "YXNkZ21hcyxkLm1mO29xd2llbGpmbWwuYWRrbXMuLGFtZHM=", - "filename": "index.html" - }, - { - "content": "bGFqa3NtZGZrZ2hxaWVybmtsYSBmZGtvamx3bWVGTC5NQW5kcy5rbmtmYWtkZg==" - } - ] - } + to: [ + { + email: 'a@g.com', }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "track", - "event": "testing", - "properties": { - "replyTo": { - "email": "testing@gmail.com" - }, - "mailSettings": { - "bypassListManagement": true, - "footer": true - }, - "personalizations": [ - { - "to": [ - { - "email": "a@g.com" - }, - { - "name": "hello" - } - ], - "subject": "hey there" - } - ], - "from": { - "email": "ankit@rudderstack.com" - } - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ + ], + subject: 'hey there', + }, + ], + reply_to: { + email: 'testing@gmail.com', + }, + attachments: [ { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.sendgrid.com/v3/mail/send", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer apikey" - }, - "params": {}, - "body": { - "JSON": { - "from": { - "email": "ankit@rudderstack.com" - }, - "personalizations": [ - { - "to": [ - { - "email": "a@g.com" - } - ], - "subject": "hey there" - } - ], - "reply_to": { - "email": "testing@gmail.com" - }, - "attachments": [ - { - "content": "YXNkZ21hcyxkLm1mO29xd2llbGpmbWwuYWRrbXMuLGFtZHM=", - "filename": "index.html" - } - ], - "content": [ - { - "type": "text/html", - "value": "

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

" - } - ], - "subject": "A sample subject", - "asm": { - "group_id": 12345, - "groups_to_display": [ - 12345, - 12346 - ] - }, - "mail_settings": { - "bypass_list_management": { - "enable": true - }, - "footer": { - "enable": true, - "text": "some text" - } - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - } - } -] \ No newline at end of file + content: 'YXNkZ21hcyxkLm1mO29xd2llbGpmbWwuYWRrbXMuLGFtZHM=', + filename: 'index.html', + }, + ], + content: [ + { + type: 'text/html', + value: + '

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

', + }, + ], + subject: 'A sample subject', + asm: { + group_id: 12345, + groups_to_display: [12345, 12346], + }, + mail_settings: { + bypass_list_management: { + enable: true, + }, + footer: { + enable: true, + text: 'some text', + }, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, +]; diff --git a/test/integrations/destinations/sendgrid/router/data.ts b/test/integrations/destinations/sendgrid/router/data.ts index f10a6f0cab..6d79e556eb 100644 --- a/test/integrations/destinations/sendgrid/router/data.ts +++ b/test/integrations/destinations/sendgrid/router/data.ts @@ -1,173 +1,177 @@ import { FEATURES } from '../../../../../src/v0/util/tags'; export const data = [ - { - name: 'sendgrid', - description: 'Router Test Case', - feature: FEATURES.ROUTER, - module: 'destination', - version: 'v0', - input: { - request: { - body: { - input: [ + { + name: 'sendgrid', + description: 'Router Test Case', + feature: FEATURES.ROUTER, + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + destination: { + Config: { + apiKey: 'apikey', + eventNamesSettings: [{ event: 'testing' }, { event: 'clicked' }], + subject: 'A sample subject', + replyToEmail: 'ankit@rudderstack.com', + contents: [ + { + type: 'text/html', + value: + '

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

', + }, + ], + footer: false, + bypassListManagement: false, + sandboxMode: false, + clickTracking: false, + openTracking: false, + ganalytics: false, + subscriptionTracking: false, + clickTrackingEnableText: false, + }, + }, + metadata: { + jobId: 2, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { name: '', version: '' }, + screen: { density: 2 }, + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + type: 'track', + event: 'testing', + properties: { + personalizations: [ + { + to: [ { - "destination": { - "Config": { - "apiKey": "apikey", - "eventNamesSettings": [{ "event": "testing" }, { "event": "clicked" }], - "subject": "A sample subject", - "replyToEmail": "ankit@rudderstack.com", - "contents": [ - { - "type": "text/html", - "value": "

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

" - } - ], - "footer": false, - "bypassListManagement": false, - "sandboxMode": false, - "clickTracking": false, - "openTracking": false, - "ganalytics": false, - "subscriptionTracking": false, - "clickTrackingEnableText": false - } - }, - "metadata": { - "jobId": 2 - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "track", - "event": "testing", - "properties": { - "personalizations": [ - { - "to": [ - { - "email": "a@g.com" - }, - { - "name": "hello" - } - ], - "subject": "hey there" - } - ], - "from": { - "email": "ankit@rudderstack.com" - } - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - } - ], - destType: 'sendgrid', + email: 'a@g.com', + }, + { + name: 'hello', + }, + ], + subject: 'hey there', + }, + ], + from: { + email: 'ankit@rudderstack.com', + }, }, - method: 'POST', + integrations: { All: true }, + sentAt: '2019-10-14T09:03:22.563Z', + }, }, + ], + destType: 'sendgrid', }, - output: { - response: { - status: 200, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: { body: { - output: [ - { - "batchedRequest": { - "body": { - "XML": {}, - "FORM": {}, - "JSON_ARRAY": {}, - "JSON": { - "personalizations": [ - { - "to": [ - { - "email": "a@g.com" - } - ], - "subject": "hey there" - } - ], - "from": { - "email": "ankit@rudderstack.com" - }, - "reply_to": { "email": "ankit@rudderstack.com" }, - "subject": "A sample subject", - "content": [ - { - "type": "text/html", - "value": "

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

" - } - ] - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Authorization": "Bearer apikey", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api.sendgrid.com/v3/mail/send" - }, - "metadata": [ - { - "jobId": 2 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "apiKey": "apikey", - "eventNamesSettings": [{ "event": "testing" }, { "event": "clicked" }], - "subject": "A sample subject", - "replyToEmail": "ankit@rudderstack.com", - "contents": [ - { - "type": "text/html", - "value": "

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

" - } - ], - "footer": false, - "bypassListManagement": false, - "sandboxMode": false, - "clickTracking": false, - "openTracking": false, - "ganalytics": false, - "subscriptionTracking": false, - "clickTrackingEnableText": false - } - } - } + XML: {}, + FORM: {}, + JSON_ARRAY: {}, + JSON: { + personalizations: [ + { + to: [ + { + email: 'a@g.com', + }, + ], + subject: 'hey there', + }, + ], + from: { + email: 'ankit@rudderstack.com', + }, + reply_to: { email: 'ankit@rudderstack.com' }, + subject: 'A sample subject', + content: [ + { + type: 'text/html', + value: + '

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

', + }, ], + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + headers: { + Authorization: 'Bearer apikey', + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api.sendgrid.com/v3/mail/send', + }, + metadata: [ + { + jobId: 2, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + apiKey: 'apikey', + eventNamesSettings: [{ event: 'testing' }, { event: 'clicked' }], + subject: 'A sample subject', + replyToEmail: 'ankit@rudderstack.com', + contents: [ + { + type: 'text/html', + value: + '

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

', + }, + ], + footer: false, + bypassListManagement: false, + sandboxMode: false, + clickTracking: false, + openTracking: false, + ganalytics: false, + subscriptionTracking: false, + clickTrackingEnableText: false, }, + }, }, + ], }, - } + }, + }, + }, ]; diff --git a/test/integrations/destinations/sendinblue/network.ts b/test/integrations/destinations/sendinblue/network.ts new file mode 100644 index 0000000000..f4f7e84fa7 --- /dev/null +++ b/test/integrations/destinations/sendinblue/network.ts @@ -0,0 +1,92 @@ +export const networkCallsData = [ + { + httpReq: { + url: 'https://api.sendinblue.com/v3/contacts/gordon_pittman%40example.com', + method: 'GET', + }, + httpRes: { + data: { + email: 'gordon_pittman@example.com', + id: 42, + emailBlacklisted: false, + smsBlacklisted: false, + createdAt: '2022-12-04T18:22:48.384+05:30', + modifiedAt: '2022-12-18T14:06:20.515+05:30', + attributes: { + LASTNAME: 'Pittman', + FIRSTNAME: 'Gordon', + AGE: 33, + }, + listIds: [5], + statistics: {}, + }, + status: 200, + }, + }, + { + httpReq: { + url: 'https://api.sendinblue.com/v3/contacts/42', + method: 'GET', + }, + httpRes: { + data: { + email: 'gordon_pittman@example.com', + id: 42, + emailBlacklisted: false, + smsBlacklisted: false, + createdAt: '2022-12-04T18:22:48.384+05:30', + modifiedAt: '2022-12-18T14:06:20.515+05:30', + attributes: { + LASTNAME: 'Pittman', + FIRSTNAME: 'Gordon', + AGE: 33, + }, + listIds: [5], + statistics: {}, + }, + status: 200, + }, + }, + { + httpReq: { + url: 'https://api.sendinblue.com/v3/contacts/john_doe%40example.com', + method: 'GET', + }, + httpRes: { + status: 404, + }, + }, + { + httpReq: { + url: 'https://api.profitwell.com/v2/users/sp_245/', + method: 'GET', + }, + httpRes: { + message: 'Request failed with status code 404', + status: 404, + statusText: 'Not Found', + }, + }, + { + httpReq: { + url: 'https://api.profitwell.com/v2/users/1234/', + method: 'GET', + }, + httpRes: { + message: 'Request failed with status code 404', + status: 404, + statusText: 'Not Found', + }, + }, + { + httpReq: { + url: 'https://api.profitwell.com/v2/users/samual/', + method: 'GET', + }, + httpRes: { + message: 'Request failed with status code 404', + status: 404, + statusText: 'Not Found', + }, + }, +]; diff --git a/test/integrations/destinations/sendinblue/processor/data.ts b/test/integrations/destinations/sendinblue/processor/data.ts new file mode 100644 index 0000000000..e50bb9c003 --- /dev/null +++ b/test/integrations/destinations/sendinblue/processor/data.ts @@ -0,0 +1,1722 @@ +export const data = [ + { + name: 'sendinblue', + description: 'Page call without email or phone', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'page', + sentAt: '2021-01-03T17:02:53.195Z', + channel: 'web', + name: 'New Page', + properties: { + url: 'https://www.google.com/', + title: 'Google home', + }, + context: { + traits: {}, + page: { + url: 'http://127.0.0.1:7307/Testing/test/ourSdk.html', + path: '/Testing/test/ourSdk.html', + title: 'Document', + search: '', + tab_url: 'http://127.0.0.1:7307/Testing/test/ourSdk.html', + referrer: 'http://127.0.0.1:7307/Testing/test/', + initial_referrer: '$direct', + referring_domain: '127.0.0.1:7307', + initial_referring_domain: '', + }, + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + destination: { + Config: { + apiKey: 'apiKey123', + clientKey: 'clientKey123', + doi: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'At least one of `email` or `phone` is required', + statTags: { + destType: 'SENDINBLUE', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'sendinblue', + description: 'Page call', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'page', + sentAt: '2021-01-03T17:02:53.195Z', + channel: 'web', + name: 'New Page', + properties: { + url: 'https://www.google.com/', + title: 'Google home', + }, + context: { + traits: { + email: 'john_doe@example.com', + }, + page: { + url: 'http://127.0.0.1:7307/Testing/test/ourSdk.html', + path: '/Testing/test/ourSdk.html', + title: 'Document', + search: '', + tab_url: 'http://127.0.0.1:7307/Testing/test/ourSdk.html', + referrer: 'http://127.0.0.1:7307/Testing/test/', + initial_referrer: '$direct', + referring_domain: '127.0.0.1:7307', + initial_referring_domain: '', + }, + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + destination: { + Config: { + apiKey: 'apiKey123', + clientKey: 'clientKey123', + templateId: 3, + doi: false, + redirectionUrl: 'https://app.sendinblue.com/marketing-dashboard', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + FORM: {}, + JSON: { + email: 'john_doe@example.com', + page: 'https://www.google.com/', + properties: { + ma_path: '/Testing/test/ourSdk.html', + ma_referrer: 'http://127.0.0.1:7307/Testing/test/', + ma_title: 'Google home', + sib_name: 'New Page', + }, + }, + JSON_ARRAY: {}, + XML: {}, + }, + endpoint: 'https://in-automate.sendinblue.com/api/v2/trackPage', + files: {}, + headers: { + 'Content-Type': 'application/json', + 'ma-key': 'clientKey123', + }, + method: 'POST', + params: {}, + type: 'REST', + version: '1', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'sendinblue', + description: 'Track call without email or phone', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + sentAt: '2021-01-03T17:02:53.195Z', + channel: 'web', + event: 'Order Completed', + properties: {}, + context: { + traits: { + first_name: 'John', + lastName: 'Doe', + }, + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + destination: { + Config: { + apiKey: 'apiKey123', + clientKey: 'clientKey123', + doi: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'At least one of `email` or `phone` is required', + statTags: { + destType: 'SENDINBLUE', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'sendinblue', + description: 'Track call without event', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + sentAt: '2021-01-03T17:02:53.195Z', + channel: 'web', + properties: {}, + context: {}, + }, + destination: { + Config: { + apiKey: 'apiKey123', + clientKey: 'clientKey123', + doi: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Event name is required', + statTags: { + destType: 'SENDINBLUE', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'sendinblue', + description: 'Track events with sendTraitsInTrack flag set to true', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + sentAt: '2021-01-03T17:02:53.195Z', + channel: 'web', + event: 'Order Completed', + properties: {}, + context: { + traits: { + first_name: 'John', + lastName: 'Doe', + age: 19, + email: 'john_doe@example.com', + phone: '+919876543210', + location: 'Mumbai', + role: 'SDE', + }, + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + destination: { + Config: { + apiKey: 'apiKey123', + clientKey: 'clientKey123', + doi: false, + sendTraitsInTrack: true, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + FORM: {}, + JSON: { + email: 'john_doe@example.com', + event: 'Order Completed', + eventdata: {}, + properties: { + FIRSTNAME: 'John', + LASTNAME: 'Doe', + SMS: '+919876543210', + age: 19, + location: 'Mumbai', + role: 'SDE', + }, + }, + JSON_ARRAY: {}, + XML: {}, + }, + endpoint: 'https://in-automate.sendinblue.com/api/v2/trackEvent', + files: {}, + headers: { + 'Content-Type': 'application/json', + 'ma-key': 'clientKey123', + }, + method: 'POST', + params: {}, + type: 'REST', + version: '1', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'sendinblue', + description: 'Track events with contactAttributeMapping provided in webapp', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + sentAt: '2021-01-03T17:02:53.195Z', + channel: 'web', + event: 'Order Completed', + properties: {}, + context: { + traits: { + first_name: 'John', + lastName: 'Doe', + age: 19, + email: 'john_doe@example.com', + phone: '+919876543210', + location: 'Mumbai', + role: 'SDE', + }, + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + destination: { + Config: { + apiKey: 'apiKey123', + clientKey: 'clientKey123', + doi: false, + contactAttributeMapping: [ + { + from: 'location', + to: 'LOCATION', + }, + ], + sendTraitsInTrack: true, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + FORM: {}, + JSON: { + email: 'john_doe@example.com', + event: 'Order Completed', + eventdata: {}, + properties: { + FIRSTNAME: 'John', + LASTNAME: 'Doe', + LOCATION: 'Mumbai', + SMS: '+919876543210', + age: 19, + role: 'SDE', + }, + }, + JSON_ARRAY: {}, + XML: {}, + }, + endpoint: 'https://in-automate.sendinblue.com/api/v2/trackEvent', + files: {}, + headers: { + 'Content-Type': 'application/json', + 'ma-key': 'clientKey123', + }, + method: 'POST', + params: {}, + type: 'REST', + version: '1', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'sendinblue', + description: 'Track events with propertiesIdKey provided in integration object', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + sentAt: '2021-01-03T17:02:53.195Z', + channel: 'web', + event: 'Order Completed', + properties: { + orderId: '1341394-3812392190', + products: [ + { + product_id: 1234, + product_name: 'Track Pants', + amount: 1, + price: 220, + }, + { + product_id: 5768, + product_name: 'T-Shirt', + amount: 5, + price: 1058, + }, + ], + }, + context: { + traits: { + first_name: 'John', + lastName: 'Doe', + age: 19, + email: 'john_doe@example.com', + phone: '+919876543210', + location: 'Mumbai', + role: 'SDE', + }, + }, + integrations: { + All: true, + sendinblue: { + propertiesIdKey: 'orderId', + }, + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + destination: { + Config: { + apiKey: 'apiKey123', + clientKey: 'clientKey123', + doi: false, + contactAttributeMapping: [ + { + from: 'location', + to: 'LOCATION', + }, + ], + sendTraitsInTrack: true, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + FORM: {}, + JSON: { + email: 'john_doe@example.com', + event: 'Order Completed', + eventdata: { + data: { + orderId: '1341394-3812392190', + products: [ + { + amount: 1, + price: 220, + product_id: 1234, + product_name: 'Track Pants', + }, + { + amount: 5, + price: 1058, + product_id: 5768, + product_name: 'T-Shirt', + }, + ], + }, + id: '1341394-3812392190', + }, + properties: { + FIRSTNAME: 'John', + LASTNAME: 'Doe', + LOCATION: 'Mumbai', + SMS: '+919876543210', + age: 19, + role: 'SDE', + }, + }, + JSON_ARRAY: {}, + XML: {}, + }, + endpoint: 'https://in-automate.sendinblue.com/api/v2/trackEvent', + files: {}, + headers: { + 'Content-Type': 'application/json', + 'ma-key': 'clientKey123', + }, + method: 'POST', + params: {}, + type: 'REST', + version: '1', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'sendinblue', + description: 'Track events with eventdata.id taken from messageId', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + sentAt: '2021-01-03T17:02:53.195Z', + channel: 'web', + event: 'Order Completed', + properties: { + orderId: '1341394-3812392190', + products: [ + { + product_id: 1234, + product_name: 'Track Pants', + amount: 1, + price: 220, + }, + { + product_id: 5768, + product_name: 'T-Shirt', + amount: 5, + price: 1058, + }, + ], + }, + context: { + traits: { + first_name: 'John', + lastName: 'Doe', + age: 19, + email: 'john_doe@example.com', + phone: '+919876543210', + location: 'Mumbai', + role: 'SDE', + }, + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + destination: { + Config: { + apiKey: 'apiKey123', + clientKey: 'clientKey123', + doi: false, + contactAttributeMapping: [ + { + from: 'location', + to: 'LOCATION', + }, + ], + sendTraitsInTrack: true, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + FORM: {}, + JSON: { + email: 'john_doe@example.com', + event: 'Order Completed', + eventdata: { + data: { + orderId: '1341394-3812392190', + products: [ + { + amount: 1, + price: 220, + product_id: 1234, + product_name: 'Track Pants', + }, + { + amount: 5, + price: 1058, + product_id: 5768, + product_name: 'T-Shirt', + }, + ], + }, + id: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + }, + properties: { + FIRSTNAME: 'John', + LASTNAME: 'Doe', + LOCATION: 'Mumbai', + SMS: '+919876543210', + age: 19, + role: 'SDE', + }, + }, + JSON_ARRAY: {}, + XML: {}, + }, + endpoint: 'https://in-automate.sendinblue.com/api/v2/trackEvent', + files: {}, + headers: { + 'Content-Type': 'application/json', + 'ma-key': 'clientKey123', + }, + method: 'POST', + params: {}, + type: 'REST', + version: '1', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'sendinblue', + description: 'Track link without email or phone', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + sentAt: '2021-01-03T17:02:53.195Z', + channel: 'web', + event: 'trackLink', + properties: { + link: 'https://www.google.com/gmail/', + emailCount: 19, + }, + context: { + traits: {}, + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + destination: { + Config: { + apiKey: 'apiKey123', + clientKey: 'clientKey123', + doi: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'At least one of `email` or `phone` is required', + statTags: { + destType: 'SENDINBLUE', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'sendinblue', + description: 'Track link without link', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + sentAt: '2021-01-03T17:02:53.195Z', + channel: 'web', + event: 'trackLink', + properties: {}, + context: { + traits: { + phone: '+919507545089', + }, + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + destination: { + Config: { + apiKey: 'apiKey123', + clientKey: 'clientKey123', + doi: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Missing required value from "properties.link"', + statTags: { + destType: 'SENDINBLUE', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'sendinblue', + description: 'Track link', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + sentAt: '2021-01-03T17:02:53.195Z', + channel: 'web', + event: 'trackLink', + properties: { + link: 'https://www.google.com/gmail/', + emailCount: 19, + }, + context: { + traits: { + phone: '+919507545089', + }, + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + destination: { + Config: { + apiKey: 'apiKey123', + clientKey: 'clientKey123', + doi: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + FORM: {}, + JSON: { + email: '919507545089@mailin-sms.com', + link: 'https://www.google.com/gmail/', + properties: { + emailCount: 19, + }, + }, + JSON_ARRAY: {}, + XML: {}, + }, + endpoint: 'https://in-automate.sendinblue.com/api/v2/trackLink', + files: {}, + headers: { + 'Content-Type': 'application/json', + 'ma-key': 'clientKey123', + }, + method: 'POST', + params: {}, + type: 'REST', + version: '1', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'sendinblue', + description: 'Identify call with invalid email', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'identify', + sentAt: '2021-01-03T17:02:53.195Z', + channel: 'web', + traits: { + email: 'abc.com', + }, + context: {}, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + destination: { + Config: { + apiKey: 'apiKey123', + clientKey: 'clientKey123', + doi: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'The provided email is invalid', + statTags: { + destType: 'SENDINBLUE', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'sendinblue', + description: 'Identify call with invalid phone number', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'identify', + sentAt: '2021-01-03T17:02:53.195Z', + channel: 'web', + traits: { + phone: '99999999', + }, + context: {}, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + destination: { + Config: { + apiKey: 'apiKey123', + clientKey: 'clientKey123', + doi: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'The provided phone number is invalid', + statTags: { + destType: 'SENDINBLUE', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'sendinblue', + description: 'Identify call to create or update a contact without email or phone', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'identify', + sentAt: '2021-01-03T17:02:53.195Z', + channel: 'web', + context: {}, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + destination: { + Config: { + apiKey: 'apiKey123', + clientKey: 'clientKey123', + doi: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'At least one of `email` or `phone` is required', + statTags: { + destType: 'SENDINBLUE', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'sendinblue', + description: 'Identify call to create or update a contact', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'identify', + sentAt: '2021-01-03T17:02:53.195Z', + channel: 'web', + traits: { + first_name: 'John', + lastName: 'Doe', + age: 19, + email: 'john_doe@example.com', + phone: '+919876543210', + location: 'Mumbai', + newEmail: 'alex_root@example.com', + role: 'SDE', + }, + context: { + externalId: [ + { + type: 'sendinblueIncludeListIds', + id: [1, 2], + }, + ], + }, + integrations: { + All: true, + sendinblue: { + emailBlacklisted: true, + }, + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + destination: { + Config: { + apiKey: 'apiKey123', + clientKey: 'clientKey123', + doi: false, + contactAttributeMapping: [ + { + from: 'location', + to: 'LOCATION', + }, + ], + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + FORM: {}, + JSON: { + attributes: { + FIRSTNAME: 'John', + LASTNAME: 'Doe', + LOCATION: 'Mumbai', + SMS: '+919876543210', + EMAIL: 'alex_root@example.com', + age: 19, + role: 'SDE', + }, + email: 'john_doe@example.com', + emailBlacklisted: true, + listIds: [1, 2], + updateEnabled: true, + }, + JSON_ARRAY: {}, + XML: {}, + }, + endpoint: 'https://api.sendinblue.com/v3/contacts', + files: {}, + headers: { + 'Content-Type': 'application/json', + 'api-key': 'apiKey123', + }, + method: 'POST', + params: {}, + type: 'REST', + version: '1', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'sendinblue', + description: 'Identify call to create DOI contact with templatedId from externalId', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'identify', + sentAt: '2021-01-03T17:02:53.195Z', + channel: 'web', + traits: { + first_name: 'John', + lastName: 'Doe', + age: 19, + email: 'john_doe@example.com', + phone: '+919876543210', + location: 'Mumbai', + role: 'SDE', + }, + context: { + externalId: [ + { + type: 'sendinblueIncludeListIds', + id: [1, 2], + }, + { + type: 'sendinblueUnlinkListIds', + id: [5], + }, + { + type: 'sendinblueTemplateId', + id: 2, + }, + ], + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + destination: { + Config: { + apiKey: 'apiKey123', + clientKey: 'clientKey123', + templateId: 3, + doi: true, + redirectionUrl: 'https://app.sendinblue.com/marketing-dashboard', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + FORM: {}, + JSON: { + attributes: { + FIRSTNAME: 'John', + LASTNAME: 'Doe', + SMS: '+919876543210', + age: 19, + location: 'Mumbai', + role: 'SDE', + }, + email: 'john_doe@example.com', + includeListIds: [1, 2], + redirectionUrl: 'https://app.sendinblue.com/marketing-dashboard', + templateId: 3, + }, + JSON_ARRAY: {}, + XML: {}, + }, + endpoint: 'https://api.sendinblue.com/v3/contacts/doubleOptinConfirmation', + files: {}, + headers: { + 'Content-Type': 'application/json', + 'api-key': 'apiKey123', + }, + method: 'POST', + params: {}, + type: 'REST', + version: '1', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'sendinblue', + description: 'Identify call to create DOI contact without include list Ids', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'identify', + sentAt: '2021-01-03T17:02:53.195Z', + channel: 'web', + traits: { + first_name: 'John', + lastName: 'Doe', + age: 19, + email: 'john_doe@example.com', + phone: '+919876543210', + location: 'Mumbai', + role: 'SDE', + }, + context: {}, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + destination: { + Config: { + apiKey: 'apiKey123', + clientKey: 'clientKey123', + templateId: 3, + doi: true, + redirectionUrl: 'https://app.sendinblue.com/marketing-dashboard', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'sendinblueIncludeListIds is required to create a contact using DOI', + statTags: { + destType: 'SENDINBLUE', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'sendinblue', + description: 'Identify call to create DOI contact without template Id', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'identify', + sentAt: '2021-01-03T17:02:53.195Z', + channel: 'web', + traits: { + first_name: 'John', + lastName: 'Doe', + age: 19, + email: 'john_doe@example.com', + phone: '+919876543210', + location: 'Mumbai', + role: 'SDE', + }, + context: {}, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + destination: { + Config: { + apiKey: 'apiKey123', + clientKey: 'clientKey123', + doi: true, + redirectionUrl: 'https://app.sendinblue.com/marketing-dashboard', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'templateId is required to create a contact using DOI', + statTags: { + destType: 'SENDINBLUE', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'sendinblue', + description: 'Identify call to update a DOI contact without an email or contact ID', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'identify', + sentAt: '2021-01-03T17:02:53.195Z', + channel: 'web', + traits: { + first_name: 'Gordon', + lastName: 'Pittman', + age: 19, + location: 'Mumbai', + role: 'SDE', + }, + context: {}, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + destination: { + Config: { + apiKey: 'apiKey123', + clientKey: 'clientKey123', + templateId: 3, + doi: true, + redirectionUrl: 'https://app.sendinblue.com/marketing-dashboard', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: + 'At least one of `email` or `contactId` is required to update the contact using DOI', + statTags: { + destType: 'SENDINBLUE', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'sendinblue', + description: + 'Identify call to update a DOI contact using contactId as an Identifier and without include list Ids', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'identify', + sentAt: '2021-01-03T17:02:53.195Z', + channel: 'web', + traits: { + age: 36, + location: 'Mumbai', + role: 'SDE 2', + }, + context: { + externalId: [ + { + type: 'sendinblueContactId', + id: 42, + }, + ], + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + destination: { + Config: { + apiKey: 'apiKey123', + clientKey: 'clientKey123', + templateId: 3, + doi: true, + redirectionUrl: 'https://app.sendinblue.com/marketing-dashboard', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + FORM: {}, + JSON: { + attributes: { + age: 36, + location: 'Mumbai', + role: 'SDE 2', + }, + }, + JSON_ARRAY: {}, + XML: {}, + }, + endpoint: 'https://api.sendinblue.com/v3/contacts/42', + files: {}, + headers: { + 'Content-Type': 'application/json', + 'api-key': 'apiKey123', + }, + method: 'PUT', + params: {}, + type: 'REST', + version: '1', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'sendinblue', + description: + 'Identify call to update a DOI contact using email as an Identifier and without include list Ids', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'identify', + sentAt: '2021-01-03T17:02:53.195Z', + channel: 'web', + traits: { + age: 36, + location: 'Mumbai', + role: 'SDE 2', + phone: '+918888888888', + email: 'gordon_pittman@example.com', + newEmail: 'gordon_pittman007@example.com', + }, + context: { + externalId: [ + { + type: 'sendinblueIncludeListIds', + id: [1], + }, + { + type: 'sendinblueUnlinkListIds', + id: [2], + }, + ], + }, + integrations: { + All: true, + sendinblue: { + emailBlacklisted: true, + smsBlacklisted: false, + }, + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + destination: { + Config: { + apiKey: 'apiKey123', + clientKey: 'clientKey123', + templateId: 3, + doi: true, + redirectionUrl: 'https://app.sendinblue.com/marketing-dashboard', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + FORM: {}, + JSON: { + attributes: { + age: 36, + location: 'Mumbai', + role: 'SDE 2', + SMS: '+918888888888', + EMAIL: 'gordon_pittman007@example.com', + }, + emailBlacklisted: true, + smsBlacklisted: false, + listIds: [1], + unlinkListIds: [2], + }, + JSON_ARRAY: {}, + XML: {}, + }, + endpoint: 'https://api.sendinblue.com/v3/contacts/gordon_pittman%40example.com', + files: {}, + headers: { + 'Content-Type': 'application/json', + 'api-key': 'apiKey123', + }, + method: 'PUT', + params: {}, + type: 'REST', + version: '1', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'sendinblue', + description: 'Identify call to unlink a contact from given lists', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'identify', + sentAt: '2021-01-03T17:02:53.195Z', + channel: 'web', + traits: { + email: 'eric_kim@example.com', + }, + context: { + externalId: [ + { + type: 'sendinblueUnlinkListIds', + id: [2, 5], + }, + ], + }, + }, + destination: { + Config: { + apiKey: 'apiKey123', + clientKey: 'clientKey123', + doi: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + FORM: {}, + JSON: { + emails: ['eric_kim@example.com'], + }, + JSON_ARRAY: {}, + XML: {}, + }, + endpoint: 'https://api.sendinblue.com/v3/contacts/lists/2/contacts/remove', + files: {}, + headers: { + 'Content-Type': 'application/json', + 'api-key': 'apiKey123', + }, + method: 'POST', + params: {}, + type: 'REST', + userId: '', + version: '1', + }, + statusCode: 200, + }, + { + output: { + body: { + FORM: {}, + JSON: { + emails: ['eric_kim@example.com'], + }, + JSON_ARRAY: {}, + XML: {}, + }, + endpoint: 'https://api.sendinblue.com/v3/contacts/lists/5/contacts/remove', + files: {}, + headers: { + 'Content-Type': 'application/json', + 'api-key': 'apiKey123', + }, + method: 'POST', + params: {}, + type: 'REST', + userId: '', + version: '1', + }, + statusCode: 200, + }, + ], + }, + }, + }, +]; diff --git a/test/integrations/destinations/sendinblue/router/data.ts b/test/integrations/destinations/sendinblue/router/data.ts new file mode 100644 index 0000000000..31781e4c4f --- /dev/null +++ b/test/integrations/destinations/sendinblue/router/data.ts @@ -0,0 +1,410 @@ +export const data = [ + { + name: 'sendinblue', + description: 'Test 0', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + message: { + type: 'track', + sentAt: '2021-01-03T17:02:53.195Z', + channel: 'web', + event: 'Order Completed', + properties: { + orderId: '1341394-3812392190', + products: [ + { + product_id: 1234, + product_name: 'Track Pants', + amount: 1, + price: 220, + }, + { + product_id: 5768, + product_name: 'T-Shirt', + amount: 5, + price: 1058, + }, + ], + }, + context: { + traits: { + first_name: 'John', + lastName: 'Doe', + age: 19, + email: 'john_doe@example.com', + phone: '+919876543210', + location: 'Mumbai', + role: 'SDE', + }, + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + metadata: { + jobId: 1, + }, + destination: { + Config: { + apiKey: 'apiKey123', + clientKey: 'clientKey123', + doi: false, + contactAttributeMapping: [ + { + from: 'location', + to: 'LOCATION', + }, + ], + sendTraitsInTrack: true, + }, + }, + }, + { + message: { + type: 'page', + sentAt: '2021-01-03T17:02:53.195Z', + channel: 'web', + name: 'New Page', + properties: { + url: 'https://www.google.com/', + title: 'Google home', + }, + context: { + traits: { + email: 'john_doe@example.com', + }, + page: { + url: 'http://127.0.0.1:7307/Testing/test/ourSdk.html', + path: '/Testing/test/ourSdk.html', + title: 'Document', + search: '', + tab_url: 'http://127.0.0.1:7307/Testing/test/ourSdk.html', + referrer: 'http://127.0.0.1:7307/Testing/test/', + initial_referrer: '$direct', + referring_domain: '127.0.0.1:7307', + initial_referring_domain: '', + }, + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + metadata: { + jobId: 2, + }, + destination: { + Config: { + apiKey: 'apiKey123', + clientKey: 'clientKey123', + templateId: 3, + doi: false, + redirectionUrl: 'https://app.sendinblue.com/marketing-dashboard', + }, + }, + }, + { + message: { + type: 'identify', + sentAt: '2021-01-03T17:02:53.195Z', + channel: 'web', + traits: { + first_name: 'John', + lastName: 'Doe', + age: 19, + email: 'john_doe@example.com', + phone: '+919876543210', + location: 'Mumbai', + newEmail: 'alex_root@example.com', + role: 'SDE', + }, + context: { + externalId: [ + { + type: 'sendinblueIncludeListIds', + id: [1, 2], + }, + ], + }, + integrations: { + All: true, + sendinblue: { + emailBlacklisted: true, + }, + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + metadata: { + jobId: 3, + }, + destination: { + Config: { + apiKey: 'apiKey123', + clientKey: 'clientKey123', + doi: false, + contactAttributeMapping: [ + { + from: 'location', + to: 'LOCATION', + }, + ], + }, + }, + }, + { + message: { + type: 'identify', + sentAt: '2021-01-03T17:02:53.195Z', + channel: 'web', + traits: { + first_name: 'John', + lastName: 'Doe', + age: 19, + email: 'john_doe@example.com', + phone: '+919876543210', + location: 'Mumbai', + role: 'SDE', + }, + context: {}, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + metadata: { + jobId: 4, + }, + destination: { + Config: { + apiKey: 'apiKey123', + clientKey: 'clientKey123', + templateId: 3, + doi: true, + redirectionUrl: 'https://app.sendinblue.com/marketing-dashboard', + }, + }, + }, + ], + destType: 'sendinblue', + }, + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batched: false, + batchedRequest: { + body: { + FORM: {}, + JSON: { + email: 'john_doe@example.com', + event: 'Order Completed', + eventdata: { + data: { + orderId: '1341394-3812392190', + products: [ + { + amount: 1, + price: 220, + product_id: 1234, + product_name: 'Track Pants', + }, + { + amount: 5, + price: 1058, + product_id: 5768, + product_name: 'T-Shirt', + }, + ], + }, + id: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + }, + properties: { + FIRSTNAME: 'John', + LASTNAME: 'Doe', + LOCATION: 'Mumbai', + SMS: '+919876543210', + age: 19, + role: 'SDE', + }, + }, + JSON_ARRAY: {}, + XML: {}, + }, + endpoint: 'https://in-automate.sendinblue.com/api/v2/trackEvent', + files: {}, + headers: { + 'Content-Type': 'application/json', + 'ma-key': 'clientKey123', + }, + method: 'POST', + params: {}, + type: 'REST', + version: '1', + }, + destination: { + Config: { + apiKey: 'apiKey123', + clientKey: 'clientKey123', + contactAttributeMapping: [ + { + from: 'location', + to: 'LOCATION', + }, + ], + doi: false, + sendTraitsInTrack: true, + }, + }, + metadata: [ + { + jobId: 1, + }, + ], + statusCode: 200, + }, + { + batched: false, + batchedRequest: { + body: { + FORM: {}, + JSON: { + email: 'john_doe@example.com', + page: 'https://www.google.com/', + properties: { + ma_path: '/Testing/test/ourSdk.html', + ma_referrer: 'http://127.0.0.1:7307/Testing/test/', + ma_title: 'Google home', + sib_name: 'New Page', + }, + }, + JSON_ARRAY: {}, + XML: {}, + }, + endpoint: 'https://in-automate.sendinblue.com/api/v2/trackPage', + files: {}, + headers: { + 'Content-Type': 'application/json', + 'ma-key': 'clientKey123', + }, + method: 'POST', + params: {}, + type: 'REST', + version: '1', + }, + destination: { + Config: { + apiKey: 'apiKey123', + clientKey: 'clientKey123', + doi: false, + redirectionUrl: 'https://app.sendinblue.com/marketing-dashboard', + templateId: 3, + }, + }, + metadata: [ + { + jobId: 2, + }, + ], + statusCode: 200, + }, + { + batched: false, + batchedRequest: { + body: { + FORM: {}, + JSON: { + attributes: { + EMAIL: 'alex_root@example.com', + FIRSTNAME: 'John', + LASTNAME: 'Doe', + LOCATION: 'Mumbai', + SMS: '+919876543210', + age: 19, + role: 'SDE', + }, + email: 'john_doe@example.com', + emailBlacklisted: true, + listIds: [1, 2], + updateEnabled: true, + }, + JSON_ARRAY: {}, + XML: {}, + }, + endpoint: 'https://api.sendinblue.com/v3/contacts', + files: {}, + headers: { + 'Content-Type': 'application/json', + 'api-key': 'apiKey123', + }, + method: 'POST', + params: {}, + type: 'REST', + version: '1', + }, + destination: { + Config: { + apiKey: 'apiKey123', + clientKey: 'clientKey123', + contactAttributeMapping: [ + { + from: 'location', + to: 'LOCATION', + }, + ], + doi: false, + }, + }, + metadata: [ + { + jobId: 3, + }, + ], + statusCode: 200, + }, + { + batched: false, + error: 'sendinblueIncludeListIds is required to create a contact using DOI', + metadata: [ + { + jobId: 4, + }, + ], + statTags: { + destType: 'SENDINBLUE', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'router', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + destination: { + Config: { + apiKey: 'apiKey123', + clientKey: 'clientKey123', + templateId: 3, + doi: true, + redirectionUrl: 'https://app.sendinblue.com/marketing-dashboard', + }, + }, + }, + ], + }, + }, + }, + }, +]; diff --git a/test/integrations/destinations/stormly/processor/data.ts b/test/integrations/destinations/stormly/processor/data.ts index cfa16beced..52356ba9e0 100644 --- a/test/integrations/destinations/stormly/processor/data.ts +++ b/test/integrations/destinations/stormly/processor/data.ts @@ -1,566 +1,566 @@ export const data = [ - { - "name": "stormly", - "description": "Identify call without userId", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "destination": { - "Config": { - "apiKey": "dummyApiKey" - }, - "ID": "stormly123" - }, - "message": { - "type": "identify", - "context": { - "traits": { - "name": "John Doe", - "email": "johndoe@gmail.com", - "age": 25 - } - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "statusCode": 400, - "error": "Missing required value from \"userIdOnly\"", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation", - "destType": "STORMLY", - "module": "destination", - "implementation": "native", - "feature": "processor" - } - } - ] - } - } - }, - { - "name": "stormly", - "description": "Identify call with userId, traits", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "destination": { - "Config": { - "apiKey": "dummyApiKey" - }, - "ID": "stormly123" - }, - "message": { - "type": "identify", - "sentAt": "2022-01-20T13:39:21.033Z", - "channel": "web", - "userId": "5136633649", - "context": { - "traits": { - "name": "John Doe", - "email": "johndoe@gmail.com", - "age": 25 - } - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rudderstack.t.stormly.com/webhook/rudderstack/identify", - "headers": { - "Content-Type": "application/json", - "Authorization": "Basic dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "userId": "5136633649", - "timestamp": "2022-01-20T13:39:21.032Z", - "traits": { - "name": "John Doe", - "email": "johndoe@gmail.com", - "age": 25 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "stormly", - "description": "Track call without userId", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "destination": { - "Config": { - "apiKey": "dummyApiKey" - }, - "ID": "stormly123" - }, - "message": { - "type": "track", - "event": "Product Reviewed", - "properties": { - "review_id": "12345", - "product_id": "123", - "rating": 3, - "review_body": "Average product, expected much more.", - "groupId": "91Yb32830" - }, - "context": {}, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "statusCode": 400, - "error": "Missing required value from \"userIdOnly\"", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation", - "destType": "STORMLY", - "module": "destination", - "implementation": "native", - "feature": "processor" - } - } - ] - } - } - }, - { - "name": "stormly", - "description": "Track call without groupId", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "destination": { - "Config": { - "apiKey": "dummyApiKey" - }, - "ID": "stormly123" - }, - "message": { - "type": "track", - "event": "Product Reviewed", - "userId": "5136633649", - "properties": { - "review_id": "12345", - "product_id": "123", - "rating": 3, - "review_body": "Average product, expected much more." - }, - "context": {}, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rudderstack.t.stormly.com/webhook/rudderstack/track", - "headers": { - "Content-Type": "application/json", - "Authorization": "Basic dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "userId": "5136633649", - "event": "Product Reviewed", - "properties": { - "review_id": "12345", - "product_id": "123", - "rating": 3, - "review_body": "Average product, expected much more." - }, - "timestamp": "2022-01-20T13:39:21.032Z" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "stormly", - "description": "Track call without properties", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "destination": { - "Config": { - "apiKey": "dummyApiKey" - }, - "ID": "stormly123" - }, - "message": { - "type": "track", - "event": "Product Reviewed", - "userId": "5136633649", - "context": {}, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rudderstack.t.stormly.com/webhook/rudderstack/track", - "headers": { - "Content-Type": "application/json", - "Authorization": "Basic dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "userId": "5136633649", - "event": "Product Reviewed", - "timestamp": "2022-01-20T13:39:21.032Z" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "stormly", - "description": "Track call with userId, groupId and properties", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "destination": { - "Config": { - "apiKey": "dummyApiKey" - }, - "ID": "stormly123" - }, - "message": { - "type": "track", - "event": "Product Reviewed", - "userId": "5136633649", - "properties": { - "review_id": "12345", - "product_id": "123", - "rating": 3, - "review_body": "Average product, expected much more.", - "groupId": "91Yb32830" - }, - "context": {}, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rudderstack.t.stormly.com/webhook/rudderstack/track", - "headers": { - "Content-Type": "application/json", - "Authorization": "Basic dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "userId": "5136633649", - "event": "Product Reviewed", - "properties": { - "review_id": "12345", - "product_id": "123", - "rating": 3, - "review_body": "Average product, expected much more." - }, - "timestamp": "2022-01-20T13:39:21.032Z", - "context": { - "groupId": "91Yb32830" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "stormly", - "description": "Track call with userId, groupId (from externalId) and properties", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "destination": { - "Config": { - "apiKey": "dummyApiKey" - }, - "ID": "stormly123" - }, - "message": { - "type": "track", - "event": "Product Reviewed", - "userId": "5136633649", - "properties": { - "review_id": "12345", - "product_id": "123", - "rating": 3, - "review_body": "Average product, expected much more.", - "groupId": "test-12345" - }, - "context": { - "externalId": [ - { - "type": "stormlyGroupId", - "id": "91Yb32830" - } - ] - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rudderstack.t.stormly.com/webhook/rudderstack/track", - "headers": { - "Content-Type": "application/json", - "Authorization": "Basic dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "userId": "5136633649", - "event": "Product Reviewed", - "properties": { - "review_id": "12345", - "product_id": "123", - "rating": 3, - "review_body": "Average product, expected much more." - }, - "timestamp": "2022-01-20T13:39:21.032Z", - "context": { - "groupId": "91Yb32830" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "stormly", - "description": "Group call with userId, groupId and traits", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "destination": { - "Config": { - "apiKey": "dummyApiKey" - }, - "ID": "stormly123" - }, - "message": { - "type": "group", - "userId": "5136633649", - "traits": { - "name": "Initech", - "employees": 500, - "headquarters": "Redwood City, California, United States", - "ceo": "John Doe", - "revenue": 70000000, - "currency": "USD", - "groupId": "9230AUbd2138h" - }, - "context": {}, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rudderstack.t.stormly.com/webhook/rudderstack/group", - "headers": { - "Content-Type": "application/json", - "Authorization": "Basic dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "userId": "5136633649", - "groupId": "9230AUbd2138h", - "timestamp": "2022-01-20T13:39:21.032Z", - "traits": { - "name": "Initech", - "employees": 500, - "headquarters": "Redwood City, California, United States", - "ceo": "John Doe", - "revenue": 70000000, - "currency": "USD" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - } - } -] \ No newline at end of file + { + name: 'stormly', + description: 'Identify call without userId', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'dummyApiKey', + }, + ID: 'stormly123', + }, + message: { + type: 'identify', + context: { + traits: { + name: 'John Doe', + email: 'johndoe@gmail.com', + age: 25, + }, + }, + rudderId: '553b5522-c575-40a7-8072-9741c5f9a647', + anonymousId: 'bf412108-0357-4330-b119-7305e767823c', + originalTimestamp: '2022-01-20T13:39:21.032Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: 'Missing required value from "userIdOnly"', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'STORMLY', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'stormly', + description: 'Identify call with userId, traits', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'dummyApiKey', + }, + ID: 'stormly123', + }, + message: { + type: 'identify', + sentAt: '2022-01-20T13:39:21.033Z', + channel: 'web', + userId: '5136633649', + context: { + traits: { + name: 'John Doe', + email: 'johndoe@gmail.com', + age: 25, + }, + }, + rudderId: '553b5522-c575-40a7-8072-9741c5f9a647', + anonymousId: 'bf412108-0357-4330-b119-7305e767823c', + originalTimestamp: '2022-01-20T13:39:21.032Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rudderstack.t.stormly.com/webhook/rudderstack/identify', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Basic dummyApiKey', + }, + params: {}, + body: { + JSON: { + userId: '5136633649', + timestamp: '2022-01-20T13:39:21.032Z', + traits: { + name: 'John Doe', + email: 'johndoe@gmail.com', + age: 25, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'stormly', + description: 'Track call without userId', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'dummyApiKey', + }, + ID: 'stormly123', + }, + message: { + type: 'track', + event: 'Product Reviewed', + properties: { + review_id: '12345', + product_id: '123', + rating: 3, + review_body: 'Average product, expected much more.', + groupId: '91Yb32830', + }, + context: {}, + rudderId: '553b5522-c575-40a7-8072-9741c5f9a647', + anonymousId: 'bf412108-0357-4330-b119-7305e767823c', + originalTimestamp: '2022-01-20T13:39:21.032Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: 'Missing required value from "userIdOnly"', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'STORMLY', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'stormly', + description: 'Track call without groupId', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'dummyApiKey', + }, + ID: 'stormly123', + }, + message: { + type: 'track', + event: 'Product Reviewed', + userId: '5136633649', + properties: { + review_id: '12345', + product_id: '123', + rating: 3, + review_body: 'Average product, expected much more.', + }, + context: {}, + rudderId: '553b5522-c575-40a7-8072-9741c5f9a647', + anonymousId: 'bf412108-0357-4330-b119-7305e767823c', + originalTimestamp: '2022-01-20T13:39:21.032Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rudderstack.t.stormly.com/webhook/rudderstack/track', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Basic dummyApiKey', + }, + params: {}, + body: { + JSON: { + userId: '5136633649', + event: 'Product Reviewed', + properties: { + review_id: '12345', + product_id: '123', + rating: 3, + review_body: 'Average product, expected much more.', + }, + timestamp: '2022-01-20T13:39:21.032Z', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'stormly', + description: 'Track call without properties', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'dummyApiKey', + }, + ID: 'stormly123', + }, + message: { + type: 'track', + event: 'Product Reviewed', + userId: '5136633649', + context: {}, + rudderId: '553b5522-c575-40a7-8072-9741c5f9a647', + anonymousId: 'bf412108-0357-4330-b119-7305e767823c', + originalTimestamp: '2022-01-20T13:39:21.032Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rudderstack.t.stormly.com/webhook/rudderstack/track', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Basic dummyApiKey', + }, + params: {}, + body: { + JSON: { + userId: '5136633649', + event: 'Product Reviewed', + timestamp: '2022-01-20T13:39:21.032Z', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'stormly', + description: 'Track call with userId, groupId and properties', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'dummyApiKey', + }, + ID: 'stormly123', + }, + message: { + type: 'track', + event: 'Product Reviewed', + userId: '5136633649', + properties: { + review_id: '12345', + product_id: '123', + rating: 3, + review_body: 'Average product, expected much more.', + groupId: '91Yb32830', + }, + context: {}, + rudderId: '553b5522-c575-40a7-8072-9741c5f9a647', + anonymousId: 'bf412108-0357-4330-b119-7305e767823c', + originalTimestamp: '2022-01-20T13:39:21.032Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rudderstack.t.stormly.com/webhook/rudderstack/track', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Basic dummyApiKey', + }, + params: {}, + body: { + JSON: { + userId: '5136633649', + event: 'Product Reviewed', + properties: { + review_id: '12345', + product_id: '123', + rating: 3, + review_body: 'Average product, expected much more.', + }, + timestamp: '2022-01-20T13:39:21.032Z', + context: { + groupId: '91Yb32830', + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'stormly', + description: 'Track call with userId, groupId (from externalId) and properties', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'dummyApiKey', + }, + ID: 'stormly123', + }, + message: { + type: 'track', + event: 'Product Reviewed', + userId: '5136633649', + properties: { + review_id: '12345', + product_id: '123', + rating: 3, + review_body: 'Average product, expected much more.', + groupId: 'test-12345', + }, + context: { + externalId: [ + { + type: 'stormlyGroupId', + id: '91Yb32830', + }, + ], + }, + rudderId: '553b5522-c575-40a7-8072-9741c5f9a647', + anonymousId: 'bf412108-0357-4330-b119-7305e767823c', + originalTimestamp: '2022-01-20T13:39:21.032Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rudderstack.t.stormly.com/webhook/rudderstack/track', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Basic dummyApiKey', + }, + params: {}, + body: { + JSON: { + userId: '5136633649', + event: 'Product Reviewed', + properties: { + review_id: '12345', + product_id: '123', + rating: 3, + review_body: 'Average product, expected much more.', + }, + timestamp: '2022-01-20T13:39:21.032Z', + context: { + groupId: '91Yb32830', + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'stormly', + description: 'Group call with userId, groupId and traits', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'dummyApiKey', + }, + ID: 'stormly123', + }, + message: { + type: 'group', + userId: '5136633649', + traits: { + name: 'Initech', + employees: 500, + headquarters: 'Redwood City, California, United States', + ceo: 'John Doe', + revenue: 70000000, + currency: 'USD', + groupId: '9230AUbd2138h', + }, + context: {}, + rudderId: '553b5522-c575-40a7-8072-9741c5f9a647', + anonymousId: 'bf412108-0357-4330-b119-7305e767823c', + originalTimestamp: '2022-01-20T13:39:21.032Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rudderstack.t.stormly.com/webhook/rudderstack/group', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Basic dummyApiKey', + }, + params: {}, + body: { + JSON: { + userId: '5136633649', + groupId: '9230AUbd2138h', + timestamp: '2022-01-20T13:39:21.032Z', + traits: { + name: 'Initech', + employees: 500, + headquarters: 'Redwood City, California, United States', + ceo: 'John Doe', + revenue: 70000000, + currency: 'USD', + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, +]; diff --git a/test/integrations/destinations/stormly/router/data.ts b/test/integrations/destinations/stormly/router/data.ts index bbc9c7af2e..efdae153e4 100644 --- a/test/integrations/destinations/stormly/router/data.ts +++ b/test/integrations/destinations/stormly/router/data.ts @@ -1,148 +1,148 @@ import { FEATURES } from '../../../../../src/v0/util/tags'; export const data = [ - { - name: 'stormly', - description: 'Test 0', - feature: FEATURES.ROUTER, - module: 'destination', - version: 'v0', - input: { - request: { - body: { - input: [ - { - "destination": { - "Config": { - "apiKey": "dummyApiKey" - }, - "ID": "stormly123" - }, - "metadata": { - "jobId": 1 - }, - "message": { - "type": "identify", - "sentAt": "2022-01-20T13:39:21.033Z", - "channel": "web", - "userId": "5136633649", - "context": { - "traits": { - "name": "John Doe", - "email": "johndoe@gmail.com", - "age": 25 - } - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey" - }, - "ID": "stormly123" - }, - "metadata": { - "jobId": 2 - }, - "message": { - "type": "track", - "event": "Product Reviewed", - "properties": { - "review_id": "12345", - "product_id": "123", - "rating": 3.0, - "review_body": "Average product, expected much more.", - "groupId": "91Yb32830" - }, - "context": {}, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - } - ], - destType: 'stormly', + { + name: 'stormly', + description: 'Test 0', + feature: FEATURES.ROUTER, + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + destination: { + Config: { + apiKey: 'dummyApiKey', }, - method: 'POST', + ID: 'stormly123', + }, + metadata: { + jobId: 1, + }, + message: { + type: 'identify', + sentAt: '2022-01-20T13:39:21.033Z', + channel: 'web', + userId: '5136633649', + context: { + traits: { + name: 'John Doe', + email: 'johndoe@gmail.com', + age: 25, + }, + }, + rudderId: '553b5522-c575-40a7-8072-9741c5f9a647', + anonymousId: 'bf412108-0357-4330-b119-7305e767823c', + originalTimestamp: '2022-01-20T13:39:21.032Z', + }, }, + { + destination: { + Config: { + apiKey: 'dummyApiKey', + }, + ID: 'stormly123', + }, + metadata: { + jobId: 2, + }, + message: { + type: 'track', + event: 'Product Reviewed', + properties: { + review_id: '12345', + product_id: '123', + rating: 3.0, + review_body: 'Average product, expected much more.', + groupId: '91Yb32830', + }, + context: {}, + rudderId: '553b5522-c575-40a7-8072-9741c5f9a647', + anonymousId: 'bf412108-0357-4330-b119-7305e767823c', + originalTimestamp: '2022-01-20T13:39:21.032Z', + }, + }, + ], + destType: 'stormly', }, - output: { - response: { - status: 200, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batched: false, + batchedRequest: { body: { - output: [ - { - "batched": false, - "batchedRequest": { - "body": { - "FORM": {}, - "JSON": { - "timestamp": "2022-01-20T13:39:21.032Z", - "traits": { - "age": 25, - "email": "johndoe@gmail.com", - "name": "John Doe" - }, - "userId": "5136633649" - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://rudderstack.t.stormly.com/webhook/rudderstack/identify", - "files": {}, - "headers": { - "Authorization": "Basic dummyApiKey", - "Content-Type": "application/json" - }, - "method": "POST", - "params": {}, - "type": "REST", - "version": "1" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey" - }, - "ID": "stormly123" - }, - "metadata": [ - { - "jobId": 1 - } - ], - "statusCode": 200 - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey" - }, - "ID": "stormly123" - }, - "batched": false, - "error": "Missing required value from \"userIdOnly\"", - "metadata": [ - { - "jobId": 2 - } - ], - "statTags": { - "destType": "STORMLY", - "errorCategory": "dataValidation", - "errorType": "instrumentation", - "feature": "router", - "implementation": "native", - "module": "destination", - }, - "statusCode": 400 - } - ], + FORM: {}, + JSON: { + timestamp: '2022-01-20T13:39:21.032Z', + traits: { + age: 25, + email: 'johndoe@gmail.com', + name: 'John Doe', + }, + userId: '5136633649', + }, + JSON_ARRAY: {}, + XML: {}, + }, + endpoint: 'https://rudderstack.t.stormly.com/webhook/rudderstack/identify', + files: {}, + headers: { + Authorization: 'Basic dummyApiKey', + 'Content-Type': 'application/json', + }, + method: 'POST', + params: {}, + type: 'REST', + version: '1', + }, + destination: { + Config: { + apiKey: 'dummyApiKey', + }, + ID: 'stormly123', + }, + metadata: [ + { + jobId: 1, + }, + ], + statusCode: 200, + }, + { + destination: { + Config: { + apiKey: 'dummyApiKey', + }, + ID: 'stormly123', + }, + batched: false, + error: 'Missing required value from "userIdOnly"', + metadata: [ + { + jobId: 2, }, + ], + statTags: { + destType: 'STORMLY', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'router', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, }, + ], }, - } + }, + }, + }, ]; From ca76297147f0a2c12d68d97dda95b9a44efe4020 Mon Sep 17 00:00:00 2001 From: Anant Jain <62471433+anantjain45823@users.noreply.github.com> Date: Fri, 22 Dec 2023 13:27:53 +0530 Subject: [PATCH 097/135] fix: tiktok add missing field brand (#2942) --- src/v0/destinations/tiktok_ads/util.js | 1 + test/integrations/destinations/tiktok_ads/processor/data.ts | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/v0/destinations/tiktok_ads/util.js b/src/v0/destinations/tiktok_ads/util.js index 4050a9fe34..dbc8b344fc 100644 --- a/src/v0/destinations/tiktok_ads/util.js +++ b/src/v0/destinations/tiktok_ads/util.js @@ -21,6 +21,7 @@ const getContents = (message) => { price: product.price, quantity: product.quantity, description: product.description, + brand: product.brand }; contents.push(removeUndefinedAndNullValues(singleProduct)); }); diff --git a/test/integrations/destinations/tiktok_ads/processor/data.ts b/test/integrations/destinations/tiktok_ads/processor/data.ts index 4a6a4bd812..76a4a1ca89 100644 --- a/test/integrations/destinations/tiktok_ads/processor/data.ts +++ b/test/integrations/destinations/tiktok_ads/processor/data.ts @@ -4541,6 +4541,7 @@ export const data = [ category: 'Games', url: 'https://www.website.com/product/path', image_url: 'https://www.website.com/product/path.jpg', + brand:"brand_name" }, { product_id: '345', @@ -4618,6 +4619,7 @@ export const data = [ content_name: 'Monopoly', price: 14, quantity: 1, + brand:"brand_name" }, { content_type: 'product_group', From 429ca719952e5b8a4b6bad2ef1a087575613e861 Mon Sep 17 00:00:00 2001 From: Anant Jain <62471433+anantjain45823@users.noreply.github.com> Date: Tue, 26 Dec 2023 11:24:55 +0530 Subject: [PATCH 098/135] feat: amplitude add support for unset (#2941) * feat: amplitude add support for unset * Update src/v0/destinations/am/transform.js Co-authored-by: Yashasvi Bajpai <33063622+yashasvibajpai@users.noreply.github.com> * Update src/v0/destinations/am/transform.js Co-authored-by: Yashasvi Bajpai <33063622+yashasvibajpai@users.noreply.github.com> * chore:comment addresed * Update transform.js * chore:comment addresed * chore: added docs * Update utils.js --------- Co-authored-by: Yashasvi Bajpai <33063622+yashasvibajpai@users.noreply.github.com> --- src/v0/destinations/am/transform.js | 11 +++- src/v0/destinations/am/util.test.js | 66 +++++++++++++++++++ src/v0/destinations/am/utils.js | 27 ++++++++ .../destinations/am/processor/data.ts | 14 +++- 4 files changed, 114 insertions(+), 4 deletions(-) create mode 100644 src/v0/destinations/am/util.test.js diff --git a/src/v0/destinations/am/transform.js b/src/v0/destinations/am/transform.js index 05a130d6e0..911ec51be0 100644 --- a/src/v0/destinations/am/transform.js +++ b/src/v0/destinations/am/transform.js @@ -297,6 +297,15 @@ const identifyBuilder = (message, destination, rawPayload) => { } }); } + // update identify call request with unset fields + // AM docs https://www.docs.developers.amplitude.com/analytics/apis/http-v2-api/#keys-for-the-event-argument:~:text=exceed%2040%20layers.-,user_properties,-Optional.%20Object.%20A + const unsetObject = AMUtils.getUnsetObj(message); + if (unsetObject) { + // Example unsetObject = { + // "testObj.del1": "-" + // } + set(rawPayload, `user_properties.$unset`, unsetObject); + } return rawPayload; }; @@ -334,7 +343,7 @@ const getResponseData = (evType, destination, rawPayload, message, groupInfo) => case EventType.IDENTIFY: // event_type for identify event is $identify rawPayload.event_type = IDENTIFY_AM; - identifyBuilder(message, destination, rawPayload); + rawPayload = identifyBuilder(message, destination, rawPayload); break; case EventType.GROUP: // event_type for identify event is $identify diff --git a/src/v0/destinations/am/util.test.js b/src/v0/destinations/am/util.test.js new file mode 100644 index 0000000000..faaa9170f0 --- /dev/null +++ b/src/v0/destinations/am/util.test.js @@ -0,0 +1,66 @@ +const { getUnsetObj } = require('./utils'); + +describe('getUnsetObj', () => { + it("should return undefined when 'message.integrations.Amplitude.fieldsToUnset' is not array", () => { + const message = { + integrations: { + Amplitude: { fieldsToUnset: 'field_name' }, + }, + }; + const result = getUnsetObj(message); + expect(result).toBeUndefined(); + }); + it("should return undefined when 'message.integrations.Amplitude.fieldsToUnset' is undefined", () => { + const message = { + integrations: { + Amplitude: {}, + }, + }; + const result = getUnsetObj(message); + expect(result).toBeUndefined(); + }); + + it("should return an empty objecty when 'message.integrations.Amplitude.fieldsToUnset' is an empty array", () => { + const message = { + integrations: { + Amplitude: { fieldsToUnset: [] }, + }, + }; + const result = getUnsetObj(message); + expect(result).toEqual({}); + }); + + it("should return an object with keys and values set to '-' when 'message.integrations.Amplitude.fieldsToUnset' is an array of strings", () => { + const message = { + integrations: { + Amplitude: { fieldsToUnset: ['Unset1', 'Unset2'] }, + }, + }; + const result = getUnsetObj(message); + expect(result).toEqual({ + Unset1: '-', + Unset2: '-', + }); + }); + + it("should handle missing 'message' parameter", () => { + const result = getUnsetObj(); + expect(result).toBeUndefined(); + }); + + // Should handle missing 'integrations' property in 'message' parameter + it("should handle missing 'integrations' property in 'message' parameter", () => { + const message = {}; + const result = getUnsetObj(message); + expect(result).toBeUndefined(); + }); + + // Should handle missing 'Amplitude' property in 'message.integrations' parameter + it("should handle missing 'Amplitude' property in 'message.integrations' parameter", () => { + const message = { + integrations: {}, + }; + const result = getUnsetObj(message); + expect(result).toBeUndefined(); + }); +}); diff --git a/src/v0/destinations/am/utils.js b/src/v0/destinations/am/utils.js index b9925c20d8..71fe0ab459 100644 --- a/src/v0/destinations/am/utils.js +++ b/src/v0/destinations/am/utils.js @@ -82,6 +82,32 @@ const getEventId = (payload, sourceKey) => { return undefined; }; +/** + * generates the unsetObject and returns it + * @param {*} message + * @returns + * + * Example message = { + integrations: { + Amplitude: { fieldsToUnset: ['Unset1', 'Unset2'] }, + All: true, + }, + }; + return unsetObj = { + "Unset1": "-", + "Unset2": "-" + } + AM docs: https://www.docs.developers.amplitude.com/analytics/apis/http-v2-api/#keys-for-the-event-argument:~:text=exceed%2040%20layers.-,user_properties,-Optional.%20Object.%20A + */ +const getUnsetObj = (message) => { + const fieldsToUnset = get(message, 'integrations.Amplitude.fieldsToUnset'); + let unsetObject; + if (Array.isArray(fieldsToUnset)) { + unsetObject = Object.fromEntries(fieldsToUnset.map((field) => [field, '-'])); + } + + return unsetObject; +}; module.exports = { getOSName, getOSVersion, @@ -90,4 +116,5 @@ module.exports = { getPlatform, getBrand, getEventId, + getUnsetObj, }; diff --git a/test/integrations/destinations/am/processor/data.ts b/test/integrations/destinations/am/processor/data.ts index 5e941e07f8..f28606da0c 100644 --- a/test/integrations/destinations/am/processor/data.ts +++ b/test/integrations/destinations/am/processor/data.ts @@ -488,6 +488,10 @@ export const data = [ { message: { channel: 'web', + integrations: { + Amplitude: { fieldsToUnset: ['email'] }, + All: true, + }, context: { externalId: [ { @@ -562,9 +566,6 @@ export const data = [ originalTimestamp: '2019-10-14T09:03:17.562Z', anonymousId: '123456', userId: '123456', - integrations: { - All: true, - }, sentAt: '2019-10-14T09:03:22.563Z', }, metadata: { @@ -616,6 +617,9 @@ export const data = [ insert_id: '84e26acc-56a5-4835-8233-591137fca468', ip: '0.0.0.0', user_properties: { + $unset: { + email: '-', + }, initial_referrer: 'https://docs.rudderstack.com', initial_referring_domain: 'docs.rudderstack.com', anonymousId: '123456', @@ -743,6 +747,7 @@ export const data = [ anonymousId: '123456', userId: '123456', integrations: { + Amplitude: { fieldsToUnset: ['testObj.unsetField1'] }, All: true, }, sentAt: '2019-10-14T09:03:22.563Z', @@ -791,6 +796,9 @@ export const data = [ insert_id: '84e26acc-56a5-4835-8233-591137fca468', ip: '0.0.0.0', user_properties: { + $unset: { + 'testObj.unsetField1': '-', + }, initial_referrer: 'https://docs.rudderstack.com', initial_referring_domain: 'docs.rudderstack.com', anonymousId: '123456', From 511741ed356b365f52e0335ce6a1fc953ccbc465 Mon Sep 17 00:00:00 2001 From: Sandeep Digumarty Date: Wed, 27 Dec 2023 01:54:36 +0530 Subject: [PATCH 099/135] fix: send empty string instead of null when the schema data is undefined (#2955) --- .../destinations/fb_custom_audience/util.js | 10 +++++----- .../fb_custom_audience/processor/data.ts | 6 +++--- .../fb_custom_audience/router/data.ts | 20 +++++++++---------- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/v0/destinations/fb_custom_audience/util.js b/src/v0/destinations/fb_custom_audience/util.js index 47ccb9bf7d..6c53ed2814 100644 --- a/src/v0/destinations/fb_custom_audience/util.js +++ b/src/v0/destinations/fb_custom_audience/util.js @@ -131,21 +131,21 @@ const getUpdatedDataElement = (dataElement, isHashRequired, eachProperty, update /** * hash the original value for the properties apart from 'MADID' && 'EXTERN_ID as hashing is not required for them * ref: https://developers.facebook.com/docs/marketing-api/audiences/guides/custom-audiences#hash - * sending null values for the properties for which user hasn't provided any value + * sending empty string for the properties for which user hasn't provided any value */ if (isHashRequired && eachProperty !== 'MADID' && eachProperty !== 'EXTERN_ID') { if (tmpUpdatedProperty) { tmpUpdatedProperty = `${tmpUpdatedProperty}`; dataElement.push(sha256(tmpUpdatedProperty)); } else { - dataElement.push(null); + dataElement.push(''); } } - // if property name is MADID or EXTERN_ID if the value is undefined send null + // if property name is MADID or EXTERN_ID if the value is undefined send empty string else if (!tmpUpdatedProperty && (eachProperty === 'MADID' || eachProperty === 'EXTERN_ID')) { - dataElement.push(null); + dataElement.push(''); } else { - dataElement.push(tmpUpdatedProperty); + dataElement.push(tmpUpdatedProperty || ''); } return dataElement; }; diff --git a/test/integrations/destinations/fb_custom_audience/processor/data.ts b/test/integrations/destinations/fb_custom_audience/processor/data.ts index 4f892f6fef..267b966865 100644 --- a/test/integrations/destinations/fb_custom_audience/processor/data.ts +++ b/test/integrations/destinations/fb_custom_audience/processor/data.ts @@ -1987,7 +1987,7 @@ export const data = [ 'a953f09a1b6b6725b81956e9ad0b1eb49e3ad40004c04307ef8af6246a054116', '3fdba35f04dc8c462986c992bcf875546257113072a909c162f7e470e581e278', '7931aa2a1bed855457d1ddf6bc06ab4406a9fba0579045a4d6ff78f9c07c440f', - null, + '', '252f10c83610ebca1a059c0bae8255eba2f95be4d1d7bcfa89d7248a82d9f111', 'db0683221aebc02cc034b65ebcf7d1bddd1eb199e33fd23a31931947d13a11bc', 'abc', @@ -2123,7 +2123,7 @@ export const data = [ 'ST', 'COUNTRY', ], - data: [[null, null, null, null, null, null, null, null, null, null, null]], + data: [['', '', '', '', '', '', '', '', '', '', '']], }, }, body: { @@ -2256,7 +2256,7 @@ export const data = [ 'a953f09a1b6b6725b81956e9ad0b1eb49e3ad40004c04307ef8af6246a054116', '3fdba35f04dc8c462986c992bcf875546257113072a909c162f7e470e581e278', '7931aa2a1bed855457d1ddf6bc06ab4406a9fba0579045a4d6ff78f9c07c440f', - null, + '', '252f10c83610ebca1a059c0bae8255eba2f95be4d1d7bcfa89d7248a82d9f111', 'db0683221aebc02cc034b65ebcf7d1bddd1eb199e33fd23a31931947d13a11bc', 'abc', diff --git a/test/integrations/destinations/fb_custom_audience/router/data.ts b/test/integrations/destinations/fb_custom_audience/router/data.ts index efefb80a89..fd099fe33c 100644 --- a/test/integrations/destinations/fb_custom_audience/router/data.ts +++ b/test/integrations/destinations/fb_custom_audience/router/data.ts @@ -26757,16 +26757,16 @@ export const data = [ payload: { schema: ['EMAIL', 'FN'], data: [ - ['7625cab24612c37df6d2f724721bb38a25095d0295e29b807238ee188b8aca43', null], - ['b2b4abadd72190af54305c0d3abf1977fec4935016bb13ff28040d5712318dfd', null], - ['c4b007d1c3c9a5d31bd4082237a913e8e0db1767225c2a5ef33be2716df005fa', null], - ['94639be1bd9f17c05820164e9d71ef78558f117a9e8bfab43cf8015e08aa0b27', null], - ['39b456cfb4bb07f9e6bb18698aa173171ca49c731fccc4790e9ecea808d24ae6', null], - ['769f73387add781a481ca08300008a08fb2f1816aaed196137efc2e05976d711', null], - ['48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08', null], - ['da2d431121cd10578fd81f8f80344b06db59ea2d05a7b5d27536c8789ddae8f0', null], - ['b100c2ec0718fe6b4805b623aeec6710719d042ceea55f5c8135b010ec1c7b36', null], - ['0c1d1b0ba547a742013366d6fbc8f71dd77f566d94e41ed9f828a74b96928161', null], + ['7625cab24612c37df6d2f724721bb38a25095d0295e29b807238ee188b8aca43', ''], + ['b2b4abadd72190af54305c0d3abf1977fec4935016bb13ff28040d5712318dfd', ''], + ['c4b007d1c3c9a5d31bd4082237a913e8e0db1767225c2a5ef33be2716df005fa', ''], + ['94639be1bd9f17c05820164e9d71ef78558f117a9e8bfab43cf8015e08aa0b27', ''], + ['39b456cfb4bb07f9e6bb18698aa173171ca49c731fccc4790e9ecea808d24ae6', ''], + ['769f73387add781a481ca08300008a08fb2f1816aaed196137efc2e05976d711', ''], + ['48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08', ''], + ['da2d431121cd10578fd81f8f80344b06db59ea2d05a7b5d27536c8789ddae8f0', ''], + ['b100c2ec0718fe6b4805b623aeec6710719d042ceea55f5c8135b010ec1c7b36', ''], + ['0c1d1b0ba547a742013366d6fbc8f71dd77f566d94e41ed9f828a74b96928161', ''], ], }, }, From 551c44d14a646e1534cd12d3b5deef4d0c601cf2 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Wed, 27 Dec 2023 07:11:13 +0000 Subject: [PATCH 100/135] chore(release): 1.52.4 --- CHANGELOG.md | 7 +++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f6bca95652..8933728ccf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [1.52.4](https://github.com/rudderlabs/rudder-transformer/compare/v1.52.3...v1.52.4) (2023-12-27) + + +### Bug Fixes + +* send empty string instead of null when the schema data is undefined ([#2955](https://github.com/rudderlabs/rudder-transformer/issues/2955)) ([511741e](https://github.com/rudderlabs/rudder-transformer/commit/511741ed356b365f52e0335ce6a1fc953ccbc465)) + ### [1.52.3](https://github.com/rudderlabs/rudder-transformer/compare/v1.52.2...v1.52.3) (2023-12-18) diff --git a/package-lock.json b/package-lock.json index 573993a1a6..552802d3be 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "rudder-transformer", - "version": "1.52.3", + "version": "1.52.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "rudder-transformer", - "version": "1.52.3", + "version": "1.52.4", "license": "ISC", "dependencies": { "@amplitude/ua-parser-js": "^0.7.24", diff --git a/package.json b/package.json index e8259c96e6..b80b5be2c6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rudder-transformer", - "version": "1.52.3", + "version": "1.52.4", "description": "", "homepage": "https://github.com/rudderlabs/rudder-transformer#readme", "bugs": { From efca60cd0f337d261ae96e1f5c400f0ddb0d5bba Mon Sep 17 00:00:00 2001 From: Dilip Kola <33080863+koladilip@users.noreply.github.com> Date: Wed, 27 Dec 2023 13:16:39 +0530 Subject: [PATCH 101/135] chore: upgrade node to 18.19 (#2940) * chore: upgrade node to 18.19 * fix: image name --------- Co-authored-by: Yashasvi Bajpai <33063622+yashasvibajpai@users.noreply.github.com> --- .nvmrc | 2 +- Dockerfile | 2 +- package-lock.json | 35 ----------------------------------- 3 files changed, 2 insertions(+), 37 deletions(-) diff --git a/.nvmrc b/.nvmrc index 6d80269a4f..a9d087399d 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -18.16.0 +18.19.0 diff --git a/Dockerfile b/Dockerfile index a568ce95c7..6bd03c9515 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # syntax=docker/dockerfile:1.4 -FROM node:18.17-alpine3.17 AS base +FROM node:18.19.0-alpine3.18 AS base ENV HUSKY 0 RUN apk update diff --git a/package-lock.json b/package-lock.json index 3fd630c9ec..76e90faf57 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3710,41 +3710,6 @@ "tslib": "^2.6.2" } }, - "node_modules/@rudderstack/workflow-engine/node_modules/@smithy/is-array-buffer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.0.0.tgz", - "integrity": "sha512-z3PjFjMyZNI98JFRJi/U0nGoLWMSJlDjAW4QUX2WNZLas5C0CmVV6LJ01JI0k90l7FvpmixjWxPFmENSClQ7ug==", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@rudderstack/workflow-engine/node_modules/@smithy/util-buffer-from": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.0.0.tgz", - "integrity": "sha512-/YNnLoHsR+4W4Vf2wL5lGv0ksg8Bmk3GEGxn2vEQt52AQaPSCuaO5PM5VM7lP1K9qHRKHwrPGktqVoAHKWHxzw==", - "dependencies": { - "@smithy/is-array-buffer": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@rudderstack/workflow-engine/node_modules/@smithy/util-utf8": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.0.0.tgz", - "integrity": "sha512-rctU1VkziY84n5OXe3bPNpKR001ZCME2JCaBBFgtiM2hfKbHFudc/BkMuPab8hRbLd0j3vbnBTTZ1igBf0wgiQ==", - "dependencies": { - "@smithy/util-buffer-from": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, "node_modules/@sideway/address": { "version": "4.1.4", "license": "BSD-3-Clause", From 4e1a200516bd4b9ae42f2bea09ff196b4dede6f9 Mon Sep 17 00:00:00 2001 From: Yashasvi Bajpai <33063622+yashasvibajpai@users.noreply.github.com> Date: Wed, 27 Dec 2023 21:32:43 +0530 Subject: [PATCH 102/135] chore: update pr template (#2956) * chore: update pr template * chore: address comments * Update .github/pull_request_template.md Co-authored-by: Krishna Chaitanya * Update .github/pull_request_template.md Co-authored-by: Krishna Chaitanya * chore: updated checklist * chore: fix linear, heading --------- Co-authored-by: Krishna Chaitanya --- .github/pull_request_template.md | 34 ++++++++++++++------------------ 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 5b716b7e9f..fe308ce8b9 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -2,21 +2,15 @@ Write a brief explainer on your code changes. -## Please explain the objectives of your changes below - -Put down any required details on the broader aspect of your changes. If there are any dependent changes, **mandatorily** mention them here - -### Type of change +## What is the related Linear task? -If the pull request is a **bug-fix**, **enhancement** or a **refactor**, please fill in the details on the changes made. +Resolves INT-XXX -- Existing capabilities/behavior - -- New capabilities/behavior +## Please explain the objectives of your changes below -If the pull request is a **new feature**, +Put down any required details on the broader aspect of your changes. If there are any dependent changes, **mandatorily** mention them here -### Any technical or performance related pointers to consider with the change? +### Any changes to existing capabilities/behaviour, mention the reason & what are the changes ? N/A @@ -28,11 +22,7 @@ N/A N/A -### If the PR has changes in more than 10 files, please mention why the changes were not split into multiple PRs. - -N/A - -### If multiple linear tasks are associated with the PR changes, please elaborate on the reason: +### Any technical or performance related pointers to consider with the change? N/A @@ -40,13 +30,19 @@ N/A ### Developer checklist +- [ ] My code follows the style guidelines of this project + - [ ] **No breaking changes are being introduced.** -- [ ] Are all related docs linked with the PR? +- [ ] All related docs linked with the PR? + +- [ ] All changes manually tested? + +- [ ] Any documentation changes needed with this change? -- [ ] Are all changes manually tested? +- [ ] Is the PR limited to 10 file changes? -- [ ] Does this change require any documentation changes? +- [ ] Is the PR limited to one linear task? - [ ] Are relevant unit and component test-cases added? From 970d37d6a3e4196c284513dd56f5405b0f3f2821 Mon Sep 17 00:00:00 2001 From: AASHISH MALIK Date: Tue, 2 Jan 2024 19:34:09 +0530 Subject: [PATCH 103/135] feat: pass ip details for factorsAI (#2925) --- .../factorsai/data/FactorsAIGroupConfig.json | 5 + .../data/FactorsAIIdentifyConfig.json | 5 + .../factorsai/data/FactorsAITrackConfig.json | 5 + src/v0/destinations/factorsai/transform.js | 17 +- .../destinations/factorsai/data.ts | 270 ++++++++++++++++++ 5 files changed, 299 insertions(+), 3 deletions(-) diff --git a/src/v0/destinations/factorsai/data/FactorsAIGroupConfig.json b/src/v0/destinations/factorsai/data/FactorsAIGroupConfig.json index f5f78e71e4..d581f56070 100644 --- a/src/v0/destinations/factorsai/data/FactorsAIGroupConfig.json +++ b/src/v0/destinations/factorsai/data/FactorsAIGroupConfig.json @@ -34,5 +34,10 @@ "destKey": "email", "sourceKeys": "email", "required": false + }, + { + "sourceKeys": "context", + "destKey": "context", + "required": false } ] diff --git a/src/v0/destinations/factorsai/data/FactorsAIIdentifyConfig.json b/src/v0/destinations/factorsai/data/FactorsAIIdentifyConfig.json index 9a08c382d4..b34cd2147e 100644 --- a/src/v0/destinations/factorsai/data/FactorsAIIdentifyConfig.json +++ b/src/v0/destinations/factorsai/data/FactorsAIIdentifyConfig.json @@ -34,5 +34,10 @@ "destKey": "channel", "sourceKeys": "channel", "required": false + }, + { + "sourceKeys": "context", + "destKey": "context", + "required": false } ] diff --git a/src/v0/destinations/factorsai/data/FactorsAITrackConfig.json b/src/v0/destinations/factorsai/data/FactorsAITrackConfig.json index ccb9686c29..67df67fc76 100644 --- a/src/v0/destinations/factorsai/data/FactorsAITrackConfig.json +++ b/src/v0/destinations/factorsai/data/FactorsAITrackConfig.json @@ -44,5 +44,10 @@ "destKey": "channel", "sourceKeys": "channel", "required": false + }, + { + "sourceKeys": "context", + "destKey": "context", + "required": false } ] diff --git a/src/v0/destinations/factorsai/transform.js b/src/v0/destinations/factorsai/transform.js index 9824b73bbf..9fbfc926f7 100644 --- a/src/v0/destinations/factorsai/transform.js +++ b/src/v0/destinations/factorsai/transform.js @@ -13,6 +13,14 @@ const { JSON_MIME_TYPE } = require('../../util/constant'); const { ConfigCategories, mappingConfig, BASE_URL } = require('./config'); +function populateIpDetails(requestJson, message) { + const payload = requestJson; + if (message.context || message.request_ip) { + payload.context = { ...(payload.context || {}), ip: message.context?.ip || message.request_ip }; + } + return payload; +} + // build final response function buildResponse(payload, factorsAIApiKey) { const response = defaultRequestConfig(); @@ -29,13 +37,15 @@ function buildResponse(payload, factorsAIApiKey) { // process identify call function processIdentify(message, factorsAIApiKey) { - const requestJson = constructPayload(message, mappingConfig[ConfigCategories.IDENTIFY.name]); + let requestJson = constructPayload(message, mappingConfig[ConfigCategories.IDENTIFY.name]); + requestJson = populateIpDetails(requestJson, message); return buildResponse(requestJson, factorsAIApiKey); } // process track call function processTrack(message, factorsAIApiKey) { - const requestJson = constructPayload(message, mappingConfig[ConfigCategories.TRACK.name]); + let requestJson = constructPayload(message, mappingConfig[ConfigCategories.TRACK.name]); + requestJson = populateIpDetails(requestJson, message); // flatten json as factorsAi do not support nested properties requestJson.properties = flattenJson(requestJson.properties); return buildResponse(requestJson, factorsAIApiKey); @@ -43,7 +53,8 @@ function processTrack(message, factorsAIApiKey) { // process Page Call function processPageAndGroup(message, factorsAIApiKey, category) { - const requestJson = constructPayload(message, mappingConfig[category]); + let requestJson = constructPayload(message, mappingConfig[category]); + requestJson = populateIpDetails(requestJson, message); requestJson.type = message.type; return buildResponse(requestJson, factorsAIApiKey); } diff --git a/test/integrations/destinations/factorsai/data.ts b/test/integrations/destinations/factorsai/data.ts index fb0a76bf34..be13c291f4 100644 --- a/test/integrations/destinations/factorsai/data.ts +++ b/test/integrations/destinations/factorsai/data.ts @@ -308,6 +308,9 @@ export const data = [ XML: {}, FORM: {}, JSON: { + context: { + ip: '8.8.8.8', + }, type: 'identify', traits: { age: 27, @@ -540,4 +543,271 @@ export const data = [ }, }, }, + { + name: 'factorsai', + description: 'IP fetched from request_ip', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + factorsAIApiKey: 'sdgerghsdfhsdhsdh432141dfgdfsg', + }, + }, + message: { + context: { + page: { + url: 'myurl', + path: '/workspace/index.html', + title: 'test track', + search: '?s=ek8reb577tu65kfc2fv41fbm3j', + referrer: '$direct', + initial_referrer: '$direct', + referring_domain: '', + initial_referring_domain: '', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36', + }, + event: 'finalPageTest', + properties: { + title: 'Intro to Test final segemt context page added context last', + }, + userId: 'PageTestAnonymousUser', + type: 'track', + messageId: '3c0abc14-96a2-4aed-9dfc-ee463832cc24', + originalTimestamp: '2022-10-17T15:32:44.202+05:30', + request_ip: '104.205.211.60', + }, + }, + ], + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + FORM: {}, + JSON: { + type: 'track', + event: 'finalPageTest', + context: { + ip: '104.205.211.60', + page: { + url: 'myurl', + path: '/workspace/index.html', + title: 'test track', + search: '?s=ek8reb577tu65kfc2fv41fbm3j', + referrer: '$direct', + initial_referrer: '$direct', + referring_domain: '', + initial_referring_domain: '', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36', + }, + messageId: '3c0abc14-96a2-4aed-9dfc-ee463832cc24', + timestamp: '2022-10-17T15:32:44.202+05:30', + properties: { + title: 'Intro to Test final segemt context page added context last', + }, + userId: 'PageTestAnonymousUser', + }, + JSON_ARRAY: {}, + }, + type: 'REST', + files: {}, + userId: '', + method: 'POST', + params: {}, + headers: { + 'Content-Type': 'application/json', + Authorization: 'Basic c2RnZXJnaHNkZmhzZGhzZGg0MzIxNDFkZmdkZnNnOg==', + }, + version: '1', + endpoint: 'https://api.factors.ai/integrations/rudderstack_platform', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'factorsai', + description: 'IP fetched from request_ip', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + factorsAIApiKey: 'sdgerghsdfhsdhsdh432141dfgdfsg', + }, + }, + message: { + context: { + locale: 'en-US', + screen: { + density: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + }, + event: 'finalPageTest', + properties: { + title: 'Intro to Test final segemt context page added context last', + }, + userId: 'PageTestAnonymousUser', + type: 'track', + messageId: '3c0abc14-96a2-4aed-9dfc-ee463832cc24', + originalTimestamp: '2022-10-17T15:32:44.202+05:30', + request_ip: '0.0.0.0', + }, + }, + ], + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + FORM: {}, + JSON: { + type: 'track', + event: 'finalPageTest', + context: { + ip: '0.0.0.0', + locale: 'en-US', + screen: { + density: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + }, + messageId: '3c0abc14-96a2-4aed-9dfc-ee463832cc24', + timestamp: '2022-10-17T15:32:44.202+05:30', + properties: { + title: 'Intro to Test final segemt context page added context last', + }, + userId: 'PageTestAnonymousUser', + }, + JSON_ARRAY: {}, + }, + type: 'REST', + files: {}, + userId: '', + method: 'POST', + params: {}, + headers: { + 'Content-Type': 'application/json', + Authorization: 'Basic c2RnZXJnaHNkZmhzZGhzZGg0MzIxNDFkZmdkZnNnOg==', + }, + version: '1', + endpoint: 'https://api.factors.ai/integrations/rudderstack_platform', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'factorsai', + description: 'IP fetched from request_ip withput context in payload', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + factorsAIApiKey: 'sdgerghsdfhsdhsdh432141dfgdfsg', + }, + }, + message: { + event: 'finalPageTest', + properties: { + title: 'Intro to Test final segemt context page added context last', + }, + userId: 'PageTestAnonymousUser', + type: 'track', + messageId: '3c0abc14-96a2-4aed-9dfc-ee463832cc24', + originalTimestamp: '2022-10-17T15:32:44.202+05:30', + request_ip: '1.1.1.1', + }, + }, + ], + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + FORM: {}, + JSON: { + type: 'track', + event: 'finalPageTest', + context: { + ip: '1.1.1.1', + }, + messageId: '3c0abc14-96a2-4aed-9dfc-ee463832cc24', + timestamp: '2022-10-17T15:32:44.202+05:30', + properties: { + title: 'Intro to Test final segemt context page added context last', + }, + userId: 'PageTestAnonymousUser', + }, + JSON_ARRAY: {}, + }, + type: 'REST', + files: {}, + userId: '', + method: 'POST', + params: {}, + headers: { + 'Content-Type': 'application/json', + Authorization: 'Basic c2RnZXJnaHNkZmhzZGhzZGg0MzIxNDFkZmdkZnNnOg==', + }, + version: '1', + endpoint: 'https://api.factors.ai/integrations/rudderstack_platform', + }, + statusCode: 200, + }, + ], + }, + }, + }, ]; From 7d734f06df75d198f8440a953ce089631af15a8b Mon Sep 17 00:00:00 2001 From: Sandeep Digumarty Date: Wed, 3 Jan 2024 11:46:21 +0530 Subject: [PATCH 104/135] feat: handle improper type validation sync vulnerability (#2937) * feat: handle improper type validation sync vulnerability * feat: addressed review comments --- src/controllers/bulkUpload.ts | 10 +++++----- src/util/types.ts | 3 +++ .../networkHandler.js | 8 +++++--- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/controllers/bulkUpload.ts b/src/controllers/bulkUpload.ts index 85c4fe6b4f..babb8b6db1 100644 --- a/src/controllers/bulkUpload.ts +++ b/src/controllers/bulkUpload.ts @@ -1,7 +1,7 @@ /* eslint-disable global-require, import/no-dynamic-require, @typescript-eslint/no-unused-vars */ import { client as errNotificationClient } from '../util/errorNotifier'; import logger from '../logger'; -import { CatchErr } from '../util/types'; +import { CatchErr, ContextBodySimple } from '../util/types'; // TODO: To be refactored and redisgned const getDestFileUploadHandler = (version, dest) => @@ -45,7 +45,7 @@ export const fileUpload = async (ctx) => { return {}; }; - const { destType } = ctx.request.body; + const { destType }: ContextBodySimple = ctx.request.body; const destFileUploadHandler = getDestFileUploadHandler('v0', destType.toLowerCase()); if (!destFileUploadHandler || !destFileUploadHandler.processFileData) { @@ -82,7 +82,7 @@ export const pollStatus = async (ctx) => { JSON.stringify(ctx.request.body), ); - const { destType } = ctx.request.body; + const { destType }: ContextBodySimple = ctx.request.body; const destFileUploadHandler = getPollStatusHandler('v0', destType.toLowerCase()); let response; if (!destFileUploadHandler || !destFileUploadHandler.processPolling) { @@ -117,7 +117,7 @@ export const getWarnJobStatus = async (ctx) => { JSON.stringify(ctx.request.body), ); - const { destType } = ctx.request.body; + const { destType }: ContextBodySimple = ctx.request.body; const destFileUploadHandler = getJobStatusHandler('v0', destType.toLowerCase()); if (!destFileUploadHandler || !destFileUploadHandler.processJobStatus) { @@ -153,7 +153,7 @@ export const getFailedJobStatus = async (ctx) => { JSON.stringify(ctx.request.body), ); - const { destType } = ctx.request.body; + const { destType }: ContextBodySimple = ctx.request.body; const destFileUploadHandler = getJobStatusHandler('v0', destType.toLowerCase()); if (!destFileUploadHandler || !destFileUploadHandler.processJobStatus) { diff --git a/src/util/types.ts b/src/util/types.ts index 579c35579c..bd2836d710 100644 --- a/src/util/types.ts +++ b/src/util/types.ts @@ -3,6 +3,9 @@ export type FixMe = any; export type CatchErr = any; +export type ContextBodySimple = { + destType: string; +}; export interface Config { cdkEnabled?: boolean; cdkV2Enabled?: boolean; diff --git a/src/v0/destinations/google_adwords_offline_conversions/networkHandler.js b/src/v0/destinations/google_adwords_offline_conversions/networkHandler.js index a87a2431f2..cd891d9688 100644 --- a/src/v0/destinations/google_adwords_offline_conversions/networkHandler.js +++ b/src/v0/destinations/google_adwords_offline_conversions/networkHandler.js @@ -190,9 +190,11 @@ const ProxyRequest = async (request) => { const addPayload = body.JSON.addConversionPayload; // Mapping Conversion Action const conversionId = await getConversionActionId(headers, params); - addPayload.operations.forEach((operation) => { - set(operation, 'create.transaction_attribute.conversion_action', conversionId); - }); + if (Array.isArray(addPayload.operations)) { + addPayload.operations.forEach((operation) => { + set(operation, 'create.transaction_attribute.conversion_action', conversionId); + }); + } await addConversionToJob(endpoint, headers, firstResponse, addPayload); const thirdResponse = await runTheJob( endpoint, From 48e40365de6d45c40b25b0af3373504bfd5368bd Mon Sep 17 00:00:00 2001 From: Mihir Bhalala <77438541+mihir-4116@users.noreply.github.com> Date: Wed, 3 Jan 2024 13:34:32 +0530 Subject: [PATCH 105/135] feat: move intercom to routerTransform (#2964) --- src/features.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/features.json b/src/features.json index a3d29bb325..606590459c 100644 --- a/src/features.json +++ b/src/features.json @@ -63,7 +63,8 @@ "GLADLY": true, "ONE_SIGNAL": true, "TIKTOK_AUDIENCE": true, - "REDDIT": true + "REDDIT": true, + "INTERCOM": true }, "supportSourceTransformV1": true, "supportTransformerProxyV1": false From 8a245a21c450958595aa660b9051ed3b21bc986c Mon Sep 17 00:00:00 2001 From: Yashasvi Bajpai <33063622+yashasvibajpai@users.noreply.github.com> Date: Wed, 3 Jan 2024 13:52:17 +0530 Subject: [PATCH 106/135] chore: add endpoint labels (#2944) * chore: add endpoint labelsx1 * chore: add endpoint labelsx2 * Update src/v0/destinations/active_campaign/transform.js Co-authored-by: Sudip Paul <67197965+ItsSudip@users.noreply.github.com> * Update src/v0/destinations/active_campaign/transform.js Co-authored-by: Sankeerth * chore: fix monday path --------- Co-authored-by: Sudip Paul <67197965+ItsSudip@users.noreply.github.com> Co-authored-by: Sankeerth --- .../destinations/active_campaign/transform.js | 28 +++++++++++-------- src/v0/destinations/af/deleteUsers.js | 1 + src/v0/destinations/am/deleteUsers.js | 2 ++ src/v0/destinations/ga/deleteUsers.js | 1 + .../networkHandler.js | 2 ++ .../networkHandler.js | 4 +++ .../utils.js | 1 + .../networkHandler.js | 3 ++ src/v0/destinations/intercom/deleteUsers.js | 1 + src/v0/destinations/marketo/util.js | 1 + src/v0/destinations/monday/util.js | 1 + 11 files changed, 33 insertions(+), 12 deletions(-) diff --git a/src/v0/destinations/active_campaign/transform.js b/src/v0/destinations/active_campaign/transform.js index 70caf47ea8..90e6b2080f 100644 --- a/src/v0/destinations/active_campaign/transform.js +++ b/src/v0/destinations/active_campaign/transform.js @@ -50,7 +50,8 @@ const responseBuilderSimple = (payload, category, destination) => { }; const syncContact = async (contactPayload, category, destination) => { - const endpoint = `${destination.Config.apiUrl}${category.endPoint}`; + const { endPoint } = category; + const endpoint = `${destination.Config.apiUrl}${endPoint}`; const requestData = { contact: contactPayload, }; @@ -60,6 +61,7 @@ const syncContact = async (contactPayload, category, destination) => { const res = await httpPOST(endpoint, requestData, requestOptions, { destType: 'active_campaign', feature: 'transformation', + endpointPath: endPoint, }); if (res.success === false) { errorHandler(res, 'Failed to create new contact'); @@ -78,6 +80,7 @@ const customTagProcessor = async (message, category, destination, contactId) => let endpoint; let requestOptions; let requestData; + const { tagEndPoint, mergeTagWithContactUrl } = category; // Here we extract the tags which are to be mapped to the created contact from the message const msgTags = get(message?.context?.traits, 'tags') || get(message?.traits, 'tags'); @@ -89,13 +92,14 @@ const customTagProcessor = async (message, category, destination, contactId) => // Step - 1 // Fetch already created tags from dest, so that we avoid duplicate tag creation request // Ref - https://developers.activecampaign.com/reference/retrieve-all-tags - endpoint = `${destination.Config.apiUrl}${`${category.tagEndPoint}?limit=100`}`; + endpoint = `${destination.Config.apiUrl}${`${tagEndPoint}?limit=100`}`; requestOptions = { headers: getHeader(destination), }; res = await httpGET(endpoint, requestOptions, { destType: 'active_campaign', feature: 'transformation', + tagEndPoint, }); if (res.success === false) { errorHandler(res, 'Failed to fetch already created tags'); @@ -117,9 +121,7 @@ const customTagProcessor = async (message, category, destination, contactId) => if (parseInt(get(res, TOTAL_RECORDS_KEY), 10) > 100) { const limit = Math.floor(parseInt(get(res, TOTAL_RECORDS_KEY), 10) / 100); for (let i = 0; i < limit; i += 1) { - endpoint = `${destination.Config.apiUrl}${category.tagEndPoint}?limit=100&offset=${ - 100 * (i + 1) - }`; + endpoint = `${destination.Config.apiUrl}${tagEndPoint}?limit=100&offset=${100 * (i + 1)}`; requestOptions = { headers: getHeader(destination), }; @@ -153,7 +155,7 @@ const customTagProcessor = async (message, category, destination, contactId) => if (tagsToBeCreated.length > 0) { await Promise.all( tagsToBeCreated.map(async (tag) => { - endpoint = `${destination.Config.apiUrl}${category.tagEndPoint}`; + endpoint = `${destination.Config.apiUrl}${tagEndPoint}`; requestData = { tag: { tag, @@ -182,7 +184,7 @@ const customTagProcessor = async (message, category, destination, contactId) => // Ref - https://developers.activecampaign.com/reference/create-contact-tag const responsesArr = await Promise.all( tagIds.map(async (tagId) => { - endpoint = `${destination.Config.apiUrl}${category.mergeTagWithContactUrl}`; + endpoint = `${destination.Config.apiUrl}${mergeTagWithContactUrl}`; requestData = { contactTag: { contact: contactId, @@ -207,6 +209,7 @@ const customTagProcessor = async (message, category, destination, contactId) => const customFieldProcessor = async (message, category, destination) => { const responseStaging = []; + const { fieldEndPoint } = category; // Step - 1 // Extract the custom field info from the message const fieldInfo = get(message?.context?.traits, 'fieldInfo') || get(message.traits, 'fieldInfo'); @@ -219,7 +222,7 @@ const customFieldProcessor = async (message, category, destination) => { // Step - 2 // Get the existing field data from dest and store it in responseStaging // Ref - https://developers.activecampaign.com/reference/retrieve-fields - let endpoint = `${destination.Config.apiUrl}${category.fieldEndPoint}?limit=100`; + let endpoint = `${destination.Config.apiUrl}${fieldEndPoint}?limit=100`; const requestOptions = { headers: { 'Api-Token': destination.Config.apiKey, @@ -228,6 +231,7 @@ const customFieldProcessor = async (message, category, destination) => { const res = await httpGET(endpoint, requestOptions, { destType: 'active_campaign', feature: 'transformation', + fieldEndPoint, }); if (res.success === false) { errorHandler(res, 'Failed to get existing field data'); @@ -238,9 +242,7 @@ const customFieldProcessor = async (message, category, destination) => { const limit = Math.floor(parseInt(get(res, TOTAL_RECORDS_KEY), 10) / 100); if (parseInt(get(res, TOTAL_RECORDS_KEY), 10) > 100) { for (let i = 0; i < limit; i += 1) { - endpoint = `${destination.Config.apiUrl}${category.fieldEndPoint}?limit=100&offset=${ - 100 * (i + 1) - }`; + endpoint = `${destination.Config.apiUrl}${fieldEndPoint}?limit=100&offset=${100 * (i + 1)}`; const requestOpt = { headers: { 'Api-Token': destination.Config.apiKey, @@ -308,6 +310,7 @@ const customFieldProcessor = async (message, category, destination) => { }; const customListProcessor = async (message, category, destination, contactId) => { + const { mergeListWithContactUrl } = category; // Here we extract the list info from the message const listInfo = get(message?.context?.traits, 'lists') ? get(message.context.traits, 'lists') @@ -331,7 +334,7 @@ const customListProcessor = async (message, category, destination, contactId) => // eslint-disable-next-line no-restricted-syntax for (const li of listArr) { if (li.status === 'subscribe' || li.status === 'unsubscribe') { - const endpoint = `${destination.Config.apiUrl}${category.mergeListWithContactUrl}`; + const endpoint = `${destination.Config.apiUrl}${mergeListWithContactUrl}`; const requestData = { contactList: { list: li.id, @@ -345,6 +348,7 @@ const customListProcessor = async (message, category, destination, contactId) => const res = httpPOST(endpoint, requestData, requestOptions, { destType: 'active_campaign', feature: 'transformation', + endpointPath: mergeListWithContactUrl, }); promises.push(res); } diff --git a/src/v0/destinations/af/deleteUsers.js b/src/v0/destinations/af/deleteUsers.js index 2d68549fcc..bb711292c0 100644 --- a/src/v0/destinations/af/deleteUsers.js +++ b/src/v0/destinations/af/deleteUsers.js @@ -38,6 +38,7 @@ const deleteUser = async (config, endpoint, body, identityType, identityValue) = { destType: 'af', feature: 'deleteUsers', + endpointPath: `appsflyer.com/api/gdpr/v1/opendsr_requests`, }, ); const handledDelResponse = processAxiosResponse(response); diff --git a/src/v0/destinations/am/deleteUsers.js b/src/v0/destinations/am/deleteUsers.js index 578c58fb5c..6de9cf64a1 100644 --- a/src/v0/destinations/am/deleteUsers.js +++ b/src/v0/destinations/am/deleteUsers.js @@ -28,6 +28,7 @@ const userDeletionHandler = async (userAttributes, config) => { // Ref : https://www.docs.developers.amplitude.com/analytics/apis/user-privacy-api/#response const batchEvents = getUserIdBatches(userAttributes, DELETE_MAX_BATCH_SIZE); const url = 'https://amplitude.com/api/2/deletions/users'; + const endpointPath = '/api/2/deletions/users'; await Promise.all( batchEvents.map(async (batch) => { const data = { @@ -41,6 +42,7 @@ const userDeletionHandler = async (userAttributes, config) => { const resp = await httpPOST(url, data, requestOptions, { destType: 'am', feature: 'deleteUsers', + endpointPath, }); const handledDelResponse = processAxiosResponse(resp); if (!isHttpStatusSuccess(handledDelResponse.status)) { diff --git a/src/v0/destinations/ga/deleteUsers.js b/src/v0/destinations/ga/deleteUsers.js index bb909a0053..06e674048a 100644 --- a/src/v0/destinations/ga/deleteUsers.js +++ b/src/v0/destinations/ga/deleteUsers.js @@ -80,6 +80,7 @@ const userDeletionHandler = async (userAttributes, config, rudderDestInfo) => { { destType: 'ga', feature: 'deleteUsers', + endpointPath: '/userDeletion/userDeletionRequests:upsert', }, ); // process the response to know about refreshing scenario diff --git a/src/v0/destinations/google_adwords_enhanced_conversions/networkHandler.js b/src/v0/destinations/google_adwords_enhanced_conversions/networkHandler.js index 8ac432935f..7266154a09 100644 --- a/src/v0/destinations/google_adwords_enhanced_conversions/networkHandler.js +++ b/src/v0/destinations/google_adwords_enhanced_conversions/networkHandler.js @@ -44,6 +44,7 @@ const getConversionActionId = async (method, headers, params) => { { destType: 'google_adwords_enhanced_conversions', feature: 'proxy', + endpointPath: `/googleAds:searchStream`, }, ); if (!isHttpStatusSuccess(gaecConversionActionIdResponse.status)) { @@ -96,6 +97,7 @@ const ProxyRequest = async (request) => { const { httpResponse: response } = await handleHttpRequest('constructor', requestBody, { destType: 'google_adwords_enhanced_conversions', feature: 'proxy', + endpointPath: `/googleAds:uploadOfflineUserData`, }); return response; }; diff --git a/src/v0/destinations/google_adwords_offline_conversions/networkHandler.js b/src/v0/destinations/google_adwords_offline_conversions/networkHandler.js index cd891d9688..e880f97d0d 100644 --- a/src/v0/destinations/google_adwords_offline_conversions/networkHandler.js +++ b/src/v0/destinations/google_adwords_offline_conversions/networkHandler.js @@ -33,6 +33,7 @@ const createJob = async (endpoint, headers, payload) => { { destType: 'google_adwords_offline_conversions', feature: 'proxy', + endpointPath: `/create`, }, ); createJobResponse = processAxiosResponse(createJobResponse); @@ -57,6 +58,7 @@ const addConversionToJob = async (endpoint, headers, jobId, payload) => { { destType: 'google_adwords_offline_conversions', feature: 'proxy', + endpointPath: `/addOperations`, }, ); addConversionToJobResponse = processAxiosResponse(addConversionToJobResponse); @@ -80,6 +82,7 @@ const runTheJob = async (endpoint, headers, payload, jobId) => { { destType: 'google_adwords_offline_conversions', feature: 'proxy', + endpointPath: `/run`, }, ); return executeJobResponse; @@ -106,6 +109,7 @@ const getConversionCustomVariable = async (headers, params) => { let searchStreamResponse = await httpPOST(endpoint, data, requestOptions, { destType: 'google_adwords_offline_conversions', feature: 'proxy', + endpointPath: `/searchStream`, }); searchStreamResponse = processAxiosResponse(searchStreamResponse); if (!isHttpStatusSuccess(searchStreamResponse.status)) { diff --git a/src/v0/destinations/google_adwords_offline_conversions/utils.js b/src/v0/destinations/google_adwords_offline_conversions/utils.js index c69c5a436f..599a163c54 100644 --- a/src/v0/destinations/google_adwords_offline_conversions/utils.js +++ b/src/v0/destinations/google_adwords_offline_conversions/utils.js @@ -63,6 +63,7 @@ const getConversionActionId = async (headers, params) => { let searchStreamResponse = await httpPOST(endpoint, data, requestOptions, { destType: 'google_adwords_offline_conversions', feature: 'transformation', + endpointPath: `/googleAds:searchStream`, }); searchStreamResponse = processAxiosResponse(searchStreamResponse); if (!isHttpStatusSuccess(searchStreamResponse.status)) { diff --git a/src/v0/destinations/google_adwords_remarketing_lists/networkHandler.js b/src/v0/destinations/google_adwords_remarketing_lists/networkHandler.js index 5be8597bdb..aeb80216ff 100644 --- a/src/v0/destinations/google_adwords_remarketing_lists/networkHandler.js +++ b/src/v0/destinations/google_adwords_remarketing_lists/networkHandler.js @@ -34,6 +34,7 @@ const createJob = async (endpoint, customerId, listId, headers, method) => { const response = await httpSend(jobCreatingRequest, { destType: 'google_adwords_remarketing_lists', feature: 'proxy', + endpointPath: '/customers/create', }); return response; }; @@ -57,6 +58,7 @@ const addUserToJob = async (endpoint, headers, method, jobId, body) => { const response = await httpSend(secondRequest, { destType: 'google_adwords_remarketing_lists', feature: 'proxy', + endpointPath: '/addOperations', }); return response; }; @@ -78,6 +80,7 @@ const runTheJob = async (endpoint, headers, method, jobId) => { const response = await httpSend(thirdRequest, { destType: 'google_adwords_remarketing_lists', feature: 'proxy', + endpointPath: '/run', }); return response; }; diff --git a/src/v0/destinations/intercom/deleteUsers.js b/src/v0/destinations/intercom/deleteUsers.js index e11d352117..085e842458 100644 --- a/src/v0/destinations/intercom/deleteUsers.js +++ b/src/v0/destinations/intercom/deleteUsers.js @@ -38,6 +38,7 @@ const userDeletionHandler = async (userAttributes, config) => { const resp = await httpPOST(url, data, requestOptions, { destType: 'intercom', feature: 'deleteUsers', + endpointPath: '/user_delete_requests', }); const handledDelResponse = processAxiosResponse(resp); if (!isHttpStatusSuccess(handledDelResponse.status) && handledDelResponse.status !== 404) { diff --git a/src/v0/destinations/marketo/util.js b/src/v0/destinations/marketo/util.js index 203e0bf859..4dc576ec16 100644 --- a/src/v0/destinations/marketo/util.js +++ b/src/v0/destinations/marketo/util.js @@ -262,6 +262,7 @@ const sendPostRequest = async (url, data, options) => { const clientResponse = await httpPOST(url, data, options, { destType: 'marketo', feature: 'transformation', + endpointPath: `/v1/leads`, }); const processedResponse = processAxiosResponse(clientResponse); return processedResponse; diff --git a/src/v0/destinations/monday/util.js b/src/v0/destinations/monday/util.js index a66dd63dff..736f0133fd 100644 --- a/src/v0/destinations/monday/util.js +++ b/src/v0/destinations/monday/util.js @@ -194,6 +194,7 @@ const getBoardDetails = async (url, boardID, apiToken) => { { destType: 'monday', feature: 'transformation', + endpointPath: '/v2', }, ); const boardDetailsResponse = processAxiosResponse(clientResponse); From 5dade8942e3b59d3f0f36f5543f6e38d41f2aab5 Mon Sep 17 00:00:00 2001 From: Yashasvi Bajpai <33063622+yashasvibajpai@users.noreply.github.com> Date: Wed, 3 Jan 2024 13:52:40 +0530 Subject: [PATCH 107/135] chore: add endpoint labels (#2951) chore: add endpoint labelsx3 Co-authored-by: Sudip Paul <67197965+ItsSudip@users.noreply.github.com> --- src/v0/destinations/active_campaign/transform.js | 4 ++++ src/v0/destinations/canny/util.js | 1 + src/v0/destinations/custify/util.js | 1 + src/v0/destinations/freshmarketer/utils.js | 7 +++++++ src/v0/destinations/freshsales/utils.js | 5 +++++ .../google_adwords_offline_conversions/networkHandler.js | 1 + src/v0/destinations/hs/util.js | 2 ++ src/v0/destinations/marketo/util.js | 1 + src/v0/destinations/user/utils.js | 7 +++++++ src/v0/destinations/wootric/util.js | 2 ++ 10 files changed, 31 insertions(+) diff --git a/src/v0/destinations/active_campaign/transform.js b/src/v0/destinations/active_campaign/transform.js index 90e6b2080f..981dbd7520 100644 --- a/src/v0/destinations/active_campaign/transform.js +++ b/src/v0/destinations/active_campaign/transform.js @@ -128,6 +128,7 @@ const customTagProcessor = async (message, category, destination, contactId) => const resp = httpGET(endpoint, requestOptions, { destType: 'active_campaign', feature: 'transformation', + endpointPath: `/api/3/tags`, }); promises.push(resp); } @@ -251,6 +252,7 @@ const customFieldProcessor = async (message, category, destination) => { const resp = httpGET(endpoint, requestOpt, { destType: 'active_campaign', feature: 'transformation', + endpointPath: `/api/3/fields`, }); promises.push(resp); } @@ -406,6 +408,7 @@ const screenRequestHandler = async (message, category, destination) => { res = await httpGET(endpoint, requestOptions, { destType: 'active_campaign', feature: 'transformation', + endpointPath: `/api/3/eventTrackingEvents`, }); if (res.success === false) { errorHandler(res, 'Failed to retrieve events'); @@ -469,6 +472,7 @@ const trackRequestHandler = async (message, category, destination) => { let res = await httpGET(endpoint, requestOptions, { destType: 'active_campaign', feature: 'transformation', + endpointPath: `/api/3/eventTrackingEvents`, }); if (res.success === false) { diff --git a/src/v0/destinations/canny/util.js b/src/v0/destinations/canny/util.js index 59644bcd6b..f514a01e5c 100644 --- a/src/v0/destinations/canny/util.js +++ b/src/v0/destinations/canny/util.js @@ -45,6 +45,7 @@ const retrieveUserId = async (apiKey, message) => { { destType: 'canny', feature: 'transformation', + endpointPath: `/v1/users/retrieve`, }, ); logger.debug(response); diff --git a/src/v0/destinations/custify/util.js b/src/v0/destinations/custify/util.js index ae6f21fe20..8ecabccd2e 100644 --- a/src/v0/destinations/custify/util.js +++ b/src/v0/destinations/custify/util.js @@ -40,6 +40,7 @@ const createUpdateCompany = async (companyPayload, Config) => { { destType: 'custify', feature: 'transformation', + endpointPath: `/company`, }, ); const processedCompanyResponse = processAxiosResponse(companyResponse); diff --git a/src/v0/destinations/freshmarketer/utils.js b/src/v0/destinations/freshmarketer/utils.js index 6fa1fe9976..5e3ba6e67e 100644 --- a/src/v0/destinations/freshmarketer/utils.js +++ b/src/v0/destinations/freshmarketer/utils.js @@ -49,6 +49,7 @@ const createUpdateAccount = async (payload, Config) => { let accountResponse = await httpPOST(endPoint, payloadBody, requestOptions, { destType: 'freshmarketer', feature: 'transformation', + endpointPath: `/crm/sales/api/sales_accounts/upsert`, }); accountResponse = processAxiosResponse(accountResponse); if (accountResponse.status !== 200 && accountResponse.status !== 201) { @@ -93,6 +94,7 @@ const getUserAccountDetails = async (payload, userEmail, Config) => { let userSalesAccountResponse = await httpPOST(endPoint, userPayload, requestOptions, { destType: 'freshmarketer', feature: 'transformation', + endpointPath: `crm/sales/api/contacts/upsert?include=sales_accounts`, }); userSalesAccountResponse = processAxiosResponse(userSalesAccountResponse); if (userSalesAccountResponse.status !== 200 && userSalesAccountResponse.status !== 201) { @@ -142,6 +144,7 @@ const createOrUpdateListDetails = async (listName, Config) => { let listResponse = await httpGET(endPoint, requestOptions, { destType: 'freshmarketer', feature: 'transformation', + endpointPath: `/crm/sales/api/lists`, }); listResponse = processAxiosResponse(listResponse); if (listResponse.status !== 200) { @@ -161,6 +164,7 @@ const createOrUpdateListDetails = async (listName, Config) => { listResponse = await httpPOST(endPoint, { name: listName }, requestOptions, { destType: 'freshmarketer', feature: 'transformation', + endpointPath: `/crm/sales/api/lists`, }); listResponse = processAxiosResponse(listResponse); if (listResponse.status !== 200) { @@ -235,6 +239,7 @@ const getContactsDetails = async (userEmail, Config) => { let userResponse = await httpPOST(endPoint, userPayload, requestOptions, { destType: 'freshmarketer', feature: 'transformation', + endpointPath: `/crm/sales/api/contacts/upsert`, }); userResponse = processAxiosResponse(userResponse); if (userResponse.status !== 200 && userResponse.status !== 201) { @@ -308,6 +313,7 @@ const UpdateContactWithLifeCycleStage = async (message, Config) => { let lifeCycleStagesResponse = await httpGET(endPoint, requestOptions, { destType: 'freshmarketer', feature: 'transformation', + endpointPath: `/crm/sales/api/selector/lifecycle_stages`, }); lifeCycleStagesResponse = processAxiosResponse(lifeCycleStagesResponse); if (lifeCycleStagesResponse.status !== 200) { @@ -393,6 +399,7 @@ const UpdateContactWithSalesActivity = async (payload, message, Config) => { let salesActivityResponse = await httpGET(endPoint, requestOptions, { destType: 'freshmarketer', feature: 'transformation', + endpointPath: `/crm/sales/api/selector/sales_activity_types`, }); salesActivityResponse = processAxiosResponse(salesActivityResponse); if (salesActivityResponse.status !== 200) { diff --git a/src/v0/destinations/freshsales/utils.js b/src/v0/destinations/freshsales/utils.js index 96acabb037..5008fedc2d 100644 --- a/src/v0/destinations/freshsales/utils.js +++ b/src/v0/destinations/freshsales/utils.js @@ -47,6 +47,7 @@ const createUpdateAccount = async (payload, Config) => { let accountResponse = await httpPOST(endPoint, payloadBody, requestOptions, { destType: 'freshsales', feature: 'transformation', + endpointPath: `/crm/sales/api/sales_accounts/upsert`, }); accountResponse = processAxiosResponse(accountResponse); if (accountResponse.status !== 200 && accountResponse.status !== 201) { @@ -90,6 +91,7 @@ const getUserAccountDetails = async (payload, userEmail, Config) => { let userSalesAccountResponse = await httpPOST(endPoint, userPayload, requestOptions, { destType: 'freshsales', feature: 'transformation', + endpointPath: `/crm/sales/api/contacts/upsert?include=sales_accounts`, }); userSalesAccountResponse = processAxiosResponse(userSalesAccountResponse); if (userSalesAccountResponse.status !== 200 && userSalesAccountResponse.status !== 201) { @@ -145,6 +147,7 @@ const getContactsDetails = async (userEmail, Config) => { let userResponse = await httpPOST(endPoint, userPayload, requestOptions, { destType: 'freshsales', feature: 'transformation', + endpointPath: `/crm/sales/api/contacts/upsert`, }); userResponse = processAxiosResponse(userResponse); if (userResponse.status !== 200 && userResponse.status !== 201) { @@ -235,6 +238,7 @@ const UpdateContactWithSalesActivity = async (payload, message, Config) => { let salesActivityResponse = await httpGET(endPoint, requestOptions, { destType: 'freshsales', feature: 'transformation', + endpointPath: `/crm/sales/api/sales_activity_types`, }); salesActivityResponse = processAxiosResponse(salesActivityResponse); if (salesActivityResponse.status !== 200) { @@ -314,6 +318,7 @@ const UpdateContactWithLifeCycleStage = async (message, Config) => { let lifeCycleStagesResponse = await httpGET(endPoint, requestOptions, { destType: 'freshsales', feature: 'transformation', + endpointPath: `/crm/sales/api/lifecycle_stages`, }); lifeCycleStagesResponse = processAxiosResponse(lifeCycleStagesResponse); if (lifeCycleStagesResponse.status !== 200) { diff --git a/src/v0/destinations/google_adwords_offline_conversions/networkHandler.js b/src/v0/destinations/google_adwords_offline_conversions/networkHandler.js index e880f97d0d..6922cde8c8 100644 --- a/src/v0/destinations/google_adwords_offline_conversions/networkHandler.js +++ b/src/v0/destinations/google_adwords_offline_conversions/networkHandler.js @@ -246,6 +246,7 @@ const ProxyRequest = async (request) => { const response = await httpSend(requestBody, { feature: 'proxy', destType: 'gogole_adwords_offline_conversions', + endpointPath: `/proxy`, }); return response; }; diff --git a/src/v0/destinations/hs/util.js b/src/v0/destinations/hs/util.js index f83ce0b6de..5c8f4a908a 100644 --- a/src/v0/destinations/hs/util.js +++ b/src/v0/destinations/hs/util.js @@ -100,6 +100,7 @@ const getProperties = async (destination) => { hubspotPropertyMapResponse = await httpGET(CONTACT_PROPERTY_MAP_ENDPOINT, requestOptions, { destType: 'hs', feature: 'transformation', + endpointPath: `/properties/v1/contacts/properties`, }); hubspotPropertyMapResponse = processAxiosResponse(hubspotPropertyMapResponse); } else { @@ -111,6 +112,7 @@ const getProperties = async (destination) => { { destType: 'hs', feature: 'transformation', + endpointPath: `/properties/v1/contacts/properties?hapikey`, }, ); hubspotPropertyMapResponse = processAxiosResponse(hubspotPropertyMapResponse); diff --git a/src/v0/destinations/marketo/util.js b/src/v0/destinations/marketo/util.js index 4dc576ec16..54ff70708a 100644 --- a/src/v0/destinations/marketo/util.js +++ b/src/v0/destinations/marketo/util.js @@ -247,6 +247,7 @@ const sendGetRequest = async (url, options) => { const clientResponse = await httpGET(url, options, { destType: 'marketo', feature: 'transformation', + endpointPath: `/v1/leads`, }); const processedResponse = processAxiosResponse(clientResponse); return processedResponse; diff --git a/src/v0/destinations/user/utils.js b/src/v0/destinations/user/utils.js index 41ad173583..52fba2167e 100644 --- a/src/v0/destinations/user/utils.js +++ b/src/v0/destinations/user/utils.js @@ -237,6 +237,7 @@ const createCompany = async (message, destination) => { const response = await httpPOST(endpoint, payload, requestOptions, { destType: 'user', feature: 'transformation', + endpointPath: `/companies/`, }); const data = processAxiosResponse(response); return data.response; @@ -277,6 +278,7 @@ const updateCompany = async (message, destination, company) => { const response = await httpPUT(endpoint, payload, requestOptions, { destType: 'user', feature: 'transformation', + endpointPath: `/companies/`, }); const data = processAxiosResponse(response); return data.response; @@ -303,6 +305,7 @@ const getUserByUserKey = async (apiKey, userKey, appSubdomain) => { const userResponse = await httpGET(endpoint, requestOptions, { destType: 'user', feature: 'transformation', + endpointPath: `/users/search`, }); const processedUserResponse = processAxiosResponse(userResponse); if (processedUserResponse.status === 200) { @@ -336,6 +339,7 @@ const getUserByEmail = async (apiKey, email, appSubdomain) => { const userResponse = await httpGET(endpoint, requestOptions, { destType: 'user', feature: 'transformation', + endpointPath: `/users/search/?email`, }); const processedUserResponse = processAxiosResponse(userResponse); @@ -374,6 +378,7 @@ const getUserByPhoneNumber = async (apiKey, phoneNumber, appSubdomain) => { const userResponse = await httpGET(endpoint, requestOptions, { destType: 'user', feature: 'transformation', + endpointPath: `/users/search/?phone_number`, }); const processedUserResponse = processAxiosResponse(userResponse); @@ -418,6 +423,7 @@ const getUserByCustomId = async (message, destination) => { const userResponse = await httpGET(endpoint, requestOptions, { destType: 'user', feature: 'transformation', + endpointPath: `/users-by-id/`, }); const processedUserResponse = processAxiosResponse(userResponse); @@ -453,6 +459,7 @@ const getCompanyByCustomId = async (message, destination) => { const response = await httpGET(endpoint, requestOptions, { destType: 'user', feature: 'transformation', + endpointPath: `/companies-by-id/`, }); const processedUserResponse = processAxiosResponse(response); if (processedUserResponse.status === 200) { diff --git a/src/v0/destinations/wootric/util.js b/src/v0/destinations/wootric/util.js index fce8a66586..eb61a472cf 100644 --- a/src/v0/destinations/wootric/util.js +++ b/src/v0/destinations/wootric/util.js @@ -46,6 +46,7 @@ const getAccessToken = async (destination) => { const wootricAuthResponse = await httpPOST(request.url, request.data, request.header, { destType: 'wootric', feature: 'transformation', + endpointPath: `/oauth/token`, }); const processedAuthResponse = processAxiosResponse(wootricAuthResponse); // If the request fails, throwing error. @@ -98,6 +99,7 @@ const retrieveUserDetails = async (endUserId, externalId, accessToken) => { const userResponse = await httpGET(endpoint, requestOptions, { destType: 'wootric', feature: 'transformation', + endpointPath: `/v1/end_users/`, }); const processedUserResponse = processAxiosResponse(userResponse); From e00209337fa0e4da88f4f9959558636eecd4f120 Mon Sep 17 00:00:00 2001 From: Akash Chetty Date: Thu, 4 Jan 2024 08:22:18 +0530 Subject: [PATCH 108/135] fix: error handling when payload contains toString as key (#2954) --- .gitignore | 3 + src/warehouse/config/helpers.js | 9 ++- src/warehouse/index.js | 3 +- src/warehouse/util.js | 9 ++- test/__tests__/data/warehouse/events.js | 34 +++++++++-- test/__tests__/warehouse.test.js | 80 ++++++++++++++++++++++--- 6 files changed, 118 insertions(+), 20 deletions(-) diff --git a/.gitignore b/.gitignore index ab1fc2a840..24d37f6354 100644 --- a/.gitignore +++ b/.gitignore @@ -132,3 +132,6 @@ dist # Others **/.DS_Store + + +.idea \ No newline at end of file diff --git a/src/warehouse/config/helpers.js b/src/warehouse/config/helpers.js index ecc7d382b9..ef00d7ee73 100644 --- a/src/warehouse/config/helpers.js +++ b/src/warehouse/config/helpers.js @@ -1,12 +1,18 @@ const _ = require('lodash'); const get = require('get-value'); +const logger = require('../../logger'); const isNull = (x) => { return x === null || x === undefined; }; const isBlank = (value) => { - return _.isEmpty(_.toString(value)); + try { + return _.isEmpty(_.toString(value)); + } catch (e) { + logger.error(`Error in isBlank: ${e.message}`); + return false; + } }; const getFirstValidValue = (message, props) => { @@ -27,6 +33,7 @@ function isDataLakeProvider(provider) { module.exports = { isNull, + isBlank, getFirstValidValue, isDataLakeProvider, }; diff --git a/src/warehouse/index.js b/src/warehouse/index.js index d88904b4a8..3305a52762 100644 --- a/src/warehouse/index.js +++ b/src/warehouse/index.js @@ -5,7 +5,6 @@ const { v4: uuidv4 } = require('uuid'); const { isObject, - isBlank, isValidJsonPathKey, isValidLegacyJsonPathKey, keysFromJsonPaths, @@ -24,7 +23,7 @@ const whPageColumnMappingRules = require('./config/WHPageConfig.js'); const whScreenColumnMappingRules = require('./config/WHScreenConfig.js'); const whGroupColumnMappingRules = require('./config/WHGroupConfig.js'); const whAliasColumnMappingRules = require('./config/WHAliasConfig.js'); -const { isDataLakeProvider } = require('./config/helpers'); +const {isDataLakeProvider, isBlank} = require('./config/helpers'); const { InstrumentationError } = require('@rudderstack/integrations-lib'); const whExtractEventTableColumnMappingRules = require('./config/WHExtractEventTableConfig.js'); diff --git a/src/warehouse/util.js b/src/warehouse/util.js index 79981249e7..11d72bfbfd 100644 --- a/src/warehouse/util.js +++ b/src/warehouse/util.js @@ -4,6 +4,7 @@ const get = require('get-value'); const v0 = require('./v0/util'); const v1 = require('./v1/util'); const { PlatformError, InstrumentationError } = require('@rudderstack/integrations-lib'); +const {isBlank} = require('./config/helpers'); const minTimeInMs = Date.parse('0001-01-01T00:00:00Z'); const maxTimeInMs = Date.parse('9999-12-31T23:59:59.999Z'); @@ -22,10 +23,6 @@ const isValidLegacyJsonPathKey = (eventType, key, level, jsonKeys = {}) => { return eventType === 'track' && jsonKeys[key] === level; }; -const isBlank = (value) => { - return _.isEmpty(_.toString(value)); -}; - /* This function takes in an array of json paths and returns an object with keys as the json path and value as the position of the key in the json path Example: @@ -97,6 +94,9 @@ const timestampRegex = new RegExp( ); function validTimestamp(input) { + if (typeof input !== 'string') { + return false; + } if (timestampRegex.test(input)) { // check if date value lies in between min time and max time. if not then it's not a valid timestamp const d = new Date(input); @@ -147,7 +147,6 @@ const getRecordIDForExtract = (message) => { module.exports = { isObject, - isBlank, isValidJsonPathKey, isValidLegacyJsonPathKey, keysFromJsonPaths, diff --git a/test/__tests__/data/warehouse/events.js b/test/__tests__/data/warehouse/events.js index 20a6ce89b3..ef9cc21096 100644 --- a/test/__tests__/data/warehouse/events.js +++ b/test/__tests__/data/warehouse/events.js @@ -60,7 +60,17 @@ const sampleEvents = { originalTimestamp: "2020-01-24T06:29:02.364Z", properties: { currency: "USD", - revenue: 50 + revenue: 50, + stack: { + history: { + errorDetails: [ + { + "message": "Cannot set headers after they are sent to the client", + "toString": "[function]" + } + ] + } + } }, receivedAt: "2020-01-24T11:59:02.403+05:30", request_ip: "[::1]:53708", @@ -180,6 +190,12 @@ const sampleEvents = { data: { currency: "USD", revenue: 50, + stack_history_error_details: [ + { + "message": "Cannot set headers after they are sent to the client", + "toString": "[function]" + } + ], context_app_build: "1.0.0", context_app_name: "RudderLabs JavaScript SDK", context_app_namespace: "com.rudderlabs.javascript", @@ -314,6 +330,12 @@ const sampleEvents = { data: { CURRENCY: "USD", REVENUE: 50, + STACK_HISTORY_ERROR_DETAILS: [ + { + "message": "Cannot set headers after they are sent to the client", + "toString": "[function]" + } + ], CONTEXT_APP_BUILD: "1.0.0", CONTEXT_APP_NAME: "RudderLabs JavaScript SDK", CONTEXT_APP_NAMESPACE: "com.rudderlabs.javascript", @@ -340,7 +362,7 @@ const sampleEvents = { RECEIVED_AT: "2020-01-24T06:29:02.403Z", ORIGINAL_TIMESTAMP: "2020-01-24T06:29:02.364Z", CHANNEL: "web", - EVENT: "button_clicked" + EVENT: "button_clicked", } } ], @@ -448,6 +470,12 @@ const sampleEvents = { data: { currency: "USD", revenue: 50, + stack_history_error_details: [ + { + "message": "Cannot set headers after they are sent to the client", + "toString": "[function]" + } + ], context_app_build: "1.0.0", context_app_name: "RudderLabs JavaScript SDK", context_app_namespace: "com.rudderlabs.javascript", @@ -2053,7 +2081,6 @@ const sampleEvents = { id: "string", user_id: "string", received_at: "datetime", - event: "string" }, receivedAt: "2020-01-24T11:59:02.403+05:30" }, @@ -2121,7 +2148,6 @@ const sampleEvents = { id: "string", user_id: "string", received_at: "datetime", - event: "string", boolean_property: "boolean", }, receivedAt: "2020-01-24T11:59:02.403+05:30" diff --git a/test/__tests__/warehouse.test.js b/test/__tests__/warehouse.test.js index 045bab35a6..772e59e65a 100644 --- a/test/__tests__/warehouse.test.js +++ b/test/__tests__/warehouse.test.js @@ -20,6 +20,7 @@ const { const { validTimestamp } = require("../../src/warehouse/util.js"); +const {isBlank} = require("../../src/warehouse/config/helpers.js"); const version = "v0"; const integrations = [ @@ -1096,54 +1097,117 @@ describe("Integration options", () => { describe("validTimestamp", () => { const testCases = [ { + name: "undefined input should return false", input: undefined, expected: false, }, { + name: "negative year and time input should return false #1", input: '-0001-11-30T00:00:00+0000', expected: false, }, { + name: "negative year and time input should return false #2", input: '-2023-06-14T05:23:59.244Z', expected: false, }, { + name: "negative year and time input should return false #3", + input: '-1900-06-14T05:23:59.244Z', + expected: false, + }, + { + name: "positive year and time input should return false", input: '+2023-06-14T05:23:59.244Z', expected: false, }, { + name: "valid timestamp input should return true", input: '2023-06-14T05:23:59.244Z', expected: true, }, { - input: '-1900-06-14T05:23:59.244Z', - expected: false, - }, - { + name: "non-date string input should return false", input: 'abc', expected: false, }, { - input: '%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216Windows%u2216win%u002ein', + name: "malicious string input should return false", + input: '%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216Windows%u2216win%u002ein', expected: false, }, { + name: "empty string input should return false", input: '', expected: false, }, { + name: "valid date input should return true", input: '2023-06-14', expected: true, }, { + name: "time-only input should return false", input: '05:23:59.244Z', expected: false, - } - ] + }, + { + name: "non-string input should return false", + input: { abc: 123 }, + expected: false, + }, + { + name: "object with toString method input should return false", + input: { + toString: '2023-06-14T05:23:59.244Z' + }, + expected: false, + }, + ]; for (const testCase of testCases) { - it(`should return ${testCase.expected} for ${testCase.input}`, () => { + it(`should return ${testCase.expected} for ${testCase.name}`, () => { expect(validTimestamp(testCase.input)).toEqual(testCase.expected); }); } }); + + + +describe("isBlank", () => { + const testCases = [ + { + name: "null", + input: null, + expected: true + }, + { + name: "empty string", + input: "", + expected: true + }, + { + name: "non-empty string", + input: "test", + expected: false + }, + { + name: "numeric value", + input: 1634762544, + expected: false + }, + { + name: "object with toString property", + input: { + toString: '2023-06-14T05:23:59.244Z' + }, + expected: false + }, + ]; + + for (const testCase of testCases) { + it(`should return ${testCase.expected} for ${testCase.name}`, () => { + expect(isBlank(testCase.input)).toEqual(testCase.expected); + }); + } +}); \ No newline at end of file From 8bf56cc7914bda530b0bf3fb16bfece6be542ddd Mon Sep 17 00:00:00 2001 From: shrouti1507 <60211312+shrouti1507@users.noreply.github.com> Date: Thu, 4 Jan 2024 11:42:18 +0530 Subject: [PATCH 109/135] fix: for gainsight px only new users to have default signUp date (#2953) * fix: only new users to have default signUp date * fix: only new users to have default createDate * fix: small edit in comment * fix: small edit in comment * fix: small edit in comment * fix: review comments addressed --- .../data/GainsightPX_Identify.json | 14 +- src/v0/destinations/gainsight_px/transform.js | 20 +- .../gainsight_px/processor/data.ts | 4020 +++++++++-------- .../destinations/gainsight_px/router/data.ts | 1093 +++-- 4 files changed, 2729 insertions(+), 2418 deletions(-) diff --git a/src/v0/destinations/gainsight_px/data/GainsightPX_Identify.json b/src/v0/destinations/gainsight_px/data/GainsightPX_Identify.json index 5d07b290dc..c37c992d84 100644 --- a/src/v0/destinations/gainsight_px/data/GainsightPX_Identify.json +++ b/src/v0/destinations/gainsight_px/data/GainsightPX_Identify.json @@ -55,12 +55,7 @@ }, { "destKey": "signUpDate", - "sourceKeys": [ - "traits.signUpDate", - "context.traits.signUpDate", - "timestamp", - "originalTimestamp" - ], + "sourceKeys": ["traits.signUpDate", "context.traits.signUpDate"], "required": false, "metadata": { "type": "timestamp" @@ -109,12 +104,7 @@ }, { "destKey": "createDate", - "sourceKeys": [ - "traits.createDate", - "context.traits.createDate", - "timestamp", - "originalTimestamp" - ], + "sourceKeys": ["traits.createDate", "context.traits.createDate"], "required": false, "metadata": { "type": "timestamp" diff --git a/src/v0/destinations/gainsight_px/transform.js b/src/v0/destinations/gainsight_px/transform.js index 4d91980f11..a63be08c80 100644 --- a/src/v0/destinations/gainsight_px/transform.js +++ b/src/v0/destinations/gainsight_px/transform.js @@ -1,5 +1,9 @@ /* eslint-disable no-nested-ternary */ -const { InstrumentationError, ConfigurationError } = require('@rudderstack/integrations-lib'); +const { + InstrumentationError, + ConfigurationError, + formatTimeStamp, +} = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { isEmptyObject, @@ -47,7 +51,7 @@ const identifyResponseBuilder = async (message, { Config }) => { 'Content-Type': JSON_MIME_TYPE, }; - const { success: isPresent } = await objectExists(userId, Config, 'user'); + const { success: isUserPresent } = await objectExists(userId, Config, 'user'); let payload = constructPayload(message, identifyMapping); const name = getValueFromMessage(message, ['traits.name', 'context.traits.name']); @@ -56,6 +60,16 @@ const identifyResponseBuilder = async (message, { Config }) => { payload.firstName = fName; payload.lastName = lName; } + // Only for the case of new user creation, if signUpDate is not provided in traits, timestamp / originalTimestamp is mapped + if (!isUserPresent && !payload.signUpDate) { + payload.signUpDate = formatTimeStamp(message.timestamp || message.originalTimestamp); + } + + // Only for the case of new user creation, if createDate is not provided in traits, timestamp / originalTimestamp is mapped + if (!isUserPresent && !payload.createDate) { + payload.createDate = formatTimeStamp(message.timestamp || message.originalTimestamp); + } + let customAttributes = {}; customAttributes = extractCustomFields( message, @@ -75,7 +89,7 @@ const identifyResponseBuilder = async (message, { Config }) => { type: 'USER', }; - if (isPresent) { + if (isUserPresent) { // update user response.method = defaultPutRequestConfig.requestMethod; response.endpoint = `${ENDPOINTS.USERS_ENDPOINT}/${userId}`; diff --git a/test/integrations/destinations/gainsight_px/processor/data.ts b/test/integrations/destinations/gainsight_px/processor/data.ts index 192c6969c4..3dfe86aa98 100644 --- a/test/integrations/destinations/gainsight_px/processor/data.ts +++ b/test/integrations/destinations/gainsight_px/processor/data.ts @@ -1,1857 +1,2165 @@ export const data = [ - { - "name": "gainsight_px", - "description": "Test 0", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "destination": { - "Config": { - "apiKey": "sample-api-key", - "productTagKey": "AP-XABC-123", - "accountAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "userAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "globalContextMap": [ - { - "from": "projectId", - "to": "p-123" - }, - { - "from": "tag", - "to": "sample-category-tag" - } - ] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "userId": "sample-user-id", - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "sample-anon-id", - "type": "track", - "event": "Product Added", - "properties": { - "product_id": "123", - "sku": "F16", - "category": "Games", - "name": "Game", - "brand": "Gamepro", - "variant": "111", - "price": 13.49, - "quantity": 11, - "coupon": "DISC21", - "position": 1, - "url": "https://www.website.com/product/path", - "image_url": "https://www.website.com/product/path.png" - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "attributes": { - "product_id": "123", - "sku": "F16", - "category": "Games", - "name": "Game", - "brand": "Gamepro", - "variant": "111", - "price": 13.49, - "quantity": 11, - "coupon": "DISC21", - "position": 1, - "url": "https://www.website.com/product/path", - "image_url": "https://www.website.com/product/path.png" - }, - "propertyKey": "AP-XABC-123", - "userType": "USER", - "identifyId": "sample-user-id", - "date": 1571043797562, - "eventName": "Product Added", - "globalContext": { - "projectId": "p-123", - "tag": "sample-category-tag" - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "X-APTRINSIC-API-KEY": "sample-api-key", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api.aptrinsic.com/v1/events/custom", - "userId": "" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "gainsight_px", - "description": "Test 1", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "destination": { - "Config": { - "apiKey": "sample-api-key", - "productTagKey": "AP-XABC-123", - "accountAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "userAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "globalContextMap": [ - { - "from": "projectId", - "to": "p-123" - }, - { - "from": "tag", - "to": "sample-category-tag" - } - ] - } - }, - "message": { - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "version": "1.27.0", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:8887/", - "path": "/", - "title": "RudderStack in 5", - "search": "", - "tab_url": "http://127.0.0.1:8887/", - "referrer": "$direct", - "initial_referrer": "$direct", - "referring_domain": "", - "initial_referring_domain": "" - }, - "locale": "en-US", - "screen": { - "width": 1512, - "height": 982, - "density": 2, - "innerWidth": 774, - "innerHeight": 774 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.27.0" - }, - "campaign": {}, - "sessionId": 1679967592314, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36", - "properties": { - "email": "84@84.com", - "price": "56.0", - "quantity": "5" - } - }, - "userId": "sample-user-id", - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "sample-anon-id", - "type": "track", - "event": "Marketing - Plan Change Events", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "attributes": {}, - "url": "http://127.0.0.1:8887/", - "propertyKey": "AP-XABC-123", - "userType": "USER", - "identifyId": "sample-user-id", - "referrer": "$direct", - "date": 1571043797562, - "sessionId": 1679967592314, - "eventName": "Marketing - Plan Change Events", - "globalContext": { - "projectId": "p-123", - "tag": "sample-category-tag" - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "X-APTRINSIC-API-KEY": "sample-api-key", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api.aptrinsic.com/v1/events/custom", - "userId": "" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "gainsight_px", - "description": "Test 2", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "destination": { - "Config": { - "apiKey": "sample-api-key", - "productTagKey": "AP-XABC-123", - "accountAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "userAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "globalContextMap": [ - { - "from": "projectId", - "to": "p-123" - }, - { - "from": "tag", - "to": "sample-category-tag" - } - ] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "userId": "sample-user-id", - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "sample-anon-id", - "type": "track", - "event": "Track Me", - "properties": { - "description": "Sample Track call", - "globalContext": { - "testOverride": "some-value" - } - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "attributes": { - "description": "Sample Track call" - }, - "propertyKey": "AP-XABC-123", - "userType": "USER", - "identifyId": "sample-user-id", - "date": 1571043797562, - "eventName": "Track Me", - "globalContext": { - "testOverride": "some-value" - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "X-APTRINSIC-API-KEY": "sample-api-key", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api.aptrinsic.com/v1/events/custom", - "userId": "" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "gainsight_px", - "description": "Test 3", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "destination": { - "Config": { - "apiKey": "sample-api-key", - "productTagKey": "AP-XABC-123", - "accountAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "userAttributeMap": [ - { - "from": "hobbyCustomField", - "to": "hobby" - } - ], - "globalContextMap": [] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "userId": "sample-user-id", - "anonymousId": "sample-anon-id", - "type": "identify", - "traits": { - "type": "USER", - "gender": "MALE", - "email": "user@email.com", - "firstName": "Sample", - "lastName": "User", - "signUpDate": 1624431528295, - "title": "engineer", - "countryName": "USA", - "countryCode": "US", - "city": "New York", - "hobbyCustomField": "Sample Hobby" - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "type": "USER", - "gender": "MALE", - "email": "user@email.com", - "firstName": "Sample", - "lastName": "User", - "signUpDate": 1624431528295, - "createDate": 1571043797562, - "title": "engineer", - "propertyKeys": [ - "AP-XABC-123" - ], - "location": { - "countryName": "USA", - "countryCode": "US", - "city": "New York" - }, - "customAttributes": { - "hobby": "Sample Hobby" - } - } - }, - "type": "REST", - "files": {}, - "method": "PUT", - "params": {}, - "headers": { - "X-APTRINSIC-API-KEY": "sample-api-key", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api.aptrinsic.com/v1/users/sample-user-id", - "userId": "" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "gainsight_px", - "description": "Test 4", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "destination": { - "Config": { - "apiKey": "sample-api-key", - "productTagKey": "AP-XABC-123", - "accountAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "userAttributeMap": [], - "globalContextMap": [] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "type": "USER", - "gender": "MALE", - "email": "user@email.com", - "firstName": "Sample", - "lastName": "User", - "medium": null - } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "sample-anon-id", - "userId": "sample-user-id", - "groupId": "ecorp-id", - "type": "group", - "traits": { - "name": "ECorp", - "industry": "software", - "numberOfEmployees": 400, - "website": "www.ecorp.com", - "plan": "premium" - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "accountId": "ecorp-id" - } - }, - "type": "REST", - "files": {}, - "method": "PUT", - "params": {}, - "headers": { - "X-APTRINSIC-API-KEY": "sample-api-key", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api.aptrinsic.com/v1/users/sample-user-id", - "userId": "" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "gainsight_px", - "description": "Test 5", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "destination": { - "Config": { - "apiKey": "sample-api-key", - "productTagKey": "AP-XABC-123", - "accountAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "userAttributeMap": [ - { - "from": "hobbyCustomField", - "to": "hobby" - } - ], - "globalContextMap": [] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "identify", - "traits": { - "type": "USER", - "gender": "MALE", - "email": "user@email.com", - "firstName": "Sample", - "lastName": "User", - "signUpDate": 1624431528295, - "title": "engineer", - "countryName": "USA", - "countryCode": "US", - "city": "New York", - "hobbyCustomField": "Sample Hobby" - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "error": "userId or anonymousId is required for identify", - "statTags": { - "destType": "GAINSIGHT_PX", - "errorCategory": "dataValidation", - "errorType": "instrumentation", - "feature": "processor", - "implementation": "native", - "module": "destination" - }, - "statusCode": 400 - } - ] - } - } - }, - { - "name": "gainsight_px", - "description": "Test 6", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "destination": { - "Config": { - "apiKey": "sample-api-key", - "productTagKey": "AP-XABC-123", - "accountAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "userAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "globalContextMap": [ - { - "from": "projectId", - "to": "p-123" - }, - { - "from": "tag", - "to": "sample-category-tag" - } - ] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "track", - "event": "Product Added", - "properties": { - "product_id": "123", - "sku": "F16", - "category": "Games", - "name": "Game", - "brand": "Gamepro", - "variant": "111", - "price": 13.49, - "quantity": 11, - "coupon": "DISC21", - "position": 1, - "url": "https://www.website.com/product/path", - "image_url": "https://www.website.com/product/path.png" - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "error": "Missing required value from \"userId\"", - "statTags": { - "destType": "GAINSIGHT_PX", - "errorCategory": "dataValidation", - "errorType": "instrumentation", - "feature": "processor", - "implementation": "native", - "module": "destination" - }, - "statusCode": 400 - } - ] - } - } - }, - { - "name": "gainsight_px", - "description": "Test 7", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "destination": { - "Config": { - "apiKey": "sample-api-key", - "productTagKey": "AP-XABC-123", - "accountAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "userAttributeMap": [], - "globalContextMap": [] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "type": "USER", - "gender": "MALE", - "email": "user@email.com", - "firstName": "Sample", - "lastName": "User" - } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "sample-anon-id", - "userId": "sample-user-id", - "type": "group", - "traits": { - "name": "ECorp", - "industry": "software", - "numberOfEmployees": 400, - "website": "www.ecorp.com", - "plan": "premium" - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "error": "groupId is required for group", - "statTags": { - "destType": "GAINSIGHT_PX", - "errorCategory": "dataValidation", - "errorType": "instrumentation", - "feature": "processor", - "implementation": "native", - "module": "destination" - }, - "statusCode": 400 - } - ] - } - } - }, - { - "name": "gainsight_px", - "description": "Test 8", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "destination": { - "Config": { - "apiKey": "sample-api-key", - "productTagKey": "AP-XABC-123", - "accountAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "userAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "globalContextMap": [ - { - "from": "projectId", - "to": "p-123" - }, - { - "from": "tag", - "to": "sample-category-tag" - } - ] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "userId": "sample-user-id", - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "sample-anon-id", - "type": "track", - "event": "Stringify Test", - "properties": { - "description": "Stringify test for object values", - "nested": { - "a": [ - 1, - 2, - 3 - ], - "b": { - "c": 1 - } - }, - "arr": [ - 1, - 2, - 3 - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "attributes": { - "description": "Stringify test for object values", - "nested": "{\"a\":[1,2,3],\"b\":{\"c\":1}}", - "arr": "[1,2,3]" - }, - "propertyKey": "AP-XABC-123", - "userType": "USER", - "identifyId": "sample-user-id", - "date": 1571043797562, - "eventName": "Stringify Test", - "globalContext": { - "projectId": "p-123", - "tag": "sample-category-tag" - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "X-APTRINSIC-API-KEY": "sample-api-key", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api.aptrinsic.com/v1/events/custom", - "userId": "" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "gainsight_px", - "description": "Test 9", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "destination": { - "Config": { - "apiKey": "sample-api-key", - "productTagKey": "AP-XABC-123", - "accountAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "userAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "globalContextMap": [ - { - "from": "projectId", - "to": "p-123" - }, - { - "from": "tag", - "to": "sample-category-tag" - } - ] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "userId": "sample-user-id", - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "sample-anon-id", - "type": "track", - "event": "Stringify Test", - "properties": { - "description": "Stringify test for object values", - "nested": { - "a": [ - 1, - 2, - 3 - ], - "b": { - "c": 1 - } - }, - "arr": [ - 1, - 2, - 3 - ], - "globalContext": { - "someKey": "someVal" - } - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "attributes": { - "description": "Stringify test for object values", - "nested": "{\"a\":[1,2,3],\"b\":{\"c\":1}}", - "arr": "[1,2,3]" - }, - "propertyKey": "AP-XABC-123", - "userType": "USER", - "identifyId": "sample-user-id", - "date": 1571043797562, - "eventName": "Stringify Test", - "globalContext": { - "someKey": "someVal" - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "X-APTRINSIC-API-KEY": "sample-api-key", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api.aptrinsic.com/v1/events/custom", - "userId": "" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "gainsight_px", - "description": "Test 10", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "destination": { - "Config": { - "apiKey": "sample-api-key", - "productTagKey": "AP-XABC-123", - "accountAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "userAttributeMap": [], - "globalContextMap": [] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "type": "USER", - "gender": "MALE", - "email": "user@email.com", - "firstName": "Sample", - "lastName": "User" - } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "sample-anon-id", - "userId": "absent-id", - "groupId": "ecorp-id", - "type": "group", - "traits": { - "name": "ECorp", - "industry": "software", - "numberOfEmployees": 400, - "website": "www.ecorp.com", - "plan": "premium" - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "error": "aborting group call: {\"status\":\"NOT_FOUND\",\"message\":\"User was not found for parameters {id=absent-id}\",\"debugMessage\":null,\"subErrors\":null}", - "statTags": { - "destType": "GAINSIGHT_PX", - "errorCategory": "dataValidation", - "errorType": "instrumentation", - "feature": "processor", - "implementation": "native", - "module": "destination" - }, - "statusCode": 400 - } - ] - } - } - }, - { - "name": "gainsight_px", - "description": "Test 11", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "destination": { - "Config": { - "apiKey": "sample-api-key", - "productTagKey": "AP-XABC-123", - "accountAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "userAttributeMap": [ - { - "from": "hobbyCustomField", - "to": "hobby" - } - ], - "globalContextMap": [] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "userId": "absent-id", - "anonymousId": "sample-anon-id", - "type": "identify", - "traits": { - "type": "USER", - "gender": "MALE", - "email": "user@email.com", - "firstName": "Sample", - "lastName": "User", - "signUpDate": 1624431528295, - "title": "engineer", - "countryName": "USA", - "countryCode": "US", - "city": "New York", - "hobbyCustomField": "Sample Hobby" - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "identifyId": "absent-id", - "type": "USER", - "gender": "MALE", - "email": "user@email.com", - "firstName": "Sample", - "lastName": "User", - "signUpDate": 1624431528295, - "createDate": 1571043797562, - "title": "engineer", - "propertyKeys": [ - "AP-XABC-123" - ], - "location": { - "countryName": "USA", - "countryCode": "US", - "city": "New York" - }, - "customAttributes": { - "hobby": "Sample Hobby" - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "X-APTRINSIC-API-KEY": "sample-api-key", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api.aptrinsic.com/v1/users", - "userId": "" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "gainsight_px", - "description": "Test 12", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "destination": { - "Config": { - "apiKey": "sample-api-key", - "productTagKey": "AP-XABC-123", - "accountAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "userAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "globalContextMap": [] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "userId": "absent-id", - "anonymousId": "sample-anon-id", - "type": "identify", - "traits": { - "type": "USER", - "gender": "MALE", - "email": "user@email.com", - "firstName": "Sample", - "lastName": "User", - "signUpDate": 1624431528295, - "title": "engineer", - "countryName": "USA", - "countryCode": "US", - "city": "New York", - "hobbyCustomField": "Sample Hobby", - "accountId": 1234 - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "identifyId": "absent-id", - "type": "USER", - "gender": "MALE", - "email": "user@email.com", - "firstName": "Sample", - "lastName": "User", - "signUpDate": 1624431528295, - "createDate": 1571043797562, - "title": "engineer", - "propertyKeys": [ - "AP-XABC-123" - ], - "accountId": "1234", - "location": { - "countryName": "USA", - "countryCode": "US", - "city": "New York" - }, - "customAttributes": {} - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "X-APTRINSIC-API-KEY": "sample-api-key", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api.aptrinsic.com/v1/users", - "userId": "" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "gainsight_px", - "description": "Test 13", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "destination": { - "Config": { - "apiKey": "sample-api-key", - "productTagKey": "AP-XABC-123", - "accountAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "userAttributeMap": [], - "globalContextMap": [] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "type": "USER", - "gender": "MALE", - "email": "user@email.com", - "firstName": "Sample", - "lastName": "User" - } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "sample-anon-id", - "userId": "absent-id", - "groupId": "ecorp-id", - "type": "group", - "traits": { - "name": "ECorp", - "industry": "software", - "numberOfEmployees": 400, - "website": "www.ecorp.com", - "plan": "premium", - "term": null - }, - "integrations": { - "All": true, - "GAINSIGHT_PX": { - "limitAPIForGroup": true - } - }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "PUT", - "endpoint": "https://api.aptrinsic.com/v1/users/absent-id", - "headers": { - "X-APTRINSIC-API-KEY": "sample-api-key", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "accountId": "ecorp-id" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "gainsight_px", - "description": "Test 14", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "destination": { - "Config": { - "apiKey": "sample-api-key", - "productTagKey": "AP-XABC-123", - "accountAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "userAttributeMap": [ - { - "from": "hobbyCustomField", - "to": "hobby" - } - ], - "globalContextMap": [] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "userId": "sample-user-id", - "anonymousId": "sample-anon-id", - "type": "identify", - "traits": { - "type": "USER", - "gender": "MALE", - "email": "user@email.com", - "firstName": "Sample", - "lastName": "User", - "signUpDate": 1624431528295, - "title": "engineer", - "countryName": "USA", - "countryCode": "US", - "city": "New York", - "hobbyCustomField": "Sample Hobby", - "term": null, - "campaign": "" - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "type": "USER", - "gender": "MALE", - "email": "user@email.com", - "firstName": "Sample", - "lastName": "User", - "signUpDate": 1624431528295, - "createDate": 1571043797562, - "title": "engineer", - "propertyKeys": [ - "AP-XABC-123" - ], - "location": { - "countryName": "USA", - "countryCode": "US", - "city": "New York" - }, - "customAttributes": { - "hobby": "Sample Hobby" - } - } - }, - "type": "REST", - "files": {}, - "method": "PUT", - "params": {}, - "headers": { - "X-APTRINSIC-API-KEY": "sample-api-key", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api.aptrinsic.com/v1/users/sample-user-id", - "userId": "" - }, - "statusCode": 200 - } - ] - } - } - } -] \ No newline at end of file + { + name: 'gainsight_px', + description: 'Test 0', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'sample-api-key', + productTagKey: 'AP-XABC-123', + accountAttributeMap: [ + { + from: '', + to: '', + }, + ], + userAttributeMap: [ + { + from: '', + to: '', + }, + ], + globalContextMap: [ + { + from: 'projectId', + to: 'p-123', + }, + { + from: 'tag', + to: 'sample-category-tag', + }, + ], + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + userId: 'sample-user-id', + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: 'sample-anon-id', + type: 'track', + event: 'Product Added', + properties: { + product_id: '123', + sku: 'F16', + category: 'Games', + name: 'Game', + brand: 'Gamepro', + variant: '111', + price: 13.49, + quantity: 11, + coupon: 'DISC21', + position: 1, + url: 'https://www.website.com/product/path', + image_url: 'https://www.website.com/product/path.png', + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + attributes: { + product_id: '123', + sku: 'F16', + category: 'Games', + name: 'Game', + brand: 'Gamepro', + variant: '111', + price: 13.49, + quantity: 11, + coupon: 'DISC21', + position: 1, + url: 'https://www.website.com/product/path', + image_url: 'https://www.website.com/product/path.png', + }, + propertyKey: 'AP-XABC-123', + userType: 'USER', + identifyId: 'sample-user-id', + date: 1571043797562, + eventName: 'Product Added', + globalContext: { + projectId: 'p-123', + tag: 'sample-category-tag', + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + headers: { + 'X-APTRINSIC-API-KEY': 'sample-api-key', + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api.aptrinsic.com/v1/events/custom', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'gainsight_px', + description: 'Test 1', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'sample-api-key', + productTagKey: 'AP-XABC-123', + accountAttributeMap: [ + { + from: '', + to: '', + }, + ], + userAttributeMap: [ + { + from: '', + to: '', + }, + ], + globalContextMap: [ + { + from: 'projectId', + to: 'p-123', + }, + { + from: 'tag', + to: 'sample-category-tag', + }, + ], + }, + }, + message: { + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + version: '1.27.0', + namespace: 'com.rudderlabs.javascript', + }, + page: { + url: 'http://127.0.0.1:8887/', + path: '/', + title: 'RudderStack in 5', + search: '', + tab_url: 'http://127.0.0.1:8887/', + referrer: '$direct', + initial_referrer: '$direct', + referring_domain: '', + initial_referring_domain: '', + }, + locale: 'en-US', + screen: { + width: 1512, + height: 982, + density: 2, + innerWidth: 774, + innerHeight: 774, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.27.0', + }, + campaign: {}, + sessionId: 1679967592314, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36', + properties: { + email: '84@84.com', + price: '56.0', + quantity: '5', + }, + }, + userId: 'sample-user-id', + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: 'sample-anon-id', + type: 'track', + event: 'Marketing - Plan Change Events', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + attributes: {}, + url: 'http://127.0.0.1:8887/', + propertyKey: 'AP-XABC-123', + userType: 'USER', + identifyId: 'sample-user-id', + referrer: '$direct', + date: 1571043797562, + sessionId: 1679967592314, + eventName: 'Marketing - Plan Change Events', + globalContext: { + projectId: 'p-123', + tag: 'sample-category-tag', + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + headers: { + 'X-APTRINSIC-API-KEY': 'sample-api-key', + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api.aptrinsic.com/v1/events/custom', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'gainsight_px', + description: 'Test 2', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'sample-api-key', + productTagKey: 'AP-XABC-123', + accountAttributeMap: [ + { + from: '', + to: '', + }, + ], + userAttributeMap: [ + { + from: '', + to: '', + }, + ], + globalContextMap: [ + { + from: 'projectId', + to: 'p-123', + }, + { + from: 'tag', + to: 'sample-category-tag', + }, + ], + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + userId: 'sample-user-id', + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: 'sample-anon-id', + type: 'track', + event: 'Track Me', + properties: { + description: 'Sample Track call', + globalContext: { + testOverride: 'some-value', + }, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + attributes: { + description: 'Sample Track call', + }, + propertyKey: 'AP-XABC-123', + userType: 'USER', + identifyId: 'sample-user-id', + date: 1571043797562, + eventName: 'Track Me', + globalContext: { + testOverride: 'some-value', + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + headers: { + 'X-APTRINSIC-API-KEY': 'sample-api-key', + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api.aptrinsic.com/v1/events/custom', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'gainsight_px', + description: 'Test 3', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'sample-api-key', + productTagKey: 'AP-XABC-123', + accountAttributeMap: [ + { + from: '', + to: '', + }, + ], + userAttributeMap: [ + { + from: 'hobbyCustomField', + to: 'hobby', + }, + ], + globalContextMap: [], + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + userId: 'sample-user-id', + anonymousId: 'sample-anon-id', + type: 'identify', + traits: { + type: 'USER', + gender: 'MALE', + email: 'user@email.com', + firstName: 'Sample', + lastName: 'User', + signUpDate: 1624431528295, + title: 'engineer', + countryName: 'USA', + countryCode: 'US', + city: 'New York', + hobbyCustomField: 'Sample Hobby', + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + type: 'USER', + gender: 'MALE', + email: 'user@email.com', + firstName: 'Sample', + lastName: 'User', + signUpDate: 1624431528295, + title: 'engineer', + propertyKeys: ['AP-XABC-123'], + location: { + countryName: 'USA', + countryCode: 'US', + city: 'New York', + }, + customAttributes: { + hobby: 'Sample Hobby', + }, + }, + }, + type: 'REST', + files: {}, + method: 'PUT', + params: {}, + headers: { + 'X-APTRINSIC-API-KEY': 'sample-api-key', + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api.aptrinsic.com/v1/users/sample-user-id', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'gainsight_px', + description: 'Test 4', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'sample-api-key', + productTagKey: 'AP-XABC-123', + accountAttributeMap: [ + { + from: '', + to: '', + }, + ], + userAttributeMap: [], + globalContextMap: [], + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + type: 'USER', + gender: 'MALE', + email: 'user@email.com', + firstName: 'Sample', + lastName: 'User', + medium: null, + }, + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: 'sample-anon-id', + userId: 'sample-user-id', + groupId: 'ecorp-id', + type: 'group', + traits: { + name: 'ECorp', + industry: 'software', + numberOfEmployees: 400, + website: 'www.ecorp.com', + plan: 'premium', + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + accountId: 'ecorp-id', + }, + }, + type: 'REST', + files: {}, + method: 'PUT', + params: {}, + headers: { + 'X-APTRINSIC-API-KEY': 'sample-api-key', + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api.aptrinsic.com/v1/users/sample-user-id', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'gainsight_px', + description: 'Test 5', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'sample-api-key', + productTagKey: 'AP-XABC-123', + accountAttributeMap: [ + { + from: '', + to: '', + }, + ], + userAttributeMap: [ + { + from: 'hobbyCustomField', + to: 'hobby', + }, + ], + globalContextMap: [], + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + type: 'identify', + traits: { + type: 'USER', + gender: 'MALE', + email: 'user@email.com', + firstName: 'Sample', + lastName: 'User', + signUpDate: 1624431528295, + title: 'engineer', + countryName: 'USA', + countryCode: 'US', + city: 'New York', + hobbyCustomField: 'Sample Hobby', + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'userId or anonymousId is required for identify', + statTags: { + destType: 'GAINSIGHT_PX', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'gainsight_px', + description: 'Test 6', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'sample-api-key', + productTagKey: 'AP-XABC-123', + accountAttributeMap: [ + { + from: '', + to: '', + }, + ], + userAttributeMap: [ + { + from: '', + to: '', + }, + ], + globalContextMap: [ + { + from: 'projectId', + to: 'p-123', + }, + { + from: 'tag', + to: 'sample-category-tag', + }, + ], + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + type: 'track', + event: 'Product Added', + properties: { + product_id: '123', + sku: 'F16', + category: 'Games', + name: 'Game', + brand: 'Gamepro', + variant: '111', + price: 13.49, + quantity: 11, + coupon: 'DISC21', + position: 1, + url: 'https://www.website.com/product/path', + image_url: 'https://www.website.com/product/path.png', + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Missing required value from "userId"', + statTags: { + destType: 'GAINSIGHT_PX', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'gainsight_px', + description: 'Test 7', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'sample-api-key', + productTagKey: 'AP-XABC-123', + accountAttributeMap: [ + { + from: '', + to: '', + }, + ], + userAttributeMap: [], + globalContextMap: [], + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + type: 'USER', + gender: 'MALE', + email: 'user@email.com', + firstName: 'Sample', + lastName: 'User', + }, + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: 'sample-anon-id', + userId: 'sample-user-id', + type: 'group', + traits: { + name: 'ECorp', + industry: 'software', + numberOfEmployees: 400, + website: 'www.ecorp.com', + plan: 'premium', + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'groupId is required for group', + statTags: { + destType: 'GAINSIGHT_PX', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'gainsight_px', + description: 'Test 8', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'sample-api-key', + productTagKey: 'AP-XABC-123', + accountAttributeMap: [ + { + from: '', + to: '', + }, + ], + userAttributeMap: [ + { + from: '', + to: '', + }, + ], + globalContextMap: [ + { + from: 'projectId', + to: 'p-123', + }, + { + from: 'tag', + to: 'sample-category-tag', + }, + ], + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + userId: 'sample-user-id', + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: 'sample-anon-id', + type: 'track', + event: 'Stringify Test', + properties: { + description: 'Stringify test for object values', + nested: { + a: [1, 2, 3], + b: { + c: 1, + }, + }, + arr: [1, 2, 3], + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + attributes: { + description: 'Stringify test for object values', + nested: '{"a":[1,2,3],"b":{"c":1}}', + arr: '[1,2,3]', + }, + propertyKey: 'AP-XABC-123', + userType: 'USER', + identifyId: 'sample-user-id', + date: 1571043797562, + eventName: 'Stringify Test', + globalContext: { + projectId: 'p-123', + tag: 'sample-category-tag', + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + headers: { + 'X-APTRINSIC-API-KEY': 'sample-api-key', + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api.aptrinsic.com/v1/events/custom', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'gainsight_px', + description: 'Test 9', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'sample-api-key', + productTagKey: 'AP-XABC-123', + accountAttributeMap: [ + { + from: '', + to: '', + }, + ], + userAttributeMap: [ + { + from: '', + to: '', + }, + ], + globalContextMap: [ + { + from: 'projectId', + to: 'p-123', + }, + { + from: 'tag', + to: 'sample-category-tag', + }, + ], + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + userId: 'sample-user-id', + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: 'sample-anon-id', + type: 'track', + event: 'Stringify Test', + properties: { + description: 'Stringify test for object values', + nested: { + a: [1, 2, 3], + b: { + c: 1, + }, + }, + arr: [1, 2, 3], + globalContext: { + someKey: 'someVal', + }, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + attributes: { + description: 'Stringify test for object values', + nested: '{"a":[1,2,3],"b":{"c":1}}', + arr: '[1,2,3]', + }, + propertyKey: 'AP-XABC-123', + userType: 'USER', + identifyId: 'sample-user-id', + date: 1571043797562, + eventName: 'Stringify Test', + globalContext: { + someKey: 'someVal', + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + headers: { + 'X-APTRINSIC-API-KEY': 'sample-api-key', + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api.aptrinsic.com/v1/events/custom', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'gainsight_px', + description: 'Test 10', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'sample-api-key', + productTagKey: 'AP-XABC-123', + accountAttributeMap: [ + { + from: '', + to: '', + }, + ], + userAttributeMap: [], + globalContextMap: [], + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + type: 'USER', + gender: 'MALE', + email: 'user@email.com', + firstName: 'Sample', + lastName: 'User', + }, + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: 'sample-anon-id', + userId: 'absent-id', + groupId: 'ecorp-id', + type: 'group', + traits: { + name: 'ECorp', + industry: 'software', + numberOfEmployees: 400, + website: 'www.ecorp.com', + plan: 'premium', + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: + 'aborting group call: {"status":"NOT_FOUND","message":"User was not found for parameters {id=absent-id}","debugMessage":null,"subErrors":null}', + statTags: { + destType: 'GAINSIGHT_PX', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'gainsight_px', + description: 'Test 11', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'sample-api-key', + productTagKey: 'AP-XABC-123', + accountAttributeMap: [ + { + from: '', + to: '', + }, + ], + userAttributeMap: [ + { + from: 'hobbyCustomField', + to: 'hobby', + }, + ], + globalContextMap: [], + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + userId: 'absent-id', + anonymousId: 'sample-anon-id', + type: 'identify', + traits: { + type: 'USER', + gender: 'MALE', + email: 'user@email.com', + firstName: 'Sample', + lastName: 'User', + signUpDate: 1624431528295, + title: 'engineer', + countryName: 'USA', + countryCode: 'US', + city: 'New York', + hobbyCustomField: 'Sample Hobby', + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + identifyId: 'absent-id', + type: 'USER', + gender: 'MALE', + email: 'user@email.com', + firstName: 'Sample', + lastName: 'User', + signUpDate: 1624431528295, + createDate: 1571043797562, + title: 'engineer', + propertyKeys: ['AP-XABC-123'], + location: { + countryName: 'USA', + countryCode: 'US', + city: 'New York', + }, + customAttributes: { + hobby: 'Sample Hobby', + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + headers: { + 'X-APTRINSIC-API-KEY': 'sample-api-key', + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api.aptrinsic.com/v1/users', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'gainsight_px', + description: 'Test 12', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'sample-api-key', + productTagKey: 'AP-XABC-123', + accountAttributeMap: [ + { + from: '', + to: '', + }, + ], + userAttributeMap: [ + { + from: '', + to: '', + }, + ], + globalContextMap: [], + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + userId: 'absent-id', + anonymousId: 'sample-anon-id', + type: 'identify', + traits: { + type: 'USER', + gender: 'MALE', + email: 'user@email.com', + firstName: 'Sample', + lastName: 'User', + signUpDate: 1624431528295, + title: 'engineer', + countryName: 'USA', + countryCode: 'US', + city: 'New York', + hobbyCustomField: 'Sample Hobby', + accountId: 1234, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + identifyId: 'absent-id', + type: 'USER', + gender: 'MALE', + email: 'user@email.com', + firstName: 'Sample', + lastName: 'User', + signUpDate: 1624431528295, + createDate: 1571043797562, + title: 'engineer', + propertyKeys: ['AP-XABC-123'], + accountId: '1234', + location: { + countryName: 'USA', + countryCode: 'US', + city: 'New York', + }, + customAttributes: {}, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + headers: { + 'X-APTRINSIC-API-KEY': 'sample-api-key', + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api.aptrinsic.com/v1/users', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'gainsight_px', + description: 'Test 13', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'sample-api-key', + productTagKey: 'AP-XABC-123', + accountAttributeMap: [ + { + from: '', + to: '', + }, + ], + userAttributeMap: [], + globalContextMap: [], + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + type: 'USER', + gender: 'MALE', + email: 'user@email.com', + firstName: 'Sample', + lastName: 'User', + }, + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: 'sample-anon-id', + userId: 'absent-id', + groupId: 'ecorp-id', + type: 'group', + traits: { + name: 'ECorp', + industry: 'software', + numberOfEmployees: 400, + website: 'www.ecorp.com', + plan: 'premium', + term: null, + }, + integrations: { + All: true, + GAINSIGHT_PX: { + limitAPIForGroup: true, + }, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'PUT', + endpoint: 'https://api.aptrinsic.com/v1/users/absent-id', + headers: { + 'X-APTRINSIC-API-KEY': 'sample-api-key', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + accountId: 'ecorp-id', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'gainsight_px', + description: 'Test 14 : existing user with no createdAt field in traits but signUpDate exists', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'sample-api-key', + productTagKey: 'AP-XABC-123', + accountAttributeMap: [ + { + from: '', + to: '', + }, + ], + userAttributeMap: [ + { + from: 'hobbyCustomField', + to: 'hobby', + }, + ], + globalContextMap: [], + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + userId: 'sample-user-id', + anonymousId: 'sample-anon-id', + type: 'identify', + traits: { + type: 'USER', + gender: 'MALE', + email: 'user@email.com', + firstName: 'Sample', + lastName: 'User', + signUpDate: 1624431528295, + title: 'engineer', + countryName: 'USA', + countryCode: 'US', + city: 'New York', + hobbyCustomField: 'Sample Hobby', + term: null, + campaign: '', + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + type: 'USER', + gender: 'MALE', + email: 'user@email.com', + firstName: 'Sample', + lastName: 'User', + signUpDate: 1624431528295, + title: 'engineer', + propertyKeys: ['AP-XABC-123'], + location: { + countryName: 'USA', + countryCode: 'US', + city: 'New York', + }, + customAttributes: { + hobby: 'Sample Hobby', + }, + }, + }, + type: 'REST', + files: {}, + method: 'PUT', + params: {}, + headers: { + 'X-APTRINSIC-API-KEY': 'sample-api-key', + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api.aptrinsic.com/v1/users/sample-user-id', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'gainsight_px', + description: 'Test 15 : new user with no signUpDate and createDate in traits', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'sample-api-key', + productTagKey: 'AP-XABC-123', + accountAttributeMap: [ + { + from: '', + to: '', + }, + ], + userAttributeMap: [ + { + from: 'hobbyCustomField', + to: 'hobby', + }, + ], + globalContextMap: [], + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + userId: 'absent-id', + anonymousId: 'sample-anon-id', + type: 'identify', + traits: { + type: 'USER', + gender: 'MALE', + email: 'user@email.com', + firstName: 'Sample', + lastName: 'User', + title: 'engineer', + countryName: 'USA', + countryCode: 'US', + city: 'New York', + hobbyCustomField: 'Sample Hobby', + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + identifyId: 'absent-id', + type: 'USER', + gender: 'MALE', + email: 'user@email.com', + firstName: 'Sample', + lastName: 'User', + signUpDate: 1571043797562, + createDate: 1571043797562, + title: 'engineer', + propertyKeys: ['AP-XABC-123'], + location: { + countryName: 'USA', + countryCode: 'US', + city: 'New York', + }, + customAttributes: { + hobby: 'Sample Hobby', + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + headers: { + 'X-APTRINSIC-API-KEY': 'sample-api-key', + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api.aptrinsic.com/v1/users', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'gainsight_px', + description: 'Test 16 : existing user with no signUpDate and createDate in traits', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1uLy1tqsoo9RhL1zLiqLQTKBIKL', + Name: 'gainsight-px-dest', + DestinationDefinition: { + ID: '1uLuOdwPCqtei55ZKXewwPhjQPf', + Name: 'GAINSIGHT_PX', + DisplayName: 'Gainsight PX', + Config: { + destConfig: { + defaultConfig: [ + 'apiKey', + 'productTagKey', + 'userAttributeMap', + 'accountAttributeMap', + 'globalContextMap', + ], + }, + excludeKeys: [], + includeKeys: [], + saveDestinationResponse: true, + secretKeys: ['apiKey', 'productTagKey'], + supportedSourceTypes: [ + 'android', + 'ios', + 'web', + 'unity', + 'amp', + 'cloud', + 'reactnative', + 'flutter', + ], + transformAt: 'router', + transformAtV1: 'router', + }, + ResponseRules: {}, + }, + Config: { + accountAttributeMap: [ + { + from: 'cultureCustomField', + to: 'culture', + }, + ], + apiKey: 'sample-api-key', + eventDelivery: false, + eventDeliveryTS: 1624472902670, + globalContextMap: [ + { + from: 'kubrickTest', + to: 'value', + }, + ], + productTagKey: 'AP-SAMPLE-2', + userAttributeMap: [ + { + from: 'hobbyCustomField', + to: 'hobby', + }, + ], + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + message: { + type: 'identify', + sentAt: '2021-06-25T08:59:52.891Z', + userId: 'stanley-kubrick', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.18', + namespace: 'com.rudderlabs.javascript', + }, + page: { + title: 'Test', + search: '', + path: 'index.html', + url: 'http://127.0.0.1:3003/index.html', + tab_url: 'http://127.0.0.1:3003/index.html', + referrer: '$direct', + initial_referrer: '$direct', + referring_domain: '', + initial_referring_domain: '', + }, + locale: 'en-GB', + screen: { + width: 1920, + height: 1080, + density: 1, + innerWidth: 1920, + innerHeight: 436, + }, + traits: { + name: 'Stanley Kubrick', + email: 'stanley@kubrick.com', + score: 100, + title: 'Director/Film Maker', + gender: 'Male', + countryCode: 'US', + countryName: 'USA', + hobbyCustomField: 'Making films. Being a genius', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.18', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36', + }, + rudderId: '9a7820d0-0ff2-4451-b655-682cec15cbd2', + messageId: 'ff90d62e-a6e3-4e23-af20-03b4a249ef48', + timestamp: '2021-06-25T14:29:52.911+05:30', + receivedAt: '2021-06-25T14:29:52.911+05:30', + request_ip: '[::1]', + anonymousId: '1585ea2f-dddc-4d23-935f-c1196405d61e', + integrations: { + All: true, + }, + originalTimestamp: '2021-06-25T08:59:52.891Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'PUT', + endpoint: 'https://api.aptrinsic.com/v1/users/stanley-kubrick', + userId: '', + headers: { + 'X-APTRINSIC-API-KEY': 'sample-api-key', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + email: 'stanley@kubrick.com', + gender: 'MALE', + title: 'Director/Film Maker', + score: 100, + location: { + countryName: 'USA', + countryCode: 'US', + }, + firstName: 'Stanley', + lastName: 'Kubrick', + customAttributes: { + hobby: 'Making films. Being a genius', + }, + propertyKeys: ['AP-SAMPLE-2'], + type: 'USER', + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + }, + statusCode: 200, + }, + ], + }, + }, + }, +]; diff --git a/test/integrations/destinations/gainsight_px/router/data.ts b/test/integrations/destinations/gainsight_px/router/data.ts index 4017a3ddb7..3b735c5b69 100644 --- a/test/integrations/destinations/gainsight_px/router/data.ts +++ b/test/integrations/destinations/gainsight_px/router/data.ts @@ -1,558 +1,557 @@ export const data = [ - { - name: 'gainsight_px', - description: 'Test 0', - feature: 'router', - module: 'destination', - version: 'v0', - input: { - request: { - body: { - input: [ - { - "message": { - "type": "identify", - "sentAt": "2021-06-25T08:59:52.891Z", - "userId": "stanley-kubrick", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.18", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "title": "Test", - "search": "", - "path": "index.html", - "url": "http://127.0.0.1:3003/index.html", - "tab_url": "http://127.0.0.1:3003/index.html", - "referrer": "$direct", - "initial_referrer": "$direct", - "referring_domain": "", - "initial_referring_domain": "" - }, - "locale": "en-GB", - "screen": { - "width": 1920, - "height": 1080, - "density": 1, - "innerWidth": 1920, - "innerHeight": 436 - }, - "traits": { - "name": "Stanley Kubrick", - "email": "stanley@kubrick.com", - "score": 100, - "title": "Director/Film Maker", - "gender": "Male", - "countryCode": "US", - "countryName": "USA", - "hobbyCustomField": "Making films. Being a genius" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.18" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36" - }, - "rudderId": "9a7820d0-0ff2-4451-b655-682cec15cbd2", - "messageId": "ff90d62e-a6e3-4e23-af20-03b4a249ef48", - "timestamp": "2021-06-25T14:29:52.911+05:30", - "receivedAt": "2021-06-25T14:29:52.911+05:30", - "request_ip": "[::1]", - "anonymousId": "1585ea2f-dddc-4d23-935f-c1196405d61e", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-06-25T08:59:52.891Z" - }, - "metadata": { - "userId": "9a7820d0-0ff2-4451-b655-682cec15cbd2", - "jobId": 1, - "sourceId": "1s9eG8UCer6YSKsD8ZlQCyLa3pj", - "destinationId": "1uLy1tqsoo9RhL1zLiqLQTKBIKL", - "attemptNum": 0, - "receivedAt": "2021-06-25T14:29:52.911+05:30", - "createdAt": "2021-06-25T08:59:56.329Z", - "firstAttemptedAt": "", - "transformAt": "router" - }, - "destination": { - "ID": "1uLy1tqsoo9RhL1zLiqLQTKBIKL", - "Name": "gainsight-px-dest", - "DestinationDefinition": { - "ID": "1uLuOdwPCqtei55ZKXewwPhjQPf", - "Name": "GAINSIGHT_PX", - "DisplayName": "Gainsight PX", - "Config": { - "destConfig": { - "defaultConfig": [ - "apiKey", - "productTagKey", - "userAttributeMap", - "accountAttributeMap", - "globalContextMap" - ] - }, - "excludeKeys": [], - "includeKeys": [], - "saveDestinationResponse": true, - "secretKeys": ["apiKey", "productTagKey"], - "supportedSourceTypes": [ - "android", - "ios", - "web", - "unity", - "amp", - "cloud", - "reactnative", - "flutter" - ], - "transformAt": "router", - "transformAtV1": "router" - }, - "ResponseRules": {} - }, - "Config": { - "accountAttributeMap": [ - { - "from": "cultureCustomField", - "to": "culture" - } - ], - "apiKey": "sample-api-key", - "eventDelivery": false, - "eventDeliveryTS": 1624472902670, - "globalContextMap": [ - { - "from": "kubrickTest", - "to": "value" - } - ], - "productTagKey": "AP-SAMPLE-2", - "userAttributeMap": [ - { - "from": "hobbyCustomField", - "to": "hobby" - } - ] - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": true - } - }, - { - "message": { - "type": "track", - "event": "nested test2", - "sentAt": "2021-06-26T10:41:22.316Z", - "userId": "adifhas9734", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.18", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "file:///Users/anurajguha/workspace/simple-html-test/index.html", - "path": "/Users/anurajguha/workspace/simple-html-test/index.html", - "title": "Test", - "search": "", - "tab_url": "file:///Users/anurajguha/workspace/simple-html-test/index.html", - "referrer": "$direct", - "initial_referrer": "$direct", - "referring_domain": "", - "initial_referring_domain": "" - }, - "locale": "en-GB", - "screen": { - "width": 1920, - "height": 1080, - "density": 1, - "innerWidth": 1920, - "innerHeight": 585 - }, - "traits": { - "name": "Update test unique", - "phone": "9900990899", - "lastname": "user6", - "firstname": "test", - "previousCompany": "testprevCompany2" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.18" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36" - }, - "rudderId": "a27a8a8a-9e81-4898-beeb-e6041fc1552d", - "messageId": "595dae36-5e4f-4feb-a2e4-8a7849615d38", - "timestamp": "2021-06-26T16:11:22.335+05:30", - "properties": { - "array": [1, 2, 3], - "nested": { - "json": "test" - }, - "status": "testing", - "description": "Example track call", - "fullyNested": [ - { - "a": 1, - "b": 2 - }, - { - "a": 1, - "b": [1, 2, 3] - } - ] - }, - "receivedAt": "2021-06-26T16:11:22.335+05:30", - "request_ip": "[::1]", - "anonymousId": "1585ea2f-dddc-4d23-935f-c1196405d61e", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-06-26T10:41:22.316Z" - }, - "metadata": { - "userId": "a27a8a8a-9e81-4898-beeb-e6041fc1552d", - "jobId": 2, - "sourceId": "1s9eG8UCer6YSKsD8ZlQCyLa3pj", - "destinationId": "1uLy1tqsoo9RhL1zLiqLQTKBIKL", - "attemptNum": 0, - "receivedAt": "2021-06-26T16:11:22.335+05:30", - "createdAt": "2021-06-26T10:41:24.126Z", - "firstAttemptedAt": "", - "transformAt": "router" - }, - "destination": { - "ID": "1uLy1tqsoo9RhL1zLiqLQTKBIKL", - "Name": "gainsight-px-dest", - "DestinationDefinition": { - "ID": "1uLuOdwPCqtei55ZKXewwPhjQPf", - "Name": "GAINSIGHT_PX", - "DisplayName": "Gainsight PX", - "Config": { - "destConfig": { - "defaultConfig": [ - "apiKey", - "productTagKey", - "userAttributeMap", - "accountAttributeMap", - "globalContextMap" - ] - }, - "excludeKeys": [], - "includeKeys": [], - "saveDestinationResponse": true, - "secretKeys": ["apiKey", "productTagKey"], - "supportedSourceTypes": [ - "android", - "ios", - "web", - "unity", - "amp", - "cloud", - "reactnative", - "flutter" - ], - "transformAt": "router", - "transformAtV1": "router" - }, - "ResponseRules": {} - }, - "Config": { - "accountAttributeMap": [ - { - "from": "cultureCustomField", - "to": "culture" - } - ], - "apiKey": "sample-api-key", - "eventDelivery": false, - "eventDeliveryTS": 1624472902670, - "globalContextMap": [ - { - "from": "kubrickTest", - "to": "value" - } - ], - "productTagKey": "AP-SAMPLE-2", - "userAttributeMap": [ - { - "from": "hobbyCustomField", - "to": "hobby" - } - ] - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": true - } - } - ] - , - destType: 'gainsight_px', + { + name: 'gainsight_px', + description: 'Test 0', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + message: { + type: 'identify', + sentAt: '2021-06-25T08:59:52.891Z', + userId: 'stanley-kubrick', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.18', + namespace: 'com.rudderlabs.javascript', + }, + page: { + title: 'Test', + search: '', + path: 'index.html', + url: 'http://127.0.0.1:3003/index.html', + tab_url: 'http://127.0.0.1:3003/index.html', + referrer: '$direct', + initial_referrer: '$direct', + referring_domain: '', + initial_referring_domain: '', + }, + locale: 'en-GB', + screen: { + width: 1920, + height: 1080, + density: 1, + innerWidth: 1920, + innerHeight: 436, + }, + traits: { + name: 'Stanley Kubrick', + email: 'stanley@kubrick.com', + score: 100, + title: 'Director/Film Maker', + gender: 'Male', + countryCode: 'US', + countryName: 'USA', + hobbyCustomField: 'Making films. Being a genius', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.18', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36', + }, + rudderId: '9a7820d0-0ff2-4451-b655-682cec15cbd2', + messageId: 'ff90d62e-a6e3-4e23-af20-03b4a249ef48', + timestamp: '2021-06-25T14:29:52.911+05:30', + receivedAt: '2021-06-25T14:29:52.911+05:30', + request_ip: '[::1]', + anonymousId: '1585ea2f-dddc-4d23-935f-c1196405d61e', + integrations: { + All: true, + }, + originalTimestamp: '2021-06-25T08:59:52.891Z', + }, + metadata: { + userId: '9a7820d0-0ff2-4451-b655-682cec15cbd2', + jobId: 1, + sourceId: '1s9eG8UCer6YSKsD8ZlQCyLa3pj', + destinationId: '1uLy1tqsoo9RhL1zLiqLQTKBIKL', + attemptNum: 0, + receivedAt: '2021-06-25T14:29:52.911+05:30', + createdAt: '2021-06-25T08:59:56.329Z', + firstAttemptedAt: '', + transformAt: 'router', + }, + destination: { + ID: '1uLy1tqsoo9RhL1zLiqLQTKBIKL', + Name: 'gainsight-px-dest', + DestinationDefinition: { + ID: '1uLuOdwPCqtei55ZKXewwPhjQPf', + Name: 'GAINSIGHT_PX', + DisplayName: 'Gainsight PX', + Config: { + destConfig: { + defaultConfig: [ + 'apiKey', + 'productTagKey', + 'userAttributeMap', + 'accountAttributeMap', + 'globalContextMap', + ], + }, + excludeKeys: [], + includeKeys: [], + saveDestinationResponse: true, + secretKeys: ['apiKey', 'productTagKey'], + supportedSourceTypes: [ + 'android', + 'ios', + 'web', + 'unity', + 'amp', + 'cloud', + 'reactnative', + 'flutter', + ], + transformAt: 'router', + transformAtV1: 'router', + }, + ResponseRules: {}, }, + Config: { + accountAttributeMap: [ + { + from: 'cultureCustomField', + to: 'culture', + }, + ], + apiKey: 'sample-api-key', + eventDelivery: false, + eventDeliveryTS: 1624472902670, + globalContextMap: [ + { + from: 'kubrickTest', + to: 'value', + }, + ], + productTagKey: 'AP-SAMPLE-2', + userAttributeMap: [ + { + from: 'hobbyCustomField', + to: 'hobby', + }, + ], + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, }, + { + message: { + type: 'track', + event: 'nested test2', + sentAt: '2021-06-26T10:41:22.316Z', + userId: 'adifhas9734', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.18', + namespace: 'com.rudderlabs.javascript', + }, + page: { + url: 'file:///Users/anurajguha/workspace/simple-html-test/index.html', + path: '/Users/anurajguha/workspace/simple-html-test/index.html', + title: 'Test', + search: '', + tab_url: 'file:///Users/anurajguha/workspace/simple-html-test/index.html', + referrer: '$direct', + initial_referrer: '$direct', + referring_domain: '', + initial_referring_domain: '', + }, + locale: 'en-GB', + screen: { + width: 1920, + height: 1080, + density: 1, + innerWidth: 1920, + innerHeight: 585, + }, + traits: { + name: 'Update test unique', + phone: '9900990899', + lastname: 'user6', + firstname: 'test', + previousCompany: 'testprevCompany2', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.18', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36', + }, + rudderId: 'a27a8a8a-9e81-4898-beeb-e6041fc1552d', + messageId: '595dae36-5e4f-4feb-a2e4-8a7849615d38', + timestamp: '2021-06-26T16:11:22.335+05:30', + properties: { + array: [1, 2, 3], + nested: { + json: 'test', + }, + status: 'testing', + description: 'Example track call', + fullyNested: [ + { + a: 1, + b: 2, + }, + { + a: 1, + b: [1, 2, 3], + }, + ], + }, + receivedAt: '2021-06-26T16:11:22.335+05:30', + request_ip: '[::1]', + anonymousId: '1585ea2f-dddc-4d23-935f-c1196405d61e', + integrations: { + All: true, + }, + originalTimestamp: '2021-06-26T10:41:22.316Z', + }, + metadata: { + userId: 'a27a8a8a-9e81-4898-beeb-e6041fc1552d', + jobId: 2, + sourceId: '1s9eG8UCer6YSKsD8ZlQCyLa3pj', + destinationId: '1uLy1tqsoo9RhL1zLiqLQTKBIKL', + attemptNum: 0, + receivedAt: '2021-06-26T16:11:22.335+05:30', + createdAt: '2021-06-26T10:41:24.126Z', + firstAttemptedAt: '', + transformAt: 'router', + }, + destination: { + ID: '1uLy1tqsoo9RhL1zLiqLQTKBIKL', + Name: 'gainsight-px-dest', + DestinationDefinition: { + ID: '1uLuOdwPCqtei55ZKXewwPhjQPf', + Name: 'GAINSIGHT_PX', + DisplayName: 'Gainsight PX', + Config: { + destConfig: { + defaultConfig: [ + 'apiKey', + 'productTagKey', + 'userAttributeMap', + 'accountAttributeMap', + 'globalContextMap', + ], + }, + excludeKeys: [], + includeKeys: [], + saveDestinationResponse: true, + secretKeys: ['apiKey', 'productTagKey'], + supportedSourceTypes: [ + 'android', + 'ios', + 'web', + 'unity', + 'amp', + 'cloud', + 'reactnative', + 'flutter', + ], + transformAt: 'router', + transformAtV1: 'router', + }, + ResponseRules: {}, + }, + Config: { + accountAttributeMap: [ + { + from: 'cultureCustomField', + to: 'culture', + }, + ], + apiKey: 'sample-api-key', + eventDelivery: false, + eventDeliveryTS: 1624472902670, + globalContextMap: [ + { + from: 'kubrickTest', + to: 'value', + }, + ], + productTagKey: 'AP-SAMPLE-2', + userAttributeMap: [ + { + from: 'hobbyCustomField', + to: 'hobby', + }, + ], + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + }, + ], + destType: 'gainsight_px', }, - output: { - response: { - status: 200, + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'PUT', + endpoint: 'https://api.aptrinsic.com/v1/users/stanley-kubrick', + headers: { + 'X-APTRINSIC-API-KEY': 'sample-api-key', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + email: 'stanley@kubrick.com', + gender: 'MALE', + title: 'Director/Film Maker', + score: 100, + location: { + countryName: 'USA', + countryCode: 'US', + }, + firstName: 'Stanley', + lastName: 'Kubrick', + customAttributes: { + hobby: 'Making films. Being a genius', + }, + propertyKeys: ['AP-SAMPLE-2'], + type: 'USER', + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + }, + metadata: [ + { + userId: '9a7820d0-0ff2-4451-b655-682cec15cbd2', + jobId: 1, + sourceId: '1s9eG8UCer6YSKsD8ZlQCyLa3pj', + destinationId: '1uLy1tqsoo9RhL1zLiqLQTKBIKL', + attemptNum: 0, + receivedAt: '2021-06-25T14:29:52.911+05:30', + createdAt: '2021-06-25T08:59:56.329Z', + firstAttemptedAt: '', + transformAt: 'router', + }, + ], + batched: false, + statusCode: 200, + destination: { + ID: '1uLy1tqsoo9RhL1zLiqLQTKBIKL', + Name: 'gainsight-px-dest', + DestinationDefinition: { + ID: '1uLuOdwPCqtei55ZKXewwPhjQPf', + Name: 'GAINSIGHT_PX', + DisplayName: 'Gainsight PX', + Config: { + destConfig: { + defaultConfig: [ + 'apiKey', + 'productTagKey', + 'userAttributeMap', + 'accountAttributeMap', + 'globalContextMap', + ], + }, + excludeKeys: [], + includeKeys: [], + saveDestinationResponse: true, + secretKeys: ['apiKey', 'productTagKey'], + supportedSourceTypes: [ + 'android', + 'ios', + 'web', + 'unity', + 'amp', + 'cloud', + 'reactnative', + 'flutter', + ], + transformAt: 'router', + transformAtV1: 'router', + }, + ResponseRules: {}, + }, + Config: { + accountAttributeMap: [ + { + from: 'cultureCustomField', + to: 'culture', + }, + ], + apiKey: 'sample-api-key', + eventDelivery: false, + eventDeliveryTS: 1624472902670, + globalContextMap: [ + { + from: 'kubrickTest', + to: 'value', + }, + ], + productTagKey: 'AP-SAMPLE-2', + userAttributeMap: [ + { + from: 'hobbyCustomField', + to: 'hobby', + }, + ], + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + }, + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.aptrinsic.com/v1/events/custom', + headers: { + 'X-APTRINSIC-API-KEY': 'sample-api-key', + 'Content-Type': 'application/json', + }, + params: {}, body: { - output: [ - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "PUT", - "endpoint": "https://api.aptrinsic.com/v1/users/stanley-kubrick", - "headers": { - "X-APTRINSIC-API-KEY": "sample-api-key", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "email": "stanley@kubrick.com", - "gender": "MALE", - "signUpDate": 1624611592911, - "title": "Director/Film Maker", - "score": 100, - "createDate": 1624611592911, - "location": { - "countryName": "USA", - "countryCode": "US" - }, - "firstName": "Stanley", - "lastName": "Kubrick", - "customAttributes": { - "hobby": "Making films. Being a genius" - }, - "propertyKeys": ["AP-SAMPLE-2"], - "type": "USER" - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "userId": "9a7820d0-0ff2-4451-b655-682cec15cbd2", - "jobId": 1, - "sourceId": "1s9eG8UCer6YSKsD8ZlQCyLa3pj", - "destinationId": "1uLy1tqsoo9RhL1zLiqLQTKBIKL", - "attemptNum": 0, - "receivedAt": "2021-06-25T14:29:52.911+05:30", - "createdAt": "2021-06-25T08:59:56.329Z", - "firstAttemptedAt": "", - "transformAt": "router" - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "ID": "1uLy1tqsoo9RhL1zLiqLQTKBIKL", - "Name": "gainsight-px-dest", - "DestinationDefinition": { - "ID": "1uLuOdwPCqtei55ZKXewwPhjQPf", - "Name": "GAINSIGHT_PX", - "DisplayName": "Gainsight PX", - "Config": { - "destConfig": { - "defaultConfig": [ - "apiKey", - "productTagKey", - "userAttributeMap", - "accountAttributeMap", - "globalContextMap" - ] - }, - "excludeKeys": [], - "includeKeys": [], - "saveDestinationResponse": true, - "secretKeys": ["apiKey", "productTagKey"], - "supportedSourceTypes": [ - "android", - "ios", - "web", - "unity", - "amp", - "cloud", - "reactnative", - "flutter" - ], - "transformAt": "router", - "transformAtV1": "router" - }, - "ResponseRules": {} - }, - "Config": { - "accountAttributeMap": [ - { - "from": "cultureCustomField", - "to": "culture" - } - ], - "apiKey": "sample-api-key", - "eventDelivery": false, - "eventDeliveryTS": 1624472902670, - "globalContextMap": [ - { - "from": "kubrickTest", - "to": "value" - } - ], - "productTagKey": "AP-SAMPLE-2", - "userAttributeMap": [ - { - "from": "hobbyCustomField", - "to": "hobby" - } - ] - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": true - } - }, - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.aptrinsic.com/v1/events/custom", - "headers": { - "X-APTRINSIC-API-KEY": "sample-api-key", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "identifyId": "adifhas9734", - "eventName": "nested test2", - "date": 1624704082335, - "attributes": { - "array": "[1,2,3]", - "nested": "{\"json\":\"test\"}", - "status": "testing", - "description": "Example track call", - "fullyNested": "[{\"a\":1,\"b\":2},{\"a\":1,\"b\":[1,2,3]}]" - }, - "url": "file:///Users/anurajguha/workspace/simple-html-test/index.html", - "referrer": "$direct", - "propertyKey": "AP-SAMPLE-2", - "userType": "USER", - "globalContext": { - "kubrickTest": "value" - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "userId": "a27a8a8a-9e81-4898-beeb-e6041fc1552d", - "jobId": 2, - "sourceId": "1s9eG8UCer6YSKsD8ZlQCyLa3pj", - "destinationId": "1uLy1tqsoo9RhL1zLiqLQTKBIKL", - "attemptNum": 0, - "receivedAt": "2021-06-26T16:11:22.335+05:30", - "createdAt": "2021-06-26T10:41:24.126Z", - "firstAttemptedAt": "", - "transformAt": "router" - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "ID": "1uLy1tqsoo9RhL1zLiqLQTKBIKL", - "Name": "gainsight-px-dest", - "DestinationDefinition": { - "ID": "1uLuOdwPCqtei55ZKXewwPhjQPf", - "Name": "GAINSIGHT_PX", - "DisplayName": "Gainsight PX", - "Config": { - "destConfig": { - "defaultConfig": [ - "apiKey", - "productTagKey", - "userAttributeMap", - "accountAttributeMap", - "globalContextMap" - ] - }, - "excludeKeys": [], - "includeKeys": [], - "saveDestinationResponse": true, - "secretKeys": ["apiKey", "productTagKey"], - "supportedSourceTypes": [ - "android", - "ios", - "web", - "unity", - "amp", - "cloud", - "reactnative", - "flutter" - ], - "transformAt": "router", - "transformAtV1": "router" - }, - "ResponseRules": {} - }, - "Config": { - "accountAttributeMap": [ - { - "from": "cultureCustomField", - "to": "culture" - } - ], - "apiKey": "sample-api-key", - "eventDelivery": false, - "eventDeliveryTS": 1624472902670, - "globalContextMap": [ - { - "from": "kubrickTest", - "to": "value" - } - ], - "productTagKey": "AP-SAMPLE-2", - "userAttributeMap": [ - { - "from": "hobbyCustomField", - "to": "hobby" - } - ] - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": true - } - } + JSON: { + identifyId: 'adifhas9734', + eventName: 'nested test2', + date: 1624704082335, + attributes: { + array: '[1,2,3]', + nested: '{"json":"test"}', + status: 'testing', + description: 'Example track call', + fullyNested: '[{"a":1,"b":2},{"a":1,"b":[1,2,3]}]', + }, + url: 'file:///Users/anurajguha/workspace/simple-html-test/index.html', + referrer: '$direct', + propertyKey: 'AP-SAMPLE-2', + userType: 'USER', + globalContext: { + kubrickTest: 'value', + }, + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + }, + metadata: [ + { + userId: 'a27a8a8a-9e81-4898-beeb-e6041fc1552d', + jobId: 2, + sourceId: '1s9eG8UCer6YSKsD8ZlQCyLa3pj', + destinationId: '1uLy1tqsoo9RhL1zLiqLQTKBIKL', + attemptNum: 0, + receivedAt: '2021-06-26T16:11:22.335+05:30', + createdAt: '2021-06-26T10:41:24.126Z', + firstAttemptedAt: '', + transformAt: 'router', + }, + ], + batched: false, + statusCode: 200, + destination: { + ID: '1uLy1tqsoo9RhL1zLiqLQTKBIKL', + Name: 'gainsight-px-dest', + DestinationDefinition: { + ID: '1uLuOdwPCqtei55ZKXewwPhjQPf', + Name: 'GAINSIGHT_PX', + DisplayName: 'Gainsight PX', + Config: { + destConfig: { + defaultConfig: [ + 'apiKey', + 'productTagKey', + 'userAttributeMap', + 'accountAttributeMap', + 'globalContextMap', + ], + }, + excludeKeys: [], + includeKeys: [], + saveDestinationResponse: true, + secretKeys: ['apiKey', 'productTagKey'], + supportedSourceTypes: [ + 'android', + 'ios', + 'web', + 'unity', + 'amp', + 'cloud', + 'reactnative', + 'flutter', ], + transformAt: 'router', + transformAtV1: 'router', + }, + ResponseRules: {}, + }, + Config: { + accountAttributeMap: [ + { + from: 'cultureCustomField', + to: 'culture', + }, + ], + apiKey: 'sample-api-key', + eventDelivery: false, + eventDeliveryTS: 1624472902670, + globalContextMap: [ + { + from: 'kubrickTest', + to: 'value', + }, + ], + productTagKey: 'AP-SAMPLE-2', + userAttributeMap: [ + { + from: 'hobbyCustomField', + to: 'hobby', + }, + ], }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, }, + ], }, + }, }, + }, ]; From e0c225dfab711c1d87d1c5dd1be98fb476548588 Mon Sep 17 00:00:00 2001 From: Mihir Bhalala <77438541+mihir-4116@users.noreply.github.com> Date: Thu, 4 Jan 2024 12:18:51 +0530 Subject: [PATCH 110/135] feat(sprig): added user deletion support (#2886) * feat(sprig): added user deletion support * chore: destination doc link added for reference * chore: code review changes * chore: code review changes --- src/v0/destinations/sprig/deleteUsers.js | 79 +++++++ .../destinations/sprig/deleteUsers/data.ts | 217 ++++++++++++++++++ .../destinations/sprig/network.ts | 79 +++++++ 3 files changed, 375 insertions(+) create mode 100644 src/v0/destinations/sprig/deleteUsers.js create mode 100644 test/integrations/destinations/sprig/deleteUsers/data.ts create mode 100644 test/integrations/destinations/sprig/network.ts diff --git a/src/v0/destinations/sprig/deleteUsers.js b/src/v0/destinations/sprig/deleteUsers.js new file mode 100644 index 0000000000..a886bbbafc --- /dev/null +++ b/src/v0/destinations/sprig/deleteUsers.js @@ -0,0 +1,79 @@ +const { NetworkError, ConfigurationError } = require('@rudderstack/integrations-lib'); +const { httpPOST } = require('../../../adapters/network'); +const { + processAxiosResponse, + getDynamicErrorType, +} = require('../../../adapters/utils/networkUtils'); +const { isHttpStatusSuccess } = require('../../util'); +const { executeCommonValidations } = require('../../util/regulation-api'); +const tags = require('../../util/tags'); +const { getUserIdBatches } = require('../../util/deleteUserUtils'); +const { JSON_MIME_TYPE } = require('../../util/constant'); + +/** + * This function will help to delete the users one by one from the userAttributes array. + * @param {*} userAttributes Array of objects with userId, email and phone + * @param {*} config Destination.Config provided in dashboard + * @returns + */ +const userDeletionHandler = async (userAttributes, config) => { + const { apiKey } = config; + + if (!apiKey) { + throw new ConfigurationError('Api Key is required for user deletion'); + } + + const endpoint = 'https://api.sprig.com/v2/purge/visitors'; + const headers = { + Accept: JSON_MIME_TYPE, + 'Content-Type': JSON_MIME_TYPE, + Authorization: `API-Key ${apiKey}`, + }; + /** + * userIdBatches = [[u1,u2,u3,...batchSize],[u1,u2,u3,...batchSize]...] + * Ref doc : https://docs.sprig.com/reference/post-v2-purge-visitors-1 + */ + const userIdBatches = getUserIdBatches(userAttributes, 100); + // Note: we will only get 400 status code when no user deletion is present for given userIds so we will not throw error in that case + // eslint-disable-next-line no-restricted-syntax + for (const curBatch of userIdBatches) { + // eslint-disable-next-line no-await-in-loop + const deletionResponse = await httpPOST( + endpoint, + { + userIds: curBatch, + }, + { + headers, + }, + { + destType: 'sprig', + feature: 'deleteUsers', + endpointPath: 'api.sprig.com/v2/purge/visitors', + }, + ); + const handledDelResponse = processAxiosResponse(deletionResponse); + if (!isHttpStatusSuccess(handledDelResponse.status) && handledDelResponse.status !== 400) { + throw new NetworkError( + 'User deletion request failed', + handledDelResponse.status, + { + [tags.TAG_NAMES.ERROR_TYPE]: getDynamicErrorType(handledDelResponse.status), + }, + handledDelResponse, + ); + } + } + + return { + statusCode: 200, + status: 'successful', + }; +}; +const processDeleteUsers = async (event) => { + const { userAttributes, config } = event; + executeCommonValidations(userAttributes); + const resp = await userDeletionHandler(userAttributes, config); + return resp; +}; +module.exports = { processDeleteUsers }; diff --git a/test/integrations/destinations/sprig/deleteUsers/data.ts b/test/integrations/destinations/sprig/deleteUsers/data.ts new file mode 100644 index 0000000000..7ab5620e66 --- /dev/null +++ b/test/integrations/destinations/sprig/deleteUsers/data.ts @@ -0,0 +1,217 @@ +export const data = [ + { + name: 'sprig', + description: 'Missing api key', + feature: 'userDeletion', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destType: 'SPRIG', + userAttributes: [ + { + userId: '1', + }, + { + userId: '2', + }, + ], + config: { + apiKey: undefined, + }, + }, + ], + }, + }, + output: { + response: { + status: 400, + body: [ + { + statusCode: 400, + error: 'Api Key is required for user deletion', + }, + ], + }, + }, + }, + { + name: 'sprig', + description: 'Invalid api key', + feature: 'userDeletion', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destType: 'SPRIG', + userAttributes: [ + { + userId: '1', + }, + { + userId: '2', + }, + ], + config: { + apiKey: 'invalidApiKey', + }, + }, + ], + }, + }, + output: { + response: { + status: 403, + body: [ + { + statusCode: 403, + error: 'User deletion request failed', + }, + ], + }, + }, + }, + { + name: 'sprig', + description: 'Too many requests', + feature: 'userDeletion', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destType: 'SPRIG', + userAttributes: [ + { + userId: '1', + }, + { + userId: '2', + }, + { + userId: '3', + }, + { + userId: '4', + }, + { + userId: '5', + }, + { + userId: '6', + }, + { + userId: '7', + }, + { + userId: '8', + }, + { + userId: '9', + }, + { + userId: '10', + }, + ], + config: { + apiKey: 'testApiKey', + }, + }, + ], + }, + }, + output: { + response: { + status: 429, + body: [ + { + statusCode: 429, + error: 'User deletion request failed', + }, + ], + }, + }, + }, + { + name: 'sprig', + description: 'Given userId is not present for user deletion', + feature: 'userDeletion', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destType: 'SPRIG', + userAttributes: [ + { + userId: '9', + }, + ], + config: { + apiKey: 'testApiKey', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 200, + status: 'successful', + }, + , + ], + }, + }, + }, + { + name: 'sprig', + description: 'Successful user deletion', + feature: 'userDeletion', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destType: 'SPRIG', + userAttributes: [ + { + userId: '1', + }, + { + userId: '2', + }, + { + userId: '3', + }, + ], + config: { + apiKey: 'testApiKey', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 200, + status: 'successful', + }, + ], + }, + }, + }, +]; diff --git a/test/integrations/destinations/sprig/network.ts b/test/integrations/destinations/sprig/network.ts new file mode 100644 index 0000000000..e5f2ff23b1 --- /dev/null +++ b/test/integrations/destinations/sprig/network.ts @@ -0,0 +1,79 @@ +const deleteNwData = [ + { + httpReq: { + method: 'post', + url: 'https://api.sprig.com/v2/purge/visitors', + data: { + userIds: ['1', '2'], + }, + headers: { + Accept: 'application/json', + Authorization: 'API-Key invalidApiKey', + 'Content-Type': 'application/json', + }, + }, + httpRes: { + data: 'Forbidden', + status: 403, + }, + }, + { + httpReq: { + method: 'post', + url: 'https://api.sprig.com/v2/purge/visitors', + data: { + userIds: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10'], + }, + headers: { + Accept: 'application/json', + Authorization: 'API-Key testApiKey', + 'Content-Type': 'application/json', + }, + }, + httpRes: { + data: 'Your application has made too many requests in too short a time.', + status: 429, + }, + }, + { + httpReq: { + method: 'post', + url: 'https://api.sprig.com/v2/purge/visitors', + data: { + userIds: ['9'], + }, + headers: { + Accept: 'application/json', + Authorization: 'API-Key testApiKey', + 'Content-Type': 'application/json', + }, + }, + httpRes: { + data: { + error: 'User deletion request failed', + }, + status: 400, + }, + }, + { + httpReq: { + method: 'post', + url: 'https://api.sprig.com/v2/purge/visitors', + data: { + userIds: ['1', '2', '3'], + }, + headers: { + Accept: 'application/json', + Authorization: 'API-Key testApiKey', + 'Content-Type': 'application/json', + }, + }, + httpRes: { + data: { + requestId: 'request_1', + }, + status: 200, + }, + }, +]; +export const networkCallsData = [...deleteNwData]; From 2380f9dcfcda2c6fe101b8b3a2d580e26a6452f3 Mon Sep 17 00:00:00 2001 From: shrouti1507 <60211312+shrouti1507@users.noreply.github.com> Date: Thu, 4 Jan 2024 15:04:53 +0530 Subject: [PATCH 111/135] fix: enhancement and version upgrade of google ads remarketing list (#2945) * fix: enhancement and version upgrade of garl * fix: migrating util to google utils and adding test cases * fix: small edit * Update src/v0/destinations/google_adwords_remarketing_lists/networkHandler.js Co-authored-by: Sudip Paul <67197965+ItsSudip@users.noreply.github.com> * fix: edit test case description --------- Co-authored-by: Sudip Paul <67197965+ItsSudip@users.noreply.github.com> --- .../config.js | 2 +- .../networkHandler.js | 17 +- .../transform.js | 13 +- src/v0/util/googleUtils/index.js | 30 + src/v0/util/googleUtils/index.test.js | 50 + .../proxy_response.json | 18 +- .../dataDelivery/data.ts | 468 +- .../network.ts | 293 +- .../processor/data.ts | 22547 +++++++++------- .../router/data.ts | 1087 +- 10 files changed, 13192 insertions(+), 11333 deletions(-) create mode 100644 src/v0/util/googleUtils/index.js create mode 100644 src/v0/util/googleUtils/index.test.js diff --git a/src/v0/destinations/google_adwords_remarketing_lists/config.js b/src/v0/destinations/google_adwords_remarketing_lists/config.js index 94059c69f1..5bf0d8a299 100644 --- a/src/v0/destinations/google_adwords_remarketing_lists/config.js +++ b/src/v0/destinations/google_adwords_remarketing_lists/config.js @@ -1,6 +1,6 @@ const { getMappingConfig } = require('../../util'); -const BASE_ENDPOINT = 'https://googleads.googleapis.com/v14/customers'; +const BASE_ENDPOINT = 'https://googleads.googleapis.com/v15/customers'; const CONFIG_CATEGORIES = { AUDIENCE_LIST: { type: 'audienceList', name: 'offlineDataJobs' }, ADDRESSINFO: { type: 'addressInfo', name: 'addressInfo' }, diff --git a/src/v0/destinations/google_adwords_remarketing_lists/networkHandler.js b/src/v0/destinations/google_adwords_remarketing_lists/networkHandler.js index aeb80216ff..bf703ccb1b 100644 --- a/src/v0/destinations/google_adwords_remarketing_lists/networkHandler.js +++ b/src/v0/destinations/google_adwords_remarketing_lists/networkHandler.js @@ -14,18 +14,24 @@ const tags = require('../../util/tags'); * @param listId * @param headers * @param method + * @consentBlock + * ref: https://developers.google.com/google-ads/api/rest/reference/rest/v15/CustomerMatchUserListMetadata */ -const createJob = async (endpoint, customerId, listId, headers, method) => { +const createJob = async (endpoint, headers, method, params) => { const jobCreatingUrl = `${endpoint}:create`; + const customerMatchUserListMetadata = { + userList: `customers/${params.customerId}/userLists/${params.listId}`, + }; + if (Object.keys(params.consent).length > 0) { + customerMatchUserListMetadata.consent = params.consent; + } const jobCreatingRequest = { url: jobCreatingUrl, data: { job: { type: 'CUSTOMER_MATCH_USER_LIST', - customerMatchUserListMetadata: { - userList: `customers/${customerId}/userLists/${listId}`, - }, + customerMatchUserListMetadata, }, }, headers, @@ -94,11 +100,10 @@ const runTheJob = async (endpoint, headers, method, jobId) => { const gaAudienceProxyRequest = async (request) => { const { body, method, params, endpoint } = request; const { headers } = request; - const { customerId, listId } = params; // step1: offlineUserDataJobs creation - const firstResponse = await createJob(endpoint, customerId, listId, headers, method); + const firstResponse = await createJob(endpoint, headers, method, params); if (!firstResponse.success && !isHttpStatusSuccess(firstResponse?.response?.status)) { return firstResponse; } diff --git a/src/v0/destinations/google_adwords_remarketing_lists/transform.js b/src/v0/destinations/google_adwords_remarketing_lists/transform.js index 884fcd71f6..9526973fb8 100644 --- a/src/v0/destinations/google_adwords_remarketing_lists/transform.js +++ b/src/v0/destinations/google_adwords_remarketing_lists/transform.js @@ -15,6 +15,8 @@ const { getAccessToken, } = require('../../util'); +const { populateConsentForGoogleDestinations } = require('../../util/googleUtils'); + const { offlineDataJobsMapping, addressInfoMapping, @@ -43,7 +45,7 @@ const hashEncrypt = (object) => { * @param {*} param2 * @returns */ -const responseBuilder = (metadata, body, { Config }, message) => { +const responseBuilder = (metadata, body, { Config }, message, consentBlock) => { const payload = body; const response = defaultRequestConfig(); const filteredCustomerId = removeHyphens(Config.customerId); @@ -62,7 +64,11 @@ const responseBuilder = (metadata, body, { Config }, message) => { if (!isDefinedAndNotNullAndNotEmpty(operationAudienceId)) { throw new ConfigurationError('List ID is a mandatory field'); } - response.params = { listId: operationAudienceId, customerId: filteredCustomerId }; + response.params = { + listId: operationAudienceId, + customerId: filteredCustomerId, + consent: consentBlock, + }; response.headers = { Authorization: `Bearer ${accessToken}`, 'Content-Type': JSON_MIME_TYPE, @@ -212,7 +218,8 @@ const processEvent = async (metadata, message, destination) => { } Object.values(createdPayload).forEach((data) => { - response.push(responseBuilder(metadata, data, destination, message)); + const consentObj = populateConsentForGoogleDestinations(message.properties); + response.push(responseBuilder(metadata, data, destination, message, consentObj)); }); return response; } diff --git a/src/v0/util/googleUtils/index.js b/src/v0/util/googleUtils/index.js new file mode 100644 index 0000000000..c8d872e90e --- /dev/null +++ b/src/v0/util/googleUtils/index.js @@ -0,0 +1,30 @@ +const GOOGLE_ALLOWED_CONSENT_STATUS = ['UNSPECIFIED', 'UNKNOWN', 'GRANTED', 'DENIED']; + +/** + * Populates the consent object based on the provided properties. + * + * @param {object} properties - message.properties containing properties related to consent. + * @returns {object} - An object containing consent information. + * ref : https://developers.google.com/google-ads/api/rest/reference/rest/v15/Consent + */ + +const populateConsentForGoogleDestinations = (properties) => { + const consent = {}; + + if ( + properties?.userDataConsent && + GOOGLE_ALLOWED_CONSENT_STATUS.includes(properties.userDataConsent) + ) { + consent.adUserData = properties.userDataConsent; + } + + if ( + properties?.personalizationConsent && + GOOGLE_ALLOWED_CONSENT_STATUS.includes(properties.personalizationConsent) + ) { + consent.adPersonalization = properties.personalizationConsent; + } + return consent; +}; + +module.exports = { populateConsentForGoogleDestinations }; diff --git a/src/v0/util/googleUtils/index.test.js b/src/v0/util/googleUtils/index.test.js new file mode 100644 index 0000000000..27eff2a793 --- /dev/null +++ b/src/v0/util/googleUtils/index.test.js @@ -0,0 +1,50 @@ +const { populateConsentForGoogleDestinations } = require('./index'); + +describe('unit test for populateConsentForGoogleDestinations', () => { + // Returns an empty object when no properties are provided. + it('should return an empty object when no properties are provided', () => { + const result = populateConsentForGoogleDestinations({}); + expect(result).toEqual({}); + }); + + // Sets adUserData property of consent object when userDataConsent property is provided and its value is one of the allowed consent statuses. + it('should set adUserData property of consent object when userDataConsent property is provided and its value is one of the allowed consent statuses', () => { + const properties = { userDataConsent: 'GRANTED' }; + const result = populateConsentForGoogleDestinations(properties); + expect(result).toEqual({ adUserData: 'GRANTED' }); + }); + + // Sets adPersonalization property of consent object when personalizationConsent property is provided and its value is one of the allowed consent statuses. + it('should set adPersonalization property of consent object when personalizationConsent property is provided and its value is one of the allowed consent statuses', () => { + const properties = { personalizationConsent: 'DENIED' }; + const result = populateConsentForGoogleDestinations(properties); + expect(result).toEqual({ adPersonalization: 'DENIED' }); + }); + + // Returns an empty object when properties parameter is not provided. + it('should return an empty object when properties parameter is not provided', () => { + const result = populateConsentForGoogleDestinations(); + expect(result).toEqual({}); + }); + + // Returns an empty object when properties parameter is null. + it('should return an empty object when properties parameter is null', () => { + const result = populateConsentForGoogleDestinations(null); + expect(result).toEqual({}); + }); + + // Returns an empty object when properties parameter is an empty object. + it('should return an empty object when properties parameter is an empty object', () => { + const result = populateConsentForGoogleDestinations({}); + expect(result).toEqual({}); + }); + + // Returns an empty object when properties parameter is an empty object. + it('should return an empty object when properties parameter contains adUserData and adPersonalization with non-allowed values', () => { + const result = populateConsentForGoogleDestinations({ + adUserData: 'RANDOM', + personalizationConsent: 'RANDOM', + }); + expect(result).toEqual({}); + }); +}); diff --git a/test/__mocks__/data/google_adwords_remarketing_lists/proxy_response.json b/test/__mocks__/data/google_adwords_remarketing_lists/proxy_response.json index 5d3ac9496b..2cf1d3276b 100644 --- a/test/__mocks__/data/google_adwords_remarketing_lists/proxy_response.json +++ b/test/__mocks__/data/google_adwords_remarketing_lists/proxy_response.json @@ -1,24 +1,24 @@ { - "https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs:create": { + "https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs:create": { "status": 200, "data": { "resourceName": "customers/9249589672/offlineUserDataJobs/18025019461" } }, - "https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs/18025019461:addOperations": { + "https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs/18025019461:addOperations": { "status": 200, "data": {} }, - "https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs/18025019461:run": { + "https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs/18025019461:run": { "status": 200 }, - "https://googleads.googleapis.com/v14/customers/7693729834/offlineUserDataJobs:create": { + "https://googleads.googleapis.com/v15/customers/7693729834/offlineUserDataJobs:create": { "status": 200, "data": { "resourceName": "customers/9249589672/offlineUserDataJobs/18025019462" } }, - "https://googleads.googleapis.com/v14/customers/7693729834/offlineUserDataJobs/18025019462:addOperations": { + "https://googleads.googleapis.com/v15/customers/7693729834/offlineUserDataJobs/18025019462:addOperations": { "response": { "data": { "error": { @@ -61,7 +61,7 @@ "status": 400 } }, - "https://googleads.googleapis.com/v14/customers/1234567890/googleAds:searchStream": { + "https://googleads.googleapis.com/v15/customers/1234567890/googleAds:searchStream": { "response": { "data": [ { @@ -75,11 +75,11 @@ "status": 401 } }, - "https://googleads.googleapis.com/v14/customers/1234567899/googleAds:searchStream": { + "https://googleads.googleapis.com/v15/customers/1234567899/googleAds:searchStream": { "response": "", "code": "ECONNREFUSED" }, - "https://googleads.googleapis.com/v14/customers/1234567891/googleAds:searchStream": { + "https://googleads.googleapis.com/v15/customers/1234567891/googleAds:searchStream": { "data": [ { "results": [ @@ -96,7 +96,7 @@ ], "status": 200 }, - "https://googleads.googleapis.com/v14/customers/1234567891:uploadConversionAdjustments": { + "https://googleads.googleapis.com/v15/customers/1234567891:uploadConversionAdjustments": { "data": [ { "adjustmentType": "ENHANCEMENT", diff --git a/test/integrations/destinations/google_adwords_remarketing_lists/dataDelivery/data.ts b/test/integrations/destinations/google_adwords_remarketing_lists/dataDelivery/data.ts index b41d725799..414e46ea19 100644 --- a/test/integrations/destinations/google_adwords_remarketing_lists/dataDelivery/data.ts +++ b/test/integrations/destinations/google_adwords_remarketing_lists/dataDelivery/data.ts @@ -1,247 +1,261 @@ export const data = [ - { - name: 'google_adwords_remarketing_lists', - description: 'Test 0', - feature: 'dataDelivery', - module: 'destination', - version: 'v0', - input: { - request: { - body: { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs", - "headers": { - "Authorization": "Bearer dummy-access", - "Content-Type": "application/json", - "developer-token": "dummy-dev-token" - }, - "params": { - "destination": "google_adwords_remarketing_lists", - "listId": "709078448", - "customerId": "7693729833" - }, - "body": { - "JSON": { - "enablePartialFailure": true, - "operations": [ - { - "create": { - "userIdentifiers": [ - { - "hashedEmail": "85cc9fefa1eff1baab55d10df0cecff2acb25344867a5d0f96e1b1c5e2f10f05" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "hashedEmail": "85cc9fefa1eff1baab55d10df0cecff2acb25344867a5d0f96e1b1c5e2f10f05" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "e56d336922eaab3be8c1244dbaa713e134a8eba50ddbd4f50fd2fe18d72595cd" - } - } - ] - } - } - ] + { + name: 'google_adwords_remarketing_lists', + description: 'Test 0', + feature: 'dataDelivery', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs', + headers: { + Authorization: 'Bearer dummy-access', + 'Content-Type': 'application/json', + 'developer-token': 'dummy-dev-token', + }, + params: { + destination: 'google_adwords_remarketing_lists', + listId: '709078448', + customerId: '7693729833', + consent: {}, + }, + body: { + JSON: { + enablePartialFailure: true, + operations: [ + { + create: { + userIdentifiers: [ + { + hashedEmail: + '85cc9fefa1eff1baab55d10df0cecff2acb25344867a5d0f96e1b1c5e2f10f05', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + hashedEmail: + '85cc9fefa1eff1baab55d10df0cecff2acb25344867a5d0f96e1b1c5e2f10f05', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + 'e56d336922eaab3be8c1244dbaa713e134a8eba50ddbd4f50fd2fe18d72595cd', }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} + }, + ], + }, }, - method: 'POST' + ], }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, }, - output: { - response: { - status: 200, - body: { - "output": { - "status": 200, - "message": "Request Processed Successfully", - "destinationResponse": { "response": "", "status": 200 } - } - }, - }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: { + status: 200, + message: 'Request Processed Successfully', + destinationResponse: { response: '', status: 200 }, + }, }, + }, }, - { - name: 'google_adwords_remarketing_lists', - description: 'Test 1', - feature: 'dataDelivery', - module: 'destination', - version: 'v0', - input: { - request: { - body: { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/7693729834/offlineUserDataJobs", - "headers": { - "Authorization": "Bearer dummy-access", - "Content-Type": "application/json", - "developer-token": "dummy-dev-token" - }, - "params": { - "listId": "709078448", - "customerId": "7693729833", - "destination": "google_adwords_remarketing_lists" - }, - "body": { - "JSON": { - "enablePartialFailure": true, - "operations": [ - { - "create": { - "userIdentifiers": [ - { - "hashedEmail": "abcd@testmail.com" - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} + }, + { + name: 'google_adwords_remarketing_lists', + description: 'Test 1', + feature: 'dataDelivery', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://googleads.googleapis.com/v15/customers/7693729834/offlineUserDataJobs', + headers: { + Authorization: 'Bearer dummy-access', + 'Content-Type': 'application/json', + 'developer-token': 'dummy-dev-token', + }, + params: { + listId: '709078448', + customerId: '7693729833', + destination: 'google_adwords_remarketing_lists', + consent: {}, + }, + body: { + JSON: { + enablePartialFailure: true, + operations: [ + { + create: { + userIdentifiers: [ + { + hashedEmail: 'abcd@testmail.com', + }, + ], + }, }, - method: 'POST' + ], }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, }, - output: { - response: { - status: 400, - body: { - output: { - "status": 400, - "message": "Request contains an invalid argument. during ga_audience response transformation", - "destinationResponse": { - "error": { - "code": 400, - "details": [ - { - "@type": "type.googleapis.com/google.ads.googleads.v9.errors.GoogleAdsFailure", - "errors": [ - { - "errorCode": { - "offlineUserDataJobError": "INVALID_SHA256_FORMAT" - }, - "message": "The SHA256 encoded value is malformed.", - "location": { - "fieldPathElements": [ - { "fieldName": "operations", "index": 0 }, - { "fieldName": "remove" }, - { "fieldName": "user_identifiers", "index": 0 }, - { "fieldName": "hashed_email" } - ] - } - } - ] - } - ], - "message": "Request contains an invalid argument.", - "status": "INVALID_ARGUMENT" - } + method: 'POST', + }, + }, + output: { + response: { + status: 400, + body: { + output: { + status: 400, + message: + 'Request contains an invalid argument. during ga_audience response transformation', + destinationResponse: { + error: { + code: 400, + details: [ + { + '@type': 'type.googleapis.com/google.ads.googleads.v9.errors.GoogleAdsFailure', + errors: [ + { + errorCode: { + offlineUserDataJobError: 'INVALID_SHA256_FORMAT', }, - "statTags": { - "destType": "GOOGLE_ADWORDS_REMARKETING_LISTS", - "errorCategory": "network", - "destinationId": "Non-determininable", - "workspaceId": "Non-determininable", - "errorType": "aborted", - "feature": "dataDelivery", - "implementation": "native", - "module": "destination" - } - }, - }, + message: 'The SHA256 encoded value is malformed.', + location: { + fieldPathElements: [ + { fieldName: 'operations', index: 0 }, + { fieldName: 'remove' }, + { fieldName: 'user_identifiers', index: 0 }, + { fieldName: 'hashed_email' }, + ], + }, + }, + ], + }, + ], + message: 'Request contains an invalid argument.', + status: 'INVALID_ARGUMENT', + }, + }, + statTags: { + destType: 'GOOGLE_ADWORDS_REMARKETING_LISTS', + errorCategory: 'network', + destinationId: 'Non-determininable', + workspaceId: 'Non-determininable', + errorType: 'aborted', + feature: 'dataDelivery', + implementation: 'native', + module: 'destination', }, + }, }, + }, }, - { - name: 'google_adwords_remarketing_lists', - description: 'Test 2', - feature: 'dataDelivery', - module: 'destination', - version: 'v0', - input: { - request: { - body: { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs", - "headers": { - "Authorization": "Bearer dummy-access", - "Content-Type": "application/json", - "developer-token": "dummy-dev-token" - }, - "params": { - "listId": "709078448", - "customerId": "7693729833", - "destination": "google_adwords_remarketing_lists" - }, - "body": { - "JSON": { - "enablePartialFailure": true, - "operations": [ - { - "remove": { - "userIdentifiers": [ - { - "hashedEmail": "85cc9fefa1eff1baab55d10df0cecff2acb25344867a5d0f96e1b1c5e2f10f05" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "hashedEmail": "85cc9fefa1eff1baab55d10df0cecff2acb25344867a5d0f96e1b1c5e2f10f05" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "e56d336922eaab3be8c1244dbaa713e134a8eba50ddbd4f50fd2fe18d72595cd" - } - } - ] - } - } - ] + }, + { + name: 'google_adwords_remarketing_lists', + description: 'Test 2', + feature: 'dataDelivery', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs', + headers: { + Authorization: 'Bearer dummy-access', + 'Content-Type': 'application/json', + 'developer-token': 'dummy-dev-token', + }, + params: { + listId: '709078448', + customerId: '7693729833', + destination: 'google_adwords_remarketing_lists', + consent: {}, + }, + body: { + JSON: { + enablePartialFailure: true, + operations: [ + { + remove: { + userIdentifiers: [ + { + hashedEmail: + '85cc9fefa1eff1baab55d10df0cecff2acb25344867a5d0f96e1b1c5e2f10f05', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + hashedEmail: + '85cc9fefa1eff1baab55d10df0cecff2acb25344867a5d0f96e1b1c5e2f10f05', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + 'e56d336922eaab3be8c1244dbaa713e134a8eba50ddbd4f50fd2fe18d72595cd', }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} + }, + ], + }, }, - method: 'POST' + ], }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, }, - output: { - response: { - status: 200, - body: { - output: { - "status": 200, - "message": "Request Processed Successfully", - "destinationResponse": { "response": "", "status": 200 } - }, - }, - }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: { + status: 200, + message: 'Request Processed Successfully', + destinationResponse: { response: '', status: 200 }, + }, }, - } + }, + }, + }, ]; diff --git a/test/integrations/destinations/google_adwords_remarketing_lists/network.ts b/test/integrations/destinations/google_adwords_remarketing_lists/network.ts index 11cbfa7cd8..8e1edd21aa 100644 --- a/test/integrations/destinations/google_adwords_remarketing_lists/network.ts +++ b/test/integrations/destinations/google_adwords_remarketing_lists/network.ts @@ -1,115 +1,204 @@ import { enhanceRequestOptions, getFormData } from '../../../../src/adapters/network'; export const networkCallsData = [ - { - httpReq: { - url: 'https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs:create', - data: { "job": { "type": "CUSTOMER_MATCH_USER_LIST", "customerMatchUserListMetadata": { "userList": "customers/7693729833/userLists/709078448" } } }, - headers: { "Authorization": "Bearer dummy-access", "Content-Type": "application/json", "developer-token": "dummy-dev-token" }, - method: 'POST', - }, - httpRes: { - "status": 200, - "data": { - "resourceName": "customers/9249589672/offlineUserDataJobs/18025019461" - } + { + httpReq: { + url: 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs:create', + data: { + job: { + type: 'CUSTOMER_MATCH_USER_LIST', + customerMatchUserListMetadata: { userList: 'customers/7693729833/userLists/709078448' }, }, + }, + headers: { + Authorization: 'Bearer dummy-access', + 'Content-Type': 'application/json', + 'developer-token': 'dummy-dev-token', + }, + method: 'POST', }, - { - httpReq: { - url: 'https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs/18025019461:addOperations', - data: { "enablePartialFailure": true, "operations": [{ "create": { "userIdentifiers": [{ "hashedEmail": "85cc9fefa1eff1baab55d10df0cecff2acb25344867a5d0f96e1b1c5e2f10f05" }, { "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" }, { "hashedEmail": "85cc9fefa1eff1baab55d10df0cecff2acb25344867a5d0f96e1b1c5e2f10f05" }, { "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" }, { "addressInfo": { "hashedFirstName": "e56d336922eaab3be8c1244dbaa713e134a8eba50ddbd4f50fd2fe18d72595cd" } }] } }] }, - headers: { "Authorization": "Bearer dummy-access", "Content-Type": "application/json", "developer-token": "dummy-dev-token" }, - method: 'POST', - }, - httpRes: { - "status": 200, - "data": {} - }, + httpRes: { + status: 200, + data: { + resourceName: 'customers/9249589672/offlineUserDataJobs/18025019461', + }, }, - { - httpReq: { - url: 'https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs/18025019461:run', - headers: { "Authorization": "Bearer dummy-access", "Content-Type": "application/json", "developer-token": "dummy-dev-token" }, - method: 'POST', - }, - httpRes: { - "status": 200, - }, + }, + { + httpReq: { + url: 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs/18025019461:addOperations', + data: { + enablePartialFailure: true, + operations: [ + { + create: { + userIdentifiers: [ + { hashedEmail: '85cc9fefa1eff1baab55d10df0cecff2acb25344867a5d0f96e1b1c5e2f10f05' }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { hashedEmail: '85cc9fefa1eff1baab55d10df0cecff2acb25344867a5d0f96e1b1c5e2f10f05' }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + 'e56d336922eaab3be8c1244dbaa713e134a8eba50ddbd4f50fd2fe18d72595cd', + }, + }, + ], + }, + }, + ], + }, + headers: { + Authorization: 'Bearer dummy-access', + 'Content-Type': 'application/json', + 'developer-token': 'dummy-dev-token', + }, + method: 'POST', }, - { - httpReq: { - url: 'https://googleads.googleapis.com/v14/customers/7693729834/offlineUserDataJobs:create', - data: { "job": { "type": "CUSTOMER_MATCH_USER_LIST", "customerMatchUserListMetadata": { "userList": "customers/7693729833/userLists/709078448" } } }, - headers: { "Authorization": "Bearer dummy-access", "Content-Type": "application/json", "developer-token": "dummy-dev-token" }, - method: 'POST', - }, - httpRes: { - "status": 200, - "data": { - "resourceName": "customers/9249589672/offlineUserDataJobs/18025019462" - } - }, + httpRes: { + status: 200, + data: {}, + }, + }, + { + httpReq: { + url: 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs/18025019461:run', + headers: { + Authorization: 'Bearer dummy-access', + 'Content-Type': 'application/json', + 'developer-token': 'dummy-dev-token', + }, + method: 'POST', }, - { - httpReq: { - url: 'https://googleads.googleapis.com/v14/customers/7693729834/offlineUserDataJobs/18025019462:addOperations', - data: { "enablePartialFailure": true, "operations": [{ "create": { "userIdentifiers": [{ "hashedEmail": "abcd@testmail.com" }] } }] }, - headers: { "Authorization": "Bearer dummy-access", "Content-Type": "application/json", "developer-token": "dummy-dev-token" }, - method: 'POST', + httpRes: { + status: 200, + }, + }, + { + httpReq: { + url: 'https://googleads.googleapis.com/v15/customers/7693729834/offlineUserDataJobs:create', + data: { + job: { + type: 'CUSTOMER_MATCH_USER_LIST', + customerMatchUserListMetadata: { userList: 'customers/7693729833/userLists/709078448' }, }, - httpRes: { - "data": { - "error": { - "code": 400, - "details": [ - { - "@type": "type.googleapis.com/google.ads.googleads.v9.errors.GoogleAdsFailure", - "errors": [ - { - "errorCode": { - "offlineUserDataJobError": "INVALID_SHA256_FORMAT" - }, - "message": "The SHA256 encoded value is malformed.", - "location": { - "fieldPathElements": [ - { - "fieldName": "operations", - "index": 0 - }, - { - "fieldName": "remove" - }, - { - "fieldName": "user_identifiers", - "index": 0 - }, - { - "fieldName": "hashed_email" - } - ] - } - } - ] - } + }, + headers: { + Authorization: 'Bearer dummy-access', + 'Content-Type': 'application/json', + 'developer-token': 'dummy-dev-token', + }, + method: 'POST', + }, + httpRes: { + status: 200, + data: { + resourceName: 'customers/9249589672/offlineUserDataJobs/18025019462', + }, + }, + }, + { + httpReq: { + url: 'https://googleads.googleapis.com/v15/customers/7693729834/offlineUserDataJobs/18025019462:addOperations', + data: { + enablePartialFailure: true, + operations: [{ create: { userIdentifiers: [{ hashedEmail: 'abcd@testmail.com' }] } }], + }, + headers: { + Authorization: 'Bearer dummy-access', + 'Content-Type': 'application/json', + 'developer-token': 'dummy-dev-token', + }, + method: 'POST', + }, + httpRes: { + data: { + error: { + code: 400, + details: [ + { + '@type': 'type.googleapis.com/google.ads.googleads.v9.errors.GoogleAdsFailure', + errors: [ + { + errorCode: { + offlineUserDataJobError: 'INVALID_SHA256_FORMAT', + }, + message: 'The SHA256 encoded value is malformed.', + location: { + fieldPathElements: [ + { + fieldName: 'operations', + index: 0, + }, + { + fieldName: 'remove', + }, + { + fieldName: 'user_identifiers', + index: 0, + }, + { + fieldName: 'hashed_email', + }, ], - "message": "Request contains an invalid argument.", - "status": "INVALID_ARGUMENT" - } + }, + }, + ], }, - "status": 400 + ], + message: 'Request contains an invalid argument.', + status: 'INVALID_ARGUMENT', }, + }, + status: 400, }, - { - httpReq: { - url: 'https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs/18025019461:addOperations', - data: { "enablePartialFailure": true, "operations": [{ "remove": { "userIdentifiers": [{ "hashedEmail": "85cc9fefa1eff1baab55d10df0cecff2acb25344867a5d0f96e1b1c5e2f10f05" }, { "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" }, { "hashedEmail": "85cc9fefa1eff1baab55d10df0cecff2acb25344867a5d0f96e1b1c5e2f10f05" }, { "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" }, { "addressInfo": { "hashedFirstName": "e56d336922eaab3be8c1244dbaa713e134a8eba50ddbd4f50fd2fe18d72595cd" } }] } }] }, - headers: { "Authorization": "Bearer dummy-access", "Content-Type": "application/json", "developer-token": "dummy-dev-token" }, - method: 'POST', - }, - httpRes: { - "status": 200, - "data": {} - }, - } -]; \ No newline at end of file + }, + { + httpReq: { + url: 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs/18025019461:addOperations', + data: { + enablePartialFailure: true, + operations: [ + { + remove: { + userIdentifiers: [ + { hashedEmail: '85cc9fefa1eff1baab55d10df0cecff2acb25344867a5d0f96e1b1c5e2f10f05' }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { hashedEmail: '85cc9fefa1eff1baab55d10df0cecff2acb25344867a5d0f96e1b1c5e2f10f05' }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + 'e56d336922eaab3be8c1244dbaa713e134a8eba50ddbd4f50fd2fe18d72595cd', + }, + }, + ], + }, + }, + ], + }, + headers: { + Authorization: 'Bearer dummy-access', + 'Content-Type': 'application/json', + 'developer-token': 'dummy-dev-token', + }, + method: 'POST', + }, + httpRes: { + status: 200, + data: {}, + }, + }, +]; diff --git a/test/integrations/destinations/google_adwords_remarketing_lists/processor/data.ts b/test/integrations/destinations/google_adwords_remarketing_lists/processor/data.ts index a6733f5daf..804efec220 100644 --- a/test/integrations/destinations/google_adwords_remarketing_lists/processor/data.ts +++ b/test/integrations/destinations/google_adwords_remarketing_lists/processor/data.ts @@ -1,10453 +1,12096 @@ export const data = [ - { - "name": "google_adwords_remarketing_lists", - "description": "Test 0", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "destination": { - "Config": { - "rudderAccountId": "rudder-acc-id", - "listId": "list111", - "customerId": "7693729833", - "loginCustomerId": "", - "subAccount": false, - "userSchema": [ - "email", - "phone", - "addressInfo" - ], - "isHashRequired": true, - "typeOfList": "General" - } - }, - "message": { - "userId": "user 1", - "anonymousId": "anon-id-new", - "event": "event1", - "type": "audiencelist", - "properties": { - "listData": { - "add": [ - { - "email": "test@abc.com", - "phone": "@09876543210", - "firstName": "test", - "lastName": "rudderlabs", - "country": "US", - "postalCode": "1245" - } - ] - }, - "enablePartialFailure": true - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs", - "headers": { - "Authorization": "Bearer dummy-access", - "Content-Type": "application/json", - "developer-token": "dummy-dev-token" - }, - "params": { - "listId": "list111", - "customerId": "7693729833" - }, - "body": { - "JSON": { - "enablePartialFailure": true, - "operations": [ - { - "create": { - "userIdentifiers": [ - { - "hashedEmail": "d3142c8f9c9129484daf28df80cc5c955791efed5e69afabb603bc8cb9ffd419" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08", - "hashedLastName": "dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "google_adwords_remarketing_lists", - "description": "Test 1", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "destination": { - "Config": { - "rudderAccountId": "rudder-acc-id", - "listId": "list111", - "customerId": "769-372-9833", - "loginCustomerId": "870-483-0944", - "subAccount": true, - "userSchema": [ - "email", - "phone", - "addressInfo" - ], - "isHashRequired": true, - "typeOfList": "userID" - } - }, - "message": { - "userId": "user 1", - "anonymousId": "anon-id-new", - "event": "event1", - "type": "audiencelist", - "properties": { - "listData": { - "add": [ - { - "email": "test@abc.com", - "phone": "@09876543210", - "firstName": "test", - "lastName": "rudderlabs", - "country": "US", - "postalCode": "1245", - "thirdPartyUserId": "useri1234" - } - ] - }, - "enablePartialFailure": true - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs", - "headers": { - "Authorization": "Bearer dummy-access", - "Content-Type": "application/json", - "developer-token": "dummy-dev-token", - "login-customer-id": "8704830944" - }, - "params": { - "listId": "list111", - "customerId": "7693729833" - }, - "body": { - "JSON": { - "enablePartialFailure": true, - "operations": [ - { - "create": { - "userIdentifiers": [ - { - "thirdPartyUserId": "useri1234" - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "google_adwords_remarketing_lists", - "description": "Test 2", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "destination": { - "Config": { - "rudderAccountId": "rudder-acc-id", - "listId": "list111", - "customerId": "7693729833", - "loginCustomerId": "", - "subAccount": false, - "userSchema": [ - "email", - "phone", - "addressInfo" - ], - "isHashRequired": true, - "typeOfList": "mobileDeviceID" - } - }, - "message": { - "userId": "user 1", - "anonymousId": "anon-id-new", - "event": "event1", - "type": "audiencelist", - "properties": { - "listData": { - "add": [ - { - "email": "test@abc.com", - "phone": "@09876543210", - "firstName": "test", - "lastName": "rudderlabs", - "country": "US", - "postalCode": "1245", - "thirdPartyUserId": "useri1234", - "mobileId": "abcd-1234-567h" - } - ] - }, - "enablePartialFailure": true - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs", - "headers": { - "Authorization": "Bearer dummy-access", - "Content-Type": "application/json", - "developer-token": "dummy-dev-token" - }, - "params": { - "listId": "list111", - "customerId": "7693729833" - }, - "body": { - "JSON": { - "enablePartialFailure": true, - "operations": [ - { - "create": { - "userIdentifiers": [ - { - "mobileId": "abcd-1234-567h" - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "google_adwords_remarketing_lists", - "description": "Test 3", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "destination": { - "Config": { - "rudderAccountId": "rudder-acc-id", - "listId": "list111", - "customerId": "7693729833", - "loginCustomerId": "", - "subAccount": false, - "userSchema": [ - "email", - "phone", - "addressInfo" - ], - "isHashRequired": true, - "typeOfList": "mobileDeviceID" - } - }, - "message": { - "userId": "user 1", - "anonymousId": "anon-id-new", - "event": "event1", - "type": "audiencelist", - "properties": { - "listData": { - "add": [ - { - "email": "abc@abc.com", - "phone": "@09876543210", - "firstName": "abc", - "lastName": "efg", - "country": "US", - "postalCode": "1245", - "thirdPartyUserId": "useri1234" - }, - { - "email": "def@abc.com", - "phone": "@09876543210", - "firstName": "def", - "lastName": "ghi", - "country": "US", - "postalCode": "1245", - "thirdPartyUserId": "useri1234" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245", - "thirdPartyUserId": "useri1234" - } - ] - }, - "enablePartialFailure": true - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "statusCode": 400, - "error": "Neither 'add' nor 'remove' property is present inside 'listData' or there are no attributes inside 'add' or 'remove' properties matching with the schema fields. Aborting message.", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation", - "destType": "GOOGLE_ADWORDS_REMARKETING_LISTS", - "module": "destination", - "implementation": "native", - "feature": "processor" - } - } - ] - } - } - }, - { - "name": "google_adwords_remarketing_lists", - "description": "Test 4", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "destination": { - "Config": { - "rudderAccountId": "rudder-acc-id", - "listId": "list111", - "customerId": "7693729833", - "loginCustomerId": "", - "subAccount": false, - "userSchema": [ - "email", - "phone", - "addressInfo" - ], - "isHashRequired": true, - "typeOfList": "mobileDeviceID" - } - }, - "message": { - "userId": "user 1", - "anonymousId": "anon-id-new", - "event": "event1", - "type": "audiencelist", - "properties": { - "listData": { - "remove": [ - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245", - "thirdPartyUserId": "useri1234" - } - ] - }, - "enablePartialFailure": true - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "statusCode": 400, - "error": "Neither 'add' nor 'remove' property is present inside 'listData' or there are no attributes inside 'add' or 'remove' properties matching with the schema fields. Aborting message.", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation", - "destType": "GOOGLE_ADWORDS_REMARKETING_LISTS", - "module": "destination", - "implementation": "native", - "feature": "processor" - } - } - ] - } - } - }, - { - "name": "google_adwords_remarketing_lists", - "description": "Test 5", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "destination": { - "Config": { - "rudderAccountId": "rudder-acc-id", - "listId": "list111", - "customerId": "7693729833", - "loginCustomerId": "", - "subAccount": false, - "userSchema": [ - "email", - "phone", - "addressInfo" - ], - "isHashRequired": true, - "typeOfList": "mobileDeviceID" - } - }, - "message": { - "userId": "user 1", - "anonymousId": "anon-id-new", - "event": "event1", - "properties": { - "listData": { - "remove": [ - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245", - "thirdPartyUserId": "useri1234" - } - ] - }, - "enablePartialFailure": true - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "statusCode": 400, - "error": "Message Type is not present. Aborting message.", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation", - "destType": "GOOGLE_ADWORDS_REMARKETING_LISTS", - "module": "destination", - "implementation": "native", - "feature": "processor" - } - } - ] - } - } - }, - { - "name": "google_adwords_remarketing_lists", - "description": "Test 6", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "destination": { - "Config": { - "rudderAccountId": "rudder-acc-id", - "listId": "list111", - "customerId": "7693729833", - "loginCustomerId": "", - "subAccount": false, - "userSchema": [ - "email", - "phone", - "addressInfo" - ], - "isHashRequired": true, - "typeOfList": "mobileDeviceID" - } - }, - "message": { - "type": "audiencelist", - "userId": "user 1", - "anonymousId": "anon-id-new", - "event": "event1", - "properties": { - "enablePartialFailure": true - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "statusCode": 400, - "error": "listData is not present inside properties. Aborting message.", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation", - "destType": "GOOGLE_ADWORDS_REMARKETING_LISTS", - "module": "destination", - "implementation": "native", - "feature": "processor" - } - } - ] - } - } - }, - { - "name": "google_adwords_remarketing_lists", - "description": "Test 7", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "destination": { - "Config": { - "rudderAccountId": "rudder-acc-id", - "listId": "list111", - "customerId": "7693729833", - "loginCustomerId": "", - "subAccount": true, - "userSchema": [ - "email", - "phone", - "addressInfo" - ], - "isHashRequired": true, - "typeOfList": "mobileDeviceID" - } - }, - "message": { - "userId": "user 1", - "anonymousId": "anon-id-new", - "event": "event1", - "type": "audiencelisT", - "properties": { - "listData": { - "add": [ - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "mobileId": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - } - ] - }, - "enablePartialFailure": true - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "statusCode": 400, - "error": "loginCustomerId is required as subAccount is true.", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "configuration", - "destType": "GOOGLE_ADWORDS_REMARKETING_LISTS", - "module": "destination", - "implementation": "native", - "feature": "processor" - } - } - ] - } - } - }, - { - "name": "google_adwords_remarketing_lists", - "description": "Test 8", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "destination": { - "Config": { - "rudderAccountId": "rudder-acc-id", - "listId": "list111", - "customerId": "7693729833", - "loginCustomerId": "", - "subAccount": false, - "userSchema": [ - "email", - "phone", - "addressInfo" - ], - "isHashRequired": true, - "typeOfList": "General" - } - }, - "message": { - "userId": "user 1", - "anonymousId": "anon-id-new", - "event": "event1", - "type": "audiencelisT", - "properties": { - "listData": { - "add": [ - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "mobileId": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - } - ] - }, - "enablePartialFailure": true - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs", - "headers": { - "Authorization": "Bearer dummy-access", - "Content-Type": "application/json", - "developer-token": "dummy-dev-token" - }, - "params": { - "listId": "list111", - "customerId": "7693729833" - }, - "body": { - "JSON": { - "enablePartialFailure": true, - "operations": [ - { - "create": { - "userIdentifiers": [ - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - } - ] - } - }, - { - "create": { - "userIdentifiers": [ - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - } - ] - } - }, - { - "create": { - "userIdentifiers": [ - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - }, - { - "create": { - "userIdentifiers": [ - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - } - ] - } - }, - { - "create": { - "userIdentifiers": [ - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - } - ] - } - }, - { - "create": { - "userIdentifiers": [ - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - }, - { - "create": { - "userIdentifiers": [ - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - } - ] - } - }, - { - "create": { - "userIdentifiers": [ - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - } - ] - } - }, - { - "create": { - "userIdentifiers": [ - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - }, - { - "create": { - "userIdentifiers": [ - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "google_adwords_remarketing_lists", - "description": "Test 9", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "destination": { - "Config": { - "rudderAccountId": "rudder-acc-id", - "listId": "list111", - "customerId": "7693729833", - "loginCustomerId": "", - "subAccount": false, - "userSchema": [ - "email", - "phone", - "addressInfo" - ], - "isHashRequired": true, - "typeOfList": "General" - } - }, - "message": { - "userId": "user 1", - "anonymousId": "anon-id-new", - "event": "event1", - "type": "audiencelisT", - "properties": { - "listData": { - "add": [ - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "mobileId": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - } - ], - "remove": [ - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "mobileId": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - } - ] - }, - "enablePartialFailure": true - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs", - "headers": { - "Authorization": "Bearer dummy-access", - "Content-Type": "application/json", - "developer-token": "dummy-dev-token" - }, - "params": { - "listId": "list111", - "customerId": "7693729833" - }, - "body": { - "JSON": { - "enablePartialFailure": true, - "operations": [ - { - "create": { - "userIdentifiers": [ - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "statusCode": 200 - }, - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs", - "headers": { - "Authorization": "Bearer dummy-access", - "Content-Type": "application/json", - "developer-token": "dummy-dev-token" - }, - "params": { - "listId": "list111", - "customerId": "7693729833" - }, - "body": { - "JSON": { - "enablePartialFailure": true, - "operations": [ - { - "remove": { - "userIdentifiers": [ - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "google_adwords_remarketing_lists", - "description": "Test 10", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "destination": { - "Config": { - "rudderAccountId": "rudder-acc-id", - "listId": "list111", - "customerId": "7693729833", - "loginCustomerId": "", - "subAccount": false, - "userSchema": [ - "email", - "phone", - "addressInfo" - ], - "isHashRequired": true, - "typeOfList": "General" - } - }, - "message": { - "userId": "user 1", - "anonymousId": "anon-id-new", - "event": "event1", - "type": "audiencelisT", - "properties": { - "listData": { - "add": [ - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "mobileId": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - } - ], - "remove": [ - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "mobileId": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - } - ] - }, - "enablePartialFailure": true - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs", - "headers": { - "Authorization": "Bearer dummy-access", - "Content-Type": "application/json", - "developer-token": "dummy-dev-token" - }, - "params": { - "listId": "list111", - "customerId": "7693729833" - }, - "body": { - "JSON": { - "enablePartialFailure": true, - "operations": [ - { - "create": { - "userIdentifiers": [ - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - } - ] - } - }, - { - "create": { - "userIdentifiers": [ - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - } - ] - } - }, - { - "create": { - "userIdentifiers": [ - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - }, - { - "create": { - "userIdentifiers": [ - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - } - ] - } - }, - { - "create": { - "userIdentifiers": [ - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - } - ] - } - }, - { - "create": { - "userIdentifiers": [ - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - }, - { - "create": { - "userIdentifiers": [ - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - } - ] - } - }, - { - "create": { - "userIdentifiers": [ - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - } - ] - } - }, - { - "create": { - "userIdentifiers": [ - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - }, - { - "create": { - "userIdentifiers": [ - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "statusCode": 200 - }, - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs", - "headers": { - "Authorization": "Bearer dummy-access", - "Content-Type": "application/json", - "developer-token": "dummy-dev-token" - }, - "params": { - "listId": "list111", - "customerId": "7693729833" - }, - "body": { - "JSON": { - "enablePartialFailure": true, - "operations": [ - { - "remove": { - "userIdentifiers": [ - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - } - ] - } - }, - { - "remove": { - "userIdentifiers": [ - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - } - ] - } - }, - { - "remove": { - "userIdentifiers": [ - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - }, - { - "remove": { - "userIdentifiers": [ - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - } - ] - } - }, - { - "remove": { - "userIdentifiers": [ - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - } - ] - } - }, - { - "remove": { - "userIdentifiers": [ - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - }, - { - "remove": { - "userIdentifiers": [ - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - } - ] - } - }, - { - "remove": { - "userIdentifiers": [ - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - } - ] - } - }, - { - "remove": { - "userIdentifiers": [ - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - }, - { - "remove": { - "userIdentifiers": [ - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "google_adwords_remarketing_lists", - "description": "Test 11", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "destination": { - "Config": { - "rudderAccountId": "rudder-acc-id", - "listId": "list111", - "customerId": "7693729833", - "loginCustomerId": "", - "subAccount": false, - "userSchema": [ - "email", - "phone", - "addressInfo" - ], - "isHashRequired": true, - "typeOfList": "General" - } - }, - "message": { - "userId": "user 1", - "anonymousId": "anon-id-new", - "event": "event1", - "type": "audiencelisT", - "properties": { - "listData": { - "remove": [ - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "mobileId": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - } - ] - }, - "enablePartialFailure": true - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs", - "headers": { - "Authorization": "Bearer dummy-access", - "Content-Type": "application/json", - "developer-token": "dummy-dev-token" - }, - "params": { - "listId": "list111", - "customerId": "7693729833" - }, - "body": { - "JSON": { - "enablePartialFailure": true, - "operations": [ - { - "remove": { - "userIdentifiers": [ - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "google_adwords_remarketing_lists", - "description": "Test 12", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "destination": { - "Config": { - "rudderAccountId": "rudder-acc-id", - "listId": "list111", - "customerId": "7693729833", - "loginCustomerId": "", - "subAccount": false, - "userSchema": [ - "email", - "phone", - "addressInfo" - ], - "isHashRequired": true, - "typeOfList": "General" - } - }, - "message": { - "userId": "user 1", - "anonymousId": "anon-id-new", - "event": "event1", - "type": "audiencelisT", - "properties": { - "listData": { - "delete": [ - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "mobileId": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - } - ] - }, - "enablePartialFailure": true - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "statusCode": 400, - "error": "Neither 'add' nor 'remove' property is present inside 'listData' or there are no attributes inside 'add' or 'remove' properties matching with the schema fields. Aborting message.", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation", - "destType": "GOOGLE_ADWORDS_REMARKETING_LISTS", - "module": "destination", - "implementation": "native", - "feature": "processor" - } - } - ] - } - } - }, - { - "name": "google_adwords_remarketing_lists", - "description": "Test 13", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "destination": { - "Config": { - "rudderAccountId": "rudder-acc-id", - "listId": "list111", - "customerId": "7693729833", - "loginCustomerId": "", - "subAccount": false, - "userSchema": [ - "email", - "phone", - "addressInfo" - ], - "isHashRequired": true, - "typeOfList": "General" - } - }, - "message": { - "userId": "user 1", - "anonymousId": "anon-id-new", - "event": "event1", - "type": "audiencelisT", - "properties": { - "listData": { - "remove": [ - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "mobileId": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - } - ], - "add": [ - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "mobileId": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - } - ] - }, - "enablePartialFailure": true - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs", - "headers": { - "Authorization": "Bearer dummy-access", - "Content-Type": "application/json", - "developer-token": "dummy-dev-token" - }, - "params": { - "listId": "list111", - "customerId": "7693729833" - }, - "body": { - "JSON": { - "enablePartialFailure": true, - "operations": [ - { - "remove": { - "userIdentifiers": [ - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - } - ] - } - }, - { - "remove": { - "userIdentifiers": [ - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - } - ] - } - }, - { - "remove": { - "userIdentifiers": [ - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - }, - { - "remove": { - "userIdentifiers": [ - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - } - ] - } - }, - { - "remove": { - "userIdentifiers": [ - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - } - ] - } - }, - { - "remove": { - "userIdentifiers": [ - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - }, - { - "remove": { - "userIdentifiers": [ - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - } - ] - } - }, - { - "remove": { - "userIdentifiers": [ - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - } - ] - } - }, - { - "remove": { - "userIdentifiers": [ - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - }, - { - "remove": { - "userIdentifiers": [ - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "statusCode": 200 - }, - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs", - "headers": { - "Authorization": "Bearer dummy-access", - "Content-Type": "application/json", - "developer-token": "dummy-dev-token" - }, - "params": { - "listId": "list111", - "customerId": "7693729833" - }, - "body": { - "JSON": { - "enablePartialFailure": true, - "operations": [ - { - "create": { - "userIdentifiers": [ - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - } - ] - } - }, - { - "create": { - "userIdentifiers": [ - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - } - ] - } - }, - { - "create": { - "userIdentifiers": [ - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - }, - { - "create": { - "userIdentifiers": [ - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - } - ] - } - }, - { - "create": { - "userIdentifiers": [ - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - } - ] - } - }, - { - "create": { - "userIdentifiers": [ - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - }, - { - "create": { - "userIdentifiers": [ - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - } - ] - } - }, - { - "create": { - "userIdentifiers": [ - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - } - ] - } - }, - { - "create": { - "userIdentifiers": [ - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - }, - { - "create": { - "userIdentifiers": [ - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "google_adwords_remarketing_lists", - "description": "Test 14", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "destination": { - "Config": { - "rudderAccountId": "rudder-acc-id", - "listId": "list111", - "customerId": "7693729833", - "loginCustomerId": "", - "subAccount": false, - "userSchema": [ - "email", - "phone", - "addressInfo" - ], - "isHashRequired": true, - "typeOfList": "General" - } - }, - "message": { - "userId": "user 1", - "anonymousId": "anon-id-new", - "event": "event1", - "type": "audiencelisT", - "properties": { - "listData": { - "remove": [ - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "mobileId": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - } - ], - "add": [ - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "mobileId": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - } - ] - }, - "enablePartialFailure": true - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs", - "headers": { - "Authorization": "Bearer dummy-access", - "Content-Type": "application/json", - "developer-token": "dummy-dev-token" - }, - "params": { - "listId": "list111", - "customerId": "7693729833" - }, - "body": { - "JSON": { - "enablePartialFailure": true, - "operations": [ - { - "remove": { - "userIdentifiers": [ - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "statusCode": 200 - }, - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs", - "headers": { - "Authorization": "Bearer dummy-access", - "Content-Type": "application/json", - "developer-token": "dummy-dev-token" - }, - "params": { - "listId": "list111", - "customerId": "7693729833" - }, - "body": { - "JSON": { - "enablePartialFailure": true, - "operations": [ - { - "create": { - "userIdentifiers": [ - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "google_adwords_remarketing_lists", - "description": "Test 15", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "destination": { - "Config": { - "rudderAccountId": "rudder-acc-id", - "listId": "list111", - "customerId": "7693729833", - "loginCustomerId": "", - "subAccount": false, - "userSchema": [ - "email", - "phone", - "addressInfo" - ], - "isHashRequired": true, - "typeOfList": "General" - } - }, - "message": { - "userId": "user 1", - "anonymousId": "anon-id-new", - "event": "event1", - "type": "audiencelisT", - "properties": { - "listData": { - "remove": [ - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": null, - "lastName": "jkl", - "country": "US", - "mobileId": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - } - ], - "add": [ - { - "email": "ghi@abc.com", - "phone": null, - "firstName": "ghi", - "lastName": "jkl", - "country": null, - "mobileId": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - } - ] - }, - "enablePartialFailure": true - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs", - "headers": { - "Authorization": "Bearer dummy-access", - "Content-Type": "application/json", - "developer-token": "dummy-dev-token" - }, - "params": { - "listId": "list111", - "customerId": "7693729833" - }, - "body": { - "JSON": { - "enablePartialFailure": true, - "operations": [ - { - "remove": { - "userIdentifiers": [ - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "statusCode": 200 - }, - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs", - "headers": { - "Authorization": "Bearer dummy-access", - "Content-Type": "application/json", - "developer-token": "dummy-dev-token" - }, - "params": { - "listId": "list111", - "customerId": "7693729833" - }, - "body": { - "JSON": { - "enablePartialFailure": true, - "operations": [ - { - "create": { - "userIdentifiers": [ - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "google_adwords_remarketing_lists", - "description": "Test 16", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "destination": { - "Config": { - "rudderAccountId": "rudder-acc-id", - "listId": "list111", - "customerId": "7693729833", - "loginCustomerId": "", - "subAccount": false, - "userSchema": [ - "email", - "phone", - "addressInfo" - ], - "isHashRequired": true, - "typeOfList": "General" - } - }, - "message": { - "userId": "user 1", - "anonymousId": "anon-id-new", - "event": "event1", - "type": "audiencelist", - "properties": { - "listData": { - "add": [ - { - "email": "test@abc.com", - "phone": false, - "firstName": "test", - "lastName": null, - "country": "US", - "postalCode": 0 - } - ] - }, - "enablePartialFailure": true - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs", - "headers": { - "Authorization": "Bearer dummy-access", - "Content-Type": "application/json", - "developer-token": "dummy-dev-token" - }, - "params": { - "listId": "list111", - "customerId": "7693729833" - }, - "body": { - "JSON": { - "enablePartialFailure": true, - "operations": [ - { - "create": { - "userIdentifiers": [ - { - "hashedEmail": "d3142c8f9c9129484daf28df80cc5c955791efed5e69afabb603bc8cb9ffd419" - }, - { - "addressInfo": { - "hashedFirstName": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08", - "countryCode": "US", - "postalCode": 0 - } - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "google_adwords_remarketing_lists", - "description": "Test 17", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "metadata": { - "secret": null - }, - "destination": { - "Config": { - "rudderAccountId": "rudder-acc-id", - "listId": "list111", - "customerId": "7693729833", - "loginCustomerId": "", - "subAccount": false, - "userSchema": [ - "email", - "phone", - "addressInfo" - ], - "isHashRequired": true, - "typeOfList": "General" - } - }, - "message": { - "userId": "user 1", - "anonymousId": "anon-id-new", - "event": "event1", - "type": "audiencelist", - "properties": { - "listData": { - "add": [ - { - "email": "test@abc.com", - "phone": "@09876543210", - "firstName": "test", - "lastName": "rudderlabs", - "country": "US", - "postalCode": "1245" - } - ] - }, - "enablePartialFailure": true - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "metadata": { - "secret": null - }, - "statusCode": 500, - "error": "OAuth - access token not found", - "statTags": { - "errorCategory": "platform", - "errorType": "oAuthSecret", - "destType": "GOOGLE_ADWORDS_REMARKETING_LISTS", - "module": "destination", - "implementation": "native", - "feature": "processor" - } - } - ] - } - } - }, - { - "name": "google_adwords_remarketing_lists", - "description": "Test 18", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "destination": { - "Config": { - "rudderAccountId": "rudder-acc-id", - "listId": "list111", - "customerId": "7693729833", - "loginCustomerId": "", - "subAccount": false, - "userSchema": [ - "email", - "phone", - "addressInfo" - ], - "isHashRequired": true, - "typeOfList": "General", - "audienceId": "aud1234" - } - }, - "message": { - "userId": "user 1", - "anonymousId": "anon-id-new", - "event": "event1", - "type": "audiencelist", - "properties": { - "listData": { - "add": [ - { - "email": "sudip@abc.com", - "phone": false, - "firstName": "sudip", - "lastName": null, - "country": "US", - "postalCode": 0 - } - ] - }, - "enablePartialFailure": true - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs", - "headers": { - "Authorization": "Bearer dummy-access", - "Content-Type": "application/json", - "developer-token": "dummy-dev-token" - }, - "params": { - "listId": "aud1234", - "customerId": "7693729833" - }, - "body": { - "JSON": { - "enablePartialFailure": true, - "operations": [ - { - "create": { - "userIdentifiers": [ - { - "hashedEmail": "938758751f5af66652a118e26503af824404bc13acd1cb7642ddff99916f0e1c" - }, - { - "addressInfo": { - "hashedFirstName": "a512ebb75e941411945c9a18bca4ecc315830e0b5cff8a525472c86c1f540844", - "countryCode": "US", - "postalCode": 0 - } - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "google_adwords_remarketing_lists", - "description": "Test 19", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "destination": { - "Config": { - "rudderAccountId": "rudder-acc-id", - "customerId": "7693729833", - "loginCustomerId": "", - "subAccount": false, - "userSchema": [ - "email", - "phone", - "addressInfo" - ], - "isHashRequired": true, - "typeOfList": "General" - } - }, - "message": { - "anonymousId": "24ed22ae-0681-4882-8c33-012e298e1c17", - "channel": "sources", - "context": { - "destinationFields": "email", - "externalId": [ - { - "identifierType": "email", - "type": "GOOGLE_ADWORDS_REMARKETING_LISTS-830441345" - } - ], - "mappedToDestination": "true", - "sources": { - "job_id": "2UcqQB4ygGtTBAvwCWl7xz8dJgt", - "job_run_id": "cjmsdip7m95b7aee7tpg", - "task_run_id": "cjmsdip7m95b7aee7tq0", - "version": "master" - } - }, - "event": "Add_Audience", - "messageId": "bd2d67ca-0c9a-4d3b-a2f8-35a3c3f75ba7", - "properties": { - "listData": { - "remove": [ - { - "email": "test1@mail.com" - }, - { - "email": "test5@xmail.com" - }, - { - "email": "test3@mail.com" - } - ] - } - }, - "recordId": "a071551c-87e0-48a7-aa5c-7c4144cec5cf/1/5", - "rudderId": "5e9ada0e-5f50-4cb8-a015-f6842a7615fd", - "sentAt": "2023-08-29 10:22:06.395377223 +0000 UTC", - "type": "audienceList", - "userId": "23423423" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs", - "headers": { - "Authorization": "Bearer dummy-access", - "Content-Type": "application/json", - "developer-token": "dummy-dev-token" - }, - "params": { - "listId": "830441345", - "customerId": "7693729833" - }, - "body": { - "JSON": { - "operations": [ - { - "remove": { - "userIdentifiers": [ - { - "hashedEmail": "78310d2dd727b704ff9d9c4742d01941b1217b89f45ab71d1e9bf5a010144048" - }, - { - "hashedEmail": "34a6406a076b943abfb9e97a6761e0c6b8cf049ab15b013412c57cf8370b5436" - }, - { - "hashedEmail": "8075d00e5f006b95eb090bf50f5246bc3c18c3d771fa1edf967b033b274b8d84" - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "google_adwords_remarketing_lists", - "description": "Test 20", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "destination": { - "Config": { - "rudderAccountId": "rudder-acc-id", - "customerId": "7693729833", - "loginCustomerId": "", - "subAccount": false, - "userSchema": [ - "email", - "phone", - "addressInfo" - ], - "isHashRequired": true, - "typeOfList": "General" - } - }, - "message": { - "anonymousId": "24ed22ae-0681-4882-8c33-012e298e1c17", - "channel": "sources", - "context": { - "destinationFields": "email", - "externalId": [ - { - "identifierType": "email", - "type": "GOOGLE_ADWORDS_REMARKETING_LISTS-830441345" - } - ], - "mappedToDestination": "true", - "sources": { - "job_id": "2UcqQB4ygGtTBAvwCWl7xz8dJgt", - "job_run_id": "cjmsdip7m95b7aee7tpg", - "task_run_id": "cjmsdip7m95b7aee7tq0", - "version": "master" - } - }, - "event": "Add_Audience", - "messageId": "bd2d67ca-0c9a-4d3b-a2f8-35a3c3f75ba7", - "properties": { - "listData": { - "add": [ - { - "email": "test1@mail.com" - }, - { - "email": "test5@xmail.com" - }, - { - "email": "test3@mail.com" - } - ] - } - }, - "recordId": "a071551c-87e0-48a7-aa5c-7c4144cec5cf/1/5", - "rudderId": "5e9ada0e-5f50-4cb8-a015-f6842a7615fd", - "sentAt": "2023-08-29 10:22:06.395377223 +0000 UTC", - "type": "audienceList", - "userId": "23423423" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs", - "headers": { - "Authorization": "Bearer dummy-access", - "Content-Type": "application/json", - "developer-token": "dummy-dev-token" - }, - "params": { - "listId": "830441345", - "customerId": "7693729833" - }, - "body": { - "JSON": { - "operations": [ - { - "create": { - "userIdentifiers": [ - { - "hashedEmail": "78310d2dd727b704ff9d9c4742d01941b1217b89f45ab71d1e9bf5a010144048" - }, - { - "hashedEmail": "34a6406a076b943abfb9e97a6761e0c6b8cf049ab15b013412c57cf8370b5436" - }, - { - "hashedEmail": "8075d00e5f006b95eb090bf50f5246bc3c18c3d771fa1edf967b033b274b8d84" - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "statusCode": 200 - } - ] - } - } - } -] \ No newline at end of file + { + name: 'google_adwords_remarketing_lists', + description: 'Test 0', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + destination: { + Config: { + rudderAccountId: 'rudder-acc-id', + listId: 'list111', + customerId: '7693729833', + loginCustomerId: '', + subAccount: false, + userSchema: ['email', 'phone', 'addressInfo'], + isHashRequired: true, + typeOfList: 'General', + }, + }, + message: { + userId: 'user 1', + anonymousId: 'anon-id-new', + event: 'event1', + type: 'audiencelist', + properties: { + listData: { + add: [ + { + email: 'test@abc.com', + phone: '@09876543210', + firstName: 'test', + lastName: 'rudderlabs', + country: 'US', + postalCode: '1245', + }, + ], + }, + enablePartialFailure: true, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs', + headers: { + Authorization: 'Bearer dummy-access', + 'Content-Type': 'application/json', + 'developer-token': 'dummy-dev-token', + }, + params: { + listId: 'list111', + customerId: '7693729833', + consent: {}, + }, + body: { + JSON: { + enablePartialFailure: true, + operations: [ + { + create: { + userIdentifiers: [ + { + hashedEmail: + 'd3142c8f9c9129484daf28df80cc5c955791efed5e69afabb603bc8cb9ffd419', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08', + hashedLastName: + 'dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251', + countryCode: 'US', + postalCode: '1245', + }, + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'google_adwords_remarketing_lists', + description: 'Test 1', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + destination: { + Config: { + rudderAccountId: 'rudder-acc-id', + listId: 'list111', + customerId: '769-372-9833', + loginCustomerId: '870-483-0944', + subAccount: true, + userSchema: ['email', 'phone', 'addressInfo'], + isHashRequired: true, + typeOfList: 'userID', + }, + }, + message: { + userId: 'user 1', + anonymousId: 'anon-id-new', + event: 'event1', + type: 'audiencelist', + properties: { + listData: { + add: [ + { + email: 'test@abc.com', + phone: '@09876543210', + firstName: 'test', + lastName: 'rudderlabs', + country: 'US', + postalCode: '1245', + thirdPartyUserId: 'useri1234', + }, + ], + }, + enablePartialFailure: true, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs', + headers: { + Authorization: 'Bearer dummy-access', + 'Content-Type': 'application/json', + 'developer-token': 'dummy-dev-token', + 'login-customer-id': '8704830944', + }, + params: { + listId: 'list111', + customerId: '7693729833', + consent: {}, + }, + body: { + JSON: { + enablePartialFailure: true, + operations: [ + { + create: { + userIdentifiers: [ + { + thirdPartyUserId: 'useri1234', + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'google_adwords_remarketing_lists', + description: 'Test 2', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + destination: { + Config: { + rudderAccountId: 'rudder-acc-id', + listId: 'list111', + customerId: '7693729833', + loginCustomerId: '', + subAccount: false, + userSchema: ['email', 'phone', 'addressInfo'], + isHashRequired: true, + typeOfList: 'mobileDeviceID', + }, + }, + message: { + userId: 'user 1', + anonymousId: 'anon-id-new', + event: 'event1', + type: 'audiencelist', + properties: { + listData: { + add: [ + { + email: 'test@abc.com', + phone: '@09876543210', + firstName: 'test', + lastName: 'rudderlabs', + country: 'US', + postalCode: '1245', + thirdPartyUserId: 'useri1234', + mobileId: 'abcd-1234-567h', + }, + ], + }, + enablePartialFailure: true, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs', + headers: { + Authorization: 'Bearer dummy-access', + 'Content-Type': 'application/json', + 'developer-token': 'dummy-dev-token', + }, + params: { + listId: 'list111', + customerId: '7693729833', + consent: {}, + }, + body: { + JSON: { + enablePartialFailure: true, + operations: [ + { + create: { + userIdentifiers: [ + { + mobileId: 'abcd-1234-567h', + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'google_adwords_remarketing_lists', + description: 'Test 3', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + destination: { + Config: { + rudderAccountId: 'rudder-acc-id', + listId: 'list111', + customerId: '7693729833', + loginCustomerId: '', + subAccount: false, + userSchema: ['email', 'phone', 'addressInfo'], + isHashRequired: true, + typeOfList: 'mobileDeviceID', + }, + }, + message: { + userId: 'user 1', + anonymousId: 'anon-id-new', + event: 'event1', + type: 'audiencelist', + properties: { + listData: { + add: [ + { + email: 'abc@abc.com', + phone: '@09876543210', + firstName: 'abc', + lastName: 'efg', + country: 'US', + postalCode: '1245', + thirdPartyUserId: 'useri1234', + }, + { + email: 'def@abc.com', + phone: '@09876543210', + firstName: 'def', + lastName: 'ghi', + country: 'US', + postalCode: '1245', + thirdPartyUserId: 'useri1234', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + thirdPartyUserId: 'useri1234', + }, + ], + }, + enablePartialFailure: true, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + statusCode: 400, + error: + "Neither 'add' nor 'remove' property is present inside 'listData' or there are no attributes inside 'add' or 'remove' properties matching with the schema fields. Aborting message.", + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'GOOGLE_ADWORDS_REMARKETING_LISTS', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'google_adwords_remarketing_lists', + description: 'Test 4', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + destination: { + Config: { + rudderAccountId: 'rudder-acc-id', + listId: 'list111', + customerId: '7693729833', + loginCustomerId: '', + subAccount: false, + userSchema: ['email', 'phone', 'addressInfo'], + isHashRequired: true, + typeOfList: 'mobileDeviceID', + }, + }, + message: { + userId: 'user 1', + anonymousId: 'anon-id-new', + event: 'event1', + type: 'audiencelist', + properties: { + listData: { + remove: [ + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + thirdPartyUserId: 'useri1234', + }, + ], + }, + enablePartialFailure: true, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + statusCode: 400, + error: + "Neither 'add' nor 'remove' property is present inside 'listData' or there are no attributes inside 'add' or 'remove' properties matching with the schema fields. Aborting message.", + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'GOOGLE_ADWORDS_REMARKETING_LISTS', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'google_adwords_remarketing_lists', + description: 'Test 5', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + destination: { + Config: { + rudderAccountId: 'rudder-acc-id', + listId: 'list111', + customerId: '7693729833', + loginCustomerId: '', + subAccount: false, + userSchema: ['email', 'phone', 'addressInfo'], + isHashRequired: true, + typeOfList: 'mobileDeviceID', + }, + }, + message: { + userId: 'user 1', + anonymousId: 'anon-id-new', + event: 'event1', + properties: { + listData: { + remove: [ + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + thirdPartyUserId: 'useri1234', + }, + ], + }, + enablePartialFailure: true, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + statusCode: 400, + error: 'Message Type is not present. Aborting message.', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'GOOGLE_ADWORDS_REMARKETING_LISTS', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'google_adwords_remarketing_lists', + description: 'Test 6', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + destination: { + Config: { + rudderAccountId: 'rudder-acc-id', + listId: 'list111', + customerId: '7693729833', + loginCustomerId: '', + subAccount: false, + userSchema: ['email', 'phone', 'addressInfo'], + isHashRequired: true, + typeOfList: 'mobileDeviceID', + }, + }, + message: { + type: 'audiencelist', + userId: 'user 1', + anonymousId: 'anon-id-new', + event: 'event1', + properties: { + enablePartialFailure: true, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + statusCode: 400, + error: 'listData is not present inside properties. Aborting message.', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'GOOGLE_ADWORDS_REMARKETING_LISTS', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'google_adwords_remarketing_lists', + description: 'Test 7', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + destination: { + Config: { + rudderAccountId: 'rudder-acc-id', + listId: 'list111', + customerId: '7693729833', + loginCustomerId: '', + subAccount: true, + userSchema: ['email', 'phone', 'addressInfo'], + isHashRequired: true, + typeOfList: 'mobileDeviceID', + }, + }, + message: { + userId: 'user 1', + anonymousId: 'anon-id-new', + event: 'event1', + type: 'audiencelisT', + properties: { + listData: { + add: [ + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + mobileId: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + ], + }, + enablePartialFailure: true, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + statusCode: 400, + error: 'loginCustomerId is required as subAccount is true.', + statTags: { + errorCategory: 'dataValidation', + errorType: 'configuration', + destType: 'GOOGLE_ADWORDS_REMARKETING_LISTS', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'google_adwords_remarketing_lists', + description: 'Test 8', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + destination: { + Config: { + rudderAccountId: 'rudder-acc-id', + listId: 'list111', + customerId: '7693729833', + loginCustomerId: '', + subAccount: false, + userSchema: ['email', 'phone', 'addressInfo'], + isHashRequired: true, + typeOfList: 'General', + }, + }, + message: { + userId: 'user 1', + anonymousId: 'anon-id-new', + event: 'event1', + type: 'audiencelisT', + properties: { + listData: { + add: [ + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + mobileId: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + ], + }, + enablePartialFailure: true, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs', + headers: { + Authorization: 'Bearer dummy-access', + 'Content-Type': 'application/json', + 'developer-token': 'dummy-dev-token', + }, + params: { + listId: 'list111', + customerId: '7693729833', + consent: {}, + }, + body: { + JSON: { + enablePartialFailure: true, + operations: [ + { + create: { + userIdentifiers: [ + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + ], + }, + }, + { + create: { + userIdentifiers: [ + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + ], + }, + }, + { + create: { + userIdentifiers: [ + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + ], + }, + }, + { + create: { + userIdentifiers: [ + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + ], + }, + }, + { + create: { + userIdentifiers: [ + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + ], + }, + }, + { + create: { + userIdentifiers: [ + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + ], + }, + }, + { + create: { + userIdentifiers: [ + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + ], + }, + }, + { + create: { + userIdentifiers: [ + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + ], + }, + }, + { + create: { + userIdentifiers: [ + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + ], + }, + }, + { + create: { + userIdentifiers: [ + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'google_adwords_remarketing_lists', + description: 'Test 9', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + destination: { + Config: { + rudderAccountId: 'rudder-acc-id', + listId: 'list111', + customerId: '7693729833', + loginCustomerId: '', + subAccount: false, + userSchema: ['email', 'phone', 'addressInfo'], + isHashRequired: true, + typeOfList: 'General', + }, + }, + message: { + userId: 'user 1', + anonymousId: 'anon-id-new', + event: 'event1', + type: 'audiencelisT', + properties: { + listData: { + add: [ + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + mobileId: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + ], + remove: [ + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + mobileId: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + ], + }, + enablePartialFailure: true, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs', + headers: { + Authorization: 'Bearer dummy-access', + 'Content-Type': 'application/json', + 'developer-token': 'dummy-dev-token', + }, + params: { + listId: 'list111', + customerId: '7693729833', + consent: {}, + }, + body: { + JSON: { + enablePartialFailure: true, + operations: [ + { + create: { + userIdentifiers: [ + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs', + headers: { + Authorization: 'Bearer dummy-access', + 'Content-Type': 'application/json', + 'developer-token': 'dummy-dev-token', + }, + params: { + listId: 'list111', + customerId: '7693729833', + consent: {}, + }, + body: { + JSON: { + enablePartialFailure: true, + operations: [ + { + remove: { + userIdentifiers: [ + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'google_adwords_remarketing_lists', + description: 'Test 10', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + destination: { + Config: { + rudderAccountId: 'rudder-acc-id', + listId: 'list111', + customerId: '7693729833', + loginCustomerId: '', + subAccount: false, + userSchema: ['email', 'phone', 'addressInfo'], + isHashRequired: true, + typeOfList: 'General', + }, + }, + message: { + userId: 'user 1', + anonymousId: 'anon-id-new', + event: 'event1', + type: 'audiencelisT', + properties: { + listData: { + add: [ + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + mobileId: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + ], + remove: [ + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + mobileId: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + ], + }, + enablePartialFailure: true, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs', + headers: { + Authorization: 'Bearer dummy-access', + 'Content-Type': 'application/json', + 'developer-token': 'dummy-dev-token', + }, + params: { + listId: 'list111', + customerId: '7693729833', + consent: {}, + }, + body: { + JSON: { + enablePartialFailure: true, + operations: [ + { + create: { + userIdentifiers: [ + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + ], + }, + }, + { + create: { + userIdentifiers: [ + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + ], + }, + }, + { + create: { + userIdentifiers: [ + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + ], + }, + }, + { + create: { + userIdentifiers: [ + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + ], + }, + }, + { + create: { + userIdentifiers: [ + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + ], + }, + }, + { + create: { + userIdentifiers: [ + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + ], + }, + }, + { + create: { + userIdentifiers: [ + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + ], + }, + }, + { + create: { + userIdentifiers: [ + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + ], + }, + }, + { + create: { + userIdentifiers: [ + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + ], + }, + }, + { + create: { + userIdentifiers: [ + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs', + headers: { + Authorization: 'Bearer dummy-access', + 'Content-Type': 'application/json', + 'developer-token': 'dummy-dev-token', + }, + params: { + listId: 'list111', + customerId: '7693729833', + consent: {}, + }, + body: { + JSON: { + enablePartialFailure: true, + operations: [ + { + remove: { + userIdentifiers: [ + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + ], + }, + }, + { + remove: { + userIdentifiers: [ + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + ], + }, + }, + { + remove: { + userIdentifiers: [ + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + ], + }, + }, + { + remove: { + userIdentifiers: [ + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + ], + }, + }, + { + remove: { + userIdentifiers: [ + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + ], + }, + }, + { + remove: { + userIdentifiers: [ + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + ], + }, + }, + { + remove: { + userIdentifiers: [ + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + ], + }, + }, + { + remove: { + userIdentifiers: [ + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + ], + }, + }, + { + remove: { + userIdentifiers: [ + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + ], + }, + }, + { + remove: { + userIdentifiers: [ + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'google_adwords_remarketing_lists', + description: 'Test 11', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + destination: { + Config: { + rudderAccountId: 'rudder-acc-id', + listId: 'list111', + customerId: '7693729833', + loginCustomerId: '', + subAccount: false, + userSchema: ['email', 'phone', 'addressInfo'], + isHashRequired: true, + typeOfList: 'General', + }, + }, + message: { + userId: 'user 1', + anonymousId: 'anon-id-new', + event: 'event1', + type: 'audiencelisT', + properties: { + listData: { + remove: [ + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + mobileId: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + ], + }, + enablePartialFailure: true, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs', + headers: { + Authorization: 'Bearer dummy-access', + 'Content-Type': 'application/json', + 'developer-token': 'dummy-dev-token', + }, + params: { + listId: 'list111', + customerId: '7693729833', + consent: {}, + }, + body: { + JSON: { + enablePartialFailure: true, + operations: [ + { + remove: { + userIdentifiers: [ + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'google_adwords_remarketing_lists', + description: 'Test 12', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + destination: { + Config: { + rudderAccountId: 'rudder-acc-id', + listId: 'list111', + customerId: '7693729833', + loginCustomerId: '', + subAccount: false, + userSchema: ['email', 'phone', 'addressInfo'], + isHashRequired: true, + typeOfList: 'General', + }, + }, + message: { + userId: 'user 1', + anonymousId: 'anon-id-new', + event: 'event1', + type: 'audiencelisT', + properties: { + listData: { + delete: [ + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + mobileId: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + ], + }, + enablePartialFailure: true, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + statusCode: 400, + error: + "Neither 'add' nor 'remove' property is present inside 'listData' or there are no attributes inside 'add' or 'remove' properties matching with the schema fields. Aborting message.", + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'GOOGLE_ADWORDS_REMARKETING_LISTS', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'google_adwords_remarketing_lists', + description: 'Test 13', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + destination: { + Config: { + rudderAccountId: 'rudder-acc-id', + listId: 'list111', + customerId: '7693729833', + loginCustomerId: '', + subAccount: false, + userSchema: ['email', 'phone', 'addressInfo'], + isHashRequired: true, + typeOfList: 'General', + }, + }, + message: { + userId: 'user 1', + anonymousId: 'anon-id-new', + event: 'event1', + type: 'audiencelisT', + properties: { + listData: { + remove: [ + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + mobileId: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + ], + add: [ + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + mobileId: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + ], + }, + enablePartialFailure: true, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs', + headers: { + Authorization: 'Bearer dummy-access', + 'Content-Type': 'application/json', + 'developer-token': 'dummy-dev-token', + }, + params: { + listId: 'list111', + customerId: '7693729833', + consent: {}, + }, + body: { + JSON: { + enablePartialFailure: true, + operations: [ + { + remove: { + userIdentifiers: [ + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + ], + }, + }, + { + remove: { + userIdentifiers: [ + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + ], + }, + }, + { + remove: { + userIdentifiers: [ + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + ], + }, + }, + { + remove: { + userIdentifiers: [ + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + ], + }, + }, + { + remove: { + userIdentifiers: [ + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + ], + }, + }, + { + remove: { + userIdentifiers: [ + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + ], + }, + }, + { + remove: { + userIdentifiers: [ + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + ], + }, + }, + { + remove: { + userIdentifiers: [ + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + ], + }, + }, + { + remove: { + userIdentifiers: [ + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + ], + }, + }, + { + remove: { + userIdentifiers: [ + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs', + headers: { + Authorization: 'Bearer dummy-access', + 'Content-Type': 'application/json', + 'developer-token': 'dummy-dev-token', + }, + params: { + listId: 'list111', + customerId: '7693729833', + consent: {}, + }, + body: { + JSON: { + enablePartialFailure: true, + operations: [ + { + create: { + userIdentifiers: [ + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + ], + }, + }, + { + create: { + userIdentifiers: [ + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + ], + }, + }, + { + create: { + userIdentifiers: [ + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + ], + }, + }, + { + create: { + userIdentifiers: [ + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + ], + }, + }, + { + create: { + userIdentifiers: [ + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + ], + }, + }, + { + create: { + userIdentifiers: [ + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + ], + }, + }, + { + create: { + userIdentifiers: [ + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + ], + }, + }, + { + create: { + userIdentifiers: [ + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + ], + }, + }, + { + create: { + userIdentifiers: [ + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + ], + }, + }, + { + create: { + userIdentifiers: [ + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'google_adwords_remarketing_lists', + description: 'Test 14', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + destination: { + Config: { + rudderAccountId: 'rudder-acc-id', + listId: 'list111', + customerId: '7693729833', + loginCustomerId: '', + subAccount: false, + userSchema: ['email', 'phone', 'addressInfo'], + isHashRequired: true, + typeOfList: 'General', + }, + }, + message: { + userId: 'user 1', + anonymousId: 'anon-id-new', + event: 'event1', + type: 'audiencelisT', + properties: { + listData: { + remove: [ + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + mobileId: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + ], + add: [ + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + mobileId: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + ], + }, + enablePartialFailure: true, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs', + headers: { + Authorization: 'Bearer dummy-access', + 'Content-Type': 'application/json', + 'developer-token': 'dummy-dev-token', + }, + params: { + listId: 'list111', + customerId: '7693729833', + consent: {}, + }, + body: { + JSON: { + enablePartialFailure: true, + operations: [ + { + remove: { + userIdentifiers: [ + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs', + headers: { + Authorization: 'Bearer dummy-access', + 'Content-Type': 'application/json', + 'developer-token': 'dummy-dev-token', + }, + params: { + listId: 'list111', + customerId: '7693729833', + consent: {}, + }, + body: { + JSON: { + enablePartialFailure: true, + operations: [ + { + create: { + userIdentifiers: [ + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'google_adwords_remarketing_lists', + description: 'Test 15', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + destination: { + Config: { + rudderAccountId: 'rudder-acc-id', + listId: 'list111', + customerId: '7693729833', + loginCustomerId: '', + subAccount: false, + userSchema: ['email', 'phone', 'addressInfo'], + isHashRequired: true, + typeOfList: 'General', + }, + }, + message: { + userId: 'user 1', + anonymousId: 'anon-id-new', + event: 'event1', + type: 'audiencelisT', + properties: { + listData: { + remove: [ + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: null, + lastName: 'jkl', + country: 'US', + mobileId: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + ], + add: [ + { + email: 'ghi@abc.com', + phone: null, + firstName: 'ghi', + lastName: 'jkl', + country: null, + mobileId: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + ], + }, + enablePartialFailure: true, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs', + headers: { + Authorization: 'Bearer dummy-access', + 'Content-Type': 'application/json', + 'developer-token': 'dummy-dev-token', + }, + params: { + listId: 'list111', + customerId: '7693729833', + consent: {}, + }, + body: { + JSON: { + enablePartialFailure: true, + operations: [ + { + remove: { + userIdentifiers: [ + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs', + headers: { + Authorization: 'Bearer dummy-access', + 'Content-Type': 'application/json', + 'developer-token': 'dummy-dev-token', + }, + params: { + listId: 'list111', + customerId: '7693729833', + consent: {}, + }, + body: { + JSON: { + enablePartialFailure: true, + operations: [ + { + create: { + userIdentifiers: [ + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'google_adwords_remarketing_lists', + description: 'Test 16', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + destination: { + Config: { + rudderAccountId: 'rudder-acc-id', + listId: 'list111', + customerId: '7693729833', + loginCustomerId: '', + subAccount: false, + userSchema: ['email', 'phone', 'addressInfo'], + isHashRequired: true, + typeOfList: 'General', + }, + }, + message: { + userId: 'user 1', + anonymousId: 'anon-id-new', + event: 'event1', + type: 'audiencelist', + properties: { + listData: { + add: [ + { + email: 'test@abc.com', + phone: false, + firstName: 'test', + lastName: null, + country: 'US', + postalCode: 0, + }, + ], + }, + enablePartialFailure: true, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs', + headers: { + Authorization: 'Bearer dummy-access', + 'Content-Type': 'application/json', + 'developer-token': 'dummy-dev-token', + }, + params: { + listId: 'list111', + customerId: '7693729833', + consent: {}, + }, + body: { + JSON: { + enablePartialFailure: true, + operations: [ + { + create: { + userIdentifiers: [ + { + hashedEmail: + 'd3142c8f9c9129484daf28df80cc5c955791efed5e69afabb603bc8cb9ffd419', + }, + { + addressInfo: { + hashedFirstName: + '9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08', + countryCode: 'US', + postalCode: 0, + }, + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'google_adwords_remarketing_lists', + description: 'Test 17', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: null, + }, + destination: { + Config: { + rudderAccountId: 'rudder-acc-id', + listId: 'list111', + customerId: '7693729833', + loginCustomerId: '', + subAccount: false, + userSchema: ['email', 'phone', 'addressInfo'], + isHashRequired: true, + typeOfList: 'General', + }, + }, + message: { + userId: 'user 1', + anonymousId: 'anon-id-new', + event: 'event1', + type: 'audiencelist', + properties: { + listData: { + add: [ + { + email: 'test@abc.com', + phone: '@09876543210', + firstName: 'test', + lastName: 'rudderlabs', + country: 'US', + postalCode: '1245', + }, + ], + }, + enablePartialFailure: true, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + secret: null, + }, + statusCode: 500, + error: 'OAuth - access token not found', + statTags: { + errorCategory: 'platform', + errorType: 'oAuthSecret', + destType: 'GOOGLE_ADWORDS_REMARKETING_LISTS', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'google_adwords_remarketing_lists', + description: 'Test 18', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + destination: { + Config: { + rudderAccountId: 'rudder-acc-id', + listId: 'list111', + customerId: '7693729833', + loginCustomerId: '', + subAccount: false, + userSchema: ['email', 'phone', 'addressInfo'], + isHashRequired: true, + typeOfList: 'General', + audienceId: 'aud1234', + }, + }, + message: { + userId: 'user 1', + anonymousId: 'anon-id-new', + event: 'event1', + type: 'audiencelist', + properties: { + listData: { + add: [ + { + email: 'sudip@abc.com', + phone: false, + firstName: 'sudip', + lastName: null, + country: 'US', + postalCode: 0, + }, + ], + }, + enablePartialFailure: true, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs', + headers: { + Authorization: 'Bearer dummy-access', + 'Content-Type': 'application/json', + 'developer-token': 'dummy-dev-token', + }, + params: { + listId: 'aud1234', + customerId: '7693729833', + consent: {}, + }, + body: { + JSON: { + enablePartialFailure: true, + operations: [ + { + create: { + userIdentifiers: [ + { + hashedEmail: + '938758751f5af66652a118e26503af824404bc13acd1cb7642ddff99916f0e1c', + }, + { + addressInfo: { + hashedFirstName: + 'a512ebb75e941411945c9a18bca4ecc315830e0b5cff8a525472c86c1f540844', + countryCode: 'US', + postalCode: 0, + }, + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'google_adwords_remarketing_lists', + description: 'Test 19', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + destination: { + Config: { + rudderAccountId: 'rudder-acc-id', + customerId: '7693729833', + loginCustomerId: '', + subAccount: false, + userSchema: ['email', 'phone', 'addressInfo'], + isHashRequired: true, + typeOfList: 'General', + }, + }, + message: { + anonymousId: '24ed22ae-0681-4882-8c33-012e298e1c17', + channel: 'sources', + context: { + destinationFields: 'email', + externalId: [ + { + identifierType: 'email', + type: 'GOOGLE_ADWORDS_REMARKETING_LISTS-830441345', + }, + ], + mappedToDestination: 'true', + sources: { + job_id: '2UcqQB4ygGtTBAvwCWl7xz8dJgt', + job_run_id: 'cjmsdip7m95b7aee7tpg', + task_run_id: 'cjmsdip7m95b7aee7tq0', + version: 'master', + }, + }, + event: 'Add_Audience', + messageId: 'bd2d67ca-0c9a-4d3b-a2f8-35a3c3f75ba7', + properties: { + listData: { + remove: [ + { + email: 'test1@mail.com', + }, + { + email: 'test5@xmail.com', + }, + { + email: 'test3@mail.com', + }, + ], + }, + }, + recordId: 'a071551c-87e0-48a7-aa5c-7c4144cec5cf/1/5', + rudderId: '5e9ada0e-5f50-4cb8-a015-f6842a7615fd', + sentAt: '2023-08-29 10:22:06.395377223 +0000 UTC', + type: 'audienceList', + userId: '23423423', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs', + headers: { + Authorization: 'Bearer dummy-access', + 'Content-Type': 'application/json', + 'developer-token': 'dummy-dev-token', + }, + params: { + listId: '830441345', + customerId: '7693729833', + consent: {}, + }, + body: { + JSON: { + operations: [ + { + remove: { + userIdentifiers: [ + { + hashedEmail: + '78310d2dd727b704ff9d9c4742d01941b1217b89f45ab71d1e9bf5a010144048', + }, + { + hashedEmail: + '34a6406a076b943abfb9e97a6761e0c6b8cf049ab15b013412c57cf8370b5436', + }, + { + hashedEmail: + '8075d00e5f006b95eb090bf50f5246bc3c18c3d771fa1edf967b033b274b8d84', + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'google_adwords_remarketing_lists', + description: 'Test 20', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + destination: { + Config: { + rudderAccountId: 'rudder-acc-id', + customerId: '7693729833', + loginCustomerId: '', + subAccount: false, + userSchema: ['email', 'phone', 'addressInfo'], + isHashRequired: true, + typeOfList: 'General', + }, + }, + message: { + anonymousId: '24ed22ae-0681-4882-8c33-012e298e1c17', + channel: 'sources', + context: { + destinationFields: 'email', + externalId: [ + { + identifierType: 'email', + type: 'GOOGLE_ADWORDS_REMARKETING_LISTS-830441345', + }, + ], + mappedToDestination: 'true', + sources: { + job_id: '2UcqQB4ygGtTBAvwCWl7xz8dJgt', + job_run_id: 'cjmsdip7m95b7aee7tpg', + task_run_id: 'cjmsdip7m95b7aee7tq0', + version: 'master', + }, + }, + event: 'Add_Audience', + messageId: 'bd2d67ca-0c9a-4d3b-a2f8-35a3c3f75ba7', + properties: { + listData: { + add: [ + { + email: 'test1@mail.com', + }, + { + email: 'test5@xmail.com', + }, + { + email: 'test3@mail.com', + }, + ], + }, + }, + recordId: 'a071551c-87e0-48a7-aa5c-7c4144cec5cf/1/5', + rudderId: '5e9ada0e-5f50-4cb8-a015-f6842a7615fd', + sentAt: '2023-08-29 10:22:06.395377223 +0000 UTC', + type: 'audienceList', + userId: '23423423', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs', + headers: { + Authorization: 'Bearer dummy-access', + 'Content-Type': 'application/json', + 'developer-token': 'dummy-dev-token', + }, + params: { + listId: '830441345', + customerId: '7693729833', + consent: {}, + }, + body: { + JSON: { + operations: [ + { + create: { + userIdentifiers: [ + { + hashedEmail: + '78310d2dd727b704ff9d9c4742d01941b1217b89f45ab71d1e9bf5a010144048', + }, + { + hashedEmail: + '34a6406a076b943abfb9e97a6761e0c6b8cf049ab15b013412c57cf8370b5436', + }, + { + hashedEmail: + '8075d00e5f006b95eb090bf50f5246bc3c18c3d771fa1edf967b033b274b8d84', + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'google_adwords_remarketing_lists', + description: 'Test 20: adding consent object', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + destination: { + Config: { + rudderAccountId: 'rudder-acc-id', + customerId: '7693729833', + loginCustomerId: '', + subAccount: false, + userSchema: ['email', 'phone', 'addressInfo'], + isHashRequired: true, + typeOfList: 'General', + }, + }, + message: { + anonymousId: '24ed22ae-0681-4882-8c33-012e298e1c17', + channel: 'sources', + context: { + destinationFields: 'email', + externalId: [ + { + identifierType: 'email', + type: 'GOOGLE_ADWORDS_REMARKETING_LISTS-830441345', + }, + ], + mappedToDestination: 'true', + sources: { + job_id: '2UcqQB4ygGtTBAvwCWl7xz8dJgt', + job_run_id: 'cjmsdip7m95b7aee7tpg', + task_run_id: 'cjmsdip7m95b7aee7tq0', + version: 'master', + }, + }, + event: 'Add_Audience', + messageId: 'bd2d67ca-0c9a-4d3b-a2f8-35a3c3f75ba7', + properties: { + userDataConsent: 'UNSPECIFIED', + personalizationConsent: 'GRANTED', + listData: { + add: [ + { + email: 'test1@mail.com', + }, + { + email: 'test5@xmail.com', + }, + { + email: 'test3@mail.com', + }, + ], + }, + }, + recordId: 'a071551c-87e0-48a7-aa5c-7c4144cec5cf/1/5', + rudderId: '5e9ada0e-5f50-4cb8-a015-f6842a7615fd', + sentAt: '2023-08-29 10:22:06.395377223 +0000 UTC', + type: 'audienceList', + userId: '23423423', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs', + headers: { + Authorization: 'Bearer dummy-access', + 'Content-Type': 'application/json', + 'developer-token': 'dummy-dev-token', + }, + params: { + listId: '830441345', + customerId: '7693729833', + consent: { + adUserData: 'UNSPECIFIED', + adPersonalization: 'GRANTED', + }, + }, + body: { + JSON: { + operations: [ + { + create: { + userIdentifiers: [ + { + hashedEmail: + '78310d2dd727b704ff9d9c4742d01941b1217b89f45ab71d1e9bf5a010144048', + }, + { + hashedEmail: + '34a6406a076b943abfb9e97a6761e0c6b8cf049ab15b013412c57cf8370b5436', + }, + { + hashedEmail: + '8075d00e5f006b95eb090bf50f5246bc3c18c3d771fa1edf967b033b274b8d84', + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'google_adwords_remarketing_lists', + description: 'Test 20 : consent field values are discarded if it does not match allowed values', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + destination: { + Config: { + rudderAccountId: 'rudder-acc-id', + customerId: '7693729833', + loginCustomerId: '', + subAccount: false, + userSchema: ['email', 'phone', 'addressInfo'], + isHashRequired: true, + typeOfList: 'General', + }, + }, + message: { + anonymousId: '24ed22ae-0681-4882-8c33-012e298e1c17', + channel: 'sources', + context: { + destinationFields: 'email', + externalId: [ + { + identifierType: 'email', + type: 'GOOGLE_ADWORDS_REMARKETING_LISTS-830441345', + }, + ], + mappedToDestination: 'true', + sources: { + job_id: '2UcqQB4ygGtTBAvwCWl7xz8dJgt', + job_run_id: 'cjmsdip7m95b7aee7tpg', + task_run_id: 'cjmsdip7m95b7aee7tq0', + version: 'master', + }, + }, + event: 'Add_Audience', + messageId: 'bd2d67ca-0c9a-4d3b-a2f8-35a3c3f75ba7', + properties: { + userDataConsent: 'RANDOM', + personalizationConsent: 'RANDOM', + listData: { + add: [ + { + email: 'test1@mail.com', + }, + { + email: 'test5@xmail.com', + }, + { + email: 'test3@mail.com', + }, + ], + }, + }, + recordId: 'a071551c-87e0-48a7-aa5c-7c4144cec5cf/1/5', + rudderId: '5e9ada0e-5f50-4cb8-a015-f6842a7615fd', + sentAt: '2023-08-29 10:22:06.395377223 +0000 UTC', + type: 'audienceList', + userId: '23423423', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs', + headers: { + Authorization: 'Bearer dummy-access', + 'Content-Type': 'application/json', + 'developer-token': 'dummy-dev-token', + }, + params: { + listId: '830441345', + customerId: '7693729833', + consent: {}, + }, + body: { + JSON: { + operations: [ + { + create: { + userIdentifiers: [ + { + hashedEmail: + '78310d2dd727b704ff9d9c4742d01941b1217b89f45ab71d1e9bf5a010144048', + }, + { + hashedEmail: + '34a6406a076b943abfb9e97a6761e0c6b8cf049ab15b013412c57cf8370b5436', + }, + { + hashedEmail: + '8075d00e5f006b95eb090bf50f5246bc3c18c3d771fa1edf967b033b274b8d84', + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + statusCode: 200, + }, + ], + }, + }, + }, +]; diff --git a/test/integrations/destinations/google_adwords_remarketing_lists/router/data.ts b/test/integrations/destinations/google_adwords_remarketing_lists/router/data.ts index 3d3de6a587..c60e32aaf6 100644 --- a/test/integrations/destinations/google_adwords_remarketing_lists/router/data.ts +++ b/test/integrations/destinations/google_adwords_remarketing_lists/router/data.ts @@ -1,555 +1,576 @@ export const data = [ - { - name: 'google_adwords_remarketing_lists', - description: 'Test 0', - feature: 'router', - module: 'destination', - version: 'v0', - input: { - request: { - body: { - input: [ - { - "metadata": { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl9101" - }, - "jobId": 1 - }, - "destination": { - "Config": { - "rudderAccountId": "258Yea7usSKNpbkIaesL9oJ9iYw", - "listId": "7090784486", - "customerId": "7693729833", - "loginCustomerId": "", - "subAccount": false, - "userSchema": ["email", "phone", "addressInfo"], - "isHashRequired": true, - "typeOfList": "General" - } - }, - "message": { - "userId": "user 1", - "anonymousId": "anon-id-new", - "event": "event1", - "type": "audiencelist", - "properties": { - "listData": { - "add": [ - { - "email": "test@abc.com", - "phone": "@09876543210", - "firstName": "test", - "lastName": "rudderlabs", - "country": "US", - "postalCode": "1245" - } - ] - }, - "enablePartialFailure": true - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - }, - { - "metadata": { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl9101" - }, - "jobId": 2 - }, - "destination": { - "Config": { - "rudderAccountId": "258Yea7usSKNpbkIaesL9oJ9iYw", - "listId": "7090784486", - "customerId": "7693729833", - "loginCustomerId": "", - "subAccount": false, - "userSchema": ["email", "phone", "addressInfo"], - "isHashRequired": true, - "typeOfList": "userID" - } - }, - "message": { - "userId": "user 1", - "anonymousId": "anon-id-new", - "event": "event1", - "type": "audiencelist", - "properties": { - "listData": { - "add": [ - { - "email": "test@abc.com", - "phone": "@09876543210", - "firstName": "test", - "lastName": "rudderlabs", - "country": "US", - "postalCode": "1245", - "thirdPartyUserId": "useri1234" - } - ] - }, - "enablePartialFailure": true - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - }, - { - "metadata": { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl9101" - }, - "jobId": 3 - }, - "destination": { - "Config": { - "rudderAccountId": "258Yea7usSKNpbkIaesL9oJ9iYw", - "listId": "7090784486", - "customerId": "7693729833", - "loginCustomerId": "", - "subAccount": false, - "userSchema": ["email", "phone", "addressInfo"], - "isHashRequired": true, - "typeOfList": "General" - } - }, - "message": { - "userId": "user 1", - "anonymousId": "anon-id-new", - "event": "event1", - "type": "audiencelist", - "properties": { - "listData": { - "remove": [ - { - "email": "test@abc.com", - "phone": "@09876543210", - "firstName": "test", - "lastName": "rudderlabs", - "country": "US", - "postalCode": "1245" - } - ] - }, - "enablePartialFailure": true - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - }, - { - "metadata": { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl9101" - }, - "jobId": 4 - }, - "destination": { - "Config": { - "rudderAccountId": "258Yea7usSKNpbkIaesL9oJ9iYw", - "listId": "7090784486", - "customerId": "7693729833", - "loginCustomerId": "", - "subAccount": false, - "userSchema": ["email", "phone", "addressInfo"], - "isHashRequired": true, - "typeOfList": "General" - } - }, - "message": { - "userId": "user 1", - "anonymousId": "anon-id-new", - "event": "event1", - "type": "audiencelist", - "properties": { - "listData": { - "remove": [ - { - "email": "test@abc.com", - "phone": "@09876543210", - "firstName": "test", - "lastName": "rudderlabs", - "country": "US", - "postalCode": "1245" - } - ], - "add": [ - { - "email": "test@abc.com", - "phone": "@09876543210", - "firstName": "test", - "lastName": "rudderlabs", - "country": "US", - "postalCode": "1245" - } - ] - }, - "enablePartialFailure": true - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - } + { + name: 'google_adwords_remarketing_lists', + description: 'Test 0', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + metadata: { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl9101', + }, + jobId: 1, + }, + destination: { + Config: { + rudderAccountId: '258Yea7usSKNpbkIaesL9oJ9iYw', + listId: '7090784486', + customerId: '7693729833', + loginCustomerId: '', + subAccount: false, + userSchema: ['email', 'phone', 'addressInfo'], + isHashRequired: true, + typeOfList: 'General', + }, + }, + message: { + userId: 'user 1', + anonymousId: 'anon-id-new', + event: 'event1', + type: 'audiencelist', + properties: { + listData: { + add: [ + { + email: 'test@abc.com', + phone: '@09876543210', + firstName: 'test', + lastName: 'rudderlabs', + country: 'US', + postalCode: '1245', + }, + ], + }, + enablePartialFailure: true, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + { + metadata: { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl9101', + }, + jobId: 2, + }, + destination: { + Config: { + rudderAccountId: '258Yea7usSKNpbkIaesL9oJ9iYw', + listId: '7090784486', + customerId: '7693729833', + loginCustomerId: '', + subAccount: false, + userSchema: ['email', 'phone', 'addressInfo'], + isHashRequired: true, + typeOfList: 'userID', + }, + }, + message: { + userId: 'user 1', + anonymousId: 'anon-id-new', + event: 'event1', + type: 'audiencelist', + properties: { + listData: { + add: [ + { + email: 'test@abc.com', + phone: '@09876543210', + firstName: 'test', + lastName: 'rudderlabs', + country: 'US', + postalCode: '1245', + thirdPartyUserId: 'useri1234', + }, + ], + }, + enablePartialFailure: true, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + { + metadata: { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl9101', + }, + jobId: 3, + }, + destination: { + Config: { + rudderAccountId: '258Yea7usSKNpbkIaesL9oJ9iYw', + listId: '7090784486', + customerId: '7693729833', + loginCustomerId: '', + subAccount: false, + userSchema: ['email', 'phone', 'addressInfo'], + isHashRequired: true, + typeOfList: 'General', + }, + }, + message: { + userId: 'user 1', + anonymousId: 'anon-id-new', + event: 'event1', + type: 'audiencelist', + properties: { + listData: { + remove: [ + { + email: 'test@abc.com', + phone: '@09876543210', + firstName: 'test', + lastName: 'rudderlabs', + country: 'US', + postalCode: '1245', + }, ], - destType: 'google_adwords_remarketing_lists', + }, + enablePartialFailure: true, }, - method: 'POST', + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, }, + { + metadata: { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl9101', + }, + jobId: 4, + }, + destination: { + Config: { + rudderAccountId: '258Yea7usSKNpbkIaesL9oJ9iYw', + listId: '7090784486', + customerId: '7693729833', + loginCustomerId: '', + subAccount: false, + userSchema: ['email', 'phone', 'addressInfo'], + isHashRequired: true, + typeOfList: 'General', + }, + }, + message: { + userId: 'user 1', + anonymousId: 'anon-id-new', + event: 'event1', + type: 'audiencelist', + properties: { + listData: { + remove: [ + { + email: 'test@abc.com', + phone: '@09876543210', + firstName: 'test', + lastName: 'rudderlabs', + country: 'US', + postalCode: '1245', + }, + ], + add: [ + { + email: 'test@abc.com', + phone: '@09876543210', + firstName: 'test', + lastName: 'rudderlabs', + country: 'US', + postalCode: '1245', + }, + ], + }, + enablePartialFailure: true, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + destType: 'google_adwords_remarketing_lists', }, - output: { - response: { - status: 200, - body: { - output: [ + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: [ + { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs', + headers: { + Authorization: 'Bearer abcd1234', + 'Content-Type': 'application/json', + 'developer-token': 'ijkl9101', + }, + params: { listId: '7090784486', customerId: '7693729833', consent: {} }, + body: { + JSON: { + enablePartialFailure: true, + operations: [ { - "batchedRequest": [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs", - "headers": { - "Authorization": "Bearer abcd1234", - "Content-Type": "application/json", - "developer-token": "ijkl9101" - }, - "params": { "listId": "7090784486", "customerId": "7693729833" }, - "body": { - "JSON": { - "enablePartialFailure": true, - "operations": [ - { - "create": { - "userIdentifiers": [ - { - "hashedEmail": "d3142c8f9c9129484daf28df80cc5c955791efed5e69afabb603bc8cb9ffd419" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08", - "hashedLastName": "dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ], - "metadata": [ - { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl9101" - }, - "jobId": 1 - } + create: { + userIdentifiers: [ + { + hashedEmail: + 'd3142c8f9c9129484daf28df80cc5c955791efed5e69afabb603bc8cb9ffd419', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08', + hashedLastName: + 'dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251', + countryCode: 'US', + postalCode: '1245', + }, + }, ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "rudderAccountId": "258Yea7usSKNpbkIaesL9oJ9iYw", - "listId": "7090784486", - "customerId": "7693729833", - "loginCustomerId": "", - "subAccount": false, - "userSchema": ["email", "phone", "addressInfo"], - "isHashRequired": true, - "typeOfList": "General" - } - } + }, }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + ], + metadata: [ + { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl9101', + }, + jobId: 1, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + rudderAccountId: '258Yea7usSKNpbkIaesL9oJ9iYw', + listId: '7090784486', + customerId: '7693729833', + loginCustomerId: '', + subAccount: false, + userSchema: ['email', 'phone', 'addressInfo'], + isHashRequired: true, + typeOfList: 'General', + }, + }, + }, + { + batchedRequest: [ + { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs', + headers: { + Authorization: 'Bearer abcd1234', + 'Content-Type': 'application/json', + 'developer-token': 'ijkl9101', + }, + params: { listId: '7090784486', customerId: '7693729833', consent: {} }, + body: { + JSON: { + enablePartialFailure: true, + operations: [ { - "batchedRequest": [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs", - "headers": { - "Authorization": "Bearer abcd1234", - "Content-Type": "application/json", - "developer-token": "ijkl9101" - }, - "params": { "listId": "7090784486", "customerId": "7693729833" }, - "body": { - "JSON": { - "enablePartialFailure": true, - "operations": [ - { - "create": { - "userIdentifiers": [ - { - "thirdPartyUserId": "useri1234" - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ], - "metadata": [ - { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl9101" - }, - "jobId": 2 - } + create: { + userIdentifiers: [ + { + thirdPartyUserId: 'useri1234', + }, ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "rudderAccountId": "258Yea7usSKNpbkIaesL9oJ9iYw", - "listId": "7090784486", - "customerId": "7693729833", - "loginCustomerId": "", - "subAccount": false, - "userSchema": ["email", "phone", "addressInfo"], - "isHashRequired": true, - "typeOfList": "userID" - } - } + }, }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + ], + metadata: [ + { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl9101', + }, + jobId: 2, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + rudderAccountId: '258Yea7usSKNpbkIaesL9oJ9iYw', + listId: '7090784486', + customerId: '7693729833', + loginCustomerId: '', + subAccount: false, + userSchema: ['email', 'phone', 'addressInfo'], + isHashRequired: true, + typeOfList: 'userID', + }, + }, + }, + { + batchedRequest: [ + { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs', + headers: { + Authorization: 'Bearer abcd1234', + 'Content-Type': 'application/json', + 'developer-token': 'ijkl9101', + }, + params: { listId: '7090784486', customerId: '7693729833', consent: {} }, + body: { + JSON: { + enablePartialFailure: true, + operations: [ { - "batchedRequest": [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs", - "headers": { - "Authorization": "Bearer abcd1234", - "Content-Type": "application/json", - "developer-token": "ijkl9101" - }, - "params": { "listId": "7090784486", "customerId": "7693729833" }, - "body": { - "JSON": { - "enablePartialFailure": true, - "operations": [ - { - "remove": { - "userIdentifiers": [ - { - "hashedEmail": "d3142c8f9c9129484daf28df80cc5c955791efed5e69afabb603bc8cb9ffd419" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08", - "hashedLastName": "dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ], - "metadata": [ - { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl9101" - }, - "jobId": 3 - } + remove: { + userIdentifiers: [ + { + hashedEmail: + 'd3142c8f9c9129484daf28df80cc5c955791efed5e69afabb603bc8cb9ffd419', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08', + hashedLastName: + 'dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251', + countryCode: 'US', + postalCode: '1245', + }, + }, ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "rudderAccountId": "258Yea7usSKNpbkIaesL9oJ9iYw", - "listId": "7090784486", - "customerId": "7693729833", - "loginCustomerId": "", - "subAccount": false, - "userSchema": ["email", "phone", "addressInfo"], - "isHashRequired": true, - "typeOfList": "General" - } - } + }, }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + ], + metadata: [ + { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl9101', + }, + jobId: 3, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + rudderAccountId: '258Yea7usSKNpbkIaesL9oJ9iYw', + listId: '7090784486', + customerId: '7693729833', + loginCustomerId: '', + subAccount: false, + userSchema: ['email', 'phone', 'addressInfo'], + isHashRequired: true, + typeOfList: 'General', + }, + }, + }, + { + batchedRequest: [ + { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs', + headers: { + Authorization: 'Bearer abcd1234', + 'Content-Type': 'application/json', + 'developer-token': 'ijkl9101', + }, + params: { listId: '7090784486', customerId: '7693729833', consent: {} }, + body: { + JSON: { + enablePartialFailure: true, + operations: [ { - "batchedRequest": [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs", - "headers": { - "Authorization": "Bearer abcd1234", - "Content-Type": "application/json", - "developer-token": "ijkl9101" - }, - "params": { "listId": "7090784486", "customerId": "7693729833" }, - "body": { - "JSON": { - "enablePartialFailure": true, - "operations": [ - { - "remove": { - "userIdentifiers": [ - { - "hashedEmail": "d3142c8f9c9129484daf28df80cc5c955791efed5e69afabb603bc8cb9ffd419" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08", - "hashedLastName": "dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} + remove: { + userIdentifiers: [ + { + hashedEmail: + 'd3142c8f9c9129484daf28df80cc5c955791efed5e69afabb603bc8cb9ffd419', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08', + hashedLastName: + 'dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251', + countryCode: 'US', + postalCode: '1245', }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs", - "headers": { - "Authorization": "Bearer abcd1234", - "Content-Type": "application/json", - "developer-token": "ijkl9101" - }, - "params": { "listId": "7090784486", "customerId": "7693729833" }, - "body": { - "JSON": { - "enablePartialFailure": true, - "operations": [ - { - "create": { - "userIdentifiers": [ - { - "hashedEmail": "d3142c8f9c9129484daf28df80cc5c955791efed5e69afabb603bc8cb9ffd419" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08", - "hashedLastName": "dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } + }, ], - "metadata": [ - { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl9101" - }, - "jobId": 4 - } + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs', + headers: { + Authorization: 'Bearer abcd1234', + 'Content-Type': 'application/json', + 'developer-token': 'ijkl9101', + }, + params: { listId: '7090784486', customerId: '7693729833', consent: {} }, + body: { + JSON: { + enablePartialFailure: true, + operations: [ + { + create: { + userIdentifiers: [ + { + hashedEmail: + 'd3142c8f9c9129484daf28df80cc5c955791efed5e69afabb603bc8cb9ffd419', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08', + hashedLastName: + 'dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251', + countryCode: 'US', + postalCode: '1245', + }, + }, ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "rudderAccountId": "258Yea7usSKNpbkIaesL9oJ9iYw", - "listId": "7090784486", - "customerId": "7693729833", - "loginCustomerId": "", - "subAccount": false, - "userSchema": ["email", "phone", "addressInfo"], - "isHashRequired": true, - "typeOfList": "General" - } - } - } - ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + ], + metadata: [ + { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl9101', + }, + jobId: 4, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + rudderAccountId: '258Yea7usSKNpbkIaesL9oJ9iYw', + listId: '7090784486', + customerId: '7693729833', + loginCustomerId: '', + subAccount: false, + userSchema: ['email', 'phone', 'addressInfo'], + isHashRequired: true, + typeOfList: 'General', }, + }, }, + ], }, - } + }, + }, + }, ]; From 8bada4b21acf3ac884f44166b62098680f126898 Mon Sep 17 00:00:00 2001 From: shrouti1507 <60211312+shrouti1507@users.noreply.github.com> Date: Thu, 4 Jan 2024 18:12:29 +0530 Subject: [PATCH 112/135] fix: version upgrade of gaec from 14 to 15 (#2966) --- .../config.js | 2 +- .../dataDelivery/data.ts | 545 +-- .../network.ts | 470 +-- .../processor/data.ts | 3376 +++++++++-------- .../router/data.ts | 880 ++--- 5 files changed, 2686 insertions(+), 2587 deletions(-) diff --git a/src/v0/destinations/google_adwords_enhanced_conversions/config.js b/src/v0/destinations/google_adwords_enhanced_conversions/config.js index 66d12c34d7..8d194655f7 100644 --- a/src/v0/destinations/google_adwords_enhanced_conversions/config.js +++ b/src/v0/destinations/google_adwords_enhanced_conversions/config.js @@ -1,6 +1,6 @@ const { getMappingConfig } = require('../../util'); -const BASE_ENDPOINT = 'https://googleads.googleapis.com/v14/customers'; +const BASE_ENDPOINT = 'https://googleads.googleapis.com/v15/customers'; const CONFIG_CATEGORIES = { TRACK_CONFIG: { type: 'track', name: 'trackConfig' }, diff --git a/test/integrations/destinations/google_adwords_enhanced_conversions/dataDelivery/data.ts b/test/integrations/destinations/google_adwords_enhanced_conversions/dataDelivery/data.ts index c9bfac233d..b544baaebd 100644 --- a/test/integrations/destinations/google_adwords_enhanced_conversions/dataDelivery/data.ts +++ b/test/integrations/destinations/google_adwords_enhanced_conversions/dataDelivery/data.ts @@ -1,290 +1,307 @@ export const data = [ - { - name: 'google_adwords_enhanced_conversions', - description: 'Test 0', - feature: 'dataDelivery', - module: 'destination', - version: 'v0', - input: { - request: { - body: { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/1234567890:uploadConversionAdjustments", - "headers": { - "Authorization": "Bearer abcd1234", - "Content-Type": "application/json", - "developer-token": "ijkl91011", - "login-customer-id": "0987654321" + { + name: 'google_adwords_enhanced_conversions', + description: 'Test 0', + feature: 'dataDelivery', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/1234567890:uploadConversionAdjustments', + headers: { + Authorization: 'Bearer abcd1234', + 'Content-Type': 'application/json', + 'developer-token': 'ijkl91011', + 'login-customer-id': '0987654321', + }, + params: { + event: 'Product Added', + customerId: '1234567890', + destination: 'google_adwords_enhanced_conversions', + }, + body: { + JSON: { + partialFailure: true, + conversionAdjustments: [ + { + gclidDateTimePair: { + gclid: 'gclid1234', + conversionDateTime: '2022-01-01 12:32:45-08:00', + }, + restatementValue: { + adjustedValue: 10, + currency: 'INR', + }, + order_id: '10000', + adjustmentDateTime: '2022-01-01 12:32:45-08:00', + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + userIdentifiers: [ + { + addressInfo: { + hashedFirstName: + 'a8cfcd74832004951b4408cdb0a5dbcd8c7e52d43f7fe244bf720582e05241da', + hashedLastName: + '1c574b17eefa532b6d61c963550a82d2d3dfca4a7fb69e183374cfafd5328ee4', + state: 'UK', + city: 'London', + hashedStreetAddress: + '9a4d2e50828448f137f119a3ebdbbbab8d6731234a67595fdbfeb2a2315dd550', + }, }, - "params": { - "event": "Product Added", - "customerId": "1234567890", - "destination": "google_adwords_enhanced_conversions" - }, - "body": { - "JSON": { - "partialFailure": true, - "conversionAdjustments": [ - { - "gclidDateTimePair": { - "gclid": "gclid1234", - "conversionDateTime": "2022-01-01 12:32:45-08:00" - }, - "restatementValue": { - "adjustedValue": 10, - "currency": "INR" - }, - "order_id": "10000", - "adjustmentDateTime": "2022-01-01 12:32:45-08:00", - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "userIdentifiers": [ - { - "addressInfo": { - "hashedFirstName": "a8cfcd74832004951b4408cdb0a5dbcd8c7e52d43f7fe244bf720582e05241da", - "hashedLastName": "1c574b17eefa532b6d61c963550a82d2d3dfca4a7fb69e183374cfafd5328ee4", - "state": "UK", - "city": "London", - "hashedStreetAddress": "9a4d2e50828448f137f119a3ebdbbbab8d6731234a67595fdbfeb2a2315dd550" - } - } - ], - "adjustmentType": "ENHANCEMENT" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} + ], + adjustmentType: 'ENHANCEMENT', }, - method: 'POST', + ], }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, }, - output: { - response: { - status: 401, - body: { - output: { - "message": "\"\"Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.\" during Google_adwords_enhanced_conversions response transformation\"", - "authErrorCategory": "REFRESH_TOKEN", - "destinationResponse": [ - { - "error": { - "code": 401, - "message": "Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.", - "status": "UNAUTHENTICATED" - } - } - ], - "statTags": { - "destType": "GOOGLE_ADWORDS_ENHANCED_CONVERSIONS", - "errorCategory": "network", - "destinationId": "Non-determininable", - "workspaceId": "Non-determininable", - "errorType": "aborted", - "feature": "dataDelivery", - "implementation": "native", - "module": "destination" - }, - "status": 401 - } + method: 'POST', + }, + }, + output: { + response: { + status: 401, + body: { + output: { + message: + '""Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project." during Google_adwords_enhanced_conversions response transformation"', + authErrorCategory: 'REFRESH_TOKEN', + destinationResponse: [ + { + error: { + code: 401, + message: + 'Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.', + status: 'UNAUTHENTICATED', }, + }, + ], + statTags: { + destType: 'GOOGLE_ADWORDS_ENHANCED_CONVERSIONS', + errorCategory: 'network', + destinationId: 'Non-determininable', + workspaceId: 'Non-determininable', + errorType: 'aborted', + feature: 'dataDelivery', + implementation: 'native', + module: 'destination', }, + status: 401, + }, }, + }, }, - { - name: 'google_adwords_enhanced_conversions', - description: 'Test 1', - feature: 'dataDelivery', - module: 'destination', - version: 'v0', - input: { - request: { - body: { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/1234567899:uploadConversionAdjustments", - "headers": { - "Authorization": "Bearer abcd1234", - "Content-Type": "application/json", - "developer-token": "ijkl91011", - "login-customer-id": "0987654321" + }, + { + name: 'google_adwords_enhanced_conversions', + description: 'Test 1', + feature: 'dataDelivery', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/1234567899:uploadConversionAdjustments', + headers: { + Authorization: 'Bearer abcd1234', + 'Content-Type': 'application/json', + 'developer-token': 'ijkl91011', + 'login-customer-id': '0987654321', + }, + params: { + event: 'Product Added', + customerId: '1234567899', + destination: 'google_adwords_enhanced_conversions', + }, + body: { + JSON: { + partialFailure: true, + conversionAdjustments: [ + { + gclidDateTimePair: { + gclid: 'gclid1234', + conversionDateTime: '2022-01-01 12:32:45-08:00', + }, + restatementValue: { + adjustedValue: 10, + currency: 'INR', + }, + order_id: '10000', + adjustmentDateTime: '2022-01-01 12:32:45-08:00', + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + userIdentifiers: [ + { + addressInfo: { + hashedFirstName: + 'a8cfcd74832004951b4408cdb0a5dbcd8c7e52d43f7fe244bf720582e05241da', + hashedLastName: + '1c574b17eefa532b6d61c963550a82d2d3dfca4a7fb69e183374cfafd5328ee4', + state: 'UK', + city: 'London', + hashedStreetAddress: + '9a4d2e50828448f137f119a3ebdbbbab8d6731234a67595fdbfeb2a2315dd550', + }, }, - "params": { - "event": "Product Added", - "customerId": "1234567899", - "destination": "google_adwords_enhanced_conversions" - }, - "body": { - "JSON": { - "partialFailure": true, - "conversionAdjustments": [ - { - "gclidDateTimePair": { - "gclid": "gclid1234", - "conversionDateTime": "2022-01-01 12:32:45-08:00" - }, - "restatementValue": { - "adjustedValue": 10, - "currency": "INR" - }, - "order_id": "10000", - "adjustmentDateTime": "2022-01-01 12:32:45-08:00", - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "userIdentifiers": [ - { - "addressInfo": { - "hashedFirstName": "a8cfcd74832004951b4408cdb0a5dbcd8c7e52d43f7fe244bf720582e05241da", - "hashedLastName": "1c574b17eefa532b6d61c963550a82d2d3dfca4a7fb69e183374cfafd5328ee4", - "state": "UK", - "city": "London", - "hashedStreetAddress": "9a4d2e50828448f137f119a3ebdbbbab8d6731234a67595fdbfeb2a2315dd550" - } - } - ], - "adjustmentType": "ENHANCEMENT" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} + ], + adjustmentType: 'ENHANCEMENT', }, - method: 'POST', + ], }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, }, - output: { - response: { - status: 200, - body: { - "output": { - "destinationResponse": { - "response": [ - { - "results": [ - { - "adjustmentDateTime": "2021-01-01 12:32:45-08:00", - "adjustmentType": "ENHANCEMENT", - "conversionAction": "customers/7693729833/conversionActions/874224905", - "gclidDateTimePair": { - "conversionDateTime": "2021-01-01 12:32:45-08:00", - "gclid": "1234", - }, - "orderId": "12345", - }, - ], - }, - ], - "status": 200, - }, - "message": "Request Processed Successfully", - "status": 200, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: { + destinationResponse: { + response: [ + { + results: [ + { + adjustmentDateTime: '2021-01-01 12:32:45-08:00', + adjustmentType: 'ENHANCEMENT', + conversionAction: 'customers/7693729833/conversionActions/874224905', + gclidDateTimePair: { + conversionDateTime: '2021-01-01 12:32:45-08:00', + gclid: '1234', + }, + orderId: '12345', }, + ], }, + ], + status: 200, }, + message: 'Request Processed Successfully', + status: 200, + }, }, + }, }, - { - name: 'google_adwords_enhanced_conversions', - description: 'Test 2', - feature: 'dataDelivery', - module: 'destination', - version: 'v0', - input: { - request: { - body: { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/1234567891:uploadConversionAdjustments", - "headers": { - "Authorization": "Bearer abcd1234", - "Content-Type": "application/json", - "developer-token": "ijkl91011", - "login-customer-id": "0987654321" + }, + { + name: 'google_adwords_enhanced_conversions', + description: 'Test 2', + feature: 'dataDelivery', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/1234567891:uploadConversionAdjustments', + headers: { + Authorization: 'Bearer abcd1234', + 'Content-Type': 'application/json', + 'developer-token': 'ijkl91011', + 'login-customer-id': '0987654321', + }, + params: { + event: 'Product Added', + customerId: '1234567891', + destination: 'google_adwords_enhanced_conversions', + }, + body: { + JSON: { + partialFailure: true, + conversionAdjustments: [ + { + gclidDateTimePair: { + gclid: 'gclid1234', + conversionDateTime: '2022-01-01 12:32:45-08:00', + }, + restatementValue: { + adjustedValue: 10, + currency: 'INR', + }, + order_id: '10000', + adjustmentDateTime: '2022-01-01 12:32:45-08:00', + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + userIdentifiers: [ + { + addressInfo: { + hashedFirstName: + 'a8cfcd74832004951b4408cdb0a5dbcd8c7e52d43f7fe244bf720582e05241da', + hashedLastName: + '1c574b17eefa532b6d61c963550a82d2d3dfca4a7fb69e183374cfafd5328ee4', + state: 'UK', + city: 'London', + hashedStreetAddress: + '9a4d2e50828448f137f119a3ebdbbbab8d6731234a67595fdbfeb2a2315dd550', + }, }, - "params": { - "event": "Product Added", - "customerId": "1234567891", - "destination": "google_adwords_enhanced_conversions" - }, - "body": { - "JSON": { - "partialFailure": true, - "conversionAdjustments": [ - { - "gclidDateTimePair": { - "gclid": "gclid1234", - "conversionDateTime": "2022-01-01 12:32:45-08:00" - }, - "restatementValue": { - "adjustedValue": 10, - "currency": "INR" - }, - "order_id": "10000", - "adjustmentDateTime": "2022-01-01 12:32:45-08:00", - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "userIdentifiers": [ - { - "addressInfo": { - "hashedFirstName": "a8cfcd74832004951b4408cdb0a5dbcd8c7e52d43f7fe244bf720582e05241da", - "hashedLastName": "1c574b17eefa532b6d61c963550a82d2d3dfca4a7fb69e183374cfafd5328ee4", - "state": "UK", - "city": "London", - "hashedStreetAddress": "9a4d2e50828448f137f119a3ebdbbbab8d6731234a67595fdbfeb2a2315dd550" - } - } - ], - "adjustmentType": "ENHANCEMENT" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} + ], + adjustmentType: 'ENHANCEMENT', }, - method: 'POST', + ], }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, }, - output: { - response: { - status: 400, - body: { - "output": { - "destinationResponse": [ - { - results: [ - { - "conversionAction": { - "id": 123434342, - } - } - ] - } - ], - "message": "\" during Google_adwords_enhanced_conversions response transformation", - "statTags": { - "destType": "GOOGLE_ADWORDS_ENHANCED_CONVERSIONS", - "destinationId": "Non-determininable", - "errorCategory": "network", - "errorType": "aborted", - "feature": "dataDelivery", - "implementation": "native", - "module": "destination", - "workspaceId": "Non-determininable", - }, - "status": 400, + method: 'POST', + }, + }, + output: { + response: { + status: 400, + body: { + output: { + destinationResponse: [ + { + results: [ + { + conversionAction: { + id: 123434342, }, - }, + }, + ], + }, + ], + message: '" during Google_adwords_enhanced_conversions response transformation', + statTags: { + destType: 'GOOGLE_ADWORDS_ENHANCED_CONVERSIONS', + destinationId: 'Non-determininable', + errorCategory: 'network', + errorType: 'aborted', + feature: 'dataDelivery', + implementation: 'native', + module: 'destination', + workspaceId: 'Non-determininable', }, + status: 400, + }, }, - } + }, + }, + }, ]; diff --git a/test/integrations/destinations/google_adwords_enhanced_conversions/network.ts b/test/integrations/destinations/google_adwords_enhanced_conversions/network.ts index ca49ea30ab..672cd73bf7 100644 --- a/test/integrations/destinations/google_adwords_enhanced_conversions/network.ts +++ b/test/integrations/destinations/google_adwords_enhanced_conversions/network.ts @@ -1,236 +1,276 @@ export const networkCallsData = [ - { - httpReq: { - url: 'https://googleads.googleapis.com/v14/customers/1234567890/googleAds:searchStream', - data: { - query: `SELECT conversion_action.id FROM conversion_action WHERE conversion_action.name = 'Product Added'`, - }, - headers: { - Authorization: 'Bearer abcd1234', - 'Content-Type': 'application/json', - 'developer-token': 'ijkl91011', - 'login-customer-id': '0987654321', - }, - method: 'POST', - }, - httpRes: { - "data": [ - { - "error": { - "code": 401, - "message": "Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.", - "status": "UNAUTHENTICATED" - } - } - ], - "status": 401 + { + httpReq: { + url: 'https://googleads.googleapis.com/v15/customers/1234567890/googleAds:searchStream', + data: { + query: `SELECT conversion_action.id FROM conversion_action WHERE conversion_action.name = 'Product Added'`, + }, + headers: { + Authorization: 'Bearer abcd1234', + 'Content-Type': 'application/json', + 'developer-token': 'ijkl91011', + 'login-customer-id': '0987654321', + }, + method: 'POST', + }, + httpRes: { + data: [ + { + error: { + code: 401, + message: + 'Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.', + status: 'UNAUTHENTICATED', + }, }, + ], + status: 401, }, - { - httpReq: { - url: 'https://googleads.googleapis.com/v14/customers/1234567899/googleAds:searchStream', - data: { - query: `SELECT conversion_action.id FROM conversion_action WHERE conversion_action.name = 'Product Added'` - }, - params: { destination: 'google_adwords_enhanced_conversion' }, - headers: { - Authorization: 'Bearer abcd1234', - 'Content-Type': 'application/json', - 'developer-token': 'ijkl91011', - 'login-customer-id': '0987654321', + }, + { + httpReq: { + url: 'https://googleads.googleapis.com/v15/customers/1234567899/googleAds:searchStream', + data: { + query: `SELECT conversion_action.id FROM conversion_action WHERE conversion_action.name = 'Product Added'`, + }, + params: { destination: 'google_adwords_enhanced_conversion' }, + headers: { + Authorization: 'Bearer abcd1234', + 'Content-Type': 'application/json', + 'developer-token': 'ijkl91011', + 'login-customer-id': '0987654321', + }, + method: 'POST', + }, + httpRes: { + data: [ + { + results: [ + { + conversionAction: { + id: 123434342, + }, }, - method: 'POST', - }, - httpRes: { - data: [{ - results: [{ - conversionAction: { - id: 123434342 - } - }] - }], - status: 200, + ], }, + ], + status: 200, }, - { - httpReq: { - url: 'https://googleads.googleapis.com/v14/customers/1234567899:uploadConversionAdjustments', - data: { - conversionAdjustments: [{ - adjustmentDateTime: '2022-01-01 12:32:45-08:00', - adjustmentType: 'ENHANCEMENT', - conversionAction: 'customers/1234567899/conversionActions/123434342', - gclidDateTimePair: { - conversionDateTime: '2022-01-01 12:32:45-08:00', - gclid: 'gclid1234' - }, - order_id: '10000', - restatementValue: { adjustedValue: 10, currency: 'INR' }, - userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - userIdentifiers: [{ - addressInfo: { - hashedFirstName: 'a8cfcd74832004951b4408cdb0a5dbcd8c7e52d43f7fe244bf720582e05241da', - hashedLastName: '1c574b17eefa532b6d61c963550a82d2d3dfca4a7fb69e183374cfafd5328ee4', - state: 'UK', - city: 'London', - hashedStreetAddress: '9a4d2e50828448f137f119a3ebdbbbab8d6731234a67595fdbfeb2a2315dd550' - } - }] - }], - partialFailure: true + }, + { + httpReq: { + url: 'https://googleads.googleapis.com/v15/customers/1234567899:uploadConversionAdjustments', + data: { + conversionAdjustments: [ + { + adjustmentDateTime: '2022-01-01 12:32:45-08:00', + adjustmentType: 'ENHANCEMENT', + conversionAction: 'customers/1234567899/conversionActions/123434342', + gclidDateTimePair: { + conversionDateTime: '2022-01-01 12:32:45-08:00', + gclid: 'gclid1234', }, - params: { destination: 'google_adwords_enhanced_conversion' }, - headers: { - Authorization: 'Bearer abcd1234', - 'Content-Type': 'application/json', - 'developer-token': 'ijkl91011', - 'login-customer-id': '0987654321', + order_id: '10000', + restatementValue: { adjustedValue: 10, currency: 'INR' }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + userIdentifiers: [ + { + addressInfo: { + hashedFirstName: + 'a8cfcd74832004951b4408cdb0a5dbcd8c7e52d43f7fe244bf720582e05241da', + hashedLastName: + '1c574b17eefa532b6d61c963550a82d2d3dfca4a7fb69e183374cfafd5328ee4', + state: 'UK', + city: 'London', + hashedStreetAddress: + '9a4d2e50828448f137f119a3ebdbbbab8d6731234a67595fdbfeb2a2315dd550', + }, + }, + ], + }, + ], + partialFailure: true, + }, + params: { destination: 'google_adwords_enhanced_conversion' }, + headers: { + Authorization: 'Bearer abcd1234', + 'Content-Type': 'application/json', + 'developer-token': 'ijkl91011', + 'login-customer-id': '0987654321', + }, + method: 'POST', + }, + httpRes: { + data: [ + { + results: [ + { + adjustmentType: 'ENHANCEMENT', + conversionAction: 'customers/7693729833/conversionActions/874224905', + adjustmentDateTime: '2021-01-01 12:32:45-08:00', + gclidDateTimePair: { + gclid: '1234', + conversionDateTime: '2021-01-01 12:32:45-08:00', + }, + orderId: '12345', }, - method: 'POST', - }, - httpRes: { - data: [{ - results: [{ - "adjustmentType": "ENHANCEMENT", - "conversionAction": "customers/7693729833/conversionActions/874224905", - "adjustmentDateTime": "2021-01-01 12:32:45-08:00", - "gclidDateTimePair": { - "gclid": "1234", - "conversionDateTime": "2021-01-01 12:32:45-08:00" - }, - "orderId": "12345" - }] - }], - status: 200, + ], }, + ], + status: 200, }, - { - httpReq: { - url: 'https://googleads.googleapis.com/v14/customers/1234567891/googleAds:searchStream', - data: { - query: `SELECT conversion_action.id FROM conversion_action WHERE conversion_action.name = 'Product Added'` - }, - params: { destination: 'google_adwords_enhanced_conversion' }, - headers: { - Authorization: 'Bearer abcd1234', - 'Content-Type': 'application/json', - 'developer-token': 'ijkl91011', - 'login-customer-id': '0987654321', + }, + { + httpReq: { + url: 'https://googleads.googleapis.com/v15/customers/1234567891/googleAds:searchStream', + data: { + query: `SELECT conversion_action.id FROM conversion_action WHERE conversion_action.name = 'Product Added'`, + }, + params: { destination: 'google_adwords_enhanced_conversion' }, + headers: { + Authorization: 'Bearer abcd1234', + 'Content-Type': 'application/json', + 'developer-token': 'ijkl91011', + 'login-customer-id': '0987654321', + }, + method: 'POST', + }, + httpRes: { + data: [ + { + results: [ + { + conversionAction: { + id: 123434342, + }, }, - method: 'POST', - }, - httpRes: { - data: [{ - results: [{ - conversionAction: { - id: 123434342 - } - }] - }], - status: 200, + ], }, + ], + status: 200, }, - { - httpReq: { - url: 'https://googleads.googleapis.com/v14/customers/1234567891:uploadConversionAdjustments', - data: { - conversionAdjustments: [{ - adjustmentDateTime: '2022-01-01 12:32:45-08:00', - adjustmentType: 'ENHANCEMENT', - conversionAction: 'customers/1234567891/conversionActions/123434342', - gclidDateTimePair: { - conversionDateTime: '2022-01-01 12:32:45-08:00', - gclid: 'gclid1234' - }, - order_id: '10000', - restatementValue: { adjustedValue: 10, currency: 'INR' }, - userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - userIdentifiers: [{ - addressInfo: { - hashedFirstName: 'a8cfcd74832004951b4408cdb0a5dbcd8c7e52d43f7fe244bf720582e05241da', - hashedLastName: '1c574b17eefa532b6d61c963550a82d2d3dfca4a7fb69e183374cfafd5328ee4', - state: 'UK', - city: 'London', - hashedStreetAddress: '9a4d2e50828448f137f119a3ebdbbbab8d6731234a67595fdbfeb2a2315dd550' - } - }] - }], - partialFailure: true - }, - params: { - destination: 'google_adwords_enhanced_conversion', - + }, + { + httpReq: { + url: 'https://googleads.googleapis.com/v15/customers/1234567891:uploadConversionAdjustments', + data: { + conversionAdjustments: [ + { + adjustmentDateTime: '2022-01-01 12:32:45-08:00', + adjustmentType: 'ENHANCEMENT', + conversionAction: 'customers/1234567891/conversionActions/123434342', + gclidDateTimePair: { + conversionDateTime: '2022-01-01 12:32:45-08:00', + gclid: 'gclid1234', }, - headers: { - Authorization: 'Bearer abcd1234', - 'Content-Type': 'application/json', - 'developer-token': 'ijkl91011', - 'login-customer-id': '0987654321', + order_id: '10000', + restatementValue: { adjustedValue: 10, currency: 'INR' }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + userIdentifiers: [ + { + addressInfo: { + hashedFirstName: + 'a8cfcd74832004951b4408cdb0a5dbcd8c7e52d43f7fe244bf720582e05241da', + hashedLastName: + '1c574b17eefa532b6d61c963550a82d2d3dfca4a7fb69e183374cfafd5328ee4', + state: 'UK', + city: 'London', + hashedStreetAddress: + '9a4d2e50828448f137f119a3ebdbbbab8d6731234a67595fdbfeb2a2315dd550', + }, + }, + ], + }, + ], + partialFailure: true, + }, + params: { + destination: 'google_adwords_enhanced_conversion', + }, + headers: { + Authorization: 'Bearer abcd1234', + 'Content-Type': 'application/json', + 'developer-token': 'ijkl91011', + 'login-customer-id': '0987654321', + }, + method: 'POST', + }, + httpRes: { + data: [ + { + results: [ + { + conversionAction: { + id: 123434342, + }, }, - method: 'POST', - }, - httpRes: { - data: [{ - results: [{ - conversionAction: { - id: 123434342 - } - }] - }], - status: 400, + ], }, + ], + status: 400, }, - { - httpReq: { - url: 'https://googleads.googleapis.com/v14/customers/1234567891:uploadClickConversions', - data: { - conversionAdjustments: [{ - adjustmentDateTime: '2022-01-01 12:32:45-08:00', - adjustmentType: 'ENHANCEMENT', - conversionAction: 'customers/1234567891/conversionActions/123434342', - gclidDateTimePair: { - conversionDateTime: '2022-01-01 12:32:45-08:00', - gclid: 'gclid1234' - }, - order_id: '10000', - restatementValue: { adjustedValue: 10, currency: 'INR' }, - userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - userIdentifiers: [{ - addressInfo: { - hashedFirstName: 'a8cfcd74832004951b4408cdb0a5dbcd8c7e52d43f7fe244bf720582e05241da', - hashedLastName: '1c574b17eefa532b6d61c963550a82d2d3dfca4a7fb69e183374cfafd5328ee4', - state: 'UK', - city: 'London', - hashedStreetAddress: '9a4d2e50828448f137f119a3ebdbbbab8d6731234a67595fdbfeb2a2315dd550' - } - }] - }], - partialFailure: true + }, + { + httpReq: { + url: 'https://googleads.googleapis.com/v15/customers/1234567891:uploadClickConversions', + data: { + conversionAdjustments: [ + { + adjustmentDateTime: '2022-01-01 12:32:45-08:00', + adjustmentType: 'ENHANCEMENT', + conversionAction: 'customers/1234567891/conversionActions/123434342', + gclidDateTimePair: { + conversionDateTime: '2022-01-01 12:32:45-08:00', + gclid: 'gclid1234', }, - params: { - destination: 'google_adwords_enhanced_conversion', - - }, - headers: { - Authorization: 'Bearer abcd1234', - 'Content-Type': 'application/json', - 'developer-token': 'ijkl91011', - 'login-customer-id': '0987654321', + order_id: '10000', + restatementValue: { adjustedValue: 10, currency: 'INR' }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + userIdentifiers: [ + { + addressInfo: { + hashedFirstName: + 'a8cfcd74832004951b4408cdb0a5dbcd8c7e52d43f7fe244bf720582e05241da', + hashedLastName: + '1c574b17eefa532b6d61c963550a82d2d3dfca4a7fb69e183374cfafd5328ee4', + state: 'UK', + city: 'London', + hashedStreetAddress: + '9a4d2e50828448f137f119a3ebdbbbab8d6731234a67595fdbfeb2a2315dd550', + }, + }, + ], + }, + ], + partialFailure: true, + }, + params: { + destination: 'google_adwords_enhanced_conversion', + }, + headers: { + Authorization: 'Bearer abcd1234', + 'Content-Type': 'application/json', + 'developer-token': 'ijkl91011', + 'login-customer-id': '0987654321', + }, + method: 'POST', + }, + httpRes: { + data: [ + { + results: [ + { + conversionAction: { + id: 123434342, + }, }, - method: 'POST', + ], }, - httpRes: { - data: [{ - results: [{ - conversionAction: { - id: 123434342 - } - }] - }], - status: 400, - }, - } + ], + status: 400, + }, + }, ]; - - - diff --git a/test/integrations/destinations/google_adwords_enhanced_conversions/processor/data.ts b/test/integrations/destinations/google_adwords_enhanced_conversions/processor/data.ts index 09a9b406f6..0a9542a5d5 100644 --- a/test/integrations/destinations/google_adwords_enhanced_conversions/processor/data.ts +++ b/test/integrations/destinations/google_adwords_enhanced_conversions/processor/data.ts @@ -1,1694 +1,1726 @@ export const data = [ - { - "name": "google_adwords_enhanced_conversions", - "description": "Test 0", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "metadata": { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl91011" - } - }, - "destination": { - "Config": { - "rudderAccountId": "25u5whFH7gVTnCiAjn4ykoCLGoC", - "customerId": "123-456-7890", - "subAccount": true, - "loginCustomerId": "123-456-7890", - "listOfConversions": [ - { - "conversions": "Page View" - }, - { - "conversions": "Product Added" - } - ], - "authStatus": "active" - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "phone": "912382193", - "firstName": "John", - "lastName": "Gomes", - "city": "London", - "state": "UK", - "countryCode": "us", - "streetAddress": "71 Cherry Court SOUTHAMPTON SO53 5PD UK" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "event": "Page View", - "type": "track", - "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", - "originalTimestamp": "2019-10-14T11:15:18.299Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "properties": { - "gclid": "gclid1234", - "conversionDateTime": "2022-01-01 12:32:45-08:00", - "adjustedValue": "10", - "currency": "INR", - "adjustmentDateTime": "2022-01-01 12:32:45-08:00", - "partialFailure": true, - "campaignId": "1", - "templateId": "0", - "order_id": 10000, - "total": 1000, - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "sku": "45790-32", - "name": "Monopoly: 3rd Edition", - "price": "19", - "position": "1", - "category": "cars", - "url": "https://www.example.com/product/path", - "image_url": "https://www.example.com/product/path.jpg", - "quantity": "2" - }, - { - "product_id": "507f1f77bcf86cd7994390112", - "sku": "45790-322", - "name": "Monopoly: 3rd Edition2", - "price": "192", - "quantity": 22, - "position": "12", - "category": "Cars2", - "url": "https://www.example.com/product/path2", - "image_url": "https://www.example.com/product/path.jpg2" - } - ] - }, - "integrations": { - "All": true - }, - "name": "ApplicationLoaded", - "sentAt": "2019-10-14T11:15:53.296Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/1234567890:uploadConversionAdjustments", - "headers": { - "Authorization": "Bearer abcd1234", - "Content-Type": "application/json", - "developer-token": "ijkl91011", - "login-customer-id": "1234567890" - }, - "params": { - "event": "Page View", - "customerId": "1234567890" - }, - "body": { - "JSON": { - "conversionAdjustments": [ - { - "gclidDateTimePair": { - "gclid": "gclid1234", - "conversionDateTime": "2022-01-01 12:32:45-08:00" - }, - "restatementValue": { - "adjustedValue": 10, - "currencyCode": "INR" - }, - "orderId": "10000", - "adjustmentDateTime": "2022-01-01 12:32:45-08:00", - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "userIdentifiers": [ - { - "hashedPhoneNumber": "04387707e6cbed8c4538c81cc570ed9252d579469f36c273839b26d784e4bdbe" - }, - { - "addressInfo": { - "hashedFirstName": "a8cfcd74832004951b4408cdb0a5dbcd8c7e52d43f7fe244bf720582e05241da", - "hashedLastName": "1c574b17eefa532b6d61c963550a82d2d3dfca4a7fb69e183374cfafd5328ee4", - "state": "UK", - "city": "London", - "countryCode": "us", - "hashedStreetAddress": "9a4d2e50828448f137f119a3ebdbbbab8d6731234a67595fdbfeb2a2315dd550" - } - } - ], - "adjustmentType": "ENHANCEMENT" - } - ], - "partialFailure": true - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "metadata": { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl91011" - } - }, - "statusCode": 200 - } - ] - } - } + { + name: 'google_adwords_enhanced_conversions', + description: 'Test 0', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + }, + destination: { + Config: { + rudderAccountId: '25u5whFH7gVTnCiAjn4ykoCLGoC', + customerId: '123-456-7890', + subAccount: true, + loginCustomerId: '123-456-7890', + listOfConversions: [ + { + conversions: 'Page View', + }, + { + conversions: 'Product Added', + }, + ], + authStatus: 'active', + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + phone: '912382193', + firstName: 'John', + lastName: 'Gomes', + city: 'London', + state: 'UK', + countryCode: 'us', + streetAddress: '71 Cherry Court SOUTHAMPTON SO53 5PD UK', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + event: 'Page View', + type: 'track', + messageId: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', + originalTimestamp: '2019-10-14T11:15:18.299Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + properties: { + gclid: 'gclid1234', + conversionDateTime: '2022-01-01 12:32:45-08:00', + adjustedValue: '10', + currency: 'INR', + adjustmentDateTime: '2022-01-01 12:32:45-08:00', + partialFailure: true, + campaignId: '1', + templateId: '0', + order_id: 10000, + total: 1000, + products: [ + { + product_id: '507f1f77bcf86cd799439011', + sku: '45790-32', + name: 'Monopoly: 3rd Edition', + price: '19', + position: '1', + category: 'cars', + url: 'https://www.example.com/product/path', + image_url: 'https://www.example.com/product/path.jpg', + quantity: '2', + }, + { + product_id: '507f1f77bcf86cd7994390112', + sku: '45790-322', + name: 'Monopoly: 3rd Edition2', + price: '192', + quantity: 22, + position: '12', + category: 'Cars2', + url: 'https://www.example.com/product/path2', + image_url: 'https://www.example.com/product/path.jpg2', + }, + ], + }, + integrations: { + All: true, + }, + name: 'ApplicationLoaded', + sentAt: '2019-10-14T11:15:53.296Z', + }, + }, + ], + }, }, - { - "name": "google_adwords_enhanced_conversions", - "description": "Test 1", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/1234567890:uploadConversionAdjustments', + headers: { + Authorization: 'Bearer abcd1234', + 'Content-Type': 'application/json', + 'developer-token': 'ijkl91011', + 'login-customer-id': '1234567890', + }, + params: { + event: 'Page View', + customerId: '1234567890', + }, + body: { + JSON: { + conversionAdjustments: [ { - "metadata": { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl91011" - } + gclidDateTimePair: { + gclid: 'gclid1234', + conversionDateTime: '2022-01-01 12:32:45-08:00', + }, + restatementValue: { + adjustedValue: 10, + currencyCode: 'INR', + }, + orderId: '10000', + adjustmentDateTime: '2022-01-01 12:32:45-08:00', + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + userIdentifiers: [ + { + hashedPhoneNumber: + '04387707e6cbed8c4538c81cc570ed9252d579469f36c273839b26d784e4bdbe', }, - "destination": { - "Config": { - "rudderAccountId": "25u5whFH7gVTnCiAjn4ykoCLGoC", - "customerId": "1234567890", - "subAccount": true, - "loginCustomerId": "11", - "listOfConversions": [ - { - "conversions": "Page View" - }, - { - "conversions": "Product Added" - } - ], - "authStatus": "active" - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "phone": "912382193", - "firstName": "John", - "lastName": "Gomes", - "city": "London", - "state": "UK", - "streetAddress": "71 Cherry Court SOUTHAMPTON SO53 5PD UK" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "event": "Checkout Started", - "type": "track", - "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", - "originalTimestamp": "2019-10-14T11:15:18.299Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "properties": { - "gclid": "gclid1234", - "conversionDateTime": "2022-01-01 12:32:45-08:00", - "adjustedValue": "10", - "currency": "INR", - "adjustmentDateTime": "2022-01-01 12:32:45-08:00", - "partialFailure": true, - "campaignId": "1", - "templateId": "0", - "order_id": 10000, - "total": 1000, - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "sku": "45790-32", - "name": "Monopoly: 3rd Edition", - "price": "19", - "position": "1", - "category": "cars", - "url": "https://www.example.com/product/path", - "image_url": "https://www.example.com/product/path.jpg", - "quantity": "2" - }, - { - "product_id": "507f1f77bcf86cd7994390112", - "sku": "45790-322", - "name": "Monopoly: 3rd Edition2", - "price": "192", - "quantity": 22, - "position": "12", - "category": "Cars2", - "url": "https://www.example.com/product/path2", - "image_url": "https://www.example.com/product/path.jpg2" - } - ] - }, - "integrations": { - "All": true - }, - "name": "ApplicationLoaded", - "sentAt": "2019-10-14T11:15:53.296Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "metadata": { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl91011" - } + { + addressInfo: { + hashedFirstName: + 'a8cfcd74832004951b4408cdb0a5dbcd8c7e52d43f7fe244bf720582e05241da', + hashedLastName: + '1c574b17eefa532b6d61c963550a82d2d3dfca4a7fb69e183374cfafd5328ee4', + state: 'UK', + city: 'London', + countryCode: 'us', + hashedStreetAddress: + '9a4d2e50828448f137f119a3ebdbbbab8d6731234a67595fdbfeb2a2315dd550', + }, }, - "statusCode": 400, - "error": "Conversion named \"Checkout Started\" was not specified in the RudderStack destination configuration", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "configuration", - "destType": "GOOGLE_ADWORDS_ENHANCED_CONVERSIONS", - "module": "destination", - "implementation": "native", - "feature": "processor" - } - } - ] - } - } + ], + adjustmentType: 'ENHANCEMENT', + }, + ], + partialFailure: true, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + }, + statusCode: 200, + }, + ], + }, }, - { - "name": "google_adwords_enhanced_conversions", - "description": "Test 2", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "metadata": { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl91011" - } - }, - "destination": { - "Config": { - "rudderAccountId": "25u5whFH7gVTnCiAjn4ykoCLGoC", - "customerId": "1234567890", - "subAccount": true, - "loginCustomerId": "11", - "listOfConversions": [ - { - "conversions": "Page View" - }, - { - "conversions": "Product Added" - } - ], - "authStatus": "active" - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "event": "Product Added", - "type": "track", - "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", - "originalTimestamp": "2019-10-14T11:15:18.299Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "properties": { - "gclid": "gclid1234", - "conversionDateTime": "2022-01-01 12:32:45-08:00", - "adjustedValue": "10", - "currency": "INR", - "adjustmentDateTime": "2022-01-01 12:32:45-08:00", - "partialFailure": true, - "campaignId": "1", - "templateId": "0", - "order_id": 10000, - "total": 1000, - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "sku": "45790-32", - "name": "Monopoly: 3rd Edition", - "price": "19", - "position": "1", - "category": "cars", - "url": "https://www.example.com/product/path", - "image_url": "https://www.example.com/product/path.jpg", - "quantity": "2" - }, - { - "product_id": "507f1f77bcf86cd7994390112", - "sku": "45790-322", - "name": "Monopoly: 3rd Edition2", - "price": "192", - "quantity": 22, - "position": "12", - "category": "Cars2", - "url": "https://www.example.com/product/path2", - "image_url": "https://www.example.com/product/path.jpg2" - } - ] - }, - "integrations": { - "All": true - }, - "name": "ApplicationLoaded", - "sentAt": "2019-10-14T11:15:53.296Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "metadata": { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl91011" - } - }, - "statusCode": 400, - "error": "Any of email, phone, firstName, lastName, city, street, countryCode, postalCode or streetAddress is required in traits.", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation", - "destType": "GOOGLE_ADWORDS_ENHANCED_CONVERSIONS", - "module": "destination", - "implementation": "native", - "feature": "processor" - } - } - ] - } - } + }, + { + name: 'google_adwords_enhanced_conversions', + description: 'Test 1', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + }, + destination: { + Config: { + rudderAccountId: '25u5whFH7gVTnCiAjn4ykoCLGoC', + customerId: '1234567890', + subAccount: true, + loginCustomerId: '11', + listOfConversions: [ + { + conversions: 'Page View', + }, + { + conversions: 'Product Added', + }, + ], + authStatus: 'active', + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + phone: '912382193', + firstName: 'John', + lastName: 'Gomes', + city: 'London', + state: 'UK', + streetAddress: '71 Cherry Court SOUTHAMPTON SO53 5PD UK', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + event: 'Checkout Started', + type: 'track', + messageId: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', + originalTimestamp: '2019-10-14T11:15:18.299Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + properties: { + gclid: 'gclid1234', + conversionDateTime: '2022-01-01 12:32:45-08:00', + adjustedValue: '10', + currency: 'INR', + adjustmentDateTime: '2022-01-01 12:32:45-08:00', + partialFailure: true, + campaignId: '1', + templateId: '0', + order_id: 10000, + total: 1000, + products: [ + { + product_id: '507f1f77bcf86cd799439011', + sku: '45790-32', + name: 'Monopoly: 3rd Edition', + price: '19', + position: '1', + category: 'cars', + url: 'https://www.example.com/product/path', + image_url: 'https://www.example.com/product/path.jpg', + quantity: '2', + }, + { + product_id: '507f1f77bcf86cd7994390112', + sku: '45790-322', + name: 'Monopoly: 3rd Edition2', + price: '192', + quantity: 22, + position: '12', + category: 'Cars2', + url: 'https://www.example.com/product/path2', + image_url: 'https://www.example.com/product/path.jpg2', + }, + ], + }, + integrations: { + All: true, + }, + name: 'ApplicationLoaded', + sentAt: '2019-10-14T11:15:53.296Z', + }, + }, + ], + }, }, - { - "name": "google_adwords_enhanced_conversions", - "description": "Test 3", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "metadata": { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl91011" - } - }, - "destination": { - "Config": { - "rudderAccountId": "25u5whFH7gVTnCiAjn4ykoCLGoC", - "customerId": "1234567890", - "subAccount": true, - "loginCustomerId": "11", - "listOfConversions": [ - { - "conversions": "Page View" - }, - { - "conversions": "Product Added" - } - ], - "authStatus": "active" - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "firstName": "John", - "lastName": "Gomes", - "address": { - "city": "London", - "state": "UK", - "streetAddress": "71 Cherry Court SOUTHAMPTON SO53 5PD UK", - "country": "us" - } - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "event": "Product Added", - "type": "track", - "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", - "originalTimestamp": "2019-10-14T11:15:18.299Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "properties": { - "gclid": "gclid1234", - "conversionDateTime": "2022-01-01 12:32:45-08:00", - "adjustedValue": "10", - "currencyCode": "INR", - "adjustmentDateTime": "2022-01-01 12:32:45-08:00", - "partialFailure": "true", - "campaignId": "1", - "templateId": "0", - "order_id": 10000, - "total": 1000, - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "sku": "45790-32", - "name": "Monopoly: 3rd Edition", - "price": "19", - "position": "1", - "category": "cars", - "url": "https://www.example.com/product/path", - "image_url": "https://www.example.com/product/path.jpg", - "quantity": "2" - }, - { - "product_id": "507f1f77bcf86cd7994390112", - "sku": "45790-322", - "name": "Monopoly: 3rd Edition2", - "price": "192", - "quantity": 22, - "position": "12", - "category": "Cars2", - "url": "https://www.example.com/product/path2", - "image_url": "https://www.example.com/product/path.jpg2" - } - ] - }, - "integrations": { - "All": true - }, - "name": "ApplicationLoaded", - "sentAt": "2019-10-14T11:15:53.296Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/1234567890:uploadConversionAdjustments", - "headers": { - "Authorization": "Bearer abcd1234", - "Content-Type": "application/json", - "developer-token": "ijkl91011", - "login-customer-id": "11" - }, - "params": { - "event": "Product Added", - "customerId": "1234567890" - }, - "body": { - "JSON": { - "conversionAdjustments": [ - { - "gclidDateTimePair": { - "gclid": "gclid1234", - "conversionDateTime": "2022-01-01 12:32:45-08:00" - }, - "restatementValue": { - "adjustedValue": 10, - "currencyCode": "INR" - }, - "orderId": "10000", - "adjustmentDateTime": "2022-01-01 12:32:45-08:00", - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "userIdentifiers": [ - { - "addressInfo": { - "hashedFirstName": "a8cfcd74832004951b4408cdb0a5dbcd8c7e52d43f7fe244bf720582e05241da", - "hashedLastName": "1c574b17eefa532b6d61c963550a82d2d3dfca4a7fb69e183374cfafd5328ee4", - "state": "UK", - "city": "London", - "countryCode": "us", - "hashedStreetAddress": "b28c94b2195c8ed259f0b415aaee3f39b0b2920a4537611499fa044956917a21" - } - } - ], - "adjustmentType": "ENHANCEMENT" - } - ], - "partialFailure": true - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "metadata": { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl91011" - } - }, - "statusCode": 200 - } - ] - } - } + output: { + response: { + status: 200, + body: [ + { + metadata: { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + }, + statusCode: 400, + error: + 'Conversion named "Checkout Started" was not specified in the RudderStack destination configuration', + statTags: { + errorCategory: 'dataValidation', + errorType: 'configuration', + destType: 'GOOGLE_ADWORDS_ENHANCED_CONVERSIONS', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, }, - { - "name": "google_adwords_enhanced_conversions", - "description": "Test 4", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "metadata": { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl91011" - } - }, - "destination": { - "Config": { - "rudderAccountId": "25u5whFH7gVTnCiAjn4ykoCLGoC", - "customerId": "1234567890", - "subAccount": true, - "loginCustomerId": "", - "listOfConversions": [ - { - "conversions": "Page View" - }, - { - "conversions": "Product Added" - } - ], - "authStatus": "active" - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "firstName": "John", - "lastName": "Gomes", - "city": "London", - "state": "UK", - "streetAddress": "71 Cherry Court SOUTHAMPTON SO53 5PD UK" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "event": "Product Added", - "type": "track", - "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", - "originalTimestamp": "2019-10-14T11:15:18.299Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "properties": { - "gclid": "gclid1234", - "conversionDateTime": "2022-01-01 12:32:45-08:00", - "adjustedValue": "10", - "currencyCode": "INR", - "adjustmentDateTime": "2022-01-01 12:32:45-08:00", - "partialFailure": true, - "campaignId": "1", - "templateId": "0", - "orderId": 10000, - "total": 1000, - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "sku": "45790-32", - "name": "Monopoly: 3rd Edition", - "price": "19", - "position": "1", - "category": "cars", - "url": "https://www.example.com/product/path", - "image_url": "https://www.example.com/product/path.jpg", - "quantity": "2" - }, - { - "product_id": "507f1f77bcf86cd7994390112", - "sku": "45790-322", - "name": "Monopoly: 3rd Edition2", - "price": "192", - "quantity": 22, - "position": "12", - "category": "Cars2", - "url": "https://www.example.com/product/path2", - "image_url": "https://www.example.com/product/path.jpg2" - } - ] - }, - "integrations": { - "All": true - }, - "name": "ApplicationLoaded", - "sentAt": "2019-10-14T11:15:53.296Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "metadata": { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl91011" - } - }, - "statusCode": 400, - "error": "LoginCustomerId is required as subAccount is true.", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "configuration", - "destType": "GOOGLE_ADWORDS_ENHANCED_CONVERSIONS", - "module": "destination", - "implementation": "native", - "feature": "processor" - } - } - ] - } - } + }, + { + name: 'google_adwords_enhanced_conversions', + description: 'Test 2', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + }, + destination: { + Config: { + rudderAccountId: '25u5whFH7gVTnCiAjn4ykoCLGoC', + customerId: '1234567890', + subAccount: true, + loginCustomerId: '11', + listOfConversions: [ + { + conversions: 'Page View', + }, + { + conversions: 'Product Added', + }, + ], + authStatus: 'active', + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + event: 'Product Added', + type: 'track', + messageId: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', + originalTimestamp: '2019-10-14T11:15:18.299Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + properties: { + gclid: 'gclid1234', + conversionDateTime: '2022-01-01 12:32:45-08:00', + adjustedValue: '10', + currency: 'INR', + adjustmentDateTime: '2022-01-01 12:32:45-08:00', + partialFailure: true, + campaignId: '1', + templateId: '0', + order_id: 10000, + total: 1000, + products: [ + { + product_id: '507f1f77bcf86cd799439011', + sku: '45790-32', + name: 'Monopoly: 3rd Edition', + price: '19', + position: '1', + category: 'cars', + url: 'https://www.example.com/product/path', + image_url: 'https://www.example.com/product/path.jpg', + quantity: '2', + }, + { + product_id: '507f1f77bcf86cd7994390112', + sku: '45790-322', + name: 'Monopoly: 3rd Edition2', + price: '192', + quantity: 22, + position: '12', + category: 'Cars2', + url: 'https://www.example.com/product/path2', + image_url: 'https://www.example.com/product/path.jpg2', + }, + ], + }, + integrations: { + All: true, + }, + name: 'ApplicationLoaded', + sentAt: '2019-10-14T11:15:53.296Z', + }, + }, + ], + }, }, - { - "name": "google_adwords_enhanced_conversions", - "description": "Test 5", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "metadata": { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl91011" - } - }, - "destination": { - "Config": { - "rudderAccountId": "25u5whFH7gVTnCiAjn4ykoCLGoC", - "customerId": "1234567890", - "subAccount": true, - "loginCustomerId": "", - "listOfConversions": [ - { - "conversions": "Page View" - }, - { - "conversions": "Product Added" - } - ], - "authStatus": "active" - } - }, - "message": { - "type": "identify", - "traits": { - "status": "elizabeth" - }, - "userId": "emrichardson820+22822@gmail.com", - "channel": "sources", - "context": { - "sources": { - "job_id": "24c5HJxHomh6YCngEOCgjS5r1KX/Syncher", - "task_id": "vw_rs_mailchimp_mocked_hg_data", - "version": "v1.8.1", - "batch_id": "f252c69d-c40d-450e-bcd2-2cf26cb62762", - "job_run_id": "c8el40l6e87v0c4hkbl0", - "task_run_id": "c8el40l6e87v0c4hkblg" - }, - "externalId": [ - { - "id": "emrichardson820+22822@gmail.com", - "type": "MAILCHIMP-92e1f1ad2c", - "identifierType": "email_address" - } - ], - "mappedToDestination": "true" - }, - "recordId": "1", - "rudderId": "4d5d0ed0-9db8-41cc-9bb0-a032f6bfa97a", - "messageId": "b3bee036-fc26-4f6d-9867-c17f85708a82" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "metadata": { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl91011" - } - }, - "statusCode": 400, - "error": "Message Type identify is not supported. Aborting message.", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation", - "destType": "GOOGLE_ADWORDS_ENHANCED_CONVERSIONS", - "module": "destination", - "implementation": "native", - "feature": "processor" - } - } - ] - } - } + output: { + response: { + status: 200, + body: [ + { + metadata: { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + }, + statusCode: 400, + error: + 'Any of email, phone, firstName, lastName, city, street, countryCode, postalCode or streetAddress is required in traits.', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'GOOGLE_ADWORDS_ENHANCED_CONVERSIONS', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, }, - { - "name": "google_adwords_enhanced_conversions", - "description": "Test 6", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "metadata": { - "secret": null - }, - "destination": { - "Config": { - "rudderAccountId": "25u5whFH7gVTnCiAjn4ykoCLGoC", - "customerId": "1234567890", - "subAccount": true, - "loginCustomerId": "11", - "listOfConversions": [ - { - "conversions": "Page View" - }, - { - "conversions": "Product Added" - } - ], - "authStatus": "active" - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "phone": "912382193", - "firstName": "John", - "lastName": "Gomes", - "city": "London", - "state": "UK", - "streetAddress": "71 Cherry Court SOUTHAMPTON SO53 5PD UK" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "event": "Page View", - "type": "track", - "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", - "originalTimestamp": "2019-10-14T11:15:18.299Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "properties": { - "gclid": "gclid1234", - "conversionDateTime": "2022-01-01 12:32:45-08:00", - "adjustedValue": "10", - "currency": "INR", - "adjustmentDateTime": "2022-01-01 12:32:45-08:00", - "partialFailure": true, - "campaignId": "1", - "templateId": "0", - "order_id": 10000, - "total": 1000, - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "sku": "45790-32", - "name": "Monopoly: 3rd Edition", - "price": "19", - "position": "1", - "category": "cars", - "url": "https://www.example.com/product/path", - "image_url": "https://www.example.com/product/path.jpg", - "quantity": "2" - }, - { - "product_id": "507f1f77bcf86cd7994390112", - "sku": "45790-322", - "name": "Monopoly: 3rd Edition2", - "price": "192", - "quantity": 22, - "position": "12", - "category": "Cars2", - "url": "https://www.example.com/product/path2", - "image_url": "https://www.example.com/product/path.jpg2" - } - ] - }, - "integrations": { - "All": true - }, - "name": "ApplicationLoaded", - "sentAt": "2019-10-14T11:15:53.296Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "metadata": { - "secret": null - }, - "statusCode": 500, - "error": "OAuth - access token not found", - "statTags": { - "errorCategory": "platform", - "errorType": "oAuthSecret", - "destType": "GOOGLE_ADWORDS_ENHANCED_CONVERSIONS", - "module": "destination", - "implementation": "native", - "feature": "processor" - } - } - ] - } - } + }, + { + name: 'google_adwords_enhanced_conversions', + description: 'Test 3', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + }, + destination: { + Config: { + rudderAccountId: '25u5whFH7gVTnCiAjn4ykoCLGoC', + customerId: '1234567890', + subAccount: true, + loginCustomerId: '11', + listOfConversions: [ + { + conversions: 'Page View', + }, + { + conversions: 'Product Added', + }, + ], + authStatus: 'active', + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + firstName: 'John', + lastName: 'Gomes', + address: { + city: 'London', + state: 'UK', + streetAddress: '71 Cherry Court SOUTHAMPTON SO53 5PD UK', + country: 'us', + }, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + event: 'Product Added', + type: 'track', + messageId: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', + originalTimestamp: '2019-10-14T11:15:18.299Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + properties: { + gclid: 'gclid1234', + conversionDateTime: '2022-01-01 12:32:45-08:00', + adjustedValue: '10', + currencyCode: 'INR', + adjustmentDateTime: '2022-01-01 12:32:45-08:00', + partialFailure: 'true', + campaignId: '1', + templateId: '0', + order_id: 10000, + total: 1000, + products: [ + { + product_id: '507f1f77bcf86cd799439011', + sku: '45790-32', + name: 'Monopoly: 3rd Edition', + price: '19', + position: '1', + category: 'cars', + url: 'https://www.example.com/product/path', + image_url: 'https://www.example.com/product/path.jpg', + quantity: '2', + }, + { + product_id: '507f1f77bcf86cd7994390112', + sku: '45790-322', + name: 'Monopoly: 3rd Edition2', + price: '192', + quantity: 22, + position: '12', + category: 'Cars2', + url: 'https://www.example.com/product/path2', + image_url: 'https://www.example.com/product/path.jpg2', + }, + ], + }, + integrations: { + All: true, + }, + name: 'ApplicationLoaded', + sentAt: '2019-10-14T11:15:53.296Z', + }, + }, + ], + }, }, - { - "name": "google_adwords_enhanced_conversions", - "description": "Test 7", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/1234567890:uploadConversionAdjustments', + headers: { + Authorization: 'Bearer abcd1234', + 'Content-Type': 'application/json', + 'developer-token': 'ijkl91011', + 'login-customer-id': '11', + }, + params: { + event: 'Product Added', + customerId: '1234567890', + }, + body: { + JSON: { + conversionAdjustments: [ { - "metadata": { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl91011" - } + gclidDateTimePair: { + gclid: 'gclid1234', + conversionDateTime: '2022-01-01 12:32:45-08:00', + }, + restatementValue: { + adjustedValue: 10, + currencyCode: 'INR', + }, + orderId: '10000', + adjustmentDateTime: '2022-01-01 12:32:45-08:00', + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + userIdentifiers: [ + { + addressInfo: { + hashedFirstName: + 'a8cfcd74832004951b4408cdb0a5dbcd8c7e52d43f7fe244bf720582e05241da', + hashedLastName: + '1c574b17eefa532b6d61c963550a82d2d3dfca4a7fb69e183374cfafd5328ee4', + state: 'UK', + city: 'London', + countryCode: 'us', + hashedStreetAddress: + 'b28c94b2195c8ed259f0b415aaee3f39b0b2920a4537611499fa044956917a21', + }, }, - "destination": { - "Config": { - "rudderAccountId": "25u5whFH7gVTnCiAjn4ykoCLGoC", - "customerId": "123-456-7890", - "subAccount": true, - "loginCustomerId": "123-456-7890", - "listOfConversions": [ - { - "conversions": "Page View" - }, - { - "conversions": "Product Added" - } - ], - "authStatus": "active" - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "phone": "912382193", - "firstName": "John", - "lastName": "Gomes", - "city": "London", - "state": "UK", - "countryCode": "us", - "streetAddress": "71 Cherry Court SOUTHAMPTON SO53 5PD UK" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "event": "Product Viewed", - "type": "track", - "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", - "originalTimestamp": "2019-10-14T11:15:18.299Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "properties": { - "gclid": "gclid1234", - "conversionDateTime": "2022-01-01 12:32:45-08:00", - "adjustedValue": "10", - "currency": "INR", - "adjustmentDateTime": "2022-01-01 12:32:45-08:00", - "partialFailure": true, - "campaignId": "1", - "templateId": "0", - "orde_id": 10000, - "total": 1000, - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "sku": "45790-32", - "name": "Monopoly: 3rd Edition", - "price": "19", - "position": "1", - "category": "cars", - "url": "https://www.example.com/product/path", - "image_url": "https://www.example.com/product/path.jpg", - "quantity": "2" - }, - { - "product_id": "507f1f77bcf86cd7994390112", - "sku": "45790-322", - "name": "Monopoly: 3rd Edition2", - "price": "192", - "quantity": 22, - "position": "12", - "category": "Cars2", - "url": "https://www.example.com/product/path2", - "image_url": "https://www.example.com/product/path.jpg2" - } - ] - }, - "integrations": { - "All": true - }, - "name": "ApplicationLoaded", - "sentAt": "2019-10-14T11:15:53.296Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "metadata": { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl91011" - } - }, - "statusCode": 400, - "error": "Conversion named \"Product Viewed\" was not specified in the RudderStack destination configuration", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "configuration", - "destType": "GOOGLE_ADWORDS_ENHANCED_CONVERSIONS", - "module": "destination", - "implementation": "native", - "feature": "processor" - } - } - ] - } - } + ], + adjustmentType: 'ENHANCEMENT', + }, + ], + partialFailure: true, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + }, + statusCode: 200, + }, + ], + }, }, - { - "name": "google_adwords_enhanced_conversions", - "description": "Test 8", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "metadata": { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl91011" - } - }, - "destination": { - "Config": { - "requireHash": true, - "rudderAccountId": "25u5whFH7gVTnCiAjn4ykoCLGoC", - "customerId": "123-456-7890", - "subAccount": true, - "loginCustomerId": "123-456-7890", - "listOfConversions": [ - { - "conversions": "Page View" - }, - { - "conversions": "Product Added" - } - ], - "authStatus": "active" - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "phone": "912382193", - "firstName": "John", - "lastName": "Gomes", - "city": "London", - "state": "UK", - "countryCode": "us", - "streetAddress": "71 Cherry Court SOUTHAMPTON SO53 5PD UK" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "event": "Page View", - "type": "track", - "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", - "originalTimestamp": "2019-10-14T11:15:18.299Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "properties": { - "gclid": "gclid1234", - "conversionDateTime": "2022-01-01 12:32:45-08:00", - "adjustedValue": "10", - "currency": "INR", - "adjustmentDateTime": "2022-01-01 12:32:45-08:00", - "partialFailure": true, - "campaignId": "1", - "templateId": "0", - "order_id": 10000, - "total": 1000, - "products": [ - { - "product_id": "507f1f77bcf86cd7994390112", - "sku": "45790-322", - "name": "Monopoly: 3rd Edition2", - "price": "192", - "quantity": 22, - "position": "12", - "category": "Cars2", - "url": "https://www.example.com/product/path2", - "image_url": "https://www.example.com/product/path.jpg2" - } - ] - }, - "integrations": { - "All": true - }, - "name": "ApplicationLoaded", - "sentAt": "2019-10-14T11:15:53.296Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/1234567890:uploadConversionAdjustments", - "headers": { - "Authorization": "Bearer abcd1234", - "Content-Type": "application/json", - "developer-token": "ijkl91011", - "login-customer-id": "1234567890" - }, - "params": { - "event": "Page View", - "customerId": "1234567890" - }, - "body": { - "JSON": { - "conversionAdjustments": [ - { - "gclidDateTimePair": { - "gclid": "gclid1234", - "conversionDateTime": "2022-01-01 12:32:45-08:00" - }, - "restatementValue": { - "adjustedValue": 10, - "currencyCode": "INR" - }, - "orderId": "10000", - "adjustmentDateTime": "2022-01-01 12:32:45-08:00", - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "userIdentifiers": [ - { - "hashedPhoneNumber": "04387707e6cbed8c4538c81cc570ed9252d579469f36c273839b26d784e4bdbe" - }, - { - "addressInfo": { - "hashedFirstName": "a8cfcd74832004951b4408cdb0a5dbcd8c7e52d43f7fe244bf720582e05241da", - "hashedLastName": "1c574b17eefa532b6d61c963550a82d2d3dfca4a7fb69e183374cfafd5328ee4", - "state": "UK", - "city": "London", - "countryCode": "us", - "hashedStreetAddress": "9a4d2e50828448f137f119a3ebdbbbab8d6731234a67595fdbfeb2a2315dd550" - } - } - ], - "adjustmentType": "ENHANCEMENT" - } - ], - "partialFailure": true - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "metadata": { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl91011" - } - }, - "statusCode": 200 - } - ] - } - } + }, + { + name: 'google_adwords_enhanced_conversions', + description: 'Test 4', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + }, + destination: { + Config: { + rudderAccountId: '25u5whFH7gVTnCiAjn4ykoCLGoC', + customerId: '1234567890', + subAccount: true, + loginCustomerId: '', + listOfConversions: [ + { + conversions: 'Page View', + }, + { + conversions: 'Product Added', + }, + ], + authStatus: 'active', + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + firstName: 'John', + lastName: 'Gomes', + city: 'London', + state: 'UK', + streetAddress: '71 Cherry Court SOUTHAMPTON SO53 5PD UK', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + event: 'Product Added', + type: 'track', + messageId: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', + originalTimestamp: '2019-10-14T11:15:18.299Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + properties: { + gclid: 'gclid1234', + conversionDateTime: '2022-01-01 12:32:45-08:00', + adjustedValue: '10', + currencyCode: 'INR', + adjustmentDateTime: '2022-01-01 12:32:45-08:00', + partialFailure: true, + campaignId: '1', + templateId: '0', + orderId: 10000, + total: 1000, + products: [ + { + product_id: '507f1f77bcf86cd799439011', + sku: '45790-32', + name: 'Monopoly: 3rd Edition', + price: '19', + position: '1', + category: 'cars', + url: 'https://www.example.com/product/path', + image_url: 'https://www.example.com/product/path.jpg', + quantity: '2', + }, + { + product_id: '507f1f77bcf86cd7994390112', + sku: '45790-322', + name: 'Monopoly: 3rd Edition2', + price: '192', + quantity: 22, + position: '12', + category: 'Cars2', + url: 'https://www.example.com/product/path2', + image_url: 'https://www.example.com/product/path.jpg2', + }, + ], + }, + integrations: { + All: true, + }, + name: 'ApplicationLoaded', + sentAt: '2019-10-14T11:15:53.296Z', + }, + }, + ], + }, }, - { - "name": "google_adwords_enhanced_conversions", - "description": "Test 9", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "metadata": { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl91011" - } - }, - "destination": { - "Config": { - "requireHash": false, - "rudderAccountId": "25u5whFH7gVTnCiAjn4ykoCLGoC", - "customerId": "123-456-7890", - "subAccount": true, - "loginCustomerId": "123-456-7890", - "listOfConversions": [ - { - "conversions": "Page View" - }, - { - "conversions": "Product Added" - } - ], - "authStatus": "active" - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "phone": "912382193", - "firstName": "John", - "lastName": "Gomes", - "city": "London", - "state": "UK", - "countryCode": "us", - "streetAddress": "71 Cherry Court SOUTHAMPTON SO53 5PD UK" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "event": "Page View", - "type": "track", - "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", - "originalTimestamp": "2019-10-14T11:15:18.299Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "properties": { - "gclid": "gclid1234", - "conversionDateTime": "2022-01-01 12:32:45-08:00", - "adjustedValue": "10", - "currency": "INR", - "adjustmentDateTime": "2022-01-01 12:32:45-08:00", - "partialFailure": true, - "campaignId": "1", - "templateId": "0", - "order_id": 10000, - "total": 1000, - "products": [ - { - "product_id": "507f1f77bcf86cd7994390112", - "sku": "45790-322", - "name": "Monopoly: 3rd Edition2", - "price": "192", - "quantity": 22, - "position": "12", - "category": "Cars2", - "url": "https://www.example.com/product/path2", - "image_url": "https://www.example.com/product/path.jpg2" - } - ] - }, - "integrations": { - "All": true - }, - "name": "ApplicationLoaded", - "sentAt": "2019-10-14T11:15:53.296Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ + output: { + response: { + status: 200, + body: [ + { + metadata: { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + }, + statusCode: 400, + error: 'LoginCustomerId is required as subAccount is true.', + statTags: { + errorCategory: 'dataValidation', + errorType: 'configuration', + destType: 'GOOGLE_ADWORDS_ENHANCED_CONVERSIONS', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'google_adwords_enhanced_conversions', + description: 'Test 5', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + }, + destination: { + Config: { + rudderAccountId: '25u5whFH7gVTnCiAjn4ykoCLGoC', + customerId: '1234567890', + subAccount: true, + loginCustomerId: '', + listOfConversions: [ + { + conversions: 'Page View', + }, + { + conversions: 'Product Added', + }, + ], + authStatus: 'active', + }, + }, + message: { + type: 'identify', + traits: { + status: 'elizabeth', + }, + userId: 'emrichardson820+22822@gmail.com', + channel: 'sources', + context: { + sources: { + job_id: '24c5HJxHomh6YCngEOCgjS5r1KX/Syncher', + task_id: 'vw_rs_mailchimp_mocked_hg_data', + version: 'v1.8.1', + batch_id: 'f252c69d-c40d-450e-bcd2-2cf26cb62762', + job_run_id: 'c8el40l6e87v0c4hkbl0', + task_run_id: 'c8el40l6e87v0c4hkblg', + }, + externalId: [ + { + id: 'emrichardson820+22822@gmail.com', + type: 'MAILCHIMP-92e1f1ad2c', + identifierType: 'email_address', + }, + ], + mappedToDestination: 'true', + }, + recordId: '1', + rudderId: '4d5d0ed0-9db8-41cc-9bb0-a032f6bfa97a', + messageId: 'b3bee036-fc26-4f6d-9867-c17f85708a82', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + }, + statusCode: 400, + error: 'Message Type identify is not supported. Aborting message.', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'GOOGLE_ADWORDS_ENHANCED_CONVERSIONS', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'google_adwords_enhanced_conversions', + description: 'Test 6', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: null, + }, + destination: { + Config: { + rudderAccountId: '25u5whFH7gVTnCiAjn4ykoCLGoC', + customerId: '1234567890', + subAccount: true, + loginCustomerId: '11', + listOfConversions: [ + { + conversions: 'Page View', + }, + { + conversions: 'Product Added', + }, + ], + authStatus: 'active', + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + phone: '912382193', + firstName: 'John', + lastName: 'Gomes', + city: 'London', + state: 'UK', + streetAddress: '71 Cherry Court SOUTHAMPTON SO53 5PD UK', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + event: 'Page View', + type: 'track', + messageId: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', + originalTimestamp: '2019-10-14T11:15:18.299Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + properties: { + gclid: 'gclid1234', + conversionDateTime: '2022-01-01 12:32:45-08:00', + adjustedValue: '10', + currency: 'INR', + adjustmentDateTime: '2022-01-01 12:32:45-08:00', + partialFailure: true, + campaignId: '1', + templateId: '0', + order_id: 10000, + total: 1000, + products: [ + { + product_id: '507f1f77bcf86cd799439011', + sku: '45790-32', + name: 'Monopoly: 3rd Edition', + price: '19', + position: '1', + category: 'cars', + url: 'https://www.example.com/product/path', + image_url: 'https://www.example.com/product/path.jpg', + quantity: '2', + }, + { + product_id: '507f1f77bcf86cd7994390112', + sku: '45790-322', + name: 'Monopoly: 3rd Edition2', + price: '192', + quantity: 22, + position: '12', + category: 'Cars2', + url: 'https://www.example.com/product/path2', + image_url: 'https://www.example.com/product/path.jpg2', + }, + ], + }, + integrations: { + All: true, + }, + name: 'ApplicationLoaded', + sentAt: '2019-10-14T11:15:53.296Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + secret: null, + }, + statusCode: 500, + error: 'OAuth - access token not found', + statTags: { + errorCategory: 'platform', + errorType: 'oAuthSecret', + destType: 'GOOGLE_ADWORDS_ENHANCED_CONVERSIONS', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'google_adwords_enhanced_conversions', + description: 'Test 7', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + }, + destination: { + Config: { + rudderAccountId: '25u5whFH7gVTnCiAjn4ykoCLGoC', + customerId: '123-456-7890', + subAccount: true, + loginCustomerId: '123-456-7890', + listOfConversions: [ + { + conversions: 'Page View', + }, + { + conversions: 'Product Added', + }, + ], + authStatus: 'active', + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + phone: '912382193', + firstName: 'John', + lastName: 'Gomes', + city: 'London', + state: 'UK', + countryCode: 'us', + streetAddress: '71 Cherry Court SOUTHAMPTON SO53 5PD UK', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + event: 'Product Viewed', + type: 'track', + messageId: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', + originalTimestamp: '2019-10-14T11:15:18.299Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + properties: { + gclid: 'gclid1234', + conversionDateTime: '2022-01-01 12:32:45-08:00', + adjustedValue: '10', + currency: 'INR', + adjustmentDateTime: '2022-01-01 12:32:45-08:00', + partialFailure: true, + campaignId: '1', + templateId: '0', + orde_id: 10000, + total: 1000, + products: [ + { + product_id: '507f1f77bcf86cd799439011', + sku: '45790-32', + name: 'Monopoly: 3rd Edition', + price: '19', + position: '1', + category: 'cars', + url: 'https://www.example.com/product/path', + image_url: 'https://www.example.com/product/path.jpg', + quantity: '2', + }, + { + product_id: '507f1f77bcf86cd7994390112', + sku: '45790-322', + name: 'Monopoly: 3rd Edition2', + price: '192', + quantity: 22, + position: '12', + category: 'Cars2', + url: 'https://www.example.com/product/path2', + image_url: 'https://www.example.com/product/path.jpg2', + }, + ], + }, + integrations: { + All: true, + }, + name: 'ApplicationLoaded', + sentAt: '2019-10-14T11:15:53.296Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + }, + statusCode: 400, + error: + 'Conversion named "Product Viewed" was not specified in the RudderStack destination configuration', + statTags: { + errorCategory: 'dataValidation', + errorType: 'configuration', + destType: 'GOOGLE_ADWORDS_ENHANCED_CONVERSIONS', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'google_adwords_enhanced_conversions', + description: 'Test 8', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + }, + destination: { + Config: { + requireHash: true, + rudderAccountId: '25u5whFH7gVTnCiAjn4ykoCLGoC', + customerId: '123-456-7890', + subAccount: true, + loginCustomerId: '123-456-7890', + listOfConversions: [ + { + conversions: 'Page View', + }, + { + conversions: 'Product Added', + }, + ], + authStatus: 'active', + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + phone: '912382193', + firstName: 'John', + lastName: 'Gomes', + city: 'London', + state: 'UK', + countryCode: 'us', + streetAddress: '71 Cherry Court SOUTHAMPTON SO53 5PD UK', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + event: 'Page View', + type: 'track', + messageId: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', + originalTimestamp: '2019-10-14T11:15:18.299Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + properties: { + gclid: 'gclid1234', + conversionDateTime: '2022-01-01 12:32:45-08:00', + adjustedValue: '10', + currency: 'INR', + adjustmentDateTime: '2022-01-01 12:32:45-08:00', + partialFailure: true, + campaignId: '1', + templateId: '0', + order_id: 10000, + total: 1000, + products: [ + { + product_id: '507f1f77bcf86cd7994390112', + sku: '45790-322', + name: 'Monopoly: 3rd Edition2', + price: '192', + quantity: 22, + position: '12', + category: 'Cars2', + url: 'https://www.example.com/product/path2', + image_url: 'https://www.example.com/product/path.jpg2', + }, + ], + }, + integrations: { + All: true, + }, + name: 'ApplicationLoaded', + sentAt: '2019-10-14T11:15:53.296Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/1234567890:uploadConversionAdjustments', + headers: { + Authorization: 'Bearer abcd1234', + 'Content-Type': 'application/json', + 'developer-token': 'ijkl91011', + 'login-customer-id': '1234567890', + }, + params: { + event: 'Page View', + customerId: '1234567890', + }, + body: { + JSON: { + conversionAdjustments: [ { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/1234567890:uploadConversionAdjustments", - "headers": { - "Authorization": "Bearer abcd1234", - "Content-Type": "application/json", - "developer-token": "ijkl91011", - "login-customer-id": "1234567890" - }, - "params": { - "event": "Page View", - "customerId": "1234567890" - }, - "body": { - "JSON": { - "conversionAdjustments": [ - { - "gclidDateTimePair": { - "gclid": "gclid1234", - "conversionDateTime": "2022-01-01 12:32:45-08:00" - }, - "restatementValue": { - "adjustedValue": 10, - "currencyCode": "INR" - }, - "orderId": "10000", - "adjustmentDateTime": "2022-01-01 12:32:45-08:00", - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "userIdentifiers": [ - { - "hashedPhoneNumber": "912382193" - }, - { - "addressInfo": { - "hashedFirstName": "John", - "hashedLastName": "Gomes", - "state": "UK", - "city": "London", - "countryCode": "us", - "hashedStreetAddress": "71 Cherry Court SOUTHAMPTON SO53 5PD UK" - } - } - ], - "adjustmentType": "ENHANCEMENT" - } - ], - "partialFailure": true - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" + gclidDateTimePair: { + gclid: 'gclid1234', + conversionDateTime: '2022-01-01 12:32:45-08:00', + }, + restatementValue: { + adjustedValue: 10, + currencyCode: 'INR', + }, + orderId: '10000', + adjustmentDateTime: '2022-01-01 12:32:45-08:00', + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + userIdentifiers: [ + { + hashedPhoneNumber: + '04387707e6cbed8c4538c81cc570ed9252d579469f36c273839b26d784e4bdbe', }, - "metadata": { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl91011" - } + { + addressInfo: { + hashedFirstName: + 'a8cfcd74832004951b4408cdb0a5dbcd8c7e52d43f7fe244bf720582e05241da', + hashedLastName: + '1c574b17eefa532b6d61c963550a82d2d3dfca4a7fb69e183374cfafd5328ee4', + state: 'UK', + city: 'London', + countryCode: 'us', + hashedStreetAddress: + '9a4d2e50828448f137f119a3ebdbbbab8d6731234a67595fdbfeb2a2315dd550', + }, }, - "statusCode": 200 - } - ] - } - } + ], + adjustmentType: 'ENHANCEMENT', + }, + ], + partialFailure: true, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'google_adwords_enhanced_conversions', + description: 'Test 9', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + }, + destination: { + Config: { + requireHash: false, + rudderAccountId: '25u5whFH7gVTnCiAjn4ykoCLGoC', + customerId: '123-456-7890', + subAccount: true, + loginCustomerId: '123-456-7890', + listOfConversions: [ + { + conversions: 'Page View', + }, + { + conversions: 'Product Added', + }, + ], + authStatus: 'active', + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + phone: '912382193', + firstName: 'John', + lastName: 'Gomes', + city: 'London', + state: 'UK', + countryCode: 'us', + streetAddress: '71 Cherry Court SOUTHAMPTON SO53 5PD UK', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + event: 'Page View', + type: 'track', + messageId: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', + originalTimestamp: '2019-10-14T11:15:18.299Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + properties: { + gclid: 'gclid1234', + conversionDateTime: '2022-01-01 12:32:45-08:00', + adjustedValue: '10', + currency: 'INR', + adjustmentDateTime: '2022-01-01 12:32:45-08:00', + partialFailure: true, + campaignId: '1', + templateId: '0', + order_id: 10000, + total: 1000, + products: [ + { + product_id: '507f1f77bcf86cd7994390112', + sku: '45790-322', + name: 'Monopoly: 3rd Edition2', + price: '192', + quantity: 22, + position: '12', + category: 'Cars2', + url: 'https://www.example.com/product/path2', + image_url: 'https://www.example.com/product/path.jpg2', + }, + ], + }, + integrations: { + All: true, + }, + name: 'ApplicationLoaded', + sentAt: '2019-10-14T11:15:53.296Z', + }, + }, + ], + }, }, - { - "name": "google_adwords_enhanced_conversions", - "description": "Test 10", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/1234567890:uploadConversionAdjustments', + headers: { + Authorization: 'Bearer abcd1234', + 'Content-Type': 'application/json', + 'developer-token': 'ijkl91011', + 'login-customer-id': '1234567890', + }, + params: { + event: 'Page View', + customerId: '1234567890', + }, + body: { + JSON: { + conversionAdjustments: [ { - "metadata": { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl91011" - } + gclidDateTimePair: { + gclid: 'gclid1234', + conversionDateTime: '2022-01-01 12:32:45-08:00', + }, + restatementValue: { + adjustedValue: 10, + currencyCode: 'INR', + }, + orderId: '10000', + adjustmentDateTime: '2022-01-01 12:32:45-08:00', + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + userIdentifiers: [ + { + hashedPhoneNumber: '912382193', }, - "destination": { - "Config": { - "requireHash": false, - "rudderAccountId": "25u5whFH7gVTnCiAjn4ykoCLGoC", - "customerId": "123-456-7890", - "subAccount": true, - "loginCustomerId": "123-456-7890", - "listOfConversions": [ - { - "conversions": "Page View" - }, - { - "conversions": "Product Added" - } - ], - "authStatus": "active" - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "phone": "912382193", - "firstName": "John", - "lastName": "Gomes", - "city": "London", - "state": "UK", - "countryCode": "us", - "streetAddress": "71 Cherry Court SOUTHAMPTON SO53 5PD UK" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "event": "Page View", - "type": "track", - "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", - "originalTimestamp": "2019-10-14T11:15:18.299Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "properties": { - "gclid": "gclid1234", - "conversionDateTime": "2022-01-01 12:32:45-08:00", - "adjustedValue": "10", - "currency": "INR", - "adjustmentDateTime": "2022-01-01 12:32:45-08:00", - "partialFailure": true, - "campaignId": "1", - "templateId": "0", - "total": 1000, - "products": [ - { - "product_id": "507f1f77bcf86cd7994390112", - "sku": "45790-322", - "name": "Monopoly: 3rd Edition2", - "price": "192", - "quantity": 22, - "position": "12", - "category": "Cars2", - "url": "https://www.example.com/product/path2", - "image_url": "https://www.example.com/product/path.jpg2" - } - ] - }, - "integrations": { - "All": true - }, - "name": "ApplicationLoaded", - "sentAt": "2019-10-14T11:15:53.296Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "metadata": { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl91011" - } + { + addressInfo: { + hashedFirstName: 'John', + hashedLastName: 'Gomes', + state: 'UK', + city: 'London', + countryCode: 'us', + hashedStreetAddress: '71 Cherry Court SOUTHAMPTON SO53 5PD UK', + }, }, - "statusCode": 400, - "error": "Missing required value from [\"properties.orderId\",\"properties.order_id\"]", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation", - "destType": "GOOGLE_ADWORDS_ENHANCED_CONVERSIONS", - "module": "destination", - "implementation": "native", - "feature": "processor" - } - } - ] - } - } - } -] \ No newline at end of file + ], + adjustmentType: 'ENHANCEMENT', + }, + ], + partialFailure: true, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'google_adwords_enhanced_conversions', + description: 'Test 10', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + }, + destination: { + Config: { + requireHash: false, + rudderAccountId: '25u5whFH7gVTnCiAjn4ykoCLGoC', + customerId: '123-456-7890', + subAccount: true, + loginCustomerId: '123-456-7890', + listOfConversions: [ + { + conversions: 'Page View', + }, + { + conversions: 'Product Added', + }, + ], + authStatus: 'active', + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + phone: '912382193', + firstName: 'John', + lastName: 'Gomes', + city: 'London', + state: 'UK', + countryCode: 'us', + streetAddress: '71 Cherry Court SOUTHAMPTON SO53 5PD UK', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + event: 'Page View', + type: 'track', + messageId: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', + originalTimestamp: '2019-10-14T11:15:18.299Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + properties: { + gclid: 'gclid1234', + conversionDateTime: '2022-01-01 12:32:45-08:00', + adjustedValue: '10', + currency: 'INR', + adjustmentDateTime: '2022-01-01 12:32:45-08:00', + partialFailure: true, + campaignId: '1', + templateId: '0', + total: 1000, + products: [ + { + product_id: '507f1f77bcf86cd7994390112', + sku: '45790-322', + name: 'Monopoly: 3rd Edition2', + price: '192', + quantity: 22, + position: '12', + category: 'Cars2', + url: 'https://www.example.com/product/path2', + image_url: 'https://www.example.com/product/path.jpg2', + }, + ], + }, + integrations: { + All: true, + }, + name: 'ApplicationLoaded', + sentAt: '2019-10-14T11:15:53.296Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + }, + statusCode: 400, + error: 'Missing required value from ["properties.orderId","properties.order_id"]', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'GOOGLE_ADWORDS_ENHANCED_CONVERSIONS', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, +]; diff --git a/test/integrations/destinations/google_adwords_enhanced_conversions/router/data.ts b/test/integrations/destinations/google_adwords_enhanced_conversions/router/data.ts index efaa0072e2..4153630323 100644 --- a/test/integrations/destinations/google_adwords_enhanced_conversions/router/data.ts +++ b/test/integrations/destinations/google_adwords_enhanced_conversions/router/data.ts @@ -1,447 +1,457 @@ export const data = [ - { - name: 'google_adwords_enhanced_conversions', - description: 'Test 0', - feature: 'router', - module: 'destination', - version: 'v0', - input: { - request: { - body: { - input: [ - { - "metadata": { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl91011" - }, - "jobId": 1 - }, - "destination": { - "Config": { - "rudderAccountId": "25u5whFH7gVTnCiAjn4ykoCLGoC", - "customerId": "1234567890", - "subAccount": true, - "loginCustomerId": "11", - "listOfConversions": [ - { - "conversions": "Page View" - }, - { - "conversions": "Product Added" - } - ], - "authStatus": "active" - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "phone": "912382193", - "firstName": "John", - "lastName": "Gomes", - "city": "London", - "state": "UK", - "streetAddress": "71 Cherry Court SOUTHAMPTON SO53 5PD UK" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "event": "Page View", - "type": "track", - "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", - "originalTimestamp": "2019-10-14T11:15:18.299Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "properties": { - "gclid": "gclid1234", - "conversionDateTime": "2022-01-01 12:32:45-08:00", - "adjustedValue": "10", - "currency": "INR", - "adjustmentDateTime": "2022-01-01 12:32:45-08:00", - "partialFailure": true, - "campaignId": "1", - "templateId": "0", - "order_id": 10000, - "total": 1000, - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "sku": "45790-32", - "name": "Monopoly: 3rd Edition", - "price": "19", - "position": "1", - "category": "cars", - "url": "https://www.example.com/product/path", - "image_url": "https://www.example.com/product/path.jpg", - "quantity": "2" - }, - { - "product_id": "507f1f77bcf86cd7994390112", - "sku": "45790-322", - "name": "Monopoly: 3rd Edition2", - "price": "192", - "quantity": 22, - "position": "12", - "category": "Cars2", - "url": "https://www.example.com/product/path2", - "image_url": "https://www.example.com/product/path.jpg2" - } - ] - }, - "integrations": { - "All": true - }, - "name": "ApplicationLoaded", - "sentAt": "2019-10-14T11:15:53.296Z" - } - }, - { - "metadata": { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl91011" - }, - "jobId": 2 - }, - "destination": { - "Config": { - "rudderAccountId": "25u5whFH7gVTnCiAjn4ykoCLGoC", - "customerId": "1234567890", - "subAccount": true, - "loginCustomerId": "", - "listOfConversions": [ - { - "conversions": "Page View" - }, - { - "conversions": "Product Added" - } - ], - "authStatus": "active" - } - }, - "message": { - "type": "identify", - "traits": { - "status": "elizabeth" - }, - "userId": "emrichardson820+22822@gmail.com", - "channel": "sources", - "context": { - "sources": { - "job_id": "24c5HJxHomh6YCngEOCgjS5r1KX/Syncher", - "task_id": "vw_rs_mailchimp_mocked_hg_data", - "version": "v1.8.1", - "batch_id": "f252c69d-c40d-450e-bcd2-2cf26cb62762", - "job_run_id": "c8el40l6e87v0c4hkbl0", - "task_run_id": "c8el40l6e87v0c4hkblg" - }, - "externalId": [ - { - "id": "emrichardson820+22822@gmail.com", - "type": "MAILCHIMP-92e1f1ad2c", - "identifierType": "email_address" - } - ], - "mappedToDestination": "true" - }, - "recordId": "1", - "rudderId": "4d5d0ed0-9db8-41cc-9bb0-a032f6bfa97a", - "messageId": "b3bee036-fc26-4f6d-9867-c17f85708a82" - } - }, - { - "metadata": { - "secret": {}, - "jobId": 3 - }, - "destination": { - "Config": { - "rudderAccountId": "25u5whFH7gVTnCiAjn4ykoCLGoC", - "customerId": "1234567890", - "subAccount": true, - "loginCustomerId": "11", - "listOfConversions": [ - { - "conversions": "Page View" - }, - { - "conversions": "Product Added" - } - ], - "authStatus": "active" - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "phone": "912382193", - "firstName": "John", - "lastName": "Gomes", - "city": "London", - "state": "UK", - "streetAddress": "71 Cherry Court SOUTHAMPTON SO53 5PD UK" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "event": "Page View", - "type": "track", - "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", - "originalTimestamp": "2019-10-14T11:15:18.299Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "properties": { - "gclid": "gclid1234", - "conversionDateTime": "2022-01-01 12:32:45-08:00", - "adjustedValue": "10", - "currency": "INR", - "adjustmentDateTime": "2022-01-01 12:32:45-08:00", - "partialFailure": true, - "campaignId": "1", - "templateId": "0", - "order_id": 10000, - "total": 1000, - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "sku": "45790-32", - "name": "Monopoly: 3rd Edition", - "price": "19", - "position": "1", - "category": "cars", - "url": "https://www.example.com/product/path", - "image_url": "https://www.example.com/product/path.jpg", - "quantity": "2" - }, - { - "product_id": "507f1f77bcf86cd7994390112", - "sku": "45790-322", - "name": "Monopoly: 3rd Edition2", - "price": "192", - "quantity": 22, - "position": "12", - "category": "Cars2", - "url": "https://www.example.com/product/path2", - "image_url": "https://www.example.com/product/path.jpg2" - } - ] - }, - "integrations": { - "All": true - }, - "name": "ApplicationLoaded", - "sentAt": "2019-10-14T11:15:53.296Z" - } - }, - ], - destType: 'google_adwords_enhanced_conversions', + { + name: 'google_adwords_enhanced_conversions', + description: 'Test 0', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + metadata: { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', }, - method: 'POST', + jobId: 1, + }, + destination: { + Config: { + rudderAccountId: '25u5whFH7gVTnCiAjn4ykoCLGoC', + customerId: '1234567890', + subAccount: true, + loginCustomerId: '11', + listOfConversions: [ + { + conversions: 'Page View', + }, + { + conversions: 'Product Added', + }, + ], + authStatus: 'active', + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + phone: '912382193', + firstName: 'John', + lastName: 'Gomes', + city: 'London', + state: 'UK', + streetAddress: '71 Cherry Court SOUTHAMPTON SO53 5PD UK', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + event: 'Page View', + type: 'track', + messageId: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', + originalTimestamp: '2019-10-14T11:15:18.299Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + properties: { + gclid: 'gclid1234', + conversionDateTime: '2022-01-01 12:32:45-08:00', + adjustedValue: '10', + currency: 'INR', + adjustmentDateTime: '2022-01-01 12:32:45-08:00', + partialFailure: true, + campaignId: '1', + templateId: '0', + order_id: 10000, + total: 1000, + products: [ + { + product_id: '507f1f77bcf86cd799439011', + sku: '45790-32', + name: 'Monopoly: 3rd Edition', + price: '19', + position: '1', + category: 'cars', + url: 'https://www.example.com/product/path', + image_url: 'https://www.example.com/product/path.jpg', + quantity: '2', + }, + { + product_id: '507f1f77bcf86cd7994390112', + sku: '45790-322', + name: 'Monopoly: 3rd Edition2', + price: '192', + quantity: 22, + position: '12', + category: 'Cars2', + url: 'https://www.example.com/product/path2', + image_url: 'https://www.example.com/product/path.jpg2', + }, + ], + }, + integrations: { + All: true, + }, + name: 'ApplicationLoaded', + sentAt: '2019-10-14T11:15:53.296Z', + }, }, + { + metadata: { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + jobId: 2, + }, + destination: { + Config: { + rudderAccountId: '25u5whFH7gVTnCiAjn4ykoCLGoC', + customerId: '1234567890', + subAccount: true, + loginCustomerId: '', + listOfConversions: [ + { + conversions: 'Page View', + }, + { + conversions: 'Product Added', + }, + ], + authStatus: 'active', + }, + }, + message: { + type: 'identify', + traits: { + status: 'elizabeth', + }, + userId: 'emrichardson820+22822@gmail.com', + channel: 'sources', + context: { + sources: { + job_id: '24c5HJxHomh6YCngEOCgjS5r1KX/Syncher', + task_id: 'vw_rs_mailchimp_mocked_hg_data', + version: 'v1.8.1', + batch_id: 'f252c69d-c40d-450e-bcd2-2cf26cb62762', + job_run_id: 'c8el40l6e87v0c4hkbl0', + task_run_id: 'c8el40l6e87v0c4hkblg', + }, + externalId: [ + { + id: 'emrichardson820+22822@gmail.com', + type: 'MAILCHIMP-92e1f1ad2c', + identifierType: 'email_address', + }, + ], + mappedToDestination: 'true', + }, + recordId: '1', + rudderId: '4d5d0ed0-9db8-41cc-9bb0-a032f6bfa97a', + messageId: 'b3bee036-fc26-4f6d-9867-c17f85708a82', + }, + }, + { + metadata: { + secret: {}, + jobId: 3, + }, + destination: { + Config: { + rudderAccountId: '25u5whFH7gVTnCiAjn4ykoCLGoC', + customerId: '1234567890', + subAccount: true, + loginCustomerId: '11', + listOfConversions: [ + { + conversions: 'Page View', + }, + { + conversions: 'Product Added', + }, + ], + authStatus: 'active', + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + phone: '912382193', + firstName: 'John', + lastName: 'Gomes', + city: 'London', + state: 'UK', + streetAddress: '71 Cherry Court SOUTHAMPTON SO53 5PD UK', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + event: 'Page View', + type: 'track', + messageId: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', + originalTimestamp: '2019-10-14T11:15:18.299Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + properties: { + gclid: 'gclid1234', + conversionDateTime: '2022-01-01 12:32:45-08:00', + adjustedValue: '10', + currency: 'INR', + adjustmentDateTime: '2022-01-01 12:32:45-08:00', + partialFailure: true, + campaignId: '1', + templateId: '0', + order_id: 10000, + total: 1000, + products: [ + { + product_id: '507f1f77bcf86cd799439011', + sku: '45790-32', + name: 'Monopoly: 3rd Edition', + price: '19', + position: '1', + category: 'cars', + url: 'https://www.example.com/product/path', + image_url: 'https://www.example.com/product/path.jpg', + quantity: '2', + }, + { + product_id: '507f1f77bcf86cd7994390112', + sku: '45790-322', + name: 'Monopoly: 3rd Edition2', + price: '192', + quantity: 22, + position: '12', + category: 'Cars2', + url: 'https://www.example.com/product/path2', + image_url: 'https://www.example.com/product/path.jpg2', + }, + ], + }, + integrations: { + All: true, + }, + name: 'ApplicationLoaded', + sentAt: '2019-10-14T11:15:53.296Z', + }, + }, + ], + destType: 'google_adwords_enhanced_conversions', }, - output: { - response: { - status: 200, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/1234567890:uploadConversionAdjustments', + headers: { + Authorization: 'Bearer abcd1234', + 'Content-Type': 'application/json', + 'developer-token': 'ijkl91011', + 'login-customer-id': '11', + }, + params: { event: 'Page View', customerId: '1234567890' }, body: { - output: [ - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/1234567890:uploadConversionAdjustments", - "headers": { - "Authorization": "Bearer abcd1234", - "Content-Type": "application/json", - "developer-token": "ijkl91011", - "login-customer-id": "11" - }, - "params": { "event": "Page View", "customerId": "1234567890" }, - "body": { - "JSON": { - "partialFailure": true, - "conversionAdjustments": [ - { - "gclidDateTimePair": { - "gclid": "gclid1234", - "conversionDateTime": "2022-01-01 12:32:45-08:00" - }, - "restatementValue": { - "adjustedValue": 10, - "currencyCode": "INR" - }, - "orderId": "10000", - "adjustmentDateTime": "2022-01-01 12:32:45-08:00", - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "userIdentifiers": [ - { - "hashedPhoneNumber": "04387707e6cbed8c4538c81cc570ed9252d579469f36c273839b26d784e4bdbe" - }, - { - "addressInfo": { - "hashedFirstName": "a8cfcd74832004951b4408cdb0a5dbcd8c7e52d43f7fe244bf720582e05241da", - "hashedLastName": "1c574b17eefa532b6d61c963550a82d2d3dfca4a7fb69e183374cfafd5328ee4", - "state": "UK", - "city": "London", - "hashedStreetAddress": "9a4d2e50828448f137f119a3ebdbbbab8d6731234a67595fdbfeb2a2315dd550" - } - } - ], - "adjustmentType": "ENHANCEMENT" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl91011" - }, - "jobId": 1 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "rudderAccountId": "25u5whFH7gVTnCiAjn4ykoCLGoC", - "customerId": "1234567890", - "subAccount": true, - "loginCustomerId": "11", - "listOfConversions": [{ "conversions": "Page View" }, { "conversions": "Product Added" }], - "authStatus": "active" - } - } + JSON: { + partialFailure: true, + conversionAdjustments: [ + { + gclidDateTimePair: { + gclid: 'gclid1234', + conversionDateTime: '2022-01-01 12:32:45-08:00', }, - { - "metadata": [ - { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl91011" - }, - "jobId": 2 - } - ], - "destination": { - "Config": { - "rudderAccountId": "25u5whFH7gVTnCiAjn4ykoCLGoC", - "customerId": "1234567890", - "subAccount": true, - "loginCustomerId": "", - "listOfConversions": [ - { - "conversions": "Page View" - }, - { - "conversions": "Product Added" - } - ], - "authStatus": "active" - } - }, - "batched": false, - "statusCode": 400, - "error": "Message Type identify is not supported. Aborting message.", - "statTags": { - "destType": "GOOGLE_ADWORDS_ENHANCED_CONVERSIONS", - "errorCategory": "dataValidation", - "errorType": "instrumentation", - "feature": "router", - "implementation": "native", - "module": "destination", - } + restatementValue: { + adjustedValue: 10, + currencyCode: 'INR', }, - { - "metadata": [ - { - "secret": {}, - "jobId": 3 - } - ], - "destination": { - "Config": { - "rudderAccountId": "25u5whFH7gVTnCiAjn4ykoCLGoC", - "customerId": "1234567890", - "subAccount": true, - "loginCustomerId": "11", - "listOfConversions": [ - { - "conversions": "Page View" - }, - { - "conversions": "Product Added" - } - ], - "authStatus": "active" - } + orderId: '10000', + adjustmentDateTime: '2022-01-01 12:32:45-08:00', + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + userIdentifiers: [ + { + hashedPhoneNumber: + '04387707e6cbed8c4538c81cc570ed9252d579469f36c273839b26d784e4bdbe', + }, + { + addressInfo: { + hashedFirstName: + 'a8cfcd74832004951b4408cdb0a5dbcd8c7e52d43f7fe244bf720582e05241da', + hashedLastName: + '1c574b17eefa532b6d61c963550a82d2d3dfca4a7fb69e183374cfafd5328ee4', + state: 'UK', + city: 'London', + hashedStreetAddress: + '9a4d2e50828448f137f119a3ebdbbbab8d6731234a67595fdbfeb2a2315dd550', }, - "batched": false, - "statusCode": 500, - "error": "OAuth - access token not found", - "statTags": { - "destType": "GOOGLE_ADWORDS_ENHANCED_CONVERSIONS", - "errorCategory": "platform", - "errorType": "oAuthSecret", - "feature": "router", - "implementation": "native", - "module": "destination", - } - } - ] - , + }, + ], + adjustmentType: 'ENHANCEMENT', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + metadata: [ + { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + jobId: 1, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + rudderAccountId: '25u5whFH7gVTnCiAjn4ykoCLGoC', + customerId: '1234567890', + subAccount: true, + loginCustomerId: '11', + listOfConversions: [ + { conversions: 'Page View' }, + { conversions: 'Product Added' }, + ], + authStatus: 'active', + }, + }, + }, + { + metadata: [ + { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + jobId: 2, + }, + ], + destination: { + Config: { + rudderAccountId: '25u5whFH7gVTnCiAjn4ykoCLGoC', + customerId: '1234567890', + subAccount: true, + loginCustomerId: '', + listOfConversions: [ + { + conversions: 'Page View', + }, + { + conversions: 'Product Added', + }, + ], + authStatus: 'active', + }, + }, + batched: false, + statusCode: 400, + error: 'Message Type identify is not supported. Aborting message.', + statTags: { + destType: 'GOOGLE_ADWORDS_ENHANCED_CONVERSIONS', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'router', + implementation: 'native', + module: 'destination', + }, + }, + { + metadata: [ + { + secret: {}, + jobId: 3, + }, + ], + destination: { + Config: { + rudderAccountId: '25u5whFH7gVTnCiAjn4ykoCLGoC', + customerId: '1234567890', + subAccount: true, + loginCustomerId: '11', + listOfConversions: [ + { + conversions: 'Page View', + }, + { + conversions: 'Product Added', + }, + ], + authStatus: 'active', }, + }, + batched: false, + statusCode: 500, + error: 'OAuth - access token not found', + statTags: { + destType: 'GOOGLE_ADWORDS_ENHANCED_CONVERSIONS', + errorCategory: 'platform', + errorType: 'oAuthSecret', + feature: 'router', + implementation: 'native', + module: 'destination', + }, }, + ], }, - } + }, + }, + }, ]; From f5ad088439ae628c9652b58d1ecb90257d77cae3 Mon Sep 17 00:00:00 2001 From: Gauravudia <60897972+Gauravudia@users.noreply.github.com> Date: Fri, 5 Jan 2024 15:15:55 +0530 Subject: [PATCH 113/135] feat: onboard new destination the trade desk (#2918) * feat: onboard new destination the trade desk * feat: onboard trade desk on transformer porxy * feat: add secret from metadata * refactor: remove secretKey from headers in utils * feat: using audienceId from config inplace of segmentName * test: added testcases * test: added testcases * refactor: prepareProxyRequest utility and added delivery test cases * test: add console log * refactor: address review comments * refactor: use existing utility to split batch on size * chore: added mocks * refactor: throw platform error --- src/adapters/network.js | 4 +- .../v2/destinations/the_trade_desk/config.js | 21 + .../the_trade_desk/rtWorkflow.yaml | 17 + .../v2/destinations/the_trade_desk/utils.js | 107 ++++ .../destinations/the_trade_desk/utils.test.js | 49 ++ src/features.json | 1 + .../the_trade_desk/networkHandler.js | 86 +++ .../destinations/the_trade_desk/common.ts | 44 ++ .../the_trade_desk/delivery/data.ts | 248 ++++++++ .../destinations/the_trade_desk/mocks.ts | 5 + .../destinations/the_trade_desk/network.ts | 106 ++++ .../the_trade_desk/router/data.ts | 536 ++++++++++++++++++ 12 files changed, 1222 insertions(+), 2 deletions(-) create mode 100644 src/cdk/v2/destinations/the_trade_desk/config.js create mode 100644 src/cdk/v2/destinations/the_trade_desk/rtWorkflow.yaml create mode 100644 src/cdk/v2/destinations/the_trade_desk/utils.js create mode 100644 src/cdk/v2/destinations/the_trade_desk/utils.test.js create mode 100644 src/v0/destinations/the_trade_desk/networkHandler.js create mode 100644 test/integrations/destinations/the_trade_desk/common.ts create mode 100644 test/integrations/destinations/the_trade_desk/delivery/data.ts create mode 100644 test/integrations/destinations/the_trade_desk/mocks.ts create mode 100644 test/integrations/destinations/the_trade_desk/network.ts create mode 100644 test/integrations/destinations/the_trade_desk/router/data.ts diff --git a/src/adapters/network.js b/src/adapters/network.js index 375d9dc908..b0bd14374e 100644 --- a/src/adapters/network.js +++ b/src/adapters/network.js @@ -287,7 +287,7 @@ function getFormData(payload) { * @returns */ const prepareProxyRequest = (request) => { - const { body, method, params, endpoint, headers } = request; + const { body, method, params, endpoint, headers, destinationConfig: config } = request; const { payload, payloadFormat } = getPayloadData(body); let data; @@ -313,7 +313,7 @@ const prepareProxyRequest = (request) => { } // Ref: https://github.com/rudderlabs/rudder-server/blob/master/router/network.go#L164 headers['User-Agent'] = 'RudderLabs'; - return removeUndefinedValues({ endpoint, data, params, headers, method }); + return removeUndefinedValues({ endpoint, data, params, headers, method, config }); }; /** diff --git a/src/cdk/v2/destinations/the_trade_desk/config.js b/src/cdk/v2/destinations/the_trade_desk/config.js new file mode 100644 index 0000000000..9455c818fd --- /dev/null +++ b/src/cdk/v2/destinations/the_trade_desk/config.js @@ -0,0 +1,21 @@ +const SUPPORTED_EVENT_TYPE = 'record'; +const ACTION_TYPES = ['insert', 'delete']; +const DATA_PROVIDER_ID = 'rudderstack'; + +// ref:- https://partner.thetradedesk.com/v3/portal/data/doc/DataEnvironments +const DATA_SERVERS_BASE_ENDPOINTS_MAP = { + apac: 'https://sin-data.adsrvr.org', + tokyo: 'https://tok-data.adsrvr.org', + usEastCoast: 'https://use-data.adsrvr.org', + usWestCoast: 'https://usw-data.adsrvr.org', + ukEu: 'https://euw-data.adsrvr.org', + china: 'https://data-cn2.adsrvr.cn', +}; + +module.exports = { + SUPPORTED_EVENT_TYPE, + ACTION_TYPES, + DATA_PROVIDER_ID, + MAX_REQUEST_SIZE_IN_BYTES: 2500000, + DATA_SERVERS_BASE_ENDPOINTS_MAP, +}; diff --git a/src/cdk/v2/destinations/the_trade_desk/rtWorkflow.yaml b/src/cdk/v2/destinations/the_trade_desk/rtWorkflow.yaml new file mode 100644 index 0000000000..0c8963e0ac --- /dev/null +++ b/src/cdk/v2/destinations/the_trade_desk/rtWorkflow.yaml @@ -0,0 +1,17 @@ +bindings: + - name: processRouterDest + path: ./utils + +steps: + - name: validateInput + template: | + $.assert(Array.isArray(^) && ^.length > 0, "Invalid event array") + const config = ^[0].destination.Config + $.assertConfig(config.audienceId, "Segment name is not present. Aborting") + $.assertConfig(config.advertiserId, "Advertiser ID is not present. Aborting") + $.assertConfig(config.advertiserSecretKey, "Advertiser Secret Key is not present. Aborting") + config.ttlInDays ? $.assertConfig(config.ttlInDays >=0 && config.ttlInDays <= 180, "TTL is out of range. Allowed values are 0 to 180 days") + + - name: processRouterDest + template: | + $.processRouterDest(^) diff --git a/src/cdk/v2/destinations/the_trade_desk/utils.js b/src/cdk/v2/destinations/the_trade_desk/utils.js new file mode 100644 index 0000000000..0f1c3fb0c1 --- /dev/null +++ b/src/cdk/v2/destinations/the_trade_desk/utils.js @@ -0,0 +1,107 @@ +const lodash = require('lodash'); +const CryptoJS = require('crypto-js'); +const { InstrumentationError, AbortedError } = require('@rudderstack/integrations-lib'); +const { BatchUtils } = require('@rudderstack/workflow-engine'); +const { + defaultPostRequestConfig, + defaultRequestConfig, + getSuccessRespEvents, + removeUndefinedAndNullValues, + handleRtTfSingleEventError, +} = require('../../../../v0/util'); +const tradeDeskConfig = require('./config'); + +const { DATA_PROVIDER_ID, DATA_SERVERS_BASE_ENDPOINTS_MAP } = tradeDeskConfig; + +const ttlInMin = (ttl) => parseInt(ttl, 10) * 1440; +const getBaseEndpoint = (dataServer) => DATA_SERVERS_BASE_ENDPOINTS_MAP[dataServer]; +const getFirstPartyEndpoint = (dataServer) => `${getBaseEndpoint(dataServer)}/data/advertiser`; + +const getSignatureHeader = (request, secretKey) => { + if (!secretKey) { + throw new AbortedError('Secret key is missing. Aborting'); + } + const sha1 = CryptoJS.HmacSHA1(JSON.stringify(request), secretKey); + const base = CryptoJS.enc.Base64.stringify(sha1); + return base; +}; + +const responseBuilder = (items, config) => { + const { advertiserId, dataServer } = config; + + const payload = { DataProviderId: DATA_PROVIDER_ID, AdvertiserId: advertiserId, Items: items }; + + const response = defaultRequestConfig(); + response.endpoint = getFirstPartyEndpoint(dataServer); + response.method = defaultPostRequestConfig.requestMethod; + response.body.JSON = removeUndefinedAndNullValues(payload); + return response; +}; + +const batchResponseBuilder = (items, config) => { + const response = []; + const itemsChunks = BatchUtils.chunkArrayBySizeAndLength(items, { + // TODO: use destructuring at the top of file once proper 'mocking' is implemented. + // eslint-disable-next-line unicorn/consistent-destructuring + maxSizeInBytes: tradeDeskConfig.MAX_REQUEST_SIZE_IN_BYTES, + }); + + itemsChunks.items.forEach((chunk) => { + response.push(responseBuilder(chunk, config)); + }); + + return response; +}; + +const processRecordInputs = (inputs, destination) => { + const { Config } = destination; + const items = []; + const successMetadata = []; + const errorResponseList = []; + + const error = new InstrumentationError('Invalid action type'); + + inputs.forEach((input) => { + const { fields, action } = input.message; + const isInsertOrDelete = action === 'insert' || action === 'delete'; + + if (isInsertOrDelete) { + successMetadata.push(input.metadata); + const data = [ + { + Name: Config.audienceId, + TTLInMinutes: action === 'insert' ? ttlInMin(Config.ttlInDays) : 0, + }, + ]; + + Object.keys(fields).forEach((id) => { + const value = fields[id]; + if (value) { + // adding only non empty ID's + items.push({ [id]: value, Data: data }); + } + }); + } else { + errorResponseList.push(handleRtTfSingleEventError(input, error, {})); + } + }); + + const payloads = batchResponseBuilder(items, Config); + + const response = getSuccessRespEvents(payloads, successMetadata, destination, true); + return [response, ...errorResponseList]; +}; + +const processRouterDest = (inputs) => { + const respList = []; + const { destination } = inputs[0]; + const groupedInputs = lodash.groupBy(inputs, (input) => input.message.type); + if (groupedInputs.record) { + const transformedRecordEvent = processRecordInputs(groupedInputs.record, destination); + respList.push(...transformedRecordEvent); + } + + return respList; +}; + +module.exports = { getSignatureHeader, processRouterDest }; diff --git a/src/cdk/v2/destinations/the_trade_desk/utils.test.js b/src/cdk/v2/destinations/the_trade_desk/utils.test.js new file mode 100644 index 0000000000..81fd7cf17d --- /dev/null +++ b/src/cdk/v2/destinations/the_trade_desk/utils.test.js @@ -0,0 +1,49 @@ +const { AbortedError } = require('@rudderstack/integrations-lib'); +const { getSignatureHeader } = require('./utils'); + +describe('getSignatureHeader', () => { + it('should calculate the signature header for a valid request and secret key', () => { + const request = { data: 'example' }; + const secretKey = 'secret'; + const expected = 'rvxETQ7kIU5Cko3GddD2AeFpz8E='; + + const result = getSignatureHeader(request, secretKey); + + expect(result).toBe(expected); + }); + + it('should handle requests with different data types and secret key', () => { + const request1 = { data: 'example' }; + const secretKey1 = 'secret'; + const expected1 = 'rvxETQ7kIU5Cko3GddD2AeFpz8E='; + + const result1 = getSignatureHeader(request1, secretKey1); + + expect(result1).toBe(expected1); + + const request2 = { data: 123 }; + const secretKey2 = 'secret'; + const expected2 = 'V5RSVwxqHRLkZftZ0+IrZAp4L4s='; + + const result2 = getSignatureHeader(request2, secretKey2); + + expect(result2).toBe(expected2); + + const request3 = { data: true }; + const secretKey3 = 'secret'; + const expected3 = 'oZ28NtyMYDGxRV0E+Tgvz7B1jds='; + + const result3 = getSignatureHeader(request3, secretKey3); + + expect(result3).toBe(expected3); + }); + + it('should throw an AbortedError when secret key is missing', () => { + const request = { data: 'example' }; + const secretKey = null; + + expect(() => { + getSignatureHeader(request, secretKey); + }).toThrow(AbortedError); + }); +}); diff --git a/src/features.json b/src/features.json index 606590459c..cc75b16a74 100644 --- a/src/features.json +++ b/src/features.json @@ -64,6 +64,7 @@ "ONE_SIGNAL": true, "TIKTOK_AUDIENCE": true, "REDDIT": true, + "THE_TRADE_DESK": true, "INTERCOM": true }, "supportSourceTransformV1": true, diff --git a/src/v0/destinations/the_trade_desk/networkHandler.js b/src/v0/destinations/the_trade_desk/networkHandler.js new file mode 100644 index 0000000000..ca5ac68be8 --- /dev/null +++ b/src/v0/destinations/the_trade_desk/networkHandler.js @@ -0,0 +1,86 @@ +const { NetworkError, AbortedError, PlatformError } = require('@rudderstack/integrations-lib'); +const { httpSend, prepareProxyRequest } = require('../../../adapters/network'); +const { + processAxiosResponse, + getDynamicErrorType, +} = require('../../../adapters/utils/networkUtils'); +const { getSignatureHeader } = require('../../../cdk/v2/destinations/the_trade_desk/utils'); +const { isHttpStatusSuccess } = require('../../util/index'); +const tags = require('../../util/tags'); +const { JSON_MIME_TYPE } = require('../../util/constant'); + +const proxyRequest = async (request) => { + const { endpoint, data, method, params, headers, config } = prepareProxyRequest(request); + + if (!config?.advertiserSecretKey) { + throw new PlatformError('Advertiser secret key is missing in destination config. Aborting'); + } + + if (!process.env.THE_TRADE_DESK_DATA_PROVIDER_SECRET_KEY) { + throw new PlatformError('Data provider secret key is missing. Aborting'); + } + + const ProxyHeaders = { + ...headers, + TtdSignature: getSignatureHeader(data, config.advertiserSecretKey), + 'TtdSignature-dp': getSignatureHeader( + data, + process.env.THE_TRADE_DESK_DATA_PROVIDER_SECRET_KEY, + ), + 'Content-Type': JSON_MIME_TYPE, + }; + + const requestOptions = { + url: endpoint, + data, + params, + headers: ProxyHeaders, + method, + }; + const response = await httpSend(requestOptions, { feature: 'proxy', destType: 'the_trade_desk' }); + return response; +}; + +const responseHandler = (destinationResponse) => { + const message = 'Request Processed Successfully'; + const { response, status } = destinationResponse; + + // if the response from destination is not a success case build an explicit error + if (!isHttpStatusSuccess(status)) { + throw new NetworkError( + `Request failed with status: ${status} due to ${response}`, + status, + { + [tags.TAG_NAMES.ERROR_TYPE]: getDynamicErrorType(status), + }, + destinationResponse, + ); + } + + // Trade desk returns 200 with an error in case of "Failed to parse TDID, DAID, UID2, IDL, EUID, or failed to decrypt UID2Token or EUIDToken" + // https://partner.thetradedesk.com/v3/portal/data/doc/post-data-advertiser-external + // {"FailedLines":[{"ErrorCode":"MissingUserId","Message":"Invalid DAID, item #1"}]} + if ('FailedLines' in response && response.FailedLines.length > 0) { + throw new AbortedError( + `Request failed with status: ${status} due to ${JSON.stringify(response)}`, + 400, + destinationResponse, + ); + } + + // else successfully return status, message and original destination response + // Trade desk returns 200 with empty object '{}' in response if all the events are processed successfully + return { + status, + message, + destinationResponse, + }; +}; + +function networkHandler() { + this.proxy = proxyRequest; + this.processAxiosResponse = processAxiosResponse; + this.prepareProxy = prepareProxyRequest; + this.responseHandler = responseHandler; +} +module.exports = { networkHandler }; diff --git a/test/integrations/destinations/the_trade_desk/common.ts b/test/integrations/destinations/the_trade_desk/common.ts new file mode 100644 index 0000000000..d792c7faae --- /dev/null +++ b/test/integrations/destinations/the_trade_desk/common.ts @@ -0,0 +1,44 @@ +const destType = 'the_trade_desk'; +const destTypeInUpperCase = 'THE_TRADE_DESK'; +const advertiserId = 'test-advertiser-id'; +const dataProviderId = 'rudderstack'; +const segmentName = 'test-segment'; +const sampleDestination = { + Config: { + advertiserId, + advertiserSecretKey: 'test-advertiser-secret-key', + dataServer: 'apac', + ttlInDays: 30, + audienceId: segmentName, + }, + DestinationDefinition: { Config: { cdkV2Enabled: true } }, +}; + +const sampleSource = { + job_id: 'test-job-id', + job_run_id: 'test-job-run-id', + task_run_id: 'test-task-run-id', + version: 'v1.40.4', +}; + +const sampleContext = { + destinationFields: 'daid, uid2', + externalId: [ + { + identifierType: 'tdid', + type: 'THE_TRADE_DESK-test-segment', + }, + ], + mappedToDestination: 'true', + sources: sampleSource, +}; + +export { + destType, + destTypeInUpperCase, + advertiserId, + dataProviderId, + segmentName, + sampleDestination, + sampleContext, +}; diff --git a/test/integrations/destinations/the_trade_desk/delivery/data.ts b/test/integrations/destinations/the_trade_desk/delivery/data.ts new file mode 100644 index 0000000000..320eb6dcfe --- /dev/null +++ b/test/integrations/destinations/the_trade_desk/delivery/data.ts @@ -0,0 +1,248 @@ +import { + destType, + destTypeInUpperCase, + advertiserId, + dataProviderId, + segmentName, + sampleDestination, +} from '../common'; + +beforeAll(() => { + process.env.THE_TRADE_DESK_DATA_PROVIDER_SECRET_KEY = 'mockedDataProviderSecretKey'; +}); + +afterAll(() => { + delete process.env.THE_TRADE_DESK_DATA_PROVIDER_SECRET_KEY; +}); + +export const data = [ + { + name: destType, + description: 'Successful delivery of Add/Remove IDs to/from Trade Desk', + feature: 'dataDelivery', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://sin-data.adsrvr.org/data/advertiser', + headers: {}, + params: {}, + destinationConfig: sampleDestination.Config, + body: { + JSON: { + AdvertiserId: advertiserId, + DataProviderId: dataProviderId, + Items: [ + { + DAID: 'test-daid-1', + Data: [ + { + Name: segmentName, + TTLInMinutes: 43200, + }, + ], + }, + { + Data: [ + { + Name: segmentName, + TTLInMinutes: 43200, + }, + ], + UID2: 'test-uid2-1', + }, + { + DAID: 'test-daid-2', + Data: [ + { + Name: segmentName, + TTLInMinutes: 0, + }, + ], + }, + { + Data: [ + { + Name: segmentName, + TTLInMinutes: 0, + }, + ], + UID2: 'test-uid2-2', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: { + destinationResponse: { + response: {}, + status: 200, + }, + message: 'Request Processed Successfully', + status: 200, + }, + }, + }, + }, + }, + { + name: destType, + description: 'Error response from The Trade Desk due to invalid IDs', + feature: 'dataDelivery', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://sin-data.adsrvr.org/data/advertiser', + headers: {}, + params: {}, + destinationConfig: sampleDestination.Config, + body: { + JSON: { + AdvertiserId: advertiserId, + DataProviderId: dataProviderId, + Items: [ + { + DAID: 'test-daid', + Data: [ + { + Name: segmentName, + TTLInMinutes: 43200, + }, + ], + }, + { + Data: [ + { + Name: segmentName, + TTLInMinutes: 43200, + }, + ], + UID2: 'test-invalid-uid2', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + method: 'POST', + }, + }, + output: { + response: { + status: 400, + body: { + output: { + destinationResponse: { + response: { + FailedLines: [{ ErrorCode: 'MissingUserId', Message: 'Invalid UID2, item #2' }], + }, + status: 200, + }, + message: + 'Request failed with status: 200 due to {"FailedLines":[{"ErrorCode":"MissingUserId","Message":"Invalid UID2, item #2"}]}', + statTags: { + destType: destTypeInUpperCase, + destinationId: 'Non-determininable', + errorCategory: 'network', + errorType: 'aborted', + feature: 'dataDelivery', + implementation: 'native', + module: 'destination', + workspaceId: 'Non-determininable', + }, + status: 400, + }, + }, + }, + }, + }, + { + name: destType, + description: + 'Missing advertiser secret key in destination config from proxy request from server', + feature: 'dataDelivery', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://sin-data.adsrvr.org/data/advertiser', + headers: {}, + params: {}, + body: { + JSON: { + AdvertiserId: advertiserId, + DataProviderId: dataProviderId, + Items: [ + { + DAID: 'test-daid-1', + Data: [ + { + Name: segmentName, + TTLInMinutes: 43200, + }, + ], + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + method: 'POST', + }, + }, + output: { + response: { + status: 400, + body: { + output: { + destinationResponse: '', + message: 'Advertiser secret key is missing in destination config. Aborting', + statTags: { + destType: destTypeInUpperCase, + destinationId: 'Non-determininable', + errorCategory: 'platform', + feature: 'dataDelivery', + implementation: 'native', + module: 'destination', + workspaceId: 'Non-determininable', + }, + status: 400, + }, + }, + }, + }, + }, +]; diff --git a/test/integrations/destinations/the_trade_desk/mocks.ts b/test/integrations/destinations/the_trade_desk/mocks.ts new file mode 100644 index 0000000000..ddcbebae88 --- /dev/null +++ b/test/integrations/destinations/the_trade_desk/mocks.ts @@ -0,0 +1,5 @@ +import config from '../../../../src/cdk/v2/destinations/the_trade_desk/config'; + +export const defaultMockFns = () => { + jest.replaceProperty(config, 'MAX_REQUEST_SIZE_IN_BYTES', 250); +}; diff --git a/test/integrations/destinations/the_trade_desk/network.ts b/test/integrations/destinations/the_trade_desk/network.ts new file mode 100644 index 0000000000..ed6bdf4c7d --- /dev/null +++ b/test/integrations/destinations/the_trade_desk/network.ts @@ -0,0 +1,106 @@ +import { destType, advertiserId, dataProviderId, segmentName } from './common'; + +export const networkCallsData = [ + { + httpReq: { + url: 'https://sin-data.adsrvr.org/data/advertiser', + data: { + AdvertiserId: advertiserId, + DataProviderId: dataProviderId, + Items: [ + { + DAID: 'test-daid-1', + Data: [ + { + Name: segmentName, + TTLInMinutes: 43200, + }, + ], + }, + { + Data: [ + { + Name: segmentName, + TTLInMinutes: 43200, + }, + ], + UID2: 'test-uid2-1', + }, + { + DAID: 'test-daid-2', + Data: [ + { + Name: segmentName, + TTLInMinutes: 0, + }, + ], + }, + { + Data: [ + { + Name: 'test-segment', + TTLInMinutes: 0, + }, + ], + UID2: 'test-uid2-2', + }, + ], + }, + params: { destination: destType }, + headers: { + TtdSignature: '8LqGha6I7e3duvhngEvhXoTden0=', + 'TtdSignature-dp': 'tLpf4t5xebsr9Xcqp9PjhOJX7p0=', + 'Content-Type': 'application/json', + 'User-Agent': 'RudderLabs', + }, + method: 'POST', + }, + httpRes: { + data: {}, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://sin-data.adsrvr.org/data/advertiser', + data: { + AdvertiserId: advertiserId, + DataProviderId: dataProviderId, + Items: [ + { + DAID: 'test-daid', + Data: [ + { + Name: segmentName, + TTLInMinutes: 43200, + }, + ], + }, + { + Data: [ + { + Name: segmentName, + TTLInMinutes: 43200, + }, + ], + UID2: 'test-invalid-uid2', + }, + ], + }, + params: { destination: destType }, + headers: { + TtdSignature: '9EIeoIGkRkV5oJHfGtoq1lwQl+M=', + 'TtdSignature-dp': 'ZpHWNd1uGvQAv/QW685SQT8tl1I=', + 'Content-Type': 'application/json', + 'User-Agent': 'RudderLabs', + }, + method: 'POST', + }, + httpRes: { + data: { FailedLines: [{ ErrorCode: 'MissingUserId', Message: 'Invalid UID2, item #2' }] }, + status: 200, + statusText: 'Ok', + }, + }, +]; diff --git a/test/integrations/destinations/the_trade_desk/router/data.ts b/test/integrations/destinations/the_trade_desk/router/data.ts new file mode 100644 index 0000000000..3c9cb1cc70 --- /dev/null +++ b/test/integrations/destinations/the_trade_desk/router/data.ts @@ -0,0 +1,536 @@ +import { overrideDestination } from '../../../testUtils'; +import { defaultMockFns } from '../mocks'; +import { + destType, + destTypeInUpperCase, + advertiserId, + dataProviderId, + segmentName, + sampleDestination, + sampleContext, +} from '../common'; + +export const data = [ + { + name: destType, + description: 'Add IDs to the segment', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + message: { + type: 'record', + action: 'insert', + fields: { + DAID: 'test-daid-1', + UID2: 'test-uid2-1', + }, + channel: 'sources', + context: sampleContext, + recordId: '1', + }, + destination: sampleDestination, + metadata: { + jobId: 1, + }, + }, + { + message: { + type: 'record', + action: 'insert', + fields: { + DAID: 'test-daid-2', + UID2: null, + }, + channel: 'sources', + context: sampleContext, + recordId: '2', + }, + destination: sampleDestination, + metadata: { + jobId: 2, + }, + }, + ], + destType, + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: [ + { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://sin-data.adsrvr.org/data/advertiser', + headers: {}, + params: {}, + body: { + JSON: { + DataProviderId: dataProviderId, + AdvertiserId: advertiserId, + Items: [ + { + DAID: 'test-daid-1', + Data: [ + { + Name: segmentName, + TTLInMinutes: 43200, + }, + ], + }, + { + UID2: 'test-uid2-1', + Data: [ + { + Name: segmentName, + TTLInMinutes: 43200, + }, + ], + }, + { + DAID: 'test-daid-2', + Data: [ + { + Name: segmentName, + TTLInMinutes: 43200, + }, + ], + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + ], + metadata: [ + { + jobId: 1, + }, + { + jobId: 2, + }, + ], + batched: true, + statusCode: 200, + destination: sampleDestination, + }, + ], + }, + }, + }, + mockFns: defaultMockFns, + }, + { + name: destType, + description: + 'Add/Remove IDs to/from the segment and split into multiple requests based on size', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + message: { + type: 'record', + action: 'insert', + fields: { + DAID: 'test-daid-1', + UID2: 'test-uid2-1', + }, + channel: 'sources', + context: sampleContext, + recordId: '1', + }, + destination: sampleDestination, + metadata: { + jobId: 1, + }, + }, + { + message: { + type: 'record', + action: 'delete', + fields: { + DAID: 'test-daid-2', + UID2: 'test-uid2-2', + }, + channel: 'sources', + context: sampleContext, + recordId: '2', + }, + destination: sampleDestination, + metadata: { + jobId: 2, + }, + }, + ], + destType, + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: [ + { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://sin-data.adsrvr.org/data/advertiser', + headers: {}, + params: {}, + body: { + JSON: { + DataProviderId: dataProviderId, + AdvertiserId: advertiserId, + Items: [ + { + DAID: 'test-daid-1', + Data: [ + { + Name: segmentName, + TTLInMinutes: 43200, + }, + ], + }, + { + UID2: 'test-uid2-1', + Data: [ + { + Name: segmentName, + TTLInMinutes: 43200, + }, + ], + }, + { + DAID: 'test-daid-2', + Data: [ + { + Name: segmentName, + TTLInMinutes: 0, + }, + ], + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://sin-data.adsrvr.org/data/advertiser', + headers: {}, + params: {}, + body: { + JSON: { + DataProviderId: dataProviderId, + AdvertiserId: advertiserId, + Items: [ + { + UID2: 'test-uid2-2', + Data: [ + { + Name: segmentName, + TTLInMinutes: 0, + }, + ], + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + ], + metadata: [ + { + jobId: 1, + }, + { + jobId: 2, + }, + ], + batched: true, + statusCode: 200, + destination: sampleDestination, + }, + ], + }, + }, + }, + mockFns: defaultMockFns, + }, + { + name: destType, + description: + 'Missing segment name (audienceId) in the config (segment name will be populated from vdm)', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + message: { + type: 'record', + action: 'insert', + fields: { + DAID: 'test-daid-1', + UID2: 'test-uid2-1', + }, + channel: 'sources', + context: sampleContext, + recordId: '1', + }, + destination: overrideDestination(sampleDestination, { audienceId: '' }), + metadata: { + jobId: 1, + }, + }, + { + message: { + type: 'record', + action: 'insert', + fields: { + DAID: 'test-daid-2', + UID2: 'test-uid2-2', + }, + channel: 'sources', + context: sampleContext, + recordId: '2', + }, + destination: overrideDestination(sampleDestination, { audienceId: '' }), + metadata: { + jobId: 2, + }, + }, + ], + destType, + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batched: false, + metadata: [{ jobId: 1 }, { jobId: 2 }], + statusCode: 400, + error: 'Segment name is not present. Aborting', + statTags: { + destType: destTypeInUpperCase, + implementation: 'cdkV2', + feature: 'router', + module: 'destination', + errorCategory: 'dataValidation', + errorType: 'configuration', + }, + }, + ], + }, + }, + }, + }, + { + name: destType, + description: 'Missing advertiser ID in the config', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + message: { + type: 'record', + action: 'insert', + fields: { + DAID: 'test-daid-1', + UID2: 'test-uid2-1', + }, + channel: 'sources', + context: sampleContext, + recordId: '1', + }, + destination: overrideDestination(sampleDestination, { advertiserId: '' }), + metadata: { + jobId: 1, + }, + }, + ], + destType, + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batched: false, + metadata: [{ jobId: 1 }], + statusCode: 400, + error: 'Advertiser ID is not present. Aborting', + statTags: { + destType: destTypeInUpperCase, + implementation: 'cdkV2', + feature: 'router', + module: 'destination', + errorCategory: 'dataValidation', + errorType: 'configuration', + }, + }, + ], + }, + }, + }, + }, + { + name: destType, + description: 'Missing advertiser secret key in the config', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + message: { + type: 'record', + action: 'insert', + fields: { + DAID: 'test-daid-1', + UID2: 'test-uid2-1', + }, + channel: 'sources', + context: sampleContext, + recordId: '1', + }, + destination: overrideDestination(sampleDestination, { advertiserSecretKey: '' }), + metadata: { + jobId: 1, + }, + }, + ], + destType, + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batched: false, + metadata: [{ jobId: 1 }], + statusCode: 400, + error: 'Advertiser Secret Key is not present. Aborting', + statTags: { + destType: destTypeInUpperCase, + implementation: 'cdkV2', + feature: 'router', + module: 'destination', + errorCategory: 'dataValidation', + errorType: 'configuration', + }, + }, + ], + }, + }, + }, + }, + { + name: destType, + description: 'TTL is out of range', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + message: { + type: 'record', + action: 'insert', + fields: { + DAID: 'test-daid-1', + UID2: 'test-uid2-1', + }, + channel: 'sources', + context: sampleContext, + recordId: '1', + }, + destination: overrideDestination(sampleDestination, { ttlInDays: 190 }), + metadata: { + jobId: 1, + }, + }, + ], + destType, + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batched: false, + metadata: [{ jobId: 1 }], + statusCode: 400, + error: 'TTL is out of range. Allowed values are 0 to 180 days', + statTags: { + destType: destTypeInUpperCase, + implementation: 'cdkV2', + feature: 'router', + module: 'destination', + errorCategory: 'dataValidation', + errorType: 'configuration', + }, + }, + ], + }, + }, + }, + }, +]; From 5fde548ef5856ae31c6aef130f9e41e88301fb28 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 5 Jan 2024 17:50:58 +0530 Subject: [PATCH 114/135] chore(deps): bump actions/setup-node from 4.0.0 to 4.0.1 (#2950) Bumps [actions/setup-node](https://github.com/actions/setup-node) from 4.0.0 to 4.0.1. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/v4.0.0...v4.0.1) --- updated-dependencies: - dependency-name: actions/setup-node dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/draft-new-release.yml | 2 +- .github/workflows/publish-new-release.yml | 2 +- .github/workflows/report-code-coverage.yml | 2 +- .github/workflows/test.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/draft-new-release.yml b/.github/workflows/draft-new-release.yml index edfd311f9c..33b0396705 100644 --- a/.github/workflows/draft-new-release.yml +++ b/.github/workflows/draft-new-release.yml @@ -16,7 +16,7 @@ jobs: fetch-depth: 0 - name: Setup Node - uses: actions/setup-node@v4.0.0 + uses: actions/setup-node@v4.0.1 with: node-version-file: '.nvmrc' cache: 'npm' diff --git a/.github/workflows/publish-new-release.yml b/.github/workflows/publish-new-release.yml index 7d0d4a7437..9d1558d826 100644 --- a/.github/workflows/publish-new-release.yml +++ b/.github/workflows/publish-new-release.yml @@ -30,7 +30,7 @@ jobs: fetch-depth: 0 - name: Setup Node - uses: actions/setup-node@v4.0.0 + uses: actions/setup-node@v4.0.1 with: node-version-file: '.nvmrc' cache: 'npm' diff --git a/.github/workflows/report-code-coverage.yml b/.github/workflows/report-code-coverage.yml index e6f72cbdb8..ea259924ae 100644 --- a/.github/workflows/report-code-coverage.yml +++ b/.github/workflows/report-code-coverage.yml @@ -20,7 +20,7 @@ jobs: fetch-depth: 1 - name: Setup Node - uses: actions/setup-node@v4.0.0 + uses: actions/setup-node@v4.0.1 with: node-version-file: '.nvmrc' cache: 'npm' diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 73e5a18ea4..71a6706f94 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,7 +18,7 @@ jobs: fetch-depth: 1 - name: Setup Node - uses: actions/setup-node@v4.0.0 + uses: actions/setup-node@v4.0.1 with: node-version-file: '.nvmrc' cache: 'npm' From 6eeedf0018b2860203372bdeedf21c3d0d75ad65 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 5 Jan 2024 17:52:07 +0530 Subject: [PATCH 115/135] chore(deps): bump SonarSource/sonarcloud-github-action from 2.0.0 to 2.1.1 (#2931) chore(deps): bump SonarSource/sonarcloud-github-action Bumps [SonarSource/sonarcloud-github-action](https://github.com/sonarsource/sonarcloud-github-action) from 2.0.0 to 2.1.1. - [Release notes](https://github.com/sonarsource/sonarcloud-github-action/releases) - [Commits](https://github.com/sonarsource/sonarcloud-github-action/compare/v2.0.0...v2.1.1) --- updated-dependencies: - dependency-name: SonarSource/sonarcloud-github-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/report-code-coverage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/report-code-coverage.yml b/.github/workflows/report-code-coverage.yml index ea259924ae..af6326ae88 100644 --- a/.github/workflows/report-code-coverage.yml +++ b/.github/workflows/report-code-coverage.yml @@ -57,7 +57,7 @@ jobs: - name: SonarCloud Scan if: always() - uses: SonarSource/sonarcloud-github-action@v2.0.0 + uses: SonarSource/sonarcloud-github-action@v2.1.1 env: GITHUB_TOKEN: ${{ secrets.PAT }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} From a79bfc0f78066269919b4efe559bde88b6b2f642 Mon Sep 17 00:00:00 2001 From: Sandeep Digumarty Date: Fri, 5 Jan 2024 19:06:34 +0530 Subject: [PATCH 116/135] chore: upgrade @aws-sdk/client-personalize from 3.414.0 to 3.470.0 (#2962) fix: upgrade @aws-sdk/client-personalize from 3.414.0 to 3.470.0 Snyk has created this PR to upgrade @aws-sdk/client-personalize from 3.414.0 to 3.470.0. See this package in npm: https://www.npmjs.com/package/@aws-sdk/client-personalize See this project in Snyk: https://app.snyk.io/org/sandeep-L8FvsjCG7mBBqonjSmN48c/project/4b0f037e-0dab-4719-aeee-b46d2ae82119?utm_source=github&utm_medium=referral&page=upgrade-pr Co-authored-by: snyk-bot --- package-lock.json | 809 ++++++++++++++++++++++++++++++++++------------ package.json | 2 +- 2 files changed, 611 insertions(+), 200 deletions(-) diff --git a/package-lock.json b/package-lock.json index d004b56151..9eb7d36361 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "ISC", "dependencies": { "@amplitude/ua-parser-js": "^0.7.24", - "@aws-sdk/client-personalize": "^3.391.0", + "@aws-sdk/client-personalize": "^3.470.0", "@aws-sdk/client-s3": "^3.438.0", "@aws-sdk/credential-providers": "^3.391.0", "@aws-sdk/lib-storage": "^3.391.0", @@ -370,45 +370,406 @@ } }, "node_modules/@aws-sdk/client-personalize": { - "version": "3.414.0", - "license": "Apache-2.0", + "version": "3.470.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-personalize/-/client-personalize-3.470.0.tgz", + "integrity": "sha512-2dHdTenWQCn+iXm9JCaFX4jAD39kV+IJy6haVaM9Z5zSesuSKwhLivV9cZMyjxUfpvx6YgXM1wjX27eSixnH5A==", "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/client-sts": "3.414.0", - "@aws-sdk/credential-provider-node": "3.414.0", - "@aws-sdk/middleware-host-header": "3.413.0", - "@aws-sdk/middleware-logger": "3.413.0", - "@aws-sdk/middleware-recursion-detection": "3.413.0", - "@aws-sdk/middleware-signing": "3.413.0", - "@aws-sdk/middleware-user-agent": "3.413.0", - "@aws-sdk/region-config-resolver": "3.413.0", - "@aws-sdk/types": "3.413.0", - "@aws-sdk/util-endpoints": "3.413.0", - "@aws-sdk/util-user-agent-browser": "3.413.0", - "@aws-sdk/util-user-agent-node": "3.413.0", - "@smithy/config-resolver": "^2.0.8", - "@smithy/fetch-http-handler": "^2.1.3", - "@smithy/hash-node": "^2.0.7", - "@smithy/invalid-dependency": "^2.0.7", - "@smithy/middleware-content-length": "^2.0.9", - "@smithy/middleware-endpoint": "^2.0.7", - "@smithy/middleware-retry": "^2.0.10", - "@smithy/middleware-serde": "^2.0.7", - "@smithy/middleware-stack": "^2.0.0", - "@smithy/node-config-provider": "^2.0.10", - "@smithy/node-http-handler": "^2.1.3", - "@smithy/protocol-http": "^3.0.3", - "@smithy/smithy-client": "^2.1.4", - "@smithy/types": "^2.3.1", - "@smithy/url-parser": "^2.0.7", - "@smithy/util-base64": "^2.0.0", - "@smithy/util-body-length-browser": "^2.0.0", + "@aws-sdk/client-sts": "3.470.0", + "@aws-sdk/core": "3.468.0", + "@aws-sdk/credential-provider-node": "3.470.0", + "@aws-sdk/middleware-host-header": "3.468.0", + "@aws-sdk/middleware-logger": "3.468.0", + "@aws-sdk/middleware-recursion-detection": "3.468.0", + "@aws-sdk/middleware-signing": "3.468.0", + "@aws-sdk/middleware-user-agent": "3.470.0", + "@aws-sdk/region-config-resolver": "3.470.0", + "@aws-sdk/types": "3.468.0", + "@aws-sdk/util-endpoints": "3.470.0", + "@aws-sdk/util-user-agent-browser": "3.468.0", + "@aws-sdk/util-user-agent-node": "3.470.0", + "@smithy/config-resolver": "^2.0.21", + "@smithy/fetch-http-handler": "^2.3.1", + "@smithy/hash-node": "^2.0.17", + "@smithy/invalid-dependency": "^2.0.15", + "@smithy/middleware-content-length": "^2.0.17", + "@smithy/middleware-endpoint": "^2.2.3", + "@smithy/middleware-retry": "^2.0.24", + "@smithy/middleware-serde": "^2.0.15", + "@smithy/middleware-stack": "^2.0.9", + "@smithy/node-config-provider": "^2.1.8", + "@smithy/node-http-handler": "^2.2.1", + "@smithy/protocol-http": "^3.0.11", + "@smithy/smithy-client": "^2.1.18", + "@smithy/types": "^2.7.0", + "@smithy/url-parser": "^2.0.15", + "@smithy/util-base64": "^2.0.1", + "@smithy/util-body-length-browser": "^2.0.1", "@smithy/util-body-length-node": "^2.1.0", - "@smithy/util-defaults-mode-browser": "^2.0.8", - "@smithy/util-defaults-mode-node": "^2.0.10", - "@smithy/util-retry": "^2.0.0", - "@smithy/util-utf8": "^2.0.0", + "@smithy/util-defaults-mode-browser": "^2.0.22", + "@smithy/util-defaults-mode-node": "^2.0.29", + "@smithy/util-endpoints": "^1.0.7", + "@smithy/util-retry": "^2.0.8", + "@smithy/util-utf8": "^2.0.2", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-personalize/node_modules/@aws-sdk/client-sso": { + "version": "3.470.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.470.0.tgz", + "integrity": "sha512-iMXqdXuypE3OK0rggbvSz7vBGlLDG418dNidHhdaeLluMTG/GfHbh1fLOlavhYxRwrsPrtYvFiVkxXFGzXva4w==", + "dependencies": { + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/core": "3.468.0", + "@aws-sdk/middleware-host-header": "3.468.0", + "@aws-sdk/middleware-logger": "3.468.0", + "@aws-sdk/middleware-recursion-detection": "3.468.0", + "@aws-sdk/middleware-user-agent": "3.470.0", + "@aws-sdk/region-config-resolver": "3.470.0", + "@aws-sdk/types": "3.468.0", + "@aws-sdk/util-endpoints": "3.470.0", + "@aws-sdk/util-user-agent-browser": "3.468.0", + "@aws-sdk/util-user-agent-node": "3.470.0", + "@smithy/config-resolver": "^2.0.21", + "@smithy/fetch-http-handler": "^2.3.1", + "@smithy/hash-node": "^2.0.17", + "@smithy/invalid-dependency": "^2.0.15", + "@smithy/middleware-content-length": "^2.0.17", + "@smithy/middleware-endpoint": "^2.2.3", + "@smithy/middleware-retry": "^2.0.24", + "@smithy/middleware-serde": "^2.0.15", + "@smithy/middleware-stack": "^2.0.9", + "@smithy/node-config-provider": "^2.1.8", + "@smithy/node-http-handler": "^2.2.1", + "@smithy/protocol-http": "^3.0.11", + "@smithy/smithy-client": "^2.1.18", + "@smithy/types": "^2.7.0", + "@smithy/url-parser": "^2.0.15", + "@smithy/util-base64": "^2.0.1", + "@smithy/util-body-length-browser": "^2.0.1", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.22", + "@smithy/util-defaults-mode-node": "^2.0.29", + "@smithy/util-endpoints": "^1.0.7", + "@smithy/util-retry": "^2.0.8", + "@smithy/util-utf8": "^2.0.2", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-personalize/node_modules/@aws-sdk/client-sts": { + "version": "3.470.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.470.0.tgz", + "integrity": "sha512-TP3A4t8FoFEQinm6axxduTUnlMMLpmLi4Sf00JTI2CszxLUFh/JyUhYQ5gSOoXgPFmfwVXUNKCtmR3jdP0ZGPw==", + "dependencies": { + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/core": "3.468.0", + "@aws-sdk/credential-provider-node": "3.470.0", + "@aws-sdk/middleware-host-header": "3.468.0", + "@aws-sdk/middleware-logger": "3.468.0", + "@aws-sdk/middleware-recursion-detection": "3.468.0", + "@aws-sdk/middleware-sdk-sts": "3.468.0", + "@aws-sdk/middleware-signing": "3.468.0", + "@aws-sdk/middleware-user-agent": "3.470.0", + "@aws-sdk/region-config-resolver": "3.470.0", + "@aws-sdk/types": "3.468.0", + "@aws-sdk/util-endpoints": "3.470.0", + "@aws-sdk/util-user-agent-browser": "3.468.0", + "@aws-sdk/util-user-agent-node": "3.470.0", + "@smithy/config-resolver": "^2.0.21", + "@smithy/fetch-http-handler": "^2.3.1", + "@smithy/hash-node": "^2.0.17", + "@smithy/invalid-dependency": "^2.0.15", + "@smithy/middleware-content-length": "^2.0.17", + "@smithy/middleware-endpoint": "^2.2.3", + "@smithy/middleware-retry": "^2.0.24", + "@smithy/middleware-serde": "^2.0.15", + "@smithy/middleware-stack": "^2.0.9", + "@smithy/node-config-provider": "^2.1.8", + "@smithy/node-http-handler": "^2.2.1", + "@smithy/protocol-http": "^3.0.11", + "@smithy/smithy-client": "^2.1.18", + "@smithy/types": "^2.7.0", + "@smithy/url-parser": "^2.0.15", + "@smithy/util-base64": "^2.0.1", + "@smithy/util-body-length-browser": "^2.0.1", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.22", + "@smithy/util-defaults-mode-node": "^2.0.29", + "@smithy/util-endpoints": "^1.0.7", + "@smithy/util-retry": "^2.0.8", + "@smithy/util-utf8": "^2.0.2", + "fast-xml-parser": "4.2.5", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-personalize/node_modules/@aws-sdk/core": { + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.468.0.tgz", + "integrity": "sha512-ezUJR9VvknKoXzNZ4wvzGi1jdkmm+/1dUYQ9Sw4r8bzlJDTsUnWbyvaDlBQh81RuhLtVkaUfTnQKoec0cwlZKQ==", + "dependencies": { + "@smithy/smithy-client": "^2.1.18", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-personalize/node_modules/@aws-sdk/credential-provider-env": { + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.468.0.tgz", + "integrity": "sha512-k/1WHd3KZn0EQYjadooj53FC0z24/e4dUZhbSKTULgmxyO62pwh9v3Brvw4WRa/8o2wTffU/jo54tf4vGuP/ZA==", + "dependencies": { + "@aws-sdk/types": "3.468.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-personalize/node_modules/@aws-sdk/credential-provider-ini": { + "version": "3.470.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.470.0.tgz", + "integrity": "sha512-eF22iPO6J2jY+LbuTv5dW0hZBmi6ksRDFFd/zT6TLasrzH2Ex+gAfN3c7rFHF+XAubL0JXFUKFA3UAwoZpO9Zg==", + "dependencies": { + "@aws-sdk/credential-provider-env": "3.468.0", + "@aws-sdk/credential-provider-process": "3.468.0", + "@aws-sdk/credential-provider-sso": "3.470.0", + "@aws-sdk/credential-provider-web-identity": "3.468.0", + "@aws-sdk/types": "3.468.0", + "@smithy/credential-provider-imds": "^2.0.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-personalize/node_modules/@aws-sdk/credential-provider-node": { + "version": "3.470.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.470.0.tgz", + "integrity": "sha512-paySXwzGxBVU+2cVUkRIXafKhYhtO2fJJ3MotR6euvRONK/dta+bhEc5Z4QnTo/gNLoELK/QUC0EGoF+oPfk8g==", + "dependencies": { + "@aws-sdk/credential-provider-env": "3.468.0", + "@aws-sdk/credential-provider-ini": "3.470.0", + "@aws-sdk/credential-provider-process": "3.468.0", + "@aws-sdk/credential-provider-sso": "3.470.0", + "@aws-sdk/credential-provider-web-identity": "3.468.0", + "@aws-sdk/types": "3.468.0", + "@smithy/credential-provider-imds": "^2.0.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-personalize/node_modules/@aws-sdk/credential-provider-process": { + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.468.0.tgz", + "integrity": "sha512-OYSn1A/UsyPJ7Z8Q2cNhTf55O36shPmSsvOfND04nSfu1nPaR+VUvvsP7v+brhGpwC/GAKTIdGAo4blH31BS6A==", + "dependencies": { + "@aws-sdk/types": "3.468.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-personalize/node_modules/@aws-sdk/credential-provider-sso": { + "version": "3.470.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.470.0.tgz", + "integrity": "sha512-biGDSh9S9KDR9Tl/8cCPn9g5KPNkXg/CIJIOk3X+6valktbJ2UVYBzi0ZX4vZiudt5ry/Hsu6Pgo+KN1AmBWdg==", + "dependencies": { + "@aws-sdk/client-sso": "3.470.0", + "@aws-sdk/token-providers": "3.470.0", + "@aws-sdk/types": "3.468.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-personalize/node_modules/@aws-sdk/credential-provider-web-identity": { + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.468.0.tgz", + "integrity": "sha512-rexymPmXjtkwCPfhnUq3EjO1rSkf39R4Jz9CqiM7OsqK2qlT5Y/V3gnMKn0ZMXsYaQOMfM3cT5xly5R+OKDHlw==", + "dependencies": { + "@aws-sdk/types": "3.468.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-personalize/node_modules/@aws-sdk/middleware-host-header": { + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.468.0.tgz", + "integrity": "sha512-gwQ+/QhX+lhof304r6zbZ/V5l5cjhGRxLL3CjH1uJPMcOAbw9wUlMdl+ibr8UwBZ5elfKFGiB1cdW/0uMchw0w==", + "dependencies": { + "@aws-sdk/types": "3.468.0", + "@smithy/protocol-http": "^3.0.11", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-personalize/node_modules/@aws-sdk/middleware-logger": { + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.468.0.tgz", + "integrity": "sha512-X5XHKV7DHRXI3f29SAhJPe/OxWRFgDWDMMCALfzhmJfCi6Jfh0M14cJKoC+nl+dk9lB+36+jKjhjETZaL2bPlA==", + "dependencies": { + "@aws-sdk/types": "3.468.0", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-personalize/node_modules/@aws-sdk/middleware-recursion-detection": { + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.468.0.tgz", + "integrity": "sha512-vch9IQib2Ng9ucSyRW2eKNQXHUPb5jUPCLA5otTW/8nGjcOU37LxQG4WrxO7uaJ9Oe8hjHO+hViE3P0KISUhtA==", + "dependencies": { + "@aws-sdk/types": "3.468.0", + "@smithy/protocol-http": "^3.0.11", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-personalize/node_modules/@aws-sdk/middleware-sdk-sts": { + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-sdk-sts/-/middleware-sdk-sts-3.468.0.tgz", + "integrity": "sha512-xRy8NKfHbmafHwdbotdWgHBvRs0YZgk20GrhFJKp43bkqVbJ5bNlh3nQXf1DeFY9fARR84Bfotya4fwCUHWgZg==", + "dependencies": { + "@aws-sdk/middleware-signing": "3.468.0", + "@aws-sdk/types": "3.468.0", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-personalize/node_modules/@aws-sdk/middleware-signing": { + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-signing/-/middleware-signing-3.468.0.tgz", + "integrity": "sha512-s+7fSB1gdnnTj5O0aCCarX3z5Vppop8kazbNSZADdkfHIDWCN80IH4ZNjY3OWqaAz0HmR4LNNrovdR304ojb4Q==", + "dependencies": { + "@aws-sdk/types": "3.468.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/protocol-http": "^3.0.11", + "@smithy/signature-v4": "^2.0.0", + "@smithy/types": "^2.7.0", + "@smithy/util-middleware": "^2.0.8", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-personalize/node_modules/@aws-sdk/middleware-user-agent": { + "version": "3.470.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.470.0.tgz", + "integrity": "sha512-s0YRGgf4fT5KwwTefpoNUQfB5JghzXyvmPfY1QuFEMeVQNxv0OPuydzo3rY2oXPkZjkulKDtpm5jzIHwut75hA==", + "dependencies": { + "@aws-sdk/types": "3.468.0", + "@aws-sdk/util-endpoints": "3.470.0", + "@smithy/protocol-http": "^3.0.11", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-personalize/node_modules/@aws-sdk/region-config-resolver": { + "version": "3.470.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.470.0.tgz", + "integrity": "sha512-C1o1J06iIw8cyAAOvHqT4Bbqf+PgQ/RDlSyjt2gFfP2OovDpc2o2S90dE8f8iZdSGpg70N5MikT1DBhW9NbhtQ==", + "dependencies": { + "@smithy/node-config-provider": "^2.1.8", + "@smithy/types": "^2.7.0", + "@smithy/util-config-provider": "^2.0.0", + "@smithy/util-middleware": "^2.0.8", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-personalize/node_modules/@aws-sdk/token-providers": { + "version": "3.470.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.470.0.tgz", + "integrity": "sha512-rzxnJxEUJiV69Cxsf0AHXTqJqTACITwcSH/PL4lWP4uvtzdrzSi3KA3u2aWHWpOcdE6+JFvdICscsbBSo3/TOg==", + "dependencies": { + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/middleware-host-header": "3.468.0", + "@aws-sdk/middleware-logger": "3.468.0", + "@aws-sdk/middleware-recursion-detection": "3.468.0", + "@aws-sdk/middleware-user-agent": "3.470.0", + "@aws-sdk/region-config-resolver": "3.470.0", + "@aws-sdk/types": "3.468.0", + "@aws-sdk/util-endpoints": "3.470.0", + "@aws-sdk/util-user-agent-browser": "3.468.0", + "@aws-sdk/util-user-agent-node": "3.470.0", + "@smithy/config-resolver": "^2.0.21", + "@smithy/fetch-http-handler": "^2.3.1", + "@smithy/hash-node": "^2.0.17", + "@smithy/invalid-dependency": "^2.0.15", + "@smithy/middleware-content-length": "^2.0.17", + "@smithy/middleware-endpoint": "^2.2.3", + "@smithy/middleware-retry": "^2.0.24", + "@smithy/middleware-serde": "^2.0.15", + "@smithy/middleware-stack": "^2.0.9", + "@smithy/node-config-provider": "^2.1.8", + "@smithy/node-http-handler": "^2.2.1", + "@smithy/property-provider": "^2.0.0", + "@smithy/protocol-http": "^3.0.11", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/smithy-client": "^2.1.18", + "@smithy/types": "^2.7.0", + "@smithy/url-parser": "^2.0.15", + "@smithy/util-base64": "^2.0.1", + "@smithy/util-body-length-browser": "^2.0.1", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.22", + "@smithy/util-defaults-mode-node": "^2.0.29", + "@smithy/util-endpoints": "^1.0.7", + "@smithy/util-retry": "^2.0.8", + "@smithy/util-utf8": "^2.0.2", "tslib": "^2.5.0" }, "engines": { @@ -416,16 +777,63 @@ } }, "node_modules/@aws-sdk/client-personalize/node_modules/@aws-sdk/types": { - "version": "3.413.0", - "license": "Apache-2.0", + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.468.0.tgz", + "integrity": "sha512-rx/9uHI4inRbp2tw3Y4Ih4PNZkVj32h7WneSg3MVgVjAoVD5Zti9KhS5hkvsBxfgmQmg0AQbE+b1sy5WGAgntA==", "dependencies": { - "@smithy/types": "^2.3.1", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, + "node_modules/@aws-sdk/client-personalize/node_modules/@aws-sdk/util-endpoints": { + "version": "3.470.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.470.0.tgz", + "integrity": "sha512-6N6VvPCmu+89p5Ez/+gLf+X620iQ9JpIs8p8ECZiCodirzFOe8NC1O2S7eov7YiG9IHSuodqn/0qNq+v+oLe0A==", + "dependencies": { + "@aws-sdk/types": "3.468.0", + "@smithy/util-endpoints": "^1.0.7", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-personalize/node_modules/@aws-sdk/util-user-agent-browser": { + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.468.0.tgz", + "integrity": "sha512-OJyhWWsDEizR3L+dCgMXSUmaCywkiZ7HSbnQytbeKGwokIhD69HTiJcibF/sgcM5gk4k3Mq3puUhGnEZ46GIig==", + "dependencies": { + "@aws-sdk/types": "3.468.0", + "@smithy/types": "^2.7.0", + "bowser": "^2.11.0", + "tslib": "^2.5.0" + } + }, + "node_modules/@aws-sdk/client-personalize/node_modules/@aws-sdk/util-user-agent-node": { + "version": "3.470.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.470.0.tgz", + "integrity": "sha512-QxsZ9iVHcBB/XRdYvwfM5AMvNp58HfqkIrH88mY0cmxuvtlIGDfWjczdDrZMJk9y0vIq+cuoCHsGXHu7PyiEAQ==", + "dependencies": { + "@aws-sdk/types": "3.468.0", + "@smithy/node-config-provider": "^2.1.8", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "aws-crt": ">=1.0.0" + }, + "peerDependenciesMeta": { + "aws-crt": { + "optional": true + } + } + }, "node_modules/@aws-sdk/client-s3": { "version": "3.438.0", "resolved": "https://registry.npmjs.org/@aws-sdk/client-s3/-/client-s3-3.438.0.tgz", @@ -3755,11 +4163,11 @@ } }, "node_modules/@smithy/abort-controller": { - "version": "2.0.13", - "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-2.0.13.tgz", - "integrity": "sha512-eeOPD+GF9BzF/Mjy3PICLePx4l0f3rG/nQegQHRLTloN5p1lSJJNZsyn+FzDnW8P2AduragZqJdtKNCxXozB1Q==", + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-2.0.15.tgz", + "integrity": "sha512-JkS36PIS3/UCbq/MaozzV7jECeL+BTt4R75bwY8i+4RASys4xOyUS1HsRyUNSqUXFP4QyCz5aNnh3ltuaxv+pw==", "dependencies": { - "@smithy/types": "^2.5.0", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { @@ -3784,14 +4192,14 @@ } }, "node_modules/@smithy/config-resolver": { - "version": "2.0.18", - "resolved": "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-2.0.18.tgz", - "integrity": "sha512-761sJSgNbvsqcsKW6/WZbrZr4H+0Vp/QKKqwyrxCPwD8BsiPEXNHyYnqNgaeK9xRWYswjon0Uxbpe3DWQo0j/g==", - "dependencies": { - "@smithy/node-config-provider": "^2.1.5", - "@smithy/types": "^2.5.0", - "@smithy/util-config-provider": "^2.0.0", - "@smithy/util-middleware": "^2.0.6", + "version": "2.0.22", + "resolved": "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-2.0.22.tgz", + "integrity": "sha512-YuPjsLnq6I5ZQBTx6BL5NsCLtcLel5YIMf3gDeEa+GSCXn5mgRXm+8XO8HtjR3Xf69b88aY4c7bwKQQS2i8vtA==", + "dependencies": { + "@smithy/node-config-provider": "^2.1.8", + "@smithy/types": "^2.7.0", + "@smithy/util-config-provider": "^2.1.0", + "@smithy/util-middleware": "^2.0.8", "tslib": "^2.5.0" }, "engines": { @@ -3799,14 +4207,14 @@ } }, "node_modules/@smithy/credential-provider-imds": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-2.1.1.tgz", - "integrity": "sha512-gw5G3FjWC6sNz8zpOJgPpH5HGKrpoVFQpToNAwLwJVyI/LJ2jDJRjSKEsM6XI25aRpYjMSE/Qptxx305gN1vHw==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-2.1.4.tgz", + "integrity": "sha512-cwPJN1fa1YOQzhBlTXRavABEYRRchci1X79QRwzaNLySnIMJfztyv1Zkst0iZPLMnpn8+CnHu3wOHS11J5Dr3A==", "dependencies": { - "@smithy/node-config-provider": "^2.1.5", - "@smithy/property-provider": "^2.0.14", - "@smithy/types": "^2.5.0", - "@smithy/url-parser": "^2.0.13", + "@smithy/node-config-provider": "^2.1.8", + "@smithy/property-provider": "^2.0.16", + "@smithy/types": "^2.7.0", + "@smithy/url-parser": "^2.0.15", "tslib": "^2.5.0" }, "engines": { @@ -3876,13 +4284,13 @@ } }, "node_modules/@smithy/fetch-http-handler": { - "version": "2.2.6", - "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-2.2.6.tgz", - "integrity": "sha512-PStY3XO1Ksjwn3wMKye5U6m6zxXpXrXZYqLy/IeCbh3nM9QB3Jgw/B0PUSLUWKdXg4U8qgEu300e3ZoBvZLsDg==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-2.3.1.tgz", + "integrity": "sha512-6MNk16fqb8EwcYY8O8WxB3ArFkLZ2XppsSNo1h7SQcFdDDwIumiJeO6wRzm7iB68xvsOQzsdQKbdtTieS3hfSQ==", "dependencies": { - "@smithy/protocol-http": "^3.0.9", - "@smithy/querystring-builder": "^2.0.13", - "@smithy/types": "^2.5.0", + "@smithy/protocol-http": "^3.0.11", + "@smithy/querystring-builder": "^2.0.15", + "@smithy/types": "^2.7.0", "@smithy/util-base64": "^2.0.1", "tslib": "^2.5.0" } @@ -3899,11 +4307,11 @@ } }, "node_modules/@smithy/hash-node": { - "version": "2.0.15", - "resolved": "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-2.0.15.tgz", - "integrity": "sha512-t/qjEJZu/G46A22PAk1k/IiJZT4ncRkG5GOCNWN9HPPy5rCcSZUbh7gwp7CGKgJJ7ATMMg+0Td7i9o1lQTwOfQ==", + "version": "2.0.17", + "resolved": "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-2.0.17.tgz", + "integrity": "sha512-Il6WuBcI1nD+e2DM7tTADMf01wEPGK8PAhz4D+YmDUVaoBqlA+CaH2uDJhiySifmuKBZj748IfygXty81znKhw==", "dependencies": { - "@smithy/types": "^2.5.0", + "@smithy/types": "^2.7.0", "@smithy/util-buffer-from": "^2.0.0", "@smithy/util-utf8": "^2.0.2", "tslib": "^2.5.0" @@ -3926,11 +4334,11 @@ } }, "node_modules/@smithy/invalid-dependency": { - "version": "2.0.13", - "resolved": "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-2.0.13.tgz", - "integrity": "sha512-XsGYhVhvEikX1Yz0kyIoLssJf2Rs6E0U2w2YuKdT4jSra5A/g8V2oLROC1s56NldbgnpesTYB2z55KCHHbKyjw==", + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-2.0.15.tgz", + "integrity": "sha512-dlEKBFFwVfzA5QroHlBS94NpgYjXhwN/bFfun+7w3rgxNvVy79SK0w05iGc7UAeC5t+D7gBxrzdnD6hreZnDVQ==", "dependencies": { - "@smithy/types": "^2.5.0", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" } }, @@ -3956,12 +4364,12 @@ } }, "node_modules/@smithy/middleware-content-length": { - "version": "2.0.15", - "resolved": "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-2.0.15.tgz", - "integrity": "sha512-xH4kRBw01gJgWiU+/mNTrnyFXeozpZHw39gLb3JKGsFDVmSrJZ8/tRqu27tU/ki1gKkxr2wApu+dEYjI3QwV1Q==", + "version": "2.0.17", + "resolved": "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-2.0.17.tgz", + "integrity": "sha512-OyadvMcKC7lFXTNBa8/foEv7jOaqshQZkjWS9coEXPRZnNnihU/Ls+8ZuJwGNCOrN2WxXZFmDWhegbnM4vak8w==", "dependencies": { - "@smithy/protocol-http": "^3.0.9", - "@smithy/types": "^2.5.0", + "@smithy/protocol-http": "^3.0.11", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { @@ -3969,16 +4377,16 @@ } }, "node_modules/@smithy/middleware-endpoint": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-2.2.0.tgz", - "integrity": "sha512-tddRmaig5URk2106PVMiNX6mc5BnKIKajHHDxb7K0J5MLdcuQluHMGnjkv18iY9s9O0tF+gAcPd/pDXA5L9DZw==", - "dependencies": { - "@smithy/middleware-serde": "^2.0.13", - "@smithy/node-config-provider": "^2.1.5", - "@smithy/shared-ini-file-loader": "^2.2.4", - "@smithy/types": "^2.5.0", - "@smithy/url-parser": "^2.0.13", - "@smithy/util-middleware": "^2.0.6", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-2.2.3.tgz", + "integrity": "sha512-nYfxuq0S/xoAjdLbyn1ixeVB6cyH9wYCMtbbOCpcCRYR5u2mMtqUtVjjPAZ/DIdlK3qe0tpB0Q76szFGNuz+kQ==", + "dependencies": { + "@smithy/middleware-serde": "^2.0.15", + "@smithy/node-config-provider": "^2.1.8", + "@smithy/shared-ini-file-loader": "^2.2.7", + "@smithy/types": "^2.7.0", + "@smithy/url-parser": "^2.0.15", + "@smithy/util-middleware": "^2.0.8", "tslib": "^2.5.0" }, "engines": { @@ -3986,16 +4394,17 @@ } }, "node_modules/@smithy/middleware-retry": { - "version": "2.0.20", - "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-2.0.20.tgz", - "integrity": "sha512-X2yrF/SHDk2WDd8LflRNS955rlzQ9daz9UWSp15wW8KtzoTXg3bhHM78HbK1cjr48/FWERSJKh9AvRUUGlIawg==", - "dependencies": { - "@smithy/node-config-provider": "^2.1.5", - "@smithy/protocol-http": "^3.0.9", - "@smithy/service-error-classification": "^2.0.6", - "@smithy/types": "^2.5.0", - "@smithy/util-middleware": "^2.0.6", - "@smithy/util-retry": "^2.0.6", + "version": "2.0.25", + "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-2.0.25.tgz", + "integrity": "sha512-FXhafCPvx/9L9OgHJ3cdo/pD1f7ngC7DKsjDV2J7k6LO/Yl69POoBLk4sI1OZPUGc4dfxriENlTma9Nj1hI+IQ==", + "dependencies": { + "@smithy/node-config-provider": "^2.1.8", + "@smithy/protocol-http": "^3.0.11", + "@smithy/service-error-classification": "^2.0.8", + "@smithy/smithy-client": "^2.2.0", + "@smithy/types": "^2.7.0", + "@smithy/util-middleware": "^2.0.8", + "@smithy/util-retry": "^2.0.8", "tslib": "^2.5.0", "uuid": "^8.3.2" }, @@ -4012,11 +4421,11 @@ } }, "node_modules/@smithy/middleware-serde": { - "version": "2.0.13", - "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-2.0.13.tgz", - "integrity": "sha512-tBGbeXw+XsE6pPr4UaXOh+UIcXARZeiA8bKJWxk2IjJcD1icVLhBSUQH9myCIZLNNzJIH36SDjUX8Wqk4xJCJg==", + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-2.0.15.tgz", + "integrity": "sha512-FOZRFk/zN4AT4wzGuBY+39XWe+ZnCFd0gZtyw3f9Okn2CJPixl9GyWe98TIaljeZdqWkgrzGyPre20AcW2UMHQ==", "dependencies": { - "@smithy/types": "^2.5.0", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { @@ -4024,11 +4433,11 @@ } }, "node_modules/@smithy/middleware-stack": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-2.0.7.tgz", - "integrity": "sha512-L1KLAAWkXbGx1t2jjCI/mDJ2dDNq+rp4/ifr/HcC6FHngxho5O7A5bQLpKHGlkfATH6fUnOEx0VICEVFA4sUzw==", + "version": "2.0.9", + "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-2.0.9.tgz", + "integrity": "sha512-bCB5dUtGQ5wh7QNL2ELxmDc6g7ih7jWU3Kx6MYH1h4mZbv9xL3WyhKHojRltThCB1arLPyTUFDi+x6fB/oabtA==", "dependencies": { - "@smithy/types": "^2.5.0", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { @@ -4036,13 +4445,13 @@ } }, "node_modules/@smithy/node-config-provider": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-2.1.5.tgz", - "integrity": "sha512-3Omb5/h4tOCuKRx4p4pkYTvEYRCYoKk52bOYbKUyz/G/8gERbagsN8jFm4FjQubkrcIqQEghTpQaUw6uk+0edw==", + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-2.1.8.tgz", + "integrity": "sha512-+w26OKakaBUGp+UG+dxYZtFb5fs3tgHg3/QrRrmUZj+rl3cIuw840vFUXX35cVPTUCQIiTqmz7CpVF7+hdINdQ==", "dependencies": { - "@smithy/property-provider": "^2.0.14", - "@smithy/shared-ini-file-loader": "^2.2.4", - "@smithy/types": "^2.5.0", + "@smithy/property-provider": "^2.0.16", + "@smithy/shared-ini-file-loader": "^2.2.7", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { @@ -4050,14 +4459,14 @@ } }, "node_modules/@smithy/node-http-handler": { - "version": "2.1.9", - "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-2.1.9.tgz", - "integrity": "sha512-+K0q3SlNcocmo9OZj+fz67gY4lwhOCvIJxVbo/xH+hfWObvaxrMTx7JEzzXcluK0thnnLz++K3Qe7Z/8MDUreA==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-2.2.1.tgz", + "integrity": "sha512-8iAKQrC8+VFHPAT8pg4/j6hlsTQh+NKOWlctJBrYtQa4ExcxX7aSg3vdQ2XLoYwJotFUurg/NLqFCmZaPRrogw==", "dependencies": { - "@smithy/abort-controller": "^2.0.13", - "@smithy/protocol-http": "^3.0.9", - "@smithy/querystring-builder": "^2.0.13", - "@smithy/types": "^2.5.0", + "@smithy/abort-controller": "^2.0.15", + "@smithy/protocol-http": "^3.0.11", + "@smithy/querystring-builder": "^2.0.15", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { @@ -4065,11 +4474,11 @@ } }, "node_modules/@smithy/property-provider": { - "version": "2.0.14", - "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-2.0.14.tgz", - "integrity": "sha512-k3D2qp9o6imTrLaXRj6GdLYEJr1sXqS99nLhzq8fYmJjSVOeMg/G+1KVAAc7Oxpu71rlZ2f8SSZxcSxkevuR0A==", + "version": "2.0.16", + "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-2.0.16.tgz", + "integrity": "sha512-28Ky0LlOqtEjwg5CdHmwwaDRHcTWfPRzkT6HrhwOSRS2RryAvuDfJrZpM+BMcrdeCyEg1mbcgIMoqTla+rdL8Q==", "dependencies": { - "@smithy/types": "^2.5.0", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { @@ -4077,11 +4486,11 @@ } }, "node_modules/@smithy/protocol-http": { - "version": "3.0.9", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-3.0.9.tgz", - "integrity": "sha512-U1wl+FhYu4/BC+rjwh1lg2gcJChQhytiNQSggREgQ9G2FzmoK9sACBZvx7thyWMvRyHQTE22mO2d5UM8gMKDBg==", + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-3.0.11.tgz", + "integrity": "sha512-3ziB8fHuXIRamV/akp/sqiWmNPR6X+9SB8Xxnozzj+Nq7hSpyKdFHd1FLpBkgfGFUTzzcBJQlDZPSyxzmdcx5A==", "dependencies": { - "@smithy/types": "^2.5.0", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { @@ -4089,11 +4498,11 @@ } }, "node_modules/@smithy/querystring-builder": { - "version": "2.0.13", - "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-2.0.13.tgz", - "integrity": "sha512-JhXKwp3JtsFUe96XLHy/nUPEbaXqn6r7xE4sNaH8bxEyytE5q1fwt0ew/Ke6+vIC7gP87HCHgQpJHg1X1jN2Fw==", + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-2.0.15.tgz", + "integrity": "sha512-e1q85aT6HutvouOdN+dMsN0jcdshp50PSCvxDvo6aIM57LqeXimjfONUEgfqQ4IFpYWAtVixptyIRE5frMp/2A==", "dependencies": { - "@smithy/types": "^2.5.0", + "@smithy/types": "^2.7.0", "@smithy/util-uri-escape": "^2.0.0", "tslib": "^2.5.0" }, @@ -4102,11 +4511,11 @@ } }, "node_modules/@smithy/querystring-parser": { - "version": "2.0.13", - "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-2.0.13.tgz", - "integrity": "sha512-TEiT6o8CPZVxJ44Rly/rrsATTQsE+b/nyBVzsYn2sa75xAaZcurNxsFd8z1haoUysONiyex24JMHoJY6iCfLdA==", + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-2.0.15.tgz", + "integrity": "sha512-jbBvoK3cc81Cj1c1TH1qMYxNQKHrYQ2DoTntN9FBbtUWcGhc+T4FP6kCKYwRLXyU4AajwGIZstvNAmIEgUUNTQ==", "dependencies": { - "@smithy/types": "^2.5.0", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { @@ -4114,22 +4523,22 @@ } }, "node_modules/@smithy/service-error-classification": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-2.0.6.tgz", - "integrity": "sha512-fCQ36frtYra2fqY2/DV8+3/z2d0VB/1D1hXbjRcM5wkxTToxq6xHbIY/NGGY6v4carskMyG8FHACxgxturJ9Pg==", + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-2.0.8.tgz", + "integrity": "sha512-jCw9+005im8tsfYvwwSc4TTvd29kXRFkH9peQBg5R/4DD03ieGm6v6Hpv9nIAh98GwgYg1KrztcINC1s4o7/hg==", "dependencies": { - "@smithy/types": "^2.5.0" + "@smithy/types": "^2.7.0" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@smithy/shared-ini-file-loader": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-2.2.4.tgz", - "integrity": "sha512-9dRknGgvYlRIsoTcmMJXuoR/3ekhGwhRq4un3ns2/byre4Ql5hyUN4iS0x8eITohjU90YOnUCsbRwZRvCkbRfw==", + "version": "2.2.7", + "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-2.2.7.tgz", + "integrity": "sha512-0Qt5CuiogIuvQIfK+be7oVHcPsayLgfLJGkPlbgdbl0lD28nUKu4p11L+UG3SAEsqc9UsazO+nErPXw7+IgDpQ==", "dependencies": { - "@smithy/types": "^2.5.0", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { @@ -4155,13 +4564,15 @@ } }, "node_modules/@smithy/smithy-client": { - "version": "2.1.15", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-2.1.15.tgz", - "integrity": "sha512-rngZcQu7Jvs9UbHihK1EI67RMPuzkc3CJmu4MBgB7D7yBnMGuFR86tq5rqHfL2gAkNnMelBN/8kzQVvZjNKefQ==", - "dependencies": { - "@smithy/middleware-stack": "^2.0.7", - "@smithy/types": "^2.5.0", - "@smithy/util-stream": "^2.0.20", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-2.2.0.tgz", + "integrity": "sha512-C/bkNue5H5Obgl83SnlBt4v6VM68CqIjIELh3vAabud87xFYznLNKtj6Qb69Z+QOnLp9T+We++sEem/f2AHE+Q==", + "dependencies": { + "@smithy/middleware-endpoint": "^2.2.3", + "@smithy/middleware-stack": "^2.0.9", + "@smithy/protocol-http": "^3.0.11", + "@smithy/types": "^2.7.0", + "@smithy/util-stream": "^2.0.23", "tslib": "^2.5.0" }, "engines": { @@ -4169,9 +4580,9 @@ } }, "node_modules/@smithy/types": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.5.0.tgz", - "integrity": "sha512-/a31lYofrMBkJb3BuPlYJTMKDj0hUmKUP6JFZQu6YVuQVoAjubiY0A52U9S0Uysd33n/djexCUSNJ+G9bf3/aA==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.7.0.tgz", + "integrity": "sha512-1OIFyhK+vOkMbu4aN2HZz/MomREkrAC/HqY5mlJMUJfGrPRwijJDTeiN8Rnj9zUaB8ogXAfIOtZrrgqZ4w7Wnw==", "dependencies": { "tslib": "^2.5.0" }, @@ -4180,12 +4591,12 @@ } }, "node_modules/@smithy/url-parser": { - "version": "2.0.13", - "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-2.0.13.tgz", - "integrity": "sha512-okWx2P/d9jcTsZWTVNnRMpFOE7fMkzloSFyM53fA7nLKJQObxM2T4JlZ5KitKKuXq7pxon9J6SF2kCwtdflIrA==", + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-2.0.15.tgz", + "integrity": "sha512-sADUncUj9rNbOTrdDGm4EXlUs0eQ9dyEo+V74PJoULY4jSQxS+9gwEgsPYyiu8PUOv16JC/MpHonOgqP/IEDZA==", "dependencies": { - "@smithy/querystring-parser": "^2.0.13", - "@smithy/types": "^2.5.0", + "@smithy/querystring-parser": "^2.0.15", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" } }, @@ -4202,9 +4613,9 @@ } }, "node_modules/@smithy/util-body-length-browser": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-body-length-browser/-/util-body-length-browser-2.0.0.tgz", - "integrity": "sha512-JdDuS4ircJt+FDnaQj88TzZY3+njZ6O+D3uakS32f2VNnDo3vyEuNdBOh/oFd8Df1zSZOuH1HEChk2AOYDezZg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@smithy/util-body-length-browser/-/util-body-length-browser-2.0.1.tgz", + "integrity": "sha512-NXYp3ttgUlwkaug4bjBzJ5+yIbUbUx8VsSLuHZROQpoik+gRkIBeEG9MPVYfvPNpuXb/puqodeeUXcKFe7BLOQ==", "dependencies": { "tslib": "^2.5.0" } @@ -4233,9 +4644,9 @@ } }, "node_modules/@smithy/util-config-provider": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-config-provider/-/util-config-provider-2.0.0.tgz", - "integrity": "sha512-xCQ6UapcIWKxXHEU4Mcs2s7LcFQRiU3XEluM2WcCjjBtQkUN71Tb+ydGmJFPxMUrW/GWMgQEEGipLym4XG0jZg==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@smithy/util-config-provider/-/util-config-provider-2.1.0.tgz", + "integrity": "sha512-S6V0JvvhQgFSGLcJeT1CBsaTR03MM8qTuxMH9WPCCddlSo2W0V5jIHimHtIQALMLEDPGQ0ROSRr/dU0O+mxiQg==", "dependencies": { "tslib": "^2.5.0" }, @@ -4244,13 +4655,13 @@ } }, "node_modules/@smithy/util-defaults-mode-browser": { - "version": "2.0.19", - "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-2.0.19.tgz", - "integrity": "sha512-VHP8xdFR7/orpiABJwgoTB0t8Zhhwpf93gXhNfUBiwAE9O0rvsv7LwpQYjgvbOUDDO8JfIYQB2GYJNkqqGWsXw==", + "version": "2.0.23", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-2.0.23.tgz", + "integrity": "sha512-2u+7t7Wgz1jlfsf6il3pz6DIzyJHS3qrnNnmATICm00pQeqp2D4kUOYauOgKGIeKgVpwzzq8+hFQe749r3xR5w==", "dependencies": { - "@smithy/property-provider": "^2.0.14", - "@smithy/smithy-client": "^2.1.15", - "@smithy/types": "^2.5.0", + "@smithy/property-provider": "^2.0.16", + "@smithy/smithy-client": "^2.2.0", + "@smithy/types": "^2.7.0", "bowser": "^2.11.0", "tslib": "^2.5.0" }, @@ -4259,16 +4670,16 @@ } }, "node_modules/@smithy/util-defaults-mode-node": { - "version": "2.0.25", - "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-2.0.25.tgz", - "integrity": "sha512-jkmep6/JyWmn2ADw9VULDeGbugR4N/FJCKOt+gYyVswmN1BJOfzF2umaYxQ1HhQDvna3kzm1Dbo1qIfBW4iuHA==", - "dependencies": { - "@smithy/config-resolver": "^2.0.18", - "@smithy/credential-provider-imds": "^2.1.1", - "@smithy/node-config-provider": "^2.1.5", - "@smithy/property-provider": "^2.0.14", - "@smithy/smithy-client": "^2.1.15", - "@smithy/types": "^2.5.0", + "version": "2.0.31", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-2.0.31.tgz", + "integrity": "sha512-ZwdjAJAFkkQQ4hdE8HOcxFAWC3GPFXQ3yQ8IBwHH5nQBlr9q+p5eRQ7Y8iRRORJe4vksR+NASRXZ+E81Us1aXQ==", + "dependencies": { + "@smithy/config-resolver": "^2.0.22", + "@smithy/credential-provider-imds": "^2.1.4", + "@smithy/node-config-provider": "^2.1.8", + "@smithy/property-provider": "^2.0.16", + "@smithy/smithy-client": "^2.2.0", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { @@ -4276,12 +4687,12 @@ } }, "node_modules/@smithy/util-endpoints": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@smithy/util-endpoints/-/util-endpoints-1.0.4.tgz", - "integrity": "sha512-FPry8j1xye5yzrdnf4xKUXVnkQErxdN7bUIaqC0OFoGsv2NfD9b2UUMuZSSt+pr9a8XWAqj0HoyVNUfPiZ/PvQ==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@smithy/util-endpoints/-/util-endpoints-1.0.7.tgz", + "integrity": "sha512-Q2gEind3jxoLk6hdKWyESMU7LnXz8aamVwM+VeVjOYzYT1PalGlY/ETa48hv2YpV4+YV604y93YngyzzzQ4IIA==", "dependencies": { - "@smithy/node-config-provider": "^2.1.5", - "@smithy/types": "^2.5.0", + "@smithy/node-config-provider": "^2.1.8", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { @@ -4300,11 +4711,11 @@ } }, "node_modules/@smithy/util-middleware": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-2.0.6.tgz", - "integrity": "sha512-7W4uuwBvSLgKoLC1x4LfeArCVcbuHdtVaC4g30kKsD1erfICyQ45+tFhhs/dZNeQg+w392fhunCm/+oCcb6BSA==", + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-2.0.8.tgz", + "integrity": "sha512-qkvqQjM8fRGGA8P2ydWylMhenCDP8VlkPn8kiNuFEaFz9xnUKC2irfqsBSJrfrOB9Qt6pQsI58r3zvvumhFMkw==", "dependencies": { - "@smithy/types": "^2.5.0", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { @@ -4312,12 +4723,12 @@ } }, "node_modules/@smithy/util-retry": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-2.0.6.tgz", - "integrity": "sha512-PSO41FofOBmyhPQJwBQJ6mVlaD7Sp9Uff9aBbnfBJ9eqXOE/obrqQjn0PNdkfdvViiPXl49BINfnGcFtSP4kYw==", + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-2.0.8.tgz", + "integrity": "sha512-cQTPnVaVFMjjS6cb44WV2yXtHVyXDC5icKyIbejMarJEApYeJWpBU3LINTxHqp/tyLI+MZOUdosr2mZ3sdziNg==", "dependencies": { - "@smithy/service-error-classification": "^2.0.6", - "@smithy/types": "^2.5.0", + "@smithy/service-error-classification": "^2.0.8", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { @@ -4325,13 +4736,13 @@ } }, "node_modules/@smithy/util-stream": { - "version": "2.0.20", - "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-2.0.20.tgz", - "integrity": "sha512-tT8VASuD8jJu0yjHEMTCPt1o5E3FVzgdsxK6FQLAjXKqVv5V8InCnc0EOsYrijgspbfDqdAJg7r0o2sySfcHVg==", + "version": "2.0.23", + "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-2.0.23.tgz", + "integrity": "sha512-OJMWq99LAZJUzUwTk+00plyxX3ESktBaGPhqNIEVab+53gLULiWN9B/8bRABLg0K6R6Xg4t80uRdhk3B/LZqMQ==", "dependencies": { - "@smithy/fetch-http-handler": "^2.2.6", - "@smithy/node-http-handler": "^2.1.9", - "@smithy/types": "^2.5.0", + "@smithy/fetch-http-handler": "^2.3.1", + "@smithy/node-http-handler": "^2.2.1", + "@smithy/types": "^2.7.0", "@smithy/util-base64": "^2.0.1", "@smithy/util-buffer-from": "^2.0.0", "@smithy/util-hex-encoding": "^2.0.0", diff --git a/package.json b/package.json index 069fc644b7..4710ef1c49 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ }, "dependencies": { "@amplitude/ua-parser-js": "^0.7.24", - "@aws-sdk/client-personalize": "^3.391.0", + "@aws-sdk/client-personalize": "^3.470.0", "@aws-sdk/client-s3": "^3.438.0", "@aws-sdk/credential-providers": "^3.391.0", "@aws-sdk/lib-storage": "^3.391.0", From b1df33745b03c11e3637ed37851d3de833b1d297 Mon Sep 17 00:00:00 2001 From: Sandeep Digumarty Date: Fri, 5 Jan 2024 19:07:00 +0530 Subject: [PATCH 117/135] chore: upgrade @aws-sdk/lib-storage from 3.417.0 to 3.456.0 (#2911) fix: upgrade @aws-sdk/lib-storage from 3.417.0 to 3.456.0 Snyk has created this PR to upgrade @aws-sdk/lib-storage from 3.417.0 to 3.456.0. See this package in npm: https://www.npmjs.com/package/@aws-sdk/lib-storage See this project in Snyk: https://app.snyk.io/org/sandeep-L8FvsjCG7mBBqonjSmN48c/project/4b0f037e-0dab-4719-aeee-b46d2ae82119?utm_source=github&utm_medium=referral&page=upgrade-pr Co-authored-by: snyk-bot --- package-lock.json | 11 ++++++----- package.json | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9eb7d36361..347d80f26f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "@aws-sdk/client-personalize": "^3.470.0", "@aws-sdk/client-s3": "^3.438.0", "@aws-sdk/credential-providers": "^3.391.0", - "@aws-sdk/lib-storage": "^3.391.0", + "@aws-sdk/lib-storage": "^3.456.0", "@bugsnag/js": "^7.20.2", "@datadog/pprof": "^3.1.0", "@koa/router": "^12.0.0", @@ -1638,12 +1638,13 @@ } }, "node_modules/@aws-sdk/lib-storage": { - "version": "3.417.0", - "license": "Apache-2.0", + "version": "3.456.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/lib-storage/-/lib-storage-3.456.0.tgz", + "integrity": "sha512-S1h7DcH8u+CL6kobVgorgm0X0u+gQwjefbDuRrPF0qtpzvPprabRe4t3yt4VKuhjvegxKMVL/sdw817gLGoPdA==", "dependencies": { "@smithy/abort-controller": "^2.0.1", - "@smithy/middleware-endpoint": "^2.0.7", - "@smithy/smithy-client": "^2.1.4", + "@smithy/middleware-endpoint": "^2.2.0", + "@smithy/smithy-client": "^2.1.15", "buffer": "5.6.0", "events": "3.3.0", "stream-browserify": "3.0.0", diff --git a/package.json b/package.json index 4710ef1c49..114751ab69 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,7 @@ "@aws-sdk/client-personalize": "^3.470.0", "@aws-sdk/client-s3": "^3.438.0", "@aws-sdk/credential-providers": "^3.391.0", - "@aws-sdk/lib-storage": "^3.391.0", + "@aws-sdk/lib-storage": "^3.456.0", "@bugsnag/js": "^7.20.2", "@datadog/pprof": "^3.1.0", "@koa/router": "^12.0.0", From 2302bad0bc81ebde498c41339c583b981ad7b49f Mon Sep 17 00:00:00 2001 From: Sandeep Digumarty Date: Mon, 8 Jan 2024 10:57:15 +0530 Subject: [PATCH 118/135] chore: upgrade @aws-sdk/client-s3 from 3.438.0 to 3.474.0 (#2971) fix: upgrade @aws-sdk/client-s3 from 3.438.0 to 3.474.0 Snyk has created this PR to upgrade @aws-sdk/client-s3 from 3.438.0 to 3.474.0. See this package in npm: https://www.npmjs.com/package/@aws-sdk/client-s3 See this project in Snyk: https://app.snyk.io/org/sandeep-L8FvsjCG7mBBqonjSmN48c/project/4b0f037e-0dab-4719-aeee-b46d2ae82119?utm_source=github&utm_medium=referral&page=upgrade-pr Co-authored-by: snyk-bot --- package-lock.json | 989 +++++++++++++++++++++++----------------------- package.json | 2 +- 2 files changed, 497 insertions(+), 494 deletions(-) diff --git a/package-lock.json b/package-lock.json index 347d80f26f..d17df96ca0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "@amplitude/ua-parser-js": "^0.7.24", "@aws-sdk/client-personalize": "^3.470.0", - "@aws-sdk/client-s3": "^3.438.0", + "@aws-sdk/client-s3": "^3.474.0", "@aws-sdk/credential-providers": "^3.391.0", "@aws-sdk/lib-storage": "^3.456.0", "@bugsnag/js": "^7.20.2", @@ -776,18 +776,6 @@ "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-personalize/node_modules/@aws-sdk/types": { - "version": "3.468.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.468.0.tgz", - "integrity": "sha512-rx/9uHI4inRbp2tw3Y4Ih4PNZkVj32h7WneSg3MVgVjAoVD5Zti9KhS5hkvsBxfgmQmg0AQbE+b1sy5WGAgntA==", - "dependencies": { - "@smithy/types": "^2.7.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, "node_modules/@aws-sdk/client-personalize/node_modules/@aws-sdk/util-endpoints": { "version": "3.470.0", "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.470.0.tgz", @@ -835,65 +823,65 @@ } }, "node_modules/@aws-sdk/client-s3": { - "version": "3.438.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-s3/-/client-s3-3.438.0.tgz", - "integrity": "sha512-5VxdfyZ9oovbK5qzIYW4ZeJ1waD6VqfclSDQLHmgulekM2JYo/goEQJSjWnI4VMWuMsopzvqyeA+L9xq9uXLBQ==", + "version": "3.474.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-s3/-/client-s3-3.474.0.tgz", + "integrity": "sha512-uqji9u2yIhFMx6E18+iIlKqimZE1SUEewS78iYYzOKRoQQ+XqFnQXtHTvBGfTExEvdwZUXYg8FqSP2UpQiEf/g==", "dependencies": { "@aws-crypto/sha1-browser": "3.0.0", "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/client-sts": "3.438.0", - "@aws-sdk/core": "3.436.0", - "@aws-sdk/credential-provider-node": "3.438.0", - "@aws-sdk/middleware-bucket-endpoint": "3.433.0", - "@aws-sdk/middleware-expect-continue": "3.433.0", - "@aws-sdk/middleware-flexible-checksums": "3.433.0", - "@aws-sdk/middleware-host-header": "3.433.0", - "@aws-sdk/middleware-location-constraint": "3.433.0", - "@aws-sdk/middleware-logger": "3.433.0", - "@aws-sdk/middleware-recursion-detection": "3.433.0", - "@aws-sdk/middleware-sdk-s3": "3.433.0", - "@aws-sdk/middleware-signing": "3.433.0", - "@aws-sdk/middleware-ssec": "3.433.0", - "@aws-sdk/middleware-user-agent": "3.438.0", - "@aws-sdk/region-config-resolver": "3.433.0", - "@aws-sdk/signature-v4-multi-region": "3.437.0", - "@aws-sdk/types": "3.433.0", - "@aws-sdk/util-endpoints": "3.438.0", - "@aws-sdk/util-user-agent-browser": "3.433.0", - "@aws-sdk/util-user-agent-node": "3.437.0", - "@aws-sdk/xml-builder": "3.310.0", - "@smithy/config-resolver": "^2.0.16", - "@smithy/eventstream-serde-browser": "^2.0.12", - "@smithy/eventstream-serde-config-resolver": "^2.0.12", - "@smithy/eventstream-serde-node": "^2.0.12", - "@smithy/fetch-http-handler": "^2.2.4", - "@smithy/hash-blob-browser": "^2.0.12", - "@smithy/hash-node": "^2.0.12", - "@smithy/hash-stream-node": "^2.0.12", - "@smithy/invalid-dependency": "^2.0.12", - "@smithy/md5-js": "^2.0.12", - "@smithy/middleware-content-length": "^2.0.14", - "@smithy/middleware-endpoint": "^2.1.3", - "@smithy/middleware-retry": "^2.0.18", - "@smithy/middleware-serde": "^2.0.12", - "@smithy/middleware-stack": "^2.0.6", - "@smithy/node-config-provider": "^2.1.3", - "@smithy/node-http-handler": "^2.1.8", - "@smithy/protocol-http": "^3.0.8", - "@smithy/smithy-client": "^2.1.12", - "@smithy/types": "^2.4.0", - "@smithy/url-parser": "^2.0.12", - "@smithy/util-base64": "^2.0.0", - "@smithy/util-body-length-browser": "^2.0.0", + "@aws-sdk/client-sts": "3.474.0", + "@aws-sdk/core": "3.474.0", + "@aws-sdk/credential-provider-node": "3.474.0", + "@aws-sdk/middleware-bucket-endpoint": "3.470.0", + "@aws-sdk/middleware-expect-continue": "3.468.0", + "@aws-sdk/middleware-flexible-checksums": "3.468.0", + "@aws-sdk/middleware-host-header": "3.468.0", + "@aws-sdk/middleware-location-constraint": "3.468.0", + "@aws-sdk/middleware-logger": "3.468.0", + "@aws-sdk/middleware-recursion-detection": "3.468.0", + "@aws-sdk/middleware-sdk-s3": "3.474.0", + "@aws-sdk/middleware-signing": "3.468.0", + "@aws-sdk/middleware-ssec": "3.468.0", + "@aws-sdk/middleware-user-agent": "3.470.0", + "@aws-sdk/region-config-resolver": "3.470.0", + "@aws-sdk/signature-v4-multi-region": "3.474.0", + "@aws-sdk/types": "3.468.0", + "@aws-sdk/util-endpoints": "3.470.0", + "@aws-sdk/util-user-agent-browser": "3.468.0", + "@aws-sdk/util-user-agent-node": "3.470.0", + "@aws-sdk/xml-builder": "3.472.0", + "@smithy/config-resolver": "^2.0.21", + "@smithy/eventstream-serde-browser": "^2.0.15", + "@smithy/eventstream-serde-config-resolver": "^2.0.15", + "@smithy/eventstream-serde-node": "^2.0.15", + "@smithy/fetch-http-handler": "^2.3.1", + "@smithy/hash-blob-browser": "^2.0.16", + "@smithy/hash-node": "^2.0.17", + "@smithy/hash-stream-node": "^2.0.17", + "@smithy/invalid-dependency": "^2.0.15", + "@smithy/md5-js": "^2.0.17", + "@smithy/middleware-content-length": "^2.0.17", + "@smithy/middleware-endpoint": "^2.2.3", + "@smithy/middleware-retry": "^2.0.24", + "@smithy/middleware-serde": "^2.0.15", + "@smithy/middleware-stack": "^2.0.9", + "@smithy/node-config-provider": "^2.1.8", + "@smithy/node-http-handler": "^2.2.1", + "@smithy/protocol-http": "^3.0.11", + "@smithy/smithy-client": "^2.1.18", + "@smithy/types": "^2.7.0", + "@smithy/url-parser": "^2.0.15", + "@smithy/util-base64": "^2.0.1", + "@smithy/util-body-length-browser": "^2.0.1", "@smithy/util-body-length-node": "^2.1.0", - "@smithy/util-defaults-mode-browser": "^2.0.16", - "@smithy/util-defaults-mode-node": "^2.0.21", - "@smithy/util-endpoints": "^1.0.2", - "@smithy/util-retry": "^2.0.5", - "@smithy/util-stream": "^2.0.17", - "@smithy/util-utf8": "^2.0.0", - "@smithy/util-waiter": "^2.0.12", + "@smithy/util-defaults-mode-browser": "^2.0.22", + "@smithy/util-defaults-mode-node": "^2.0.29", + "@smithy/util-endpoints": "^1.0.7", + "@smithy/util-retry": "^2.0.8", + "@smithy/util-stream": "^2.0.23", + "@smithy/util-utf8": "^2.0.2", + "@smithy/util-waiter": "^2.0.15", "fast-xml-parser": "4.2.5", "tslib": "^2.5.0" }, @@ -902,45 +890,45 @@ } }, "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/client-sso": { - "version": "3.438.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.438.0.tgz", - "integrity": "sha512-L/xKq+K78PShLku8x5gM6lZDUp7LhFJ2ksKH7Vll+exSZq+QUaxuzjp4gqdzh6B0oIshv2jssQlUa0ScOmVRMg==", + "version": "3.474.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.474.0.tgz", + "integrity": "sha512-6toUmQUIHkDM/P2/nyLEO/mcWOIPByTlegqX9VCHhYh9Fs5MDT2nit7I6fZzBjZjB5oVTwKjbzgxae9cE3bhqw==", "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/core": "3.436.0", - "@aws-sdk/middleware-host-header": "3.433.0", - "@aws-sdk/middleware-logger": "3.433.0", - "@aws-sdk/middleware-recursion-detection": "3.433.0", - "@aws-sdk/middleware-user-agent": "3.438.0", - "@aws-sdk/region-config-resolver": "3.433.0", - "@aws-sdk/types": "3.433.0", - "@aws-sdk/util-endpoints": "3.438.0", - "@aws-sdk/util-user-agent-browser": "3.433.0", - "@aws-sdk/util-user-agent-node": "3.437.0", - "@smithy/config-resolver": "^2.0.16", - "@smithy/fetch-http-handler": "^2.2.4", - "@smithy/hash-node": "^2.0.12", - "@smithy/invalid-dependency": "^2.0.12", - "@smithy/middleware-content-length": "^2.0.14", - "@smithy/middleware-endpoint": "^2.1.3", - "@smithy/middleware-retry": "^2.0.18", - "@smithy/middleware-serde": "^2.0.12", - "@smithy/middleware-stack": "^2.0.6", - "@smithy/node-config-provider": "^2.1.3", - "@smithy/node-http-handler": "^2.1.8", - "@smithy/protocol-http": "^3.0.8", - "@smithy/smithy-client": "^2.1.12", - "@smithy/types": "^2.4.0", - "@smithy/url-parser": "^2.0.12", - "@smithy/util-base64": "^2.0.0", - "@smithy/util-body-length-browser": "^2.0.0", + "@aws-sdk/core": "3.474.0", + "@aws-sdk/middleware-host-header": "3.468.0", + "@aws-sdk/middleware-logger": "3.468.0", + "@aws-sdk/middleware-recursion-detection": "3.468.0", + "@aws-sdk/middleware-user-agent": "3.470.0", + "@aws-sdk/region-config-resolver": "3.470.0", + "@aws-sdk/types": "3.468.0", + "@aws-sdk/util-endpoints": "3.470.0", + "@aws-sdk/util-user-agent-browser": "3.468.0", + "@aws-sdk/util-user-agent-node": "3.470.0", + "@smithy/config-resolver": "^2.0.21", + "@smithy/fetch-http-handler": "^2.3.1", + "@smithy/hash-node": "^2.0.17", + "@smithy/invalid-dependency": "^2.0.15", + "@smithy/middleware-content-length": "^2.0.17", + "@smithy/middleware-endpoint": "^2.2.3", + "@smithy/middleware-retry": "^2.0.24", + "@smithy/middleware-serde": "^2.0.15", + "@smithy/middleware-stack": "^2.0.9", + "@smithy/node-config-provider": "^2.1.8", + "@smithy/node-http-handler": "^2.2.1", + "@smithy/protocol-http": "^3.0.11", + "@smithy/smithy-client": "^2.1.18", + "@smithy/types": "^2.7.0", + "@smithy/url-parser": "^2.0.15", + "@smithy/util-base64": "^2.0.1", + "@smithy/util-body-length-browser": "^2.0.1", "@smithy/util-body-length-node": "^2.1.0", - "@smithy/util-defaults-mode-browser": "^2.0.16", - "@smithy/util-defaults-mode-node": "^2.0.21", - "@smithy/util-endpoints": "^1.0.2", - "@smithy/util-retry": "^2.0.5", - "@smithy/util-utf8": "^2.0.0", + "@smithy/util-defaults-mode-browser": "^2.0.22", + "@smithy/util-defaults-mode-node": "^2.0.29", + "@smithy/util-endpoints": "^1.0.7", + "@smithy/util-retry": "^2.0.8", + "@smithy/util-utf8": "^2.0.2", "tslib": "^2.5.0" }, "engines": { @@ -948,48 +936,48 @@ } }, "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/client-sts": { - "version": "3.438.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.438.0.tgz", - "integrity": "sha512-UBxLZKVVvbR4LHwSNSqaKx22YBSOGkavrh4SyDP8o8XOlXeRxTCllfSfjL9K5Mktp+ZwQ2NiubNcwmvUcGKbbg==", + "version": "3.474.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.474.0.tgz", + "integrity": "sha512-qPPMbrDVAUJgYiFWVewFG7dg0VyMfuGNNK4IC1nZr0eXejUTbdm8cio6IZ8OkWtK+A+L+wx1vX5686WYVgQ0dQ==", "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/core": "3.436.0", - "@aws-sdk/credential-provider-node": "3.438.0", - "@aws-sdk/middleware-host-header": "3.433.0", - "@aws-sdk/middleware-logger": "3.433.0", - "@aws-sdk/middleware-recursion-detection": "3.433.0", - "@aws-sdk/middleware-sdk-sts": "3.433.0", - "@aws-sdk/middleware-signing": "3.433.0", - "@aws-sdk/middleware-user-agent": "3.438.0", - "@aws-sdk/region-config-resolver": "3.433.0", - "@aws-sdk/types": "3.433.0", - "@aws-sdk/util-endpoints": "3.438.0", - "@aws-sdk/util-user-agent-browser": "3.433.0", - "@aws-sdk/util-user-agent-node": "3.437.0", - "@smithy/config-resolver": "^2.0.16", - "@smithy/fetch-http-handler": "^2.2.4", - "@smithy/hash-node": "^2.0.12", - "@smithy/invalid-dependency": "^2.0.12", - "@smithy/middleware-content-length": "^2.0.14", - "@smithy/middleware-endpoint": "^2.1.3", - "@smithy/middleware-retry": "^2.0.18", - "@smithy/middleware-serde": "^2.0.12", - "@smithy/middleware-stack": "^2.0.6", - "@smithy/node-config-provider": "^2.1.3", - "@smithy/node-http-handler": "^2.1.8", - "@smithy/protocol-http": "^3.0.8", - "@smithy/smithy-client": "^2.1.12", - "@smithy/types": "^2.4.0", - "@smithy/url-parser": "^2.0.12", - "@smithy/util-base64": "^2.0.0", - "@smithy/util-body-length-browser": "^2.0.0", + "@aws-sdk/core": "3.474.0", + "@aws-sdk/credential-provider-node": "3.474.0", + "@aws-sdk/middleware-host-header": "3.468.0", + "@aws-sdk/middleware-logger": "3.468.0", + "@aws-sdk/middleware-recursion-detection": "3.468.0", + "@aws-sdk/middleware-user-agent": "3.470.0", + "@aws-sdk/region-config-resolver": "3.470.0", + "@aws-sdk/types": "3.468.0", + "@aws-sdk/util-endpoints": "3.470.0", + "@aws-sdk/util-user-agent-browser": "3.468.0", + "@aws-sdk/util-user-agent-node": "3.470.0", + "@smithy/config-resolver": "^2.0.21", + "@smithy/core": "^1.1.0", + "@smithy/fetch-http-handler": "^2.3.1", + "@smithy/hash-node": "^2.0.17", + "@smithy/invalid-dependency": "^2.0.15", + "@smithy/middleware-content-length": "^2.0.17", + "@smithy/middleware-endpoint": "^2.2.3", + "@smithy/middleware-retry": "^2.0.24", + "@smithy/middleware-serde": "^2.0.15", + "@smithy/middleware-stack": "^2.0.9", + "@smithy/node-config-provider": "^2.1.8", + "@smithy/node-http-handler": "^2.2.1", + "@smithy/protocol-http": "^3.0.11", + "@smithy/smithy-client": "^2.1.18", + "@smithy/types": "^2.7.0", + "@smithy/url-parser": "^2.0.15", + "@smithy/util-base64": "^2.0.1", + "@smithy/util-body-length-browser": "^2.0.1", "@smithy/util-body-length-node": "^2.1.0", - "@smithy/util-defaults-mode-browser": "^2.0.16", - "@smithy/util-defaults-mode-node": "^2.0.21", - "@smithy/util-endpoints": "^1.0.2", - "@smithy/util-retry": "^2.0.5", - "@smithy/util-utf8": "^2.0.0", + "@smithy/util-defaults-mode-browser": "^2.0.22", + "@smithy/util-defaults-mode-node": "^2.0.29", + "@smithy/util-endpoints": "^1.0.7", + "@smithy/util-middleware": "^2.0.8", + "@smithy/util-retry": "^2.0.8", + "@smithy/util-utf8": "^2.0.2", "fast-xml-parser": "4.2.5", "tslib": "^2.5.0" }, @@ -998,13 +986,13 @@ } }, "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/credential-provider-env": { - "version": "3.433.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.433.0.tgz", - "integrity": "sha512-Vl7Qz5qYyxBurMn6hfSiNJeUHSqfVUlMt0C1Bds3tCkl3IzecRWwyBOlxtxO3VCrgVeW3HqswLzCvhAFzPH6nQ==", + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.468.0.tgz", + "integrity": "sha512-k/1WHd3KZn0EQYjadooj53FC0z24/e4dUZhbSKTULgmxyO62pwh9v3Brvw4WRa/8o2wTffU/jo54tf4vGuP/ZA==", "dependencies": { - "@aws-sdk/types": "3.433.0", + "@aws-sdk/types": "3.468.0", "@smithy/property-provider": "^2.0.0", - "@smithy/types": "^2.4.0", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { @@ -1012,19 +1000,19 @@ } }, "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/credential-provider-ini": { - "version": "3.438.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.438.0.tgz", - "integrity": "sha512-WYPQR3pXoHJjn9/RMWipUhsUNFy6zhOiII6u8LJ5w84aNqIjV4+BdRYztRNGJD98jdtekhbkX0YKoSuZqP+unQ==", - "dependencies": { - "@aws-sdk/credential-provider-env": "3.433.0", - "@aws-sdk/credential-provider-process": "3.433.0", - "@aws-sdk/credential-provider-sso": "3.438.0", - "@aws-sdk/credential-provider-web-identity": "3.433.0", - "@aws-sdk/types": "3.433.0", + "version": "3.474.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.474.0.tgz", + "integrity": "sha512-3Y2fHI4ZCNjdOO47Vh/xBgLXOrKm3KwBkYkBKKT2g02FUGNT8NLjJg8WBo3D4RQX2h34qx4mtW5nTY6YcGP80Q==", + "dependencies": { + "@aws-sdk/credential-provider-env": "3.468.0", + "@aws-sdk/credential-provider-process": "3.468.0", + "@aws-sdk/credential-provider-sso": "3.474.0", + "@aws-sdk/credential-provider-web-identity": "3.468.0", + "@aws-sdk/types": "3.468.0", "@smithy/credential-provider-imds": "^2.0.0", "@smithy/property-provider": "^2.0.0", "@smithy/shared-ini-file-loader": "^2.0.6", - "@smithy/types": "^2.4.0", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { @@ -1032,20 +1020,20 @@ } }, "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/credential-provider-node": { - "version": "3.438.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.438.0.tgz", - "integrity": "sha512-uaw3D2R0svyrC32qyZ2aOv/l0AT9eClh+eQsZJTQD3Kz9q+2VdeOBThQ8fsMfRtm26nUbZo6A/CRwxkm6okI+w==", - "dependencies": { - "@aws-sdk/credential-provider-env": "3.433.0", - "@aws-sdk/credential-provider-ini": "3.438.0", - "@aws-sdk/credential-provider-process": "3.433.0", - "@aws-sdk/credential-provider-sso": "3.438.0", - "@aws-sdk/credential-provider-web-identity": "3.433.0", - "@aws-sdk/types": "3.433.0", + "version": "3.474.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.474.0.tgz", + "integrity": "sha512-3OVVVGnb8Ru5hWeeHkg76YZT5mrufweIiWr6ge5zn7FYxc7WkyqIJ0XehqUqG5VQfaYhqh7uq/zmk8OE2B04lQ==", + "dependencies": { + "@aws-sdk/credential-provider-env": "3.468.0", + "@aws-sdk/credential-provider-ini": "3.474.0", + "@aws-sdk/credential-provider-process": "3.468.0", + "@aws-sdk/credential-provider-sso": "3.474.0", + "@aws-sdk/credential-provider-web-identity": "3.468.0", + "@aws-sdk/types": "3.468.0", "@smithy/credential-provider-imds": "^2.0.0", "@smithy/property-provider": "^2.0.0", "@smithy/shared-ini-file-loader": "^2.0.6", - "@smithy/types": "^2.4.0", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { @@ -1053,14 +1041,14 @@ } }, "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/credential-provider-process": { - "version": "3.433.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.433.0.tgz", - "integrity": "sha512-W7FcGlQjio9Y/PepcZGRyl5Bpwb0uWU7qIUCh+u4+q2mW4D5ZngXg8V/opL9/I/p4tUH9VXZLyLGwyBSkdhL+A==", + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.468.0.tgz", + "integrity": "sha512-OYSn1A/UsyPJ7Z8Q2cNhTf55O36shPmSsvOfND04nSfu1nPaR+VUvvsP7v+brhGpwC/GAKTIdGAo4blH31BS6A==", "dependencies": { - "@aws-sdk/types": "3.433.0", + "@aws-sdk/types": "3.468.0", "@smithy/property-provider": "^2.0.0", "@smithy/shared-ini-file-loader": "^2.0.6", - "@smithy/types": "^2.4.0", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { @@ -1068,16 +1056,16 @@ } }, "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/credential-provider-sso": { - "version": "3.438.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.438.0.tgz", - "integrity": "sha512-Xykli/64xR18cBV5P0XFxcH120omtfAjC/cFy/9nFU/+dPvbk0uu1yEOZYteWHyGGkPN4PkHmbh60GiUCLQkWQ==", + "version": "3.474.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.474.0.tgz", + "integrity": "sha512-ik4rzhQtcRLSHB/MLQfi/dSpILxPd3zITb79DIEnqT3gpZRNjoARkZ3Hi68pujkU2530NYf8NcFwLCWoV1hS7Q==", "dependencies": { - "@aws-sdk/client-sso": "3.438.0", - "@aws-sdk/token-providers": "3.438.0", - "@aws-sdk/types": "3.433.0", + "@aws-sdk/client-sso": "3.474.0", + "@aws-sdk/token-providers": "3.470.0", + "@aws-sdk/types": "3.468.0", "@smithy/property-provider": "^2.0.0", "@smithy/shared-ini-file-loader": "^2.0.6", - "@smithy/types": "^2.4.0", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { @@ -1085,13 +1073,13 @@ } }, "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/credential-provider-web-identity": { - "version": "3.433.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.433.0.tgz", - "integrity": "sha512-RlwjP1I5wO+aPpwyCp23Mk8nmRbRL33hqRASy73c4JA2z2YiRua+ryt6MalIxehhwQU6xvXUKulJnPG9VaMFZg==", + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.468.0.tgz", + "integrity": "sha512-rexymPmXjtkwCPfhnUq3EjO1rSkf39R4Jz9CqiM7OsqK2qlT5Y/V3gnMKn0ZMXsYaQOMfM3cT5xly5R+OKDHlw==", "dependencies": { - "@aws-sdk/types": "3.433.0", + "@aws-sdk/types": "3.468.0", "@smithy/property-provider": "^2.0.0", - "@smithy/types": "^2.4.0", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { @@ -1099,13 +1087,13 @@ } }, "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/middleware-host-header": { - "version": "3.433.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.433.0.tgz", - "integrity": "sha512-mBTq3UWv1UzeHG+OfUQ2MB/5GEkt5LTKFaUqzL7ESwzW8XtpBgXnjZvIwu3Vcd3sEetMwijwaGiJhY0ae/YyaA==", + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.468.0.tgz", + "integrity": "sha512-gwQ+/QhX+lhof304r6zbZ/V5l5cjhGRxLL3CjH1uJPMcOAbw9wUlMdl+ibr8UwBZ5elfKFGiB1cdW/0uMchw0w==", "dependencies": { - "@aws-sdk/types": "3.433.0", - "@smithy/protocol-http": "^3.0.8", - "@smithy/types": "^2.4.0", + "@aws-sdk/types": "3.468.0", + "@smithy/protocol-http": "^3.0.11", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { @@ -1113,12 +1101,12 @@ } }, "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/middleware-logger": { - "version": "3.433.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.433.0.tgz", - "integrity": "sha512-We346Fb5xGonTGVZC9Nvqtnqy74VJzYuTLLiuuftA5sbNzftBDy/22QCfvYSTOAl3bvif+dkDUzQY2ihc5PwOQ==", + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.468.0.tgz", + "integrity": "sha512-X5XHKV7DHRXI3f29SAhJPe/OxWRFgDWDMMCALfzhmJfCi6Jfh0M14cJKoC+nl+dk9lB+36+jKjhjETZaL2bPlA==", "dependencies": { - "@aws-sdk/types": "3.433.0", - "@smithy/types": "^2.4.0", + "@aws-sdk/types": "3.468.0", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { @@ -1126,27 +1114,13 @@ } }, "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/middleware-recursion-detection": { - "version": "3.433.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.433.0.tgz", - "integrity": "sha512-HEvYC9PQlWY/ccUYtLvAlwwf1iCif2TSAmLNr3YTBRVa98x6jKL0hlCrHWYklFeqOGSKy6XhE+NGJMUII0/HaQ==", - "dependencies": { - "@aws-sdk/types": "3.433.0", - "@smithy/protocol-http": "^3.0.8", - "@smithy/types": "^2.4.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/middleware-sdk-sts": { - "version": "3.433.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-sdk-sts/-/middleware-sdk-sts-3.433.0.tgz", - "integrity": "sha512-ORYbJnBejUyonFl5FwIqhvI3Cq6sAp9j+JpkKZtFNma9tFPdrhmYgfCeNH32H/wGTQV/tUoQ3luh0gA4cuk6DA==", + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.468.0.tgz", + "integrity": "sha512-vch9IQib2Ng9ucSyRW2eKNQXHUPb5jUPCLA5otTW/8nGjcOU37LxQG4WrxO7uaJ9Oe8hjHO+hViE3P0KISUhtA==", "dependencies": { - "@aws-sdk/middleware-signing": "3.433.0", - "@aws-sdk/types": "3.433.0", - "@smithy/types": "^2.4.0", + "@aws-sdk/types": "3.468.0", + "@smithy/protocol-http": "^3.0.11", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { @@ -1154,16 +1128,16 @@ } }, "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/middleware-signing": { - "version": "3.433.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-signing/-/middleware-signing-3.433.0.tgz", - "integrity": "sha512-jxPvt59NZo/epMNLNTu47ikmP8v0q217I6bQFGJG7JVFnfl36zDktMwGw+0xZR80qiK47/2BWrNpta61Zd2FxQ==", + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-signing/-/middleware-signing-3.468.0.tgz", + "integrity": "sha512-s+7fSB1gdnnTj5O0aCCarX3z5Vppop8kazbNSZADdkfHIDWCN80IH4ZNjY3OWqaAz0HmR4LNNrovdR304ojb4Q==", "dependencies": { - "@aws-sdk/types": "3.433.0", + "@aws-sdk/types": "3.468.0", "@smithy/property-provider": "^2.0.0", - "@smithy/protocol-http": "^3.0.8", + "@smithy/protocol-http": "^3.0.11", "@smithy/signature-v4": "^2.0.0", - "@smithy/types": "^2.4.0", - "@smithy/util-middleware": "^2.0.5", + "@smithy/types": "^2.7.0", + "@smithy/util-middleware": "^2.0.8", "tslib": "^2.5.0" }, "engines": { @@ -1171,14 +1145,14 @@ } }, "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/middleware-user-agent": { - "version": "3.438.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.438.0.tgz", - "integrity": "sha512-a+xHT1wOxT6EA6YyLmrfaroKWOkwwyiktUfXKM0FsUutGzNi4fKhb5NZ2al58NsXzHgHFrasSDp+Lqbd/X2cEw==", - "dependencies": { - "@aws-sdk/types": "3.433.0", - "@aws-sdk/util-endpoints": "3.438.0", - "@smithy/protocol-http": "^3.0.8", - "@smithy/types": "^2.4.0", + "version": "3.470.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.470.0.tgz", + "integrity": "sha512-s0YRGgf4fT5KwwTefpoNUQfB5JghzXyvmPfY1QuFEMeVQNxv0OPuydzo3rY2oXPkZjkulKDtpm5jzIHwut75hA==", + "dependencies": { + "@aws-sdk/types": "3.468.0", + "@aws-sdk/util-endpoints": "3.470.0", + "@smithy/protocol-http": "^3.0.11", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { @@ -1186,14 +1160,14 @@ } }, "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/region-config-resolver": { - "version": "3.433.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.433.0.tgz", - "integrity": "sha512-xpjRjCZW+CDFdcMmmhIYg81ST5UAnJh61IHziQEk0FXONrg4kjyYPZAOjEdzXQ+HxJQuGQLKPhRdzxmQnbX7pg==", + "version": "3.470.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.470.0.tgz", + "integrity": "sha512-C1o1J06iIw8cyAAOvHqT4Bbqf+PgQ/RDlSyjt2gFfP2OovDpc2o2S90dE8f8iZdSGpg70N5MikT1DBhW9NbhtQ==", "dependencies": { - "@smithy/node-config-provider": "^2.1.3", - "@smithy/types": "^2.4.0", + "@smithy/node-config-provider": "^2.1.8", + "@smithy/types": "^2.7.0", "@smithy/util-config-provider": "^2.0.0", - "@smithy/util-middleware": "^2.0.5", + "@smithy/util-middleware": "^2.0.8", "tslib": "^2.5.0" }, "engines": { @@ -1201,46 +1175,46 @@ } }, "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/token-providers": { - "version": "3.438.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.438.0.tgz", - "integrity": "sha512-G2fUfTtU6/1ayYRMu0Pd9Ln4qYSvwJOWCqJMdkDgvXSwdgcOSOLsnAIk1AHGJDAvgLikdCzuyOsdJiexr9Vnww==", + "version": "3.470.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.470.0.tgz", + "integrity": "sha512-rzxnJxEUJiV69Cxsf0AHXTqJqTACITwcSH/PL4lWP4uvtzdrzSi3KA3u2aWHWpOcdE6+JFvdICscsbBSo3/TOg==", "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/middleware-host-header": "3.433.0", - "@aws-sdk/middleware-logger": "3.433.0", - "@aws-sdk/middleware-recursion-detection": "3.433.0", - "@aws-sdk/middleware-user-agent": "3.438.0", - "@aws-sdk/region-config-resolver": "3.433.0", - "@aws-sdk/types": "3.433.0", - "@aws-sdk/util-endpoints": "3.438.0", - "@aws-sdk/util-user-agent-browser": "3.433.0", - "@aws-sdk/util-user-agent-node": "3.437.0", - "@smithy/config-resolver": "^2.0.16", - "@smithy/fetch-http-handler": "^2.2.4", - "@smithy/hash-node": "^2.0.12", - "@smithy/invalid-dependency": "^2.0.12", - "@smithy/middleware-content-length": "^2.0.14", - "@smithy/middleware-endpoint": "^2.1.3", - "@smithy/middleware-retry": "^2.0.18", - "@smithy/middleware-serde": "^2.0.12", - "@smithy/middleware-stack": "^2.0.6", - "@smithy/node-config-provider": "^2.1.3", - "@smithy/node-http-handler": "^2.1.8", + "@aws-sdk/middleware-host-header": "3.468.0", + "@aws-sdk/middleware-logger": "3.468.0", + "@aws-sdk/middleware-recursion-detection": "3.468.0", + "@aws-sdk/middleware-user-agent": "3.470.0", + "@aws-sdk/region-config-resolver": "3.470.0", + "@aws-sdk/types": "3.468.0", + "@aws-sdk/util-endpoints": "3.470.0", + "@aws-sdk/util-user-agent-browser": "3.468.0", + "@aws-sdk/util-user-agent-node": "3.470.0", + "@smithy/config-resolver": "^2.0.21", + "@smithy/fetch-http-handler": "^2.3.1", + "@smithy/hash-node": "^2.0.17", + "@smithy/invalid-dependency": "^2.0.15", + "@smithy/middleware-content-length": "^2.0.17", + "@smithy/middleware-endpoint": "^2.2.3", + "@smithy/middleware-retry": "^2.0.24", + "@smithy/middleware-serde": "^2.0.15", + "@smithy/middleware-stack": "^2.0.9", + "@smithy/node-config-provider": "^2.1.8", + "@smithy/node-http-handler": "^2.2.1", "@smithy/property-provider": "^2.0.0", - "@smithy/protocol-http": "^3.0.8", + "@smithy/protocol-http": "^3.0.11", "@smithy/shared-ini-file-loader": "^2.0.6", - "@smithy/smithy-client": "^2.1.12", - "@smithy/types": "^2.4.0", - "@smithy/url-parser": "^2.0.12", - "@smithy/util-base64": "^2.0.0", - "@smithy/util-body-length-browser": "^2.0.0", + "@smithy/smithy-client": "^2.1.18", + "@smithy/types": "^2.7.0", + "@smithy/url-parser": "^2.0.15", + "@smithy/util-base64": "^2.0.1", + "@smithy/util-body-length-browser": "^2.0.1", "@smithy/util-body-length-node": "^2.1.0", - "@smithy/util-defaults-mode-browser": "^2.0.16", - "@smithy/util-defaults-mode-node": "^2.0.21", - "@smithy/util-endpoints": "^1.0.2", - "@smithy/util-retry": "^2.0.5", - "@smithy/util-utf8": "^2.0.0", + "@smithy/util-defaults-mode-browser": "^2.0.22", + "@smithy/util-defaults-mode-node": "^2.0.29", + "@smithy/util-endpoints": "^1.0.7", + "@smithy/util-retry": "^2.0.8", + "@smithy/util-utf8": "^2.0.2", "tslib": "^2.5.0" }, "engines": { @@ -1248,12 +1222,12 @@ } }, "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/util-endpoints": { - "version": "3.438.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.438.0.tgz", - "integrity": "sha512-6VyPTq1kN3GWxwFt5DdZfOsr6cJZPLjWh0troY/0uUv3hK74C9o3Y0Xf/z8UAUvQFkVqZse12O0/BgPVMImvfA==", + "version": "3.470.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.470.0.tgz", + "integrity": "sha512-6N6VvPCmu+89p5Ez/+gLf+X620iQ9JpIs8p8ECZiCodirzFOe8NC1O2S7eov7YiG9IHSuodqn/0qNq+v+oLe0A==", "dependencies": { - "@aws-sdk/types": "3.433.0", - "@smithy/util-endpoints": "^1.0.2", + "@aws-sdk/types": "3.468.0", + "@smithy/util-endpoints": "^1.0.7", "tslib": "^2.5.0" }, "engines": { @@ -1261,24 +1235,24 @@ } }, "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/util-user-agent-browser": { - "version": "3.433.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.433.0.tgz", - "integrity": "sha512-2Cf/Lwvxbt5RXvWFXrFr49vXv0IddiUwrZoAiwhDYxvsh+BMnh+NUFot+ZQaTrk/8IPZVDeLPWZRdVy00iaVXQ==", + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.468.0.tgz", + "integrity": "sha512-OJyhWWsDEizR3L+dCgMXSUmaCywkiZ7HSbnQytbeKGwokIhD69HTiJcibF/sgcM5gk4k3Mq3puUhGnEZ46GIig==", "dependencies": { - "@aws-sdk/types": "3.433.0", - "@smithy/types": "^2.4.0", + "@aws-sdk/types": "3.468.0", + "@smithy/types": "^2.7.0", "bowser": "^2.11.0", "tslib": "^2.5.0" } }, "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/util-user-agent-node": { - "version": "3.437.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.437.0.tgz", - "integrity": "sha512-JVEcvWaniamtYVPem4UthtCNoTBCfFTwYj7Y3CrWZ2Qic4TqrwLkAfaBGtI2TGrhIClVr77uzLI6exqMTN7orA==", + "version": "3.470.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.470.0.tgz", + "integrity": "sha512-QxsZ9iVHcBB/XRdYvwfM5AMvNp58HfqkIrH88mY0cmxuvtlIGDfWjczdDrZMJk9y0vIq+cuoCHsGXHu7PyiEAQ==", "dependencies": { - "@aws-sdk/types": "3.433.0", - "@smithy/node-config-provider": "^2.1.3", - "@smithy/types": "^2.4.0", + "@aws-sdk/types": "3.468.0", + "@smithy/node-config-provider": "^2.1.8", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { @@ -1406,11 +1380,16 @@ } }, "node_modules/@aws-sdk/core": { - "version": "3.436.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.436.0.tgz", - "integrity": "sha512-vX5/LjXvCejC2XUY6TSg1oozjqK6BvkE75t0ys9dgqyr5PlZyZksMoeAFHUlj0sCjhT3ziWCujP1oiSpPWY9hg==", + "version": "3.474.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.474.0.tgz", + "integrity": "sha512-eVRdeB+AoTNSzfc4viHfr0jfkHujSlf4ToExJtTuxS1wlgmIyyxRNrVKxbf0K78YK/TXRsRlJPoS5QCD5h1S2w==", "dependencies": { - "@smithy/smithy-client": "^2.1.12" + "@smithy/core": "^1.1.0", + "@smithy/protocol-http": "^3.0.11", + "@smithy/signature-v4": "^2.0.0", + "@smithy/smithy-client": "^2.1.18", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" @@ -1658,15 +1637,15 @@ } }, "node_modules/@aws-sdk/middleware-bucket-endpoint": { - "version": "3.433.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-bucket-endpoint/-/middleware-bucket-endpoint-3.433.0.tgz", - "integrity": "sha512-Lk1xIu2tWTRa1zDw5hCF1RrpWQYSodUhrS/q3oKz8IAoFqEy+lNaD5jx+fycuZb5EkE4IzWysT+8wVkd0mAnOg==", - "dependencies": { - "@aws-sdk/types": "3.433.0", - "@aws-sdk/util-arn-parser": "3.310.0", - "@smithy/node-config-provider": "^2.1.3", - "@smithy/protocol-http": "^3.0.8", - "@smithy/types": "^2.4.0", + "version": "3.470.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-bucket-endpoint/-/middleware-bucket-endpoint-3.470.0.tgz", + "integrity": "sha512-vLXXNWtsRmEIwzJ9HUQfIuTNAsEzvCv0Icsnkvt2BiBZXnmHdp2vIC3e3+kfy1D7dVQloXqMmnfcLu/BUMu2Jw==", + "dependencies": { + "@aws-sdk/types": "3.468.0", + "@aws-sdk/util-arn-parser": "3.465.0", + "@smithy/node-config-provider": "^2.1.8", + "@smithy/protocol-http": "^3.0.11", + "@smithy/types": "^2.7.0", "@smithy/util-config-provider": "^2.0.0", "tslib": "^2.5.0" }, @@ -1675,13 +1654,13 @@ } }, "node_modules/@aws-sdk/middleware-expect-continue": { - "version": "3.433.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-expect-continue/-/middleware-expect-continue-3.433.0.tgz", - "integrity": "sha512-Uq2rPIsjz0CR2sulM/HyYr5WiqiefrSRLdwUZuA7opxFSfE808w5DBWSprHxbH3rbDSQR4nFiOiVYIH8Eth7nA==", + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-expect-continue/-/middleware-expect-continue-3.468.0.tgz", + "integrity": "sha512-/wmLjmfgeulxhhmnxX3X3N933TvGsYckVIFjAtDSpLjqkbwzEcNiLq7AdmNJ4BfxG0MCMgcht561DCCD19x8Bg==", "dependencies": { - "@aws-sdk/types": "3.433.0", - "@smithy/protocol-http": "^3.0.8", - "@smithy/types": "^2.4.0", + "@aws-sdk/types": "3.468.0", + "@smithy/protocol-http": "^3.0.11", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { @@ -1689,17 +1668,17 @@ } }, "node_modules/@aws-sdk/middleware-flexible-checksums": { - "version": "3.433.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-flexible-checksums/-/middleware-flexible-checksums-3.433.0.tgz", - "integrity": "sha512-Ptssx373+I7EzFUWjp/i/YiNFt6I6sDuRHz6DOUR9nmmRTlHHqmdcBXlJL2d9wwFxoBRCN8/PXGsTc/DJ4c95Q==", + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-flexible-checksums/-/middleware-flexible-checksums-3.468.0.tgz", + "integrity": "sha512-LQwL/N5MCj3Y5keLLewHTqeAXUIMsHFZyxDXRm/uxrOon9ufLKDvGvzAmfwn1/CuSUo66ZfT8VPSA4BsC90RtA==", "dependencies": { "@aws-crypto/crc32": "3.0.0", "@aws-crypto/crc32c": "3.0.0", - "@aws-sdk/types": "3.433.0", + "@aws-sdk/types": "3.468.0", "@smithy/is-array-buffer": "^2.0.0", - "@smithy/protocol-http": "^3.0.8", - "@smithy/types": "^2.4.0", - "@smithy/util-utf8": "^2.0.0", + "@smithy/protocol-http": "^3.0.11", + "@smithy/types": "^2.7.0", + "@smithy/util-utf8": "^2.0.2", "tslib": "^2.5.0" }, "engines": { @@ -1731,12 +1710,12 @@ } }, "node_modules/@aws-sdk/middleware-location-constraint": { - "version": "3.433.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-location-constraint/-/middleware-location-constraint-3.433.0.tgz", - "integrity": "sha512-2YD860TGntwZifIUbxm+lFnNJJhByR/RB/+fV1I8oGKg+XX2rZU+94pRfHXRywoZKlCA0L+LGDA1I56jxrB9sw==", + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-location-constraint/-/middleware-location-constraint-3.468.0.tgz", + "integrity": "sha512-0gBX/lDynQr4YIhM9h1dVnkVWqrg+34iOCVIUq8jHxzUzgZWglGkG9lHGGg0r1xkLTmegeoo1OKH8wrQ6n33Cg==", "dependencies": { - "@aws-sdk/types": "3.433.0", - "@smithy/types": "^2.4.0", + "@aws-sdk/types": "3.468.0", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { @@ -1791,15 +1770,18 @@ } }, "node_modules/@aws-sdk/middleware-sdk-s3": { - "version": "3.433.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-sdk-s3/-/middleware-sdk-s3-3.433.0.tgz", - "integrity": "sha512-mkn3DiSuMVh4NTLsduC42Av+ApcOor52LMoQY0Wc6M5Mx7Xd05U+G1j8sjI9n/1bs5cZ/PoeRYJ/9bL1Xxznnw==", - "dependencies": { - "@aws-sdk/types": "3.433.0", - "@aws-sdk/util-arn-parser": "3.310.0", - "@smithy/protocol-http": "^3.0.8", - "@smithy/smithy-client": "^2.1.12", - "@smithy/types": "^2.4.0", + "version": "3.474.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-sdk-s3/-/middleware-sdk-s3-3.474.0.tgz", + "integrity": "sha512-62aAo/8u5daIabeJ+gseYeHeShe9eYH6mH+kfWmLsHybXCCv1EaD/ZkdXWNhL0HZ3bUI1z1SF1p8jjTAWALnwA==", + "dependencies": { + "@aws-sdk/types": "3.468.0", + "@aws-sdk/util-arn-parser": "3.465.0", + "@smithy/node-config-provider": "^2.1.8", + "@smithy/protocol-http": "^3.0.11", + "@smithy/signature-v4": "^2.0.0", + "@smithy/smithy-client": "^2.1.18", + "@smithy/types": "^2.7.0", + "@smithy/util-config-provider": "^2.0.0", "tslib": "^2.5.0" }, "engines": { @@ -1858,12 +1840,12 @@ } }, "node_modules/@aws-sdk/middleware-ssec": { - "version": "3.433.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-ssec/-/middleware-ssec-3.433.0.tgz", - "integrity": "sha512-2AMaPx0kYfCiekxoL7aqFqSSoA9du+yI4zefpQNLr+1cZOerYiDxdsZ4mbqStR1CVFaX6U6hrYokXzjInsvETw==", + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-ssec/-/middleware-ssec-3.468.0.tgz", + "integrity": "sha512-y1qLW24wRkOGBTK5d6eJXf6d8HYo4rzT4a1mNDN1rd18NSffwQ6Yke5qeUiIaxa0y/l+FvvNYErbhYtij2rJoQ==", "dependencies": { - "@aws-sdk/types": "3.433.0", - "@smithy/types": "^2.4.0", + "@aws-sdk/types": "3.468.0", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { @@ -1910,14 +1892,15 @@ } }, "node_modules/@aws-sdk/signature-v4-multi-region": { - "version": "3.437.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/signature-v4-multi-region/-/signature-v4-multi-region-3.437.0.tgz", - "integrity": "sha512-MmrqudssOs87JgVg7HGVdvJws/t4kcOrJJd+975ki+DPeSoyK2U4zBDfDkJ+n0tFuZBs3sLwLh0QXE7BV28rRA==", + "version": "3.474.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/signature-v4-multi-region/-/signature-v4-multi-region-3.474.0.tgz", + "integrity": "sha512-93OWRQgTJZASXLrlUNX7mmXknNkYxFYldRLARmYQccONmnIqgYQW0lQj8BFwqkHJTzSMik3/UsU0SHKwZ9ynYA==", "dependencies": { - "@aws-sdk/types": "3.433.0", - "@smithy/protocol-http": "^3.0.8", + "@aws-sdk/middleware-sdk-s3": "3.474.0", + "@aws-sdk/types": "3.468.0", + "@smithy/protocol-http": "^3.0.11", "@smithy/signature-v4": "^2.0.0", - "@smithy/types": "^2.4.0", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { @@ -1980,11 +1963,11 @@ } }, "node_modules/@aws-sdk/types": { - "version": "3.433.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.433.0.tgz", - "integrity": "sha512-0jEE2mSrNDd8VGFjTc1otYrwYPIkzZJEIK90ZxisKvQ/EURGBhNzWn7ejWB9XCMFT6XumYLBR0V9qq5UPisWtA==", + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.468.0.tgz", + "integrity": "sha512-rx/9uHI4inRbp2tw3Y4Ih4PNZkVj32h7WneSg3MVgVjAoVD5Zti9KhS5hkvsBxfgmQmg0AQbE+b1sy5WGAgntA==", "dependencies": { - "@smithy/types": "^2.4.0", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { @@ -1992,9 +1975,9 @@ } }, "node_modules/@aws-sdk/util-arn-parser": { - "version": "3.310.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-arn-parser/-/util-arn-parser-3.310.0.tgz", - "integrity": "sha512-jL8509owp/xB9+Or0pvn3Fe+b94qfklc2yPowZZIFAkFcCSIdkIglz18cPDWnYAcy9JGewpMS1COXKIUhZkJsA==", + "version": "3.465.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-arn-parser/-/util-arn-parser-3.465.0.tgz", + "integrity": "sha512-zOJ82vzDJFqBX9yZBlNeHHrul/kpx/DCoxzW5UBbZeb26kfV53QhMSoEmY8/lEbBqlqargJ/sgRC845GFhHNQw==", "dependencies": { "tslib": "^2.5.0" }, @@ -2095,9 +2078,11 @@ } }, "node_modules/@aws-sdk/xml-builder": { - "version": "3.310.0", - "license": "Apache-2.0", + "version": "3.472.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/xml-builder/-/xml-builder-3.472.0.tgz", + "integrity": "sha512-PwjVxz1hr9up8QkddabuScPZ/d5aDHgvHYgK4acHYzltXL4wngfvimi5ZqXTzVWF2QANxHmWnHUr45QJX71oJQ==", "dependencies": { + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { @@ -4164,11 +4149,11 @@ } }, "node_modules/@smithy/abort-controller": { - "version": "2.0.15", - "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-2.0.15.tgz", - "integrity": "sha512-JkS36PIS3/UCbq/MaozzV7jECeL+BTt4R75bwY8i+4RASys4xOyUS1HsRyUNSqUXFP4QyCz5aNnh3ltuaxv+pw==", + "version": "2.0.16", + "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-2.0.16.tgz", + "integrity": "sha512-4foO7738k8kM9flMHu3VLabqu7nPgvIj8TB909S0CnKx0YZz/dcDH3pZ/4JHdatfxlZdKF1JWOYCw9+v3HVVsw==", "dependencies": { - "@smithy/types": "^2.7.0", + "@smithy/types": "^2.8.0", "tslib": "^2.5.0" }, "engines": { @@ -4207,6 +4192,24 @@ "node": ">=14.0.0" } }, + "node_modules/@smithy/core": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@smithy/core/-/core-1.2.2.tgz", + "integrity": "sha512-uLjrskLT+mWb0emTR5QaiAIxVEU7ndpptDaVDrTwwhD+RjvHhjIiGQ3YL5jKk1a5VSDQUA2RGkXvJ6XKRcz6Dg==", + "dependencies": { + "@smithy/middleware-endpoint": "^2.3.0", + "@smithy/middleware-retry": "^2.0.26", + "@smithy/middleware-serde": "^2.0.16", + "@smithy/protocol-http": "^3.0.12", + "@smithy/smithy-client": "^2.2.1", + "@smithy/types": "^2.8.0", + "@smithy/util-middleware": "^2.0.9", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/@smithy/credential-provider-imds": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-2.1.4.tgz", @@ -4223,23 +4226,23 @@ } }, "node_modules/@smithy/eventstream-codec": { - "version": "2.0.13", - "resolved": "https://registry.npmjs.org/@smithy/eventstream-codec/-/eventstream-codec-2.0.13.tgz", - "integrity": "sha512-CExbelIYp+DxAHG8RIs0l9QL7ElqhG4ym9BNoSpkPa4ptBQfzJdep3LbOSVJIE2VUdBAeObdeL6EDB3Jo85n3g==", + "version": "2.0.16", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-codec/-/eventstream-codec-2.0.16.tgz", + "integrity": "sha512-umYh5pdCE9GHgiMAH49zu9wXWZKNHHdKPm/lK22WYISTjqu29SepmpWNmPiBLy/yUu4HFEGJHIFrDWhbDlApaw==", "dependencies": { "@aws-crypto/crc32": "3.0.0", - "@smithy/types": "^2.5.0", + "@smithy/types": "^2.8.0", "@smithy/util-hex-encoding": "^2.0.0", "tslib": "^2.5.0" } }, "node_modules/@smithy/eventstream-serde-browser": { - "version": "2.0.13", - "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-browser/-/eventstream-serde-browser-2.0.13.tgz", - "integrity": "sha512-OJ/2g/VxkzA+mYZxV102oX3CsiE+igTSmqq/ir3oEVG2kSIdRC00ryttj/lmL14W06ExNi0ysmfLxQkL8XrAZQ==", + "version": "2.0.16", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-browser/-/eventstream-serde-browser-2.0.16.tgz", + "integrity": "sha512-W+BdiN728R57KuZOcG0GczpIOEFf8S5RP/OdVH7T3FMCy8HU2bBU0vB5xZZR5c00VRdoeWrohNv3XlHoZuGRoA==", "dependencies": { - "@smithy/eventstream-serde-universal": "^2.0.13", - "@smithy/types": "^2.5.0", + "@smithy/eventstream-serde-universal": "^2.0.16", + "@smithy/types": "^2.8.0", "tslib": "^2.5.0" }, "engines": { @@ -4247,11 +4250,11 @@ } }, "node_modules/@smithy/eventstream-serde-config-resolver": { - "version": "2.0.13", - "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-config-resolver/-/eventstream-serde-config-resolver-2.0.13.tgz", - "integrity": "sha512-2BI1CbnYuEvAYoWSeWJtPNygbIKiWeSLxCmDLnyM6wQV32Of7VptiQlaFXPxXp4zqn/rs3ocZ/T29rxE4s4Gsg==", + "version": "2.0.16", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-config-resolver/-/eventstream-serde-config-resolver-2.0.16.tgz", + "integrity": "sha512-8qrE4nh+Tg6m1SMFK8vlzoK+8bUFTlIhXidmmQfASMninXW3Iu0T0bI4YcIk4nLznHZdybQ0qGydIanvVZxzVg==", "dependencies": { - "@smithy/types": "^2.5.0", + "@smithy/types": "^2.8.0", "tslib": "^2.5.0" }, "engines": { @@ -4259,12 +4262,12 @@ } }, "node_modules/@smithy/eventstream-serde-node": { - "version": "2.0.13", - "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-node/-/eventstream-serde-node-2.0.13.tgz", - "integrity": "sha512-7NbFwPafb924elFxCBDvm48jy/DeSrpFbFQN0uN2ThuY5HrEeubikS0t7WMva4Z4EnRoivpbuT0scb9vUIJKoA==", + "version": "2.0.16", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-node/-/eventstream-serde-node-2.0.16.tgz", + "integrity": "sha512-NRNQuOa6mQdFSkqzY0IV37swHWx0SEoKxFtUfdZvfv0AVQPlSw4N7E3kcRSCpnHBr1kCuWWirdDlWcjWuD81MA==", "dependencies": { - "@smithy/eventstream-serde-universal": "^2.0.13", - "@smithy/types": "^2.5.0", + "@smithy/eventstream-serde-universal": "^2.0.16", + "@smithy/types": "^2.8.0", "tslib": "^2.5.0" }, "engines": { @@ -4272,12 +4275,12 @@ } }, "node_modules/@smithy/eventstream-serde-universal": { - "version": "2.0.13", - "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-universal/-/eventstream-serde-universal-2.0.13.tgz", - "integrity": "sha512-j0yFd5UfftM+ia9dxLRbheJDCkCZBHpcEzCsPO8BxVOTbdcX/auVJCv6ov/yvpCKsf4Hv3mOqi0Is1YogM2g3Q==", + "version": "2.0.16", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-universal/-/eventstream-serde-universal-2.0.16.tgz", + "integrity": "sha512-ZyLnGaYQMLc75j9kKEVMJ3X6bdBE9qWxhZdTXM5RIltuytxJC3FaOhawBxjE+IL1enmWSIohHGZCm/pLwEliQA==", "dependencies": { - "@smithy/eventstream-codec": "^2.0.13", - "@smithy/types": "^2.5.0", + "@smithy/eventstream-codec": "^2.0.16", + "@smithy/types": "^2.8.0", "tslib": "^2.5.0" }, "engines": { @@ -4285,25 +4288,25 @@ } }, "node_modules/@smithy/fetch-http-handler": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-2.3.1.tgz", - "integrity": "sha512-6MNk16fqb8EwcYY8O8WxB3ArFkLZ2XppsSNo1h7SQcFdDDwIumiJeO6wRzm7iB68xvsOQzsdQKbdtTieS3hfSQ==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-2.3.2.tgz", + "integrity": "sha512-O9R/OlnAOTsnysuSDjt0v2q6DcSvCz5cCFC/CFAWWcLyBwJDeFyGTCTszgpQTb19+Fi8uRwZE5/3ziAQBFeDMQ==", "dependencies": { - "@smithy/protocol-http": "^3.0.11", - "@smithy/querystring-builder": "^2.0.15", - "@smithy/types": "^2.7.0", + "@smithy/protocol-http": "^3.0.12", + "@smithy/querystring-builder": "^2.0.16", + "@smithy/types": "^2.8.0", "@smithy/util-base64": "^2.0.1", "tslib": "^2.5.0" } }, "node_modules/@smithy/hash-blob-browser": { - "version": "2.0.14", - "resolved": "https://registry.npmjs.org/@smithy/hash-blob-browser/-/hash-blob-browser-2.0.14.tgz", - "integrity": "sha512-yWdghyPJIEqLYsaE7YVgd3YhM7jN4Pv6eJQvTomnMsz5K2qRBlpjUx3T9fKlElp1qdeQ7DNc3sAat4i9CUBO7Q==", + "version": "2.0.17", + "resolved": "https://registry.npmjs.org/@smithy/hash-blob-browser/-/hash-blob-browser-2.0.17.tgz", + "integrity": "sha512-/mPpv1sRiRDdjO4zZuO8be6eeabmg5AVgKDfnmmqkpBtRyMGSJb968fjRuHt+FRAsIGywgIKJFmUUAYjhsi1oQ==", "dependencies": { "@smithy/chunked-blob-reader": "^2.0.0", "@smithy/chunked-blob-reader-native": "^2.0.1", - "@smithy/types": "^2.5.0", + "@smithy/types": "^2.8.0", "tslib": "^2.5.0" } }, @@ -4322,11 +4325,11 @@ } }, "node_modules/@smithy/hash-stream-node": { - "version": "2.0.15", - "resolved": "https://registry.npmjs.org/@smithy/hash-stream-node/-/hash-stream-node-2.0.15.tgz", - "integrity": "sha512-ZZ6kC/pHt5Dc2goXIIyC8uA7A4GUMSzdCynAabnZ3CSSaV6ctP8mlvVkqjPph0O3XzHlx/80gdLrNqi1GDPUsA==", + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/@smithy/hash-stream-node/-/hash-stream-node-2.0.18.tgz", + "integrity": "sha512-OuFk+ITpv8CtxGjQcS8GA04faNycu9UMm6YobvQzjeEoXZ0dLF6sRfuzD+3S8RHPKpTyLuXtKG1+GiJycZ5TcA==", "dependencies": { - "@smithy/types": "^2.5.0", + "@smithy/types": "^2.8.0", "@smithy/util-utf8": "^2.0.2", "tslib": "^2.5.0" }, @@ -4355,11 +4358,11 @@ } }, "node_modules/@smithy/md5-js": { - "version": "2.0.15", - "resolved": "https://registry.npmjs.org/@smithy/md5-js/-/md5-js-2.0.15.tgz", - "integrity": "sha512-pAZaokib56XvhU0t/R9vAcr3L3bMhIakhF25X7EMSQ7LAURiLfce/tgON8I3x/dIbnZUyeRi8f2cx2azu6ATew==", + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/@smithy/md5-js/-/md5-js-2.0.18.tgz", + "integrity": "sha512-bHwZ8/m6RbERQdVW5rJ2LzeW8qxfXv6Q/S7Fiudhso4pWRrksqLx3nsGZw7bmqqfN4zLqkxydxSa9+4c7s5zxg==", "dependencies": { - "@smithy/types": "^2.5.0", + "@smithy/types": "^2.8.0", "@smithy/util-utf8": "^2.0.2", "tslib": "^2.5.0" } @@ -4378,16 +4381,16 @@ } }, "node_modules/@smithy/middleware-endpoint": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-2.2.3.tgz", - "integrity": "sha512-nYfxuq0S/xoAjdLbyn1ixeVB6cyH9wYCMtbbOCpcCRYR5u2mMtqUtVjjPAZ/DIdlK3qe0tpB0Q76szFGNuz+kQ==", - "dependencies": { - "@smithy/middleware-serde": "^2.0.15", - "@smithy/node-config-provider": "^2.1.8", - "@smithy/shared-ini-file-loader": "^2.2.7", - "@smithy/types": "^2.7.0", - "@smithy/url-parser": "^2.0.15", - "@smithy/util-middleware": "^2.0.8", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-2.3.0.tgz", + "integrity": "sha512-VsOAG2YQ8ykjSmKO+CIXdJBIWFo6AAvG6Iw95BakBTqk66/4BI7XyqLevoNSq/lZ6NgZv24sLmrcIN+fLDWBCg==", + "dependencies": { + "@smithy/middleware-serde": "^2.0.16", + "@smithy/node-config-provider": "^2.1.9", + "@smithy/shared-ini-file-loader": "^2.2.8", + "@smithy/types": "^2.8.0", + "@smithy/url-parser": "^2.0.16", + "@smithy/util-middleware": "^2.0.9", "tslib": "^2.5.0" }, "engines": { @@ -4395,17 +4398,17 @@ } }, "node_modules/@smithy/middleware-retry": { - "version": "2.0.25", - "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-2.0.25.tgz", - "integrity": "sha512-FXhafCPvx/9L9OgHJ3cdo/pD1f7ngC7DKsjDV2J7k6LO/Yl69POoBLk4sI1OZPUGc4dfxriENlTma9Nj1hI+IQ==", - "dependencies": { - "@smithy/node-config-provider": "^2.1.8", - "@smithy/protocol-http": "^3.0.11", - "@smithy/service-error-classification": "^2.0.8", - "@smithy/smithy-client": "^2.2.0", - "@smithy/types": "^2.7.0", - "@smithy/util-middleware": "^2.0.8", - "@smithy/util-retry": "^2.0.8", + "version": "2.0.26", + "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-2.0.26.tgz", + "integrity": "sha512-Qzpxo0U5jfNiq9iD38U3e2bheXwvTEX4eue9xruIvEgh+UKq6dKuGqcB66oBDV7TD/mfoJi9Q/VmaiqwWbEp7A==", + "dependencies": { + "@smithy/node-config-provider": "^2.1.9", + "@smithy/protocol-http": "^3.0.12", + "@smithy/service-error-classification": "^2.0.9", + "@smithy/smithy-client": "^2.2.1", + "@smithy/types": "^2.8.0", + "@smithy/util-middleware": "^2.0.9", + "@smithy/util-retry": "^2.0.9", "tslib": "^2.5.0", "uuid": "^8.3.2" }, @@ -4422,11 +4425,11 @@ } }, "node_modules/@smithy/middleware-serde": { - "version": "2.0.15", - "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-2.0.15.tgz", - "integrity": "sha512-FOZRFk/zN4AT4wzGuBY+39XWe+ZnCFd0gZtyw3f9Okn2CJPixl9GyWe98TIaljeZdqWkgrzGyPre20AcW2UMHQ==", + "version": "2.0.16", + "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-2.0.16.tgz", + "integrity": "sha512-5EAd4t30pcc4M8TSSGq7q/x5IKrxfXR5+SrU4bgxNy7RPHQo2PSWBUco9C+D9Tfqp/JZvprRpK42dnupZafk2g==", "dependencies": { - "@smithy/types": "^2.7.0", + "@smithy/types": "^2.8.0", "tslib": "^2.5.0" }, "engines": { @@ -4434,11 +4437,11 @@ } }, "node_modules/@smithy/middleware-stack": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-2.0.9.tgz", - "integrity": "sha512-bCB5dUtGQ5wh7QNL2ELxmDc6g7ih7jWU3Kx6MYH1h4mZbv9xL3WyhKHojRltThCB1arLPyTUFDi+x6fB/oabtA==", + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-2.0.10.tgz", + "integrity": "sha512-I2rbxctNq9FAPPEcuA1ntZxkTKOPQFy7YBPOaD/MLg1zCvzv21CoNxR0py6J8ZVC35l4qE4nhxB0f7TF5/+Ldw==", "dependencies": { - "@smithy/types": "^2.7.0", + "@smithy/types": "^2.8.0", "tslib": "^2.5.0" }, "engines": { @@ -4446,13 +4449,13 @@ } }, "node_modules/@smithy/node-config-provider": { - "version": "2.1.8", - "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-2.1.8.tgz", - "integrity": "sha512-+w26OKakaBUGp+UG+dxYZtFb5fs3tgHg3/QrRrmUZj+rl3cIuw840vFUXX35cVPTUCQIiTqmz7CpVF7+hdINdQ==", + "version": "2.1.9", + "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-2.1.9.tgz", + "integrity": "sha512-tUyW/9xrRy+s7RXkmQhgYkAPMpTIF8izK4orhHjNFEKR3QZiOCbWB546Y8iB/Fpbm3O9+q0Af9rpywLKJOwtaQ==", "dependencies": { - "@smithy/property-provider": "^2.0.16", - "@smithy/shared-ini-file-loader": "^2.2.7", - "@smithy/types": "^2.7.0", + "@smithy/property-provider": "^2.0.17", + "@smithy/shared-ini-file-loader": "^2.2.8", + "@smithy/types": "^2.8.0", "tslib": "^2.5.0" }, "engines": { @@ -4460,14 +4463,14 @@ } }, "node_modules/@smithy/node-http-handler": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-2.2.1.tgz", - "integrity": "sha512-8iAKQrC8+VFHPAT8pg4/j6hlsTQh+NKOWlctJBrYtQa4ExcxX7aSg3vdQ2XLoYwJotFUurg/NLqFCmZaPRrogw==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-2.2.2.tgz", + "integrity": "sha512-XO58TO/Eul/IBQKFKaaBtXJi0ItEQQCT+NI4IiKHCY/4KtqaUT6y/wC1EvDqlA9cP7Dyjdj7FdPs4DyynH3u7g==", "dependencies": { - "@smithy/abort-controller": "^2.0.15", - "@smithy/protocol-http": "^3.0.11", - "@smithy/querystring-builder": "^2.0.15", - "@smithy/types": "^2.7.0", + "@smithy/abort-controller": "^2.0.16", + "@smithy/protocol-http": "^3.0.12", + "@smithy/querystring-builder": "^2.0.16", + "@smithy/types": "^2.8.0", "tslib": "^2.5.0" }, "engines": { @@ -4475,11 +4478,11 @@ } }, "node_modules/@smithy/property-provider": { - "version": "2.0.16", - "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-2.0.16.tgz", - "integrity": "sha512-28Ky0LlOqtEjwg5CdHmwwaDRHcTWfPRzkT6HrhwOSRS2RryAvuDfJrZpM+BMcrdeCyEg1mbcgIMoqTla+rdL8Q==", + "version": "2.0.17", + "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-2.0.17.tgz", + "integrity": "sha512-+VkeZbVu7qtQ2DjI48Qwaf9fPOr3gZIwxQpuLJgRRSkWsdSvmaTCxI3gzRFKePB63Ts9r4yjn4HkxSCSkdWmcQ==", "dependencies": { - "@smithy/types": "^2.7.0", + "@smithy/types": "^2.8.0", "tslib": "^2.5.0" }, "engines": { @@ -4487,11 +4490,11 @@ } }, "node_modules/@smithy/protocol-http": { - "version": "3.0.11", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-3.0.11.tgz", - "integrity": "sha512-3ziB8fHuXIRamV/akp/sqiWmNPR6X+9SB8Xxnozzj+Nq7hSpyKdFHd1FLpBkgfGFUTzzcBJQlDZPSyxzmdcx5A==", + "version": "3.0.12", + "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-3.0.12.tgz", + "integrity": "sha512-Xz4iaqLiaBfbQpB9Hgi3VcZYbP7xRDXYhd8XWChh4v94uw7qwmvlxdU5yxzfm6ACJM66phHrTbS5TVvj5uQ72w==", "dependencies": { - "@smithy/types": "^2.7.0", + "@smithy/types": "^2.8.0", "tslib": "^2.5.0" }, "engines": { @@ -4499,11 +4502,11 @@ } }, "node_modules/@smithy/querystring-builder": { - "version": "2.0.15", - "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-2.0.15.tgz", - "integrity": "sha512-e1q85aT6HutvouOdN+dMsN0jcdshp50PSCvxDvo6aIM57LqeXimjfONUEgfqQ4IFpYWAtVixptyIRE5frMp/2A==", + "version": "2.0.16", + "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-2.0.16.tgz", + "integrity": "sha512-Q/GsJT0C0mijXMRs7YhZLLCP5FcuC4797lYjKQkME5CZohnLC4bEhylAd2QcD3gbMKNjCw8+T2I27WKiV/wToA==", "dependencies": { - "@smithy/types": "^2.7.0", + "@smithy/types": "^2.8.0", "@smithy/util-uri-escape": "^2.0.0", "tslib": "^2.5.0" }, @@ -4512,11 +4515,11 @@ } }, "node_modules/@smithy/querystring-parser": { - "version": "2.0.15", - "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-2.0.15.tgz", - "integrity": "sha512-jbBvoK3cc81Cj1c1TH1qMYxNQKHrYQ2DoTntN9FBbtUWcGhc+T4FP6kCKYwRLXyU4AajwGIZstvNAmIEgUUNTQ==", + "version": "2.0.16", + "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-2.0.16.tgz", + "integrity": "sha512-c4ueAuL6BDYKWpkubjrQthZKoC3L5kql5O++ovekNxiexRXTlLIVlCR4q3KziOktLIw66EU9SQljPXd/oN6Okg==", "dependencies": { - "@smithy/types": "^2.7.0", + "@smithy/types": "^2.8.0", "tslib": "^2.5.0" }, "engines": { @@ -4524,22 +4527,22 @@ } }, "node_modules/@smithy/service-error-classification": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-2.0.8.tgz", - "integrity": "sha512-jCw9+005im8tsfYvwwSc4TTvd29kXRFkH9peQBg5R/4DD03ieGm6v6Hpv9nIAh98GwgYg1KrztcINC1s4o7/hg==", + "version": "2.0.9", + "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-2.0.9.tgz", + "integrity": "sha512-0K+8GvtwI7VkGmmInPydM2XZyBfIqLIbfR7mDQ+oPiz8mIinuHbV6sxOLdvX1Jv/myk7XTK9orgt3tuEpBu/zg==", "dependencies": { - "@smithy/types": "^2.7.0" + "@smithy/types": "^2.8.0" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@smithy/shared-ini-file-loader": { - "version": "2.2.7", - "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-2.2.7.tgz", - "integrity": "sha512-0Qt5CuiogIuvQIfK+be7oVHcPsayLgfLJGkPlbgdbl0lD28nUKu4p11L+UG3SAEsqc9UsazO+nErPXw7+IgDpQ==", + "version": "2.2.8", + "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-2.2.8.tgz", + "integrity": "sha512-E62byatbwSWrtq9RJ7xN40tqrRKDGrEL4EluyNpaIDvfvet06a/QC58oHw2FgVaEgkj0tXZPjZaKrhPfpoU0qw==", "dependencies": { - "@smithy/types": "^2.7.0", + "@smithy/types": "^2.8.0", "tslib": "^2.5.0" }, "engines": { @@ -4565,15 +4568,15 @@ } }, "node_modules/@smithy/smithy-client": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-2.2.0.tgz", - "integrity": "sha512-C/bkNue5H5Obgl83SnlBt4v6VM68CqIjIELh3vAabud87xFYznLNKtj6Qb69Z+QOnLp9T+We++sEem/f2AHE+Q==", - "dependencies": { - "@smithy/middleware-endpoint": "^2.2.3", - "@smithy/middleware-stack": "^2.0.9", - "@smithy/protocol-http": "^3.0.11", - "@smithy/types": "^2.7.0", - "@smithy/util-stream": "^2.0.23", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-2.2.1.tgz", + "integrity": "sha512-SpD7FLK92XV2fon2hMotaNDa2w5VAy5/uVjP9WFmjGSgWM8pTPVkHcDl1yFs5Z8LYbij0FSz+DbCBK6i+uXXUA==", + "dependencies": { + "@smithy/middleware-endpoint": "^2.3.0", + "@smithy/middleware-stack": "^2.0.10", + "@smithy/protocol-http": "^3.0.12", + "@smithy/types": "^2.8.0", + "@smithy/util-stream": "^2.0.24", "tslib": "^2.5.0" }, "engines": { @@ -4581,9 +4584,9 @@ } }, "node_modules/@smithy/types": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.7.0.tgz", - "integrity": "sha512-1OIFyhK+vOkMbu4aN2HZz/MomREkrAC/HqY5mlJMUJfGrPRwijJDTeiN8Rnj9zUaB8ogXAfIOtZrrgqZ4w7Wnw==", + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.8.0.tgz", + "integrity": "sha512-h9sz24cFgt/W1Re22OlhQKmUZkNh244ApgRsUDYinqF8R+QgcsBIX344u2j61TPshsTz3CvL6HYU1DnQdsSrHA==", "dependencies": { "tslib": "^2.5.0" }, @@ -4592,12 +4595,12 @@ } }, "node_modules/@smithy/url-parser": { - "version": "2.0.15", - "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-2.0.15.tgz", - "integrity": "sha512-sADUncUj9rNbOTrdDGm4EXlUs0eQ9dyEo+V74PJoULY4jSQxS+9gwEgsPYyiu8PUOv16JC/MpHonOgqP/IEDZA==", + "version": "2.0.16", + "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-2.0.16.tgz", + "integrity": "sha512-Wfz5WqAoRT91TjRy1JeLR0fXtkIXHGsMbgzKFTx7E68SrZ55TB8xoG+vm11Ru4gheFTMXjAjwAxv1jQdC+pAQA==", "dependencies": { - "@smithy/querystring-parser": "^2.0.15", - "@smithy/types": "^2.7.0", + "@smithy/querystring-parser": "^2.0.16", + "@smithy/types": "^2.8.0", "tslib": "^2.5.0" } }, @@ -4712,11 +4715,11 @@ } }, "node_modules/@smithy/util-middleware": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-2.0.8.tgz", - "integrity": "sha512-qkvqQjM8fRGGA8P2ydWylMhenCDP8VlkPn8kiNuFEaFz9xnUKC2irfqsBSJrfrOB9Qt6pQsI58r3zvvumhFMkw==", + "version": "2.0.9", + "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-2.0.9.tgz", + "integrity": "sha512-PnCnBJ07noMX1lMDTEefmxSlusWJUiLfrme++MfK5TD0xz8NYmakgoXy5zkF/16zKGmiwOeKAztWT/Vjk1KRIQ==", "dependencies": { - "@smithy/types": "^2.7.0", + "@smithy/types": "^2.8.0", "tslib": "^2.5.0" }, "engines": { @@ -4724,12 +4727,12 @@ } }, "node_modules/@smithy/util-retry": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-2.0.8.tgz", - "integrity": "sha512-cQTPnVaVFMjjS6cb44WV2yXtHVyXDC5icKyIbejMarJEApYeJWpBU3LINTxHqp/tyLI+MZOUdosr2mZ3sdziNg==", + "version": "2.0.9", + "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-2.0.9.tgz", + "integrity": "sha512-46BFWe9RqB6g7f4mxm3W3HlqknqQQmWHKlhoqSFZuGNuiDU5KqmpebMbvC3tjTlUkqn4xa2Z7s3Hwb0HNs5scw==", "dependencies": { - "@smithy/service-error-classification": "^2.0.8", - "@smithy/types": "^2.7.0", + "@smithy/service-error-classification": "^2.0.9", + "@smithy/types": "^2.8.0", "tslib": "^2.5.0" }, "engines": { @@ -4737,13 +4740,13 @@ } }, "node_modules/@smithy/util-stream": { - "version": "2.0.23", - "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-2.0.23.tgz", - "integrity": "sha512-OJMWq99LAZJUzUwTk+00plyxX3ESktBaGPhqNIEVab+53gLULiWN9B/8bRABLg0K6R6Xg4t80uRdhk3B/LZqMQ==", + "version": "2.0.24", + "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-2.0.24.tgz", + "integrity": "sha512-hRpbcRrOxDriMVmbya+Mv77VZVupxRAsfxVDKS54XuiURhdiwCUXJP0X1iJhHinuUf6n8pBF0MkG9C8VooMnWw==", "dependencies": { - "@smithy/fetch-http-handler": "^2.3.1", - "@smithy/node-http-handler": "^2.2.1", - "@smithy/types": "^2.7.0", + "@smithy/fetch-http-handler": "^2.3.2", + "@smithy/node-http-handler": "^2.2.2", + "@smithy/types": "^2.8.0", "@smithy/util-base64": "^2.0.1", "@smithy/util-buffer-from": "^2.0.0", "@smithy/util-hex-encoding": "^2.0.0", @@ -4778,12 +4781,12 @@ } }, "node_modules/@smithy/util-waiter": { - "version": "2.0.13", - "resolved": "https://registry.npmjs.org/@smithy/util-waiter/-/util-waiter-2.0.13.tgz", - "integrity": "sha512-YovIQatiuM7giEsRFotqJa2i3EbU2EE3PgtpXgtLgpx5rXiZMAwPxXYDFVFhuO0lbqvc/Zx4n+ZIisXOHPSqyg==", + "version": "2.0.16", + "resolved": "https://registry.npmjs.org/@smithy/util-waiter/-/util-waiter-2.0.16.tgz", + "integrity": "sha512-5i4YONHQ6HoUWDd+X0frpxTXxSXgJhUFl+z0iMy/zpUmVeCQY2or3Vss6DzHKKMMQL4pmVHpQm9WayHDorFdZg==", "dependencies": { - "@smithy/abort-controller": "^2.0.13", - "@smithy/types": "^2.5.0", + "@smithy/abort-controller": "^2.0.16", + "@smithy/types": "^2.8.0", "tslib": "^2.5.0" }, "engines": { diff --git a/package.json b/package.json index 114751ab69..321dea364b 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "dependencies": { "@amplitude/ua-parser-js": "^0.7.24", "@aws-sdk/client-personalize": "^3.470.0", - "@aws-sdk/client-s3": "^3.438.0", + "@aws-sdk/client-s3": "^3.474.0", "@aws-sdk/credential-providers": "^3.391.0", "@aws-sdk/lib-storage": "^3.456.0", "@bugsnag/js": "^7.20.2", From d9ebfe741ea83bda37c23e7932fe78bc5e286001 Mon Sep 17 00:00:00 2001 From: Sandeep Digumarty Date: Mon, 8 Jan 2024 11:00:31 +0530 Subject: [PATCH 119/135] chore: upgrade @aws-sdk/lib-storage from 3.456.0 to 3.474.0 (#2973) fix: upgrade @aws-sdk/lib-storage from 3.456.0 to 3.474.0 Snyk has created this PR to upgrade @aws-sdk/lib-storage from 3.456.0 to 3.474.0. See this package in npm: https://www.npmjs.com/package/@aws-sdk/lib-storage See this project in Snyk: https://app.snyk.io/org/sandeep-L8FvsjCG7mBBqonjSmN48c/project/4b0f037e-0dab-4719-aeee-b46d2ae82119?utm_source=github&utm_medium=referral&page=upgrade-pr Co-authored-by: snyk-bot --- package-lock.json | 12 ++++++------ package.json | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index d17df96ca0..4febb31241 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "@aws-sdk/client-personalize": "^3.470.0", "@aws-sdk/client-s3": "^3.474.0", "@aws-sdk/credential-providers": "^3.391.0", - "@aws-sdk/lib-storage": "^3.456.0", + "@aws-sdk/lib-storage": "^3.474.0", "@bugsnag/js": "^7.20.2", "@datadog/pprof": "^3.1.0", "@koa/router": "^12.0.0", @@ -1617,13 +1617,13 @@ } }, "node_modules/@aws-sdk/lib-storage": { - "version": "3.456.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/lib-storage/-/lib-storage-3.456.0.tgz", - "integrity": "sha512-S1h7DcH8u+CL6kobVgorgm0X0u+gQwjefbDuRrPF0qtpzvPprabRe4t3yt4VKuhjvegxKMVL/sdw817gLGoPdA==", + "version": "3.474.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/lib-storage/-/lib-storage-3.474.0.tgz", + "integrity": "sha512-cTfoBZmzC6OyXFzBOlzo3nFK10oTY/JJiXIzHLHkU5Oy9z4V3CvQlVqkFjbkguG4plYvPTT+2xPeNi45NYagqQ==", "dependencies": { "@smithy/abort-controller": "^2.0.1", - "@smithy/middleware-endpoint": "^2.2.0", - "@smithy/smithy-client": "^2.1.15", + "@smithy/middleware-endpoint": "^2.2.3", + "@smithy/smithy-client": "^2.1.18", "buffer": "5.6.0", "events": "3.3.0", "stream-browserify": "3.0.0", diff --git a/package.json b/package.json index 321dea364b..311a5c0093 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,7 @@ "@aws-sdk/client-personalize": "^3.470.0", "@aws-sdk/client-s3": "^3.474.0", "@aws-sdk/credential-providers": "^3.391.0", - "@aws-sdk/lib-storage": "^3.456.0", + "@aws-sdk/lib-storage": "^3.474.0", "@bugsnag/js": "^7.20.2", "@datadog/pprof": "^3.1.0", "@koa/router": "^12.0.0", From d4e0ae32487a6e7d25a88260392d1074a6dfa2ce Mon Sep 17 00:00:00 2001 From: Sandeep Digumarty Date: Mon, 8 Jan 2024 11:01:01 +0530 Subject: [PATCH 120/135] chore: security upgrade axios from 1.6.0 to 1.6.4 (#2969) fix: package.json & package-lock.json to reduce vulnerabilities The following vulnerabilities are fixed with an upgrade: - https://snyk.io/vuln/SNYK-JS-AXIOS-6144788 Co-authored-by: snyk-bot --- package-lock.json | 15 ++++++++------- package.json | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4febb31241..08cedcb7d4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,7 +24,7 @@ "ajv": "^8.12.0", "ajv-draft-04": "^1.0.0", "ajv-formats": "^2.1.1", - "axios": "^1.6.0", + "axios": "^1.6.4", "btoa": "^1.2.1", "component-each": "^0.2.6", "crypto-js": "^4.2.0", @@ -5741,11 +5741,11 @@ "license": "MIT" }, "node_modules/axios": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.0.tgz", - "integrity": "sha512-EZ1DYihju9pwVB+jg67ogm+Tmqc6JmhamRN6I4Zt8DfZu5lbcQGw3ozH9lFejSJgs/ibaef3A9PMXPLeefFGJg==", + "version": "1.6.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.4.tgz", + "integrity": "sha512-heJnIs6N4aa1eSthhN9M5ioILu8Wi8vmQW9iHQ9NUvfkJb0lEEDUiIdQNAuBtfUt3FxReaKdpQA5DbmMOqzF/A==", "dependencies": { - "follow-redirects": "^1.15.0", + "follow-redirects": "^1.15.4", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" } @@ -9988,14 +9988,15 @@ "license": "MIT" }, "node_modules/follow-redirects": { - "version": "1.15.2", + "version": "1.15.4", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.4.tgz", + "integrity": "sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw==", "funding": [ { "type": "individual", "url": "https://github.com/sponsors/RubenVerborgh" } ], - "license": "MIT", "engines": { "node": ">=4.0" }, diff --git a/package.json b/package.json index 311a5c0093..2d04a5c6ff 100644 --- a/package.json +++ b/package.json @@ -69,7 +69,7 @@ "ajv": "^8.12.0", "ajv-draft-04": "^1.0.0", "ajv-formats": "^2.1.1", - "axios": "^1.6.0", + "axios": "^1.6.4", "btoa": "^1.2.1", "component-each": "^0.2.6", "crypto-js": "^4.2.0", From 6a959d4aefca8ad4c0ac6489af4ac0820cf80657 Mon Sep 17 00:00:00 2001 From: devops-github-rudderstack <88187154+devops-github-rudderstack@users.noreply.github.com> Date: Tue, 9 Jan 2024 12:02:16 +0530 Subject: [PATCH 121/135] chore(release): pull release/v1.53.0 into main (#2974) * chore(deps): bump actions/stale from 8.0.0 to 9.0.0 (#2892) Bumps [actions/stale](https://github.com/actions/stale) from 8.0.0 to 9.0.0. - [Release notes](https://github.com/actions/stale/releases) - [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/stale/compare/v8.0.0...v9.0.0) --- updated-dependencies: - dependency-name: actions/stale dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Krishna Chaitanya * chore(deps): bump docker/build-push-action from 4.1.1 to 5.1.0 (#2839) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 4.1.1 to 5.1.0. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/v4.1.1...v5.1.0) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Krishna Chaitanya * chore(deps): bump docker/setup-buildx-action from 2.9.1 to 3.0.0 (#2777) Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2.9.1 to 3.0.0. - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](https://github.com/docker/setup-buildx-action/compare/v2.9.1...v3.0.0) --- updated-dependencies: - dependency-name: docker/setup-buildx-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Krishna Chaitanya * chore(deps): bump actions/setup-node from 3.7.0 to 4.0.0 (#2775) Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3.7.0 to 4.0.0. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/v3.7.0...v4.0.0) --- updated-dependencies: - dependency-name: actions/setup-node dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Krishna Chaitanya * chore(deps): bump actions/checkout from 3.5.3 to 4.1.1 (#2776) Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.3 to 4.1.1. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3.5.3...v4.1.1) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * [Snyk] Upgrade @aws-sdk/client-s3 from 3.370.0 to 3.438.0 (#2838) fix: upgrade @aws-sdk/client-s3 from 3.370.0 to 3.438.0 Snyk has created this PR to upgrade @aws-sdk/client-s3 from 3.370.0 to 3.438.0. See this package in npm: https://www.npmjs.com/package/@aws-sdk/client-s3 See this project in Snyk: https://app.snyk.io/org/datamanagement/project/39f686fe-9e69-4343-a9ce-129e22bff288?utm_source=github&utm_medium=referral&page=upgrade-pr Co-authored-by: snyk-bot Co-authored-by: Sai Kumar Battinoju * chore: upgrade delete old branches action * Update create-hotfix-branch.yml * chore: move destinations to component test suite (#2894) * chore: move clevertap, braze and am * chore: move intercom test cases * chore: add component test cases for marketo and sendgrid * chore: resolve conflicts * chore: add component test cases for destinations without mock (#2910) chore: add component test cases for ga4, stormly, facebook_conversion * chore: add component test cases for some destinations part1 (#2915) * chore: add component test cases for some destinations * chore: add method to network.ts * chore: added component test cases for desitnations part3 (#2927) * chore: added component test cases for desitnations * chore: added component test cases for wootric * chore: add component test cases for some destinations part2 (#2917) * chore: add component test cases for some destinations * chore: added component test cases for desitnations * chore: decrease coverageThreshold in jest.config.js * chore: decrease coverageThreshold in jest.default.config.js * fix: tiktok add missing field brand (#2942) * feat: amplitude add support for unset (#2941) * feat: amplitude add support for unset * Update src/v0/destinations/am/transform.js Co-authored-by: Yashasvi Bajpai <33063622+yashasvibajpai@users.noreply.github.com> * Update src/v0/destinations/am/transform.js Co-authored-by: Yashasvi Bajpai <33063622+yashasvibajpai@users.noreply.github.com> * chore:comment addresed * Update transform.js * chore:comment addresed * chore: added docs * Update utils.js --------- Co-authored-by: Yashasvi Bajpai <33063622+yashasvibajpai@users.noreply.github.com> * chore: upgrade node to 18.19 (#2940) * chore: upgrade node to 18.19 * fix: image name --------- Co-authored-by: Yashasvi Bajpai <33063622+yashasvibajpai@users.noreply.github.com> * feat: pass ip details for factorsAI (#2925) * feat: handle improper type validation sync vulnerability (#2937) * feat: handle improper type validation sync vulnerability * feat: addressed review comments * feat: move intercom to routerTransform (#2964) * chore: add endpoint labels (#2944) * chore: add endpoint labelsx1 * chore: add endpoint labelsx2 * Update src/v0/destinations/active_campaign/transform.js Co-authored-by: Sudip Paul <67197965+ItsSudip@users.noreply.github.com> * Update src/v0/destinations/active_campaign/transform.js Co-authored-by: Sankeerth * chore: fix monday path --------- Co-authored-by: Sudip Paul <67197965+ItsSudip@users.noreply.github.com> Co-authored-by: Sankeerth * chore: add endpoint labels (#2951) chore: add endpoint labelsx3 Co-authored-by: Sudip Paul <67197965+ItsSudip@users.noreply.github.com> * fix: error handling when payload contains toString as key (#2954) * fix: for gainsight px only new users to have default signUp date (#2953) * fix: only new users to have default signUp date * fix: only new users to have default createDate * fix: small edit in comment * fix: small edit in comment * fix: small edit in comment * fix: review comments addressed * feat(sprig): added user deletion support (#2886) * feat(sprig): added user deletion support * chore: destination doc link added for reference * chore: code review changes * chore: code review changes * fix: enhancement and version upgrade of google ads remarketing list (#2945) * fix: enhancement and version upgrade of garl * fix: migrating util to google utils and adding test cases * fix: small edit * Update src/v0/destinations/google_adwords_remarketing_lists/networkHandler.js Co-authored-by: Sudip Paul <67197965+ItsSudip@users.noreply.github.com> * fix: edit test case description --------- Co-authored-by: Sudip Paul <67197965+ItsSudip@users.noreply.github.com> * fix: version upgrade of gaec from 14 to 15 (#2966) * feat: onboard new destination the trade desk (#2918) * feat: onboard new destination the trade desk * feat: onboard trade desk on transformer porxy * feat: add secret from metadata * refactor: remove secretKey from headers in utils * feat: using audienceId from config inplace of segmentName * test: added testcases * test: added testcases * refactor: prepareProxyRequest utility and added delivery test cases * test: add console log * refactor: address review comments * refactor: use existing utility to split batch on size * chore: added mocks * refactor: throw platform error * chore(deps): bump actions/setup-node from 4.0.0 to 4.0.1 (#2950) Bumps [actions/setup-node](https://github.com/actions/setup-node) from 4.0.0 to 4.0.1. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/v4.0.0...v4.0.1) --- updated-dependencies: - dependency-name: actions/setup-node dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump SonarSource/sonarcloud-github-action from 2.0.0 to 2.1.1 (#2931) chore(deps): bump SonarSource/sonarcloud-github-action Bumps [SonarSource/sonarcloud-github-action](https://github.com/sonarsource/sonarcloud-github-action) from 2.0.0 to 2.1.1. - [Release notes](https://github.com/sonarsource/sonarcloud-github-action/releases) - [Commits](https://github.com/sonarsource/sonarcloud-github-action/compare/v2.0.0...v2.1.1) --- updated-dependencies: - dependency-name: SonarSource/sonarcloud-github-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore: upgrade @aws-sdk/client-personalize from 3.414.0 to 3.470.0 (#2962) fix: upgrade @aws-sdk/client-personalize from 3.414.0 to 3.470.0 Snyk has created this PR to upgrade @aws-sdk/client-personalize from 3.414.0 to 3.470.0. See this package in npm: https://www.npmjs.com/package/@aws-sdk/client-personalize See this project in Snyk: https://app.snyk.io/org/sandeep-L8FvsjCG7mBBqonjSmN48c/project/4b0f037e-0dab-4719-aeee-b46d2ae82119?utm_source=github&utm_medium=referral&page=upgrade-pr Co-authored-by: snyk-bot * chore: upgrade @aws-sdk/lib-storage from 3.417.0 to 3.456.0 (#2911) fix: upgrade @aws-sdk/lib-storage from 3.417.0 to 3.456.0 Snyk has created this PR to upgrade @aws-sdk/lib-storage from 3.417.0 to 3.456.0. See this package in npm: https://www.npmjs.com/package/@aws-sdk/lib-storage See this project in Snyk: https://app.snyk.io/org/sandeep-L8FvsjCG7mBBqonjSmN48c/project/4b0f037e-0dab-4719-aeee-b46d2ae82119?utm_source=github&utm_medium=referral&page=upgrade-pr Co-authored-by: snyk-bot * chore(release): 1.53.0 * revert: fix: tiktok add missing field brand (#2977) * Revert "fix: tiktok add missing field brand (#2942)" This reverts commit ca76297147f0a2c12d68d97dda95b9a44efe4020. * chore: update changelog --------- Signed-off-by: dependabot[bot] Co-authored-by: AASHISH MALIK Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Krishna Chaitanya Co-authored-by: nidhilashkari17 <108564211+nidhilashkari17@users.noreply.github.com> Co-authored-by: snyk-bot Co-authored-by: Sai Kumar Battinoju Co-authored-by: chandumlg <54652834+chandumlg@users.noreply.github.com> Co-authored-by: Dilip Kola <33080863+koladilip@users.noreply.github.com> Co-authored-by: Sudip Paul <67197965+ItsSudip@users.noreply.github.com> Co-authored-by: Anant Jain <62471433+anantjain45823@users.noreply.github.com> Co-authored-by: Yashasvi Bajpai <33063622+yashasvibajpai@users.noreply.github.com> Co-authored-by: Sandeep Digumarty Co-authored-by: Mihir Bhalala <77438541+mihir-4116@users.noreply.github.com> Co-authored-by: Sankeerth Co-authored-by: Akash Chetty Co-authored-by: shrouti1507 <60211312+shrouti1507@users.noreply.github.com> Co-authored-by: Gauravudia <60897972+Gauravudia@users.noreply.github.com> Co-authored-by: GitHub Actions --- .github/workflows/build-pr-artifacts.yml | 2 +- .github/workflows/build-push-docker-image.yml | 18 +- .github/workflows/create-hotfix-branch.yml | 2 +- .github/workflows/draft-new-release.yml | 4 +- .github/workflows/housekeeping.yml | 6 +- .github/workflows/prepare-for-dev-deploy.yml | 2 +- .../workflows/prepare-for-prod-dt-deploy.yml | 4 +- .../workflows/prepare-for-prod-ut-deploy.yml | 4 +- .../workflows/prepare-for-staging-deploy.yml | 4 +- .github/workflows/publish-new-release.yml | 4 +- .github/workflows/report-code-coverage.yml | 6 +- .github/workflows/test.yml | 4 +- .gitignore | 3 + .nvmrc | 2 +- CHANGELOG.md | 20 + Dockerfile | 2 +- jest.config.js | 8 +- jest.default.config.js | 8 +- package-lock.json | 5220 +--- package.json | 8 +- src/adapters/network.js | 4 +- .../v2/destinations/the_trade_desk/config.js | 21 + .../the_trade_desk/rtWorkflow.yaml | 17 + .../v2/destinations/the_trade_desk/utils.js | 107 + .../destinations/the_trade_desk/utils.test.js | 49 + src/controllers/bulkUpload.ts | 10 +- src/features.json | 4 +- src/util/types.ts | 3 + .../destinations/active_campaign/transform.js | 32 +- src/v0/destinations/af/deleteUsers.js | 1 + src/v0/destinations/am/deleteUsers.js | 2 + src/v0/destinations/am/transform.js | 11 +- src/v0/destinations/am/util.test.js | 66 + src/v0/destinations/am/utils.js | 27 + src/v0/destinations/canny/util.js | 1 + src/v0/destinations/custify/util.js | 1 + .../factorsai/data/FactorsAIGroupConfig.json | 5 + .../data/FactorsAIIdentifyConfig.json | 5 + .../factorsai/data/FactorsAITrackConfig.json | 5 + src/v0/destinations/factorsai/transform.js | 17 +- src/v0/destinations/freshmarketer/utils.js | 7 + src/v0/destinations/freshsales/utils.js | 5 + src/v0/destinations/ga/deleteUsers.js | 1 + .../data/GainsightPX_Identify.json | 14 +- src/v0/destinations/gainsight_px/transform.js | 20 +- .../config.js | 2 +- .../networkHandler.js | 2 + .../networkHandler.js | 13 +- .../utils.js | 1 + .../config.js | 2 +- .../networkHandler.js | 20 +- .../transform.js | 13 +- src/v0/destinations/hs/util.js | 2 + src/v0/destinations/intercom/deleteUsers.js | 1 + src/v0/destinations/marketo/util.js | 2 + src/v0/destinations/monday/util.js | 1 + src/v0/destinations/sprig/deleteUsers.js | 79 + .../the_trade_desk/networkHandler.js | 86 + src/v0/destinations/user/utils.js | 7 + src/v0/destinations/wootric/util.js | 2 + src/v0/util/googleUtils/index.js | 30 + src/v0/util/googleUtils/index.test.js | 50 + src/warehouse/config/helpers.js | 9 +- src/warehouse/index.js | 3 +- src/warehouse/util.js | 9 +- test/__mocks__/axios.js | 144 +- test/__mocks__/braze.mock.js | 2 +- test/__mocks__/clickup.mock.js | 36 - test/__mocks__/custify.mock.js | 36 - test/__mocks__/data/clickup/response.json | 229 - test/__mocks__/data/custify/response.json | 27 - .../data/freshmarketer/response.json | 430 - test/__mocks__/data/freshsales/response.json | 430 - .../proxy_response.json | 18 +- test/__mocks__/data/hs/response.json | 455 - .../data/intercom/proxy_response.json | 15 - test/__mocks__/data/monday/response.json | 212 - test/__mocks__/data/profitwell/response.json | 34 - test/__mocks__/data/wootric/response.json | 107 - test/__mocks__/delighted.mock.js | 12 - test/__mocks__/drip.mock.js | 8 - test/__mocks__/freshmarketer.mock.js | 52 - test/__mocks__/freshsales.mock.js | 52 - test/__mocks__/gainsight.mock.js | 33 - test/__mocks__/gainsight_px.mock.js | 23 - test/__mocks__/hs.mock.js | 123 - test/__mocks__/klaviyo.mock.js | 39 - test/__mocks__/kustomer.mock.js | 142 - test/__mocks__/mailchimp.mock.js | 49 - test/__mocks__/monday.mock.js | 32 - test/__mocks__/profitwell.mock.js | 16 - test/__mocks__/sendinblue.mock.js | 23 - test/__mocks__/wootric.mock.js | 55 - test/__tests__/amplitude.test.js | 124 - test/__tests__/bingads_audience-cdk.test.ts | 60 - test/__tests__/braze.test.js | 76 - test/__tests__/clevertap.test.js | 49 - test/__tests__/clickup.test.js | 47 - test/__tests__/custify.test.js | 47 - test/__tests__/data/am_batch_input.json | 1919 -- test/__tests__/data/am_batch_output.json | 1229 - test/__tests__/data/am_input.json | 4943 ---- test/__tests__/data/am_output.json | 4469 --- test/__tests__/data/am_router_input.json | 142 - test/__tests__/data/am_router_output.json | 150 - test/__tests__/data/bingads_audience.json | 503 - test/__tests__/data/bingads_audience_steps.ts | 155 - test/__tests__/data/braze_input.json | 2036 -- test/__tests__/data/braze_output.json | 1113 - test/__tests__/data/braze_proxy_input.json | 219 - test/__tests__/data/braze_proxy_output.json | 106 - test/__tests__/data/braze_router.json | 1034 - test/__tests__/data/clevertap_input.json | 1084 - test/__tests__/data/clevertap_output.json | 739 - .../__tests__/data/clevertap_proxy_input.json | 114 - .../data/clevertap_proxy_output.json | 64 - .../data/clevertap_router_input.json | 139 - .../data/clevertap_router_output.json | 107 - test/__tests__/data/clickup.json | 513 - test/__tests__/data/clickup_router_input.json | 192 - .../__tests__/data/clickup_router_output.json | 249 - test/__tests__/data/custify.json | 511 - test/__tests__/data/custify_router_input.json | 99 - .../__tests__/data/custify_router_output.json | 119 - test/__tests__/data/delighted_input.json | 392 - test/__tests__/data/delighted_output.json | 121 - .../data/delighted_router_input.json | 83 - .../data/delighted_router_output.json | 83 - test/__tests__/data/drip_input.json | 720 - test/__tests__/data/drip_output.json | 319 - test/__tests__/data/drip_router_input.json | 90 - test/__tests__/data/drip_router_output.json | 96 - test/__tests__/data/facebook_conversions.json | 1157 - .../facebook_conversions_router_input.json | 158 - .../facebook_conversions_router_output.json | 122 - test/__tests__/data/freshmarketer.json | 2507 -- .../data/freshmarketer_router_input.json | 174 - .../data/freshmarketer_router_output.json | 163 - test/__tests__/data/freshsales.json | 2173 -- .../data/freshsales_router_input.json | 78 - .../data/freshsales_router_output.json | 83 - test/__tests__/data/ga4.json | 12734 --------- test/__tests__/data/gainsight_input.json | 416 - test/__tests__/data/gainsight_output.json | 215 - test/__tests__/data/gainsight_px_input.json | 1087 - test/__tests__/data/gainsight_px_output.json | 368 - .../data/gainsight_px_router_input.json | 298 - .../data/gainsight_px_router_output.json | 236 - .../data/gainsight_router_input.json | 240 - .../data/gainsight_router_output.json | 188 - test/__tests__/data/hs.json | 1 - test/__tests__/data/hs_input.json | 3185 --- test/__tests__/data/hs_output.json | 843 - .../hs_router_associations_rEtl_input.json | 57 - .../hs_router_associations_rEtl_output.json | 49 - test/__tests__/data/hs_router_input.json | 573 - .../data/hs_router_input_legacy.json | 281 - .../data/hs_router_legacy_rETL_input.json | 130 - .../data/hs_router_legacy_rETL_output.json | 129 - test/__tests__/data/hs_router_output.json | 321 - .../data/hs_router_output_legacy.json | 117 - test/__tests__/data/hs_router_rETL_input.json | 332 - .../__tests__/data/hs_router_rETL_output.json | 231 - test/__tests__/data/intercom_input.json | 1232 - test/__tests__/data/intercom_output.json | 651 - test/__tests__/data/intercom_proxy_input.json | 44 - .../__tests__/data/intercom_proxy_output.json | 31 - .../__tests__/data/intercom_router_input.json | 150 - .../data/intercom_router_output.json | 99 - test/__tests__/data/klaviyo.json | 1970 -- test/__tests__/data/klaviyo_router.json | 599 - test/__tests__/data/kustomer_input.json | 851 - test/__tests__/data/kustomer_output.json | 602 - .../__tests__/data/kustomer_router_input.json | 183 - .../data/kustomer_router_output.json | 184 - .../__tests__/data/mailchimp_batch_input.json | 225 - .../data/mailchimp_batch_output.json | 100 - test/__tests__/data/mailchimp_input.json | 1299 - test/__tests__/data/mailchimp_output.json | 498 - .../data/mailchimp_router_input.json | 347 - .../data/mailchimp_router_output.json | 238 - test/__tests__/data/marketo_input.json | 1157 - test/__tests__/data/marketo_output.json | 204 - test/__tests__/data/marketo_router_input.json | 996 - .../data/marketo_router_metadata_input.json | 163 - .../data/marketo_router_metadata_output.json | 20 - .../__tests__/data/marketo_router_output.json | 792 - test/__tests__/data/monday.json | 1023 - test/__tests__/data/monday_router_input.json | 111 - test/__tests__/data/monday_router_output.json | 84 - test/__tests__/data/profitwell_input.json | 719 - test/__tests__/data/profitwell_output.json | 166 - .../data/profitwell_router_input.json | 45 - .../data/profitwell_router_output.json | 44 - test/__tests__/data/sendinblue.json | 1196 - .../data/sendinblue_router_input.json | 187 - .../data/sendinblue_router_output.json | 196 - test/__tests__/data/sf_input.json | 152 - test/__tests__/data/sf_output.json | 43 - test/__tests__/data/stormly.json | 388 - test/__tests__/data/stormly_router_input.json | 55 - .../__tests__/data/stormly_router_output.json | 63 - test/__tests__/data/warehouse/events.js | 34 +- test/__tests__/data/wootric.json | 1467 - test/__tests__/data/wootric_router_input.json | 1076 - .../__tests__/data/wootric_router_output.json | 493 - test/__tests__/delighted.test.js | 48 - test/__tests__/drip.test.js | 47 - test/__tests__/facebook_conversions.test.js | 48 - test/__tests__/freshmarketer.test.js | 46 - test/__tests__/freshsales.test.js | 45 - test/__tests__/ga4.test.js | 31 - test/__tests__/gainsight.test.js | 48 - test/__tests__/gainsight_px.test.js | 48 - test/__tests__/hubspot.test.js | 139 - test/__tests__/intercom.test.js | 49 - test/__tests__/klaviyo.test.js | 47 - test/__tests__/kustomer.test.js | 49 - test/__tests__/mailchimp.test.js | 67 - test/__tests__/marketo.test.js | 71 - test/__tests__/monday.test.js | 46 - test/__tests__/profitwell.test.js | 62 - test/__tests__/sendinblue.test.js | 47 - test/__tests__/stormly.test.js | 47 - test/__tests__/warehouse.test.js | 80 +- test/__tests__/wootric.test.js | 46 - .../destinations/am/batch/data.ts | 3274 +++ .../destinations/am/processor/data.ts | 11330 ++++++++ .../destinations/am/router/data.ts | 318 + .../bingads_audience/processor/data.ts | 1155 + .../destinations/braze/network.ts | 192 +- .../destinations/braze/processor/data.ts | 3866 +++ .../destinations/braze/router/data.ts | 925 + .../destinations/clevertap/processor/data.ts | 2427 ++ .../destinations/clevertap/router/data.ts | 276 + .../destinations/clickup/network.ts | 247 + .../destinations/clickup/processor/data.ts | 829 + .../destinations/clickup/router/data.ts | 471 + .../destinations/custify/network.ts | 36 + .../destinations/custify/processor/data.ts | 695 + .../destinations/custify/router/data.ts | 242 + .../destinations/delighted/network.ts | 30 + .../destinations/delighted/processor/data.ts | 937 + .../destinations/delighted/router/data.ts | 191 + .../integrations/destinations/drip/network.ts | 30 + .../destinations/drip/processor/data.ts | 1487 + .../destinations/drip/router/data.ts | 210 + .../facebook_conversions/mocks.ts | 3 + .../facebook_conversions/processor/data.ts | 1437 + .../facebook_conversions/router/data.ts | 306 + .../destinations/factorsai/data.ts | 270 + .../destinations/freshmarketer/network.ts | 487 + .../freshmarketer/processor/data.ts | 3130 +++ .../destinations/freshmarketer/router/data.ts | 361 + .../destinations/freshsales/network.ts | 484 + .../destinations/freshsales/processor/data.ts | 2668 ++ .../destinations/freshsales/router/data.ts | 185 + test/integrations/destinations/ga4/mocks.ts | 3 + .../destinations/ga4/processor/data.ts | 14903 ++++++++++ .../destinations/gainsight/network.ts | 71 + .../destinations/gainsight/processor/data.ts | 970 + .../destinations/gainsight/router/data.ts | 451 + .../destinations/gainsight_px/network.ts | 222 + .../gainsight_px/processor/data.ts | 2165 ++ .../destinations/gainsight_px/router/data.ts | 557 + .../dataDelivery/data.ts | 545 +- .../network.ts | 470 +- .../processor/data.ts | 3376 +-- .../router/data.ts | 880 +- .../dataDelivery/data.ts | 468 +- .../network.ts | 293 +- .../processor/data.ts | 22547 +++++++++------- .../router/data.ts | 1087 +- test/integrations/destinations/hs/network.ts | 664 + .../destinations/hs/processor/data.ts | 5272 ++++ .../destinations/hs/router/data.ts | 2245 ++ .../destinations/intercom/processor/data.ts | 2311 ++ .../destinations/intercom/router/data.ts | 272 + .../destinations/klaviyo/network.ts | 75 + .../destinations/klaviyo/processor/data.ts | 2430 ++ .../destinations/klaviyo/router/data.ts | 464 + .../destinations/kustomer/network.ts | 423 + .../destinations/kustomer/processor/data.ts | 1901 ++ .../destinations/kustomer/router/data.ts | 393 + .../destinations/mailchimp/network.ts | 80 + .../destinations/mailchimp/processor/data.ts | 2259 ++ .../destinations/mailchimp/router/data.ts | 977 + .../destinations/marketo/network.ts | 728 + .../destinations/marketo/processor/data.ts | 1745 ++ .../destinations/marketo/router/data.ts | 2132 ++ .../marketo_bulk_upload/processor/data.ts | 499 + .../destinations/monday/network.ts | 242 + .../destinations/monday/processor/data.ts | 1399 + .../destinations/monday/router/data.ts | 228 + .../destinations/profitwell/network.ts | 94 + .../destinations/profitwell/processor/data.ts | 1241 + .../destinations/profitwell/router/data.ts | 113 + .../destinations/sendgrid/network.ts | 160 + .../destinations/sendgrid/processor/data.ts | 1544 ++ .../destinations/sendgrid/router/data.ts | 177 + .../destinations/sendinblue/network.ts | 92 + .../destinations/sendinblue/processor/data.ts | 1722 ++ .../destinations/sendinblue/router/data.ts | 410 + .../destinations/sprig/deleteUsers/data.ts | 217 + .../destinations/sprig/network.ts | 79 + .../destinations/stormly/processor/data.ts | 566 + .../destinations/stormly/router/data.ts | 148 + .../destinations/the_trade_desk/common.ts | 44 + .../the_trade_desk/delivery/data.ts | 248 + .../destinations/the_trade_desk/mocks.ts | 5 + .../destinations/the_trade_desk/network.ts | 106 + .../the_trade_desk/router/data.ts | 536 + .../destinations/wootric/network.ts | 183 + .../destinations/wootric/processor/data.ts | 1825 ++ .../destinations/wootric/router/data.ts | 1622 ++ 315 files changed, 113605 insertions(+), 94896 deletions(-) create mode 100644 src/cdk/v2/destinations/the_trade_desk/config.js create mode 100644 src/cdk/v2/destinations/the_trade_desk/rtWorkflow.yaml create mode 100644 src/cdk/v2/destinations/the_trade_desk/utils.js create mode 100644 src/cdk/v2/destinations/the_trade_desk/utils.test.js create mode 100644 src/v0/destinations/am/util.test.js create mode 100644 src/v0/destinations/sprig/deleteUsers.js create mode 100644 src/v0/destinations/the_trade_desk/networkHandler.js create mode 100644 src/v0/util/googleUtils/index.js create mode 100644 src/v0/util/googleUtils/index.test.js delete mode 100644 test/__mocks__/clickup.mock.js delete mode 100644 test/__mocks__/custify.mock.js delete mode 100644 test/__mocks__/data/clickup/response.json delete mode 100644 test/__mocks__/data/custify/response.json delete mode 100644 test/__mocks__/data/freshmarketer/response.json delete mode 100644 test/__mocks__/data/freshsales/response.json delete mode 100644 test/__mocks__/data/hs/response.json delete mode 100644 test/__mocks__/data/intercom/proxy_response.json delete mode 100644 test/__mocks__/data/monday/response.json delete mode 100644 test/__mocks__/data/profitwell/response.json delete mode 100644 test/__mocks__/data/wootric/response.json delete mode 100644 test/__mocks__/delighted.mock.js delete mode 100644 test/__mocks__/drip.mock.js delete mode 100644 test/__mocks__/freshmarketer.mock.js delete mode 100644 test/__mocks__/freshsales.mock.js delete mode 100644 test/__mocks__/gainsight.mock.js delete mode 100644 test/__mocks__/gainsight_px.mock.js delete mode 100644 test/__mocks__/hs.mock.js delete mode 100644 test/__mocks__/klaviyo.mock.js delete mode 100644 test/__mocks__/kustomer.mock.js delete mode 100644 test/__mocks__/mailchimp.mock.js delete mode 100644 test/__mocks__/monday.mock.js delete mode 100644 test/__mocks__/profitwell.mock.js delete mode 100644 test/__mocks__/sendinblue.mock.js delete mode 100644 test/__mocks__/wootric.mock.js delete mode 100644 test/__tests__/amplitude.test.js delete mode 100644 test/__tests__/bingads_audience-cdk.test.ts delete mode 100644 test/__tests__/braze.test.js delete mode 100644 test/__tests__/clevertap.test.js delete mode 100644 test/__tests__/clickup.test.js delete mode 100644 test/__tests__/custify.test.js delete mode 100644 test/__tests__/data/am_batch_input.json delete mode 100644 test/__tests__/data/am_batch_output.json delete mode 100644 test/__tests__/data/am_input.json delete mode 100644 test/__tests__/data/am_output.json delete mode 100644 test/__tests__/data/am_router_input.json delete mode 100644 test/__tests__/data/am_router_output.json delete mode 100644 test/__tests__/data/bingads_audience.json delete mode 100644 test/__tests__/data/bingads_audience_steps.ts delete mode 100644 test/__tests__/data/braze_input.json delete mode 100644 test/__tests__/data/braze_output.json delete mode 100644 test/__tests__/data/braze_proxy_input.json delete mode 100644 test/__tests__/data/braze_proxy_output.json delete mode 100644 test/__tests__/data/braze_router.json delete mode 100644 test/__tests__/data/clevertap_input.json delete mode 100644 test/__tests__/data/clevertap_output.json delete mode 100644 test/__tests__/data/clevertap_proxy_input.json delete mode 100644 test/__tests__/data/clevertap_proxy_output.json delete mode 100644 test/__tests__/data/clevertap_router_input.json delete mode 100644 test/__tests__/data/clevertap_router_output.json delete mode 100644 test/__tests__/data/clickup.json delete mode 100644 test/__tests__/data/clickup_router_input.json delete mode 100644 test/__tests__/data/clickup_router_output.json delete mode 100644 test/__tests__/data/custify.json delete mode 100644 test/__tests__/data/custify_router_input.json delete mode 100644 test/__tests__/data/custify_router_output.json delete mode 100644 test/__tests__/data/delighted_input.json delete mode 100644 test/__tests__/data/delighted_output.json delete mode 100644 test/__tests__/data/delighted_router_input.json delete mode 100644 test/__tests__/data/delighted_router_output.json delete mode 100644 test/__tests__/data/drip_input.json delete mode 100644 test/__tests__/data/drip_output.json delete mode 100644 test/__tests__/data/drip_router_input.json delete mode 100644 test/__tests__/data/drip_router_output.json delete mode 100644 test/__tests__/data/facebook_conversions.json delete mode 100644 test/__tests__/data/facebook_conversions_router_input.json delete mode 100644 test/__tests__/data/facebook_conversions_router_output.json delete mode 100644 test/__tests__/data/freshmarketer.json delete mode 100644 test/__tests__/data/freshmarketer_router_input.json delete mode 100644 test/__tests__/data/freshmarketer_router_output.json delete mode 100644 test/__tests__/data/freshsales.json delete mode 100644 test/__tests__/data/freshsales_router_input.json delete mode 100644 test/__tests__/data/freshsales_router_output.json delete mode 100644 test/__tests__/data/ga4.json delete mode 100644 test/__tests__/data/gainsight_input.json delete mode 100644 test/__tests__/data/gainsight_output.json delete mode 100644 test/__tests__/data/gainsight_px_input.json delete mode 100644 test/__tests__/data/gainsight_px_output.json delete mode 100644 test/__tests__/data/gainsight_px_router_input.json delete mode 100644 test/__tests__/data/gainsight_px_router_output.json delete mode 100644 test/__tests__/data/gainsight_router_input.json delete mode 100644 test/__tests__/data/gainsight_router_output.json delete mode 100644 test/__tests__/data/hs.json delete mode 100644 test/__tests__/data/hs_input.json delete mode 100644 test/__tests__/data/hs_output.json delete mode 100644 test/__tests__/data/hs_router_associations_rEtl_input.json delete mode 100644 test/__tests__/data/hs_router_associations_rEtl_output.json delete mode 100644 test/__tests__/data/hs_router_input.json delete mode 100644 test/__tests__/data/hs_router_input_legacy.json delete mode 100644 test/__tests__/data/hs_router_legacy_rETL_input.json delete mode 100644 test/__tests__/data/hs_router_legacy_rETL_output.json delete mode 100644 test/__tests__/data/hs_router_output.json delete mode 100644 test/__tests__/data/hs_router_output_legacy.json delete mode 100644 test/__tests__/data/hs_router_rETL_input.json delete mode 100644 test/__tests__/data/hs_router_rETL_output.json delete mode 100644 test/__tests__/data/intercom_input.json delete mode 100644 test/__tests__/data/intercom_output.json delete mode 100644 test/__tests__/data/intercom_proxy_input.json delete mode 100644 test/__tests__/data/intercom_proxy_output.json delete mode 100644 test/__tests__/data/intercom_router_input.json delete mode 100644 test/__tests__/data/intercom_router_output.json delete mode 100644 test/__tests__/data/klaviyo.json delete mode 100644 test/__tests__/data/klaviyo_router.json delete mode 100644 test/__tests__/data/kustomer_input.json delete mode 100644 test/__tests__/data/kustomer_output.json delete mode 100644 test/__tests__/data/kustomer_router_input.json delete mode 100644 test/__tests__/data/kustomer_router_output.json delete mode 100644 test/__tests__/data/mailchimp_batch_input.json delete mode 100644 test/__tests__/data/mailchimp_batch_output.json delete mode 100644 test/__tests__/data/mailchimp_input.json delete mode 100644 test/__tests__/data/mailchimp_output.json delete mode 100644 test/__tests__/data/mailchimp_router_input.json delete mode 100644 test/__tests__/data/mailchimp_router_output.json delete mode 100644 test/__tests__/data/marketo_input.json delete mode 100644 test/__tests__/data/marketo_output.json delete mode 100644 test/__tests__/data/marketo_router_input.json delete mode 100644 test/__tests__/data/marketo_router_metadata_input.json delete mode 100644 test/__tests__/data/marketo_router_metadata_output.json delete mode 100644 test/__tests__/data/marketo_router_output.json delete mode 100644 test/__tests__/data/monday.json delete mode 100644 test/__tests__/data/monday_router_input.json delete mode 100644 test/__tests__/data/monday_router_output.json delete mode 100644 test/__tests__/data/profitwell_input.json delete mode 100644 test/__tests__/data/profitwell_output.json delete mode 100644 test/__tests__/data/profitwell_router_input.json delete mode 100644 test/__tests__/data/profitwell_router_output.json delete mode 100644 test/__tests__/data/sendinblue.json delete mode 100644 test/__tests__/data/sendinblue_router_input.json delete mode 100644 test/__tests__/data/sendinblue_router_output.json delete mode 100644 test/__tests__/data/sf_input.json delete mode 100644 test/__tests__/data/sf_output.json delete mode 100644 test/__tests__/data/stormly.json delete mode 100644 test/__tests__/data/stormly_router_input.json delete mode 100644 test/__tests__/data/stormly_router_output.json delete mode 100644 test/__tests__/data/wootric.json delete mode 100644 test/__tests__/data/wootric_router_input.json delete mode 100644 test/__tests__/data/wootric_router_output.json delete mode 100644 test/__tests__/delighted.test.js delete mode 100644 test/__tests__/drip.test.js delete mode 100644 test/__tests__/facebook_conversions.test.js delete mode 100644 test/__tests__/freshmarketer.test.js delete mode 100644 test/__tests__/freshsales.test.js delete mode 100644 test/__tests__/ga4.test.js delete mode 100644 test/__tests__/gainsight.test.js delete mode 100644 test/__tests__/gainsight_px.test.js delete mode 100644 test/__tests__/hubspot.test.js delete mode 100644 test/__tests__/intercom.test.js delete mode 100644 test/__tests__/klaviyo.test.js delete mode 100644 test/__tests__/kustomer.test.js delete mode 100644 test/__tests__/mailchimp.test.js delete mode 100644 test/__tests__/marketo.test.js delete mode 100644 test/__tests__/monday.test.js delete mode 100644 test/__tests__/profitwell.test.js delete mode 100644 test/__tests__/sendinblue.test.js delete mode 100644 test/__tests__/stormly.test.js delete mode 100644 test/__tests__/wootric.test.js create mode 100644 test/integrations/destinations/am/batch/data.ts create mode 100644 test/integrations/destinations/am/processor/data.ts create mode 100644 test/integrations/destinations/am/router/data.ts create mode 100644 test/integrations/destinations/bingads_audience/processor/data.ts create mode 100644 test/integrations/destinations/braze/processor/data.ts create mode 100644 test/integrations/destinations/braze/router/data.ts create mode 100644 test/integrations/destinations/clevertap/processor/data.ts create mode 100644 test/integrations/destinations/clevertap/router/data.ts create mode 100644 test/integrations/destinations/clickup/network.ts create mode 100644 test/integrations/destinations/clickup/processor/data.ts create mode 100644 test/integrations/destinations/clickup/router/data.ts create mode 100644 test/integrations/destinations/custify/network.ts create mode 100644 test/integrations/destinations/custify/processor/data.ts create mode 100644 test/integrations/destinations/custify/router/data.ts create mode 100644 test/integrations/destinations/delighted/network.ts create mode 100644 test/integrations/destinations/delighted/processor/data.ts create mode 100644 test/integrations/destinations/delighted/router/data.ts create mode 100644 test/integrations/destinations/drip/network.ts create mode 100644 test/integrations/destinations/drip/processor/data.ts create mode 100644 test/integrations/destinations/drip/router/data.ts create mode 100644 test/integrations/destinations/facebook_conversions/mocks.ts create mode 100644 test/integrations/destinations/facebook_conversions/processor/data.ts create mode 100644 test/integrations/destinations/facebook_conversions/router/data.ts create mode 100644 test/integrations/destinations/freshmarketer/network.ts create mode 100644 test/integrations/destinations/freshmarketer/processor/data.ts create mode 100644 test/integrations/destinations/freshmarketer/router/data.ts create mode 100644 test/integrations/destinations/freshsales/network.ts create mode 100644 test/integrations/destinations/freshsales/processor/data.ts create mode 100644 test/integrations/destinations/freshsales/router/data.ts create mode 100644 test/integrations/destinations/ga4/mocks.ts create mode 100644 test/integrations/destinations/ga4/processor/data.ts create mode 100644 test/integrations/destinations/gainsight/network.ts create mode 100644 test/integrations/destinations/gainsight/processor/data.ts create mode 100644 test/integrations/destinations/gainsight/router/data.ts create mode 100644 test/integrations/destinations/gainsight_px/network.ts create mode 100644 test/integrations/destinations/gainsight_px/processor/data.ts create mode 100644 test/integrations/destinations/gainsight_px/router/data.ts create mode 100644 test/integrations/destinations/hs/network.ts create mode 100644 test/integrations/destinations/hs/processor/data.ts create mode 100644 test/integrations/destinations/hs/router/data.ts create mode 100644 test/integrations/destinations/intercom/processor/data.ts create mode 100644 test/integrations/destinations/intercom/router/data.ts create mode 100644 test/integrations/destinations/klaviyo/network.ts create mode 100644 test/integrations/destinations/klaviyo/processor/data.ts create mode 100644 test/integrations/destinations/klaviyo/router/data.ts create mode 100644 test/integrations/destinations/kustomer/network.ts create mode 100644 test/integrations/destinations/kustomer/processor/data.ts create mode 100644 test/integrations/destinations/kustomer/router/data.ts create mode 100644 test/integrations/destinations/mailchimp/network.ts create mode 100644 test/integrations/destinations/mailchimp/processor/data.ts create mode 100644 test/integrations/destinations/mailchimp/router/data.ts create mode 100644 test/integrations/destinations/marketo/processor/data.ts create mode 100644 test/integrations/destinations/marketo/router/data.ts create mode 100644 test/integrations/destinations/marketo_bulk_upload/processor/data.ts create mode 100644 test/integrations/destinations/monday/network.ts create mode 100644 test/integrations/destinations/monday/processor/data.ts create mode 100644 test/integrations/destinations/monday/router/data.ts create mode 100644 test/integrations/destinations/profitwell/network.ts create mode 100644 test/integrations/destinations/profitwell/processor/data.ts create mode 100644 test/integrations/destinations/profitwell/router/data.ts create mode 100644 test/integrations/destinations/sendgrid/processor/data.ts create mode 100644 test/integrations/destinations/sendgrid/router/data.ts create mode 100644 test/integrations/destinations/sendinblue/network.ts create mode 100644 test/integrations/destinations/sendinblue/processor/data.ts create mode 100644 test/integrations/destinations/sendinblue/router/data.ts create mode 100644 test/integrations/destinations/sprig/deleteUsers/data.ts create mode 100644 test/integrations/destinations/sprig/network.ts create mode 100644 test/integrations/destinations/stormly/processor/data.ts create mode 100644 test/integrations/destinations/stormly/router/data.ts create mode 100644 test/integrations/destinations/the_trade_desk/common.ts create mode 100644 test/integrations/destinations/the_trade_desk/delivery/data.ts create mode 100644 test/integrations/destinations/the_trade_desk/mocks.ts create mode 100644 test/integrations/destinations/the_trade_desk/network.ts create mode 100644 test/integrations/destinations/the_trade_desk/router/data.ts create mode 100644 test/integrations/destinations/wootric/network.ts create mode 100644 test/integrations/destinations/wootric/processor/data.ts create mode 100644 test/integrations/destinations/wootric/router/data.ts diff --git a/.github/workflows/build-pr-artifacts.yml b/.github/workflows/build-pr-artifacts.yml index 022afcd9f4..9938563bf0 100644 --- a/.github/workflows/build-pr-artifacts.yml +++ b/.github/workflows/build-pr-artifacts.yml @@ -18,7 +18,7 @@ jobs: tag_name_ut: ${{ steps.gen_tag_names.outputs.tag_name_ut }} steps: - name: Checkout - uses: actions/checkout@v3.5.3 + uses: actions/checkout@v4.1.1 with: fetch-depth: 1 diff --git a/.github/workflows/build-push-docker-image.yml b/.github/workflows/build-push-docker-image.yml index 68360df6fc..9f6709a040 100644 --- a/.github/workflows/build-push-docker-image.yml +++ b/.github/workflows/build-push-docker-image.yml @@ -36,12 +36,12 @@ jobs: runs-on: [self-hosted, Linux, ARM64] steps: - name: Checkout - uses: actions/checkout@v3.5.3 + uses: actions/checkout@v4.1.1 with: fetch-depth: 1 - name: Setup Docker Buildx - uses: docker/setup-buildx-action@v2.9.1 + uses: docker/setup-buildx-action@v3.0.0 - name: Login to DockerHub uses: docker/login-action@v2.1.0 @@ -50,7 +50,7 @@ jobs: password: ${{ secrets.DOCKERHUB_PROD_TOKEN }} - name: Build Docker Image - uses: docker/build-push-action@v4.1.1 + uses: docker/build-push-action@v5.1.0 with: context: . file: ${{ inputs.dockerfile }} @@ -66,7 +66,7 @@ jobs: docker run ${{ inputs.build_tag }} npm run test:ts:ci - name: Build and Push Multi-platform Images - uses: docker/build-push-action@v4.1.1 + uses: docker/build-push-action@v5.1.0 with: context: . file: ${{ inputs.dockerfile }} @@ -86,12 +86,12 @@ jobs: runs-on: [self-hosted, Linux, X64] steps: - name: Checkout - uses: actions/checkout@v3.5.3 + uses: actions/checkout@v4.1.1 with: fetch-depth: 1 - name: Setup Docker Buildx - uses: docker/setup-buildx-action@v2.9.1 + uses: docker/setup-buildx-action@v3.0.0 - name: Login to DockerHub uses: docker/login-action@v2.1.0 @@ -100,7 +100,7 @@ jobs: password: ${{ secrets.DOCKERHUB_PROD_TOKEN }} - name: Build Docker Image - uses: docker/build-push-action@v4.1.1 + uses: docker/build-push-action@v5.1.0 with: context: . file: ${{ inputs.dockerfile }} @@ -116,7 +116,7 @@ jobs: docker run ${{ inputs.build_tag }} npm run test:ts:ci - name: Build and Push Multi-platform Images - uses: docker/build-push-action@v4.1.1 + uses: docker/build-push-action@v5.1.0 with: context: . file: ${{ inputs.dockerfile }} @@ -138,7 +138,7 @@ jobs: steps: - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2.9.1 + uses: docker/setup-buildx-action@v3.0.0 - name: Login to DockerHub uses: docker/login-action@v2.1.0 diff --git a/.github/workflows/create-hotfix-branch.yml b/.github/workflows/create-hotfix-branch.yml index 03c79e0df1..a164c25bee 100644 --- a/.github/workflows/create-hotfix-branch.yml +++ b/.github/workflows/create-hotfix-branch.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest # Only allow these users to create new hotfix branch from 'main' - if: github.ref == 'refs/heads/main' && (github.actor == 'ItsSudip' || github.actor == 'krishna2020' || github.actor == 'saikumarrs' || github.actor == 'sandeepdsvs' || github.actor == 'shrouti1507' || github.actor == 'anantjain45823' || github.actor == 'chandumlg' || github.actor == 'mihir-4116' || github.actor == 'ujjwal-ab') && (github.triggering_actor == 'ItsSudip' || github.triggering_actor == 'krishna2020' || github.triggering_actor == 'saikumarrs' || github.triggering_actor == 'sandeepdsvs' || github.triggering_actor == 'shrouti1507' || github.triggering_actor == 'anantjain45823' || github.triggering_actor == 'chandumlg' || github.triggering_actor == 'mihir-4116' || github.triggering_actor == 'ujjwal-ab') + if: github.ref == 'refs/heads/main' && (github.actor == 'ItsSudip' || github.actor == 'krishna2020' || github.actor == 'koladilip' || github.actor == 'saikumarrs' || github.actor == 'sandeepdsvs' || github.actor == 'shrouti1507' || github.actor == 'anantjain45823' || github.actor == 'chandumlg' || github.actor == 'mihir-4116' || github.actor == 'ujjwal-ab') && (github.triggering_actor == 'ItsSudip' || github.triggering_actor == 'krishna2020' || github.triggering_actor == 'saikumarrs' || github.triggering_actor == 'sandeepdsvs' || github.triggering_actor == 'koladilip' || github.triggering_actor == 'shrouti1507' || github.triggering_actor == 'anantjain45823' || github.triggering_actor == 'chandumlg' || github.triggering_actor == 'mihir-4116' || github.triggering_actor == 'ujjwal-ab') steps: - name: Create Branch uses: peterjgrainger/action-create-branch@v2.4.0 diff --git a/.github/workflows/draft-new-release.yml b/.github/workflows/draft-new-release.yml index 57dd33f0b4..33b0396705 100644 --- a/.github/workflows/draft-new-release.yml +++ b/.github/workflows/draft-new-release.yml @@ -11,12 +11,12 @@ jobs: if: (github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/heads/hotfix/')) && (github.actor == 'ItsSudip' || github.actor == 'krishna2020' || github.actor == 'saikumarrs' || github.actor == 'sandeepdsvs' || github.actor == 'koladilip' || github.actor == 'shrouti1507' || github.actor == 'anantjain45823' || github.actor == 'chandumlg' || github.actor == 'mihir-4116' || github.actor == 'yashasvibajpai' || github.actor == 'sanpj2292' || github.actor == 'ujjwal-ab') && (github.triggering_actor == 'ItsSudip' || github.triggering_actor == 'krishna2020' || github.triggering_actor == 'koladilip' || github.triggering_actor == 'saikumarrs' || github.triggering_actor == 'sandeepdsvs' || github.triggering_actor == 'shrouti1507' || github.triggering_actor == 'anantjain45823' || github.triggering_actor == 'chandumlg' || github.triggering_actor == 'mihir-4116' || github.triggering_actor == 'yashasvibajpai' || github.triggering_actor == 'sanpj2292' || github.triggering_actor == 'ujjwal-ab') steps: - name: Checkout - uses: actions/checkout@v3.5.3 + uses: actions/checkout@v4.1.1 with: fetch-depth: 0 - name: Setup Node - uses: actions/setup-node@v3.7.0 + uses: actions/setup-node@v4.0.1 with: node-version-file: '.nvmrc' cache: 'npm' diff --git a/.github/workflows/housekeeping.yml b/.github/workflows/housekeeping.yml index 7b5847035e..388b80c15f 100644 --- a/.github/workflows/housekeeping.yml +++ b/.github/workflows/housekeeping.yml @@ -15,7 +15,7 @@ jobs: pull-requests: write steps: - - uses: actions/stale@v8.0.0 + - uses: actions/stale@v9.0.0 with: repo-token: ${{ secrets.PAT }} operations-per-run: 200 @@ -33,10 +33,10 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3.5.3 + uses: actions/checkout@v4.1.1 - name: Delete Old Branches - uses: beatlabs/delete-old-branches-action@v0.0.9 + uses: beatlabs/delete-old-branches-action@v0.0.10 with: repo_token: ${{ secrets.PAT }} date: '3 months ago' diff --git a/.github/workflows/prepare-for-dev-deploy.yml b/.github/workflows/prepare-for-dev-deploy.yml index d45f760c66..cf97772e2e 100644 --- a/.github/workflows/prepare-for-dev-deploy.yml +++ b/.github/workflows/prepare-for-dev-deploy.yml @@ -28,7 +28,7 @@ jobs: tag_name_ut: ${{ steps.gen_tag_names.outputs.tag_name_ut }} steps: - name: Checkout - uses: actions/checkout@v3.5.3 + uses: actions/checkout@v4.1.1 with: fetch-depth: 1 diff --git a/.github/workflows/prepare-for-prod-dt-deploy.yml b/.github/workflows/prepare-for-prod-dt-deploy.yml index 7750761a33..9669e1bc2c 100644 --- a/.github/workflows/prepare-for-prod-dt-deploy.yml +++ b/.github/workflows/prepare-for-prod-dt-deploy.yml @@ -28,7 +28,7 @@ jobs: tag_name_ut: ${{ steps.gen_tag_names.outputs.tag_name_ut }} steps: - name: Checkout - uses: actions/checkout@v3.5.3 + uses: actions/checkout@v4.1.1 with: fetch-depth: 1 @@ -65,7 +65,7 @@ jobs: TF_IMAGE_REPOSITORY: rudderstack/rudder-transformer steps: - name: Checkout - uses: actions/checkout@v3.5.3 + uses: actions/checkout@v4.1.1 with: fetch-depth: 1 diff --git a/.github/workflows/prepare-for-prod-ut-deploy.yml b/.github/workflows/prepare-for-prod-ut-deploy.yml index 2da3c9d067..ea5928f3b2 100644 --- a/.github/workflows/prepare-for-prod-ut-deploy.yml +++ b/.github/workflows/prepare-for-prod-ut-deploy.yml @@ -27,7 +27,7 @@ jobs: tag_name_ut: ${{ steps.gen_tag_names.outputs.tag_name_ut }} steps: - name: Checkout - uses: actions/checkout@v3.5.3 + uses: actions/checkout@v4.1.1 with: fetch-depth: 1 @@ -68,7 +68,7 @@ jobs: TF_IMAGE_REPOSITORY: rudderstack/rudder-transformer steps: - name: Checkout - uses: actions/checkout@v3.5.3 + uses: actions/checkout@v4.1.1 with: fetch-depth: 1 diff --git a/.github/workflows/prepare-for-staging-deploy.yml b/.github/workflows/prepare-for-staging-deploy.yml index 37224121bf..4e8f29cffa 100644 --- a/.github/workflows/prepare-for-staging-deploy.yml +++ b/.github/workflows/prepare-for-staging-deploy.yml @@ -20,7 +20,7 @@ jobs: tag_name_ut: ${{ steps.gen_tag_names.outputs.tag_name_ut }} steps: - name: Checkout - uses: actions/checkout@v3.5.3 + uses: actions/checkout@v4.1.1 with: fetch-depth: 1 @@ -78,7 +78,7 @@ jobs: UT_TAG_NAME: ${{ needs.generate-tag-names.outputs.tag_name_ut }} steps: - name: Checkout - uses: actions/checkout@v3.5.3 + uses: actions/checkout@v4.1.1 with: fetch-depth: 1 diff --git a/.github/workflows/publish-new-release.yml b/.github/workflows/publish-new-release.yml index e995388ce0..9d1558d826 100644 --- a/.github/workflows/publish-new-release.yml +++ b/.github/workflows/publish-new-release.yml @@ -25,12 +25,12 @@ jobs: echo "release_version=$version" >> $GITHUB_OUTPUT - name: Checkout - uses: actions/checkout@v3.5.3 + uses: actions/checkout@v4.1.1 with: fetch-depth: 0 - name: Setup Node - uses: actions/setup-node@v3.7.0 + uses: actions/setup-node@v4.0.1 with: node-version-file: '.nvmrc' cache: 'npm' diff --git a/.github/workflows/report-code-coverage.yml b/.github/workflows/report-code-coverage.yml index 02fa18b134..af6326ae88 100644 --- a/.github/workflows/report-code-coverage.yml +++ b/.github/workflows/report-code-coverage.yml @@ -15,12 +15,12 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3.5.3 + uses: actions/checkout@v4.1.1 with: fetch-depth: 1 - name: Setup Node - uses: actions/setup-node@v3.7.0 + uses: actions/setup-node@v4.0.1 with: node-version-file: '.nvmrc' cache: 'npm' @@ -57,7 +57,7 @@ jobs: - name: SonarCloud Scan if: always() - uses: SonarSource/sonarcloud-github-action@v2.0.0 + uses: SonarSource/sonarcloud-github-action@v2.1.1 env: GITHUB_TOKEN: ${{ secrets.PAT }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4c01b351e8..71a6706f94 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,12 +13,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3.5.3 + uses: actions/checkout@v4.1.1 with: fetch-depth: 1 - name: Setup Node - uses: actions/setup-node@v3.7.0 + uses: actions/setup-node@v4.0.1 with: node-version-file: '.nvmrc' cache: 'npm' diff --git a/.gitignore b/.gitignore index ab1fc2a840..24d37f6354 100644 --- a/.gitignore +++ b/.gitignore @@ -132,3 +132,6 @@ dist # Others **/.DS_Store + + +.idea \ No newline at end of file diff --git a/.nvmrc b/.nvmrc index 6d80269a4f..a9d087399d 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -18.16.0 +18.19.0 diff --git a/CHANGELOG.md b/CHANGELOG.md index 8933728ccf..9aa1ff6beb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,26 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [1.53.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.52.4...v1.53.0) (2024-01-08) + + +### Features + +* amplitude add support for unset ([#2941](https://github.com/rudderlabs/rudder-transformer/issues/2941)) ([429ca71](https://github.com/rudderlabs/rudder-transformer/commit/429ca719952e5b8a4b6bad2ef1a087575613e861)) +* handle improper type validation sync vulnerability ([#2937](https://github.com/rudderlabs/rudder-transformer/issues/2937)) ([7d734f0](https://github.com/rudderlabs/rudder-transformer/commit/7d734f06df75d198f8440a953ce089631af15a8b)) +* move intercom to routerTransform ([#2964](https://github.com/rudderlabs/rudder-transformer/issues/2964)) ([48e4036](https://github.com/rudderlabs/rudder-transformer/commit/48e40365de6d45c40b25b0af3373504bfd5368bd)) +* onboard new destination the trade desk ([#2918](https://github.com/rudderlabs/rudder-transformer/issues/2918)) ([f5ad088](https://github.com/rudderlabs/rudder-transformer/commit/f5ad088439ae628c9652b58d1ecb90257d77cae3)) +* pass ip details for factorsAI ([#2925](https://github.com/rudderlabs/rudder-transformer/issues/2925)) ([970d37d](https://github.com/rudderlabs/rudder-transformer/commit/970d37d6a3e4196c284513dd56f5405b0f3f2821)) +* **sprig:** added user deletion support ([#2886](https://github.com/rudderlabs/rudder-transformer/issues/2886)) ([e0c225d](https://github.com/rudderlabs/rudder-transformer/commit/e0c225dfab711c1d87d1c5dd1be98fb476548588)) + + +### Bug Fixes + +* enhancement and version upgrade of google ads remarketing list ([#2945](https://github.com/rudderlabs/rudder-transformer/issues/2945)) ([2380f9d](https://github.com/rudderlabs/rudder-transformer/commit/2380f9dcfcda2c6fe101b8b3a2d580e26a6452f3)) +* error handling when payload contains toString as key ([#2954](https://github.com/rudderlabs/rudder-transformer/issues/2954)) ([e002093](https://github.com/rudderlabs/rudder-transformer/commit/e00209337fa0e4da88f4f9959558636eecd4f120)) +* for gainsight px only new users to have default signUp date ([#2953](https://github.com/rudderlabs/rudder-transformer/issues/2953)) ([8bf56cc](https://github.com/rudderlabs/rudder-transformer/commit/8bf56cc7914bda530b0bf3fb16bfece6be542ddd)) +* version upgrade of gaec from 14 to 15 ([#2966](https://github.com/rudderlabs/rudder-transformer/issues/2966)) ([8bada4b](https://github.com/rudderlabs/rudder-transformer/commit/8bada4b21acf3ac884f44166b62098680f126898)) + ### [1.52.4](https://github.com/rudderlabs/rudder-transformer/compare/v1.52.3...v1.52.4) (2023-12-27) diff --git a/Dockerfile b/Dockerfile index a568ce95c7..6bd03c9515 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # syntax=docker/dockerfile:1.4 -FROM node:18.17-alpine3.17 AS base +FROM node:18.19.0-alpine3.18 AS base ENV HUSKY 0 RUN apk update diff --git a/jest.config.js b/jest.config.js index 412d8d2733..6ccb91259a 100644 --- a/jest.config.js +++ b/jest.config.js @@ -35,10 +35,10 @@ module.exports = { // An object that configures minimum threshold enforcement for coverage results coverageThreshold: { global: { - branches: 60, - functions: 75, - lines: 75, - statements: 75, + branches: 30, + functions: 40, + lines: 50, + statements: 50, }, }, diff --git a/jest.default.config.js b/jest.default.config.js index fed1dcef31..2d591cd833 100644 --- a/jest.default.config.js +++ b/jest.default.config.js @@ -35,10 +35,10 @@ module.exports = { // An object that configures minimum threshold enforcement for coverage results coverageThreshold: { global: { - branches: 60, - functions: 75, - lines: 75, - statements: 75, + branches: 30, + functions: 40, + lines: 50, + statements: 50, }, }, diff --git a/package-lock.json b/package-lock.json index 552802d3be..21b50bdf2c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,19 +1,19 @@ { "name": "rudder-transformer", - "version": "1.52.4", + "version": "1.53.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "rudder-transformer", - "version": "1.52.4", + "version": "1.53.0", "license": "ISC", "dependencies": { "@amplitude/ua-parser-js": "^0.7.24", - "@aws-sdk/client-personalize": "^3.391.0", - "@aws-sdk/client-s3": "^3.370.0", + "@aws-sdk/client-personalize": "^3.470.0", + "@aws-sdk/client-s3": "^3.438.0", "@aws-sdk/credential-providers": "^3.391.0", - "@aws-sdk/lib-storage": "^3.391.0", + "@aws-sdk/lib-storage": "^3.456.0", "@bugsnag/js": "^7.20.2", "@datadog/pprof": "^3.1.0", "@koa/router": "^12.0.0", @@ -216,7 +216,8 @@ }, "node_modules/@aws-crypto/crc32c": { "version": "3.0.0", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/crc32c/-/crc32c-3.0.0.tgz", + "integrity": "sha512-ENNPPManmnVJ4BTXlOjAgD7URidbAznURqD0KvfREyc4o20DPYdEldU1f5cQ7Jbj0CJJSPaMIk/9ZshdB3210w==", "dependencies": { "@aws-crypto/util": "^3.0.0", "@aws-sdk/types": "^3.222.0", @@ -225,7 +226,8 @@ }, "node_modules/@aws-crypto/crc32c/node_modules/tslib": { "version": "1.14.1", - "license": "0BSD" + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, "node_modules/@aws-crypto/ie11-detection": { "version": "3.0.0", @@ -310,21 +312,6 @@ "version": "1.14.1", "license": "0BSD" }, - "node_modules/@aws-sdk/chunked-blob-reader": { - "version": "3.310.0", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - } - }, - "node_modules/@aws-sdk/chunked-blob-reader-native": { - "version": "3.310.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/util-base64": "3.310.0", - "tslib": "^2.5.0" - } - }, "node_modules/@aws-sdk/client-cognito-identity": { "version": "3.414.0", "license": "Apache-2.0", @@ -382,3494 +369,877 @@ "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/abort-controller": { - "version": "2.0.9", - "license": "Apache-2.0", + "node_modules/@aws-sdk/client-personalize": { + "version": "3.470.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-personalize/-/client-personalize-3.470.0.tgz", + "integrity": "sha512-2dHdTenWQCn+iXm9JCaFX4jAD39kV+IJy6haVaM9Z5zSesuSKwhLivV9cZMyjxUfpvx6YgXM1wjX27eSixnH5A==", "dependencies": { - "@smithy/types": "^2.3.3", + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/client-sts": "3.470.0", + "@aws-sdk/core": "3.468.0", + "@aws-sdk/credential-provider-node": "3.470.0", + "@aws-sdk/middleware-host-header": "3.468.0", + "@aws-sdk/middleware-logger": "3.468.0", + "@aws-sdk/middleware-recursion-detection": "3.468.0", + "@aws-sdk/middleware-signing": "3.468.0", + "@aws-sdk/middleware-user-agent": "3.470.0", + "@aws-sdk/region-config-resolver": "3.470.0", + "@aws-sdk/types": "3.468.0", + "@aws-sdk/util-endpoints": "3.470.0", + "@aws-sdk/util-user-agent-browser": "3.468.0", + "@aws-sdk/util-user-agent-node": "3.470.0", + "@smithy/config-resolver": "^2.0.21", + "@smithy/fetch-http-handler": "^2.3.1", + "@smithy/hash-node": "^2.0.17", + "@smithy/invalid-dependency": "^2.0.15", + "@smithy/middleware-content-length": "^2.0.17", + "@smithy/middleware-endpoint": "^2.2.3", + "@smithy/middleware-retry": "^2.0.24", + "@smithy/middleware-serde": "^2.0.15", + "@smithy/middleware-stack": "^2.0.9", + "@smithy/node-config-provider": "^2.1.8", + "@smithy/node-http-handler": "^2.2.1", + "@smithy/protocol-http": "^3.0.11", + "@smithy/smithy-client": "^2.1.18", + "@smithy/types": "^2.7.0", + "@smithy/url-parser": "^2.0.15", + "@smithy/util-base64": "^2.0.1", + "@smithy/util-body-length-browser": "^2.0.1", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.22", + "@smithy/util-defaults-mode-node": "^2.0.29", + "@smithy/util-endpoints": "^1.0.7", + "@smithy/util-retry": "^2.0.8", + "@smithy/util-utf8": "^2.0.2", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/config-resolver": { - "version": "2.0.10", - "license": "Apache-2.0", + "node_modules/@aws-sdk/client-personalize/node_modules/@aws-sdk/client-sso": { + "version": "3.470.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.470.0.tgz", + "integrity": "sha512-iMXqdXuypE3OK0rggbvSz7vBGlLDG418dNidHhdaeLluMTG/GfHbh1fLOlavhYxRwrsPrtYvFiVkxXFGzXva4w==", "dependencies": { - "@smithy/node-config-provider": "^2.0.12", - "@smithy/types": "^2.3.3", - "@smithy/util-config-provider": "^2.0.0", - "@smithy/util-middleware": "^2.0.2", + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/core": "3.468.0", + "@aws-sdk/middleware-host-header": "3.468.0", + "@aws-sdk/middleware-logger": "3.468.0", + "@aws-sdk/middleware-recursion-detection": "3.468.0", + "@aws-sdk/middleware-user-agent": "3.470.0", + "@aws-sdk/region-config-resolver": "3.470.0", + "@aws-sdk/types": "3.468.0", + "@aws-sdk/util-endpoints": "3.470.0", + "@aws-sdk/util-user-agent-browser": "3.468.0", + "@aws-sdk/util-user-agent-node": "3.470.0", + "@smithy/config-resolver": "^2.0.21", + "@smithy/fetch-http-handler": "^2.3.1", + "@smithy/hash-node": "^2.0.17", + "@smithy/invalid-dependency": "^2.0.15", + "@smithy/middleware-content-length": "^2.0.17", + "@smithy/middleware-endpoint": "^2.2.3", + "@smithy/middleware-retry": "^2.0.24", + "@smithy/middleware-serde": "^2.0.15", + "@smithy/middleware-stack": "^2.0.9", + "@smithy/node-config-provider": "^2.1.8", + "@smithy/node-http-handler": "^2.2.1", + "@smithy/protocol-http": "^3.0.11", + "@smithy/smithy-client": "^2.1.18", + "@smithy/types": "^2.7.0", + "@smithy/url-parser": "^2.0.15", + "@smithy/util-base64": "^2.0.1", + "@smithy/util-body-length-browser": "^2.0.1", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.22", + "@smithy/util-defaults-mode-node": "^2.0.29", + "@smithy/util-endpoints": "^1.0.7", + "@smithy/util-retry": "^2.0.8", + "@smithy/util-utf8": "^2.0.2", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/credential-provider-imds": { - "version": "2.0.12", - "license": "Apache-2.0", + "node_modules/@aws-sdk/client-personalize/node_modules/@aws-sdk/client-sts": { + "version": "3.470.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.470.0.tgz", + "integrity": "sha512-TP3A4t8FoFEQinm6axxduTUnlMMLpmLi4Sf00JTI2CszxLUFh/JyUhYQ5gSOoXgPFmfwVXUNKCtmR3jdP0ZGPw==", "dependencies": { - "@smithy/node-config-provider": "^2.0.12", - "@smithy/property-provider": "^2.0.10", - "@smithy/types": "^2.3.3", - "@smithy/url-parser": "^2.0.9", + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/core": "3.468.0", + "@aws-sdk/credential-provider-node": "3.470.0", + "@aws-sdk/middleware-host-header": "3.468.0", + "@aws-sdk/middleware-logger": "3.468.0", + "@aws-sdk/middleware-recursion-detection": "3.468.0", + "@aws-sdk/middleware-sdk-sts": "3.468.0", + "@aws-sdk/middleware-signing": "3.468.0", + "@aws-sdk/middleware-user-agent": "3.470.0", + "@aws-sdk/region-config-resolver": "3.470.0", + "@aws-sdk/types": "3.468.0", + "@aws-sdk/util-endpoints": "3.470.0", + "@aws-sdk/util-user-agent-browser": "3.468.0", + "@aws-sdk/util-user-agent-node": "3.470.0", + "@smithy/config-resolver": "^2.0.21", + "@smithy/fetch-http-handler": "^2.3.1", + "@smithy/hash-node": "^2.0.17", + "@smithy/invalid-dependency": "^2.0.15", + "@smithy/middleware-content-length": "^2.0.17", + "@smithy/middleware-endpoint": "^2.2.3", + "@smithy/middleware-retry": "^2.0.24", + "@smithy/middleware-serde": "^2.0.15", + "@smithy/middleware-stack": "^2.0.9", + "@smithy/node-config-provider": "^2.1.8", + "@smithy/node-http-handler": "^2.2.1", + "@smithy/protocol-http": "^3.0.11", + "@smithy/smithy-client": "^2.1.18", + "@smithy/types": "^2.7.0", + "@smithy/url-parser": "^2.0.15", + "@smithy/util-base64": "^2.0.1", + "@smithy/util-body-length-browser": "^2.0.1", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.22", + "@smithy/util-defaults-mode-node": "^2.0.29", + "@smithy/util-endpoints": "^1.0.7", + "@smithy/util-retry": "^2.0.8", + "@smithy/util-utf8": "^2.0.2", + "fast-xml-parser": "4.2.5", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/fetch-http-handler": { - "version": "2.1.5", - "license": "Apache-2.0", + "node_modules/@aws-sdk/client-personalize/node_modules/@aws-sdk/core": { + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.468.0.tgz", + "integrity": "sha512-ezUJR9VvknKoXzNZ4wvzGi1jdkmm+/1dUYQ9Sw4r8bzlJDTsUnWbyvaDlBQh81RuhLtVkaUfTnQKoec0cwlZKQ==", "dependencies": { - "@smithy/protocol-http": "^3.0.5", - "@smithy/querystring-builder": "^2.0.9", - "@smithy/types": "^2.3.3", - "@smithy/util-base64": "^2.0.0", + "@smithy/smithy-client": "^2.1.18", "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/hash-node": { - "version": "2.0.9", - "license": "Apache-2.0", + "node_modules/@aws-sdk/client-personalize/node_modules/@aws-sdk/credential-provider-env": { + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.468.0.tgz", + "integrity": "sha512-k/1WHd3KZn0EQYjadooj53FC0z24/e4dUZhbSKTULgmxyO62pwh9v3Brvw4WRa/8o2wTffU/jo54tf4vGuP/ZA==", "dependencies": { - "@smithy/types": "^2.3.3", - "@smithy/util-buffer-from": "^2.0.0", - "@smithy/util-utf8": "^2.0.0", + "@aws-sdk/types": "3.468.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/invalid-dependency": { - "version": "2.0.9", - "license": "Apache-2.0", + "node_modules/@aws-sdk/client-personalize/node_modules/@aws-sdk/credential-provider-ini": { + "version": "3.470.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.470.0.tgz", + "integrity": "sha512-eF22iPO6J2jY+LbuTv5dW0hZBmi6ksRDFFd/zT6TLasrzH2Ex+gAfN3c7rFHF+XAubL0JXFUKFA3UAwoZpO9Zg==", "dependencies": { - "@smithy/types": "^2.3.3", + "@aws-sdk/credential-provider-env": "3.468.0", + "@aws-sdk/credential-provider-process": "3.468.0", + "@aws-sdk/credential-provider-sso": "3.470.0", + "@aws-sdk/credential-provider-web-identity": "3.468.0", + "@aws-sdk/types": "3.468.0", + "@smithy/credential-provider-imds": "^2.0.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/is-array-buffer": { - "version": "2.0.0", - "license": "Apache-2.0", + "node_modules/@aws-sdk/client-personalize/node_modules/@aws-sdk/credential-provider-node": { + "version": "3.470.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.470.0.tgz", + "integrity": "sha512-paySXwzGxBVU+2cVUkRIXafKhYhtO2fJJ3MotR6euvRONK/dta+bhEc5Z4QnTo/gNLoELK/QUC0EGoF+oPfk8g==", "dependencies": { + "@aws-sdk/credential-provider-env": "3.468.0", + "@aws-sdk/credential-provider-ini": "3.470.0", + "@aws-sdk/credential-provider-process": "3.468.0", + "@aws-sdk/credential-provider-sso": "3.470.0", + "@aws-sdk/credential-provider-web-identity": "3.468.0", + "@aws-sdk/types": "3.468.0", + "@smithy/credential-provider-imds": "^2.0.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/middleware-content-length": { - "version": "2.0.11", - "license": "Apache-2.0", + "node_modules/@aws-sdk/client-personalize/node_modules/@aws-sdk/credential-provider-process": { + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.468.0.tgz", + "integrity": "sha512-OYSn1A/UsyPJ7Z8Q2cNhTf55O36shPmSsvOfND04nSfu1nPaR+VUvvsP7v+brhGpwC/GAKTIdGAo4blH31BS6A==", "dependencies": { - "@smithy/protocol-http": "^3.0.5", - "@smithy/types": "^2.3.3", + "@aws-sdk/types": "3.468.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/middleware-endpoint": { - "version": "2.0.9", - "license": "Apache-2.0", + "node_modules/@aws-sdk/client-personalize/node_modules/@aws-sdk/credential-provider-sso": { + "version": "3.470.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.470.0.tgz", + "integrity": "sha512-biGDSh9S9KDR9Tl/8cCPn9g5KPNkXg/CIJIOk3X+6valktbJ2UVYBzi0ZX4vZiudt5ry/Hsu6Pgo+KN1AmBWdg==", "dependencies": { - "@smithy/middleware-serde": "^2.0.9", - "@smithy/types": "^2.3.3", - "@smithy/url-parser": "^2.0.9", - "@smithy/util-middleware": "^2.0.2", + "@aws-sdk/client-sso": "3.470.0", + "@aws-sdk/token-providers": "3.470.0", + "@aws-sdk/types": "3.468.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/middleware-retry": { - "version": "2.0.12", - "license": "Apache-2.0", + "node_modules/@aws-sdk/client-personalize/node_modules/@aws-sdk/credential-provider-web-identity": { + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.468.0.tgz", + "integrity": "sha512-rexymPmXjtkwCPfhnUq3EjO1rSkf39R4Jz9CqiM7OsqK2qlT5Y/V3gnMKn0ZMXsYaQOMfM3cT5xly5R+OKDHlw==", "dependencies": { - "@smithy/node-config-provider": "^2.0.12", - "@smithy/protocol-http": "^3.0.5", - "@smithy/service-error-classification": "^2.0.2", - "@smithy/types": "^2.3.3", - "@smithy/util-middleware": "^2.0.2", - "@smithy/util-retry": "^2.0.2", - "tslib": "^2.5.0", - "uuid": "^8.3.2" + "@aws-sdk/types": "3.468.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/middleware-serde": { - "version": "2.0.9", - "license": "Apache-2.0", + "node_modules/@aws-sdk/client-personalize/node_modules/@aws-sdk/middleware-host-header": { + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.468.0.tgz", + "integrity": "sha512-gwQ+/QhX+lhof304r6zbZ/V5l5cjhGRxLL3CjH1uJPMcOAbw9wUlMdl+ibr8UwBZ5elfKFGiB1cdW/0uMchw0w==", "dependencies": { - "@smithy/types": "^2.3.3", + "@aws-sdk/types": "3.468.0", + "@smithy/protocol-http": "^3.0.11", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/middleware-stack": { - "version": "2.0.2", - "license": "Apache-2.0", + "node_modules/@aws-sdk/client-personalize/node_modules/@aws-sdk/middleware-logger": { + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.468.0.tgz", + "integrity": "sha512-X5XHKV7DHRXI3f29SAhJPe/OxWRFgDWDMMCALfzhmJfCi6Jfh0M14cJKoC+nl+dk9lB+36+jKjhjETZaL2bPlA==", "dependencies": { - "@smithy/types": "^2.3.3", + "@aws-sdk/types": "3.468.0", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/node-config-provider": { - "version": "2.0.12", - "license": "Apache-2.0", + "node_modules/@aws-sdk/client-personalize/node_modules/@aws-sdk/middleware-recursion-detection": { + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.468.0.tgz", + "integrity": "sha512-vch9IQib2Ng9ucSyRW2eKNQXHUPb5jUPCLA5otTW/8nGjcOU37LxQG4WrxO7uaJ9Oe8hjHO+hViE3P0KISUhtA==", "dependencies": { - "@smithy/property-provider": "^2.0.10", - "@smithy/shared-ini-file-loader": "^2.0.11", - "@smithy/types": "^2.3.3", + "@aws-sdk/types": "3.468.0", + "@smithy/protocol-http": "^3.0.11", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/node-http-handler": { - "version": "2.1.5", - "license": "Apache-2.0", + "node_modules/@aws-sdk/client-personalize/node_modules/@aws-sdk/middleware-sdk-sts": { + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-sdk-sts/-/middleware-sdk-sts-3.468.0.tgz", + "integrity": "sha512-xRy8NKfHbmafHwdbotdWgHBvRs0YZgk20GrhFJKp43bkqVbJ5bNlh3nQXf1DeFY9fARR84Bfotya4fwCUHWgZg==", "dependencies": { - "@smithy/abort-controller": "^2.0.9", - "@smithy/protocol-http": "^3.0.5", - "@smithy/querystring-builder": "^2.0.9", - "@smithy/types": "^2.3.3", + "@aws-sdk/middleware-signing": "3.468.0", + "@aws-sdk/types": "3.468.0", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/property-provider": { - "version": "2.0.10", - "license": "Apache-2.0", + "node_modules/@aws-sdk/client-personalize/node_modules/@aws-sdk/middleware-signing": { + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-signing/-/middleware-signing-3.468.0.tgz", + "integrity": "sha512-s+7fSB1gdnnTj5O0aCCarX3z5Vppop8kazbNSZADdkfHIDWCN80IH4ZNjY3OWqaAz0HmR4LNNrovdR304ojb4Q==", "dependencies": { - "@smithy/types": "^2.3.3", + "@aws-sdk/types": "3.468.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/protocol-http": "^3.0.11", + "@smithy/signature-v4": "^2.0.0", + "@smithy/types": "^2.7.0", + "@smithy/util-middleware": "^2.0.8", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/protocol-http": { - "version": "3.0.5", - "license": "Apache-2.0", + "node_modules/@aws-sdk/client-personalize/node_modules/@aws-sdk/middleware-user-agent": { + "version": "3.470.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.470.0.tgz", + "integrity": "sha512-s0YRGgf4fT5KwwTefpoNUQfB5JghzXyvmPfY1QuFEMeVQNxv0OPuydzo3rY2oXPkZjkulKDtpm5jzIHwut75hA==", "dependencies": { - "@smithy/types": "^2.3.3", + "@aws-sdk/types": "3.468.0", + "@aws-sdk/util-endpoints": "3.470.0", + "@smithy/protocol-http": "^3.0.11", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/querystring-builder": { - "version": "2.0.9", - "license": "Apache-2.0", + "node_modules/@aws-sdk/client-personalize/node_modules/@aws-sdk/region-config-resolver": { + "version": "3.470.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.470.0.tgz", + "integrity": "sha512-C1o1J06iIw8cyAAOvHqT4Bbqf+PgQ/RDlSyjt2gFfP2OovDpc2o2S90dE8f8iZdSGpg70N5MikT1DBhW9NbhtQ==", "dependencies": { - "@smithy/types": "^2.3.3", - "@smithy/util-uri-escape": "^2.0.0", + "@smithy/node-config-provider": "^2.1.8", + "@smithy/types": "^2.7.0", + "@smithy/util-config-provider": "^2.0.0", + "@smithy/util-middleware": "^2.0.8", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/querystring-parser": { - "version": "2.0.9", - "license": "Apache-2.0", + "node_modules/@aws-sdk/client-personalize/node_modules/@aws-sdk/token-providers": { + "version": "3.470.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.470.0.tgz", + "integrity": "sha512-rzxnJxEUJiV69Cxsf0AHXTqJqTACITwcSH/PL4lWP4uvtzdrzSi3KA3u2aWHWpOcdE6+JFvdICscsbBSo3/TOg==", "dependencies": { - "@smithy/types": "^2.3.3", + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/middleware-host-header": "3.468.0", + "@aws-sdk/middleware-logger": "3.468.0", + "@aws-sdk/middleware-recursion-detection": "3.468.0", + "@aws-sdk/middleware-user-agent": "3.470.0", + "@aws-sdk/region-config-resolver": "3.470.0", + "@aws-sdk/types": "3.468.0", + "@aws-sdk/util-endpoints": "3.470.0", + "@aws-sdk/util-user-agent-browser": "3.468.0", + "@aws-sdk/util-user-agent-node": "3.470.0", + "@smithy/config-resolver": "^2.0.21", + "@smithy/fetch-http-handler": "^2.3.1", + "@smithy/hash-node": "^2.0.17", + "@smithy/invalid-dependency": "^2.0.15", + "@smithy/middleware-content-length": "^2.0.17", + "@smithy/middleware-endpoint": "^2.2.3", + "@smithy/middleware-retry": "^2.0.24", + "@smithy/middleware-serde": "^2.0.15", + "@smithy/middleware-stack": "^2.0.9", + "@smithy/node-config-provider": "^2.1.8", + "@smithy/node-http-handler": "^2.2.1", + "@smithy/property-provider": "^2.0.0", + "@smithy/protocol-http": "^3.0.11", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/smithy-client": "^2.1.18", + "@smithy/types": "^2.7.0", + "@smithy/url-parser": "^2.0.15", + "@smithy/util-base64": "^2.0.1", + "@smithy/util-body-length-browser": "^2.0.1", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.22", + "@smithy/util-defaults-mode-node": "^2.0.29", + "@smithy/util-endpoints": "^1.0.7", + "@smithy/util-retry": "^2.0.8", + "@smithy/util-utf8": "^2.0.2", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/service-error-classification": { - "version": "2.0.2", - "license": "Apache-2.0", + "node_modules/@aws-sdk/client-personalize/node_modules/@aws-sdk/types": { + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.468.0.tgz", + "integrity": "sha512-rx/9uHI4inRbp2tw3Y4Ih4PNZkVj32h7WneSg3MVgVjAoVD5Zti9KhS5hkvsBxfgmQmg0AQbE+b1sy5WGAgntA==", "dependencies": { - "@smithy/types": "^2.3.3" + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/shared-ini-file-loader": { - "version": "2.0.11", - "license": "Apache-2.0", + "node_modules/@aws-sdk/client-personalize/node_modules/@aws-sdk/util-endpoints": { + "version": "3.470.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.470.0.tgz", + "integrity": "sha512-6N6VvPCmu+89p5Ez/+gLf+X620iQ9JpIs8p8ECZiCodirzFOe8NC1O2S7eov7YiG9IHSuodqn/0qNq+v+oLe0A==", "dependencies": { - "@smithy/types": "^2.3.3", + "@aws-sdk/types": "3.468.0", + "@smithy/util-endpoints": "^1.0.7", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/smithy-client": { - "version": "2.1.6", - "license": "Apache-2.0", + "node_modules/@aws-sdk/client-personalize/node_modules/@aws-sdk/util-user-agent-browser": { + "version": "3.468.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.468.0.tgz", + "integrity": "sha512-OJyhWWsDEizR3L+dCgMXSUmaCywkiZ7HSbnQytbeKGwokIhD69HTiJcibF/sgcM5gk4k3Mq3puUhGnEZ46GIig==", + "dependencies": { + "@aws-sdk/types": "3.468.0", + "@smithy/types": "^2.7.0", + "bowser": "^2.11.0", + "tslib": "^2.5.0" + } + }, + "node_modules/@aws-sdk/client-personalize/node_modules/@aws-sdk/util-user-agent-node": { + "version": "3.470.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.470.0.tgz", + "integrity": "sha512-QxsZ9iVHcBB/XRdYvwfM5AMvNp58HfqkIrH88mY0cmxuvtlIGDfWjczdDrZMJk9y0vIq+cuoCHsGXHu7PyiEAQ==", "dependencies": { - "@smithy/middleware-stack": "^2.0.2", - "@smithy/types": "^2.3.3", - "@smithy/util-stream": "^2.0.12", + "@aws-sdk/types": "3.468.0", + "@smithy/node-config-provider": "^2.1.8", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" + }, + "peerDependencies": { + "aws-crt": ">=1.0.0" + }, + "peerDependenciesMeta": { + "aws-crt": { + "optional": true + } } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/types": { - "version": "2.3.3", - "license": "Apache-2.0", + "node_modules/@aws-sdk/client-s3": { + "version": "3.438.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-s3/-/client-s3-3.438.0.tgz", + "integrity": "sha512-5VxdfyZ9oovbK5qzIYW4ZeJ1waD6VqfclSDQLHmgulekM2JYo/goEQJSjWnI4VMWuMsopzvqyeA+L9xq9uXLBQ==", "dependencies": { + "@aws-crypto/sha1-browser": "3.0.0", + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/client-sts": "3.438.0", + "@aws-sdk/core": "3.436.0", + "@aws-sdk/credential-provider-node": "3.438.0", + "@aws-sdk/middleware-bucket-endpoint": "3.433.0", + "@aws-sdk/middleware-expect-continue": "3.433.0", + "@aws-sdk/middleware-flexible-checksums": "3.433.0", + "@aws-sdk/middleware-host-header": "3.433.0", + "@aws-sdk/middleware-location-constraint": "3.433.0", + "@aws-sdk/middleware-logger": "3.433.0", + "@aws-sdk/middleware-recursion-detection": "3.433.0", + "@aws-sdk/middleware-sdk-s3": "3.433.0", + "@aws-sdk/middleware-signing": "3.433.0", + "@aws-sdk/middleware-ssec": "3.433.0", + "@aws-sdk/middleware-user-agent": "3.438.0", + "@aws-sdk/region-config-resolver": "3.433.0", + "@aws-sdk/signature-v4-multi-region": "3.437.0", + "@aws-sdk/types": "3.433.0", + "@aws-sdk/util-endpoints": "3.438.0", + "@aws-sdk/util-user-agent-browser": "3.433.0", + "@aws-sdk/util-user-agent-node": "3.437.0", + "@aws-sdk/xml-builder": "3.310.0", + "@smithy/config-resolver": "^2.0.16", + "@smithy/eventstream-serde-browser": "^2.0.12", + "@smithy/eventstream-serde-config-resolver": "^2.0.12", + "@smithy/eventstream-serde-node": "^2.0.12", + "@smithy/fetch-http-handler": "^2.2.4", + "@smithy/hash-blob-browser": "^2.0.12", + "@smithy/hash-node": "^2.0.12", + "@smithy/hash-stream-node": "^2.0.12", + "@smithy/invalid-dependency": "^2.0.12", + "@smithy/md5-js": "^2.0.12", + "@smithy/middleware-content-length": "^2.0.14", + "@smithy/middleware-endpoint": "^2.1.3", + "@smithy/middleware-retry": "^2.0.18", + "@smithy/middleware-serde": "^2.0.12", + "@smithy/middleware-stack": "^2.0.6", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/node-http-handler": "^2.1.8", + "@smithy/protocol-http": "^3.0.8", + "@smithy/smithy-client": "^2.1.12", + "@smithy/types": "^2.4.0", + "@smithy/url-parser": "^2.0.12", + "@smithy/util-base64": "^2.0.0", + "@smithy/util-body-length-browser": "^2.0.0", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.16", + "@smithy/util-defaults-mode-node": "^2.0.21", + "@smithy/util-endpoints": "^1.0.2", + "@smithy/util-retry": "^2.0.5", + "@smithy/util-stream": "^2.0.17", + "@smithy/util-utf8": "^2.0.0", + "@smithy/util-waiter": "^2.0.12", + "fast-xml-parser": "4.2.5", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/url-parser": { - "version": "2.0.9", - "license": "Apache-2.0", + "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/client-sso": { + "version": "3.438.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.438.0.tgz", + "integrity": "sha512-L/xKq+K78PShLku8x5gM6lZDUp7LhFJ2ksKH7Vll+exSZq+QUaxuzjp4gqdzh6B0oIshv2jssQlUa0ScOmVRMg==", "dependencies": { - "@smithy/querystring-parser": "^2.0.9", - "@smithy/types": "^2.3.3", + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/core": "3.436.0", + "@aws-sdk/middleware-host-header": "3.433.0", + "@aws-sdk/middleware-logger": "3.433.0", + "@aws-sdk/middleware-recursion-detection": "3.433.0", + "@aws-sdk/middleware-user-agent": "3.438.0", + "@aws-sdk/region-config-resolver": "3.433.0", + "@aws-sdk/types": "3.433.0", + "@aws-sdk/util-endpoints": "3.438.0", + "@aws-sdk/util-user-agent-browser": "3.433.0", + "@aws-sdk/util-user-agent-node": "3.437.0", + "@smithy/config-resolver": "^2.0.16", + "@smithy/fetch-http-handler": "^2.2.4", + "@smithy/hash-node": "^2.0.12", + "@smithy/invalid-dependency": "^2.0.12", + "@smithy/middleware-content-length": "^2.0.14", + "@smithy/middleware-endpoint": "^2.1.3", + "@smithy/middleware-retry": "^2.0.18", + "@smithy/middleware-serde": "^2.0.12", + "@smithy/middleware-stack": "^2.0.6", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/node-http-handler": "^2.1.8", + "@smithy/protocol-http": "^3.0.8", + "@smithy/smithy-client": "^2.1.12", + "@smithy/types": "^2.4.0", + "@smithy/url-parser": "^2.0.12", + "@smithy/util-base64": "^2.0.0", + "@smithy/util-body-length-browser": "^2.0.0", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.16", + "@smithy/util-defaults-mode-node": "^2.0.21", + "@smithy/util-endpoints": "^1.0.2", + "@smithy/util-retry": "^2.0.5", + "@smithy/util-utf8": "^2.0.0", "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/util-base64": { - "version": "2.0.0", - "license": "Apache-2.0", + "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/client-sts": { + "version": "3.438.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.438.0.tgz", + "integrity": "sha512-UBxLZKVVvbR4LHwSNSqaKx22YBSOGkavrh4SyDP8o8XOlXeRxTCllfSfjL9K5Mktp+ZwQ2NiubNcwmvUcGKbbg==", "dependencies": { - "@smithy/util-buffer-from": "^2.0.0", + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/core": "3.436.0", + "@aws-sdk/credential-provider-node": "3.438.0", + "@aws-sdk/middleware-host-header": "3.433.0", + "@aws-sdk/middleware-logger": "3.433.0", + "@aws-sdk/middleware-recursion-detection": "3.433.0", + "@aws-sdk/middleware-sdk-sts": "3.433.0", + "@aws-sdk/middleware-signing": "3.433.0", + "@aws-sdk/middleware-user-agent": "3.438.0", + "@aws-sdk/region-config-resolver": "3.433.0", + "@aws-sdk/types": "3.433.0", + "@aws-sdk/util-endpoints": "3.438.0", + "@aws-sdk/util-user-agent-browser": "3.433.0", + "@aws-sdk/util-user-agent-node": "3.437.0", + "@smithy/config-resolver": "^2.0.16", + "@smithy/fetch-http-handler": "^2.2.4", + "@smithy/hash-node": "^2.0.12", + "@smithy/invalid-dependency": "^2.0.12", + "@smithy/middleware-content-length": "^2.0.14", + "@smithy/middleware-endpoint": "^2.1.3", + "@smithy/middleware-retry": "^2.0.18", + "@smithy/middleware-serde": "^2.0.12", + "@smithy/middleware-stack": "^2.0.6", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/node-http-handler": "^2.1.8", + "@smithy/protocol-http": "^3.0.8", + "@smithy/smithy-client": "^2.1.12", + "@smithy/types": "^2.4.0", + "@smithy/url-parser": "^2.0.12", + "@smithy/util-base64": "^2.0.0", + "@smithy/util-body-length-browser": "^2.0.0", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.16", + "@smithy/util-defaults-mode-node": "^2.0.21", + "@smithy/util-endpoints": "^1.0.2", + "@smithy/util-retry": "^2.0.5", + "@smithy/util-utf8": "^2.0.0", + "fast-xml-parser": "4.2.5", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/util-body-length-browser": { - "version": "2.0.0", - "license": "Apache-2.0", + "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/credential-provider-env": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.433.0.tgz", + "integrity": "sha512-Vl7Qz5qYyxBurMn6hfSiNJeUHSqfVUlMt0C1Bds3tCkl3IzecRWwyBOlxtxO3VCrgVeW3HqswLzCvhAFzPH6nQ==", "dependencies": { + "@aws-sdk/types": "3.433.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/util-body-length-node": { - "version": "2.1.0", - "license": "Apache-2.0", - "dependencies": { + "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/credential-provider-ini": { + "version": "3.438.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.438.0.tgz", + "integrity": "sha512-WYPQR3pXoHJjn9/RMWipUhsUNFy6zhOiII6u8LJ5w84aNqIjV4+BdRYztRNGJD98jdtekhbkX0YKoSuZqP+unQ==", + "dependencies": { + "@aws-sdk/credential-provider-env": "3.433.0", + "@aws-sdk/credential-provider-process": "3.433.0", + "@aws-sdk/credential-provider-sso": "3.438.0", + "@aws-sdk/credential-provider-web-identity": "3.433.0", + "@aws-sdk/types": "3.433.0", + "@smithy/credential-provider-imds": "^2.0.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/util-buffer-from": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/is-array-buffer": "^2.0.0", + "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/credential-provider-node": { + "version": "3.438.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.438.0.tgz", + "integrity": "sha512-uaw3D2R0svyrC32qyZ2aOv/l0AT9eClh+eQsZJTQD3Kz9q+2VdeOBThQ8fsMfRtm26nUbZo6A/CRwxkm6okI+w==", + "dependencies": { + "@aws-sdk/credential-provider-env": "3.433.0", + "@aws-sdk/credential-provider-ini": "3.438.0", + "@aws-sdk/credential-provider-process": "3.433.0", + "@aws-sdk/credential-provider-sso": "3.438.0", + "@aws-sdk/credential-provider-web-identity": "3.433.0", + "@aws-sdk/types": "3.433.0", + "@smithy/credential-provider-imds": "^2.0.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/util-config-provider": { - "version": "2.0.0", - "license": "Apache-2.0", + "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/credential-provider-process": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.433.0.tgz", + "integrity": "sha512-W7FcGlQjio9Y/PepcZGRyl5Bpwb0uWU7qIUCh+u4+q2mW4D5ZngXg8V/opL9/I/p4tUH9VXZLyLGwyBSkdhL+A==", "dependencies": { + "@aws-sdk/types": "3.433.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/util-defaults-mode-browser": { - "version": "2.0.10", - "license": "Apache-2.0", + "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/credential-provider-sso": { + "version": "3.438.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.438.0.tgz", + "integrity": "sha512-Xykli/64xR18cBV5P0XFxcH120omtfAjC/cFy/9nFU/+dPvbk0uu1yEOZYteWHyGGkPN4PkHmbh60GiUCLQkWQ==", "dependencies": { - "@smithy/property-provider": "^2.0.10", - "@smithy/smithy-client": "^2.1.6", - "@smithy/types": "^2.3.3", - "bowser": "^2.11.0", + "@aws-sdk/client-sso": "3.438.0", + "@aws-sdk/token-providers": "3.438.0", + "@aws-sdk/types": "3.433.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { - "node": ">= 10.0.0" + "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/util-defaults-mode-node": { - "version": "2.0.12", - "license": "Apache-2.0", + "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/credential-provider-web-identity": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.433.0.tgz", + "integrity": "sha512-RlwjP1I5wO+aPpwyCp23Mk8nmRbRL33hqRASy73c4JA2z2YiRua+ryt6MalIxehhwQU6xvXUKulJnPG9VaMFZg==", "dependencies": { - "@smithy/config-resolver": "^2.0.10", - "@smithy/credential-provider-imds": "^2.0.12", - "@smithy/node-config-provider": "^2.0.12", - "@smithy/property-provider": "^2.0.10", - "@smithy/smithy-client": "^2.1.6", - "@smithy/types": "^2.3.3", + "@aws-sdk/types": "3.433.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { - "node": ">= 10.0.0" + "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/util-hex-encoding": { - "version": "2.0.0", - "license": "Apache-2.0", + "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/middleware-host-header": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.433.0.tgz", + "integrity": "sha512-mBTq3UWv1UzeHG+OfUQ2MB/5GEkt5LTKFaUqzL7ESwzW8XtpBgXnjZvIwu3Vcd3sEetMwijwaGiJhY0ae/YyaA==", "dependencies": { + "@aws-sdk/types": "3.433.0", + "@smithy/protocol-http": "^3.0.8", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/util-middleware": { - "version": "2.0.2", - "license": "Apache-2.0", + "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/middleware-logger": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.433.0.tgz", + "integrity": "sha512-We346Fb5xGonTGVZC9Nvqtnqy74VJzYuTLLiuuftA5sbNzftBDy/22QCfvYSTOAl3bvif+dkDUzQY2ihc5PwOQ==", "dependencies": { - "@smithy/types": "^2.3.3", + "@aws-sdk/types": "3.433.0", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/util-retry": { - "version": "2.0.2", - "license": "Apache-2.0", + "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/middleware-recursion-detection": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.433.0.tgz", + "integrity": "sha512-HEvYC9PQlWY/ccUYtLvAlwwf1iCif2TSAmLNr3YTBRVa98x6jKL0hlCrHWYklFeqOGSKy6XhE+NGJMUII0/HaQ==", "dependencies": { - "@smithy/service-error-classification": "^2.0.2", - "@smithy/types": "^2.3.3", + "@aws-sdk/types": "3.433.0", + "@smithy/protocol-http": "^3.0.8", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { - "node": ">= 14.0.0" + "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/util-stream": { - "version": "2.0.12", - "license": "Apache-2.0", + "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/middleware-sdk-sts": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-sdk-sts/-/middleware-sdk-sts-3.433.0.tgz", + "integrity": "sha512-ORYbJnBejUyonFl5FwIqhvI3Cq6sAp9j+JpkKZtFNma9tFPdrhmYgfCeNH32H/wGTQV/tUoQ3luh0gA4cuk6DA==", "dependencies": { - "@smithy/fetch-http-handler": "^2.1.5", - "@smithy/node-http-handler": "^2.1.5", - "@smithy/types": "^2.3.3", - "@smithy/util-base64": "^2.0.0", - "@smithy/util-buffer-from": "^2.0.0", - "@smithy/util-hex-encoding": "^2.0.0", - "@smithy/util-utf8": "^2.0.0", + "@aws-sdk/middleware-signing": "3.433.0", + "@aws-sdk/types": "3.433.0", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/util-uri-escape": { - "version": "2.0.0", - "license": "Apache-2.0", + "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/middleware-signing": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-signing/-/middleware-signing-3.433.0.tgz", + "integrity": "sha512-jxPvt59NZo/epMNLNTu47ikmP8v0q217I6bQFGJG7JVFnfl36zDktMwGw+0xZR80qiK47/2BWrNpta61Zd2FxQ==", "dependencies": { + "@aws-sdk/types": "3.433.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/protocol-http": "^3.0.8", + "@smithy/signature-v4": "^2.0.0", + "@smithy/types": "^2.4.0", + "@smithy/util-middleware": "^2.0.5", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/util-utf8": { - "version": "2.0.0", - "license": "Apache-2.0", + "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/middleware-user-agent": { + "version": "3.438.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.438.0.tgz", + "integrity": "sha512-a+xHT1wOxT6EA6YyLmrfaroKWOkwwyiktUfXKM0FsUutGzNi4fKhb5NZ2al58NsXzHgHFrasSDp+Lqbd/X2cEw==", "dependencies": { - "@smithy/util-buffer-from": "^2.0.0", + "@aws-sdk/types": "3.433.0", + "@aws-sdk/util-endpoints": "3.438.0", + "@smithy/protocol-http": "^3.0.8", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/uuid": { - "version": "8.3.2", - "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" + "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/region-config-resolver": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.433.0.tgz", + "integrity": "sha512-xpjRjCZW+CDFdcMmmhIYg81ST5UAnJh61IHziQEk0FXONrg4kjyYPZAOjEdzXQ+HxJQuGQLKPhRdzxmQnbX7pg==", + "dependencies": { + "@smithy/node-config-provider": "^2.1.3", + "@smithy/types": "^2.4.0", + "@smithy/util-config-provider": "^2.0.0", + "@smithy/util-middleware": "^2.0.5", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-personalize": { - "version": "3.414.0", - "license": "Apache-2.0", + "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/token-providers": { + "version": "3.438.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.438.0.tgz", + "integrity": "sha512-G2fUfTtU6/1ayYRMu0Pd9Ln4qYSvwJOWCqJMdkDgvXSwdgcOSOLsnAIk1AHGJDAvgLikdCzuyOsdJiexr9Vnww==", "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/client-sts": "3.414.0", - "@aws-sdk/credential-provider-node": "3.414.0", - "@aws-sdk/middleware-host-header": "3.413.0", - "@aws-sdk/middleware-logger": "3.413.0", - "@aws-sdk/middleware-recursion-detection": "3.413.0", - "@aws-sdk/middleware-signing": "3.413.0", - "@aws-sdk/middleware-user-agent": "3.413.0", - "@aws-sdk/region-config-resolver": "3.413.0", - "@aws-sdk/types": "3.413.0", - "@aws-sdk/util-endpoints": "3.413.0", - "@aws-sdk/util-user-agent-browser": "3.413.0", - "@aws-sdk/util-user-agent-node": "3.413.0", - "@smithy/config-resolver": "^2.0.8", - "@smithy/fetch-http-handler": "^2.1.3", - "@smithy/hash-node": "^2.0.7", - "@smithy/invalid-dependency": "^2.0.7", - "@smithy/middleware-content-length": "^2.0.9", - "@smithy/middleware-endpoint": "^2.0.7", - "@smithy/middleware-retry": "^2.0.10", - "@smithy/middleware-serde": "^2.0.7", - "@smithy/middleware-stack": "^2.0.0", - "@smithy/node-config-provider": "^2.0.10", - "@smithy/node-http-handler": "^2.1.3", - "@smithy/protocol-http": "^3.0.3", - "@smithy/smithy-client": "^2.1.4", - "@smithy/types": "^2.3.1", - "@smithy/url-parser": "^2.0.7", - "@smithy/util-base64": "^2.0.0", - "@smithy/util-body-length-browser": "^2.0.0", - "@smithy/util-body-length-node": "^2.1.0", - "@smithy/util-defaults-mode-browser": "^2.0.8", - "@smithy/util-defaults-mode-node": "^2.0.10", - "@smithy/util-retry": "^2.0.0", - "@smithy/util-utf8": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@aws-sdk/types": { - "version": "3.413.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/abort-controller": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/config-resolver": { - "version": "2.0.10", - "license": "Apache-2.0", - "dependencies": { - "@smithy/node-config-provider": "^2.0.12", - "@smithy/types": "^2.3.3", - "@smithy/util-config-provider": "^2.0.0", - "@smithy/util-middleware": "^2.0.2", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/credential-provider-imds": { - "version": "2.0.12", - "license": "Apache-2.0", - "dependencies": { - "@smithy/node-config-provider": "^2.0.12", - "@smithy/property-provider": "^2.0.10", - "@smithy/types": "^2.3.3", - "@smithy/url-parser": "^2.0.9", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/fetch-http-handler": { - "version": "2.1.5", - "license": "Apache-2.0", - "dependencies": { - "@smithy/protocol-http": "^3.0.5", - "@smithy/querystring-builder": "^2.0.9", - "@smithy/types": "^2.3.3", - "@smithy/util-base64": "^2.0.0", - "tslib": "^2.5.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/hash-node": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "@smithy/util-buffer-from": "^2.0.0", - "@smithy/util-utf8": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/invalid-dependency": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/is-array-buffer": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/middleware-content-length": { - "version": "2.0.11", - "license": "Apache-2.0", - "dependencies": { - "@smithy/protocol-http": "^3.0.5", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/middleware-endpoint": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/middleware-serde": "^2.0.9", - "@smithy/types": "^2.3.3", - "@smithy/url-parser": "^2.0.9", - "@smithy/util-middleware": "^2.0.2", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/middleware-retry": { - "version": "2.0.12", - "license": "Apache-2.0", - "dependencies": { - "@smithy/node-config-provider": "^2.0.12", - "@smithy/protocol-http": "^3.0.5", - "@smithy/service-error-classification": "^2.0.2", - "@smithy/types": "^2.3.3", - "@smithy/util-middleware": "^2.0.2", - "@smithy/util-retry": "^2.0.2", - "tslib": "^2.5.0", - "uuid": "^8.3.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/middleware-serde": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/middleware-stack": { - "version": "2.0.2", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/node-config-provider": { - "version": "2.0.12", - "license": "Apache-2.0", - "dependencies": { - "@smithy/property-provider": "^2.0.10", - "@smithy/shared-ini-file-loader": "^2.0.11", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/node-http-handler": { - "version": "2.1.5", - "license": "Apache-2.0", - "dependencies": { - "@smithy/abort-controller": "^2.0.9", - "@smithy/protocol-http": "^3.0.5", - "@smithy/querystring-builder": "^2.0.9", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/property-provider": { - "version": "2.0.10", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/protocol-http": { - "version": "3.0.5", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/querystring-builder": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "@smithy/util-uri-escape": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/querystring-parser": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/service-error-classification": { - "version": "2.0.2", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/shared-ini-file-loader": { - "version": "2.0.11", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/smithy-client": { - "version": "2.1.6", - "license": "Apache-2.0", - "dependencies": { - "@smithy/middleware-stack": "^2.0.2", - "@smithy/types": "^2.3.3", - "@smithy/util-stream": "^2.0.12", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/types": { - "version": "2.3.3", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/url-parser": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/querystring-parser": "^2.0.9", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/util-base64": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/util-buffer-from": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/util-body-length-browser": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/util-body-length-node": { - "version": "2.1.0", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/util-buffer-from": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/is-array-buffer": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/util-config-provider": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/util-defaults-mode-browser": { - "version": "2.0.10", - "license": "Apache-2.0", - "dependencies": { - "@smithy/property-provider": "^2.0.10", - "@smithy/smithy-client": "^2.1.6", - "@smithy/types": "^2.3.3", - "bowser": "^2.11.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">= 10.0.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/util-defaults-mode-node": { - "version": "2.0.12", - "license": "Apache-2.0", - "dependencies": { - "@smithy/config-resolver": "^2.0.10", - "@smithy/credential-provider-imds": "^2.0.12", - "@smithy/node-config-provider": "^2.0.12", - "@smithy/property-provider": "^2.0.10", - "@smithy/smithy-client": "^2.1.6", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">= 10.0.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/util-hex-encoding": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/util-middleware": { - "version": "2.0.2", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/util-retry": { - "version": "2.0.2", - "license": "Apache-2.0", - "dependencies": { - "@smithy/service-error-classification": "^2.0.2", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">= 14.0.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/util-stream": { - "version": "2.0.12", - "license": "Apache-2.0", - "dependencies": { - "@smithy/fetch-http-handler": "^2.1.5", - "@smithy/node-http-handler": "^2.1.5", - "@smithy/types": "^2.3.3", - "@smithy/util-base64": "^2.0.0", - "@smithy/util-buffer-from": "^2.0.0", - "@smithy/util-hex-encoding": "^2.0.0", - "@smithy/util-utf8": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/util-uri-escape": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/@smithy/util-utf8": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/util-buffer-from": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-personalize/node_modules/uuid": { - "version": "8.3.2", - "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/@aws-sdk/client-s3": { - "version": "3.370.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-crypto/sha1-browser": "3.0.0", - "@aws-crypto/sha256-browser": "3.0.0", - "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/client-sts": "3.370.0", - "@aws-sdk/credential-provider-node": "3.370.0", - "@aws-sdk/hash-blob-browser": "3.370.0", - "@aws-sdk/hash-stream-node": "3.370.0", - "@aws-sdk/md5-js": "3.370.0", - "@aws-sdk/middleware-bucket-endpoint": "3.370.0", - "@aws-sdk/middleware-expect-continue": "3.370.0", - "@aws-sdk/middleware-flexible-checksums": "3.370.0", - "@aws-sdk/middleware-host-header": "3.370.0", - "@aws-sdk/middleware-location-constraint": "3.370.0", - "@aws-sdk/middleware-logger": "3.370.0", - "@aws-sdk/middleware-recursion-detection": "3.370.0", - "@aws-sdk/middleware-sdk-s3": "3.370.0", - "@aws-sdk/middleware-signing": "3.370.0", - "@aws-sdk/middleware-ssec": "3.370.0", - "@aws-sdk/middleware-user-agent": "3.370.0", - "@aws-sdk/signature-v4-multi-region": "3.370.0", - "@aws-sdk/types": "3.370.0", - "@aws-sdk/util-endpoints": "3.370.0", - "@aws-sdk/util-user-agent-browser": "3.370.0", - "@aws-sdk/util-user-agent-node": "3.370.0", - "@aws-sdk/xml-builder": "3.310.0", - "@smithy/config-resolver": "^1.0.1", - "@smithy/eventstream-serde-browser": "^1.0.1", - "@smithy/eventstream-serde-config-resolver": "^1.0.1", - "@smithy/eventstream-serde-node": "^1.0.1", - "@smithy/fetch-http-handler": "^1.0.1", - "@smithy/hash-node": "^1.0.1", - "@smithy/invalid-dependency": "^1.0.1", - "@smithy/middleware-content-length": "^1.0.1", - "@smithy/middleware-endpoint": "^1.0.2", - "@smithy/middleware-retry": "^1.0.3", - "@smithy/middleware-serde": "^1.0.1", - "@smithy/middleware-stack": "^1.0.1", - "@smithy/node-config-provider": "^1.0.1", - "@smithy/node-http-handler": "^1.0.2", - "@smithy/protocol-http": "^1.1.0", - "@smithy/smithy-client": "^1.0.3", - "@smithy/types": "^1.1.0", - "@smithy/url-parser": "^1.0.1", - "@smithy/util-base64": "^1.0.1", - "@smithy/util-body-length-browser": "^1.0.1", - "@smithy/util-body-length-node": "^1.0.1", - "@smithy/util-defaults-mode-browser": "^1.0.1", - "@smithy/util-defaults-mode-node": "^1.0.1", - "@smithy/util-retry": "^1.0.3", - "@smithy/util-stream": "^1.0.1", - "@smithy/util-utf8": "^1.0.1", - "@smithy/util-waiter": "^1.0.1", - "fast-xml-parser": "4.2.5", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/client-sso": { - "version": "3.370.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-crypto/sha256-browser": "3.0.0", - "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/middleware-host-header": "3.370.0", - "@aws-sdk/middleware-logger": "3.370.0", - "@aws-sdk/middleware-recursion-detection": "3.370.0", - "@aws-sdk/middleware-user-agent": "3.370.0", - "@aws-sdk/types": "3.370.0", - "@aws-sdk/util-endpoints": "3.370.0", - "@aws-sdk/util-user-agent-browser": "3.370.0", - "@aws-sdk/util-user-agent-node": "3.370.0", - "@smithy/config-resolver": "^1.0.1", - "@smithy/fetch-http-handler": "^1.0.1", - "@smithy/hash-node": "^1.0.1", - "@smithy/invalid-dependency": "^1.0.1", - "@smithy/middleware-content-length": "^1.0.1", - "@smithy/middleware-endpoint": "^1.0.2", - "@smithy/middleware-retry": "^1.0.3", - "@smithy/middleware-serde": "^1.0.1", - "@smithy/middleware-stack": "^1.0.1", - "@smithy/node-config-provider": "^1.0.1", - "@smithy/node-http-handler": "^1.0.2", - "@smithy/protocol-http": "^1.1.0", - "@smithy/smithy-client": "^1.0.3", - "@smithy/types": "^1.1.0", - "@smithy/url-parser": "^1.0.1", - "@smithy/util-base64": "^1.0.1", - "@smithy/util-body-length-browser": "^1.0.1", - "@smithy/util-body-length-node": "^1.0.1", - "@smithy/util-defaults-mode-browser": "^1.0.1", - "@smithy/util-defaults-mode-node": "^1.0.1", - "@smithy/util-retry": "^1.0.3", - "@smithy/util-utf8": "^1.0.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/client-sso-oidc": { - "version": "3.370.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-crypto/sha256-browser": "3.0.0", - "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/middleware-host-header": "3.370.0", - "@aws-sdk/middleware-logger": "3.370.0", - "@aws-sdk/middleware-recursion-detection": "3.370.0", - "@aws-sdk/middleware-user-agent": "3.370.0", - "@aws-sdk/types": "3.370.0", - "@aws-sdk/util-endpoints": "3.370.0", - "@aws-sdk/util-user-agent-browser": "3.370.0", - "@aws-sdk/util-user-agent-node": "3.370.0", - "@smithy/config-resolver": "^1.0.1", - "@smithy/fetch-http-handler": "^1.0.1", - "@smithy/hash-node": "^1.0.1", - "@smithy/invalid-dependency": "^1.0.1", - "@smithy/middleware-content-length": "^1.0.1", - "@smithy/middleware-endpoint": "^1.0.2", - "@smithy/middleware-retry": "^1.0.3", - "@smithy/middleware-serde": "^1.0.1", - "@smithy/middleware-stack": "^1.0.1", - "@smithy/node-config-provider": "^1.0.1", - "@smithy/node-http-handler": "^1.0.2", - "@smithy/protocol-http": "^1.1.0", - "@smithy/smithy-client": "^1.0.3", - "@smithy/types": "^1.1.0", - "@smithy/url-parser": "^1.0.1", - "@smithy/util-base64": "^1.0.1", - "@smithy/util-body-length-browser": "^1.0.1", - "@smithy/util-body-length-node": "^1.0.1", - "@smithy/util-defaults-mode-browser": "^1.0.1", - "@smithy/util-defaults-mode-node": "^1.0.1", - "@smithy/util-retry": "^1.0.3", - "@smithy/util-utf8": "^1.0.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/client-sts": { - "version": "3.370.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-crypto/sha256-browser": "3.0.0", - "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/credential-provider-node": "3.370.0", - "@aws-sdk/middleware-host-header": "3.370.0", - "@aws-sdk/middleware-logger": "3.370.0", - "@aws-sdk/middleware-recursion-detection": "3.370.0", - "@aws-sdk/middleware-sdk-sts": "3.370.0", - "@aws-sdk/middleware-signing": "3.370.0", - "@aws-sdk/middleware-user-agent": "3.370.0", - "@aws-sdk/types": "3.370.0", - "@aws-sdk/util-endpoints": "3.370.0", - "@aws-sdk/util-user-agent-browser": "3.370.0", - "@aws-sdk/util-user-agent-node": "3.370.0", - "@smithy/config-resolver": "^1.0.1", - "@smithy/fetch-http-handler": "^1.0.1", - "@smithy/hash-node": "^1.0.1", - "@smithy/invalid-dependency": "^1.0.1", - "@smithy/middleware-content-length": "^1.0.1", - "@smithy/middleware-endpoint": "^1.0.2", - "@smithy/middleware-retry": "^1.0.3", - "@smithy/middleware-serde": "^1.0.1", - "@smithy/middleware-stack": "^1.0.1", - "@smithy/node-config-provider": "^1.0.1", - "@smithy/node-http-handler": "^1.0.2", - "@smithy/protocol-http": "^1.1.0", - "@smithy/smithy-client": "^1.0.3", - "@smithy/types": "^1.1.0", - "@smithy/url-parser": "^1.0.1", - "@smithy/util-base64": "^1.0.1", - "@smithy/util-body-length-browser": "^1.0.1", - "@smithy/util-body-length-node": "^1.0.1", - "@smithy/util-defaults-mode-browser": "^1.0.1", - "@smithy/util-defaults-mode-node": "^1.0.1", - "@smithy/util-retry": "^1.0.3", - "@smithy/util-utf8": "^1.0.1", - "fast-xml-parser": "4.2.5", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/credential-provider-env": { - "version": "3.370.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.370.0", - "@smithy/property-provider": "^1.0.1", - "@smithy/types": "^1.1.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/credential-provider-ini": { - "version": "3.370.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/credential-provider-env": "3.370.0", - "@aws-sdk/credential-provider-process": "3.370.0", - "@aws-sdk/credential-provider-sso": "3.370.0", - "@aws-sdk/credential-provider-web-identity": "3.370.0", - "@aws-sdk/types": "3.370.0", - "@smithy/credential-provider-imds": "^1.0.1", - "@smithy/property-provider": "^1.0.1", - "@smithy/shared-ini-file-loader": "^1.0.1", - "@smithy/types": "^1.1.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/credential-provider-node": { - "version": "3.370.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/credential-provider-env": "3.370.0", - "@aws-sdk/credential-provider-ini": "3.370.0", - "@aws-sdk/credential-provider-process": "3.370.0", - "@aws-sdk/credential-provider-sso": "3.370.0", - "@aws-sdk/credential-provider-web-identity": "3.370.0", - "@aws-sdk/types": "3.370.0", - "@smithy/credential-provider-imds": "^1.0.1", - "@smithy/property-provider": "^1.0.1", - "@smithy/shared-ini-file-loader": "^1.0.1", - "@smithy/types": "^1.1.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/credential-provider-process": { - "version": "3.370.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.370.0", - "@smithy/property-provider": "^1.0.1", - "@smithy/shared-ini-file-loader": "^1.0.1", - "@smithy/types": "^1.1.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/credential-provider-sso": { - "version": "3.370.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/client-sso": "3.370.0", - "@aws-sdk/token-providers": "3.370.0", - "@aws-sdk/types": "3.370.0", - "@smithy/property-provider": "^1.0.1", - "@smithy/shared-ini-file-loader": "^1.0.1", - "@smithy/types": "^1.1.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/credential-provider-web-identity": { - "version": "3.370.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.370.0", - "@smithy/property-provider": "^1.0.1", - "@smithy/types": "^1.1.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/middleware-host-header": { - "version": "3.370.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.370.0", - "@smithy/protocol-http": "^1.1.0", - "@smithy/types": "^1.1.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/middleware-logger": { - "version": "3.370.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.370.0", - "@smithy/types": "^1.1.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/middleware-recursion-detection": { - "version": "3.370.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.370.0", - "@smithy/protocol-http": "^1.1.0", - "@smithy/types": "^1.1.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/middleware-sdk-sts": { - "version": "3.370.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/middleware-signing": "3.370.0", - "@aws-sdk/types": "3.370.0", - "@smithy/types": "^1.1.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/middleware-signing": { - "version": "3.370.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.370.0", - "@smithy/property-provider": "^1.0.1", - "@smithy/protocol-http": "^1.1.0", - "@smithy/signature-v4": "^1.0.1", - "@smithy/types": "^1.1.0", - "@smithy/util-middleware": "^1.0.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/middleware-user-agent": { - "version": "3.370.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.370.0", - "@aws-sdk/util-endpoints": "3.370.0", - "@smithy/protocol-http": "^1.1.0", - "@smithy/types": "^1.1.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/token-providers": { - "version": "3.370.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/client-sso-oidc": "3.370.0", - "@aws-sdk/types": "3.370.0", - "@smithy/property-provider": "^1.0.1", - "@smithy/shared-ini-file-loader": "^1.0.1", - "@smithy/types": "^1.1.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/util-endpoints": { - "version": "3.370.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.370.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/util-user-agent-browser": { - "version": "3.370.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.370.0", - "@smithy/types": "^1.1.0", - "bowser": "^2.11.0", - "tslib": "^2.5.0" - } - }, - "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/util-user-agent-node": { - "version": "3.370.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.370.0", - "@smithy/node-config-provider": "^1.0.1", - "@smithy/types": "^1.1.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "aws-crt": ">=1.0.0" - }, - "peerDependenciesMeta": { - "aws-crt": { - "optional": true - } - } - }, - "node_modules/@aws-sdk/client-sso": { - "version": "3.414.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-crypto/sha256-browser": "3.0.0", - "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/middleware-host-header": "3.413.0", - "@aws-sdk/middleware-logger": "3.413.0", - "@aws-sdk/middleware-recursion-detection": "3.413.0", - "@aws-sdk/middleware-user-agent": "3.413.0", - "@aws-sdk/region-config-resolver": "3.413.0", - "@aws-sdk/types": "3.413.0", - "@aws-sdk/util-endpoints": "3.413.0", - "@aws-sdk/util-user-agent-browser": "3.413.0", - "@aws-sdk/util-user-agent-node": "3.413.0", - "@smithy/config-resolver": "^2.0.8", - "@smithy/fetch-http-handler": "^2.1.3", - "@smithy/hash-node": "^2.0.7", - "@smithy/invalid-dependency": "^2.0.7", - "@smithy/middleware-content-length": "^2.0.9", - "@smithy/middleware-endpoint": "^2.0.7", - "@smithy/middleware-retry": "^2.0.10", - "@smithy/middleware-serde": "^2.0.7", - "@smithy/middleware-stack": "^2.0.0", - "@smithy/node-config-provider": "^2.0.10", - "@smithy/node-http-handler": "^2.1.3", - "@smithy/protocol-http": "^3.0.3", - "@smithy/smithy-client": "^2.1.4", - "@smithy/types": "^2.3.1", - "@smithy/url-parser": "^2.0.7", - "@smithy/util-base64": "^2.0.0", - "@smithy/util-body-length-browser": "^2.0.0", - "@smithy/util-body-length-node": "^2.1.0", - "@smithy/util-defaults-mode-browser": "^2.0.8", - "@smithy/util-defaults-mode-node": "^2.0.10", - "@smithy/util-retry": "^2.0.0", - "@smithy/util-utf8": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@aws-sdk/types": { - "version": "3.413.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/abort-controller": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/config-resolver": { - "version": "2.0.10", - "license": "Apache-2.0", - "dependencies": { - "@smithy/node-config-provider": "^2.0.12", - "@smithy/types": "^2.3.3", - "@smithy/util-config-provider": "^2.0.0", - "@smithy/util-middleware": "^2.0.2", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/credential-provider-imds": { - "version": "2.0.12", - "license": "Apache-2.0", - "dependencies": { - "@smithy/node-config-provider": "^2.0.12", - "@smithy/property-provider": "^2.0.10", - "@smithy/types": "^2.3.3", - "@smithy/url-parser": "^2.0.9", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/fetch-http-handler": { - "version": "2.1.5", - "license": "Apache-2.0", - "dependencies": { - "@smithy/protocol-http": "^3.0.5", - "@smithy/querystring-builder": "^2.0.9", - "@smithy/types": "^2.3.3", - "@smithy/util-base64": "^2.0.0", - "tslib": "^2.5.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/hash-node": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "@smithy/util-buffer-from": "^2.0.0", - "@smithy/util-utf8": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/invalid-dependency": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/is-array-buffer": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/middleware-content-length": { - "version": "2.0.11", - "license": "Apache-2.0", - "dependencies": { - "@smithy/protocol-http": "^3.0.5", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/middleware-endpoint": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/middleware-serde": "^2.0.9", - "@smithy/types": "^2.3.3", - "@smithy/url-parser": "^2.0.9", - "@smithy/util-middleware": "^2.0.2", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/middleware-retry": { - "version": "2.0.12", - "license": "Apache-2.0", - "dependencies": { - "@smithy/node-config-provider": "^2.0.12", - "@smithy/protocol-http": "^3.0.5", - "@smithy/service-error-classification": "^2.0.2", - "@smithy/types": "^2.3.3", - "@smithy/util-middleware": "^2.0.2", - "@smithy/util-retry": "^2.0.2", - "tslib": "^2.5.0", - "uuid": "^8.3.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/middleware-serde": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/middleware-stack": { - "version": "2.0.2", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/node-config-provider": { - "version": "2.0.12", - "license": "Apache-2.0", - "dependencies": { - "@smithy/property-provider": "^2.0.10", - "@smithy/shared-ini-file-loader": "^2.0.11", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/node-http-handler": { - "version": "2.1.5", - "license": "Apache-2.0", - "dependencies": { - "@smithy/abort-controller": "^2.0.9", - "@smithy/protocol-http": "^3.0.5", - "@smithy/querystring-builder": "^2.0.9", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/property-provider": { - "version": "2.0.10", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/protocol-http": { - "version": "3.0.5", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/querystring-builder": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "@smithy/util-uri-escape": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/querystring-parser": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/service-error-classification": { - "version": "2.0.2", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/shared-ini-file-loader": { - "version": "2.0.11", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/smithy-client": { - "version": "2.1.6", - "license": "Apache-2.0", - "dependencies": { - "@smithy/middleware-stack": "^2.0.2", - "@smithy/types": "^2.3.3", - "@smithy/util-stream": "^2.0.12", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/types": { - "version": "2.3.3", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/url-parser": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/querystring-parser": "^2.0.9", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/util-base64": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/util-buffer-from": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/util-body-length-browser": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/util-body-length-node": { - "version": "2.1.0", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/util-buffer-from": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/is-array-buffer": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/util-config-provider": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/util-defaults-mode-browser": { - "version": "2.0.10", - "license": "Apache-2.0", - "dependencies": { - "@smithy/property-provider": "^2.0.10", - "@smithy/smithy-client": "^2.1.6", - "@smithy/types": "^2.3.3", - "bowser": "^2.11.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">= 10.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/util-defaults-mode-node": { - "version": "2.0.12", - "license": "Apache-2.0", - "dependencies": { - "@smithy/config-resolver": "^2.0.10", - "@smithy/credential-provider-imds": "^2.0.12", - "@smithy/node-config-provider": "^2.0.12", - "@smithy/property-provider": "^2.0.10", - "@smithy/smithy-client": "^2.1.6", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">= 10.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/util-hex-encoding": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/util-middleware": { - "version": "2.0.2", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/util-retry": { - "version": "2.0.2", - "license": "Apache-2.0", - "dependencies": { - "@smithy/service-error-classification": "^2.0.2", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">= 14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/util-stream": { - "version": "2.0.12", - "license": "Apache-2.0", - "dependencies": { - "@smithy/fetch-http-handler": "^2.1.5", - "@smithy/node-http-handler": "^2.1.5", - "@smithy/types": "^2.3.3", - "@smithy/util-base64": "^2.0.0", - "@smithy/util-buffer-from": "^2.0.0", - "@smithy/util-hex-encoding": "^2.0.0", - "@smithy/util-utf8": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/util-uri-escape": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/util-utf8": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/util-buffer-from": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/uuid": { - "version": "8.3.2", - "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/@aws-sdk/client-sts": { - "version": "3.414.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-crypto/sha256-browser": "3.0.0", - "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/credential-provider-node": "3.414.0", - "@aws-sdk/middleware-host-header": "3.413.0", - "@aws-sdk/middleware-logger": "3.413.0", - "@aws-sdk/middleware-recursion-detection": "3.413.0", - "@aws-sdk/middleware-sdk-sts": "3.413.0", - "@aws-sdk/middleware-signing": "3.413.0", - "@aws-sdk/middleware-user-agent": "3.413.0", - "@aws-sdk/region-config-resolver": "3.413.0", - "@aws-sdk/types": "3.413.0", - "@aws-sdk/util-endpoints": "3.413.0", - "@aws-sdk/util-user-agent-browser": "3.413.0", - "@aws-sdk/util-user-agent-node": "3.413.0", - "@smithy/config-resolver": "^2.0.8", - "@smithy/fetch-http-handler": "^2.1.3", - "@smithy/hash-node": "^2.0.7", - "@smithy/invalid-dependency": "^2.0.7", - "@smithy/middleware-content-length": "^2.0.9", - "@smithy/middleware-endpoint": "^2.0.7", - "@smithy/middleware-retry": "^2.0.10", - "@smithy/middleware-serde": "^2.0.7", - "@smithy/middleware-stack": "^2.0.0", - "@smithy/node-config-provider": "^2.0.10", - "@smithy/node-http-handler": "^2.1.3", - "@smithy/protocol-http": "^3.0.3", - "@smithy/smithy-client": "^2.1.4", - "@smithy/types": "^2.3.1", - "@smithy/url-parser": "^2.0.7", - "@smithy/util-base64": "^2.0.0", - "@smithy/util-body-length-browser": "^2.0.0", - "@smithy/util-body-length-node": "^2.1.0", - "@smithy/util-defaults-mode-browser": "^2.0.8", - "@smithy/util-defaults-mode-node": "^2.0.10", - "@smithy/util-retry": "^2.0.0", - "@smithy/util-utf8": "^2.0.0", - "fast-xml-parser": "4.2.5", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@aws-sdk/types": { - "version": "3.413.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/abort-controller": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/config-resolver": { - "version": "2.0.10", - "license": "Apache-2.0", - "dependencies": { - "@smithy/node-config-provider": "^2.0.12", - "@smithy/types": "^2.3.3", - "@smithy/util-config-provider": "^2.0.0", - "@smithy/util-middleware": "^2.0.2", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/credential-provider-imds": { - "version": "2.0.12", - "license": "Apache-2.0", - "dependencies": { - "@smithy/node-config-provider": "^2.0.12", - "@smithy/property-provider": "^2.0.10", - "@smithy/types": "^2.3.3", - "@smithy/url-parser": "^2.0.9", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/fetch-http-handler": { - "version": "2.1.5", - "license": "Apache-2.0", - "dependencies": { - "@smithy/protocol-http": "^3.0.5", - "@smithy/querystring-builder": "^2.0.9", - "@smithy/types": "^2.3.3", - "@smithy/util-base64": "^2.0.0", - "tslib": "^2.5.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/hash-node": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "@smithy/util-buffer-from": "^2.0.0", - "@smithy/util-utf8": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/invalid-dependency": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/is-array-buffer": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/middleware-content-length": { - "version": "2.0.11", - "license": "Apache-2.0", - "dependencies": { - "@smithy/protocol-http": "^3.0.5", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/middleware-endpoint": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/middleware-serde": "^2.0.9", - "@smithy/types": "^2.3.3", - "@smithy/url-parser": "^2.0.9", - "@smithy/util-middleware": "^2.0.2", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/middleware-retry": { - "version": "2.0.12", - "license": "Apache-2.0", - "dependencies": { - "@smithy/node-config-provider": "^2.0.12", - "@smithy/protocol-http": "^3.0.5", - "@smithy/service-error-classification": "^2.0.2", - "@smithy/types": "^2.3.3", - "@smithy/util-middleware": "^2.0.2", - "@smithy/util-retry": "^2.0.2", - "tslib": "^2.5.0", - "uuid": "^8.3.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/middleware-serde": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/middleware-stack": { - "version": "2.0.2", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/node-config-provider": { - "version": "2.0.12", - "license": "Apache-2.0", - "dependencies": { - "@smithy/property-provider": "^2.0.10", - "@smithy/shared-ini-file-loader": "^2.0.11", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/node-http-handler": { - "version": "2.1.5", - "license": "Apache-2.0", - "dependencies": { - "@smithy/abort-controller": "^2.0.9", - "@smithy/protocol-http": "^3.0.5", - "@smithy/querystring-builder": "^2.0.9", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/property-provider": { - "version": "2.0.10", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/protocol-http": { - "version": "3.0.5", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/querystring-builder": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "@smithy/util-uri-escape": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/querystring-parser": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/service-error-classification": { - "version": "2.0.2", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/shared-ini-file-loader": { - "version": "2.0.11", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/smithy-client": { - "version": "2.1.6", - "license": "Apache-2.0", - "dependencies": { - "@smithy/middleware-stack": "^2.0.2", - "@smithy/types": "^2.3.3", - "@smithy/util-stream": "^2.0.12", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/types": { - "version": "2.3.3", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/url-parser": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/querystring-parser": "^2.0.9", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/util-base64": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/util-buffer-from": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/util-body-length-browser": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/util-body-length-node": { - "version": "2.1.0", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/util-buffer-from": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/is-array-buffer": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/util-config-provider": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/util-defaults-mode-browser": { - "version": "2.0.10", - "license": "Apache-2.0", - "dependencies": { - "@smithy/property-provider": "^2.0.10", - "@smithy/smithy-client": "^2.1.6", - "@smithy/types": "^2.3.3", - "bowser": "^2.11.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">= 10.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/util-defaults-mode-node": { - "version": "2.0.12", - "license": "Apache-2.0", - "dependencies": { - "@smithy/config-resolver": "^2.0.10", - "@smithy/credential-provider-imds": "^2.0.12", - "@smithy/node-config-provider": "^2.0.12", - "@smithy/property-provider": "^2.0.10", - "@smithy/smithy-client": "^2.1.6", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">= 10.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/util-hex-encoding": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/util-middleware": { - "version": "2.0.2", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/util-retry": { - "version": "2.0.2", - "license": "Apache-2.0", - "dependencies": { - "@smithy/service-error-classification": "^2.0.2", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">= 14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/util-stream": { - "version": "2.0.12", - "license": "Apache-2.0", - "dependencies": { - "@smithy/fetch-http-handler": "^2.1.5", - "@smithy/node-http-handler": "^2.1.5", - "@smithy/types": "^2.3.3", - "@smithy/util-base64": "^2.0.0", - "@smithy/util-buffer-from": "^2.0.0", - "@smithy/util-hex-encoding": "^2.0.0", - "@smithy/util-utf8": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/util-uri-escape": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/util-utf8": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/util-buffer-from": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/uuid": { - "version": "8.3.2", - "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/@aws-sdk/credential-provider-cognito-identity": { - "version": "3.414.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/client-cognito-identity": "3.414.0", - "@aws-sdk/types": "3.413.0", - "@smithy/property-provider": "^2.0.0", - "@smithy/types": "^2.3.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-cognito-identity/node_modules/@aws-sdk/types": { - "version": "3.413.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-cognito-identity/node_modules/@smithy/property-provider": { - "version": "2.0.10", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-cognito-identity/node_modules/@smithy/types": { - "version": "2.3.3", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-env": { - "version": "3.413.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.413.0", - "@smithy/property-provider": "^2.0.0", - "@smithy/types": "^2.3.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-env/node_modules/@aws-sdk/types": { - "version": "3.413.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-env/node_modules/@smithy/property-provider": { - "version": "2.0.10", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-env/node_modules/@smithy/types": { - "version": "2.3.3", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-ini": { - "version": "3.414.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/credential-provider-env": "3.413.0", - "@aws-sdk/credential-provider-process": "3.413.0", - "@aws-sdk/credential-provider-sso": "3.414.0", - "@aws-sdk/credential-provider-web-identity": "3.413.0", - "@aws-sdk/types": "3.413.0", - "@smithy/credential-provider-imds": "^2.0.0", - "@smithy/property-provider": "^2.0.0", - "@smithy/shared-ini-file-loader": "^2.0.6", - "@smithy/types": "^2.3.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-ini/node_modules/@aws-sdk/types": { - "version": "3.413.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-ini/node_modules/@smithy/credential-provider-imds": { - "version": "2.0.12", - "license": "Apache-2.0", - "dependencies": { - "@smithy/node-config-provider": "^2.0.12", - "@smithy/property-provider": "^2.0.10", - "@smithy/types": "^2.3.3", - "@smithy/url-parser": "^2.0.9", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-ini/node_modules/@smithy/node-config-provider": { - "version": "2.0.12", - "license": "Apache-2.0", - "dependencies": { - "@smithy/property-provider": "^2.0.10", - "@smithy/shared-ini-file-loader": "^2.0.11", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-ini/node_modules/@smithy/property-provider": { - "version": "2.0.10", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-ini/node_modules/@smithy/querystring-parser": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-ini/node_modules/@smithy/shared-ini-file-loader": { - "version": "2.0.11", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-ini/node_modules/@smithy/types": { - "version": "2.3.3", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-ini/node_modules/@smithy/url-parser": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/querystring-parser": "^2.0.9", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - } - }, - "node_modules/@aws-sdk/credential-provider-node": { - "version": "3.414.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/credential-provider-env": "3.413.0", - "@aws-sdk/credential-provider-ini": "3.414.0", - "@aws-sdk/credential-provider-process": "3.413.0", - "@aws-sdk/credential-provider-sso": "3.414.0", - "@aws-sdk/credential-provider-web-identity": "3.413.0", - "@aws-sdk/types": "3.413.0", - "@smithy/credential-provider-imds": "^2.0.0", - "@smithy/property-provider": "^2.0.0", - "@smithy/shared-ini-file-loader": "^2.0.6", - "@smithy/types": "^2.3.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/types": { - "version": "3.413.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/credential-provider-imds": { - "version": "2.0.12", - "license": "Apache-2.0", - "dependencies": { - "@smithy/node-config-provider": "^2.0.12", - "@smithy/property-provider": "^2.0.10", - "@smithy/types": "^2.3.3", - "@smithy/url-parser": "^2.0.9", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/node-config-provider": { - "version": "2.0.12", - "license": "Apache-2.0", - "dependencies": { - "@smithy/property-provider": "^2.0.10", - "@smithy/shared-ini-file-loader": "^2.0.11", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/property-provider": { - "version": "2.0.10", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/querystring-parser": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/shared-ini-file-loader": { - "version": "2.0.11", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/types": { - "version": "2.3.3", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/url-parser": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/querystring-parser": "^2.0.9", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - } - }, - "node_modules/@aws-sdk/credential-provider-process": { - "version": "3.413.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.413.0", - "@smithy/property-provider": "^2.0.0", - "@smithy/shared-ini-file-loader": "^2.0.6", - "@smithy/types": "^2.3.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-process/node_modules/@aws-sdk/types": { - "version": "3.413.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-process/node_modules/@smithy/property-provider": { - "version": "2.0.10", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-process/node_modules/@smithy/shared-ini-file-loader": { - "version": "2.0.11", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-process/node_modules/@smithy/types": { - "version": "2.3.3", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-sso": { - "version": "3.414.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/client-sso": "3.414.0", - "@aws-sdk/token-providers": "3.413.0", - "@aws-sdk/types": "3.413.0", - "@smithy/property-provider": "^2.0.0", - "@smithy/shared-ini-file-loader": "^2.0.6", - "@smithy/types": "^2.3.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/types": { - "version": "3.413.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-sso/node_modules/@smithy/property-provider": { - "version": "2.0.10", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-sso/node_modules/@smithy/shared-ini-file-loader": { - "version": "2.0.11", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-sso/node_modules/@smithy/types": { - "version": "2.3.3", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-web-identity": { - "version": "3.413.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.413.0", - "@smithy/property-provider": "^2.0.0", - "@smithy/types": "^2.3.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-web-identity/node_modules/@aws-sdk/types": { - "version": "3.413.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-web-identity/node_modules/@smithy/property-provider": { - "version": "2.0.10", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-web-identity/node_modules/@smithy/types": { - "version": "2.3.3", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-providers": { - "version": "3.414.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/client-cognito-identity": "3.414.0", - "@aws-sdk/client-sso": "3.414.0", - "@aws-sdk/client-sts": "3.414.0", - "@aws-sdk/credential-provider-cognito-identity": "3.414.0", - "@aws-sdk/credential-provider-env": "3.413.0", - "@aws-sdk/credential-provider-ini": "3.414.0", - "@aws-sdk/credential-provider-node": "3.414.0", - "@aws-sdk/credential-provider-process": "3.413.0", - "@aws-sdk/credential-provider-sso": "3.414.0", - "@aws-sdk/credential-provider-web-identity": "3.413.0", - "@aws-sdk/types": "3.413.0", - "@smithy/credential-provider-imds": "^2.0.0", - "@smithy/property-provider": "^2.0.0", - "@smithy/types": "^2.3.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-providers/node_modules/@aws-sdk/types": { - "version": "3.413.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-providers/node_modules/@smithy/credential-provider-imds": { - "version": "2.0.12", - "license": "Apache-2.0", - "dependencies": { - "@smithy/node-config-provider": "^2.0.12", - "@smithy/property-provider": "^2.0.10", - "@smithy/types": "^2.3.3", - "@smithy/url-parser": "^2.0.9", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-providers/node_modules/@smithy/node-config-provider": { - "version": "2.0.12", - "license": "Apache-2.0", - "dependencies": { - "@smithy/property-provider": "^2.0.10", - "@smithy/shared-ini-file-loader": "^2.0.11", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-providers/node_modules/@smithy/property-provider": { - "version": "2.0.10", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-providers/node_modules/@smithy/querystring-parser": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-providers/node_modules/@smithy/shared-ini-file-loader": { - "version": "2.0.11", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-providers/node_modules/@smithy/types": { - "version": "2.3.3", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-providers/node_modules/@smithy/url-parser": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/querystring-parser": "^2.0.9", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - } - }, - "node_modules/@aws-sdk/hash-blob-browser": { - "version": "3.370.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/chunked-blob-reader": "3.310.0", - "@aws-sdk/chunked-blob-reader-native": "3.310.0", - "@aws-sdk/types": "3.370.0", - "tslib": "^2.5.0" - } - }, - "node_modules/@aws-sdk/hash-stream-node": { - "version": "3.370.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.370.0", - "@aws-sdk/util-utf8": "3.310.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/is-array-buffer": { - "version": "3.310.0", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/lib-storage": { - "version": "3.417.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/abort-controller": "^2.0.1", - "@smithy/middleware-endpoint": "^2.0.7", - "@smithy/smithy-client": "^2.1.4", - "buffer": "5.6.0", - "events": "3.3.0", - "stream-browserify": "3.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "@aws-sdk/client-s3": "^3.0.0" - } - }, - "node_modules/@aws-sdk/lib-storage/node_modules/@smithy/abort-controller": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/lib-storage/node_modules/@smithy/fetch-http-handler": { - "version": "2.1.5", - "license": "Apache-2.0", - "dependencies": { - "@smithy/protocol-http": "^3.0.5", - "@smithy/querystring-builder": "^2.0.9", - "@smithy/types": "^2.3.3", - "@smithy/util-base64": "^2.0.0", - "tslib": "^2.5.0" - } - }, - "node_modules/@aws-sdk/lib-storage/node_modules/@smithy/is-array-buffer": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/lib-storage/node_modules/@smithy/middleware-endpoint": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/middleware-serde": "^2.0.9", - "@smithy/types": "^2.3.3", - "@smithy/url-parser": "^2.0.9", - "@smithy/util-middleware": "^2.0.2", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/lib-storage/node_modules/@smithy/middleware-serde": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/lib-storage/node_modules/@smithy/middleware-stack": { - "version": "2.0.2", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/lib-storage/node_modules/@smithy/node-http-handler": { - "version": "2.1.5", - "license": "Apache-2.0", - "dependencies": { - "@smithy/abort-controller": "^2.0.9", - "@smithy/protocol-http": "^3.0.5", - "@smithy/querystring-builder": "^2.0.9", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/lib-storage/node_modules/@smithy/protocol-http": { - "version": "3.0.5", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/lib-storage/node_modules/@smithy/querystring-builder": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "@smithy/util-uri-escape": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/lib-storage/node_modules/@smithy/querystring-parser": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/lib-storage/node_modules/@smithy/smithy-client": { - "version": "2.1.6", - "license": "Apache-2.0", - "dependencies": { - "@smithy/middleware-stack": "^2.0.2", - "@smithy/types": "^2.3.3", - "@smithy/util-stream": "^2.0.12", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/lib-storage/node_modules/@smithy/types": { - "version": "2.3.3", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/lib-storage/node_modules/@smithy/url-parser": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/querystring-parser": "^2.0.9", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - } - }, - "node_modules/@aws-sdk/lib-storage/node_modules/@smithy/util-base64": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/util-buffer-from": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/lib-storage/node_modules/@smithy/util-buffer-from": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/is-array-buffer": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/lib-storage/node_modules/@smithy/util-hex-encoding": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/lib-storage/node_modules/@smithy/util-middleware": { - "version": "2.0.2", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/lib-storage/node_modules/@smithy/util-stream": { - "version": "2.0.12", - "license": "Apache-2.0", - "dependencies": { - "@smithy/fetch-http-handler": "^2.1.5", - "@smithy/node-http-handler": "^2.1.5", - "@smithy/types": "^2.3.3", - "@smithy/util-base64": "^2.0.0", - "@smithy/util-buffer-from": "^2.0.0", - "@smithy/util-hex-encoding": "^2.0.0", - "@smithy/util-utf8": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/lib-storage/node_modules/@smithy/util-uri-escape": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/lib-storage/node_modules/@smithy/util-utf8": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/util-buffer-from": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/md5-js": { - "version": "3.370.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.370.0", - "@aws-sdk/util-utf8": "3.310.0", - "tslib": "^2.5.0" - } - }, - "node_modules/@aws-sdk/middleware-bucket-endpoint": { - "version": "3.370.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.370.0", - "@aws-sdk/util-arn-parser": "3.310.0", - "@smithy/protocol-http": "^1.1.0", - "@smithy/types": "^1.1.0", - "@smithy/util-config-provider": "^1.0.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-expect-continue": { - "version": "3.370.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.370.0", - "@smithy/protocol-http": "^1.1.0", - "@smithy/types": "^1.1.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-flexible-checksums": { - "version": "3.370.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-crypto/crc32": "3.0.0", - "@aws-crypto/crc32c": "3.0.0", - "@aws-sdk/types": "3.370.0", - "@smithy/is-array-buffer": "^1.0.1", - "@smithy/protocol-http": "^1.1.0", - "@smithy/types": "^1.1.0", - "@smithy/util-utf8": "^1.0.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-host-header": { - "version": "3.413.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.413.0", - "@smithy/protocol-http": "^3.0.3", - "@smithy/types": "^2.3.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-host-header/node_modules/@aws-sdk/types": { - "version": "3.413.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-host-header/node_modules/@smithy/protocol-http": { - "version": "3.0.5", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-host-header/node_modules/@smithy/types": { - "version": "2.3.3", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-location-constraint": { - "version": "3.370.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.370.0", - "@smithy/types": "^1.1.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-logger": { - "version": "3.413.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.413.0", - "@smithy/types": "^2.3.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-logger/node_modules/@aws-sdk/types": { - "version": "3.413.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-logger/node_modules/@smithy/types": { - "version": "2.3.3", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-recursion-detection": { - "version": "3.413.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.413.0", - "@smithy/protocol-http": "^3.0.3", - "@smithy/types": "^2.3.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-recursion-detection/node_modules/@aws-sdk/types": { - "version": "3.413.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-recursion-detection/node_modules/@smithy/protocol-http": { - "version": "3.0.5", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-recursion-detection/node_modules/@smithy/types": { - "version": "2.3.3", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-sdk-s3": { - "version": "3.370.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.370.0", - "@aws-sdk/util-arn-parser": "3.310.0", - "@smithy/protocol-http": "^1.1.0", - "@smithy/types": "^1.1.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-sdk-sts": { - "version": "3.413.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/middleware-signing": "3.413.0", - "@aws-sdk/types": "3.413.0", - "@smithy/types": "^2.3.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-sdk-sts/node_modules/@aws-sdk/types": { - "version": "3.413.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-sdk-sts/node_modules/@smithy/types": { - "version": "2.3.3", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-signing": { - "version": "3.413.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.413.0", + "@aws-sdk/middleware-host-header": "3.433.0", + "@aws-sdk/middleware-logger": "3.433.0", + "@aws-sdk/middleware-recursion-detection": "3.433.0", + "@aws-sdk/middleware-user-agent": "3.438.0", + "@aws-sdk/region-config-resolver": "3.433.0", + "@aws-sdk/types": "3.433.0", + "@aws-sdk/util-endpoints": "3.438.0", + "@aws-sdk/util-user-agent-browser": "3.433.0", + "@aws-sdk/util-user-agent-node": "3.437.0", + "@smithy/config-resolver": "^2.0.16", + "@smithy/fetch-http-handler": "^2.2.4", + "@smithy/hash-node": "^2.0.12", + "@smithy/invalid-dependency": "^2.0.12", + "@smithy/middleware-content-length": "^2.0.14", + "@smithy/middleware-endpoint": "^2.1.3", + "@smithy/middleware-retry": "^2.0.18", + "@smithy/middleware-serde": "^2.0.12", + "@smithy/middleware-stack": "^2.0.6", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/node-http-handler": "^2.1.8", "@smithy/property-provider": "^2.0.0", - "@smithy/protocol-http": "^3.0.3", - "@smithy/signature-v4": "^2.0.0", - "@smithy/types": "^2.3.1", - "@smithy/util-middleware": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-signing/node_modules/@aws-sdk/types": { - "version": "3.413.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-signing/node_modules/@smithy/eventstream-codec": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@aws-crypto/crc32": "3.0.0", - "@smithy/types": "^2.3.3", - "@smithy/util-hex-encoding": "^2.0.0", - "tslib": "^2.5.0" - } - }, - "node_modules/@aws-sdk/middleware-signing/node_modules/@smithy/is-array-buffer": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-signing/node_modules/@smithy/property-provider": { - "version": "2.0.10", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-signing/node_modules/@smithy/protocol-http": { - "version": "3.0.5", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-signing/node_modules/@smithy/signature-v4": { - "version": "2.0.9", - "license": "Apache-2.0", - "dependencies": { - "@smithy/eventstream-codec": "^2.0.9", - "@smithy/is-array-buffer": "^2.0.0", - "@smithy/types": "^2.3.3", - "@smithy/util-hex-encoding": "^2.0.0", - "@smithy/util-middleware": "^2.0.2", - "@smithy/util-uri-escape": "^2.0.0", + "@smithy/protocol-http": "^3.0.8", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/smithy-client": "^2.1.12", + "@smithy/types": "^2.4.0", + "@smithy/url-parser": "^2.0.12", + "@smithy/util-base64": "^2.0.0", + "@smithy/util-body-length-browser": "^2.0.0", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.16", + "@smithy/util-defaults-mode-node": "^2.0.21", + "@smithy/util-endpoints": "^1.0.2", + "@smithy/util-retry": "^2.0.5", "@smithy/util-utf8": "^2.0.0", "tslib": "^2.5.0" }, @@ -3877,239 +1247,120 @@ "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/middleware-signing/node_modules/@smithy/types": { - "version": "2.3.3", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-signing/node_modules/@smithy/util-buffer-from": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/is-array-buffer": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-signing/node_modules/@smithy/util-hex-encoding": { - "version": "2.0.0", - "license": "Apache-2.0", + "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/util-endpoints": { + "version": "3.438.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.438.0.tgz", + "integrity": "sha512-6VyPTq1kN3GWxwFt5DdZfOsr6cJZPLjWh0troY/0uUv3hK74C9o3Y0Xf/z8UAUvQFkVqZse12O0/BgPVMImvfA==", "dependencies": { + "@aws-sdk/types": "3.433.0", + "@smithy/util-endpoints": "^1.0.2", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/middleware-signing/node_modules/@smithy/util-middleware": { - "version": "2.0.2", - "license": "Apache-2.0", + "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/util-user-agent-browser": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.433.0.tgz", + "integrity": "sha512-2Cf/Lwvxbt5RXvWFXrFr49vXv0IddiUwrZoAiwhDYxvsh+BMnh+NUFot+ZQaTrk/8IPZVDeLPWZRdVy00iaVXQ==", "dependencies": { - "@smithy/types": "^2.3.3", + "@aws-sdk/types": "3.433.0", + "@smithy/types": "^2.4.0", + "bowser": "^2.11.0", "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/middleware-signing/node_modules/@smithy/util-uri-escape": { - "version": "2.0.0", - "license": "Apache-2.0", + "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/util-user-agent-node": { + "version": "3.437.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.437.0.tgz", + "integrity": "sha512-JVEcvWaniamtYVPem4UthtCNoTBCfFTwYj7Y3CrWZ2Qic4TqrwLkAfaBGtI2TGrhIClVr77uzLI6exqMTN7orA==", "dependencies": { + "@aws-sdk/types": "3.433.0", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-signing/node_modules/@smithy/util-utf8": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/util-buffer-from": "^2.0.0", - "tslib": "^2.5.0" }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-ssec": { - "version": "3.370.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.370.0", - "@smithy/types": "^1.1.0", - "tslib": "^2.5.0" + "peerDependencies": { + "aws-crt": ">=1.0.0" }, - "engines": { - "node": ">=14.0.0" + "peerDependenciesMeta": { + "aws-crt": { + "optional": true + } } }, - "node_modules/@aws-sdk/middleware-user-agent": { - "version": "3.413.0", + "node_modules/@aws-sdk/client-sso": { + "version": "3.414.0", "license": "Apache-2.0", "dependencies": { + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/middleware-host-header": "3.413.0", + "@aws-sdk/middleware-logger": "3.413.0", + "@aws-sdk/middleware-recursion-detection": "3.413.0", + "@aws-sdk/middleware-user-agent": "3.413.0", + "@aws-sdk/region-config-resolver": "3.413.0", "@aws-sdk/types": "3.413.0", "@aws-sdk/util-endpoints": "3.413.0", + "@aws-sdk/util-user-agent-browser": "3.413.0", + "@aws-sdk/util-user-agent-node": "3.413.0", + "@smithy/config-resolver": "^2.0.8", + "@smithy/fetch-http-handler": "^2.1.3", + "@smithy/hash-node": "^2.0.7", + "@smithy/invalid-dependency": "^2.0.7", + "@smithy/middleware-content-length": "^2.0.9", + "@smithy/middleware-endpoint": "^2.0.7", + "@smithy/middleware-retry": "^2.0.10", + "@smithy/middleware-serde": "^2.0.7", + "@smithy/middleware-stack": "^2.0.0", + "@smithy/node-config-provider": "^2.0.10", + "@smithy/node-http-handler": "^2.1.3", "@smithy/protocol-http": "^3.0.3", + "@smithy/smithy-client": "^2.1.4", "@smithy/types": "^2.3.1", + "@smithy/url-parser": "^2.0.7", + "@smithy/util-base64": "^2.0.0", + "@smithy/util-body-length-browser": "^2.0.0", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.8", + "@smithy/util-defaults-mode-node": "^2.0.10", + "@smithy/util-retry": "^2.0.0", + "@smithy/util-utf8": "^2.0.0", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/middleware-user-agent/node_modules/@aws-sdk/types": { - "version": "3.413.0", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.1", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/protocol-http": { - "version": "3.0.5", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/types": { - "version": "2.3.3", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/region-config-resolver": { + "node_modules/@aws-sdk/client-sso/node_modules/@aws-sdk/types": { "version": "3.413.0", "license": "Apache-2.0", "dependencies": { - "@smithy/node-config-provider": "^2.0.10", "@smithy/types": "^2.3.1", - "@smithy/util-config-provider": "^2.0.0", - "@smithy/util-middleware": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/region-config-resolver/node_modules/@smithy/node-config-provider": { - "version": "2.0.12", - "license": "Apache-2.0", - "dependencies": { - "@smithy/property-provider": "^2.0.10", - "@smithy/shared-ini-file-loader": "^2.0.11", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/region-config-resolver/node_modules/@smithy/property-provider": { - "version": "2.0.10", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/region-config-resolver/node_modules/@smithy/shared-ini-file-loader": { - "version": "2.0.11", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/region-config-resolver/node_modules/@smithy/types": { - "version": "2.3.3", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/region-config-resolver/node_modules/@smithy/util-config-provider": { - "version": "2.0.0", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/region-config-resolver/node_modules/@smithy/util-middleware": { - "version": "2.0.2", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/signature-v4-multi-region": { - "version": "3.370.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.370.0", - "@smithy/protocol-http": "^1.1.0", - "@smithy/signature-v4": "^1.0.1", - "@smithy/types": "^1.1.0", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" - }, - "peerDependencies": { - "@aws-sdk/signature-v4-crt": "^3.118.0" - }, - "peerDependenciesMeta": { - "@aws-sdk/signature-v4-crt": { - "optional": true - } } }, - "node_modules/@aws-sdk/token-providers": { - "version": "3.413.0", + "node_modules/@aws-sdk/client-sts": { + "version": "3.414.0", "license": "Apache-2.0", "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/credential-provider-node": "3.414.0", "@aws-sdk/middleware-host-header": "3.413.0", "@aws-sdk/middleware-logger": "3.413.0", "@aws-sdk/middleware-recursion-detection": "3.413.0", + "@aws-sdk/middleware-sdk-sts": "3.413.0", + "@aws-sdk/middleware-signing": "3.413.0", "@aws-sdk/middleware-user-agent": "3.413.0", + "@aws-sdk/region-config-resolver": "3.413.0", "@aws-sdk/types": "3.413.0", "@aws-sdk/util-endpoints": "3.413.0", "@aws-sdk/util-user-agent-browser": "3.413.0", @@ -4125,9 +1376,7 @@ "@smithy/middleware-stack": "^2.0.0", "@smithy/node-config-provider": "^2.0.10", "@smithy/node-http-handler": "^2.1.3", - "@smithy/property-provider": "^2.0.0", "@smithy/protocol-http": "^3.0.3", - "@smithy/shared-ini-file-loader": "^2.0.6", "@smithy/smithy-client": "^2.1.4", "@smithy/types": "^2.3.1", "@smithy/url-parser": "^2.0.7", @@ -4138,13 +1387,14 @@ "@smithy/util-defaults-mode-node": "^2.0.10", "@smithy/util-retry": "^2.0.0", "@smithy/util-utf8": "^2.0.0", + "fast-xml-parser": "4.2.5", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@aws-sdk/types": { + "node_modules/@aws-sdk/client-sts/node_modules/@aws-sdk/types": { "version": "3.413.0", "license": "Apache-2.0", "dependencies": { @@ -4155,471 +1405,597 @@ "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/abort-controller": { - "version": "2.0.9", + "node_modules/@aws-sdk/core": { + "version": "3.436.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.436.0.tgz", + "integrity": "sha512-vX5/LjXvCejC2XUY6TSg1oozjqK6BvkE75t0ys9dgqyr5PlZyZksMoeAFHUlj0sCjhT3ziWCujP1oiSpPWY9hg==", + "dependencies": { + "@smithy/smithy-client": "^2.1.12" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-cognito-identity": { + "version": "3.414.0", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^2.3.3", + "@aws-sdk/client-cognito-identity": "3.414.0", + "@aws-sdk/types": "3.413.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/types": "^2.3.1", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/config-resolver": { - "version": "2.0.10", + "node_modules/@aws-sdk/credential-provider-cognito-identity/node_modules/@aws-sdk/types": { + "version": "3.413.0", "license": "Apache-2.0", "dependencies": { - "@smithy/node-config-provider": "^2.0.12", - "@smithy/types": "^2.3.3", - "@smithy/util-config-provider": "^2.0.0", - "@smithy/util-middleware": "^2.0.2", + "@smithy/types": "^2.3.1", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/credential-provider-imds": { - "version": "2.0.12", + "node_modules/@aws-sdk/credential-provider-env": { + "version": "3.413.0", "license": "Apache-2.0", "dependencies": { - "@smithy/node-config-provider": "^2.0.12", - "@smithy/property-provider": "^2.0.10", - "@smithy/types": "^2.3.3", - "@smithy/url-parser": "^2.0.9", + "@aws-sdk/types": "3.413.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/types": "^2.3.1", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/fetch-http-handler": { - "version": "2.1.5", + "node_modules/@aws-sdk/credential-provider-env/node_modules/@aws-sdk/types": { + "version": "3.413.0", "license": "Apache-2.0", "dependencies": { - "@smithy/protocol-http": "^3.0.5", - "@smithy/querystring-builder": "^2.0.9", - "@smithy/types": "^2.3.3", - "@smithy/util-base64": "^2.0.0", + "@smithy/types": "^2.3.1", "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/hash-node": { - "version": "2.0.9", + "node_modules/@aws-sdk/credential-provider-ini": { + "version": "3.414.0", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/credential-provider-env": "3.413.0", + "@aws-sdk/credential-provider-process": "3.413.0", + "@aws-sdk/credential-provider-sso": "3.414.0", + "@aws-sdk/credential-provider-web-identity": "3.413.0", + "@aws-sdk/types": "3.413.0", + "@smithy/credential-provider-imds": "^2.0.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/types": "^2.3.1", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-ini/node_modules/@aws-sdk/types": { + "version": "3.413.0", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^2.3.3", - "@smithy/util-buffer-from": "^2.0.0", - "@smithy/util-utf8": "^2.0.0", + "@smithy/types": "^2.3.1", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/invalid-dependency": { - "version": "2.0.9", + "node_modules/@aws-sdk/credential-provider-node": { + "version": "3.414.0", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^2.3.3", + "@aws-sdk/credential-provider-env": "3.413.0", + "@aws-sdk/credential-provider-ini": "3.414.0", + "@aws-sdk/credential-provider-process": "3.413.0", + "@aws-sdk/credential-provider-sso": "3.414.0", + "@aws-sdk/credential-provider-web-identity": "3.413.0", + "@aws-sdk/types": "3.413.0", + "@smithy/credential-provider-imds": "^2.0.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/types": "^2.3.1", "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/is-array-buffer": { - "version": "2.0.0", + "node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/types": { + "version": "3.413.0", "license": "Apache-2.0", "dependencies": { + "@smithy/types": "^2.3.1", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/middleware-content-length": { - "version": "2.0.11", + "node_modules/@aws-sdk/credential-provider-process": { + "version": "3.413.0", "license": "Apache-2.0", "dependencies": { - "@smithy/protocol-http": "^3.0.5", - "@smithy/types": "^2.3.3", + "@aws-sdk/types": "3.413.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/types": "^2.3.1", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/middleware-endpoint": { - "version": "2.0.9", + "node_modules/@aws-sdk/credential-provider-process/node_modules/@aws-sdk/types": { + "version": "3.413.0", "license": "Apache-2.0", "dependencies": { - "@smithy/middleware-serde": "^2.0.9", - "@smithy/types": "^2.3.3", - "@smithy/url-parser": "^2.0.9", - "@smithy/util-middleware": "^2.0.2", + "@smithy/types": "^2.3.1", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/middleware-retry": { - "version": "2.0.12", + "node_modules/@aws-sdk/credential-provider-sso": { + "version": "3.414.0", "license": "Apache-2.0", "dependencies": { - "@smithy/node-config-provider": "^2.0.12", - "@smithy/protocol-http": "^3.0.5", - "@smithy/service-error-classification": "^2.0.2", - "@smithy/types": "^2.3.3", - "@smithy/util-middleware": "^2.0.2", - "@smithy/util-retry": "^2.0.2", - "tslib": "^2.5.0", - "uuid": "^8.3.2" + "@aws-sdk/client-sso": "3.414.0", + "@aws-sdk/token-providers": "3.413.0", + "@aws-sdk/types": "3.413.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/types": "^2.3.1", + "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/middleware-serde": { - "version": "2.0.9", + "node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/types": { + "version": "3.413.0", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^2.3.3", + "@smithy/types": "^2.3.1", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/middleware-stack": { - "version": "2.0.2", + "node_modules/@aws-sdk/credential-provider-web-identity": { + "version": "3.413.0", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^2.3.3", + "@aws-sdk/types": "3.413.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/types": "^2.3.1", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/node-config-provider": { - "version": "2.0.12", + "node_modules/@aws-sdk/credential-provider-web-identity/node_modules/@aws-sdk/types": { + "version": "3.413.0", "license": "Apache-2.0", "dependencies": { - "@smithy/property-provider": "^2.0.10", - "@smithy/shared-ini-file-loader": "^2.0.11", - "@smithy/types": "^2.3.3", + "@smithy/types": "^2.3.1", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/node-http-handler": { - "version": "2.1.5", + "node_modules/@aws-sdk/credential-providers": { + "version": "3.414.0", "license": "Apache-2.0", "dependencies": { - "@smithy/abort-controller": "^2.0.9", - "@smithy/protocol-http": "^3.0.5", - "@smithy/querystring-builder": "^2.0.9", - "@smithy/types": "^2.3.3", + "@aws-sdk/client-cognito-identity": "3.414.0", + "@aws-sdk/client-sso": "3.414.0", + "@aws-sdk/client-sts": "3.414.0", + "@aws-sdk/credential-provider-cognito-identity": "3.414.0", + "@aws-sdk/credential-provider-env": "3.413.0", + "@aws-sdk/credential-provider-ini": "3.414.0", + "@aws-sdk/credential-provider-node": "3.414.0", + "@aws-sdk/credential-provider-process": "3.413.0", + "@aws-sdk/credential-provider-sso": "3.414.0", + "@aws-sdk/credential-provider-web-identity": "3.413.0", + "@aws-sdk/types": "3.413.0", + "@smithy/credential-provider-imds": "^2.0.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/types": "^2.3.1", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/property-provider": { - "version": "2.0.10", + "node_modules/@aws-sdk/credential-providers/node_modules/@aws-sdk/types": { + "version": "3.413.0", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^2.3.3", + "@smithy/types": "^2.3.1", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/protocol-http": { - "version": "3.0.5", - "license": "Apache-2.0", + "node_modules/@aws-sdk/lib-storage": { + "version": "3.456.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/lib-storage/-/lib-storage-3.456.0.tgz", + "integrity": "sha512-S1h7DcH8u+CL6kobVgorgm0X0u+gQwjefbDuRrPF0qtpzvPprabRe4t3yt4VKuhjvegxKMVL/sdw817gLGoPdA==", "dependencies": { - "@smithy/types": "^2.3.3", + "@smithy/abort-controller": "^2.0.1", + "@smithy/middleware-endpoint": "^2.2.0", + "@smithy/smithy-client": "^2.1.15", + "buffer": "5.6.0", + "events": "3.3.0", + "stream-browserify": "3.0.0", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" + }, + "peerDependencies": { + "@aws-sdk/client-s3": "^3.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/querystring-builder": { - "version": "2.0.9", - "license": "Apache-2.0", + "node_modules/@aws-sdk/middleware-bucket-endpoint": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-bucket-endpoint/-/middleware-bucket-endpoint-3.433.0.tgz", + "integrity": "sha512-Lk1xIu2tWTRa1zDw5hCF1RrpWQYSodUhrS/q3oKz8IAoFqEy+lNaD5jx+fycuZb5EkE4IzWysT+8wVkd0mAnOg==", "dependencies": { - "@smithy/types": "^2.3.3", - "@smithy/util-uri-escape": "^2.0.0", + "@aws-sdk/types": "3.433.0", + "@aws-sdk/util-arn-parser": "3.310.0", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/protocol-http": "^3.0.8", + "@smithy/types": "^2.4.0", + "@smithy/util-config-provider": "^2.0.0", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/querystring-parser": { - "version": "2.0.9", - "license": "Apache-2.0", + "node_modules/@aws-sdk/middleware-expect-continue": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-expect-continue/-/middleware-expect-continue-3.433.0.tgz", + "integrity": "sha512-Uq2rPIsjz0CR2sulM/HyYr5WiqiefrSRLdwUZuA7opxFSfE808w5DBWSprHxbH3rbDSQR4nFiOiVYIH8Eth7nA==", "dependencies": { - "@smithy/types": "^2.3.3", + "@aws-sdk/types": "3.433.0", + "@smithy/protocol-http": "^3.0.8", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/service-error-classification": { - "version": "2.0.2", - "license": "Apache-2.0", + "node_modules/@aws-sdk/middleware-flexible-checksums": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-flexible-checksums/-/middleware-flexible-checksums-3.433.0.tgz", + "integrity": "sha512-Ptssx373+I7EzFUWjp/i/YiNFt6I6sDuRHz6DOUR9nmmRTlHHqmdcBXlJL2d9wwFxoBRCN8/PXGsTc/DJ4c95Q==", "dependencies": { - "@smithy/types": "^2.3.3" + "@aws-crypto/crc32": "3.0.0", + "@aws-crypto/crc32c": "3.0.0", + "@aws-sdk/types": "3.433.0", + "@smithy/is-array-buffer": "^2.0.0", + "@smithy/protocol-http": "^3.0.8", + "@smithy/types": "^2.4.0", + "@smithy/util-utf8": "^2.0.0", + "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/shared-ini-file-loader": { - "version": "2.0.11", + "node_modules/@aws-sdk/middleware-host-header": { + "version": "3.413.0", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^2.3.3", + "@aws-sdk/types": "3.413.0", + "@smithy/protocol-http": "^3.0.3", + "@smithy/types": "^2.3.1", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/smithy-client": { - "version": "2.1.6", + "node_modules/@aws-sdk/middleware-host-header/node_modules/@aws-sdk/types": { + "version": "3.413.0", "license": "Apache-2.0", "dependencies": { - "@smithy/middleware-stack": "^2.0.2", - "@smithy/types": "^2.3.3", - "@smithy/util-stream": "^2.0.12", + "@smithy/types": "^2.3.1", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/types": { - "version": "2.3.3", - "license": "Apache-2.0", + "node_modules/@aws-sdk/middleware-location-constraint": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-location-constraint/-/middleware-location-constraint-3.433.0.tgz", + "integrity": "sha512-2YD860TGntwZifIUbxm+lFnNJJhByR/RB/+fV1I8oGKg+XX2rZU+94pRfHXRywoZKlCA0L+LGDA1I56jxrB9sw==", "dependencies": { + "@aws-sdk/types": "3.433.0", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/url-parser": { - "version": "2.0.9", + "node_modules/@aws-sdk/middleware-logger": { + "version": "3.413.0", "license": "Apache-2.0", "dependencies": { - "@smithy/querystring-parser": "^2.0.9", - "@smithy/types": "^2.3.3", + "@aws-sdk/types": "3.413.0", + "@smithy/types": "^2.3.1", "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/util-base64": { - "version": "2.0.0", + "node_modules/@aws-sdk/middleware-logger/node_modules/@aws-sdk/types": { + "version": "3.413.0", "license": "Apache-2.0", "dependencies": { - "@smithy/util-buffer-from": "^2.0.0", + "@smithy/types": "^2.3.1", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/util-body-length-browser": { - "version": "2.0.0", + "node_modules/@aws-sdk/middleware-recursion-detection": { + "version": "3.413.0", "license": "Apache-2.0", "dependencies": { + "@aws-sdk/types": "3.413.0", + "@smithy/protocol-http": "^3.0.3", + "@smithy/types": "^2.3.1", "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/util-body-length-node": { - "version": "2.1.0", + "node_modules/@aws-sdk/middleware-recursion-detection/node_modules/@aws-sdk/types": { + "version": "3.413.0", "license": "Apache-2.0", "dependencies": { + "@smithy/types": "^2.3.1", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/util-buffer-from": { - "version": "2.0.0", - "license": "Apache-2.0", + "node_modules/@aws-sdk/middleware-sdk-s3": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-sdk-s3/-/middleware-sdk-s3-3.433.0.tgz", + "integrity": "sha512-mkn3DiSuMVh4NTLsduC42Av+ApcOor52LMoQY0Wc6M5Mx7Xd05U+G1j8sjI9n/1bs5cZ/PoeRYJ/9bL1Xxznnw==", "dependencies": { - "@smithy/is-array-buffer": "^2.0.0", + "@aws-sdk/types": "3.433.0", + "@aws-sdk/util-arn-parser": "3.310.0", + "@smithy/protocol-http": "^3.0.8", + "@smithy/smithy-client": "^2.1.12", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/util-config-provider": { - "version": "2.0.0", + "node_modules/@aws-sdk/middleware-sdk-sts": { + "version": "3.413.0", "license": "Apache-2.0", "dependencies": { + "@aws-sdk/middleware-signing": "3.413.0", + "@aws-sdk/types": "3.413.0", + "@smithy/types": "^2.3.1", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/util-defaults-mode-browser": { - "version": "2.0.10", + "node_modules/@aws-sdk/middleware-sdk-sts/node_modules/@aws-sdk/types": { + "version": "3.413.0", "license": "Apache-2.0", "dependencies": { - "@smithy/property-provider": "^2.0.10", - "@smithy/smithy-client": "^2.1.6", - "@smithy/types": "^2.3.3", - "bowser": "^2.11.0", + "@smithy/types": "^2.3.1", "tslib": "^2.5.0" }, "engines": { - "node": ">= 10.0.0" + "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/util-defaults-mode-node": { - "version": "2.0.12", + "node_modules/@aws-sdk/middleware-signing": { + "version": "3.413.0", "license": "Apache-2.0", "dependencies": { - "@smithy/config-resolver": "^2.0.10", - "@smithy/credential-provider-imds": "^2.0.12", - "@smithy/node-config-provider": "^2.0.12", - "@smithy/property-provider": "^2.0.10", - "@smithy/smithy-client": "^2.1.6", - "@smithy/types": "^2.3.3", + "@aws-sdk/types": "3.413.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/protocol-http": "^3.0.3", + "@smithy/signature-v4": "^2.0.0", + "@smithy/types": "^2.3.1", + "@smithy/util-middleware": "^2.0.0", "tslib": "^2.5.0" }, "engines": { - "node": ">= 10.0.0" + "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/util-hex-encoding": { - "version": "2.0.0", + "node_modules/@aws-sdk/middleware-signing/node_modules/@aws-sdk/types": { + "version": "3.413.0", "license": "Apache-2.0", "dependencies": { + "@smithy/types": "^2.3.1", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/util-middleware": { - "version": "2.0.2", - "license": "Apache-2.0", + "node_modules/@aws-sdk/middleware-ssec": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-ssec/-/middleware-ssec-3.433.0.tgz", + "integrity": "sha512-2AMaPx0kYfCiekxoL7aqFqSSoA9du+yI4zefpQNLr+1cZOerYiDxdsZ4mbqStR1CVFaX6U6hrYokXzjInsvETw==", "dependencies": { - "@smithy/types": "^2.3.3", + "@aws-sdk/types": "3.433.0", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/util-retry": { - "version": "2.0.2", + "node_modules/@aws-sdk/middleware-user-agent": { + "version": "3.413.0", "license": "Apache-2.0", "dependencies": { - "@smithy/service-error-classification": "^2.0.2", - "@smithy/types": "^2.3.3", + "@aws-sdk/types": "3.413.0", + "@aws-sdk/util-endpoints": "3.413.0", + "@smithy/protocol-http": "^3.0.3", + "@smithy/types": "^2.3.1", "tslib": "^2.5.0" }, "engines": { - "node": ">= 14.0.0" + "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/util-stream": { - "version": "2.0.12", + "node_modules/@aws-sdk/middleware-user-agent/node_modules/@aws-sdk/types": { + "version": "3.413.0", "license": "Apache-2.0", "dependencies": { - "@smithy/fetch-http-handler": "^2.1.5", - "@smithy/node-http-handler": "^2.1.5", - "@smithy/types": "^2.3.3", - "@smithy/util-base64": "^2.0.0", - "@smithy/util-buffer-from": "^2.0.0", - "@smithy/util-hex-encoding": "^2.0.0", - "@smithy/util-utf8": "^2.0.0", + "@smithy/types": "^2.3.1", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/util-uri-escape": { - "version": "2.0.0", + "node_modules/@aws-sdk/region-config-resolver": { + "version": "3.413.0", "license": "Apache-2.0", "dependencies": { + "@smithy/node-config-provider": "^2.0.10", + "@smithy/types": "^2.3.1", + "@smithy/util-config-provider": "^2.0.0", + "@smithy/util-middleware": "^2.0.0", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/util-utf8": { - "version": "2.0.0", - "license": "Apache-2.0", + "node_modules/@aws-sdk/signature-v4-multi-region": { + "version": "3.437.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/signature-v4-multi-region/-/signature-v4-multi-region-3.437.0.tgz", + "integrity": "sha512-MmrqudssOs87JgVg7HGVdvJws/t4kcOrJJd+975ki+DPeSoyK2U4zBDfDkJ+n0tFuZBs3sLwLh0QXE7BV28rRA==", "dependencies": { - "@smithy/util-buffer-from": "^2.0.0", + "@aws-sdk/types": "3.433.0", + "@smithy/protocol-http": "^3.0.8", + "@smithy/signature-v4": "^2.0.0", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/uuid": { - "version": "8.3.2", - "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/@aws-sdk/types": { - "version": "3.370.0", + "node_modules/@aws-sdk/token-providers": { + "version": "3.413.0", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^1.1.0", + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/middleware-host-header": "3.413.0", + "@aws-sdk/middleware-logger": "3.413.0", + "@aws-sdk/middleware-recursion-detection": "3.413.0", + "@aws-sdk/middleware-user-agent": "3.413.0", + "@aws-sdk/types": "3.413.0", + "@aws-sdk/util-endpoints": "3.413.0", + "@aws-sdk/util-user-agent-browser": "3.413.0", + "@aws-sdk/util-user-agent-node": "3.413.0", + "@smithy/config-resolver": "^2.0.8", + "@smithy/fetch-http-handler": "^2.1.3", + "@smithy/hash-node": "^2.0.7", + "@smithy/invalid-dependency": "^2.0.7", + "@smithy/middleware-content-length": "^2.0.9", + "@smithy/middleware-endpoint": "^2.0.7", + "@smithy/middleware-retry": "^2.0.10", + "@smithy/middleware-serde": "^2.0.7", + "@smithy/middleware-stack": "^2.0.0", + "@smithy/node-config-provider": "^2.0.10", + "@smithy/node-http-handler": "^2.1.3", + "@smithy/property-provider": "^2.0.0", + "@smithy/protocol-http": "^3.0.3", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/smithy-client": "^2.1.4", + "@smithy/types": "^2.3.1", + "@smithy/url-parser": "^2.0.7", + "@smithy/util-base64": "^2.0.0", + "@smithy/util-body-length-browser": "^2.0.0", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.8", + "@smithy/util-defaults-mode-node": "^2.0.10", + "@smithy/util-retry": "^2.0.0", + "@smithy/util-utf8": "^2.0.0", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/util-arn-parser": { - "version": "3.310.0", + "node_modules/@aws-sdk/token-providers/node_modules/@aws-sdk/types": { + "version": "3.413.0", "license": "Apache-2.0", "dependencies": { + "@smithy/types": "^2.3.1", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/util-base64": { - "version": "3.310.0", - "license": "Apache-2.0", + "node_modules/@aws-sdk/types": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.433.0.tgz", + "integrity": "sha512-0jEE2mSrNDd8VGFjTc1otYrwYPIkzZJEIK90ZxisKvQ/EURGBhNzWn7ejWB9XCMFT6XumYLBR0V9qq5UPisWtA==", "dependencies": { - "@aws-sdk/util-buffer-from": "3.310.0", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/util-buffer-from": { + "node_modules/@aws-sdk/util-arn-parser": { "version": "3.310.0", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-arn-parser/-/util-arn-parser-3.310.0.tgz", + "integrity": "sha512-jL8509owp/xB9+Or0pvn3Fe+b94qfklc2yPowZZIFAkFcCSIdkIglz18cPDWnYAcy9JGewpMS1COXKIUhZkJsA==", "dependencies": { - "@aws-sdk/is-array-buffer": "3.310.0", "tslib": "^2.5.0" }, "engines": { @@ -4648,16 +2024,6 @@ "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/util-endpoints/node_modules/@smithy/types": { - "version": "2.3.3", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, "node_modules/@aws-sdk/util-locate-window": { "version": "3.310.0", "license": "Apache-2.0", @@ -4689,16 +2055,6 @@ "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/util-user-agent-browser/node_modules/@smithy/types": { - "version": "2.3.3", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, "node_modules/@aws-sdk/util-user-agent-node": { "version": "3.413.0", "license": "Apache-2.0", @@ -4731,62 +2087,6 @@ "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/util-user-agent-node/node_modules/@smithy/node-config-provider": { - "version": "2.0.12", - "license": "Apache-2.0", - "dependencies": { - "@smithy/property-provider": "^2.0.10", - "@smithy/shared-ini-file-loader": "^2.0.11", - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/util-user-agent-node/node_modules/@smithy/property-provider": { - "version": "2.0.10", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/util-user-agent-node/node_modules/@smithy/shared-ini-file-loader": { - "version": "2.0.11", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.3.3", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/util-user-agent-node/node_modules/@smithy/types": { - "version": "2.3.3", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/util-utf8": { - "version": "3.310.0", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/util-buffer-from": "3.310.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, "node_modules/@aws-sdk/util-utf8-browser": { "version": "3.259.0", "license": "Apache-2.0", @@ -6819,41 +4119,6 @@ "tslib": "^2.6.2" } }, - "node_modules/@rudderstack/workflow-engine/node_modules/@smithy/is-array-buffer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.0.0.tgz", - "integrity": "sha512-z3PjFjMyZNI98JFRJi/U0nGoLWMSJlDjAW4QUX2WNZLas5C0CmVV6LJ01JI0k90l7FvpmixjWxPFmENSClQ7ug==", - "dependencies": { - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@rudderstack/workflow-engine/node_modules/@smithy/util-buffer-from": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.0.0.tgz", - "integrity": "sha512-/YNnLoHsR+4W4Vf2wL5lGv0ksg8Bmk3GEGxn2vEQt52AQaPSCuaO5PM5VM7lP1K9qHRKHwrPGktqVoAHKWHxzw==", - "dependencies": { - "@smithy/is-array-buffer": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@rudderstack/workflow-engine/node_modules/@smithy/util-utf8": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.0.0.tgz", - "integrity": "sha512-rctU1VkziY84n5OXe3bPNpKR001ZCME2JCaBBFgtiM2hfKbHFudc/BkMuPab8hRbLd0j3vbnBTTZ1igBf0wgiQ==", - "dependencies": { - "@smithy/util-buffer-from": "^2.0.0", - "tslib": "^2.5.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, "node_modules/@sideway/address": { "version": "4.1.4", "license": "BSD-3-Clause", @@ -6899,23 +4164,43 @@ } }, "node_modules/@smithy/abort-controller": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-2.0.15.tgz", + "integrity": "sha512-JkS36PIS3/UCbq/MaozzV7jECeL+BTt4R75bwY8i+4RASys4xOyUS1HsRyUNSqUXFP4QyCz5aNnh3ltuaxv+pw==", "dependencies": { - "@smithy/types": "^1.1.0", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, + "node_modules/@smithy/chunked-blob-reader": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@smithy/chunked-blob-reader/-/chunked-blob-reader-2.0.0.tgz", + "integrity": "sha512-k+J4GHJsMSAIQPChGBrjEmGS+WbPonCXesoqP9fynIqjn7rdOThdH8FAeCmokP9mxTYKQAKoHCLPzNlm6gh7Wg==", + "dependencies": { + "tslib": "^2.5.0" + } + }, + "node_modules/@smithy/chunked-blob-reader-native": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@smithy/chunked-blob-reader-native/-/chunked-blob-reader-native-2.0.1.tgz", + "integrity": "sha512-N2oCZRglhWKm7iMBu7S6wDzXirjAofi7tAd26cxmgibRYOBS4D3hGfmkwCpHdASZzwZDD8rluh0Rcqw1JeZDRw==", + "dependencies": { + "@smithy/util-base64": "^2.0.1", + "tslib": "^2.5.0" + } + }, "node_modules/@smithy/config-resolver": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.0.22", + "resolved": "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-2.0.22.tgz", + "integrity": "sha512-YuPjsLnq6I5ZQBTx6BL5NsCLtcLel5YIMf3gDeEa+GSCXn5mgRXm+8XO8HtjR3Xf69b88aY4c7bwKQQS2i8vtA==", "dependencies": { - "@smithy/types": "^1.1.0", - "@smithy/util-config-provider": "^1.0.1", - "@smithy/util-middleware": "^1.0.1", + "@smithy/node-config-provider": "^2.1.8", + "@smithy/types": "^2.7.0", + "@smithy/util-config-provider": "^2.1.0", + "@smithy/util-middleware": "^2.0.8", "tslib": "^2.5.0" }, "engines": { @@ -6923,13 +4208,14 @@ } }, "node_modules/@smithy/credential-provider-imds": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-2.1.4.tgz", + "integrity": "sha512-cwPJN1fa1YOQzhBlTXRavABEYRRchci1X79QRwzaNLySnIMJfztyv1Zkst0iZPLMnpn8+CnHu3wOHS11J5Dr3A==", "dependencies": { - "@smithy/node-config-provider": "^1.0.1", - "@smithy/property-provider": "^1.0.1", - "@smithy/types": "^1.1.0", - "@smithy/url-parser": "^1.0.1", + "@smithy/node-config-provider": "^2.1.8", + "@smithy/property-provider": "^2.0.16", + "@smithy/types": "^2.7.0", + "@smithy/url-parser": "^2.0.15", "tslib": "^2.5.0" }, "engines": { @@ -6937,21 +4223,23 @@ } }, "node_modules/@smithy/eventstream-codec": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-codec/-/eventstream-codec-2.0.13.tgz", + "integrity": "sha512-CExbelIYp+DxAHG8RIs0l9QL7ElqhG4ym9BNoSpkPa4ptBQfzJdep3LbOSVJIE2VUdBAeObdeL6EDB3Jo85n3g==", "dependencies": { "@aws-crypto/crc32": "3.0.0", - "@smithy/types": "^1.1.0", - "@smithy/util-hex-encoding": "^1.0.1", + "@smithy/types": "^2.5.0", + "@smithy/util-hex-encoding": "^2.0.0", "tslib": "^2.5.0" } }, "node_modules/@smithy/eventstream-serde-browser": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-browser/-/eventstream-serde-browser-2.0.13.tgz", + "integrity": "sha512-OJ/2g/VxkzA+mYZxV102oX3CsiE+igTSmqq/ir3oEVG2kSIdRC00ryttj/lmL14W06ExNi0ysmfLxQkL8XrAZQ==", "dependencies": { - "@smithy/eventstream-serde-universal": "^1.0.1", - "@smithy/types": "^1.1.0", + "@smithy/eventstream-serde-universal": "^2.0.13", + "@smithy/types": "^2.5.0", "tslib": "^2.5.0" }, "engines": { @@ -6959,10 +4247,11 @@ } }, "node_modules/@smithy/eventstream-serde-config-resolver": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-config-resolver/-/eventstream-serde-config-resolver-2.0.13.tgz", + "integrity": "sha512-2BI1CbnYuEvAYoWSeWJtPNygbIKiWeSLxCmDLnyM6wQV32Of7VptiQlaFXPxXp4zqn/rs3ocZ/T29rxE4s4Gsg==", "dependencies": { - "@smithy/types": "^1.1.0", + "@smithy/types": "^2.5.0", "tslib": "^2.5.0" }, "engines": { @@ -6970,11 +4259,12 @@ } }, "node_modules/@smithy/eventstream-serde-node": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-node/-/eventstream-serde-node-2.0.13.tgz", + "integrity": "sha512-7NbFwPafb924elFxCBDvm48jy/DeSrpFbFQN0uN2ThuY5HrEeubikS0t7WMva4Z4EnRoivpbuT0scb9vUIJKoA==", "dependencies": { - "@smithy/eventstream-serde-universal": "^1.0.1", - "@smithy/types": "^1.1.0", + "@smithy/eventstream-serde-universal": "^2.0.13", + "@smithy/types": "^2.5.0", "tslib": "^2.5.0" }, "engines": { @@ -6982,11 +4272,12 @@ } }, "node_modules/@smithy/eventstream-serde-universal": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-universal/-/eventstream-serde-universal-2.0.13.tgz", + "integrity": "sha512-j0yFd5UfftM+ia9dxLRbheJDCkCZBHpcEzCsPO8BxVOTbdcX/auVJCv6ov/yvpCKsf4Hv3mOqi0Is1YogM2g3Q==", "dependencies": { - "@smithy/eventstream-codec": "^1.0.1", - "@smithy/types": "^1.1.0", + "@smithy/eventstream-codec": "^2.0.13", + "@smithy/types": "^2.5.0", "tslib": "^2.5.0" }, "engines": { @@ -6994,23 +4285,49 @@ } }, "node_modules/@smithy/fetch-http-handler": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-2.3.1.tgz", + "integrity": "sha512-6MNk16fqb8EwcYY8O8WxB3ArFkLZ2XppsSNo1h7SQcFdDDwIumiJeO6wRzm7iB68xvsOQzsdQKbdtTieS3hfSQ==", "dependencies": { - "@smithy/protocol-http": "^1.1.0", - "@smithy/querystring-builder": "^1.0.1", - "@smithy/types": "^1.1.0", - "@smithy/util-base64": "^1.0.1", + "@smithy/protocol-http": "^3.0.11", + "@smithy/querystring-builder": "^2.0.15", + "@smithy/types": "^2.7.0", + "@smithy/util-base64": "^2.0.1", + "tslib": "^2.5.0" + } + }, + "node_modules/@smithy/hash-blob-browser": { + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/@smithy/hash-blob-browser/-/hash-blob-browser-2.0.14.tgz", + "integrity": "sha512-yWdghyPJIEqLYsaE7YVgd3YhM7jN4Pv6eJQvTomnMsz5K2qRBlpjUx3T9fKlElp1qdeQ7DNc3sAat4i9CUBO7Q==", + "dependencies": { + "@smithy/chunked-blob-reader": "^2.0.0", + "@smithy/chunked-blob-reader-native": "^2.0.1", + "@smithy/types": "^2.5.0", "tslib": "^2.5.0" } }, "node_modules/@smithy/hash-node": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.0.17", + "resolved": "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-2.0.17.tgz", + "integrity": "sha512-Il6WuBcI1nD+e2DM7tTADMf01wEPGK8PAhz4D+YmDUVaoBqlA+CaH2uDJhiySifmuKBZj748IfygXty81znKhw==", + "dependencies": { + "@smithy/types": "^2.7.0", + "@smithy/util-buffer-from": "^2.0.0", + "@smithy/util-utf8": "^2.0.2", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/hash-stream-node": { + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/@smithy/hash-stream-node/-/hash-stream-node-2.0.15.tgz", + "integrity": "sha512-ZZ6kC/pHt5Dc2goXIIyC8uA7A4GUMSzdCynAabnZ3CSSaV6ctP8mlvVkqjPph0O3XzHlx/80gdLrNqi1GDPUsA==", "dependencies": { - "@smithy/types": "^1.1.0", - "@smithy/util-buffer-from": "^1.0.1", - "@smithy/util-utf8": "^1.0.1", + "@smithy/types": "^2.5.0", + "@smithy/util-utf8": "^2.0.2", "tslib": "^2.5.0" }, "engines": { @@ -7018,16 +4335,18 @@ } }, "node_modules/@smithy/invalid-dependency": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-2.0.15.tgz", + "integrity": "sha512-dlEKBFFwVfzA5QroHlBS94NpgYjXhwN/bFfun+7w3rgxNvVy79SK0w05iGc7UAeC5t+D7gBxrzdnD6hreZnDVQ==", "dependencies": { - "@smithy/types": "^1.1.0", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" } }, "node_modules/@smithy/is-array-buffer": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.0.0.tgz", + "integrity": "sha512-z3PjFjMyZNI98JFRJi/U0nGoLWMSJlDjAW4QUX2WNZLas5C0CmVV6LJ01JI0k90l7FvpmixjWxPFmENSClQ7ug==", "dependencies": { "tslib": "^2.5.0" }, @@ -7035,12 +4354,23 @@ "node": ">=14.0.0" } }, + "node_modules/@smithy/md5-js": { + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/@smithy/md5-js/-/md5-js-2.0.15.tgz", + "integrity": "sha512-pAZaokib56XvhU0t/R9vAcr3L3bMhIakhF25X7EMSQ7LAURiLfce/tgON8I3x/dIbnZUyeRi8f2cx2azu6ATew==", + "dependencies": { + "@smithy/types": "^2.5.0", + "@smithy/util-utf8": "^2.0.2", + "tslib": "^2.5.0" + } + }, "node_modules/@smithy/middleware-content-length": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.0.17", + "resolved": "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-2.0.17.tgz", + "integrity": "sha512-OyadvMcKC7lFXTNBa8/foEv7jOaqshQZkjWS9coEXPRZnNnihU/Ls+8ZuJwGNCOrN2WxXZFmDWhegbnM4vak8w==", "dependencies": { - "@smithy/protocol-http": "^1.1.0", - "@smithy/types": "^1.1.0", + "@smithy/protocol-http": "^3.0.11", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { @@ -7048,13 +4378,16 @@ } }, "node_modules/@smithy/middleware-endpoint": { - "version": "1.0.2", - "license": "Apache-2.0", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-2.2.3.tgz", + "integrity": "sha512-nYfxuq0S/xoAjdLbyn1ixeVB6cyH9wYCMtbbOCpcCRYR5u2mMtqUtVjjPAZ/DIdlK3qe0tpB0Q76szFGNuz+kQ==", "dependencies": { - "@smithy/middleware-serde": "^1.0.1", - "@smithy/types": "^1.1.0", - "@smithy/url-parser": "^1.0.1", - "@smithy/util-middleware": "^1.0.1", + "@smithy/middleware-serde": "^2.0.15", + "@smithy/node-config-provider": "^2.1.8", + "@smithy/shared-ini-file-loader": "^2.2.7", + "@smithy/types": "^2.7.0", + "@smithy/url-parser": "^2.0.15", + "@smithy/util-middleware": "^2.0.8", "tslib": "^2.5.0" }, "engines": { @@ -7062,14 +4395,17 @@ } }, "node_modules/@smithy/middleware-retry": { - "version": "1.0.3", - "license": "Apache-2.0", - "dependencies": { - "@smithy/protocol-http": "^1.1.0", - "@smithy/service-error-classification": "^1.0.2", - "@smithy/types": "^1.1.0", - "@smithy/util-middleware": "^1.0.1", - "@smithy/util-retry": "^1.0.3", + "version": "2.0.25", + "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-2.0.25.tgz", + "integrity": "sha512-FXhafCPvx/9L9OgHJ3cdo/pD1f7ngC7DKsjDV2J7k6LO/Yl69POoBLk4sI1OZPUGc4dfxriENlTma9Nj1hI+IQ==", + "dependencies": { + "@smithy/node-config-provider": "^2.1.8", + "@smithy/protocol-http": "^3.0.11", + "@smithy/service-error-classification": "^2.0.8", + "@smithy/smithy-client": "^2.2.0", + "@smithy/types": "^2.7.0", + "@smithy/util-middleware": "^2.0.8", + "@smithy/util-retry": "^2.0.8", "tslib": "^2.5.0", "uuid": "^8.3.2" }, @@ -7079,16 +4415,18 @@ }, "node_modules/@smithy/middleware-retry/node_modules/uuid": { "version": "8.3.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", "bin": { "uuid": "dist/bin/uuid" } }, "node_modules/@smithy/middleware-serde": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-2.0.15.tgz", + "integrity": "sha512-FOZRFk/zN4AT4wzGuBY+39XWe+ZnCFd0gZtyw3f9Okn2CJPixl9GyWe98TIaljeZdqWkgrzGyPre20AcW2UMHQ==", "dependencies": { - "@smithy/types": "^1.1.0", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { @@ -7096,9 +4434,11 @@ } }, "node_modules/@smithy/middleware-stack": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.0.9", + "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-2.0.9.tgz", + "integrity": "sha512-bCB5dUtGQ5wh7QNL2ELxmDc6g7ih7jWU3Kx6MYH1h4mZbv9xL3WyhKHojRltThCB1arLPyTUFDi+x6fB/oabtA==", "dependencies": { + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { @@ -7106,12 +4446,13 @@ } }, "node_modules/@smithy/node-config-provider": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-2.1.8.tgz", + "integrity": "sha512-+w26OKakaBUGp+UG+dxYZtFb5fs3tgHg3/QrRrmUZj+rl3cIuw840vFUXX35cVPTUCQIiTqmz7CpVF7+hdINdQ==", "dependencies": { - "@smithy/property-provider": "^1.0.1", - "@smithy/shared-ini-file-loader": "^1.0.1", - "@smithy/types": "^1.1.0", + "@smithy/property-provider": "^2.0.16", + "@smithy/shared-ini-file-loader": "^2.2.7", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { @@ -7119,13 +4460,14 @@ } }, "node_modules/@smithy/node-http-handler": { - "version": "1.0.2", - "license": "Apache-2.0", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-2.2.1.tgz", + "integrity": "sha512-8iAKQrC8+VFHPAT8pg4/j6hlsTQh+NKOWlctJBrYtQa4ExcxX7aSg3vdQ2XLoYwJotFUurg/NLqFCmZaPRrogw==", "dependencies": { - "@smithy/abort-controller": "^1.0.1", - "@smithy/protocol-http": "^1.1.0", - "@smithy/querystring-builder": "^1.0.1", - "@smithy/types": "^1.1.0", + "@smithy/abort-controller": "^2.0.15", + "@smithy/protocol-http": "^3.0.11", + "@smithy/querystring-builder": "^2.0.15", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { @@ -7133,10 +4475,11 @@ } }, "node_modules/@smithy/property-provider": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.0.16", + "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-2.0.16.tgz", + "integrity": "sha512-28Ky0LlOqtEjwg5CdHmwwaDRHcTWfPRzkT6HrhwOSRS2RryAvuDfJrZpM+BMcrdeCyEg1mbcgIMoqTla+rdL8Q==", "dependencies": { - "@smithy/types": "^1.1.0", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { @@ -7144,10 +4487,11 @@ } }, "node_modules/@smithy/protocol-http": { - "version": "1.1.0", - "license": "Apache-2.0", + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-3.0.11.tgz", + "integrity": "sha512-3ziB8fHuXIRamV/akp/sqiWmNPR6X+9SB8Xxnozzj+Nq7hSpyKdFHd1FLpBkgfGFUTzzcBJQlDZPSyxzmdcx5A==", "dependencies": { - "@smithy/types": "^1.1.0", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { @@ -7155,11 +4499,12 @@ } }, "node_modules/@smithy/querystring-builder": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-2.0.15.tgz", + "integrity": "sha512-e1q85aT6HutvouOdN+dMsN0jcdshp50PSCvxDvo6aIM57LqeXimjfONUEgfqQ4IFpYWAtVixptyIRE5frMp/2A==", "dependencies": { - "@smithy/types": "^1.1.0", - "@smithy/util-uri-escape": "^1.0.1", + "@smithy/types": "^2.7.0", + "@smithy/util-uri-escape": "^2.0.0", "tslib": "^2.5.0" }, "engines": { @@ -7167,10 +4512,11 @@ } }, "node_modules/@smithy/querystring-parser": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-2.0.15.tgz", + "integrity": "sha512-jbBvoK3cc81Cj1c1TH1qMYxNQKHrYQ2DoTntN9FBbtUWcGhc+T4FP6kCKYwRLXyU4AajwGIZstvNAmIEgUUNTQ==", "dependencies": { - "@smithy/types": "^1.1.0", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { @@ -7178,17 +4524,22 @@ } }, "node_modules/@smithy/service-error-classification": { - "version": "1.0.2", - "license": "Apache-2.0", + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-2.0.8.tgz", + "integrity": "sha512-jCw9+005im8tsfYvwwSc4TTvd29kXRFkH9peQBg5R/4DD03ieGm6v6Hpv9nIAh98GwgYg1KrztcINC1s4o7/hg==", + "dependencies": { + "@smithy/types": "^2.7.0" + }, "engines": { "node": ">=14.0.0" } }, "node_modules/@smithy/shared-ini-file-loader": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.2.7", + "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-2.2.7.tgz", + "integrity": "sha512-0Qt5CuiogIuvQIfK+be7oVHcPsayLgfLJGkPlbgdbl0lD28nUKu4p11L+UG3SAEsqc9UsazO+nErPXw7+IgDpQ==", "dependencies": { - "@smithy/types": "^1.1.0", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { @@ -7196,16 +4547,17 @@ } }, "node_modules/@smithy/signature-v4": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-2.0.15.tgz", + "integrity": "sha512-SRTEJSEhQYVlBKIIdZ9SZpqW+KFqxqcNnEcBX+8xkDdWx+DItme9VcCDkdN32yTIrICC+irUufnUdV7mmHPjoA==", "dependencies": { - "@smithy/eventstream-codec": "^1.0.1", - "@smithy/is-array-buffer": "^1.0.1", - "@smithy/types": "^1.1.0", - "@smithy/util-hex-encoding": "^1.0.1", - "@smithy/util-middleware": "^1.0.1", - "@smithy/util-uri-escape": "^1.0.1", - "@smithy/util-utf8": "^1.0.1", + "@smithy/eventstream-codec": "^2.0.13", + "@smithy/is-array-buffer": "^2.0.0", + "@smithy/types": "^2.5.0", + "@smithy/util-hex-encoding": "^2.0.0", + "@smithy/util-middleware": "^2.0.6", + "@smithy/util-uri-escape": "^2.0.0", + "@smithy/util-utf8": "^2.0.2", "tslib": "^2.5.0" }, "engines": { @@ -7213,12 +4565,15 @@ } }, "node_modules/@smithy/smithy-client": { - "version": "1.0.3", - "license": "Apache-2.0", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-2.2.0.tgz", + "integrity": "sha512-C/bkNue5H5Obgl83SnlBt4v6VM68CqIjIELh3vAabud87xFYznLNKtj6Qb69Z+QOnLp9T+We++sEem/f2AHE+Q==", "dependencies": { - "@smithy/middleware-stack": "^1.0.1", - "@smithy/types": "^1.1.0", - "@smithy/util-stream": "^1.0.1", + "@smithy/middleware-endpoint": "^2.2.3", + "@smithy/middleware-stack": "^2.0.9", + "@smithy/protocol-http": "^3.0.11", + "@smithy/types": "^2.7.0", + "@smithy/util-stream": "^2.0.23", "tslib": "^2.5.0" }, "engines": { @@ -7226,8 +4581,9 @@ } }, "node_modules/@smithy/types": { - "version": "1.1.0", - "license": "Apache-2.0", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.7.0.tgz", + "integrity": "sha512-1OIFyhK+vOkMbu4aN2HZz/MomREkrAC/HqY5mlJMUJfGrPRwijJDTeiN8Rnj9zUaB8ogXAfIOtZrrgqZ4w7Wnw==", "dependencies": { "tslib": "^2.5.0" }, @@ -7236,19 +4592,21 @@ } }, "node_modules/@smithy/url-parser": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-2.0.15.tgz", + "integrity": "sha512-sADUncUj9rNbOTrdDGm4EXlUs0eQ9dyEo+V74PJoULY4jSQxS+9gwEgsPYyiu8PUOv16JC/MpHonOgqP/IEDZA==", "dependencies": { - "@smithy/querystring-parser": "^1.0.1", - "@smithy/types": "^1.1.0", + "@smithy/querystring-parser": "^2.0.15", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" } }, "node_modules/@smithy/util-base64": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-2.0.1.tgz", + "integrity": "sha512-DlI6XFYDMsIVN+GH9JtcRp3j02JEVuWIn/QOZisVzpIAprdsxGveFed0bjbMRCqmIFe8uetn5rxzNrBtIGrPIQ==", "dependencies": { - "@smithy/util-buffer-from": "^1.0.1", + "@smithy/util-buffer-from": "^2.0.0", "tslib": "^2.5.0" }, "engines": { @@ -7256,15 +4614,17 @@ } }, "node_modules/@smithy/util-body-length-browser": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@smithy/util-body-length-browser/-/util-body-length-browser-2.0.1.tgz", + "integrity": "sha512-NXYp3ttgUlwkaug4bjBzJ5+yIbUbUx8VsSLuHZROQpoik+gRkIBeEG9MPVYfvPNpuXb/puqodeeUXcKFe7BLOQ==", "dependencies": { "tslib": "^2.5.0" } }, "node_modules/@smithy/util-body-length-node": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@smithy/util-body-length-node/-/util-body-length-node-2.1.0.tgz", + "integrity": "sha512-/li0/kj/y3fQ3vyzn36NTLGmUwAICb7Jbe/CsWCktW363gh1MOcpEcSO3mJ344Gv2dqz8YJCLQpb6hju/0qOWw==", "dependencies": { "tslib": "^2.5.0" }, @@ -7273,10 +4633,11 @@ } }, "node_modules/@smithy/util-buffer-from": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.0.0.tgz", + "integrity": "sha512-/YNnLoHsR+4W4Vf2wL5lGv0ksg8Bmk3GEGxn2vEQt52AQaPSCuaO5PM5VM7lP1K9qHRKHwrPGktqVoAHKWHxzw==", "dependencies": { - "@smithy/is-array-buffer": "^1.0.1", + "@smithy/is-array-buffer": "^2.0.0", "tslib": "^2.5.0" }, "engines": { @@ -7284,8 +4645,9 @@ } }, "node_modules/@smithy/util-config-provider": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@smithy/util-config-provider/-/util-config-provider-2.1.0.tgz", + "integrity": "sha512-S6V0JvvhQgFSGLcJeT1CBsaTR03MM8qTuxMH9WPCCddlSo2W0V5jIHimHtIQALMLEDPGQ0ROSRr/dU0O+mxiQg==", "dependencies": { "tslib": "^2.5.0" }, @@ -7294,11 +4656,13 @@ } }, "node_modules/@smithy/util-defaults-mode-browser": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.0.23", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-2.0.23.tgz", + "integrity": "sha512-2u+7t7Wgz1jlfsf6il3pz6DIzyJHS3qrnNnmATICm00pQeqp2D4kUOYauOgKGIeKgVpwzzq8+hFQe749r3xR5w==", "dependencies": { - "@smithy/property-provider": "^1.0.1", - "@smithy/types": "^1.1.0", + "@smithy/property-provider": "^2.0.16", + "@smithy/smithy-client": "^2.2.0", + "@smithy/types": "^2.7.0", "bowser": "^2.11.0", "tslib": "^2.5.0" }, @@ -7307,23 +4671,39 @@ } }, "node_modules/@smithy/util-defaults-mode-node": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.0.31", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-2.0.31.tgz", + "integrity": "sha512-ZwdjAJAFkkQQ4hdE8HOcxFAWC3GPFXQ3yQ8IBwHH5nQBlr9q+p5eRQ7Y8iRRORJe4vksR+NASRXZ+E81Us1aXQ==", "dependencies": { - "@smithy/config-resolver": "^1.0.1", - "@smithy/credential-provider-imds": "^1.0.1", - "@smithy/node-config-provider": "^1.0.1", - "@smithy/property-provider": "^1.0.1", - "@smithy/types": "^1.1.0", + "@smithy/config-resolver": "^2.0.22", + "@smithy/credential-provider-imds": "^2.1.4", + "@smithy/node-config-provider": "^2.1.8", + "@smithy/property-provider": "^2.0.16", + "@smithy/smithy-client": "^2.2.0", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { "node": ">= 10.0.0" } }, + "node_modules/@smithy/util-endpoints": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@smithy/util-endpoints/-/util-endpoints-1.0.7.tgz", + "integrity": "sha512-Q2gEind3jxoLk6hdKWyESMU7LnXz8aamVwM+VeVjOYzYT1PalGlY/ETa48hv2YpV4+YV604y93YngyzzzQ4IIA==", + "dependencies": { + "@smithy/node-config-provider": "^2.1.8", + "@smithy/types": "^2.7.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">= 14.0.0" + } + }, "node_modules/@smithy/util-hex-encoding": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-hex-encoding/-/util-hex-encoding-2.0.0.tgz", + "integrity": "sha512-c5xY+NUnFqG6d7HFh1IFfrm3mGl29lC+vF+geHv4ToiuJCBmIfzx6IeHLg+OgRdPFKDXIw6pvi+p3CsscaMcMA==", "dependencies": { "tslib": "^2.5.0" }, @@ -7332,9 +4712,11 @@ } }, "node_modules/@smithy/util-middleware": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-2.0.8.tgz", + "integrity": "sha512-qkvqQjM8fRGGA8P2ydWylMhenCDP8VlkPn8kiNuFEaFz9xnUKC2irfqsBSJrfrOB9Qt6pQsI58r3zvvumhFMkw==", "dependencies": { + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { @@ -7342,10 +4724,12 @@ } }, "node_modules/@smithy/util-retry": { - "version": "1.0.3", - "license": "Apache-2.0", + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-2.0.8.tgz", + "integrity": "sha512-cQTPnVaVFMjjS6cb44WV2yXtHVyXDC5icKyIbejMarJEApYeJWpBU3LINTxHqp/tyLI+MZOUdosr2mZ3sdziNg==", "dependencies": { - "@smithy/service-error-classification": "^1.0.2", + "@smithy/service-error-classification": "^2.0.8", + "@smithy/types": "^2.7.0", "tslib": "^2.5.0" }, "engines": { @@ -7353,16 +4737,17 @@ } }, "node_modules/@smithy/util-stream": { - "version": "1.0.1", - "license": "Apache-2.0", - "dependencies": { - "@smithy/fetch-http-handler": "^1.0.1", - "@smithy/node-http-handler": "^1.0.2", - "@smithy/types": "^1.1.0", - "@smithy/util-base64": "^1.0.1", - "@smithy/util-buffer-from": "^1.0.1", - "@smithy/util-hex-encoding": "^1.0.1", - "@smithy/util-utf8": "^1.0.1", + "version": "2.0.23", + "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-2.0.23.tgz", + "integrity": "sha512-OJMWq99LAZJUzUwTk+00plyxX3ESktBaGPhqNIEVab+53gLULiWN9B/8bRABLg0K6R6Xg4t80uRdhk3B/LZqMQ==", + "dependencies": { + "@smithy/fetch-http-handler": "^2.3.1", + "@smithy/node-http-handler": "^2.2.1", + "@smithy/types": "^2.7.0", + "@smithy/util-base64": "^2.0.1", + "@smithy/util-buffer-from": "^2.0.0", + "@smithy/util-hex-encoding": "^2.0.0", + "@smithy/util-utf8": "^2.0.2", "tslib": "^2.5.0" }, "engines": { @@ -7370,8 +4755,9 @@ } }, "node_modules/@smithy/util-uri-escape": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-uri-escape/-/util-uri-escape-2.0.0.tgz", + "integrity": "sha512-ebkxsqinSdEooQduuk9CbKcI+wheijxEb3utGXkCoYQkJnwTnLbH1JXGimJtUkQwNQbsbuYwG2+aFVyZf5TLaw==", "dependencies": { "tslib": "^2.5.0" }, @@ -7380,10 +4766,11 @@ } }, "node_modules/@smithy/util-utf8": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.0.2.tgz", + "integrity": "sha512-qOiVORSPm6Ce4/Yu6hbSgNHABLP2VMv8QOC3tTDNHHlWY19pPyc++fBTbZPtx6egPXi4HQxKDnMxVxpbtX2GoA==", "dependencies": { - "@smithy/util-buffer-from": "^1.0.1", + "@smithy/util-buffer-from": "^2.0.0", "tslib": "^2.5.0" }, "engines": { @@ -7391,11 +4778,12 @@ } }, "node_modules/@smithy/util-waiter": { - "version": "1.0.1", - "license": "Apache-2.0", + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/@smithy/util-waiter/-/util-waiter-2.0.13.tgz", + "integrity": "sha512-YovIQatiuM7giEsRFotqJa2i3EbU2EE3PgtpXgtLgpx5rXiZMAwPxXYDFVFhuO0lbqvc/Zx4n+ZIisXOHPSqyg==", "dependencies": { - "@smithy/abort-controller": "^1.0.1", - "@smithy/types": "^1.1.0", + "@smithy/abort-controller": "^2.0.13", + "@smithy/types": "^2.5.0", "tslib": "^2.5.0" }, "engines": { diff --git a/package.json b/package.json index b80b5be2c6..98a9837843 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rudder-transformer", - "version": "1.52.4", + "version": "1.53.0", "description": "", "homepage": "https://github.com/rudderlabs/rudder-transformer#readme", "bugs": { @@ -55,10 +55,10 @@ }, "dependencies": { "@amplitude/ua-parser-js": "^0.7.24", - "@aws-sdk/client-personalize": "^3.391.0", - "@aws-sdk/client-s3": "^3.370.0", + "@aws-sdk/client-personalize": "^3.470.0", + "@aws-sdk/client-s3": "^3.438.0", "@aws-sdk/credential-providers": "^3.391.0", - "@aws-sdk/lib-storage": "^3.391.0", + "@aws-sdk/lib-storage": "^3.456.0", "@bugsnag/js": "^7.20.2", "@datadog/pprof": "^3.1.0", "@koa/router": "^12.0.0", diff --git a/src/adapters/network.js b/src/adapters/network.js index 375d9dc908..b0bd14374e 100644 --- a/src/adapters/network.js +++ b/src/adapters/network.js @@ -287,7 +287,7 @@ function getFormData(payload) { * @returns */ const prepareProxyRequest = (request) => { - const { body, method, params, endpoint, headers } = request; + const { body, method, params, endpoint, headers, destinationConfig: config } = request; const { payload, payloadFormat } = getPayloadData(body); let data; @@ -313,7 +313,7 @@ const prepareProxyRequest = (request) => { } // Ref: https://github.com/rudderlabs/rudder-server/blob/master/router/network.go#L164 headers['User-Agent'] = 'RudderLabs'; - return removeUndefinedValues({ endpoint, data, params, headers, method }); + return removeUndefinedValues({ endpoint, data, params, headers, method, config }); }; /** diff --git a/src/cdk/v2/destinations/the_trade_desk/config.js b/src/cdk/v2/destinations/the_trade_desk/config.js new file mode 100644 index 0000000000..9455c818fd --- /dev/null +++ b/src/cdk/v2/destinations/the_trade_desk/config.js @@ -0,0 +1,21 @@ +const SUPPORTED_EVENT_TYPE = 'record'; +const ACTION_TYPES = ['insert', 'delete']; +const DATA_PROVIDER_ID = 'rudderstack'; + +// ref:- https://partner.thetradedesk.com/v3/portal/data/doc/DataEnvironments +const DATA_SERVERS_BASE_ENDPOINTS_MAP = { + apac: 'https://sin-data.adsrvr.org', + tokyo: 'https://tok-data.adsrvr.org', + usEastCoast: 'https://use-data.adsrvr.org', + usWestCoast: 'https://usw-data.adsrvr.org', + ukEu: 'https://euw-data.adsrvr.org', + china: 'https://data-cn2.adsrvr.cn', +}; + +module.exports = { + SUPPORTED_EVENT_TYPE, + ACTION_TYPES, + DATA_PROVIDER_ID, + MAX_REQUEST_SIZE_IN_BYTES: 2500000, + DATA_SERVERS_BASE_ENDPOINTS_MAP, +}; diff --git a/src/cdk/v2/destinations/the_trade_desk/rtWorkflow.yaml b/src/cdk/v2/destinations/the_trade_desk/rtWorkflow.yaml new file mode 100644 index 0000000000..0c8963e0ac --- /dev/null +++ b/src/cdk/v2/destinations/the_trade_desk/rtWorkflow.yaml @@ -0,0 +1,17 @@ +bindings: + - name: processRouterDest + path: ./utils + +steps: + - name: validateInput + template: | + $.assert(Array.isArray(^) && ^.length > 0, "Invalid event array") + const config = ^[0].destination.Config + $.assertConfig(config.audienceId, "Segment name is not present. Aborting") + $.assertConfig(config.advertiserId, "Advertiser ID is not present. Aborting") + $.assertConfig(config.advertiserSecretKey, "Advertiser Secret Key is not present. Aborting") + config.ttlInDays ? $.assertConfig(config.ttlInDays >=0 && config.ttlInDays <= 180, "TTL is out of range. Allowed values are 0 to 180 days") + + - name: processRouterDest + template: | + $.processRouterDest(^) diff --git a/src/cdk/v2/destinations/the_trade_desk/utils.js b/src/cdk/v2/destinations/the_trade_desk/utils.js new file mode 100644 index 0000000000..0f1c3fb0c1 --- /dev/null +++ b/src/cdk/v2/destinations/the_trade_desk/utils.js @@ -0,0 +1,107 @@ +const lodash = require('lodash'); +const CryptoJS = require('crypto-js'); +const { InstrumentationError, AbortedError } = require('@rudderstack/integrations-lib'); +const { BatchUtils } = require('@rudderstack/workflow-engine'); +const { + defaultPostRequestConfig, + defaultRequestConfig, + getSuccessRespEvents, + removeUndefinedAndNullValues, + handleRtTfSingleEventError, +} = require('../../../../v0/util'); +const tradeDeskConfig = require('./config'); + +const { DATA_PROVIDER_ID, DATA_SERVERS_BASE_ENDPOINTS_MAP } = tradeDeskConfig; + +const ttlInMin = (ttl) => parseInt(ttl, 10) * 1440; +const getBaseEndpoint = (dataServer) => DATA_SERVERS_BASE_ENDPOINTS_MAP[dataServer]; +const getFirstPartyEndpoint = (dataServer) => `${getBaseEndpoint(dataServer)}/data/advertiser`; + +const getSignatureHeader = (request, secretKey) => { + if (!secretKey) { + throw new AbortedError('Secret key is missing. Aborting'); + } + const sha1 = CryptoJS.HmacSHA1(JSON.stringify(request), secretKey); + const base = CryptoJS.enc.Base64.stringify(sha1); + return base; +}; + +const responseBuilder = (items, config) => { + const { advertiserId, dataServer } = config; + + const payload = { DataProviderId: DATA_PROVIDER_ID, AdvertiserId: advertiserId, Items: items }; + + const response = defaultRequestConfig(); + response.endpoint = getFirstPartyEndpoint(dataServer); + response.method = defaultPostRequestConfig.requestMethod; + response.body.JSON = removeUndefinedAndNullValues(payload); + return response; +}; + +const batchResponseBuilder = (items, config) => { + const response = []; + const itemsChunks = BatchUtils.chunkArrayBySizeAndLength(items, { + // TODO: use destructuring at the top of file once proper 'mocking' is implemented. + // eslint-disable-next-line unicorn/consistent-destructuring + maxSizeInBytes: tradeDeskConfig.MAX_REQUEST_SIZE_IN_BYTES, + }); + + itemsChunks.items.forEach((chunk) => { + response.push(responseBuilder(chunk, config)); + }); + + return response; +}; + +const processRecordInputs = (inputs, destination) => { + const { Config } = destination; + const items = []; + const successMetadata = []; + const errorResponseList = []; + + const error = new InstrumentationError('Invalid action type'); + + inputs.forEach((input) => { + const { fields, action } = input.message; + const isInsertOrDelete = action === 'insert' || action === 'delete'; + + if (isInsertOrDelete) { + successMetadata.push(input.metadata); + const data = [ + { + Name: Config.audienceId, + TTLInMinutes: action === 'insert' ? ttlInMin(Config.ttlInDays) : 0, + }, + ]; + + Object.keys(fields).forEach((id) => { + const value = fields[id]; + if (value) { + // adding only non empty ID's + items.push({ [id]: value, Data: data }); + } + }); + } else { + errorResponseList.push(handleRtTfSingleEventError(input, error, {})); + } + }); + + const payloads = batchResponseBuilder(items, Config); + + const response = getSuccessRespEvents(payloads, successMetadata, destination, true); + return [response, ...errorResponseList]; +}; + +const processRouterDest = (inputs) => { + const respList = []; + const { destination } = inputs[0]; + const groupedInputs = lodash.groupBy(inputs, (input) => input.message.type); + if (groupedInputs.record) { + const transformedRecordEvent = processRecordInputs(groupedInputs.record, destination); + respList.push(...transformedRecordEvent); + } + + return respList; +}; + +module.exports = { getSignatureHeader, processRouterDest }; diff --git a/src/cdk/v2/destinations/the_trade_desk/utils.test.js b/src/cdk/v2/destinations/the_trade_desk/utils.test.js new file mode 100644 index 0000000000..81fd7cf17d --- /dev/null +++ b/src/cdk/v2/destinations/the_trade_desk/utils.test.js @@ -0,0 +1,49 @@ +const { AbortedError } = require('@rudderstack/integrations-lib'); +const { getSignatureHeader } = require('./utils'); + +describe('getSignatureHeader', () => { + it('should calculate the signature header for a valid request and secret key', () => { + const request = { data: 'example' }; + const secretKey = 'secret'; + const expected = 'rvxETQ7kIU5Cko3GddD2AeFpz8E='; + + const result = getSignatureHeader(request, secretKey); + + expect(result).toBe(expected); + }); + + it('should handle requests with different data types and secret key', () => { + const request1 = { data: 'example' }; + const secretKey1 = 'secret'; + const expected1 = 'rvxETQ7kIU5Cko3GddD2AeFpz8E='; + + const result1 = getSignatureHeader(request1, secretKey1); + + expect(result1).toBe(expected1); + + const request2 = { data: 123 }; + const secretKey2 = 'secret'; + const expected2 = 'V5RSVwxqHRLkZftZ0+IrZAp4L4s='; + + const result2 = getSignatureHeader(request2, secretKey2); + + expect(result2).toBe(expected2); + + const request3 = { data: true }; + const secretKey3 = 'secret'; + const expected3 = 'oZ28NtyMYDGxRV0E+Tgvz7B1jds='; + + const result3 = getSignatureHeader(request3, secretKey3); + + expect(result3).toBe(expected3); + }); + + it('should throw an AbortedError when secret key is missing', () => { + const request = { data: 'example' }; + const secretKey = null; + + expect(() => { + getSignatureHeader(request, secretKey); + }).toThrow(AbortedError); + }); +}); diff --git a/src/controllers/bulkUpload.ts b/src/controllers/bulkUpload.ts index 85c4fe6b4f..babb8b6db1 100644 --- a/src/controllers/bulkUpload.ts +++ b/src/controllers/bulkUpload.ts @@ -1,7 +1,7 @@ /* eslint-disable global-require, import/no-dynamic-require, @typescript-eslint/no-unused-vars */ import { client as errNotificationClient } from '../util/errorNotifier'; import logger from '../logger'; -import { CatchErr } from '../util/types'; +import { CatchErr, ContextBodySimple } from '../util/types'; // TODO: To be refactored and redisgned const getDestFileUploadHandler = (version, dest) => @@ -45,7 +45,7 @@ export const fileUpload = async (ctx) => { return {}; }; - const { destType } = ctx.request.body; + const { destType }: ContextBodySimple = ctx.request.body; const destFileUploadHandler = getDestFileUploadHandler('v0', destType.toLowerCase()); if (!destFileUploadHandler || !destFileUploadHandler.processFileData) { @@ -82,7 +82,7 @@ export const pollStatus = async (ctx) => { JSON.stringify(ctx.request.body), ); - const { destType } = ctx.request.body; + const { destType }: ContextBodySimple = ctx.request.body; const destFileUploadHandler = getPollStatusHandler('v0', destType.toLowerCase()); let response; if (!destFileUploadHandler || !destFileUploadHandler.processPolling) { @@ -117,7 +117,7 @@ export const getWarnJobStatus = async (ctx) => { JSON.stringify(ctx.request.body), ); - const { destType } = ctx.request.body; + const { destType }: ContextBodySimple = ctx.request.body; const destFileUploadHandler = getJobStatusHandler('v0', destType.toLowerCase()); if (!destFileUploadHandler || !destFileUploadHandler.processJobStatus) { @@ -153,7 +153,7 @@ export const getFailedJobStatus = async (ctx) => { JSON.stringify(ctx.request.body), ); - const { destType } = ctx.request.body; + const { destType }: ContextBodySimple = ctx.request.body; const destFileUploadHandler = getJobStatusHandler('v0', destType.toLowerCase()); if (!destFileUploadHandler || !destFileUploadHandler.processJobStatus) { diff --git a/src/features.json b/src/features.json index a3d29bb325..cc75b16a74 100644 --- a/src/features.json +++ b/src/features.json @@ -63,7 +63,9 @@ "GLADLY": true, "ONE_SIGNAL": true, "TIKTOK_AUDIENCE": true, - "REDDIT": true + "REDDIT": true, + "THE_TRADE_DESK": true, + "INTERCOM": true }, "supportSourceTransformV1": true, "supportTransformerProxyV1": false diff --git a/src/util/types.ts b/src/util/types.ts index 579c35579c..bd2836d710 100644 --- a/src/util/types.ts +++ b/src/util/types.ts @@ -3,6 +3,9 @@ export type FixMe = any; export type CatchErr = any; +export type ContextBodySimple = { + destType: string; +}; export interface Config { cdkEnabled?: boolean; cdkV2Enabled?: boolean; diff --git a/src/v0/destinations/active_campaign/transform.js b/src/v0/destinations/active_campaign/transform.js index 70caf47ea8..981dbd7520 100644 --- a/src/v0/destinations/active_campaign/transform.js +++ b/src/v0/destinations/active_campaign/transform.js @@ -50,7 +50,8 @@ const responseBuilderSimple = (payload, category, destination) => { }; const syncContact = async (contactPayload, category, destination) => { - const endpoint = `${destination.Config.apiUrl}${category.endPoint}`; + const { endPoint } = category; + const endpoint = `${destination.Config.apiUrl}${endPoint}`; const requestData = { contact: contactPayload, }; @@ -60,6 +61,7 @@ const syncContact = async (contactPayload, category, destination) => { const res = await httpPOST(endpoint, requestData, requestOptions, { destType: 'active_campaign', feature: 'transformation', + endpointPath: endPoint, }); if (res.success === false) { errorHandler(res, 'Failed to create new contact'); @@ -78,6 +80,7 @@ const customTagProcessor = async (message, category, destination, contactId) => let endpoint; let requestOptions; let requestData; + const { tagEndPoint, mergeTagWithContactUrl } = category; // Here we extract the tags which are to be mapped to the created contact from the message const msgTags = get(message?.context?.traits, 'tags') || get(message?.traits, 'tags'); @@ -89,13 +92,14 @@ const customTagProcessor = async (message, category, destination, contactId) => // Step - 1 // Fetch already created tags from dest, so that we avoid duplicate tag creation request // Ref - https://developers.activecampaign.com/reference/retrieve-all-tags - endpoint = `${destination.Config.apiUrl}${`${category.tagEndPoint}?limit=100`}`; + endpoint = `${destination.Config.apiUrl}${`${tagEndPoint}?limit=100`}`; requestOptions = { headers: getHeader(destination), }; res = await httpGET(endpoint, requestOptions, { destType: 'active_campaign', feature: 'transformation', + tagEndPoint, }); if (res.success === false) { errorHandler(res, 'Failed to fetch already created tags'); @@ -117,15 +121,14 @@ const customTagProcessor = async (message, category, destination, contactId) => if (parseInt(get(res, TOTAL_RECORDS_KEY), 10) > 100) { const limit = Math.floor(parseInt(get(res, TOTAL_RECORDS_KEY), 10) / 100); for (let i = 0; i < limit; i += 1) { - endpoint = `${destination.Config.apiUrl}${category.tagEndPoint}?limit=100&offset=${ - 100 * (i + 1) - }`; + endpoint = `${destination.Config.apiUrl}${tagEndPoint}?limit=100&offset=${100 * (i + 1)}`; requestOptions = { headers: getHeader(destination), }; const resp = httpGET(endpoint, requestOptions, { destType: 'active_campaign', feature: 'transformation', + endpointPath: `/api/3/tags`, }); promises.push(resp); } @@ -153,7 +156,7 @@ const customTagProcessor = async (message, category, destination, contactId) => if (tagsToBeCreated.length > 0) { await Promise.all( tagsToBeCreated.map(async (tag) => { - endpoint = `${destination.Config.apiUrl}${category.tagEndPoint}`; + endpoint = `${destination.Config.apiUrl}${tagEndPoint}`; requestData = { tag: { tag, @@ -182,7 +185,7 @@ const customTagProcessor = async (message, category, destination, contactId) => // Ref - https://developers.activecampaign.com/reference/create-contact-tag const responsesArr = await Promise.all( tagIds.map(async (tagId) => { - endpoint = `${destination.Config.apiUrl}${category.mergeTagWithContactUrl}`; + endpoint = `${destination.Config.apiUrl}${mergeTagWithContactUrl}`; requestData = { contactTag: { contact: contactId, @@ -207,6 +210,7 @@ const customTagProcessor = async (message, category, destination, contactId) => const customFieldProcessor = async (message, category, destination) => { const responseStaging = []; + const { fieldEndPoint } = category; // Step - 1 // Extract the custom field info from the message const fieldInfo = get(message?.context?.traits, 'fieldInfo') || get(message.traits, 'fieldInfo'); @@ -219,7 +223,7 @@ const customFieldProcessor = async (message, category, destination) => { // Step - 2 // Get the existing field data from dest and store it in responseStaging // Ref - https://developers.activecampaign.com/reference/retrieve-fields - let endpoint = `${destination.Config.apiUrl}${category.fieldEndPoint}?limit=100`; + let endpoint = `${destination.Config.apiUrl}${fieldEndPoint}?limit=100`; const requestOptions = { headers: { 'Api-Token': destination.Config.apiKey, @@ -228,6 +232,7 @@ const customFieldProcessor = async (message, category, destination) => { const res = await httpGET(endpoint, requestOptions, { destType: 'active_campaign', feature: 'transformation', + fieldEndPoint, }); if (res.success === false) { errorHandler(res, 'Failed to get existing field data'); @@ -238,9 +243,7 @@ const customFieldProcessor = async (message, category, destination) => { const limit = Math.floor(parseInt(get(res, TOTAL_RECORDS_KEY), 10) / 100); if (parseInt(get(res, TOTAL_RECORDS_KEY), 10) > 100) { for (let i = 0; i < limit; i += 1) { - endpoint = `${destination.Config.apiUrl}${category.fieldEndPoint}?limit=100&offset=${ - 100 * (i + 1) - }`; + endpoint = `${destination.Config.apiUrl}${fieldEndPoint}?limit=100&offset=${100 * (i + 1)}`; const requestOpt = { headers: { 'Api-Token': destination.Config.apiKey, @@ -249,6 +252,7 @@ const customFieldProcessor = async (message, category, destination) => { const resp = httpGET(endpoint, requestOpt, { destType: 'active_campaign', feature: 'transformation', + endpointPath: `/api/3/fields`, }); promises.push(resp); } @@ -308,6 +312,7 @@ const customFieldProcessor = async (message, category, destination) => { }; const customListProcessor = async (message, category, destination, contactId) => { + const { mergeListWithContactUrl } = category; // Here we extract the list info from the message const listInfo = get(message?.context?.traits, 'lists') ? get(message.context.traits, 'lists') @@ -331,7 +336,7 @@ const customListProcessor = async (message, category, destination, contactId) => // eslint-disable-next-line no-restricted-syntax for (const li of listArr) { if (li.status === 'subscribe' || li.status === 'unsubscribe') { - const endpoint = `${destination.Config.apiUrl}${category.mergeListWithContactUrl}`; + const endpoint = `${destination.Config.apiUrl}${mergeListWithContactUrl}`; const requestData = { contactList: { list: li.id, @@ -345,6 +350,7 @@ const customListProcessor = async (message, category, destination, contactId) => const res = httpPOST(endpoint, requestData, requestOptions, { destType: 'active_campaign', feature: 'transformation', + endpointPath: mergeListWithContactUrl, }); promises.push(res); } @@ -402,6 +408,7 @@ const screenRequestHandler = async (message, category, destination) => { res = await httpGET(endpoint, requestOptions, { destType: 'active_campaign', feature: 'transformation', + endpointPath: `/api/3/eventTrackingEvents`, }); if (res.success === false) { errorHandler(res, 'Failed to retrieve events'); @@ -465,6 +472,7 @@ const trackRequestHandler = async (message, category, destination) => { let res = await httpGET(endpoint, requestOptions, { destType: 'active_campaign', feature: 'transformation', + endpointPath: `/api/3/eventTrackingEvents`, }); if (res.success === false) { diff --git a/src/v0/destinations/af/deleteUsers.js b/src/v0/destinations/af/deleteUsers.js index 2d68549fcc..bb711292c0 100644 --- a/src/v0/destinations/af/deleteUsers.js +++ b/src/v0/destinations/af/deleteUsers.js @@ -38,6 +38,7 @@ const deleteUser = async (config, endpoint, body, identityType, identityValue) = { destType: 'af', feature: 'deleteUsers', + endpointPath: `appsflyer.com/api/gdpr/v1/opendsr_requests`, }, ); const handledDelResponse = processAxiosResponse(response); diff --git a/src/v0/destinations/am/deleteUsers.js b/src/v0/destinations/am/deleteUsers.js index 578c58fb5c..6de9cf64a1 100644 --- a/src/v0/destinations/am/deleteUsers.js +++ b/src/v0/destinations/am/deleteUsers.js @@ -28,6 +28,7 @@ const userDeletionHandler = async (userAttributes, config) => { // Ref : https://www.docs.developers.amplitude.com/analytics/apis/user-privacy-api/#response const batchEvents = getUserIdBatches(userAttributes, DELETE_MAX_BATCH_SIZE); const url = 'https://amplitude.com/api/2/deletions/users'; + const endpointPath = '/api/2/deletions/users'; await Promise.all( batchEvents.map(async (batch) => { const data = { @@ -41,6 +42,7 @@ const userDeletionHandler = async (userAttributes, config) => { const resp = await httpPOST(url, data, requestOptions, { destType: 'am', feature: 'deleteUsers', + endpointPath, }); const handledDelResponse = processAxiosResponse(resp); if (!isHttpStatusSuccess(handledDelResponse.status)) { diff --git a/src/v0/destinations/am/transform.js b/src/v0/destinations/am/transform.js index 05a130d6e0..911ec51be0 100644 --- a/src/v0/destinations/am/transform.js +++ b/src/v0/destinations/am/transform.js @@ -297,6 +297,15 @@ const identifyBuilder = (message, destination, rawPayload) => { } }); } + // update identify call request with unset fields + // AM docs https://www.docs.developers.amplitude.com/analytics/apis/http-v2-api/#keys-for-the-event-argument:~:text=exceed%2040%20layers.-,user_properties,-Optional.%20Object.%20A + const unsetObject = AMUtils.getUnsetObj(message); + if (unsetObject) { + // Example unsetObject = { + // "testObj.del1": "-" + // } + set(rawPayload, `user_properties.$unset`, unsetObject); + } return rawPayload; }; @@ -334,7 +343,7 @@ const getResponseData = (evType, destination, rawPayload, message, groupInfo) => case EventType.IDENTIFY: // event_type for identify event is $identify rawPayload.event_type = IDENTIFY_AM; - identifyBuilder(message, destination, rawPayload); + rawPayload = identifyBuilder(message, destination, rawPayload); break; case EventType.GROUP: // event_type for identify event is $identify diff --git a/src/v0/destinations/am/util.test.js b/src/v0/destinations/am/util.test.js new file mode 100644 index 0000000000..faaa9170f0 --- /dev/null +++ b/src/v0/destinations/am/util.test.js @@ -0,0 +1,66 @@ +const { getUnsetObj } = require('./utils'); + +describe('getUnsetObj', () => { + it("should return undefined when 'message.integrations.Amplitude.fieldsToUnset' is not array", () => { + const message = { + integrations: { + Amplitude: { fieldsToUnset: 'field_name' }, + }, + }; + const result = getUnsetObj(message); + expect(result).toBeUndefined(); + }); + it("should return undefined when 'message.integrations.Amplitude.fieldsToUnset' is undefined", () => { + const message = { + integrations: { + Amplitude: {}, + }, + }; + const result = getUnsetObj(message); + expect(result).toBeUndefined(); + }); + + it("should return an empty objecty when 'message.integrations.Amplitude.fieldsToUnset' is an empty array", () => { + const message = { + integrations: { + Amplitude: { fieldsToUnset: [] }, + }, + }; + const result = getUnsetObj(message); + expect(result).toEqual({}); + }); + + it("should return an object with keys and values set to '-' when 'message.integrations.Amplitude.fieldsToUnset' is an array of strings", () => { + const message = { + integrations: { + Amplitude: { fieldsToUnset: ['Unset1', 'Unset2'] }, + }, + }; + const result = getUnsetObj(message); + expect(result).toEqual({ + Unset1: '-', + Unset2: '-', + }); + }); + + it("should handle missing 'message' parameter", () => { + const result = getUnsetObj(); + expect(result).toBeUndefined(); + }); + + // Should handle missing 'integrations' property in 'message' parameter + it("should handle missing 'integrations' property in 'message' parameter", () => { + const message = {}; + const result = getUnsetObj(message); + expect(result).toBeUndefined(); + }); + + // Should handle missing 'Amplitude' property in 'message.integrations' parameter + it("should handle missing 'Amplitude' property in 'message.integrations' parameter", () => { + const message = { + integrations: {}, + }; + const result = getUnsetObj(message); + expect(result).toBeUndefined(); + }); +}); diff --git a/src/v0/destinations/am/utils.js b/src/v0/destinations/am/utils.js index b9925c20d8..71fe0ab459 100644 --- a/src/v0/destinations/am/utils.js +++ b/src/v0/destinations/am/utils.js @@ -82,6 +82,32 @@ const getEventId = (payload, sourceKey) => { return undefined; }; +/** + * generates the unsetObject and returns it + * @param {*} message + * @returns + * + * Example message = { + integrations: { + Amplitude: { fieldsToUnset: ['Unset1', 'Unset2'] }, + All: true, + }, + }; + return unsetObj = { + "Unset1": "-", + "Unset2": "-" + } + AM docs: https://www.docs.developers.amplitude.com/analytics/apis/http-v2-api/#keys-for-the-event-argument:~:text=exceed%2040%20layers.-,user_properties,-Optional.%20Object.%20A + */ +const getUnsetObj = (message) => { + const fieldsToUnset = get(message, 'integrations.Amplitude.fieldsToUnset'); + let unsetObject; + if (Array.isArray(fieldsToUnset)) { + unsetObject = Object.fromEntries(fieldsToUnset.map((field) => [field, '-'])); + } + + return unsetObject; +}; module.exports = { getOSName, getOSVersion, @@ -90,4 +116,5 @@ module.exports = { getPlatform, getBrand, getEventId, + getUnsetObj, }; diff --git a/src/v0/destinations/canny/util.js b/src/v0/destinations/canny/util.js index 59644bcd6b..f514a01e5c 100644 --- a/src/v0/destinations/canny/util.js +++ b/src/v0/destinations/canny/util.js @@ -45,6 +45,7 @@ const retrieveUserId = async (apiKey, message) => { { destType: 'canny', feature: 'transformation', + endpointPath: `/v1/users/retrieve`, }, ); logger.debug(response); diff --git a/src/v0/destinations/custify/util.js b/src/v0/destinations/custify/util.js index ae6f21fe20..8ecabccd2e 100644 --- a/src/v0/destinations/custify/util.js +++ b/src/v0/destinations/custify/util.js @@ -40,6 +40,7 @@ const createUpdateCompany = async (companyPayload, Config) => { { destType: 'custify', feature: 'transformation', + endpointPath: `/company`, }, ); const processedCompanyResponse = processAxiosResponse(companyResponse); diff --git a/src/v0/destinations/factorsai/data/FactorsAIGroupConfig.json b/src/v0/destinations/factorsai/data/FactorsAIGroupConfig.json index f5f78e71e4..d581f56070 100644 --- a/src/v0/destinations/factorsai/data/FactorsAIGroupConfig.json +++ b/src/v0/destinations/factorsai/data/FactorsAIGroupConfig.json @@ -34,5 +34,10 @@ "destKey": "email", "sourceKeys": "email", "required": false + }, + { + "sourceKeys": "context", + "destKey": "context", + "required": false } ] diff --git a/src/v0/destinations/factorsai/data/FactorsAIIdentifyConfig.json b/src/v0/destinations/factorsai/data/FactorsAIIdentifyConfig.json index 9a08c382d4..b34cd2147e 100644 --- a/src/v0/destinations/factorsai/data/FactorsAIIdentifyConfig.json +++ b/src/v0/destinations/factorsai/data/FactorsAIIdentifyConfig.json @@ -34,5 +34,10 @@ "destKey": "channel", "sourceKeys": "channel", "required": false + }, + { + "sourceKeys": "context", + "destKey": "context", + "required": false } ] diff --git a/src/v0/destinations/factorsai/data/FactorsAITrackConfig.json b/src/v0/destinations/factorsai/data/FactorsAITrackConfig.json index ccb9686c29..67df67fc76 100644 --- a/src/v0/destinations/factorsai/data/FactorsAITrackConfig.json +++ b/src/v0/destinations/factorsai/data/FactorsAITrackConfig.json @@ -44,5 +44,10 @@ "destKey": "channel", "sourceKeys": "channel", "required": false + }, + { + "sourceKeys": "context", + "destKey": "context", + "required": false } ] diff --git a/src/v0/destinations/factorsai/transform.js b/src/v0/destinations/factorsai/transform.js index 9824b73bbf..9fbfc926f7 100644 --- a/src/v0/destinations/factorsai/transform.js +++ b/src/v0/destinations/factorsai/transform.js @@ -13,6 +13,14 @@ const { JSON_MIME_TYPE } = require('../../util/constant'); const { ConfigCategories, mappingConfig, BASE_URL } = require('./config'); +function populateIpDetails(requestJson, message) { + const payload = requestJson; + if (message.context || message.request_ip) { + payload.context = { ...(payload.context || {}), ip: message.context?.ip || message.request_ip }; + } + return payload; +} + // build final response function buildResponse(payload, factorsAIApiKey) { const response = defaultRequestConfig(); @@ -29,13 +37,15 @@ function buildResponse(payload, factorsAIApiKey) { // process identify call function processIdentify(message, factorsAIApiKey) { - const requestJson = constructPayload(message, mappingConfig[ConfigCategories.IDENTIFY.name]); + let requestJson = constructPayload(message, mappingConfig[ConfigCategories.IDENTIFY.name]); + requestJson = populateIpDetails(requestJson, message); return buildResponse(requestJson, factorsAIApiKey); } // process track call function processTrack(message, factorsAIApiKey) { - const requestJson = constructPayload(message, mappingConfig[ConfigCategories.TRACK.name]); + let requestJson = constructPayload(message, mappingConfig[ConfigCategories.TRACK.name]); + requestJson = populateIpDetails(requestJson, message); // flatten json as factorsAi do not support nested properties requestJson.properties = flattenJson(requestJson.properties); return buildResponse(requestJson, factorsAIApiKey); @@ -43,7 +53,8 @@ function processTrack(message, factorsAIApiKey) { // process Page Call function processPageAndGroup(message, factorsAIApiKey, category) { - const requestJson = constructPayload(message, mappingConfig[category]); + let requestJson = constructPayload(message, mappingConfig[category]); + requestJson = populateIpDetails(requestJson, message); requestJson.type = message.type; return buildResponse(requestJson, factorsAIApiKey); } diff --git a/src/v0/destinations/freshmarketer/utils.js b/src/v0/destinations/freshmarketer/utils.js index 6fa1fe9976..5e3ba6e67e 100644 --- a/src/v0/destinations/freshmarketer/utils.js +++ b/src/v0/destinations/freshmarketer/utils.js @@ -49,6 +49,7 @@ const createUpdateAccount = async (payload, Config) => { let accountResponse = await httpPOST(endPoint, payloadBody, requestOptions, { destType: 'freshmarketer', feature: 'transformation', + endpointPath: `/crm/sales/api/sales_accounts/upsert`, }); accountResponse = processAxiosResponse(accountResponse); if (accountResponse.status !== 200 && accountResponse.status !== 201) { @@ -93,6 +94,7 @@ const getUserAccountDetails = async (payload, userEmail, Config) => { let userSalesAccountResponse = await httpPOST(endPoint, userPayload, requestOptions, { destType: 'freshmarketer', feature: 'transformation', + endpointPath: `crm/sales/api/contacts/upsert?include=sales_accounts`, }); userSalesAccountResponse = processAxiosResponse(userSalesAccountResponse); if (userSalesAccountResponse.status !== 200 && userSalesAccountResponse.status !== 201) { @@ -142,6 +144,7 @@ const createOrUpdateListDetails = async (listName, Config) => { let listResponse = await httpGET(endPoint, requestOptions, { destType: 'freshmarketer', feature: 'transformation', + endpointPath: `/crm/sales/api/lists`, }); listResponse = processAxiosResponse(listResponse); if (listResponse.status !== 200) { @@ -161,6 +164,7 @@ const createOrUpdateListDetails = async (listName, Config) => { listResponse = await httpPOST(endPoint, { name: listName }, requestOptions, { destType: 'freshmarketer', feature: 'transformation', + endpointPath: `/crm/sales/api/lists`, }); listResponse = processAxiosResponse(listResponse); if (listResponse.status !== 200) { @@ -235,6 +239,7 @@ const getContactsDetails = async (userEmail, Config) => { let userResponse = await httpPOST(endPoint, userPayload, requestOptions, { destType: 'freshmarketer', feature: 'transformation', + endpointPath: `/crm/sales/api/contacts/upsert`, }); userResponse = processAxiosResponse(userResponse); if (userResponse.status !== 200 && userResponse.status !== 201) { @@ -308,6 +313,7 @@ const UpdateContactWithLifeCycleStage = async (message, Config) => { let lifeCycleStagesResponse = await httpGET(endPoint, requestOptions, { destType: 'freshmarketer', feature: 'transformation', + endpointPath: `/crm/sales/api/selector/lifecycle_stages`, }); lifeCycleStagesResponse = processAxiosResponse(lifeCycleStagesResponse); if (lifeCycleStagesResponse.status !== 200) { @@ -393,6 +399,7 @@ const UpdateContactWithSalesActivity = async (payload, message, Config) => { let salesActivityResponse = await httpGET(endPoint, requestOptions, { destType: 'freshmarketer', feature: 'transformation', + endpointPath: `/crm/sales/api/selector/sales_activity_types`, }); salesActivityResponse = processAxiosResponse(salesActivityResponse); if (salesActivityResponse.status !== 200) { diff --git a/src/v0/destinations/freshsales/utils.js b/src/v0/destinations/freshsales/utils.js index 96acabb037..5008fedc2d 100644 --- a/src/v0/destinations/freshsales/utils.js +++ b/src/v0/destinations/freshsales/utils.js @@ -47,6 +47,7 @@ const createUpdateAccount = async (payload, Config) => { let accountResponse = await httpPOST(endPoint, payloadBody, requestOptions, { destType: 'freshsales', feature: 'transformation', + endpointPath: `/crm/sales/api/sales_accounts/upsert`, }); accountResponse = processAxiosResponse(accountResponse); if (accountResponse.status !== 200 && accountResponse.status !== 201) { @@ -90,6 +91,7 @@ const getUserAccountDetails = async (payload, userEmail, Config) => { let userSalesAccountResponse = await httpPOST(endPoint, userPayload, requestOptions, { destType: 'freshsales', feature: 'transformation', + endpointPath: `/crm/sales/api/contacts/upsert?include=sales_accounts`, }); userSalesAccountResponse = processAxiosResponse(userSalesAccountResponse); if (userSalesAccountResponse.status !== 200 && userSalesAccountResponse.status !== 201) { @@ -145,6 +147,7 @@ const getContactsDetails = async (userEmail, Config) => { let userResponse = await httpPOST(endPoint, userPayload, requestOptions, { destType: 'freshsales', feature: 'transformation', + endpointPath: `/crm/sales/api/contacts/upsert`, }); userResponse = processAxiosResponse(userResponse); if (userResponse.status !== 200 && userResponse.status !== 201) { @@ -235,6 +238,7 @@ const UpdateContactWithSalesActivity = async (payload, message, Config) => { let salesActivityResponse = await httpGET(endPoint, requestOptions, { destType: 'freshsales', feature: 'transformation', + endpointPath: `/crm/sales/api/sales_activity_types`, }); salesActivityResponse = processAxiosResponse(salesActivityResponse); if (salesActivityResponse.status !== 200) { @@ -314,6 +318,7 @@ const UpdateContactWithLifeCycleStage = async (message, Config) => { let lifeCycleStagesResponse = await httpGET(endPoint, requestOptions, { destType: 'freshsales', feature: 'transformation', + endpointPath: `/crm/sales/api/lifecycle_stages`, }); lifeCycleStagesResponse = processAxiosResponse(lifeCycleStagesResponse); if (lifeCycleStagesResponse.status !== 200) { diff --git a/src/v0/destinations/ga/deleteUsers.js b/src/v0/destinations/ga/deleteUsers.js index bb909a0053..06e674048a 100644 --- a/src/v0/destinations/ga/deleteUsers.js +++ b/src/v0/destinations/ga/deleteUsers.js @@ -80,6 +80,7 @@ const userDeletionHandler = async (userAttributes, config, rudderDestInfo) => { { destType: 'ga', feature: 'deleteUsers', + endpointPath: '/userDeletion/userDeletionRequests:upsert', }, ); // process the response to know about refreshing scenario diff --git a/src/v0/destinations/gainsight_px/data/GainsightPX_Identify.json b/src/v0/destinations/gainsight_px/data/GainsightPX_Identify.json index 5d07b290dc..c37c992d84 100644 --- a/src/v0/destinations/gainsight_px/data/GainsightPX_Identify.json +++ b/src/v0/destinations/gainsight_px/data/GainsightPX_Identify.json @@ -55,12 +55,7 @@ }, { "destKey": "signUpDate", - "sourceKeys": [ - "traits.signUpDate", - "context.traits.signUpDate", - "timestamp", - "originalTimestamp" - ], + "sourceKeys": ["traits.signUpDate", "context.traits.signUpDate"], "required": false, "metadata": { "type": "timestamp" @@ -109,12 +104,7 @@ }, { "destKey": "createDate", - "sourceKeys": [ - "traits.createDate", - "context.traits.createDate", - "timestamp", - "originalTimestamp" - ], + "sourceKeys": ["traits.createDate", "context.traits.createDate"], "required": false, "metadata": { "type": "timestamp" diff --git a/src/v0/destinations/gainsight_px/transform.js b/src/v0/destinations/gainsight_px/transform.js index 4d91980f11..a63be08c80 100644 --- a/src/v0/destinations/gainsight_px/transform.js +++ b/src/v0/destinations/gainsight_px/transform.js @@ -1,5 +1,9 @@ /* eslint-disable no-nested-ternary */ -const { InstrumentationError, ConfigurationError } = require('@rudderstack/integrations-lib'); +const { + InstrumentationError, + ConfigurationError, + formatTimeStamp, +} = require('@rudderstack/integrations-lib'); const { EventType } = require('../../../constants'); const { isEmptyObject, @@ -47,7 +51,7 @@ const identifyResponseBuilder = async (message, { Config }) => { 'Content-Type': JSON_MIME_TYPE, }; - const { success: isPresent } = await objectExists(userId, Config, 'user'); + const { success: isUserPresent } = await objectExists(userId, Config, 'user'); let payload = constructPayload(message, identifyMapping); const name = getValueFromMessage(message, ['traits.name', 'context.traits.name']); @@ -56,6 +60,16 @@ const identifyResponseBuilder = async (message, { Config }) => { payload.firstName = fName; payload.lastName = lName; } + // Only for the case of new user creation, if signUpDate is not provided in traits, timestamp / originalTimestamp is mapped + if (!isUserPresent && !payload.signUpDate) { + payload.signUpDate = formatTimeStamp(message.timestamp || message.originalTimestamp); + } + + // Only for the case of new user creation, if createDate is not provided in traits, timestamp / originalTimestamp is mapped + if (!isUserPresent && !payload.createDate) { + payload.createDate = formatTimeStamp(message.timestamp || message.originalTimestamp); + } + let customAttributes = {}; customAttributes = extractCustomFields( message, @@ -75,7 +89,7 @@ const identifyResponseBuilder = async (message, { Config }) => { type: 'USER', }; - if (isPresent) { + if (isUserPresent) { // update user response.method = defaultPutRequestConfig.requestMethod; response.endpoint = `${ENDPOINTS.USERS_ENDPOINT}/${userId}`; diff --git a/src/v0/destinations/google_adwords_enhanced_conversions/config.js b/src/v0/destinations/google_adwords_enhanced_conversions/config.js index 66d12c34d7..8d194655f7 100644 --- a/src/v0/destinations/google_adwords_enhanced_conversions/config.js +++ b/src/v0/destinations/google_adwords_enhanced_conversions/config.js @@ -1,6 +1,6 @@ const { getMappingConfig } = require('../../util'); -const BASE_ENDPOINT = 'https://googleads.googleapis.com/v14/customers'; +const BASE_ENDPOINT = 'https://googleads.googleapis.com/v15/customers'; const CONFIG_CATEGORIES = { TRACK_CONFIG: { type: 'track', name: 'trackConfig' }, diff --git a/src/v0/destinations/google_adwords_enhanced_conversions/networkHandler.js b/src/v0/destinations/google_adwords_enhanced_conversions/networkHandler.js index 8ac432935f..7266154a09 100644 --- a/src/v0/destinations/google_adwords_enhanced_conversions/networkHandler.js +++ b/src/v0/destinations/google_adwords_enhanced_conversions/networkHandler.js @@ -44,6 +44,7 @@ const getConversionActionId = async (method, headers, params) => { { destType: 'google_adwords_enhanced_conversions', feature: 'proxy', + endpointPath: `/googleAds:searchStream`, }, ); if (!isHttpStatusSuccess(gaecConversionActionIdResponse.status)) { @@ -96,6 +97,7 @@ const ProxyRequest = async (request) => { const { httpResponse: response } = await handleHttpRequest('constructor', requestBody, { destType: 'google_adwords_enhanced_conversions', feature: 'proxy', + endpointPath: `/googleAds:uploadOfflineUserData`, }); return response; }; diff --git a/src/v0/destinations/google_adwords_offline_conversions/networkHandler.js b/src/v0/destinations/google_adwords_offline_conversions/networkHandler.js index a87a2431f2..6922cde8c8 100644 --- a/src/v0/destinations/google_adwords_offline_conversions/networkHandler.js +++ b/src/v0/destinations/google_adwords_offline_conversions/networkHandler.js @@ -33,6 +33,7 @@ const createJob = async (endpoint, headers, payload) => { { destType: 'google_adwords_offline_conversions', feature: 'proxy', + endpointPath: `/create`, }, ); createJobResponse = processAxiosResponse(createJobResponse); @@ -57,6 +58,7 @@ const addConversionToJob = async (endpoint, headers, jobId, payload) => { { destType: 'google_adwords_offline_conversions', feature: 'proxy', + endpointPath: `/addOperations`, }, ); addConversionToJobResponse = processAxiosResponse(addConversionToJobResponse); @@ -80,6 +82,7 @@ const runTheJob = async (endpoint, headers, payload, jobId) => { { destType: 'google_adwords_offline_conversions', feature: 'proxy', + endpointPath: `/run`, }, ); return executeJobResponse; @@ -106,6 +109,7 @@ const getConversionCustomVariable = async (headers, params) => { let searchStreamResponse = await httpPOST(endpoint, data, requestOptions, { destType: 'google_adwords_offline_conversions', feature: 'proxy', + endpointPath: `/searchStream`, }); searchStreamResponse = processAxiosResponse(searchStreamResponse); if (!isHttpStatusSuccess(searchStreamResponse.status)) { @@ -190,9 +194,11 @@ const ProxyRequest = async (request) => { const addPayload = body.JSON.addConversionPayload; // Mapping Conversion Action const conversionId = await getConversionActionId(headers, params); - addPayload.operations.forEach((operation) => { - set(operation, 'create.transaction_attribute.conversion_action', conversionId); - }); + if (Array.isArray(addPayload.operations)) { + addPayload.operations.forEach((operation) => { + set(operation, 'create.transaction_attribute.conversion_action', conversionId); + }); + } await addConversionToJob(endpoint, headers, firstResponse, addPayload); const thirdResponse = await runTheJob( endpoint, @@ -240,6 +246,7 @@ const ProxyRequest = async (request) => { const response = await httpSend(requestBody, { feature: 'proxy', destType: 'gogole_adwords_offline_conversions', + endpointPath: `/proxy`, }); return response; }; diff --git a/src/v0/destinations/google_adwords_offline_conversions/utils.js b/src/v0/destinations/google_adwords_offline_conversions/utils.js index c69c5a436f..599a163c54 100644 --- a/src/v0/destinations/google_adwords_offline_conversions/utils.js +++ b/src/v0/destinations/google_adwords_offline_conversions/utils.js @@ -63,6 +63,7 @@ const getConversionActionId = async (headers, params) => { let searchStreamResponse = await httpPOST(endpoint, data, requestOptions, { destType: 'google_adwords_offline_conversions', feature: 'transformation', + endpointPath: `/googleAds:searchStream`, }); searchStreamResponse = processAxiosResponse(searchStreamResponse); if (!isHttpStatusSuccess(searchStreamResponse.status)) { diff --git a/src/v0/destinations/google_adwords_remarketing_lists/config.js b/src/v0/destinations/google_adwords_remarketing_lists/config.js index 94059c69f1..5bf0d8a299 100644 --- a/src/v0/destinations/google_adwords_remarketing_lists/config.js +++ b/src/v0/destinations/google_adwords_remarketing_lists/config.js @@ -1,6 +1,6 @@ const { getMappingConfig } = require('../../util'); -const BASE_ENDPOINT = 'https://googleads.googleapis.com/v14/customers'; +const BASE_ENDPOINT = 'https://googleads.googleapis.com/v15/customers'; const CONFIG_CATEGORIES = { AUDIENCE_LIST: { type: 'audienceList', name: 'offlineDataJobs' }, ADDRESSINFO: { type: 'addressInfo', name: 'addressInfo' }, diff --git a/src/v0/destinations/google_adwords_remarketing_lists/networkHandler.js b/src/v0/destinations/google_adwords_remarketing_lists/networkHandler.js index 5be8597bdb..bf703ccb1b 100644 --- a/src/v0/destinations/google_adwords_remarketing_lists/networkHandler.js +++ b/src/v0/destinations/google_adwords_remarketing_lists/networkHandler.js @@ -14,18 +14,24 @@ const tags = require('../../util/tags'); * @param listId * @param headers * @param method + * @consentBlock + * ref: https://developers.google.com/google-ads/api/rest/reference/rest/v15/CustomerMatchUserListMetadata */ -const createJob = async (endpoint, customerId, listId, headers, method) => { +const createJob = async (endpoint, headers, method, params) => { const jobCreatingUrl = `${endpoint}:create`; + const customerMatchUserListMetadata = { + userList: `customers/${params.customerId}/userLists/${params.listId}`, + }; + if (Object.keys(params.consent).length > 0) { + customerMatchUserListMetadata.consent = params.consent; + } const jobCreatingRequest = { url: jobCreatingUrl, data: { job: { type: 'CUSTOMER_MATCH_USER_LIST', - customerMatchUserListMetadata: { - userList: `customers/${customerId}/userLists/${listId}`, - }, + customerMatchUserListMetadata, }, }, headers, @@ -34,6 +40,7 @@ const createJob = async (endpoint, customerId, listId, headers, method) => { const response = await httpSend(jobCreatingRequest, { destType: 'google_adwords_remarketing_lists', feature: 'proxy', + endpointPath: '/customers/create', }); return response; }; @@ -57,6 +64,7 @@ const addUserToJob = async (endpoint, headers, method, jobId, body) => { const response = await httpSend(secondRequest, { destType: 'google_adwords_remarketing_lists', feature: 'proxy', + endpointPath: '/addOperations', }); return response; }; @@ -78,6 +86,7 @@ const runTheJob = async (endpoint, headers, method, jobId) => { const response = await httpSend(thirdRequest, { destType: 'google_adwords_remarketing_lists', feature: 'proxy', + endpointPath: '/run', }); return response; }; @@ -91,11 +100,10 @@ const runTheJob = async (endpoint, headers, method, jobId) => { const gaAudienceProxyRequest = async (request) => { const { body, method, params, endpoint } = request; const { headers } = request; - const { customerId, listId } = params; // step1: offlineUserDataJobs creation - const firstResponse = await createJob(endpoint, customerId, listId, headers, method); + const firstResponse = await createJob(endpoint, headers, method, params); if (!firstResponse.success && !isHttpStatusSuccess(firstResponse?.response?.status)) { return firstResponse; } diff --git a/src/v0/destinations/google_adwords_remarketing_lists/transform.js b/src/v0/destinations/google_adwords_remarketing_lists/transform.js index 884fcd71f6..9526973fb8 100644 --- a/src/v0/destinations/google_adwords_remarketing_lists/transform.js +++ b/src/v0/destinations/google_adwords_remarketing_lists/transform.js @@ -15,6 +15,8 @@ const { getAccessToken, } = require('../../util'); +const { populateConsentForGoogleDestinations } = require('../../util/googleUtils'); + const { offlineDataJobsMapping, addressInfoMapping, @@ -43,7 +45,7 @@ const hashEncrypt = (object) => { * @param {*} param2 * @returns */ -const responseBuilder = (metadata, body, { Config }, message) => { +const responseBuilder = (metadata, body, { Config }, message, consentBlock) => { const payload = body; const response = defaultRequestConfig(); const filteredCustomerId = removeHyphens(Config.customerId); @@ -62,7 +64,11 @@ const responseBuilder = (metadata, body, { Config }, message) => { if (!isDefinedAndNotNullAndNotEmpty(operationAudienceId)) { throw new ConfigurationError('List ID is a mandatory field'); } - response.params = { listId: operationAudienceId, customerId: filteredCustomerId }; + response.params = { + listId: operationAudienceId, + customerId: filteredCustomerId, + consent: consentBlock, + }; response.headers = { Authorization: `Bearer ${accessToken}`, 'Content-Type': JSON_MIME_TYPE, @@ -212,7 +218,8 @@ const processEvent = async (metadata, message, destination) => { } Object.values(createdPayload).forEach((data) => { - response.push(responseBuilder(metadata, data, destination, message)); + const consentObj = populateConsentForGoogleDestinations(message.properties); + response.push(responseBuilder(metadata, data, destination, message, consentObj)); }); return response; } diff --git a/src/v0/destinations/hs/util.js b/src/v0/destinations/hs/util.js index f83ce0b6de..5c8f4a908a 100644 --- a/src/v0/destinations/hs/util.js +++ b/src/v0/destinations/hs/util.js @@ -100,6 +100,7 @@ const getProperties = async (destination) => { hubspotPropertyMapResponse = await httpGET(CONTACT_PROPERTY_MAP_ENDPOINT, requestOptions, { destType: 'hs', feature: 'transformation', + endpointPath: `/properties/v1/contacts/properties`, }); hubspotPropertyMapResponse = processAxiosResponse(hubspotPropertyMapResponse); } else { @@ -111,6 +112,7 @@ const getProperties = async (destination) => { { destType: 'hs', feature: 'transformation', + endpointPath: `/properties/v1/contacts/properties?hapikey`, }, ); hubspotPropertyMapResponse = processAxiosResponse(hubspotPropertyMapResponse); diff --git a/src/v0/destinations/intercom/deleteUsers.js b/src/v0/destinations/intercom/deleteUsers.js index e11d352117..085e842458 100644 --- a/src/v0/destinations/intercom/deleteUsers.js +++ b/src/v0/destinations/intercom/deleteUsers.js @@ -38,6 +38,7 @@ const userDeletionHandler = async (userAttributes, config) => { const resp = await httpPOST(url, data, requestOptions, { destType: 'intercom', feature: 'deleteUsers', + endpointPath: '/user_delete_requests', }); const handledDelResponse = processAxiosResponse(resp); if (!isHttpStatusSuccess(handledDelResponse.status) && handledDelResponse.status !== 404) { diff --git a/src/v0/destinations/marketo/util.js b/src/v0/destinations/marketo/util.js index 203e0bf859..54ff70708a 100644 --- a/src/v0/destinations/marketo/util.js +++ b/src/v0/destinations/marketo/util.js @@ -247,6 +247,7 @@ const sendGetRequest = async (url, options) => { const clientResponse = await httpGET(url, options, { destType: 'marketo', feature: 'transformation', + endpointPath: `/v1/leads`, }); const processedResponse = processAxiosResponse(clientResponse); return processedResponse; @@ -262,6 +263,7 @@ const sendPostRequest = async (url, data, options) => { const clientResponse = await httpPOST(url, data, options, { destType: 'marketo', feature: 'transformation', + endpointPath: `/v1/leads`, }); const processedResponse = processAxiosResponse(clientResponse); return processedResponse; diff --git a/src/v0/destinations/monday/util.js b/src/v0/destinations/monday/util.js index a66dd63dff..736f0133fd 100644 --- a/src/v0/destinations/monday/util.js +++ b/src/v0/destinations/monday/util.js @@ -194,6 +194,7 @@ const getBoardDetails = async (url, boardID, apiToken) => { { destType: 'monday', feature: 'transformation', + endpointPath: '/v2', }, ); const boardDetailsResponse = processAxiosResponse(clientResponse); diff --git a/src/v0/destinations/sprig/deleteUsers.js b/src/v0/destinations/sprig/deleteUsers.js new file mode 100644 index 0000000000..a886bbbafc --- /dev/null +++ b/src/v0/destinations/sprig/deleteUsers.js @@ -0,0 +1,79 @@ +const { NetworkError, ConfigurationError } = require('@rudderstack/integrations-lib'); +const { httpPOST } = require('../../../adapters/network'); +const { + processAxiosResponse, + getDynamicErrorType, +} = require('../../../adapters/utils/networkUtils'); +const { isHttpStatusSuccess } = require('../../util'); +const { executeCommonValidations } = require('../../util/regulation-api'); +const tags = require('../../util/tags'); +const { getUserIdBatches } = require('../../util/deleteUserUtils'); +const { JSON_MIME_TYPE } = require('../../util/constant'); + +/** + * This function will help to delete the users one by one from the userAttributes array. + * @param {*} userAttributes Array of objects with userId, email and phone + * @param {*} config Destination.Config provided in dashboard + * @returns + */ +const userDeletionHandler = async (userAttributes, config) => { + const { apiKey } = config; + + if (!apiKey) { + throw new ConfigurationError('Api Key is required for user deletion'); + } + + const endpoint = 'https://api.sprig.com/v2/purge/visitors'; + const headers = { + Accept: JSON_MIME_TYPE, + 'Content-Type': JSON_MIME_TYPE, + Authorization: `API-Key ${apiKey}`, + }; + /** + * userIdBatches = [[u1,u2,u3,...batchSize],[u1,u2,u3,...batchSize]...] + * Ref doc : https://docs.sprig.com/reference/post-v2-purge-visitors-1 + */ + const userIdBatches = getUserIdBatches(userAttributes, 100); + // Note: we will only get 400 status code when no user deletion is present for given userIds so we will not throw error in that case + // eslint-disable-next-line no-restricted-syntax + for (const curBatch of userIdBatches) { + // eslint-disable-next-line no-await-in-loop + const deletionResponse = await httpPOST( + endpoint, + { + userIds: curBatch, + }, + { + headers, + }, + { + destType: 'sprig', + feature: 'deleteUsers', + endpointPath: 'api.sprig.com/v2/purge/visitors', + }, + ); + const handledDelResponse = processAxiosResponse(deletionResponse); + if (!isHttpStatusSuccess(handledDelResponse.status) && handledDelResponse.status !== 400) { + throw new NetworkError( + 'User deletion request failed', + handledDelResponse.status, + { + [tags.TAG_NAMES.ERROR_TYPE]: getDynamicErrorType(handledDelResponse.status), + }, + handledDelResponse, + ); + } + } + + return { + statusCode: 200, + status: 'successful', + }; +}; +const processDeleteUsers = async (event) => { + const { userAttributes, config } = event; + executeCommonValidations(userAttributes); + const resp = await userDeletionHandler(userAttributes, config); + return resp; +}; +module.exports = { processDeleteUsers }; diff --git a/src/v0/destinations/the_trade_desk/networkHandler.js b/src/v0/destinations/the_trade_desk/networkHandler.js new file mode 100644 index 0000000000..ca5ac68be8 --- /dev/null +++ b/src/v0/destinations/the_trade_desk/networkHandler.js @@ -0,0 +1,86 @@ +const { NetworkError, AbortedError, PlatformError } = require('@rudderstack/integrations-lib'); +const { httpSend, prepareProxyRequest } = require('../../../adapters/network'); +const { + processAxiosResponse, + getDynamicErrorType, +} = require('../../../adapters/utils/networkUtils'); +const { getSignatureHeader } = require('../../../cdk/v2/destinations/the_trade_desk/utils'); +const { isHttpStatusSuccess } = require('../../util/index'); +const tags = require('../../util/tags'); +const { JSON_MIME_TYPE } = require('../../util/constant'); + +const proxyRequest = async (request) => { + const { endpoint, data, method, params, headers, config } = prepareProxyRequest(request); + + if (!config?.advertiserSecretKey) { + throw new PlatformError('Advertiser secret key is missing in destination config. Aborting'); + } + + if (!process.env.THE_TRADE_DESK_DATA_PROVIDER_SECRET_KEY) { + throw new PlatformError('Data provider secret key is missing. Aborting'); + } + + const ProxyHeaders = { + ...headers, + TtdSignature: getSignatureHeader(data, config.advertiserSecretKey), + 'TtdSignature-dp': getSignatureHeader( + data, + process.env.THE_TRADE_DESK_DATA_PROVIDER_SECRET_KEY, + ), + 'Content-Type': JSON_MIME_TYPE, + }; + + const requestOptions = { + url: endpoint, + data, + params, + headers: ProxyHeaders, + method, + }; + const response = await httpSend(requestOptions, { feature: 'proxy', destType: 'the_trade_desk' }); + return response; +}; + +const responseHandler = (destinationResponse) => { + const message = 'Request Processed Successfully'; + const { response, status } = destinationResponse; + + // if the response from destination is not a success case build an explicit error + if (!isHttpStatusSuccess(status)) { + throw new NetworkError( + `Request failed with status: ${status} due to ${response}`, + status, + { + [tags.TAG_NAMES.ERROR_TYPE]: getDynamicErrorType(status), + }, + destinationResponse, + ); + } + + // Trade desk returns 200 with an error in case of "Failed to parse TDID, DAID, UID2, IDL, EUID, or failed to decrypt UID2Token or EUIDToken" + // https://partner.thetradedesk.com/v3/portal/data/doc/post-data-advertiser-external + // {"FailedLines":[{"ErrorCode":"MissingUserId","Message":"Invalid DAID, item #1"}]} + if ('FailedLines' in response && response.FailedLines.length > 0) { + throw new AbortedError( + `Request failed with status: ${status} due to ${JSON.stringify(response)}`, + 400, + destinationResponse, + ); + } + + // else successfully return status, message and original destination response + // Trade desk returns 200 with empty object '{}' in response if all the events are processed successfully + return { + status, + message, + destinationResponse, + }; +}; + +function networkHandler() { + this.proxy = proxyRequest; + this.processAxiosResponse = processAxiosResponse; + this.prepareProxy = prepareProxyRequest; + this.responseHandler = responseHandler; +} +module.exports = { networkHandler }; diff --git a/src/v0/destinations/user/utils.js b/src/v0/destinations/user/utils.js index 41ad173583..52fba2167e 100644 --- a/src/v0/destinations/user/utils.js +++ b/src/v0/destinations/user/utils.js @@ -237,6 +237,7 @@ const createCompany = async (message, destination) => { const response = await httpPOST(endpoint, payload, requestOptions, { destType: 'user', feature: 'transformation', + endpointPath: `/companies/`, }); const data = processAxiosResponse(response); return data.response; @@ -277,6 +278,7 @@ const updateCompany = async (message, destination, company) => { const response = await httpPUT(endpoint, payload, requestOptions, { destType: 'user', feature: 'transformation', + endpointPath: `/companies/`, }); const data = processAxiosResponse(response); return data.response; @@ -303,6 +305,7 @@ const getUserByUserKey = async (apiKey, userKey, appSubdomain) => { const userResponse = await httpGET(endpoint, requestOptions, { destType: 'user', feature: 'transformation', + endpointPath: `/users/search`, }); const processedUserResponse = processAxiosResponse(userResponse); if (processedUserResponse.status === 200) { @@ -336,6 +339,7 @@ const getUserByEmail = async (apiKey, email, appSubdomain) => { const userResponse = await httpGET(endpoint, requestOptions, { destType: 'user', feature: 'transformation', + endpointPath: `/users/search/?email`, }); const processedUserResponse = processAxiosResponse(userResponse); @@ -374,6 +378,7 @@ const getUserByPhoneNumber = async (apiKey, phoneNumber, appSubdomain) => { const userResponse = await httpGET(endpoint, requestOptions, { destType: 'user', feature: 'transformation', + endpointPath: `/users/search/?phone_number`, }); const processedUserResponse = processAxiosResponse(userResponse); @@ -418,6 +423,7 @@ const getUserByCustomId = async (message, destination) => { const userResponse = await httpGET(endpoint, requestOptions, { destType: 'user', feature: 'transformation', + endpointPath: `/users-by-id/`, }); const processedUserResponse = processAxiosResponse(userResponse); @@ -453,6 +459,7 @@ const getCompanyByCustomId = async (message, destination) => { const response = await httpGET(endpoint, requestOptions, { destType: 'user', feature: 'transformation', + endpointPath: `/companies-by-id/`, }); const processedUserResponse = processAxiosResponse(response); if (processedUserResponse.status === 200) { diff --git a/src/v0/destinations/wootric/util.js b/src/v0/destinations/wootric/util.js index fce8a66586..eb61a472cf 100644 --- a/src/v0/destinations/wootric/util.js +++ b/src/v0/destinations/wootric/util.js @@ -46,6 +46,7 @@ const getAccessToken = async (destination) => { const wootricAuthResponse = await httpPOST(request.url, request.data, request.header, { destType: 'wootric', feature: 'transformation', + endpointPath: `/oauth/token`, }); const processedAuthResponse = processAxiosResponse(wootricAuthResponse); // If the request fails, throwing error. @@ -98,6 +99,7 @@ const retrieveUserDetails = async (endUserId, externalId, accessToken) => { const userResponse = await httpGET(endpoint, requestOptions, { destType: 'wootric', feature: 'transformation', + endpointPath: `/v1/end_users/`, }); const processedUserResponse = processAxiosResponse(userResponse); diff --git a/src/v0/util/googleUtils/index.js b/src/v0/util/googleUtils/index.js new file mode 100644 index 0000000000..c8d872e90e --- /dev/null +++ b/src/v0/util/googleUtils/index.js @@ -0,0 +1,30 @@ +const GOOGLE_ALLOWED_CONSENT_STATUS = ['UNSPECIFIED', 'UNKNOWN', 'GRANTED', 'DENIED']; + +/** + * Populates the consent object based on the provided properties. + * + * @param {object} properties - message.properties containing properties related to consent. + * @returns {object} - An object containing consent information. + * ref : https://developers.google.com/google-ads/api/rest/reference/rest/v15/Consent + */ + +const populateConsentForGoogleDestinations = (properties) => { + const consent = {}; + + if ( + properties?.userDataConsent && + GOOGLE_ALLOWED_CONSENT_STATUS.includes(properties.userDataConsent) + ) { + consent.adUserData = properties.userDataConsent; + } + + if ( + properties?.personalizationConsent && + GOOGLE_ALLOWED_CONSENT_STATUS.includes(properties.personalizationConsent) + ) { + consent.adPersonalization = properties.personalizationConsent; + } + return consent; +}; + +module.exports = { populateConsentForGoogleDestinations }; diff --git a/src/v0/util/googleUtils/index.test.js b/src/v0/util/googleUtils/index.test.js new file mode 100644 index 0000000000..27eff2a793 --- /dev/null +++ b/src/v0/util/googleUtils/index.test.js @@ -0,0 +1,50 @@ +const { populateConsentForGoogleDestinations } = require('./index'); + +describe('unit test for populateConsentForGoogleDestinations', () => { + // Returns an empty object when no properties are provided. + it('should return an empty object when no properties are provided', () => { + const result = populateConsentForGoogleDestinations({}); + expect(result).toEqual({}); + }); + + // Sets adUserData property of consent object when userDataConsent property is provided and its value is one of the allowed consent statuses. + it('should set adUserData property of consent object when userDataConsent property is provided and its value is one of the allowed consent statuses', () => { + const properties = { userDataConsent: 'GRANTED' }; + const result = populateConsentForGoogleDestinations(properties); + expect(result).toEqual({ adUserData: 'GRANTED' }); + }); + + // Sets adPersonalization property of consent object when personalizationConsent property is provided and its value is one of the allowed consent statuses. + it('should set adPersonalization property of consent object when personalizationConsent property is provided and its value is one of the allowed consent statuses', () => { + const properties = { personalizationConsent: 'DENIED' }; + const result = populateConsentForGoogleDestinations(properties); + expect(result).toEqual({ adPersonalization: 'DENIED' }); + }); + + // Returns an empty object when properties parameter is not provided. + it('should return an empty object when properties parameter is not provided', () => { + const result = populateConsentForGoogleDestinations(); + expect(result).toEqual({}); + }); + + // Returns an empty object when properties parameter is null. + it('should return an empty object when properties parameter is null', () => { + const result = populateConsentForGoogleDestinations(null); + expect(result).toEqual({}); + }); + + // Returns an empty object when properties parameter is an empty object. + it('should return an empty object when properties parameter is an empty object', () => { + const result = populateConsentForGoogleDestinations({}); + expect(result).toEqual({}); + }); + + // Returns an empty object when properties parameter is an empty object. + it('should return an empty object when properties parameter contains adUserData and adPersonalization with non-allowed values', () => { + const result = populateConsentForGoogleDestinations({ + adUserData: 'RANDOM', + personalizationConsent: 'RANDOM', + }); + expect(result).toEqual({}); + }); +}); diff --git a/src/warehouse/config/helpers.js b/src/warehouse/config/helpers.js index ecc7d382b9..ef00d7ee73 100644 --- a/src/warehouse/config/helpers.js +++ b/src/warehouse/config/helpers.js @@ -1,12 +1,18 @@ const _ = require('lodash'); const get = require('get-value'); +const logger = require('../../logger'); const isNull = (x) => { return x === null || x === undefined; }; const isBlank = (value) => { - return _.isEmpty(_.toString(value)); + try { + return _.isEmpty(_.toString(value)); + } catch (e) { + logger.error(`Error in isBlank: ${e.message}`); + return false; + } }; const getFirstValidValue = (message, props) => { @@ -27,6 +33,7 @@ function isDataLakeProvider(provider) { module.exports = { isNull, + isBlank, getFirstValidValue, isDataLakeProvider, }; diff --git a/src/warehouse/index.js b/src/warehouse/index.js index d88904b4a8..3305a52762 100644 --- a/src/warehouse/index.js +++ b/src/warehouse/index.js @@ -5,7 +5,6 @@ const { v4: uuidv4 } = require('uuid'); const { isObject, - isBlank, isValidJsonPathKey, isValidLegacyJsonPathKey, keysFromJsonPaths, @@ -24,7 +23,7 @@ const whPageColumnMappingRules = require('./config/WHPageConfig.js'); const whScreenColumnMappingRules = require('./config/WHScreenConfig.js'); const whGroupColumnMappingRules = require('./config/WHGroupConfig.js'); const whAliasColumnMappingRules = require('./config/WHAliasConfig.js'); -const { isDataLakeProvider } = require('./config/helpers'); +const {isDataLakeProvider, isBlank} = require('./config/helpers'); const { InstrumentationError } = require('@rudderstack/integrations-lib'); const whExtractEventTableColumnMappingRules = require('./config/WHExtractEventTableConfig.js'); diff --git a/src/warehouse/util.js b/src/warehouse/util.js index 79981249e7..11d72bfbfd 100644 --- a/src/warehouse/util.js +++ b/src/warehouse/util.js @@ -4,6 +4,7 @@ const get = require('get-value'); const v0 = require('./v0/util'); const v1 = require('./v1/util'); const { PlatformError, InstrumentationError } = require('@rudderstack/integrations-lib'); +const {isBlank} = require('./config/helpers'); const minTimeInMs = Date.parse('0001-01-01T00:00:00Z'); const maxTimeInMs = Date.parse('9999-12-31T23:59:59.999Z'); @@ -22,10 +23,6 @@ const isValidLegacyJsonPathKey = (eventType, key, level, jsonKeys = {}) => { return eventType === 'track' && jsonKeys[key] === level; }; -const isBlank = (value) => { - return _.isEmpty(_.toString(value)); -}; - /* This function takes in an array of json paths and returns an object with keys as the json path and value as the position of the key in the json path Example: @@ -97,6 +94,9 @@ const timestampRegex = new RegExp( ); function validTimestamp(input) { + if (typeof input !== 'string') { + return false; + } if (timestampRegex.test(input)) { // check if date value lies in between min time and max time. if not then it's not a valid timestamp const d = new Date(input); @@ -147,7 +147,6 @@ const getRecordIDForExtract = (message) => { module.exports = { isObject, - isBlank, isValidJsonPathKey, isValidLegacyJsonPathKey, keysFromJsonPaths, diff --git a/test/__mocks__/axios.js b/test/__mocks__/axios.js index 6a3139c4e9..44abc8728d 100644 --- a/test/__mocks__/axios.js +++ b/test/__mocks__/axios.js @@ -3,55 +3,23 @@ /// ///////////////////////////////////////////////////////////////////////////// const axios = jest.genMockFromModule("axios"); const acPostRequestHandler = require("./active_campaign.mock"); -const { - klaviyoPostRequestHandler, - klaviyoGetRequestHandler -} = require("./klaviyo.mock"); -const kustomerGetRequestHandler = require("./kustomer.mock"); const trengoGetRequestHandler = require("./trengo.mock"); -const gainsightRequestHandler = require("./gainsight.mock"); -const mailchimpGetRequestHandler = require("./mailchimp.mock"); const yahooDspPostRequestHandler = require("./yahoo_dsp.mock"); -const { gainsightPXGetRequestHandler } = require("./gainsight_px.mock"); -const { hsGetRequestHandler, hsPostRequestHandler } = require("./hs.mock"); -const { delightedGetRequestHandler } = require("./delighted.mock"); -const { dripPostRequestHandler } = require("./drip.mock"); -const profitwellGetRequestHandler = require("./profitwell.mock"); const cannyPostRequestHandler = require("./canny.mock"); -const custifyPostRequestHandler = require("./custify.mock"); -const { - wootricGetRequestHandler, - wootricPostRequestHandler -} = require("./wootric.mock"); const { userGetRequestHandler, userPutRequestHandler } = require("./user.mock"); const { mixpanelPostRequestHandler } = require("./mixpanel.mock"); -const { clickUpGetRequestHandler } = require("./clickup.mock"); -const { - freshmarketerPostRequestHandler, - freshmarketerGetRequestHandler -} = require("./freshmarketer.mock"); -const { mondayPostRequestHandler } = require("./monday.mock"); -const { - freshsalesGetRequestHandler, - freshsalesPostRequestHandler -} = require("./freshsales.mock"); const { sendgridGetRequestHandler } = require("./sendgrid.mock"); -const { sendinblueGetRequestHandler } = require("./sendinblue.mock"); const { courierGetRequestHandler } = require("./courier.mock"); const { brazePostRequestHandler } = require("./braze.mock"); const urlDirectoryMap = { - "api.hubapi.com": "hs", "zendesk.com": "zendesk", "salesforce.com": "salesforce", "mktorest.com": "marketo", "active.campaigns.rudder.com": "active_campaigns", - "api.aptrinsic.com": "gainsight_px", - "api.profitwell.com": "profitwell", "ruddertest2.mautic.net": "mautic", "api.sendgrid.com": "sendgrid", - "api.sendinblue.com": "sendinblue", "api.criteo.com": "criteo_audience", "api.courier.com": "courier", }; @@ -59,14 +27,6 @@ const urlDirectoryMap = { const fs = require("fs"); const path = require("path"); -const getParamEncodedUrl = (url, options) => { - const { params } = options; - const paramString = Object.keys(params) - .map(key => `${key}=${params[key]}`) - .join("&"); - return `${url}?${paramString}`; -}; - function getData(url) { let directory = ""; Object.keys(urlDirectoryMap).forEach(key => { @@ -86,75 +46,19 @@ function getData(url) { function get(url, options) { const mockData = getData(url); - if (url.includes("https://api.kustomerapp.com") || url.includes("https://api.prod2.kustomerapp.com")) { - return new Promise((resolve, reject) => { - resolve(kustomerGetRequestHandler(url)); - }); - } if (url.includes("https://app.trengo.com")) { return new Promise((resolve, reject) => { resolve(trengoGetRequestHandler(url)); }); } - if (url.includes("api.mailchimp.com")) { - return new Promise((resolve, reject) => { - resolve(mailchimpGetRequestHandler(url)); - }); - } - if (url.includes("https://api.aptrinsic.com")) { - return gainsightPXGetRequestHandler(url, mockData); - } - if (url.includes("https://a.klaviyo.com/api/v2/people/search")) { - return klaviyoGetRequestHandler(getParamEncodedUrl(url, options)); - } - if (url.includes("https://api.hubapi.com")) { - return hsGetRequestHandler(url, mockData); - } - if (url.includes("https://api.delighted.com/v1/people.json")) { - return delightedGetRequestHandler(options); - } - if (url.includes("https://api.profitwell.com")) { - return profitwellGetRequestHandler(url, mockData); - } - if ( - url.includes( - "https://api.getdrip.com/v2/1809802/subscribers/identified_user@gmail.com" - ) - ) { - return Promise.resolve({ status: 200 }); - } - if ( - url.includes( - "https://api.getdrip.com/v2/1809802/subscribers/unidentified_user@gmail.com" - ) - ) { - return Promise.reject({ status: 404 }); - } - if (url.includes("https://api.wootric.com")) { - return new Promise((resolve, reject) => { - resolve(wootricGetRequestHandler(url)); - }); - } if (url.includes("https://commander.user.com")) { return new Promise((resolve, reject) => { resolve(userGetRequestHandler(url)); }); } - if (url.includes("https://api.clickup.com")) { - return Promise.resolve(clickUpGetRequestHandler(url)); - } - if (url.includes("https://domain-rudder.myfreshworks.com/crm/sales/api")) { - return Promise.resolve(freshmarketerGetRequestHandler(url)); - } - if (url.includes("https://domain-rudder.myfreshworks.com/crm/sales/api")) { - return Promise.resolve(freshsalesGetRequestHandler(url)); - } if (url.includes("https://api.sendgrid.com/v3/marketing/field_definitions")) { return Promise.resolve(sendgridGetRequestHandler(url)); } - if (url.includes("https://api.sendinblue.com/v3/contacts/")) { - return Promise.resolve(sendinblueGetRequestHandler(url, mockData)); - } if (url.includes("https://api.courier.com")) { return Promise.resolve(courierGetRequestHandler(url, mockData)); } @@ -183,16 +87,6 @@ function post(url, payload) { resolve(brazePostRequestHandler(url, payload)); }); } - if (url.includes("https://a.klaviyo.com")) { - return new Promise((resolve, reject) => { - resolve(klaviyoPostRequestHandler(url, payload)); - }); - } - if (url.includes("https://demo-domain.gainsightcloud.com")) { - return new Promise(resolve => { - resolve(gainsightRequestHandler(url, payload)); - }); - } if (url.includes("https://api.aptrinsic.com")) { return new Promise(resolve => { resolve({ status: 201 }); @@ -203,22 +97,11 @@ function post(url, payload) { resolve(yahooDspPostRequestHandler(url, payload)); }); } - if (url.includes("https://api.getdrip.com/v2/1809802/subscribers")) { - return dripPostRequestHandler(url, payload); - } if (url.includes("https://canny.io/api/v1/users/retrieve")) { return new Promise((resolve, reject) => { resolve(cannyPostRequestHandler(url)); }); } - if (url.includes("https://api.hubapi.com")) { - return hsPostRequestHandler(payload, mockData); - } - if (url.includes("https://api.wootric.com")) { - return new Promise((resolve, reject) => { - resolve(wootricPostRequestHandler(url, payload)); - }); - } if ( url.includes("https://api.mixpanel.com/engage/") || url.includes("https://api-eu.mixpanel.com/engage/") @@ -227,27 +110,11 @@ function post(url, payload) { resolve(mixpanelPostRequestHandler(url, payload)); }); } - if (url.includes("https://domain-rudder.myfreshworks.com/crm/sales/api")) { - return new Promise((resolve, reject) => { - resolve(freshmarketerPostRequestHandler(url)); - }); - } - if (url.includes("https://domain-rudder.myfreshworks.com/crm/sales/api")) { - return new Promise((resolve, reject) => { - resolve(freshsalesPostRequestHandler(url)); - }); - } - if ( - url.includes("https://api.monday.com") && - payload.query.includes("query") - ) { + if(url.includes("braze.com")) { return new Promise((resolve, reject) => { - resolve(mondayPostRequestHandler(payload)); + resolve(brazePostRequestHandler(url, payload)); }); } - if (url.includes("https://api.custify.com")) { - return Promise.resolve(custifyPostRequestHandler(url)); - } return new Promise((resolve, reject) => { if (mockData) { resolve({ data: mockData, status: 200 }); @@ -259,13 +126,6 @@ function post(url, payload) { function put(url, payload, options) { const mockData = getData(url); - if (url.includes("https://demo-domain.gainsightcloud.com")) { - return new Promise(resolve => { - resolve( - gainsightRequestHandler(getParamEncodedUrl(url, options), payload) - ); - }); - } if (url.includes("https://commander.user.com")) { return new Promise((resolve, reject) => { resolve(userPutRequestHandler(url)); diff --git a/test/__mocks__/braze.mock.js b/test/__mocks__/braze.mock.js index 7f63caf184..65f237d448 100644 --- a/test/__mocks__/braze.mock.js +++ b/test/__mocks__/braze.mock.js @@ -26,4 +26,4 @@ const brazePostRequestHandler = (url, payload) => { } }; -module.exports = { brazePostRequestHandler }; +module.exports = { brazePostRequestHandler }; \ No newline at end of file diff --git a/test/__mocks__/clickup.mock.js b/test/__mocks__/clickup.mock.js deleted file mode 100644 index beb73505f6..0000000000 --- a/test/__mocks__/clickup.mock.js +++ /dev/null @@ -1,36 +0,0 @@ -const fs = require("fs"); -const path = require("path"); - -const urlDirectoryMap = { - "api.clickup.com": "clickup" -}; - -const getData = url => { - let directory = ""; - Object.keys(urlDirectoryMap).forEach(key => { - if (url.includes(key)) { - directory = urlDirectoryMap[key]; - } - }); - if (directory) { - const dataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${directory}/response.json`) - ); - const data = JSON.parse(dataFile); - return data[url]; - } - return {}; -}; - -const clickUpGetRequestHandler = url => { - const mockData = getData(url); - if (mockData) { - return { data: mockData, status: 200 }; - } - - return Promise.resolve({ error: "Request failed", status: 404 }); -}; - -module.exports = { - clickUpGetRequestHandler -}; diff --git a/test/__mocks__/custify.mock.js b/test/__mocks__/custify.mock.js deleted file mode 100644 index 4d94207d57..0000000000 --- a/test/__mocks__/custify.mock.js +++ /dev/null @@ -1,36 +0,0 @@ -const fs = require("fs"); -const path = require("path"); - -const urlDirectoryMap = { - "api.custify.com": "custify" -}; - -const getData = url => { - let directory = ""; - Object.keys(urlDirectoryMap).forEach(key => { - if (url.includes(key)) { - directory = urlDirectoryMap[key]; - } - }); - if (directory) { - const dataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${directory}/response.json`) - ); - const data = JSON.parse(dataFile); - return data[url]; - } - return {}; -}; - -const custifyPostRequestHandler = url => { - const mockData = getData(url); - if (mockData) { - // resolve with status 200 - return { data: mockData, status: 201 }; - } - return new Promise((resolve, reject) => { - resolve({ error: "Request failed", status: 500 }); - }); -}; - -module.exports = custifyPostRequestHandler; diff --git a/test/__mocks__/data/clickup/response.json b/test/__mocks__/data/clickup/response.json deleted file mode 100644 index 7fbba92ce4..0000000000 --- a/test/__mocks__/data/clickup/response.json +++ /dev/null @@ -1,229 +0,0 @@ -{ - "https://api.clickup.com/api/v2/list/correctListId123/field": { - "fields": [ - { - "id": "19d3ac4e-2b1e-4569-b33e-ff86c7d94d6e", - "name": "Labels", - "type": "labels", - "type_config": { - "options": [ - { - "id": "32c81c1c-cf53-4829-92f5-0f0270d27a45", - "label": "Option 1", - "color": {} - }, - { - "id": "7e24f329-9dd9-4e68-b426-2c70af6f9347", - "label": "Option 2", - "color": {} - } - ] - }, - "date_created": "1661964865880", - "hide_from_guests": false, - "required": false - }, - { - "id": "22eaffee-ffec-4c3b-bdae-56e69d55eecd", - "name": "Payment Status", - "type": "drop_down", - "type_config": { - "default": 0, - "placeholder": {}, - "new_drop_down": true, - "options": [ - { - "id": "e109e36b-a052-4a31-af16-25da7324990f", - "name": "Sent Request", - "color": "#FF7FAB", - "orderindex": 0 - }, - { - "id": "3a3b4512-2896-44f7-8075-2ff37777fe24", - "name": "Quote sent", - "color": "#EA80FC", - "orderindex": 1 - }, - { - "id": "7afcb6fb-cec8-41d8-bf0c-039a9db28460", - "name": "Pending", - "color": "#ff7800", - "orderindex": 2 - }, - { - "id": "890ecf28-bdd4-4f53-92cc-bc4edb696fcd", - "name": "Payment Recieved", - "color": "#2ecd6f", - "orderindex": 3 - }, - { - "id": "e89f7dd7-fd24-4b32-ac4d-f174d8ca914f", - "name": "n/a", - "color": "#b5bcc2", - "orderindex": 4 - } - ] - }, - "date_created": "1660124553414", - "hide_from_guests": false, - "required": {} - }, - { - "id": "4b7a29be-e261-4340-8f3f-e6de838473e5", - "name": "Plan", - "type": "drop_down", - "type_config": { - "default": 0, - "placeholder": {}, - "new_drop_down": true, - "options": [ - { - "id": "4b9366a7-2592-4b7a-909a-ed4af705e27c", - "name": "Unlimited", - "color": "#02BCD4", - "orderindex": 0 - }, - { - "id": "c5032049-8c05-44e9-a000-3a071d457b8f", - "name": "Business", - "color": "#1bbc9c", - "orderindex": 1 - }, - { - "id": "9fb08801-1130-4650-8e2e-28578344ff3c", - "name": "Enterprise", - "color": "#2ecd6f", - "orderindex": 2 - } - ] - }, - "date_created": "1660124553414", - "hide_from_guests": false, - "required": {} - }, - { - "id": "4bfebc00-9d4a-40d1-aef8-5a87b610186c", - "name": "Contact Title", - "type": "text", - "type_config": {}, - "date_created": "1660124553414", - "hide_from_guests": false, - "required": {} - }, - { - "id": "666f74bf-6d87-41f3-8735-ccf0efe066dd", - "name": "Date", - "type": "date", - "type_config": {}, - "date_created": "1662379321069", - "hide_from_guests": false, - "required": false - }, - { - "id": "a5f5044a-cbad-4caf-bcbb-4cd32bd8db7c", - "name": "Industry", - "type": "drop_down", - "type_config": { - "default": 0, - "placeholder": {}, - "options": [ - { - "id": "75173398-257f-42b6-8bae-4cf767fa99ab", - "name": "Engineering", - "color": "#04A9F4", - "orderindex": 0 - }, - { - "id": "c7f9b6f5-cd98-4609-af10-68a8710cc1bf", - "name": "Retail", - "color": "#ff7800", - "orderindex": 1 - }, - { - "id": "dbe84940-b4e8-4a29-8491-e1aa5f2be4e2", - "name": "Hospitality", - "color": "#2ecd6f", - "orderindex": 2 - } - ] - }, - "date_created": "1660124553414", - "hide_from_guests": false, - "required": {} - }, - { - "id": "b01b32fd-94d3-43e6-9f31-2c855ff169cd", - "name": "Url", - "type": "url", - "type_config": {}, - "date_created": "1661970432587", - "hide_from_guests": false, - "required": false - }, - { - "id": "c9b83d91-b979-4b34-b4bd-88bf9cf2b9a6", - "name": "Phone Number", - "type": "phone", - "type_config": {}, - "date_created": "1661970795061", - "hide_from_guests": false, - "required": false - }, - { - "id": "d0201829-ddcd-4b97-b71f-0f9e672488f2", - "name": "Account Size", - "type": "number", - "type_config": {}, - "date_created": "1660124553414", - "hide_from_guests": false, - "required": {} - }, - { - "id": "ea6c1e48-2abf-4328-b228-79c213e147c8", - "name": "Location", - "type": "location", - "type_config": {}, - "date_created": "1662229589329", - "hide_from_guests": false, - "required": false - }, - { - "id": "ebe825fb-92de-41ce-a29c-25018da039b4", - "name": "Email", - "type": "email", - "type_config": {}, - "date_created": "1660124553414", - "hide_from_guests": false, - "required": {} - }, - { - "id": "f431cda3-a575-4a05-ba8d-583d9b6cb2df", - "name": "Rating", - "type": "emoji", - "type_config": { - "count": 5, - "code_point": "2b50" - }, - "date_created": "1661963909454", - "hide_from_guests": false, - "required": false - }, - { - "id": "ffbe4f03-cbc3-4077-8fea-9e5d08b4dceb", - "name": "Money In INR", - "type": "currency", - "type_config": { - "default": {}, - "precision": 2, - "currency_type": "INR" - }, - "date_created": "1661428276019", - "hide_from_guests": false, - "required": false - } - ] - }, - "https://api.clickup.com/api/v2/list/correctListId456/field": { - "fields": [] - } -} diff --git a/test/__mocks__/data/custify/response.json b/test/__mocks__/data/custify/response.json deleted file mode 100644 index 86d85026d1..0000000000 --- a/test/__mocks__/data/custify/response.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "https://api.custify.com/company": { - "company_id": "6", - "name": "Pizzeria Presto", - "signed_up_at": "2019-05-30T12:00:00.000Z", - "size": 15, - "website": "www.pizzeriapresto.com", - "industry": "Restaurant", - "plan": "Platinum", - "monthly_revenue": 1234567, - "churned": false, - "owners_csm": "john.doe@mail.com", - "owners_account": "john.doe@mail.com", - "parent_companies": [ - { - "id": "5ec50c9829d3c17c7cf455f2" - }, - { - "id": "5ec50c9829d3c17c7cf457f2" - } - ], - "custom_attributes": { - "restaurants": 5, - "custom": "template" - } - } -} diff --git a/test/__mocks__/data/freshmarketer/response.json b/test/__mocks__/data/freshmarketer/response.json deleted file mode 100644 index 3b0d0af192..0000000000 --- a/test/__mocks__/data/freshmarketer/response.json +++ /dev/null @@ -1,430 +0,0 @@ -{ - "https://domain-rudder.myfreshworks.com/crm/sales/api/sales_accounts/upsert": { - "sales_account": { - "id": 70003771396, - "name": "postman2.0", - "address": "Red Colony", - "city": "Pune", - "state": "Goa", - "zipcode": null, - "country": null, - "number_of_employees": 11, - "annual_revenue": 1000, - "website": null, - "owner_id": null, - "phone": "919191919191", - "open_deals_amount": null, - "open_deals_count": null, - "won_deals_amount": null, - "won_deals_count": null, - "last_contacted": null, - "last_contacted_mode": null, - "facebook": null, - "twitter": null, - "linkedin": null, - "links": { - "conversations": "/crm/sales/sales_accounts/70003771396/conversations/all?include=email_conversation_recipients%2Ctargetable%2Cphone_number%2Cphone_caller%2Cnote%2Cuser&per_page=3", - "document_associations": "/crm/sales/sales_accounts/70003771396/document_associations", - "notes": "/crm/sales/sales_accounts/70003771396/notes?include=creater", - "tasks": "/crm/sales/sales_accounts/70003771396/tasks?include=creater,owner,updater,targetable,users,task_type", - "appointments": "/crm/sales/sales_accounts/70003771396/appointments?include=creater,owner,updater,targetable,appointment_attendees,conference,note" - }, - "custom_field": {}, - "created_at": "2022-08-17T04:15:00-04:00", - "updated_at": "2022-08-24T06:03:31-04:00", - "avatar": null, - "parent_sales_account_id": null, - "recent_note": null, - "last_contacted_via_sales_activity": null, - "last_contacted_sales_activity_mode": null, - "completed_sales_sequences": null, - "active_sales_sequences": null, - "last_assigned_at": null, - "tags": [], - "is_deleted": false, - "team_user_ids": null, - "has_connections": false, - "record_type_id": "71010794477" - } - }, - "https://domain-rudder.myfreshworks.com/crm/sales/api/contacts/upsert?include=sales_accounts": { - "contact": { - "id": 70042006456, - "first_name": "Rk", - "last_name": "Mishra", - "display_name": "Rk Mishra", - "avatar": null, - "job_title": null, - "city": null, - "state": null, - "zipcode": null, - "country": null, - "email": "testuser@google.com", - "emails": [ - { - "id": 70037311213, - "value": "testuser@google.com", - "is_primary": true, - "label": null, - "_destroy": false - } - ], - "time_zone": "IST", - "work_number": "9988776655", - "mobile_number": "19265559504", - "address": null, - "last_seen": null, - "lead_score": 26, - "last_contacted": null, - "open_deals_amount": null, - "won_deals_amount": null, - "links": { - "conversations": "/crm/sales/contacts/70042006456/conversations/all?include=email_conversation_recipients%2Ctargetable%2Cphone_number%2Cphone_caller%2Cnote%2Cuser&per_page=3", - "timeline_feeds": "/crm/sales/contacts/70042006456/timeline_feeds", - "document_associations": "/crm/sales/contacts/70042006456/document_associations", - "notes": "/crm/sales/contacts/70042006456/notes?include=creater", - "tasks": "/crm/sales/contacts/70042006456/tasks?include=creater,owner,updater,targetable,users,task_type", - "appointments": "/crm/sales/contacts/70042006456/appointments?include=creater,owner,updater,targetable,appointment_attendees,conference,note", - "reminders": "/crm/sales/contacts/70042006456/reminders?include=creater,owner,updater,targetable", - "duplicates": "/crm/sales/contacts/70042006456/duplicates", - "connections": "/crm/sales/contacts/70042006456/connections" - }, - "last_contacted_sales_activity_mode": null, - "custom_field": {}, - "created_at": "2022-08-09T03:22:12-04:00", - "updated_at": "2022-08-30T00:33:27-04:00", - "keyword": "drilling", - "medium": "facebook", - "last_contacted_mode": null, - "recent_note": null, - "won_deals_count": null, - "last_contacted_via_sales_activity": null, - "completed_sales_sequences": null, - "active_sales_sequences": null, - "web_form_ids": null, - "open_deals_count": null, - "last_assigned_at": "2022-08-29T05:51:24-04:00", - "tags": [], - "facebook": null, - "twitter": null, - "linkedin": null, - "is_deleted": false, - "team_user_ids": null, - "external_id": "ea5cfab2-3961-4d8a-8187-3d1858c99099", - "work_email": null, - "subscription_status": 1, - "subscription_types": "2;3;4;5;1", - "customer_fit": 2, - "record_type_id": "71010794476", - "whatsapp_subscription_status": 2, - "sms_subscription_status": 2, - "last_seen_chat": null, - "first_seen_chat": null, - "locale": null, - "total_sessions": null, - "phone_numbers": [], - "sales_accounts": [ - { - "partial": true, - "id": 70003771198, - "name": "div-quer", - "avatar": null, - "website": null, - "last_contacted": null, - "record_type_id": "71010794477", - "is_primary": true - }, - { - "partial": true, - "id": 70003825177, - "name": "BisleriGroup", - "avatar": null, - "website": null, - "last_contacted": null, - "record_type_id": "71010794477", - "is_primary": false - } - ] - } - }, - "https://domain-rudder.myfreshworks.com/crm/sales/api/selector/sales_activity_types": { - "sales_activity_types": [ - { - "partial": true, - "id": 70000666879, - "name": "own-calender", - "internal_name": "cappointment", - "show_in_conversation": true, - "position": 1, - "is_default": false, - "is_checkedin": false - }, - { - "partial": true, - "id": 70000663932, - "name": "fb-support", - "internal_name": "facebook", - "show_in_conversation": true, - "position": 2, - "is_default": false, - "is_checkedin": false - }, - { - "partial": true, - "id": 70000663746, - "name": "twitter sales", - "internal_name": "twitter", - "show_in_conversation": true, - "position": 3, - "is_default": false, - "is_checkedin": false - }, - { - "partial": true, - "id": 70000646396, - "name": "linked sales", - "internal_name": "linkedin", - "show_in_conversation": true, - "position": 4, - "is_default": false, - "is_checkedin": false - }, - { - "partial": true, - "id": 70000642330, - "name": "facebook sales", - "internal_name": "facebook", - "show_in_conversation": true, - "position": 5, - "is_default": false, - "is_checkedin": false - }, - { - "partial": true, - "id": 70000612897, - "name": "Chat", - "internal_name": "chat", - "show_in_conversation": true, - "position": 6, - "is_default": true, - "is_checkedin": false - }, - { - "partial": true, - "id": 70000612898, - "name": "Phone", - "internal_name": "phone", - "show_in_conversation": true, - "position": 7, - "is_default": true, - "is_checkedin": false - }, - { - "partial": true, - "id": 70000612899, - "name": "Meeting", - "internal_name": "appointment", - "show_in_conversation": true, - "position": 8, - "is_default": true, - "is_checkedin": true - }, - { - "partial": true, - "id": 70000612900, - "name": "Task", - "internal_name": "task", - "show_in_conversation": true, - "position": 9, - "is_default": true, - "is_checkedin": false - }, - { - "partial": true, - "id": 70000612901, - "name": "Email", - "internal_name": "email", - "show_in_conversation": true, - "position": 10, - "is_default": true, - "is_checkedin": false - }, - { - "partial": true, - "id": 70000612902, - "name": "SMS Outgoing", - "internal_name": "sms_outgoing", - "show_in_conversation": true, - "position": 11, - "is_default": true, - "is_checkedin": false - }, - { - "partial": true, - "id": 70000612903, - "name": "Reminder", - "internal_name": "reminder", - "show_in_conversation": false, - "position": 12, - "is_default": true, - "is_checkedin": false - }, - { - "partial": true, - "id": 70000612904, - "name": "SMS Incoming", - "internal_name": "sms_incoming", - "show_in_conversation": true, - "position": 13, - "is_default": true, - "is_checkedin": false - } - ] - }, - "https://domain-rudder.myfreshworks.com/crm/sales/api/contacts/upsert": { - "contact": { - "id": 70054866612, - "first_name": null, - "last_name": null, - "display_name": "jamessampleton120@gmail.com", - "avatar": null, - "job_title": null, - "city": null, - "state": null, - "zipcode": null, - "country": null, - "email": "jamessampleton120@gmail.com", - "emails": [ - { - "id": 70047409219, - "value": "jamessampleton120@gmail.com", - "is_primary": true, - "label": null, - "_destroy": false - } - ], - "time_zone": null, - "work_number": null, - "mobile_number": null, - "address": null, - "last_seen": null, - "lead_score": 0, - "last_contacted": null, - "open_deals_amount": null, - "won_deals_amount": null, - "links": { - "conversations": "/crm/sales/contacts/70054866612/conversations/all?include=email_conversation_recipients%2Ctargetable%2Cphone_number%2Cphone_caller%2Cnote%2Cuser&per_page=3", - "timeline_feeds": "/crm/sales/contacts/70054866612/timeline_feeds", - "document_associations": "/crm/sales/contacts/70054866612/document_associations", - "notes": "/crm/sales/contacts/70054866612/notes?include=creater", - "tasks": "/crm/sales/contacts/70054866612/tasks?include=creater,owner,updater,targetable,users,task_type", - "appointments": "/crm/sales/contacts/70054866612/appointments?include=creater,owner,updater,targetable,appointment_attendees,conference,note", - "reminders": "/crm/sales/contacts/70054866612/reminders?include=creater,owner,updater,targetable", - "duplicates": "/crm/sales/contacts/70054866612/duplicates", - "connections": "/crm/sales/contacts/70054866612/connections" - }, - "last_contacted_sales_activity_mode": null, - "custom_field": {}, - "created_at": "2022-10-11T08:42:15-04:00", - "updated_at": "2022-10-11T08:42:15-04:00", - "keyword": null, - "medium": null, - "last_contacted_mode": null, - "recent_note": null, - "won_deals_count": null, - "last_contacted_via_sales_activity": null, - "completed_sales_sequences": null, - "active_sales_sequences": null, - "web_form_ids": null, - "open_deals_count": null, - "last_assigned_at": null, - "tags": [], - "facebook": null, - "twitter": null, - "linkedin": null, - "is_deleted": false, - "team_user_ids": null, - "external_id": null, - "work_email": null, - "subscription_status": 1, - "subscription_types": "2;3;4;5;1", - "customer_fit": 0, - "record_type_id": "71012139284", - "whatsapp_subscription_status": 2, - "sms_subscription_status": 2, - "last_seen_chat": null, - "first_seen_chat": null, - "locale": null, - "total_sessions": null, - "phone_numbers": [] - } - }, - "https://domain-rudder.myfreshworks.com/crm/sales/api/lists": { - "lists": [ - { - "id": 70000053624, - "name": "Sample list" - }, - { - "id": 70000056575, - "name": "list1-test" - }, - { - "id": 70000058627, - "name": "Jio 5G Group" - }, - { - "id": 70000058628, - "name": "Airtel 5G Group" - }, - { - "id": 70000059716, - "name": "Voda 5G" - } - ], - "meta": { - "total_pages": 1, - "total": 5 - } - }, - "https://domain-rudder.myfreshworks.com/crm/sales/api/selector/lifecycle_stages": { - "lifecycle_stages": [ - { - "id": 71012139274, - "name": "Sales Qualified Lead start", - "position": 1, - "disabled": false, - "default": true, - "type": "Sales Qualified Lead", - "contact_status_ids": [70000697858, 70000697859, 70000697860] - }, - { - "id": 71012139273, - "name": "Lead", - "position": 2, - "disabled": false, - "default": true, - "type": "Lead", - "contact_status_ids": [70000697854, 70000697855, 70000697856, 70000697857] - }, - { - "id": 71012806409, - "name": "final Customer", - "position": 3, - "disabled": false, - "default": false, - "type": "Custom", - "contact_status_ids": [70000736543, 70000736544] - }, - { - "id": 71012139275, - "name": "Customer", - "position": 4, - "disabled": false, - "default": true, - "type": "Customer", - "contact_status_ids": [70000697861, 70000697862] - } - ] - } -} diff --git a/test/__mocks__/data/freshsales/response.json b/test/__mocks__/data/freshsales/response.json deleted file mode 100644 index 3b0d0af192..0000000000 --- a/test/__mocks__/data/freshsales/response.json +++ /dev/null @@ -1,430 +0,0 @@ -{ - "https://domain-rudder.myfreshworks.com/crm/sales/api/sales_accounts/upsert": { - "sales_account": { - "id": 70003771396, - "name": "postman2.0", - "address": "Red Colony", - "city": "Pune", - "state": "Goa", - "zipcode": null, - "country": null, - "number_of_employees": 11, - "annual_revenue": 1000, - "website": null, - "owner_id": null, - "phone": "919191919191", - "open_deals_amount": null, - "open_deals_count": null, - "won_deals_amount": null, - "won_deals_count": null, - "last_contacted": null, - "last_contacted_mode": null, - "facebook": null, - "twitter": null, - "linkedin": null, - "links": { - "conversations": "/crm/sales/sales_accounts/70003771396/conversations/all?include=email_conversation_recipients%2Ctargetable%2Cphone_number%2Cphone_caller%2Cnote%2Cuser&per_page=3", - "document_associations": "/crm/sales/sales_accounts/70003771396/document_associations", - "notes": "/crm/sales/sales_accounts/70003771396/notes?include=creater", - "tasks": "/crm/sales/sales_accounts/70003771396/tasks?include=creater,owner,updater,targetable,users,task_type", - "appointments": "/crm/sales/sales_accounts/70003771396/appointments?include=creater,owner,updater,targetable,appointment_attendees,conference,note" - }, - "custom_field": {}, - "created_at": "2022-08-17T04:15:00-04:00", - "updated_at": "2022-08-24T06:03:31-04:00", - "avatar": null, - "parent_sales_account_id": null, - "recent_note": null, - "last_contacted_via_sales_activity": null, - "last_contacted_sales_activity_mode": null, - "completed_sales_sequences": null, - "active_sales_sequences": null, - "last_assigned_at": null, - "tags": [], - "is_deleted": false, - "team_user_ids": null, - "has_connections": false, - "record_type_id": "71010794477" - } - }, - "https://domain-rudder.myfreshworks.com/crm/sales/api/contacts/upsert?include=sales_accounts": { - "contact": { - "id": 70042006456, - "first_name": "Rk", - "last_name": "Mishra", - "display_name": "Rk Mishra", - "avatar": null, - "job_title": null, - "city": null, - "state": null, - "zipcode": null, - "country": null, - "email": "testuser@google.com", - "emails": [ - { - "id": 70037311213, - "value": "testuser@google.com", - "is_primary": true, - "label": null, - "_destroy": false - } - ], - "time_zone": "IST", - "work_number": "9988776655", - "mobile_number": "19265559504", - "address": null, - "last_seen": null, - "lead_score": 26, - "last_contacted": null, - "open_deals_amount": null, - "won_deals_amount": null, - "links": { - "conversations": "/crm/sales/contacts/70042006456/conversations/all?include=email_conversation_recipients%2Ctargetable%2Cphone_number%2Cphone_caller%2Cnote%2Cuser&per_page=3", - "timeline_feeds": "/crm/sales/contacts/70042006456/timeline_feeds", - "document_associations": "/crm/sales/contacts/70042006456/document_associations", - "notes": "/crm/sales/contacts/70042006456/notes?include=creater", - "tasks": "/crm/sales/contacts/70042006456/tasks?include=creater,owner,updater,targetable,users,task_type", - "appointments": "/crm/sales/contacts/70042006456/appointments?include=creater,owner,updater,targetable,appointment_attendees,conference,note", - "reminders": "/crm/sales/contacts/70042006456/reminders?include=creater,owner,updater,targetable", - "duplicates": "/crm/sales/contacts/70042006456/duplicates", - "connections": "/crm/sales/contacts/70042006456/connections" - }, - "last_contacted_sales_activity_mode": null, - "custom_field": {}, - "created_at": "2022-08-09T03:22:12-04:00", - "updated_at": "2022-08-30T00:33:27-04:00", - "keyword": "drilling", - "medium": "facebook", - "last_contacted_mode": null, - "recent_note": null, - "won_deals_count": null, - "last_contacted_via_sales_activity": null, - "completed_sales_sequences": null, - "active_sales_sequences": null, - "web_form_ids": null, - "open_deals_count": null, - "last_assigned_at": "2022-08-29T05:51:24-04:00", - "tags": [], - "facebook": null, - "twitter": null, - "linkedin": null, - "is_deleted": false, - "team_user_ids": null, - "external_id": "ea5cfab2-3961-4d8a-8187-3d1858c99099", - "work_email": null, - "subscription_status": 1, - "subscription_types": "2;3;4;5;1", - "customer_fit": 2, - "record_type_id": "71010794476", - "whatsapp_subscription_status": 2, - "sms_subscription_status": 2, - "last_seen_chat": null, - "first_seen_chat": null, - "locale": null, - "total_sessions": null, - "phone_numbers": [], - "sales_accounts": [ - { - "partial": true, - "id": 70003771198, - "name": "div-quer", - "avatar": null, - "website": null, - "last_contacted": null, - "record_type_id": "71010794477", - "is_primary": true - }, - { - "partial": true, - "id": 70003825177, - "name": "BisleriGroup", - "avatar": null, - "website": null, - "last_contacted": null, - "record_type_id": "71010794477", - "is_primary": false - } - ] - } - }, - "https://domain-rudder.myfreshworks.com/crm/sales/api/selector/sales_activity_types": { - "sales_activity_types": [ - { - "partial": true, - "id": 70000666879, - "name": "own-calender", - "internal_name": "cappointment", - "show_in_conversation": true, - "position": 1, - "is_default": false, - "is_checkedin": false - }, - { - "partial": true, - "id": 70000663932, - "name": "fb-support", - "internal_name": "facebook", - "show_in_conversation": true, - "position": 2, - "is_default": false, - "is_checkedin": false - }, - { - "partial": true, - "id": 70000663746, - "name": "twitter sales", - "internal_name": "twitter", - "show_in_conversation": true, - "position": 3, - "is_default": false, - "is_checkedin": false - }, - { - "partial": true, - "id": 70000646396, - "name": "linked sales", - "internal_name": "linkedin", - "show_in_conversation": true, - "position": 4, - "is_default": false, - "is_checkedin": false - }, - { - "partial": true, - "id": 70000642330, - "name": "facebook sales", - "internal_name": "facebook", - "show_in_conversation": true, - "position": 5, - "is_default": false, - "is_checkedin": false - }, - { - "partial": true, - "id": 70000612897, - "name": "Chat", - "internal_name": "chat", - "show_in_conversation": true, - "position": 6, - "is_default": true, - "is_checkedin": false - }, - { - "partial": true, - "id": 70000612898, - "name": "Phone", - "internal_name": "phone", - "show_in_conversation": true, - "position": 7, - "is_default": true, - "is_checkedin": false - }, - { - "partial": true, - "id": 70000612899, - "name": "Meeting", - "internal_name": "appointment", - "show_in_conversation": true, - "position": 8, - "is_default": true, - "is_checkedin": true - }, - { - "partial": true, - "id": 70000612900, - "name": "Task", - "internal_name": "task", - "show_in_conversation": true, - "position": 9, - "is_default": true, - "is_checkedin": false - }, - { - "partial": true, - "id": 70000612901, - "name": "Email", - "internal_name": "email", - "show_in_conversation": true, - "position": 10, - "is_default": true, - "is_checkedin": false - }, - { - "partial": true, - "id": 70000612902, - "name": "SMS Outgoing", - "internal_name": "sms_outgoing", - "show_in_conversation": true, - "position": 11, - "is_default": true, - "is_checkedin": false - }, - { - "partial": true, - "id": 70000612903, - "name": "Reminder", - "internal_name": "reminder", - "show_in_conversation": false, - "position": 12, - "is_default": true, - "is_checkedin": false - }, - { - "partial": true, - "id": 70000612904, - "name": "SMS Incoming", - "internal_name": "sms_incoming", - "show_in_conversation": true, - "position": 13, - "is_default": true, - "is_checkedin": false - } - ] - }, - "https://domain-rudder.myfreshworks.com/crm/sales/api/contacts/upsert": { - "contact": { - "id": 70054866612, - "first_name": null, - "last_name": null, - "display_name": "jamessampleton120@gmail.com", - "avatar": null, - "job_title": null, - "city": null, - "state": null, - "zipcode": null, - "country": null, - "email": "jamessampleton120@gmail.com", - "emails": [ - { - "id": 70047409219, - "value": "jamessampleton120@gmail.com", - "is_primary": true, - "label": null, - "_destroy": false - } - ], - "time_zone": null, - "work_number": null, - "mobile_number": null, - "address": null, - "last_seen": null, - "lead_score": 0, - "last_contacted": null, - "open_deals_amount": null, - "won_deals_amount": null, - "links": { - "conversations": "/crm/sales/contacts/70054866612/conversations/all?include=email_conversation_recipients%2Ctargetable%2Cphone_number%2Cphone_caller%2Cnote%2Cuser&per_page=3", - "timeline_feeds": "/crm/sales/contacts/70054866612/timeline_feeds", - "document_associations": "/crm/sales/contacts/70054866612/document_associations", - "notes": "/crm/sales/contacts/70054866612/notes?include=creater", - "tasks": "/crm/sales/contacts/70054866612/tasks?include=creater,owner,updater,targetable,users,task_type", - "appointments": "/crm/sales/contacts/70054866612/appointments?include=creater,owner,updater,targetable,appointment_attendees,conference,note", - "reminders": "/crm/sales/contacts/70054866612/reminders?include=creater,owner,updater,targetable", - "duplicates": "/crm/sales/contacts/70054866612/duplicates", - "connections": "/crm/sales/contacts/70054866612/connections" - }, - "last_contacted_sales_activity_mode": null, - "custom_field": {}, - "created_at": "2022-10-11T08:42:15-04:00", - "updated_at": "2022-10-11T08:42:15-04:00", - "keyword": null, - "medium": null, - "last_contacted_mode": null, - "recent_note": null, - "won_deals_count": null, - "last_contacted_via_sales_activity": null, - "completed_sales_sequences": null, - "active_sales_sequences": null, - "web_form_ids": null, - "open_deals_count": null, - "last_assigned_at": null, - "tags": [], - "facebook": null, - "twitter": null, - "linkedin": null, - "is_deleted": false, - "team_user_ids": null, - "external_id": null, - "work_email": null, - "subscription_status": 1, - "subscription_types": "2;3;4;5;1", - "customer_fit": 0, - "record_type_id": "71012139284", - "whatsapp_subscription_status": 2, - "sms_subscription_status": 2, - "last_seen_chat": null, - "first_seen_chat": null, - "locale": null, - "total_sessions": null, - "phone_numbers": [] - } - }, - "https://domain-rudder.myfreshworks.com/crm/sales/api/lists": { - "lists": [ - { - "id": 70000053624, - "name": "Sample list" - }, - { - "id": 70000056575, - "name": "list1-test" - }, - { - "id": 70000058627, - "name": "Jio 5G Group" - }, - { - "id": 70000058628, - "name": "Airtel 5G Group" - }, - { - "id": 70000059716, - "name": "Voda 5G" - } - ], - "meta": { - "total_pages": 1, - "total": 5 - } - }, - "https://domain-rudder.myfreshworks.com/crm/sales/api/selector/lifecycle_stages": { - "lifecycle_stages": [ - { - "id": 71012139274, - "name": "Sales Qualified Lead start", - "position": 1, - "disabled": false, - "default": true, - "type": "Sales Qualified Lead", - "contact_status_ids": [70000697858, 70000697859, 70000697860] - }, - { - "id": 71012139273, - "name": "Lead", - "position": 2, - "disabled": false, - "default": true, - "type": "Lead", - "contact_status_ids": [70000697854, 70000697855, 70000697856, 70000697857] - }, - { - "id": 71012806409, - "name": "final Customer", - "position": 3, - "disabled": false, - "default": false, - "type": "Custom", - "contact_status_ids": [70000736543, 70000736544] - }, - { - "id": 71012139275, - "name": "Customer", - "position": 4, - "disabled": false, - "default": true, - "type": "Customer", - "contact_status_ids": [70000697861, 70000697862] - } - ] - } -} diff --git a/test/__mocks__/data/google_adwords_remarketing_lists/proxy_response.json b/test/__mocks__/data/google_adwords_remarketing_lists/proxy_response.json index 5d3ac9496b..2cf1d3276b 100644 --- a/test/__mocks__/data/google_adwords_remarketing_lists/proxy_response.json +++ b/test/__mocks__/data/google_adwords_remarketing_lists/proxy_response.json @@ -1,24 +1,24 @@ { - "https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs:create": { + "https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs:create": { "status": 200, "data": { "resourceName": "customers/9249589672/offlineUserDataJobs/18025019461" } }, - "https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs/18025019461:addOperations": { + "https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs/18025019461:addOperations": { "status": 200, "data": {} }, - "https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs/18025019461:run": { + "https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs/18025019461:run": { "status": 200 }, - "https://googleads.googleapis.com/v14/customers/7693729834/offlineUserDataJobs:create": { + "https://googleads.googleapis.com/v15/customers/7693729834/offlineUserDataJobs:create": { "status": 200, "data": { "resourceName": "customers/9249589672/offlineUserDataJobs/18025019462" } }, - "https://googleads.googleapis.com/v14/customers/7693729834/offlineUserDataJobs/18025019462:addOperations": { + "https://googleads.googleapis.com/v15/customers/7693729834/offlineUserDataJobs/18025019462:addOperations": { "response": { "data": { "error": { @@ -61,7 +61,7 @@ "status": 400 } }, - "https://googleads.googleapis.com/v14/customers/1234567890/googleAds:searchStream": { + "https://googleads.googleapis.com/v15/customers/1234567890/googleAds:searchStream": { "response": { "data": [ { @@ -75,11 +75,11 @@ "status": 401 } }, - "https://googleads.googleapis.com/v14/customers/1234567899/googleAds:searchStream": { + "https://googleads.googleapis.com/v15/customers/1234567899/googleAds:searchStream": { "response": "", "code": "ECONNREFUSED" }, - "https://googleads.googleapis.com/v14/customers/1234567891/googleAds:searchStream": { + "https://googleads.googleapis.com/v15/customers/1234567891/googleAds:searchStream": { "data": [ { "results": [ @@ -96,7 +96,7 @@ ], "status": 200 }, - "https://googleads.googleapis.com/v14/customers/1234567891:uploadConversionAdjustments": { + "https://googleads.googleapis.com/v15/customers/1234567891:uploadConversionAdjustments": { "data": [ { "adjustmentType": "ENHANCEMENT", diff --git a/test/__mocks__/data/hs/response.json b/test/__mocks__/data/hs/response.json deleted file mode 100644 index e552275466..0000000000 --- a/test/__mocks__/data/hs/response.json +++ /dev/null @@ -1,455 +0,0 @@ -{ - "https://api.hubapi.com/properties/v1/contacts/properties?hapikey=dummy-apikey": [ - { "name": "company_size", "type": "string" }, - { "name": "date_of_birth", "type": "string" }, - { "name": "days_to_close", "type": "number" }, - { - "name": "date_submitted", - "type": "date" - }, - { - "name": "days_create", - "type": "date" - }, - { - "name": "days_closed", - "type": "date" - }, - { "name": "degree", "type": "string" }, - { "name": "field_of_study", "type": "string" }, - { "name": "first_conversion_date", "type": "datetime" }, - { "name": "first_conversion_event_name", "type": "string" }, - { "name": "first_deal_created_date", "type": "datetime" }, - { "name": "gender", "type": "string" }, - { "name": "graduation_date", "type": "string" }, - { "name": "hs_additional_emails", "type": "enumeration" }, - { "name": "hs_all_contact_vids", "type": "enumeration" }, - { - "name": "hs_analytics_first_touch_converting_campaign", - "type": "string" - }, - { "name": "hs_analytics_last_touch_converting_campaign", "type": "string" }, - { "name": "hs_avatar_filemanager_key", "type": "string" }, - { "name": "hs_calculated_form_submissions", "type": "enumeration" }, - { "name": "hs_calculated_merged_vids", "type": "enumeration" }, - { "name": "hs_calculated_mobile_number", "type": "string" }, - { "name": "hs_calculated_phone_number", "type": "string" }, - { "name": "hs_calculated_phone_number_area_code", "type": "string" }, - { "name": "hs_calculated_phone_number_country_code", "type": "string" }, - { "name": "hs_calculated_phone_number_region_code", "type": "string" }, - { "name": "hs_content_membership_email_confirmed", "type": "bool" }, - { "name": "hs_content_membership_notes", "type": "string" }, - { "name": "hs_content_membership_registered_at", "type": "datetime" }, - { - "name": "hs_content_membership_registration_domain_sent_to", - "type": "string" - }, - { - "name": "hs_content_membership_registration_email_sent_at", - "type": "datetime" - }, - { "name": "hs_content_membership_status", "type": "enumeration" }, - { "name": "hs_conversations_visitor_email", "type": "string" }, - { "name": "hs_created_by_conversations", "type": "bool" }, - { "name": "hs_created_by_user_id", "type": "string" }, - { "name": "hs_createdate", "type": "datetime" }, - { "name": "hs_document_last_revisited", "type": "datetime" }, - { "name": "hs_email_domain", "type": "string" }, - { "name": "hs_email_quarantined", "type": "bool" }, - { "name": "hs_email_quarantined_reason", "type": "enumeration" }, - { "name": "hs_email_recipient_fatigue_recovery_time", "type": "datetime" }, - { "name": "hs_email_sends_since_last_engagement", "type": "number" }, - { "name": "hs_emailconfirmationstatus", "type": "enumeration" }, - { "name": "hs_facebook_ad_clicked", "type": "bool" }, - { "name": "hs_feedback_last_nps_follow_up", "type": "string" }, - { "name": "hs_feedback_last_nps_rating", "type": "enumeration" }, - { "name": "hs_feedback_last_survey_date", "type": "datetime" }, - { "name": "hs_feedback_show_nps_web_survey", "type": "bool" }, - { "name": "hs_google_click_id", "type": "string" }, - { "name": "hs_ip_timezone", "type": "string" }, - { "name": "hs_is_contact", "type": "bool" }, - { "name": "hs_last_sales_activity_date", "type": "datetime" }, - { "name": "hs_lastmodifieddate", "type": "datetime" }, - { "name": "hs_lead_status", "type": "enumeration" }, - { "name": "hs_legal_basis", "type": "enumeration" }, - { "name": "hs_merged_object_ids", "type": "enumeration" }, - { "name": "hs_object_id", "type": "number" }, - { "name": "hs_predictivecontactscore_v2", "type": "number" }, - { "name": "hs_predictivescoringtier", "type": "enumeration" }, - { "name": "hs_sales_email_last_clicked", "type": "datetime" }, - { "name": "hs_sales_email_last_opened", "type": "datetime" }, - { - "name": "hs_searchable_calculated_international_mobile_number", - "type": "phone_number" - }, - { - "name": "hs_searchable_calculated_international_phone_number", - "type": "phone_number" - }, - { - "name": "hs_searchable_calculated_mobile_number", - "type": "phone_number" - }, - { "name": "hs_searchable_calculated_phone_number", "type": "phone_number" }, - { "name": "hs_sequences_is_enrolled", "type": "bool" }, - { "name": "hs_updated_by_user_id", "type": "string" }, - { "name": "hubspot_owner_assigneddate", "type": "datetime" }, - { "name": "ip_city", "type": "string" }, - { "name": "ip_country", "type": "string" }, - { "name": "ip_country_code", "type": "string" }, - { "name": "ip_latlon", "type": "string" }, - { "name": "ip_state", "type": "string" }, - { "name": "ip_state_code", "type": "string" }, - { "name": "ip_zipcode", "type": "string" }, - { "name": "job_function", "type": "string" }, - { "name": "lastmodifieddate", "type": "datetime" }, - { "name": "marital_status", "type": "string" }, - { "name": "military_status", "type": "string" }, - { "name": "num_associated_deals", "type": "number" }, - { "name": "num_conversion_events", "type": "number" }, - { "name": "num_unique_conversion_events", "type": "number" }, - { "name": "recent_conversion_date", "type": "datetime" }, - { "name": "recent_conversion_event_name", "type": "string" }, - { "name": "recent_deal_amount", "type": "number" }, - { "name": "recent_deal_close_date", "type": "datetime" }, - { "name": "relationship_status", "type": "string" }, - { "name": "school", "type": "string" }, - { "name": "seniority", "type": "string" }, - { "name": "start_date", "type": "string" }, - { "name": "test_date", "type": "date" }, - { "name": "test_key", "type": "string" }, - { "name": "test_prop", "type": "string" }, - { "name": "test_property", "type": "string" }, - { "name": "total_revenue", "type": "number" }, - { "name": "work_email", "type": "string" }, - { "name": "firstname", "type": "string" }, - { "name": "hs_analytics_first_url", "type": "string" }, - { "name": "hs_email_delivered", "type": "number" }, - { "name": "hs_email_optout_7283808", "type": "enumeration" }, - { "name": "twitterhandle", "type": "string" }, - { "name": "currentlyinworkflow", "type": "enumeration" }, - { "name": "hs_analytics_last_url", "type": "string" }, - { "name": "hs_email_open", "type": "number" }, - { "name": "fax", "type": "string" }, - { "name": "hs_analytics_first_timestamp", "type": "datetime" }, - { "name": "hs_email_last_email_name", "type": "string" }, - { "name": "hs_email_last_send_date", "type": "datetime" }, - { "name": "address", "type": "string" }, - { "name": "engagements_last_meeting_booked", "type": "datetime" }, - { "name": "engagements_last_meeting_booked_campaign", "type": "string" }, - { "name": "engagements_last_meeting_booked_medium", "type": "string" }, - { "name": "engagements_last_meeting_booked_source", "type": "string" }, - { "name": "hs_analytics_first_visit_timestamp", "type": "datetime" }, - { "name": "hs_email_last_open_date", "type": "datetime" }, - { "name": "hs_sales_email_last_replied", "type": "datetime" }, - { "name": "hubspot_owner_id", "type": "enumeration" }, - { "name": "notes_last_contacted", "type": "datetime" }, - { "name": "notes_last_updated", "type": "datetime" }, - { "name": "notes_next_activity_date", "type": "datetime" }, - { "name": "num_contacted_notes", "type": "number" }, - { "name": "num_notes", "type": "number" }, - { "name": "surveymonkeyeventlastupdated", "type": "number" }, - { "name": "webinareventlastupdated", "type": "number" }, - { "name": "city", "type": "string" }, - { "name": "hs_analytics_last_timestamp", "type": "datetime" }, - { "name": "hs_email_last_click_date", "type": "datetime" }, - { "name": "hubspot_team_id", "type": "enumeration" }, - { "name": "hs_all_owner_ids", "type": "enumeration" }, - { "name": "hs_analytics_last_visit_timestamp", "type": "datetime" }, - { "name": "hs_email_first_send_date", "type": "datetime" }, - { "name": "state", "type": "string" }, - { "name": "hs_all_team_ids", "type": "enumeration" }, - { "name": "hs_analytics_source", "type": "enumeration" }, - { "name": "hs_email_first_open_date", "type": "datetime" }, - { "name": "zip", "type": "string" }, - { "name": "country", "type": "string" }, - { "name": "hs_all_accessible_team_ids", "type": "enumeration" }, - { "name": "hs_analytics_source_data_1", "type": "string" }, - { "name": "hs_email_first_click_date", "type": "datetime" }, - { "name": "hs_analytics_source_data_2", "type": "string" }, - { "name": "hs_email_is_ineligible", "type": "bool" }, - { "name": "hs_language", "type": "enumeration" }, - { "name": "hs_analytics_first_referrer", "type": "string" }, - { "name": "jobtitle", "type": "string" }, - { "name": "hs_analytics_last_referrer", "type": "string" }, - { "name": "message", "type": "string" }, - { "name": "closedate", "type": "datetime" }, - { "name": "hs_analytics_average_page_views", "type": "number" }, - { "name": "hs_analytics_revenue", "type": "number" }, - { "name": "hs_lifecyclestage_lead_date", "type": "datetime" }, - { - "name": "hs_lifecyclestage_marketingqualifiedlead_date", - "type": "datetime" - }, - { "name": "hs_lifecyclestage_opportunity_date", "type": "datetime" }, - { "name": "lifecyclestage", "type": "enumeration" }, - { "name": "hs_lifecyclestage_salesqualifiedlead_date", "type": "datetime" }, - { "name": "createdate", "type": "datetime" }, - { "name": "hs_lifecyclestage_evangelist_date", "type": "datetime" }, - { "name": "hs_lifecyclestage_customer_date", "type": "datetime" }, - { "name": "hubspotscore", "type": "number" }, - { "name": "company", "type": "string" }, - { "name": "hs_lifecyclestage_subscriber_date", "type": "datetime" }, - { "name": "hs_lifecyclestage_other_date", "type": "datetime" }, - { "name": "website", "type": "string" }, - { "name": "numemployees", "type": "enumeration" }, - { "name": "annualrevenue", "type": "string" }, - { "name": "industry", "type": "string" }, - { "name": "associatedcompanyid", "type": "number" }, - { "name": "associatedcompanylastupdated", "type": "number" }, - { "name": "hs_predictivecontactscorebucket", "type": "enumeration" }, - { "name": "hs_predictivecontactscore", "type": "number" } - ], - "https://api.hubapi.com/properties/v1/contacts/properties": [ - { "name": "company_size", "type": "string" }, - { "name": "date_of_birth", "type": "string" }, - { "name": "days_to_close", "type": "number" }, - { - "name": "date_submitted", - "type": "date" - }, - { - "name": "date_created", - "type": "date" - }, - { - "name": "date_closed", - "type": "date" - }, - { "name": "degree", "type": "string" }, - { "name": "field_of_study", "type": "string" }, - { "name": "first_conversion_date", "type": "datetime" }, - { "name": "first_conversion_event_name", "type": "string" }, - { "name": "first_deal_created_date", "type": "datetime" }, - { "name": "gender", "type": "string" }, - { "name": "graduation_date", "type": "string" }, - { "name": "hs_additional_emails", "type": "enumeration" }, - { "name": "hs_all_contact_vids", "type": "enumeration" }, - { - "name": "hs_analytics_first_touch_converting_campaign", - "type": "string" - }, - { "name": "hs_analytics_last_touch_converting_campaign", "type": "string" }, - { "name": "hs_avatar_filemanager_key", "type": "string" }, - { "name": "hs_calculated_form_submissions", "type": "enumeration" }, - { "name": "hs_calculated_merged_vids", "type": "enumeration" }, - { "name": "hs_calculated_mobile_number", "type": "string" }, - { "name": "hs_calculated_phone_number", "type": "string" }, - { "name": "hs_calculated_phone_number_area_code", "type": "string" }, - { "name": "hs_calculated_phone_number_country_code", "type": "string" }, - { "name": "hs_calculated_phone_number_region_code", "type": "string" }, - { "name": "hs_content_membership_email_confirmed", "type": "bool" }, - { "name": "hs_content_membership_notes", "type": "string" }, - { "name": "hs_content_membership_registered_at", "type": "datetime" }, - { - "name": "hs_content_membership_registration_domain_sent_to", - "type": "string" - }, - { - "name": "hs_content_membership_registration_email_sent_at", - "type": "datetime" - }, - { "name": "hs_content_membership_status", "type": "enumeration" }, - { "name": "hs_conversations_visitor_email", "type": "string" }, - { "name": "hs_created_by_conversations", "type": "bool" }, - { "name": "hs_created_by_user_id", "type": "string" }, - { "name": "hs_createdate", "type": "datetime" }, - { "name": "hs_document_last_revisited", "type": "datetime" }, - { "name": "hs_email_domain", "type": "string" }, - { "name": "hs_email_quarantined", "type": "bool" }, - { "name": "hs_email_quarantined_reason", "type": "enumeration" }, - { "name": "hs_email_recipient_fatigue_recovery_time", "type": "datetime" }, - { "name": "hs_email_sends_since_last_engagement", "type": "number" }, - { "name": "hs_emailconfirmationstatus", "type": "enumeration" }, - { "name": "hs_facebook_ad_clicked", "type": "bool" }, - { "name": "hs_feedback_last_nps_follow_up", "type": "string" }, - { "name": "hs_feedback_last_nps_rating", "type": "enumeration" }, - { "name": "hs_feedback_last_survey_date", "type": "datetime" }, - { "name": "hs_feedback_show_nps_web_survey", "type": "bool" }, - { "name": "hs_google_click_id", "type": "string" }, - { "name": "hs_ip_timezone", "type": "string" }, - { "name": "hs_is_contact", "type": "bool" }, - { "name": "hs_last_sales_activity_date", "type": "datetime" }, - { "name": "hs_lastmodifieddate", "type": "datetime" }, - { "name": "hs_lead_status", "type": "enumeration" }, - { "name": "hs_legal_basis", "type": "enumeration" }, - { "name": "hs_merged_object_ids", "type": "enumeration" }, - { "name": "hs_object_id", "type": "number" }, - { "name": "hs_predictivecontactscore_v2", "type": "number" }, - { "name": "hs_predictivescoringtier", "type": "enumeration" }, - { "name": "hs_sales_email_last_clicked", "type": "datetime" }, - { "name": "hs_sales_email_last_opened", "type": "datetime" }, - { - "name": "hs_searchable_calculated_international_mobile_number", - "type": "phone_number" - }, - { - "name": "hs_searchable_calculated_international_phone_number", - "type": "phone_number" - }, - { - "name": "hs_searchable_calculated_mobile_number", - "type": "phone_number" - }, - { "name": "hs_searchable_calculated_phone_number", "type": "phone_number" }, - { "name": "hs_sequences_is_enrolled", "type": "bool" }, - { "name": "hs_updated_by_user_id", "type": "string" }, - { "name": "hubspot_owner_assigneddate", "type": "datetime" }, - { "name": "ip_city", "type": "string" }, - { "name": "ip_country", "type": "string" }, - { "name": "ip_country_code", "type": "string" }, - { "name": "ip_latlon", "type": "string" }, - { "name": "ip_state", "type": "string" }, - { "name": "ip_state_code", "type": "string" }, - { "name": "ip_zipcode", "type": "string" }, - { "name": "job_function", "type": "string" }, - { "name": "lastmodifieddate", "type": "datetime" }, - { "name": "marital_status", "type": "string" }, - { "name": "military_status", "type": "string" }, - { "name": "num_associated_deals", "type": "number" }, - { "name": "num_conversion_events", "type": "number" }, - { "name": "num_unique_conversion_events", "type": "number" }, - { "name": "recent_conversion_date", "type": "datetime" }, - { "name": "recent_conversion_event_name", "type": "string" }, - { "name": "recent_deal_amount", "type": "number" }, - { "name": "recent_deal_close_date", "type": "datetime" }, - { "name": "relationship_status", "type": "string" }, - { "name": "school", "type": "string" }, - { "name": "seniority", "type": "string" }, - { "name": "start_date", "type": "string" }, - { "name": "test_date", "type": "date" }, - { "name": "test_key", "type": "string" }, - { "name": "test_prop", "type": "string" }, - { "name": "test_property", "type": "string" }, - { "name": "total_revenue", "type": "number" }, - { "name": "work_email", "type": "string" }, - { "name": "firstname", "type": "string" }, - { "name": "hs_analytics_first_url", "type": "string" }, - { "name": "hs_email_delivered", "type": "number" }, - { "name": "hs_email_optout_7283808", "type": "enumeration" }, - { "name": "twitterhandle", "type": "string" }, - { "name": "currentlyinworkflow", "type": "enumeration" }, - { "name": "hs_analytics_last_url", "type": "string" }, - { "name": "hs_email_open", "type": "number" }, - { "name": "fax", "type": "string" }, - { "name": "hs_analytics_first_timestamp", "type": "datetime" }, - { "name": "hs_email_last_email_name", "type": "string" }, - { "name": "hs_email_last_send_date", "type": "datetime" }, - { "name": "address", "type": "string" }, - { "name": "engagements_last_meeting_booked", "type": "datetime" }, - { "name": "engagements_last_meeting_booked_campaign", "type": "string" }, - { "name": "engagements_last_meeting_booked_medium", "type": "string" }, - { "name": "engagements_last_meeting_booked_source", "type": "string" }, - { "name": "hs_analytics_first_visit_timestamp", "type": "datetime" }, - { "name": "hs_email_last_open_date", "type": "datetime" }, - { "name": "hs_sales_email_last_replied", "type": "datetime" }, - { "name": "hubspot_owner_id", "type": "enumeration" }, - { "name": "notes_last_contacted", "type": "datetime" }, - { "name": "notes_last_updated", "type": "datetime" }, - { "name": "notes_next_activity_date", "type": "datetime" }, - { "name": "num_contacted_notes", "type": "number" }, - { "name": "num_notes", "type": "number" }, - { "name": "surveymonkeyeventlastupdated", "type": "number" }, - { "name": "webinareventlastupdated", "type": "number" }, - { "name": "city", "type": "string" }, - { "name": "hs_analytics_last_timestamp", "type": "datetime" }, - { "name": "hs_email_last_click_date", "type": "datetime" }, - { "name": "hubspot_team_id", "type": "enumeration" }, - { "name": "hs_all_owner_ids", "type": "enumeration" }, - { "name": "hs_analytics_last_visit_timestamp", "type": "datetime" }, - { "name": "hs_email_first_send_date", "type": "datetime" }, - { "name": "state", "type": "string" }, - { "name": "hs_all_team_ids", "type": "enumeration" }, - { "name": "hs_analytics_source", "type": "enumeration" }, - { "name": "hs_email_first_open_date", "type": "datetime" }, - { "name": "zip", "type": "string" }, - { "name": "country", "type": "string" }, - { "name": "hs_all_accessible_team_ids", "type": "enumeration" }, - { "name": "hs_analytics_source_data_1", "type": "string" }, - { "name": "hs_email_first_click_date", "type": "datetime" }, - { "name": "hs_analytics_source_data_2", "type": "string" }, - { "name": "hs_email_is_ineligible", "type": "bool" }, - { "name": "hs_language", "type": "enumeration" }, - { "name": "hs_analytics_first_referrer", "type": "string" }, - { "name": "jobtitle", "type": "string" }, - { "name": "hs_analytics_last_referrer", "type": "string" }, - { "name": "message", "type": "string" }, - { "name": "closedate", "type": "datetime" }, - { "name": "hs_analytics_average_page_views", "type": "number" }, - { "name": "hs_analytics_revenue", "type": "number" }, - { "name": "hs_lifecyclestage_lead_date", "type": "datetime" }, - { - "name": "hs_lifecyclestage_marketingqualifiedlead_date", - "type": "datetime" - }, - { "name": "hs_lifecyclestage_opportunity_date", "type": "datetime" }, - { "name": "lifecyclestage", "type": "enumeration" }, - { "name": "hs_lifecyclestage_salesqualifiedlead_date", "type": "datetime" }, - { "name": "createdate", "type": "datetime" }, - { "name": "hs_lifecyclestage_evangelist_date", "type": "datetime" }, - { "name": "hs_lifecyclestage_customer_date", "type": "datetime" }, - { "name": "hubspotscore", "type": "number" }, - { "name": "company", "type": "string" }, - { "name": "hs_lifecyclestage_subscriber_date", "type": "datetime" }, - { "name": "hs_lifecyclestage_other_date", "type": "datetime" }, - { "name": "website", "type": "string" }, - { "name": "numemployees", "type": "enumeration" }, - { "name": "annualrevenue", "type": "string" }, - { "name": "industry", "type": "string" }, - { "name": "associatedcompanyid", "type": "number" }, - { "name": "associatedcompanylastupdated", "type": "number" }, - { "name": "hs_predictivecontactscorebucket", "type": "enumeration" }, - { "name": "hs_predictivecontactscore", "type": "number" } - ], - "https://api.hubapi.com/crm/v3/objects/contacts/search": { - "total": 1, - "results": [ - { - "id": "103604", - "properties": { - "createdate": "2022-07-15T15:25:08.975Z", - "email": "testhubspot@email.com", - "hs_object_id": "103604", - "lastmodifieddate": "2022-07-15T15:26:49.590Z" - }, - "createdAt": "2022-07-15T15:25:08.975Z", - "updatedAt": "2022-07-15T15:26:49.590Z", - "archived": false - } - ] - }, - "https://api.hubapi.com/crm/v3/objects/lead/search": { - "total": 1, - "results": [ - { - "id": "103605", - "properties": { - "createdate": "2022-08-15T15:25:08.975Z", - "email": "testhubspot2@email.com", - "hs_object_id": "103605", - "lastmodifieddate": "2022-08-15T15:26:49.590Z" - }, - "createdAt": "2022-08-15T15:25:08.975Z", - "updatedAt": "2022-08-15T15:26:49.590Z", - "archived": false - } - ] - }, - "https://api.hubapi.com/crm/v3/objects/lead/search?hapikey=dummy-apikey": { - "total": 1, - "results": [ - { - "id": "103605", - "properties": { - "createdate": "2022-08-15T15:25:08.975Z", - "email": "testhubspot2@email.com", - "hs_object_id": "103605", - "lastmodifieddate": "2022-08-15T15:26:49.590Z" - }, - "createdAt": "2022-08-15T15:25:08.975Z", - "updatedAt": "2022-08-15T15:26:49.590Z", - "archived": false - } - ] - } -} diff --git a/test/__mocks__/data/intercom/proxy_response.json b/test/__mocks__/data/intercom/proxy_response.json deleted file mode 100644 index 3c5a3d9638..0000000000 --- a/test/__mocks__/data/intercom/proxy_response.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "https://api.intercom.io/users/test1": { - "data": { - "type": "error.list", - "request_id": "000on04msi4jpk7d3u60", - "errors": [ - { - "code": "Request Timeout", - "message": "The server would not wait any longer for the client" - } - ] - }, - "status": 408 - } -} diff --git a/test/__mocks__/data/monday/response.json b/test/__mocks__/data/monday/response.json deleted file mode 100644 index a6445f18ac..0000000000 --- a/test/__mocks__/data/monday/response.json +++ /dev/null @@ -1,212 +0,0 @@ -{ - "339283933": { - "data": { - "boards": [ - { - "name": "Planning", - "columns": [ - { - "id": "name", - "title": "Name", - "type": "name", - "description": null, - "settings_str": "{}" - }, - { - "id": "subitems", - "title": "Subitems", - "type": "subtasks", - "description": null, - "settings_str": "{\"allowMultipleItems\":true,\"itemTypeName\":\"column.subtasks.title\",\"displayType\":\"BOARD_INLINE\",\"boardIds\":[3160974974]}" - }, - { - "id": "person", - "title": "Person", - "type": "multiple-person", - "description": null, - "settings_str": "{}" - }, - { - "id": "status", - "title": "Status", - "type": "color", - "description": null, - "settings_str": "{\"labels\":{\"0\":\"Working on it\",\"1\":\"Done\",\"2\":\"Stuck\"},\"labels_positions_v2\":{\"0\":0,\"1\":2,\"2\":1,\"5\":3},\"labels_colors\":{\"0\":{\"color\":\"#fdab3d\",\"border\":\"#E99729\",\"var_name\":\"orange\"},\"1\":{\"color\":\"#00c875\",\"border\":\"#00B461\",\"var_name\":\"green-shadow\"},\"2\":{\"color\":\"#e2445c\",\"border\":\"#CE3048\",\"var_name\":\"red-shadow\"}}}" - }, - { - "id": "date4", - "title": "Date", - "type": "date", - "description": null, - "settings_str": "{}" - }, - { - "id": "checkbox", - "title": "Checkbox", - "type": "boolean", - "description": null, - "settings_str": "{}" - }, - { - "id": "connect_boards", - "title": "Connect boards", - "type": "board-relation", - "description": null, - "settings_str": "{\"allowCreateReflectionColumn\":false}" - }, - { - "id": "status_1", - "title": "Other", - "type": "color", - "description": null, - "settings_str": "{\"labels\":{\"0\":\"Working on it\",\"1\":\"Done\",\"2\":\"Stuck\"},\"labels_colors\":{\"0\":{\"color\":\"#fdab3d\",\"border\":\"#E99729\",\"var_name\":\"orange\"},\"1\":{\"color\":\"#00c875\",\"border\":\"#00B461\",\"var_name\":\"green-shadow\"},\"2\":{\"color\":\"#e2445c\",\"border\":\"#CE3048\",\"var_name\":\"red-shadow\"}}}" - }, - { - "id": "date_1", - "title": "Date 1", - "type": "date", - "description": null, - "settings_str": "{\"hide_footer\":false}" - }, - { - "id": "status_12", - "title": "new status", - "type": "color", - "description": null, - "settings_str": "{\"labels\":{\"0\":\"Working on it\",\"1\":\"Done\",\"2\":\"Stuck\"},\"labels_colors\":{\"0\":{\"color\":\"#fdab3d\",\"border\":\"#E99729\",\"var_name\":\"orange\"},\"1\":{\"color\":\"#00c875\",\"border\":\"#00B461\",\"var_name\":\"green-shadow\"},\"2\":{\"color\":\"#e2445c\",\"border\":\"#CE3048\",\"var_name\":\"red-shadow\"}}}" - }, - { - "id": "numbers", - "title": "Numbers", - "type": "numeric", - "description": null, - "settings_str": "{}" - }, - { - "id": "text", - "title": "Name", - "type": "text", - "description": null, - "settings_str": "{}" - }, - { - "id": "country", - "title": "Country", - "type": "country", - "description": null, - "settings_str": "{}" - }, - { - "id": "dropdown", - "title": "Dropdown", - "type": "dropdown", - "description": null, - "settings_str": "{\"hide_footer\":false,\"labels\":[{\"id\":1,\"name\":\"dropdown\"},{\"id\":2,\"name\":\"dropup\"}]}" - }, - { - "id": "email", - "title": "Email", - "type": "email", - "description": null, - "settings_str": "{}" - }, - { - "id": "location", - "title": "Location", - "type": "location", - "description": null, - "settings_str": "{}" - }, - { - "id": "phone", - "title": "Phone", - "type": "phone", - "description": null, - "settings_str": "{}" - }, - { - "id": "rating", - "title": "Rating", - "type": "rating", - "description": null, - "settings_str": "{}" - }, - { - "id": "timeline", - "title": "Timeline", - "type": "timerange", - "description": null, - "settings_str": "{\"hide_footer\":false}" - }, - { - "id": "dependent_on", - "title": "Dependent On", - "type": "dependency", - "description": "Choose the item your task will be dependent on. If the “dependent on” item’s date is changing, the other dates will adjust automatically", - "settings_str": "{\"boardIds\":[3142482015],\"dependencyNewInfra\":true,\"allowMultipleItems\":true}" - }, - { - "id": "long_text", - "title": "Long Text", - "type": "long-text", - "description": null, - "settings_str": "{}" - }, - { - "id": "link", - "title": "Link", - "type": "link", - "description": null, - "settings_str": "{}" - }, - { - "id": "tags", - "title": "Tags", - "type": "tag", - "description": null, - "settings_str": "{\"hide_footer\":false}" - }, - { - "id": "label", - "title": "Label", - "type": "color", - "description": "", - "settings_str": "{\"done_colors\":[1],\"labels\":{\"3\":\"Label 2\",\"105\":\"Label 1\",\"156\":\"Label 3\"},\"labels_positions_v2\":{\"3\":1,\"5\":3,\"105\":0,\"156\":2},\"labels_colors\":{\"3\":{\"color\":\"#0086c0\",\"border\":\"#3DB0DF\",\"var_name\":\"blue-links\"},\"105\":{\"color\":\"#9AADBD\",\"border\":\"#9AADBD\",\"var_name\":\"winter\"},\"156\":{\"color\":\"#9D99B9\",\"border\":\"#9D99B9\",\"var_name\":\"purple_gray\"}}}" - }, - { - "id": "world_clock", - "title": "World Clock", - "type": "timezone", - "description": null, - "settings_str": "{}" - }, - { - "id": "week", - "title": "Week", - "type": "week", - "description": null, - "settings_str": "{}" - } - ], - "groups": [ - { - "id": "topics", - "title": "This month" - }, - { - "id": "group_title", - "title": "Next month" - } - ] - } - ] - }, - "account_id": 13215538 - }, - "339283934": { - "data": { - "boards": [] - }, - "account_id": 16260452 - } -} diff --git a/test/__mocks__/data/profitwell/response.json b/test/__mocks__/data/profitwell/response.json deleted file mode 100644 index 21c4f240bc..0000000000 --- a/test/__mocks__/data/profitwell/response.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "https://api.profitwell.com/v2/users/pwu_Oea7HXV3bnTP/": [ - { - "user_id": "pwu_Oea7HXV3bnTP", - "subscription_id": "pws_FecTCEyo17rV", - "user_alias": "spiderman_1a", - "subscription_alias": "spiderman_sub_1a", - "email": "spiderman@profitwell.com", - "plan_id": "web_plan", - "plan_interval": "month", - "plan_currency": "usd", - "status": "active", - "value": 5000, - "effective_date": 1514764800, - "meta": {} - } - ], - "https://api.profitwell.com/v2/users/spiderman_1a/": [ - { - "user_id": "pwu_Oea7HXV3bnTP", - "subscription_id": "pws_FecTCEyo17rV", - "user_alias": "spiderman_1a", - "subscription_alias": "spiderman_sub_1a", - "email": "spiderman@profitwell.com", - "plan_id": "web_plan", - "plan_interval": "month", - "plan_currency": "usd", - "status": "active", - "value": 5000, - "effective_date": 1514764800, - "meta": {} - } - ] -} diff --git a/test/__mocks__/data/wootric/response.json b/test/__mocks__/data/wootric/response.json deleted file mode 100644 index 48cdd44a83..0000000000 --- a/test/__mocks__/data/wootric/response.json +++ /dev/null @@ -1,107 +0,0 @@ -{ - "https://api.wootric.com/v1/end_users/dummyId1?lookup_by_external_id=true": { - "id": 486438462, - "created_at": "2022-08-10 11:39:50 -0700", - "updated_at": "2022-08-10 11:39:50 -0700", - "email": "dummyuser1@gmail.com", - "last_surveyed": "2022-01-20 05:39:21 -0800", - "external_created_at": 1611149961, - "last_seen_at": null, - "properties": { - "city": "Mumbai", - "name": "Dummy User 1", - "title": "SDE", - "gender": "Male", - "company": "Rudderstack" - }, - "phone_number": "+19123456789", - "external_id": "dummyId1", - "last_response": null, - "settings": { - "email_nps": true, - "mobile_nps": true, - "web_nps": true, - "force_mobile_survey": null, - "force_web_survey": null, - "surveys_disabled_by_end_user": null - } - }, - "https://api.wootric.com/v1/end_users/exclueFunTestId?lookup_by_external_id=true": { - "id": 486336190, - "created_at": "2022-08-10 07:30:50 -0700", - "updated_at": "2022-08-10 10:12:46 -0700", - "email": "excludeUser@gmail.com", - "last_surveyed": "2022-01-20 05:39:21 -0800", - "external_created_at": 1579755367, - "last_seen_at": null, - "properties": { - "city": "Mumbai", - "name": "exclude test user", - "email": "excludeUser@gmail.com", - "title": "AD", - "gender": "Male", - "company": "Rockstar" - }, - "phone_number": "+18324671283", - "external_id": "exclueFunTestId", - "last_response": null, - "settings": { - "email_nps": true, - "mobile_nps": true, - "web_nps": true, - "force_mobile_survey": null, - "force_web_survey": null, - "surveys_disabled_by_end_user": null - } - }, - "https://api.wootric.com/v1/end_users/my-external-id-1234?lookup_by_external_id=true": { - "type": "error_list", - "errors": [ - { - "status": "record_not_found", - "message": "The record could not be found", - "field": null - } - ] - }, - "https://api.wootric.com/v1/end_users/490635419": { - "id": 490635419, - "created_at": "2022-08-20 00:55:26 -0700", - "updated_at": "2022-08-22 11:17:05 -0700", - "email": "firstuser@gmail.com", - "last_surveyed": "2022-08-01 00:11:44 -0700", - "external_created_at": 1661002761, - "last_seen_at": null, - "properties": { - "Department": "Marketing", - "product_plan": "Web", - "revenue amount": "5000" - }, - "phone_number": "+8859133456781", - "external_id": "firstUserId123", - "last_response": { - "id": 101013218, - "score": 9, - "text": "Good !!!", - "survey": { - "channel": "web" - } - }, - "settings": { - "email_nps": true, - "mobile_nps": true, - "web_nps": true, - "force_mobile_survey": null, - "force_web_survey": null, - "surveys_disabled_by_end_user": null - } - }, - "https://api.wootric.com/oauth/token?account_token=NPS-dummyToken": { - "access_token": "2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c", - "token_type": "Bearer", - "expires_in": 7200, - "refresh_token": "f4033a61742e84405a5ef8b2e09b82395dc041f0259fd5fb715fc196a1b9cd52", - "scope": "delete_account admin respond export read survey invalidate_response", - "created_at": 1660292389 - } -} diff --git a/test/__mocks__/delighted.mock.js b/test/__mocks__/delighted.mock.js deleted file mode 100644 index a1a70c2983..0000000000 --- a/test/__mocks__/delighted.mock.js +++ /dev/null @@ -1,12 +0,0 @@ -const delightedGetRequestHandler = options => { - const { params } = options; - if (params.email === "identified_user@email.com") { - return Promise.resolve({ data: ["user data"], status: 200 }); - } - if (params.email === "unidentified_user@email.com") { - return Promise.resolve({ data: [], status: 200 }); - } - return Promise.resolve({ data: [], status: 200 }); -}; - -module.exports = { delightedGetRequestHandler }; diff --git a/test/__mocks__/drip.mock.js b/test/__mocks__/drip.mock.js deleted file mode 100644 index fd25b4b1d5..0000000000 --- a/test/__mocks__/drip.mock.js +++ /dev/null @@ -1,8 +0,0 @@ -const dripPostRequestHandler = (url, payload) => { - if (url === "https://api.getdrip.com/v2/1809802/subscriber") - return Promise.resolve({ data: payload, status: 200 }); - - return Promise.resolve({ data: payload, status: 200 }); -}; - -module.exports = { dripPostRequestHandler }; diff --git a/test/__mocks__/freshmarketer.mock.js b/test/__mocks__/freshmarketer.mock.js deleted file mode 100644 index 607ce7130d..0000000000 --- a/test/__mocks__/freshmarketer.mock.js +++ /dev/null @@ -1,52 +0,0 @@ -const fs = require("fs"); -const path = require("path"); - -const urlDirectoryMap = { - "myfreshworks.com/crm/sales/api": "freshmarketer" -}; - -const getData = url => { - let directory = "freshmarketer"; - Object.keys(urlDirectoryMap).forEach(key => { - if (url.includes(key)) { - directory = urlDirectoryMap[key]; - } - }); - if (directory) { - const dataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${directory}/response.json`) - ); - const data = JSON.parse(dataFile); - return data[url]; - } - return {}; -}; - -const freshmarketerPostRequestHandler = (url, payload) => { - const mockData = getData(url); - if (mockData) { - return { - data: mockData, - status: 200 - }; - } - return new Promise((resolve, reject) => { - resolve({ error: "Request failed", status: 404 }); - }); -}; - -const freshmarketerGetRequestHandler = url => { - const mockData = getData(url); - if (mockData) { - //resolve with status 200 - return Promise.resolve({ data: mockData, status: 200 }); - } - return new Promise((resolve, reject) => { - resolve({ error: "Request failed", status: 404 }); - }); -}; - -module.exports = { - freshmarketerPostRequestHandler, - freshmarketerGetRequestHandler -}; diff --git a/test/__mocks__/freshsales.mock.js b/test/__mocks__/freshsales.mock.js deleted file mode 100644 index edbf2de43f..0000000000 --- a/test/__mocks__/freshsales.mock.js +++ /dev/null @@ -1,52 +0,0 @@ -const fs = require("fs"); -const path = require("path"); - -const urlDirectoryMap = { - "myfreshworks.com/crm/sales/api": "freshsales" -}; - -const getData = url => { - let directory = "freshsales"; - Object.keys(urlDirectoryMap).forEach(key => { - if (url.includes(key)) { - directory = urlDirectoryMap[key]; - } - }); - if (directory) { - const dataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${directory}/response.json`) - ); - const data = JSON.parse(dataFile); - return data[url]; - } - return {}; -}; - -const freshsalesPostRequestHandler = (url, payload) => { - const mockData = getData(url); - if (mockData) { - return { - data: mockData, - status: 200 - }; - } - return new Promise((resolve, reject) => { - resolve({ error: "Request failed", status: 404 }); - }); -}; - -const freshsalesGetRequestHandler = url => { - const mockData = getData(url); - if (mockData) { - //resolve with status 200 - return Promise.resolve({ data: mockData, status: 200 }); - } - return new Promise((resolve, reject) => { - resolve({ error: "Request failed", status: 404 }); - }); -}; - -module.exports = { - freshsalesPostRequestHandler, - freshsalesGetRequestHandler -}; diff --git a/test/__mocks__/gainsight.mock.js b/test/__mocks__/gainsight.mock.js deleted file mode 100644 index 38ff21ebfd..0000000000 --- a/test/__mocks__/gainsight.mock.js +++ /dev/null @@ -1,33 +0,0 @@ -const fs = require("fs"); -const path = require("path"); - -const responseJson = fs.readFileSync( - path.resolve(__dirname, "./data/gainsight/response.json") -); -const responseData = JSON.parse(responseJson); - -// mock companies that exist in db -const companyNamesList = ["Seinfeld Corps", "Mr.Robot", "The Office"]; - -/** - * Single function to return mock data - * for all axios calls. - */ -const gainsightRequestHandler = (url, payload) => { - if (Object.keys(responseData).includes(url)) { - // for company lookup - if (payload.select && payload.where) { - const name = payload.where.conditions[0].value[0]; - if (companyNamesList.includes(name)) { - const resp = responseData[url]; - resp.data.records = [{ Name: name }]; - return { data: resp, status: 200 }; - } - return { data: responseData[url], status: 200 }; - } - return { data: responseData[url], status: 200 }; - } - return { error: "request failed: url not found in mock" }; -}; - -module.exports = gainsightRequestHandler; diff --git a/test/__mocks__/gainsight_px.mock.js b/test/__mocks__/gainsight_px.mock.js deleted file mode 100644 index bcd3a171fe..0000000000 --- a/test/__mocks__/gainsight_px.mock.js +++ /dev/null @@ -1,23 +0,0 @@ -const gainsightPXGetRequestHandler = (url, mockData) => { - if (url.includes("absent-id")) { - const errResponse = { - response: { - data: { - externalapierror: { - status: "NOT_FOUND", - message: "User was not found for parameters {id=absent-id}", - debugMessage: null, - subErrors: null - } - }, - status: 404 - } - }; - return Promise.reject(errResponse); - } - return Promise.resolve({ data: mockData, status: 200 }); -}; - -module.exports = { - gainsightPXGetRequestHandler -}; diff --git a/test/__mocks__/hs.mock.js b/test/__mocks__/hs.mock.js deleted file mode 100644 index ae88ed776b..0000000000 --- a/test/__mocks__/hs.mock.js +++ /dev/null @@ -1,123 +0,0 @@ -const hsGetRequestHandler = (url, mockData) => { - if (url.includes("invalid-api-key")) { - return Promise.reject({ - response: { - data: { - status: "error", - message: - "The API key provided is invalid. View or manage your API key here: https://app.hubspot.com/l/api-key/", - correlationId: "4d39ff11-e121-4514-bcd8-132a9dd1ff50", - category: "INVALID_AUTHENTICATION", - links: { - "api key": "https://app.hubspot.com/l/api-key/" - } - }, - status: 401 - } - }); - } - if (url.includes("rate-limit-id")) { - return Promise.reject({ - response: { - data: { - status: "error", - message: "Request Rate Limit reached", - correlationId: "4d39ff11-e121-4514-bcd8-132a9dd1ff50", - category: "RATE-LIMIT_REACHED", - links: { - "api key": "https://app.hubspot.com/l/api-key/" - } - }, - status: 429 - } - }); - } - if (mockData) { - //resolve with status 200 - return Promise.resolve({ data: mockData, status: 200 }); - } else { - return Promise.reject({ - response: { - data: { - status: "error", - message: "404 not found", - correlationId: "4d39ff11-e121-4514-bcd8-132a9dd1ff50", - category: "DATA_NOT_DOUND", - links: { - "api key": "https://app.hubspot.com/l/api-key/" - } - }, - status: 404 - } - }); - } -}; - -const hsPostRequestHandler = (payload, mockData) => { - if (payload.filterGroups[0].filters[0].value === "noname@email.com") { - // no contact found for noname@gmail.com (email) - return Promise.resolve({ - data: { - total: 0, - results: [] - }, - status: 200 - }); - } else if (payload.filterGroups[0].filters[0].value === "Jhon") { - // multiple contact found for Jhon (firstname) - return Promise.resolve({ - data: { - total: 2, - results: [ - { - id: "103601", - properties: { - createdate: "2022-07-14T15:25:08.975Z", - email: "testhubspot8@email.com", - firstname: "Alex", - hs_object_id: "103601", - lastmodifieddate: "2022-07-14T15:26:49.590Z" - }, - createdAt: "2022-07-14T15:25:08.975Z", - updatedAt: "2022-07-14T15:26:49.590Z", - archived: false - }, - { - id: "103602", - properties: { - createdate: "2022-07-14T15:27:08.975Z", - email: "testhubspot9@email.com", - firstname: "Jhon", - hs_object_id: "103602", - lastmodifieddate: "2022-07-14T15:28:49.590Z" - }, - createdAt: "2022-07-14T15:27:08.975Z", - updatedAt: "2022-07-14T15:28:49.590Z", - archived: false - } - ] - }, - status: 200 - }); - } else if (mockData) { - //resolve with status 200 - return Promise.resolve({ data: mockData, status: 200 }); - } - - return Promise.reject({ - response: { - data: { - status: "error", - message: "404 not found", - correlationId: "4d39ff11-e121-4514-bcd8-132a9dd1ff50", - category: "DATA_NOT_DOUND", - links: { - "api key": "https://app.hubspot.com/l/api-key/" - } - }, - status: 404 - } - }); -}; - -module.exports = { hsGetRequestHandler, hsPostRequestHandler }; diff --git a/test/__mocks__/klaviyo.mock.js b/test/__mocks__/klaviyo.mock.js deleted file mode 100644 index 020387d1f2..0000000000 --- a/test/__mocks__/klaviyo.mock.js +++ /dev/null @@ -1,39 +0,0 @@ -const klaviyoPostRequestHandler = (url, payload) => { - switch (url) { - case 'https://a.klaviyo.com/api/v2/list/XUepkK/subscribe': - //resolve with status 200 - return { data: payload, status: 200 }; - case 'https://a.klaviyo.com/api/v2/list/XUepkK/members': - //resolve with status 200 - return { data: payload, status: 200 }; - case 'https://a.klaviyo.com/api/profiles': - if (payload.data.attributes.email === "test3@rudderstack.com") { - return { - status: 409, - data: { - } - }; - } - return { - status: 201, - data: { - data: { - id: '01GW3PHVY0MTCDGS0A1612HARX', - attributes: {} - }, - } - }; - default: - return new Promise((resolve, reject) => { - if (payload) { - resolve({ data: payload }); - } else { - resolve({ error: 'Request failed' }); - } - }); - } -}; - -module.exports = { - klaviyoPostRequestHandler, -}; diff --git a/test/__mocks__/kustomer.mock.js b/test/__mocks__/kustomer.mock.js deleted file mode 100644 index 0a1187595d..0000000000 --- a/test/__mocks__/kustomer.mock.js +++ /dev/null @@ -1,142 +0,0 @@ -const storedPayload = { - data: { - type: "customer", - id: "58210c3db0f09110006b7953", - attributes: { - name: "AnnoD", - displayName: "AnnoD", - displayColor: "yellow", - displayIcon: "flower", - externalId: "annodD", - externalIds: [ - { - externalId: "annodD", - verified: true, - id: null - } - ], - sharedExternalIds: [], - signedUpAt: null, - avatarUrl: null, - username: null, - emails: [ - { - email: "annod@kustomer.com", - verified: true, - type: "home", - id: null - } - ], - sharedEmails: [ - { - email: "annod@kustomer.com", - verified: false, - type: "home", - id: null - } - ], - phones: [], - sharedPhones: [], - socials: [], - sharedSocials: [], - urls: [], - locations: [], - activeUsers: [], - watchers: [], - recentLocation: { - updatedAt: "2016-11-07T23:22:01.746Z" - }, - locale: null, - timeZone: null, - birthdayAt: null, - gender: null, - presence: "offline", - createdAt: "2016-11-07T23:20:29.080Z", - updatedAt: "2016-11-09T04:47:07.036Z", - modifiedAt: "2016-11-09T04:47:07.036Z", - lastSeenAt: "2016-11-07T23:23:51.582Z", - lastActivityAt: "2016-11-09T04:47:07.036Z", - lastCustomerActivityAt: "2016-11-07T23:23:51.582Z", - lastMessageIn: { - sentAt: "2016-11-07T23:22:02.281Z", - sentiment: null - }, - lastConversation: { - id: "58210c99b0f09110006b7969", - sentiment: { - confidence: 0.649023, - polarity: 1 - }, - tags: [] - }, - conversationCounts: { - all: 3, - snoozed: 0, - open: 2, - done: 1 - }, - preview: { - previewAt: "2016-11-07T23:23:26.039Z", - type: "message_out", - text: "dfsd fsdsfdsfdsf", - subject: "Hi, do you guys have an XXL hoodie" - }, - tags: [], - sentiment: { - polarity: 1, - confidence: 0.649023 - }, - progressiveStatus: "open", - verified: true, - rev: 37 - }, - relationships: { - org: { - links: { - self: "/v1/orgs/57f29863a1dbf61100e6aa92" - }, - data: { - type: "org", - id: "57f29863a1dbf61100e6aa92" - } - }, - messages: { - links: { - self: "/v1/customers/58210c3db0f09110006b7953/messages" - } - }, - modifiedBy: { - links: { - self: "/v1/users/58190b991f2932100010d683" - }, - data: { - type: "user", - id: "58190b991f2932100010d683" - } - } - }, - links: { - self: "/v1/customers/58210c3db0f09110006b7953" - } - } -}; - -const kustomerGetRequestHandler = url => { - switch (url) { - case "https://api.kustomerapp.com/v1/customers/externalId=annodD": - //resolve with status 200 - return { data: storedPayload, status: 200 }; - case "https://api.kustomerapp.com/v1/customers/externalId=58210c3db0f09110006b7953": - //resolve with status 200 - return { data: storedPayload, status: 200 }; - case "https://api.prod2.kustomerapp.com/v1/customers/externalId=58210c3db0f09110006b7953": - //resolve with status 200 - return { data: storedPayload, status: 200 }; - default: - return new Promise((resolve, reject) => { - resolve({ error: "Request failed", status: 404 }); - }); - } -}; - -module.exports = kustomerGetRequestHandler; diff --git a/test/__mocks__/mailchimp.mock.js b/test/__mocks__/mailchimp.mock.js deleted file mode 100644 index e52814c822..0000000000 --- a/test/__mocks__/mailchimp.mock.js +++ /dev/null @@ -1,49 +0,0 @@ -const fs = require("fs"); -const path = require("path"); - -const urlDirectoryMap = { - "api.mailchimp.com": "mailchimp" -}; - -const getData = url => { - let directory = ""; - Object.keys(urlDirectoryMap).forEach(key => { - if (url.includes(key)) { - directory = urlDirectoryMap[key]; - } - }); - if (directory) { - const dataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${directory}/response.json`) - ); - const data = JSON.parse(dataFile); - return data[url]; - } - return {}; -}; - -const mailchimpGetRequestHandler = url => { - const mockData = getData(url); - if (mockData) { - if ( - url === - "https://usXX.api.mailchimp.com/3.0/lists/aud111/members/48cd6232dc124497369f59c33d3eb4ab" - ) { - return { data: mockData, status: 200 }; - } else if (url === "https://usXX.api.mailchimp.com/3.0/lists/aud111") { - return { data: mockData, status: 200 }; - } else if (url === "https://usXX.api.mailchimp.com/3.0/lists/aud112") { - return { data: mockData, status: 200 }; - } else { - return new Promise((resolve, reject) => { - reject({ error: "Request failed", status: mockData.status }); - }); - } - } else { - return new Promise((resolve, reject) => { - reject({ error: "Request failed", status: 404 }); - }); - } -}; - -module.exports = mailchimpGetRequestHandler; diff --git a/test/__mocks__/monday.mock.js b/test/__mocks__/monday.mock.js deleted file mode 100644 index 0a9eb627be..0000000000 --- a/test/__mocks__/monday.mock.js +++ /dev/null @@ -1,32 +0,0 @@ -const fs = require("fs"); -const path = require("path"); - -const getData = payload => { - const dataFile = fs.readFileSync( - path.resolve(__dirname, `./data/monday/response.json`) - ); - const data = JSON.parse(dataFile); - const boardId = payload.query.substring(21,30); - return data[boardId]; -}; - -const mondayPostRequestHandler = payload => { - const mockData = getData(payload); - if (mockData) { - return { data: mockData, status: 200 }; - } - return new Promise((resolve, reject) => { - reject({ - response: { - data: { - error: "Not found", - status: 404 - } - } - }); - }); -}; - -module.exports = { - mondayPostRequestHandler -}; diff --git a/test/__mocks__/profitwell.mock.js b/test/__mocks__/profitwell.mock.js deleted file mode 100644 index 5dce8fbe75..0000000000 --- a/test/__mocks__/profitwell.mock.js +++ /dev/null @@ -1,16 +0,0 @@ -const profitwellGetRequestHandler = (url, payload) => { - if (url === "https://api.profitwell.com/v2/users/pwu_Oea7HXV3bnTP/") - return Promise.resolve({ data: payload, status: 200 }); - else if (url === "https://api.profitwell.com/v2/users/spiderman_1a/") { - return Promise.resolve({ data: payload, status: 200 }); - } - return Promise.reject({ - response: { - message: "Request failed with status code 404", - status: 404, - statusText: "Not Found" - } - }); -}; - -module.exports = profitwellGetRequestHandler; diff --git a/test/__mocks__/sendinblue.mock.js b/test/__mocks__/sendinblue.mock.js deleted file mode 100644 index 53b3e84677..0000000000 --- a/test/__mocks__/sendinblue.mock.js +++ /dev/null @@ -1,23 +0,0 @@ -const sendinblueGetRequestHandler = (url, mockData) => { - if ( - url === - "https://api.sendinblue.com/v3/contacts/gordon_pittman%40example.com" || - url === "https://api.sendinblue.com/v3/contacts/42" - ) { - return { data: mockData, status: 200 }; - } - - return Promise.reject({ - response: { - data: { - code: "document_not_found", - message: "Contact does not exist" - }, - status: 404 - } - }); -}; - -module.exports = { - sendinblueGetRequestHandler -}; diff --git a/test/__mocks__/wootric.mock.js b/test/__mocks__/wootric.mock.js deleted file mode 100644 index 0a1519f1d2..0000000000 --- a/test/__mocks__/wootric.mock.js +++ /dev/null @@ -1,55 +0,0 @@ -const fs = require("fs"); -const path = require("path"); - -const urlDirectoryMap = { - "api.wootric.com": "wootric" -}; - -const getData = url => { - let directory = ""; - Object.keys(urlDirectoryMap).forEach(key => { - if (url.includes(key)) { - directory = urlDirectoryMap[key]; - } - }); - if (directory) { - const dataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${directory}/response.json`) - ); - const data = JSON.parse(dataFile); - return data[url]; - } - return {}; -}; - -const wootricGetRequestHandler = url => { - const mockData = getData(url); - if (mockData) { - return { data: mockData, status: 200 }; - } - return new Promise((resolve, reject) => { - resolve({ error: "Request failed", status: 404 }); - }); -}; - -const wootricPostRequestHandler = (url, payload) => { - const mockData = getData(url); - if (mockData) { - return { data: mockData, status: 200 }; - } - return new Promise((resolve, reject) => { - reject({ - response: { - data: { - error: "Not found", - status: 404 - } - } - }); - }); -}; - -module.exports = { - wootricGetRequestHandler, - wootricPostRequestHandler -}; diff --git a/test/__tests__/amplitude.test.js b/test/__tests__/amplitude.test.js deleted file mode 100644 index 2b7c46f0b5..0000000000 --- a/test/__tests__/amplitude.test.js +++ /dev/null @@ -1,124 +0,0 @@ -const integration = "am"; -const name = "Amplitude"; - -const fs = require("fs"); -const path = require("path"); -const mockedEnv = require("mocked-env"); - -const version = "v0"; - -const transformer = require(`../../src/${version}/destinations/${integration}/transform`); -// const { compareJSON } = require("./util"); - -const inputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_input.json`) -); -const outputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_output.json`) -); - -const batchInputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_batch_input.json`) -); -const batchOutputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_batch_output.json`) -); -const inputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_input.json`) -); -const outputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_output.json`) -); -const inputRouterData = JSON.parse(inputRouterDataFile); -const expectedRouterData = JSON.parse(outputRouterDataFile); - -const inputData = JSON.parse(inputDataFile); -const expectedData = JSON.parse(outputDataFile); - -inputData.forEach((input, index) => { - test(`${name} Tests ${input.message.type}: payload - ${index}`, () => { - try { - const output = transformer.process(input); - if (output.length > 1) { - expect(output).toEqual(expectedData[index]); - } else { - expect(output).toEqual([expectedData[index]]); - } - } catch (error) { - expect(error.message).toEqual(expectedData[index].error); - } - }); -}); - -const batchInputData = JSON.parse(batchInputDataFile); -const batchExpectedData = JSON.parse(batchOutputDataFile); - -batchInputData.forEach((input, index) => { - if (index < batchInputData.length - 2) { - test(`test batching ${index}`, () => { - const output = transformer.batch(input); - expect(Array.isArray(output)).toEqual(true); - expect(output.length).toEqual(batchExpectedData[index].length); - output.forEach((input, indexInner) => { - expect(output[indexInner]).toEqual( - batchExpectedData[index][indexInner] - ); - }); - }); - } -}); - -let restore = mockedEnv({ - BATCH_NOT_MET_CRITERIA_USER: "true" -}); - -test(`test batching ${batchInputData.length - 2}`, () => { - // reset module and load in new transformer with added env - jest.resetModules(); - expect(process.env.BATCH_NOT_MET_CRITERIA_USER).toEqual("true"); - const transformerNew = require(`../../src/${version}/destinations/${integration}/transform`); - const output = transformerNew.batch( - batchInputData[batchInputData.length - 2] - ); - expect(Array.isArray(output)).toEqual(true); - expect(output.length).toEqual( - batchExpectedData[batchExpectedData.length - 2].length - ); - output.forEach((input, indexInner) => { - expect(output[indexInner]).toEqual( - batchExpectedData[batchExpectedData.length - 2][indexInner] - ); - }); -}); - -restore = mockedEnv({ - BATCH_NOT_MET_CRITERIA_USER: "true" -}); - -test(`test batching ${batchInputData.length - 1}`, () => { - // reset module and load in new transformer with added env - jest.resetModules(); - expect(process.env.BATCH_NOT_MET_CRITERIA_USER).toEqual("true"); - const transformerNew = require(`../../src/${version}/destinations/${integration}/transform`); - const output = transformerNew.batch( - batchInputData[batchInputData.length - 1] - ); - expect(Array.isArray(output)).toEqual(true); - expect(output.length).toEqual( - batchExpectedData[batchExpectedData.length - 1].length - ); - output.forEach((input, indexInner) => { - expect(output[indexInner]).toEqual( - batchExpectedData[batchExpectedData.length - 1][indexInner] - ); - }); -}); - -describe(`${name} Tests`, () => { - describe("Router Tests", () => { - it("Payload", async () => { - const routerOutput = await transformer.processRouterDest(inputRouterData); - expect(routerOutput).toEqual(expectedRouterData); - }); - }); -}); diff --git a/test/__tests__/bingads_audience-cdk.test.ts b/test/__tests__/bingads_audience-cdk.test.ts deleted file mode 100644 index 577ac952d1..0000000000 --- a/test/__tests__/bingads_audience-cdk.test.ts +++ /dev/null @@ -1,60 +0,0 @@ -import fs from 'fs'; -import path from 'path'; -import { - processCdkV2Workflow, - executeStep, - getCachedWorkflowEngine, - getEmptyExecutionBindings, -} from '../../src/cdk/v2/handler'; -import tags from '../../src/v0/util/tags'; -import { data as stepsTestData } from './data/bingads_audience_steps'; - -const integration = 'bingads_audience'; -const destName = 'BingAds Audience'; - -// Processor Test files -const processorTestDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}.json`), - { - encoding: 'utf8', - }, -); -const processorTestData = JSON.parse(processorTestDataFile); - -describe(`${destName} Tests`, () => { - describe('Processor Tests', () => { - processorTestData.forEach((dataPoint, index) => { - it(`${destName} processor payload: ${index}`, async () => { - try { - const output = await processCdkV2Workflow( - integration, - dataPoint.input, - tags.FEATURES.PROCESSOR, - ); - expect(output).toEqual(dataPoint.output); - } catch (error: any) { - expect(error.message).toEqual(dataPoint.output.error); - } - }); - }); - }); - - describe('Step Tests', () => { - stepsTestData.forEach((dataPoint, index) => { - it(`${destName} steps payload: ${index}`, async () => { - const workflowEngine = await getCachedWorkflowEngine(integration, tags.FEATURES.PROCESSOR); - try { - const output = await executeStep( - workflowEngine, - dataPoint.stepName, - dataPoint.input, - dataPoint.bindings, - ); - expect(output.output).toEqual(dataPoint.output); - } catch (error: any) { - expect(error.message).toEqual(dataPoint.error); - } - }); - }); - }); -}); diff --git a/test/__tests__/braze.test.js b/test/__tests__/braze.test.js deleted file mode 100644 index c1d317c6ba..0000000000 --- a/test/__tests__/braze.test.js +++ /dev/null @@ -1,76 +0,0 @@ -const cloneDeep = require('lodash/cloneDeep'); -const integration = "braze"; -const name = "Braze"; - -const fs = require("fs"); -const path = require("path"); - -const version = "v0"; - -const { FEATURE_FILTER_CODE } = require('../../src/v0/util/constant'); -const transformer = require(`../../src/${version}/destinations/${integration}/transform`); -const inputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_input.json`) -); -const outputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_output.json`) -); -const inputData = JSON.parse(inputDataFile); -const expectedData = JSON.parse(outputDataFile); - -inputData.forEach((input, index) => { - it(`${name} Tests: payload - ${index}`, async () => { - let output1, output2, output3, expected; - try { - // default reqMetadata - output1 = await transformer.process(cloneDeep(input)); - // null reqMetadata - output2 = await transformer.process(cloneDeep(input), { userStore: new Map() }, null); - // undefined reqMetadata - output3 = await transformer.process(cloneDeep(input), { userStore: new Map() }, undefined); - expected = expectedData[index]; - } catch (error) { - output1 = error.message; - output2 = error.message; - output3 = error.message; - expected = expectedData[index].message; - } - expect(output1).toEqual(expected); - expect(output2).toEqual(expected); - expect(output3).toEqual(expected); - }); -}); - -// Router Test Data -const routerTestDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router.json`) -); -const routerTestData = JSON.parse(routerTestDataFile); -const { simpleRouterTestData, dedupEnabledRouterTestData } = routerTestData; - -describe(`${name} Tests`, () => { - describe("Simple Router Tests", () => { - simpleRouterTestData.forEach((dataPoint, index) => { - it(`${index}. ${integration} - ${dataPoint.description}`, async () => { - const output = await transformer.processRouterDest(dataPoint.input); - expect(output).toEqual(dataPoint.output); - }); - }); - }); - describe("Dedupenabled Router Tests", () => { - dedupEnabledRouterTestData.forEach((dataPoint, index) => { - it(`${index}. ${integration} - ${dataPoint.description}`, async () => { - // default reqMetadata - const oldTransformerOutput = await transformer.processRouterDest(cloneDeep(dataPoint.input)); - // valid reqMetadata - const newTransformerOutput = await transformer.processRouterDest(cloneDeep(dataPoint.input), { features: { [FEATURE_FILTER_CODE]: true } }); - // invalid reqMetadata - const invalidRequestMetadataOutput = await transformer.processRouterDest(cloneDeep(dataPoint.input), [{ features: { [FEATURE_FILTER_CODE]: true } }]); - - expect(oldTransformerOutput).toEqual(dataPoint.oldTransformerOutput); - expect(newTransformerOutput).toEqual(dataPoint.newTransformerOutput); - expect(invalidRequestMetadataOutput).toEqual(dataPoint.oldTransformerOutput); - }); - }); - }); -}); diff --git a/test/__tests__/clevertap.test.js b/test/__tests__/clevertap.test.js deleted file mode 100644 index 1a07c2f6bc..0000000000 --- a/test/__tests__/clevertap.test.js +++ /dev/null @@ -1,49 +0,0 @@ -const integration = "clevertap"; -const name = "Clever Tap"; - -const fs = require("fs"); -const path = require("path"); - -const version = "v0"; - -const transformer = require(`../../src/${version}/destinations/${integration}/transform`); -const inputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_input.json`) -); -const outputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_output.json`) -); -const inputData = JSON.parse(inputDataFile); -const expectedData = JSON.parse(outputDataFile); - -// Router Test Data -const inputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_input.json`) -); -const outputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_output.json`) -); -const inputRouterData = JSON.parse(inputRouterDataFile); -const expectedRouterData = JSON.parse(outputRouterDataFile); - -describe(`${name} Tests`, () => { - describe("Processor Tests", () => { - inputData.forEach((input, index) => { - it(`${name} - payload: ${index}`, async () => { - try { - const output = await transformer.process(input); - expect(output).toEqual(expectedData[index]); - } catch (error) { - expect(error.message).toEqual(expectedData[index].error); - } - }); - }); - }); - - describe("Router Tests", () => { - it("Payload", async () => { - const routerOutput = await transformer.processRouterDest(inputRouterData, {namespace: 'unknown', cluster: 'unknown'}); - expect(routerOutput).toEqual(expectedRouterData); - }); - }); -}); diff --git a/test/__tests__/clickup.test.js b/test/__tests__/clickup.test.js deleted file mode 100644 index 8890d6050b..0000000000 --- a/test/__tests__/clickup.test.js +++ /dev/null @@ -1,47 +0,0 @@ -const integration = "clickup"; -const name = "ClickUp"; - -const fs = require("fs"); -const path = require("path"); - -const version = "v0"; - -const transformer = require(`../../src/${version}/destinations/${integration}/transform`); - -// Processor Test files -const testDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}.json`) -); -const testData = JSON.parse(testDataFile); - -// Router Test files -const inputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_input.json`) -); -const outputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_output.json`) -); -const inputRouterData = JSON.parse(inputRouterDataFile); -const expectedRouterData = JSON.parse(outputRouterDataFile); - -describe(`${name} Tests`, () => { - describe("Processor", () => { - testData.forEach(async (dataPoint, index) => { - it(`${index}. ${integration} - ${dataPoint.description}`, async () => { - try { - const output = await transformer.process(dataPoint.input); - expect(output).toEqual(dataPoint.output); - } catch (error) { - expect(error.message).toEqual(dataPoint.output.error); - } - }); - }); - }); - - describe("Router", () => { - it("Payload", async () => { - const routerOutput = await transformer.processRouterDest(inputRouterData); - expect(routerOutput).toEqual(expectedRouterData); - }); - }); -}); diff --git a/test/__tests__/custify.test.js b/test/__tests__/custify.test.js deleted file mode 100644 index a4c55a5504..0000000000 --- a/test/__tests__/custify.test.js +++ /dev/null @@ -1,47 +0,0 @@ -const integration = "custify"; -const name = "Custify"; - -const fs = require("fs"); -const path = require("path"); - -const version = "v0"; - -const transformer = require(`../../src/${version}/destinations/${integration}/transform`); - -// Processor Test files -const testDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}.json`) -); -const testData = JSON.parse(testDataFile); - -// Router Test files -const inputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_input.json`) -); -const outputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_output.json`) -); -const inputRouterData = JSON.parse(inputRouterDataFile); -const expectedRouterData = JSON.parse(outputRouterDataFile); - -describe(`${name} Tests`, () => { - describe("Processor", () => { - testData.forEach(async (dataPoint, index) => { - it(`${index}. ${integration} - ${dataPoint.description}`, async () => { - try { - const output = await transformer.process(dataPoint.input); - expect(output).toEqual(dataPoint.output); - } catch (error) { - expect(error.message).toEqual(dataPoint.output.error); - } - }); - }); - }); - - describe("Router", () => { - it("Payload", async () => { - const routerOutput = await transformer.processRouterDest(inputRouterData); - expect(routerOutput).toEqual(expectedRouterData); - }); - }); -}); diff --git a/test/__tests__/data/am_batch_input.json b/test/__tests__/data/am_batch_input.json deleted file mode 100644 index 5b0440babf..0000000000 --- a/test/__tests__/data/am_batch_input.json +++ /dev/null @@ -1,1919 +0,0 @@ -[ - [ - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "ip": "0.0.0.0", - "time": 1603132665557, - "os_name": "", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "library": "rudderstack", - "event_type": "$identify", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "user_properties": { - "name": "some campaign", - "plan": "Open source", - "term": "keyword", - "test": "other value", - "email": "test@rudderstack.com", - "logins": 5, - "medium": "medium", - "source": "google", - "content": "some content", - "category": "SampleIdentify", - "createdAt": 1599264000 - } - } - ], - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "options": { - "min_id_length": 1 - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api.eu.amplitude.com/2/httpapi" - }, - "metadata": { - "job_id": 1 - }, - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "EU" - } - } - } - ], - [ - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "ip": "0.0.0.0", - "time": 1603132665557, - "os_name": "", - "user_id": "123", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "$identify", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "user_properties": { - "name": "some campaign", - "plan": "Open source", - "term": "keyword", - "test": "other value", - "email": "test@rudderstack.com", - "logins": 5, - "medium": "medium", - "source": "google", - "content": "some content", - "category": "SampleIdentify", - "createdAt": 1599264000 - } - } - ], - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "options": { - "min_id_length": 1 - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api.eu.amplitude.com/2/httpapi" - }, - "metadata": { - "job_id": 1 - }, - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "EU" - } - } - }, - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "ip": "[::1]", - "time": 1603132712347, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "Simple track call", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "event_properties": { - "key": "val" - } - } - ], - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "options": { - "min_id_length": 1 - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api2.amplitude.com/2/httpapi" - }, - "metadata": { - "job_id": 2 - }, - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "ip": "[::1]", - "time": 1603132719505, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "Simple track call", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "event_properties": { - "key": "val" - } - } - ], - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "options": { - "min_id_length": 1 - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api2.amplitude.com/2/httpapi" - }, - "metadata": { - "job_id": 3 - }, - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "ip": "[::1]", - "time": 1603132726413, - "groups": { - "Company": "Comapny-ABC" - }, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "$identify", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "user_properties": { - "Company": "Comapny-ABC" - } - } - ], - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "options": { - "min_id_length": 1 - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api2.amplitude.com/2/httpapi" - }, - "metadata": { - "job_id": 4 - }, - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "ip": "[::1]", - "time": 1603132726413, - "groups": { - "Company": "Comapny-ABC" - }, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "$identify", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "user_properties": { - "Company": "Comapny-ABC" - } - } - ], - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "options": { - "min_id_length": 1 - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api2.amplitude.com/2/httpapi" - }, - "metadata": { - "job_id": 5 - }, - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "identification": [ - "{\"group_type\":\"Company\",\"group_value\":\"Comapny-ABC\",\"group_properties\":{\"KEY_2\":{\"CHILD_KEY_102\":\"value_103\",\"CHILD_KEY_92\":\"value_95\"},\"KEY_3\":{\"CHILD_KEY_102\":\"value_103\",\"CHILD_KEY_92\":\"value_95\"},\"name_trait\":\"Company\",\"value_trait\":\"Comapny-ABC\"}}" - ] - }, - "JSON": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": {}, - "version": "1", - "endpoint": "https://api2.amplitude.com/groupidentify" - }, - "metadata": { - "job_id": 6 - }, - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "mapping": ["{\"global_user_id\":\"newUserIdAlias\",\"user_id\":\"sampleusrRudder3\"}"] - }, - "JSON": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": {}, - "version": "1", - "endpoint": "https://api2.amplitude.com/usermap" - }, - "metadata": { - "job_id": 7 - }, - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - } - ], - [ - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": { - "ip": "0.0.0.0", - "time": 1603132665557, - "os_name": "", - "user_id": "123", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "$identify", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "user_properties": { - "name": "some campaign", - "plan": "Open source", - "term": "keyword", - "test": "other value", - "email": "test@rudderstack.com", - "logins": 5, - "medium": "medium", - "source": "google", - "content": "some content", - "category": "SampleIdentify", - "createdAt": 1599264000 - } - }, - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "options": { - "min_id_length": 1 - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api2.amplitude.com/2/httpapi" - }, - "metadata": { - "job_id": 1 - }, - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": { - "ip": "[::1]", - "time": 1603132712347, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "Simple track call", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "event_properties": { - "key": "val" - } - }, - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "options": { - "min_id_length": 1 - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api2.amplitude.com/2/httpapi" - }, - "metadata": { - "job_id": 2 - }, - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": { - "ip": "[::1]", - "time": 1603132719505, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "Simple track call", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "event_properties": { - "key": "val" - } - }, - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "options": { - "min_id_length": 1 - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api2.amplitude.com/2/httpapi" - }, - "metadata": { - "job_id": 3 - }, - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": { - "ip": "[::1]", - "time": 1603132726413, - "groups": { - "Company": "Comapny-ABC" - }, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "$identify", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "user_properties": { - "Company": "Comapny-ABC" - } - }, - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "options": { - "min_id_length": 1 - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api2.amplitude.com/2/httpapi" - }, - "metadata": { - "job_id": 4 - }, - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": { - "ip": "[::1]", - "time": 1603132726413, - "groups": { - "Company": "Comapny-ABC" - }, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "$identify", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "user_properties": { - "Company": "Comapny-ABC" - } - }, - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "options": { - "min_id_length": 1 - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api2.amplitude.com/2/httpapi" - }, - "metadata": { - "job_id": 5 - }, - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "identification": [ - "{\"group_type\":\"Company\",\"group_value\":\"Comapny-ABC\",\"group_properties\":{\"KEY_2\":{\"CHILD_KEY_102\":\"value_103\",\"CHILD_KEY_92\":\"value_95\"},\"KEY_3\":{\"CHILD_KEY_102\":\"value_103\",\"CHILD_KEY_92\":\"value_95\"},\"name_trait\":\"Company\",\"value_trait\":\"Comapny-ABC\"}}" - ] - }, - "JSON": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": {}, - "version": "1", - "endpoint": "https://api2.amplitude.com/groupidentify" - }, - "metadata": { - "job_id": 6 - }, - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "mapping": ["{\"global_user_id\":\"newUserIdAlias\",\"user_id\":\"sampleusrRudder3\"}"] - }, - "JSON": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": {}, - "version": "1", - "endpoint": "https://api2.amplitude.com/usermap" - }, - "metadata": { - "job_id": 7 - }, - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - } - ], - [ - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": { - "ip": "[::1]", - "time": 1565586510909, - "carrier": "Android", - "app_name": "RudderAndroidClient", - "language": "en-US", - "device_id": "anon_id", - "library": "rudderstack", - "insert_id": "dd4c4493-a3ff-49c9-9071-6cb72e37cd55", - "event_type": "Demo Track", - "session_id": -1, - "app_version": "1.0", - "device_model": "Android SDK built for x86", - "event_properties": { - "label": "Demo Label", - "value": 5, - "category": "Demo Category" - }, - "device_manufacturer": "Google" - }, - "api_key": "afasf", - "options": { - "min_id_length": 1 - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "anon_id", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api2.amplitude.com/2/httpapi" - }, - "metadata": { - "userId": "90ca6da0-292e-4e79-9880-f8009e0ae4a3", - "jobId": 12, - "sourceId": "1fMCVYZboDlYlauh4GFsEo2JU77", - "destinationId": "1gXSYmSd7vkfFfJ4vtMCL0i43Lb", - "attemptNum": 0, - "receivedAt": "2020-10-20T23:47:29.633+05:30", - "createdAt": "2020-10-20T18:17:32.465Z" - }, - "destination": { - "ID": "1iuPwfigf4Fk5F5OBF2T3EVTGlY", - "Name": "braze dev", - "DestinationDefinition": { - "ID": "1XQoHKJnI6Uf67wN20RlvAQSUB9", - "Name": "BRAZE", - "DisplayName": "Braze", - "Config": { - "destConfig": { - "android": ["useNativeSDK"], - "defaultConfig": ["appKey", "dataCenter", "restApiKey"], - "ios": ["useNativeSDK"], - "web": ["useNativeSDK"] - }, - "excludeKeys": [], - "includeKeys": ["appKey", "dataCenter"], - "secretKeys": ["restApiKey"], - "supportedSourceTypes": [ - "android", - "ios", - "web", - "unity", - "amp", - "cloud", - "reactnative" - ] - } - }, - "Config": { - "appKey": "asdf", - "dataCenter": "asdfasdf", - "residencyServer": "standard" - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": false - } - }, - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": { - "ip": "[::1]", - "time": 1565586510909, - "carrier": "Android", - "app_name": "RudderAndroidClient", - "language": "en-US", - "device_id": "anon_id", - "library": "rudderstack", - "insert_id": "69283c05-bbe9-4aba-bb98-3f065d39cf54", - "event_type": "Demo Track", - "session_id": -1, - "app_version": "1.0", - "device_model": "Android SDK built for x86", - "event_properties": { - "label": "Demo Label", - "value": 5, - "category": "Demo Category" - }, - "device_manufacturer": "Google" - }, - "api_key": "afasf", - "options": { - "min_id_length": 1 - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "anon_id", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api2.amplitude.com/2/httpapi" - }, - "metadata": { - "userId": "90ca6da0-292e-4e79-9880-f8009e0ae4a3", - "jobId": 13, - "sourceId": "1fMCVYZboDlYlauh4GFsEo2JU77", - "destinationId": "1gXSYmSd7vkfFfJ4vtMCL0i43Lb", - "attemptNum": 0, - "receivedAt": "2020-10-20T23:47:29.914+05:30", - "createdAt": "2020-10-20T18:17:32.465Z" - }, - "destination": { - "ID": "1iuPwfigf4Fk5F5OBF2T3EVTGlY", - "Name": "braze dev", - "DestinationDefinition": { - "ID": "1XQoHKJnI6Uf67wN20RlvAQSUB9", - "Name": "BRAZE", - "DisplayName": "Braze", - "Config": { - "destConfig": { - "android": ["useNativeSDK"], - "defaultConfig": ["appKey", "dataCenter", "restApiKey"], - "ios": ["useNativeSDK"], - "web": ["useNativeSDK"] - }, - "excludeKeys": [], - "includeKeys": ["appKey", "dataCenter"], - "secretKeys": ["restApiKey"], - "supportedSourceTypes": [ - "android", - "ios", - "web", - "unity", - "amp", - "cloud", - "reactnative" - ] - } - }, - "Config": { - "appKey": "asdf", - "dataCenter": "asdfasdf", - "residencyServer": "standard" - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": false - } - }, - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": { - "ip": "[::1]", - "time": 1565586510909, - "carrier": "Android", - "app_name": "RudderAndroidClient", - "language": "en-US", - "device_id": "anon_id", - "library": "rudderstack", - "insert_id": "39f7a1fa-ff79-4fd1-a329-d637f018de7e", - "event_type": "Demo Track", - "session_id": -1, - "app_version": "1.0", - "device_model": "Android SDK built for x86", - "event_properties": { - "label": "Demo Label", - "value": 5, - "category": "Demo Category" - }, - "device_manufacturer": "Google" - }, - "api_key": "afasf", - "options": { - "min_id_length": 1 - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "anon_id", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api2.amplitude.com/2/httpapi" - }, - "metadata": { - "userId": "90ca6da0-292e-4e79-9880-f8009e0ae4a3", - "jobId": 14, - "sourceId": "1fMCVYZboDlYlauh4GFsEo2JU77", - "destinationId": "1gXSYmSd7vkfFfJ4vtMCL0i43Lb", - "attemptNum": 0, - "receivedAt": "2020-10-20T23:47:30.166+05:30", - "createdAt": "2020-10-20T18:17:32.465Z" - }, - "destination": { - "ID": "1iuPwfigf4Fk5F5OBF2T3EVTGlY", - "Name": "braze dev", - "DestinationDefinition": { - "ID": "1XQoHKJnI6Uf67wN20RlvAQSUB9", - "Name": "BRAZE", - "DisplayName": "Braze", - "Config": { - "destConfig": { - "android": ["useNativeSDK"], - "defaultConfig": ["appKey", "dataCenter", "restApiKey"], - "ios": ["useNativeSDK"], - "web": ["useNativeSDK"] - }, - "excludeKeys": [], - "includeKeys": ["appKey", "dataCenter"], - "secretKeys": ["restApiKey"], - "supportedSourceTypes": [ - "android", - "ios", - "web", - "unity", - "amp", - "cloud", - "reactnative" - ] - } - }, - "Config": { - "appKey": "asdf", - "dataCenter": "asdfasdf", - "residencyServer": "standard" - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": false - } - }, - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": { - "ip": "[::1]", - "time": 1565586510909, - "carrier": "Android", - "app_name": "RudderAndroidClient", - "language": "en-US", - "device_id": "anon_id", - "library": "rudderstack", - "insert_id": "4314aa01-46a3-4f45-b67d-debe4bc01717", - "event_type": "Demo Track", - "session_id": -1, - "app_version": "1.0", - "device_model": "Android SDK built for x86", - "event_properties": { - "label": "Demo Label", - "value": 5, - "category": "Demo Category" - }, - "device_manufacturer": "Google" - }, - "api_key": "afasf", - "options": { - "min_id_length": 1 - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "anon_id", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api2.amplitude.com/2/httpapi" - }, - "metadata": { - "userId": "90ca6da0-292e-4e79-9880-f8009e0ae4a3", - "jobId": 15, - "sourceId": "1fMCVYZboDlYlauh4GFsEo2JU77", - "destinationId": "1gXSYmSd7vkfFfJ4vtMCL0i43Lb", - "attemptNum": 0, - "receivedAt": "2020-10-20T23:47:30.424+05:30", - "createdAt": "2020-10-20T18:17:32.465Z" - }, - "destination": { - "ID": "1iuPwfigf4Fk5F5OBF2T3EVTGlY", - "Name": "braze dev", - "DestinationDefinition": { - "ID": "1XQoHKJnI6Uf67wN20RlvAQSUB9", - "Name": "BRAZE", - "DisplayName": "Braze", - "Config": { - "destConfig": { - "android": ["useNativeSDK"], - "defaultConfig": ["appKey", "dataCenter", "restApiKey"], - "ios": ["useNativeSDK"], - "web": ["useNativeSDK"] - }, - "excludeKeys": [], - "includeKeys": ["appKey", "dataCenter"], - "secretKeys": ["restApiKey"], - "supportedSourceTypes": [ - "android", - "ios", - "web", - "unity", - "amp", - "cloud", - "reactnative" - ] - } - }, - "Config": { - "appKey": "asdf", - "dataCenter": "asdfasdf", - "residencyServer": "standard" - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": false - } - }, - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": { - "ip": "[::1]", - "time": 1565586510909, - "carrier": "Android", - "app_name": "RudderAndroidClient", - "language": "en-US", - "device_id": "anon_id", - "library": "rudderstack", - "insert_id": "4d958d40-2762-44aa-bf83-d47f881bc615", - "event_type": "Demo Track", - "session_id": -1, - "app_version": "1.0", - "device_model": "Android SDK built for x86", - "event_properties": { - "label": "Demo Label", - "value": 5, - "category": "Demo Category" - }, - "device_manufacturer": "Google" - }, - "api_key": "afasf", - "options": { - "min_id_length": 1 - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "anon_id", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api2.amplitude.com/2/httpapi" - }, - "metadata": { - "userId": "90ca6da0-292e-4e79-9880-f8009e0ae4a3", - "jobId": 16, - "sourceId": "1fMCVYZboDlYlauh4GFsEo2JU77", - "destinationId": "1gXSYmSd7vkfFfJ4vtMCL0i43Lb", - "attemptNum": 0, - "receivedAt": "2020-10-20T23:47:30.668+05:30", - "createdAt": "2020-10-20T18:17:32.465Z" - }, - "destination": { - "ID": "1iuPwfigf4Fk5F5OBF2T3EVTGlY", - "Name": "braze dev", - "DestinationDefinition": { - "ID": "1XQoHKJnI6Uf67wN20RlvAQSUB9", - "Name": "BRAZE", - "DisplayName": "Braze", - "Config": { - "destConfig": { - "android": ["useNativeSDK"], - "defaultConfig": ["appKey", "dataCenter", "restApiKey"], - "ios": ["useNativeSDK"], - "web": ["useNativeSDK"] - }, - "excludeKeys": [], - "includeKeys": ["appKey", "dataCenter"], - "secretKeys": ["restApiKey"], - "supportedSourceTypes": [ - "android", - "ios", - "web", - "unity", - "amp", - "cloud", - "reactnative" - ] - } - }, - "Config": { - "appKey": "asdf", - "dataCenter": "asdfasdf", - "residencyServer": "standard" - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": false - } - } - ], - [ - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "ip": "0.0.0.0", - "time": 1603132665557, - "os_name": "", - "user_id": "123", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "$identify", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "user_properties": { - "name": "some campaign", - "plan": "Open source", - "term": "keyword", - "test": "other value", - "email": "test@rudderstack.com", - "logins": 5, - "medium": "medium", - "source": "google", - "content": "some content", - "category": "SampleIdentify", - "createdAt": 1599264000 - } - } - ], - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "options": { - "min_id_length": 1 - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api2.amplitude.com/2/httpapi" - }, - "metadata": { - "job_id": 1 - }, - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "ip": "[::1]", - "time": 1603132712347, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "Simple track call", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "event_properties": { - "key": "val" - } - } - ], - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "options": { - "min_id_length": 1 - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api2.amplitude.com/2/httpapi" - }, - "metadata": { - "job_id": 2 - }, - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "ip": "[::1]", - "time": 1603132719505, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "Simple track call", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "event_properties": { - "key": "val" - } - } - ], - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "options": { - "min_id_length": 1 - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api2.amplitude.com/2/httpapi" - }, - "metadata": { - "job_id": 3 - }, - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "ip": "[::1]", - "time": 1603132726413, - "groups": { - "Company": "Comapny-ABC" - }, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "$identify", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "user_properties": { - "Company": "Comapny-ABC" - } - } - ], - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "options": { - "min_id_length": 1 - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api2.amplitude.com/2/httpapi" - }, - "metadata": { - "job_id": 4 - }, - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "ip": "[::1]", - "time": 1603132726413, - "groups": { - "Company": "Comapny-ABC" - }, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "$identify", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "user_properties": { - "Company": "Comapny-ABC" - } - } - ], - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "options": { - "min_id_length": 1 - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api2.amplitude.com/2/httpapi" - }, - "metadata": { - "job_id": 5 - }, - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "identification": [ - "{\"group_type\":\"Company\",\"group_value\":\"Comapny-ABC\",\"group_properties\":{\"KEY_2\":{\"CHILD_KEY_102\":\"value_103\",\"CHILD_KEY_92\":\"value_95\"},\"KEY_3\":{\"CHILD_KEY_102\":\"value_103\",\"CHILD_KEY_92\":\"value_95\"},\"name_trait\":\"Company\",\"value_trait\":\"Comapny-ABC\"}}" - ] - }, - "JSON": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": {}, - "version": "1", - "endpoint": "https://api2.amplitude.com/groupidentify" - }, - "metadata": { - "job_id": 6 - }, - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "mapping": ["{\"global_user_id\":\"newUserIdAlias\",\"user_id\":\"sampleusrRudder3\"}"] - }, - "JSON": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": {}, - "version": "1", - "endpoint": "https://api2.amplitude.com/usermap" - }, - "metadata": { - "job_id": 7 - }, - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - } - ], - [ - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "ip": "0.0.0.0", - "time": 1603132665557, - "os_name": "", - "user_id": "123", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "library": "rudderstack", - "event_type": "$identify", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "user_properties": { - "name": "some campaign", - "plan": "Open source", - "term": "keyword", - "test": "other value", - "email": "test@rudderstack.com", - "logins": 5, - "medium": "medium", - "source": "google", - "content": "some content", - "category": "SampleIdentify", - "createdAt": 1599264000 - } - } - ], - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "options": { - "min_id_length": 1 - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api2.amplitude.com/2/httpapi" - }, - "metadata": { - "job_id": 1 - }, - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "ip": "[::1]", - "time": 1603132712347, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "Simple track call", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "event_properties": { - "key": "val" - } - } - ], - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "options": { - "min_id_length": 1 - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api2.amplitude.com/2/httpapi" - }, - "metadata": { - "job_id": 2 - }, - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "ip": "[::1]", - "time": 1603132719505, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "Simple track call", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "event_properties": { - "key": "val" - } - } - ], - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "options": { - "min_id_length": 1 - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api2.amplitude.com/2/httpapi" - }, - "metadata": { - "job_id": 3 - }, - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "ip": "[::1]", - "time": 1603132726413, - "groups": { - "Company": "Comapny-ABC" - }, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "$identify", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "user_properties": { - "Company": "Comapny-ABC" - } - } - ], - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "options": { - "min_id_length": 1 - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api2.amplitude.com/2/httpapi" - }, - "metadata": { - "job_id": 4 - }, - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "ip": "[::1]", - "time": 1603132726413, - "groups": { - "Company": "Comapny-ABC" - }, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "$identify", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "user_properties": { - "Company": "Comapny-ABC" - } - } - ], - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "options": { - "min_id_length": 1 - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api2.amplitude.com/2/httpapi" - }, - "metadata": { - "job_id": 5 - }, - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "identification": [ - "{\"group_type\":\"Company\",\"group_value\":\"Comapny-ABC\",\"group_properties\":{\"KEY_2\":{\"CHILD_KEY_102\":\"value_103\",\"CHILD_KEY_92\":\"value_95\"},\"KEY_3\":{\"CHILD_KEY_102\":\"value_103\",\"CHILD_KEY_92\":\"value_95\"},\"name_trait\":\"Company\",\"value_trait\":\"Comapny-ABC\"}}" - ] - }, - "JSON": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": {}, - "version": "1", - "endpoint": "https://api2.amplitude.com/groupidentify" - }, - "metadata": { - "job_id": 6 - }, - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "message": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "mapping": ["{\"global_user_id\":\"newUserIdAlias\",\"user_id\":\"sampleusrRudder3\"}"] - }, - "JSON": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": {}, - "version": "1", - "endpoint": "https://api2.amplitude.com/usermap" - }, - "metadata": { - "job_id": 7 - }, - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - } - ] -] diff --git a/test/__tests__/data/am_batch_output.json b/test/__tests__/data/am_batch_output.json deleted file mode 100644 index 32735b000f..0000000000 --- a/test/__tests__/data/am_batch_output.json +++ /dev/null @@ -1,1229 +0,0 @@ -[ - [ - { - "batched": false, - "error": "Both userId and deviceId cannot be undefined", - "metadata": { - "job_id": 1 - }, - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation" - }, - "statusCode": 400 - } - ], - [ - { - "batchedRequest": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "ip": "0.0.0.0", - "time": 1603132665557, - "os_name": "", - "user_id": "123", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "$identify", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "user_properties": { - "name": "some campaign", - "plan": "Open source", - "term": "keyword", - "test": "other value", - "email": "test@rudderstack.com", - "logins": 5, - "medium": "medium", - "source": "google", - "content": "some content", - "category": "SampleIdentify", - "createdAt": 1599264000 - } - } - ], - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "options": { - "min_id_length": 1 - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api.eu.amplitude.com/2/httpapi" - }, - "metadata": [ - { - "job_id": 1 - } - ], - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "EU" - } - } - }, - { - "batchedRequest": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "identification": [ - "{\"group_type\":\"Company\",\"group_value\":\"Comapny-ABC\",\"group_properties\":{\"KEY_2\":{\"CHILD_KEY_102\":\"value_103\",\"CHILD_KEY_92\":\"value_95\"},\"KEY_3\":{\"CHILD_KEY_102\":\"value_103\",\"CHILD_KEY_92\":\"value_95\"},\"name_trait\":\"Company\",\"value_trait\":\"Comapny-ABC\"}}" - ] - }, - "JSON": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": {}, - "version": "1", - "endpoint": "https://api2.amplitude.com/groupidentify" - }, - "metadata": [ - { - "job_id": 6 - } - ], - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "batchedRequest": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "mapping": [ - "{\"global_user_id\":\"newUserIdAlias\",\"user_id\":\"sampleusrRudder3\"}" - ] - }, - "JSON": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": {}, - "version": "1", - "endpoint": "https://api2.amplitude.com/usermap" - }, - "metadata": [ - { - "job_id": 7 - } - ], - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "batchedRequest": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "ip": "[::1]", - "time": 1603132712347, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "Simple track call", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "event_properties": { - "key": "val" - } - }, - { - "ip": "[::1]", - "time": 1603132719505, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "Simple track call", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "event_properties": { - "key": "val" - } - }, - { - "ip": "[::1]", - "time": 1603132726413, - "groups": { - "Company": "Comapny-ABC" - }, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "$identify", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "user_properties": { - "Company": "Comapny-ABC" - } - }, - { - "ip": "[::1]", - "time": 1603132726413, - "groups": { - "Company": "Comapny-ABC" - }, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "$identify", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "user_properties": { - "Company": "Comapny-ABC" - } - } - ], - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85" - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api2.amplitude.com/batch" - }, - "metadata": [ - { - "job_id": 2 - }, - { - "job_id": 3 - }, - { - "job_id": 4 - }, - { - "job_id": 5 - } - ], - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - } - ], - [ - { - "batchedRequest": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": { - "ip": "0.0.0.0", - "time": 1603132665557, - "os_name": "", - "user_id": "123", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "$identify", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "user_properties": { - "name": "some campaign", - "plan": "Open source", - "term": "keyword", - "test": "other value", - "email": "test@rudderstack.com", - "logins": 5, - "medium": "medium", - "source": "google", - "content": "some content", - "category": "SampleIdentify", - "createdAt": 1599264000 - } - }, - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "options": { - "min_id_length": 1 - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api2.amplitude.com/2/httpapi" - }, - "metadata": [ - { - "job_id": 1 - } - ], - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "batchedRequest": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "identification": [ - "{\"group_type\":\"Company\",\"group_value\":\"Comapny-ABC\",\"group_properties\":{\"KEY_2\":{\"CHILD_KEY_102\":\"value_103\",\"CHILD_KEY_92\":\"value_95\"},\"KEY_3\":{\"CHILD_KEY_102\":\"value_103\",\"CHILD_KEY_92\":\"value_95\"},\"name_trait\":\"Company\",\"value_trait\":\"Comapny-ABC\"}}" - ] - }, - "JSON": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": {}, - "version": "1", - "endpoint": "https://api2.amplitude.com/groupidentify" - }, - "metadata": [ - { - "job_id": 6 - } - ], - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "batchedRequest": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "mapping": [ - "{\"global_user_id\":\"newUserIdAlias\",\"user_id\":\"sampleusrRudder3\"}" - ] - }, - "JSON": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": {}, - "version": "1", - "endpoint": "https://api2.amplitude.com/usermap" - }, - "metadata": [ - { - "job_id": 7 - } - ], - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "batchedRequest": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "ip": "[::1]", - "time": 1603132712347, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "Simple track call", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "event_properties": { - "key": "val" - } - }, - { - "ip": "[::1]", - "time": 1603132719505, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "Simple track call", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "event_properties": { - "key": "val" - } - }, - { - "ip": "[::1]", - "time": 1603132726413, - "groups": { - "Company": "Comapny-ABC" - }, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "$identify", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "user_properties": { - "Company": "Comapny-ABC" - } - }, - { - "ip": "[::1]", - "time": 1603132726413, - "groups": { - "Company": "Comapny-ABC" - }, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "$identify", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "user_properties": { - "Company": "Comapny-ABC" - } - } - ], - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85" - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api2.amplitude.com/batch" - }, - "metadata": [ - { - "job_id": 2 - }, - { - "job_id": 3 - }, - { - "job_id": 4 - }, - { - "job_id": 5 - } - ], - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - } - ], - [ - { - "batchedRequest": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "ip": "[::1]", - "time": 1565586510909, - "carrier": "Android", - "app_name": "RudderAndroidClient", - "language": "en-US", - "device_id": "anon_id", - "library": "rudderstack", - "insert_id": "dd4c4493-a3ff-49c9-9071-6cb72e37cd55", - "event_type": "Demo Track", - "session_id": -1, - "app_version": "1.0", - "device_model": "Android SDK built for x86", - "event_properties": { - "label": "Demo Label", - "value": 5, - "category": "Demo Category" - }, - "device_manufacturer": "Google" - }, - { - "ip": "[::1]", - "time": 1565586510909, - "carrier": "Android", - "app_name": "RudderAndroidClient", - "language": "en-US", - "device_id": "anon_id", - "library": "rudderstack", - "insert_id": "69283c05-bbe9-4aba-bb98-3f065d39cf54", - "event_type": "Demo Track", - "session_id": -1, - "app_version": "1.0", - "device_model": "Android SDK built for x86", - "event_properties": { - "label": "Demo Label", - "value": 5, - "category": "Demo Category" - }, - "device_manufacturer": "Google" - }, - { - "ip": "[::1]", - "time": 1565586510909, - "carrier": "Android", - "app_name": "RudderAndroidClient", - "language": "en-US", - "device_id": "anon_id", - "library": "rudderstack", - "insert_id": "39f7a1fa-ff79-4fd1-a329-d637f018de7e", - "event_type": "Demo Track", - "session_id": -1, - "app_version": "1.0", - "device_model": "Android SDK built for x86", - "event_properties": { - "label": "Demo Label", - "value": 5, - "category": "Demo Category" - }, - "device_manufacturer": "Google" - }, - { - "ip": "[::1]", - "time": 1565586510909, - "carrier": "Android", - "app_name": "RudderAndroidClient", - "language": "en-US", - "device_id": "anon_id", - "library": "rudderstack", - "insert_id": "4314aa01-46a3-4f45-b67d-debe4bc01717", - "event_type": "Demo Track", - "session_id": -1, - "app_version": "1.0", - "device_model": "Android SDK built for x86", - "event_properties": { - "label": "Demo Label", - "value": 5, - "category": "Demo Category" - }, - "device_manufacturer": "Google" - }, - { - "ip": "[::1]", - "time": 1565586510909, - "carrier": "Android", - "app_name": "RudderAndroidClient", - "language": "en-US", - "device_id": "anon_id", - "library": "rudderstack", - "insert_id": "4d958d40-2762-44aa-bf83-d47f881bc615", - "event_type": "Demo Track", - "session_id": -1, - "app_version": "1.0", - "device_model": "Android SDK built for x86", - "event_properties": { - "label": "Demo Label", - "value": 5, - "category": "Demo Category" - }, - "device_manufacturer": "Google" - } - ], - "api_key": "afasf" - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "anon_id", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api2.amplitude.com/batch" - }, - "metadata": [ - { - "userId": "90ca6da0-292e-4e79-9880-f8009e0ae4a3", - "jobId": 12, - "sourceId": "1fMCVYZboDlYlauh4GFsEo2JU77", - "destinationId": "1gXSYmSd7vkfFfJ4vtMCL0i43Lb", - "attemptNum": 0, - "receivedAt": "2020-10-20T23:47:29.633+05:30", - "createdAt": "2020-10-20T18:17:32.465Z" - }, - { - "userId": "90ca6da0-292e-4e79-9880-f8009e0ae4a3", - "jobId": 13, - "sourceId": "1fMCVYZboDlYlauh4GFsEo2JU77", - "destinationId": "1gXSYmSd7vkfFfJ4vtMCL0i43Lb", - "attemptNum": 0, - "receivedAt": "2020-10-20T23:47:29.914+05:30", - "createdAt": "2020-10-20T18:17:32.465Z" - }, - { - "userId": "90ca6da0-292e-4e79-9880-f8009e0ae4a3", - "jobId": 14, - "sourceId": "1fMCVYZboDlYlauh4GFsEo2JU77", - "destinationId": "1gXSYmSd7vkfFfJ4vtMCL0i43Lb", - "attemptNum": 0, - "receivedAt": "2020-10-20T23:47:30.166+05:30", - "createdAt": "2020-10-20T18:17:32.465Z" - }, - { - "userId": "90ca6da0-292e-4e79-9880-f8009e0ae4a3", - "jobId": 15, - "sourceId": "1fMCVYZboDlYlauh4GFsEo2JU77", - "destinationId": "1gXSYmSd7vkfFfJ4vtMCL0i43Lb", - "attemptNum": 0, - "receivedAt": "2020-10-20T23:47:30.424+05:30", - "createdAt": "2020-10-20T18:17:32.465Z" - }, - { - "userId": "90ca6da0-292e-4e79-9880-f8009e0ae4a3", - "jobId": 16, - "sourceId": "1fMCVYZboDlYlauh4GFsEo2JU77", - "destinationId": "1gXSYmSd7vkfFfJ4vtMCL0i43Lb", - "attemptNum": 0, - "receivedAt": "2020-10-20T23:47:30.668+05:30", - "createdAt": "2020-10-20T18:17:32.465Z" - } - ], - "destination": { - "ID": "1iuPwfigf4Fk5F5OBF2T3EVTGlY", - "Name": "braze dev", - "DestinationDefinition": { - "ID": "1XQoHKJnI6Uf67wN20RlvAQSUB9", - "Name": "BRAZE", - "DisplayName": "Braze", - "Config": { - "destConfig": { - "android": [ - "useNativeSDK" - ], - "defaultConfig": [ - "appKey", - "dataCenter", - "restApiKey" - ], - "ios": [ - "useNativeSDK" - ], - "web": [ - "useNativeSDK" - ] - }, - "excludeKeys": [], - "includeKeys": [ - "appKey", - "dataCenter" - ], - "secretKeys": [ - "restApiKey" - ], - "supportedSourceTypes": [ - "android", - "ios", - "web", - "unity", - "amp", - "cloud", - "reactnative" - ] - } - }, - "Config": { - "appKey": "asdf", - "dataCenter": "asdfasdf", - "residencyServer": "standard" - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": false - } - } - ], - [ - { - "batchedRequest": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "identification": [ - "{\"group_type\":\"Company\",\"group_value\":\"Comapny-ABC\",\"group_properties\":{\"KEY_2\":{\"CHILD_KEY_102\":\"value_103\",\"CHILD_KEY_92\":\"value_95\"},\"KEY_3\":{\"CHILD_KEY_102\":\"value_103\",\"CHILD_KEY_92\":\"value_95\"},\"name_trait\":\"Company\",\"value_trait\":\"Comapny-ABC\"}}" - ] - }, - "JSON": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": {}, - "version": "1", - "endpoint": "https://api2.amplitude.com/groupidentify" - }, - "metadata": [ - { - "job_id": 6 - } - ], - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "batchedRequest": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "mapping": [ - "{\"global_user_id\":\"newUserIdAlias\",\"user_id\":\"sampleusrRudder3\"}" - ] - }, - "JSON": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": {}, - "version": "1", - "endpoint": "https://api2.amplitude.com/usermap" - }, - "metadata": [ - { - "job_id": 7 - } - ], - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "batchedRequest": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "ip": "0.0.0.0", - "time": 1603132665557, - "os_name": "", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "$identify", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "user_properties": { - "name": "some campaign", - "plan": "Open source", - "term": "keyword", - "test": "other value", - "email": "test@rudderstack.com", - "logins": 5, - "medium": "medium", - "source": "google", - "content": "some content", - "category": "SampleIdentify", - "createdAt": 1599264000 - } - }, - { - "ip": "[::1]", - "time": 1603132712347, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "Simple track call", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "event_properties": { - "key": "val" - } - }, - { - "ip": "[::1]", - "time": 1603132719505, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "Simple track call", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "event_properties": { - "key": "val" - } - }, - { - "ip": "[::1]", - "time": 1603132726413, - "groups": { - "Company": "Comapny-ABC" - }, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "$identify", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "user_properties": { - "Company": "Comapny-ABC" - } - }, - { - "ip": "[::1]", - "time": 1603132726413, - "groups": { - "Company": "Comapny-ABC" - }, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "$identify", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "user_properties": { - "Company": "Comapny-ABC" - } - } - ], - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85" - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api2.amplitude.com/batch" - }, - "metadata": [ - { - "job_id": 1 - }, - { - "job_id": 2 - }, - { - "job_id": 3 - }, - { - "job_id": 4 - }, - { - "job_id": 5 - } - ], - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - } - ], - [ - { - "batchedRequest": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "ip": "0.0.0.0", - "time": 1603132665557, - "os_name": "", - "user_id": "123", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "library": "rudderstack", - "event_type": "$identify", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "user_properties": { - "name": "some campaign", - "plan": "Open source", - "term": "keyword", - "test": "other value", - "email": "test@rudderstack.com", - "logins": 5, - "medium": "medium", - "source": "google", - "content": "some content", - "category": "SampleIdentify", - "createdAt": 1599264000 - } - } - ], - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "options": { - "min_id_length": 1 - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api2.amplitude.com/2/httpapi" - }, - "metadata": [ - { - "job_id": 1 - } - ], - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "batchedRequest": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "identification": [ - "{\"group_type\":\"Company\",\"group_value\":\"Comapny-ABC\",\"group_properties\":{\"KEY_2\":{\"CHILD_KEY_102\":\"value_103\",\"CHILD_KEY_92\":\"value_95\"},\"KEY_3\":{\"CHILD_KEY_102\":\"value_103\",\"CHILD_KEY_92\":\"value_95\"},\"name_trait\":\"Company\",\"value_trait\":\"Comapny-ABC\"}}" - ] - }, - "JSON": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": {}, - "version": "1", - "endpoint": "https://api2.amplitude.com/groupidentify" - }, - "metadata": [ - { - "job_id": 6 - } - ], - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "batchedRequest": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85", - "mapping": [ - "{\"global_user_id\":\"newUserIdAlias\",\"user_id\":\"sampleusrRudder3\"}" - ] - }, - "JSON": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": {}, - "version": "1", - "endpoint": "https://api2.amplitude.com/usermap" - }, - "metadata": [ - { - "job_id": 7 - } - ], - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - }, - { - "batchedRequest": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "ip": "[::1]", - "time": 1603132712347, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "Simple track call", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "event_properties": { - "key": "val" - } - }, - { - "ip": "[::1]", - "time": 1603132719505, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "Simple track call", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "event_properties": { - "key": "val" - } - }, - { - "ip": "[::1]", - "time": 1603132726413, - "groups": { - "Company": "Comapny-ABC" - }, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "$identify", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "user_properties": { - "Company": "Comapny-ABC" - } - }, - { - "ip": "[::1]", - "time": 1603132726413, - "groups": { - "Company": "Comapny-ABC" - }, - "os_name": "", - "user_id": "sampleusrRudder3", - "app_name": "RudderLabs JavaScript SDK", - "language": "en-US", - "device_id": "my-anonymous-id-new", - "library": "rudderstack", - "event_type": "$identify", - "os_version": "", - "session_id": -1, - "app_version": "1.1.5", - "user_properties": { - "Company": "Comapny-ABC" - } - } - ], - "api_key": "4c7ed7573eb73517ee4c26ed4bde9a85" - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "my-anonymous-id-new", - "headers": { - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api2.amplitude.com/batch" - }, - "metadata": [ - { - "job_id": 2 - }, - { - "job_id": 3 - }, - { - "job_id": 4 - }, - { - "job_id": 5 - } - ], - "destination": { - "ID": "a", - "url": "a", - "Config": { - "residencyServer": "standard" - } - } - } - ] -] \ No newline at end of file diff --git a/test/__tests__/data/am_input.json b/test/__tests__/data/am_input.json deleted file mode 100644 index 2eecfb1d2c..0000000000 --- a/test/__tests__/data/am_input.json +++ /dev/null @@ -1,4943 +0,0 @@ -[ - { - "message": { - "type": "track", - "sentAt": "2020-08-14T05:30:30.118Z", - "context": { - "source": "test", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "revenue_type": "Purchased", - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "S3": false, - "All": true - } - }, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "email", - "groupValueTrait": "age", - "trackProductsOnce": true, - "trackRevenuePerProduct": false - } - } - }, - { - "message": { - "type": "UNSUPPORTED-TYPE", - "event": "Order Completed", - "sentAt": "2020-08-14T05:30:30.118Z", - "context": {}, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": {}, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "S3": false, - "All": true - } - }, - "destination": { - "Config": { - "groupTypeTrait": "email", - "apiKey": "abcde", - "groupValueTrait": "age", - "trackProductsOnce": true, - "trackRevenuePerProduct": false - } - } - }, - { - "message": { - "event": "Order Completed", - "sentAt": "2020-08-14T05:30:30.118Z", - "context": {}, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": {}, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "S3": false, - "All": true - } - }, - "destination": { - "Config": { - "groupTypeTrait": "email", - "groupValueTrait": "age", - "trackProductsOnce": true, - "trackRevenuePerProduct": false - } - } - }, - { - "message": { - "type": "track", - "event": "Order Completed", - "sentAt": "2020-08-14T05:30:30.118Z", - "context": { - "source": "test", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "revenue_type": "Purchased", - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "S3": false, - "All": true - } - }, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "email", - "groupValueTrait": "age", - "trackProductsOnce": true, - "trackRevenuePerProduct": false - } - } - }, - { - "message": { - "type": "track", - "event": "Order Completed", - "sentAt": "2020-08-14T05:30:30.118Z", - "context": { - "source": "test", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "products": [ - { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "price": 19, - "category": "Games", - "quantity": 1, - "image_url": "https:///www.example.com/product/path.jpg", - "product_id": "507f1f77bcf86cd799439011" - }, - { - "sku": "46493-32", - "name": "Uno Card Game", - "price": 3, - "category": "Games", - "quantity": 2, - "product_id": "505bd76785ebb509fc183733" - } - ], - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "S3": false, - "All": true - } - }, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "email", - "groupValueTrait": "age", - "trackProductsOnce": true, - "trackRevenuePerProduct": false - } - } - }, - { - "message": { - "channel": "web", - "context": { - "externalId": [ - { - "id": "lynnanderson@smith.net", - "identifierType": "device_id", - "type": "AM-users" - } - ], - "mappedToDestination": "true", - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "anonymousId": "123456", - "email": "test@rudderstack.com", - "address": { - "country": "India", - "postalCode": 712136, - "state": "WB", - "street": "", - "os_version": "test os" - }, - "ip": "0.0.0.0", - "age": 26 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "traits": { - "anonymousId": "123456", - "email": "test@rudderstack.com", - "city": "kolkata", - "address": { - "country": "India", - "postalCode": 712136, - "state": "WB", - "street": "" - }, - "os_version": "test os", - "ip": "0.0.0.0", - "age": 26 - }, - "type": "identify", - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "123456", - "userId": "123456", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "metadata": { - "jobId": 2 - }, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "email", - "groupValueTrait": "age", - "traitsToIncrement": [ - { - "traits": "" - } - ] - } - } - }, - { - "message": { - "channel": "web", - "context": { - "externalId": [ - { - "id": "lynnanderson@smith.net", - "identifierType": "device_id", - "type": "AM-users" - } - ], - "mappedToDestination": "true", - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "anonymousId": "123456", - "email": "test@rudderstack.com", - "address": { - "country": "India", - "postalCode": 712136, - "state": "WB", - "street": "", - "os_version": "test os" - }, - "ip": "0.0.0.0", - "age": 26 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "traits": { - "anonymousId": "123456", - "email": "test@rudderstack.com", - "city": "kolkata", - "address": { - "country": "India", - "postalCode": 712136, - "state": "WB", - "street": "" - }, - "os_version": "test os", - "ip": "0.0.0.0", - "age": 26 - }, - "type": "identify", - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "123456", - "userId": "123456", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "metadata": { - "jobId": 2 - }, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "email", - "groupValueTrait": "age" - } - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "anonymousId": "123456", - "email": "test@rudderstack.com", - "address": { - "city": "kolkata", - "country": "India", - "postalCode": 712136, - "state": "WB", - "street": "" - }, - "ip": "0.0.0.0", - "age": 26 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "type": "identify", - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "123456", - "userId": "123456", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "email", - "groupValueTrait": "age" - } - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "test@rudderstack.com", - "anonymousId": "12345" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "request_ip": "1.1.1.1", - "type": "page", - "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T11:15:18.299Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "properties": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - }, - "integrations": { - "All": true - }, - "name": "ApplicationLoaded", - "sentAt": "2019-10-14T11:15:53.296Z" - }, - "destination": { - "Config": { - "apiKey": "abcde" - } - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "test@rudderstack.com", - "anonymousId": "12345" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "request_ip": "1.1.1.1", - "type": "page", - "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T11:15:18.299Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "properties": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - }, - "integrations": { - "All": false, - "Amplitude": { - "groups": { - "Company": "ABC" - } - } - }, - "name": "ApplicationLoaded", - "sentAt": "2019-10-14T11:15:53.296Z" - }, - "destination": { - "Config": { - "apiKey": "abcde" - } - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "test@rudderstack.com", - "anonymousId": "12345" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "type": "track", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T11:15:18.300Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "event": "test track event", - "properties": { - "user_actual_role": "system_admin", - "user_actual_id": 12345, - "user_time_spent": 50000 - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T11:15:53.296Z" - }, - "destination": { - "Config": { - "apiKey": "abcde" - } - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "address": { - "city": "Sealdah", - "country": "India", - "postalCode": 700014, - "state": "WB", - "street": "" - } - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "traits": { - "anonymousId": "123456", - "email": "test@rudderstack.com", - "address": { - "city": "kolkata", - "country": "India", - "postalCode": 712136, - "state": "WB", - "street": "" - }, - "ip": "0.0.0.0", - "age": 26 - }, - "type": "identify", - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "123456", - "userId": "123456", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "apiKey": "abcde" - } - } - }, - { - "message": { - "type": "identify", - "userId": "ubcdfghi0001", - "anonymousId": "123456", - "session_id": "1598597129", - "context": { - "traits": { - "device_id": "adddd0001", - "device_os": "ios", - "device_make": "apple iphone", - "app_version": "v1.0", - "timestamp": "2020-08-28 09:00:00" - }, - "library": { - "name": "http" - } - } - }, - "destination": { - "Config": { - "apiKey": "abcde" - } - } - }, - { - "message": { - "type": "identify", - "userId": "ubcdfghi0001", - "anonymousId": "123456", - "session_id": "user:1598597129", - "context": { - "traits": { - "device_id": "adddd0001", - "device_os": "ios", - "device_make": "apple iphone", - "app_version": "v1.0", - "timestamp": "2020-08-28 09:00:00" - }, - "library": { - "name": "http" - } - } - }, - "destination": { - "Config": { - "apiKey": "abcde" - } - } - }, - { - "message": { - "type": "identify", - "userId": "ubcdfghi0001", - "anonymousId": "123456", - "session_id": 1598597129, - "context": { - "traits": { - "device_id": "adddd0001", - "device_os": "ios", - "device_make": "apple iphone", - "app_version": "v1.0", - "timestamp": "2020-08-28 09:00:00" - }, - "library": { - "name": "http" - } - } - }, - "destination": { - "Config": { - "apiKey": "abcde" - } - } - }, - { - "message": { - "type": "identify", - "userId": "ubcdfghi0001", - "anonymousId": "123456", - "context": { - "traits": { - "device_id": "adddd0001", - "device_os": "ios", - "device_make": "apple iphone", - "app_version": "v1.0", - "timestamp": "2020-08-28 09:00:00" - }, - "library": { - "name": "http" - } - } - }, - "destination": { - "Config": { - "apiKey": "abcde" - } - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "email": "test@rudderstack.com", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "type": "group", - "messageId": "e5034df0-a404-47b4-a463-76df99934fea", - "originalTimestamp": "2020-10-20T07:54:58.983Z", - "anonymousId": "my-anonymous-id-new", - "userId": "sampleusrRudder3", - "integrations": { - "All": true, - "Amplitude": { - "groups": { - "group_type": "Company", - "group_value": "ABC" - } - } - }, - "groupId": "Sample_groupId23", - "traits": { - "KEY_3": { - "CHILD_KEY_92": "value_95", - "CHILD_KEY_102": "value_103" - }, - "KEY_2": { - "CHILD_KEY_92": "value_95", - "CHILD_KEY_102": "value_103" - }, - "name_trait": "Company", - "value_trait": "ABC" - }, - "sentAt": "2020-10-20T07:54:58.983Z" - }, - "destination": { - "Config": { - "apiKey": "abcde" - } - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "email": "test@rudderstack.com", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "type": "group", - "messageId": "e5034df0-a404-47b4-a463-76df99934fea", - "originalTimestamp": "2020-10-20T07:54:58.983Z", - "anonymousId": "my-anonymous-id-new", - "userId": "sampleusrRudder3", - "integrations": { - "All": true - }, - "groupId": "Sample_groupId23", - "traits": { - "KEY_3": { - "CHILD_KEY_92": "value_95", - "CHILD_KEY_102": "value_103" - }, - "KEY_2": { - "CHILD_KEY_92": "value_95", - "CHILD_KEY_102": "value_103" - }, - "name_trait": "Company", - "value_trait": "ABC" - }, - "sentAt": "2020-10-20T07:54:58.983Z" - }, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "name_trait", - "groupValueTrait": "value_trait" - } - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "email": "test@rudderstack.com", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "type": "group", - "messageId": "e5034df0-a404-47b4-a463-76df99934fea", - "originalTimestamp": "2020-10-20T07:54:58.983Z", - "anonymousId": "my-anonymous-id-new", - "userId": "sampleusrRudder3", - "integrations": { - "All": true - }, - "groupId": "Sample_groupId23", - "traits": { - "KEY_3": { - "CHILD_KEY_92": "value_95", - "CHILD_KEY_102": "value_103" - }, - "KEY_2": { - "CHILD_KEY_92": "value_95", - "CHILD_KEY_102": "value_103" - }, - "name_trait": "Company", - "value_trait": ["ABC"] - }, - "sentAt": "2020-10-20T07:54:58.983Z" - }, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "name_trait", - "groupValueTrait": "value_trait" - } - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "email": "test@rudderstack.com", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "type": "alias", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "integrations": { - "All": true - }, - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "abcde" - } - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "email": "test@rudderstack.com", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "type": "alias", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "integrations": { - "All": false, - "Amplitude": { - "unmap": "sampleusrRudder3" - } - }, - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "abcde" - } - } - }, - { - "message": { - "type": "track", - "event": "Sample track event BEFORE IDENTIFY1**", - "sentAt": "2020-09-17T15:07:13.171Z", - "userId": "0572f78fa49c648e", - "channel": "mobile", - "context": { - "os": { - "name": "Android", - "version": "9" - }, - "app": { - "name": "AMTestProject", - "build": "1", - "version": "1.0", - "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" - }, - "locale": "en-US", - "screen": { - "width": 1080, - "height": 2088, - "density": 440 - }, - "traits": { - "id": "0572f78fa49c648e", - "userId": "0572f78fa49c648e", - "address": {}, - "company": {}, - "anonymousId": "0572f78fa49c648e" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.4" - }, - "network": { - "wifi": true, - "carrier": "Android", - "cellular": true, - "bluetooth": false - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - }, - "timezone": "Asia/Kolkata", - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)" - }, - "messageId": "1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466", - "anonymousId": "0572f78fa49c648e", - "integrations": { - "All": true - }, - "originalTimestamp": "2020-09-17T15:07:03.515Z" - }, - "destination": { - "Config": { - "apiKey": "abcde" - } - } - }, - { - "message": { - "type": "track", - "event": "Sample track event BEFORE IDENTIFY1**", - "sentAt": "2020-09-17T15:07:13.171Z", - "userId": "0572f78fa49c648e", - "channel": "mobile", - "context": { - "os": { - "name": "Android", - "version": "9" - }, - "app": { - "name": "AMTestProject", - "build": "1", - "version": "1.0", - "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" - }, - "device": { - "id": "0572f78fa49c648e", - "name": "generic_x86_arm", - "type": "Android", - "model": "AOSP on IA Emulator", - "manufacturer": "Google", - "adTrackingEnabled": false - }, - "locale": "en-US", - "screen": { - "width": 1080, - "height": 2088, - "density": 440 - }, - "traits": { - "id": "0572f78fa49c648e", - "userId": "0572f78fa49c648e", - "address": {}, - "company": {}, - "anonymousId": "0572f78fa49c648e" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.4" - }, - "network": { - "wifi": true, - "carrier": "Android", - "cellular": true, - "bluetooth": false - }, - "timezone": "Asia/Kolkata", - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)" - }, - "messageId": "1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466", - "anonymousId": "0572f78fa49c648e", - "integrations": { - "All": true - }, - "originalTimestamp": "2020-09-17T15:07:03.515Z" - }, - "destination": { - "Config": { - "apiKey": "abcde" - } - } - }, - { - "message": { - "type": "track", - "event": "Sample track event BEFORE IDENTIFY1**", - "sentAt": "2020-09-17T15:07:13.171Z", - "userId": "0572f78fa49c648e", - "channel": "mobile", - "context": { - "os": { - "name": "Android", - "version": "9" - }, - "app": { - "name": "AMTestProject", - "build": "1", - "version": "1.0", - "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" - }, - "device": { - "id": "0572f78fa49c648e", - "name": "generic_x86_arm", - "type": "Android", - "model": "AOSP on IA Emulator", - "manufacturer": "Google", - "adTrackingEnabled": true, - "advertisingId": "44c97318-9040-4361-8bc7-4eb30f665ca8" - }, - "locale": "en-US", - "screen": { - "width": 1080, - "height": 2088, - "density": 440 - }, - "traits": { - "id": "0572f78fa49c648e", - "userId": "0572f78fa49c648e", - "address": {}, - "company": {}, - "anonymousId": "0572f78fa49c648e" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.4" - }, - "network": { - "wifi": true, - "carrier": "Android", - "cellular": true, - "bluetooth": false - }, - "timezone": "Asia/Kolkata", - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)" - }, - "messageId": "1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466", - "anonymousId": "0572f78fa49c648e", - "integrations": { - "All": true - }, - "originalTimestamp": "2020-09-17T15:07:03.515Z" - }, - "destination": { - "Config": { - "apiKey": "abcde" - } - } - }, - { - "message": { - "type": "track", - "event": "Sample track event BEFORE IDENTIFY1**", - "sentAt": "2020-09-17T15:07:13.171Z", - "userId": "0572f78fa49c648e", - "channel": "mobile", - "context": { - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "app": { - "name": "AMTestProject", - "build": "1", - "version": "1.0", - "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" - }, - "device": { - "id": "0572f78fa49c648e", - "name": "iphone_xr_64", - "type": "iOS", - "model": "iPhone XR", - "manufacturer": "Apple", - "adTrackingEnabled": false - }, - "locale": "en-US", - "screen": { - "width": 1080, - "height": 2088, - "density": 440 - }, - "traits": { - "id": "0572f78fa49c648e", - "userId": "0572f78fa49c648e", - "address": {}, - "company": {}, - "anonymousId": "0572f78fa49c648e" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.4" - }, - "network": { - "wifi": true, - "carrier": "AT&T", - "cellular": true, - "bluetooth": false - }, - "timezone": "Asia/Kolkata", - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)" - }, - "messageId": "1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466", - "anonymousId": "0572f78fa49c648e", - "integrations": { - "All": true - }, - "originalTimestamp": "2020-09-17T15:07:03.515Z" - }, - "destination": { - "Config": { - "apiKey": "abcde" - } - } - }, - { - "message": { - "type": "track", - "event": "Sample track event BEFORE IDENTIFY1**", - "sentAt": "2020-09-17T15:07:13.171Z", - "userId": "0572f78fa49c648e", - "channel": "mobile", - "context": { - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "app": { - "name": "AMTestProject", - "build": "1", - "version": "1.0", - "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" - }, - "device": { - "id": "0572f78fa49c648e", - "name": "iphone_xr_64", - "type": "iOS", - "model": "iPhone XR", - "manufacturer": "Apple", - "adTrackingEnabled": true, - "advertisingId": "1606e649-c97e-4d5f-a2ef-b81dbc66741a" - }, - "locale": "en-US", - "screen": { - "width": 1080, - "height": 2088, - "density": 440 - }, - "traits": { - "id": "0572f78fa49c648e", - "userId": "0572f78fa49c648e", - "address": {}, - "company": {}, - "anonymousId": "0572f78fa49c648e" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.4" - }, - "network": { - "wifi": true, - "carrier": "AT&T", - "cellular": true, - "bluetooth": false - }, - "timezone": "Asia/Kolkata", - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)" - }, - "messageId": "1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466", - "anonymousId": "0572f78fa49c648e", - "integrations": { - "All": true - }, - "originalTimestamp": "2020-09-17T15:07:03.515Z" - }, - "destination": { - "Config": { - "apiKey": "abcde" - } - } - }, - { - "message": { - "type": "screen", - "userId": "identified user id", - "anonymousId": "anon-id-new", - "event": "Screen View", - "properties": { - "prop1": "5" - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - }, - "destination": { - "Config": { - "apiKey": "abcde" - } - } - }, - { - "message": { - "type": "track", - "event": "Order Completed", - "sentAt": "2020-08-14T05:30:30.118Z", - "context": { - "source": "test", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "products": [ - { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "price": 19, - "category": "Games", - "quantity": 1, - "image_url": "https:///www.example.com/product/path.jpg", - "product_id": "507f1f77bcf86cd799439011" - }, - { - "sku": "46493-32", - "name": "Uno Card Game", - "price": 3, - "category": "Games", - "quantity": 2, - "product_id": "505bd76785ebb509fc183733" - } - ], - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "S3": false, - "All": true - } - }, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "email", - "groupValueTrait": "age", - "trackProductsOnce": false, - "trackRevenuePerProduct": false - } - } - }, - { - "message": { - "type": "track", - "event": "Order Completed", - "sentAt": "2020-08-14T05:30:30.118Z", - "context": { - "source": "test", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "products": [ - { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "price": 19, - "category": "Games", - "quantity": 1, - "image_url": "https:///www.example.com/product/path.jpg", - "product_id": "507f1f77bcf86cd799439011" - }, - { - "sku": "46493-32", - "name": "Uno Card Game", - "price": 3, - "category": "Games", - "quantity": 2, - "product_id": "505bd76785ebb509fc183733" - } - ], - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "S3": false, - "All": true - } - }, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "email", - "groupValueTrait": "age", - "trackProductsOnce": true, - "trackRevenuePerProduct": false - } - } - }, - { - "message": { - "type": "track", - "event": "Order Completed", - "sentAt": "2020-08-14T05:30:30.118Z", - "context": { - "source": "test", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "products": [ - { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "price": 19, - "category": "Games", - "quantity": 1, - "image_url": "https:///www.example.com/product/path.jpg", - "product_id": "507f1f77bcf86cd799439011" - }, - { - "sku": "46493-32", - "name": "Uno Card Game", - "price": 3, - "category": "Games", - "quantity": 2, - "product_id": "505bd76785ebb509fc183733" - } - ], - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "S3": false, - "All": true - } - }, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "email", - "groupValueTrait": "age", - "trackProductsOnce": false, - "trackRevenuePerProduct": true - } - } - }, - { - "message": { - "type": "track", - "event": "Order Completed", - "sentAt": "2020-08-14T05:30:30.118Z", - "context": { - "source": "test", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "products": [ - { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "price": 19, - "category": "Games", - "quantity": 1, - "image_url": "https:///www.example.com/product/path.jpg", - "product_id": "507f1f77bcf86cd799439011" - }, - { - "sku": "46493-32", - "name": "Uno Card Game", - "price": 3, - "category": "Games", - "quantity": 2, - "product_id": "505bd76785ebb509fc183733" - } - ], - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "S3": false, - "All": true - } - }, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "email", - "groupValueTrait": "age", - "trackProductsOnce": true, - "trackRevenuePerProduct": true - } - } - }, - { - "message": { - "type": "track", - "event": "Order Completed", - "sentAt": "2020-08-14T05:30:30.118Z", - "context": { - "source": "test", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "S3": false, - "All": true - } - }, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "email", - "groupValueTrait": "age", - "trackProductsOnce": true, - "trackRevenuePerProduct": true - } - } - }, - { - "message": { - "type": "track", - "event": "Order Completed", - "sentAt": "2020-08-14T05:30:30.118Z", - "context": { - "source": "test", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "S3": false, - "All": true - } - }, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "email", - "groupValueTrait": "age", - "trackProductsOnce": true, - "trackRevenuePerProduct": false - } - } - }, - { - "message": { - "type": "track", - "event": "Order Completed", - "sentAt": "2020-08-14T05:30:30.118Z", - "context": { - "source": "test", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "S3": false, - "All": true - } - }, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "email", - "groupValueTrait": "age", - "trackProductsOnce": false, - "trackRevenuePerProduct": true - } - } - }, - { - "message": { - "type": "track", - "event": "Order Completed", - "sentAt": "2020-08-14T05:30:30.118Z", - "context": { - "source": "test", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - } - }, - "messageId": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "integrations": { - "S3": false, - "All": true - } - }, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "email", - "groupValueTrait": "age", - "trackProductsOnce": false, - "trackRevenuePerProduct": false - } - } - }, - { - "message": { - "type": "identify", - "sentAt": "2020-11-20T06:18:22.342Z", - "userId": "User_111", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.8", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - }, - "locale": "en-GB", - "screen": { - "density": 2.5 - }, - "traits": { - "city": "Durgapur", - "name": "Manashi", - "phone": "990099009900", - "friends": 3, - "age": 12, - "subjects": 5, - "experience": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.8" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36" - }, - "rudderId": "7e00bf3d-5357-4448-886d-f8fc8abf932d", - "messageId": "6f08cc45-95c3-40c1-90f2-2f44a92947ef", - "anonymousId": "2f8b0ba7-d76e-4b91-9577-d1b6ebd68946", - "integrations": { - "All": true - }, - "originalTimestamp": "2020-11-20T06:18:22.342Z" - }, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "email", - "groupValueTrait": "age", - "traitsToIncrement": [ - { - "traits": "age" - }, - { - "traits": "friends" - } - ] - } - } - }, - { - "message": { - "type": "identify", - "sentAt": "2020-11-20T06:18:22.342Z", - "userId": "User_111", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.8", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://localhost:1111/RudderAmplitude.html", - "path": "/RudderAmplitude.html", - "title": "Amplitude Testing By Rudder", - "search": "", - "referrer": "http://localhost:1111/" - }, - "locale": "en-GB", - "screen": { - "density": 2.5 - }, - "traits": { - "city": "Durgapur", - "name": "Manashi", - "phone": "990099009900", - "friends": 3, - "age": 12, - "subjects": 5, - "experience": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.8" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36" - }, - "rudderId": "7e00bf3d-5357-4448-886d-f8fc8abf932d", - "messageId": "6f08cc45-95c3-40c1-90f2-2f44a92947ef", - "anonymousId": "2f8b0ba7-d76e-4b91-9577-d1b6ebd68946", - "integrations": { - "All": true - }, - "originalTimestamp": "2020-11-20T06:18:22.342Z" - }, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "email", - "groupValueTrait": "age", - "traitsToSetOnce": [ - { - "traits": "subjects" - }, - { - "traits": "" - } - ] - } - } - }, - { - "message": { - "type": "identify", - "sentAt": "2020-11-20T06:18:22.342Z", - "userId": "User_111", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.8", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://localhost:1111/RudderAmplitude.html", - "path": "/RudderAmplitude.html", - "title": "Amplitude Testing By Rudder", - "search": "", - "referrer": "http://localhost:1111/" - }, - "locale": "en-GB", - "screen": { - "density": 2.5 - }, - "traits": { - "city": "Durgapur", - "name": "Manashi", - "phone": "990099009900", - "friends": 3, - "age": 12, - "subjects": 5, - "experience": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.8" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36" - }, - "rudderId": "7e00bf3d-5357-4448-886d-f8fc8abf932d", - "messageId": "6f08cc45-95c3-40c1-90f2-2f44a92947ef", - "anonymousId": "2f8b0ba7-d76e-4b91-9577-d1b6ebd68946", - "integrations": { - "All": true - }, - "originalTimestamp": "2020-11-20T06:18:22.342Z" - }, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "email", - "groupValueTrait": "age", - "traitsToAppend": [ - { - "traits": "name" - }, - { - "traits": "" - } - ] - } - } - }, - { - "message": { - "type": "identify", - "sentAt": "2020-11-20T06:18:22.342Z", - "userId": "User_111", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.8", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://localhost:1111/RudderAmplitude.html", - "path": "/RudderAmplitude.html", - "title": "Amplitude Testing By Rudder", - "search": "", - "referrer": "http://localhost:1111/" - }, - "locale": "en-GB", - "screen": { - "density": 2.5 - }, - "traits": { - "city": "Durgapur", - "name": "Manashi", - "phone": "990099009900", - "friends": 3, - "age": 12, - "subjects": 5, - "experience": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.8" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36" - }, - "rudderId": "7e00bf3d-5357-4448-886d-f8fc8abf932d", - "messageId": "6f08cc45-95c3-40c1-90f2-2f44a92947ef", - "anonymousId": "2f8b0ba7-d76e-4b91-9577-d1b6ebd68946", - "integrations": { - "All": true - }, - "originalTimestamp": "2020-11-20T06:18:22.342Z" - }, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "email", - "groupValueTrait": "age", - "traitsToPrepend": [ - { - "traits": "experience" - }, - { - "traits": "" - } - ] - } - } - }, - { - "message": { - "type": "identify", - "sentAt": "2020-11-20T06:18:22.342Z", - "userId": "User_111", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.8", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://localhost:1111/RudderAmplitude.html", - "path": "/RudderAmplitude.html", - "title": "Amplitude Testing By Rudder", - "search": "", - "referrer": "http://localhost:1111/" - }, - "locale": "en-GB", - "screen": { - "density": 2.5 - }, - "traits": { - "city": "Durgapur", - "name": "Manashi", - "phone": "990099009900", - "friends": 3, - "age": 12, - "subjects": 5, - "experience": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.8" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36" - }, - "rudderId": "7e00bf3d-5357-4448-886d-f8fc8abf932d", - "messageId": "6f08cc45-95c3-40c1-90f2-2f44a92947ef", - "anonymousId": "2f8b0ba7-d76e-4b91-9577-d1b6ebd68946", - "integrations": { - "All": true - }, - "originalTimestamp": "2020-11-20T06:18:22.342Z" - }, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "email", - "groupValueTrait": "age", - "traitsToIncrement": [ - { - "traits": "age" - }, - { - "traits": "friends" - } - ], - "traitsToSetOnce": [ - { - "traits": "subjects" - }, - { - "traits": "" - } - ], - "traitsToAppend": [ - { - "traits": "name" - }, - { - "traits": "" - } - ], - "traitsToPrepend": [ - { - "traits": "experience" - }, - { - "traits": "" - } - ] - } - } - }, - { - "message": { - "type": "track", - "event": "Order Completed", - "sentAt": "2020-08-14T05:30:30.118Z", - "userId": "userID123", - "context": { - "source": "test", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a31aaa1", - "address": { - "city": "kolkata", - "country": "India", - "postalCode": 712136, - "state": "WB", - "street": "" - } - }, - "locale": "en-US", - "network": { - "carrier": "T-Mobile" - }, - "location": { - "country": "United States", - "city": "San Francisco", - "region": "California", - "latitude": "37.7672319", - "longitude": "-122.4021353", - "dma": "San Francisco-Oakland-San Jose, CA" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - }, - "os": { - "name": "Android", - "version": "11" - }, - "app": { - "version": "2.6.0 v3" - }, - "device": { - "type": "Android", - "model": "SM-A025M", - "manufacturer": "samsung" - } - }, - "messageId": "7208abb6-2c4e-45bb-bf5b-aa426f3593a2", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "products": [ - { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "price": 19, - "category": "Games", - "quantity": 1, - "image_url": "https:///www.example.com/product/path.jpg", - "product_id": "507f1f77bcf86cd799439011" - }, - { - "sku": "46493-32", - "name": "Uno Card Game", - "price": 3, - "category": "Games", - "quantity": 2, - "product_id": "505bd76785ebb509fc183733" - } - ], - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a31aaa1", - "integrations": { - "S3": false, - "All": true - } - }, - "destination": { - "Config": { - "apiKey": "abcde", - "trackProductsOnce": false, - "trackRevenuePerProduct": true - } - } - }, - { - "message": { - "type": "track", - "event": "Order Completed", - "sentAt": "2020-08-14T05:30:30.118Z", - "userId": "userID123", - "context": { - "source": "test", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a31aaa1", - "address": { - "city": "kolkata", - "country": "India", - "postalCode": 712136, - "state": "WB", - "street": "" - } - }, - "locale": "en-US", - "network": { - "carrier": "T-Mobile" - }, - "location": { - "latitude": "37.7672319", - "longitude": "-122.4021353", - "dma": "San Francisco-Oakland-San Jose, CA" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - }, - "os": { - "name": "Android", - "version": "11" - }, - "app": { - "version": "2.6.0 v3" - }, - "device": { - "type": "Android", - "model": "SM-A025M", - "manufacturer": "samsung" - } - }, - "messageId": "7208abb6-2c4e-45bb-bf5b-aa426f3593a2", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "products": [ - { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "price": 19, - "category": "Games", - "quantity": 1, - "image_url": "https:///www.example.com/product/path.jpg", - "product_id": "507f1f77bcf86cd799439011" - }, - { - "sku": "46493-32", - "name": "Uno Card Game", - "price": 3, - "category": "Games", - "quantity": 2, - "product_id": "505bd76785ebb509fc183733" - } - ], - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a31aaa1", - "integrations": { - "S3": false, - "All": true - } - }, - "destination": { - "Config": { - "apiKey": "abcde", - "trackProductsOnce": true, - "trackRevenuePerProduct": false - } - } - }, - { - "message": { - "type": "track", - "event": "App_Opened", - "sentAt": "2021-11-17T19:13:52.106Z", - "userId": "ab419c3a-47ce-11ec-82ac-16a1bb813a59", - "channel": "mobile", - "context": { - "source": "test", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a31aaa1", - "address": { - "city": "kolkata", - "country": "India", - "postalCode": 712136, - "state": "WB", - "street": "" - } - }, - "locale": "en-US", - "network": { - "carrier": "T-Mobile" - }, - "location": { - "country": "United States", - "city": "San Francisco", - "latitude": "37.7672319", - "longitude": "-122.4021353", - "dma": "San Francisco-Oakland-San Jose, CA" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - }, - "os": { - "name": "Android", - "version": "11" - }, - "app": { - "version": "2.6.0 v3" - }, - "device": { - "type": "Android", - "model": "SM-A025M", - "manufacturer": "samsung" - } - }, - "messageId": "7208abb6-2c4e-45bb-bf5b-aa426f3593a2", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "externalID": "1637170658229-3961832492194264209" - }, - "integrations": { - "All": true - }, - "originalTimestamp": "2021-11-17T19:13:51.143Z" - }, - "destination": { - "Config": { - "apiKey": "abcde", - "trackProductsOnce": true, - "trackRevenuePerProduct": false - } - } - }, - { - "message": { - "type": "identify", - "sentAt": "2020-11-20T06:18:22.342Z", - "userId": "User_111", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.8", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - }, - "locale": "en-GB", - "screen": { - "density": 2.5 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.8" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36" - }, - "rudderId": "7e00bf3d-5357-4448-886d-f8fc8abf932d", - "messageId": "6f08cc45-95c3-40c1-90f2-2f44a92947ef", - "anonymousId": "2f8b0ba7-d76e-4b91-9577-d1b6ebd68946", - "integrations": { - "All": true - }, - "originalTimestamp": "2020-11-20T06:18:22.342Z" - }, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "email", - "groupValueTrait": "age", - "traitsToIncrement": [ - { - "traits": "age" - }, - { - "traits": "friends" - } - ] - } - } - }, - { - "message": { - "type": "track", - "event": "Order Completed", - "sentAt": "2020-08-14T05:30:30.118Z", - "userId": "userID123", - "context": { - "source": "test", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a31aaa1", - "address": { - "city": "kolkata", - "country": "India", - "postalCode": 712136, - "state": "WB", - "street": "" - } - }, - "locale": "en-US", - "network": { - "carrier": "T-Mobile" - }, - "location": { - "latitude": "37.7672319", - "longitude": "-122.4021353", - "dma": "San Francisco-Oakland-San Jose, CA" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - }, - "os": { - "name": "Android", - "version": "11" - }, - "app": { - "version": "2.6.0 v3" - }, - "device": { - "type": "Android", - "model": "SM-A025M", - "manufacturer": "samsung" - } - }, - "messageId": "7208abb6-2c4e-45bb-bf5b-aa426f3593a2", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 0, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "products": [ - { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "price": 19, - "category": "Games", - "quantity": 1, - "image_url": "https:///www.example.com/product/path.jpg", - "product_id": "507f1f77bcf86cd799439011" - }, - { - "sku": "46493-32", - "name": "Uno Card Game", - "price": 3, - "category": "Games", - "quantity": 2, - "product_id": "505bd76785ebb509fc183733" - } - ], - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a31aaa1", - "integrations": { - "S3": false, - "All": true - } - }, - "destination": { - "Config": { - "apiKey": "abcde", - "trackProductsOnce": true, - "trackRevenuePerProduct": true - } - } - }, - { - "message": { - "type": "screen", - "event": "Home", - "sentAt": "2021-12-09T14:55:17.074Z", - "userId": "9e187bff-2867-11ec-82ac-02cdd434d6bf", - "channel": "mobile", - "context": { - "source": "test", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a31aaa1", - "address": { - "city": "kolkata", - "country": "India", - "postalCode": 712136, - "state": "WB", - "street": "" - } - }, - "locale": "en-US", - "network": { - "carrier": "T-Mobile" - }, - "location": { - "country": "United States", - "city": "San Francisco", - "region": "California", - "latitude": "37.7672319", - "longitude": "-122.4021353", - "dma": "San Francisco-Oakland-San Jose, CA" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - }, - "os": { - "name": "Android", - "version": "11" - }, - "app": { - "version": "2.6.0 v3" - }, - "device": { - "type": "Android", - "model": "SM-A025M", - "manufacturer": "samsung" - } - }, - "rudderId": "004670a6-4559-4f2b-aa2a-f35cf81a9423", - "messageId": "1639061715808-a934f1c2-7b55-4e78-bd4d-df209c30c8a1", - "timestamp": "2021-12-09T14:55:15.914Z", - "properties": { - "name": "Home", - "externalID": "1637763064335-7225034711957140329" - }, - "receivedAt": "2021-12-09T14:55:17.180Z", - "request_ip": "186.54.216.75", - "anonymousId": "066a37dc92b16284", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-12-09T14:55:15.808Z" - }, - "destination": { - "Config": { - "apiKey": "abcde" - } - } - }, - { - "message": { - "type": "screen", - "event": "Home", - "sentAt": "2021-12-09T14:55:17.074Z", - "userId": "abcdef123456cf", - "channel": "mobile", - "context": { - "source": "test", - "traits": { - "anonymousId": "50be5c79-6c3f-4b60-be84-97805a32aaa1", - "address": { - "city": "kolkata", - "country": "India", - "postalCode": 712136, - "state": "WB", - "street": "" - } - }, - "locale": "en-US", - "network": { - "carrier": "T-Mobile" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - }, - "os": { - "name": "Android", - "version": "11" - }, - "app": { - "version": "2.6.0 v3" - }, - "device": { - "type": "Android", - "model": "SM-A025M", - "manufacturer": "samsung" - } - }, - "rudderId": "004670a6-4559-4f2b-aa1a-f12cf81a9423", - "messageId": "1639061715808-a934f1c2-7b55-5e78-bd4d-df209c31d8a2", - "timestamp": "2021-12-09T14:55:15.914Z", - "properties": { - "name": "Home", - "externalID": "1637763064336-7225034711957140329" - }, - "receivedAt": "2021-12-09T14:55:17.180Z", - "request_ip": "186.54.216.75", - "anonymousId": "066a37dc92b16284", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-12-09T14:55:15.808Z" - }, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "email", - "groupValueTrait": "age" - } - } - }, - { - "message": { - "type": "track", - "event": "Sample track event BEFORE IDENTIFY1**", - "sentAt": "2020-09-17T15:07:13.171Z", - "userId": "0572f78fa49c648e", - "channel": "mobile", - "context": { - "app": { - "name": "AMTestProject", - "build": "1", - "version": "1.0", - "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" - }, - "device": { - "id": "0572f78fa49c648e", - "type": "watchos", - "manufacturer": "Apple", - "adTrackingEnabled": true, - "advertisingId": "1606e649-c97e-4d5f-a2ef-b81dbc66741a" - }, - "locale": "en-US", - "screen": { - "width": 1080, - "height": 2088, - "density": 440 - }, - "traits": { - "id": "0572f78fa49c648e", - "userId": "0572f78fa49c648e", - "address": {}, - "company": {}, - "anonymousId": "0572f78fa49c648e" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.4" - }, - "network": { - "wifi": true, - "carrier": "AT&T", - "cellular": true, - "bluetooth": false - }, - "timezone": "Asia/Kolkata", - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)" - }, - "messageId": "1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466", - "anonymousId": "0572f78fa49c648e", - "integrations": { - "All": true - }, - "originalTimestamp": "2020-09-17T15:07:03.515Z" - }, - "destination": { - "Config": { - "apiKey": "abcde" - } - } - }, - { - "message": { - "type": "track", - "event": "Sample track event BEFORE IDENTIFY1**", - "sentAt": "2020-09-17T15:07:13.171Z", - "userId": "0572f78fa49c648e", - "channel": "mobile", - "context": { - "app": { - "name": "AMTestProject", - "build": "1", - "version": "1.0", - "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" - }, - "device": { - "id": "0572f78fa49c648e", - "type": "ipados", - "manufacturer": "Apple", - "adTrackingEnabled": true, - "advertisingId": "1606e649-c97e-4d5f-a2ef-b81dbc66741a" - }, - "locale": "en-US", - "screen": { - "width": 1080, - "height": 2088, - "density": 440 - }, - "traits": { - "id": "0572f78fa49c648e", - "userId": "0572f78fa49c648e", - "address": {}, - "company": {}, - "anonymousId": "0572f78fa49c648e" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.4" - }, - "network": { - "wifi": true, - "carrier": "AT&T", - "cellular": true, - "bluetooth": false - }, - "timezone": "Asia/Kolkata", - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)" - }, - "messageId": "1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466", - "anonymousId": "0572f78fa49c648e", - "integrations": { - "All": true - }, - "originalTimestamp": "2020-09-17T15:07:03.515Z" - }, - "destination": { - "Config": { - "apiKey": "abcde" - } - } - }, - { - "message": { - "type": "track", - "event": "Sample track event BEFORE IDENTIFY1**", - "sentAt": "2020-09-17T15:07:13.171Z", - "userId": "0572f78fa49c648e", - "channel": "mobile", - "context": { - "app": { - "name": "AMTestProject", - "build": "1", - "version": "1.0", - "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" - }, - "device": { - "id": "0572f78fa49c648e", - "type": "tvos", - "manufacturer": "Apple", - "adTrackingEnabled": true, - "advertisingId": "1606e649-c97e-4d5f-a2ef-b81dbc66741a" - }, - "locale": "en-US", - "screen": { - "width": 1080, - "height": 2088, - "density": 440 - }, - "traits": { - "id": "0572f78fa49c648e", - "userId": "0572f78fa49c648e", - "address": {}, - "company": {}, - "anonymousId": "0572f78fa49c648e" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.4" - }, - "network": { - "wifi": true, - "carrier": "AT&T", - "cellular": true, - "bluetooth": false - }, - "timezone": "Asia/Kolkata", - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)" - }, - "messageId": "1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466", - "anonymousId": "0572f78fa49c648e", - "integrations": { - "All": true - }, - "originalTimestamp": "2020-09-17T15:07:03.515Z" - }, - "destination": { - "Config": { - "apiKey": "abcde" - } - } - }, - { - "message": { - "channel": "web", - "context": { - "device": { - "brand": "testBrand", - "manufacturer": "testManufacturer" - }, - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "anonymousId": "123456", - "email": "test@rudderstack.com", - "address": { - "city": "kolkata", - "country": "India", - "postalCode": 712136, - "state": "WB", - "street": "" - }, - "ip": "0.0.0.0", - "age": 26 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "type": "identify", - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "123456", - "userId": "123456", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "mapDeviceBrand": true, - "apiKey": "abcde", - "groupTypeTrait": "email", - "groupValueTrait": "age" - } - } - }, - { - "message": { - "type": "track", - "event": "Sample track event BEFORE IDENTIFY1**", - "sentAt": "2020-09-17T15:07:13.171Z", - "userId": "0572f78fa49c648e", - "channel": "mobile", - "context": { - "device": { - "brand": "testBrand", - "manufacturer": "testManufacturer" - }, - "os": { - "name": "Android", - "version": "9" - }, - "app": { - "name": "AMTestProject", - "build": "1", - "version": "1.0", - "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" - }, - "locale": "en-US", - "screen": { - "width": 1080, - "height": 2088, - "density": 440 - }, - "traits": { - "id": "0572f78fa49c648e", - "userId": "0572f78fa49c648e", - "address": {}, - "company": {}, - "anonymousId": "0572f78fa49c648e" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.4" - }, - "network": { - "wifi": true, - "carrier": "Android", - "cellular": true, - "bluetooth": false - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - }, - "timezone": "Asia/Kolkata", - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)" - }, - "messageId": "1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466", - "anonymousId": "0572f78fa49c648e", - "integrations": { - "All": true - }, - "originalTimestamp": "2020-09-17T15:07:03.515Z" - }, - "destination": { - "Config": { - "mapDeviceBrand": true, - "apiKey": "abcde" - } - } - }, - { - "message": { - "type": "screen", - "userId": "identified user id", - "anonymousId": "anon-id-new", - "event": "Screen View", - "channel": "web", - "properties": { - "prop1": "5" - }, - "context": { - "ip": "14.5.67.21", - "device": { - "brand": "testBrand", - "manufacturer": "testManufacturer" - }, - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - }, - "destination": { - "Config": { - "apiKey": "abcde", - "mapDeviceBrand": true - } - } - }, - { - "message": { - "channel": "web", - "context": { - "externalId": [ - { - "id": "lynnanderson@smith.net", - "identifierType": "device_id", - "type": "AM-users" - } - ], - "mappedToDestination": "true", - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "anonymousId": "123456", - "email": "test@rudderstack.com", - "address": { - "country": "India", - "postalCode": 712136, - "state": "WB", - "street": "", - "os_version": "test os" - }, - "ip": "0.0.0.0", - "age": 26 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "traits": { - "anonymousId": "123456", - "email": "test@rudderstack.com", - "city": "kolkata", - "address": { - "country": "India", - "postalCode": 712136, - "state": "WB", - "street": "" - }, - "os_version": "test os", - "ip": "0.0.0.0", - "age": 26 - }, - "type": "identify", - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "123456", - "userId": "123456", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "metadata": { - "jobId": 2 - }, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "email", - "groupValueTrait": "age", - "residencyServer": "EU" - } - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "email": "test@rudderstack.com", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "type": "group", - "messageId": "e5034df0-a404-47b4-a463-76df99934fea", - "originalTimestamp": "2020-10-20T07:54:58.983Z", - "anonymousId": "my-anonymous-id-new", - "userId": "sampleusrRudder3", - "integrations": { - "All": true - }, - "groupId": "Sample_groupId23", - "traits": { - "KEY_3": { - "CHILD_KEY_92": "value_95", - "CHILD_KEY_102": "value_103" - }, - "KEY_2": { - "CHILD_KEY_92": "value_95", - "CHILD_KEY_102": "value_103" - }, - "name_trait": "Company", - "value_trait": "ABC" - }, - "sentAt": "2020-10-20T07:54:58.983Z" - }, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "name_trait", - "groupValueTrait": "value_trait", - "residencyServer": "EU" - } - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "email": "test@rudderstack.com", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "type": "alias", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "integrations": { - "All": true - }, - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "abcde", - "residencyServer": "EU" - } - } - }, - { - "message": { - "type": "track", - "event": "App_Opened", - "sentAt": "2021-11-17T19:13:52.106Z", - "userId": "ab419c3a-47ce-11ec-82ac-16a1bb813a59", - "channel": "mobile", - "context": { - "source": "test", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a31aaa1", - "address": { - "city": "kolkata", - "country": "India", - "postalCode": 712136, - "state": "WB", - "street": "" - } - }, - "locale": "en-US", - "network": { - "carrier": "T-Mobile" - }, - "location": { - "country": "United States", - "city": "San Francisco", - "latitude": "37.7672319", - "longitude": "-122.4021353", - "dma": "San Francisco-Oakland-San Jose, CA" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - }, - "os": { - "name": "Android", - "version": "11" - }, - "app": { - "version": "2.6.0 v3" - }, - "device": { - "type": "Android", - "model": "SM-A025M", - "manufacturer": "samsung" - } - }, - "messageId": "7208abb6-2c4e-45bb-bf5b-aa426f3593a2", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "externalID": "1637170658229-3961832492194264209" - }, - "integrations": { - "All": true, - "Amplitude": { - "event_id": 3 - } - }, - "originalTimestamp": "2021-11-17T19:13:51.143Z" - }, - "destination": { - "Config": { - "apiKey": "abcde", - "trackProductsOnce": true, - "trackRevenuePerProduct": false - } - } - }, - { - "message": { - "type": "track", - "event": "App_Opened", - "sentAt": "2021-11-17T19:13:52.106Z", - "userId": "ab419c3a-47ce-11ec-82ac-16a1bb813a59", - "channel": "mobile", - "context": { - "source": "test", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a31aaa1", - "address": { - "city": "kolkata", - "country": "India", - "postalCode": 712136, - "state": "WB", - "street": "" - } - }, - "locale": "en-US", - "network": { - "carrier": "T-Mobile" - }, - "location": { - "country": "United States", - "city": "San Francisco", - "latitude": "37.7672319", - "longitude": "-122.4021353", - "dma": "San Francisco-Oakland-San Jose, CA" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - }, - "os": { - "name": "Android", - "version": "11" - }, - "app": { - "version": "2.6.0 v3" - }, - "device": { - "type": "Android", - "model": "SM-A025M", - "manufacturer": "samsung" - } - }, - "messageId": "7208abb6-2c4e-45bb-bf5b-aa426f3593a2", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "externalID": "1637170658229-3961832492194264209" - }, - "integrations": { - "All": true, - "Amplitude": { - "event_id": 0 - } - }, - "originalTimestamp": "2021-11-17T19:13:51.143Z" - }, - "destination": { - "Config": { - "apiKey": "abcde", - "trackProductsOnce": true, - "trackRevenuePerProduct": false - } - } - }, - { - "message": { - "type": "track", - "event": "App_Opened", - "sentAt": "2021-11-17T19:13:52.106Z", - "userId": "ab419c3a-47ce-11ec-82ac-16a1bb813a59", - "channel": "mobile", - "context": { - "source": "test", - "traits": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a31aaa1", - "address": { - "city": "kolkata", - "country": "India", - "postalCode": 712136, - "state": "WB", - "street": "" - } - }, - "locale": "en-US", - "network": { - "carrier": "T-Mobile" - }, - "location": { - "country": "United States", - "city": "San Francisco", - "latitude": "37.7672319", - "longitude": "-122.4021353", - "dma": "San Francisco-Oakland-San Jose, CA" - }, - "library": { - "name": "rudder-sdk-ruby-sync", - "version": "1.0.6" - }, - "os": { - "name": "Android", - "version": "11" - }, - "app": { - "version": "2.6.0 v3" - }, - "device": { - "type": "Android", - "model": "SM-A025M", - "manufacturer": "samsung" - } - }, - "messageId": "7208abb6-2c4e-45bb-bf5b-aa426f3593a2", - "timestamp": "2020-08-14T05:30:30.118Z", - "properties": { - "externalID": "1637170658229-3961832492194264209" - }, - "integrations": { - "All": true, - "Amplitude": { - "event_id": "0" - } - }, - "originalTimestamp": "2021-11-17T19:13:51.143Z" - }, - "destination": { - "Config": { - "apiKey": "abcde", - "trackProductsOnce": true, - "trackRevenuePerProduct": false - } - } - }, - { - "message": { - "channel": "web", - "context": { - "externalId": [ - { - "id": "lynnanderson@smith.net", - "identifierType": "device_id", - "type": "AM-users" - } - ], - "mappedToDestination": "true", - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "anonymousId": "123456", - "email": "test@rudderstack.com", - "address": { - "country": "India", - "postalCode": 712136, - "state": "WB", - "street": "", - "os_version": "test os" - }, - "ip": "0.0.0.0", - "age": 26 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "traits": { - "anonymousId": "123456", - "email": "test@rudderstack.com", - "city": "kolkata", - "address": { - "country": "India", - "postalCode": 712136, - "state": "WB", - "street": "" - }, - "os_version": "test os", - "ip": "0.0.0.0", - "age": 26 - }, - "type": "identify", - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "123456", - "userId": "123456", - "integrations": { - "All": true, - "Amplitude": { - "event_id": 6 - } - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "metadata": { - "jobId": 2 - }, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "email", - "groupValueTrait": "age" - } - } - }, - { - "message": { - "channel": "web", - "context": { - "externalId": [ - { - "id": "lynnanderson@smith.net", - "identifierType": "device_id", - "type": "AM-users" - } - ], - "mappedToDestination": "true", - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "anonymousId": "123456", - "email": "test@rudderstack.com", - "address": { - "country": "India", - "postalCode": 712136, - "state": "WB", - "street": "", - "os_version": "test os" - }, - "ip": "0.0.0.0", - "age": 26 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "traits": { - "anonymousId": "123456", - "email": "test@rudderstack.com", - "city": "kolkata", - "address": { - "country": "India", - "postalCode": 712136, - "state": "WB", - "street": "" - }, - "os_version": "test os", - "ip": "0.0.0.0", - "age": 26 - }, - "type": "identify", - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "123456", - "userId": "123456", - "integrations": { - "All": true, - "Amplitude": { - "event_id": 6 - } - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "metadata": { - "jobId": 2 - }, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "email", - "groupValueTrait": "age" - } - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "email": "test@rudderstack.com", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "type": "group", - "messageId": "e5034df0-a404-47b4-a463-76df99934fea", - "originalTimestamp": "2020-10-20T07:54:58.983Z", - "anonymousId": "my-anonymous-id-new", - "userId": "sampleusrRudder3", - "integrations": { - "All": true, - "Amplitude": { - "event_id": 3 - } - }, - "groupId": "Sample_groupId23", - "traits": { - "KEY_3": { - "CHILD_KEY_92": "value_95", - "CHILD_KEY_102": "value_103" - }, - "KEY_2": { - "CHILD_KEY_92": "value_95", - "CHILD_KEY_102": "value_103" - }, - "name_trait": "Company", - "value_trait": "ABC" - }, - "sentAt": "2020-10-20T07:54:58.983Z" - }, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "name_trait", - "groupValueTrait": "value_trait" - } - } - }, - { - "message": { - "type": "screen", - "userId": "identified user id", - "anonymousId": "anon-id-new", - "event": "Screen View", - "properties": { - "prop1": "5", - "event_id": 7 - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "integrations": { - "All": true, - "Amplitude": { - "event_id": 7 - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - }, - "destination": { - "Config": { - "apiKey": "abcde" - } - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "test@rudderstack.com", - "anonymousId": "12345" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "request_ip": "1.1.1.1", - "type": "page", - "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T11:15:18.299Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "properties": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - }, - "integrations": { - "All": true, - "Amplitude": { - "event_id": 2 - } - }, - "name": "ApplicationLoaded", - "sentAt": "2019-10-14T11:15:53.296Z" - }, - "destination": { - "Config": { - "apiKey": "abcde" - } - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "email": "test@rudderstack.com", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "type": "alias", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "integrations": { - "All": true, - "Amplitude": { - "event_id": 67 - } - }, - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "abcde" - } - } - }, - { - "message": { - "anonymousId": "5d205961641ee6c5", - "channel": "mobile", - "context": { - "app": { - "build": "6", - "name": "Sample Kotlin", - "namespace": "com.example.testapp1mg", - "version": "1.2" - }, - "device": { - "id": "5d205961641ee6c5", - "manufacturer": "Google", - "model": "Android SDK built for x86", - "name": "generic_x86", - "type": "Android" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.7.0" - }, - "locale": "en-US", - "network": { - "carrier": "Android", - "bluetooth": false, - "cellular": true, - "wifi": true - }, - "os": { - "name": "Android", - "version": "7.1.1" - }, - "screen": { - "density": 440, - "height": 2148, - "width": 1080 - }, - "sessionId": "1662393792", - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "5d205961641ee6c5", - "id": "User Android", - "userId": "User Android" - }, - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 7.1.1; Android SDK built for x86 Build/NYC)" - }, - "event": "Screen event", - "integrations": { - "All": true - }, - "messageId": "1662393883248-509420bf-b812-4f8d-bdb2-8c811bfde87f", - "properties": { - "name": "Screen event" - }, - "originalTimestamp": "2022-09-05T16:04:43.250Z", - "type": "screen", - "userId": "User Android" - }, - "destination": { - "Config": { - "apiKey": "abcde" - } - } - }, - { - "message": { - "anonymousId": "5d205961641ee6c5", - "channel": "mobile", - "context": { - "app": { - "build": "6", - "name": "Sample Kotlin", - "namespace": "com.example.testapp1mg", - "version": "1.2" - }, - "device": { - "id": "5d205961641ee6c5", - "manufacturer": "Google", - "model": "Android SDK built for x86", - "name": "generic_x86", - "type": "Android" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.7.0" - }, - "locale": "en-US", - "network": { - "carrier": "Android", - "bluetooth": false, - "cellular": true, - "wifi": true - }, - "os": { - "name": "Android", - "version": "7.1.1" - }, - "screen": { - "density": 440, - "height": 2148, - "width": 1080 - }, - "sessionId": "1662393792", - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "5d205961641ee6c5", - "id": "User Android", - "userId": "User Android" - }, - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 7.1.1; Android SDK built for x86 Build/NYC)" - }, - "integrations": { - "All": true - }, - "messageId": "1662393883248-509420bf-b812-4f8d-bdb2-8c811bfde87f", - "properties": {}, - "originalTimestamp": "2022-09-05T16:04:43.250Z", - "type": "screen", - "userId": "User Android" - }, - "destination": { - "Config": { - "apiKey": "abcde" - } - } - }, - { - "message": { - "channel": "web", - "context": { - "externalId": [ - { - "id": "lynnanderson@smith.net", - "identifierType": "device_id", - "type": "AM-users" - } - ], - "mappedToDestination": "true", - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "anonymousId": "123456", - "email": "test@rudderstack.com", - "address": { - "country": "India", - "postalCode": 712136, - "state": "WB", - "street": "", - "os_version": "test os" - }, - "ip": "0.0.0.0", - "age": 26 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - }, - "sessionId": "1662393792" - }, - "traits": { - "anonymousId": "123456", - "email": "test@rudderstack.com", - "city": "kolkata", - "address": { - "country": "India", - "postalCode": 712136, - "state": "WB", - "street": "" - }, - "os_version": "test os", - "ip": "0.0.0.0", - "age": 26 - }, - "type": "identify", - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "123456", - "userId": "123456", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "apiKey": "abcde" - } - } - }, - { - "message": { - "anonymousId": "5d205961641ee6c5", - "channel": "mobile", - "context": { - "app": { - "build": "6", - "name": "Sample Kotlin", - "namespace": "com.example.testapp1mg", - "version": "1.2" - }, - "device": { - "id": "5d205961641ee6c5", - "manufacturer": "Google", - "model": "Android SDK built for x86", - "name": "generic_x86", - "type": "Android" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.7.0" - }, - "locale": "en-US", - "network": { - "carrier": "Android", - "bluetooth": false, - "cellular": true, - "wifi": true - }, - "os": { - "name": "Android", - "version": "7.1.1" - }, - "screen": { - "density": 440, - "height": 2148, - "width": 1080 - }, - "sessionId": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "5d205961641ee6c5", - "id": "User Android", - "userId": "User Android" - }, - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 7.1.1; Android SDK built for x86 Build/NYC)" - }, - "event": "Screen event", - "integrations": { - "All": true - }, - "messageId": "1662393883248-509420bf-b812-4f8d-bdb2-8c811bfde87f", - "properties": { - "name": "Screen event" - }, - "originalTimestamp": "2022-09-05T16:04:43.250Z", - "type": "screen", - "userId": "User Android" - }, - "destination": { - "Config": { - "apiKey": "abcde" - } - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "email": "test@rudderstack.com", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "type": "group", - "messageId": "e5034df0-a404-47b4-a463-76df99934fea", - "originalTimestamp": "2020-10-20T07:54:58.983Z", - "integrations": { - "All": true - }, - "groupId": "Sample_groupId23", - "traits": { - "KEY_3": { - "CHILD_KEY_92": "value_95", - "CHILD_KEY_102": "value_103" - }, - "KEY_2": { - "CHILD_KEY_92": "value_95", - "CHILD_KEY_102": "value_103" - }, - "name_trait": "Company", - "value_trait": "ABC" - }, - "sentAt": "2020-10-20T07:54:58.983Z" - }, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "name_trait", - "groupValueTrait": "value_trait" - } - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "test@rudderstack.com", - "anonymousId": "12345" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "request_ip": "1.1.1.1", - "type": "page", - "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T11:15:18.299Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "properties": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - }, - "integrations": { - "All": true, - "Amplitude": { - "event_id": 2 - } - }, - "name": "ApplicationLoaded", - "sentAt": "2019-10-14T11:15:53.296Z" - }, - "destination": { - "Config": { - "apiKey": "abcde", - "useUserDefinedPageEventName": true, - "userProvidedPageEventString": "My custom Page Name is {{ name }} . Custom Name." - } - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "test@rudderstack.com", - "anonymousId": "12345" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "request_ip": "1.1.1.1", - "type": "page", - "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T11:15:18.299Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "properties": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - }, - "integrations": { - "All": true, - "Amplitude": { - "event_id": 2 - } - }, - "name": "ApplicationLoaded", - "sentAt": "2019-10-14T11:15:53.296Z" - }, - "destination": { - "Config": { - "apiKey": "abcde", - "useUserDefinedPageEventName": true, - "userProvidedPageEventString": "{{name}}" - } - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "test@rudderstack.com", - "anonymousId": "12345" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "request_ip": "1.1.1.1", - "type": "page", - "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T11:15:18.299Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "properties": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - }, - "integrations": { - "All": true, - "Amplitude": { - "event_id": 2 - } - }, - "name": "ApplicationLoaded", - "sentAt": "2019-10-14T11:15:53.296Z" - }, - "destination": { - "Config": { - "apiKey": "abcde", - "useUserDefinedPageEventName": true, - "userProvidedPageEventString": "" - } - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "test@rudderstack.com", - "anonymousId": "12345" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "Home Page", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "request_ip": "1.1.1.1", - "type": "page", - "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T11:15:18.299Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "properties": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - }, - "integrations": { - "All": true, - "Amplitude": { - "event_id": 2 - } - }, - "sentAt": "2019-10-14T11:15:53.296Z" - }, - "destination": { - "Config": { - "apiKey": "abcde", - "useUserDefinedPageEventName": false, - "userProvidedPageEventString": "Viewed {{context.page.title}} event." - } - } - }, - { - "message": { - "type": "screen", - "userId": "identified user id", - "anonymousId": "anon-id-new", - "event": "Screen View", - "properties": { - "prop1": "5" - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - }, - "destination": { - "Config": { - "apiKey": "abcde", - "useUserDefinedScreenEventName": true, - "userProvidedScreenEventString": "My {{ event }} event." - } - } - }, - { - "message": { - "type": "screen", - "userId": "identified user id", - "anonymousId": "anon-id-new", - "event": "Screen View", - "properties": { - "prop1": "5" - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - }, - "destination": { - "Config": { - "apiKey": "abcde", - "useUserDefinedScreenEventName": false, - "userProvidedScreenEventString": "My {{ event }} event." - } - } - }, - { - "message": { - "type": "screen", - "userId": "identified user id", - "anonymousId": "anon-id-new", - "event": "Screen same as event", - "properties": { - "prop1": "5" - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - }, - "destination": { - "Config": { - "apiKey": "abcde", - "useUserDefinedScreenEventName": true, - "userProvidedScreenEventString": "{{ event }}" - } - } - }, - { - "message": { - "type": "screen", - "userId": "identified user id", - "anonymousId": "anon-id-new", - "name": "Screen", - "properties": { - "prop1": "5" - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - }, - "destination": { - "Config": { - "apiKey": "abcde", - "useUserDefinedScreenEventName": true, - "userProvidedScreenEventString": "" - } - } - } -] diff --git a/test/__tests__/data/am_output.json b/test/__tests__/data/am_output.json deleted file mode 100644 index 6744a9dcef..0000000000 --- a/test/__tests__/data/am_output.json +++ /dev/null @@ -1,4469 +0,0 @@ -[ - { - "error": "Event not present. Please send event field" - }, - { - "error": "message type not supported" - }, - { - "error": "No API Key is Found. Please Configure API key from dashbaord" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "device_id": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "library": "rudderstack", - "event_type": "Order Completed", - "insert_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "event_properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "revenue_type": "Purchased", - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "revenueType": "Purchased", - "price": 48, - "quantity": 1, - "revenue": 48, - "time": 1597383030118, - "user_properties": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - "session_id": -1 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "device_id": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "library": "rudderstack", - "event_type": "Order Completed", - "insert_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "event_properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "products": [ - { - "category": "Games", - "image_url": "https:///www.example.com/product/path.jpg", - "name": "Monopoly: 3rd Edition", - "price": 19, - "product_id": "507f1f77bcf86cd799439011", - "quantity": 1, - "sku": "45790-32", - "url": "https://www.example.com/product/path" - }, - { - "category": "Games", - "name": "Uno Card Game", - "price": 3, - "product_id": "505bd76785ebb509fc183733", - "quantity": 2, - "sku": "46493-32" - } - ], - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "revenueType": "Purchased", - "price": 48, - "quantity": 1, - "revenue": 48, - "time": 1597383030118, - "user_properties": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - "session_id": -1 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Chrome", - "os_version": "test os", - "device_model": "Mac", - "platform": "Web", - "device_id": "lynnanderson@smith.net", - "app_name": "RudderLabs JavaScript SDK", - "app_version": "1.0.0", - "language": "en-US", - "session_id": -1, - "insert_id": "84e26acc-56a5-4835-8233-591137fca468", - "ip": "0.0.0.0", - "user_properties": { - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com", - "anonymousId": "123456", - "email": "test@rudderstack.com", - "postalCode": 712136, - "state": "WB", - "street": "", - "ip": "0.0.0.0", - "age": 26, - "device_id": "lynnanderson@smith.net" - }, - "event_type": "$identify", - "time": 1571043797562, - "user_id": "123456", - "country": "India", - "city": "kolkata", - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "123456" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Chrome", - "os_version": "test os", - "device_model": "Mac", - "platform": "Web", - "device_id": "lynnanderson@smith.net", - "app_name": "RudderLabs JavaScript SDK", - "app_version": "1.0.0", - "language": "en-US", - "session_id": -1, - "insert_id": "84e26acc-56a5-4835-8233-591137fca468", - "ip": "0.0.0.0", - "user_properties": { - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com", - "anonymousId": "123456", - "email": "test@rudderstack.com", - "postalCode": 712136, - "state": "WB", - "street": "", - "ip": "0.0.0.0", - "age": 26, - "device_id": "lynnanderson@smith.net" - }, - "event_type": "$identify", - "time": 1571043797562, - "user_id": "123456", - "country": "India", - "city": "kolkata", - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "123456" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Chrome", - "os_version": "77.0.3865.90", - "city": "kolkata", - "country": "India", - "platform": "Web", - "device_model": "Mac", - "library": "rudderstack", - "device_id": "123456", - "insert_id": "84e26acc-56a5-4835-8233-591137fca468", - "app_name": "RudderLabs JavaScript SDK", - "app_version": "1.0.0", - "language": "en-US", - "session_id": -1, - "event_type": "$identify", - "user_properties": { - "anonymousId": "123456", - "email": "test@rudderstack.com", - "postalCode": 712136, - "state": "WB", - "street": "", - "ip": "0.0.0.0", - "age": 26, - "initial_referring_domain": "docs.rudderstack.com", - "initial_referrer": "https://docs.rudderstack.com" - }, - "time": 1571043797562, - "user_id": "123456", - "ip": "0.0.0.0" - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "123456" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Chrome", - "os_version": "77.0.3865.90", - "platform": "Web", - "library": "rudderstack", - "device_model": "Mac", - "device_id": "00000000000000000000000000", - "insert_id": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", - "app_name": "RudderLabs JavaScript SDK", - "app_version": "1.0.0", - "language": "en-US", - "event_type": "Viewed ApplicationLoaded Page", - "event_properties": { - "category": "destination", - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "name": "ApplicationLoaded", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "initial_referring_domain": "docs.rudderstack.com", - "initial_referrer": "https://docs.rudderstack.com" - }, - "session_id": -1, - "ip": "1.1.1.1", - "time": 1571051718299, - "user_id": "12345", - "user_properties": { - "anonymousId": "12345", - "email": "test@rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com", - "initial_referrer": "https://docs.rudderstack.com" - } - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "00000000000000000000000000" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Chrome", - "os_version": "77.0.3865.90", - "platform": "Web", - "library": "rudderstack", - "device_model": "Mac", - "device_id": "00000000000000000000000000", - "insert_id": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", - "app_name": "RudderLabs JavaScript SDK", - "app_version": "1.0.0", - "language": "en-US", - "event_type": "Viewed ApplicationLoaded Page", - "event_properties": { - "category": "destination", - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "name": "ApplicationLoaded", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "initial_referring_domain": "docs.rudderstack.com", - "initial_referrer": "https://docs.rudderstack.com" - }, - "session_id": -1, - "ip": "1.1.1.1", - "groups": { - "Company": "ABC" - }, - "time": 1571051718299, - "user_id": "12345", - "user_properties": { - "anonymousId": "12345", - "email": "test@rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com", - "initial_referrer": "https://docs.rudderstack.com" - } - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "00000000000000000000000000" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Chrome", - "os_version": "77.0.3865.90", - "platform": "Web", - "library": "rudderstack", - "device_model": "Mac", - "device_id": "00000000000000000000000000", - "insert_id": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "app_name": "RudderLabs JavaScript SDK", - "app_version": "1.0.0", - "language": "en-US", - "event_type": "test track event", - "session_id": -1, - "event_properties": { - "user_actual_role": "system_admin", - "user_actual_id": 12345, - "user_time_spent": 50000 - }, - "time": 1571051718300, - "user_id": "12345", - "user_properties": { - "anonymousId": "12345", - "email": "test@rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com", - "initial_referrer": "https://docs.rudderstack.com" - }, - "ip": "0.0.0.0" - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "00000000000000000000000000" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Chrome", - "os_version": "77.0.3865.90", - "city": "kolkata", - "country": "India", - "platform": "Web", - "library": "rudderstack", - "device_model": "Mac", - "device_id": "123456", - "insert_id": "84e26acc-56a5-4835-8233-591137fca468", - "app_name": "RudderLabs JavaScript SDK", - "app_version": "1.0.0", - "language": "en-US", - "session_id": -1, - "event_type": "$identify", - "user_properties": { - "anonymousId": "123456", - "email": "test@rudderstack.com", - "postalCode": 712136, - "state": "WB", - "street": "", - "ip": "0.0.0.0", - "age": 26, - "initial_referring_domain": "docs.rudderstack.com", - "initial_referrer": "https://docs.rudderstack.com" - }, - "time": 1571043797562, - "user_id": "123456", - "ip": "0.0.0.0" - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "123456" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "device_id": "123456", - "library": "rudderstack", - "user_properties": { - "device_id": "adddd0001", - "device_os": "ios", - "device_make": "apple iphone", - "app_version": "v1.0", - "timestamp": "2020-08-28 09:00:00" - }, - "event_type": "$identify", - "session_id": 1598597129, - "time": 0, - "user_id": "ubcdfghi0001" - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "123456" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "device_id": "123456", - "session_id": 1598597129, - "event_type": "$identify", - "library": "rudderstack", - "user_properties": { - "device_id": "adddd0001", - "device_os": "ios", - "device_make": "apple iphone", - "app_version": "v1.0", - "timestamp": "2020-08-28 09:00:00" - }, - "time": 0, - "user_id": "ubcdfghi0001" - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "123456" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "device_id": "123456", - "session_id": 1598597129, - "event_type": "$identify", - "library": "rudderstack", - "user_properties": { - "device_id": "adddd0001", - "device_os": "ios", - "device_make": "apple iphone", - "app_version": "v1.0", - "timestamp": "2020-08-28 09:00:00" - }, - "time": 0, - "user_id": "ubcdfghi0001" - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "123456" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "device_id": "123456", - "session_id": -1, - "event_type": "$identify", - "library": "rudderstack", - "user_properties": { - "device_id": "adddd0001", - "device_os": "ios", - "device_make": "apple iphone", - "app_version": "v1.0", - "timestamp": "2020-08-28 09:00:00" - }, - "time": 0, - "user_id": "ubcdfghi0001" - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "123456" - }, - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Chrome", - "os_version": "85.0.4183.121", - "platform": "Web", - "library": "rudderstack", - "device_model": "Mac", - "device_id": "my-anonymous-id-new", - "app_name": "RudderLabs JavaScript SDK", - "app_version": "1.1.5", - "language": "en-US", - "event_type": "$identify", - "groups": { - "Company": "ABC" - }, - "user_properties": { - "Company": "ABC", - "utm_content": "some content", - "utm_medium": "medium", - "utm_name": "some campaign", - "utm_source": "google", - "utm_term": "keyword", - "utm_test": "other value", - "initial_referring_domain": "docs.rudderstack.com", - "initial_referrer": "https://docs.rudderstack.com" - }, - "time": 1603180498983, - "user_id": "sampleusrRudder3", - "session_id": -1 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "my-anonymous-id-new" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/groupidentify", - "headers": {}, - "params": {}, - "body": { - "JSON": {}, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "api_key": "abcde", - "identification": ["{\"group_type\":\"Company\",\"group_value\":\"ABC\"}"] - } - }, - "files": {}, - "userId": "my-anonymous-id-new" - } - ], - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Chrome", - "os_version": "85.0.4183.121", - "platform": "Web", - "library": "rudderstack", - "device_model": "Mac", - "device_id": "my-anonymous-id-new", - "app_name": "RudderLabs JavaScript SDK", - "app_version": "1.1.5", - "language": "en-US", - "event_type": "$identify", - "user_properties": { - "Company": "ABC", - "utm_content": "some content", - "utm_medium": "medium", - "utm_name": "some campaign", - "utm_source": "google", - "utm_term": "keyword", - "utm_test": "other value", - "initial_referring_domain": "docs.rudderstack.com", - "initial_referrer": "https://docs.rudderstack.com" - }, - "groups": { - "Company": "ABC" - }, - "time": 1603180498983, - "user_id": "sampleusrRudder3", - "session_id": -1 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "my-anonymous-id-new" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/groupidentify", - "headers": {}, - "params": {}, - "body": { - "JSON": {}, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "api_key": "abcde", - "identification": [ - "{\"group_type\":\"Company\",\"group_value\":\"ABC\",\"group_properties\":{\"KEY_3\":{\"CHILD_KEY_92\":\"value_95\",\"CHILD_KEY_102\":\"value_103\"},\"KEY_2\":{\"CHILD_KEY_92\":\"value_95\",\"CHILD_KEY_102\":\"value_103\"},\"name_trait\":\"Company\",\"value_trait\":\"ABC\"}}" - ] - } - }, - "files": {}, - "userId": "my-anonymous-id-new" - } - ], - { - "error": "Group call parameters are not valid" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/usermap", - "headers": {}, - "params": {}, - "body": { - "JSON": {}, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "api_key": "abcde", - "mapping": [ - "{\"global_user_id\":\"newUserIdAlias\",\"user_id\":\"sampleusrRudder3\",\"user_properties\":{\"initial_referrer\":\"https://docs.rudderstack.com\",\"initial_referring_domain\":\"docs.rudderstack.com\",\"utm_source\":\"google\",\"utm_medium\":\"medium\",\"utm_term\":\"keyword\",\"utm_content\":\"some content\",\"utm_name\":\"some campaign\",\"utm_test\":\"other value\"}}" - ] - } - }, - "files": {}, - "userId": "my-anonymous-id-new" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/usermap", - "headers": {}, - "params": {}, - "body": { - "JSON": {}, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "api_key": "abcde", - "mapping": [ - "{\"user_id\":\"sampleusrRudder3\",\"user_properties\":{\"initial_referrer\":\"https://docs.rudderstack.com\",\"initial_referring_domain\":\"docs.rudderstack.com\",\"utm_source\":\"google\",\"utm_medium\":\"medium\",\"utm_term\":\"keyword\",\"utm_content\":\"some content\",\"utm_name\":\"some campaign\",\"utm_test\":\"other value\"},\"unmap\":true}" - ] - } - }, - "files": {}, - "userId": "my-anonymous-id-new" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Android", - "os_version": "9", - "library": "rudderstack", - "device_id": "0572f78fa49c648e", - "insert_id": "1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466", - "carrier": "Android", - "app_name": "AMTestProject", - "app_version": "1.0", - "language": "en-US", - "event_type": "Sample track event BEFORE IDENTIFY1**", - "time": 1600355223515, - "user_id": "0572f78fa49c648e", - "user_properties": { - "id": "0572f78fa49c648e", - "userId": "0572f78fa49c648e", - "address": {}, - "company": {}, - "anonymousId": "0572f78fa49c648e", - "initial_referring_domain": "docs.rudderstack.com", - "initial_referrer": "https://docs.rudderstack.com" - }, - "session_id": -1 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "0572f78fa49c648e" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Android", - "os_version": "9", - "device_model": "AOSP on IA Emulator", - "device_manufacturer": "Google", - "platform": "Android", - "device_id": "0572f78fa49c648e", - "insert_id": "1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466", - "library": "rudderstack", - "carrier": "Android", - "app_name": "AMTestProject", - "app_version": "1.0", - "language": "en-US", - "event_type": "Sample track event BEFORE IDENTIFY1**", - "device_brand": "Google", - "time": 1600355223515, - "user_id": "0572f78fa49c648e", - "user_properties": { - "id": "0572f78fa49c648e", - "userId": "0572f78fa49c648e", - "address": {}, - "company": {}, - "anonymousId": "0572f78fa49c648e" - }, - "session_id": -1 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "0572f78fa49c648e" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Android", - "os_version": "9", - "device_model": "AOSP on IA Emulator", - "library": "rudderstack", - "device_manufacturer": "Google", - "platform": "Android", - "device_id": "0572f78fa49c648e", - "adid": "44c97318-9040-4361-8bc7-4eb30f665ca8", - "insert_id": "1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466", - "carrier": "Android", - "app_name": "AMTestProject", - "app_version": "1.0", - "language": "en-US", - "event_type": "Sample track event BEFORE IDENTIFY1**", - "device_brand": "Google", - "time": 1600355223515, - "user_id": "0572f78fa49c648e", - "user_properties": { - "id": "0572f78fa49c648e", - "userId": "0572f78fa49c648e", - "address": {}, - "company": {}, - "anonymousId": "0572f78fa49c648e" - }, - "session_id": -1 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "0572f78fa49c648e" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "iOS", - "os_version": "14.4.1", - "device_model": "iPhone XR", - "device_manufacturer": "Apple", - "platform": "iOS", - "library": "rudderstack", - "idfv": "0572f78fa49c648e", - "device_id": "0572f78fa49c648e", - "insert_id": "1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466", - "carrier": "AT&T", - "app_name": "AMTestProject", - "app_version": "1.0", - "language": "en-US", - "event_type": "Sample track event BEFORE IDENTIFY1**", - "device_brand": "Apple", - "time": 1600355223515, - "user_id": "0572f78fa49c648e", - "user_properties": { - "id": "0572f78fa49c648e", - "userId": "0572f78fa49c648e", - "address": {}, - "company": {}, - "anonymousId": "0572f78fa49c648e" - }, - "session_id": -1 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "0572f78fa49c648e" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "iOS", - "os_version": "14.4.1", - "device_model": "iPhone XR", - "device_manufacturer": "Apple", - "platform": "iOS", - "library": "rudderstack", - "device_id": "0572f78fa49c648e", - "idfa": "1606e649-c97e-4d5f-a2ef-b81dbc66741a", - "idfv": "0572f78fa49c648e", - "insert_id": "1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466", - "carrier": "AT&T", - "app_name": "AMTestProject", - "app_version": "1.0", - "language": "en-US", - "event_type": "Sample track event BEFORE IDENTIFY1**", - "device_brand": "Apple", - "time": 1600355223515, - "user_id": "0572f78fa49c648e", - "user_properties": { - "id": "0572f78fa49c648e", - "userId": "0572f78fa49c648e", - "address": {}, - "company": {}, - "anonymousId": "0572f78fa49c648e" - }, - "session_id": -1 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "0572f78fa49c648e" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "device_id": "anon-id-new", - "library": "rudderstack", - "event_properties": { - "prop1": "5", - "name": "Screen View" - }, - "event_type": "Viewed Screen View Screen", - "time": 1580602989544, - "user_id": "identified user id", - "user_properties": {}, - "session_id": -1, - "ip": "14.5.67.21" - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "anon-id-new" - }, - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "device_id": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "library": "rudderstack", - "event_type": "Order Completed", - "insert_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "event_properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "price": 25, - "quantity": 2, - "revenue": 48, - "revenueType": "Purchased", - "time": 1597383030118, - "user_properties": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - "session_id": -1 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "library": "rudderstack", - "device_id": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "event_type": "Product Purchased", - "insert_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9-1", - "event_properties": { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "price": 19, - "category": "Games", - "quantity": 1, - "image_url": "https:///www.example.com/product/path.jpg", - "product_id": "507f1f77bcf86cd799439011" - }, - "time": 1597383030118, - "user_properties": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - "session_id": -1 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "library": "rudderstack", - "device_id": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "event_type": "Product Purchased", - "insert_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9-2", - "event_properties": { - "sku": "46493-32", - "name": "Uno Card Game", - "price": 3, - "category": "Games", - "quantity": 2, - "product_id": "505bd76785ebb509fc183733" - }, - "time": 1597383030118, - "user_properties": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - "session_id": -1 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - } - ], - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "device_id": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "library": "rudderstack", - "event_type": "Order Completed", - "insert_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "event_properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "products": [ - { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "price": 19, - "category": "Games", - "quantity": 1, - "image_url": "https:///www.example.com/product/path.jpg", - "product_id": "507f1f77bcf86cd799439011" - }, - { - "sku": "46493-32", - "name": "Uno Card Game", - "price": 3, - "category": "Games", - "quantity": 2, - "product_id": "505bd76785ebb509fc183733" - } - ], - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "revenueType": "Purchased", - "price": 25, - "quantity": 2, - "revenue": 48, - "time": 1597383030118, - "user_properties": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - "session_id": -1 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "device_id": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "library": "rudderstack", - "event_type": "Order Completed", - "insert_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "event_properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "time": 1597383030118, - "user_properties": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - "session_id": -1 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "device_id": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "library": "rudderstack", - "event_type": "Product Purchased", - "productId": "507f1f77bcf86cd799439011", - "insert_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9-1", - "event_properties": { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "category": "Games", - "image_url": "https:///www.example.com/product/path.jpg" - }, - "price": 19, - "quantity": 1, - "revenueType": "Purchased", - "time": 1597383030118, - "user_properties": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - "session_id": -1 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "device_id": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "library": "rudderstack", - "event_type": "Product Purchased", - "productId": "505bd76785ebb509fc183733", - "insert_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9-2", - "event_properties": { - "sku": "46493-32", - "name": "Uno Card Game", - "category": "Games" - }, - "price": 3, - "quantity": 2, - "revenueType": "Purchased", - "time": 1597383030118, - "user_properties": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - "session_id": -1 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - } - ], - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "device_id": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "library": "rudderstack", - "event_type": "Order Completed", - "insert_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "event_properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "price": 25, - "products": [ - { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "price": 19, - "category": "Games", - "quantity": 1, - "image_url": "https:///www.example.com/product/path.jpg", - "product_id": "507f1f77bcf86cd799439011" - }, - { - "sku": "46493-32", - "name": "Uno Card Game", - "price": 3, - "category": "Games", - "quantity": 2, - "product_id": "505bd76785ebb509fc183733" - } - ], - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "time": 1597383030118, - "user_properties": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - "session_id": -1 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "device_id": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "library": "rudderstack", - "event_type": "Product Purchased", - "productId": "507f1f77bcf86cd799439011", - "insert_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9-1", - "event_properties": { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "category": "Games", - "image_url": "https:///www.example.com/product/path.jpg" - }, - "price": 19, - "quantity": 1, - "revenueType": "Purchased", - "time": 1597383030118, - "user_properties": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - "session_id": -1 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "device_id": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "library": "rudderstack", - "event_type": "Product Purchased", - "productId": "505bd76785ebb509fc183733", - "insert_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9-2", - "event_properties": { - "sku": "46493-32", - "name": "Uno Card Game", - "category": "Games" - }, - "price": 3, - "quantity": 2, - "revenueType": "Purchased", - "time": 1597383030118, - "user_properties": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - "session_id": -1 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - } - ], - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "device_id": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "library": "rudderstack", - "event_type": "Order Completed", - "insert_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "event_properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "price": 25, - "quantity": 2, - "revenue": 48, - "revenueType": "Purchased", - "time": 1597383030118, - "user_properties": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - "session_id": -1 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "device_id": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "library": "rudderstack", - "event_type": "Order Completed", - "insert_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "event_properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "price": 25, - "quantity": 2, - "revenue": 48, - "revenueType": "Purchased", - "time": 1597383030118, - "user_properties": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - "session_id": -1 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "device_id": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "library": "rudderstack", - "event_type": "Order Completed", - "insert_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "event_properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "price": 25, - "quantity": 2, - "revenue": 48, - "revenueType": "Purchased", - "time": 1597383030118, - "user_properties": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - "session_id": -1 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "device_id": "50be5c78-6c3f-4b60-be84-97805a316fb1", - "library": "rudderstack", - "event_type": "Order Completed", - "insert_id": "7208bbb6-2c4e-45bb-bf5b-ad426f3593e9", - "event_properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "price": 25, - "quantity": 2, - "revenue": 48, - "revenueType": "Purchased", - "time": 1597383030118, - "user_properties": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - "session_id": -1 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "50be5c78-6c3f-4b60-be84-97805a316fb1" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Chrome", - "os_version": "86.0.4240.198", - "library": "rudderstack", - "device_model": "Mac", - "platform": "Web", - "device_id": "2f8b0ba7-d76e-4b91-9577-d1b6ebd68946", - "app_name": "RudderLabs JavaScript SDK", - "app_version": "1.1.8", - "language": "en-GB", - "insert_id": "6f08cc45-95c3-40c1-90f2-2f44a92947ef", - "event_type": "$identify", - "user_properties": { - "name": "Manashi", - "phone": "990099009900", - "subjects": 5, - "experience": 2, - "$add": { - "age": 12, - "friends": 3 - }, - "initial_referring_domain": "docs.rudderstack.com", - "initial_referrer": "https://docs.rudderstack.com" - }, - "time": 1605853102342, - "user_id": "User_111", - "session_id": -1 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "2f8b0ba7-d76e-4b91-9577-d1b6ebd68946" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Chrome", - "os_version": "86.0.4240.198", - "device_model": "Mac", - "library": "rudderstack", - "platform": "Web", - "device_id": "2f8b0ba7-d76e-4b91-9577-d1b6ebd68946", - "app_name": "RudderLabs JavaScript SDK", - "app_version": "1.1.8", - "language": "en-GB", - "insert_id": "6f08cc45-95c3-40c1-90f2-2f44a92947ef", - "event_type": "$identify", - "user_properties": { - "name": "Manashi", - "phone": "990099009900", - "friends": 3, - "age": 12, - "experience": 2, - "$setOnce": { - "subjects": 5 - } - }, - "time": 1605853102342, - "user_id": "User_111", - "session_id": -1 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "2f8b0ba7-d76e-4b91-9577-d1b6ebd68946" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Chrome", - "os_version": "86.0.4240.198", - "device_model": "Mac", - "library": "rudderstack", - "platform": "Web", - "device_id": "2f8b0ba7-d76e-4b91-9577-d1b6ebd68946", - "app_name": "RudderLabs JavaScript SDK", - "app_version": "1.1.8", - "language": "en-GB", - "insert_id": "6f08cc45-95c3-40c1-90f2-2f44a92947ef", - "event_type": "$identify", - "user_properties": { - "phone": "990099009900", - "friends": 3, - "age": 12, - "subjects": 5, - "experience": 2, - "$append": { - "name": "Manashi" - } - }, - "time": 1605853102342, - "user_id": "User_111", - "session_id": -1 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "2f8b0ba7-d76e-4b91-9577-d1b6ebd68946" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Chrome", - "os_version": "86.0.4240.198", - "device_model": "Mac", - "library": "rudderstack", - "platform": "Web", - "device_id": "2f8b0ba7-d76e-4b91-9577-d1b6ebd68946", - "app_name": "RudderLabs JavaScript SDK", - "app_version": "1.1.8", - "language": "en-GB", - "insert_id": "6f08cc45-95c3-40c1-90f2-2f44a92947ef", - "event_type": "$identify", - "user_properties": { - "name": "Manashi", - "phone": "990099009900", - "friends": 3, - "age": 12, - "subjects": 5, - "$prepend": { - "experience": 2 - } - }, - "time": 1605853102342, - "user_id": "User_111", - "session_id": -1 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "2f8b0ba7-d76e-4b91-9577-d1b6ebd68946" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Chrome", - "os_version": "86.0.4240.198", - "device_model": "Mac", - "library": "rudderstack", - "platform": "Web", - "device_id": "2f8b0ba7-d76e-4b91-9577-d1b6ebd68946", - "app_name": "RudderLabs JavaScript SDK", - "app_version": "1.1.8", - "language": "en-GB", - "insert_id": "6f08cc45-95c3-40c1-90f2-2f44a92947ef", - "event_type": "$identify", - "user_properties": { - "phone": "990099009900", - "$add": { - "age": 12, - "friends": 3 - }, - "$setOnce": { - "subjects": 5 - }, - "$append": { - "name": "Manashi" - }, - "$prepend": { - "experience": 2 - } - }, - "time": 1605853102342, - "user_id": "User_111", - "session_id": -1 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "2f8b0ba7-d76e-4b91-9577-d1b6ebd68946" - }, - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Android", - "os_version": "11", - "device_model": "SM-A025M", - "device_manufacturer": "samsung", - "platform": "Android", - "device_id": "50be5c78-6c3f-4b60-be84-97805a31aaa1", - "carrier": "T-Mobile", - "app_version": "2.6.0 v3", - "language": "en-US", - "insert_id": "7208abb6-2c4e-45bb-bf5b-aa426f3593a2", - "user_properties": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a31aaa1", - "address": { - "postalCode": 712136, - "state": "WB", - "street": "" - } - }, - "event_properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 48, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "country": "United States", - "city": "San Francisco", - "event_type": "Order Completed", - "user_id": "userID123", - "time": 1597383030118, - "session_id": -1, - "region": "California", - "location_lat": "37.7672319", - "location_lng": "-122.4021353", - "dma": "San Francisco-Oakland-San Jose, CA", - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "50be5c78-6c3f-4b60-be84-97805a31aaa1" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Android", - "os_version": "11", - "device_model": "SM-A025M", - "device_manufacturer": "samsung", - "platform": "Android", - "device_id": "50be5c78-6c3f-4b60-be84-97805a31aaa1", - "carrier": "T-Mobile", - "app_version": "2.6.0 v3", - "language": "en-US", - "event_type": "Product Purchased", - "insert_id": "7208abb6-2c4e-45bb-bf5b-aa426f3593a2-1", - "user_properties": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a31aaa1", - "address": { - "postalCode": 712136, - "state": "WB", - "street": "" - } - }, - "event_properties": { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "category": "Games", - "image_url": "https:///www.example.com/product/path.jpg" - }, - "country": "United States", - "city": "San Francisco", - "user_id": "userID123", - "productId": "507f1f77bcf86cd799439011", - "revenueType": "Purchased", - "price": 19, - "quantity": 1, - "time": 1597383030118, - "session_id": -1, - "region": "California", - "location_lat": "37.7672319", - "location_lng": "-122.4021353", - "dma": "San Francisco-Oakland-San Jose, CA", - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "50be5c78-6c3f-4b60-be84-97805a31aaa1" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Android", - "os_version": "11", - "device_model": "SM-A025M", - "device_manufacturer": "samsung", - "platform": "Android", - "device_id": "50be5c78-6c3f-4b60-be84-97805a31aaa1", - "carrier": "T-Mobile", - "app_version": "2.6.0 v3", - "language": "en-US", - "event_type": "Product Purchased", - "insert_id": "7208abb6-2c4e-45bb-bf5b-aa426f3593a2-2", - "user_properties": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a31aaa1", - "address": { - "postalCode": 712136, - "state": "WB", - "street": "" - } - }, - "event_properties": { - "sku": "46493-32", - "name": "Uno Card Game", - "category": "Games" - }, - "country": "United States", - "city": "San Francisco", - "user_id": "userID123", - "productId": "505bd76785ebb509fc183733", - "revenueType": "Purchased", - "price": 3, - "quantity": 2, - "time": 1597383030118, - "session_id": -1, - "region": "California", - "location_lat": "37.7672319", - "location_lng": "-122.4021353", - "dma": "San Francisco-Oakland-San Jose, CA", - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "50be5c78-6c3f-4b60-be84-97805a31aaa1" - } - ], - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Android", - "os_version": "11", - "device_model": "SM-A025M", - "device_manufacturer": "samsung", - "platform": "Android", - "device_id": "50be5c78-6c3f-4b60-be84-97805a31aaa1", - "carrier": "T-Mobile", - "app_version": "2.6.0 v3", - "language": "en-US", - "insert_id": "7208abb6-2c4e-45bb-bf5b-aa426f3593a2", - "user_properties": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a31aaa1", - "address": { - "postalCode": 712136, - "state": "WB", - "street": "" - } - }, - "event_properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "products": [ - { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "price": 19, - "category": "Games", - "quantity": 1, - "image_url": "https:///www.example.com/product/path.jpg", - "product_id": "507f1f77bcf86cd799439011" - }, - { - "sku": "46493-32", - "name": "Uno Card Game", - "price": 3, - "category": "Games", - "quantity": 2, - "product_id": "505bd76785ebb509fc183733" - } - ], - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "country": "India", - "city": "kolkata", - "event_type": "Order Completed", - "user_id": "userID123", - "revenueType": "Purchased", - "price": 25.0, - "quantity": 2, - "revenue": 48, - "time": 1597383030118, - "session_id": -1, - "location_lat": "37.7672319", - "location_lng": "-122.4021353", - "dma": "San Francisco-Oakland-San Jose, CA", - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "50be5c78-6c3f-4b60-be84-97805a31aaa1" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Android", - "os_version": "11", - "device_model": "SM-A025M", - "device_manufacturer": "samsung", - "platform": "Android", - "carrier": "T-Mobile", - "app_version": "2.6.0 v3", - "language": "en-US", - "insert_id": "7208abb6-2c4e-45bb-bf5b-aa426f3593a2", - "user_properties": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a31aaa1", - "address": { - "postalCode": 712136, - "state": "WB", - "street": "" - } - }, - "event_properties": { - "externalID": "1637170658229-3961832492194264209" - }, - "country": "United States", - "city": "San Francisco", - "event_type": "App_Opened", - "user_id": "ab419c3a-47ce-11ec-82ac-16a1bb813a59", - "device_brand": "samsung", - "time": 1597383030118, - "session_id": -1, - "location_lat": "37.7672319", - "location_lng": "-122.4021353", - "dma": "San Francisco-Oakland-San Jose, CA", - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "app_name": "RudderLabs JavaScript SDK", - "app_version": "1.1.8", - "device_id": "2f8b0ba7-d76e-4b91-9577-d1b6ebd68946", - "device_model": "Mac", - "event_type": "$identify", - "os_name": "Chrome", - "os_version": "86.0.4240.198", - "platform": "Web", - "insert_id": "6f08cc45-95c3-40c1-90f2-2f44a92947ef", - "language": "en-GB", - "library": "rudderstack", - "time": 1605853102342, - "user_id": "User_111", - "user_properties": { - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - }, - "session_id": -1 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "2f8b0ba7-d76e-4b91-9577-d1b6ebd68946" - }, - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Android", - "os_version": "11", - "device_model": "SM-A025M", - "device_manufacturer": "samsung", - "platform": "Android", - "device_id": "50be5c78-6c3f-4b60-be84-97805a31aaa1", - "carrier": "T-Mobile", - "app_version": "2.6.0 v3", - "language": "en-US", - "insert_id": "7208abb6-2c4e-45bb-bf5b-aa426f3593a2", - "location_lat": "37.7672319", - "location_lng": "-122.4021353", - "dma": "San Francisco-Oakland-San Jose, CA", - "user_properties": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a31aaa1", - "address": { - "postalCode": 712136, - "state": "WB", - "street": "" - } - }, - "event_properties": { - "tax": 2, - "total": 27.5, - "coupon": "hasbros", - "revenue": 0, - "price": 25, - "quantity": 2, - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "products": [ - { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "price": 19, - "category": "Games", - "quantity": 1, - "image_url": "https:///www.example.com/product/path.jpg", - "product_id": "507f1f77bcf86cd799439011" - }, - { - "sku": "46493-32", - "name": "Uno Card Game", - "price": 3, - "category": "Games", - "quantity": 2, - "product_id": "505bd76785ebb509fc183733" - } - ], - "shipping": 3, - "subtotal": 22.5, - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f" - }, - "country": "India", - "city": "kolkata", - "event_type": "Order Completed", - "user_id": "userID123", - "time": 1597383030118, - "session_id": -1, - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "50be5c78-6c3f-4b60-be84-97805a31aaa1" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Android", - "os_version": "11", - "device_model": "SM-A025M", - "device_manufacturer": "samsung", - "platform": "Android", - "device_id": "50be5c78-6c3f-4b60-be84-97805a31aaa1", - "carrier": "T-Mobile", - "app_version": "2.6.0 v3", - "language": "en-US", - "event_type": "Product Purchased", - "insert_id": "7208abb6-2c4e-45bb-bf5b-aa426f3593a2-1", - "location_lat": "37.7672319", - "location_lng": "-122.4021353", - "dma": "San Francisco-Oakland-San Jose, CA", - "user_properties": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a31aaa1", - "address": { - "postalCode": 712136, - "state": "WB", - "street": "" - } - }, - "event_properties": { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "name": "Monopoly: 3rd Edition", - "category": "Games", - "image_url": "https:///www.example.com/product/path.jpg" - }, - "country": "India", - "city": "kolkata", - "user_id": "userID123", - "productId": "507f1f77bcf86cd799439011", - "revenueType": "Purchased", - "price": 19, - "quantity": 1, - "time": 1597383030118, - "session_id": -1, - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "50be5c78-6c3f-4b60-be84-97805a31aaa1" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Android", - "os_version": "11", - "device_model": "SM-A025M", - "device_manufacturer": "samsung", - "platform": "Android", - "device_id": "50be5c78-6c3f-4b60-be84-97805a31aaa1", - "carrier": "T-Mobile", - "app_version": "2.6.0 v3", - "language": "en-US", - "event_type": "Product Purchased", - "insert_id": "7208abb6-2c4e-45bb-bf5b-aa426f3593a2-2", - "location_lat": "37.7672319", - "location_lng": "-122.4021353", - "dma": "San Francisco-Oakland-San Jose, CA", - "user_properties": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a31aaa1", - "address": { - "postalCode": 712136, - "state": "WB", - "street": "" - } - }, - "event_properties": { - "sku": "46493-32", - "name": "Uno Card Game", - "category": "Games" - }, - "country": "India", - "city": "kolkata", - "user_id": "userID123", - "productId": "505bd76785ebb509fc183733", - "revenueType": "Purchased", - "price": 3, - "quantity": 2, - "time": 1597383030118, - "session_id": -1, - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "50be5c78-6c3f-4b60-be84-97805a31aaa1" - } - ], - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Android", - "os_version": "11", - "device_model": "SM-A025M", - "device_manufacturer": "samsung", - "device_id": "066a37dc92b16284", - "carrier": "T-Mobile", - "app_version": "2.6.0 v3", - "platform": "Android", - "language": "en-US", - "event_properties": { - "name": "Home", - "externalID": "1637763064335-7225034711957140329" - }, - "insert_id": "1639061715808-a934f1c2-7b55-4e78-bd4d-df209c30c8a1", - "ip": "186.54.216.75", - "user_properties": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a31aaa1", - "address": { - "postalCode": 712136, - "state": "WB", - "street": "" - } - }, - "country": "United States", - "city": "San Francisco", - "event_type": "Viewed Home Screen", - "user_id": "9e187bff-2867-11ec-82ac-02cdd434d6bf", - "device_brand": "samsung", - "time": 1639061715914, - "session_id": -1, - "region": "California", - "location_lat": "37.7672319", - "location_lng": "-122.4021353", - "dma": "San Francisco-Oakland-San Jose, CA", - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "066a37dc92b16284" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Android", - "os_version": "11", - "device_model": "SM-A025M", - "device_manufacturer": "samsung", - "device_id": "066a37dc92b16284", - "carrier": "T-Mobile", - "app_version": "2.6.0 v3", - "platform": "Android", - "language": "en-US", - "event_properties": { - "name": "Home", - "externalID": "1637763064336-7225034711957140329" - }, - "insert_id": "1639061715808-a934f1c2-7b55-5e78-bd4d-df209c31d8a2", - "ip": "186.54.216.75", - "user_properties": { - "anonymousId": "50be5c79-6c3f-4b60-be84-97805a32aaa1", - "address": { - "postalCode": 712136, - "state": "WB", - "street": "" - } - }, - "event_type": "Viewed Home Screen", - "user_id": "abcdef123456cf", - "device_brand": "samsung", - "time": 1639061715914, - "session_id": -1, - "city": "kolkata", - "country": "India", - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "066a37dc92b16284" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "device_manufacturer": "Apple", - "platform": "watchos", - "device_id": "0572f78fa49c648e", - "carrier": "AT&T", - "app_name": "AMTestProject", - "app_version": "1.0", - "language": "en-US", - "insert_id": "1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466", - "user_properties": { - "id": "0572f78fa49c648e", - "userId": "0572f78fa49c648e", - "address": {}, - "company": {}, - "anonymousId": "0572f78fa49c648e" - }, - "event_type": "Sample track event BEFORE IDENTIFY1**", - "user_id": "0572f78fa49c648e", - "device_brand": "Apple", - "idfa": "1606e649-c97e-4d5f-a2ef-b81dbc66741a", - "idfv": "0572f78fa49c648e", - "time": 1600355223515, - "session_id": -1, - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "0572f78fa49c648e" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "device_manufacturer": "Apple", - "platform": "ipados", - "device_id": "0572f78fa49c648e", - "carrier": "AT&T", - "app_name": "AMTestProject", - "app_version": "1.0", - "language": "en-US", - "insert_id": "1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466", - "user_properties": { - "id": "0572f78fa49c648e", - "userId": "0572f78fa49c648e", - "address": {}, - "company": {}, - "anonymousId": "0572f78fa49c648e" - }, - "event_type": "Sample track event BEFORE IDENTIFY1**", - "user_id": "0572f78fa49c648e", - "device_brand": "Apple", - "idfa": "1606e649-c97e-4d5f-a2ef-b81dbc66741a", - "idfv": "0572f78fa49c648e", - "time": 1600355223515, - "session_id": -1, - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "0572f78fa49c648e" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "device_manufacturer": "Apple", - "platform": "tvos", - "device_id": "0572f78fa49c648e", - "carrier": "AT&T", - "app_name": "AMTestProject", - "app_version": "1.0", - "language": "en-US", - "insert_id": "1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466", - "user_properties": { - "id": "0572f78fa49c648e", - "userId": "0572f78fa49c648e", - "address": {}, - "company": {}, - "anonymousId": "0572f78fa49c648e" - }, - "event_type": "Sample track event BEFORE IDENTIFY1**", - "user_id": "0572f78fa49c648e", - "device_brand": "Apple", - "idfa": "1606e649-c97e-4d5f-a2ef-b81dbc66741a", - "idfv": "0572f78fa49c648e", - "time": 1600355223515, - "session_id": -1, - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "0572f78fa49c648e" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Chrome", - "os_version": "77.0.3865.90", - "city": "kolkata", - "country": "India", - "platform": "Web", - "device_model": "Mac", - "library": "rudderstack", - "device_id": "123456", - "insert_id": "84e26acc-56a5-4835-8233-591137fca468", - "app_name": "RudderLabs JavaScript SDK", - "app_version": "1.0.0", - "language": "en-US", - "session_id": -1, - "event_type": "$identify", - "device_brand": "testBrand", - "device_manufacturer": "testManufacturer", - "user_properties": { - "anonymousId": "123456", - "email": "test@rudderstack.com", - "postalCode": 712136, - "state": "WB", - "street": "", - "ip": "0.0.0.0", - "age": 26, - "initial_referring_domain": "docs.rudderstack.com", - "initial_referrer": "https://docs.rudderstack.com" - }, - "time": 1571043797562, - "user_id": "123456", - "ip": "0.0.0.0" - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "123456" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Android", - "os_version": "9", - "library": "rudderstack", - "device_id": "0572f78fa49c648e", - "insert_id": "1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466", - "carrier": "Android", - "app_name": "AMTestProject", - "app_version": "1.0", - "language": "en-US", - "event_type": "Sample track event BEFORE IDENTIFY1**", - "device_brand": "testBrand", - "device_manufacturer": "testManufacturer", - "time": 1600355223515, - "user_id": "0572f78fa49c648e", - "user_properties": { - "id": "0572f78fa49c648e", - "userId": "0572f78fa49c648e", - "address": {}, - "company": {}, - "anonymousId": "0572f78fa49c648e", - "initial_referring_domain": "docs.rudderstack.com", - "initial_referrer": "https://docs.rudderstack.com" - }, - "session_id": -1 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "0572f78fa49c648e" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "device_id": "anon-id-new", - "device_brand": "testBrand", - "device_manufacturer": "testManufacturer", - "library": "rudderstack", - "event_properties": { - "prop1": "5", - "name": "Screen View" - }, - "event_type": "Viewed Screen View Screen", - "time": 1580602989544, - "user_id": "identified user id", - "user_properties": {}, - "session_id": -1, - "ip": "14.5.67.21" - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "anon-id-new" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.eu.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Chrome", - "os_version": "test os", - "device_model": "Mac", - "platform": "Web", - "device_id": "lynnanderson@smith.net", - "app_name": "RudderLabs JavaScript SDK", - "app_version": "1.0.0", - "language": "en-US", - "session_id": -1, - "insert_id": "84e26acc-56a5-4835-8233-591137fca468", - "ip": "0.0.0.0", - "user_properties": { - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com", - "anonymousId": "123456", - "email": "test@rudderstack.com", - "postalCode": 712136, - "state": "WB", - "street": "", - "ip": "0.0.0.0", - "age": 26, - "device_id": "lynnanderson@smith.net" - }, - "event_type": "$identify", - "time": 1571043797562, - "user_id": "123456", - "country": "India", - "city": "kolkata", - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "123456" - }, - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.eu.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Chrome", - "os_version": "85.0.4183.121", - "platform": "Web", - "library": "rudderstack", - "device_model": "Mac", - "device_id": "my-anonymous-id-new", - "app_name": "RudderLabs JavaScript SDK", - "app_version": "1.1.5", - "language": "en-US", - "event_type": "$identify", - "user_properties": { - "Company": "ABC", - "utm_content": "some content", - "utm_medium": "medium", - "utm_name": "some campaign", - "utm_source": "google", - "utm_term": "keyword", - "utm_test": "other value", - "initial_referring_domain": "docs.rudderstack.com", - "initial_referrer": "https://docs.rudderstack.com" - }, - "groups": { - "Company": "ABC" - }, - "time": 1603180498983, - "user_id": "sampleusrRudder3", - "session_id": -1 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "my-anonymous-id-new" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.eu.amplitude.com/groupidentify", - "headers": {}, - "params": {}, - "body": { - "JSON": {}, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "api_key": "abcde", - "identification": [ - "{\"group_type\":\"Company\",\"group_value\":\"ABC\",\"group_properties\":{\"KEY_3\":{\"CHILD_KEY_92\":\"value_95\",\"CHILD_KEY_102\":\"value_103\"},\"KEY_2\":{\"CHILD_KEY_92\":\"value_95\",\"CHILD_KEY_102\":\"value_103\"},\"name_trait\":\"Company\",\"value_trait\":\"ABC\"}}" - ] - } - }, - "files": {}, - "userId": "my-anonymous-id-new" - } - ], - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.eu.amplitude.com/usermap", - "headers": {}, - "params": {}, - "body": { - "JSON": {}, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "api_key": "abcde", - "mapping": [ - "{\"global_user_id\":\"newUserIdAlias\",\"user_id\":\"sampleusrRudder3\",\"user_properties\":{\"initial_referrer\":\"https://docs.rudderstack.com\",\"initial_referring_domain\":\"docs.rudderstack.com\",\"utm_source\":\"google\",\"utm_medium\":\"medium\",\"utm_term\":\"keyword\",\"utm_content\":\"some content\",\"utm_name\":\"some campaign\",\"utm_test\":\"other value\"}}" - ] - } - }, - "files": {}, - "userId": "my-anonymous-id-new" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Android", - "os_version": "11", - "device_model": "SM-A025M", - "device_manufacturer": "samsung", - "platform": "Android", - "event_id": 3, - "carrier": "T-Mobile", - "app_version": "2.6.0 v3", - "language": "en-US", - "insert_id": "7208abb6-2c4e-45bb-bf5b-aa426f3593a2", - "user_properties": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a31aaa1", - "address": { - "postalCode": 712136, - "state": "WB", - "street": "" - } - }, - "event_properties": { - "externalID": "1637170658229-3961832492194264209" - }, - "event_type": "App_Opened", - "user_id": "ab419c3a-47ce-11ec-82ac-16a1bb813a59", - "device_brand": "samsung", - "time": 1597383030118, - "session_id": -1, - "location_lat": "37.7672319", - "location_lng": "-122.4021353", - "dma": "San Francisco-Oakland-San Jose, CA", - "country": "United States", - "city": "San Francisco", - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Android", - "os_version": "11", - "device_model": "SM-A025M", - "device_manufacturer": "samsung", - "platform": "Android", - "event_id": 0, - "carrier": "T-Mobile", - "app_version": "2.6.0 v3", - "language": "en-US", - "insert_id": "7208abb6-2c4e-45bb-bf5b-aa426f3593a2", - "user_properties": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a31aaa1", - "address": { - "postalCode": 712136, - "state": "WB", - "street": "" - } - }, - "event_properties": { - "externalID": "1637170658229-3961832492194264209" - }, - "event_type": "App_Opened", - "user_id": "ab419c3a-47ce-11ec-82ac-16a1bb813a59", - "device_brand": "samsung", - "time": 1597383030118, - "session_id": -1, - "location_lat": "37.7672319", - "location_lng": "-122.4021353", - "dma": "San Francisco-Oakland-San Jose, CA", - "country": "United States", - "city": "San Francisco", - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Android", - "os_version": "11", - "device_model": "SM-A025M", - "device_manufacturer": "samsung", - "platform": "Android", - "carrier": "T-Mobile", - "app_version": "2.6.0 v3", - "language": "en-US", - "insert_id": "7208abb6-2c4e-45bb-bf5b-aa426f3593a2", - "user_properties": { - "anonymousId": "50be5c78-6c3f-4b60-be84-97805a31aaa1", - "address": { - "postalCode": 712136, - "state": "WB", - "street": "" - } - }, - "event_properties": { - "externalID": "1637170658229-3961832492194264209" - }, - "event_type": "App_Opened", - "user_id": "ab419c3a-47ce-11ec-82ac-16a1bb813a59", - "device_brand": "samsung", - "time": 1597383030118, - "session_id": -1, - "location_lat": "37.7672319", - "location_lng": "-122.4021353", - "dma": "San Francisco-Oakland-San Jose, CA", - "country": "United States", - "city": "San Francisco", - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Chrome", - "os_version": "test os", - "device_model": "Mac", - "platform": "Web", - "event_id": 6, - "device_id": "lynnanderson@smith.net", - "app_name": "RudderLabs JavaScript SDK", - "app_version": "1.0.0", - "language": "en-US", - "insert_id": "84e26acc-56a5-4835-8233-591137fca468", - "ip": "0.0.0.0", - "user_properties": { - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com", - "anonymousId": "123456", - "email": "test@rudderstack.com", - "postalCode": 712136, - "state": "WB", - "street": "", - "ip": "0.0.0.0", - "age": 26, - "device_id": "lynnanderson@smith.net" - }, - "event_type": "$identify", - "time": 1571043797562, - "user_id": "123456", - "session_id": -1, - "country": "India", - "city": "kolkata", - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "123456" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Chrome", - "os_version": "test os", - "device_model": "Mac", - "platform": "Web", - "event_id": 6, - "device_id": "lynnanderson@smith.net", - "app_name": "RudderLabs JavaScript SDK", - "app_version": "1.0.0", - "language": "en-US", - "insert_id": "84e26acc-56a5-4835-8233-591137fca468", - "ip": "0.0.0.0", - "user_properties": { - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com", - "anonymousId": "123456", - "email": "test@rudderstack.com", - "postalCode": 712136, - "state": "WB", - "street": "", - "ip": "0.0.0.0", - "age": 26, - "device_id": "lynnanderson@smith.net" - }, - "event_type": "$identify", - "time": 1571043797562, - "user_id": "123456", - "session_id": -1, - "country": "India", - "city": "kolkata", - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "123456" - }, - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Chrome", - "os_version": "85.0.4183.121", - "device_model": "Mac", - "platform": "Web", - "event_id": 3, - "device_id": "my-anonymous-id-new", - "app_name": "RudderLabs JavaScript SDK", - "app_version": "1.1.5", - "language": "en-US", - "user_properties": { - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com", - "utm_source": "google", - "utm_medium": "medium", - "utm_term": "keyword", - "utm_content": "some content", - "utm_name": "some campaign", - "utm_test": "other value", - "Company": "ABC" - }, - "event_type": "$identify", - "groups": { - "Company": "ABC" - }, - "time": 1603180498983, - "user_id": "sampleusrRudder3", - "session_id": -1, - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "my-anonymous-id-new" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/groupidentify", - "headers": {}, - "params": {}, - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": { - "api_key": "abcde", - "identification": [ - "{\"group_type\":\"Company\",\"group_value\":\"ABC\",\"group_properties\":{\"KEY_3\":{\"CHILD_KEY_92\":\"value_95\",\"CHILD_KEY_102\":\"value_103\"},\"KEY_2\":{\"CHILD_KEY_92\":\"value_95\",\"CHILD_KEY_102\":\"value_103\"},\"name_trait\":\"Company\",\"value_trait\":\"ABC\"}}" - ] - } - }, - "files": {}, - "userId": "my-anonymous-id-new" - } - ], - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "event_id": 7, - "device_id": "anon-id-new", - "event_properties": { - "prop1": "5", - "name": "Screen View", - "event_id": 7 - }, - "user_properties": {}, - "event_type": "Viewed Screen View Screen", - "user_id": "identified user id", - "time": 1580602989544, - "session_id": -1, - "ip": "14.5.67.21", - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "anon-id-new" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Chrome", - "os_version": "77.0.3865.90", - "device_model": "Mac", - "platform": "Web", - "device_id": "00000000000000000000000000", - "app_name": "RudderLabs JavaScript SDK", - "app_version": "1.0.0", - "language": "en-US", - "event_type": "Viewed ApplicationLoaded Page", - "event_properties": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com", - "name": "ApplicationLoaded" - }, - "session_id": -1, - "insert_id": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", - "ip": "1.1.1.1", - "event_id": 2, - "user_properties": { - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com", - "email": "test@rudderstack.com", - "anonymousId": "12345" - }, - "user_id": "12345", - "time": 1571051718299, - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "00000000000000000000000000" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/usermap", - "headers": {}, - "params": {}, - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": { - "api_key": "abcde", - "mapping": [ - "{\"global_user_id\":\"newUserIdAlias\",\"user_id\":\"sampleusrRudder3\",\"event_id\":67,\"user_properties\":{\"initial_referrer\":\"https://docs.rudderstack.com\",\"initial_referring_domain\":\"docs.rudderstack.com\",\"utm_source\":\"google\",\"utm_medium\":\"medium\",\"utm_term\":\"keyword\",\"utm_content\":\"some content\",\"utm_name\":\"some campaign\",\"utm_test\":\"other value\"}}" - ] - } - }, - "files": {}, - "userId": "my-anonymous-id-new" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Android", - "os_version": "7.1.1", - "device_model": "Android SDK built for x86", - "device_manufacturer": "Google", - "device_id": "5d205961641ee6c5", - "carrier": "Android", - "app_name": "Sample Kotlin", - "app_version": "1.2", - "platform": "Android", - "language": "en-US", - "event_properties": { - "name": "Screen event" - }, - "insert_id": "1662393883248-509420bf-b812-4f8d-bdb2-8c811bfde87f", - "user_properties": { - "anonymousId": "5d205961641ee6c5", - "id": "User Android", - "userId": "User Android" - }, - "event_type": "Viewed Screen event Screen", - "user_id": "User Android", - "device_brand": "Google", - "time": 1662393883250, - "session_id": 1662393792, - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "5d205961641ee6c5" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Android", - "os_version": "7.1.1", - "device_model": "Android SDK built for x86", - "device_manufacturer": "Google", - "device_id": "5d205961641ee6c5", - "carrier": "Android", - "app_name": "Sample Kotlin", - "app_version": "1.2", - "platform": "Android", - "language": "en-US", - "event_properties": {}, - "insert_id": "1662393883248-509420bf-b812-4f8d-bdb2-8c811bfde87f", - "user_properties": { - "anonymousId": "5d205961641ee6c5", - "id": "User Android", - "userId": "User Android" - }, - "event_type": "Viewed Screen", - "user_id": "User Android", - "device_brand": "Google", - "time": 1662393883250, - "session_id": 1662393792, - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "5d205961641ee6c5" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Chrome", - "os_version": "test os", - "device_model": "Mac", - "platform": "Web", - "device_id": "lynnanderson@smith.net", - "app_name": "RudderLabs JavaScript SDK", - "app_version": "1.0.0", - "language": "en-US", - "insert_id": "84e26acc-56a5-4835-8233-591137fca468", - "ip": "0.0.0.0", - "user_properties": { - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com", - "anonymousId": "123456", - "email": "test@rudderstack.com", - "postalCode": 712136, - "state": "WB", - "street": "", - "ip": "0.0.0.0", - "age": 26, - "device_id": "lynnanderson@smith.net" - }, - "event_type": "$identify", - "time": 1571043797562, - "user_id": "123456", - "session_id": 1662393792, - "country": "India", - "city": "kolkata", - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "123456" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Android", - "os_version": "7.1.1", - "device_model": "Android SDK built for x86", - "device_manufacturer": "Google", - "device_id": "5d205961641ee6c5", - "carrier": "Android", - "app_name": "Sample Kotlin", - "app_version": "1.2", - "platform": "Android", - "language": "en-US", - "event_properties": { - "name": "Screen event" - }, - "insert_id": "1662393883248-509420bf-b812-4f8d-bdb2-8c811bfde87f", - "user_properties": { - "anonymousId": "5d205961641ee6c5", - "id": "User Android", - "userId": "User Android" - }, - "event_type": "Viewed Screen event Screen", - "user_id": "User Android", - "device_brand": "Google", - "time": 1662393883250, - "session_id": -1, - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "5d205961641ee6c5" - }, - { - "error": "Either of user ID or device ID fields must be specified" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Chrome", - "os_version": "77.0.3865.90", - "device_model": "Mac", - "platform": "Web", - "device_id": "00000000000000000000000000", - "app_name": "RudderLabs JavaScript SDK", - "app_version": "1.0.0", - "language": "en-US", - "event_type": "My custom Page Name is ApplicationLoaded . Custom Name.", - "event_properties": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com", - "name": "ApplicationLoaded" - }, - "session_id": -1, - "insert_id": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", - "ip": "1.1.1.1", - "event_id": 2, - "user_properties": { - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com", - "email": "test@rudderstack.com", - "anonymousId": "12345" - }, - "user_id": "12345", - "time": 1571051718299, - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "00000000000000000000000000" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Chrome", - "os_version": "77.0.3865.90", - "device_model": "Mac", - "platform": "Web", - "device_id": "00000000000000000000000000", - "app_name": "RudderLabs JavaScript SDK", - "app_version": "1.0.0", - "language": "en-US", - "event_type": "ApplicationLoaded", - "event_properties": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com", - "name": "ApplicationLoaded" - }, - "session_id": -1, - "insert_id": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", - "ip": "1.1.1.1", - "event_id": 2, - "user_properties": { - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com", - "email": "test@rudderstack.com", - "anonymousId": "12345" - }, - "user_id": "12345", - "time": 1571051718299, - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "00000000000000000000000000" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Chrome", - "os_version": "77.0.3865.90", - "device_model": "Mac", - "platform": "Web", - "device_id": "00000000000000000000000000", - "app_name": "RudderLabs JavaScript SDK", - "app_version": "1.0.0", - "language": "en-US", - "event_type": "ApplicationLoaded", - "event_properties": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com", - "name": "ApplicationLoaded" - }, - "session_id": -1, - "insert_id": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", - "ip": "1.1.1.1", - "event_id": 2, - "user_properties": { - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com", - "email": "test@rudderstack.com", - "anonymousId": "12345" - }, - "user_id": "12345", - "time": 1571051718299, - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "00000000000000000000000000" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Chrome", - "os_version": "77.0.3865.90", - "device_model": "Mac", - "platform": "Web", - "device_id": "00000000000000000000000000", - "app_name": "RudderLabs JavaScript SDK", - "app_version": "1.0.0", - "language": "en-US", - "event_type": "Viewed Page", - "event_properties": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - }, - "session_id": -1, - "insert_id": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", - "ip": "1.1.1.1", - "event_id": 2, - "user_properties": { - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com", - "email": "test@rudderstack.com", - "anonymousId": "12345" - }, - "user_id": "12345", - "time": 1571051718299, - "library": "rudderstack" - } - ], - "options": { - "min_id_length": 1 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "00000000000000000000000000" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "device_id": "anon-id-new", - "library": "rudderstack", - "event_properties": { - "prop1": "5", - "name": "Screen View" - }, - "event_type": "My Screen View event.", - "time": 1580602989544, - "user_id": "identified user id", - "user_properties": {}, - "session_id": -1, - "ip": "14.5.67.21" - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "anon-id-new" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "device_id": "anon-id-new", - "library": "rudderstack", - "event_properties": { - "prop1": "5", - "name": "Screen View" - }, - "event_type": "Viewed Screen View Screen", - "time": 1580602989544, - "user_id": "identified user id", - "user_properties": {}, - "session_id": -1, - "ip": "14.5.67.21" - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "anon-id-new" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "device_id": "anon-id-new", - "library": "rudderstack", - "event_properties": { - "prop1": "5", - "name": "Screen same as event" - }, - "event_type": "Screen same as event", - "time": 1580602989544, - "user_id": "identified user id", - "user_properties": {}, - "session_id": -1, - "ip": "14.5.67.21" - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "anon-id-new" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "device_id": "anon-id-new", - "library": "rudderstack", - "event_properties": { - "prop1": "5", - "name": "Screen" - }, - "event_type": "Screen", - "time": 1580602989544, - "user_id": "identified user id", - "user_properties": {}, - "session_id": -1, - "ip": "14.5.67.21" - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "anon-id-new" - } -] diff --git a/test/__tests__/data/am_router_input.json b/test/__tests__/data/am_router_input.json deleted file mode 100644 index 83314ae7de..0000000000 --- a/test/__tests__/data/am_router_input.json +++ /dev/null @@ -1,142 +0,0 @@ -[ - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "anonymousId": "123456", - "email": "test@rudderstack.com", - "address": { - "city": "kolkata", - "country": "India", - "postalCode": 712136, - "state": "WB", - "street": "" - }, - "ip": "0.0.0.0", - "age": 26 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "type": "identify", - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "123456", - "userId": "123456", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "metadata": { - "jobId": 1 - }, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "email", - "groupValueTrait": "age" - } - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "test@rudderstack.com", - "anonymousId": "12345" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "request_ip": "1.1.1.1", - "type": "page", - "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T11:15:18.299Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "properties": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - }, - "integrations": { - "All": true - }, - "name": "ApplicationLoaded", - "sentAt": "2019-10-14T11:15:53.296Z" - }, - "metadata": { - "jobId": 2 - }, - "destination": { - "Config": { - "apiKey": "abcde" - } - } - } -] diff --git a/test/__tests__/data/am_router_output.json b/test/__tests__/data/am_router_output.json deleted file mode 100644 index bfccb478b3..0000000000 --- a/test/__tests__/data/am_router_output.json +++ /dev/null @@ -1,150 +0,0 @@ -[ - { - "batchedRequest": [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Chrome", - "os_version": "77.0.3865.90", - "device_model": "Mac", - "library": "rudderstack", - "platform": "Web", - "device_id": "123456", - "app_name": "RudderLabs JavaScript SDK", - "app_version": "1.0.0", - "language": "en-US", - "session_id": -1, - "insert_id": "84e26acc-56a5-4835-8233-591137fca468", - "city": "kolkata", - "country": "India", - "user_properties": { - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com", - "anonymousId": "123456", - "email": "test@rudderstack.com", - "postalCode": 712136, - "state": "WB", - "street": "", - "ip": "0.0.0.0", - "age": 26 - }, - "event_type": "$identify", - "time": 1571043797562, - "user_id": "123456", - "ip": "0.0.0.0" - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "123456" - } - ], - "metadata": [ - { - "jobId": 1 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "apiKey": "abcde", - "groupTypeTrait": "email", - "groupValueTrait": "age" - } - } - }, - { - "batchedRequest": [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api2.amplitude.com/2/httpapi", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "api_key": "abcde", - "events": [ - { - "os_name": "Chrome", - "os_version": "77.0.3865.90", - "device_model": "Mac", - "library": "rudderstack", - "platform": "Web", - "device_id": "00000000000000000000000000", - "app_name": "RudderLabs JavaScript SDK", - "app_version": "1.0.0", - "language": "en-US", - "event_type": "Viewed ApplicationLoaded Page", - "event_properties": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com", - "name": "ApplicationLoaded" - }, - "session_id": -1, - "insert_id": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", - "ip": "1.1.1.1", - "user_properties": { - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com", - "email": "test@rudderstack.com", - "anonymousId": "12345" - }, - "user_id": "12345", - "time": 1571051718299 - } - ], - "options": { - "min_id_length": 1 - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "00000000000000000000000000" - } - ], - "metadata": [ - { - "jobId": 2 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "apiKey": "abcde" - } - } - } -] diff --git a/test/__tests__/data/bingads_audience.json b/test/__tests__/data/bingads_audience.json deleted file mode 100644 index b6db1fa608..0000000000 --- a/test/__tests__/data/bingads_audience.json +++ /dev/null @@ -1,503 +0,0 @@ -[ - { - "description": "unhashed email available with hashEmail as true in config", - "input": { - "message": { - "userId": "user 1", - "type": "audiencelist", - "properties": { - "listData": { - "add": [ - { - "email": "alex@email.com" - }, - { - "email": "amy@abc.com" - }, - { - "email": "van@abc.com" - } - ] - } - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - }, - "destination": { - "Config": { - "customerAccountId": "89236978", - "customerId": "78678678", - "audienceId": "564567", - "hashEmail": true - } - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "", - "headers": {}, - "params": {}, - "body": { - "JSON": { - "list": [ - { - "email": "alex@email.com", - "hashedEmail": "ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b" - }, - { - "email": "amy@abc.com", - "hashedEmail": "49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579" - }, - { - "email": "van@abc.com", - "hashedEmail": "2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c" - } - ], - "action": "Add" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "hashed email available with hashEmail as false in config", - "input": { - "message": { - "userId": "user 1", - "type": "audiencelist", - "properties": { - "listData": { - "add": [ - { - "email": "ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b" - }, - { - "email": "49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579" - }, - { - "email": "2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c" - } - ] - } - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - }, - "destination": { - "Config": { - "customerAccountId": "89236978", - "customerId": "78678678", - "audienceId": "564567", - "hashEmail": false - } - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "", - "headers": {}, - "params": {}, - "body": { - "JSON": { - "list": [ - { - "email": "ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b", - "hashedEmail": "ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b" - }, - { - "email": "49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579", - "hashedEmail": "49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579" - }, - { - "email": "2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c", - "hashedEmail": "2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c" - } - ], - "action": "Add" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "Unsupported action type", - "input": { - "message": { - "userId": "user 1", - "type": "audiencelist", - "properties": { - "listData": { - "addition": [ - { - "email": "alex@email.com" - }, - { - "email": "amy@abc.com" - }, - { - "email": "van@abc.com" - } - ] - } - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - }, - "destination": { - "Config": { - "customerAccountId": "89236978", - "customerId": "78678678", - "audienceId": "564567", - "hashEmail": true - } - } - }, - "output": { - "error": "unsupported action type. Aborting message." - } - }, - { - "description": "Unsupported event type", - "input": { - "message": { - "userId": "user 1", - "type": "track", - "properties": { - "listData": { - "add": [ - { - "email": "alex@email.com" - }, - { - "email": "amy@abc.com" - }, - { - "email": "van@abc.com" - } - ] - } - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - }, - "destination": { - "Config": { - "customerAccountId": "89236978", - "customerId": "78678678", - "audienceId": "564567", - "hashEmail": true - } - } - }, - "output": { - "error": "Event type track is not supported. Aborting message." - } - }, - { - "description": "event type not present", - "input": { - "message": { - "userId": "user 1", - "type": "", - "properties": { - "listData": { - "add": [ - { - "email": "alex@email.com" - }, - { - "email": "amy@abc.com" - }, - { - "email": "van@abc.com" - } - ] - } - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - }, - "destination": { - "Config": { - "customerAccountId": "89236978", - "customerId": "78678678", - "audienceId": "564567", - "hashEmail": true - } - } - }, - "output": { - "error": "message Type is not present. Aborting message." - } - }, - { - "description": "Message properties is not present", - "input": { - "message": { - "userId": "user 1", - "type": "audiencelist", - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - }, - "destination": { - "Config": { - "customerAccountId": "89236978", - "customerId": "78678678", - "audienceId": "564567", - "hashEmail": true - } - } - }, - "output": { - "error": "Message properties is not present. Aborting message." - } - }, - { - "description": "listData is not present in properties", - "input": { - "message": { - "userId": "user 1", - "type": "audiencelist", - "properties": {}, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - }, - "destination": { - "Config": { - "customerAccountId": "89236978", - "customerId": "78678678", - "audienceId": "564567", - "hashEmail": true - } - } - }, - "output": { - "error": "listData is not present inside properties. Aborting message." - } - }, - { - "description": "Both add and remove are present in listData", - "input": { - "message": { - "userId": "user 1", - "type": "audiencelist", - "properties": { - "listData": { - "remove": [ - { - "email": "ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b" - }, - { - "email": "49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579" - }, - { - "email": "2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c" - } - ], - "update": [ - { - "email": "ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b" - }, - { - "email": "49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579" - }, - { - "email": "2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c" - } - ] - } - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - }, - "destination": { - "Config": { - "customerAccountId": "89236978", - "customerId": "78678678", - "audienceId": "564567", - "hashEmail": false - } - } - }, - "output": [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "", - "headers": {}, - "params": {}, - "body": { - "JSON": { - "list": [ - { - "email": "ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b", - "hashedEmail": "ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b" - }, - { - "email": "49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579", - "hashedEmail": "49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579" - }, - { - "email": "2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c", - "hashedEmail": "2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c" - } - ], - "action": "Remove" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "", - "headers": {}, - "params": {}, - "body": { - "JSON": { - "list": [ - { - "email": "ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b", - "hashedEmail": "ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b" - }, - { - "email": "49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579", - "hashedEmail": "49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579" - }, - { - "email": "2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c", - "hashedEmail": "2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c" - } - ], - "action": "Replace" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ] - }, - { - "description": "Only single user data is present", - "input": { - "message": { - "userId": "user 1", - "type": "audiencelist", - "properties": { - "listData": { - "add": [ - { - "email": "alex@email.com" - } - ] - } - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - }, - "metadata": { - "sourceType": "", - "destinationType": "", - "namespace": "" - }, - "destination": { - "DestinationDefinition": { - "Config": { - "cdkV2Enabled": true - } - }, - "Config": { - "customerAccountId": "89236978", - "customerId": "78678678", - "audienceId": "564567", - "hashEmail": true - } - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "", - "headers": {}, - "params": {}, - "body": { - "JSON": { - "list": [ - { - "hashedEmail": "ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b", - "email": "alex@email.com" - } - ], - "action": "Add" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - } -] diff --git a/test/__tests__/data/bingads_audience_steps.ts b/test/__tests__/data/bingads_audience_steps.ts deleted file mode 100644 index a6f665956a..0000000000 --- a/test/__tests__/data/bingads_audience_steps.ts +++ /dev/null @@ -1,155 +0,0 @@ -export const data = [ - { - description: 'unhashed email available with hashEmail as true in config', - stepName: 'prepareIdentifiersList', - input: { - message: { - userId: 'user 1', - type: 'audiencelist', - properties: { - listData: { - add: [ - { - email: 'alex@email.com', - }, - { - email: 'amy@abc.com', - }, - { - email: 'van@abc.com', - }, - ], - }, - }, - context: { - ip: '14.5.67.21', - library: { - name: 'http', - }, - }, - timestamp: '2020-02-02T00:23:09.544Z', - }, - destination: { - Config: { - customerAccountId: '89236978', - customerId: '78678678', - audienceId: '564567', - hashEmail: true, - }, - }, - }, - output: [ - { - list: [ - { - hashedEmail: 'ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b', - email: 'alex@email.com', - }, - { - hashedEmail: '49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579', - email: 'amy@abc.com', - }, - { - hashedEmail: '2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c', - email: 'van@abc.com', - }, - ], - action: 'Add', - }, - ], - }, - { - description: 'hashed email available with hashEmail as false in config', - stepName: 'prepareIdentifiersList', - bindings: undefined, - input: { - message: { - userId: 'user 1', - type: 'audiencelist', - properties: { - listData: { - update: [ - { - email: 'ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b', - }, - { - email: '49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579', - }, - ], - remove: [ - { - email: '2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c', - }, - ], - }, - }, - context: { - ip: '14.5.67.21', - library: { - name: 'http', - }, - }, - timestamp: '2020-02-02T00:23:09.544Z', - }, - destination: { - Config: { - customerAccountId: '89236978', - customerId: '78678678', - audienceId: '564567', - hashEmail: false, - }, - }, - }, - output: [ - { - list: [ - { - hashedEmail: 'ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b', - email: 'ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b', - }, - { - hashedEmail: '49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579', - email: '49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579', - }, - ], - action: 'Replace', - }, - { - list: [ - { - hashedEmail: '2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c', - email: '2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c', - }, - ], - action: 'Remove', - }, - ], - }, - { - description: 'validateInput should fail when properties are missing', - stepName: 'validateInput', - bindings: undefined, - input: { - message: { - userId: 'user 1', - type: 'audiencelist', - context: { - ip: '14.5.67.21', - library: { - name: 'http', - }, - }, - timestamp: '2020-02-02T00:23:09.544Z', - }, - destination: { - Config: { - customerAccountId: '89236978', - customerId: '78678678', - audienceId: '564567', - hashEmail: false, - }, - }, - }, - error: 'Message properties is not present. Aborting message.', - }, -]; diff --git a/test/__tests__/data/braze_input.json b/test/__tests__/data/braze_input.json deleted file mode 100644 index 3fc1dbb905..0000000000 --- a/test/__tests__/data/braze_input.json +++ /dev/null @@ -1,2036 +0,0 @@ -[ - { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false, - "dataCenter": "us-01" - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "message": { - "anonymousId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.5" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.5" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "city": "Disney", - "country": "USA", - "email": "mickey@disney.com", - "firstname": "Mickey", - "closed_at": null, - "orderTotal": 0 - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" - }, - "integrations": { - "All": true - }, - "messageId": "2536eda4-d638-4c93-8014-8ffe3f083214", - "originalTimestamp": "2020-01-24T06:29:02.362Z", - "receivedAt": "2020-01-24T11:59:02.403+05:30", - "request_ip": "[::1]:53709", - "sentAt": "2020-01-24T06:29:02.363Z", - "timestamp": "2020-01-24T11:59:02.402+05:30", - "type": "identify", - "userId": "" - } - }, - { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false, - "dataCenter": "us-01" - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "message": { - "anonymousId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.5" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.5" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" - }, - "integrations": { - "All": true - }, - "messageId": "2536eda4-d638-4c93-8014-8ffe3f083214", - "originalTimestamp": "2020-01-24T06:29:02.362Z", - "receivedAt": "2020-01-24T11:59:02.403+05:30", - "request_ip": "[::1]:53709", - "sentAt": "2020-01-24T06:29:02.363Z", - "timestamp": "2020-01-24T11:59:02.402+05:30", - "type": "identify", - "userId": "mickeyMouse" - } - }, - { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "message": { - "anonymousId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.5" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.5" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" - }, - "event": "braze revenue test", - "integrations": { - "All": true - }, - "messageId": "a6a0ad5a-bd26-4f19-8f75-38484e580fc7", - "originalTimestamp": "2020-01-24T06:29:02.364Z", - "properties": { - "currency": "USD", - "revenue": 50 - }, - "receivedAt": "2020-01-24T11:59:02.403+05:30", - "request_ip": "[::1]:53710", - "sentAt": "2020-01-24T06:29:02.364Z", - "timestamp": "2020-01-24T11:59:02.403+05:30", - "type": "track", - "userId": "mickeyMouse" - } - }, - { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "message": { - "anonymousId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.5" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.5" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "email": "mickey@disney.com", - "closed_at": null - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" - }, - "event": "braze revenue test", - "integrations": { - "All": true - }, - "messageId": "a6a0ad5a-bd26-4f19-8f75-38484e580fc7", - "originalTimestamp": "2020-01-24T06:29:02.364Z", - "properties": { - "currency": "USD", - "revenue": 50 - }, - "receivedAt": "2020-01-24T11:59:02.403+05:30", - "request_ip": "[::1]:53710", - "sentAt": "2020-01-24T06:29:02.364Z", - "timestamp": "2020-01-24T11:59:02.403+05:30", - "type": "track", - "userId": "mickeyMouse" - } - }, - { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false, - "dataCenter": "eu-01" - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "message": { - "anonymousId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.5" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.5" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" - }, - "integrations": { - "All": true - }, - "messageId": "dd266c67-9199-4a52-ba32-f46ddde67312", - "originalTimestamp": "2020-01-24T06:29:02.358Z", - "properties": { - "path": "/tests/html/index2.html", - "referrer": "", - "search": "", - "title": "", - "url": "http://localhost/tests/html/index2.html" - }, - "receivedAt": "2020-01-24T11:59:02.403+05:30", - "request_ip": "[::1]:53708", - "sentAt": "2020-01-24T06:29:02.359Z", - "timestamp": "2020-01-24T11:59:02.402+05:30", - "type": "page", - "userId": "" - } - }, - { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false, - "dataCenter": "us-01" - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "message": { - "anonymousId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.5" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.5" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "city": "Disney", - "country": "USA", - "email": "mickey@disney.com", - "firstname": "Mickey" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" - }, - "integrations": { - "All": true - }, - "messageId": "2536eda4-d638-4c93-8014-8ffe3f083214", - "originalTimestamp": "2020-01-24T06:29:02.362Z", - "receivedAt": "2020-01-24T11:59:02.403+05:30", - "request_ip": "[::1]:53709", - "sentAt": "2020-01-24T06:29:02.363Z", - "timestamp": "2020-01-24T11:59:02.402+05:30", - "type": "identify", - "userId": "" - } - }, - { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false, - "enableNestedArrayOperations": false - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "message": { - "anonymousId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.5" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.5" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "city": "Disney", - "country": "USA", - "email": "mickey@disney.com", - "firstName": "Mickey", - "gender": "woman" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" - }, - "event": "braze revenue test", - "integrations": { - "All": true - }, - "messageId": "a6a0ad5a-bd26-4f19-8f75-38484e580fc7", - "originalTimestamp": "2020-01-24T06:29:02.364Z", - "properties": { - "currency": "USD", - "revenue": 50 - }, - "receivedAt": "2020-01-24T11:59:02.403+05:30", - "request_ip": "[::1]:53710", - "sentAt": "2020-01-24T06:29:02.364Z", - "timestamp": "2020-01-24T11:59:02.403+05:30", - "type": "track", - "userId": "" - } - }, - { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "message": { - "anonymousId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.5" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.5" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "city": "Disney", - "country": "USA", - "email": "mickey@disney.com", - "firstname": "Mickey" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" - }, - "event": "KM Order Completed", - "integrations": { - "All": true - }, - "messageId": "aa5f5e44-8756-40ad-ad1e-b0d3b9fa710a", - "originalTimestamp": "2020-01-24T06:29:02.367Z", - "properties": { - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f", - "coupon": "hasbros", - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "products": [ - { - "category": "Games", - "image_url": "https:///www.example.com/product/path.jpg", - "name": "Monopoly: 3rd Edition", - "price": 19, - "product_id": "507f1f77bcf86cd799439011", - "quantity": 1, - "sku": "45790-32", - "url": "https://www.example.com/product/path" - }, - { - "category": "Games", - "name": "Uno Card Game", - "price": 3, - "product_id": "505bd76785ebb509fc183733", - "quantity": 2, - "sku": "46493-32" - } - ], - "revenue": 25, - "shipping": 3, - "subtotal": 22.5, - "tax": 2, - "total": 27.5 - }, - "receivedAt": "2020-01-24T11:59:02.403+05:30", - "request_ip": "[::1]:53712", - "sentAt": "2020-01-24T06:29:02.368Z", - "timestamp": "2020-01-24T11:59:02.402+05:30", - "type": "track", - "userId": "" - } - }, - { - "message": { - "type": "track", - "event": "Order Completed", - "sentAt": "2020-09-14T12:09:37.491Z", - "userId": "Randomuser2222", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.3", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "file:///Users/manashi/Desktop/rudder-all-sdk-application-testing/Fullstory%20test%20By%20JS%20SDK/braze.html", - "path": "/Users/manashi/Desktop/rudder-all-sdk-application-testing/Fullstory%20test%20By%20JS%20SDK/braze.html", - "title": "Fullstory Test", - "search": "", - "referrer": "" - }, - "locale": "en-GB", - "screen": { - "density": 2 - }, - "traits": { - "email": "manashi@gmaiol.com" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.3" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36" - }, - "messageId": "24ecc509-ce3e-473c-8483-ba1ea2c195cb", - "properties": { - "products": [ - { - "sku": "45790-32", - "url": "https://www.example.com/product/path", - "key1": { - "key11": "value1", - "key22": "value2" - }, - "name": "Monopoly: 3rd Edition", - "price": 19, - "category": "Games", - "quantity": 1, - "image_url": "https:///www.example.com/product/path.jpg", - "currency78": "USD", - "product_id": "507f1f77bcf86cd799439011" - }, - { - "sku": "46493-32", - "name": "Uno Card Game", - "price23": 3, - "category": "Games", - "quantity": 2, - "currency78": "USD", - "product_id": "505bd76785ebb509fc183733" - } - ] - }, - "anonymousId": "c6ff1462-b692-43d6-8f6a-659efedc99ea", - "integrations": { - "All": true - }, - "originalTimestamp": "2020-09-14T12:09:37.491Z" - }, - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - } - }, - { - "message": { - "type": "group", - "event": "Order Completed", - "sentAt": "2020-09-14T12:09:37.491Z", - "userId": "Randomuser2222", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.3", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "file:///Users/manashi/Desktop/rudder-all-sdk-application-testing/Fullstory%20test%20By%20JS%20SDK/braze.html", - "path": "/Users/manashi/Desktop/rudder-all-sdk-application-testing/Fullstory%20test%20By%20JS%20SDK/braze.html", - "title": "Fullstory Test", - "search": "", - "referrer": "" - }, - "locale": "en-GB", - "screen": { - "density": 2 - }, - "traits": { - "email": "manashi@gmaiol.com" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.3" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36" - }, - "messageId": "24ecc509-ce3e-473c-8483-ba1ea2c195cb", - "traits": { - "groupId": "1234" - }, - "anonymousId": "c6ff1462-b692-43d6-8f6a-659efedc99ea", - "integrations": { - "All": true - }, - "originalTimestamp": "2020-09-14T12:09:37.491Z" - }, - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - } - }, - { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false, - "dataCenter": "us-01" - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "message": { - "anonymousId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "channel": "web", - "context": { - "mappedToDestination": true, - "externalId": [ - { - "identifierType": "external_id", - "id": "mickey@disney.com" - } - ], - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.5" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.5" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "home_city": "Disney", - "country": "USA", - "first_name": "Mickey" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" - }, - "integrations": { - "All": true - }, - "messageId": "2536eda4-d638-4c93-8014-8ffe3f083214", - "originalTimestamp": "2020-01-24T06:29:02.362Z", - "receivedAt": "2020-01-24T11:59:02.403+05:30", - "request_ip": "[::1]:53709", - "sentAt": "2020-01-24T06:29:02.363Z", - "timestamp": "2020-01-24T11:59:02.402+05:30", - "type": "identify", - "userId": "" - } - }, - { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "message": { - "anonymousId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.5" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.5" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "city": "Disney", - "country": "USA", - "email": "mickey@disney.com", - "firstname": "Mickey" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" - }, - "event": "Order Completed", - "integrations": { - "All": true - }, - "messageId": "aa5f5e44-8756-40ad-ad1e-b0d3b9fa710a", - "originalTimestamp": "2020-01-24T06:29:02.367Z", - "properties": { - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f", - "coupon": "hasbros", - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "products": [ - { - "category": "Games", - "image_url": "https:///www.example.com/product/path.jpg", - "name": "Monopoly: 3rd Edition", - "price": 0, - "product_id": "507f1f77bcf86cd799439011", - "quantity": 1, - "sku": "45790-32", - "url": "https://www.example.com/product/path" - }, - { - "category": "Games", - "name": "Uno Card Game", - "price": 0, - "product_id": "505bd76785ebb509fc183733", - "quantity": 2, - "sku": "46493-32" - } - ], - "revenue": 25, - "shipping": 3, - "subtotal": 22.5, - "tax": 2, - "total": 27.5 - }, - "receivedAt": "2020-01-24T11:59:02.403+05:30", - "request_ip": "[::1]:53712", - "sentAt": "2020-01-24T06:29:02.368Z", - "timestamp": "2020-01-24T11:59:02.402+05:30", - "type": "track", - "userId": "" - } - }, - { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "message": { - "anonymousId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.5" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.5" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "city": "Disney", - "country": "USA", - "email": "mickey@disney.com", - "firstname": "Mickey" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" - }, - "event": "Order Completed", - "integrations": { - "All": true - }, - "messageId": "aa5f5e44-8756-40ad-ad1e-b0d3b9fa710a", - "originalTimestamp": "2020-01-24T06:29:02.367Z", - "properties": { - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f", - "coupon": "hasbros", - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "products": [ - { - "category": "Games", - "image_url": "https:///www.example.com/product/path.jpg", - "name": "Monopoly: 3rd Edition", - "price": 0, - "product_id": "507f1f77bcf86cd799439011", - "quantity": 1, - "sku": "45790-32", - "url": "https://www.example.com/product/path" - }, - { - "category": "Games", - "name": "Uno Card Game", - "price": 10, - "product_id": "505bd76785ebb509fc183733", - "quantity": 2, - "sku": "46493-32" - } - ], - "revenue": 25, - "shipping": 3, - "subtotal": 22.5, - "tax": 2, - "total": 27.5 - }, - "receivedAt": "2020-01-24T11:59:02.403+05:30", - "request_ip": "[::1]:53712", - "sentAt": "2020-01-24T06:29:02.368Z", - "timestamp": "2020-01-24T11:59:02.402+05:30", - "type": "track", - "userId": "" - } - }, - { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false, - "enableNestedArrayOperations": true - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "message": { - "anonymousId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.5" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.5" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "cars2": { - "update": [ - { - "age": 30, - "id": 2, - "identifier": "id", - "name": "abcd" - }, - { - "age": 27, - "id": 1, - "identifier": "id", - "name": "abcd" - } - ] - }, - "city": "Disney", - "country": "USA", - "email": "mickey@disney.com", - "firstName": "Mickey", - "gender": "woman", - "pets": { - "add": [ - { - "age": 27, - "id": 1, - "name": "abc" - } - ], - "remove": [ - { - "id": 3, - "identifier": "id" - }, - { - "id": 4, - "identifier": "id" - } - ], - "update": [ - { - "age": 27, - "id": 2, - "identifier": "id", - "name": "abc" - } - ] - } - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" - }, - "event": "braze revenue test", - "integrations": { - "All": true - }, - "messageId": "89140820-c187-4e62-9599-3c633771ee58", - "originalTimestamp": "2023-03-14T02:06:26.501+05:30", - "properties": { - "currency": "USD", - "mergeObjectsUpdateOperation": false, - "revenue": 50 - }, - "receivedAt": "2023-03-14T02:06:22.433+05:30", - "request_ip": "[::1]", - "rudderId": "2686e376-7e08-42f7-8edc-ff67eb238a91", - "sentAt": "2023-03-14T02:06:26.501+05:30", - "timestamp": "2023-03-14T02:06:22.432+05:30", - "type": "track", - "userId": "finalUserTestCA" - } - }, - { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false, - "enableNestedArrayOperations": true - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "message": { - "anonymousId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.5" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.5" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "cars": { - "add": [ - { - "age": 27, - "id": 1, - "name": "abc" - } - ], - "update": [ - { - "age": 30, - "id": 2, - "identifier": "id", - "name": "abcd" - }, - { - "age": 27, - "id": 1, - "identifier": "id", - "name": "abcd" - } - ] - }, - "city": "Disney", - "country": "USA", - "email": "mickey@disney.com", - "firstName": "Mickey", - "gender": "woman", - "pets": [ - { - "breed": "beagle", - "id": 1, - "name": "Gus", - "type": "dog" - }, - { - "breed": "calico", - "id": 2, - "name": "Gerald", - "type": "cat" - } - ] - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" - }, - "event": "braze revenue test", - "integrations": { - "All": true - }, - "messageId": "d1e049af-913c-46ee-8f5c-5b26966e896f", - "originalTimestamp": "2023-03-14T02:13:10.758+05:30", - "properties": { - "currency": "USD", - "mergeObjectsUpdateOperation": false, - "revenue": 50 - }, - "receivedAt": "2023-03-14T02:13:10.519+05:30", - "request_ip": "[::1]", - "rudderId": "2686e376-7e08-42f7-8edc-ff67eb238a91", - "sentAt": "2023-03-14T02:13:10.758+05:30", - "timestamp": "2023-03-14T02:13:10.518+05:30", - "type": "track", - "userId": "finalUserTestCA" - } - }, - { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false, - "dataCenter": "us-01" - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "message": { - "channel": "web", - "context": { - "traits": { - "address": { - "city": "Mathura", - "country": "India" - }, - "email": "a@gmail.com", - "phone": "9988123321", - "firstName": "anuj", - "lastName": "kumar", - "gender": "male", - "birthday": "01/01/1971", - "avatar": "https://i.kym-cdn.com/entries/icons/mobile/000/034/772/anuj-1.jpg", - "bio": "Tech and tension go together", - "language": "en-IN", - "job": "Director", - "company": "Plinth India" - }, - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.5" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.5" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" - }, - "integrations": { - "All": true - }, - "request_ip": "[::1]:53709", - "type": "identify", - "userId": "ank101" - } - }, - { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false, - "dataCenter": "us-01" - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "message": { - "channel": "web", - "context": { - "traits": { - "address": { - "city": "Mathura", - "country": "India" - }, - "email": "a@gmail.com", - "phone": "9988123321", - "firstName": "anuj", - "lastName": "kumar", - "gender": null, - "birthday": "01/01/1971", - "avatar": "https://i.kym-cdn.com/entries/icons/mobile/000/034/772/anuj-1.jpg", - "bio": "Tech and tension go together", - "language": "en-IN", - "job": "Director", - "company": null - }, - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.5" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.5" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" - }, - "integrations": { - "All": true - }, - "request_ip": "[::1]:53709", - "type": "identify", - "userId": "ank101" - } - }, - { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false, - "dataCenter": "US-03" - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.5" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.5" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" - }, - "integrations": { - "All": true - }, - "request_ip": "[::1]:53709", - "type": "alias", - "previousId": "userId", - "userId": "userMergeTest2" - } - }, - { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false, - "dataCenter": "US-03" - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.5" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.5" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" - }, - "integrations": { - "All": true - }, - "request_ip": "[::1]:53709", - "type": "alias", - "userId": "userMergeTest2" - } - }, - { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false, - "dataCenter": "US-03" - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.5" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.5" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" - }, - "integrations": { - "All": true - }, - "request_ip": "[::1]:53709", - "type": "alias", - "previousId": "userMergeTest2" - } - }, - { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false, - "dataCenter": "us-01" - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "metadata": { - "sourceType": "metadata.sourceType", - "destinationType": "metadata.destinationType", - "k8_namespace": "metadata.namespace" - }, - "message": { - "channel": "web", - "context": { - "traits": { - "email": "A@HOTMAIL.COM", - "phone": "9988123321", - "firstName": "anil", - "lastName": "kumar", - "gender": null, - "birthday": "01/01/1971", - "avatar": "https://i.kym-cdn.com/entries/icons/mobile/000/034/772/anuj-1.jpg", - "bio": "Tech and tension go together", - "language": "en-IN", - "job": "Director", - "company": null - }, - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.5" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.5" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" - }, - "integrations": { - "All": true - }, - "request_ip": "[::1]:53709", - "type": "identify", - "userId": "ank101" - } - }, - { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false, - "dataCenter": "us-01" - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "metadata": { - "sourceType": "metadata.sourceType", - "destinationType": "metadata.destinationType", - "k8_namespace": "metadata.namespace" - }, - "message": { - "anonymousId": "e6ab2c5e-1cda-34a9-g962-r2f62df18abc", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.5" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.5" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "city": "Disney", - "country": "USA", - "email": "mickey@disney.com", - "firstname": "Mickey" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" - }, - "event": "Order Completed", - "integrations": { - "All": true - }, - "messageId": "aa5f5e44-8756-40ad-ad1e-b0d3b9fa710a", - "originalTimestamp": "2020-01-24T06:29:02.367Z", - "properties": { - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f", - "coupon": "hasbros", - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "products": [ - { - "category": "Games", - "image_url": "https:///www.example.com/product/path.jpg", - "name": "Monopoly: 3rd Edition", - "price": 0, - "product_id": "507f1f77bcf86cd799439011", - "quantity": 1, - "sku": "45790-32", - "url": "https://www.example.com/product/path" - } - ], - "revenue": 25, - "shipping": 3, - "subtotal": 22.5, - "tax": 2, - "total": 27.5 - }, - "receivedAt": "2020-01-24T11:59:02.403+05:30", - "request_ip": "[::1]:53712", - "sentAt": "2020-01-24T06:29:02.368Z", - "timestamp": "2020-01-24T11:59:02.402+05:30", - "type": "track", - "userId": "" - } - }, - { - "message": { - "type": "group", - "event": "Order Completed", - "sentAt": "2020-09-14T12:09:37.491Z", - "userId": "Randomuser2222", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.3", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "file:///Users/manashi/Desktop/rudder-all-sdk-application-testing/Fullstory%20test%20By%20JS%20SDK/braze.html", - "path": "/Users/manashi/Desktop/rudder-all-sdk-application-testing/Fullstory%20test%20By%20JS%20SDK/braze.html", - "title": "Fullstory Test", - "search": "", - "referrer": "" - }, - "locale": "en-GB", - "screen": { - "density": 2 - }, - "traits": { - "email": "manashi@gmaiol.com" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.3" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36" - }, - "messageId": "24ecc509-ce3e-473c-8483-ba1ea2c195cb", - "groupId": "1234", - "traits": { - "phone": "5055077683", - "subscriptionState": "subscribed" - }, - "anonymousId": "c6ff1462-b692-43d6-8f6a-659efedc99ea", - "integrations": { - "All": true - }, - "originalTimestamp": "2020-09-14T12:09:37.491Z" - }, - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false, - "enableSubscriptionGroupInGroupCall": true - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - } - }, - { - "message": { - "type": "group", - "event": "Order Completed", - "sentAt": "2020-09-14T12:09:37.491Z", - "userId": "Randomuser2222", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.3", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "file:///Users/manashi/Desktop/rudder-all-sdk-application-testing/Fullstory%20test%20By%20JS%20SDK/braze.html", - "path": "/Users/manashi/Desktop/rudder-all-sdk-application-testing/Fullstory%20test%20By%20JS%20SDK/braze.html", - "title": "Fullstory Test", - "search": "", - "referrer": "" - }, - "locale": "en-GB", - "screen": { - "density": 2 - }, - "traits": { - "email": "manashi@gmaiol.com" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.3" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36" - }, - "messageId": "24ecc509-ce3e-473c-8483-ba1ea2c195cb", - "groupId": "1234", - "traits": { - "email": "abc@test.com", - "subscriptionState": "unsubscribed" - }, - "anonymousId": "c6ff1462-b692-43d6-8f6a-659efedc99ea", - "integrations": { - "All": true - }, - "originalTimestamp": "2020-09-14T12:09:37.491Z" - }, - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false, - "enableSubscriptionGroupInGroupCall": true - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - } - }, - { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "metadata": { - "sourceType": "", - "destinationType": "", - "namespace": "" - }, - "message": { - "anonymousId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.5" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.5" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" - }, - "event": "braze revenue test", - "integrations": { - "All": true, - "braze": { - "appId": "123" - } - }, - "messageId": "a6a0ad5a-bd26-4f19-8f75-38484e580fc7", - "originalTimestamp": "2020-01-24T06:29:02.364Z", - "properties": { - "currency": "USD", - "revenue": 50 - }, - "receivedAt": "2020-01-24T11:59:02.403+05:30", - "request_ip": "[::1]:53710", - "sentAt": "2020-01-24T06:29:02.364Z", - "timestamp": "2020-01-24T11:59:02.403+05:30", - "type": "track", - "userId": "mickeyMouse" - } - }, - { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false, - "sendPurchaseEventWithExtraProperties": true - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "message": { - "anonymousId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.5" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.5" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "city": "Disney", - "country": "USA", - "email": "mickey@disney.com", - "firstname": "Mickey" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" - }, - "event": "Order Completed", - "integrations": { - "All": true - }, - "messageId": "aa5f5e44-8756-40ad-ad1e-b0d3b9fa710a", - "originalTimestamp": "2020-01-24T06:29:02.367Z", - "properties": { - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f", - "coupon": "hasbros", - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "products": [ - { - "category": "Games", - "image_url": "https:///www.example.com/product/path.jpg", - "name": "Monopoly: 3rd Edition", - "price": 0, - "product_id": "507f1f77bcf86cd799439023", - "quantity": 1, - "sku": "45790-32", - "url": "https://www.example.com/product/path" - }, - { - "category": "Games", - "name": "Uno Card Game", - "price": 0, - "product_id": "505bd76785ebb509fc183724", - "quantity": 2, - "sku": "46493-32" - } - ], - "revenue": 25, - "shipping": 3, - "subtotal": 22.5, - "tax": 2, - "total": 27.5 - }, - "receivedAt": "2020-01-24T11:59:02.403+05:30", - "request_ip": "[::1]:53712", - "sentAt": "2020-01-24T06:29:02.368Z", - "timestamp": "2020-01-24T11:59:02.402+05:30", - "type": "track", - "userId": "" - } - }, - { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false, - "dataCenter": "us-01" - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "message": { - "anonymousId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "channel": "web", - "context": { - "traits": { - "city": "Disney", - "country": "USA", - "email": 123, - "firstname": "Mickey", - "closed_at": null, - "orderTotal": 0 - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" - }, - "integrations": { - "All": true - }, - "messageId": "2536eda4-d638-4c93-8014-8ffe3f083214", - "originalTimestamp": "2020-01-24T06:29:02.362Z", - "receivedAt": "2020-01-24T11:59:02.403+05:30", - "request_ip": "[::1]:53709", - "sentAt": "2020-01-24T06:29:02.363Z", - "timestamp": "2020-01-24T11:59:02.402+05:30", - "type": "identify", - "userId": "" - } - }, - { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false, - "sendPurchaseEventWithExtraProperties": true - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "message": { - "anonymousId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "channel": "web", - "context": { - "traits": { - "city": "Disney", - "country": "USA", - "email": null, - "firstname": "Mickey" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" - }, - "event": "Order Completed", - "integrations": { - "All": true - }, - "messageId": "aa5f5e44-8756-40ad-ad1e-b0d3b9fa710a", - "originalTimestamp": "2020-01-24T06:29:02.367Z", - "properties": { - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f", - "coupon": "hasbros", - "currency": "USD", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "products": [ - { - "category": "Games", - "image_url": "https:///www.example.com/product/path.jpg", - "name": "Monopoly: 3rd Edition", - "price": 0, - "product_id": "507f1f77bcf86cd799439023", - "quantity": 1, - "sku": "45790-32", - "url": "https://www.example.com/product/path" - }, - { - "category": "Games", - "name": "Uno Card Game", - "price": 0, - "product_id": "505bd76785ebb509fc183724", - "quantity": 2, - "sku": "46493-32" - } - ], - "revenue": 25, - "shipping": 3, - "subtotal": 22.5, - "tax": 2, - "total": 27.5 - }, - "receivedAt": "2020-01-24T11:59:02.403+05:30", - "request_ip": "[::1]:53712", - "sentAt": "2020-01-24T06:29:02.368Z", - "timestamp": "2020-01-24T11:59:02.402+05:30", - "type": "track", - "userId": "" - } - } -] diff --git a/test/__tests__/data/braze_output.json b/test/__tests__/data/braze_output.json deleted file mode 100644 index 7e0715f057..0000000000 --- a/test/__tests__/data/braze_output.json +++ /dev/null @@ -1,1113 +0,0 @@ -[ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rest.iad-01.braze.com/users/track", - "headers": { - "Content-Type": "application/json", - "Accept": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "attributes": [ - { - "email": "mickey@disney.com", - "city": "Disney", - "country": "USA", - "firstname": "Mickey", - "closed_at": null, - "orderTotal": 0, - "_update_existing_only": false, - "user_alias": { - "alias_name": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "alias_label": "rudder_id" - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca" - }, - { - "message": "No attributes found to update the user profile" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rest.fra-01.braze.eu/users/track", - "headers": { - "Content-Type": "application/json", - "Accept": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "partner": "RudderStack", - "events": [ - { - "name": "braze revenue test", - "time": "2020-01-24T11:59:02.403+05:30", - "properties": { - "revenue": 50 - }, - "external_id": "mickeyMouse" - } - ] - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "mickeyMouse" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rest.fra-01.braze.eu/users/track", - "headers": { - "Content-Type": "application/json", - "Accept": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "attributes": [ - { - "email": "mickey@disney.com", - "closed_at": null, - "external_id": "mickeyMouse" - } - ], - "partner": "RudderStack", - "events": [ - { - "name": "braze revenue test", - "time": "2020-01-24T11:59:02.403+05:30", - "properties": { - "revenue": 50 - }, - "external_id": "mickeyMouse" - } - ] - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "mickeyMouse" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rest.fra-01.braze.eu/users/track", - "headers": { - "Content-Type": "application/json", - "Accept": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "events": [ - { - "name": "Page Viewed", - "time": "2020-01-24T11:59:02.402+05:30", - "properties": { - "path": "/tests/html/index2.html", - "referrer": "", - "search": "", - "title": "", - "url": "http://localhost/tests/html/index2.html" - }, - "_update_existing_only": false, - "user_alias": { - "alias_name": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "alias_label": "rudder_id" - } - } - ], - "partner": "RudderStack" - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rest.iad-01.braze.com/users/track", - "headers": { - "Content-Type": "application/json", - "Accept": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "attributes": [ - { - "city": "Disney", - "country": "USA", - "email": "mickey@disney.com", - "firstname": "Mickey", - "_update_existing_only": false, - "user_alias": { - "alias_name": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "alias_label": "rudder_id" - } - } - ] - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rest.fra-01.braze.eu/users/track", - "headers": { - "Content-Type": "application/json", - "Accept": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "attributes": [ - { - "city": "Disney", - "country": "USA", - "email": "mickey@disney.com", - "first_name": "Mickey", - "gender": "F", - "_update_existing_only": false, - "user_alias": { - "alias_name": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "alias_label": "rudder_id" - } - } - ], - "events": [ - { - "name": "braze revenue test", - "time": "2020-01-24T11:59:02.403+05:30", - "properties": { - "revenue": 50 - }, - "_update_existing_only": false, - "user_alias": { - "alias_name": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "alias_label": "rudder_id" - } - } - ], - "partner": "RudderStack" - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rest.fra-01.braze.eu/users/track", - "headers": { - "Content-Type": "application/json", - "Accept": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "attributes": [ - { - "city": "Disney", - "country": "USA", - "email": "mickey@disney.com", - "firstname": "Mickey", - "_update_existing_only": false, - "user_alias": { - "alias_name": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "alias_label": "rudder_id" - } - } - ], - "events": [ - { - "name": "KM Order Completed", - "time": "2020-01-24T11:59:02.402+05:30", - "properties": { - "affiliation": "Google Store", - "checkout_id": "fksdjfsdjfisjf9sdfjsd9f", - "coupon": "hasbros", - "discount": 2.5, - "order_id": "50314b8e9bcf000000000000", - "products": [ - { - "category": "Games", - "image_url": "https:///www.example.com/product/path.jpg", - "name": "Monopoly: 3rd Edition", - "price": 19, - "product_id": "507f1f77bcf86cd799439011", - "quantity": 1, - "sku": "45790-32", - "url": "https://www.example.com/product/path" - }, - { - "category": "Games", - "name": "Uno Card Game", - "price": 3, - "product_id": "505bd76785ebb509fc183733", - "quantity": 2, - "sku": "46493-32" - } - ], - "revenue": 25, - "shipping": 3, - "subtotal": 22.5, - "tax": 2, - "total": 27.5 - }, - "_update_existing_only": false, - "user_alias": { - "alias_name": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "alias_label": "rudder_id" - } - } - ], - "partner": "RudderStack" - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca" - }, - { - "statusCode": 400, - "message": "Invalid Order Completed event: Message properties and product at index: 0 is missing currency" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rest.fra-01.braze.eu/users/track", - "headers": { - "Content-Type": "application/json", - "Accept": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "attributes": [ - { - "ab_rudder_group_1234": true, - "external_id": "Randomuser2222" - } - ], - "partner": "RudderStack" - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "Randomuser2222" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rest.iad-01.braze.com/users/track", - "headers": { - "Content-Type": "application/json", - "Accept": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "attributes": [ - { - "home_city": "Disney", - "country": "USA", - "external_id": "mickey@disney.com", - "first_name": "Mickey" - } - ] - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "mickey@disney.com" - }, - { - "body": { - "FORM": {}, - "JSON": { - "attributes": [ - { - "_update_existing_only": false, - "city": "Disney", - "country": "USA", - "email": "mickey@disney.com", - "firstname": "Mickey", - "user_alias": { - "alias_label": "rudder_id", - "alias_name": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca" - } - } - ], - "partner": "RudderStack", - "purchases": [ - { - "_update_existing_only": false, - "currency": "USD", - "price": 0, - "product_id": "507f1f77bcf86cd799439011", - "quantity": 1, - "time": "2020-01-24T11:59:02.402+05:30", - "user_alias": { - "alias_label": "rudder_id", - "alias_name": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca" - } - }, - { - "_update_existing_only": false, - "currency": "USD", - "price": 0, - "product_id": "505bd76785ebb509fc183733", - "quantity": 2, - "time": "2020-01-24T11:59:02.402+05:30", - "user_alias": { - "alias_label": "rudder_id", - "alias_name": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca" - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://rest.fra-01.braze.eu/users/track", - "files": {}, - "headers": { - "Accept": "application/json", - "Authorization": "Bearer dummyApiKey", - "Content-Type": "application/json" - }, - "method": "POST", - "params": {}, - "type": "REST", - "userId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "version": "1" - }, - { - "body": { - "FORM": {}, - "JSON": { - "attributes": [ - { - "_update_existing_only": false, - "city": "Disney", - "country": "USA", - "email": "mickey@disney.com", - "firstname": "Mickey", - "user_alias": { - "alias_label": "rudder_id", - "alias_name": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca" - } - } - ], - "partner": "RudderStack", - "purchases": [ - { - "_update_existing_only": false, - "currency": "USD", - "price": 0, - "product_id": "507f1f77bcf86cd799439011", - "quantity": 1, - "time": "2020-01-24T11:59:02.402+05:30", - "user_alias": { - "alias_label": "rudder_id", - "alias_name": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca" - } - }, - { - "_update_existing_only": false, - "currency": "USD", - "price": 10, - "product_id": "505bd76785ebb509fc183733", - "quantity": 2, - "time": "2020-01-24T11:59:02.402+05:30", - "user_alias": { - "alias_label": "rudder_id", - "alias_name": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca" - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://rest.fra-01.braze.eu/users/track", - "files": {}, - "headers": { - "Accept": "application/json", - "Authorization": "Bearer dummyApiKey", - "Content-Type": "application/json" - }, - "method": "POST", - "params": {}, - "type": "REST", - "userId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "version": "1" - }, - { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "name": "braze revenue test", - "time": "2023-03-14T02:06:22.432+05:30", - "properties": { - "revenue": 50, - "mergeObjectsUpdateOperation": false - }, - "external_id": "finalUserTestCA" - } - ], - "partner": "RudderStack", - "attributes": [ - { - "city": "Disney", - "pets": { - "$add": [ - { - "id": 1, - "age": 27, - "name": "abc" - } - ], - "$remove": [ - { - "$identifier_key": "id", - "$identifier_value": 3 - }, - { - "$identifier_key": "id", - "$identifier_value": 4 - } - ], - "$update": [ - { - "$new_object": { - "age": 27, - "name": "abc" - }, - "$identifier_key": "id", - "$identifier_value": 2 - } - ] - }, - "cars2": { - "$update": [ - { - "$new_object": { - "age": 30, - "name": "abcd" - }, - "$identifier_key": "id", - "$identifier_value": 2 - }, - { - "$new_object": { - "age": 27, - "name": "abcd" - }, - "$identifier_key": "id", - "$identifier_value": 1 - } - ] - }, - "email": "mickey@disney.com", - "gender": "F", - "country": "USA", - "first_name": "Mickey", - "external_id": "finalUserTestCA", - "_merge_objects": false - } - ] - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "finalUserTestCA", - "headers": { - "Accept": "application/json", - "Content-Type": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "version": "1", - "endpoint": "https://rest.fra-01.braze.eu/users/track" - }, - { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "name": "braze revenue test", - "time": "2023-03-14T02:13:10.518+05:30", - "properties": { - "revenue": 50, - "mergeObjectsUpdateOperation": false - }, - "external_id": "finalUserTestCA" - } - ], - "partner": "RudderStack", - "attributes": [ - { - "cars": { - "$add": [ - { - "id": 1, - "age": 27, - "name": "abc" - } - ], - "$update": [ - { - "$new_object": { - "age": 30, - "name": "abcd" - }, - "$identifier_key": "id", - "$identifier_value": 2 - }, - { - "$new_object": { - "age": 27, - "name": "abcd" - }, - "$identifier_key": "id", - "$identifier_value": 1 - } - ] - }, - "city": "Disney", - "pets": [ - { - "id": 1, - "name": "Gus", - "type": "dog", - "breed": "beagle" - }, - { - "id": 2, - "name": "Gerald", - "type": "cat", - "breed": "calico" - } - ], - "email": "mickey@disney.com", - "gender": "F", - "country": "USA", - "first_name": "Mickey", - "external_id": "finalUserTestCA", - "_merge_objects": false - } - ] - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "finalUserTestCA", - "headers": { - "Accept": "application/json", - "Content-Type": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "version": "1", - "endpoint": "https://rest.fra-01.braze.eu/users/track" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rest.iad-01.braze.com/users/track", - "headers": { - "Content-Type": "application/json", - "Accept": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "attributes": [ - { - "country": "India", - "dob": "01/01/1971", - "email": "a@gmail.com", - "first_name": "anuj", - "gender": "M", - "home_city": "Mathura", - "image_url": "https://i.kym-cdn.com/entries/icons/mobile/000/034/772/anuj-1.jpg", - "last_name": "kumar", - "phone": "9988123321", - "bio": "Tech and tension go together", - "language": "en-IN", - "job": "Director", - "company": "Plinth India", - "external_id": "ank101" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "ank101" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rest.iad-01.braze.com/users/track", - "headers": { - "Content-Type": "application/json", - "Accept": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "attributes": [ - { - "country": "India", - "dob": "01/01/1971", - "email": "a@gmail.com", - "first_name": "anuj", - "gender": null, - "home_city": "Mathura", - "image_url": "https://i.kym-cdn.com/entries/icons/mobile/000/034/772/anuj-1.jpg", - "last_name": "kumar", - "phone": "9988123321", - "bio": "Tech and tension go together", - "language": "en-IN", - "job": "Director", - "company": null, - "external_id": "ank101" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "ank101" - }, - { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "merge_updates": [ - { - "identifier_to_keep": { - "external_id": "userMergeTest2" - }, - "identifier_to_merge": { - "external_id": "userId" - } - } - ] - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "userMergeTest2", - "headers": { - "Accept": "application/json", - "Content-Type": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "version": "1", - "endpoint": "https://rest.iad-03.braze.com/users/merge" - }, - { - "statusCode": 400, - "message": "[BRAZE]: previousId is required for alias call" - }, - { - "statusCode": 400, - "message": "[BRAZE]: userId is required for alias call" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rest.iad-01.braze.com/users/track", - "headers": { - "Content-Type": "application/json", - "Accept": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "attributes": [ - { - "dob": "01/01/1971", - "email": "a@hotmail.com", - "first_name": "anil", - "gender": null, - "image_url": "https://i.kym-cdn.com/entries/icons/mobile/000/034/772/anuj-1.jpg", - "last_name": "kumar", - "phone": "9988123321", - "bio": "Tech and tension go together", - "language": "en-IN", - "job": "Director", - "company": null, - "external_id": "ank101" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "ank101" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rest.iad-01.braze.com/users/track", - "headers": { - "Content-Type": "application/json", - "Accept": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "attributes": [ - { - "email": "mickey@disney.com", - "city": "Disney", - "country": "USA", - "firstname": "Mickey", - "_update_existing_only": false, - "user_alias": { - "alias_name": "e6ab2c5e-1cda-34a9-g962-r2f62df18abc", - "alias_label": "rudder_id" - } - } - ], - "purchases": [ - { - "product_id": "507f1f77bcf86cd799439011", - "price": 0, - "currency": "USD", - "quantity": 1, - "time": "2020-01-24T11:59:02.402+05:30", - "_update_existing_only": false, - "user_alias": { - "alias_name": "e6ab2c5e-1cda-34a9-g962-r2f62df18abc", - "alias_label": "rudder_id" - } - } - ], - "partner": "RudderStack" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "e6ab2c5e-1cda-34a9-g962-r2f62df18abc" - }, - { - "body": { - "FORM": {}, - "JSON": { - "subscription_groups": [ - { - "external_id": ["Randomuser2222"], - "phones": ["5055077683"], - "subscription_group_id": "1234", - "subscription_state": "subscribed" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://rest.fra-01.braze.eu/v2/subscription/status/set", - "files": {}, - "headers": { - "Accept": "application/json", - "Authorization": "Bearer dummyApiKey", - "Content-Type": "application/json" - }, - "method": "POST", - "params": {}, - "type": "REST", - "version": "1" - }, - { - "body": { - "FORM": {}, - "JSON": { - "subscription_groups": [ - { - "external_id": ["Randomuser2222"], - "emails": ["abc@test.com"], - "subscription_group_id": "1234", - "subscription_state": "unsubscribed" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://rest.fra-01.braze.eu/v2/subscription/status/set", - "files": {}, - "headers": { - "Accept": "application/json", - "Authorization": "Bearer dummyApiKey", - "Content-Type": "application/json" - }, - "method": "POST", - "params": {}, - "type": "REST", - "version": "1" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rest.fra-01.braze.eu/users/track", - "headers": { - "Content-Type": "application/json", - "Accept": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "partner": "RudderStack", - "events": [ - { - "name": "braze revenue test", - "time": "2020-01-24T11:59:02.403+05:30", - "properties": { - "revenue": 50 - }, - "external_id": "mickeyMouse", - "app_id": "123" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "mickeyMouse" - }, - { - "body": { - "FORM": {}, - "JSON": { - "attributes": [ - { - "_update_existing_only": false, - "city": "Disney", - "country": "USA", - "email": "mickey@disney.com", - "firstname": "Mickey", - "user_alias": { - "alias_label": "rudder_id", - "alias_name": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca" - } - } - ], - "partner": "RudderStack", - "purchases": [ - { - "_update_existing_only": false, - "currency": "USD", - "price": 0, - "product_id": "507f1f77bcf86cd799439023", - "properties": { - "category": "Games", - "image_url": "https:///www.example.com/product/path.jpg", - "name": "Monopoly: 3rd Edition", - "url": "https://www.example.com/product/path" - }, - "quantity": 1, - "time": "2020-01-24T11:59:02.402+05:30", - "user_alias": { - "alias_label": "rudder_id", - "alias_name": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca" - } - }, - { - "_update_existing_only": false, - "currency": "USD", - "price": 0, - "product_id": "505bd76785ebb509fc183724", - "properties": { - "category": "Games", - "name": "Uno Card Game" - }, - "quantity": 2, - "time": "2020-01-24T11:59:02.402+05:30", - "user_alias": { - "alias_label": "rudder_id", - "alias_name": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca" - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://rest.fra-01.braze.eu/users/track", - "files": {}, - "headers": { - "Accept": "application/json", - "Authorization": "Bearer dummyApiKey", - "Content-Type": "application/json" - }, - "method": "POST", - "params": {}, - "type": "REST", - "userId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "version": "1" - }, - { - "statusCode": 400, - "message": "Invalid email, email must be a valid string" - }, - { - "body": { - "FORM": {}, - "JSON": { - "attributes": [ - { - "_update_existing_only": false, - "city": "Disney", - "country": "USA", - "email": null, - "firstname": "Mickey", - "user_alias": { - "alias_label": "rudder_id", - "alias_name": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca" - } - } - ], - "partner": "RudderStack", - "purchases": [ - { - "_update_existing_only": false, - "currency": "USD", - "price": 0, - "product_id": "507f1f77bcf86cd799439023", - "properties": { - "category": "Games", - "image_url": "https:///www.example.com/product/path.jpg", - "name": "Monopoly: 3rd Edition", - "url": "https://www.example.com/product/path" - }, - "quantity": 1, - "time": "2020-01-24T11:59:02.402+05:30", - "user_alias": { - "alias_label": "rudder_id", - "alias_name": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca" - } - }, - { - "_update_existing_only": false, - "currency": "USD", - "price": 0, - "product_id": "505bd76785ebb509fc183724", - "properties": { - "category": "Games", - "name": "Uno Card Game" - }, - "quantity": 2, - "time": "2020-01-24T11:59:02.402+05:30", - "user_alias": { - "alias_label": "rudder_id", - "alias_name": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca" - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://rest.fra-01.braze.eu/users/track", - "files": {}, - "headers": { - "Accept": "application/json", - "Authorization": "Bearer dummyApiKey", - "Content-Type": "application/json" - }, - "method": "POST", - "params": {}, - "type": "REST", - "userId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "version": "1" - } -] diff --git a/test/__tests__/data/braze_proxy_input.json b/test/__tests__/data/braze_proxy_input.json deleted file mode 100644 index a143ab42e8..0000000000 --- a/test/__tests__/data/braze_proxy_input.json +++ /dev/null @@ -1,219 +0,0 @@ -[ - { - "type": "REST", - "endpoint": "https://rest.iad-03.braze.com/users/identify/test1", - "method": "POST", - "userId": "gabi_userId_45", - "headers": { - "Accept": "application/json", - "Authorization": "Bearer api_key", - "Content-Type": "application/json" - }, - "body": { - "FORM": {}, - "JSON": { - "aliases_to_identify": [ - { - "external_id": "gabi_userId_45", - "user_alias": { - "alias_label": "rudder_id", - "alias_name": "gabi_anonId_45" - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "files": {}, - "params": { - "destination": "braze" - } - }, - { - "type": "REST", - "endpoint": "https://rest.iad-03.braze.com/users/identify/test2", - "method": "POST", - "userId": "gabi_userId_45", - "headers": { - "Accept": "application/json", - "Authorization": "Bearer api_key", - "Content-Type": "application/json" - }, - "body": { - "FORM": {}, - "JSON": { - "aliases_to_identify": [ - { - "external_id": "gabi_userId_45", - "user_alias": { - "alias_label": "rudder_id", - "alias_name": "gabi_anonId_45" - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "files": {}, - "params": { - "destination": "braze" - } - }, - { - "type": "REST", - "endpoint": "https://rest.iad-03.braze.com/users/identify/test3", - "method": "POST", - "userId": "gabi_userId_45", - "headers": { - "Accept": "application/json", - "Authorization": "Bearer api_key", - "Content-Type": "application/json" - }, - "body": { - "FORM": {}, - "JSON": { - "aliases_to_identify": [ - { - "external_id": "gabi_userId_45", - "user_alias": { - "alias_label": "rudder_id", - "alias_name": "gabi_anonId_45" - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "files": {}, - "params": { - "destination": "braze" - } - }, - { - "type": "REST", - "endpoint": "https://rest.iad-03.braze.com/users/identify/test4", - "method": "POST", - "userId": "gabi_userId_45", - "headers": { - "Accept": "application/json", - "Authorization": "Bearer api_key", - "Content-Type": "application/json" - }, - "body": { - "FORM": {}, - "JSON": { - "aliases_to_identify": [ - { - "external_id": "gabi_userId_45", - "user_alias": { - "alias_label": "rudder_id", - "alias_name": "gabi_anonId_45" - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "files": {}, - "params": { - "destination": "braze" - } - }, - { - "type": "REST", - "endpoint": "https://rest.iad-03.braze.com/users/identify/test5", - "method": "POST", - "userId": "gabi_userId_45", - "headers": { - "Accept": "application/json", - "Authorization": "Bearer api_key", - "Content-Type": "application/json" - }, - "body": { - "FORM": {}, - "JSON": { - "aliases_to_identify": [ - { - "external_id": "gabi_userId_45", - "user_alias": { - "alias_label": "rudder_id", - "alias_name": "gabi_anonId_45" - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "files": {}, - "params": { - "destination": "braze" - } - }, - { - "type": "REST", - "endpoint": "https://rest.iad-03.braze.com/users/identify/test6", - "method": "POST", - "userId": "gabi_userId_45", - "headers": { - "Accept": "application/json", - "Authorization": "Bearer api_key", - "Content-Type": "application/json" - }, - "body": { - "FORM": {}, - "JSON": { - "aliases_to_identify": [ - { - "external_id": "gabi_userId_45", - "user_alias": { - "alias_label": "rudder_id", - "alias_name": "gabi_anonId_45" - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "files": {}, - "params": { - "destination": "braze" - } - }, - { - "type": "REST", - "endpoint": "https://rest.iad-03.braze.com/users/identify/test7", - "method": "POST", - "userId": "gabi_userId_45", - "headers": { - "Accept": "application/json", - "Authorization": "Bearer api_key", - "Content-Type": "application/json" - }, - "body": { - "FORM": {}, - "JSON": { - "aliases_to_identify": [ - { - "external_id": "gabi_userId_45", - "user_alias": { - "alias_label": "rudder_id", - "alias_name": "gabi_anonId_45" - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "files": {}, - "params": { - "destination": "braze" - } - } -] \ No newline at end of file diff --git a/test/__tests__/data/braze_proxy_output.json b/test/__tests__/data/braze_proxy_output.json deleted file mode 100644 index cb367d451a..0000000000 --- a/test/__tests__/data/braze_proxy_output.json +++ /dev/null @@ -1,106 +0,0 @@ -[ - { - "output": { - "status": 201, - "message": "Request for braze Processed Successfully", - "destinationResponse": { - "response": { "aliases_processed": 1, "message": "success" }, - "status": 201 - } - } - }, - { - "output": { - "status": 201, - "message": "Request for braze Processed Successfully", - "destinationResponse": { - "response": { "message": "success", "errors": ["minor error message"] }, - "status": 201 - } - } - }, - { - "output": { - "status": 201, - "message": "Request failed for braze with status: 201", - "destinationResponse": { - "response": { - "message": "fatal error message", - "errors": ["minor error message"] - }, - "status": 201 - }, - "statTags": { - "destType": "BRAZE", - "errorCategory": "network", - "destinationId": "Non-determininable", - "workspaceId": "Non-determininable", - "errorType": "aborted", - "feature": "dataDelivery", - "implementation": "native", - "module": "destination" - } - } - }, - { - "output": { - "status": 201, - "message": "Request for braze Processed Successfully", - "destinationResponse": { "response": "", "status": 201 } - } - }, - { - "output": { - "status": 500, - "message": "Request failed for braze with status: 500", - "destinationResponse": { "response": "", "status": 500 }, - "statTags": { - "destType": "BRAZE", - "errorCategory": "network", - "destinationId": "Non-determininable", - "workspaceId": "Non-determininable", - "errorType": "retryable", - "feature": "dataDelivery", - "implementation": "native", - "module": "destination" - } - } - }, - { - "output": { - "status": 400, - "message": "Request failed for braze with status: 400", - "destinationResponse": { - "response": "[[ENOTFOUND] :: DNS lookup failed]", - "status": 400 - }, - "statTags": { - "destType": "BRAZE", - "errorCategory": "network", - "destinationId": "Non-determininable", - "workspaceId": "Non-determininable", - "errorType": "aborted", - "feature": "dataDelivery", - "implementation": "native", - "module": "destination" - } - } - }, - { - "output": { - "status": 500, - "message": "Request failed for braze with status: 500", - "destinationResponse": { "response": "", "status": 500 }, - "statTags": { - "destType": "BRAZE", - "errorCategory": "network", - "destinationId": "Non-determininable", - "workspaceId": "Non-determininable", - "errorType": "retryable", - "feature": "dataDelivery", - "implementation": "native", - "module": "destination" - } - } - } -] diff --git a/test/__tests__/data/braze_router.json b/test/__tests__/data/braze_router.json deleted file mode 100644 index 33c66bca6d..0000000000 --- a/test/__tests__/data/braze_router.json +++ /dev/null @@ -1,1034 +0,0 @@ -{ - "simpleRouterTestData": [ - { - "description": "simple router tests", - "input": [ - { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false, - "dataCenter": "eu-01" - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "metadata": { - "jobId": 1 - }, - "message": { - "anonymousId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.5" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.5" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" - }, - "integrations": { - "All": true - }, - "messageId": "dd266c67-9199-4a52-ba32-f46ddde67312", - "originalTimestamp": "2020-01-24T06:29:02.358Z", - "properties": { - "path": "/tests/html/index2.html", - "referrer": "", - "search": "", - "title": "", - "url": "http://localhost/tests/html/index2.html" - }, - "receivedAt": "2020-01-24T11:59:02.403+05:30", - "request_ip": "[::1]:53708", - "sentAt": "2020-01-24T06:29:02.359Z", - "timestamp": "2020-01-24T11:59:02.402+05:30", - "type": "page", - "userId": "" - } - }, - { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false, - "dataCenter": "us-01" - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "metadata": { - "jobId": 2 - }, - "message": { - "anonymousId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.5" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.5" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "city": "Disney", - "country": "USA", - "email": "mickey@disney.com", - "firstname": "Mickey" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" - }, - "integrations": { - "All": true - }, - "messageId": "2536eda4-d638-4c93-8014-8ffe3f083214", - "originalTimestamp": "2020-01-24T06:29:02.362Z", - "receivedAt": "2020-01-24T11:59:02.403+05:30", - "request_ip": "[::1]:53709", - "sentAt": "2020-01-24T06:29:02.363Z", - "timestamp": "2020-01-24T11:59:02.402+05:30", - "type": "identify", - "userId": "" - } - }, - { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false, - "dataCenter": "us-01", - "enableSubscriptionGroupInGroupCall": true - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "metadata": { - "jobId": 3 - }, - "message": { - "anonymousId": "56yrtsdfgbgxcb-22b4-401d-aae5-1b994be9a969", - "groupId": "c90f0fd2-2a02-4f2f-bf07-7e7d2c2ed2b1", - "traits": { - "phone": "5055077683", - "subscriptionState": "subscribed" - }, - "userId": "user123", - "type": "group" - } - }, - { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false, - "dataCenter": "us-01", - "enableSubscriptionGroupInGroupCall": true - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "metadata": { - "jobId": 4 - }, - "message": { - "anonymousId": "dfgdfgdfg-22b4-401d-aae5-1b994be9a969", - "groupId": "58d0a278-b55b-4f10-b7d2-98d1c5dd4c30", - "traits": { - "phone": "5055077683", - "subscriptionState": "subscribed" - }, - "userId": "user877", - "type": "group" - } - }, - { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false, - "dataCenter": "us-01", - "enableSubscriptionGroupInGroupCall": true - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "metadata": { - "jobId": 5 - }, - "message": { - "type": "alias", - "previousId": "adsfsaf", - "userId": "dsafsdf" - } - }, - { - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false, - "dataCenter": "us-01", - "enableSubscriptionGroupInGroupCall": true - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - }, - "metadata": { - "jobId": 6 - }, - "message": { - "type": "alias", - "previousId": "adsfsaf2", - "userId": "dsafsdf2" - } - } - ], - "output": [ - { - "batchedRequest": [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rest.fra-01.braze.eu/users/track", - "headers": { - "Content-Type": "application/json", - "Accept": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "partner": "RudderStack", - "events": [ - { - "name": "Page Viewed", - "time": "2020-01-24T11:59:02.402+05:30", - "properties": { - "path": "/tests/html/index2.html", - "referrer": "", - "search": "", - "title": "", - "url": "http://localhost/tests/html/index2.html" - }, - "_update_existing_only": false, - "user_alias": { - "alias_name": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "alias_label": "rudder_id" - } - } - ], - "attributes": [ - { - "email": "mickey@disney.com", - "city": "Disney", - "country": "USA", - "firstname": "Mickey", - "_update_existing_only": false, - "user_alias": { - "alias_name": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "alias_label": "rudder_id" - } - } - ] - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rest.fra-01.braze.eu/v2/subscription/status/set", - "headers": { - "Content-Type": "application/json", - "Accept": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "subscription_groups": [ - { - "external_id": ["user123"], - "phones": ["5055077683"], - "subscription_group_id": "c90f0fd2-2a02-4f2f-bf07-7e7d2c2ed2b1", - "subscription_state": "subscribed" - }, - { - "external_id": ["user877"], - "phones": ["5055077683"], - "subscription_group_id": "58d0a278-b55b-4f10-b7d2-98d1c5dd4c30", - "subscription_state": "subscribed" - } - ] - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rest.fra-01.braze.eu/users/merge", - "headers": { - "Content-Type": "application/json", - "Accept": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "merge_updates": [ - { - "identifier_to_keep": { - "external_id": "dsafsdf" - }, - "identifier_to_merge": { - "external_id": "adsfsaf" - } - }, - { - "identifier_to_keep": { - "external_id": "dsafsdf2" - }, - "identifier_to_merge": { - "external_id": "adsfsaf2" - } - } - ] - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - } - ], - "metadata": [ - { - "jobId": 1 - }, - { - "jobId": 2 - }, - { - "jobId": 3 - }, - { - "jobId": 4 - }, - { - "jobId": 5 - }, - { - "jobId": 6 - } - ], - "batched": true, - "statusCode": 200, - "destination": { - "Config": { - "restApiKey": "dummyApiKey", - "prefixProperties": true, - "useNativeSDK": false, - "dataCenter": "eu-01" - }, - "DestinationDefinition": { - "DisplayName": "Braze", - "ID": "1WhbSZ6uA3H5ChVifHpfL2H6sie", - "Name": "BRAZE" - }, - "Enabled": true, - "ID": "1WhcOCGgj9asZu850HvugU2C3Aq", - "Name": "Braze", - "Transformations": [] - } - } - ] - } - ], - "dedupEnabledRouterTestData": [ - { - "description": "dedup enabled router tests", - "input": [ - { - "destination": { - "ID": "2N9UakqKF0D35wfzSeofIxPdL8X", - "Name": "Braze-Test", - "Config": { - "appKey": "0e5440c3-226b-45d0-91b5-c64da56cde16", - "blacklistedEvents": [], - "dataCenter": "US-03", - "enableNestedArrayOperations": false, - "enableSubscriptionGroupInGroupCall": false, - "eventFilteringOption": "disable", - "oneTrustCookieCategories": [], - "restApiKey": "dummyApiKey", - "supportDedup": true, - "trackAnonymousUser": true, - "whitelistedEvents": [] - }, - "Enabled": true, - "WorkspaceID": "27O0bhB6p5ehfOWeeZlOSsSDTLg", - "Transformations": [], - "IsProcessorEnabled": true, - "RevisionID": "2N9Uaf2tWq2QRmatBWQm03Rz6qX" - }, - "metadata": { - "jobId": 1 - }, - "message": { - "type": "track", - "event": "Sign In Completed", - "sentAt": "2023-03-10T18:36:04.738Z", - "userId": "braze_test_user", - "channel": "web", - "context": { - "locale": "en-US", - "traits": { - "subscribe_once": true, - "pwa": true, - "email": "jackson24miranda@gmail.com", - "lastName": "Miranda", - "firstName": "Spencer", - "is_registered": true, - "last_identify": "GOOGLE_SIGN_IN", - "account_region": "ON", - "is_pickup_selected": "false", - "has_tradein_attempt": false, - "custom_obj_attr": { - "key1": "value1", - "key2": "value2", - "key4": "value4" - }, - "custom_arr": [1, 2, "str1"] - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "2.9.5" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36" - }, - "rudderId": "4118560d-e4fc-4fd1-a734-9c69eae2c047", - "messageId": "1a342814-a882-4b65-9cc9-347544997268", - "timestamp": "2023-03-10T18:36:05.028Z", - "properties": { - "cause": "/redirector", - "method": "GOOGLE", - "region": "ON", - "orderId": "6179367977099", - "order_id": "6179367977099", - "webhookurl": "https://my.test.com", - "countingMethod": "standard", - "is_first_time_signin": false - }, - "receivedAt": "2023-03-18T01:41:42.257+05:30", - "request_ip": "[::1]", - "anonymousId": "77e278c9-e984-4cdd-950c-cd0b61befd03", - "originalTimestamp": "2023-03-10T18:36:04.733Z" - } - }, - { - "destination": { - "ID": "2N9UakqKF0D35wfzSeofIxPdL8X", - "Name": "Braze-Test", - "Config": { - "appKey": "0e5440c3-226b-45d0-91b5-c64da56cde16", - "blacklistedEvents": [], - "dataCenter": "US-03", - "enableNestedArrayOperations": false, - "enableSubscriptionGroupInGroupCall": false, - "eventFilteringOption": "disable", - "oneTrustCookieCategories": [], - "restApiKey": "dummyApiKey", - "supportDedup": true, - "trackAnonymousUser": true, - "whitelistedEvents": [] - }, - "Enabled": true, - "WorkspaceID": "27O0bhB6p5ehfOWeeZlOSsSDTLg", - "Transformations": [], - "IsProcessorEnabled": true, - "RevisionID": "2N9Uaf2tWq2QRmatBWQm03Rz6qX" - }, - "metadata": { - "jobId": 2 - }, - "message": { - "type": "track", - "event": "Sign In Completed", - "sentAt": "2023-03-10T18:36:04.738Z", - "userId": "braze_test_user", - "channel": "web", - "context": { - "locale": "en-US", - "traits": { - "subscribe_once": true, - "pwa": true, - "email": "jackson24miranda@gmail.com", - "lastName": "Miranda 2", - "firstName": "Spencer", - "is_registered": true, - "last_identify": "GOOGLE_SIGN_IN", - "account_region": "ON", - "is_pickup_selected": "true", - "has_tradein_attempt": false, - "custom_obj_attr": { - "key1": "value1", - "key2": "value2", - "key4": "value4" - }, - "custom_arr": ["1", "2", "str1"] - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "2.9.5" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36" - }, - "rudderId": "4118560d-e4fc-4fd1-a734-9c69eae2c047", - "messageId": "1a342814-a882-4b65-9cc9-347544997268", - "timestamp": "2023-03-10T18:36:05.028Z", - "properties": { - "cause": "/redirector", - "method": "GOOGLE", - "region": "ON", - "orderId": "6179367977099", - "order_id": "6179367977099", - "webhookurl": "https://my.test.com", - "countingMethod": "standard", - "is_first_time_signin": false - }, - "receivedAt": "2023-03-18T01:41:42.257+05:30", - "request_ip": "[::1]", - "anonymousId": "77e278c9-e984-4cdd-950c-cd0b61befd03", - "originalTimestamp": "2023-03-10T18:36:04.733Z" - } - }, - { - "destination": { - "ID": "2N9UakqKF0D35wfzSeofIxPdL8X", - "Name": "Braze-Test", - "Config": { - "appKey": "0e5440c3-226b-45d0-91b5-c64da56cde16", - "blacklistedEvents": [], - "dataCenter": "US-03", - "enableNestedArrayOperations": false, - "enableSubscriptionGroupInGroupCall": false, - "eventFilteringOption": "disable", - "oneTrustCookieCategories": [], - "restApiKey": "dummyApiKey", - "supportDedup": true, - "trackAnonymousUser": true, - "whitelistedEvents": [] - }, - "Enabled": true, - "WorkspaceID": "27O0bhB6p5ehfOWeeZlOSsSDTLg", - "Transformations": [], - "IsProcessorEnabled": true, - "RevisionID": "2N9Uaf2tWq2QRmatBWQm03Rz6qX" - }, - "metadata": { - "jobId": 3 - }, - "message": { - "anonymousId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.5" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.5" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "city": "Disney", - "country": "USA", - "email": "mickey@disney.com", - "firstName": "Mickey" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" - }, - "integrations": { - "All": true - }, - "messageId": "2536eda4-d638-4c93-8014-8ffe3f083214", - "type": "identify", - "userId": "user@50" - } - }, - { - "destination": { - "ID": "2N9UakqKF0D35wfzSeofIxPdL8X", - "Name": "Braze-Test", - "Config": { - "appKey": "0e5440c3-226b-45d0-91b5-c64da56cde16", - "blacklistedEvents": [], - "dataCenter": "US-03", - "enableNestedArrayOperations": false, - "enableSubscriptionGroupInGroupCall": false, - "eventFilteringOption": "disable", - "oneTrustCookieCategories": [], - "restApiKey": "dummyApiKey", - "supportDedup": true, - "trackAnonymousUser": true, - "whitelistedEvents": [] - }, - "Enabled": true, - "WorkspaceID": "27O0bhB6p5ehfOWeeZlOSsSDTLg", - "Transformations": [], - "IsProcessorEnabled": true, - "RevisionID": "2N9Uaf2tWq2QRmatBWQm03Rz6qX" - }, - "metadata": { - "jobId": 4 - }, - "message": { - "anonymousId": "e6ab2c5e-2cda-44a9-a962-e2f67df78bca", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.5" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.5" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "city": "Disney", - "country": "USA", - "email": "mickey@disney.com", - "firstName": "Mickey" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36" - }, - "integrations": { - "All": true - }, - "messageId": "2536eda4-d638-4c93-8014-8ffe3f083214", - "type": "identify", - "userId": "user@50" - } - } - ], - "newTransformerOutput": [ - { - "batchedRequest": [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rest.iad-03.braze.com/users/track", - "headers": { - "Content-Type": "application/json", - "Accept": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "partner": "RudderStack", - "attributes": [ - { - "first_name": "Spencer", - "subscribe_once": true, - "pwa": true, - "external_id": "braze_test_user", - "custom_obj_attr": { - "key1": "value1", - "key2": "value2", - "key4": "value4" - } - }, - { - "last_name": "Miranda 2", - "is_pickup_selected": "true", - "external_id": "braze_test_user", - "custom_arr": ["1", "2", "str1"] - }, - { - "city": "Disney", - "country": "USA", - "email": "mickey@disney.com", - "external_id": "user@50", - "first_name": "Mickey" - } - ], - "events": [ - { - "name": "Sign In Completed", - "time": "2023-03-10T18:36:05.028Z", - "properties": { - "cause": "/redirector", - "method": "GOOGLE", - "region": "ON", - "orderId": "6179367977099", - "order_id": "6179367977099", - "webhookurl": "https://my.test.com", - "countingMethod": "standard", - "is_first_time_signin": false - }, - "external_id": "braze_test_user" - }, - { - "name": "Sign In Completed", - "time": "2023-03-10T18:36:05.028Z", - "properties": { - "cause": "/redirector", - "method": "GOOGLE", - "region": "ON", - "orderId": "6179367977099", - "order_id": "6179367977099", - "webhookurl": "https://my.test.com", - "countingMethod": "standard", - "is_first_time_signin": false - }, - "external_id": "braze_test_user" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ], - "metadata": [ - { - "jobId": 1 - }, - { - "jobId": 2 - }, - { - "jobId": 3 - } - ], - "batched": true, - "statusCode": 200, - "destination": { - "ID": "2N9UakqKF0D35wfzSeofIxPdL8X", - "Name": "Braze-Test", - "Config": { - "appKey": "0e5440c3-226b-45d0-91b5-c64da56cde16", - "blacklistedEvents": [], - "dataCenter": "US-03", - "enableNestedArrayOperations": false, - "enableSubscriptionGroupInGroupCall": false, - "eventFilteringOption": "disable", - "oneTrustCookieCategories": [], - "restApiKey": "dummyApiKey", - "supportDedup": true, - "trackAnonymousUser": true, - "whitelistedEvents": [] - }, - "Enabled": true, - "WorkspaceID": "27O0bhB6p5ehfOWeeZlOSsSDTLg", - "Transformations": [], - "IsProcessorEnabled": true, - "RevisionID": "2N9Uaf2tWq2QRmatBWQm03Rz6qX" - } - }, - { - "error": "[Braze Deduplication]: Duplicate user detected, the user is dropped", - "statTags": {}, - "statusCode": 298, - "batched": false, - "metadata": [ - { - "jobId": 4 - } - ], - "destination": { - "ID": "2N9UakqKF0D35wfzSeofIxPdL8X", - "Name": "Braze-Test", - "Config": { - "appKey": "0e5440c3-226b-45d0-91b5-c64da56cde16", - "blacklistedEvents": [], - "dataCenter": "US-03", - "enableNestedArrayOperations": false, - "enableSubscriptionGroupInGroupCall": false, - "eventFilteringOption": "disable", - "oneTrustCookieCategories": [], - "restApiKey": "dummyApiKey", - "supportDedup": true, - "trackAnonymousUser": true, - "whitelistedEvents": [] - }, - "Enabled": true, - "WorkspaceID": "27O0bhB6p5ehfOWeeZlOSsSDTLg", - "Transformations": [], - "IsProcessorEnabled": true, - "RevisionID": "2N9Uaf2tWq2QRmatBWQm03Rz6qX" - } - } - ], - "oldTransformerOutput": [ - { - "batchedRequest": [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rest.iad-03.braze.com/users/track", - "headers": { - "Content-Type": "application/json", - "Accept": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "partner": "RudderStack", - "attributes": [ - { - "first_name": "Spencer", - "subscribe_once": true, - "pwa": true, - "external_id": "braze_test_user", - "custom_obj_attr": { - "key1": "value1", - "key2": "value2", - "key4": "value4" - } - }, - { - "last_name": "Miranda 2", - "is_pickup_selected": "true", - "external_id": "braze_test_user", - "custom_arr": ["1", "2", "str1"] - }, - { - "city": "Disney", - "country": "USA", - "email": "mickey@disney.com", - "external_id": "user@50", - "first_name": "Mickey" - } - ], - "events": [ - { - "name": "Sign In Completed", - "time": "2023-03-10T18:36:05.028Z", - "properties": { - "cause": "/redirector", - "method": "GOOGLE", - "region": "ON", - "orderId": "6179367977099", - "order_id": "6179367977099", - "webhookurl": "https://my.test.com", - "countingMethod": "standard", - "is_first_time_signin": false - }, - "external_id": "braze_test_user" - }, - { - "name": "Sign In Completed", - "time": "2023-03-10T18:36:05.028Z", - "properties": { - "cause": "/redirector", - "method": "GOOGLE", - "region": "ON", - "orderId": "6179367977099", - "order_id": "6179367977099", - "webhookurl": "https://my.test.com", - "countingMethod": "standard", - "is_first_time_signin": false - }, - "external_id": "braze_test_user" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ], - "metadata": [ - { - "jobId": 1 - }, - { - "jobId": 2 - }, - { - "jobId": 3 - } - ], - "batched": true, - "statusCode": 200, - "destination": { - "ID": "2N9UakqKF0D35wfzSeofIxPdL8X", - "Name": "Braze-Test", - "Config": { - "appKey": "0e5440c3-226b-45d0-91b5-c64da56cde16", - "blacklistedEvents": [], - "dataCenter": "US-03", - "enableNestedArrayOperations": false, - "enableSubscriptionGroupInGroupCall": false, - "eventFilteringOption": "disable", - "oneTrustCookieCategories": [], - "restApiKey": "dummyApiKey", - "supportDedup": true, - "trackAnonymousUser": true, - "whitelistedEvents": [] - }, - "Enabled": true, - "WorkspaceID": "27O0bhB6p5ehfOWeeZlOSsSDTLg", - "Transformations": [], - "IsProcessorEnabled": true, - "RevisionID": "2N9Uaf2tWq2QRmatBWQm03Rz6qX" - } - }, - { - "error": "[Braze Deduplication]: Duplicate user detected, the user is dropped", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation" - }, - "statusCode": 400, - "batched": false, - "metadata": [ - { - "jobId": 4 - } - ], - "destination": { - "ID": "2N9UakqKF0D35wfzSeofIxPdL8X", - "Name": "Braze-Test", - "Config": { - "appKey": "0e5440c3-226b-45d0-91b5-c64da56cde16", - "blacklistedEvents": [], - "dataCenter": "US-03", - "enableNestedArrayOperations": false, - "enableSubscriptionGroupInGroupCall": false, - "eventFilteringOption": "disable", - "oneTrustCookieCategories": [], - "restApiKey": "dummyApiKey", - "supportDedup": true, - "trackAnonymousUser": true, - "whitelistedEvents": [] - }, - "Enabled": true, - "WorkspaceID": "27O0bhB6p5ehfOWeeZlOSsSDTLg", - "Transformations": [], - "IsProcessorEnabled": true, - "RevisionID": "2N9Uaf2tWq2QRmatBWQm03Rz6qX" - } - } - ] - } - ] -} diff --git a/test/__tests__/data/clevertap_input.json b/test/__tests__/data/clevertap_input.json deleted file mode 100644 index e0bb1241e2..0000000000 --- a/test/__tests__/data/clevertap_input.json +++ /dev/null @@ -1,1084 +0,0 @@ -[ - { - "destination": { - "Config": { - "passcode": "sample_passcode", - "accountId": "476550467", - "trackAnonymous": true, - "enableObjectIdMapping": false - } - }, - "message": { - "channel": "web", - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "anon_id", - "type": "identify", - "traits": { - "anonymousId": "anon_id", - "email": "jamesDoe@gmail.com", - "name": "James Doe", - "phone": "92374162212", - "gender": "M", - "employed": true, - "birthday": "1614775793", - "education": "Science", - "graduate": true, - "married": true, - "customerType": "Prime", - "msg_push": true, - "msgSms": true, - "msgemail": true, - "msgwhatsapp": false, - "custom_tags": ["Test_User", "Interested_User", "DIY_Hobby"], - "custom_mappings": { - "Office": "Trastkiv", - "Country": "Russia" - }, - "address": { - "city": "kolkata", - "country": "India", - "postalCode": 789223, - "state": "WB", - "street": "" - } - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "passcode": "sample_passcode", - "accountId": "476550467", - "trackAnonymous": true, - "enableObjectIdMapping": false - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "anon_id", - "type": "identify", - "traits": { - "anonymousId": "anon_id", - "email": "jamesDoe@gmail.com", - "name": "James Doe", - "phone": "92374162212", - "gender": "M", - "employed": true, - "birthday": "1614775793", - "education": "Science", - "graduate": true, - "married": true, - "customerType": "Prime", - "msg_push": true, - "msgSms": true, - "msgemail": true, - "msgwhatsapp": false, - "custom_tags": ["Test_User", "Interested_User", "DIY_Hobby"], - "custom_mappings": { - "Office": "Trastkiv", - "Country": "Russia" - }, - "address": { - "city": "kolkata", - "country": "India", - "postalCode": 789223, - "state": "WB", - "street": "" - } - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "passcode": "sample_passcode", - "accountId": "476550467", - "trackAnonymous": true, - "enableObjectIdMapping": false - } - }, - "message": { - "type": "page", - "anonymousId": "anon-id-new", - "name": "Rudder", - "properties": { - "title": "Home", - "path": "/" - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - }, - { - "destination": { - "Config": { - "passcode": "sample_passcode", - "accountId": "476550467", - "trackAnonymous": true, - "enableObjectIdMapping": false - } - }, - "message": { - "type": "screen", - "userId": "identified_user_id", - "name": "Rudder-Screen", - "properties": { - "prop1": "5" - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - }, - { - "destination": { - "Config": { - "passcode": "sample_passcode", - "accountId": "476550467", - "trackAnonymous": true, - "enableObjectIdMapping": false - } - }, - "message": { - "type": "track", - "userId": "user123", - "event": "Product Purchased", - "properties": { - "name": "Rubik's Cube", - "revenue": 4.99 - }, - "context": { - "ip": "14.5.67.21" - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - }, - { - "destination": { - "Config": { - "passcode": "sample_passcode", - "accountId": "476550467", - "trackAnonymous": true, - "enableObjectIdMapping": false - } - }, - "message": { - "userId": "user1234", - "event": "FailTest", - "properties": { - "name": "Random", - "revenue": 4.99 - }, - "context": { - "ip": "14.5.67.21" - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - }, - { - "destination": { - "Config": { - "passcode": "sample_passcode", - "accountId": "476550467", - "trackAnonymous": true, - "enableObjectIdMapping": false - } - }, - "message": { - "type": "Rndm", - "userId": "user1234", - "event": "FailTest", - "properties": { - "name": "Random2", - "revenue": 4.99 - }, - "context": { - "ip": "14.5.67.21" - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - }, - { - "destination": { - "Config": { - "passcode": "sample_passcode", - "accountId": "476550467", - "trackAnonymous": true, - "enableObjectIdMapping": false - } - }, - "message": { - "type": "track", - "event": "Order Completed", - "sentAt": "2021-03-10T11:59:57.815Z", - "userId": "riverjohn", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.13", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:5500/test.html", - "path": "/test.html", - "title": "sample source", - "search": "", - "referrer": "http://127.0.0.1:5500/", - "referring_domain": "127.0.0.1:5500" - }, - "locale": "en-US", - "screen": { - "density": 2 - }, - "traits": { - "email": "riverjohn@gmail.com", - "phone": "+12345678900", - "avatar": "https://homepages.cae.wisc.edu/~ece533/images/airplane.png", - "testIng": true, - "lastName": "John", - "firstname": "River" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.13" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:86.0) Gecko/20100101 Firefox/86.0" - }, - "rudderId": "fd5d3d37-3ce6-471d-b416-2f351212a44f", - "messageId": "8ff6fd1b-b381-43fc-883c-92bf8eb0e725", - "properties": { - "tax": 1, - "total": 20, - "coupon": "ImagePro", - "revenue": 15, - "currency": "USD", - "discount": 1.5, - "order_id": "1234", - "ts": "2021-03-10T11:59:22.080Z", - "products": [ - { - "sku": "G-32", - "url": "https://www.website.com/product/path", - "name": "Monopoly", - "price": 14, - "category": "Games", - "quantity": 1, - "image_url": "https://www.website.com/product/path.jpg", - "product_id": "123" - }, - { - "sku": "F-32", - "name": "UNO", - "price": 3.45, - "category": "Games", - "quantity": 2, - "product_id": "345" - } - ], - "shipping": 22, - "affiliation": "Apple Store", - "checkout_id": "12345" - }, - "anonymousId": "b2e06708-dd2a-4aee-bb32-41855d2fbdab", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-03-10T11:59:22.080Z" - } - }, - { - "destination": { - "Config": { - "passcode": "sample_passcode", - "accountId": "476550467", - "trackAnonymous": false, - "enableObjectIdMapping": false - } - }, - "message": { - "type": "track", - "anonymousId": "random_anon_id", - "event": "FailTest_with_anon", - "properties": { - "name": "Random2", - "revenue": 4.99 - }, - "context": { - "ip": "14.5.67.21" - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - }, - { - "destination": { - "Config": { - "passcode": "sample_passcode", - "accountId": "476550467", - "trackAnonymous": true, - "enableObjectIdMapping": false - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "anon_id", - "type": "identify", - "traits": { - "anonymousId": "anon_id", - "email": "jamesDoe@gmail.com", - "name": "James Doe", - "phone": "92374162212", - "gender": "female", - "employed": true, - "birthday": "1614775793", - "education": "Science", - "graduate": true, - "married": true, - "customerType": "Prime", - "msg_push": true, - "msgSms": true, - "msgemail": true, - "msgwhatsapp": false, - "custom_tags": ["Test_User", "Interested_User", "DIY_Hobby"], - "custom_mappings": { - "Office": "Trastkiv", - "Country": "Russia" - }, - "address": { - "city": "kolkata", - "country": "India", - "postalCode": 789223, - "state": "WB", - "street": "" - } - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "passcode": "sample_passcode", - "accountId": "476550467", - "trackAnonymous": true, - "enableObjectIdMapping": false - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "anon_id", - "type": "identify", - "traits": { - "anonymousId": "anon_id", - "email": "jamesDoe@gmail.com", - "name": "James Doe", - "phone": "92374162212", - "gender": "other", - "employed": true, - "birthday": "1614775793", - "education": "Science", - "graduate": true, - "married": true, - "customerType": "Prime", - "msg_push": true, - "msgSms": true, - "msgemail": true, - "msgwhatsapp": false, - "custom_tags": ["Test_User", "Interested_User", "DIY_Hobby"], - "custom_mappings": { - "Office": "Trastkiv", - "Country": "Russia" - }, - "address": { - "city": "kolkata", - "country": "India", - "postalCode": 789223, - "state": "WB", - "street": "" - } - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "passcode": "sample_passcode", - "accountId": "476550467", - "trackAnonymous": true, - "enableObjectIdMapping": true - } - }, - "message": { - "type": "identify", - "event": "identify", - "sentAt": "2021-05-24T08:53:38.762Z", - "userId": "useran4", - "channel": "mobile", - "context": { - "os": { - "name": "Android", - "version": "10" - }, - "app": { - "name": "myfirstapp", - "build": "1", - "version": "1.0", - "namespace": "com.example.myfirstapp" - }, - "device": { - "id": "f54bb572361c4fd1", - "name": "whyred", - "type": "Android", - "model": "Redmi Note 5 Pro", - "manufacturer": "Xiaomi", - "token": "frfsgvrwe:APfdsafsgdfsgghfgfgjkhfsfgdhjhbvcvnetry767456fxsasdf" - }, - "locale": "en-IN", - "screen": { - "width": 1080, - "height": 2118, - "density": 420 - }, - "traits": { - "id": "useran4", - "email": "tony4an@testmail.com", - "phone": "4444457700", - "userId": "useran4", - "lastname": "Stark", - "firstname": "Tony4AN", - "anonymousId": "f54bb572361c4fd1" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.12" - }, - "network": { - "wifi": true, - "carrier": "airtel", - "cellular": true, - "bluetooth": false - }, - "timezone": "Asia/Kolkata", - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 10; Redmi Note 5 Pro Build/QQ3A.200805.001)" - }, - "rudderId": "d8dd4917-bdb2-4c17-8f62-24c79d87a937", - "messageId": "1621846417928-7fbb739f-5f96-48ca-9ebb-5bfc4076a687", - "anonymousId": "f54bb572361c4fd1", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-05-24T08:53:37.929Z" - } - }, - { - "destination": { - "Config": { - "passcode": "sample_passcode", - "accountId": "476550467", - "trackAnonymous": true, - "enableObjectIdMapping": true - } - }, - "message": { - "type": "identify", - "event": "identify", - "sentAt": "2021-04-21T12:05:42.383Z", - "userId": "ankur4", - "channel": "mobile", - "context": { - "os": { - "name": "iOS", - "version": "13.0" - }, - "app": { - "name": "Rudder-CleverTap_Example", - "build": "1.0", - "version": "1.0", - "namespace": "org.cocoapods.demo.Rudder-CleverTap-Example" - }, - "device": { - "id": "cd3a4439-7df0-4475-acb9-6659c7c4dfe3", - "name": "iPhone 11 Pro Max", - "type": "iOS", - "model": "iPhone", - "manufacturer": "Apple", - "token": "frfsgvrwe:APfdsafsgdfsgghfgfgjkhfsfgdhjhbvcvnetry767456fxsasdf" - }, - "locale": "en-US", - "screen": { - "width": 896, - "height": 414, - "density": 3 - }, - "traits": { - "name": "Ankur4 Mittal", - "email": "ankur4gmail", - "phone": "8260294239", - "userId": "ankur4" - }, - "library": { - "name": "rudder-ios-library", - "version": "1.0.11" - }, - "network": { - "wifi": true, - "carrier": "unavailable", - "cellular": false, - "bluetooth": false - }, - "timezone": "Asia/Kolkata", - "userAgent": "unknown" - }, - "rudderId": "f5bb9c22-4987-4ef2-9b58-52788035ffb7", - "messageId": "1619006730-60fa60c0-3c77-4de7-95d4-e7dc58214947", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-04-21T12:05:30.330Z" - } - }, - { - "destination": { - "Config": { - "passcode": "sample_passcode", - "accountId": "476550467", - "trackAnonymous": true, - "enableObjectIdMapping": true - } - }, - "message": { - "event": "Random", - "properties": { - "country_region": "India", - "test": "abc" - }, - "receivedAt": "2021-08-20T12:49:07.691Z", - "rudderId": "138c4214-b537-4f77-9dea-9abde70b5147", - "type": "track", - "anonymousId": "cd3a4439-7df0-4475-acb9-6659c7c4dfe3" - } - }, - { - "destination": { - "Config": { - "passcode": "sample_passcode", - "accountId": "476550467", - "trackAnonymous": true, - "enableObjectIdMapping": true - } - }, - "message": { - "event": "Random 2", - "properties": { - "country_region": "India", - "test": "abc" - }, - "receivedAt": "2021-08-20T12:49:07.691Z", - "rudderId": "138c4214-b537-4f77-9dea-9abde70b5147", - "type": "track", - "userId": "ankur4" - } - }, - { - "destination": { - "Config": { - "passcode": "sample_passcode", - "accountId": "476550467", - "trackAnonymous": true, - "enableObjectIdMapping": false - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "anon_id", - "type": "identify", - "traits": { - "anonymousId": "anon_id", - "email": "jamesDoe@gmail.com", - "name": "James Doe", - "phone": "92374162212", - "gender": "M", - "employed": true, - "birthday": "1614775793", - "education": "Science", - "graduate": true, - "married": true, - "customerType": "Prime", - "ts": "2021-03-10T11:59:22.080Z", - "msg_push": true, - "msgSms": true, - "msgemail": true, - "msgwhatsapp": false, - "custom_tags": ["Test_User", "Interested_User", "DIY_Hobby"], - "custom_mappings": { - "Office": "Trastkiv", - "Country": "Russia" - }, - "address": { - "city": "kolkata", - "country": "India", - "postalCode": 789223, - "state": "WB", - "street": "" - } - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "passcode": "sample_passcode", - "accountId": "476550467", - "trackAnonymous": true, - "enableObjectIdMapping": true - } - }, - "message": { - "type": "identify", - "event": "identify", - "sentAt": "2021-05-24T08:53:38.762Z", - "userId": "useran4", - "channel": "mobile", - "context": { - "os": { - "name": "watchos" - }, - "app": { - "name": "myfirstapp", - "build": "1", - "version": "1.0", - "namespace": "com.example.myfirstapp" - }, - "device": { - "id": "cd3a4439-7df0-4475-acb9-6659c7c4dfe3", - "type": "watchos", - "manufacturer": "Apple", - "token": "frfsgvrwe:APfdsafsgdfsgghfgfgjkhfsfgdhjhbvcvnetry767456fxsasdf" - }, - "locale": "en-IN", - "screen": { - "width": 1080, - "height": 2118, - "density": 420 - }, - "traits": { - "id": "useran4", - "email": "tony4an@testmail.com", - "phone": "4444457700", - "userId": "useran4", - "lastname": "Stark", - "firstname": "Tony4AN", - "anonymousId": "f54bb572361c4fd1" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.12" - }, - "network": { - "wifi": true, - "carrier": "airtel", - "cellular": true, - "bluetooth": false - }, - "timezone": "Asia/Kolkata", - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 10; Redmi Note 5 Pro Build/QQ3A.200805.001)" - }, - "rudderId": "d8dd4917-bdb2-4c17-8f62-24c79d87a937", - "messageId": "1621846417928-7fbb739f-5f96-48ca-9ebb-5bfc4076a687", - "anonymousId": "f54bb572361c4fd1", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-05-24T08:53:37.929Z" - } - }, - { - "destination": { - "Config": { - "passcode": "sample_passcode", - "accountId": "476550467", - "trackAnonymous": true, - "enableObjectIdMapping": true - } - }, - "message": { - "type": "alias", - "userId": "newaddedid001", - "context": { - "traits": { - "ts": 1468308340 - } - }, - "rudderId": "a8556b1b-9d11-478d-9242-be124d1f0c93", - "messageId": "46c1a69c-cc24-4a49-8079-3fcbabf15eb8", - "previousId": "1122121" - } - }, - { - "destination": { - "Config": { - "passcode": "sample_passcode", - "accountId": "476550467", - "trackAnonymous": true, - "enableObjectIdMapping": false - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "anon_id", - "type": "identify", - "traits": { - "anonymousId": "anon_id", - "email": "johnDoe@gmail.com", - "first_name": "John", - "last_name": "Doe", - "phone": "92374162212", - "gender": "M", - "employed": true, - "birthday": "1614775793", - "education": "Science", - "graduate": true, - "married": true, - "customerType": "Prime", - "msg_push": true, - "msgSms": true, - "msgemail": true, - "msgwhatsapp": false, - "custom_tags": ["Test_User", "Interested_User", "DIY_Hobby"], - "custom_mappings": { - "Office": "Trastkiv", - "Country": "Russia" - }, - "address": { - "city": "kolkata", - "country": "India", - "postalCode": 789223, - "state": "WB", - "street": "" - }, - "overrideFields": { - "first_name": "John", - "last_name": "Doe" - } - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "passcode": "sample_passcode", - "accountId": "476550467", - "trackAnonymous": true, - "enableObjectIdMapping": false - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "overrideFields": { - "first_name": "John", - "last_name": "Doe" - } - } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "anon_id", - "type": "identify", - "traits": { - "anonymousId": "anon_id", - "email": "johnDoe@gmail.com", - "first_name": "John", - "last_name": "Doe", - "phone": "92374162212", - "gender": "M", - "employed": true, - "birthday": "1614775793", - "education": "Science", - "graduate": true, - "married": true, - "customerType": "Prime", - "msg_push": true, - "msgSms": true, - "msgemail": true, - "msgwhatsapp": false, - "custom_tags": ["Test_User", "Interested_User", "DIY_Hobby"], - "custom_mappings": { - "Office": "Trastkiv", - "Country": "Russia" - }, - "address": { - "city": "kolkata", - "country": "India", - "postalCode": 789223, - "state": "WB", - "street": "" - } - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "passcode": "sample_passcode", - "accountId": "476550467", - "trackAnonymous": true, - "enableObjectIdMapping": false - } - }, - "message": { - "type": "track", - "event": "Order Completed", - "sentAt": "2021-03-10T11:59:57.815Z", - "userId": "riverjohn", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.13", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:5500/test.html", - "path": "/test.html", - "title": "sample source", - "search": "", - "referrer": "http://127.0.0.1:5500/", - "referring_domain": "127.0.0.1:5500" - }, - "locale": "en-US", - "screen": { - "density": 2 - }, - "traits": { - "email": "riverjohn@gmail.com", - "phone": "+12345678900", - "avatar": "https://homepages.cae.wisc.edu/~ece533/images/airplane.png", - "testIng": true, - "lastName": "John", - "firstname": "River" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.13" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:86.0) Gecko/20100101 Firefox/86.0" - }, - "rudderId": "fd5d3d37-3ce6-471d-b416-2f351212a44f", - "messageId": "8ff6fd1b-b381-43fc-883c-92bf8eb0e725", - "properties": { - "tax": 1, - "total": 20, - "coupon": "ImagePro", - "revenue": 15, - "currency": "USD", - "discount": 1.5, - "order_id": "1234", - "ts": "2021-03-10T11:59:22.080Z", - "products": { - "sku": "G-32", - "url": "https://www.website.com/product/path", - "name": "Monopoly", - "price": 14, - "category": "Games", - "quantity": 1, - "image_url": "https://www.website.com/product/path.jpg", - "product_id": "123" - }, - "shipping": 22, - "affiliation": "Apple Store", - "checkout_id": "12345" - }, - "anonymousId": "b2e06708-dd2a-4aee-bb32-41855d2fbdab", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-03-10T11:59:22.080Z" - } - }, - { - "destination": { - "Config": { - "passcode": "sample_passcode", - "accountId": "476550467", - "trackAnonymous": true, - "enableObjectIdMapping": true - } - }, - "message": { - "event": "Random", - "properties": { - "country_region": "India", - "test": "abc" - }, - "receivedAt": "2021-08-20T12:49:07.691Z", - "rudderId": "138c4214-b537-4f77-9dea-9abde70b5147", - "type": "track" - } - } -] diff --git a/test/__tests__/data/clevertap_output.json b/test/__tests__/data/clevertap_output.json deleted file mode 100644 index 947cc2da21..0000000000 --- a/test/__tests__/data/clevertap_output.json +++ /dev/null @@ -1,739 +0,0 @@ -[ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.clevertap.com/1/upload", - "headers": { - "X-CleverTap-Account-Id": "476550467", - "X-CleverTap-Passcode": "sample_passcode", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "d": [ - { - "type": "profile", - "profileData": { - "Email": "jamesDoe@gmail.com", - "Name": "James Doe", - "Phone": "92374162212", - "Gender": "M", - "Employed": true, - "DOB": "1614775793", - "Education": "Science", - "Married": true, - "Customer Type": "Prime", - "graduate": true, - "msg_push": true, - "msgSms": true, - "msgemail": true, - "msgwhatsapp": false, - "custom_tags": "[\"Test_User\",\"Interested_User\",\"DIY_Hobby\"]", - "custom_mappings": "{\"Office\":\"Trastkiv\",\"Country\":\"Russia\"}", - "address": "{\"city\":\"kolkata\",\"country\":\"India\",\"postalCode\":789223,\"state\":\"WB\",\"street\":\"\"}" - }, - "identity": "anon_id" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.clevertap.com/1/upload", - "headers": { - "X-CleverTap-Account-Id": "476550467", - "X-CleverTap-Passcode": "sample_passcode", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "d": [ - { - "type": "profile", - "profileData": { - "Email": "jamesDoe@gmail.com", - "Name": "James Doe", - "Phone": "92374162212", - "Gender": "M", - "Employed": true, - "DOB": "1614775793", - "Education": "Science", - "Married": true, - "Customer Type": "Prime", - "graduate": true, - "msg_push": true, - "msgSms": true, - "msgemail": true, - "msgwhatsapp": false, - "custom_tags": "[\"Test_User\",\"Interested_User\",\"DIY_Hobby\"]", - "custom_mappings": "{\"Office\":\"Trastkiv\",\"Country\":\"Russia\"}", - "address": "{\"city\":\"kolkata\",\"country\":\"India\",\"postalCode\":789223,\"state\":\"WB\",\"street\":\"\"}" - }, - "identity": "anon_id" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "d": [ - { - "identity": "anon-id-new", - "type": "event", - "evtName": "Web Page Viewed: Rudder", - "evtData": { - "title": "Home", - "path": "/" - } - } - ] - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "X-CleverTap-Account-Id": "476550467", - "X-CleverTap-Passcode": "sample_passcode", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api.clevertap.com/1/upload" - }, - { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "d": [ - { - "identity": "identified_user_id", - "type": "event", - "evtName": "Screen Viewed: Rudder-Screen", - "evtData": { - "prop1": "5" - } - } - ] - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "X-CleverTap-Account-Id": "476550467", - "X-CleverTap-Passcode": "sample_passcode", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api.clevertap.com/1/upload" - }, - { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "d": [ - { - "identity": "user123", - "type": "event", - "evtName": "Product Purchased", - "evtData": { - "name": "Rubik's Cube", - "revenue": 4.99 - } - } - ] - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "X-CleverTap-Account-Id": "476550467", - "X-CleverTap-Passcode": "sample_passcode", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api.clevertap.com/1/upload" - }, - { - "error": "Message Type is not present. Aborting message." - }, - { - "error": "Message type not supported" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.clevertap.com/1/upload", - "headers": { - "X-CleverTap-Account-Id": "476550467", - "X-CleverTap-Passcode": "sample_passcode", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "d": [ - { - "evtName": "Charged", - "evtData": { - "Charged ID": "12345", - "Amount": 15, - "Items": [ - { - "sku": "G-32", - "url": "https://www.website.com/product/path", - "name": "Monopoly", - "price": 14, - "category": "Games", - "quantity": 1, - "image_url": "https://www.website.com/product/path.jpg", - "product_id": "123" - }, - { - "sku": "F-32", - "name": "UNO", - "price": 3.45, - "category": "Games", - "quantity": 2, - "product_id": "345" - } - ], - "tax": 1, - "total": 20, - "coupon": "ImagePro", - "currency": "USD", - "discount": 1.5, - "order_id": "1234", - "shipping": 22, - "affiliation": "Apple Store" - }, - "ts": 1615377562, - "type": "event", - "identity": "riverjohn" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - { - "error": "userId, not present cannot track anonymous user" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.clevertap.com/1/upload", - "headers": { - "X-CleverTap-Account-Id": "476550467", - "X-CleverTap-Passcode": "sample_passcode", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "d": [ - { - "type": "profile", - "profileData": { - "Email": "jamesDoe@gmail.com", - "Name": "James Doe", - "Phone": "92374162212", - "Gender": "F", - "Employed": true, - "DOB": "1614775793", - "Education": "Science", - "Married": true, - "Customer Type": "Prime", - "graduate": true, - "msg_push": true, - "msgSms": true, - "msgemail": true, - "msgwhatsapp": false, - "custom_tags": "[\"Test_User\",\"Interested_User\",\"DIY_Hobby\"]", - "custom_mappings": "{\"Office\":\"Trastkiv\",\"Country\":\"Russia\"}", - "address": "{\"city\":\"kolkata\",\"country\":\"India\",\"postalCode\":789223,\"state\":\"WB\",\"street\":\"\"}" - }, - "identity": "anon_id" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.clevertap.com/1/upload", - "headers": { - "X-CleverTap-Account-Id": "476550467", - "X-CleverTap-Passcode": "sample_passcode", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "d": [ - { - "type": "profile", - "profileData": { - "Email": "jamesDoe@gmail.com", - "Name": "James Doe", - "Phone": "92374162212", - "Employed": true, - "DOB": "1614775793", - "Education": "Science", - "Married": true, - "Customer Type": "Prime", - "graduate": true, - "msg_push": true, - "msgSms": true, - "msgemail": true, - "msgwhatsapp": false, - "custom_tags": "[\"Test_User\",\"Interested_User\",\"DIY_Hobby\"]", - "custom_mappings": "{\"Office\":\"Trastkiv\",\"Country\":\"Russia\"}", - "address": "{\"city\":\"kolkata\",\"country\":\"India\",\"postalCode\":789223,\"state\":\"WB\",\"street\":\"\"}" - }, - "identity": "anon_id" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.clevertap.com/1/upload", - "headers": { - "X-CleverTap-Account-Id": "476550467", - "X-CleverTap-Passcode": "sample_passcode", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "d": [ - { - "objectId": "f54bb572361c4fd1", - "type": "profile", - "profileData": { - "Email": "tony4an@testmail.com", - "Phone": "4444457700", - "Name": "Tony4AN Stark", - "identity": "useran4" - } - } - ] - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.clevertap.com/1/upload", - "headers": { - "X-CleverTap-Account-Id": "476550467", - "X-CleverTap-Passcode": "sample_passcode", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "d": [ - { - "type": "token", - "tokenData": { - "id": "frfsgvrwe:APfdsafsgdfsgghfgfgjkhfsfgdhjhbvcvnetry767456fxsasdf", - "type": "fcm" - }, - "objectId": "f54bb572361c4fd1" - } - ] - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - } - ], - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.clevertap.com/1/upload", - "headers": { - "X-CleverTap-Account-Id": "476550467", - "X-CleverTap-Passcode": "sample_passcode", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "d": [ - { - "identity": "ankur4", - "type": "profile", - "profileData": { - "Email": "ankur4gmail", - "Name": "Ankur4 Mittal", - "Phone": "8260294239" - } - } - ] - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "d": [ - { - "type": "event", - "evtData": { - "country_region": "India", - "test": "abc" - }, - "evtName": "Random", - "objectId": "cd3a4439-7df0-4475-acb9-6659c7c4dfe3" - } - ] - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Content-Type": "application/json", - "X-CleverTap-Passcode": "sample_passcode", - "X-CleverTap-Account-Id": "476550467" - }, - "version": "1", - "endpoint": "https://api.clevertap.com/1/upload" - }, - { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "d": [ - { - "type": "event", - "evtData": { - "country_region": "India", - "test": "abc" - }, - "evtName": "Random 2", - "identity": "ankur4" - } - ] - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Content-Type": "application/json", - "X-CleverTap-Passcode": "sample_passcode", - "X-CleverTap-Account-Id": "476550467" - }, - "version": "1", - "endpoint": "https://api.clevertap.com/1/upload" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.clevertap.com/1/upload", - "headers": { - "X-CleverTap-Account-Id": "476550467", - "X-CleverTap-Passcode": "sample_passcode", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "d": [ - { - "type": "profile", - "profileData": { - "Email": "jamesDoe@gmail.com", - "Name": "James Doe", - "Phone": "92374162212", - "Gender": "M", - "Employed": true, - "DOB": "1614775793", - "Education": "Science", - "Married": true, - "Customer Type": "Prime", - "graduate": true, - "msg_push": true, - "msgSms": true, - "msgemail": true, - "msgwhatsapp": false, - "custom_tags": "[\"Test_User\",\"Interested_User\",\"DIY_Hobby\"]", - "custom_mappings": "{\"Office\":\"Trastkiv\",\"Country\":\"Russia\"}", - "address": "{\"city\":\"kolkata\",\"country\":\"India\",\"postalCode\":789223,\"state\":\"WB\",\"street\":\"\"}" - }, - "ts": 1615377562, - "identity": "anon_id" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.clevertap.com/1/upload", - "headers": { - "X-CleverTap-Account-Id": "476550467", - "X-CleverTap-Passcode": "sample_passcode", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "d": [ - { - "type": "profile", - "profileData": { - "Email": "tony4an@testmail.com", - "Phone": "4444457700", - "Name": "Tony4AN Stark", - "identity": "useran4" - }, - "objectId": "f54bb572361c4fd1" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.clevertap.com/1/upload", - "headers": { - "X-CleverTap-Account-Id": "476550467", - "X-CleverTap-Passcode": "sample_passcode", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "d": [ - { - "type": "token", - "tokenData": { - "id": "frfsgvrwe:APfdsafsgdfsgghfgfgjkhfsfgdhjhbvcvnetry767456fxsasdf", - "type": "apns" - }, - "objectId": "f54bb572361c4fd1" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ], - { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "d": [ - { - "ts": 1468308340, - "type": "profile", - "identity": "1122121", - "profileData": { - "identity": "newaddedid001" - } - } - ] - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Content-Type": "application/json", - "X-CleverTap-Passcode": "sample_passcode", - "X-CleverTap-Account-Id": "476550467" - }, - "version": "1", - "endpoint": "https://api.clevertap.com/1/upload" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.clevertap.com/1/upload", - "headers": { - "X-CleverTap-Account-Id": "476550467", - "X-CleverTap-Passcode": "sample_passcode", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "d": [ - { - "type": "profile", - "profileData": { - "Email": "johnDoe@gmail.com", - "Phone": "92374162212", - "Gender": "M", - "Employed": true, - "DOB": "1614775793", - "Education": "Science", - "Married": true, - "Customer Type": "Prime", - "Name": "John Doe", - "graduate": true, - "msg_push": true, - "msgSms": true, - "msgemail": true, - "msgwhatsapp": false, - "custom_tags": "[\"Test_User\",\"Interested_User\",\"DIY_Hobby\"]", - "custom_mappings": "{\"Office\":\"Trastkiv\",\"Country\":\"Russia\"}", - "address": "{\"city\":\"kolkata\",\"country\":\"India\",\"postalCode\":789223,\"state\":\"WB\",\"street\":\"\"}", - "first_name": "John", - "last_name": "Doe" - }, - "identity": "anon_id" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.clevertap.com/1/upload", - "headers": { - "X-CleverTap-Account-Id": "476550467", - "X-CleverTap-Passcode": "sample_passcode", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "d": [ - { - "type": "profile", - "profileData": { - "Email": "johnDoe@gmail.com", - "Phone": "92374162212", - "Gender": "M", - "Employed": true, - "DOB": "1614775793", - "Education": "Science", - "Married": true, - "Customer Type": "Prime", - "Name": "John Doe", - "graduate": true, - "msg_push": true, - "msgSms": true, - "msgemail": true, - "msgwhatsapp": false, - "custom_tags": "[\"Test_User\",\"Interested_User\",\"DIY_Hobby\"]", - "custom_mappings": "{\"Office\":\"Trastkiv\",\"Country\":\"Russia\"}", - "address": "{\"city\":\"kolkata\",\"country\":\"India\",\"postalCode\":789223,\"state\":\"WB\",\"street\":\"\"}", - "first_name": "John", - "last_name": "Doe" - }, - "identity": "anon_id" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - { - "error": "Products property value must be an array of objects" - }, - { - "error": "Unable to process without anonymousId or userId" - } -] diff --git a/test/__tests__/data/clevertap_proxy_input.json b/test/__tests__/data/clevertap_proxy_input.json deleted file mode 100644 index 1826547f5c..0000000000 --- a/test/__tests__/data/clevertap_proxy_input.json +++ /dev/null @@ -1,114 +0,0 @@ -[ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.clevertap.com/1/upload/test1", - "headers": { - "X-CleverTap-Account-Id": "476550467", - "X-CleverTap-Passcode": "fbee74a147828e2932c701d19dc1f2dcfa4ac0048be3aa3a88d427090a59dc1c0fa002f1", - "Content-Type": "application/json" - }, - "body": { - "JSON": { - "d": [ - { - "type": "profile", - "profileData": { - "Email": "jamesDoe@gmail.com", - "Name": "James Doe", - "Phone": "92374162212", - "Gender": "M", - "Employed": true, - "DOB": "1614775793", - "Education": "Science", - "Married": "Y", - "Customer Type": "Prime", - "graduate": true, - "msg_push": true, - "msgSms": true, - "msgemail": true, - "msgwhatsapp": false, - "custom_tags": "[\"Test_User\",\"Interested_User\",\"DIY_Hobby\"]", - "custom_mappings": "{\"Office\":\"Trastkiv\",\"Country\":\"Russia\"}", - "address": "{\"city\":\"kolkata\",\"country\":\"India\",\"postalCode\":789223,\"state\":\"WB\",\"street\":\"\"}" - }, - "identity": "anon_id" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "params": { - "destination": "clevertap" - } - }, - { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "d": [ - { - "identity": "anon-id-new", - "type": "event", - "evtName": "Web Page Viewed: Rudder", - "evtData": { - "title": "Home", - "path": "/" - } - } - ] - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "headers": { - "X-CleverTap-Account-Id": "fakeId123", - "X-CleverTap-Passcode": "fakePasscode123", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api.clevertap.com/1/upload/test2", - "params": { - "destination": "clevertap" - } - }, - { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "d": [ - { - "identity": "anon-id-new", - "type": "event", - "evtData": { - "title": "Home", - "path": "/" - } - } - ] - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "headers": { - "X-CleverTap-Account-Id": "476550467", - "X-CleverTap-Passcode": "fbee74a147828e2932c701d19dc1f2dcfa4ac0048be3aa3a88d427090a59dc1c0fa002f1", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api.clevertap.com/1/upload/test3", - "params": { - "destination": "clevertap" - } - } -] \ No newline at end of file diff --git a/test/__tests__/data/clevertap_proxy_output.json b/test/__tests__/data/clevertap_proxy_output.json deleted file mode 100644 index cbb685e39e..0000000000 --- a/test/__tests__/data/clevertap_proxy_output.json +++ /dev/null @@ -1,64 +0,0 @@ -[ - { - "output": { - "status": 200, - "message": "Request Processed Successfully", - "destinationResponse": { - "response": { - "status": "success", - "processed": 1, - "unprocessed": [] - }, - "status": 200 - } - } - }, - { - "output": { - "status": 401, - "message": "Request failed with status: 401", - "destinationResponse": { - "response": { - "status": "fail", - "error": "Invalid Credentials", - "code": 401 - }, - "status": 401 - }, - "statTags": { - "destType": "CLEVERTAP", - "errorCategory": "network", - "destinationId": "Non-determininable", - "workspaceId": "Non-determininable", - "errorType": "aborted", - "feature": "dataDelivery", - "implementation": "native", - "module": "destination" - } - } - }, - { - "output": { - "status": 400, - "message": "Request failed with status: 200", - "destinationResponse": { - "response": { - "status": "fail", - "processed": 0, - "unprocessed": [] - }, - "status": 200 - }, - "statTags": { - "destType": "CLEVERTAP", - "errorCategory": "network", - "destinationId": "Non-determininable", - "workspaceId": "Non-determininable", - "errorType": "aborted", - "feature": "dataDelivery", - "implementation": "native", - "module": "destination" - } - } - } -] diff --git a/test/__tests__/data/clevertap_router_input.json b/test/__tests__/data/clevertap_router_input.json deleted file mode 100644 index af38871af9..0000000000 --- a/test/__tests__/data/clevertap_router_input.json +++ /dev/null @@ -1,139 +0,0 @@ -[ - { - "destination": { - "Config": { - "passcode": "dummypasscode", - "accountId": "dummyAccountId", - "trackAnonymous": true, - "enableObjectIdMapping": true - } - }, - "metadata": { - "jobId": 1 - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "Android", - "version": "" - }, - "screen": { - "density": 2 - }, - "device": { - "id": "f54bb572361c4fd1", - "name": "whyred", - "type": "Android", - "model": "Redmi Note 5 Pro", - "manufacturer": "Xiaomi", - "token": "frfsgvrwe:APfdsafsgdfsgghfgfgjkhfsfgdhjhbvcvnetry767456fxsasdf" - } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "anon_id", - "type": "identify", - "traits": { - "ts": "2019-10-14T09:03:17.562Z", - "anonymousId": "anon_id", - "email": "dummyuser@gmail.com", - "name": "Dummy User", - "phone": "98765434210", - "gender": "M", - "employed": true, - "birthday": "1614775793", - "education": "Science", - "graduate": true, - "married": true, - "customerType": "Prime", - "msg_push": true, - "msgSms": true, - "msgemail": true, - "msgwhatsapp": false, - "custom_tags": ["Test_User", "Interested_User", "DIY_Hobby"], - "custom_mappings": { - "Office": "Trastkiv", - "Country": "Russia" - }, - "address": { - "city": "kolkata", - "country": "India", - "postalCode": 789223, - "state": "WB", - "street": "" - } - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "passcode": "dummypasscode", - "accountId": "dummyAccountId", - "trackAnonymous": true, - "enableObjectIdMapping": true - } - }, - "metadata": { - "jobId": 2 - }, - "message": { - "event": "Random", - "properties": { - "country_region": "India", - "test": "abc" - }, - "receivedAt": "2021-08-20T12:49:07.691Z", - "rudderId": "138c4214-b537-4f77-9dea-9abde70b5147", - "type": "track", - "anonymousId": "cd3a4439-7df0-4475-acb9-6659c7c4dfe3" - } - }, - { - "destination": { - "Config": { - "passcode": "dummypasscode", - "accountId": "dummyAccountId", - "trackAnonymous": true - } - }, - "metadata": { - "jobId": 3 - }, - "message": { - "type": "group", - "anonymousId": "anon-id-new", - "name": "Rudder", - "properties": { - "title": "Home", - "path": "/" - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - } -] diff --git a/test/__tests__/data/clevertap_router_output.json b/test/__tests__/data/clevertap_router_output.json deleted file mode 100644 index 3f726652e1..0000000000 --- a/test/__tests__/data/clevertap_router_output.json +++ /dev/null @@ -1,107 +0,0 @@ -[ - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "batched": true, - "endpoint": "https://api.clevertap.com/1/upload", - "headers": { - "X-CleverTap-Account-Id": "dummyAccountId", - "X-CleverTap-Passcode": "dummypasscode", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "d": [ - { - "type": "profile", - "ts": 1571043797, - "profileData": { - "Email": "dummyuser@gmail.com", - "Name": "Dummy User", - "Phone": "98765434210", - "Gender": "M", - "Employed": true, - "DOB": "1614775793", - "Education": "Science", - "Married": true, - "Customer Type": "Prime", - "graduate": true, - "msg_push": true, - "msgSms": true, - "msgemail": true, - "msgwhatsapp": false, - "custom_tags": "[\"Test_User\",\"Interested_User\",\"DIY_Hobby\"]", - "custom_mappings": "{\"Office\":\"Trastkiv\",\"Country\":\"Russia\"}", - "address": "{\"city\":\"kolkata\",\"country\":\"India\",\"postalCode\":789223,\"state\":\"WB\",\"street\":\"\"}" - }, - "objectId": "anon_id" - }, - { - "type": "token", - "tokenData": { - "id": "frfsgvrwe:APfdsafsgdfsgghfgfgjkhfsfgdhjhbvcvnetry767456fxsasdf", - "type": "fcm" - }, - "objectId": "anon_id" - }, - { - "evtName": "Random", - "evtData": { - "country_region": "India", - "test": "abc" - }, - "type": "event", - "objectId": "cd3a4439-7df0-4475-acb9-6659c7c4dfe3" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "jobId": 1 - }, - { - "jobId": 2 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "passcode": "dummypasscode", - "accountId": "dummyAccountId", - "trackAnonymous": true, - "enableObjectIdMapping": true - } - } - }, - { - "metadata": [ - { - "jobId": 3 - } - ], - "batched": false, - "statusCode": 400, - "error": "Message type not supported", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation" - }, - "destination": { - "Config": { - "passcode": "dummypasscode", - "accountId": "dummyAccountId", - "trackAnonymous": true - } - } - } -] diff --git a/test/__tests__/data/clickup.json b/test/__tests__/data/clickup.json deleted file mode 100644 index 5bd246004a..0000000000 --- a/test/__tests__/data/clickup.json +++ /dev/null @@ -1,513 +0,0 @@ -[ - { - "description": "Invalid priority", - "input": { - "destination": { - "Config": { - "apiToken": "pk_123", - "listId": "correctListId123" - }, - "ID": "clickup-1234" - }, - "message": { - "type": "track", - "event": "Product Viewed", - "properties": { "priority": 0 }, - "context": {}, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c" - } - }, - "output": { - "error": "Invalid value specified for priority. Value must be Integer and in range \"[1,4]\"" - } - }, - { - "description": "Custom field: Invalid phone number", - "input": { - "destination": { - "Config": { - "apiToken": "pk_123", - "listId": "correctListId123", - "keyToCustomFieldName": [ - { - "from": "phone", - "to": "Phone Number" - } - ] - }, - "ID": "clickup-1234" - }, - "message": { - "type": "track", - "event": "Product Viewed", - "properties": { "phone": "9999999999" }, - "context": {}, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c" - } - }, - "output": { - "error": "The provided phone number is invalid" - } - }, - { - "description": "Custom field: Invalid email", - "input": { - "destination": { - "Config": { - "apiToken": "pk_123", - "listId": "correctListId123", - "keyToCustomFieldName": [ - { - "from": "email", - "to": "Email" - } - ] - }, - "ID": "clickup-1234" - }, - "message": { - "type": "track", - "event": "Product Viewed", - "properties": { "email": "test.com" }, - "context": {}, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c" - } - }, - "output": { - "error": "The provided email is invalid" - } - }, - { - "description": "Custom field: Invalid url", - "input": { - "destination": { - "Config": { - "apiToken": "pk_123", - "listId": "correctListId123", - "keyToCustomFieldName": [ - { - "from": "url", - "to": "Url" - } - ] - }, - "ID": "clickup-1234" - }, - "message": { - "type": "track", - "event": "Product Viewed", - "properties": { "url": "www.test.com" }, - "context": {}, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c" - } - }, - "output": { - "error": "The provided url is invalid" - } - }, - { - "description": "Custom field: Invalid location latitude", - "input": { - "destination": { - "Config": { - "apiToken": "pk_123", - "listId": "correctListId123", - "keyToCustomFieldName": [ - { - "from": "location", - "to": "Location" - } - ] - }, - "ID": "clickup-1234" - }, - "message": { - "type": "track", - "event": "Product Viewed", - "properties": { - "location": { - "lat": -100, - "lng": 124, - "formattedAddress": "Gold Coast QLD, Australia" - } - }, - "context": {}, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c" - } - }, - "output": { - "error": "Invalid value specified for latitude. Latitude must be in range \"[-90, 90]\"" - } - }, - { - "description": "Custom field: Invalid rating", - "input": { - "destination": { - "Config": { - "apiToken": "pk_123", - "listId": "correctListId123", - "keyToCustomFieldName": [ - { - "from": "rating", - "to": "Rating" - } - ] - }, - "ID": "clickup-1234" - }, - "message": { - "type": "track", - "event": "Product Viewed", - "properties": { "rating": "7" }, - "context": {}, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c" - } - }, - "output": { - "error": "Invalid value specified for rating. Value must be in range \"[0,5]\"" - } - }, - { - "description": "Creating task with valid custom fields values", - "input": { - "destination": { - "Config": { - "apiToken": "pk_123", - "listId": "correctListId123", - "keyToCustomFieldName": [ - { - "from": "industry", - "to": "Industry" - }, - { - "from": "Payment Status", - "to": "Payment Status" - }, - { - "from": "labelKey", - "to": "Labels" - }, - { - "from": "locationKey", - "to": "Location" - }, - { - "from": "phone", - "to": "Phone Number" - }, - { - "from": "email", - "to": "Email" - }, - { - "from": "url", - "to": "Url" - }, - { - "from": "rating", - "to": "Rating" - }, - { - "from": "plan", - "to": "Plan" - }, - { - "from": "contactTitle", - "to": "Contact Title" - }, - { - "from": "date", - "to": "Date" - } - ] - }, - "ID": "clickup-1234" - }, - "message": { - "type": "track", - "event": "Product Viewed", - "properties": { - "description": "Creating task with valid custom fields values", - "tags": ["testing", "custom fields"], - "timeEstimate": 10800000, - "status": "Ready", - "priority": 1, - "dueDate": "2022-02-25T13:39:21.032Z", - "includeDueDateTime": true, - "startDate": "2022-01-20T13:39:21.032Z", - "includeStartDateTime": "true", - "notifyAll": false, - "industry": "Retail", - "Payment Status": "Pending", - "labelKey": ["option 1", "option 2", "option 3"], - "locationKey": { - "lat": -20, - "lng": 124, - "formattedAddress": "Gold Coast QLD, Australia" - }, - "phone": "+12233445567", - "email": "test123@example.com", - "url": "https://www.rudderstack.com/", - "rating": 3, - "plan": "Business", - "contactTitle": "VP of Operations", - "date": "2022-02-25T13:39:21.032Z" - }, - "context": {}, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.clickup.com/api/v2/list/correctListId123/task", - "headers": { - "Content-Type": "application/json", - "Authorization": "pk_123" - }, - "params": {}, - "body": { - "JSON": { - "name": "Product Viewed", - "description": "Creating task with valid custom fields values", - "tags": ["testing", "custom fields"], - "time_estimate": 10800000, - "status": "Ready", - "priority": 1, - "due_date": 1645796361032, - "due_date_time": true, - "start_date": 1642685961032, - "start_date_time": "true", - "notify_all": false, - "custom_fields": [ - { - "id": "a5f5044a-cbad-4caf-bcbb-4cd32bd8db7c", - "value": "c7f9b6f5-cd98-4609-af10-68a8710cc1bf" - }, - { - "id": "22eaffee-ffec-4c3b-bdae-56e69d55eecd", - "value": "7afcb6fb-cec8-41d8-bf0c-039a9db28460" - }, - { - "id": "19d3ac4e-2b1e-4569-b33e-ff86c7d94d6e", - "value": [ - "32c81c1c-cf53-4829-92f5-0f0270d27a45", - "7e24f329-9dd9-4e68-b426-2c70af6f9347" - ] - }, - { - "id": "ea6c1e48-2abf-4328-b228-79c213e147c8", - "value": { - "location": { - "lat": -20, - "lng": 124 - }, - "formatted_address": "Gold Coast QLD, Australia" - } - }, - { - "id": "c9b83d91-b979-4b34-b4bd-88bf9cf2b9a6", - "value": "+12233445567" - }, - { - "id": "ebe825fb-92de-41ce-a29c-25018da039b4", - "value": "test123@example.com" - }, - { - "id": "b01b32fd-94d3-43e6-9f31-2c855ff169cd", - "value": "https://www.rudderstack.com/" - }, - { - "id": "f431cda3-a575-4a05-ba8d-583d9b6cb2df", - "value": 3 - }, - { - "id": "4b7a29be-e261-4340-8f3f-e6de838473e5", - "value": "c5032049-8c05-44e9-a000-3a071d457b8f" - }, - { - "id": "4bfebc00-9d4a-40d1-aef8-5a87b610186c", - "value": "VP of Operations" - }, - { - "id": "666f74bf-6d87-41f3-8735-ccf0efe066dd", - "value": 1645796361032 - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "Creating task with assignees", - "input": { - "destination": { - "Config": { - "apiToken": "pk_123", - "listId": "correctListId123" - }, - "ID": "clickup-1234" - }, - "message": { - "type": "track", - "event": "Product Viewed", - "properties": { - "taskName": "Transformer Testing" - }, - "context": { - "externalId": [ - { - "type": "clickUpAssigneeId", - "id": 61205104 - }, - { - "type": "clickUpAssigneeId", - "id": 61217234 - }, - { - "type": "clickUpAssigneeId", - "id": 61228575 - } - ] - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.clickup.com/api/v2/list/correctListId123/task", - "headers": { - "Content-Type": "application/json", - "Authorization": "pk_123" - }, - "params": {}, - "body": { - "JSON": { - "name": "Transformer Testing", - "assignees": [61205104, 61217234, 61228575] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "Event filtering : Sending non whitelisted event when some events are whitelisted", - "input": { - "destination": { - "Config": { - "apiToken": "pk_123", - "listId": "correctListId123", - "whitelistedEvents": [ - { "eventName": "Anonymous Page Visit" }, - { "eventName": "Product Viewed" }, - { "eventName": "" } - ] - }, - "ID": "clickup-1234" - }, - "message": { - "type": "track", - "event": "Credit Card Added", - "context": {}, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c" - } - }, - "output": { - "error": "The event was discarded as it was not allow listed in the destination configuration" - } - }, - { - "description": "Event filtering : No event is whitelisted", - "input": { - "destination": { - "Config": { - "apiToken": "pk_123", - "listId": "correctListId123", - "whitelistedEvents": [{ "eventName": "" }, { "eventName": "" }, { "eventName": "" }] - }, - "ID": "clickup-1234" - }, - "message": { - "type": "track", - "event": "Credit Card Added", - "context": {}, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c" - } - }, - "output": { - "error": "The event was discarded as it was not allow listed in the destination configuration" - } - }, - { - "description": "Creating task using listId from externalId array", - "input": { - "destination": { - "Config": { - "apiToken": "pk_123", - "listId": "correctListId123" - }, - "ID": "clickup-1234" - }, - "message": { - "type": "track", - "event": "anonymous page visit", - "context": { - "externalId": [{ "type": "clickUpListId", "id": "correctListId456" }] - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.clickup.com/api/v2/list/correctListId456/task", - "headers": { - "Content-Type": "application/json", - "Authorization": "pk_123" - }, - "params": {}, - "body": { - "JSON": { - "name": "anonymous page visit" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - } -] diff --git a/test/__tests__/data/clickup_router_input.json b/test/__tests__/data/clickup_router_input.json deleted file mode 100644 index 1393310371..0000000000 --- a/test/__tests__/data/clickup_router_input.json +++ /dev/null @@ -1,192 +0,0 @@ -[ - { - "description": "Creating task using listId from externalId array", - "destination": { - "Config": { - "apiToken": "pk_123", - "listId": "correctListId123" - }, - "ID": "clickup-1234" - }, - "metadata": { - "jobId": 1 - }, - "message": { - "type": "track", - "event": "anonymous page visit", - "context": { - "externalId": [{ "type": "clickUpListId", "id": "correctListId456" }] - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c" - } - }, - { - "description": "Creating task with assignees", - "destination": { - "Config": { - "apiToken": "pk_123", - "listId": "correctListId123" - }, - "ID": "clickup-1234" - }, - "metadata": { - "jobId": 2 - }, - "message": { - "type": "track", - "event": "Product Viewed", - "properties": { - "taskName": "Transformer Testing" - }, - "context": { - "externalId": [ - { - "type": "clickUpAssigneeId", - "id": 61205104 - }, - { - "type": "clickUpAssigneeId", - "id": 61217234 - }, - { - "type": "clickUpAssigneeId", - "id": 61228575 - } - ] - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c" - } - }, - { - "description": "Creating task with valid custom fields values", - "destination": { - "Config": { - "apiToken": "pk_123", - "listId": "correctListId123", - "keyToCustomFieldName": [ - { - "from": "industry", - "to": "Industry" - }, - { - "from": "Payment Status", - "to": "Payment Status" - }, - { - "from": "labelKey", - "to": "Labels" - }, - { - "from": "locationKey", - "to": "Location" - }, - { - "from": "phone", - "to": "Phone Number" - }, - { - "from": "email", - "to": "Email" - }, - { - "from": "url", - "to": "Url" - }, - { - "from": "rating", - "to": "Rating" - }, - { - "from": "plan", - "to": "Plan" - }, - { - "from": "contactTitle", - "to": "Contact Title" - }, - { - "from": "date", - "to": "Date" - } - ] - }, - "ID": "clickup-1234" - }, - "metadata": { - "jobId": 3 - }, - "message": { - "type": "track", - "event": "Product Viewed", - "properties": { - "description": "Creating task with valid custom fields values", - "tags": ["testing", "custom fields"], - "timeEstimate": 10800000, - "status": "Ready", - "priority": 1, - "dueDate": "2022-02-25T13:39:21.032Z", - "includeDueDateTime": true, - "startDate": "2022-01-20T13:39:21.032Z", - "includeStartDateTime": "true", - "notifyAll": false, - "industry": "Retail", - "Payment Status": "Pending", - "labelKey": ["option 1", "option 2", "option 3"], - "locationKey": { - "lat": -20, - "lng": 124, - "formattedAddress": "Gold Coast QLD, Australia" - }, - "phone": "+12233445567", - "email": "test123@example.com", - "url": "https://www.rudderstack.com/", - "rating": 3, - "plan": "Business", - "contactTitle": "VP of Operations", - "date": "2022-02-25T13:39:21.032Z" - }, - "context": {}, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c" - } - }, - { - "description": "Custom field: Invalid location latitude", - "destination": { - "Config": { - "apiToken": "pk_123", - "listId": "correctListId123", - "keyToCustomFieldName": [ - { - "from": "location", - "to": "Location" - } - ] - }, - "ID": "clickup-1234" - }, - "metadata": { - "jobId": 4 - }, - "message": { - "type": "track", - "event": "Product Viewed", - "properties": { - "location": { - "lat": -100, - "lng": 124, - "formattedAddress": "Gold Coast QLD, Australia" - } - }, - "context": {}, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c" - } - } -] diff --git a/test/__tests__/data/clickup_router_output.json b/test/__tests__/data/clickup_router_output.json deleted file mode 100644 index 467bbec962..0000000000 --- a/test/__tests__/data/clickup_router_output.json +++ /dev/null @@ -1,249 +0,0 @@ -[ - { - "batched": false, - "batchedRequest": { - "body": { - "FORM": {}, - "JSON": { - "name": "anonymous page visit" - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://api.clickup.com/api/v2/list/correctListId456/task", - "files": {}, - "headers": { - "Authorization": "pk_123", - "Content-Type": "application/json" - }, - "method": "POST", - "params": {}, - "type": "REST", - "version": "1" - }, - "destination": { - "Config": { - "apiToken": "pk_123", - "listId": "correctListId123" - }, - "ID": "clickup-1234" - }, - "metadata": [ - { - "jobId": 1 - } - ], - "statusCode": 200 - }, - { - "batched": false, - "batchedRequest": { - "body": { - "FORM": {}, - "JSON": { - "assignees": [61205104, 61217234, 61228575], - "name": "Transformer Testing" - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://api.clickup.com/api/v2/list/correctListId123/task", - "files": {}, - "headers": { - "Authorization": "pk_123", - "Content-Type": "application/json" - }, - "method": "POST", - "params": {}, - "type": "REST", - "version": "1" - }, - "destination": { - "Config": { - "apiToken": "pk_123", - "listId": "correctListId123" - }, - "ID": "clickup-1234" - }, - "metadata": [ - { - "jobId": 2 - } - ], - "statusCode": 200 - }, - { - "batched": false, - "batchedRequest": { - "body": { - "FORM": {}, - "JSON": { - "custom_fields": [ - { - "id": "a5f5044a-cbad-4caf-bcbb-4cd32bd8db7c", - "value": "c7f9b6f5-cd98-4609-af10-68a8710cc1bf" - }, - { - "id": "22eaffee-ffec-4c3b-bdae-56e69d55eecd", - "value": "7afcb6fb-cec8-41d8-bf0c-039a9db28460" - }, - { - "id": "19d3ac4e-2b1e-4569-b33e-ff86c7d94d6e", - "value": [ - "32c81c1c-cf53-4829-92f5-0f0270d27a45", - "7e24f329-9dd9-4e68-b426-2c70af6f9347" - ] - }, - { - "id": "ea6c1e48-2abf-4328-b228-79c213e147c8", - "value": { - "formatted_address": "Gold Coast QLD, Australia", - "location": { - "lat": -20, - "lng": 124 - } - } - }, - { - "id": "c9b83d91-b979-4b34-b4bd-88bf9cf2b9a6", - "value": "+12233445567" - }, - { - "id": "ebe825fb-92de-41ce-a29c-25018da039b4", - "value": "test123@example.com" - }, - { - "id": "b01b32fd-94d3-43e6-9f31-2c855ff169cd", - "value": "https://www.rudderstack.com/" - }, - { - "id": "f431cda3-a575-4a05-ba8d-583d9b6cb2df", - "value": 3 - }, - { - "id": "4b7a29be-e261-4340-8f3f-e6de838473e5", - "value": "c5032049-8c05-44e9-a000-3a071d457b8f" - }, - { - "id": "4bfebc00-9d4a-40d1-aef8-5a87b610186c", - "value": "VP of Operations" - }, - { - "id": "666f74bf-6d87-41f3-8735-ccf0efe066dd", - "value": 1645796361032 - } - ], - "name": "Product Viewed", - "description": "Creating task with valid custom fields values", - "tags": ["testing", "custom fields"], - "time_estimate": 10800000, - "status": "Ready", - "priority": 1, - "due_date": 1645796361032, - "due_date_time": true, - "start_date": 1642685961032, - "start_date_time": "true", - "notify_all": false - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://api.clickup.com/api/v2/list/correctListId123/task", - "files": {}, - "headers": { - "Authorization": "pk_123", - "Content-Type": "application/json" - }, - "method": "POST", - "params": {}, - "type": "REST", - "version": "1" - }, - "destination": { - "Config": { - "apiToken": "pk_123", - "keyToCustomFieldName": [ - { - "from": "industry", - "to": "Industry" - }, - { - "from": "Payment Status", - "to": "Payment Status" - }, - { - "from": "labelKey", - "to": "Labels" - }, - { - "from": "locationKey", - "to": "Location" - }, - { - "from": "phone", - "to": "Phone Number" - }, - { - "from": "email", - "to": "Email" - }, - { - "from": "url", - "to": "Url" - }, - { - "from": "rating", - "to": "Rating" - }, - { - "from": "plan", - "to": "Plan" - }, - { - "from": "contactTitle", - "to": "Contact Title" - }, - { - "from": "date", - "to": "Date" - } - ], - "listId": "correctListId123" - }, - "ID": "clickup-1234" - }, - "metadata": [ - { - "jobId": 3 - } - ], - "statusCode": 200 - }, - { - "destination": { - "Config": { - "apiToken": "pk_123", - "listId": "correctListId123", - "keyToCustomFieldName": [ - { - "from": "location", - "to": "Location" - } - ] - }, - "ID": "clickup-1234" - }, - "batched": false, - "error": "Invalid value specified for latitude. Latitude must be in range \"[-90, 90]\"", - "metadata": [ - { - "jobId": 4 - } - ], - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation" - }, - "statusCode": 400 - } -] diff --git a/test/__tests__/data/custify.json b/test/__tests__/data/custify.json deleted file mode 100644 index 7a83a6a0c3..0000000000 --- a/test/__tests__/data/custify.json +++ /dev/null @@ -1,511 +0,0 @@ -[ - { - "description": "Identify Call with all traits and adding to company", - "input": { - "destination": { - "Config": { - "apiKey": "apiKey_key_test_001", - "sendAnonymousId": false - }, - "ID": "custify-1234" - }, - "message": { - "type": "identify", - "userId": "user_1234", - "context": { - "traits": { - "email": "user111@gmail.com", - "firstName": "New", - "lastName": "User", - "phone": 9830311522, - "sessionCount": 23, - "unsubscribedFromEmails": false, - "unsubscribedFromCalls": false, - - "signed_up_at": "2022-04-27T13:56:13.012Z", - "custom_prop1": "custom_value1", - "custom_prop2": 123, - "custom_prop3": false, - "custom_prop4": { "test": "test" }, - "custom_prop5": [1, 3, 4], - "createdAt": "2022-04-27T13:56:13.012Z", - "company": { - "id": "company_123" - } - } - }, - "timestamp": "2022-04-27T13:56:13.012Z", - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.custify.com/people", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer apiKey_key_test_001", - "Accept": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "user_id": "user_1234", - "email": "user111@gmail.com", - "phone": 9830311522, - "session_count": 23, - "unsubscribed_from_emails": false, - "unsubscribed_from_calls": false, - "signed_up_at": "2022-04-27T13:56:13.012Z", - "custom_attributes": { - "firstName": "New", - "lastName": "User", - "sessionCount": 23, - "unsubscribedFromEmails": false, - "unsubscribedFromCalls": false, - "custom_prop1": "custom_value1", - "custom_prop2": 123, - "custom_prop3": false, - "createdAt": "2022-04-27T13:56:13.012Z" - }, - "name": "New User", - "companies": [ - { - "company_id": "company_123", - "remove": false - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "user_1234" - } - }, - { - "description": "Identify Call removing the user from company", - "input": { - "destination": { - "Config": { - "apiKey": "apiKey_key_test_001", - "sendAnonymousId": false - }, - "ID": "custify-1234" - }, - "message": { - "type": "identify", - "userId": "user_1234", - "context": { - "traits": { - "email": "user111@gmail.com", - "firstName": "New", - "lastName": "User", - "phone": 9830311522, - "sessionCount": 23, - "unsubscribedFromEmails": false, - "unsubscribedFromCalls": false, - - "signed_up_at": "2022-04-27T13:56:13.012Z", - "custom_prop1": "custom_value1", - "custom_prop2": 123, - "custom_prop3": false, - "custom_prop4": { "test": "test" }, - "custom_prop5": [1, 3, 4], - "createdAt": "2022-04-27T13:56:13.012Z", - "company": { - "id": "company_123", - "remove": true - } - } - }, - "timestamp": "2022-04-27T13:56:13.012Z", - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.custify.com/people", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer apiKey_key_test_001", - "Accept": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "user_id": "user_1234", - "email": "user111@gmail.com", - "phone": 9830311522, - "session_count": 23, - "unsubscribed_from_emails": false, - "unsubscribed_from_calls": false, - "signed_up_at": "2022-04-27T13:56:13.012Z", - "custom_attributes": { - "firstName": "New", - "lastName": "User", - "sessionCount": 23, - "unsubscribedFromEmails": false, - "unsubscribedFromCalls": false, - "custom_prop1": "custom_value1", - "custom_prop2": 123, - "custom_prop3": false, - "createdAt": "2022-04-27T13:56:13.012Z" - }, - "name": "New User", - "companies": [ - { - "company_id": "company_123", - "remove": true - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "user_1234" - } - }, - { - "description": "Identify Call without userId and email and anoymousId", - "input": { - "destination": { - "Config": { - "apiKey": "apiKey_key_test_001", - "sendAnonymousId": false - }, - "ID": "custify-1234" - }, - "message": { - "type": "identify", - "context": { - "traits": { - "firstName": "New", - "lastName": "User", - "phone": 9830311522, - "sessionCount": 23, - "unsubscribedFromEmails": false, - "unsubscribedFromCalls": false, - "signed_up_at": "2022-04-27T13:56:13.012Z", - "custom_prop1": "custom_value1", - "custom_prop2": 123, - "custom_prop3": false, - "custom_prop4": { "test": "test" }, - "custom_prop5": [1, 3, 4], - "createdAt": "2022-04-27T13:56:13.012Z", - "company": { - "id": "company_123", - "remove": true - } - } - }, - "timestamp": "2022-04-27T13:56:13.012Z", - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04" - } - }, - "output": { - "error": "Email or userId is mandatory" - } - }, - { - "description": "Identify Call without userId and email and sendAnonymous is false", - "input": { - "destination": { - "Config": { - "apiKey": "apiKey_key_test_001", - "sendAnonymousId": false - }, - "ID": "custify-1234" - }, - "message": { - "type": "identify", - "context": { - "traits": { - "firstName": "New", - "lastName": "User", - "phone": 9830311522, - "sessionCount": 23, - "unsubscribedFromEmails": false, - "unsubscribedFromCalls": false, - "signed_up_at": "2022-04-27T13:56:13.012Z", - "custom_prop1": "custom_value1", - "custom_prop2": 123, - "custom_prop3": false, - "custom_prop4": { "test": "test" }, - "custom_prop5": [1, 3, 4], - "createdAt": "2022-04-27T13:56:13.012Z", - "company": { - "id": "company_123", - "remove": true - } - } - }, - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "timestamp": "2022-04-27T13:56:13.012Z", - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04" - } - }, - "output": { - "error": "Email or userId is mandatory" - } - }, - { - "description": "Identify Call without userId and email and sendAnonymous is true", - "input": { - "destination": { - "Config": { - "apiKey": "apiKey_key_test_001", - "sendAnonymousId": true - }, - "ID": "custify-1234" - }, - "message": { - "type": "identify", - "context": { - "traits": { - "firstName": "New", - "lastName": "User", - "phone": 9830311522, - "sessionCount": 23, - "unsubscribedFromEmails": false, - "unsubscribedFromCalls": false, - "signed_up_at": "2022-04-27T13:56:13.012Z", - "custom_prop1": "custom_value1", - "custom_prop2": 123, - "custom_prop3": false, - "custom_prop4": { "test": "test" }, - "custom_prop5": [1, 3, 4], - "createdAt": "2022-04-27T13:56:13.012Z", - "company": { - "id": "company_123", - "remove": true - } - } - }, - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "timestamp": "2022-04-27T13:56:13.012Z", - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.custify.com/people", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer apiKey_key_test_001", - "Accept": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "phone": 9830311522, - "session_count": 23, - "unsubscribed_from_emails": false, - "unsubscribed_from_calls": false, - "signed_up_at": "2022-04-27T13:56:13.012Z", - "custom_attributes": { - "firstName": "New", - "lastName": "User", - "sessionCount": 23, - "unsubscribedFromEmails": false, - "unsubscribedFromCalls": false, - "custom_prop1": "custom_value1", - "custom_prop2": 123, - "custom_prop3": false, - "createdAt": "2022-04-27T13:56:13.012Z" - }, - "user_id": "bf412108-0357-4330-b119-7305e767823c", - "name": "New User", - "companies": [ - { - "company_id": "company_123", - "remove": true - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "bf412108-0357-4330-b119-7305e767823c" - } - }, - { - "description": "Track call with all properties", - "input": { - "destination": { - "Config": { - "apiKey": "apiKey_key_test_001", - "sendAnonymousId": false - }, - "ID": "custify-1234" - }, - "message": { - "type": "track", - "event": "Order Completed Version 2", - "sentAt": "2021-08-26T14:16:47.321Z", - "userId": "user_111", - "context": { - "library": { - "name": "analytics-node", - "version": "1.0.3" - }, - "traits": { - "email": "user111@gmail.com" - }, - "page": { - "url": "https://www.website.com/product/path" - } - }, - "rudderId": "70612f39-0607-45bb-8236-bf0995fde4fa", - "_metadata": { - "nodeVersion": "10.24.1" - }, - "messageId": "node-84952e4eb9c6debbda735c49d08a8b31-fcbfed6a-38cf-42c5-881c-f590f59311b1", - "properties": { - "product": "Cube", - "revenue": 9002, - "organization_id": "company_123" - }, - "originalTimestamp": "2021-08-26T14:16:47.317Z" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.custify.com/event", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer apiKey_key_test_001", - "Accept": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "user_id": "user_111", - "email": "user111@gmail.com", - "name": "Order Completed Version 2", - "created_at": "2021-08-26T14:16:47.317Z", - "company_id": "company_123", - "metadata": { - "product": "Cube", - "revenue": 9002, - "organization_id": "company_123", - "user_id": "user_111" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "user_111" - } - }, - { - "description": "Group call with all fields success scenario", - "input": { - "destination": { - "Config": { - "apiKey": "apiKey_key_test_001", - "sendAnonymousId": false - }, - "ID": "custify-1234" - }, - "message": { - "type": "group", - "userId": "user_111", - "groupId": "company_222", - "traits": { - "name": "Absolute Company", - "industry": " Absolute", - "employees": 121, - "size": 100, - "website": "www.rudder.com", - "plan": "GOLD", - "monthly_revenue": 8000, - "churned": false, - "test_att1": "test_att_val1" - }, - "context": { - "traits": { - "firstName": "Absolute", - "lastName": "User", - "phone": 9830311522, - "session_count": 23, - "signed_up_at": "2022-04-27T13:56:13.012Z", - "custom_prop1": "custom_value1", - "custom_prop2": 123, - "custom_prop3": false, - "custom_prop4": { - "test": "test" - }, - "custom_prop5": [1, 3, 4], - "createdAt": "2022-04-27T13:56:13.012Z" - }, - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-01-21T00:21:34.208Z" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.custify.com/people", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer apiKey_key_test_001", - "Accept": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "user_id": "user_111", - "phone": 9830311522, - "signed_up_at": "2020-01-21T00:21:34.208Z", - "custom_attributes": { - "firstName": "Absolute", - "lastName": "User", - "custom_prop1": "custom_value1", - "custom_prop2": 123, - "custom_prop3": false, - "createdAt": "2022-04-27T13:56:13.012Z" - }, - "name": "Absolute User", - "companies": [ - { - "company_id": "company_222", - "remove": false - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "user_111" - } - } -] diff --git a/test/__tests__/data/custify_router_input.json b/test/__tests__/data/custify_router_input.json deleted file mode 100644 index 23efc4bdad..0000000000 --- a/test/__tests__/data/custify_router_input.json +++ /dev/null @@ -1,99 +0,0 @@ -[ - { - "description": "Group callw with all parameters", - "destination": { - "Config": { - "apiKey": "apiKey_key_test_001", - "sendAnonymousId": false - }, - "ID": "custify-1234" - }, - "metadata": { - "jobId": 1 - }, - "message": { - "type": "group", - "userId": "user_111", - "groupId": "company_222", - "traits": { - "name": "Absolute Company", - "industry": " Absolute", - "employees": 121, - "size": 100, - "website": "www.rudder.com", - "plan": "GOLD", - "monthly_revenue": 8000, - "churned": false, - "test_att1": "test_att_val1" - }, - "context": { - "traits": { - "firstName": "Absolute", - "lastName": "User", - "phone": 9830311522, - "session_count": 23, - "signed_up_at": "2022-04-27T13:56:13.012Z", - "custom_prop1": "custom_value1", - "custom_prop2": 123, - "custom_prop3": false, - "custom_prop4": { - "test": "test" - }, - "custom_prop5": [1, 3, 4], - "createdAt": "2022-04-27T13:56:13.012Z" - }, - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-01-21T00:21:34.208Z" - } - }, - { - "description": "Identify with all parameters", - "destination": { - "Config": { - "apiKeyToken": "pk_123", - "listId": "correctListId123" - }, - "ID": "custify-1234" - }, - "metadata": { - "jobId": 2 - }, - "message": { - "type": "identify", - "userId": "user_1234", - "context": { - "traits": { - "email": "user111@gmail.com", - "firstName": "New", - "lastName": "User", - "phone": 9830311522, - "sessionCount": 23, - "unsubscribedFromEmails": false, - "unsubscribedFromCalls": false, - - "signed_up_at": "2022-04-27T13:56:13.012Z", - "custom_prop1": "custom_value1", - "custom_prop2": 123, - "custom_prop3": false, - "custom_prop4": { "test": "test" }, - "custom_prop5": [1, 3, 4], - "createdAt": "2022-04-27T13:56:13.012Z", - "company": { - "id": "company_123" - } - } - }, - "timestamp": "2022-04-27T13:56:13.012Z", - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c" - } -] diff --git a/test/__tests__/data/custify_router_output.json b/test/__tests__/data/custify_router_output.json deleted file mode 100644 index 17a129a4cc..0000000000 --- a/test/__tests__/data/custify_router_output.json +++ /dev/null @@ -1,119 +0,0 @@ -[ - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.custify.com/people", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer apiKey_key_test_001", - "Accept": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "user_id": "user_111", - "phone": 9830311522, - "signed_up_at": "2020-01-21T00:21:34.208Z", - "custom_attributes": { - "firstName": "Absolute", - "lastName": "User", - "custom_prop1": "custom_value1", - "custom_prop2": 123, - "custom_prop3": false, - "createdAt": "2022-04-27T13:56:13.012Z" - }, - "name": "Absolute User", - "companies": [ - { - "company_id": "company_222", - "remove": false - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "user_111" - }, - "metadata": [ - { - "jobId": 1 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "apiKey": "apiKey_key_test_001", - "sendAnonymousId": false - }, - "ID": "custify-1234" - } - }, - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.custify.com/people", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer undefined", - "Accept": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "user_id": "user_1234", - "email": "user111@gmail.com", - "phone": 9830311522, - "session_count": 23, - "unsubscribed_from_emails": false, - "unsubscribed_from_calls": false, - "signed_up_at": "2022-04-27T13:56:13.012Z", - "custom_attributes": { - "firstName": "New", - "lastName": "User", - "sessionCount": 23, - "unsubscribedFromEmails": false, - "unsubscribedFromCalls": false, - "custom_prop1": "custom_value1", - "custom_prop2": 123, - "custom_prop3": false, - "createdAt": "2022-04-27T13:56:13.012Z" - }, - "name": "New User", - "companies": [ - { - "company_id": "company_123", - "remove": false - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "user_1234" - }, - "metadata": [ - { - "jobId": 2 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "apiKeyToken": "pk_123", - "listId": "correctListId123" - }, - "ID": "custify-1234" - } - } -] diff --git a/test/__tests__/data/delighted_input.json b/test/__tests__/data/delighted_input.json deleted file mode 100644 index fa8b118387..0000000000 --- a/test/__tests__/data/delighted_input.json +++ /dev/null @@ -1,392 +0,0 @@ -[ - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "channel": "email", - "delay": 0, - "eventNamesSettings": [{ "event": "" }] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "identify", - "userId": "abc@123.com", - "traits": { - "firstName": "James", - "lastName": "Doe", - "phone": "+91237416221", - "last_sent_at": "1626698350" - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "channel": "email", - "delay": 0, - "eventNamesSettings": [{ "event": "" }] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "alias", - "previousId": "123@abc.com", - "userId": "abc@123.com", - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "channel": "email", - "delay": 0, - "eventNamesSettings": [{ "event": "Product Reviewed" }] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "track", - "userId": "identified_user@email.com", - "event": "Product Reviewed", - "properties": { - "review_id": "12345", - "product_id": "123", - "rating": 3.0, - "review_body": "Average product, expected much more." - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "channel": "email", - "delay": 0, - "eventNamesSettings": [{ "event": "Product Reviewed" }] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "track", - "userId": "unidentified_user@email.com", - "event": "Product Reviewed", - "properties": { - "review_id": "12345", - "product_id": "123", - "rating": 3.0, - "review_body": "Average product, expected much more." - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "channel": "email", - "delay": 0, - "eventNamesSettings": [{ "event": "" }] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "track", - "userId": "identified_user@email.com", - "event": "Product Reviewed", - "properties": { - "review_id": "12345", - "product_id": "123", - "rating": 3.0, - "review_body": "Average product, expected much more." - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "channel": "email", - "delay": 0, - "eventNamesSettings": [{ "event": "Product Reviewed" }] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "track", - "anonymousId": "identified_user@email.com", - "event": "Product Reviewed", - "properties": { - "review_id": "12345", - "product_id": "123", - "rating": 3.0, - "review_body": "Average product, expected much more." - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "channel": "email", - "delay": 0, - "eventNamesSettings": [{ "event": "" }] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "alias", - "previousId": "123@abc.com", - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "channel": "email", - "delay": 0, - "eventNamesSettings": [{ "event": "" }] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "externalId": [{ "id": "sms", "type": "delightedChannelType" }], - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "alias", - "userId": "abc@123.com", - "previousId": "123@abc.com", - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "channel": "email", - "delay": 0, - "eventNamesSettings": [{ "event": "" }] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "externalId": [{ "id": "sms", "type": "delightedChannelType" }], - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "identify", - "userId": "abc@123.com", - "traits": { - "firstName": "James", - "lastName": "Doe", - "phone": "+91237416221", - "last_sent_at": "1626698350" - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "channel": "email", - "delay": 0, - "eventNamesSettings": [{ "event": "" }] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "externalId": [{ "id": "sms", "type": "delightedChannelType" }], - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "identify", - "userId": "+911234567890", - "traits": { - "firstName": "James", - "lastName": "Doe", - "last_sent_at": "1626698350" - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - } -] diff --git a/test/__tests__/data/delighted_output.json b/test/__tests__/data/delighted_output.json deleted file mode 100644 index fc95d51bac..0000000000 --- a/test/__tests__/data/delighted_output.json +++ /dev/null @@ -1,121 +0,0 @@ -[ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.delighted.com/v1/people.json", - "headers": { - "Authorization": "Basic ZHVtbXlBcGlLZXk=", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "email": "abc@123.com", - "send": false, - "channel": "email", - "delay": 0, - "name": "James Doe", - "phone_number": "+91237416221", - "last_sent_at": "1626698350" - } - }, - "files": {} - }, - { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "email": "123@abc.com", - "email_update": "abc@123.com" - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Authorization": "Basic ZHVtbXlBcGlLZXk=", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api.delighted.com/v1/people.json" - }, - { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "properties": { - "review_id": "12345", - "product_id": "123", - "rating": 3.0, - "review_body": "Average product, expected much more." - }, - "send": true, - "channel": "email", - "delay": 0, - "email": "identified_user@email.com" - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Authorization": "Basic ZHVtbXlBcGlLZXk=", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api.delighted.com/v1/people.json" - }, - { - "error": "user unidentified_user@email.com doesn't exist" - }, - { - "error": "Event is not configured on your Rudderstack Dashboard" - }, - { - "error": "userId is required." - }, - { - "error": "userId is required." - }, - { - "error": "User Id and Previous Id should be of same type i.e. phone/sms" - }, - { - "error": "Channel is set to sms. Enter correct phone number i.e. E.164" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.delighted.com/v1/people.json", - "headers": { - "Authorization": "Basic ZHVtbXlBcGlLZXk=", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "send": false, - "channel": "sms", - "delay": 0, - "name": "James Doe", - "phone_number": "+911234567890", - "last_sent_at": "1626698350" - } - }, - "files": {} - } -] diff --git a/test/__tests__/data/delighted_router_input.json b/test/__tests__/data/delighted_router_input.json deleted file mode 100644 index 4c39370e9e..0000000000 --- a/test/__tests__/data/delighted_router_input.json +++ /dev/null @@ -1,83 +0,0 @@ -[ - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "channel": "email", - "delay": 0, - "eventNamesSettings": [{ "event": "" }] - } - }, - "metadata": { - "jobId": 1 - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "identify", - "userId": "abc@123.com", - "traits": { - "firstName": "James", - "lastName": "Doe", - "phone": "+92374162212", - "last_sent_at": "1626698350" - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "channel": "email", - "delay": 0, - "eventNamesSettings": [{ "event": "" }] - } - }, - "metadata": { - "jobId": 2 - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "alias", - "previousId": "123@abc.com", - "userId": "abc@123.com", - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - } -] diff --git a/test/__tests__/data/delighted_router_output.json b/test/__tests__/data/delighted_router_output.json deleted file mode 100644 index 40b770a3bd..0000000000 --- a/test/__tests__/data/delighted_router_output.json +++ /dev/null @@ -1,83 +0,0 @@ -[ - { - "batchedRequest": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "email": "abc@123.com", - "send": false, - "channel": "email", - "delay": 0, - "last_sent_at": "1626698350", - "name": "James Doe", - "phone_number": "+92374162212" - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Authorization": "Basic ZHVtbXlBcGlLZXk=", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api.delighted.com/v1/people.json" - }, - "metadata": [ - { - "jobId": 1 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "channel": "email", - "delay": 0, - "eventNamesSettings": [{ "event": "" }] - } - } - }, - { - "batchedRequest": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "email": "123@abc.com", - "email_update": "abc@123.com" - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Authorization": "Basic ZHVtbXlBcGlLZXk=", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api.delighted.com/v1/people.json" - }, - "metadata": [ - { - "jobId": 2 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "channel": "email", - "delay": 0, - "eventNamesSettings": [{ "event": "" }] - } - } - } -] diff --git a/test/__tests__/data/drip_input.json b/test/__tests__/data/drip_input.json deleted file mode 100644 index 17ad0ce376..0000000000 --- a/test/__tests__/data/drip_input.json +++ /dev/null @@ -1,720 +0,0 @@ -[ - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "accountId": "1809802", - "campaignId": "", - "enableUserCreation": true - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "identify", - "traits": { - "email": "test1@gmail.com", - "firstName": "James", - "lastName": "Doe", - "phone": "237416221", - "customFields": { - "filter1": "filterval1" - } - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "accountId": "1809802", - "campaignId": "", - "enableUserCreation": true - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "identify", - "traits": { - "email": "12324adfgs", - "firstName": "James", - "lastName": "Doe", - "phone": "237416221", - "customFields": { - "filter1": "filterval1" - } - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "accountId": "1809802", - "campaignId": "", - "enableUserCreation": true - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "identify", - "traits": { - "email": "test1@gmail.com", - "name": "James Doe", - "phone": "237416221", - "filter1": "filterval1", - "filter2": "filterval2" - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "accountId": "1809802", - "campaignId": "915194776", - "enableUserCreation": true - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "identify", - "traits": { - "email": "test1@gmail.com", - "name": "James Doe", - "phone": "237416221", - "filter1": "filterval1", - "filter2": "filterval2", - "tags": ["tag1", "tag2"], - "startingEmailIndex": 1 - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "accountId": "1809802", - "campaignId": "915194776", - "enableUserCreation": true - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "track", - "event": "testing", - "properties": { - "email": "user1@gmail.com", - "customFields": { - "field1": "val1" - } - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "accountId": "1809802", - "campaignId": "915194776", - "enableUserCreation": true - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "track", - "event": "", - "properties": { - "email": "user1@gmail.com", - "custom_fields": { - "field1": "val1" - } - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "accountId": "1809802", - "campaignId": "915194776", - "enableUserCreation": false - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "track", - "event": "testing", - "properties": { - "email": "identified_user@gmail.com", - "customFields": { - "field1": "val1" - } - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "accountId": "1809802", - "campaignId": "915194776", - "enableUserCreation": false - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "track", - "event": "testing", - "properties": { - "email": "identified_user@gmail.com", - "field1": "val1" - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "accountId": "1809802", - "campaignId": "915194776", - "enableUserCreation": false - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "track", - "event": "testing", - "properties": { - "email": "unidentified_user@gmail.com", - "field1": "val1" - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "accountId": "1809802", - "campaignId": "915194776", - "enableUserCreation": false - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "track", - "event": "checkout started", - "properties": { - "email": "identified_user@gmail.com", - "field1": "val1", - "affiliation": "my_custom_order", - "order_id": "456445746" - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "accountId": "1809802", - "campaignId": "915194776", - "enableUserCreation": false - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "track", - "event": "checkout started", - "properties": { - "email": "identified_user@gmail.com", - "field1": "val1", - "affiliation": "my_custom_order", - "order_id": "456445746", - "products": [ - { - "name": "shirt", - "price": 11.16 - } - ] - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "accountId": "1809802", - "campaignId": "915194776", - "enableUserCreation": false - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "track", - "event": "checkout", - "properties": { - "email": "identified_user@gmail.com", - "field1": "val1", - "customFields": { - "field2": "val2" - } - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "accountId": "1809802", - "campaignId": "", - "enableUserCreation": true - } - }, - "message": { - "type": "identify", - "event": "identify", - "userId": "user@1", - "channel": "mobile", - "context": { - "os": { - "name": "Android", - "version": "13" - }, - "app": { - "name": "rudderstack", - "build": "5425", - "version": "2.4.1" - }, - "device": { - "id": "8b048b94cbec4fcf", - "name": "o1q", - "type": "Android", - "model": "SM-G991U", - "manufacturer": "samsung" - }, - "locale": "en-US", - "traits": { - "id": "ruddertest@gmail.com", - "email": "ruddertest@gmail.com", - "title": "Social Impact Program Manager", - "skills": [ - { - "id": 134, - "name": "Business Development", - "tagGroupId": 2, - "parentTagId": 134, - "huddleVisible": false, - "onboardVisible": false - }, - { - "id": 96, - "name": "Communications", - "tagGroupId": 2, - "parentTagId": 96, - "huddleVisible": true, - "onboardVisible": true - }, - { - "id": 489, - "name": "Construction", - "tagGroupId": 2, - "parentTagId": 489, - "huddleVisible": false, - "onboardVisible": false - }, - { - "id": 671, - "name": "Data Analysis", - "tagGroupId": 2, - "parentTagId": 671, - "huddleVisible": false, - "onboardVisible": false - }, - { - "id": 676, - "name": "Engineering: Mechanical", - "tagGroupId": 2, - "parentTagId": 676, - "huddleVisible": false, - "onboardVisible": false - }, - { - "id": 189, - "name": "Operations", - "tagGroupId": 2, - "parentTagId": 189, - "huddleVisible": true, - "onboardVisible": true - }, - { - "id": 194, - "name": "Product Management", - "tagGroupId": 2, - "parentTagId": 194, - "huddleVisible": true, - "onboardVisible": true - }, - { - "id": 195, - "name": "Program Management", - "tagGroupId": 2, - "parentTagId": 195, - "huddleVisible": false, - "onboardVisible": false - }, - { - "id": 199, - "name": "R&D", - "tagGroupId": 2, - "parentTagId": 199, - "huddleVisible": false, - "onboardVisible": false - }, - { - "id": 102, - "name": "Sales", - "tagGroupId": 2, - "parentTagId": 102, - "huddleVisible": true, - "onboardVisible": true - } - ], - "userId": "ruddertest@gmail.com", - "address": "Chicago, IL, USA", - "industry": "Education", - "lastName": "test", - "lastname": "test", - "verified": false, - "firstName": "rudder", - "firstname": "rudder", - "interests": [ - { - "id": 649, - "name": "Adaptation", - "tagGroupId": 4, - "parentTagId": 745, - "huddleVisible": false, - "onboardVisible": false - }, - { - "id": 663, - "name": "Carbon removal and sequestration", - "tagGroupId": 4, - "parentTagId": 761, - "huddleVisible": false, - "onboardVisible": false - }, - { - "id": 664, - "name": "Clean Energy and Energy Efficiency", - "tagGroupId": 4, - "parentTagId": 259, - "huddleVisible": false, - "onboardVisible": false - }, - { - "id": 654, - "name": "Climate Science and Earth Systems", - "tagGroupId": 4, - "parentTagId": 744, - "huddleVisible": false, - "onboardVisible": false - }, - { - "id": 650, - "name": "Corporate Sustainability", - "tagGroupId": 4, - "parentTagId": 650, - "huddleVisible": false, - "onboardVisible": false - }, - { - "id": 651, - "name": "Finance & Risk", - "tagGroupId": 4, - "parentTagId": 651, - "huddleVisible": false, - "onboardVisible": false - }, - { - "id": 652, - "name": "Food and Agriculture", - "tagGroupId": 4, - "parentTagId": 652, - "huddleVisible": false, - "onboardVisible": false - }, - { - "id": 665, - "name": "Transport", - "tagGroupId": 4, - "parentTagId": 665, - "huddleVisible": false, - "onboardVisible": false - } - ], - "isDeleted": false, - "anonymousId": "8b048b94cbec4fcf", - "jobFunction": "Program manager", - "reminderType": 1, - "jobPreferences": { - "motivationStr": "I am looking for a job in climate change.,I want to learn about climate change.,I’d like to connect with other climate enthusiasts.", - "searchUrgency": "As soon as possible", - "maxCompensation": 0, - "minCompensation": 0 - }, - "visibilityType": "public", - "Linkedin-Signin": true, - "hubbleOnboarded": false, - "sharePreference": false, - "notificationType": 0, - "shortDescription": "Social Impact Program Manager", - "jobProfileComplete": false, - "noOfMonthExperience": 0, - "onboarding_completed": "Yes" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.8.1" - }, - "timezone": "America/Chicago", - "sessionId": 1681096824, - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 13; SM-G991U Build/TP1A.220624.014)" - }, - "rudderId": "f701966c-5568-4500-92ba-4e9023c8fe31", - "messageId": "77b53247-177f-4ca3-a6b4-aa7558fec280", - "request_ip": "75.209.176.135", - "anonymousId": "8b048b94cbec4fcf", - "integrations": { - "All": true - } - } - } -] diff --git a/test/__tests__/data/drip_output.json b/test/__tests__/data/drip_output.json deleted file mode 100644 index dbf9cf6a75..0000000000 --- a/test/__tests__/data/drip_output.json +++ /dev/null @@ -1,319 +0,0 @@ -[ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.getdrip.com/v2/1809802/subscribers", - "headers": { - "Authorization": "Basic ZHVtbXlBcGlLZXk=", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "subscribers": [ - { - "email": "test1@gmail.com", - "first_name": "James", - "last_name": "Doe", - "phone": "237416221", - "ip_address": "0.0.0.0", - "custom_fields": { - "filter1": "filterval1" - } - } - ] - } - }, - "files": {} - }, - { - "error": "dripId or email is required for the call" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.getdrip.com/v2/1809802/subscribers", - "headers": { - "Authorization": "Basic ZHVtbXlBcGlLZXk=", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "subscribers": [ - { - "email": "test1@gmail.com", - "first_name": "James", - "last_name": "Doe", - "phone": "237416221", - "ip_address": "0.0.0.0", - "custom_fields": { - "filter1": "filterval1", - "filter2": "filterval2" - } - } - ] - } - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.getdrip.com/v2/1809802/campaigns/915194776/subscribers", - "headers": { - "Authorization": "Basic ZHVtbXlBcGlLZXk=", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "subscribers": [ - { - "email": "test1@gmail.com", - "starting_email_index": 1 - } - ] - } - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.getdrip.com/v2/1809802/events", - "headers": { - "Authorization": "Basic ZHVtbXlBcGlLZXk=", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "email": "user1@gmail.com", - "properties": { - "field1": "val1" - }, - "action": "testing", - "occurred_at": "2019-10-14T09:03:17.562Z" - } - ] - } - }, - "files": {} - }, - { - "error": "Event name is required" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.getdrip.com/v2/1809802/events", - "headers": { - "Authorization": "Basic ZHVtbXlBcGlLZXk=", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "email": "identified_user@gmail.com", - "properties": { - "field1": "val1" - }, - "action": "testing", - "occurred_at": "2019-10-14T09:03:17.562Z" - } - ] - } - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.getdrip.com/v2/1809802/events", - "headers": { - "Authorization": "Basic ZHVtbXlBcGlLZXk=", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "email": "identified_user@gmail.com", - "properties": { - "field1": "val1" - }, - "action": "testing", - "occurred_at": "2019-10-14T09:03:17.562Z" - } - ] - } - }, - "files": {} - }, - { - "error": "Error occurred while checking user : " - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.getdrip.com/v3/1809802/shopper_activity/order", - "headers": { - "Authorization": "Basic ZHVtbXlBcGlLZXk=", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "action": "placed", - "email": "identified_user@gmail.com", - "occurred_at": "2019-10-14T09:03:17.562Z", - "order_id": "456445746", - "provider": "my_custom_order" - } - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.getdrip.com/v3/1809802/shopper_activity/order", - "headers": { - "Authorization": "Basic ZHVtbXlBcGlLZXk=", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "action": "placed", - "email": "identified_user@gmail.com", - "occurred_at": "2019-10-14T09:03:17.562Z", - "order_id": "456445746", - "provider": "my_custom_order", - "items": [ - { - "name": "shirt", - "price": 11.16 - } - ] - } - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.getdrip.com/v2/1809802/events", - "headers": { - "Authorization": "Basic ZHVtbXlBcGlLZXk=", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "action": "checkout", - "email": "identified_user@gmail.com", - "occurred_at": "2019-10-14T09:03:17.562Z", - "properties": { - "field2": "val2" - } - } - ] - } - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.getdrip.com/v2/1809802/subscribers", - "headers": { - "Authorization": "Basic ZHVtbXlBcGlLZXk=", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "subscribers": [ - { - "email": "ruddertest@gmail.com", - "user_id": "user@1", - "address1": "Chicago, IL, USA", - "last_name": "test", - "first_name": "rudder", - "custom_fields": { - "title": "Social Impact Program Manager", - "industry": "Education", - "verified": false, - "isDeleted": false, - "jobFunction": "Program manager", - "reminderType": 1, - "jobPreferences": { - "motivationStr": "I am looking for a job in climate change.,I want to learn about climate change.,I’d like to connect with other climate enthusiasts.", - "searchUrgency": "As soon as possible", - "maxCompensation": 0, - "minCompensation": 0 - }, - "visibilityType": "public", - "hubbleOnboarded": false, - "sharePreference": false, - "notificationType": 0, - "shortDescription": "Social Impact Program Manager", - "jobProfileComplete": false, - "noOfMonthExperience": 0, - "onboarding_completed": "Yes" - } - } - ] - } - }, - "files": {} - } -] diff --git a/test/__tests__/data/drip_router_input.json b/test/__tests__/data/drip_router_input.json deleted file mode 100644 index 1cabfe9498..0000000000 --- a/test/__tests__/data/drip_router_input.json +++ /dev/null @@ -1,90 +0,0 @@ -[ - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "accountId": "1809802", - "campaignId": "", - "enableUserCreation": true - } - }, - "metadata": { - "jobId": 1 - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "identify", - "traits": { - "email": "test1@gmail.com", - "firstName": "James", - "lastName": "Doe", - "phone": "237416221", - "customFields": { - "filter1": "filterval1" - } - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "accountId": "1809802", - "campaignId": "915194776", - "enableUserCreation": true - } - }, - "metadata": { - "jobId": 2 - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "track", - "event": "testing", - "properties": { - "email": "user1@gmail.com", - "customFields": { - "field1": "val1" - } - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - } -] diff --git a/test/__tests__/data/drip_router_output.json b/test/__tests__/data/drip_router_output.json deleted file mode 100644 index d1efdf48f7..0000000000 --- a/test/__tests__/data/drip_router_output.json +++ /dev/null @@ -1,96 +0,0 @@ -[ - { - "batchedRequest": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "subscribers": [ - { - "email": "test1@gmail.com", - "first_name": "James", - "last_name": "Doe", - "phone": "237416221", - "ip_address": "0.0.0.0", - "custom_fields": { - "filter1": "filterval1" - } - } - ] - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Authorization": "Basic ZHVtbXlBcGlLZXk=", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api.getdrip.com/v2/1809802/subscribers" - }, - "metadata": [ - { - "jobId": 1 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "accountId": "1809802", - "campaignId": "", - "enableUserCreation": true - } - } - }, - { - "batchedRequest": { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "email": "user1@gmail.com", - "properties": { - "field1": "val1" - }, - "action": "testing", - "occurred_at": "2019-10-14T09:03:17.562Z" - } - ] - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Authorization": "Basic ZHVtbXlBcGlLZXk=", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api.getdrip.com/v2/1809802/events" - }, - "metadata": [ - { - "jobId": 2 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "accountId": "1809802", - "campaignId": "915194776", - "enableUserCreation": true - } - } - } -] diff --git a/test/__tests__/data/facebook_conversions.json b/test/__tests__/data/facebook_conversions.json deleted file mode 100644 index cc4d9a1421..0000000000 --- a/test/__tests__/data/facebook_conversions.json +++ /dev/null @@ -1,1157 +0,0 @@ -[ - { - "description": "Timestamp validation. Events must be sent within seven days of their occurrence or up to one minute in the future", - "input": { - "message": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "channel": "web", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "screen": { - "height": "100", - "density": 50 - }, - "traits": { - "email": " aBc@gmail.com ", - "address": { - "zip": 1234 - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "randomevent", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "revenue": 400, - "additional_bet_index": 0 - }, - "timestamp": "2023-09-01T15:46:51.693229+05:30", - "type": "track" - }, - "destination": { - "Config": { - "limitedDataUsage": true, - "blacklistPiiProperties": [ - { - "blacklistPiiProperties": "", - "blacklistPiiHash": false - } - ], - "accessToken": "09876", - "datasetId": "dummyID", - "eventsToEvents": [ - { - "from": "", - "to": "" - } - ], - "eventCustomProperties": [ - { - "eventCustomProperties": "" - } - ], - "removeExternalId": true, - "whitelistPiiProperties": [ - { - "whitelistPiiProperties": "" - } - ] - }, - "Enabled": true - } - }, - "output": { - "error": "Events must be sent within seven days of their occurrence or up to one minute in the future." - } - }, - { - "description": "Track event without event property set", - "input": { - "message": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "channel": "web", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "screen": { - "height": "100", - "density": 50 - }, - "traits": { - "email": " aBc@gmail.com ", - "address": { - "zip": 1234 - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "revenue": 400, - "additional_bet_index": 0 - }, - "timestamp": "2023-11-12T15:46:51.693229+05:30", - "type": "track" - }, - "destination": { - "Config": { - "limitedDataUsage": true, - "blacklistPiiProperties": [ - { - "blacklistPiiProperties": "", - "blacklistPiiHash": false - } - ], - "accessToken": "09876", - "datasetId": "dummyID", - "eventsToEvents": [ - { - "from": "", - "to": "" - } - ], - "eventCustomProperties": [ - { - "eventCustomProperties": "" - } - ], - "removeExternalId": true, - "whitelistPiiProperties": [ - { - "whitelistPiiProperties": "" - } - ], - "actionSource": "website" - }, - "Enabled": true - } - }, - "output": { - "error": "'event' is required and should be a string" - } - }, - { - "description": "Simple track event", - "input": { - "message": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "channel": "web", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "screen": { - "height": "100", - "density": 50 - }, - "traits": { - "email": " aBc@gmail.com ", - "address": { - "zip": 1234 - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "spin_result", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "revenue": 400, - "additional_bet_index": 0 - }, - "timestamp": "2023-11-12T15:46:51.693229+05:30", - "type": "track" - }, - "destination": { - "Config": { - "limitedDataUsage": true, - "blacklistPiiProperties": [ - { - "blacklistPiiProperties": "", - "blacklistPiiHash": false - } - ], - "accessToken": "09876", - "datasetId": "dummyID", - "eventsToEvents": [ - { - "from": "", - "to": "" - } - ], - "eventCustomProperties": [ - { - "eventCustomProperties": "" - } - ], - "removeExternalId": true, - "whitelistPiiProperties": [ - { - "whitelistPiiProperties": "" - } - ], - "actionSource": "website" - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://graph.facebook.com/v18.0/dummyID/events?access_token=09876", - "headers": {}, - "params": {}, - "body": { - "JSON": {}, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "data": [ - "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"spin_result\",\"event_time\":1699784211,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"value\":400,\"currency\":\"USD\"}}" - ] - } - }, - "files": {} - } - }, - { - "description": "Track event with standard event products searched", - "input": { - "message": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "channel": "web", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "screen": { - "height": "100", - "density": 50 - }, - "traits": { - "email": " aBc@gmail.com ", - "address": { - "zip": 1234 - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "products searched", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "revenue": 400, - "additional_bet_index": 0 - }, - "timestamp": "2023-11-12T15:46:51.693229+05:30", - "type": "track" - }, - "destination": { - "Config": { - "limitedDataUsage": true, - "blacklistPiiProperties": [ - { - "blacklistPiiProperties": "", - "blacklistPiiHash": false - } - ], - "accessToken": "09876", - "datasetId": "dummyID", - "eventsToEvents": [ - { - "from": "", - "to": "" - } - ], - "eventCustomProperties": [ - { - "eventCustomProperties": "" - } - ], - "removeExternalId": true, - "whitelistPiiProperties": [ - { - "whitelistPiiProperties": "" - } - ], - "actionSource": "website" - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://graph.facebook.com/v18.0/dummyID/events?access_token=09876", - "headers": {}, - "params": {}, - "body": { - "JSON": {}, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "data": [ - "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"Search\",\"event_time\":1699784211,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"content_ids\":[],\"contents\":[],\"content_type\":\"product\",\"currency\":\"USD\",\"value\":400}}" - ] - } - }, - "files": {} - } - }, - { - "description": "Track event with standard event product added", - "input": { - "message": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "channel": "web", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "screen": { - "height": "100", - "density": 50 - }, - "traits": { - "email": " aBc@gmail.com ", - "address": { - "zip": 1234 - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "product added", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "revenue": 400, - "additional_bet_index": 0 - }, - "timestamp": "2023-11-12T15:46:51.693229+05:30", - "type": "track" - }, - "destination": { - "Config": { - "limitedDataUsage": true, - "blacklistPiiProperties": [ - { - "blacklistPiiProperties": "", - "blacklistPiiHash": false - } - ], - "accessToken": "09876", - "datasetId": "dummyID", - "eventsToEvents": [ - { - "from": "", - "to": "" - } - ], - "eventCustomProperties": [ - { - "eventCustomProperties": "" - } - ], - "removeExternalId": true, - "whitelistPiiProperties": [ - { - "whitelistPiiProperties": "" - } - ], - "actionSource": "website" - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://graph.facebook.com/v18.0/dummyID/events?access_token=09876", - "headers": {}, - "params": {}, - "body": { - "JSON": {}, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "data": [ - "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"AddToCart\",\"event_time\":1699784211,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"content_ids\":[],\"contents\":[],\"content_type\":\"product\",\"currency\":\"USD\",\"value\":400}}" - ] - } - }, - "files": {} - } - }, - { - "description": "Track event with standard event product viewed", - "input": { - "message": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "channel": "web", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "screen": { - "height": "100", - "density": 50 - }, - "traits": { - "email": " aBc@gmail.com ", - "address": { - "zip": 1234 - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "product viewed", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "revenue": 400, - "additional_bet_index": 0 - }, - "timestamp": "2023-11-12T15:46:51.693229+05:30", - "type": "track" - }, - "destination": { - "Config": { - "limitedDataUsage": true, - "blacklistPiiProperties": [ - { - "blacklistPiiProperties": "", - "blacklistPiiHash": false - } - ], - "accessToken": "09876", - "datasetId": "dummyID", - "eventsToEvents": [ - { - "from": "", - "to": "" - } - ], - "eventCustomProperties": [ - { - "eventCustomProperties": "" - } - ], - "removeExternalId": true, - "whitelistPiiProperties": [ - { - "whitelistPiiProperties": "" - } - ], - "actionSource": "website" - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://graph.facebook.com/v18.0/dummyID/events?access_token=09876", - "headers": {}, - "params": {}, - "body": { - "JSON": {}, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "data": [ - "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"ViewContent\",\"event_time\":1699784211,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"content_ids\":[],\"contents\":[],\"content_type\":\"product\",\"currency\":\"USD\",\"value\":400}}" - ] - } - }, - "files": {} - } - }, - { - "description": "Track event with standard event product list viewed", - "input": { - "message": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "channel": "web", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "screen": { - "height": "100", - "density": 50 - }, - "traits": { - "email": " aBc@gmail.com ", - "address": { - "zip": 1234 - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "product list viewed", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "revenue": 400, - "additional_bet_index": 0, - "products": [ - { - "product_id": 1234, - "quantity": 5, - "price": 55 - } - ] - }, - "timestamp": "2023-11-12T15:46:51.693229+05:30", - "type": "track" - }, - "destination": { - "Config": { - "limitedDataUsage": true, - "blacklistPiiProperties": [ - { - "blacklistPiiProperties": "", - "blacklistPiiHash": false - } - ], - "accessToken": "09876", - "datasetId": "dummyID", - "eventsToEvents": [ - { - "from": "", - "to": "" - } - ], - "eventCustomProperties": [ - { - "eventCustomProperties": "" - } - ], - "removeExternalId": true, - "whitelistPiiProperties": [ - { - "whitelistPiiProperties": "" - } - ], - "actionSource": "website" - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://graph.facebook.com/v18.0/dummyID/events?access_token=09876", - "headers": {}, - "params": {}, - "body": { - "JSON": {}, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "data": [ - "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"ViewContent\",\"event_time\":1699784211,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"products\":[{\"product_id\":1234,\"quantity\":5,\"price\":55}],\"content_ids\":[1234],\"contents\":[{\"id\":1234,\"quantity\":5,\"item_price\":55}],\"content_type\":\"product\",\"currency\":\"USD\",\"value\":400}}" - ] - } - }, - "files": {} - } - }, - { - "description": "Track event with standard event product list viewed without products array", - "input": { - "message": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "channel": "web", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "screen": { - "height": "100", - "density": 50 - }, - "traits": { - "email": " aBc@gmail.com ", - "address": { - "zip": 1234 - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "product list viewed", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "revenue": 400, - "additional_bet_index": 0, - "category": "randomCategory" - }, - "timestamp": "2023-11-12T15:46:51.693229+05:30", - "type": "track" - }, - "destination": { - "Config": { - "limitedDataUsage": true, - "blacklistPiiProperties": [ - { - "blacklistPiiProperties": "", - "blacklistPiiHash": false - } - ], - "accessToken": "09876", - "datasetId": "dummyID", - "eventsToEvents": [ - { - "from": "", - "to": "" - } - ], - "eventCustomProperties": [ - { - "eventCustomProperties": "" - } - ], - "removeExternalId": true, - "whitelistPiiProperties": [ - { - "whitelistPiiProperties": "" - } - ], - "actionSource": "website" - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://graph.facebook.com/v18.0/dummyID/events?access_token=09876", - "headers": {}, - "params": {}, - "body": { - "JSON": {}, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "data": [ - "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"ViewContent\",\"event_time\":1699784211,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"category\":\"randomCategory\",\"content_ids\":[\"randomCategory\"],\"contents\":[{\"id\":\"randomCategory\",\"quantity\":1}],\"content_type\":\"product_group\",\"content_category\":\"randomCategory\",\"currency\":\"USD\",\"value\":400}}" - ] - } - }, - "files": {} - } - }, - { - "description": "Track event with standard event product added to wishlist", - "input": { - "message": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "channel": "web", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "screen": { - "height": "100", - "density": 50 - }, - "traits": { - "email": " aBc@gmail.com ", - "address": { - "zip": 1234 - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "product added to wishlist", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "revenue": 400, - "additional_bet_index": 0 - }, - "timestamp": "2023-11-12T15:46:51.693229+05:30", - "type": "track" - }, - "destination": { - "Config": { - "limitedDataUsage": true, - "blacklistPiiProperties": [ - { - "blacklistPiiProperties": "", - "blacklistPiiHash": false - } - ], - "accessToken": "09876", - "datasetId": "dummyID", - "eventsToEvents": [ - { - "from": "", - "to": "" - } - ], - "eventCustomProperties": [ - { - "eventCustomProperties": "" - } - ], - "removeExternalId": true, - "whitelistPiiProperties": [ - { - "whitelistPiiProperties": "" - } - ], - "actionSource": "website" - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://graph.facebook.com/v18.0/dummyID/events?access_token=09876", - "headers": {}, - "params": {}, - "body": { - "JSON": {}, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "data": [ - "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"AddToWishlist\",\"event_time\":1699784211,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"content_ids\":[],\"contents\":[],\"currency\":\"USD\",\"value\":400}}" - ] - } - }, - "files": {} - } - }, - { - "description": "Track event with standard event payment info entered", - "input": { - "message": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "channel": "web", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "screen": { - "height": "100", - "density": 50 - }, - "traits": { - "email": " aBc@gmail.com ", - "address": { - "zip": 1234 - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "payment info entered", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "revenue": 400, - "additional_bet_index": 0 - }, - "timestamp": "2023-11-12T15:46:51.693229+05:30", - "type": "track" - }, - "destination": { - "Config": { - "limitedDataUsage": true, - "blacklistPiiProperties": [ - { - "blacklistPiiProperties": "", - "blacklistPiiHash": false - } - ], - "accessToken": "09876", - "datasetId": "dummyID", - "eventsToEvents": [ - { - "from": "", - "to": "" - } - ], - "eventCustomProperties": [ - { - "eventCustomProperties": "" - } - ], - "removeExternalId": true, - "whitelistPiiProperties": [ - { - "whitelistPiiProperties": "" - } - ], - "actionSource": "website" - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://graph.facebook.com/v18.0/dummyID/events?access_token=09876", - "headers": {}, - "params": {}, - "body": { - "JSON": {}, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "data": [ - "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"AddPaymentInfo\",\"event_time\":1699784211,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"content_ids\":[],\"contents\":[],\"currency\":\"USD\",\"value\":400}}" - ] - } - }, - "files": {} - } - }, - { - "description": "Track event with standard event order completed with delivery_category in products array", - "input": { - "message": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "channel": "web", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "screen": { - "height": "100", - "density": 50 - }, - "traits": { - "email": " aBc@gmail.com ", - "address": { - "zip": 1234 - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "order completed", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "revenue": 400, - "additional_bet_index": 0, - "products": [ - { - "product_id": 1234, - "quantity": 5, - "price": 55, - "delivery_category": "home_delivery" - } - ] - }, - "timestamp": "2023-11-12T15:46:51.693229+05:30", - "type": "track" - }, - "destination": { - "Config": { - "limitedDataUsage": true, - "blacklistPiiProperties": [ - { - "blacklistPiiProperties": "", - "blacklistPiiHash": false - } - ], - "accessToken": "09876", - "datasetId": "dummyID", - "eventsToEvents": [ - { - "from": "", - "to": "" - } - ], - "eventCustomProperties": [ - { - "eventCustomProperties": "" - } - ], - "removeExternalId": true, - "whitelistPiiProperties": [ - { - "whitelistPiiProperties": "" - } - ], - "actionSource": "website" - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://graph.facebook.com/v18.0/dummyID/events?access_token=09876", - "headers": {}, - "params": {}, - "body": { - "JSON": {}, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "data": [ - "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"Purchase\",\"event_time\":1699784211,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"products\":[{\"product_id\":1234,\"quantity\":5,\"price\":55,\"delivery_category\":\"home_delivery\"}],\"content_ids\":[1234],\"contents\":[{\"id\":1234,\"quantity\":5,\"item_price\":55,\"delivery_category\":\"home_delivery\"}],\"content_type\":\"product\",\"currency\":\"USD\",\"value\":400,\"num_items\":1}}" - ] - } - }, - "files": {} - } - }, - { - "description": "Track event with standard event order completed with delivery_category in properties", - "input": { - "message": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "channel": "web", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "screen": { - "height": "100", - "density": 50 - }, - "traits": { - "email": " aBc@gmail.com ", - "address": { - "zip": 1234 - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "order completed", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "revenue": 400, - "additional_bet_index": 0, - "delivery_category": "home_delivery", - "products": [ - { - "product_id": 1234, - "quantity": 5, - "price": 55 - } - ] - }, - "timestamp": "2023-11-12T15:46:51.693229+05:30", - "type": "track" - }, - "destination": { - "Config": { - "limitedDataUsage": true, - "blacklistPiiProperties": [ - { - "blacklistPiiProperties": "", - "blacklistPiiHash": false - } - ], - "accessToken": "09876", - "datasetId": "dummyID", - "eventsToEvents": [ - { - "from": "", - "to": "" - } - ], - "eventCustomProperties": [ - { - "eventCustomProperties": "" - } - ], - "removeExternalId": true, - "whitelistPiiProperties": [ - { - "whitelistPiiProperties": "" - } - ], - "actionSource": "website" - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://graph.facebook.com/v18.0/dummyID/events?access_token=09876", - "headers": {}, - "params": {}, - "body": { - "JSON": {}, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "data": [ - "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"Purchase\",\"event_time\":1699784211,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"delivery_category\":\"home_delivery\",\"products\":[{\"product_id\":1234,\"quantity\":5,\"price\":55}],\"content_ids\":[1234],\"contents\":[{\"id\":1234,\"quantity\":5,\"item_price\":55,\"delivery_category\":\"home_delivery\"}],\"content_type\":\"product\",\"currency\":\"USD\",\"value\":400,\"num_items\":1}}" - ] - } - }, - "files": {} - } - } -] diff --git a/test/__tests__/data/facebook_conversions_router_input.json b/test/__tests__/data/facebook_conversions_router_input.json deleted file mode 100644 index b8865d124e..0000000000 --- a/test/__tests__/data/facebook_conversions_router_input.json +++ /dev/null @@ -1,158 +0,0 @@ -[ - { - "metadata": { - "jobId": 1 - }, - "message": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "channel": "web", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "screen": { - "height": "100", - "density": 50 - }, - "traits": { - "email": " aBc@gmail.com ", - "address": { - "zip": 1234 - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "spin_result", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "revenue": 400, - "additional_bet_index": 0 - }, - "timestamp": "2023-11-12T15:46:51.693229+05:30", - "type": "track" - }, - "destination": { - "Config": { - "limitedDataUsage": true, - "blacklistPiiProperties": [ - { - "blacklistPiiProperties": "", - "blacklistPiiHash": false - } - ], - "accessToken": "09876", - "datasetId": "dummyID", - "eventsToEvents": [ - { - "from": "", - "to": "" - } - ], - "eventCustomProperties": [ - { - "eventCustomProperties": "" - } - ], - "removeExternalId": true, - "whitelistPiiProperties": [ - { - "whitelistPiiProperties": "" - } - ], - "actionSource": "website" - }, - "Enabled": true - } - }, - { - "metadata": { - "jobId": 2 - }, - "message": { - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1", - "channel": "web", - "context": { - "device": { - "id": "df16bffa-5c3d-4fbb-9bce-3bab098129a7R", - "manufacturer": "Xiaomi", - "model": "Redmi 6", - "name": "xiaomi" - }, - "network": { - "carrier": "Banglalink" - }, - "os": { - "name": "android", - "version": "8.1.0" - }, - "screen": { - "height": "100", - "density": 50 - }, - "traits": { - "email": " aBc@gmail.com ", - "address": { - "zip": 1234 - }, - "anonymousId": "c82cbdff-e5be-4009-ac78-cdeea09ab4b1" - } - }, - "event": "products searched", - "integrations": { - "All": true - }, - "message_id": "a80f82be-9bdc-4a9f-b2a5-15621ee41df8", - "properties": { - "revenue": 400, - "additional_bet_index": 0 - }, - "timestamp": "2023-11-12T15:46:51.693229+05:30", - "type": "track" - }, - "destination": { - "Config": { - "limitedDataUsage": true, - "blacklistPiiProperties": [ - { - "blacklistPiiProperties": "", - "blacklistPiiHash": false - } - ], - "accessToken": "09876", - "datasetId": "dummyID", - "eventsToEvents": [ - { - "from": "", - "to": "" - } - ], - "eventCustomProperties": [ - { - "eventCustomProperties": "" - } - ], - "removeExternalId": true, - "whitelistPiiProperties": [ - { - "whitelistPiiProperties": "" - } - ], - "actionSource": "website" - }, - "Enabled": true - } - } -] diff --git a/test/__tests__/data/facebook_conversions_router_output.json b/test/__tests__/data/facebook_conversions_router_output.json deleted file mode 100644 index 542c173090..0000000000 --- a/test/__tests__/data/facebook_conversions_router_output.json +++ /dev/null @@ -1,122 +0,0 @@ -[ - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://graph.facebook.com/v18.0/dummyID/events?access_token=09876", - "headers": {}, - "params": {}, - "body": { - "JSON": {}, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "data": [ - "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"spin_result\",\"event_time\":1699784211,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"value\":400,\"currency\":\"USD\"}}" - ] - } - }, - "files": {} - }, - "metadata": [ - { - "jobId": 1 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "limitedDataUsage": true, - "blacklistPiiProperties": [ - { - "blacklistPiiProperties": "", - "blacklistPiiHash": false - } - ], - "accessToken": "09876", - "datasetId": "dummyID", - "eventsToEvents": [ - { - "from": "", - "to": "" - } - ], - "eventCustomProperties": [ - { - "eventCustomProperties": "" - } - ], - "removeExternalId": true, - "whitelistPiiProperties": [ - { - "whitelistPiiProperties": "" - } - ], - "actionSource": "website" - }, - "Enabled": true - } - }, - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://graph.facebook.com/v18.0/dummyID/events?access_token=09876", - "headers": {}, - "params": {}, - "body": { - "JSON": {}, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": { - "data": [ - "{\"user_data\":{\"em\":\"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08\",\"zp\":\"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4\"},\"event_name\":\"Search\",\"event_time\":1699784211,\"action_source\":\"website\",\"custom_data\":{\"revenue\":400,\"additional_bet_index\":0,\"content_ids\":[],\"contents\":[],\"content_type\":\"product\",\"currency\":\"USD\",\"value\":400}}" - ] - } - }, - "files": {} - }, - "metadata": [ - { - "jobId": 2 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "limitedDataUsage": true, - "blacklistPiiProperties": [ - { - "blacklistPiiProperties": "", - "blacklistPiiHash": false - } - ], - "accessToken": "09876", - "datasetId": "dummyID", - "eventsToEvents": [ - { - "from": "", - "to": "" - } - ], - "eventCustomProperties": [ - { - "eventCustomProperties": "" - } - ], - "removeExternalId": true, - "whitelistPiiProperties": [ - { - "whitelistPiiProperties": "" - } - ], - "actionSource": "website" - }, - "Enabled": true - } - } -] diff --git a/test/__tests__/data/freshmarketer.json b/test/__tests__/data/freshmarketer.json deleted file mode 100644 index 390c0fb44e..0000000000 --- a/test/__tests__/data/freshmarketer.json +++ /dev/null @@ -1,2507 +0,0 @@ -[ - { - "description": "Identify call for creating new user", - "input": { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "rudderstack-476952domain3105.myfreshworks.com" - } - }, - "message": { - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-06-22T10:57:58Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99099", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - } - }, - "traits": { - "email": "testuser@google.com", - "first_name": "Rk", - "last_name": "Mishra", - "mobileNumber": "1-926-555-9504", - "lifecycleStageId": 71010794467, - "phone": "9988776655", - "owner_id": "70000090119" - }, - "type": "identify", - "sentAt": "2022-04-22T10:57:58Z" - } - }, - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "contact": { - "emails": "testuser@google.com", - "last_name": "Mishra", - "created_at": "2022-06-22T10:57:58Z", - "first_name": "Rk", - "updated_at": "2022-06-22T10:57:58Z", - "external_id": "ea5cfab2-3961-4d8a-8187-3d1858c99099", - "work_number": "9988776655", - "mobile_number": "1-926-555-9504", - "lifecycle_stage_id": 71010794467 - }, - "unique_identifier": { - "emails": "testuser@google.com" - } - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Content-Type": "application/json", - "Authorization": "Token token=dummyApiKey" - }, - "version": "1", - "endpoint": "https://rudderstack-476952domain3105.myfreshworks.com/crm/sales/api/contacts/upsert" - } - }, - { - "description": "Identify call with numbers in lifecycleStageId, ownerId", - "input": { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "rudderstack-476952domain3105.myfreshworks.com" - } - }, - "message": { - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-06-22T10:57:58Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99099", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - } - }, - "traits": { - "email": "testuser@google.com", - "first_name": "Rk", - "last_name": "Mishra", - "mobileNumber": "1-926-555-9504", - "lifecycleStageId": 71010794467, - "phone": "9988776655", - "owner_id": "70000090119" - }, - "type": "identify", - "sentAt": "2022-04-22T10:57:58Z" - } - }, - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "contact": { - "emails": "testuser@google.com", - "last_name": "Mishra", - "created_at": "2022-06-22T10:57:58Z", - "first_name": "Rk", - "updated_at": "2022-06-22T10:57:58Z", - "external_id": "ea5cfab2-3961-4d8a-8187-3d1858c99099", - "work_number": "9988776655", - "mobile_number": "1-926-555-9504", - "lifecycle_stage_id": 71010794467 - }, - "unique_identifier": { - "emails": "testuser@google.com" - } - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Content-Type": "application/json", - "Authorization": "Token token=dummyApiKey" - }, - "version": "1", - "endpoint": "https://rudderstack-476952domain3105.myfreshworks.com/crm/sales/api/contacts/upsert" - } - }, - { - "description": "Identify call with wrong data type in lifecycleStageId, ownerId", - "input": { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "rudderstack-476952domain3105.myfreshworks.com" - } - }, - "message": { - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-06-22T10:57:58Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99099", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - } - }, - "traits": { - "email": "testuser@google.com", - "first_name": "Rk", - "last_name": "Mishra", - "mobileNumber": "1-926-555-9504", - "lifecycleStageId": "rudderSample", - "phone": "9988776655", - "ownerId": "rudderSample" - }, - "type": "identify", - "sentAt": "2022-04-22T10:57:58Z" - } - }, - "output": { - "statusCode": 400, - "error": "owner_id,lifecycle_stage_id: invalid number format", - "statTags": { - "destination": "freshmarketer", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "Identify call, email is not provided.", - "input": { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "rudderstack-476952domain3105.myfreshworks.com" - } - }, - "message": { - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-06-22T10:57:58Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99099", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - } - }, - "traits": { - "first_name": "Rk", - "last_name": "Mishra", - "mobileNumber": "1-926-555-9504", - "lifecycleStageId": "rudderSample", - "phone": "9988776655", - "owner_id": "rudderSample" - }, - "type": "identify", - "sentAt": "2022-04-22T10:57:58Z" - } - }, - "output": { - "statusCode": 400, - "error": "Missing required value from \"email\"", - "statTags": { - "destination": "freshmarketer", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "Group call: testing with mock api", - "input": { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - }, - "message": { - "messageId": "sadjb-1e2r3fhgb-12bvbbj", - "originalTimestamp": "2022-06-22T10:57:58Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "traits": { - "email": "testuser@google.com" - } - }, - "traits": { - "groupType": "accounts", - "name": "Mark Twain", - "phone": "919191919191", - "numberOfEmployees": 51, - "annualRevenue": 1000, - "address": "Red Colony", - "city": "Colony", - "state": "Haryana" - }, - "type": "group", - "sentAt": "2022-04-22T10:57:58Z" - } - }, - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "contact": { - "sales_accounts": [ - { - "id": 70003771198, - "name": "div-quer", - "avatar": null, - "partial": true, - "website": null, - "is_primary": true, - "last_contacted": null, - "record_type_id": "71010794477" - }, - { - "id": 70003825177, - "name": "BisleriGroup", - "avatar": null, - "partial": true, - "website": null, - "is_primary": false, - "last_contacted": null, - "record_type_id": "71010794477" - }, - { - "id": 70003771396, - "is_primary": false - } - ] - }, - "unique_identifier": { - "emails": "testuser@google.com" - } - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Content-Type": "application/json", - "Authorization": "Token token=dummyApiKey" - }, - "version": "1", - "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/contacts/upsert" - } - }, - { - "description": "Group call: name is required field.", - "input": { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - }, - "message": { - "messageId": "sadjb-1e2r3fhgb-12bvbbj", - "originalTimestamp": "2022-06-22T10:57:58Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "traits": { - "email": "testuser@google.com" - } - }, - "traits": { - "groupType": "accounts", - "phone": "919191919191", - "numberOfEmployees": 51, - "annualRevenue": 1000, - "address": "Red Colony", - "city": "Colony", - "state": "Haryana" - }, - "type": "group", - "sentAt": "2022-04-22T10:57:58Z" - } - }, - "output": { - "error": "Missing required value from \"name\"", - "stage": "dest_transformer", - "record_id": null, - "source_id": "2DnU7R3Ksf0O1IypvleCHNp4X7m", - "status_code": 400, - "destination_id": "2DnUEc7Ka4thYmPsPCdigkwaGkn", - "source_job_run_id": "", - "source_task_run_id": "" - } - }, - { - "description": "missing message type", - "input": { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - }, - "message": { - "messageId": "sadjb-1e2r3fhgb-12bvbbj", - "originalTimestamp": "2022-06-22T10:57:58Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "traits": { - "email": "testuser4google.com" - } - }, - "traits": { - "name": "Mark Twain", - "phone": "919191919191", - "numberOfEmployees": 51, - "annualRevenue": 1000, - "address": "Red Colony", - "city": "Colony", - "state": "Haryana" - }, - "sentAt": "2022-04-22T10:57:58Z" - } - }, - "output": { - "statusCode": 400, - "error": "Message Type is not present. Aborting message.", - "statTags": { - "destination": "freshmarketer", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "Wrong message type", - "input": { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - }, - "message": { - "messageId": "sadjb-1e2r3fhgb-12bvbbj", - "originalTimestamp": "2022-06-22T10:57:58Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "traits": { - "email": "testuser4google.com" - } - }, - "traits": { - "name": "Mark Twain", - "phone": "919191919191", - "numberOfEmployees": 51, - "annualRevenue": 1000, - "address": "Red Colony", - "city": "Colony", - "state": "Haryana" - }, - "type": "page", - "sentAt": "2022-04-22T10:57:58Z" - } - }, - "output": { - "statusCode": 400, - "error": "message type page not supported", - "statTags": { - "errorAt": "proc", - "destType": "FRESHMARKETER", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "Group call: user email is missing", - "input": { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - }, - "message": { - "messageId": "sadjb-1e2r3fhgb-12bvbbj", - "originalTimestamp": "2022-06-22T10:57:58Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "traits": {} - }, - "traits": { - "groupType": "accounts", - "name": "div-quer", - "phone": "919191919191", - "numberOfEmployees": 51, - "annualRevenue": 1000, - "address": "Red Colony", - "city": "Lal colony", - "state": "Haryana" - }, - "type": "group", - "sentAt": "2022-04-22T10:57:58Z" - } - }, - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "sales_account": { - "city": "Lal colony", - "name": "div-quer", - "phone": "919191919191", - "state": "Haryana", - "address": "Red Colony", - "created_at": "2022-06-22T10:57:58Z", - "updated_at": "2022-06-22T10:57:58Z", - "annual_revenue": 1000, - "number_of_employees": 51 - }, - "unique_identifier": { - "name": "div-quer" - } - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Content-Type": "application/json", - "Authorization": "Token token=dummyApiKey" - }, - "version": "1", - "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/sales_accounts/upsert" - } - }, - { - "description": "Identify call: Email is not present", - "input": { - "message": { - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-06-22T10:57:58Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99099", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - } - }, - "traits": { - "first_name": "Rk", - "last_name": "Narayan", - "mobileNumber": "1-926-555-9504", - "phone": "9988776655" - }, - "type": "identify", - "sentAt": "2022-04-22T10:57:58Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "error": "Missing required value from \"email\"", - "stage": "dest_transformer", - "record_id": null, - "source_id": "2DnU7R3Ksf0O1IypvleCHNp4X7m", - "status_code": 400, - "destination_id": "2DnUEc7Ka4thYmPsPCdigkwaGkn", - "source_job_run_id": "", - "source_task_run_id": "" - } - }, - { - "description": "Track call, event is not supported.", - "input": { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "email": "test@rudderstack.com", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "type": "track", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "properties": { - "product_name": "Shirt", - "brand": "Wrogn" - }, - "event": "Add to Cart", - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "statusCode": 400, - "error": "event name Add to Cart is not supported. Aborting!", - "statTags": { - "errorAt": "proc", - "destType": "FRESHMARKETER", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "Track call: some required properties is missing for sales_activity", - "input": { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "email": "test@rudderstack.com", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "type": "track", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "email": "test@rudderstack.com", - "properties": { - "product_name": "Shirt", - "brand": "Wrogn" - }, - "event": "sales_activity", - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "error": "Missing required value from \"properties.title\"", - "stage": "dest_transformer", - "record_id": null, - "source_id": "2EfN23bGjskM5qAM310n619XABT", - "status_code": 400, - "destination_id": "2FvdYen6HyqE0WlxkC6ZboEaDjR", - "source_job_run_id": "", - "source_task_run_id": "" - } - }, - { - "description": "Track call: for salesActivityName", - "input": { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "email": "test@rudderstack.com", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - }, - "externalId": { - "type": "Contact" - } - }, - "type": "track", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "email": "test@rudderstack.com", - "properties": { - "product_name": "Shirt", - "brand": "Wrogn", - "salesActivityName": "own-calender", - "title": "new Contact", - "startDate": "2021-05-04T17:00:00+05:30", - "endDate": "2022-06-04T17:30:00+05:30", - "ownerId": "70054866612" - }, - "event": "sales_activity", - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "sales_activity": { - "title": "new Contact", - "end_date": "2022-06-04T17:30:00+05:30", - "owner_id": "70054866612", - "start_date": "2021-05-04T17:00:00+05:30", - "created_at": "2020-10-20T08:14:28.778Z", - "updated_at": "2020-10-20T08:14:28.778Z", - "targetable_id": 70054866612, - "targetable_type": "Contact", - "sales_activity_name": "own-calender", - "sales_activity_type_id": 70000666879 - } - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Content-Type": "application/json", - "Authorization": "Token token=dummyApiKey" - }, - "version": "1", - "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/sales_activities" - } - }, - { - "description": "Track call: lifecycle_stage_id", - "input": { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "type": "track", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "properties": { - "email": "jamessampleton3@gmail.com", - "lifecycleStageId": "71012139273", - "title": "new Contact", - "startDate": "2021-05-04T17:00:00+05:30", - "endDate": "2022-06-04T17:30:00+05:30", - "ownerId": "70054866612", - "targetableType": "Contact" - }, - "event": "lifecycle_stage", - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/contacts/upsert", - "headers": { - "Authorization": "Token token=dummyApiKey", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "contact": { - "lifecycle_stage_id": "71012139273" - }, - "unique_identifier": { - "emails": "jamessampleton3@gmail.com" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "Track call: In lifecycle stage, email is missing", - "input": { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "type": "track", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "properties": { - "lifecycleStageId": "71012139273", - "title": "new Contact", - "startDate": "2021-05-04T17:00:00+05:30", - "endDate": "2022-06-04T17:30:00+05:30", - "ownerId": "70054866612", - "targetableType": "Contact" - }, - "event": "lifecycle_stage", - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "error": "email is required for updating life Cycle Stages. Aborting!", - "stage": "dest_transformer", - "record_id": null, - "source_id": "2EfN23bGjskM5qAM310n619XABT", - "status_code": 400, - "destination_id": "2FvdYen6HyqE0WlxkC6ZboEaDjR", - "source_job_run_id": "", - "source_task_run_id": "" - } - }, - { - "description": "Track call: Either of lifecycleStageName or lifecycleStageId is required", - "input": { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "email": "test@rudderstack.com", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "type": "track", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "email": "jamessampleton3@gmail.com", - "properties": { - "title": "new Contact", - "startDate": "2021-05-04T17:00:00+05:30", - "endDate": "2022-06-04T17:30:00+05:30", - "ownerId": "70054866612", - "targetableType": "Contact" - }, - "event": "lifecycle_stage", - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "error": "Either of lifecycleStageName or lifecycleStageId is required. Aborting!", - "stage": "dest_transformer", - "record_id": null, - "source_id": "2EfN23bGjskM5qAM310n619XABT", - "status_code": 400, - "destination_id": "2FvdYen6HyqE0WlxkC6ZboEaDjR", - "source_job_run_id": "", - "source_task_run_id": "" - } - }, - { - "description": "Track call: Either of sales activity name or sales activity type id is required", - "input": { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "email": "test@rudderstack.com", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - }, - "externalId": { - "type": "Contact" - } - }, - "type": "track", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "email": "test@rudderstack.com", - "properties": { - "product_name": "Shirt", - "brand": "Wrogn", - "title": "new Contact", - "startDate": "2021-05-04T17:00:00+05:30", - "endDate": "2022-06-04T17:30:00+05:30", - "ownerId": "70054866612" - }, - "event": "sales_activity", - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "error": "Either of sales activity name or sales activity type id is required. Aborting!", - "stage": "dest_transformer", - "record_id": null, - "source_id": "2EfN23bGjskM5qAM310n619XABT", - "status_code": 400, - "destination_id": "2FvdYen6HyqE0WlxkC6ZboEaDjR", - "source_job_run_id": "", - "source_task_run_id": "" - } - }, - { - "description": "Track call: Either of email or targetable_id is required for creating sales activity.", - "input": { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - }, - "externalId": { - "type": "Contact" - } - }, - "type": "track", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "properties": { - "product_name": "Shirt", - "brand": "Wrogn", - "salesActivityName": "own-calender", - "title": "new Contact", - "startDate": "2021-05-04T17:00:00+05:30", - "endDate": "2022-06-04T17:30:00+05:30", - "ownerId": "70054866612" - }, - "event": "sales_activity", - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "error": "Either of email or targetable_id is required for creating sales activity. Aborting!", - "stage": "dest_transformer", - "record_id": null, - "source_id": "2EfN23bGjskM5qAM310n619XABT", - "status_code": 400, - "destination_id": "2FvdYen6HyqE0WlxkC6ZboEaDjR", - "source_job_run_id": "", - "source_task_run_id": "" - } - }, - { - "description": "Track call: sales activity with salesActivityTypeId", - "input": { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "email": "test@rudderstack.com", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - }, - "externalId": { - "type": "Contact" - } - }, - "type": "track", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "email": "jamessampleton3@gmail.com", - "properties": { - "salesActivityTypeId": "70000663932", - "title": "new Contact", - "startDate": "2021-05-04T17:00:00+05:30", - "endDate": "2022-06-04T17:30:00+05:30", - "ownerId": "70054866612" - }, - "event": "sales_activity", - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "sales_activity": { - "title": "new Contact", - "end_date": "2022-06-04T17:30:00+05:30", - "owner_id": "70054866612", - "start_date": "2021-05-04T17:00:00+05:30", - "created_at": "2020-10-20T08:14:28.778Z", - "updated_at": "2020-10-20T08:14:28.778Z", - "targetable_id": 70054866612, - "targetable_type": "Contact", - "sales_activity_type_id": "70000663932" - } - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Content-Type": "application/json", - "Authorization": "Token token=dummyApiKey" - }, - "version": "1", - "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/sales_activities" - } - }, - { - "description": "Track call: updated sales activity with salesActivityTypeId and targetableId", - "input": { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "email": "test@rudderstack.com", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - }, - "externalId": { - "id": "70052305908", - "type": "Contact" - } - }, - "type": "track", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "properties": { - "salesActivityTypeId": "70000663932", - "title": "new Contact", - "startDate": "2021-05-04T17:00:00+05:30", - "endDate": "2022-06-04T17:30:00+05:30", - "ownerId": "70054866612" - }, - "event": "sales_activity", - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "sales_activity": { - "title": "new Contact", - "end_date": "2022-06-04T17:30:00+05:30", - "owner_id": "70054866612", - "start_date": "2021-05-04T17:00:00+05:30", - "created_at": "2020-10-20T08:14:28.778Z", - "updated_at": "2020-10-20T08:14:28.778Z", - "targetable_id": "70052305908", - "targetable_type": "Contact", - "sales_activity_type_id": "70000663932" - } - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Content-Type": "application/json", - "Authorization": "Token token=dummyApiKey" - }, - "version": "1", - "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/sales_activities" - } - }, - { - "description": "Unsupported message Type", - "input": { - "message": { - "channel": "web", - "type": "page", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "email": "jamessampleton3@gmail.com", - "properties": { - "lifecycleStageId": "71012139273", - "title": "new Contact", - "startDate": "2021-05-04T17:00:00+05:30", - "endDate": "2022-06-04T17:30:00+05:30", - "ownerId": "70054866612", - "targetableType": "Contact" - }, - "event": "lifecycle_stage", - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "statusCode": 400, - "error": "message type page not supported", - "statTags": { - "errorAt": "proc", - "destType": "FRESHMARKETER", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "Group call: email is required for adding contacts to marketing lists", - "input": { - "message": { - "messageId": "sadjb-1e2r3fhgb-12bvbbj", - "originalTimestamp": "2022-06-22T10:57:58Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "traits": { - "groupType": "marketing_lists" - }, - "type": "group", - "sentAt": "2022-04-22T10:57:58Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "statusCode": 400, - "error": "email is required for adding in the marketing lists. Aborting!", - "statTags": { - "errorAt": "proc", - "destType": "FRESHMARKETER", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "Group call: group type is not present", - "input": { - "message": { - "messageId": "sadjb-1e2r3fhgb-12bvbbj", - "originalTimestamp": "2022-06-22T10:57:58Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "traits": { - "name": "Mark Twain", - "phone": "919191919191", - "numberOfEmployees": 51, - "annualRevenue": 1000, - "address": "Red Colony", - "city": "Colony", - "state": "Haryana" - }, - "type": "group", - "sentAt": "2022-04-22T10:57:58Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "error": "groupType is required for Group call", - "stage": "dest_transformer", - "record_id": null, - "source_id": "2EfN23bGjskM5qAM310n619XABT", - "status_code": 400, - "destination_id": "2FvdYen6HyqE0WlxkC6ZboEaDjR", - "source_job_run_id": "", - "source_task_run_id": "" - } - }, - { - "description": "Group call: add contacts in existing marketing lists", - "input": { - "message": { - "messageId": "sadjb-1e2r3fhgb-12bvbbj", - "originalTimestamp": "2022-06-22T10:57:58Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "traits": { - "email": "jamessampleton1@gmail.com" - } - }, - "traits": { - "groupType": "marketing_lists", - "listName": "Voda 5G", - "address": "Red Colony", - "city": "Colony", - "state": "Haryana" - }, - "type": "group", - "sentAt": "2022-04-22T10:57:58Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "ids": [70054866612] - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "PUT", - "params": {}, - "headers": { - "Content-Type": "application/json", - "Authorization": "Token token=dummyApiKey" - }, - "version": "1", - "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/lists/70000059716/add_contacts" - } - }, - { - "description": "Group call: groupType is not supported", - "input": { - "message": { - "messageId": "sadjb-1e2r3fhgb-12bvbbj", - "originalTimestamp": "2022-06-22T10:57:58Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "traits": { - "groupType": "marketing", - "listName": "Voda 5G", - "address": "Red Colony", - "city": "Colony", - "state": "Haryana" - }, - "type": "group", - "sentAt": "2022-04-22T10:57:58Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "error": "groupType marketing is not supported. Aborting!", - "stage": "dest_transformer", - "record_id": null, - "source_id": "2EfN23bGjskM5qAM310n619XABT", - "status_code": 400, - "destination_id": "2FvdYen6HyqE0WlxkC6ZboEaDjR", - "source_job_run_id": "", - "source_task_run_id": "" - } - }, - { - "description": "Group call: listId or listName is required", - "input": { - "message": { - "messageId": "sadjb-1e2r3fhgb-12bvbbj", - "originalTimestamp": "2022-06-22T10:57:58Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "traits": { - "email": "jamessampleton1@gmail.com" - } - }, - "traits": { - "groupType": "marketing_lists", - "address": "Red Colony", - "city": "Colony", - "state": "Haryana" - }, - "type": "group", - "sentAt": "2022-04-22T10:57:58Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "error": "listId or listName is required. Aborting!", - "stage": "dest_transformer", - "record_id": null, - "source_id": "2EfN23bGjskM5qAM310n619XABT", - "status_code": 400, - "destination_id": "2FvdYen6HyqE0WlxkC6ZboEaDjR", - "source_job_run_id": "", - "source_task_run_id": "" - } - }, - { - "description": "Group call: add marketing lists with listId", - "input": { - "message": { - "messageId": "sadjb-1e2r3fhgb-12bvbbj", - "originalTimestamp": "2022-06-22T10:57:58Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "traits": { - "email": "jamessampleton1@gmail.com" - } - }, - "traits": { - "listId": "70000058627", - "groupType": "marketing_lists", - "address": "Red Colony", - "city": "Colony", - "state": "Haryana" - }, - "type": "group", - "sentAt": "2022-04-22T10:57:58Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "ids": [70054866612] - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "PUT", - "params": {}, - "headers": { - "Content-Type": "application/json", - "Authorization": "Token token=dummyApiKey" - }, - "version": "1", - "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/lists/70000058627/add_contacts" - } - }, - { - "description": "Track call: with wrong sales activity name", - "input": { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "email": "test@rudderstack.com", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - }, - "externalId": { - "type": "Contact" - } - }, - "type": "track", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "email": "test@rudderstack.com", - "properties": { - "product_name": "Shirt", - "brand": "Wrogn", - "salesActivityName": "own-list", - "title": "new Contact", - "startDate": "2021-05-04T17:00:00+05:30", - "endDate": "2022-06-04T17:30:00+05:30", - "ownerId": "70054866612" - }, - "event": "sales_activity", - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "error": "sales Activity own-list doesn't exists. Aborting!", - "stage": "dest_transformer", - "record_id": null, - "source_id": "2EfN23bGjskM5qAM310n619XABT", - "status_code": 400, - "destination_id": "2FvdYen6HyqE0WlxkC6ZboEaDjR", - "source_job_run_id": "", - "source_task_run_id": "" - } - }, - { - "description": "Track call: update contacts with sales Activity name", - "input": { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "type": "track", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "properties": { - "email": "jamessampleton6@gmail.com", - "lifecycleStageName": "final Customer", - "title": "new Contact", - "startDate": "2021-05-04T17:00:00+05:30", - "endDate": "2022-06-04T17:30:00+05:30", - "ownerId": "70054866612", - "targetableType": "Contact" - }, - "event": "lifecycle_stage", - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "contact": { - "lifecycle_stage_id": 71012806409 - }, - "unique_identifier": { - "emails": "jamessampleton6@gmail.com" - } - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Content-Type": "application/json", - "Authorization": "Token token=dummyApiKey" - }, - "version": "1", - "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/contacts/upsert" - } - }, - { - "description": "Track call: with wrong lifecycleStageName", - "input": { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "type": "track", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "properties": { - "email": "jamessampleton6@gmail.com", - "lifecycleStageName": "final ExCustomer", - "title": "new Contact", - "startDate": "2021-05-04T17:00:00+05:30", - "endDate": "2022-06-04T17:30:00+05:30", - "ownerId": "70054866612", - "targetableType": "Contact" - }, - "event": "lifecycle_stage", - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "error": "failed to fetch lifeCycleStages with final ExCustomer", - "stage": "dest_transformer", - "record_id": null, - "source_id": "2EfN23bGjskM5qAM310n619XABT", - "status_code": 400, - "destination_id": "2FvdYen6HyqE0WlxkC6ZboEaDjR", - "source_job_run_id": "", - "source_task_run_id": "" - } - }, - { - "description": "Track call: Multiplexing", - "input": { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "email": "test@rudderstack.com", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - }, - "externalId": { - "type": "Contact" - } - }, - "type": "track", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "email": "test@rudderstack.com", - "properties": { - "product_name": "Shirt", - "brand": "Wrogn", - "salesActivityName": "own-calender", - "title": "new Contact", - "startDate": "2021-05-04T17:00:00+05:30", - "endDate": "2022-06-04T17:30:00+05:30", - "ownerId": "70054866612", - "lifecycleStageId": "71012139273" - }, - "event": "test_activity", - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com", - "rudderEventsToFreshmarketerEvents": [ - { - "from": "test_activity", - "to": "sales_activity" - }, - { - "from": "test_activity", - "to": "lifecycle_stage" - }, - { - "from": "test_event", - "to": "lifecycle_stage" - } - ] - } - } - }, - "output": [ - { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "sales_activity": { - "title": "new Contact", - "end_date": "2022-06-04T17:30:00+05:30", - "owner_id": "70054866612", - "start_date": "2021-05-04T17:00:00+05:30", - "created_at": "2020-10-20T08:14:28.778Z", - "updated_at": "2020-10-20T08:14:28.778Z", - "targetable_id": 70054866612, - "targetable_type": "Contact", - "sales_activity_name": "own-calender", - "sales_activity_type_id": 70000666879 - } - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Content-Type": "application/json", - "Authorization": "Token token=dummyApiKey" - }, - "version": "1", - "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/sales_activities" - }, - { - "body": { - "JSON": { - "contact": { - "lifecycle_stage_id": "71012139273" - }, - "unique_identifier": { - "emails": "test@rudderstack.com" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Authorization": "Token token=dummyApiKey", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/contacts/upsert" - } - ] - } -] diff --git a/test/__tests__/data/freshmarketer_router_input.json b/test/__tests__/data/freshmarketer_router_input.json deleted file mode 100644 index 2cc5ce58de..0000000000 --- a/test/__tests__/data/freshmarketer_router_input.json +++ /dev/null @@ -1,174 +0,0 @@ -[ - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "rudderstack-476952domain3105.myfreshworks.com" - } - }, - "metadata": { - "jobId": 1 - }, - "message": { - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-06-22T10:57:58Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99099", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - } - }, - "traits": { - "email": "testuser@google.com", - "first_name": "Rk", - "last_name": "Mishra", - "mobileNumber": "1-926-555-9504", - "lifecycleStageId": 71010794467, - "phone": "9988776655", - "owner_id": "70000090119" - }, - "type": "identify", - "sentAt": "2022-04-22T10:57:58Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "rudderstack-476952domain3105.myfreshworks.com" - } - }, - "metadata": { - "jobId": 2 - }, - "message": { - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-06-22T10:57:58Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99099", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - } - }, - "traits": { - "email": "testuser@google.com", - "first_name": "Rk", - "last_name": "Mishra", - "mobileNumber": "1-926-555-9504", - "lifecycleStageId": 71010794467, - "phone": "9988776655", - "owner_id": "70000090119" - }, - "type": "identify", - "sentAt": "2022-04-22T10:57:58Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - }, - "metadata": { - "jobId": 3 - }, - "message": { - "messageId": "sadjb-1e2r3fhgb-12bvbbj", - "originalTimestamp": "2022-06-22T10:57:58Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "traits": { - "email": "testuser@google.com" - } - }, - "traits": { - "groupType": "accounts", - "name": "Mark Twain", - "phone": "919191919191", - "numberOfEmployees": 51, - "annualRevenue": 1000, - "address": "Red Colony", - "city": "Colony", - "state": "Haryana" - }, - "type": "group", - "sentAt": "2022-04-22T10:57:58Z" - } - } -] diff --git a/test/__tests__/data/freshmarketer_router_output.json b/test/__tests__/data/freshmarketer_router_output.json deleted file mode 100644 index 3525e4bb16..0000000000 --- a/test/__tests__/data/freshmarketer_router_output.json +++ /dev/null @@ -1,163 +0,0 @@ -[ - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rudderstack-476952domain3105.myfreshworks.com/crm/sales/api/contacts/upsert", - "headers": { - "Authorization": "Token token=dummyApiKey", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "contact": { - "emails": "testuser@google.com", - "first_name": "Rk", - "last_name": "Mishra", - "work_number": "9988776655", - "external_id": "ea5cfab2-3961-4d8a-8187-3d1858c99099", - "mobile_number": "1-926-555-9504", - "created_at": "2022-06-22T10:57:58Z", - "updated_at": "2022-06-22T10:57:58Z", - "lifecycle_stage_id": 71010794467 - }, - "unique_identifier": { - "emails": "testuser@google.com" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "jobId": 1 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "rudderstack-476952domain3105.myfreshworks.com" - } - } - }, - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rudderstack-476952domain3105.myfreshworks.com/crm/sales/api/contacts/upsert", - "headers": { - "Authorization": "Token token=dummyApiKey", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "contact": { - "emails": "testuser@google.com", - "first_name": "Rk", - "last_name": "Mishra", - "work_number": "9988776655", - "external_id": "ea5cfab2-3961-4d8a-8187-3d1858c99099", - "mobile_number": "1-926-555-9504", - "created_at": "2022-06-22T10:57:58Z", - "updated_at": "2022-06-22T10:57:58Z", - "lifecycle_stage_id": 71010794467 - }, - "unique_identifier": { - "emails": "testuser@google.com" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "jobId": 2 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "rudderstack-476952domain3105.myfreshworks.com" - } - } - }, - { - "batchedRequest": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "contact": { - "sales_accounts": [ - { - "id": 70003771198, - "name": "div-quer", - "avatar": null, - "partial": true, - "website": null, - "is_primary": true, - "last_contacted": null, - "record_type_id": "71010794477" - }, - { - "id": 70003825177, - "name": "BisleriGroup", - "avatar": null, - "partial": true, - "website": null, - "is_primary": false, - "last_contacted": null, - "record_type_id": "71010794477" - }, - { - "id": 70003771396, - "is_primary": false - } - ] - }, - "unique_identifier": { - "emails": "testuser@google.com" - } - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Content-Type": "application/json", - "Authorization": "Token token=dummyApiKey" - }, - "version": "1", - "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/contacts/upsert" - }, - "metadata": [ - { - "jobId": 3 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - } -] diff --git a/test/__tests__/data/freshsales.json b/test/__tests__/data/freshsales.json deleted file mode 100644 index 55193532f4..0000000000 --- a/test/__tests__/data/freshsales.json +++ /dev/null @@ -1,2173 +0,0 @@ -[ - { - "description": "Track call, event is not supported.", - "input": { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "email": "test@rudderstack.com", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "type": "track", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "properties": { - "product_name": "Shirt", - "brand": "Wrogn" - }, - "event": { - "name": "Add to Cart" - }, - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "statusCode": 400, - "error": "Event is a required field and should be a string", - "statTags": { - "errorAt": "proc", - "destType": "FRESHMARKETER", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "Identify call for creating new user", - "input": { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "rudderstack-476952domain3105.myfreshworks.com" - } - }, - "message": { - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-06-22T10:57:58Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99099", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - } - }, - "traits": { - "email": "testuser@google.com", - "first_name": "Rk", - "last_name": "Mishra", - "mobileNumber": "1-926-555-9504", - "lifecycleStageId": 71010794467, - "phone": "9988776655", - "owner_id": "70000090119" - }, - "type": "identify", - "sentAt": "2022-04-22T10:57:58Z" - } - }, - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "contact": { - "emails": "testuser@google.com", - "last_name": "Mishra", - "created_at": "2022-06-22T10:57:58Z", - "first_name": "Rk", - "updated_at": "2022-06-22T10:57:58Z", - "external_id": "ea5cfab2-3961-4d8a-8187-3d1858c99099", - "work_number": "9988776655", - "mobile_number": "1-926-555-9504", - "lifecycle_stage_id": 71010794467 - }, - "unique_identifier": { - "emails": "testuser@google.com" - } - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Content-Type": "application/json", - "Authorization": "Token token=dummyApiKey" - }, - "version": "1", - "endpoint": "https://rudderstack-476952domain3105.myfreshworks.com/crm/sales/api/contacts/upsert" - } - }, - { - "description": "Identify call with numbers in lifecycleStageId, ownerId", - "input": { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "rudderstack-476952domain3105.myfreshworks.com" - } - }, - "message": { - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-06-22T10:57:58Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99099", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - } - }, - "traits": { - "email": "testuser@google.com", - "first_name": "Rk", - "last_name": "Mishra", - "mobileNumber": "1-926-555-9504", - "lifecycleStageId": 71010794467, - "phone": "9988776655", - "owner_id": "70000090119" - }, - "type": "identify", - "sentAt": "2022-04-22T10:57:58Z" - } - }, - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "contact": { - "emails": "testuser@google.com", - "last_name": "Mishra", - "created_at": "2022-06-22T10:57:58Z", - "first_name": "Rk", - "updated_at": "2022-06-22T10:57:58Z", - "external_id": "ea5cfab2-3961-4d8a-8187-3d1858c99099", - "work_number": "9988776655", - "mobile_number": "1-926-555-9504", - "lifecycle_stage_id": 71010794467 - }, - "unique_identifier": { - "emails": "testuser@google.com" - } - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Content-Type": "application/json", - "Authorization": "Token token=dummyApiKey" - }, - "version": "1", - "endpoint": "https://rudderstack-476952domain3105.myfreshworks.com/crm/sales/api/contacts/upsert" - } - }, - { - "description": "Identify call with wrong data type in lifecycleStageId, ownerId", - "input": { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "rudderstack-476952domain3105.myfreshworks.com" - } - }, - "message": { - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-06-22T10:57:58Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99099", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - } - }, - "traits": { - "email": "testuser@google.com", - "first_name": "Rk", - "last_name": "Mishra", - "mobileNumber": "1-926-555-9504", - "lifecycleStageId": "rudderSample", - "phone": "9988776655", - "ownerId": "rudderSample" - }, - "type": "identify", - "sentAt": "2022-04-22T10:57:58Z" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rudderstack-476952domain3105.myfreshworks.com/crm/sales/api/contacts/upsert", - "headers": { - "Authorization": "Token token=dummyApiKey", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "contact": { - "emails": "testuser@google.com", - "first_name": "Rk", - "last_name": "Mishra", - "work_number": "9988776655", - "external_id": "ea5cfab2-3961-4d8a-8187-3d1858c99099", - "mobile_number": "1-926-555-9504", - "created_at": "2022-06-22T10:57:58Z", - "updated_at": "2022-06-22T10:57:58Z" - }, - "unique_identifier": { - "emails": "testuser@google.com" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "Identify call, email is not provided.", - "input": { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "rudderstack-476952domain3105.myfreshworks.com" - } - }, - "message": { - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-06-22T10:57:58Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99099", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - } - }, - "traits": { - "first_name": "Rk", - "last_name": "Mishra", - "mobileNumber": "1-926-555-9504", - "lifecycleStageId": "rudderSample", - "phone": "9988776655", - "owner_id": "rudderSample" - }, - "type": "identify", - "sentAt": "2022-04-22T10:57:58Z" - } - }, - "output": { - "statusCode": 400, - "error": "Missing required value from \"email\"", - "statTags": { - "errorAt": "proc", - "destType": "FRESHSALES", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "Group call: testing with mock api", - "input": { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - }, - "message": { - "messageId": "sadjb-1e2r3fhgb-12bvbbj", - "originalTimestamp": "2022-06-22T10:57:58Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "traits": { - "email": "testuser@google.com" - } - }, - "traits": { - "groupType": "accounts", - "name": "Mark Twain", - "phone": "919191919191", - "numberOfEmployees": 51, - "annualRevenue": 1000, - "address": "Red Colony", - "city": "Colony", - "state": "Haryana" - }, - "type": "group", - "sentAt": "2022-04-22T10:57:58Z" - } - }, - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "contact": { - "sales_accounts": [ - { - "id": 70003771198, - "name": "div-quer", - "avatar": null, - "partial": true, - "website": null, - "is_primary": true, - "last_contacted": null, - "record_type_id": "71010794477" - }, - { - "id": 70003825177, - "name": "BisleriGroup", - "avatar": null, - "partial": true, - "website": null, - "is_primary": false, - "last_contacted": null, - "record_type_id": "71010794477" - }, - { - "id": 70003771396, - "is_primary": false - } - ] - }, - "unique_identifier": { - "emails": "testuser@google.com" - } - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Content-Type": "application/json", - "Authorization": "Token token=dummyApiKey" - }, - "version": "1", - "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/contacts/upsert" - } - }, - { - "description": "Group call: name is required field.", - "input": { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - }, - "message": { - "messageId": "sadjb-1e2r3fhgb-12bvbbj", - "originalTimestamp": "2022-06-22T10:57:58Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "traits": { - "email": "testuser@google.com" - } - }, - "traits": { - "groupType": "accounts", - "phone": "919191919191", - "numberOfEmployees": 51, - "annualRevenue": 1000, - "address": "Red Colony", - "city": "Colony", - "state": "Haryana" - }, - "type": "group", - "sentAt": "2022-04-22T10:57:58Z" - } - }, - "output": { - "error": "Missing required value from \"name\"", - "stage": "dest_transformer", - "record_id": null, - "source_id": "2DnU7R3Ksf0O1IypvleCHNp4X7m", - "status_code": 400, - "destination_id": "2DnUEc7Ka4thYmPsPCdigkwaGkn", - "source_job_run_id": "", - "source_task_run_id": "" - } - }, - { - "description": "missing message type", - "input": { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - }, - "message": { - "messageId": "sadjb-1e2r3fhgb-12bvbbj", - "originalTimestamp": "2022-06-22T10:57:58Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "traits": { - "email": "testuser4google.com" - } - }, - "traits": { - "name": "Mark Twain", - "phone": "919191919191", - "numberOfEmployees": 51, - "annualRevenue": 1000, - "address": "Red Colony", - "city": "Colony", - "state": "Haryana" - }, - "sentAt": "2022-04-22T10:57:58Z" - } - }, - "output": { - "statusCode": 400, - "error": "Message Type is not present. Aborting message.", - "statTags": { - "destination": "freshmarketer", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "Wrong message type", - "input": { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - }, - "message": { - "messageId": "sadjb-1e2r3fhgb-12bvbbj", - "originalTimestamp": "2022-06-22T10:57:58Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "traits": { - "email": "testuser4google.com" - } - }, - "traits": { - "name": "Mark Twain", - "phone": "919191919191", - "numberOfEmployees": 51, - "annualRevenue": 1000, - "address": "Red Colony", - "city": "Colony", - "state": "Haryana" - }, - "type": "page", - "sentAt": "2022-04-22T10:57:58Z" - } - }, - "output": { - "statusCode": 400, - "error": "message type page not supported", - "statTags": { - "errorAt": "proc", - "destType": "FRESHMARKETER", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "Group call: user email is missing", - "input": { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - }, - "message": { - "messageId": "sadjb-1e2r3fhgb-12bvbbj", - "originalTimestamp": "2022-06-22T10:57:58Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "traits": {} - }, - "traits": { - "groupType": "accounts", - "name": "div-quer", - "phone": "919191919191", - "numberOfEmployees": 51, - "annualRevenue": 1000, - "address": "Red Colony", - "city": "Lal colony", - "state": "Haryana" - }, - "type": "group", - "sentAt": "2022-04-22T10:57:58Z" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/sales_accounts/upsert", - "headers": { - "Authorization": "Token token=dummyApiKey", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "unique_identifier": { - "name": "div-quer" - }, - "sales_account": { - "name": "div-quer", - "phone": "919191919191", - "number_of_employees": 51, - "annual_revenue": 1000, - "address": "", - "city": "Lal colony", - "state": "Haryana", - "created_at": "2022-06-22T10:57:58Z", - "updated_at": "2022-06-22T10:57:58Z" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "Identify call: Email is not present", - "input": { - "message": { - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-06-22T10:57:58Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99099", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - } - }, - "traits": { - "first_name": "Rk", - "last_name": "Narayan", - "mobileNumber": "1-926-555-9504", - "phone": "9988776655" - }, - "type": "identify", - "sentAt": "2022-04-22T10:57:58Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "error": "Missing required value from \"email\"", - "stage": "dest_transformer", - "record_id": null, - "source_id": "2DnU7R3Ksf0O1IypvleCHNp4X7m", - "status_code": 400, - "destination_id": "2DnUEc7Ka4thYmPsPCdigkwaGkn", - "source_job_run_id": "", - "source_task_run_id": "" - } - }, - { - "description": "Track call, event is not supported.", - "input": { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "email": "test@rudderstack.com", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "type": "track", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "properties": { - "product_name": "Shirt", - "brand": "Wrogn" - }, - "event": "Add to Cart", - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "statusCode": 400, - "error": "event name Add to Cart is not supported. Aborting!", - "statTags": { - "errorAt": "proc", - "destType": "FRESHMARKETER", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "Track call: some required properties is missing for sales_activity", - "input": { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "email": "test@rudderstack.com", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "type": "track", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "email": "test@rudderstack.com", - "properties": { - "product_name": "Shirt", - "brand": "Wrogn" - }, - "event": "sales_activity", - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "error": "Missing required value from \"properties.title\"", - "stage": "dest_transformer", - "record_id": null, - "source_id": "2EfN23bGjskM5qAM310n619XABT", - "status_code": 400, - "destination_id": "2FvdYen6HyqE0WlxkC6ZboEaDjR", - "source_job_run_id": "", - "source_task_run_id": "" - } - }, - { - "description": "Track call: for salesActivityName", - "input": { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "email": "test@rudderstack.com", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - }, - "externalId": { - "type": "Contact" - } - }, - "type": "track", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "email": "test@rudderstack.com", - "properties": { - "product_name": "Shirt", - "brand": "Wrogn", - "salesActivityName": "own-calender", - "title": "new Contact", - "startDate": "2021-05-04T17:00:00+05:30", - "endDate": "2022-06-04T17:30:00+05:30", - "ownerId": "70054866612" - }, - "event": "test", - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com", - "rudderEventsToFreshsalesEvents": [ - { - "from": "test", - "to": "sales_activity" - } - ] - } - } - }, - "output": [ - { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "sales_activity": { - "title": "new Contact", - "created_at": "2020-10-20T08:14:28.778Z", - "end_date": "2022-06-04T17:30:00+05:30", - "owner_id": "70054866612", - "start_date": "2021-05-04T17:00:00+05:30", - "updated_at": "2020-10-20T08:14:28.778Z", - "targetable_id": 70054866612, - "targetable_type": "Contact", - "sales_activity_name": "own-calender", - "sales_activity_type_id": 70000666879 - } - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Content-Type": "application/json", - "Authorization": "Token token=dummyApiKey" - }, - "version": "1", - "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/sales_activities" - } - ] - }, - { - "description": "Track call: lifecycle_stage_id", - "input": { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "type": "track", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "properties": { - "email": "jamessampleton3@gmail.com", - "lifecycleStageId": "71012139273", - "title": "new Contact", - "startDate": "2021-05-04T17:00:00+05:30", - "endDate": "2022-06-04T17:30:00+05:30", - "ownerId": "70054866612", - "targetableType": "Contact" - }, - "event": "lifecycle_stage", - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/contacts/upsert", - "headers": { - "Authorization": "Token token=dummyApiKey", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "contact": { - "lifecycle_stage_id": "71012139273" - }, - "unique_identifier": { - "emails": "jamessampleton3@gmail.com" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "Track call: In lifecycle stage, email is missing", - "input": { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "type": "track", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "properties": { - "lifecycleStageId": "71012139273", - "title": "new Contact", - "startDate": "2021-05-04T17:00:00+05:30", - "endDate": "2022-06-04T17:30:00+05:30", - "ownerId": "70054866612", - "targetableType": "Contact" - }, - "event": "lifecycle_stage", - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "error": "email is required for updating life Cycle Stages. Aborting!", - "stage": "dest_transformer", - "record_id": null, - "source_id": "2EfN23bGjskM5qAM310n619XABT", - "status_code": 400, - "destination_id": "2FvdYen6HyqE0WlxkC6ZboEaDjR", - "source_job_run_id": "", - "source_task_run_id": "" - } - }, - { - "description": "Track call: Either of lifecycleStageName or lifecycleStageId is required", - "input": { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "email": "test@rudderstack.com", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "type": "track", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "email": "jamessampleton3@gmail.com", - "properties": { - "title": "new Contact", - "startDate": "2021-05-04T17:00:00+05:30", - "endDate": "2022-06-04T17:30:00+05:30", - "ownerId": "70054866612", - "targetableType": "Contact" - }, - "event": "lifecycle_stage", - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "error": "Either of lifecycleStageName or lifecycleStageId is required. Aborting!", - "stage": "dest_transformer", - "record_id": null, - "source_id": "2EfN23bGjskM5qAM310n619XABT", - "status_code": 400, - "destination_id": "2FvdYen6HyqE0WlxkC6ZboEaDjR", - "source_job_run_id": "", - "source_task_run_id": "" - } - }, - { - "description": "Track call: Either of sales activity name or sales activity type id is required", - "input": { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "email": "test@rudderstack.com", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - }, - "externalId": { - "type": "Contact" - } - }, - "type": "track", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "email": "test@rudderstack.com", - "properties": { - "product_name": "Shirt", - "brand": "Wrogn", - "title": "new Contact", - "startDate": "2021-05-04T17:00:00+05:30", - "endDate": "2022-06-04T17:30:00+05:30", - "ownerId": "70054866612" - }, - "event": "sales_activity", - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "error": "Either of sales activity name or sales activity type id is required. Aborting!", - "stage": "dest_transformer", - "record_id": null, - "source_id": "2EfN23bGjskM5qAM310n619XABT", - "status_code": 400, - "destination_id": "2FvdYen6HyqE0WlxkC6ZboEaDjR", - "source_job_run_id": "", - "source_task_run_id": "" - } - }, - { - "description": "Track call: Either of email or targetable_id is required for creating sales activity.", - "input": { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - }, - "externalId": { - "type": "Contact" - } - }, - "type": "track", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "properties": { - "product_name": "Shirt", - "brand": "Wrogn", - "salesActivityName": "own-calender", - "title": "new Contact", - "startDate": "2021-05-04T17:00:00+05:30", - "endDate": "2022-06-04T17:30:00+05:30", - "ownerId": "70054866612" - }, - "event": "sales_activity", - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "error": "Either of email or targetable_id is required for creating sales activity. Aborting!", - "stage": "dest_transformer", - "record_id": null, - "source_id": "2EfN23bGjskM5qAM310n619XABT", - "status_code": 400, - "destination_id": "2FvdYen6HyqE0WlxkC6ZboEaDjR", - "source_job_run_id": "", - "source_task_run_id": "" - } - }, - { - "description": "Track call: sales activity with salesActivityTypeId", - "input": { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "email": "test@rudderstack.com", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - }, - "externalId": { - "type": "Contact" - } - }, - "type": "track", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "email": "jamessampleton3@gmail.com", - "properties": { - "salesActivityTypeId": "70000663932", - "title": "new Contact", - "startDate": "2021-05-04T17:00:00+05:30", - "endDate": "2022-06-04T17:30:00+05:30", - "ownerId": "70054866612" - }, - "event": "sales_activity", - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "sales_activity": { - "title": "new Contact", - "created_at": "2020-10-20T08:14:28.778Z", - "end_date": "2022-06-04T17:30:00+05:30", - "owner_id": "70054866612", - "start_date": "2021-05-04T17:00:00+05:30", - "updated_at": "2020-10-20T08:14:28.778Z", - "targetable_id": 70054866612, - "targetable_type": "Contact", - "sales_activity_type_id": "70000663932" - } - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Content-Type": "application/json", - "Authorization": "Token token=dummyApiKey" - }, - "version": "1", - "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/sales_activities" - } - }, - { - "description": "Track call: updated sales activity with salesActivityTypeId and targetableId", - "input": { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "email": "test@rudderstack.com", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - }, - "externalId": { - "id": "70052305908", - "type": "Contact" - } - }, - "type": "track", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "properties": { - "salesActivityTypeId": "70000663932", - "title": "new Contact", - "startDate": "2021-05-04T17:00:00+05:30", - "endDate": "2022-06-04T17:30:00+05:30", - "ownerId": "70054866612" - }, - "event": "sales_activity", - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "sales_activity": { - "title": "new Contact", - "created_at": "2020-10-20T08:14:28.778Z", - "end_date": "2022-06-04T17:30:00+05:30", - "owner_id": "70054866612", - "start_date": "2021-05-04T17:00:00+05:30", - "updated_at": "2020-10-20T08:14:28.778Z", - "targetable_id": "70052305908", - "targetable_type": "Contact", - "sales_activity_type_id": "70000663932" - } - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Content-Type": "application/json", - "Authorization": "Token token=dummyApiKey" - }, - "version": "1", - "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/sales_activities" - } - }, - { - "description": "Unsupported message Type", - "input": { - "message": { - "channel": "web", - "type": "page", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "email": "jamessampleton3@gmail.com", - "properties": { - "lifecycleStageId": "71012139273", - "title": "new Contact", - "startDate": "2021-05-04T17:00:00+05:30", - "endDate": "2022-06-04T17:30:00+05:30", - "ownerId": "70054866612", - "targetableType": "Contact" - }, - "event": "lifecycle_stage", - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "statusCode": 400, - "error": "message type page not supported", - "statTags": { - "errorAt": "proc", - "destType": "FRESHMARKETER", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "Track call: with wrong sales activity name", - "input": { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "email": "test@rudderstack.com", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - }, - "externalId": { - "type": "Contact" - } - }, - "type": "track", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "email": "test@rudderstack.com", - "properties": { - "product_name": "Shirt", - "brand": "Wrogn", - "salesActivityName": "own-list", - "title": "new Contact", - "startDate": "2021-05-04T17:00:00+05:30", - "endDate": "2022-06-04T17:30:00+05:30", - "ownerId": "70054866612" - }, - "event": "sales_activity", - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "error": "sales Activity own-list doesn't exists. Aborting!", - "stage": "dest_transformer", - "record_id": null, - "source_id": "2EfN23bGjskM5qAM310n619XABT", - "status_code": 400, - "destination_id": "2FvdYen6HyqE0WlxkC6ZboEaDjR", - "source_job_run_id": "", - "source_task_run_id": "" - } - }, - { - "description": "Track call: update contacts with sales Activity name", - "input": { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "type": "track", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "properties": { - "email": "jamessampleton6@gmail.com", - "lifecycleStageName": "final Customer", - "title": "new Contact", - "startDate": "2021-05-04T17:00:00+05:30", - "endDate": "2022-06-04T17:30:00+05:30", - "ownerId": "70054866612", - "targetableType": "Contact" - }, - "event": "lifecycle_stage", - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "contact": { - "lifecycle_stage_id": 71012806409 - }, - "unique_identifier": { - "emails": "jamessampleton6@gmail.com" - } - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Content-Type": "application/json", - "Authorization": "Token token=dummyApiKey" - }, - "version": "1", - "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/contacts/upsert" - } - }, - { - "description": "Track call: with wrong lifecycleStageName", - "input": { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.5" - }, - "traits": { - "name": "Shehan Study", - "category": "SampleIdentify", - "plan": "Open source", - "logins": 5, - "createdAt": 1599264000 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.5" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 0.8999999761581421 - }, - "campaign": { - "source": "google", - "medium": "medium", - "term": "keyword", - "content": "some content", - "name": "some campaign", - "test": "other value" - }, - "page": { - "path": "/destinations/amplitude", - "referrer": "", - "search": "", - "title": "", - "url": "https://docs.rudderstack.com/destinations/amplitude", - "category": "destination", - "initial_referrer": "https://docs.rudderstack.com", - "initial_referring_domain": "docs.rudderstack.com" - } - }, - "type": "track", - "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", - "originalTimestamp": "2020-10-20T08:14:28.778Z", - "anonymousId": "my-anonymous-id-new", - "userId": "newUserIdAlias", - "properties": { - "email": "jamessampleton6@gmail.com", - "lifecycleStageName": "final ExCustomer", - "title": "new Contact", - "startDate": "2021-05-04T17:00:00+05:30", - "endDate": "2022-06-04T17:30:00+05:30", - "ownerId": "70054866612", - "targetableType": "Contact" - }, - "event": "lifecycle_stage", - "previousId": "sampleusrRudder3", - "sentAt": "2020-10-20T08:14:28.778Z" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "domain": "domain-rudder.myfreshworks.com" - } - } - }, - "output": { - "error": "failed to fetch lifeCycleStages with final ExCustomer", - "stage": "dest_transformer", - "record_id": null, - "source_id": "2EfN23bGjskM5qAM310n619XABT", - "status_code": 400, - "destination_id": "2FvdYen6HyqE0WlxkC6ZboEaDjR", - "source_job_run_id": "", - "source_task_run_id": "" - } - } -] diff --git a/test/__tests__/data/freshsales_router_input.json b/test/__tests__/data/freshsales_router_input.json deleted file mode 100644 index ea4b9887dd..0000000000 --- a/test/__tests__/data/freshsales_router_input.json +++ /dev/null @@ -1,78 +0,0 @@ -[ - { - "message": { - "context": { - "device": { - "name": "Mi", - "token": "dummyDeviceToken" - }, - "os": { - "name": "android" - }, - "traits": { - "address": { - "city": "city", - "country": "country", - "postalCode": "postalCode", - "state": "state", - "street": "street" - }, - "email": "user112@mail.com", - "firstName": "sample1", - "lastName": "user1" - } - }, - "messageId": "8184ebd7-3a19-45a3-a340-d6f449c63d27", - "originalTimestamp": "2022-08-30T11:28:48.429+05:30", - "receivedAt": "2022-08-30T11:28:43.648+05:30", - "request_ip": "[::1]", - "rudderId": "ed33ef22-569d-44b1-a6cb-063c69dca8f0", - "sentAt": "2022-08-30T11:28:48.429+05:30", - "timestamp": "2022-08-30T11:28:43.647+05:30", - "type": "identify", - "userId": "user113" - }, - "destination": { - "ID": "2E3xCNR3sae33y3AkGzuQ3ym05v", - "Name": "test", - "DestinationDefinition": { - "ID": "2E3x3AwySRvh6vXgYslvYApyFPb", - "Name": "FRESHSALES", - "DisplayName": "Freshsales", - "Config": { - "destConfig": { - "defaultConfig": ["apiKey", "domain"] - }, - "excludeKeys": [], - "includeKeys": ["apiKey", "domain"], - "saveDestinationResponse": true, - "supportedMessageTypes": ["identify", "group"], - "supportedSourceTypes": [ - "amp", - "android", - "cordova", - "cloud", - "flutter", - "ios", - "reactnative", - "unity", - "warehouse", - "web" - ], - "transformAt": "processor", - "transformAtV1": "processor" - }, - "ResponseRules": {} - }, - "Config": { - "apiKey": "hrkjfergeferf", - "domain": "rudderstack-479541159204968909.myfreshworks.com" - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": true, - "RevisionID": "2E3xCLWeb83vOGDh0mkN4Auei3i" - }, - "metadata": {} - } -] diff --git a/test/__tests__/data/freshsales_router_output.json b/test/__tests__/data/freshsales_router_output.json deleted file mode 100644 index 69d259ff00..0000000000 --- a/test/__tests__/data/freshsales_router_output.json +++ /dev/null @@ -1,83 +0,0 @@ -[ - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rudderstack-479541159204968909.myfreshworks.com/crm/sales/api/contacts/upsert", - "headers": { - "Authorization": "Token token=hrkjfergeferf", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "contact": { - "emails": "user112@mail.com", - "first_name": "sample1", - "last_name": "user1", - "external_id": "user113", - "address": "street city state country postalCode", - "city": "city", - "state": "state", - "country": "country", - "zipcode": "postalCode", - "created_at": "2022-08-30T11:28:43.647+05:30", - "updated_at": "2022-08-30T11:28:43.647+05:30" - }, - "unique_identifier": { - "emails": "user112@mail.com" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [{}], - "batched": false, - "statusCode": 200, - "destination": { - "ID": "2E3xCNR3sae33y3AkGzuQ3ym05v", - "Name": "test", - "DestinationDefinition": { - "ID": "2E3x3AwySRvh6vXgYslvYApyFPb", - "Name": "FRESHSALES", - "DisplayName": "Freshsales", - "Config": { - "destConfig": { - "defaultConfig": ["apiKey", "domain"] - }, - "excludeKeys": [], - "includeKeys": ["apiKey", "domain"], - "saveDestinationResponse": true, - "supportedMessageTypes": ["identify", "group"], - "supportedSourceTypes": [ - "amp", - "android", - "cordova", - "cloud", - "flutter", - "ios", - "reactnative", - "unity", - "warehouse", - "web" - ], - "transformAt": "processor", - "transformAtV1": "processor" - }, - "ResponseRules": {} - }, - "Config": { - "apiKey": "hrkjfergeferf", - "domain": "rudderstack-479541159204968909.myfreshworks.com" - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": true, - "RevisionID": "2E3xCLWeb83vOGDh0mkN4Auei3i" - } - } -] diff --git a/test/__tests__/data/ga4.json b/test/__tests__/data/ga4.json deleted file mode 100644 index 5645c51457..0000000000 --- a/test/__tests__/data/ga4.json +++ /dev/null @@ -1,12734 +0,0 @@ -[ - { - "description": "(gtag) check all property mappings for 'Products Searched' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99v4f979fb997ce453373900f891" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "Products Searched", - "properties": { - "query": "t-shirts" - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-22T10:57:58Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - } - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "timestamp_micros": 1650950229000000, - "events": [ - { - "name": "search", - "params": { - "search_term": "t-shirts", - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) check all property mappings for 'product list viewed' event", - "input": { - "message": { - "channel": "web", - "rudderId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99v4f979fb997ce453373900f891" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "product list viewed", - "properties": { - "list_id": "related_products", - "category": "Related_products", - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - } - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "view_item_list", - "params": { - "item_list_id": "related_products", - "item_list_name": "Related_products", - "items": [ - { - "item_id": "507f1f77bcf86cd799439011", - "item_name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "item_category": "Apparel", - "item_brand": "Google", - "item_variant": "green", - "price": 19, - "quantity": 2, - "index": 1, - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ], - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) check all property mappings for 'promotion viewed' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "promotion viewed", - "properties": { - "creative_name": "Summer Banner", - "creative_slot": "featured_app_1", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "0", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "creative_name": "summer_banner2", - "creative_slot": "featured_app_1" - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "client_id": "client_id", - "events": [ - { - "name": "view_promotion", - "params": { - "creative_name": "Summer Banner", - "creative_slot": "featured_app_1", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "engagement_time_msec": 1, - "items": [ - { - "item_id": "507f1f77bcf86cd799439011", - "item_name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "item_category": "Apparel", - "item_brand": "Google", - "item_variant": "green", - "price": 19, - "quantity": 2, - "index": 0, - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "creative_name": "summer_banner2", - "creative_slot": "featured_app_1" - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) check all property mappings for 'promotion clicked' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "promotion clicked", - "properties": { - "creative_name": "Summer Banner", - "creative_slot": "featured_app_1", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "0", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "creative_name": "summer_banner2", - "creative_slot": "featured_app_1" - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "select_promotion", - "params": { - "creative_name": "Summer Banner", - "creative_slot": "featured_app_1", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "engagement_time_msec": 1, - "items": [ - { - "item_id": "507f1f77bcf86cd799439011", - "item_name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "item_category": "Apparel", - "item_brand": "Google", - "item_variant": "green", - "price": 19, - "quantity": 2, - "index": 0, - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "creative_name": "summer_banner2", - "creative_slot": "featured_app_1" - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) exclude only 'products' property from 'promotion clicked' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "promotion clicked", - "properties": { - "creative_name": "Summer Banner", - "creative_slot": "featured_app_1", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale" - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "select_promotion", - "params": { - "creative_name": "Summer Banner", - "creative_slot": "featured_app_1", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) check all property mappings for 'product clicked' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "product clicked", - "properties": { - "list_id": "related_products", - "category": "Related_products", - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345", - "timezone": { - "name": "Europe/Tallinn" - }, - "engagementTimeMsec": 100, - "sessionId": 655 - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "select_item", - "params": { - "item_list_id": "related_products", - "item_list_name": "Related_products", - "items": [ - { - "item_id": "507f1f77bcf86cd799439011", - "item_name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "item_category": "Related_products", - "item_brand": "Google", - "item_variant": "green", - "price": 19, - "quantity": 2, - "index": 1, - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ], - "timezone_name": "Europe/Tallinn", - "engagement_time_msec": 100, - "session_id": 655 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) check all property mappings for 'product viewed' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "product viewed", - "properties": { - "currency": "USD", - "total": "7.77", - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "view_item", - "params": { - "currency": "USD", - "value": 7.77, - "engagement_time_msec": 1, - "items": [ - { - "item_id": "507f1f77bcf86cd799439011", - "item_name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "item_category": "Apparel", - "item_brand": "Google", - "item_variant": "green", - "price": 19, - "quantity": 2, - "index": 1, - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) check all property mappings for 'promotion clicked' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "promotion clicked", - "properties": { - "creative_name": "Summer Banner", - "creative_slot": "featured_app_1", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "0", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "creative_name": "summer_banner2", - "creative_slot": "featured_app_1" - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "typesOfClient": "gtag", - "firebaseAppId": "1:17864591371:android:7a9520d3c78962e21f9fee", - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "client_id": "client_id", - "events": [ - { - "name": "select_promotion", - "params": { - "creative_name": "Summer Banner", - "creative_slot": "featured_app_1", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "engagement_time_msec": 1, - "items": [ - { - "item_id": "507f1f77bcf86cd799439011", - "item_name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "item_category": "Apparel", - "item_brand": "Google", - "item_variant": "green", - "price": 19, - "quantity": 2, - "index": 0, - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "creative_name": "summer_banner2", - "creative_slot": "featured_app_1" - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(firebase) check all property mappings for 'promotion clicked' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "promotion clicked", - "properties": { - "creative_name": "Summer Banner", - "creative_slot": "featured_app_1", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "0", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "creative_name": "summer_banner2", - "creative_slot": "featured_app_1" - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "typesOfClient": "firebase", - "firebaseAppId": "1:17864591371:android:7a9520d3c78962e21f9fee", - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "firebase_app_id": "1:17864591371:android:7a9520d3c78962e21f9fee" - }, - "body": { - "JSON": { - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "app_instance_id": "f0dd99b6f979fb551ce583373900f937", - "events": [ - { - "name": "select_promotion", - "params": { - "creative_name": "Summer Banner", - "creative_slot": "featured_app_1", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "engagement_time_msec": 1, - "items": [ - { - "item_id": "507f1f77bcf86cd799439011", - "item_name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "item_category": "Apparel", - "item_brand": "Google", - "item_variant": "green", - "price": 19, - "quantity": 2, - "index": 0, - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "creative_name": "summer_banner2", - "creative_slot": "featured_app_1" - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) check all property mappings for 'product added' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "product added", - "properties": { - "currency": "USD", - "total": "7.77", - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "add_to_cart", - "params": { - "currency": "USD", - "value": 7.77, - "engagement_time_msec": 1, - "items": [ - { - "item_id": "507f1f77bcf86cd799439011", - "item_name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "item_category": "Apparel", - "item_brand": "Google", - "item_variant": "green", - "price": 19, - "quantity": 2, - "index": 1, - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) check all property mappings for 'product removed' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "product removed", - "properties": { - "currency": "USD", - "total": "7.77", - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ], - "engagementTimeMsec": 100, - "sessionId": 655 - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "remove_from_cart", - "params": { - "currency": "USD", - "value": 7.77, - "items": [ - { - "item_id": "507f1f77bcf86cd799439011", - "item_name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "item_category": "Apparel", - "item_brand": "Google", - "item_variant": "green", - "price": 19, - "quantity": 2, - "index": 1, - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ], - "engagement_time_msec": 100, - "session_id": 655 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) check all property mappings for 'cart viewed' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "cart viewed", - "properties": { - "currency": "USD", - "total": "7.77", - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "view_cart", - "params": { - "currency": "USD", - "value": 7.77, - "engagement_time_msec": 1, - "items": [ - { - "item_id": "507f1f77bcf86cd799439011", - "item_name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "item_category": "Apparel", - "item_brand": "Google", - "item_variant": "green", - "price": 19, - "quantity": 2, - "index": 1, - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) check all property mappings for 'checkout started' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "checkout started", - "properties": { - "currency": "USD", - "total": 7.77, - "coupon": "SUMMER_FUN", - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "begin_checkout", - "params": { - "currency": "USD", - "value": 7.77, - "coupon": "SUMMER_FUN", - "engagement_time_msec": 1, - "items": [ - { - "item_id": "507f1f77bcf86cd799439011", - "item_name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "item_category": "Apparel", - "item_brand": "Google", - "item_variant": "green", - "price": 19, - "quantity": 2, - "index": 1, - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) check all property mappings for 'payment info entered' -> 'add_payment_info' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "payment info entered", - "properties": { - "currency": "USD", - "value": "7.77", - "coupon": "SUMMER_FUN", - "payment_method": "Credit Card", - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "params": { - "currency": "USD", - "value": 7.77, - "coupon": "SUMMER_FUN", - "payment_type": "Credit Card", - "engagement_time_msec": 1, - "items": [ - { - "item_id": "507f1f77bcf86cd799439011", - "item_name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "item_category": "Apparel", - "item_brand": "Google", - "item_variant": "green", - "price": 19, - "quantity": 2, - "index": 1, - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - }, - "name": "add_payment_info" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) check all property mappings for 'checkout Step Completed' -> 'add_shipping_info' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "checkout Step Completed", - "properties": { - "currency": "USD", - "value": "7.77", - "coupon": "SUMMER_FUN", - "shipping_method": "Ground", - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "params": { - "currency": "USD", - "value": 7.77, - "coupon": "SUMMER_FUN", - "shipping_tier": "Ground", - "engagement_time_msec": 1, - "items": [ - { - "item_id": "507f1f77bcf86cd799439011", - "item_name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "item_category": "Apparel", - "item_brand": "Google", - "item_variant": "green", - "price": 19, - "quantity": 2, - "index": 1, - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - }, - "name": "add_shipping_info" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) check all property mappings for 'order completed' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "order completed", - "properties": { - "currency": "USD", - "order_id": "T_12345", - "total": 12.21, - "affiliation": "Google Store", - "coupon": "SUMMER_FUN", - "shipping": 3.33, - "tax": 1.11, - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "purchase", - "params": { - "currency": "USD", - "transaction_id": "T_12345", - "value": 12.21, - "affiliation": "Google Store", - "coupon": "SUMMER_FUN", - "shipping": 3.33, - "tax": 1.11, - "engagement_time_msec": 1, - "items": [ - { - "item_id": "507f1f77bcf86cd799439011", - "item_name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "item_category": "Apparel", - "item_brand": "Google", - "item_variant": "green", - "price": 19, - "quantity": 2, - "index": 1, - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) check all property mappings for 'order refunded' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "order refunded", - "properties": { - "currency": "USD", - "order_id": "T_12345", - "total": 12.21, - "affiliation": "Google Store", - "coupon": "SUMMER_FUN", - "shipping": 3.33, - "tax": 1.11, - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "refund", - "params": { - "currency": "USD", - "transaction_id": "T_12345", - "value": 12.21, - "affiliation": "Google Store", - "coupon": "SUMMER_FUN", - "shipping": 3.33, - "tax": 1.11, - "engagement_time_msec": 1, - "items": [ - { - "item_id": "507f1f77bcf86cd799439011", - "item_name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "item_category": "Apparel", - "item_brand": "Google", - "item_variant": "green", - "price": 19, - "quantity": 2, - "index": 1, - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) exclude only 'products' property from 'order refunded' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "order refunded", - "properties": { - "currency": "USD", - "order_id": "T_12345", - "total": 12.21, - "affiliation": "Google Store", - "coupon": "SUMMER_FUN", - "shipping": 3.33, - "tax": 1.11 - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "refund", - "params": { - "currency": "USD", - "transaction_id": "T_12345", - "value": 12.21, - "affiliation": "Google Store", - "coupon": "SUMMER_FUN", - "shipping": 3.33, - "tax": 1.11, - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) check all property mappings for 'product added to wishlist' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "product added to wishlist", - "properties": { - "currency": "USD", - "total": "7.77", - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "add_to_wishlist", - "params": { - "currency": "USD", - "value": 7.77, - "engagement_time_msec": 1, - "items": [ - { - "item_id": "507f1f77bcf86cd799439011", - "item_name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "item_category": "Apparel", - "item_brand": "Google", - "item_variant": "green", - "price": 19, - "quantity": 2, - "index": 1, - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) check all property mappings for 'product_shared' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "product_shared", - "properties": { - "share_via": "Twitter", - "content_type": "image", - "item_id": "C_12345" - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "share", - "params": { - "method": "Twitter", - "content_type": "image", - "item_id": "C_12345", - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) send only 'product_shared' event name without it's properties", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "product_shared", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "share", - "params": { - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) check all property mappings for 'cart Shared' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "cart Shared", - "properties": { - "share_via": "Twitter", - "content_type": "image", - "item_id": "C_12345" - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "share", - "params": { - "method": "Twitter", - "content_type": "image", - "item_id": "C_12345", - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) send only 'cart Shared' event name with empty properties: {}", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "cart Shared", - "properties": {}, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "share", - "params": { - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) check all property mappings for group call", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "group", - "properties": { - "group_id": "G_12345", - "engagementTimeMsec": 100, - "sessionId": 655 - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "group", - "params": { - "group_id": "G_12345", - "engagement_time_msec": 100, - "session_id": 655 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) group: send only group event name without it's properties", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "group", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "group", - "params": { - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) check all property mappings for 'earn virtual currency' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "earn virtual currency", - "properties": { - "virtual_currency_name": "Gems", - "value": 5 - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "earn_virtual_currency", - "params": { - "virtual_currency_name": "Gems", - "value": 5, - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) send only 'earn virtual currency' event name without it's properties", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "earn virtual currency", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "earn_virtual_currency", - "params": { - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) check all property mappings for 'generate_lead' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "generate_lead", - "properties": { - "currency": "USD", - "value": 99.99 - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "generate_lead", - "params": { - "currency": "USD", - "value": 99.99, - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) check all property mappings for 'level_up' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "level_up", - "properties": { - "level": 5, - "character": "Player 1" - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "level_up", - "params": { - "level": 5, - "character": "Player 1", - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) send only 'level_up' event name without it's properties", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "level_up", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "level_up", - "params": { - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) check all property mappings for 'login' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "login", - "properties": { - "method": "Google" - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "login", - "params": { - "method": "Google", - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) send only 'login' event name without it's properties", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "login", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "login", - "params": { - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) check all property mappings for 'post_score' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "post_score", - "properties": { - "score": 10000, - "level": 5, - "character": "Player 1" - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "post_score", - "params": { - "score": 10000, - "level": 5, - "character": "Player 1", - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) send only 'login' event name with its required `score` properties", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "post_score", - "properties": { - "score": 10000 - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "post_score", - "params": { - "score": 10000, - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) check all property mappings for 'select_content' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "select_content", - "properties": { - "content_type": "product", - "item_id": "I_12345" - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "select_content", - "params": { - "content_type": "product", - "item_id": "I_12345", - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) send only 'group' event name without it's properties", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "select_content", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "select_content", - "params": { - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) check all property mappings for 'sign_up' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "sign_up", - "properties": { - "method": "Google" - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "sign_up", - "params": { - "method": "Google", - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) send only 'sign_up' event name without it's properties", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "sign_up", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "sign_up", - "params": { - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) check all property mappings for 'spend_virtual_currency' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "spend_virtual_currency", - "properties": { - "value": 5, - "virtual_currency_name": "Gems", - "item_name": "Starter Boost" - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "spend_virtual_currency", - "params": { - "value": 5, - "virtual_currency_name": "Gems", - "item_name": "Starter Boost", - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) send only 'spend_virtual_currency' event name with it's required 'value' and 'virtual_currency_name' properties", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "spend_virtual_currency", - "properties": { - "value": 5, - "virtual_currency_name": "Gems" - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "spend_virtual_currency", - "params": { - "value": 5, - "virtual_currency_name": "Gems", - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) send 'tutorial_begin' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "tutorial_begin", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "tutorial_begin", - "params": { - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) send 'tutorial_complete' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "tutorial_complete", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "tutorial_complete", - "params": { - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) send all properties for 'unlock_achievement' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "unlock_achievement", - "properties": { - "achievement_id": "A_12345" - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "unlock_achievement", - "params": { - "achievement_id": "A_12345", - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) send all properties for 'view_search_results' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "view_search_results", - "properties": { - "search_term": "Clothing", - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "view_search_results", - "params": { - "search_term": "Clothing", - "engagement_time_msec": 1, - "items": [ - { - "item_id": "507f1f77bcf86cd799439011", - "item_name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "item_category": "Apparel", - "item_brand": "Google", - "item_variant": "green", - "price": 19, - "quantity": 2, - "index": 1, - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) pass only 'products: [...]' property for 'view_search_results' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "view_search_results", - "properties": { - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "view_search_results", - "params": { - "engagement_time_msec": 1, - "items": [ - { - "item_id": "507f1f77bcf86cd799439011", - "item_name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "item_category": "Apparel", - "item_brand": "Google", - "item_variant": "green", - "price": 19, - "quantity": 2, - "index": 1, - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) pass custom event name 'rudderstack event' to GA4 along with custom properties", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "rudderstack event", - "properties": { - "total": "10", - "timezone": { - "name": "Europe/Tallinn" - }, - "engagementTimeMsec": 100, - "sessionId": 655 - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "rudderstack_event", - "params": { - "total": "10", - "timezone_name": "Europe/Tallinn", - "engagement_time_msec": 100, - "session_id": 655 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) pass custom event name 'rudderstack event' to GA4 along with custom properties and user_properties", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "rudderstack event", - "properties": { - "total": "10", - "user_properties": { - "price": "19" - } - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "user_properties": { - "price": { - "value": "19" - } - }, - "events": [ - { - "name": "rudderstack_event", - "params": { - "total": "10", - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "[Error]: (gtag) pass reserved event name to GA4", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "ad_click", - "properties": { - "total": "10" - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "statusCode": 400, - "error": "track:: Reserved event names are not allowed", - "statTags": { - "destination": "ga4", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "[Exclusion]: (gtag) pass reserved property name to GA4 for custom events", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "rudderstack event", - "properties": { - "firebase_conversion": "firebase_conversion", - "google_id": "1234", - "ga_value": "ga_value", - "value": "10" - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "rudderstack_event", - "params": { - "value": "10", - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "[Exclusion]: (gtag) pass reserved property name and reserved properties in `user_properties` to GA4 for custom events", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "rudderstack event", - "properties": { - "firebase_conversion": "firebase_conversion", - "google_id": "1234", - "ga_value": "ga_value", - "value": "10", - "user_properties": { - "first_open_time": "first_open_time", - "user_id": "user_id", - "firebase_value": "firebase_value", - "price": "100" - } - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "user_properties": { - "price": { - "value": "100" - } - }, - "events": [ - { - "name": "rudderstack_event", - "params": { - "value": "10", - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "[Error]: (gtag) pass reserved event names along with reserved properties", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "app_remove", - "properties": { - "firebase_conversion": "firebase_conversion", - "google_id": "1234", - "ga_value": "ga_value", - "value": "10", - "user_properties": { - "first_open_time": "first_open_time", - "user_id": "user_id", - "firebase_value": "firebase_value", - "price": "100" - } - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "statusCode": 400, - "error": "track:: Reserved event names are not allowed", - "statTags": { - "destination": "ga4", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "[Error] (gtag) pass reserved custom prefix names to GA4 events", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "firebase_event1", - "properties": { - "firebase_conversion": "firebase_conversion", - "google_id": "1234", - "ga_value": "ga_value", - "value": "10" - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "statusCode": 400, - "error": "Reserved custom prefix names are not allowed", - "statTags": { - "destination": "ga4", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "(gtag) check all property mappings for 'product added' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "product added", - "properties": { - "currency": "USD", - "total": "7.77", - "google_data": "google_data", - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "add_to_cart", - "params": { - "currency": "USD", - "value": 7.77, - "engagement_time_msec": 1, - "items": [ - { - "item_id": "507f1f77bcf86cd799439011", - "item_name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "item_category": "Apparel", - "item_brand": "Google", - "item_variant": "green", - "price": 19, - "quantity": 2, - "index": 1, - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) pass custom event name with its properties", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "rudderstack event", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "rudderstack_event", - "params": { - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) map 'product added' properties to ga4 'add_to_cart' items array", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "product added", - "properties": { - "affiliation": "Google Merchandise Store", - "brand": "Google", - "category": "Related_products", - "coupon": "SUMMER_FUN", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "list_id": "related_products", - "location_id": "L_12345", - "name": "Monopoly: 3rd Edition", - "position": "1", - "price": "19", - "product_id": "507f1f77bcf86cd799439011", - "products": [], - "quantity": "2", - "total": "7.77", - "variant": "green" - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "body": { - "FORM": {}, - "JSON": { - "client_id": "client_id", - "events": [ - { - "name": "add_to_cart", - "params": { - "currency": "USD", - "engagement_time_msec": 1, - "items": [ - { - "affiliation": "Google Merchandise Store", - "coupon": "SUMMER_FUN", - "currency": "USD", - "discount": 2.22, - "index": 1, - "item_brand": "Google", - "item_category": "Related_products", - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_id": "507f1f77bcf86cd799439011", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "item_name": "Monopoly: 3rd Edition", - "item_variant": "green", - "location_id": "L_12345", - "price": 19, - "quantity": 2 - } - ], - "list_id": "related_products", - "value": 7.77 - } - } - ], - "non_personalized_ads": true, - "timestamp_micros": 1650950229000000 - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://www.google-analytics.com/mp/collect", - "files": {}, - "headers": { - "Content-Type": "application/json", - "HOST": "www.google-analytics.com" - }, - "method": "POST", - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "type": "REST", - "version": "1" - } - }, - { - "description": "(gtag) pass event name with invalid data type for products: {...} properties (when products parameter is optional)", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "product added", - "properties": { - "currency": "USD", - "total": "7.77", - "products": { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - }, - "affiliation": "Google Merchandise Store", - "brand": "Google", - "category": "Related_products", - "coupon": "SUMMER_FUN", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "list_id": "related_products", - "location_id": "L_12345", - "name": "Monopoly: 3rd Edition", - "position": "1", - "price": "19", - "product_id": "507f1f77bcf86cd799439011", - "quantity": "2", - "variant": "green" - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "body": { - "FORM": {}, - "JSON": { - "client_id": "client_id", - "events": [ - { - "name": "add_to_cart", - "params": { - "currency": "USD", - "engagement_time_msec": 1, - "items": [ - { - "affiliation": "Google Merchandise Store", - "coupon": "SUMMER_FUN", - "currency": "USD", - "discount": 2.22, - "index": 1, - "item_brand": "Google", - "item_category": "Related_products", - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_id": "507f1f77bcf86cd799439011", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "item_name": "Monopoly: 3rd Edition", - "item_variant": "green", - "location_id": "L_12345", - "price": 19, - "quantity": 2 - } - ], - "list_id": "related_products", - "value": 7.77 - } - } - ], - "non_personalized_ads": true, - "timestamp_micros": 1650950229000000 - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://www.google-analytics.com/mp/collect", - "files": {}, - "headers": { - "Content-Type": "application/json", - "HOST": "www.google-analytics.com" - }, - "method": "POST", - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "type": "REST", - "version": "1" - } - }, - { - "description": "[Error] (gtag) pass event name to GA4 with missing fields i.e required in products: [..]", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "product added", - "properties": { - "currency": "USD", - "total": "7.77", - "products": [ - { - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "statusCode": 400, - "error": "One of product_id or name is required", - "statTags": { - "destination": "ga4", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "[Error] (gtag) pass event name to GA4 with missing fields i.e required in properties", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "Product Viewed", - "properties": { - "currency": "USD", - "total": "7.77" - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "statusCode": 400, - "error": "One of product_id or name is required", - "statTags": { - "destination": "ga4", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "[Error] (gtag) missing API Secret", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "tutotial complete", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "statusCode": 400, - "error": "API Secret not found. Aborting ", - "statTags": { - "destination": "ga4", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "[Error] (gtag) missing measurementId", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "tutotial complete", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "statusCode": 400, - "error": "measurementId must be provided. Aborting", - "statTags": { - "destination": "ga4", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "(gtag) firing group event with event name. should take event name by default", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "group", - "event": "tutorial complete", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "client_id": "client_id", - "events": [ - { - "name": "join_group", - "params": { - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "[Error] (gtag) payload has missing message.type", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "event": "tutotial complete", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "statusCode": 400, - "error": "Message Type is not present. Aborting message.", - "statTags": { - "destination": "ga4", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "[Error] (gtag) payload has missing event name", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "statusCode": 400, - "error": "Event name is required", - "statTags": { - "destination": "ga4", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "(gtag) taking client_id from anonymousId", - "input": { - "message": { - "channel": "web", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "tutotial complete", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "client_id": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "events": [ - { - "name": "tutotial_complete", - "params": { - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "[Error] (firebase) payload has missing ga4AppInstanceId", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "tutotial complete", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "", - "firebaseAppId": "1:17864591371:android:7a9520d3c78962e21f9fee", - "blockPageViewEvent": false, - "typesOfClient": "firebase", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "statusCode": 400, - "error": "ga4AppInstanceId must be provided under externalId", - "statTags": { - "destination": "ga4", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "[Error] (firebase) pass reserved event name", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "app_store_subscription_cancel", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "", - "firebaseAppId": "1:17864591371:android:7a9520d3c78962e21f9fee", - "blockPageViewEvent": false, - "typesOfClient": "firebase", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "statusCode": 400, - "error": "Reserved custom event names are not allowed", - "statTags": { - "destination": "ga4", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "(gtag) check all property mappings for 'tutorial complete' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "tutorial complete", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "non_personalized_ads": true, - "events": [ - { - "name": "tutorial_complete", - "params": { - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) check all property mappings for 'cart viewed' event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "cart viewed", - "properties": { - "currency": "USD", - "total": "7.77", - "products": [ - { - "product_id": 0, - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "view_cart", - "params": { - "currency": "USD", - "value": 7.77, - "engagement_time_msec": 1, - "items": [ - { - "item_id": 0, - "coupon": "SUMMER_FUN", - "item_category": "Apparel", - "item_brand": "Google", - "item_variant": "green", - "price": 19, - "quantity": 2, - "index": 1, - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "[Error]: (firebase) missing firebaseAppId", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "promotion clicked", - "properties": { - "creative_name": "Summer Banner", - "creative_slot": "featured_app_1", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "0", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "creative_name": "summer_banner2", - "creative_slot": "featured_app_1" - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "", - "typesOfClient": "firebase", - "firebaseAppId": "", - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "statusCode": 400, - "error": "firebaseAppId must be provided. Aborting", - "statTags": { - "destination": "ga4", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "(gtag) firing page call", - "input": { - "message": { - "channel": "web", - "rudderId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "page", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "typesOfClient": "gtag", - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "client_id": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "events": [ - { - "name": "page_view", - "params": { - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) firing page call with custom properties", - "input": { - "message": { - "channel": "web", - "rudderId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "page", - "event": "page view", - "properties": { - "view": "login" - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "typesOfClient": "gtag", - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "client_id": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "events": [ - { - "name": "page_view", - "params": { - "view": "login", - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "[Error]: (gtag) pass timestamp more than 72 hours into the past", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-20T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "tutotial complete", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "typesOfClient": "gtag", - "blockPageViewEvent": false, - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "statusCode": 400, - "error": "Allowed timestamp is [72 hours] into the past", - "statTags": { - "destination": "ga4", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "[Error]: (gtag) pass timestamp more than 15 min into the future", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-05-05T15:47:57Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "tutotial complete", - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "typesOfClient": "gtag", - "blockPageViewEvent": false, - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "statusCode": 400, - "error": "Allowed timestamp is [15 minutes] into the future", - "statTags": { - "destination": "ga4", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "(gtag) pass custom properties along with products: [..] parameters to GA4 standard events along with its stated ones", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "order completed", - "properties": { - "checkout_id": "12345", - "order_id": "1234", - "myCustomProp": "My arbitray value", - "affiliation": "Apple Store", - "total": 20, - "revenue": 15.0, - "shipping": 22, - "tax": 1, - "discount": 1.5, - "coupon": "ImagePro", - "currency": "USD", - "products": [ - { - "product_id": "123", - "sku": "G-32", - "name": "Monopoly", - "price": 14, - "quantity": 1, - "category": "Games", - "item_category2": "Board games", - "url": "https://www.website.com/product/path", - "image_url": "https://www.website.com/product/path.jpg" - } - ], - "timezone": { - "name": "Europe/Tallinn" - } - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "purchase", - "params": { - "checkout_id": "12345", - "transaction_id": "1234", - "myCustomProp": "My arbitray value", - "affiliation": "Apple Store", - "value": 20, - "shipping": 22, - "tax": 1, - "discount": 1.5, - "coupon": "ImagePro", - "currency": "USD", - "engagement_time_msec": 1, - "items": [ - { - "item_id": "123", - "sku": "G-32", - "item_name": "Monopoly", - "price": 14, - "quantity": 1, - "item_category": "Games", - "item_category2": "Board games", - "url": "https://www.website.com/product/path", - "image_url": "https://www.website.com/product/path.jpg" - } - ], - "timezone_name": "Europe/Tallinn" - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) pass custom properties excluding products: [..] parameter to GA4 standard events along with its stated ones", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "promotion clicked", - "properties": { - "customProp-1": "check-1", - "customProp-2": "check-2", - "timezone": { - "name": "Europe/Tallinn" - }, - "creative_name": "Summer Banner", - "creative_slot": "featured_app_1", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale" - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "client_id": "client_id", - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "events": [ - { - "name": "select_promotion", - "params": { - "customProp-1": "check-1", - "customProp-2": "check-2", - "timezone_name": "Europe/Tallinn", - "creative_name": "Summer Banner", - "creative_slot": "featured_app_1", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) message type group -> 'join_group' with custom event", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "group", - "traits": { - "custom1": 1234, - "custom2": "custom2", - "timezone": { - "name": "Europe/Tallinn" - }, - "engagementTimeMsec": 100, - "sessionId": 655 - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "client_id": "client_id", - "events": [ - { - "name": "join_group", - "params": { - "custom1": 1234, - "custom2": "custom2", - "timezone_name": "Europe/Tallinn", - "engagement_time_msec": 100, - "session_id": 655 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag): check args keyword for price x currency multiplication", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "product added", - "properties": { - "currency": "USD", - "price": 2.4, - "quantity": 2, - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "client_id": "client_id", - "events": [ - { - "name": "add_to_cart", - "params": { - "currency": "USD", - "value": 4.8, - "engagement_time_msec": 1, - "items": [ - { - "item_id": "507f1f77bcf86cd799439011", - "item_name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "item_category": "Apparel", - "item_brand": "Google", - "item_variant": "green", - "price": 19, - "quantity": 2, - "index": 1, - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ], - "price": 2.4, - "quantity": 2 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag): take page properties from context.page for 'page' call along with custom properties", - "input": { - "message": { - "channel": "web", - "rudderId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "page": { - "url": "http://morkey.in", - "path": "/cart", - "title": "miphone", - "search": "MI", - "referrer": "morkey" - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "page", - "integrations": { - "All": true - }, - "properties": { - "cust1": 1234, - "engagementTimeMsec": 100, - "sessionId": 655 - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "client_id": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "events": [ - { - "name": "page_view", - "params": { - "page_referrer": "morkey", - "page_title": "miphone", - "page_location": "http://morkey.in", - "cust1": 1234, - "engagement_time_msec": 100, - "session_id": 655 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "[Error] GA4: event not as string", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2022-04-26T05:17:09Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": { - "name": "promotion_viewed" - }, - "properties": { - "creative_name": "Summer Banner", - "creative_slot": "featured_app_1", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "0", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345", - "promotion_id": "P_12345", - "promotion_name": "Summer Sale", - "creative_name": "summer_banner2", - "creative_slot": "featured_app_1" - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-04-20T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "statusCode": 400, - "error": "track:: event name should be string", - "statTags": { - "destination": "ga4", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "[Error] GA4: client_id not found in all four path", - "input": { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "product added", - "properties": { - "currency": "USD", - "price": 2.4, - "quantity": 2, - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - }, - "integrations": { - "All": true - } - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6BET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": true, - "sendLoginSignup": true, - "newOrExistingUserTrait": "firstLogin", - "loginSignupMethod": "method", - "generateLead": true, - "generateLeadValueTrait": "value", - "generateLeadCurrencyTrait": "currency", - "clientIdFieldIdentifier": "properties.client_id" - }, - "Enabled": true - } - }, - "output": { - "statusCode": 400, - "error": "ga4ClientId, anonymousId or messageId must be provided", - "statTags": { - "destination": "ga4", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "client_id isn't sent from the path defined in the webapp config, falling back to default values i.e here it is anonymousId", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "product added", - "properties": { - "currency": "USD", - "price": 2.4, - "quantity": 2, - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - }, - "integrations": { - "All": true - } - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6BET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": true, - "sendLoginSignup": true, - "newOrExistingUserTrait": "firstLogin", - "loginSignupMethod": "method", - "generateLead": true, - "generateLeadValueTrait": "value", - "generateLeadCurrencyTrait": "currency", - "clientIdFieldIdentifier": "properties.client_id" - }, - "Enabled": true - } - }, - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "name": "add_to_cart", - "params": { - "items": [ - { - "index": 1, - "price": 19, - "coupon": "SUMMER_FUN", - "item_id": "507f1f77bcf86cd799439011", - "currency": "USD", - "discount": 2.22, - "quantity": 2, - "item_name": "Monopoly: 3rd Edition", - "item_brand": "Google", - "affiliation": "Google Merchandise Store", - "location_id": "L_12345", - "item_list_id": "related_products", - "item_variant": "green", - "item_category": "Apparel", - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_name": "Related Products" - } - ], - "price": 2.4, - "value": 4.8, - "currency": "USD", - "quantity": 2, - "engagement_time_msec": 1 - } - } - ], - "client_id": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "non_personalized_ads": true - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6BET4" - }, - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://www.google-analytics.com/mp/collect" - } - }, - { - "description": "any custom or item property with array value, is flattened with underscore delimeter", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "product added", - "originalTimestamp": "2022-04-26T05:17:09Z", - "properties": { - "currency": "USD", - "total": "7.77", - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345", - "address": { - "city": "kolkata", - "district": "24pgs" - }, - "categoryLevels": ["Furniture", "Bedroom Furniture", "Dressers & Chests"], - "products": [ - { - "product_id": "1234", - "product_details": { - "colour": "red", - "shape": "rectangle" - }, - "productLevels": ["test1", "test2", "test3"] - } - ] - }, - "integrations": { - "All": true - }, - "sentAt": "2022-11-14T15:20:57Z" - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": false, - "sendLoginSignup": false, - "generateLead": false - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "timestamp_micros": 1650950229000000, - "non_personalized_ads": true, - "client_id": "client_id", - "events": [ - { - "name": "add_to_cart", - "params": { - "currency": "USD", - "value": 7.77, - "items": [ - { - "item_id": "1234", - "product_details_colour": "red", - "product_details_shape": "rectangle", - "productLevels_0": "test1", - "productLevels_1": "test2", - "productLevels_2": "test3" - } - ], - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345", - "address_city": "kolkata", - "address_district": "24pgs", - "categoryLevels_0": "Furniture", - "categoryLevels_1": "Bedroom Furniture", - "categoryLevels_2": "Dressers & Chests", - "engagement_time_msec": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "extract session_id from context.sessionId", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36", - "sessionId": 16678456735 - }, - "type": "track", - "event": "product added", - "properties": { - "currency": "USD", - "price": 2.4, - "quantity": 2, - "client_id": "client@1234", - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - }, - "integrations": { - "All": true - } - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6BET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": true, - "sendLoginSignup": true, - "newOrExistingUserTrait": "firstLogin", - "loginSignupMethod": "method", - "generateLead": true, - "generateLeadValueTrait": "value", - "generateLeadCurrencyTrait": "currency" - }, - "Enabled": true - } - }, - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "name": "add_to_cart", - "params": { - "items": [ - { - "index": 1, - "price": 19, - "coupon": "SUMMER_FUN", - "item_id": "507f1f77bcf86cd799439011", - "currency": "USD", - "discount": 2.22, - "quantity": 2, - "item_name": "Monopoly: 3rd Edition", - "item_brand": "Google", - "affiliation": "Google Merchandise Store", - "location_id": "L_12345", - "item_list_id": "related_products", - "item_variant": "green", - "item_category": "Apparel", - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_name": "Related Products" - } - ], - "price": 2.4, - "value": 4.8, - "currency": "USD", - "quantity": 2, - "session_id": 16678456735, - "engagement_time_msec": 1, - "client_id": "client@1234" - } - } - ], - "client_id": "client_id", - "non_personalized_ads": true - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6BET4" - }, - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://www.google-analytics.com/mp/collect" - } - }, - { - "description": "(gtag) send integer userId", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "userId": 34567, - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36", - "sessionId": 16678456735 - }, - "type": "track", - "event": "product added", - "properties": { - "currency": "USD", - "price": 2.4, - "quantity": 2, - "client_id": "client@1234", - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "name": "Monopoly: 3rd Edition", - "coupon": "SUMMER_FUN", - "category": "Apparel", - "brand": "Google", - "variant": "green", - "price": "19", - "quantity": "2", - "position": "1", - "affiliation": "Google Merchandise Store", - "currency": "USD", - "discount": 2.22, - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_id": "related_products", - "item_list_name": "Related Products", - "location_id": "L_12345" - } - ] - }, - "integrations": { - "All": true - } - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6BET4", - "firebaseAppId": "", - "blockPageViewEvent": false, - "typesOfClient": "gtag", - "extendPageViewParams": false, - "sendUserId": false, - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "enableServerSideIdentify": true, - "sendLoginSignup": true, - "newOrExistingUserTrait": "firstLogin", - "loginSignupMethod": "method", - "generateLead": true, - "generateLeadValueTrait": "value", - "generateLeadCurrencyTrait": "currency" - }, - "Enabled": true - } - }, - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "name": "add_to_cart", - "params": { - "items": [ - { - "index": 1, - "price": 19, - "coupon": "SUMMER_FUN", - "item_id": "507f1f77bcf86cd799439011", - "currency": "USD", - "discount": 2.22, - "quantity": 2, - "item_name": "Monopoly: 3rd Edition", - "item_brand": "Google", - "affiliation": "Google Merchandise Store", - "location_id": "L_12345", - "item_list_id": "related_products", - "item_variant": "green", - "item_category": "Apparel", - "item_category2": "Adult", - "item_category3": "Shirts", - "item_category4": "Crew", - "item_category5": "Short sleeve", - "item_list_name": "Related Products" - } - ], - "price": 2.4, - "value": 4.8, - "currency": "USD", - "quantity": 2, - "session_id": 16678456735, - "engagement_time_msec": 1, - "client_id": "client@1234" - } - } - ], - "client_id": "client_id", - "user_id": "34567", - "non_personalized_ads": true - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6BET4" - }, - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://www.google-analytics.com/mp/collect" - } - }, - { - "description": "(gtag) login event with user_properties", - "input": { - "message": { - "userId": "user@1", - "channel": "web", - "anonymousId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "traits": { - "campaign": "advertizing" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "login", - "properties": { - "method": "facebook" - }, - "integrations": { - "All": true - } - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6BET4", - "firebaseAppId": "", - "typesOfClient": "gtag", - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "name": "login", - "params": { - "method": "facebook", - "engagement_time_msec": 1 - } - } - ], - "user_id": "user@1", - "user_properties": { - "campaign": { - "value": "advertizing" - } - }, - "client_id": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "non_personalized_ads": true - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6BET4" - }, - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://www.google-analytics.com/mp/collect" - } - }, - { - "description": "(gtag) sign_up event", - "input": { - "message": { - "userId": "user@1", - "channel": "web", - "anonymousId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "traits": { - "campaign": "advertizing" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "sign_up", - "properties": { - "method": "google" - }, - "integrations": { - "All": true - } - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6BET4", - "firebaseAppId": "", - "typesOfClient": "gtag", - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "name": "sign_up", - "params": { - "method": "google", - "engagement_time_msec": 1 - } - } - ], - "user_id": "user@1", - "user_properties": { - "campaign": { - "value": "advertizing" - } - }, - "client_id": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "non_personalized_ads": true - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6BET4" - }, - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://www.google-analytics.com/mp/collect" - } - }, - { - "description": "(gtag) generate_lead event", - "input": { - "message": { - "userId": "user@1", - "channel": "web", - "anonymousId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "traits": { - "campaign": "advertizing" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "generate_lead", - "properties": { - "source": "instagram", - "value": 20 - }, - "integrations": { - "All": true - } - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6BET4", - "firebaseAppId": "", - "typesOfClient": "gtag", - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "name": "generate_lead", - "params": { - "currency": "USD", - "value": 20, - "source": "instagram", - "engagement_time_msec": 1 - } - } - ], - "user_id": "user@1", - "user_properties": { - "campaign": { - "value": "advertizing" - } - }, - "client_id": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "non_personalized_ads": true - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6BET4" - }, - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://www.google-analytics.com/mp/collect" - } - }, - { - "description": "(gtag) track call with page information such as url, title, referrer", - "input": { - "message": { - "userId": "user@1", - "channel": "web", - "anonymousId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "page": { - "initial_referrer": "$direct", - "path": "/", - "referrer": "$direct", - "tab_url": "https://www.rudderstack.com/", - "title": "Document", - "url": "https://www.rudderstack.com/" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "generate_lead", - "properties": { - "source": "instagram", - "value": 20 - }, - "integrations": { - "All": true - } - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6BET4", - "firebaseAppId": "", - "typesOfClient": "gtag", - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "name": "generate_lead", - "params": { - "currency": "USD", - "value": 20, - "source": "instagram", - "page_location": "https://www.rudderstack.com/", - "page_referrer": "$direct", - "page_title": "Document", - "engagement_time_msec": 1 - } - } - ], - "user_id": "user@1", - "client_id": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "non_personalized_ads": true - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6BET4" - }, - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://www.google-analytics.com/mp/collect" - } - }, - { - "description": "(gtag) track event with hybrid connection mode using buffer cloud mode event approach", - "input": { - "message": { - "userId": "user@1", - "channel": "web", - "anonymousId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "traits": { - "campaign": "advertizing" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "generate_lead", - "properties": { - "source": "instagram", - "value": 20 - }, - "integrations": { - "All": true, - "Google Analytics 4 (GA4)": { - "clientId": "554581488.1683172875", - "sessionId": "1683172875" - } - } - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6BET4", - "firebaseAppId": "", - "typesOfClient": "gtag", - "eventFilteringOption": "disable", - "connectionMode": "hybrid", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "name": "generate_lead", - "params": { - "currency": "USD", - "value": 20, - "source": "instagram", - "session_id": "1683172875", - "engagement_time_msec": 1 - } - } - ], - "user_id": "user@1", - "user_properties": { - "campaign": { - "value": "advertizing" - } - }, - "client_id": "554581488.1683172875", - "non_personalized_ads": true - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6BET4" - }, - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://www.google-analytics.com/mp/collect" - } - }, - { - "description": "(gtag) track event with hybrid connection mode using override client_id and session_id approach", - "input": { - "message": { - "userId": "user@1", - "channel": "web", - "anonymousId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "traits": { - "campaign": "advertizing" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36", - "sessionId": 1683172874065 - }, - "type": "track", - "event": "generate_lead", - "properties": { - "source": "instagram", - "value": 20 - }, - "integrations": { - "All": true - } - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6BET4", - "firebaseAppId": "", - "typesOfClient": "gtag", - "eventFilteringOption": "disable", - "connectionMode": "hybrid", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "name": "generate_lead", - "params": { - "currency": "USD", - "value": 20, - "source": "instagram", - "session_id": 1683172874065, - "engagement_time_msec": 1 - } - } - ], - "user_id": "user@1", - "user_properties": { - "campaign": { - "value": "advertizing" - } - }, - "client_id": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "non_personalized_ads": true - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6BET4" - }, - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://www.google-analytics.com/mp/collect" - } - }, - { - "description": "(gtag) firing group calls with GA4 hybrid mode connection", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "group", - "event": "tutorial complete", - "integrations": { - "Google Analytics 4": { - "clientId": "4718026.1683606287", - "sessionId": "1683606287", - "sessionNumber": 1 - } - } - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "typesOfClient": "gtag", - "eventFilteringOption": "disable", - "connectionMode": "hybrid", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://www.google-analytics.com/mp/collect", - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "body": { - "JSON": { - "non_personalized_ads": true, - "client_id": "4718026.1683606287", - "events": [ - { - "name": "join_group", - "params": { - "engagement_time_msec": 1, - "session_id": "1683606287", - "session_number": 1 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "(gtag) sign_up event with all data types of user_properties", - "input": { - "message": { - "userId": "user@1", - "channel": "web", - "anonymousId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "traits": { - "campaign": "advertizing", - "name": "rudder", - "age": 45, - "hobby": ["dancing", "singing", "reading"], - "enableEURegion": false, - "isEnterpriseUser": { - "value": false - } - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "sign_up", - "properties": { - "method": "google" - }, - "integrations": { - "All": true - } - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6BET4", - "firebaseAppId": "", - "typesOfClient": "gtag", - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "name": "sign_up", - "params": { - "method": "google", - "engagement_time_msec": 1 - } - } - ], - "user_id": "user@1", - "client_id": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "user_properties": { - "age": { - "value": 45 - }, - "name": { - "value": "rudder" - }, - "campaign": { - "value": "advertizing" - }, - "enableEURegion": { - "value": false - } - }, - "non_personalized_ads": true - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6BET4" - }, - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://www.google-analytics.com/mp/collect" - } - }, - { - "description": "[Error]: (gtag) event name starts with numbers", - "input": { - "message": { - "channel": "web", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "1234_sign_up", - "properties": { - "total": "10" - }, - "integrations": { - "All": true - } - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "typesOfClient": "gtag", - "eventFilteringOption": "disable", - "connectionMode": "cloud", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - "output": { - "statusCode": 400, - "error": "Event name must start with a letter and can only contain letters, numbers, and underscores", - "statTags": { - "destination": "ga4", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "(gtag) event having multiple empty array and object parameters", - "input": { - "message": { - "type": "track", - "event": "logIn", - "userId": "user@1", - "group_id": "group@1", - "anon_id": "78e95d6d-58c0-4237-b99e-2ef510b6d502", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "ga4AppInstanceId", - "id": "f0dd99b6f979fb551ce583373900f937" - }, - { - "type": "ga4ClientId", - "id": "client_id" - } - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "properties": { - "user_interest": "Moderate", - "company_interest": "", - "profile": [ - { - "is_6qa": true, - "product": null, - "product_fit": "Moderate", - "product_stage": "Purchase", - "intent_score": 89, - "profile_score": 52, - "product_display$name": "rudderstack" - } - ], - "user_company": "Analytics consulting", - "user_account": "1", - "user_id_mappings": "330098|245252|461224|282599", - "company_naics_6sense": "5173", - "usr_consent": null, - "firebase_user_id": "kdgMnP", - "google_user_id": "G-123456", - "company_domain": "consulting.net", - "company_region": "New Zealand", - "user_product_interests": { - "ids": [], - "list": [ - { - "id": 330098, - "name": [] - }, - { - "id": 245252, - "name": {} - } - ], - "names": [] - }, - "company_country": {}, - "company_industry": "Business Analytics", - "company_revenue": "$5M - $10M", - "company_annual_revenue": "5568000", - "company_sic_description": "", - "company_naics_description": [] - }, - "integrations": { - "All": true - } - }, - "destination": { - "Config": { - "apiSecret": "dummyApiSecret", - "measurementId": "G-T40PE6KET4", - "firebaseAppId": "", - "typesOfClient": "gtag", - "eventFilteringOption": "disable", - "connectionMode": "cloud", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "name": "login", - "params": { - "company_annual_revenue": "5568000", - "company_domain": "consulting.net", - "company_industry": "Business Analytics", - "company_naics_6sense": "5173", - "company_region": "New Zealand", - "company_revenue": "$5M - $10M", - "engagement_time_msec": 1, - "profile_0_intent_score": 89, - "profile_0_is_6qa": true, - "profile_0_product_display$name": "rudderstack", - "profile_0_product_fit": "Moderate", - "profile_0_product_stage": "Purchase", - "profile_0_profile_score": 52, - "user_account": "1", - "user_company": "Analytics consulting", - "user_id_mappings": "330098|245252|461224|282599", - "user_interest": "Moderate", - "user_product_interests_list_0_id": 330098, - "user_product_interests_list_1_id": 245252 - } - } - ], - "user_id": "user@1", - "client_id": "client_id", - "non_personalized_ads": true - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": { - "api_secret": "dummyApiSecret", - "measurement_id": "G-T40PE6KET4" - }, - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://www.google-analytics.com/mp/collect" - } - }, - { - "description": "(gtag) campaign_details custom event", - "input": { - "message": { - "userId": "user@1", - "channel": "web", - "anonymousId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "device": { - "adTrackingEnabled": "false", - "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", - "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", - "manufacturer": "Google", - "model": "AOSP on IA Emulator", - "name": "generic_x86_arm", - "type": "ios", - "attTrackingStatus": 3 - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "iOS", - "version": "14.4.1" - }, - "screen": { - "density": 2 - }, - "campaign": { - "id": "google_1234", - "name": "Summer_fun", - "source": "google", - "medium": "cpc", - "term": "summer+travel", - "content": "logo link" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" - }, - "type": "track", - "event": "Campaign Details", - "properties": {}, - "integrations": { - "All": true - } - }, - "destination": { - "Config": { - "apiSecret": "QyWKGHj8QhG2L4ePAPiXCA", - "measurementId": "G-T40PE6BET4", - "typesOfClient": "gtag", - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - "output": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "events": [ - { - "name": "campaign_details", - "params": { - "campaign_id": "google_1234", - "campaign": "Summer_fun", - "source": "google", - "medium": "cpc", - "term": "summer+travel", - "content": "logo link", - "engagement_time_msec": 1 - } - } - ], - "user_id": "user@1", - "client_id": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "non_personalized_ads": true - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": { - "api_secret": "QyWKGHj8QhG2L4ePAPiXCA", - "measurement_id": "G-T40PE6BET4" - }, - "headers": { - "HOST": "www.google-analytics.com", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://www.google-analytics.com/mp/collect" - } - } -] diff --git a/test/__tests__/data/gainsight_input.json b/test/__tests__/data/gainsight_input.json deleted file mode 100644 index 78c82d002d..0000000000 --- a/test/__tests__/data/gainsight_input.json +++ /dev/null @@ -1,416 +0,0 @@ -[ - { - "destination": { - "Config": { - "domain": "demo-domain.gainsightcloud.com", - "accessKey": "sample-access-key", - "personMap": [], - "companyMap": [], - "eventNameMap": [], - "eventVersionMap": [] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "anon_id", - "type": "identify", - "traits": { - "email": "cosmo@krammer.com", - "name": "Cosmo Krammer", - "linkedinUrl": "https://linkedin.com/cosmo-krammer", - "location": "New York", - "emailOptOut": true, - "masterAvatarTypeCode": 10 - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "domain": "demo-domain.gainsightcloud.com", - "accessKey": "sample-access-key", - "personMap": [{ "from": "age", "to": "age__gc" }], - "companyMap": [], - "eventNameMap": [], - "eventVersionMap": [] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "anon_id", - "type": "identify", - "traits": { - "email": "cosmo@krammer.com", - "name": "Cosmo Krammer", - "linkedinUrl": "https://linkedin.com/cosmo-krammer", - "location": "New York", - "emailOptOut": true, - "masterAvatarTypeCode": 10, - "age": 35, - "randomKey": "this should be dropped" - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "domain": "demo-domain.gainsightcloud.com", - "accessKey": "sample-access-key", - "personMap": [], - "companyMap": [], - "eventNameMap": [], - "eventVersionMap": [] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "anon_id", - "type": "identify", - "traits": { - "name": "Cosmo Krammer", - "linkedinUrl": "https://linkedin.com/cosmo-krammer", - "location": "New York", - "emailOptOut": true, - "masterAvatarTypeCode": 10 - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "domain": "demo-domain.gainsightcloud.com", - "accessKey": "sample-access-key", - "sharedSecret": "sample-shared-secret", - "eventNameMap": [{ "from": "Ticket Resolved", "to": "Ticket Resolved Event" }], - "eventVersionMap": [{ "from": "Ticket Resolved", "to": "1.0.0" }], - "topicName": "Ticket Actions", - "tenantId": "sample-tenant-id", - "personMap": [], - "companyMap": [] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "anon_id", - "type": "track", - "event": "Ticket Resolved", - "properties": { - "ticketId": "sample-ticket-id", - "actionEmail": "sample@email.com", - "status": "resovled" - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "domain": "demo-domain.gainsightcloud.com", - "accessKey": "sample-access-key", - "sharedSecret": "sample-shared-secret", - "personMap": [], - "companyMap": [], - "eventNameMap": [], - "eventVersionMap": [] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 }, - "traits": { - "email": "krammer@seinfeld.com" - } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "anon_id", - "type": "group", - "traits": { - "name": "Kramerica Industries", - "industry": "Sitcom", - "employees": "100", - "status": "complete", - "companyType": "spoof" - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "domain": "demo-domain.gainsightcloud.com", - "accessKey": "sample-access-key", - "sharedSecret": "sample-shared-secret", - "personMap": [], - "companyMap": [], - "eventNameMap": [], - "eventVersionMap": [] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 }, - "traits": { - "email": "krammer@seinfeld.com" - } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "anon_id", - "type": "group", - "traits": { - "name": "Seinfeld Corps", - "industry": "TV Series", - "employees": "50", - "status": "complete" - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "domain": "demo-domain.gainsightcloud.com", - "accessKey": "sample-access-key", - "personMap": [], - "companyMap": [], - "eventNameMap": [], - "eventVersionMap": [] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "anon_id", - "type": "identify", - "traits": { - "email": "cosmo@krammer.com", - "firstname": "Cosmo", - "lastname": "Krammer", - "linkedinUrl": "https://linkedin.com/cosmo-krammer", - "location": "New York", - "emailOptOut": true, - "masterAvatarTypeCode": 10 - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "domain": "demo-domain.gainsightcloud.com", - "accessKey": "sample-access-key", - "sharedSecret": "sample-shared-secret", - "eventNameMap": [{ "from": "Ticket Resolved", "to": "Ticket Resolved Event" }], - "eventVersionMap": [{ "from": "Ticket Resolved", "to": "1.0.0" }], - "topicName": "Ticket Actions", - "tenantId": "sample-tenant-id", - "personMap": [], - "companyMap": [], - "contractId": "externalId-shall-get-precedence" - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 }, - "externalId": [ - { - "type": "gainsightEventContractId", - "id": "sample-contract-id" - } - ] - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "anon_id", - "type": "track", - "event": "Ticket Resolved", - "properties": { - "ticketId": "sample-ticket-id", - "actionEmail": "sample@email.com", - "status": "resovled" - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "domain": "demo-domain.gainsightcloud.com", - "accessKey": "sample-access-key", - "personMap": [{ "from": "car", "to": "car__gc" }], - "companyMap": [], - "eventNameMap": [], - "eventVersionMap": [] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "anon_id", - "type": "identify", - "traits": { - "name": "Bruce Wayne", - "email": "ceo@waynefoundation.com", - "car": "Batmobile", - "comments": "I am Batman!", - "lastName": "Wayne", - "location": "Gotham Central", - "firstName": "Bruce", - "linkedinUrl": "https://www.linkedin.com/in/notyourBatman/" - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - } -] diff --git a/test/__tests__/data/gainsight_output.json b/test/__tests__/data/gainsight_output.json deleted file mode 100644 index 6ed0928121..0000000000 --- a/test/__tests__/data/gainsight_output.json +++ /dev/null @@ -1,215 +0,0 @@ -[ - { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "Email": "cosmo@krammer.com", - "Name": "Cosmo Krammer", - "LinkedinUrl": "https://linkedin.com/cosmo-krammer", - "Location": "New York", - "EmailOptOut": true, - "MasterAvatarTypeCode": 10 - } - }, - "type": "REST", - "files": {}, - "method": "PUT", - "params": {}, - "headers": { - "Accesskey": "sample-access-key", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://demo-domain.gainsightcloud.com/v1.0/api/people" - }, - { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "Email": "cosmo@krammer.com", - "Name": "Cosmo Krammer", - "LinkedinUrl": "https://linkedin.com/cosmo-krammer", - "Location": "New York", - "EmailOptOut": true, - "MasterAvatarTypeCode": 10, - "age__gc": 35 - } - }, - "type": "REST", - "files": {}, - "method": "PUT", - "params": {}, - "headers": { - "Accesskey": "sample-access-key", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://demo-domain.gainsightcloud.com/v1.0/api/people" - }, - { - "error": "email is required for identify" - }, - { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "ticketId": "sample-ticket-id", - "actionEmail": "sample@email.com", - "status": "resovled" - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Accesskey": "sample-access-key", - "tenantId": "sample-tenant-id", - "sharedSecret": "sample-shared-secret", - "Content-Type": "application/json", - "topicName": "Ticket Actions", - "eventName": "Ticket Resolved Event", - "eventVersion": "1.0.0" - }, - "version": "1", - "endpoint": "https://demo-domain.gainsightcloud.com/v1.0/api/eventManager/event" - }, - { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "Email": "krammer@seinfeld.com", - "companies": [ - { - "Company_ID": "1P0203VCESP7AUQMV9E953G" - } - ] - } - }, - "type": "REST", - "files": {}, - "method": "PUT", - "params": {}, - "headers": { - "Accesskey": "sample-access-key", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://demo-domain.gainsightcloud.com/v1.0/api/people" - }, - { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "Email": "krammer@seinfeld.com", - "companies": [ - { - "Company_ID": "1P0203VCESP7AUQMV9E953G" - } - ] - } - }, - "type": "REST", - "files": {}, - "method": "PUT", - "params": {}, - "headers": { - "Accesskey": "sample-access-key", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://demo-domain.gainsightcloud.com/v1.0/api/people" - }, - { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "Email": "cosmo@krammer.com", - "FirstName": "Cosmo", - "LastName": "Krammer", - "Name": "Cosmo Krammer", - "LinkedinUrl": "https://linkedin.com/cosmo-krammer", - "Location": "New York", - "EmailOptOut": true, - "MasterAvatarTypeCode": 10 - } - }, - "type": "REST", - "files": {}, - "method": "PUT", - "params": {}, - "headers": { - "Accesskey": "sample-access-key", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://demo-domain.gainsightcloud.com/v1.0/api/people" - }, - { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "ticketId": "sample-ticket-id", - "actionEmail": "sample@email.com", - "status": "resovled" - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Accesskey": "sample-access-key", - "tenantId": "sample-tenant-id", - "sharedSecret": "sample-shared-secret", - "Content-Type": "application/json", - "topicName": "Ticket Actions", - "eventName": "Ticket Resolved Event", - "eventVersion": "1.0.0", - "contractId": "sample-contract-id" - }, - "version": "1", - "endpoint": "https://demo-domain.gainsightcloud.com/v1.0/api/eventManager/event" - }, - { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "Name": "Bruce Wayne", - "Email": "ceo@waynefoundation.com", - "car__gc": "Batmobile", - "Comments": "I am Batman!", - "LastName": "Wayne", - "Location": "Gotham Central", - "FirstName": "Bruce", - "LinkedinUrl": "https://www.linkedin.com/in/notyourBatman/" - } - }, - "type": "REST", - "files": {}, - "method": "PUT", - "params": {}, - "headers": { - "Accesskey": "sample-access-key", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://demo-domain.gainsightcloud.com/v1.0/api/people" - } -] diff --git a/test/__tests__/data/gainsight_px_input.json b/test/__tests__/data/gainsight_px_input.json deleted file mode 100644 index 31123a46a9..0000000000 --- a/test/__tests__/data/gainsight_px_input.json +++ /dev/null @@ -1,1087 +0,0 @@ -[ - { - "destination": { - "Config": { - "apiKey": "sample-api-key", - "productTagKey": "AP-XABC-123", - "accountAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "userAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "globalContextMap": [ - { - "from": "projectId", - "to": "p-123" - }, - { - "from": "tag", - "to": "sample-category-tag" - } - ] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "userId": "sample-user-id", - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "sample-anon-id", - "type": "track", - "event": "Product Added", - "properties": { - "product_id": "123", - "sku": "F16", - "category": "Games", - "name": "Game", - "brand": "Gamepro", - "variant": "111", - "price": 13.49, - "quantity": 11, - "coupon": "DISC21", - "position": 1, - "url": "https://www.website.com/product/path", - "image_url": "https://www.website.com/product/path.png" - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "sample-api-key", - "productTagKey": "AP-XABC-123", - "accountAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "userAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "globalContextMap": [ - { - "from": "projectId", - "to": "p-123" - }, - { - "from": "tag", - "to": "sample-category-tag" - } - ] - } - }, - "message": { - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "version": "1.27.0", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:8887/", - "path": "/", - "title": "RudderStack in 5", - "search": "", - "tab_url": "http://127.0.0.1:8887/", - "referrer": "$direct", - "initial_referrer": "$direct", - "referring_domain": "", - "initial_referring_domain": "" - }, - "locale": "en-US", - "screen": { - "width": 1512, - "height": 982, - "density": 2, - "innerWidth": 774, - "innerHeight": 774 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.27.0" - }, - "campaign": {}, - "sessionId": 1679967592314, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36", - "properties": { - "email": "84@84.com", - "price": "56.0", - "quantity": "5" - } - }, - "userId": "sample-user-id", - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "sample-anon-id", - "type": "track", - "event": "Marketing - Plan Change Events", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "sample-api-key", - "productTagKey": "AP-XABC-123", - "accountAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "userAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "globalContextMap": [ - { - "from": "projectId", - "to": "p-123" - }, - { - "from": "tag", - "to": "sample-category-tag" - } - ] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "userId": "sample-user-id", - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "sample-anon-id", - "type": "track", - "event": "Track Me", - "properties": { - "description": "Sample Track call", - "globalContext": { - "testOverride": "some-value" - } - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "sample-api-key", - "productTagKey": "AP-XABC-123", - "accountAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "userAttributeMap": [ - { - "from": "hobbyCustomField", - "to": "hobby" - } - ], - "globalContextMap": [] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "userId": "sample-user-id", - "anonymousId": "sample-anon-id", - "type": "identify", - "traits": { - "type": "USER", - "gender": "MALE", - "email": "user@email.com", - "firstName": "Sample", - "lastName": "User", - "signUpDate": 1624431528295, - "title": "engineer", - "countryName": "USA", - "countryCode": "US", - "city": "New York", - "hobbyCustomField": "Sample Hobby" - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "sample-api-key", - "productTagKey": "AP-XABC-123", - "accountAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "userAttributeMap": [], - "globalContextMap": [] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "type": "USER", - "gender": "MALE", - "email": "user@email.com", - "firstName": "Sample", - "lastName": "User", - "medium": null - } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "sample-anon-id", - "userId": "sample-user-id", - "groupId": "ecorp-id", - "type": "group", - "traits": { - "name": "ECorp", - "industry": "software", - "numberOfEmployees": 400, - "website": "www.ecorp.com", - "plan": "premium" - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "sample-api-key", - "productTagKey": "AP-XABC-123", - "accountAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "userAttributeMap": [ - { - "from": "hobbyCustomField", - "to": "hobby" - } - ], - "globalContextMap": [] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "identify", - "traits": { - "type": "USER", - "gender": "MALE", - "email": "user@email.com", - "firstName": "Sample", - "lastName": "User", - "signUpDate": 1624431528295, - "title": "engineer", - "countryName": "USA", - "countryCode": "US", - "city": "New York", - "hobbyCustomField": "Sample Hobby" - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "sample-api-key", - "productTagKey": "AP-XABC-123", - "accountAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "userAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "globalContextMap": [ - { - "from": "projectId", - "to": "p-123" - }, - { - "from": "tag", - "to": "sample-category-tag" - } - ] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "track", - "event": "Product Added", - "properties": { - "product_id": "123", - "sku": "F16", - "category": "Games", - "name": "Game", - "brand": "Gamepro", - "variant": "111", - "price": 13.49, - "quantity": 11, - "coupon": "DISC21", - "position": 1, - "url": "https://www.website.com/product/path", - "image_url": "https://www.website.com/product/path.png" - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "sample-api-key", - "productTagKey": "AP-XABC-123", - "accountAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "userAttributeMap": [], - "globalContextMap": [] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "type": "USER", - "gender": "MALE", - "email": "user@email.com", - "firstName": "Sample", - "lastName": "User" - } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "sample-anon-id", - "userId": "sample-user-id", - "type": "group", - "traits": { - "name": "ECorp", - "industry": "software", - "numberOfEmployees": 400, - "website": "www.ecorp.com", - "plan": "premium" - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "sample-api-key", - "productTagKey": "AP-XABC-123", - "accountAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "userAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "globalContextMap": [ - { - "from": "projectId", - "to": "p-123" - }, - { - "from": "tag", - "to": "sample-category-tag" - } - ] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "userId": "sample-user-id", - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "sample-anon-id", - "type": "track", - "event": "Stringify Test", - "properties": { - "description": "Stringify test for object values", - "nested": { - "a": [1, 2, 3], - "b": { - "c": 1 - } - }, - "arr": [1, 2, 3] - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "sample-api-key", - "productTagKey": "AP-XABC-123", - "accountAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "userAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "globalContextMap": [ - { - "from": "projectId", - "to": "p-123" - }, - { - "from": "tag", - "to": "sample-category-tag" - } - ] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "userId": "sample-user-id", - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "sample-anon-id", - "type": "track", - "event": "Stringify Test", - "properties": { - "description": "Stringify test for object values", - "nested": { - "a": [1, 2, 3], - "b": { - "c": 1 - } - }, - "arr": [1, 2, 3], - "globalContext": { - "someKey": "someVal" - } - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "sample-api-key", - "productTagKey": "AP-XABC-123", - "accountAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "userAttributeMap": [], - "globalContextMap": [] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "type": "USER", - "gender": "MALE", - "email": "user@email.com", - "firstName": "Sample", - "lastName": "User" - } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "sample-anon-id", - "userId": "absent-id", - "groupId": "ecorp-id", - "type": "group", - "traits": { - "name": "ECorp", - "industry": "software", - "numberOfEmployees": 400, - "website": "www.ecorp.com", - "plan": "premium" - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "sample-api-key", - "productTagKey": "AP-XABC-123", - "accountAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "userAttributeMap": [ - { - "from": "hobbyCustomField", - "to": "hobby" - } - ], - "globalContextMap": [] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "userId": "absent-id", - "anonymousId": "sample-anon-id", - "type": "identify", - "traits": { - "type": "USER", - "gender": "MALE", - "email": "user@email.com", - "firstName": "Sample", - "lastName": "User", - "signUpDate": 1624431528295, - "title": "engineer", - "countryName": "USA", - "countryCode": "US", - "city": "New York", - "hobbyCustomField": "Sample Hobby" - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "sample-api-key", - "productTagKey": "AP-XABC-123", - "accountAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "userAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "globalContextMap": [] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "userId": "absent-id", - "anonymousId": "sample-anon-id", - "type": "identify", - "traits": { - "type": "USER", - "gender": "MALE", - "email": "user@email.com", - "firstName": "Sample", - "lastName": "User", - "signUpDate": 1624431528295, - "title": "engineer", - "countryName": "USA", - "countryCode": "US", - "city": "New York", - "hobbyCustomField": "Sample Hobby", - "accountId": 1234 - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "sample-api-key", - "productTagKey": "AP-XABC-123", - "accountAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "userAttributeMap": [], - "globalContextMap": [] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "type": "USER", - "gender": "MALE", - "email": "user@email.com", - "firstName": "Sample", - "lastName": "User" - } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "sample-anon-id", - "userId": "absent-id", - "groupId": "ecorp-id", - "type": "group", - "traits": { - "name": "ECorp", - "industry": "software", - "numberOfEmployees": 400, - "website": "www.ecorp.com", - "plan": "premium", - "term": null - }, - "integrations": { - "All": true, - "GAINSIGHT_PX": { - "limitAPIForGroup": true - } - }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "sample-api-key", - "productTagKey": "AP-XABC-123", - "accountAttributeMap": [ - { - "from": "", - "to": "" - } - ], - "userAttributeMap": [ - { - "from": "hobbyCustomField", - "to": "hobby" - } - ], - "globalContextMap": [] - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "userId": "sample-user-id", - "anonymousId": "sample-anon-id", - "type": "identify", - "traits": { - "type": "USER", - "gender": "MALE", - "email": "user@email.com", - "firstName": "Sample", - "lastName": "User", - "signUpDate": 1624431528295, - "title": "engineer", - "countryName": "USA", - "countryCode": "US", - "city": "New York", - "hobbyCustomField": "Sample Hobby", - "term": null, - "campaign": "" - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - } -] diff --git a/test/__tests__/data/gainsight_px_output.json b/test/__tests__/data/gainsight_px_output.json deleted file mode 100644 index 1b4a000821..0000000000 --- a/test/__tests__/data/gainsight_px_output.json +++ /dev/null @@ -1,368 +0,0 @@ -[ - { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "attributes": { - "product_id": "123", - "sku": "F16", - "category": "Games", - "name": "Game", - "brand": "Gamepro", - "variant": "111", - "price": 13.49, - "quantity": 11, - "coupon": "DISC21", - "position": 1, - "url": "https://www.website.com/product/path", - "image_url": "https://www.website.com/product/path.png" - }, - "propertyKey": "AP-XABC-123", - "userType": "USER", - "identifyId": "sample-user-id", - "date": 1571043797562, - "eventName": "Product Added", - "globalContext": { - "projectId": "p-123", - "tag": "sample-category-tag" - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "X-APTRINSIC-API-KEY": "sample-api-key", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api.aptrinsic.com/v1/events/custom" - }, - { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "attributes": {}, - "url": "http://127.0.0.1:8887/", - "propertyKey": "AP-XABC-123", - "userType": "USER", - "identifyId": "sample-user-id", - "referrer": "$direct", - "date": 1571043797562, - "sessionId": 1679967592314, - "eventName": "Marketing - Plan Change Events", - "globalContext": { - "projectId": "p-123", - "tag": "sample-category-tag" - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "X-APTRINSIC-API-KEY": "sample-api-key", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api.aptrinsic.com/v1/events/custom" - }, - { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "attributes": { - "description": "Sample Track call" - }, - "propertyKey": "AP-XABC-123", - "userType": "USER", - "identifyId": "sample-user-id", - "date": 1571043797562, - "eventName": "Track Me", - "globalContext": { - "testOverride": "some-value" - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "X-APTRINSIC-API-KEY": "sample-api-key", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api.aptrinsic.com/v1/events/custom" - }, - { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "type": "USER", - "gender": "MALE", - "email": "user@email.com", - "firstName": "Sample", - "lastName": "User", - "signUpDate": 1624431528295, - "createDate": 1571043797562, - "title": "engineer", - "propertyKeys": ["AP-XABC-123"], - "location": { - "countryName": "USA", - "countryCode": "US", - "city": "New York" - }, - "customAttributes": { - "hobby": "Sample Hobby" - } - } - }, - "type": "REST", - "files": {}, - "method": "PUT", - "params": {}, - "headers": { - "X-APTRINSIC-API-KEY": "sample-api-key", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api.aptrinsic.com/v1/users/sample-user-id" - }, - { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "accountId": "ecorp-id" - } - }, - "type": "REST", - "files": {}, - "method": "PUT", - "params": {}, - "headers": { - "X-APTRINSIC-API-KEY": "sample-api-key", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api.aptrinsic.com/v1/users/sample-user-id" - }, - { - "error": "userId or anonymousId is required for identify" - }, - { - "error": "Missing required value from \"userId\"" - }, - { - "error": "groupId is required for group" - }, - { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "attributes": { - "description": "Stringify test for object values", - "nested": "{\"a\":[1,2,3],\"b\":{\"c\":1}}", - "arr": "[1,2,3]" - }, - "propertyKey": "AP-XABC-123", - "userType": "USER", - "identifyId": "sample-user-id", - "date": 1571043797562, - "eventName": "Stringify Test", - "globalContext": { - "projectId": "p-123", - "tag": "sample-category-tag" - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "X-APTRINSIC-API-KEY": "sample-api-key", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api.aptrinsic.com/v1/events/custom" - }, - { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "attributes": { - "description": "Stringify test for object values", - "nested": "{\"a\":[1,2,3],\"b\":{\"c\":1}}", - "arr": "[1,2,3]" - }, - "propertyKey": "AP-XABC-123", - "userType": "USER", - "identifyId": "sample-user-id", - "date": 1571043797562, - "eventName": "Stringify Test", - "globalContext": { - "someKey": "someVal" - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "X-APTRINSIC-API-KEY": "sample-api-key", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api.aptrinsic.com/v1/events/custom" - }, - { - "error": "aborting group call: {\"status\":\"NOT_FOUND\",\"message\":\"User was not found for parameters {id=absent-id}\",\"debugMessage\":null,\"subErrors\":null}" - }, - { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "identifyId": "absent-id", - "type": "USER", - "gender": "MALE", - "email": "user@email.com", - "firstName": "Sample", - "lastName": "User", - "signUpDate": 1624431528295, - "createDate": 1571043797562, - "title": "engineer", - "propertyKeys": ["AP-XABC-123"], - "location": { - "countryName": "USA", - "countryCode": "US", - "city": "New York" - }, - "customAttributes": { - "hobby": "Sample Hobby" - } - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "X-APTRINSIC-API-KEY": "sample-api-key", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api.aptrinsic.com/v1/users" - }, - { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "identifyId": "absent-id", - "type": "USER", - "gender": "MALE", - "email": "user@email.com", - "firstName": "Sample", - "lastName": "User", - "signUpDate": 1624431528295, - "createDate": 1571043797562, - "title": "engineer", - "propertyKeys": ["AP-XABC-123"], - "accountId": "1234", - "location": { - "countryName": "USA", - "countryCode": "US", - "city": "New York" - }, - "customAttributes": {} - } - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "X-APTRINSIC-API-KEY": "sample-api-key", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api.aptrinsic.com/v1/users" - }, - { - "version": "1", - "type": "REST", - "method": "PUT", - "endpoint": "https://api.aptrinsic.com/v1/users/absent-id", - "headers": { - "X-APTRINSIC-API-KEY": "sample-api-key", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "accountId": "ecorp-id" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - { - "body": { - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {}, - "JSON": { - "type": "USER", - "gender": "MALE", - "email": "user@email.com", - "firstName": "Sample", - "lastName": "User", - "signUpDate": 1624431528295, - "createDate": 1571043797562, - "title": "engineer", - "propertyKeys": ["AP-XABC-123"], - "location": { - "countryName": "USA", - "countryCode": "US", - "city": "New York" - }, - "customAttributes": { - "hobby": "Sample Hobby" - } - } - }, - "type": "REST", - "files": {}, - "method": "PUT", - "params": {}, - "headers": { - "X-APTRINSIC-API-KEY": "sample-api-key", - "Content-Type": "application/json" - }, - "version": "1", - "endpoint": "https://api.aptrinsic.com/v1/users/sample-user-id" - } -] diff --git a/test/__tests__/data/gainsight_px_router_input.json b/test/__tests__/data/gainsight_px_router_input.json deleted file mode 100644 index 52b9404824..0000000000 --- a/test/__tests__/data/gainsight_px_router_input.json +++ /dev/null @@ -1,298 +0,0 @@ -[ - { - "message": { - "type": "identify", - "sentAt": "2021-06-25T08:59:52.891Z", - "userId": "stanley-kubrick", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.18", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "title": "Test", - "search": "", - "path": "index.html", - "url": "http://127.0.0.1:3003/index.html", - "tab_url": "http://127.0.0.1:3003/index.html", - "referrer": "$direct", - "initial_referrer": "$direct", - "referring_domain": "", - "initial_referring_domain": "" - }, - "locale": "en-GB", - "screen": { - "width": 1920, - "height": 1080, - "density": 1, - "innerWidth": 1920, - "innerHeight": 436 - }, - "traits": { - "name": "Stanley Kubrick", - "email": "stanley@kubrick.com", - "score": 100, - "title": "Director/Film Maker", - "gender": "Male", - "countryCode": "US", - "countryName": "USA", - "hobbyCustomField": "Making films. Being a genius" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.18" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36" - }, - "rudderId": "9a7820d0-0ff2-4451-b655-682cec15cbd2", - "messageId": "ff90d62e-a6e3-4e23-af20-03b4a249ef48", - "timestamp": "2021-06-25T14:29:52.911+05:30", - "receivedAt": "2021-06-25T14:29:52.911+05:30", - "request_ip": "[::1]", - "anonymousId": "1585ea2f-dddc-4d23-935f-c1196405d61e", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-06-25T08:59:52.891Z" - }, - "metadata": { - "userId": "9a7820d0-0ff2-4451-b655-682cec15cbd2", - "jobId": 1, - "sourceId": "1s9eG8UCer6YSKsD8ZlQCyLa3pj", - "destinationId": "1uLy1tqsoo9RhL1zLiqLQTKBIKL", - "attemptNum": 0, - "receivedAt": "2021-06-25T14:29:52.911+05:30", - "createdAt": "2021-06-25T08:59:56.329Z", - "firstAttemptedAt": "", - "transformAt": "router" - }, - "destination": { - "ID": "1uLy1tqsoo9RhL1zLiqLQTKBIKL", - "Name": "gainsight-px-dest", - "DestinationDefinition": { - "ID": "1uLuOdwPCqtei55ZKXewwPhjQPf", - "Name": "GAINSIGHT_PX", - "DisplayName": "Gainsight PX", - "Config": { - "destConfig": { - "defaultConfig": [ - "apiKey", - "productTagKey", - "userAttributeMap", - "accountAttributeMap", - "globalContextMap" - ] - }, - "excludeKeys": [], - "includeKeys": [], - "saveDestinationResponse": true, - "secretKeys": ["apiKey", "productTagKey"], - "supportedSourceTypes": [ - "android", - "ios", - "web", - "unity", - "amp", - "cloud", - "reactnative", - "flutter" - ], - "transformAt": "router", - "transformAtV1": "router" - }, - "ResponseRules": {} - }, - "Config": { - "accountAttributeMap": [ - { - "from": "cultureCustomField", - "to": "culture" - } - ], - "apiKey": "sample-api-key", - "eventDelivery": false, - "eventDeliveryTS": 1624472902670, - "globalContextMap": [ - { - "from": "kubrickTest", - "to": "value" - } - ], - "productTagKey": "AP-SAMPLE-2", - "userAttributeMap": [ - { - "from": "hobbyCustomField", - "to": "hobby" - } - ] - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": true - } - }, - { - "message": { - "type": "track", - "event": "nested test2", - "sentAt": "2021-06-26T10:41:22.316Z", - "userId": "adifhas9734", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.18", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "file:///Users/anurajguha/workspace/simple-html-test/index.html", - "path": "/Users/anurajguha/workspace/simple-html-test/index.html", - "title": "Test", - "search": "", - "tab_url": "file:///Users/anurajguha/workspace/simple-html-test/index.html", - "referrer": "$direct", - "initial_referrer": "$direct", - "referring_domain": "", - "initial_referring_domain": "" - }, - "locale": "en-GB", - "screen": { - "width": 1920, - "height": 1080, - "density": 1, - "innerWidth": 1920, - "innerHeight": 585 - }, - "traits": { - "name": "Update test unique", - "phone": "9900990899", - "lastname": "user6", - "firstname": "test", - "previousCompany": "testprevCompany2" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.18" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36" - }, - "rudderId": "a27a8a8a-9e81-4898-beeb-e6041fc1552d", - "messageId": "595dae36-5e4f-4feb-a2e4-8a7849615d38", - "timestamp": "2021-06-26T16:11:22.335+05:30", - "properties": { - "array": [1, 2, 3], - "nested": { - "json": "test" - }, - "status": "testing", - "description": "Example track call", - "fullyNested": [ - { - "a": 1, - "b": 2 - }, - { - "a": 1, - "b": [1, 2, 3] - } - ] - }, - "receivedAt": "2021-06-26T16:11:22.335+05:30", - "request_ip": "[::1]", - "anonymousId": "1585ea2f-dddc-4d23-935f-c1196405d61e", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-06-26T10:41:22.316Z" - }, - "metadata": { - "userId": "a27a8a8a-9e81-4898-beeb-e6041fc1552d", - "jobId": 2, - "sourceId": "1s9eG8UCer6YSKsD8ZlQCyLa3pj", - "destinationId": "1uLy1tqsoo9RhL1zLiqLQTKBIKL", - "attemptNum": 0, - "receivedAt": "2021-06-26T16:11:22.335+05:30", - "createdAt": "2021-06-26T10:41:24.126Z", - "firstAttemptedAt": "", - "transformAt": "router" - }, - "destination": { - "ID": "1uLy1tqsoo9RhL1zLiqLQTKBIKL", - "Name": "gainsight-px-dest", - "DestinationDefinition": { - "ID": "1uLuOdwPCqtei55ZKXewwPhjQPf", - "Name": "GAINSIGHT_PX", - "DisplayName": "Gainsight PX", - "Config": { - "destConfig": { - "defaultConfig": [ - "apiKey", - "productTagKey", - "userAttributeMap", - "accountAttributeMap", - "globalContextMap" - ] - }, - "excludeKeys": [], - "includeKeys": [], - "saveDestinationResponse": true, - "secretKeys": ["apiKey", "productTagKey"], - "supportedSourceTypes": [ - "android", - "ios", - "web", - "unity", - "amp", - "cloud", - "reactnative", - "flutter" - ], - "transformAt": "router", - "transformAtV1": "router" - }, - "ResponseRules": {} - }, - "Config": { - "accountAttributeMap": [ - { - "from": "cultureCustomField", - "to": "culture" - } - ], - "apiKey": "sample-api-key", - "eventDelivery": false, - "eventDeliveryTS": 1624472902670, - "globalContextMap": [ - { - "from": "kubrickTest", - "to": "value" - } - ], - "productTagKey": "AP-SAMPLE-2", - "userAttributeMap": [ - { - "from": "hobbyCustomField", - "to": "hobby" - } - ] - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": true - } - } -] diff --git a/test/__tests__/data/gainsight_px_router_output.json b/test/__tests__/data/gainsight_px_router_output.json deleted file mode 100644 index d76b5d34f1..0000000000 --- a/test/__tests__/data/gainsight_px_router_output.json +++ /dev/null @@ -1,236 +0,0 @@ -[ - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "PUT", - "endpoint": "https://api.aptrinsic.com/v1/users/stanley-kubrick", - "headers": { - "X-APTRINSIC-API-KEY": "sample-api-key", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "email": "stanley@kubrick.com", - "gender": "MALE", - "signUpDate": 1624611592911, - "title": "Director/Film Maker", - "score": 100, - "createDate": 1624611592911, - "location": { - "countryName": "USA", - "countryCode": "US" - }, - "firstName": "Stanley", - "lastName": "Kubrick", - "customAttributes": { - "hobby": "Making films. Being a genius" - }, - "propertyKeys": ["AP-SAMPLE-2"], - "type": "USER" - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "userId": "9a7820d0-0ff2-4451-b655-682cec15cbd2", - "jobId": 1, - "sourceId": "1s9eG8UCer6YSKsD8ZlQCyLa3pj", - "destinationId": "1uLy1tqsoo9RhL1zLiqLQTKBIKL", - "attemptNum": 0, - "receivedAt": "2021-06-25T14:29:52.911+05:30", - "createdAt": "2021-06-25T08:59:56.329Z", - "firstAttemptedAt": "", - "transformAt": "router" - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "ID": "1uLy1tqsoo9RhL1zLiqLQTKBIKL", - "Name": "gainsight-px-dest", - "DestinationDefinition": { - "ID": "1uLuOdwPCqtei55ZKXewwPhjQPf", - "Name": "GAINSIGHT_PX", - "DisplayName": "Gainsight PX", - "Config": { - "destConfig": { - "defaultConfig": [ - "apiKey", - "productTagKey", - "userAttributeMap", - "accountAttributeMap", - "globalContextMap" - ] - }, - "excludeKeys": [], - "includeKeys": [], - "saveDestinationResponse": true, - "secretKeys": ["apiKey", "productTagKey"], - "supportedSourceTypes": [ - "android", - "ios", - "web", - "unity", - "amp", - "cloud", - "reactnative", - "flutter" - ], - "transformAt": "router", - "transformAtV1": "router" - }, - "ResponseRules": {} - }, - "Config": { - "accountAttributeMap": [ - { - "from": "cultureCustomField", - "to": "culture" - } - ], - "apiKey": "sample-api-key", - "eventDelivery": false, - "eventDeliveryTS": 1624472902670, - "globalContextMap": [ - { - "from": "kubrickTest", - "to": "value" - } - ], - "productTagKey": "AP-SAMPLE-2", - "userAttributeMap": [ - { - "from": "hobbyCustomField", - "to": "hobby" - } - ] - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": true - } - }, - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.aptrinsic.com/v1/events/custom", - "headers": { - "X-APTRINSIC-API-KEY": "sample-api-key", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "identifyId": "adifhas9734", - "eventName": "nested test2", - "date": 1624704082335, - "attributes": { - "array": "[1,2,3]", - "nested": "{\"json\":\"test\"}", - "status": "testing", - "description": "Example track call", - "fullyNested": "[{\"a\":1,\"b\":2},{\"a\":1,\"b\":[1,2,3]}]" - }, - "url": "file:///Users/anurajguha/workspace/simple-html-test/index.html", - "referrer": "$direct", - "propertyKey": "AP-SAMPLE-2", - "userType": "USER", - "globalContext": { - "kubrickTest": "value" - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "userId": "a27a8a8a-9e81-4898-beeb-e6041fc1552d", - "jobId": 2, - "sourceId": "1s9eG8UCer6YSKsD8ZlQCyLa3pj", - "destinationId": "1uLy1tqsoo9RhL1zLiqLQTKBIKL", - "attemptNum": 0, - "receivedAt": "2021-06-26T16:11:22.335+05:30", - "createdAt": "2021-06-26T10:41:24.126Z", - "firstAttemptedAt": "", - "transformAt": "router" - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "ID": "1uLy1tqsoo9RhL1zLiqLQTKBIKL", - "Name": "gainsight-px-dest", - "DestinationDefinition": { - "ID": "1uLuOdwPCqtei55ZKXewwPhjQPf", - "Name": "GAINSIGHT_PX", - "DisplayName": "Gainsight PX", - "Config": { - "destConfig": { - "defaultConfig": [ - "apiKey", - "productTagKey", - "userAttributeMap", - "accountAttributeMap", - "globalContextMap" - ] - }, - "excludeKeys": [], - "includeKeys": [], - "saveDestinationResponse": true, - "secretKeys": ["apiKey", "productTagKey"], - "supportedSourceTypes": [ - "android", - "ios", - "web", - "unity", - "amp", - "cloud", - "reactnative", - "flutter" - ], - "transformAt": "router", - "transformAtV1": "router" - }, - "ResponseRules": {} - }, - "Config": { - "accountAttributeMap": [ - { - "from": "cultureCustomField", - "to": "culture" - } - ], - "apiKey": "sample-api-key", - "eventDelivery": false, - "eventDeliveryTS": 1624472902670, - "globalContextMap": [ - { - "from": "kubrickTest", - "to": "value" - } - ], - "productTagKey": "AP-SAMPLE-2", - "userAttributeMap": [ - { - "from": "hobbyCustomField", - "to": "hobby" - } - ] - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": true - } - } -] diff --git a/test/__tests__/data/gainsight_router_input.json b/test/__tests__/data/gainsight_router_input.json deleted file mode 100644 index 9432b7c5ef..0000000000 --- a/test/__tests__/data/gainsight_router_input.json +++ /dev/null @@ -1,240 +0,0 @@ -[ - { - "message": { - "type": "identify", - "sentAt": "2021-05-28T11:22:01.842Z", - "userId": "live-test", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.18", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "file:///Users/anurajguha/workspace/simple-html-test/index.html", - "path": "/Users/anurajguha/workspace/simple-html-test/index.html", - "title": "Test", - "search": "", - "tab_url": "file:///Users/anurajguha/workspace/simple-html-test/index.html", - "referrer": "$direct", - "initial_referrer": "$direct", - "referring_domain": "", - "initial_referring_domain": "" - }, - "locale": "en-GB", - "screen": { - "density": 2 - }, - "traits": { - "name": "Cosmo Krammer", - "email": "cosmo@krammer.com", - "location": "New York", - "emailOptOut": true, - "linkedinUrl": "https://linkedin.com/cosmo-krammer", - "masterAvatarTypeCode": 10 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.18" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36" - }, - "rudderId": "94d40f2f-5787-4798-8a03-34f3b02f5ede", - "messageId": "8274e525-d99c-4f55-b67a-bbc890d1444c", - "timestamp": "2021-05-28T16:52:01.859+05:30", - "receivedAt": "2021-05-28T16:52:01.859+05:30", - "request_ip": "[::1]", - "anonymousId": "1585ea2f-dddc-4d23-935f-c1196405d61e", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-05-28T11:22:01.842Z" - }, - "metadata": { - "userId": "94d40f2f-5787-4798-8a03-34f3b02f5ede", - "jobId": 1, - "sourceId": "1syvMwC0K62eIb4yAV9kFJtbDEA", - "destinationId": "1syvZAuiGo4l1SIsil0TxDEx34G", - "attemptNum": 0, - "receivedAt": "2021-05-28T16:52:01.859+05:30", - "createdAt": "2021-05-28T11:22:02.463Z", - "firstAttemptedAt": "", - "transformAt": "router" - }, - "destination": { - "ID": "1syvZAuiGo4l1SIsil0TxDEx34G", - "Name": "gainsight-dev-dest", - "DestinationDefinition": { - "ID": "1syuhEt4I8jpvlwJc4lr1IiLjPu", - "Name": "GAINSIGHT", - "DisplayName": "Gainsight", - "Config": { - "destConfig": { - "defaultConfig": [ - "accessKey", - "sharedSecret", - "tenantId", - "domain", - "personMap", - "companyMap", - "topicName", - "eventNameMap", - "eventVersionMap", - "contractId" - ] - }, - "excludeKeys": [], - "includeKeys": [], - "saveDestinationResponse": true, - "secretKeys": ["accessKey", "sharedSecret"], - "supportedSourceTypes": ["android", "ios", "web", "unity", "amp", "cloud", "reactnative"], - "transformAt": "router", - "transformAtV1": "router" - }, - "ResponseRules": {} - }, - "Config": { - "accessKey": "sample-access-key", - "contractId": "", - "domain": "demo-account.gainsightcloud.com", - "sharedSecret": "", - "tenantId": "", - "topicName": "" - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": true - } - }, - { - "message": { - "type": "track", - "event": "Demo Request", - "sentAt": "2021-05-28T11:52:12.893Z", - "userId": "", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.18", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "file:///Users/anurajguha/workspace/simple-html-test/index.html", - "path": "/Users/anurajguha/workspace/simple-html-test/index.html", - "title": "Test", - "search": "", - "tab_url": "file:///Users/anurajguha/workspace/simple-html-test/index.html", - "referrer": "$direct", - "initial_referrer": "$direct", - "referring_domain": "", - "initial_referring_domain": "" - }, - "locale": "en-GB", - "screen": { - "density": 2 - }, - "traits": {}, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.18" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36" - }, - "rudderId": "1a30a93f-916b-4c39-ad20-1ce7bbbd7754", - "messageId": "f5619b1a-8704-42a8-bab9-92bbeaa44896", - "timestamp": "2021-05-28T17:22:12.905+05:30", - "properties": { - "email": "sample@user.com", - "status": "active" - }, - "receivedAt": "2021-05-28T17:22:12.905+05:30", - "request_ip": "[::1]", - "anonymousId": "1585ea2f-dddc-4d23-935f-c1196405d61e", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-05-28T11:52:12.893Z" - }, - "metadata": { - "userId": "1a30a93f-916b-4c39-ad20-1ce7bbbd7754", - "jobId": 2, - "sourceId": "1syvMwC0K62eIb4yAV9kFJtbDEA", - "destinationId": "1syvZAuiGo4l1SIsil0TxDEx34G", - "attemptNum": 0, - "receivedAt": "2021-05-28T17:22:12.905+05:30", - "createdAt": "2021-05-28T11:52:15.283Z", - "firstAttemptedAt": "", - "transformAt": "router" - }, - "destination": { - "ID": "1syvZAuiGo4l1SIsil0TxDEx34G", - "Name": "gainsight-dev-dest", - "DestinationDefinition": { - "ID": "1syuhEt4I8jpvlwJc4lr1IiLjPu", - "Name": "GAINSIGHT", - "DisplayName": "Gainsight", - "Config": { - "destConfig": { - "defaultConfig": [ - "accessKey", - "sharedSecret", - "tenantId", - "domain", - "personMap", - "companyMap", - "topicName", - "eventNameMap", - "eventVersionMap", - "contractId" - ] - }, - "excludeKeys": [], - "includeKeys": [], - "saveDestinationResponse": true, - "secretKeys": ["accessKey", "sharedSecret"], - "supportedSourceTypes": ["android", "ios", "web", "unity", "amp", "cloud", "reactnative"], - "transformAt": "router", - "transformAtV1": "router" - }, - "ResponseRules": {} - }, - "Config": { - "accessKey": "sample-access-key", - "contractId": "sample-contract-id", - "domain": "demo-account.gainsightcloud.com", - "eventNameMap": [ - { - "from": "Demo Request", - "to": "Product Demo" - } - ], - "eventVersionMap": [ - { - "from": "Demo Request", - "to": "1.0.0" - } - ], - "sharedSecret": "sample-shared-secret", - "tenantId": "sample-tenant-id", - "topicName": "Support Tickets" - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": true - } - } -] diff --git a/test/__tests__/data/gainsight_router_output.json b/test/__tests__/data/gainsight_router_output.json deleted file mode 100644 index a432c3c4c7..0000000000 --- a/test/__tests__/data/gainsight_router_output.json +++ /dev/null @@ -1,188 +0,0 @@ -[ - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "PUT", - "endpoint": "https://demo-account.gainsightcloud.com/v1.0/api/people", - "headers": { - "Accesskey": "sample-access-key", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "Email": "cosmo@krammer.com", - "Name": "Cosmo Krammer", - "LinkedinUrl": "https://linkedin.com/cosmo-krammer", - "Location": "New York", - "EmailOptOut": true, - "MasterAvatarTypeCode": 10 - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "userId": "94d40f2f-5787-4798-8a03-34f3b02f5ede", - "jobId": 1, - "sourceId": "1syvMwC0K62eIb4yAV9kFJtbDEA", - "destinationId": "1syvZAuiGo4l1SIsil0TxDEx34G", - "attemptNum": 0, - "receivedAt": "2021-05-28T16:52:01.859+05:30", - "createdAt": "2021-05-28T11:22:02.463Z", - "firstAttemptedAt": "", - "transformAt": "router" - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "ID": "1syvZAuiGo4l1SIsil0TxDEx34G", - "Name": "gainsight-dev-dest", - "DestinationDefinition": { - "ID": "1syuhEt4I8jpvlwJc4lr1IiLjPu", - "Name": "GAINSIGHT", - "DisplayName": "Gainsight", - "Config": { - "destConfig": { - "defaultConfig": [ - "accessKey", - "sharedSecret", - "tenantId", - "domain", - "personMap", - "companyMap", - "topicName", - "eventNameMap", - "eventVersionMap", - "contractId" - ] - }, - "excludeKeys": [], - "includeKeys": [], - "saveDestinationResponse": true, - "secretKeys": ["accessKey", "sharedSecret"], - "supportedSourceTypes": ["android", "ios", "web", "unity", "amp", "cloud", "reactnative"], - "transformAt": "router", - "transformAtV1": "router" - }, - "ResponseRules": {} - }, - "Config": { - "accessKey": "sample-access-key", - "contractId": "", - "domain": "demo-account.gainsightcloud.com", - "sharedSecret": "", - "tenantId": "", - "topicName": "" - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": true - } - }, - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://demo-account.gainsightcloud.com/v1.0/api/eventManager/event", - "headers": { - "sharedSecret": "sample-shared-secret", - "topicName": "Support Tickets", - "tenantId": "sample-tenant-id", - "Content-Type": "application/json", - "eventName": "Product Demo", - "eventVersion": "1.0.0", - "contractId": "sample-contract-id", - "Accesskey": "sample-access-key" - }, - "params": {}, - "body": { - "JSON": { - "email": "sample@user.com", - "status": "active" - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "userId": "1a30a93f-916b-4c39-ad20-1ce7bbbd7754", - "jobId": 2, - "sourceId": "1syvMwC0K62eIb4yAV9kFJtbDEA", - "destinationId": "1syvZAuiGo4l1SIsil0TxDEx34G", - "attemptNum": 0, - "receivedAt": "2021-05-28T17:22:12.905+05:30", - "createdAt": "2021-05-28T11:52:15.283Z", - "firstAttemptedAt": "", - "transformAt": "router" - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "ID": "1syvZAuiGo4l1SIsil0TxDEx34G", - "Name": "gainsight-dev-dest", - "DestinationDefinition": { - "ID": "1syuhEt4I8jpvlwJc4lr1IiLjPu", - "Name": "GAINSIGHT", - "DisplayName": "Gainsight", - "Config": { - "destConfig": { - "defaultConfig": [ - "accessKey", - "sharedSecret", - "tenantId", - "domain", - "personMap", - "companyMap", - "topicName", - "eventNameMap", - "eventVersionMap", - "contractId" - ] - }, - "excludeKeys": [], - "includeKeys": [], - "saveDestinationResponse": true, - "secretKeys": ["accessKey", "sharedSecret"], - "supportedSourceTypes": ["android", "ios", "web", "unity", "amp", "cloud", "reactnative"], - "transformAt": "router", - "transformAtV1": "router" - }, - "ResponseRules": {} - }, - "Config": { - "accessKey": "sample-access-key", - "contractId": "sample-contract-id", - "domain": "demo-account.gainsightcloud.com", - "eventNameMap": [ - { - "from": "Demo Request", - "to": "Product Demo" - } - ], - "eventVersionMap": [ - { - "from": "Demo Request", - "to": "1.0.0" - } - ], - "sharedSecret": "sample-shared-secret", - "tenantId": "sample-tenant-id", - "topicName": "Support Tickets" - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": true - } - } -] diff --git a/test/__tests__/data/hs.json b/test/__tests__/data/hs.json deleted file mode 100644 index fe51488c70..0000000000 --- a/test/__tests__/data/hs.json +++ /dev/null @@ -1 +0,0 @@ -[] diff --git a/test/__tests__/data/hs_input.json b/test/__tests__/data/hs_input.json deleted file mode 100644 index 0dab49824f..0000000000 --- a/test/__tests__/data/hs_input.json +++ /dev/null @@ -1,3185 +0,0 @@ -[ - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "testhubspot2@email.com", - "firstname": "Test Hubspot", - "anonymousId": "12345" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "", - "referrer": "", - "search": "", - "title": "", - "url": "" - } - }, - "type": "identify", - "messageId": "50360b9c-ea8d-409c-b672-c9230f91cce5", - "originalTimestamp": "2019-10-15T09:35:31.288Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "apiKey": "dummy-apikey", - "hubID": "dummy-hubId" - }, - "Enabled": true - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "testhubspot2@email.com", - "firstname": "Test Hubspot", - "anonymousId": "12345" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "type": "page", - "messageId": "e8585d9a-7137-4223-b295-68ab1b17dad7", - "originalTimestamp": "2019-10-15T09:35:31.289Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "properties": { - "path": "", - "referrer": "", - "search": "", - "title": "", - "url": "" - }, - "integrations": { - "All": true - }, - "name": "ApplicationLoaded", - "sentAt": "2019-10-14T11:15:53.296Z" - }, - "destination": { - "Config": { - "apiKey": "dummy-apikey", - "hubID": "dummy-hubId" - }, - "Enabled": true - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "testhubspot2@email.com", - "firstname": "Test Hubspot" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "type": "track", - "messageId": "08829772-d991-427c-b976-b4c4f4430b4e", - "originalTimestamp": "2019-10-15T09:35:31.291Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "event": "test track event HS", - "properties": { - "user_actual_role": "system_admin, system_user", - "user_actual_id": 12345 - }, - "sentAt": "2019-10-14T11:15:53.296Z" - }, - "destination": { - "Config": { - "apiKey": "dummy-apikey", - "hubID": "dummy-hubId" - }, - "Enabled": true - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "", - "referrer": "", - "search": "", - "title": "", - "url": "" - } - }, - "traits": { - "email": "testhubspot2@email.com", - "firstname": "Test Hubspot", - "anonymousId": "12345" - }, - "type": "identify", - "messageId": "50360b9c-ea8d-409c-b672-c9230f91cce5", - "originalTimestamp": "2019-10-15T09:35:31.288Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "apiKey": "dummy-apikey", - "hubID": "dummy-hubId" - }, - "Enabled": true - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "firstname": "Test Hubspot", - "anonymousId": "12345" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "", - "referrer": "", - "search": "", - "title": "", - "url": "" - } - }, - "type": "identify", - "messageId": "50360b9c-ea8d-409c-b672-c9230f91cce5", - "originalTimestamp": "2019-10-15T09:35:31.288Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "apiKey": "dummy-apikey", - "hubID": "dummy-hubId" - }, - "Enabled": true - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "testhubspot2@email.com", - "firstname": "Test Hubspot" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "type": "track", - "messageId": "08829772-d991-427c-b976-b4c4f4430b4e", - "originalTimestamp": "2019-10-15T09:35:31.291Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "event": "test track event HS", - "properties": { - "revenue": 4.99, - "user_actual_role": "system_admin, system_user", - "user_actual_id": 12345 - }, - "sentAt": "2019-10-14T11:15:53.296Z" - }, - "destination": { - "Config": { - "apiKey": "dummy-apikey", - "hubID": "dummy-hubId" - }, - "Enabled": true - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "testhubspot2@email.com", - "firstname": "Test Hubspot" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "type": "track", - "messageId": "08829772-d991-427c-b976-b4c4f4430b4e", - "originalTimestamp": "2019-10-15T09:35:31.291Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "event": "test track event HS", - "properties": { - "value": 4.99, - "user_actual_role": "system_admin, system_user", - "user_actual_id": 12345 - }, - "sentAt": "2019-10-14T11:15:53.296Z" - }, - "destination": { - "Config": { - "apiKey": "dummy-apikey", - "hubID": "dummy-hubId" - }, - "Enabled": true - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "testhubspot2@email.com", - "firstname": "Test Hubspot", - "anonymousId": "12345" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "", - "referrer": "", - "search": "", - "title": "", - "url": "" - } - }, - "type": "identify", - "messageId": "50360b9c-ea8d-409c-b672-c9230f91cce5", - "originalTimestamp": "2019-10-15T09:35:31.288Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "metadata": { - "jobId": 2 - }, - "destination": { - "Config": { - "apiKey": "invalid-api-key", - "hubID": "dummy-hubId" - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Hubspot", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "HS", - "displayName": "Hubspot", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "testhubspot2@email.com", - "firstname": "Test Hubspot", - "anonymousId": "12345" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "", - "referrer": "", - "search": "", - "title": "", - "url": "" - } - }, - "type": "identify", - "messageId": "50360b9c-ea8d-409c-b672-c9230f91cce5", - "originalTimestamp": "2019-10-15T09:35:31.288Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "metadata": { - "jobId": 2 - }, - "destination": { - "Config": { - "apiKey": "rate-limit-id", - "hubID": "dummy-hubId" - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Hubspot", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "HS", - "displayName": "Hubspot", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "testhubspot2@email.com", - "firstname": "Test Hubspot" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "type": "track", - "messageId": "08829772-d991-427c-b976-b4c4f4430b4e", - "originalTimestamp": "2019-10-15T09:35:31.291Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "event": "test track event HS", - "sentAt": "2019-10-14T11:15:53.296Z" - }, - "destination": { - "Config": { - "apiKey": "dummy-apikey", - "hubID": "dummy-hubId" - }, - "Enabled": true - } - }, - { - "description": "[HS] (legacyApiKey): trigger update all objects endpoint for rETL source", - "message": { - "channel": "web", - "context": { - "mappedToDestination": true, - "externalId": [ - { - "identifierType": "email", - "id": "testhubspot2@email.com", - "type": "HS-lead" - } - ], - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "", - "referrer": "", - "search": "", - "title": "", - "url": "" - } - }, - "type": "identify", - "traits": { - "firstname": "Test Hubspot", - "anonymousId": "12345", - "country": "India" - }, - "messageId": "50360b9c-ea8d-409c-b672-c9230f91cce5", - "originalTimestamp": "2019-10-15T09:35:31.288Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "apiKey": "dummy-apikey", - "hubID": "dummy-hubId" - }, - "Enabled": true - } - }, - { - "description": "[HS] (legacyApiKey): trigger create custom objects endpoint", - "message": { - "channel": "web", - "context": { - "mappedToDestination": true, - "externalId": [ - { - "identifierType": "email", - "id": "testhubspot@email.com", - "type": "HS-lead" - } - ], - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "", - "referrer": "", - "search": "", - "title": "", - "url": "" - } - }, - "type": "identify", - "traits": { - "firstname": "Test Hubspot", - "anonymousId": "12345", - "country": "India" - }, - "messageId": "50360b9c-ea8d-409c-b672-c9230f91cce5", - "originalTimestamp": "2019-10-15T09:35:31.288Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "apiKey": "dummy-apikey", - "hubID": "dummy-hubId" - }, - "Enabled": true - } - }, - { - "description": "[HS] (newApiKey): trigger create all objects endpoint for rETL source", - "message": { - "channel": "web", - "context": { - "mappedToDestination": true, - "externalId": [ - { - "identifierType": "email", - "id": "testhubspot@email.com", - "type": "HS-lead" - } - ], - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "", - "referrer": "", - "search": "", - "title": "", - "url": "" - } - }, - "type": "identify", - "traits": { - "firstname": "Test Hubspot", - "anonymousId": "12345", - "country": "India" - }, - "messageId": "50360b9c-ea8d-409c-b672-c9230f91cce5", - "originalTimestamp": "2019-10-15T09:35:31.288Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "authorizationType": "newPrivateAppApi", - "hubID": "", - "apiKey": "", - "accessToken": "dummy-access-token", - "apiVersion": "newApi", - "lookupField": "lookupField", - "hubspotEvents": [], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - { - "description": "[HS] (newApiKey): trigger update all objects endpoint for rETL source", - "message": { - "channel": "web", - "context": { - "mappedToDestination": true, - "externalId": [ - { - "identifierType": "email", - "id": "testhubspot2@email.com", - "type": "HS-lead" - } - ], - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "", - "referrer": "", - "search": "", - "title": "", - "url": "" - } - }, - "type": "identify", - "traits": { - "firstname": "Test Hubspot", - "anonymousId": "12345", - "country": "India" - }, - "messageId": "50360b9c-ea8d-409c-b672-c9230f91cce5", - "originalTimestamp": "2019-10-15T09:35:31.288Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "authorizationType": "newPrivateAppApi", - "hubID": "", - "apiKey": "", - "accessToken": "dummy-access-token", - "apiVersion": "newApi", - "lookupField": "lookupField", - "hubspotEvents": [], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": {}, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "type": "track", - "messageId": "08829772-d991-427c-b976-b4c4f4430b4e", - "originalTimestamp": "2019-10-15T09:35:31.291Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "event": "test track event HS", - "sentAt": "2019-10-14T11:15:53.296Z", - "properties": { - "email": "testhubspot2@email.com", - "firstname": "Test Hubspot" - } - }, - "destination": { - "Config": { - "apiKey": "dummy-apikey", - "hubID": "dummy-hubId" - }, - "Enabled": true - } - }, - { - "message": { - "description": "[HS] (legacyApi): use (API Key) - check external id i.e hubspotId", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "testhubspot2@email.com", - "firstname": "Test Hubspot" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "hubspotId", - "id": "6556" - } - ] - }, - "type": "track", - "messageId": "08829772-d991-427c-b976-b4c4f4430b4e", - "originalTimestamp": "2019-10-15T09:35:31.291Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "event": "test track event HS 2", - "properties": { - "user_actual_role": "system_admin, system_user", - "user_actual_id": 12345 - }, - "sentAt": "2019-10-14T11:15:53.296Z" - }, - "destination": { - "Config": { - "apiKey": "dummy-apikey", - "hubID": "dummy-hubId" - }, - "Enabled": true - } - }, - { - "message": { - "description": "[HS] (legacyApi): use (API Key) - check HS common config mappings", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "hubspotId", - "id": "6556" - } - ] - }, - "type": "track", - "messageId": "08829772-d991-427c-b976-b4c4f4430b4e", - "originalTimestamp": "2019-10-15T09:35:31.291Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "event": "test track event HS 2", - "properties": { - "user_actual_role": "system_admin, system_user", - "user_actual_id": 12345, - "address": { - "street": "24. park" - }, - "company": { - "name": "RudderStack" - } - }, - "sentAt": "2019-10-14T11:15:53.296Z" - }, - "destination": { - "Config": { - "apiKey": "dummy-apikey", - "hubID": "dummy-hubId" - }, - "Enabled": true - } - }, - { - "message": { - "description": "[HS] (legacyApi): use (newPrivateAppApi) for contact endpoint", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "testhubspot2@email.com", - "firstname": "Test Hubspot", - "anonymousId": "12345" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "", - "referrer": "", - "search": "", - "title": "", - "url": "" - } - }, - "type": "identify", - "messageId": "50360b9c-ea8d-409c-b672-c9230f91cce5", - "originalTimestamp": "2019-10-15T09:35:31.288Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "authorizationType": "newPrivateAppApi", - "hubID": "dummy-hubId", - "apiKey": "dummy-apikey", - "accessToken": "dummy-access-token", - "apiVersion": "legacyApi", - "lookupField": "", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - { - "message": { - "description": "[HS] (newApi): get contact from hs with email (lookupField) exactly matching with one contact", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "testhubspot@email.com", - "firstname": "Test Hubspot", - "anonymousId": "12345", - "lookupField": "email" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "", - "referrer": "", - "search": "", - "title": "", - "url": "" - } - }, - "type": "identify", - "messageId": "50360b9c-ea8d-409c-b672-c9230f91cce5", - "originalTimestamp": "2019-10-15T09:35:31.288Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "authorizationType": "newPrivateAppApi", - "accessToken": "dummy-access-token", - "hubID": "dummy-hubId", - "apiKey": "dummy-apikey", - "apiVersion": "newApi", - "lookupField": "lookupField", - "hubspotEvents": [], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - { - "message": { - "description": "[HS] (newApi): get contact from hs with email (lookupField) having no contacts", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "noname@email.com", - "firstname": "Test Hubspot", - "anonymousId": "12345", - "lookupField": "email" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "", - "referrer": "", - "search": "", - "title": "", - "url": "" - } - }, - "type": "identify", - "messageId": "50360b9c-ea8d-409c-b672-c9230f91cce5", - "originalTimestamp": "2019-10-15T09:35:31.288Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "authorizationType": "newPrivateAppApi", - "accessToken": "dummy-access-token", - "hubID": "dummy-hubId", - "apiKey": "dummy-apikey", - "apiVersion": "newApi", - "lookupField": "email", - "hubspotEvents": [], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - { - "message": { - "description": "[HS] (newApi): get contact from hs with firstname (lookupField) having more than one result", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "nonamess@email.com", - "firstname": "Jhon", - "anonymousId": "12345" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "", - "referrer": "", - "search": "", - "title": "", - "url": "" - } - }, - "type": "identify", - "messageId": "50360b9c-ea8d-409c-b672-c9230f91cce5", - "originalTimestamp": "2019-10-15T09:35:31.288Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "authorizationType": "newPrivateAppApi", - "accessToken": "dummy-access-token", - "hubID": "dummy-hubId", - "apiKey": "dummy-apikey", - "apiVersion": "newApi", - "lookupField": "firstname", - "hubspotEvents": [], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - { - "message": { - "description": "[HS] (newApi): Track - validate properties of custom behavioral events", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "testhubspot2@email.com", - "firstname": "Test Hubspot" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "type": "track", - "messageId": "08829772-d991-427c-b976-b4c4f4430b4e", - "originalTimestamp": "2019-10-15T09:35:31.291Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "event": "Purchase", - "properties": { - "user_actual_role": "system_admin, system_user", - "user_actual_id": 12345, - "Revenue": 100 - }, - "sentAt": "2019-10-14T11:15:53.296Z" - }, - "destination": { - "Config": { - "authorizationType": "newPrivateAppApi", - "hubID": "1", - "apiKey": "1", - "accessToken": "dummy-access-token", - "apiVersion": "newApi", - "lookupField": "lookupField", - "hubspotEvents": [ - { - "rsEventName": "Purchase", - "hubspotEventName": "pe22315509_rs_hub_test", - "eventProperties": [ - { - "from": "Revenue", - "to": "value" - }, - { - "from": "Price", - "to": "cost" - } - ] - }, - { - "rsEventName": "Order Complete", - "hubspotEventName": "pe22315509_rs_hub_chair", - "eventProperties": [ - { - "from": "firstName", - "to": "first_name" - }, - { - "from": "lastName", - "to": "last_name" - } - ] - } - ], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - { - "message": { - "description": "[HS] (legacyApi): (legacyApiKey) Identify - testing legacy api with new destination config", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "testhubspot2@email.com", - "firstname": "Test Hubspot", - "anonymousId": "12345" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "", - "referrer": "", - "search": "", - "title": "", - "url": "" - } - }, - "type": "identify", - "messageId": "50360b9c-ea8d-409c-b672-c9230f91cce5", - "originalTimestamp": "2019-10-15T09:35:31.288Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "authorizationType": "legacyApiKey", - "hubID": "dummy-hubId", - "apiKey": "dummy-apikey", - "accessToken": "", - "apiVersion": "legacyApi", - "lookupField": "lookupField", - "hubspotEvents": [ - { - "rsEventName": "Purchase", - "hubspotEventName": "pe22315509_rs_hub_test", - "eventProperties": [ - { - "from": "Revenue", - "to": "value" - }, - { - "from": "Price", - "to": "cost" - } - ] - }, - { - "rsEventName": "Order Complete", - "hubspotEventName": "pe22315509_rs_hub_chair", - "eventProperties": [ - { - "from": "firstName", - "to": "first_name" - }, - { - "from": "lastName", - "to": "last_name" - } - ] - } - ], - "eventFilteringOption": "disable", - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "blacklistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - { - "message": { - "description": "[HS] (legacyApi): (legacyApiKey) Track - testing legacy api with new destination config", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "testhubspot2@email.com", - "firstname": "Test Hubspot" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "type": "track", - "messageId": "08829772-d991-427c-b976-b4c4f4430b4e", - "originalTimestamp": "2019-10-15T09:35:31.291Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "event": "test track event HS", - "properties": { - "user_actual_role": "system_admin, system_user", - "user_actual_id": 12345 - }, - "sentAt": "2019-10-14T11:15:53.296Z" - }, - "destination": { - "Config": { - "authorizationType": "legacyApiKey", - "hubID": "dummy-hubId", - "apiKey": "dummy-apikey", - "accessToken": "", - "apiVersion": "legacyApi", - "lookupField": "lookupField", - "hubspotEvents": [ - { - "rsEventName": "Purchase", - "hubspotEventName": "pe22315509_rs_hub_test", - "eventProperties": [ - { - "from": "Revenue", - "to": "value" - }, - { - "from": "Price", - "to": "cost" - } - ] - }, - { - "rsEventName": "Order Complete", - "hubspotEventName": "pe22315509_rs_hub_chair", - "eventProperties": [ - { - "from": "firstName", - "to": "first_name" - }, - { - "from": "lastName", - "to": "last_name" - } - ] - } - ], - "eventFilteringOption": "disable", - "whitelistedEvents": [ - { - "eventName": "" - } - ], - "blacklistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - { - "description": "[HS] (New API v3) - (newPrivateAppApi) check for email in traits which is the deafult lookup field", - "message": { - "type": "identify", - "traits": {}, - "context": { - "externalId": [ - { - "id": "osvaldocostaferreira98@gmail.com", - "type": "HS-contacts", - "identifierType": "email" - } - ], - "mappedToDestination": false - } - }, - "destination": { - "Config": { - "authorizationType": "newPrivateAppApi", - "hubID": "", - "apiKey": "", - "accessToken": "dummy-access-token", - "apiVersion": "newApi", - "lookupField": "lookupField", - "hubspotEvents": [ - { - "rsEventName": "Purchase", - "hubspotEventName": "pe22315509_rs_hub_test", - "eventProperties": [ - { - "from": "Revenue", - "to": "value" - }, - { - "from": "Price", - "to": "cost" - } - ] - }, - { - "rsEventName": "Order Complete", - "hubspotEventName": "pe22315509_rs_hub_chair", - "eventProperties": [ - { - "from": "firstName", - "to": "first_name" - }, - { - "from": "lastName", - "to": "last_name" - } - ] - } - ], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - { - "description": "[HS] (New API v3) - (newPrivateAppApi) email is present in traits as a default lookup field", - "message": { - "type": "identify", - "traits": { - "email": "noname@email.com" - }, - "context": { - "mappedToDestination": false - } - }, - "destination": { - "Config": { - "authorizationType": "newPrivateAppApi", - "hubID": "", - "apiKey": "", - "accessToken": "dummy-access-token", - "apiVersion": "newApi", - "lookupField": "lookupField", - "hubspotEvents": [ - { - "rsEventName": "Purchase", - "hubspotEventName": "pe22315509_rs_hub_test", - "eventProperties": [ - { - "from": "Revenue", - "to": "value" - }, - { - "from": "Price", - "to": "cost" - } - ] - }, - { - "rsEventName": "Order Complete", - "hubspotEventName": "pe22315509_rs_hub_chair", - "eventProperties": [ - { - "from": "firstName", - "to": "first_name" - }, - { - "from": "lastName", - "to": "last_name" - } - ] - } - ], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - { - "description": "[HS] (New API v3) - (newPrivateAppApi) - rETL source - minimum config check", - "message": { - "type": "identify", - "traits": {}, - "context": { - "externalId": [ - { - "id": "osvaldocostaferreira98@gmail.com", - "type": "HS-contacts", - "identifierType": "email" - } - ], - "mappedToDestination": "true" - } - }, - "destination": { - "Config": { - "authorizationType": "newPrivateAppApi", - "hubID": "", - "apiKey": "", - "accessToken": "dummy-access-token", - "apiVersion": "newApi", - "lookupField": "lookupField", - "hubspotEvents": [ - { - "rsEventName": "Purchase", - "hubspotEventName": "pe22315509_rs_hub_test", - "eventProperties": [ - { - "from": "Revenue", - "to": "value" - }, - { - "from": "Price", - "to": "cost" - } - ] - }, - { - "rsEventName": "Order Complete", - "hubspotEventName": "pe22315509_rs_hub_chair", - "eventProperties": [ - { - "from": "firstName", - "to": "first_name" - }, - { - "from": "lastName", - "to": "last_name" - } - ] - } - ], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - { - "description": "[HS] (New API v3) - (newPrivateAppApi) rETL - object type is not provided i.e externalId is empty", - "message": { - "type": "identify", - "traits": {}, - "context": { - "mappedToDestination": "true" - } - }, - "destination": { - "Config": { - "authorizationType": "newPrivateAppApi", - "hubID": "", - "apiKey": "", - "accessToken": "dummy-access-token", - "apiVersion": "newApi", - "lookupField": "lookupField", - "hubspotEvents": [ - { - "rsEventName": "Purchase", - "hubspotEventName": "pe22315509_rs_hub_test", - "eventProperties": [ - { - "from": "Revenue", - "to": "value" - }, - { - "from": "Price", - "to": "cost" - } - ] - }, - { - "rsEventName": "Order Complete", - "hubspotEventName": "pe22315509_rs_hub_chair", - "eventProperties": [ - { - "from": "firstName", - "to": "first_name" - }, - { - "from": "lastName", - "to": "last_name" - } - ] - } - ], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - { - "description": "[HS] (New API v3) - (newPrivateAppApi) sample track call for property check", - "message": { - "type": "track", - "traits": {}, - "context": { - "externalId": [ - { - "id": "osvaldocostaferreira98@gmail.com", - "type": "HS-contacts", - "identifierType": "email" - } - ] - }, - "event": "Purchase", - "properties": { - "Revenue": "name1" - } - }, - "destination": { - "Config": { - "authorizationType": "newPrivateAppApi", - "hubID": "", - "apiKey": "", - "accessToken": "dummy-access-token", - "apiVersion": "newApi", - "lookupField": "lookupField", - "hubspotEvents": [ - { - "rsEventName": "Purchase", - "hubspotEventName": "pe22315509_rs_hub_test", - "eventProperties": [ - { - "from": "Revenue", - "to": "value" - }, - { - "from": "Price", - "to": "cost" - } - ] - }, - { - "rsEventName": "Order Complete", - "hubspotEventName": "pe22315509_rs_hub_chair", - "eventProperties": [ - { - "from": "firstName", - "to": "first_name" - }, - { - "from": "lastName", - "to": "last_name" - } - ] - } - ], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - { - "description": "[HS] (New API v3) - (newPrivateAppApi) - check for accesstoken existence", - "message": { - "type": "identify", - "traits": { - "lookupField": "firstname", - "firstname": "Test" - }, - "context": { - "externalId": [ - { - "id": "osvaldocostaferreira98@gmail.com", - "type": "HS-contacts", - "identifierType": "email" - } - ] - }, - "event": "Purchase", - "properties": { - "revenue": "name1" - } - }, - "destination": { - "Config": { - "authorizationType": "newPrivateAppApi", - "hubID": "", - "apiKey": "", - "accessToken": "", - "apiVersion": "newApi", - "lookupField": "lookupField", - "hubspotEvents": [ - { - "rsEventName": "Purchase", - "hubspotEventName": "pe22315509_rs_hub_test", - "eventProperties": [ - { - "from": "Revenue", - "to": "value" - }, - { - "from": "Price", - "to": "cost" - } - ] - }, - { - "rsEventName": "Order Complete", - "hubspotEventName": "pe22315509_rs_hub_chair", - "eventProperties": [ - { - "from": "firstName", - "to": "first_name" - }, - { - "from": "lastName", - "to": "last_name" - } - ] - } - ], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - { - "description": "[HS] (New API v3) - (legacyApiKey) - check for hubId existence", - "message": { - "type": "identify", - "traits": { - "lookupField": "firstname", - "firstname": "Test" - }, - "context": { - "externalId": [ - { - "id": "osvaldocostaferreira98@gmail.com", - "type": "HS-contacts", - "identifierType": "email" - } - ] - }, - "event": "Purchase", - "properties": { - "revenue": "name1" - } - }, - "destination": { - "Config": { - "authorizationType": "legacyApiKey", - "hubID": "", - "apiKey": "", - "accessToken": "", - "apiVersion": "newApi", - "lookupField": "lookupField", - "hubspotEvents": [ - { - "rsEventName": "Purchase", - "hubspotEventName": "pe22315509_rs_hub_test", - "eventProperties": [ - { - "from": "Revenue", - "to": "value" - }, - { - "from": "Price", - "to": "cost" - } - ] - }, - { - "rsEventName": "Order Complete", - "hubspotEventName": "pe22315509_rs_hub_chair", - "eventProperties": [ - { - "from": "firstName", - "to": "first_name" - }, - { - "from": "lastName", - "to": "last_name" - } - ] - } - ], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - { - "description": "[HS] (New API v3) - (legacyApiKey) - check basic track call", - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "type": "track", - "messageId": "08829772-d991-427c-b976-b4c4f4430b4e", - "originalTimestamp": "2019-10-15T09:35:31.291Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "event": "Purchase", - "properties": { - "user_actual_role": "system_admin, system_user", - "user_actual_id": 12345, - "address": { - "city": "kolkata", - "country": "India" - }, - "objectId": "5005" - }, - "sentAt": "2019-10-14T11:15:53.296Z" - }, - "destination": { - "Config": { - "authorizationType": "legacyApiKey", - "hubID": "dummy-hubId", - "apiKey": "dummy-apikey", - "accessToken": "", - "apiVersion": "newApi", - "lookupField": "lookupField", - "hubspotEvents": [ - { - "rsEventName": "Purchase", - "hubspotEventName": "pe22315509_rs_hub_test", - "eventProperties": [ - { - "from": "Revenue", - "to": "value" - }, - { - "from": "Price", - "to": "cost" - } - ] - }, - { - "rsEventName": "Order Complete", - "hubspotEventName": "pe22315509_rs_hub_chair", - "eventProperties": [ - { - "from": "firstName", - "to": "first_name" - }, - { - "from": "lastName", - "to": "last_name" - } - ] - } - ], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - { - "description": "[HS] (New API v3) - (legacyApiKey) - either of email, utk or objectId must be present", - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "type": "track", - "messageId": "08829772-d991-427c-b976-b4c4f4430b4e", - "originalTimestamp": "2019-10-15T09:35:31.291Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "event": "Purchase", - "properties": { - "user_actual_role": "system_admin, system_user", - "user_actual_id": 12345, - "address": { - "city": "kolkata", - "country": "India" - } - }, - "sentAt": "2019-10-14T11:15:53.296Z" - }, - "destination": { - "Config": { - "authorizationType": "legacyApiKey", - "hubID": "dummy-hubId", - "apiKey": "dummy-apikey", - "accessToken": "", - "apiVersion": "newApi", - "lookupField": "lookupField", - "hubspotEvents": [ - { - "rsEventName": "Purchase", - "hubspotEventName": "pe22315509_rs_hub_test", - "eventProperties": [ - { - "from": "Revenue", - "to": "value" - }, - { - "from": "Price", - "to": "cost" - } - ] - }, - { - "rsEventName": "Order Complete", - "hubspotEventName": "pe22315509_rs_hub_chair", - "eventProperties": [ - { - "from": "firstName", - "to": "first_name" - }, - { - "from": "lastName", - "to": "last_name" - } - ] - } - ], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - { - "message": { - "description": "[HS] (newApi): check for legacyApiKey", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "noname@email.com", - "firstname": "Test Hubspot", - "anonymousId": "12345" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "", - "referrer": "", - "search": "", - "title": "", - "url": "" - } - }, - "type": "identify", - "messageId": "50360b9c-ea8d-409c-b672-c9230f91cce5", - "originalTimestamp": "2019-10-15T09:35:31.288Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "authorizationType": "legacyApiKey", - "accessToken": "dummy-access-token", - "hubID": "dummy-hubId", - "apiKey": "dummy-apikey", - "apiVersion": "newApi", - "lookupField": "email", - "hubspotEvents": [], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - { - "description": "[HS] (New API v3) - (newPrivateAppApi) message type not present", - "message": { - "traits": {}, - "context": { - "externalId": [ - { - "id": "osvaldocostaferreira98@gmail.com", - "type": "HS-contacts", - "identifierType": "email" - } - ] - }, - "event": "Purchase", - "properties": { - "revenue": "name1" - } - }, - "destination": { - "Config": { - "authorizationType": "newPrivateAppApi", - "hubID": "", - "apiKey": "", - "accessToken": "dummy-access-token", - "apiVersion": "newApi", - "lookupField": "lookupField", - "hubspotEvents": [ - { - "rsEventName": "Purchase", - "hubspotEventName": "pe22315509_rs_hub_test", - "eventProperties": [ - { - "from": "Revenue", - "to": "value" - }, - { - "from": "Price", - "to": "cost" - } - ] - }, - { - "rsEventName": "Order Complete", - "hubspotEventName": "pe22315509_rs_hub_chair", - "eventProperties": [ - { - "from": "firstName", - "to": "first_name" - }, - { - "from": "lastName", - "to": "last_name" - } - ] - } - ], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - { - "description": "[HS] (New API v3) - (legacyApiKey) - check for api key existence", - "message": { - "type": "identify", - "traits": { - "lookupField": "firstname", - "firstname": "Test" - }, - "context": { - "externalId": [ - { - "id": "osvaldocostaferreira98@gmail.com", - "type": "HS-contacts", - "identifierType": "email" - } - ] - }, - "event": "Purchase", - "properties": { - "revenue": "name1" - } - }, - "destination": { - "Config": { - "authorizationType": "legacyApiKey", - "hubID": "dummy-hubId", - "apiKey": "", - "accessToken": "", - "apiVersion": "newApi", - "lookupField": "lookupField", - "hubspotEvents": [ - { - "rsEventName": "Purchase", - "hubspotEventName": "pe22315509_rs_hub_test", - "eventProperties": [ - { - "from": "Revenue", - "to": "value" - }, - { - "from": "Price", - "to": "cost" - } - ] - }, - { - "rsEventName": "Order Complete", - "hubspotEventName": "pe22315509_rs_hub_chair", - "eventProperties": [ - { - "from": "firstName", - "to": "first_name" - }, - { - "from": "lastName", - "to": "last_name" - } - ] - } - ], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - { - "description": "[HS] (New API v3) - (newPrivateAppApi) Identify: traits is not supplied", - "message": { - "type": "identify", - "context": { - "mappedToDestination": false - } - }, - "destination": { - "Config": { - "authorizationType": "newPrivateAppApi", - "hubID": "", - "apiKey": "", - "accessToken": "dummy-access-token", - "apiVersion": "newApi", - "lookupField": "lookupField", - "hubspotEvents": [ - { - "rsEventName": "Purchase", - "hubspotEventName": "pe22315509_rs_hub_test", - "eventProperties": [ - { - "from": "Revenue", - "to": "value" - }, - { - "from": "Price", - "to": "cost" - } - ] - }, - { - "rsEventName": "Order Complete", - "hubspotEventName": "pe22315509_rs_hub_chair", - "eventProperties": [ - { - "from": "firstName", - "to": "first_name" - }, - { - "from": "lastName", - "to": "last_name" - } - ] - } - ], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - { - "description": "[HS] (New API v3) - (legacyApiKey) - event not found", - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "type": "track", - "messageId": "08829772-d991-427c-b976-b4c4f4430b4e", - "originalTimestamp": "2019-10-15T09:35:31.291Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "event": "Temp Event", - "properties": { - "user_actual_role": "system_admin, system_user", - "user_actual_id": 12345, - "address": { - "city": "kolkata", - "country": "India" - }, - "objectId": "5005" - }, - "sentAt": "2019-10-14T11:15:53.296Z" - }, - "destination": { - "Config": { - "authorizationType": "legacyApiKey", - "hubID": "dummy-hubId", - "apiKey": "dummy-apikey", - "accessToken": "", - "apiVersion": "newApi", - "lookupField": "lookupField", - "hubspotEvents": [ - { - "rsEventName": "Purchase", - "hubspotEventName": "pe22315509_rs_hub_test", - "eventProperties": [ - { - "from": "Revenue", - "to": "value" - }, - { - "from": "Price", - "to": "cost" - } - ] - }, - { - "rsEventName": "Order Complete", - "hubspotEventName": "pe22315509_rs_hub_chair", - "eventProperties": [ - { - "from": "firstName", - "to": "first_name" - }, - { - "from": "lastName", - "to": "last_name" - } - ] - } - ], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - { - "description": "[HS] (New API v3) - (legacyApiKey) - event name is required", - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "type": "track", - "messageId": "08829772-d991-427c-b976-b4c4f4430b4e", - "originalTimestamp": "2019-10-15T09:35:31.291Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "properties": { - "user_actual_role": "system_admin, system_user", - "user_actual_id": 12345, - "address": { - "city": "kolkata", - "country": "India" - }, - "objectId": "5005" - }, - "sentAt": "2019-10-14T11:15:53.296Z" - }, - "destination": { - "Config": { - "authorizationType": "legacyApiKey", - "hubID": "dummy-hubId", - "apiKey": "dummy-apikey", - "accessToken": "", - "apiVersion": "newApi", - "lookupField": "lookupField", - "hubspotEvents": [ - { - "rsEventName": "Purchase", - "hubspotEventName": "pe22315509_rs_hub_test", - "eventProperties": [ - { - "from": "Revenue", - "to": "value" - }, - { - "from": "Price", - "to": "cost" - } - ] - }, - { - "rsEventName": "Order Complete", - "hubspotEventName": "pe22315509_rs_hub_chair", - "eventProperties": [ - { - "from": "firstName", - "to": "first_name" - }, - { - "from": "lastName", - "to": "last_name" - } - ] - } - ], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - { - "description": "[HS] (Legacy API v1) - (newPrivateAppApi) rETL - object type is not provided i.e externalId is empty", - "message": { - "type": "identify", - "traits": {}, - "context": { - "mappedToDestination": "true" - } - }, - "destination": { - "Config": { - "authorizationType": "newPrivateAppApi", - "hubID": "", - "apiKey": "", - "accessToken": "dummy-access-token", - "apiVersion": "legacyApi", - "lookupField": "lookupField", - "hubspotEvents": [ - { - "rsEventName": "Purchase", - "hubspotEventName": "pe22315509_rs_hub_test", - "eventProperties": [ - { - "from": "Revenue", - "to": "value" - }, - { - "from": "Price", - "to": "cost" - } - ] - }, - { - "rsEventName": "Order Complete", - "hubspotEventName": "pe22315509_rs_hub_chair", - "eventProperties": [ - { - "from": "firstName", - "to": "first_name" - }, - { - "from": "lastName", - "to": "last_name" - } - ] - } - ], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - }, - { - "description": "[HS] (Legacy API v1) - (newPrivateAppApi) - sample track call for legacy api with newPrivateAppApi", - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "testhubspot2@email.com", - "firstname": "Test Hubspot" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "type": "track", - "messageId": "08829772-d991-427c-b976-b4c4f4430b4e", - "originalTimestamp": "2019-10-15T09:35:31.291Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "event": "test track event HS", - "properties": { - "user_actual_role": "system_admin, system_user", - "user_actual_id": 12345 - }, - "sentAt": "2019-10-14T11:15:53.296Z" - }, - "destination": { - "Config": { - "apiKey": "dummy-apikey", - "hubID": "dummy-hubId", - "authorizationType": "newPrivateAppApi", - "accessToken": "dummy-access-token", - "apiVersion": "legacyApi" - }, - "Enabled": true - } - }, - { - "message": { - "channel": "web", - "context": { - "mappedToDestination": true, - "externalId": [ - { - "identifierType": "email", - "id": "testhubspot2@email.com", - "type": "HS-lead" - } - ], - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "", - "referrer": "", - "search": "", - "title": "", - "url": "" - } - }, - "type": "identify", - "traits": { - "firstname": "Test Hubspot", - "anonymousId": "12345", - "country": "India" - }, - "messageId": "50360b9c-ea8d-409c-b672-c9230f91cce5", - "originalTimestamp": "2019-10-15T09:35:31.288Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "metadata": { - "jobId": 2 - }, - "destination": { - "Config": { - "apiKey": "rate-limit-id", - "hubID": "dummy-hubId" - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Hubspot", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "HS", - "displayName": "Hubspot", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "", - "referrer": "", - "search": "", - "title": "", - "url": "" - }, - "traits": { - "email": "testhubspot2@email.com", - "firstname": "Test Hubspot", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "days_to_close": "29 days to close" - } - }, - "type": "identify", - "messageId": "50360b9c-ea8d-409c-b672-c9230f91cce5", - "originalTimestamp": "2023-04-11T09:35:31.288Z", - "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", - "userId": "user@1", - "integrations": { - "All": true - } - }, - "destination": { - "Config": { - "apiKey": "dummy-apikey", - "hubID": "dummy-hubId" - }, - "Enabled": true - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "testhubspot2@email.com", - "firstname": "Test Hubspot", - "anonymousId": "12345" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "type": "identify", - "messageId": "e8585d9a-7137-4223-b295-68ab1b17dad7", - "originalTimestamp": "2019-10-15T09:35:31.289Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "properties": {}, - "integrations": { - "All": true - }, - "name": "ApplicationLoaded", - "sentAt": "2019-10-14T11:15:53.296Z" - }, - "destination": { - "Config": { - "apiKey": "dummy-apikey", - "hubID": "dummy-hubId" - }, - "Enabled": true - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "testhubspot2@email.com", - "firstname": "Test Hubspot", - "anonymousId": "12345" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "type": "identify", - "messageId": "e8585d9a-7137-4223-b295-68ab1b17dad7", - "originalTimestamp": "2019-10-15T09:35:31.289Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "integrations": { - "All": true - }, - "name": "ApplicationLoaded", - "sentAt": "2019-10-14T11:15:53.296Z" - }, - "destination": { - "Config": { - "apiKey": "dummy-apikey", - "hubID": "dummy-hubId" - }, - "Enabled": true - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "testhubspot2@email.com", - "firstname": "Test Hubspot", - "anonymousId": "12345" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "type": "identify", - "messageId": "e8585d9a-7137-4223-b295-68ab1b17dad7", - "originalTimestamp": "2019-10-15T09:35:31.289Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "properties": "", - "integrations": { - "All": true - }, - "name": "ApplicationLoaded", - "sentAt": "2019-10-14T11:15:53.296Z" - }, - "destination": { - "Config": { - "apiKey": "dummy-apikey", - "hubID": "dummy-hubId" - }, - "Enabled": true - } - }, - { - "description": "[HS] (New API v3) - (newPrivateAppApi) sample track call when hubspotEvents is undefined", - "message": { - "type": "track", - "traits": {}, - "context": { - "externalId": [ - { - "id": "osvaldocostaferreira98@gmail.com", - "type": "HS-contacts", - "identifierType": "email" - } - ] - }, - "event": "Purchase", - "properties": { - "Revenue": "name1" - } - }, - "destination": { - "Config": { - "authorizationType": "newPrivateAppApi", - "hubID": "", - "apiKey": "", - "accessToken": "dummy-access-token", - "apiVersion": "newApi", - "lookupField": "lookupField", - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "Enabled": true - } - } -] diff --git a/test/__tests__/data/hs_output.json b/test/__tests__/data/hs_output.json deleted file mode 100644 index 72fe50ba0d..0000000000 --- a/test/__tests__/data/hs_output.json +++ /dev/null @@ -1,843 +0,0 @@ -[ - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.hubapi.com/contacts/v1/contact/createOrUpdate/email/testhubspot2@email.com", - "headers": { - "Content-Type": "application/json" - }, - "params": { - "hapikey": "dummy-apikey" - }, - "body": { - "JSON": { - "properties": [ - { - "property": "email", - "value": "testhubspot2@email.com" - }, - { - "property": "firstname", - "value": "Test Hubspot" - } - ] - }, - "XML": {}, - "FORM": {}, - "JSON_ARRAY": {} - }, - "files": {} - } - ], - { - "statusCode": 400, - "error": "Message type page is not supported" - }, - { - "version": "1", - "type": "REST", - "method": "GET", - "messageType": "track", - "endpoint": "https://track.hubspot.com/v1/event", - "headers": { - "Content-Type": "application/json" - }, - "params": { - "_a": "dummy-hubId", - "_n": "test track event HS", - "email": "testhubspot2@email.com", - "firstname": "Test Hubspot" - }, - "body": { - "JSON": {}, - "XML": {}, - "FORM": {}, - "JSON_ARRAY": {} - }, - "files": {} - }, - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.hubapi.com/contacts/v1/contact/createOrUpdate/email/testhubspot2@email.com", - "headers": { - "Content-Type": "application/json" - }, - "params": { - "hapikey": "dummy-apikey" - }, - "body": { - "JSON": { - "properties": [ - { - "property": "email", - "value": "testhubspot2@email.com" - }, - { - "property": "firstname", - "value": "Test Hubspot" - } - ] - }, - "XML": {}, - "FORM": {}, - "JSON_ARRAY": {} - }, - "files": {} - } - ], - { - "statusCode": 400, - "error": "Identify without email is not supported." - }, - { - "version": "1", - "type": "REST", - "method": "GET", - "messageType": "track", - "endpoint": "https://track.hubspot.com/v1/event", - "headers": { - "Content-Type": "application/json" - }, - "params": { - "_a": "dummy-hubId", - "_n": "test track event HS", - "_m": 4.99, - "email": "testhubspot2@email.com", - "firstname": "Test Hubspot" - }, - "body": { - "JSON": {}, - "XML": {}, - "FORM": {}, - "JSON_ARRAY": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "GET", - "messageType": "track", - "endpoint": "https://track.hubspot.com/v1/event", - "headers": { - "Content-Type": "application/json" - }, - "params": { - "_a": "dummy-hubId", - "_n": "test track event HS", - "_m": 4.99, - "email": "testhubspot2@email.com", - "firstname": "Test Hubspot" - }, - "body": { - "JSON": {}, - "XML": {}, - "FORM": {}, - "JSON_ARRAY": {} - }, - "files": {} - }, - { - "error": "Failed to get hubspot properties: {\"status\":\"error\",\"message\":\"The API key provided is invalid. View or manage your API key here: https://app.hubspot.com/l/api-key/\",\"correlationId\":\"4d39ff11-e121-4514-bcd8-132a9dd1ff50\",\"category\":\"INVALID_AUTHENTICATION\",\"links\":{\"api key\":\"https://app.hubspot.com/l/api-key/\"}}" - }, - { - "error": "Failed to get hubspot properties: {\"status\":\"error\",\"message\":\"Request Rate Limit reached\",\"correlationId\":\"4d39ff11-e121-4514-bcd8-132a9dd1ff50\",\"category\":\"RATE-LIMIT_REACHED\",\"links\":{\"api key\":\"https://app.hubspot.com/l/api-key/\"}}" - }, - { - "version": "1", - "type": "REST", - "method": "GET", - "messageType": "track", - "endpoint": "https://track.hubspot.com/v1/event", - "headers": { - "Content-Type": "application/json" - }, - "params": { - "_a": "dummy-hubId", - "_n": "test track event HS", - "email": "testhubspot2@email.com", - "firstname": "Test Hubspot" - }, - "body": { - "JSON": {}, - "XML": {}, - "FORM": {}, - "JSON_ARRAY": {} - }, - "files": {} - }, - [ - { - "version": "1", - "type": "REST", - "method": "PATCH", - "endpoint": "https://api.hubapi.com/crm/v3/objects/lead/103605", - "source": "rETL", - "operation": "updateObject", - "headers": { - "Content-Type": "application/json" - }, - "params": { - "hapikey": "dummy-apikey" - }, - "body": { - "JSON": { - "properties": { - "firstname": "Test Hubspot", - "anonymousId": "12345", - "country": "India", - "email": "testhubspot2@email.com" - } - }, - "XML": {}, - "FORM": {}, - "JSON_ARRAY": {} - }, - "files": {} - } - ], - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.hubapi.com/crm/v3/objects/lead", - "source": "rETL", - "operation": "createObject", - "headers": { - "Content-Type": "application/json" - }, - "params": { - "hapikey": "dummy-apikey" - }, - "body": { - "JSON": { - "properties": { - "firstname": "Test Hubspot", - "anonymousId": "12345", - "country": "India", - "email": "testhubspot@email.com" - } - }, - "XML": {}, - "FORM": {}, - "JSON_ARRAY": {} - }, - "files": {} - } - ], - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.hubapi.com/crm/v3/objects/lead", - "source": "rETL", - "operation": "createObject", - "headers": { - "Authorization": "Bearer dummy-access-token", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "properties": { - "firstname": "Test Hubspot", - "anonymousId": "12345", - "country": "India", - "email": "testhubspot@email.com" - } - }, - "XML": {}, - "FORM": {}, - "JSON_ARRAY": {} - }, - "files": {} - } - ], - [ - { - "version": "1", - "type": "REST", - "method": "PATCH", - "endpoint": "https://api.hubapi.com/crm/v3/objects/lead/103605", - "source": "rETL", - "operation": "updateObject", - "headers": { - "Authorization": "Bearer dummy-access-token", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "properties": { - "firstname": "Test Hubspot", - "anonymousId": "12345", - "country": "India", - "email": "testhubspot2@email.com" - } - }, - "XML": {}, - "FORM": {}, - "JSON_ARRAY": {} - }, - "files": {} - } - ], - { - "version": "1", - "type": "REST", - "method": "GET", - "messageType": "track", - "endpoint": "https://track.hubspot.com/v1/event", - "headers": { - "Content-Type": "application/json" - }, - "params": { - "_a": "dummy-hubId", - "_n": "test track event HS", - "email": "testhubspot2@email.com", - "firstname": "Test Hubspot" - }, - "body": { - "JSON": {}, - "XML": {}, - "FORM": {}, - "JSON_ARRAY": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "GET", - "messageType": "track", - "endpoint": "https://track.hubspot.com/v1/event", - "headers": { - "Content-Type": "application/json" - }, - "params": { - "_a": "dummy-hubId", - "_n": "test track event HS 2", - "id": "6556", - "email": "testhubspot2@email.com", - "firstname": "Test Hubspot" - }, - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "GET", - "messageType": "track", - "endpoint": "https://track.hubspot.com/v1/event", - "headers": { - "Content-Type": "application/json" - }, - "params": { - "_a": "dummy-hubId", - "_n": "test track event HS 2", - "id": "6556", - "address": "24. park", - "company": "RudderStack" - }, - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.hubapi.com/contacts/v1/contact/createOrUpdate/email/testhubspot2@email.com", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer dummy-access-token" - }, - "params": {}, - "body": { - "JSON": { - "properties": [ - { - "property": "email", - "value": "testhubspot2@email.com" - }, - { - "property": "firstname", - "value": "Test Hubspot" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ], - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.hubapi.com/crm/v3/objects/contacts/103604", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer dummy-access-token" - }, - "params": {}, - "operation": "updateContacts", - "body": { - "JSON": { - "properties": { - "email": "testhubspot@email.com", - "firstname": "Test Hubspot" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ], - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.hubapi.com/crm/v3/objects/contacts", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer dummy-access-token" - }, - "params": {}, - "operation": "createContacts", - "body": { - "JSON": { - "properties": { - "email": "noname@email.com", - "firstname": "Test Hubspot" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ], - { - "statusCode": 400, - "error": "Unable to get single Hubspot contact. More than one contacts found. Retry with unique lookupPropertyName and lookupValue" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "messageType": "track", - "endpoint": "https://api.hubapi.com/events/v3/send", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer dummy-access-token" - }, - "params": {}, - "body": { - "JSON": { - "email": "testhubspot2@email.com", - "occurredAt": "2019-10-15T09:35:31.291Z", - "eventName": "pe22315509_rs_hub_test", - "properties": { - "value": 100 - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.hubapi.com/contacts/v1/contact/createOrUpdate/email/testhubspot2@email.com", - "headers": { - "Content-Type": "application/json" - }, - "params": { - "hapikey": "dummy-apikey" - }, - "body": { - "JSON": { - "properties": [ - { - "property": "email", - "value": "testhubspot2@email.com" - }, - { - "property": "firstname", - "value": "Test Hubspot" - } - ] - }, - "XML": {}, - "FORM": {}, - "JSON_ARRAY": {} - }, - "files": {} - } - ], - { - "version": "1", - "type": "REST", - "method": "GET", - "messageType": "track", - "endpoint": "https://track.hubspot.com/v1/event", - "headers": { - "Content-Type": "application/json" - }, - "params": { - "_a": "dummy-hubId", - "_n": "test track event HS", - "email": "testhubspot2@email.com", - "firstname": "Test Hubspot" - }, - "body": { - "JSON": {}, - "XML": {}, - "FORM": {}, - "JSON_ARRAY": {} - }, - "files": {} - }, - { - "statusCode": 400, - "error": "Identify:: email i.e a default lookup field for contact lookup not found in traits", - "statTags": { - "destination": "hs", - "stage": "transform", - "scope": "exception" - } - }, - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.hubapi.com/crm/v3/objects/contacts", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer dummy-access-token" - }, - "params": {}, - "body": { - "JSON": { - "properties": { - "email": "noname@email.com" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "operation": "createContacts" - } - ], - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.hubapi.com/crm/v3/objects/contacts", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer dummy-access-token" - }, - "params": {}, - "body": { - "JSON": { - "properties": { - "email": "osvaldocostaferreira98@gmail.com" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "source": "rETL", - "operation": "createObject" - } - ], - { - "statusCode": 400, - "error": "rETL - external Id not found.", - "statTags": { - "destination": "hs", - "stage": "transform", - "scope": "exception" - } - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.hubapi.com/events/v3/send", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer dummy-access-token" - }, - "params": {}, - "body": { - "JSON": { - "email": "osvaldocostaferreira98@gmail.com", - "eventName": "pe22315509_rs_hub_test", - "properties": { - "value": "name1" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "messageType": "track" - }, - { - "statusCode": 400, - "error": "Access Token not found. Aborting", - "statTags": { - "destination": "hs", - "stage": "transform", - "scope": "exception" - } - }, - { - "statusCode": 400, - "error": "Hub ID not found. Aborting", - "statTags": { - "destination": "hs", - "stage": "transform", - "scope": "exception" - } - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.hubapi.com/events/v3/send?hapikey=dummy-apikey", - "headers": { - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "occurredAt": "2019-10-15T09:35:31.291Z", - "objectId": "5005", - "eventName": "pe22315509_rs_hub_test", - "properties": { - "hs_city": "kolkata", - "hs_country": "India" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "messageType": "track" - }, - { - "statusCode": 400, - "error": "Either of email, utk or objectId is required for custom behavioral events", - "statTags": { - "destination": "hs", - "stage": "transform", - "scope": "exception" - } - }, - [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.hubapi.com/crm/v3/objects/contacts", - "headers": { - "Content-Type": "application/json" - }, - "params": { - "hapikey": "dummy-apikey" - }, - "operation": "createContacts", - "body": { - "JSON": { - "properties": { - "email": "noname@email.com", - "firstname": "Test Hubspot" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ], - { - "statusCode": 400, - "error": "Message type is not present. Aborting message." - }, - { - "statusCode": 400, - "error": "API Key not found. Aborting" - }, - { - "statusCode": 400, - "error": "Identify - Invalid traits value for lookup field" - }, - { - "statusCode": 400, - "error": "Event name 'temp event' mappings are not configured in the destination" - }, - { - "statusCode": 400, - "error": "event name is required for track call" - }, - { - "statusCode": 400, - "error": "rETL - external Id not found.", - "statTags": { - "destination": "hs", - "stage": "transform", - "scope": "exception" - } - }, - { - "version": "1", - "type": "REST", - "method": "GET", - "messageType": "track", - "endpoint": "https://track.hubspot.com/v1/event", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer dummy-access-token" - }, - "params": { - "_a": "dummy-hubId", - "_n": "test track event HS", - "email": "testhubspot2@email.com", - "firstname": "Test Hubspot" - }, - "body": { - "JSON": {}, - "XML": {}, - "FORM": {}, - "JSON_ARRAY": {} - }, - "files": {} - }, - { - "error": "rETL - Error during searching object record. 404 not found" - }, - { - "error": "Property days_to_close data type string is not matching with Hubspot property data type number" - }, - [ - { - "body": { - "FORM": {}, - "JSON": { - "properties": [ - { "property": "email", "value": "testhubspot2@email.com" }, - { "property": "firstname", "value": "Test Hubspot" } - ] - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://api.hubapi.com/contacts/v1/contact/createOrUpdate/email/testhubspot2@email.com", - "files": {}, - "headers": { "Content-Type": "application/json" }, - "method": "POST", - "params": { "hapikey": "dummy-apikey" }, - "type": "REST", - "version": "1" - } - ], - [ - { - "body": { - "FORM": {}, - "JSON": { - "properties": [ - { "property": "email", "value": "testhubspot2@email.com" }, - { "property": "firstname", "value": "Test Hubspot" } - ] - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://api.hubapi.com/contacts/v1/contact/createOrUpdate/email/testhubspot2@email.com", - "files": {}, - "headers": { "Content-Type": "application/json" }, - "method": "POST", - "params": { "hapikey": "dummy-apikey" }, - "type": "REST", - "version": "1" - } - ], - [ - { - "body": { - "FORM": {}, - "JSON": { - "properties": [ - { "property": "email", "value": "testhubspot2@email.com" }, - { "property": "firstname", "value": "Test Hubspot" } - ] - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://api.hubapi.com/contacts/v1/contact/createOrUpdate/email/testhubspot2@email.com", - "files": {}, - "headers": { "Content-Type": "application/json" }, - "method": "POST", - "params": { "hapikey": "dummy-apikey" }, - "type": "REST", - "version": "1" - } - ], - - { - "statusCode": 400, - "error": "Event and property mappings are required for track call", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation", - "destType": "HS", - "module": "destination", - "implementation": "native", - "feature": "processor" - } - } -] diff --git a/test/__tests__/data/hs_router_associations_rEtl_input.json b/test/__tests__/data/hs_router_associations_rEtl_input.json deleted file mode 100644 index 4cd0ac8d43..0000000000 --- a/test/__tests__/data/hs_router_associations_rEtl_input.json +++ /dev/null @@ -1,57 +0,0 @@ -[ - { - "destination": { - "ID": "123", - "Config": { - "authorizationType": "newPrivateAppApi", - "accessToken": "pat-123", - "apiVersion": "newApi" - } - }, - "message": { - "type": "identify", - "sentAt": "2022-08-23T05:59:38.214Z", - "traits": { - "to": { - "id": 1 - }, - "from": { - "id": 9405415215 - } - }, - "userId": "1", - "channel": "sources", - "context": { - "sources": { - "job_id": "2DkDam0hJ8CXZA43zksWMdPAPRe/Syncher", - "task_id": "HUBSPOT_ASSOC_COMPANY_CONTACT", - "version": "v1.8.15", - "batch_id": "8d566f29-5f9b-4fa7-ad0c-d8087ca52d6a", - "job_run_id": "cc26p35qhlpr6fd4jrmg", - "task_run_id": "cc26p35qhlpr6fd4jrn0" - }, - "externalId": [ - { - "id": 1, - "type": "HS-association", - "toObjectType": "contacts", - "fromObjectType": "companies", - "identifierType": "id", - "associationTypeId": "engineer" - } - ], - "mappedToDestination": "true" - }, - "recordId": "1", - "rudderId": "3afcdbfe-b6ec-4bdd-8ba6-28696e3cc163", - "messageId": "e0c554aa-0a9a-4e24-9a9a-c951a71a0875", - "timestamp": "2022-08-23T05:59:33.758Z", - "receivedAt": "2022-08-23T05:59:33.759Z", - "request_ip": "10.1.90.32", - "originalTimestamp": "2022-08-23T05:59:38.214Z" - }, - "metadata": { - "jobId": 2 - } - } -] diff --git a/test/__tests__/data/hs_router_associations_rEtl_output.json b/test/__tests__/data/hs_router_associations_rEtl_output.json deleted file mode 100644 index e8535c48d2..0000000000 --- a/test/__tests__/data/hs_router_associations_rEtl_output.json +++ /dev/null @@ -1,49 +0,0 @@ -[ - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.hubapi.com/crm/v3/associations/companies/contacts/batch/create", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer pat-123" - }, - "params": {}, - "body": { - "JSON": { - "inputs": [ - { - "to": { - "id": 1 - }, - "from": { - "id": 9405415215 - }, - "type": "engineer" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "jobId": 2 - } - ], - "batched": true, - "statusCode": 200, - "destination": { - "ID": "123", - "Config": { - "authorizationType": "newPrivateAppApi", - "accessToken": "pat-123", - "apiVersion": "newApi" - } - } - } -] diff --git a/test/__tests__/data/hs_router_input.json b/test/__tests__/data/hs_router_input.json deleted file mode 100644 index 7f82f2f8d4..0000000000 --- a/test/__tests__/data/hs_router_input.json +++ /dev/null @@ -1,573 +0,0 @@ -[ - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "noname@email.com", - "firstname": "Test Hubspot22", - "anonymousId": "4444" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "", - "referrer": "", - "search": "", - "title": "", - "url": "" - } - }, - "type": "identify", - "messageId": "50360b9c-ea8d-409c-b672-c9230f91cce5", - "originalTimestamp": "2019-10-15T09:35:31.288Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "metadata": { - "jobId": 1 - }, - "destination": { - "Config": { - "authorizationType": "newPrivateAppApi", - "accessToken": "dummy-access-token", - "hubID": "dummy-hubId", - "apiKey": "dummy-apikey", - "apiVersion": "newApi", - "lookupField": "email", - "hubspotEvents": [ - { - "rsEventName": "Purchase", - "hubspotEventName": "pedummy-hubId_rs_hub_test", - "eventProperties": [ - { - "from": "Revenue", - "to": "value" - }, - { - "from": "Price", - "to": "cost" - } - ] - }, - { - "rsEventName": "Order Complete", - "hubspotEventName": "pedummy-hubId_rs_hub_chair", - "eventProperties": [ - { - "from": "firstName", - "to": "first_name" - }, - { - "from": "lastName", - "to": "last_name" - } - ] - } - ], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Hubspot", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "HS", - "displayName": "Hubspot", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "noname@email.com", - "firstname": "Test Hubspot44", - "anonymousId": "4444" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "", - "referrer": "", - "search": "", - "title": "", - "url": "" - } - }, - "type": "identify", - "messageId": "50360b9c-ea8d-409c-b672-c9230f91cce5", - "originalTimestamp": "2019-10-15T09:35:31.288Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "metadata": { - "jobId": 2 - }, - "destination": { - "Config": { - "authorizationType": "newPrivateAppApi", - "accessToken": "dummy-access-token", - "hubID": "dummy-hubId", - "apiKey": "dummy-apikey", - "apiVersion": "newApi", - "lookupField": "email", - "hubspotEvents": [ - { - "rsEventName": "Purchase", - "hubspotEventName": "pedummy-hubId_rs_hub_test", - "eventProperties": [ - { - "from": "Revenue", - "to": "value" - }, - { - "from": "Price", - "to": "cost" - } - ] - }, - { - "rsEventName": "Order Complete", - "hubspotEventName": "pedummy-hubId_rs_hub_chair", - "eventProperties": [ - { - "from": "firstName", - "to": "first_name" - }, - { - "from": "lastName", - "to": "last_name" - } - ] - } - ], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Hubspot", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "HS", - "displayName": "Hubspot", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - }, - { - "message": { - "type": "track", - "traits": {}, - "context": { - "externalId": [ - { - "id": "osvaldocostaferreira98@gmail.com", - "type": "HS-contacts", - "identifierType": "email" - } - ] - }, - "event": "Purchase", - "properties": { - "Revenue": "name1" - } - }, - "metadata": { - "jobId": 3 - }, - "destination": { - "Config": { - "authorizationType": "newPrivateAppApi", - "accessToken": "dummy-access-token", - "hubID": "dummy-hubId", - "apiKey": "dummy-apikey", - "apiVersion": "newApi", - "lookupField": "lookupField", - "hubspotEvents": [ - { - "rsEventName": "Purchase", - "hubspotEventName": "pedummy-hubId_rs_hub_test", - "eventProperties": [ - { - "from": "Revenue", - "to": "value" - }, - { - "from": "Price", - "to": "cost" - } - ] - }, - { - "rsEventName": "Order Complete", - "hubspotEventName": "pedummy-hubId_rs_hub_chair", - "eventProperties": [ - { - "from": "firstName", - "to": "first_name" - }, - { - "from": "lastName", - "to": "last_name" - } - ] - } - ], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Hubspot", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "HS", - "displayName": "Hubspot", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "testhubspot@email.com", - "firstname": "Test Hubspot22", - "anonymousId": "4444" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "", - "referrer": "", - "search": "", - "title": "", - "url": "" - } - }, - "type": "identify", - "messageId": "50360b9c-ea8d-409c-b672-c9230f91cce5", - "originalTimestamp": "2019-10-15T09:35:31.288Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "metadata": { - "jobId": 4 - }, - "destination": { - "Config": { - "authorizationType": "newPrivateAppApi", - "accessToken": "dummy-access-token", - "hubID": "dummy-hubId", - "apiKey": "dummy-apikey", - "apiVersion": "newApi", - "lookupField": "email", - "hubspotEvents": [ - { - "rsEventName": "Purchase", - "hubspotEventName": "pedummy-hubId_rs_hub_test", - "eventProperties": [ - { - "from": "Revenue", - "to": "value" - }, - { - "from": "Price", - "to": "cost" - } - ] - }, - { - "rsEventName": "Order Complete", - "hubspotEventName": "pedummy-hubId_rs_hub_chair", - "eventProperties": [ - { - "from": "firstName", - "to": "first_name" - }, - { - "from": "lastName", - "to": "last_name" - } - ] - } - ], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Hubspot", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "HS", - "displayName": "Hubspot", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "testhubspot@email.com", - "firstname": "Test Hubspot44", - "anonymousId": "4444" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "", - "referrer": "", - "search": "", - "title": "", - "url": "" - } - }, - "type": "identify", - "messageId": "50360b9c-ea8d-409c-b672-c9230f91cce5", - "originalTimestamp": "2019-10-15T09:35:31.288Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "metadata": { - "jobId": 5 - }, - "destination": { - "Config": { - "authorizationType": "newPrivateAppApi", - "accessToken": "dummy-access-token", - "hubID": "dummy-hubId", - "apiKey": "dummy-apikey", - "apiVersion": "newApi", - "lookupField": "email", - "hubspotEvents": [ - { - "rsEventName": "Purchase", - "hubspotEventName": "pedummy-hubId_rs_hub_test", - "eventProperties": [ - { - "from": "Revenue", - "to": "value" - }, - { - "from": "Price", - "to": "cost" - } - ] - }, - { - "rsEventName": "Order Complete", - "hubspotEventName": "pedummy-hubId_rs_hub_chair", - "eventProperties": [ - { - "from": "firstName", - "to": "first_name" - }, - { - "from": "lastName", - "to": "last_name" - } - ] - } - ], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Hubspot", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "HS", - "displayName": "Hubspot", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - } -] diff --git a/test/__tests__/data/hs_router_input_legacy.json b/test/__tests__/data/hs_router_input_legacy.json deleted file mode 100644 index 022aba7315..0000000000 --- a/test/__tests__/data/hs_router_input_legacy.json +++ /dev/null @@ -1,281 +0,0 @@ -[ - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "testhubspot1@email.com", - "firstname": "Test Hubspot1", - "anonymousId": "1111" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "", - "referrer": "", - "search": "", - "title": "", - "url": "" - } - }, - "type": "identify", - "messageId": "50360b9c-ea8d-409c-b672-c9230f91cce5", - "originalTimestamp": "2019-10-15T09:35:31.288Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "metadata": { - "jobId": 1 - }, - "destination": { - "Config": { - "apiKey": "dummy-apikey", - "hubID": "dummy-hubId" - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Hubspot", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "HS", - "displayName": "Hubspot", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "testhubspot2@email.com", - "firstname": "Test Hubspot2" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "type": "track", - "messageId": "08829772-d991-427c-b976-b4c4f4430b4e", - "originalTimestamp": "2019-10-15T09:35:31.291Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "event": "test track event HS", - "properties": { - "user_actual_role": "system_admin, system_user", - "user_actual_id": 12345 - }, - "sentAt": "2019-10-14T11:15:53.296Z" - }, - "metadata": { - "jobId": 2 - }, - "destination": { - "Config": { - "apiKey": "dummy-apikey", - "hubID": "dummy-hubId" - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Hubspot", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "HS", - "displayName": "Hubspot", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - }, - { - "message": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.hubapi.com/contacts/v1/contact/createOrUpdate/email/testhubspot2@email.com", - "headers": { - "Content-Type": "application/json" - }, - "userId": "00000000000000000000000000", - "params": { - "hapikey": "dummy-apikey" - }, - "body": { - "JSON": { - "properties": [ - { - "property": "email", - "value": "testhubspot3@email.com" - }, - { - "property": "firstname", - "value": "Test Hubspot3" - } - ] - }, - "XML": {}, - "FORM": {} - }, - "files": {}, - "statusCode": 200 - }, - "metadata": { - "jobId": 3 - }, - "destination": { - "Config": { - "apiKey": "dummy-apikey", - "hubID": "dummy-hubId" - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Hubspot", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "HS", - "displayName": "Hubspot", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "testhubspot4@email.com", - "firstname": "Test Hubspot4", - "anonymousId": "4444" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-GB", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "page": { - "path": "", - "referrer": "", - "search": "", - "title": "", - "url": "" - } - }, - "type": "identify", - "messageId": "50360b9c-ea8d-409c-b672-c9230f91cce5", - "originalTimestamp": "2019-10-15T09:35:31.288Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "metadata": { - "jobId": 4 - }, - "destination": { - "Config": { - "apiKey": "rate-limit-id", - "hubID": "dummy-hubId" - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Hubspot", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "HS", - "displayName": "Hubspot", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - } -] diff --git a/test/__tests__/data/hs_router_legacy_rETL_input.json b/test/__tests__/data/hs_router_legacy_rETL_input.json deleted file mode 100644 index 6bba7d72de..0000000000 --- a/test/__tests__/data/hs_router_legacy_rETL_input.json +++ /dev/null @@ -1,130 +0,0 @@ -[ - { - "message": { - "channel": "web", - "context": { - "mappedToDestination": true, - "externalId": [ - { - "identifierType": "email", - "id": "testhubspot2@email.com", - "type": "HS-lead" - } - ], - "sources": { - "job_id": "24c5HJxHomh6YCngEOCgjS5r1KX/Syncher", - "task_id": "vw_rs_mailchimp_mocked_hg_data", - "version": "v1.8.1", - "batch_id": "f252c69d-c40d-450e-bcd2-2cf26cb62762", - "job_run_id": "c8el40l6e87v0c4hkbl0", - "task_run_id": "c8el40l6e87v0c4hkblg" - } - }, - "type": "identify", - "traits": { - "firstname": "Test Hubspot", - "anonymousId": "12345", - "country": "India" - }, - "messageId": "50360b9c-ea8d-409c-b672-c9230f91cce5", - "originalTimestamp": "2019-10-15T09:35:31.288Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "apiKey": "dummy-apikey", - "hubID": "dummy-hubId" - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Hubspot", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "HS", - "displayName": "Hubspot", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - }, - "metadata": { - "jobId": 2 - } - }, - { - "message": { - "channel": "web", - "context": { - "mappedToDestination": true, - "externalId": [ - { - "identifierType": "email", - "id": "testhubspot@email.com", - "type": "HS-lead" - } - ], - "sources": { - "job_id": "24c5HJxHomh6YCngEOCgjS5r1KX/Syncher", - "task_id": "vw_rs_mailchimp_mocked_hg_data", - "version": "v1.8.1", - "batch_id": "f252c69d-c40d-450e-bcd2-2cf26cb62762", - "job_run_id": "c8el40l6e87v0c4hkbl0", - "task_run_id": "c8el40l6e87v0c4hkblg" - } - }, - "type": "identify", - "traits": { - "firstname": "Test Hubspot 1", - "anonymousId": "123451", - "country": "India 1" - }, - "messageId": "50360b9c-ea8d-409c-b672-c9230f91cce5", - "originalTimestamp": "2019-10-15T09:35:31.288Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "apiKey": "dummy-apikey", - "hubID": "dummy-hubId" - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Hubspot", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "HS", - "displayName": "Hubspot", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - }, - "metadata": { - "jobId": 3 - } - } -] diff --git a/test/__tests__/data/hs_router_legacy_rETL_output.json b/test/__tests__/data/hs_router_legacy_rETL_output.json deleted file mode 100644 index dcd3ab91b1..0000000000 --- a/test/__tests__/data/hs_router_legacy_rETL_output.json +++ /dev/null @@ -1,129 +0,0 @@ -[ - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.hubapi.com/crm/v3/objects/lead/batch/create", - "headers": { - "Content-Type": "application/json" - }, - "params": { - "hapikey": "dummy-apikey" - }, - "body": { - "JSON": { - "inputs": [ - { - "properties": { - "firstname": "Test Hubspot 1", - "anonymousId": "123451", - "country": "India 1", - "email": "testhubspot@email.com" - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "jobId": 3 - } - ], - "batched": true, - "statusCode": 200, - "destination": { - "Config": { - "apiKey": "dummy-apikey", - "hubID": "dummy-hubId" - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Hubspot", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "HS", - "displayName": "Hubspot", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - }, - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.hubapi.com/crm/v3/objects/lead/batch/update", - "headers": { - "Content-Type": "application/json" - }, - "params": { - "hapikey": "dummy-apikey" - }, - "body": { - "JSON": { - "inputs": [ - { - "properties": { - "firstname": "Test Hubspot", - "anonymousId": "12345", - "country": "India", - "email": "testhubspot2@email.com" - }, - "id": "103605" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "jobId": 2 - } - ], - "batched": true, - "statusCode": 200, - "destination": { - "Config": { - "apiKey": "dummy-apikey", - "hubID": "dummy-hubId" - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Hubspot", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "HS", - "displayName": "Hubspot", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - } -] diff --git a/test/__tests__/data/hs_router_output.json b/test/__tests__/data/hs_router_output.json deleted file mode 100644 index bd0045e7e6..0000000000 --- a/test/__tests__/data/hs_router_output.json +++ /dev/null @@ -1,321 +0,0 @@ -[ - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.hubapi.com/crm/v3/objects/contacts/batch/create", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer dummy-access-token" - }, - "params": {}, - "body": { - "JSON": { - "inputs": [ - { - "properties": { - "email": "noname@email.com", - "firstname": "Test Hubspot44" - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "jobId": 1 - }, - { - "jobId": 2 - } - ], - "batched": true, - "statusCode": 200, - "destination": { - "Config": { - "authorizationType": "newPrivateAppApi", - "accessToken": "dummy-access-token", - "hubID": "dummy-hubId", - "apiKey": "dummy-apikey", - "apiVersion": "newApi", - "lookupField": "email", - "hubspotEvents": [ - { - "rsEventName": "Purchase", - "hubspotEventName": "pedummy-hubId_rs_hub_test", - "eventProperties": [ - { - "from": "Revenue", - "to": "value" - }, - { - "from": "Price", - "to": "cost" - } - ] - }, - { - "rsEventName": "Order Complete", - "hubspotEventName": "pedummy-hubId_rs_hub_chair", - "eventProperties": [ - { - "from": "firstName", - "to": "first_name" - }, - { - "from": "lastName", - "to": "last_name" - } - ] - } - ], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Hubspot", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "HS", - "displayName": "Hubspot", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - }, - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.hubapi.com/crm/v3/objects/contacts/batch/update", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer dummy-access-token" - }, - "params": {}, - "body": { - "JSON": { - "inputs": [ - { - "id": "103604", - "properties": { - "email": "testhubspot@email.com", - "firstname": "Test Hubspot44" - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "jobId": 4 - }, - { - "jobId": 5 - } - ], - "batched": true, - "statusCode": 200, - "destination": { - "Config": { - "authorizationType": "newPrivateAppApi", - "accessToken": "dummy-access-token", - "hubID": "dummy-hubId", - "apiKey": "dummy-apikey", - "apiVersion": "newApi", - "lookupField": "email", - "hubspotEvents": [ - { - "rsEventName": "Purchase", - "hubspotEventName": "pedummy-hubId_rs_hub_test", - "eventProperties": [ - { - "from": "Revenue", - "to": "value" - }, - { - "from": "Price", - "to": "cost" - } - ] - }, - { - "rsEventName": "Order Complete", - "hubspotEventName": "pedummy-hubId_rs_hub_chair", - "eventProperties": [ - { - "from": "firstName", - "to": "first_name" - }, - { - "from": "lastName", - "to": "last_name" - } - ] - } - ], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Hubspot", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "HS", - "displayName": "Hubspot", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - }, - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.hubapi.com/events/v3/send", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer dummy-access-token" - }, - "params": {}, - "body": { - "JSON": { - "email": "osvaldocostaferreira98@gmail.com", - "eventName": "pedummy-hubId_rs_hub_test", - "properties": { - "value": "name1" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "jobId": 3 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "authorizationType": "newPrivateAppApi", - "accessToken": "dummy-access-token", - "hubID": "dummy-hubId", - "apiKey": "dummy-apikey", - "apiVersion": "newApi", - "lookupField": "email", - "hubspotEvents": [ - { - "rsEventName": "Purchase", - "hubspotEventName": "pedummy-hubId_rs_hub_test", - "eventProperties": [ - { - "from": "Revenue", - "to": "value" - }, - { - "from": "Price", - "to": "cost" - } - ] - }, - { - "rsEventName": "Order Complete", - "hubspotEventName": "pedummy-hubId_rs_hub_chair", - "eventProperties": [ - { - "from": "firstName", - "to": "first_name" - }, - { - "from": "lastName", - "to": "last_name" - } - ] - } - ], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Hubspot", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "HS", - "displayName": "Hubspot", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - } -] diff --git a/test/__tests__/data/hs_router_output_legacy.json b/test/__tests__/data/hs_router_output_legacy.json deleted file mode 100644 index 7ce945a24a..0000000000 --- a/test/__tests__/data/hs_router_output_legacy.json +++ /dev/null @@ -1,117 +0,0 @@ -[ - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.hubapi.com/contacts/v1/contact/batch/", - "headers": { - "Content-Type": "application/json" - }, - "params": { - "hapikey": "dummy-apikey" - }, - "body": { - "JSON": {}, - "JSON_ARRAY": { - "batch": "[{\"email\":\"testhubspot3@email.com\",\"properties\":[{\"property\":\"firstname\",\"value\":\"Test Hubspot3\"}]},{\"email\":\"testhubspot1@email.com\",\"properties\":[{\"property\":\"firstname\",\"value\":\"Test Hubspot1\"}]},{\"email\":\"testhubspot4@email.com\",\"properties\":[{\"property\":\"firstname\",\"value\":\"Test Hubspot4\"}]}]" - }, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "jobId": 3 - }, - { - "jobId": 1 - }, - { - "jobId": 4 - } - ], - "batched": true, - "statusCode": 200, - "destination": { - "Config": { - "apiKey": "dummy-apikey", - "hubID": "dummy-hubId" - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Hubspot", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "HS", - "displayName": "Hubspot", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - }, - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "GET", - "endpoint": "https://track.hubspot.com/v1/event", - "headers": { - "Content-Type": "application/json" - }, - "params": { - "_a": "dummy-hubId", - "_n": "test track event HS", - "email": "testhubspot2@email.com", - "firstname": "Test Hubspot2" - }, - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "jobId": 2 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "apiKey": "dummy-apikey", - "hubID": "dummy-hubId" - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Hubspot", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "HS", - "displayName": "Hubspot", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - } -] diff --git a/test/__tests__/data/hs_router_rETL_input.json b/test/__tests__/data/hs_router_rETL_input.json deleted file mode 100644 index 3e855855b4..0000000000 --- a/test/__tests__/data/hs_router_rETL_input.json +++ /dev/null @@ -1,332 +0,0 @@ -[ - { - "message": { - "channel": "web", - "context": { - "mappedToDestination": true, - "externalId": [ - { - "identifierType": "email", - "id": "testhubspot2@email.com", - "type": "HS-lead" - } - ], - "sources": { - "job_id": "24c5HJxHomh6YCngEOCgjS5r1KX/Syncher", - "task_id": "vw_rs_mailchimp_mocked_hg_data", - "version": "v1.8.1", - "batch_id": "f252c69d-c40d-450e-bcd2-2cf26cb62762", - "job_run_id": "c8el40l6e87v0c4hkbl0", - "task_run_id": "c8el40l6e87v0c4hkblg" - } - }, - "type": "identify", - "traits": { - "firstname": "Test Hubspot", - "anonymousId": "12345", - "country": "India" - }, - "messageId": "50360b9c-ea8d-409c-b672-c9230f91cce5", - "originalTimestamp": "2019-10-15T09:35:31.288Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "authorizationType": "newPrivateAppApi", - "accessToken": "dummy-access-token", - "hubID": "dummy-hubId", - "apiKey": "dummy-apikey", - "apiVersion": "newApi", - "lookupField": "lookupField", - "hubspotEvents": [ - { - "rsEventName": "Purchase", - "hubspotEventName": "pedummy-hubId_rs_hub_test", - "eventProperties": [ - { - "from": "Revenue", - "to": "value" - }, - { - "from": "Price", - "to": "cost" - } - ] - }, - { - "rsEventName": "Order Complete", - "hubspotEventName": "pedummy-hubId_rs_hub_chair", - "eventProperties": [ - { - "from": "firstName", - "to": "first_name" - }, - { - "from": "lastName", - "to": "last_name" - } - ] - } - ], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Hubspot", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "HS", - "displayName": "Hubspot", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - }, - "metadata": { - "jobId": 2 - } - }, - { - "message": { - "channel": "web", - "context": { - "mappedToDestination": true, - "externalId": [ - { - "identifierType": "email", - "id": "testhubspot@email.com", - "type": "HS-lead" - } - ], - "sources": { - "job_id": "24c5HJxHomh6YCngEOCgjS5r1KX/Syncher", - "task_id": "vw_rs_mailchimp_mocked_hg_data", - "version": "v1.8.1", - "batch_id": "f252c69d-c40d-450e-bcd2-2cf26cb62762", - "job_run_id": "c8el40l6e87v0c4hkbl0", - "task_run_id": "c8el40l6e87v0c4hkblg" - } - }, - "type": "identify", - "traits": { - "firstname": "Test Hubspot 1", - "anonymousId": "123451", - "country": "India 1" - }, - "messageId": "50360b9c-ea8d-409c-b672-c9230f91cce5", - "originalTimestamp": "2019-10-15T09:35:31.288Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "authorizationType": "newPrivateAppApi", - "accessToken": "dummy-access-token", - "hubID": "dummy-hubId", - "apiKey": "dummy-apikey", - "apiVersion": "newApi", - "lookupField": "lookupField", - "hubspotEvents": [ - { - "rsEventName": "Purchase", - "hubspotEventName": "pedummy-hubId_rs_hub_test", - "eventProperties": [ - { - "from": "Revenue", - "to": "value" - }, - { - "from": "Price", - "to": "cost" - } - ] - }, - { - "rsEventName": "Order Complete", - "hubspotEventName": "pedummy-hubId_rs_hub_chair", - "eventProperties": [ - { - "from": "firstName", - "to": "first_name" - }, - { - "from": "lastName", - "to": "last_name" - } - ] - } - ], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Hubspot", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "HS", - "displayName": "Hubspot", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - }, - "metadata": { - "jobId": 3 - } - }, - { - "message": { - "channel": "web", - "context": { - "mappedToDestination": true, - "externalId": [ - { - "identifierType": "email", - "id": "testhubspotdatetime@email.com", - "type": "HS-lead" - } - ], - "sources": { - "job_id": "24c5HJxHomh6YCngEOCgjS5r1KX/Syncher", - "task_id": "vw_rs_mailchimp_mocked_hg_data", - "version": "v1.8.1", - "batch_id": "f252c69d-c40d-450e-bcd2-2cf26cb62762", - "job_run_id": "c8el40l6e87v0c4hkbl0", - "task_run_id": "c8el40l6e87v0c4hkblg" - } - }, - "type": "identify", - "traits": { - "firstname": "Test Hubspot", - "anonymousId": "123451", - "country": "India", - "date_submitted": "2023-09-25T17:31:04.128251Z", - "date_created": "2023-03-30T01:02:03.05Z", - "date_closed": "2023-10-18T04:38:59.229347Z" - }, - "messageId": "50360b9c-ea8d-409c-b672-c9230f91cce5", - "originalTimestamp": "2019-10-15T09:35:31.288Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "authorizationType": "newPrivateAppApi", - "accessToken": "dummy-access-token", - "hubID": "dummy-hubId", - "apiKey": "dummy-apikey", - "apiVersion": "newApi", - "lookupField": "lookupField", - "hubspotEvents": [ - { - "rsEventName": "Purchase", - "hubspotEventName": "pedummy-hubId_rs_hub_test", - "eventProperties": [ - { - "from": "Revenue", - "to": "value" - }, - { - "from": "Price", - "to": "cost" - } - ] - }, - { - "rsEventName": "Order Complete", - "hubspotEventName": "pedummy-hubId_rs_hub_chair", - "eventProperties": [ - { - "from": "firstName", - "to": "first_name" - }, - { - "from": "lastName", - "to": "last_name" - } - ] - } - ], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Hubspot", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "HS", - "displayName": "Hubspot", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - }, - "metadata": { - "jobId": 4 - } - } -] diff --git a/test/__tests__/data/hs_router_rETL_output.json b/test/__tests__/data/hs_router_rETL_output.json deleted file mode 100644 index c20694cdf4..0000000000 --- a/test/__tests__/data/hs_router_rETL_output.json +++ /dev/null @@ -1,231 +0,0 @@ -[ - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.hubapi.com/crm/v3/objects/lead/batch/create", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer dummy-access-token" - }, - "params": {}, - "body": { - "JSON": { - "inputs": [ - { - "properties": { - "firstname": "Test Hubspot 1", - "anonymousId": "123451", - "country": "India 1", - "email": "testhubspot@email.com" - } - }, - { - "properties": { - "firstname": "Test Hubspot", - "anonymousId": "123451", - "country": "India", - "email": "testhubspotdatetime@email.com", - "date_closed": 1697587200000, - "date_created": 1680134400000, - "date_submitted": 1695600000000 - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "jobId": 3 - }, - { - "jobId": 4 - } - ], - "batched": true, - "statusCode": 200, - "destination": { - "Config": { - "authorizationType": "newPrivateAppApi", - "accessToken": "dummy-access-token", - "hubID": "dummy-hubId", - "apiKey": "dummy-apikey", - "apiVersion": "newApi", - "lookupField": "lookupField", - "hubspotEvents": [ - { - "rsEventName": "Purchase", - "hubspotEventName": "pedummy-hubId_rs_hub_test", - "eventProperties": [ - { - "from": "Revenue", - "to": "value" - }, - { - "from": "Price", - "to": "cost" - } - ] - }, - { - "rsEventName": "Order Complete", - "hubspotEventName": "pedummy-hubId_rs_hub_chair", - "eventProperties": [ - { - "from": "firstName", - "to": "first_name" - }, - { - "from": "lastName", - "to": "last_name" - } - ] - } - ], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Hubspot", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "HS", - "displayName": "Hubspot", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - }, - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.hubapi.com/crm/v3/objects/lead/batch/update", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer dummy-access-token" - }, - "params": {}, - "body": { - "JSON": { - "inputs": [ - { - "properties": { - "firstname": "Test Hubspot", - "anonymousId": "12345", - "country": "India", - "email": "testhubspot2@email.com" - }, - "id": "103605" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "jobId": 2 - } - ], - "batched": true, - "statusCode": 200, - "destination": { - "Config": { - "authorizationType": "newPrivateAppApi", - "accessToken": "dummy-access-token", - "hubID": "dummy-hubId", - "apiKey": "dummy-apikey", - "apiVersion": "newApi", - "lookupField": "lookupField", - "hubspotEvents": [ - { - "rsEventName": "Purchase", - "hubspotEventName": "pedummy-hubId_rs_hub_test", - "eventProperties": [ - { - "from": "Revenue", - "to": "value" - }, - { - "from": "Price", - "to": "cost" - } - ] - }, - { - "rsEventName": "Order Complete", - "hubspotEventName": "pedummy-hubId_rs_hub_chair", - "eventProperties": [ - { - "from": "firstName", - "to": "first_name" - }, - { - "from": "lastName", - "to": "last_name" - } - ] - } - ], - "eventFilteringOption": "disable", - "blacklistedEvents": [ - { - "eventName": "" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Hubspot", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "HS", - "displayName": "Hubspot", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - } -] diff --git a/test/__tests__/data/intercom_input.json b/test/__tests__/data/intercom_input.json deleted file mode 100644 index 2d19ae5717..0000000000 --- a/test/__tests__/data/intercom_input.json +++ /dev/null @@ -1,1232 +0,0 @@ -[ - { - "message": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "channel": "mobile", - "context": { - "app": { - "build": "1.0", - "name": "Test_Example", - "namespace": "com.example.testapp", - "version": "1.0" - }, - "device": { - "id": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "manufacturer": "Apple", - "model": "iPhone", - "name": "iPod touch (7th generation)", - "type": "iOS" - }, - "library": { - "name": "test-ios-library", - "version": "1.0.7" - }, - "locale": "en-US", - "network": { - "bluetooth": false, - "carrier": "unavailable", - "cellular": false, - "wifi": true - }, - "os": { - "name": "iOS", - "version": "14.0" - }, - "screen": { - "density": 2, - "height": 320, - "width": 568 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "name": "Test Name", - "firstName": "Test", - "lastName": "Name", - "createdAt": "2020-09-30T19:11:00.337Z", - "userId": "test_user_id_1", - "email": "test_1@test.com", - "phone": "9876543210", - "key1": "value1", - "address": { - "city": "Kolkata", - "state": "West Bengal" - }, - "originalArray": [ - { - "nested_field": "nested value", - "tags": ["tag_1", "tag_2", "tag_3"] - }, - { - "nested_field": "nested value", - "tags": ["tag_1"] - }, - { - "nested_field": "nested value" - } - ] - }, - "userAgent": "unknown" - }, - "event": "Test Event 2", - "integrations": { - "All": true - }, - "messageId": "1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8", - "originalTimestamp": "2020-09-30T19:11:00.337Z", - "receivedAt": "2020-10-01T00:41:11.369+05:30", - "request_ip": "2405:201:8005:9856:7911:25e7:5603:5e18", - "sentAt": "2020-09-30T19:11:10.382Z", - "timestamp": "2020-10-01T00:41:01.324+05:30", - "type": "identify" - }, - "destination": { - "Config": { - "apiKey": "intercomApiKey", - "appId": "9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0", - "collectContext": false - } - } - }, - { - "message": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "channel": "mobile", - "context": { - "app": { - "build": "1.0", - "name": "Test_Example", - "namespace": "com.example.testapp", - "version": "1.0" - }, - "device": { - "id": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "manufacturer": "Apple", - "model": "iPhone", - "name": "iPod touch (7th generation)", - "type": "iOS" - }, - "library": { - "name": "test-ios-library", - "version": "1.0.7" - }, - "locale": "en-US", - "network": { - "bluetooth": false, - "carrier": "unavailable", - "cellular": false, - "wifi": true - }, - "os": { - "name": "iOS", - "version": "14.0" - }, - "screen": { - "density": 2, - "height": 320, - "width": 568 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "firstName": "Test", - "lastName": "Name", - "createdAt": "2020-09-30T19:11:00.337Z", - "email": "test_1@test.com", - "phone": "9876543210", - "key1": "value1" - }, - "userAgent": "unknown" - }, - "event": "Test Event 2", - "integrations": { - "All": true - }, - "messageId": "1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8", - "originalTimestamp": "2020-09-30T19:11:00.337Z", - "receivedAt": "2020-10-01T00:41:11.369+05:30", - "request_ip": "2405:201:8005:9856:7911:25e7:5603:5e18", - "sentAt": "2020-09-30T19:11:10.382Z", - "timestamp": "2020-10-01T00:41:01.324+05:30", - "type": "identify" - }, - "destination": { - "Config": { - "apiKey": "intercomApiKey", - "appId": "9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0", - "collectContext": false - } - } - }, - { - "message": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "channel": "mobile", - "context": { - "app": { - "build": "1.0", - "name": "Test_Example", - "namespace": "com.example.testapp", - "version": "1.0" - }, - "device": { - "id": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "manufacturer": "Apple", - "model": "iPhone", - "name": "iPod touch (7th generation)", - "type": "iOS" - }, - "library": { - "name": "test-ios-library", - "version": "1.0.7" - }, - "locale": "en-US", - "network": { - "bluetooth": false, - "carrier": "unavailable", - "cellular": false, - "wifi": true - }, - "os": { - "name": "iOS", - "version": "14.0" - }, - "screen": { - "density": 2, - "height": 320, - "width": 568 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "lastName": "Name", - "createdAt": "2020-09-30T19:11:00.337Z", - "email": "test_1@test.com", - "phone": "9876543210", - "key1": "value1" - }, - "userAgent": "unknown" - }, - "event": "Test Event 2", - "integrations": { - "All": true - }, - "messageId": "1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8", - "originalTimestamp": "2020-09-30T19:11:00.337Z", - "receivedAt": "2020-10-01T00:41:11.369+05:30", - "request_ip": "2405:201:8005:9856:7911:25e7:5603:5e18", - "sentAt": "2020-09-30T19:11:10.382Z", - "timestamp": "2020-10-01T00:41:01.324+05:30", - "type": "identify" - }, - "destination": { - "Config": { - "apiKey": "intercomApiKey", - "appId": "9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0", - "collectContext": false - } - } - }, - { - "message": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "channel": "mobile", - "context": { - "app": { - "build": "1.0", - "name": "Test_Example", - "namespace": "com.example.testapp", - "version": "1.0" - }, - "device": { - "id": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "manufacturer": "Apple", - "model": "iPhone", - "name": "iPod touch (7th generation)", - "type": "iOS" - }, - "library": { - "name": "test-ios-library", - "version": "1.0.7" - }, - "locale": "en-US", - "network": { - "bluetooth": false, - "carrier": "unavailable", - "cellular": false, - "wifi": true - }, - "os": { - "name": "iOS", - "version": "14.0" - }, - "screen": { - "density": 2, - "height": 320, - "width": 568 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "firstName": "Name", - "createdAt": "2020-09-30T19:11:00.337Z", - "email": "test_1@test.com", - "phone": "9876543210", - "key1": "value1" - }, - "userAgent": "unknown" - }, - "event": "Test Event 2", - "integrations": { - "All": true - }, - "messageId": "1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8", - "originalTimestamp": "2020-09-30T19:11:00.337Z", - "receivedAt": "2020-10-01T00:41:11.369+05:30", - "request_ip": "2405:201:8005:9856:7911:25e7:5603:5e18", - "sentAt": "2020-09-30T19:11:10.382Z", - "timestamp": "2020-10-01T00:41:01.324+05:30", - "type": "identify" - }, - "destination": { - "Config": { - "apiKey": "intercomApiKey", - "appId": "9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0", - "collectContext": false - } - } - }, - { - "message": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "channel": "mobile", - "context": { - "app": { - "build": "1.0", - "name": "Test_Example", - "namespace": "com.example.testapp", - "version": "1.0" - }, - "device": { - "id": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "manufacturer": "Apple", - "model": "iPhone", - "name": "iPod touch (7th generation)", - "type": "iOS" - }, - "library": { - "name": "test-ios-library", - "version": "1.0.7" - }, - "locale": "en-US", - "network": { - "bluetooth": false, - "carrier": "unavailable", - "cellular": false, - "wifi": true - }, - "os": { - "name": "iOS", - "version": "14.0" - }, - "screen": { - "density": 2, - "height": 320, - "width": 568 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "firstName": "Name", - "createdAt": "2020-09-30T19:11:00.337Z", - "phone": "9876543210", - "key1": "value1" - }, - "userAgent": "unknown" - }, - "event": "Test Event 2", - "integrations": { - "All": true - }, - "messageId": "1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8", - "originalTimestamp": "2020-09-30T19:11:00.337Z", - "receivedAt": "2020-10-01T00:41:11.369+05:30", - "request_ip": "2405:201:8005:9856:7911:25e7:5603:5e18", - "sentAt": "2020-09-30T19:11:10.382Z", - "timestamp": "2020-10-01T00:41:01.324+05:30", - "type": "identify" - }, - "destination": { - "Config": { - "apiKey": "intercomApiKey", - "appId": "9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0", - "collectContext": false - } - } - }, - { - "message": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "channel": "mobile", - "context": { - "app": { - "build": "1.0", - "name": "Test_Example", - "namespace": "com.example.testapp", - "version": "1.0" - }, - "device": { - "id": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "manufacturer": "Apple", - "model": "iPhone", - "name": "iPod touch (7th generation)", - "type": "iOS" - }, - "library": { - "name": "test-ios-library", - "version": "1.0.7" - }, - "locale": "en-US", - "network": { - "bluetooth": false, - "carrier": "unavailable", - "cellular": false, - "wifi": true - }, - "os": { - "name": "iOS", - "version": "14.0" - }, - "screen": { - "density": 2, - "height": 320, - "width": 568 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "lastName": "Name", - "createdAt": "2020-09-30T19:11:00.337Z", - "email": "test_1@test.com", - "phone": "9876543210", - "key1": "value1", - "company": { - "name": "Test Comp", - "id": "company_id", - "industry": "test industry", - "key1": "value1", - "key2": { - "a": "a" - }, - "key3": [1, 2, 3] - } - }, - "userAgent": "unknown" - }, - "event": "Test Event 2", - "integrations": { - "All": true - }, - "messageId": "1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8", - "originalTimestamp": "2020-09-30T19:11:00.337Z", - "receivedAt": "2020-10-01T00:41:11.369+05:30", - "request_ip": "2405:201:8005:9856:7911:25e7:5603:5e18", - "sentAt": "2020-09-30T19:11:10.382Z", - "timestamp": "2020-10-01T00:41:01.324+05:30", - "type": "identify" - }, - "destination": { - "Config": { - "apiKey": "intercomApiKey", - "appId": "9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0", - "collectContext": false - } - } - }, - { - "message": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "channel": "mobile", - "context": { - "app": { - "build": "1.0", - "name": "Test_Example", - "namespace": "com.example.testapp", - "version": "1.0" - }, - "device": { - "id": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "manufacturer": "Apple", - "model": "iPhone", - "name": "iPod touch (7th generation)", - "type": "iOS" - }, - "library": { - "name": "test-ios-library", - "version": "1.0.7" - }, - "locale": "en-US", - "network": { - "bluetooth": false, - "carrier": "unavailable", - "cellular": false, - "wifi": true - }, - "os": { - "name": "iOS", - "version": "14.0" - }, - "screen": { - "density": 2, - "height": 320, - "width": 568 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "lastName": "Name", - "createdAt": "2020-09-30T19:11:00.337Z", - "email": "test_1@test.com", - "phone": "9876543210", - "key1": "value1", - "company": { - "name": "Test Comp", - "industry": "test industry", - "key1": "value1", - "key2": null, - "key3": ["value1", "value2"], - "key4": { - "foo": "bar" - } - } - }, - "userAgent": "unknown" - }, - "event": "Test Event 2", - "integrations": { - "All": true - }, - "messageId": "1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8", - "originalTimestamp": "2020-09-30T19:11:00.337Z", - "receivedAt": "2020-10-01T00:41:11.369+05:30", - "request_ip": "2405:201:8005:9856:7911:25e7:5603:5e18", - "sentAt": "2020-09-30T19:11:10.382Z", - "timestamp": "2020-10-01T00:41:01.324+05:30", - "type": "identify" - }, - "destination": { - "Config": { - "apiKey": "intercomApiKey", - "appId": "9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0", - "collectContext": false, - "updateLastRequestAt": false - } - } - }, - { - "message": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "channel": "mobile", - "context": { - "app": { - "build": "1.0", - "name": "Test_Example", - "namespace": "com.example.testapp", - "version": "1.0" - }, - "device": { - "id": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "manufacturer": "Apple", - "model": "iPhone", - "name": "iPod touch (7th generation)", - "type": "iOS" - }, - "library": { - "name": "test-ios-library", - "version": "1.0.7" - }, - "locale": "en-US", - "network": { - "bluetooth": false, - "carrier": "unavailable", - "cellular": false, - "wifi": true - }, - "os": { - "name": "iOS", - "version": "14.0" - }, - "screen": { - "density": 2, - "height": 320, - "width": 568 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "lastName": "Name", - "createdAt": "2020-09-30T19:11:00.337Z", - "email": "test_1@test.com", - "phone": "9876543210", - "key1": "value1", - "company": { - "industry": "test industry", - "key1": "value1", - "key2": null - } - }, - "userAgent": "unknown" - }, - "event": "Test Event 2", - "integrations": { - "All": true - }, - "messageId": "1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8", - "originalTimestamp": "2020-09-30T19:11:00.337Z", - "receivedAt": "2020-10-01T00:41:11.369+05:30", - "request_ip": "2405:201:8005:9856:7911:25e7:5603:5e18", - "sentAt": "2020-09-30T19:11:10.382Z", - "timestamp": "2020-10-01T00:41:01.324+05:30", - "type": "identify" - }, - "destination": { - "Config": { - "apiKey": "intercomApiKey", - "appId": "9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0", - "collectContext": false - } - } - }, - { - "message": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "channel": "mobile", - "context": { - "app": { - "build": "1.0", - "name": "Test_Example", - "namespace": "com.example.testapp", - "version": "1.0" - }, - "device": { - "id": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "manufacturer": "Apple", - "model": "iPhone", - "name": "iPod touch (7th generation)", - "type": "iOS" - }, - "library": { - "name": "test-ios-library", - "version": "1.0.7" - }, - "locale": "en-US", - "network": { - "bluetooth": false, - "carrier": "unavailable", - "cellular": false, - "wifi": true - }, - "os": { - "name": "iOS", - "version": "14.0" - }, - "screen": { - "density": 2, - "height": 320, - "width": 568 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "name": "Test Name", - "firstName": "Test", - "lastName": "Name", - "createdAt": "2020-09-30T19:11:00.337Z", - "userId": "test_user_id_1", - "email": "test_1@test.com", - "phone": "9876543210", - "key1": "value1" - }, - "userAgent": "unknown" - }, - "properties": { - "property1": 1, - "property2": "test", - "property3": true, - "property4": "2020-10-05T09:09:03.731Z", - "property5": { - "property1": 1, - "property2": "test", - "property3": { - "subProp1": { - "a": "a", - "b": "b" - }, - "subProp2": ["a", "b"] - } - }, - "properties6": null, - "revenue": { - "amount": 1232, - "currency": "inr", - "test": 123 - }, - "price": { - "amount": 3000, - "currency": "USD" - }, - "article": { - "url": "https://example.org/ab1de.html", - "value": "the dude abides" - } - }, - "event": "Test Event 2", - "integrations": { - "All": true - }, - "messageId": "1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8", - "originalTimestamp": "2020-09-30T19:11:00.337Z", - "receivedAt": "2020-10-01T00:41:11.369+05:30", - "request_ip": "2405:201:8005:9856:7911:25e7:5603:5e18", - "sentAt": "2020-09-30T19:11:10.382Z", - "timestamp": "2020-10-01T00:41:01.324+05:30", - "type": "track" - }, - "destination": { - "Config": { - "apiKey": "intercomApiKey", - "appId": "9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0", - "collectContext": false - } - } - }, - { - "message": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "channel": "mobile", - "context": { - "app": { - "build": "1.0", - "name": "Test_Example", - "namespace": "com.example.testapp", - "version": "1.0" - }, - "device": { - "id": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "manufacturer": "Apple", - "model": "iPhone", - "name": "iPod touch (7th generation)", - "type": "iOS" - }, - "library": { - "name": "test-ios-library", - "version": "1.0.7" - }, - "locale": "en-US", - "network": { - "bluetooth": false, - "carrier": "unavailable", - "cellular": false, - "wifi": true - }, - "os": { - "name": "iOS", - "version": "14.0" - }, - "screen": { - "density": 2, - "height": 320, - "width": 568 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "name": "Test Name", - "firstName": "Test", - "lastName": "Name", - "createdAt": "2020-09-30T19:11:00.337Z", - "email": "test_1@test.com", - "phone": "9876543210", - "key1": "value1" - }, - "userAgent": "unknown" - }, - "event": "Test Event 2", - "integrations": { - "All": true - }, - "messageId": "1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8", - "originalTimestamp": "2020-09-30T19:11:00.337Z", - "receivedAt": "2020-10-01T00:41:11.369+05:30", - "request_ip": "2405:201:8005:9856:7911:25e7:5603:5e18", - "sentAt": "2020-09-30T19:11:10.382Z", - "timestamp": "2020-10-01T00:41:01.324+05:30", - "type": "track" - }, - "destination": { - "Config": { - "apiKey": "intercomApiKey", - "appId": "9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0", - "collectContext": false - } - } - }, - { - "message": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "channel": "mobile", - "context": { - "app": { - "build": "1.0", - "name": "Test_Example", - "namespace": "com.example.testapp", - "version": "1.0" - }, - "device": { - "id": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "manufacturer": "Apple", - "model": "iPhone", - "name": "iPod touch (7th generation)", - "type": "iOS" - }, - "library": { - "name": "test-ios-library", - "version": "1.0.7" - }, - "locale": "en-US", - "network": { - "bluetooth": false, - "carrier": "unavailable", - "cellular": false, - "wifi": true - }, - "os": { - "name": "iOS", - "version": "14.0" - }, - "screen": { - "density": 2, - "height": 320, - "width": 568 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "name": "Test Name", - "firstName": "Test", - "lastName": "Name", - "createdAt": "2020-09-30T19:11:00.337Z", - "phone": "9876543210", - "key1": "value1" - }, - "userAgent": "unknown" - }, - "event": "Test Event 2", - "integrations": { - "All": true - }, - "messageId": "1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8", - "originalTimestamp": "2020-09-30T19:11:00.337Z", - "receivedAt": "2020-10-01T00:41:11.369+05:30", - "request_ip": "2405:201:8005:9856:7911:25e7:5603:5e18", - "sentAt": "2020-09-30T19:11:10.382Z", - "timestamp": "2020-10-01T00:41:01.324+05:30", - "type": "track" - }, - "destination": { - "Config": { - "apiKey": "intercomApiKey", - "appId": "9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0", - "collectContext": false - } - } - }, - { - "message": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "channel": "mobile", - "context": { - "app": { - "build": "1.0", - "name": "Test_Example", - "namespace": "com.example.testapp", - "version": "1.0" - }, - "externalId": [ - { - "identifierType": "email", - "id": "test@gmail.com" - } - ], - "mappedToDestination": true, - "device": { - "id": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "manufacturer": "Apple", - "model": "iPhone", - "name": "iPod touch (7th generation)", - "type": "iOS" - }, - "library": { - "name": "test-ios-library", - "version": "1.0.7" - }, - "locale": "en-US", - "network": { - "bluetooth": false, - "carrier": "unavailable", - "cellular": false, - "wifi": true - }, - "os": { - "name": "iOS", - "version": "14.0" - }, - "screen": { - "density": 2, - "height": 320, - "width": 568 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "name": "Test Name", - "firstName": "Test", - "lastName": "Name", - "createdAt": "2020-09-30T19:11:00.337Z", - "phone": "9876543210", - "key1": "value1" - }, - "userAgent": "unknown" - }, - "event": "Test Event 2", - "integrations": { - "All": true - }, - "messageId": "1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8", - "originalTimestamp": "2020-09-30T19:11:00.337Z", - "receivedAt": "2020-10-01T00:41:11.369+05:30", - "request_ip": "2405:201:8005:9856:7911:25e7:5603:5e18", - "sentAt": "2020-09-30T19:11:10.382Z", - "timestamp": "2020-10-01T00:41:01.324+05:30", - "type": "identify" - }, - "destination": { - "Config": { - "apiKey": "intercomApiKey", - "appId": "9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0", - "collectContext": false - } - } - }, - { - "message": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "channel": "mobile", - "context": { - "app": { - "build": "1.0", - "name": "Test_Example", - "namespace": "com.example.testapp", - "version": "1.0" - }, - "device": { - "id": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "manufacturer": "Apple", - "model": "iPhone", - "name": "iPod touch (7th generation)", - "type": "iOS" - }, - "library": { - "name": "test-ios-library", - "version": "1.0.7" - }, - "locale": "en-US", - "network": { - "bluetooth": false, - "carrier": "unavailable", - "cellular": false, - "wifi": true - }, - "os": { - "name": "iOS", - "version": "14.0" - }, - "screen": { - "density": 2, - "height": 320, - "width": 568 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "name": "Test Name", - "firstName": "Test", - "lastName": "Name", - "createdAt": "2020-09-30T19:11:00.337Z", - "phone": "9876543210", - "key1": "value1" - }, - "userAgent": "unknown" - }, - "event": "Test Event 2", - "integrations": { - "All": true - }, - "messageId": "1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8", - "originalTimestamp": "2020-09-30T19:11:00.337Z", - "receivedAt": "2020-10-01T00:41:11.369+05:30", - "request_ip": "2405:201:8005:9856:7911:25e7:5603:5e18", - "sentAt": "2020-09-30T19:11:10.382Z", - "timestamp": "2020-10-01T00:41:01.324+05:30", - "type": "identify" - }, - "destination": { - "Config": { - "apiKey": "intercomApiKey", - "appId": "9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0", - "collectContext": false, - "sendAnonymousId": true - } - } - }, - { - "message": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "channel": "mobile", - "context": { - "app": { - "build": "1.0", - "name": "Test_Example", - "namespace": "com.example.testapp", - "version": "1.0" - }, - "device": { - "id": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "manufacturer": "Apple", - "model": "iPhone", - "name": "iPod touch (7th generation)", - "type": "iOS" - }, - "library": { - "name": "test-ios-library", - "version": "1.0.7" - }, - "locale": "en-US", - "network": { - "bluetooth": false, - "carrier": "unavailable", - "cellular": false, - "wifi": true - }, - "os": { - "name": "iOS", - "version": "14.0" - }, - "screen": { - "density": 2, - "height": 320, - "width": 568 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "name": "Test Name", - "firstName": "Test", - "lastName": "Name", - "createdAt": "2020-09-30T19:11:00.337Z", - "phone": "9876543210", - "key1": "value1" - }, - "userAgent": "unknown" - }, - "event": "Test Event 2", - "integrations": { - "All": true - }, - "messageId": "1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8", - "originalTimestamp": "2020-09-30T19:11:00.337Z", - "receivedAt": "2020-10-01T00:41:11.369+05:30", - "request_ip": "2405:201:8005:9856:7911:25e7:5603:5e18", - "sentAt": "2020-09-30T19:11:10.382Z", - "timestamp": "2020-10-01T00:41:01.324+05:30", - "type": "identify" - }, - "destination": { - "Config": { - "apiKey": "intercomApiKey", - "appId": "9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0", - "collectContext": false, - "sendAnonymousId": false - } - } - }, - { - "message": { - "groupId": "test_company_id_wdasda", - "traits": { - "employees": 450, - "plan": "basic", - "userId": "sdfrsdfsdfsf", - "email": "test@test.com", - "name": "rudderUpdate", - "size": "50", - "industry": "IT", - "monthlySpend": "2131231", - "remoteCreatedAt": "1683017572", - "key1": "val1" - }, - "anonymousId": "sdfrsdfsdfsf", - "integrations": { - "All": true - }, - "type": "group", - "userId": "sdfrsdfsdfsf" - }, - "destination": { - "Config": { - "apiKey": "abcd=", - "appId": "asdasdasd", - "collectContext": false - } - } - }, - { - "message": { - "groupId": "test_company_id", - "traits": { - "plan": "basic", - "name": "rudderUpdate", - "size": 50, - "industry": "IT", - "monthlySpend": "2131231", - "email": "comanyemail@abc.com" - }, - "anonymousId": "12312312", - "context": { - "app": { - "build": "1.0", - "name": "Test_Example", - "namespace": "com.example.testapp", - "version": "1.0" - }, - "device": { - "id": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "manufacturer": "Apple", - "model": "iPhone", - "name": "iPod touch (7th generation)", - "type": "iOS" - }, - "library": { - "name": "test-ios-library", - "version": "1.0.7" - }, - "locale": "en-US", - "network": { - "bluetooth": false, - "carrier": "unavailable", - "cellular": false, - "wifi": true - }, - "os": { - "name": "iOS", - "version": "14.0" - }, - "screen": { - "density": 2, - "height": 320, - "width": 568 - }, - "timezone": "Asia/Kolkata", - "userAgent": "unknown" - }, - "integrations": { - "All": true - }, - "messageId": "1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8", - "type": "group" - }, - "destination": { - "Config": { - "apiKey": "abcd=", - "appId": "asdasdasd", - "collectContext": false - } - } - }, - { - "message": { - "groupId": "test_company_id_wdasda", - "context": { - "traits": { - "email": "testUser@test.com" - } - }, - "traits": { - "employees": 450, - "plan": "basic", - "email": "test@test.com", - "name": "rudderUpdate", - "size": "50", - "industry": "IT", - "website": "url", - "monthlySpend": "2131231", - "remoteCreatedAt": "1683017572", - "key1": "val1" - }, - "anonymousId": "sdfrsdfsdfsf", - "integrations": { - "All": true - }, - "type": "group", - "userId": "sdfrsdfsdfsf" - }, - "destination": { - "Config": { - "apiKey": "abcd=", - "appId": "asdasdasd", - "collectContext": false - } - } - }, - { - "message": { - "groupId": "test_company_id_wdasda", - "context": { - "traits": { - "email": "testUser@test.com" - } - }, - "traits": { - "employees": 450, - "plan": "basic", - "email": "test@test.com", - "name": "rudderUpdate", - "size": "50", - "industry": "IT", - "website": "url", - "monthlySpend": "2131231", - "remoteCreatedAt": "1683017572", - "key1": "val1", - "key2": { - "a": "a", - "b": "b" - }, - "key3": [1, 2, 3], - "key4": null - }, - "anonymousId": "anonId", - "integrations": { - "All": true - }, - "type": "group" - }, - "destination": { - "Config": { - "apiKey": "abcd=", - "appId": "asdasdasd", - "collectContext": false, - "sendAnonymousId": true - } - } - } -] diff --git a/test/__tests__/data/intercom_output.json b/test/__tests__/data/intercom_output.json deleted file mode 100644 index 64ad4133bf..0000000000 --- a/test/__tests__/data/intercom_output.json +++ /dev/null @@ -1,651 +0,0 @@ -[ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.intercom.io/users", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer intercomApiKey", - "Accept": "application/json", - "Intercom-Version": "1.4" - }, - "params": {}, - "body": { - "JSON": { - "email": "test_1@test.com", - "phone": "9876543210", - "name": "Test Name", - "signed_up_at": 1601493060, - "last_seen_user_agent": "unknown", - "update_last_request_at": true, - "user_id": "test_user_id_1", - "custom_attributes": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "key1": "value1", - "address.city": "Kolkata", - "address.state": "West Bengal", - "originalArray[0].nested_field": "nested value", - "originalArray[0].tags[0]": "tag_1", - "originalArray[0].tags[1]": "tag_2", - "originalArray[0].tags[2]": "tag_3", - "originalArray[1].nested_field": "nested value", - "originalArray[1].tags[0]": "tag_1", - "originalArray[2].nested_field": "nested value" - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.intercom.io/users", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer intercomApiKey", - "Accept": "application/json", - "Intercom-Version": "1.4" - }, - "params": {}, - "body": { - "JSON": { - "email": "test_1@test.com", - "phone": "9876543210", - "signed_up_at": 1601493060, - "name": "Test Name", - "last_seen_user_agent": "unknown", - "update_last_request_at": true, - "custom_attributes": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "key1": "value1" - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.intercom.io/users", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer intercomApiKey", - "Accept": "application/json", - "Intercom-Version": "1.4" - }, - "params": {}, - "body": { - "JSON": { - "email": "test_1@test.com", - "phone": "9876543210", - "signed_up_at": 1601493060, - "last_seen_user_agent": "unknown", - "update_last_request_at": true, - "custom_attributes": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "key1": "value1" - }, - "name": "Name" - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.intercom.io/users", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer intercomApiKey", - "Accept": "application/json", - "Intercom-Version": "1.4" - }, - "params": {}, - "body": { - "JSON": { - "email": "test_1@test.com", - "phone": "9876543210", - "signed_up_at": 1601493060, - "last_seen_user_agent": "unknown", - "update_last_request_at": true, - "custom_attributes": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "key1": "value1" - }, - "name": "Name" - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33" - }, - { - "statusCode": 400, - "error": "Either of `email` or `userId` is required for Identify call" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.intercom.io/users", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer intercomApiKey", - "Accept": "application/json", - "Intercom-Version": "1.4" - }, - "params": {}, - "body": { - "JSON": { - "email": "test_1@test.com", - "phone": "9876543210", - "signed_up_at": 1601493060, - "last_seen_user_agent": "unknown", - "update_last_request_at": true, - "custom_attributes": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "key1": "value1" - }, - "name": "Name", - "companies": [ - { - "company_id": "company_id", - "custom_attributes": { - "key1": "value1", - "key2": "{\"a\":\"a\"}", - "key3": "[1,2,3]" - }, - "name": "Test Comp", - "industry": "test industry" - } - ] - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.intercom.io/users", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer intercomApiKey", - "Accept": "application/json", - "Intercom-Version": "1.4" - }, - "params": {}, - "body": { - "JSON": { - "email": "test_1@test.com", - "phone": "9876543210", - "signed_up_at": 1601493060, - "last_seen_user_agent": "unknown", - "update_last_request_at": false, - "custom_attributes": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "key1": "value1" - }, - "name": "Name", - "companies": [ - { - "company_id": "c0277b5c814453e5135f515f943d085a", - "custom_attributes": { - "key1": "value1", - "key3": "[\"value1\",\"value2\"]", - "key4": "{\"foo\":\"bar\"}" - }, - "name": "Test Comp", - "industry": "test industry" - } - ] - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.intercom.io/users", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer intercomApiKey", - "Accept": "application/json", - "Intercom-Version": "1.4" - }, - "params": {}, - "body": { - "JSON": { - "email": "test_1@test.com", - "phone": "9876543210", - "signed_up_at": 1601493060, - "last_seen_user_agent": "unknown", - "update_last_request_at": true, - "custom_attributes": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "key1": "value1" - }, - "name": "Name", - "companies": [] - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.intercom.io/events", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer intercomApiKey", - "Accept": "application/json", - "Intercom-Version": "1.4" - }, - "params": {}, - "body": { - "JSON": { - "user_id": "test_user_id_1", - "email": "test_1@test.com", - "event_name": "Test Event 2", - "created": 1601493061, - "metadata": { - "property1": 1, - "property2": "test", - "property3": true, - "property4": "2020-10-05T09:09:03.731Z", - "property5.property1": 1, - "property5.property2": "test", - "property5.property3.subProp1.a": "a", - "property5.property3.subProp1.b": "b", - "property5.property3.subProp2[0]": "a", - "property5.property3.subProp2[1]": "b", - "properties6": null, - "revenue": { - "amount": 1232, - "currency": "inr", - "test": 123 - }, - "price": { - "amount": 3000, - "currency": "USD" - }, - "article": { - "url": "https://example.org/ab1de.html", - "value": "the dude abides" - } - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.intercom.io/events", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer intercomApiKey", - "Accept": "application/json", - "Intercom-Version": "1.4" - }, - "params": {}, - "body": { - "JSON": { - "email": "test_1@test.com", - "event_name": "Test Event 2", - "created": 1601493061 - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33" - }, - { - "statusCode": 400, - "error": "Either of `email` or `userId` is required for Track call" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.intercom.io/users", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer intercomApiKey", - "Accept": "application/json", - "Intercom-Version": "1.4" - }, - "params": {}, - "body": { - "JSON": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "name": "Test Name", - "firstName": "Test", - "lastName": "Name", - "createdAt": "2020-09-30T19:11:00.337Z", - "phone": "9876543210", - "key1": "value1", - "email": "test@gmail.com", - "update_last_request_at": true - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.intercom.io/users", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer intercomApiKey", - "Accept": "application/json", - "Intercom-Version": "1.4" - }, - "params": {}, - "body": { - "JSON": { - "phone": "9876543210", - "name": "Test Name", - "signed_up_at": 1601493060, - "last_seen_user_agent": "unknown", - "custom_attributes": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "key1": "value1" - }, - "user_id": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "update_last_request_at": true - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33" - }, - { - "statusCode": 400, - "error": "Either of `email` or `userId` is required for Identify call" - }, - [ - { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "name": "rudderUpdate", - "plan": "basic", - "size": 50, - "industry": "IT", - "company_id": "test_company_id_wdasda", - "monthly_spend": 2131231, - "remote_created_at": 1683017572, - "custom_attributes": { - "key1": "val1", - "employees": 450, - "email": "test@test.com" - } - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "sdfrsdfsdfsf", - "headers": { - "Accept": "application/json", - "Content-Type": "application/json", - "Authorization": "Bearer abcd=", - "Intercom-Version": "1.4" - }, - "version": "1", - "endpoint": "https://api.intercom.io/companies" - }, - { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "user_id": "sdfrsdfsdfsf", - "companies": [ - { - "name": "rudderUpdate", - "company_id": "test_company_id_wdasda" - } - ] - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "sdfrsdfsdfsf", - "headers": { - "Accept": "application/json", - "Content-Type": "application/json", - "Authorization": "Bearer abcd=", - "Intercom-Version": "1.4" - }, - "version": "1", - "endpoint": "https://api.intercom.io/users" - } - ], - [ - { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "name": "rudderUpdate", - "size": 50, - "industry": "IT", - "company_id": "test_company_id", - "monthly_spend": 2131231, - "plan": "basic", - "custom_attributes": { - "email": "comanyemail@abc.com" - } - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "12312312", - "headers": { - "Accept": "application/json", - "Content-Type": "application/json", - "Authorization": "Bearer abcd=", - "Intercom-Version": "1.4" - }, - "version": "1", - "endpoint": "https://api.intercom.io/companies" - } - ], - [ - { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "name": "rudderUpdate", - "plan": "basic", - "size": 50, - "industry": "IT", - "company_id": "test_company_id_wdasda", - "monthly_spend": 2131231, - "remote_created_at": 1683017572, - "website": "url", - "custom_attributes": { - "key1": "val1", - "employees": 450, - "email": "test@test.com" - } - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "sdfrsdfsdfsf", - "headers": { - "Accept": "application/json", - "Content-Type": "application/json", - "Authorization": "Bearer abcd=", - "Intercom-Version": "1.4" - }, - "version": "1", - "endpoint": "https://api.intercom.io/companies" - }, - { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "user_id": "sdfrsdfsdfsf", - "email": "testUser@test.com", - "companies": [ - { - "name": "rudderUpdate", - "company_id": "test_company_id_wdasda" - } - ] - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "sdfrsdfsdfsf", - "headers": { - "Accept": "application/json", - "Content-Type": "application/json", - "Authorization": "Bearer abcd=", - "Intercom-Version": "1.4" - }, - "version": "1", - "endpoint": "https://api.intercom.io/users" - } - ], - [ - { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "name": "rudderUpdate", - "plan": "basic", - "size": 50, - "industry": "IT", - "company_id": "test_company_id_wdasda", - "monthly_spend": 2131231, - "remote_created_at": 1683017572, - "website": "url", - "custom_attributes": { - "key1": "val1", - "employees": 450, - "email": "test@test.com", - "key2.a": "a", - "key2.b": "b", - "key3[0]": 1, - "key3[1]": 2, - "key3[2]": 3, - "key4": null - } - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "anonId", - "headers": { - "Accept": "application/json", - "Content-Type": "application/json", - "Authorization": "Bearer abcd=", - "Intercom-Version": "1.4" - }, - "version": "1", - "endpoint": "https://api.intercom.io/companies" - }, - { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "user_id": "anonId", - "email": "testUser@test.com", - "companies": [ - { - "name": "rudderUpdate", - "company_id": "test_company_id_wdasda" - } - ] - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "userId": "anonId", - "headers": { - "Accept": "application/json", - "Content-Type": "application/json", - "Authorization": "Bearer abcd=", - "Intercom-Version": "1.4" - }, - "version": "1", - "endpoint": "https://api.intercom.io/users" - } - ] -] diff --git a/test/__tests__/data/intercom_proxy_input.json b/test/__tests__/data/intercom_proxy_input.json deleted file mode 100644 index 0074202ceb..0000000000 --- a/test/__tests__/data/intercom_proxy_input.json +++ /dev/null @@ -1,44 +0,0 @@ -[ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.intercom.io/users/test1", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer intercomApiKey", - "Accept": "application/json", - "Intercom-Version": "1.4" - }, - "params": {}, - "body": { - "JSON": { - "email": "test_1@test.com", - "phone": "9876543210", - "name": "Test Name", - "signed_up_at": 1601493060, - "last_seen_user_agent": "unknown", - "update_last_request_at": true, - "user_id": "test_user_id_1", - "custom_attributes": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "key1": "value1", - "address.city": "Kolkata", - "address.state": "West Bengal", - "originalArray[0].nested_field": "nested value", - "originalArray[0].tags[0]": "tag_1", - "originalArray[0].tags[1]": "tag_2", - "originalArray[0].tags[2]": "tag_3", - "originalArray[1].nested_field": "nested value", - "originalArray[1].tags[0]": "tag_1", - "originalArray[2].nested_field": "nested value" - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33" - } -] diff --git a/test/__tests__/data/intercom_proxy_output.json b/test/__tests__/data/intercom_proxy_output.json deleted file mode 100644 index 5b6f9ef915..0000000000 --- a/test/__tests__/data/intercom_proxy_output.json +++ /dev/null @@ -1,31 +0,0 @@ -[ - { - "output": { - "status": 500, - "message": "[Intercom Response Handler] Request failed for destination intercom with status: 408", - "destinationResponse": { - "response": { - "type": "error.list", - "request_id": "000on04msi4jpk7d3u60", - "errors": [ - { - "code": "Request Timeout", - "message": "The server would not wait any longer for the client" - } - ] - }, - "status": 408 - }, - "statTags": { - "destType": "INTERCOM", - "errorCategory": "network", - "destinationId": "Non-determininable", - "workspaceId": "Non-determininable", - "errorType": "retryable", - "feature": "dataDelivery", - "implementation": "native", - "module": "destination" - } - } - } -] diff --git a/test/__tests__/data/intercom_router_input.json b/test/__tests__/data/intercom_router_input.json deleted file mode 100644 index a3eb28fc10..0000000000 --- a/test/__tests__/data/intercom_router_input.json +++ /dev/null @@ -1,150 +0,0 @@ -[ - { - "message": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "channel": "mobile", - "context": { - "app": { - "build": "1.0", - "name": "Test_Example", - "namespace": "com.example.testapp", - "version": "1.0" - }, - "device": { - "id": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "manufacturer": "Apple", - "model": "iPhone", - "name": "iPod touch (7th generation)", - "type": "iOS" - }, - "library": { - "name": "test-ios-library", - "version": "1.0.7" - }, - "locale": "en-US", - "network": { - "bluetooth": false, - "carrier": "unavailable", - "cellular": false, - "wifi": true - }, - "os": { - "name": "iOS", - "version": "14.0" - }, - "screen": { - "density": 2, - "height": 320, - "width": 568 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "name": "Test Name", - "firstName": "Test", - "lastName": "Name", - "createdAt": "2020-09-30T19:11:00.337Z", - "userId": "test_user_id_1", - "email": "test_1@test.com", - "phone": "9876543210", - "key1": "value1" - }, - "userAgent": "unknown" - }, - "event": "Test Event 2", - "integrations": { - "All": true - }, - "messageId": "1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8", - "originalTimestamp": "2020-09-30T19:11:00.337Z", - "receivedAt": "2020-10-01T00:41:11.369+05:30", - "request_ip": "2405:201:8005:9856:7911:25e7:5603:5e18", - "sentAt": "2020-09-30T19:11:10.382Z", - "timestamp": "2020-10-01T00:41:01.324+05:30", - "type": "identify" - }, - "metadata": { - "jobId": 1 - }, - "destination": { - "Config": { - "apiKey": "intercomApiKey", - "appId": "9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0", - "collectContext": false - } - } - }, - { - "message": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "channel": "mobile", - "context": { - "app": { - "build": "1.0", - "name": "Test_Example", - "namespace": "com.example.testapp", - "version": "1.0" - }, - "device": { - "id": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "manufacturer": "Apple", - "model": "iPhone", - "name": "iPod touch (7th generation)", - "type": "iOS" - }, - "library": { - "name": "test-ios-library", - "version": "1.0.7" - }, - "locale": "en-US", - "network": { - "bluetooth": false, - "carrier": "unavailable", - "cellular": false, - "wifi": true - }, - "os": { - "name": "iOS", - "version": "14.0" - }, - "screen": { - "density": 2, - "height": 320, - "width": 568 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "firstName": "Test", - "lastName": "Name", - "createdAt": "2020-09-30T19:11:00.337Z", - "email": "test_1@test.com", - "phone": "9876543210", - "key1": "value1" - }, - "userAgent": "unknown" - }, - "event": "Test Event 2", - "integrations": { - "All": true - }, - "messageId": "1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8", - "originalTimestamp": "2020-09-30T19:11:00.337Z", - "receivedAt": "2020-10-01T00:41:11.369+05:30", - "request_ip": "2405:201:8005:9856:7911:25e7:5603:5e18", - "sentAt": "2020-09-30T19:11:10.382Z", - "timestamp": "2020-10-01T00:41:01.324+05:30", - "type": "identify" - }, - "metadata": { - "jobId": 2 - }, - "destination": { - "Config": { - "apiKey": "intercomApiKey", - "appId": "9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0", - "collectContext": false - } - } - } -] diff --git a/test/__tests__/data/intercom_router_output.json b/test/__tests__/data/intercom_router_output.json deleted file mode 100644 index 494d15e97a..0000000000 --- a/test/__tests__/data/intercom_router_output.json +++ /dev/null @@ -1,99 +0,0 @@ -[ - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.intercom.io/users", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer intercomApiKey", - "Accept": "application/json", - "Intercom-Version": "1.4" - }, - "params": {}, - "body": { - "JSON": { - "email": "test_1@test.com", - "phone": "9876543210", - "name": "Test Name", - "signed_up_at": 1601493060, - "last_seen_user_agent": "unknown", - "update_last_request_at": true, - "user_id": "test_user_id_1", - "custom_attributes": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "key1": "value1" - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33" - }, - "metadata": [ - { - "jobId": 1 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "apiKey": "intercomApiKey", - "appId": "9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0", - "collectContext": false - } - } - }, - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.intercom.io/users", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer intercomApiKey", - "Accept": "application/json", - "Intercom-Version": "1.4" - }, - "params": {}, - "body": { - "JSON": { - "email": "test_1@test.com", - "phone": "9876543210", - "signed_up_at": 1601493060, - "name": "Test Name", - "last_seen_user_agent": "unknown", - "update_last_request_at": true, - "custom_attributes": { - "anonymousId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33", - "key1": "value1" - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "userId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33" - }, - "metadata": [ - { - "jobId": 2 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "apiKey": "intercomApiKey", - "appId": "9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0", - "collectContext": false - } - } - } -] diff --git a/test/__tests__/data/klaviyo.json b/test/__tests__/data/klaviyo.json deleted file mode 100644 index 623aa78cc4..0000000000 --- a/test/__tests__/data/klaviyo.json +++ /dev/null @@ -1,1970 +0,0 @@ -[ - { - "description": "Profile updating call and subscribe user (old transformer)", - "input": { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey" - } - }, - "message": { - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "user@1", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "traits": { - "firstName": "Test", - "lastName": "Rudderlabs", - "email": "test@rudderstack.com", - "phone": "+12 345 578 900", - "userId": "user@1", - "title": "Developer", - "organization": "Rudder", - "city": "Tokyo", - "region": "Kanto", - "country": "JP", - "zip": "100-0001", - "Flagged": false, - "Residence": "Shibuya", - "properties": { - "listId": "XUepkK", - "subscribe": true, - "consent": ["email", "sms"] - } - }, - "locale": "en-US", - "screen": { - "density": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.11" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - }, - "output": [ - { - "version": "1", - "type": "REST", - "method": "PATCH", - "endpoint": "https://a.klaviyo.com/api/profiles/01GW3PHVY0MTCDGS0A1612HARX", - "headers": { - "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", - "Content-Type": "application/json", - "Accept": "application/json", - "revision": "2023-02-22" - }, - "params": {}, - "body": { - "JSON": { - "data": { - "type": "profile", - "attributes": { - "external_id": "user@1", - "email": "test@rudderstack.com", - "first_name": "Test", - "last_name": "Rudderlabs", - "phone_number": "+12 345 578 900", - "title": "Developer", - "organization": "Rudder", - "location": { - "city": "Tokyo", - "region": "Kanto", - "country": "JP", - "zip": "100-0001" - }, - "properties": { - "Flagged": false, - "Residence": "Shibuya" - } - }, - "id": "01GW3PHVY0MTCDGS0A1612HARX" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://a.klaviyo.com/api/profile-subscription-bulk-create-jobs", - "headers": { - "Content-Type": "application/json", - "Accept": "application/json", - "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", - "revision": "2023-02-22" - }, - "params": {}, - "body": { - "JSON": { - "data": { - "type": "profile-subscription-bulk-create-job", - "attributes": { - "list_id": "XUepkK", - "subscriptions": [ - { - "email": "test@rudderstack.com", - "phone_number": "+12 345 578 900", - "channels": { - "email": ["MARKETING"], - "sms": ["MARKETING"] - } - } - ] - } - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ] - }, - { - "description": "Identify call for with flattenProperties enabled (old transformer)", - "input": { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey", - "flattenProperties": true - } - }, - "message": { - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "user@1", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "traits": { - "firstName": "Test", - "lastName": "Rudderlabs", - "email": "test@rudderstack.com", - "phone": "+12 345 578 900", - "userId": "user@1", - "title": "Developer", - "organization": "Rudder", - "city": "Tokyo", - "region": "Kanto", - "country": "JP", - "zip": "100-0001", - "Flagged": false, - "Residence": "Shibuya", - "friend": { - "names": { - "first": "Alice", - "last": "Smith" - }, - "age": 25 - }, - "properties": { - "listId": "XUepkK", - "subscribe": true, - "consent": ["email", "sms"] - } - }, - "locale": "en-US", - "screen": { - "density": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.11" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - }, - "output": [ - { - "version": "1", - "type": "REST", - "method": "PATCH", - "endpoint": "https://a.klaviyo.com/api/profiles/01GW3PHVY0MTCDGS0A1612HARX", - "headers": { - "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", - "Content-Type": "application/json", - "Accept": "application/json", - "revision": "2023-02-22" - }, - "params": {}, - "body": { - "JSON": { - "data": { - "type": "profile", - "attributes": { - "external_id": "user@1", - "email": "test@rudderstack.com", - "first_name": "Test", - "last_name": "Rudderlabs", - "phone_number": "+12 345 578 900", - "title": "Developer", - "organization": "Rudder", - "location": { - "city": "Tokyo", - "region": "Kanto", - "country": "JP", - "zip": "100-0001" - }, - "properties": { - "friend.age": 25, - "friend.names.first": "Alice", - "friend.names.last": "Smith", - "Flagged": false, - "Residence": "Shibuya" - } - }, - "id": "01GW3PHVY0MTCDGS0A1612HARX" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://a.klaviyo.com/api/profile-subscription-bulk-create-jobs", - "headers": { - "Content-Type": "application/json", - "Accept": "application/json", - "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", - "revision": "2023-02-22" - }, - "params": {}, - "body": { - "JSON": { - "data": { - "type": "profile-subscription-bulk-create-job", - "attributes": { - "list_id": "XUepkK", - "subscriptions": [ - { - "email": "test@rudderstack.com", - "phone_number": "+12 345 578 900", - "channels": { - "email": ["MARKETING"], - "sms": ["MARKETING"] - } - } - ] - } - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ] - }, - { - "description": "Profile updation call and subcribe user", - "input": { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey" - } - }, - "message": { - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "user@1", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "traits": { - "firstName": "Test", - "lastName": "Rudderlabs", - "email": "test3@rudderstack.com", - "phone": "+12 345 578 900", - "userId": "user@1", - "title": "Developer", - "organization": "Rudder", - "city": "Tokyo", - "region": "Kanto", - "country": "JP", - "zip": "100-0001", - "Flagged": false, - "Residence": "Shibuya", - "properties": { - "listId": "XUepkK", - "subscribe": true, - "consent": ["email", "sms"] - } - }, - "locale": "en-US", - "screen": { - "density": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.11" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - }, - "output": { - "error": "Failed to create user due to {}" - } - }, - { - "description": "Profile updation call listId is not provided for subscribing the user", - "input": { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey" - } - }, - "message": { - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "user@1", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "traits": { - "firstName": "Test", - "lastName": "Rudderlabs", - "email": "test@rudderstack.com", - "phone": "+12 345 578 900", - "userId": "user@1", - "title": "Developer", - "organization": "Rudder", - "city": "Tokyo", - "region": "Kanto", - "country": "JP", - "zip": "100-0001", - "Flagged": false, - "Residence": "Shibuya", - "properties": { - "subscribe": false, - "consent": ["email", "sms"] - } - }, - "locale": "en-US", - "screen": { - "density": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.11" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "PATCH", - "endpoint": "https://a.klaviyo.com/api/profiles/01GW3PHVY0MTCDGS0A1612HARX", - "headers": { - "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", - "Content-Type": "application/json", - "Accept": "application/json", - "revision": "2023-02-22" - }, - "params": {}, - "body": { - "JSON": { - "data": { - "type": "profile", - "attributes": { - "external_id": "user@1", - "email": "test@rudderstack.com", - "first_name": "Test", - "last_name": "Rudderlabs", - "phone_number": "+12 345 578 900", - "title": "Developer", - "organization": "Rudder", - "location": { - "city": "Tokyo", - "region": "Kanto", - "country": "JP", - "zip": "100-0001" - }, - "properties": { - "Flagged": false, - "Residence": "Shibuya" - } - }, - "id": "01GW3PHVY0MTCDGS0A1612HARX" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "Identify call with enforceEmailAsPrimary enabled from UI", - "input": { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey", - "enforceEmailAsPrimary": true - } - }, - "message": { - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "user@1", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "traits": { - "firstName": "Test", - "lastName": "Rudderlabs", - "email": "test@rudderstack.com", - "phone": "+12 345 578 900", - "userId": "user@1", - "title": "Developer", - "organization": "Rudder", - "city": "Tokyo", - "region": "Kanto", - "country": "JP", - "zip": "100-0001", - "Flagged": false, - "Residence": "Shibuya", - "properties": { - "listId": "XUepkK", - "subscribe": true, - "consent": ["email", "sms"] - } - }, - "locale": "en-US", - "screen": { - "density": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.11" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - }, - "output": [ - { - "version": "1", - "type": "REST", - "method": "PATCH", - "endpoint": "https://a.klaviyo.com/api/profiles/01GW3PHVY0MTCDGS0A1612HARX", - "headers": { - "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", - "Content-Type": "application/json", - "Accept": "application/json", - "revision": "2023-02-22" - }, - "params": {}, - "body": { - "JSON": { - "data": { - "type": "profile", - "attributes": { - "email": "test@rudderstack.com", - "first_name": "Test", - "last_name": "Rudderlabs", - "phone_number": "+12 345 578 900", - "title": "Developer", - "organization": "Rudder", - "location": { - "city": "Tokyo", - "region": "Kanto", - "country": "JP", - "zip": "100-0001" - }, - "properties": { - "Flagged": false, - "Residence": "Shibuya", - "_id": "user@1" - } - }, - "id": "01GW3PHVY0MTCDGS0A1612HARX" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://a.klaviyo.com/api/profile-subscription-bulk-create-jobs", - "headers": { - "Content-Type": "application/json", - "Accept": "application/json", - "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", - "revision": "2023-02-22" - }, - "params": {}, - "body": { - "JSON": { - "data": { - "type": "profile-subscription-bulk-create-job", - "attributes": { - "list_id": "XUepkK", - "subscriptions": [ - { - "email": "test@rudderstack.com", - "phone_number": "+12 345 578 900", - "channels": { - "email": ["MARKETING"], - "sms": ["MARKETING"] - } - } - ] - } - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ] - }, - { - "description": "Identify call without user custom Properties", - "input": { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey", - "enforceEmailAsPrimary": false - } - }, - "message": { - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "user@1", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "traits": { - "firstName": "Test", - "lastName": "Rudderlabs", - "email": "test@rudderstack.com", - "phone": "+12 345 578 900", - "userId": "user@1", - "title": "Developer", - "organization": "Rudder", - "city": "Tokyo", - "region": "Kanto", - "country": "JP", - "zip": "100-0001", - "properties": { - "listId": "XUepkK", - "subscribe": true, - "consent": ["email", "sms"] - } - }, - "locale": "en-US", - "screen": { - "density": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.11" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - }, - "output": [ - { - "version": "1", - "type": "REST", - "method": "PATCH", - "endpoint": "https://a.klaviyo.com/api/profiles/01GW3PHVY0MTCDGS0A1612HARX", - "headers": { - "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", - "Content-Type": "application/json", - "Accept": "application/json", - "revision": "2023-02-22" - }, - "params": {}, - "body": { - "JSON": { - "data": { - "type": "profile", - "attributes": { - "email": "test@rudderstack.com", - "first_name": "Test", - "last_name": "Rudderlabs", - "phone_number": "+12 345 578 900", - "external_id": "user@1", - "title": "Developer", - "organization": "Rudder", - "location": { - "city": "Tokyo", - "region": "Kanto", - "country": "JP", - "zip": "100-0001" - } - }, - "id": "01GW3PHVY0MTCDGS0A1612HARX" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://a.klaviyo.com/api/profile-subscription-bulk-create-jobs", - "headers": { - "Content-Type": "application/json", - "Accept": "application/json", - "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", - "revision": "2023-02-22" - }, - "params": {}, - "body": { - "JSON": { - "data": { - "type": "profile-subscription-bulk-create-job", - "attributes": { - "list_id": "XUepkK", - "subscriptions": [ - { - "email": "test@rudderstack.com", - "phone_number": "+12 345 578 900", - "channels": { - "email": ["MARKETING"], - "sms": ["MARKETING"] - } - } - ] - } - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ] - }, - { - "description": "Identify call without email and phone & enforceEmailAsPrimary enabled from UI", - "input": { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey", - "enforceEmailAsPrimary": true - } - }, - "message": { - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "user@1", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "traits": { - "firstName": "Test", - "lastName": "Rudderlabs", - "userId": "user@1", - "title": "Developer", - "organization": "Rudder", - "city": "Tokyo", - "region": "Kanto", - "country": "JP", - "zip": "100-0001", - "Flagged": false, - "Residence": "Shibuya", - "properties": { - "listId": "XUepkK", - "subscribe": true, - "consent": ["email", "sms"] - } - }, - "locale": "en-US", - "screen": { - "density": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.11" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - }, - "output": { - "error": "None of email and phone are present in the payload" - } - }, - { - "description": "Screen event call", - "input": { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey" - } - }, - "message": { - "type": "screen", - "event": "TestEven001", - "sentAt": "2021-01-25T16:12:02.048Z", - "userId": "sajal12", - "channel": "mobile", - "context": { - "os": { - "name": "Android", - "version": "10" - }, - "app": { - "name": "KlaviyoTest", - "build": "1", - "version": "1.0", - "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" - }, - "device": { - "id": "9c6bd77ea9da3e68", - "name": "raphaelin", - "type": "android", - "model": "Redmi K20 Pro", - "manufacturer": "Xiaomi" - }, - "locale": "en-IN", - "screen": { - "width": 1080, - "height": 2210, - "density": 440 - }, - "traits": { - "id": "user@1", - "age": "22", - "email": "test@rudderstack.com", - "phone": "9112340375", - "anonymousId": "9c6bd77ea9da3e68" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.2" - }, - "network": { - "wifi": true, - "carrier": "airtel", - "cellular": true, - "bluetooth": false - }, - "timezone": "Asia/Kolkata", - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)" - }, - "rudderId": "b7b24f86-f7bf-46d8-b2b4-ccafc080239c", - "messageId": "1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce", - "properties": { - "PreviouslyVicePresident": true, - "YearElected": 1801, - "VicePresidents": ["Aaron Burr", "George Clinton"] - }, - "anonymousId": "9c6bd77ea9da3e68", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-01-25T15:32:56.409Z" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://a.klaviyo.com/api/events", - "headers": { - "Accept": "application/json", - "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", - "Content-Type": "application/json", - "revision": "2023-02-22" - }, - "params": {}, - "body": { - "JSON": { - "data": { - "type": "event", - "attributes": { - "metric": { - "name": "TestEven001" - }, - "properties": { - "PreviouslyVicePresident": true, - "YearElected": 1801, - "VicePresidents": ["Aaron Burr", "George Clinton"] - }, - "profile": { - "$email": "test@rudderstack.com", - "$phone_number": "9112340375", - "$id": "sajal12", - "age": "22" - } - } - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "Track event call with flatten properties enabled", - "input": { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey", - "flattenProperties": true - } - }, - "message": { - "type": "track", - "event": "TestEven001", - "sentAt": "2021-01-25T16:12:02.048Z", - "userId": "sajal12", - "channel": "mobile", - "context": { - "os": { - "name": "Android", - "version": "10" - }, - "app": { - "name": "KlaviyoTest", - "build": "1", - "version": "1.0", - "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" - }, - "device": { - "id": "9c6bd77ea9da3e68", - "name": "raphaelin", - "type": "android", - "model": "Redmi K20 Pro", - "manufacturer": "Xiaomi" - }, - "locale": "en-IN", - "screen": { - "width": 1080, - "height": 2210, - "density": 440 - }, - "traits": { - "id": "user@1", - "age": "22", - "email": "test@rudderstack.com", - "phone": "9112340375", - "anonymousId": "9c6bd77ea9da3e68", - "plan_details": { - "plan_type": "gold", - "duration": "3 months" - } - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.2" - }, - "network": { - "wifi": true, - "carrier": "airtel", - "cellular": true, - "bluetooth": false - }, - "timezone": "Asia/Kolkata", - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)" - }, - "rudderId": "b7b24f86-f7bf-46d8-b2b4-ccafc080239c", - "messageId": "1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce", - "properties": { - "vicePresdentInfo": { - "PreviouslVicePresident": true, - "YearElected": 1801, - "VicePresidents": ["AaronBurr", "GeorgeClinton"] - } - }, - "anonymousId": "9c6bd77ea9da3e68", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-01-25T15:32:56.409Z" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://a.klaviyo.com/api/events", - "headers": { - "Accept": "application/json", - "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", - "Content-Type": "application/json", - "revision": "2023-02-22" - }, - "params": {}, - "body": { - "JSON": { - "data": { - "type": "event", - "attributes": { - "metric": { - "name": "TestEven001" - }, - "properties": { - "vicePresdentInfo.PreviouslVicePresident": true, - "vicePresdentInfo.VicePresidents": ["AaronBurr", "GeorgeClinton"], - "vicePresdentInfo.YearElected": 1801 - }, - "profile": { - "$email": "test@rudderstack.com", - "$phone_number": "9112340375", - "$id": "sajal12", - "age": "22", - "plan_details.plan_type": "gold", - "plan_details.duration": "3 months" - } - } - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "Track event call", - "input": { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey" - } - }, - "message": { - "type": "track", - "event": "TestEven002", - "sentAt": "2021-01-25T16:12:02.048Z", - "userId": "sajal12", - "channel": "mobile", - "context": { - "os": { - "name": "Android", - "version": "10" - }, - "app": { - "name": "KlaviyoTest", - "build": "1", - "version": "1.0", - "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" - }, - "device": { - "id": "9c6bd77ea9da3e68", - "name": "raphaelin", - "type": "android", - "model": "Redmi K20 Pro", - "manufacturer": "Xiaomi" - }, - "locale": "en-IN", - "screen": { - "width": 1080, - "height": 2210, - "density": 440 - }, - "traits": { - "id": "user@1", - "age": "22", - "name": "Test", - "email": "test@rudderstack.com", - "phone": "9112340375", - "anonymousId": "9c6bd77ea9da3e68", - "description": "Sample description" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.2" - }, - "network": { - "wifi": true, - "carrier": "airtel", - "cellular": true, - "bluetooth": false - }, - "timezone": "Asia/Kolkata", - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)" - }, - "rudderId": "b7b24f86-f7bf-46d8-b2b4-ccafc080239c", - "messageId": "1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce", - "properties": { - "PreviouslyVicePresident": true, - "YearElected": 1801, - "VicePresidents": ["Aaron Burr", "George Clinton"], - "revenue": 3000 - }, - "anonymousId": "9c6bd77ea9da3e68", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-01-25T15:32:56.409Z" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://a.klaviyo.com/api/events", - "headers": { - "Accept": "application/json", - "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", - "Content-Type": "application/json", - "revision": "2023-02-22" - }, - "params": {}, - "body": { - "JSON": { - "data": { - "type": "event", - "attributes": { - "metric": { - "name": "TestEven002" - }, - "properties": { - "PreviouslyVicePresident": true, - "YearElected": 1801, - "VicePresidents": ["Aaron Burr", "George Clinton"] - }, - "profile": { - "$email": "test@rudderstack.com", - "$phone_number": "9112340375", - "$id": "sajal12", - "age": "22", - "name": "Test", - "description": "Sample description" - }, - "value": 3000 - } - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "Track event call, with make email or phone as primary identifier toggle on", - "input": { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey", - "enforceEmailAsPrimary": true - } - }, - "message": { - "type": "track", - "event": "TestEven001", - "sentAt": "2021-01-25T16:12:02.048Z", - "userId": "sajal12", - "channel": "mobile", - "context": { - "os": { - "name": "Android", - "version": "10" - }, - "app": { - "name": "KlaviyoTest", - "build": "1", - "version": "1.0", - "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" - }, - "device": { - "id": "9c6bd77ea9da3e68", - "name": "raphaelin", - "type": "android", - "model": "Redmi K20 Pro", - "manufacturer": "Xiaomi" - }, - "locale": "en-IN", - "screen": { - "width": 1080, - "height": 2210, - "density": 440 - }, - "traits": { - "id": "user@1", - "age": "22", - "email": "test@rudderstack.com", - "phone": "9112340375", - "anonymousId": "9c6bd77ea9da3e68" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.2" - }, - "network": { - "wifi": true, - "carrier": "airtel", - "cellular": true, - "bluetooth": false - }, - "timezone": "Asia/Kolkata", - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)" - }, - "rudderId": "b7b24f86-f7bf-46d8-b2b4-ccafc080239c", - "messageId": "1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce", - "properties": { - "PreviouslyVicePresident": true, - "YearElected": 1801, - "VicePresidents": ["Aaron Burr", "George Clinton"] - }, - "anonymousId": "9c6bd77ea9da3e68", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-01-25T15:32:56.409Z" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://a.klaviyo.com/api/events", - "headers": { - "Accept": "application/json", - "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", - "Content-Type": "application/json", - "revision": "2023-02-22" - }, - "params": {}, - "body": { - "JSON": { - "data": { - "type": "event", - "attributes": { - "metric": { - "name": "TestEven001" - }, - "properties": { - "PreviouslyVicePresident": true, - "YearElected": 1801, - "VicePresidents": ["Aaron Burr", "George Clinton"] - }, - "profile": { - "$email": "test@rudderstack.com", - "$phone_number": "9112340375", - "age": "22", - "_id": "sajal12" - } - } - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "Track event call, without email and phone & with (make email or phone as primary identifier) toggle on", - "input": { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey", - "enforceEmailAsPrimary": true - } - }, - "message": { - "type": "track", - "event": "TestEven001", - "sentAt": "2021-01-25T16:12:02.048Z", - "userId": "sajal12", - "channel": "mobile", - "context": { - "os": { - "name": "Android", - "version": "10" - }, - "app": { - "name": "KlaviyoTest", - "build": "1", - "version": "1.0", - "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" - }, - "device": { - "id": "9c6bd77ea9da3e68", - "name": "raphaelin", - "type": "android", - "model": "Redmi K20 Pro", - "manufacturer": "Xiaomi" - }, - "locale": "en-IN", - "screen": { - "width": 1080, - "height": 2210, - "density": 440 - }, - "traits": { - "id": "user@1", - "age": "22", - "anonymousId": "9c6bd77ea9da3e68" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.2" - }, - "network": { - "wifi": true, - "carrier": "airtel", - "cellular": true, - "bluetooth": false - }, - "timezone": "Asia/Kolkata", - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)" - }, - "rudderId": "b7b24f86-f7bf-46d8-b2b4-ccafc080239c", - "messageId": "1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce", - "properties": { - "PreviouslyVicePresident": true, - "YearElected": 1801, - "VicePresidents": ["Aaron Burr", "George Clinton"] - }, - "anonymousId": "9c6bd77ea9da3e68", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-01-25T15:32:56.409Z" - } - }, - "output": { - "error": "None of email and phone are present in the payload" - } - }, - { - "description": "group call", - "input": { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey" - } - }, - "message": { - "userId": "user123", - "type": "group", - "groupId": "XUepkK", - "traits": { - "subscribe": true - }, - "context": { - "traits": { - "email": "test@rudderstack.com", - "phone": "+12 345 678 900", - "consent": ["email"] - }, - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-01-21T00:21:34.208Z" - } - }, - "output": [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://a.klaviyo.com/api/profile-subscription-bulk-create-jobs", - "headers": { - "Content-Type": "application/json", - "Accept": "application/json", - "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", - "revision": "2023-02-22" - }, - "params": {}, - "body": { - "JSON": { - "data": { - "type": "profile-subscription-bulk-create-job", - "attributes": { - "list_id": "XUepkK", - "subscriptions": [ - { - "email": "test@rudderstack.com", - "phone_number": "+12 345 678 900" - } - ] - } - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ] - }, - { - "description": "group call without groupId", - "input": { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey" - } - }, - "message": { - "userId": "user123", - "type": "group", - "groupId": "", - "traits": { - "subscribe": true - }, - "context": { - "traits": { - "email": "test@rudderstack.com", - "phone": "+12 345 678 900", - "consent": "email" - }, - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-01-21T00:21:34.208Z" - } - }, - "output": { - "error": "groupId is a required field for group events" - } - }, - { - "description": "[Error]: Check for unsupported message type", - "input": { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey" - } - }, - "message": { - "userId": "user123", - "type": "random", - "groupId": "XUepkK", - "traits": { - "subscribe": true - }, - "context": { - "traits": { - "email": "test@rudderstack.com", - "phone": "+12 345 678 900", - "consent": "email" - }, - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-01-21T00:21:34.208Z" - } - }, - "output": { - "error": "Event type random is not supported" - } - }, - { - "description": "Track call with Ecom events (Viewed Product)", - "input": { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey" - } - }, - "message": { - "type": "track", - "event": "product viewed", - "sentAt": "2021-01-25T16:12:02.048Z", - "userId": "sajal12", - "channel": "mobile", - "context": { - "os": { - "name": "Android", - "version": "10" - }, - "app": { - "name": "KlaviyoTest", - "build": "1", - "version": "1.0", - "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" - }, - "device": { - "id": "9c6bd77ea9da3e68", - "name": "raphaelin", - "type": "android", - "model": "Redmi K20 Pro", - "manufacturer": "Xiaomi" - }, - "locale": "en-IN", - "screen": { - "width": 1080, - "height": 2210, - "density": 440 - }, - "traits": { - "id": "user@1", - "age": "22", - "name": "Test", - "email": "test@rudderstack.com", - "phone": "9112340375", - "anonymousId": "9c6bd77ea9da3e68", - "description": "Sample description" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.2" - }, - "network": { - "wifi": true, - "carrier": "airtel", - "cellular": true, - "bluetooth": false - }, - "timezone": "Asia/Kolkata", - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)" - }, - "rudderId": "b7b24f86-f7bf-46d8-b2b4-ccafc080239c", - "messageId": "1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce", - "properties": { - "name": "test product", - "product_id": "1114", - "sku": "WINNIePuh12", - "image_url": "http://www.example.com/path/to/product/image.png", - "url": "http://www.example.com/path/to/product", - "brand": "Not for Kids", - "price": 9.9, - "categories": ["Fiction", "Children"] - }, - "anonymousId": "9c6bd77ea9da3e68", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-01-25T15:32:56.409Z" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://a.klaviyo.com/api/events", - "headers": { - "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", - "Content-Type": "application/json", - "Accept": "application/json", - "revision": "2023-02-22" - }, - "params": {}, - "body": { - "JSON": { - "data": { - "type": "event", - "attributes": { - "metric": { - "name": "Viewed Product" - }, - "profile": { - "$email": "test@rudderstack.com", - "$phone_number": "9112340375", - "$id": "sajal12", - "age": "22", - "name": "Test", - "description": "Sample description" - }, - "properties": { - "ProductName": "test product", - "ProductID": "1114", - "SKU": "WINNIePuh12", - "ImageURL": "http://www.example.com/path/to/product/image.png", - "URL": "http://www.example.com/path/to/product", - "Brand": "Not for Kids", - "Price": 9.9, - "Categories": ["Fiction", "Children"] - } - } - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "Track call with Ecom events (Checkout Started) with enabled flattenProperties", - "input": { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey", - "flattenProperties": true - } - }, - "message": { - "type": "track", - "event": "checkout started", - "sentAt": "2021-01-25T16:12:02.048Z", - "userId": "sajal12", - "channel": "mobile", - "context": { - "os": { - "name": "Android", - "version": "10" - }, - "app": { - "name": "KlaviyoTest", - "build": "1", - "version": "1.0", - "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" - }, - "device": { - "id": "9c6bd77ea9da3e68", - "name": "raphaelin", - "type": "android", - "model": "Redmi K20 Pro", - "manufacturer": "Xiaomi" - }, - "locale": "en-IN", - "screen": { - "width": 1080, - "height": 2210, - "density": 440 - }, - "traits": { - "id": "user@1", - "age": "22", - "name": "Test", - "email": "test@rudderstack.com", - "phone": "9112340375", - "anonymousId": "9c6bd77ea9da3e68", - "description": "Sample description" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.2" - }, - "network": { - "wifi": true, - "carrier": "airtel", - "cellular": true, - "bluetooth": false - }, - "timezone": "Asia/Kolkata", - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)" - }, - "rudderId": "b7b24f86-f7bf-46d8-b2b4-ccafc080239c", - "messageId": "1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce", - "properties": { - "order_id": "1234", - "affiliation": "Apple Store", - "value": 20, - "revenue": 15.0, - "shipping": 4, - "tax": 1, - "discount": 1.5, - "coupon": "ImagePro", - "currency": "USD", - "products": [ - { - "product_id": "123", - "sku": "G-32", - "name": "Monopoly", - "price": 14, - "quantity": 1, - "category": "Games", - "url": "https://www.website.com/product/path", - "image_url": "https://www.website.com/product/path.jpg" - }, - { - "product_id": "345", - "sku": "F-32", - "name": "UNO", - "price": 3.45, - "quantity": 2, - "category": "Games" - } - ] - }, - "anonymousId": "9c6bd77ea9da3e68", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-01-25T15:32:56.409Z" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://a.klaviyo.com/api/events", - "headers": { - "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", - "Content-Type": "application/json", - "Accept": "application/json", - "revision": "2023-02-22" - }, - "params": {}, - "body": { - "JSON": { - "data": { - "type": "event", - "attributes": { - "metric": { - "name": "Started Checkout" - }, - "properties": { - "$event_id": "1234", - "$value": 20, - "items[0].ProductID": "123", - "items[0].SKU": "G-32", - "items[0].ProductName": "Monopoly", - "items[0].Quantity": 1, - "items[0].ItemPrice": 14, - "items[0].ProductURL": "https://www.website.com/product/path", - "items[0].ImageURL": "https://www.website.com/product/path.jpg", - "items[1].ProductID": "345", - "items[1].SKU": "F-32", - "items[1].ProductName": "UNO", - "items[1].Quantity": 2, - "items[1].ItemPrice": 3.45 - }, - "profile": { - "$email": "test@rudderstack.com", - "$phone_number": "9112340375", - "$id": "sajal12", - "age": "22", - "name": "Test", - "description": "Sample description" - } - } - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "Track call with Ecom events (Added to Cart) with properties.products", - "input": { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey" - } - }, - "message": { - "type": "track", - "event": "product added", - "sentAt": "2021-01-25T16:12:02.048Z", - "userId": "sajal12", - "channel": "mobile", - "context": { - "os": { - "name": "Android", - "version": "10" - }, - "app": { - "name": "KlaviyoTest", - "build": "1", - "version": "1.0", - "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" - }, - "device": { - "id": "9c6bd77ea9da3e68", - "name": "raphaelin", - "type": "android", - "model": "Redmi K20 Pro", - "manufacturer": "Xiaomi" - }, - "locale": "en-IN", - "screen": { - "width": 1080, - "height": 2210, - "density": 440 - }, - "traits": { - "id": "user@1", - "age": "22", - "name": "Test", - "email": "test@rudderstack.com", - "phone": "9112340375", - "anonymousId": "9c6bd77ea9da3e68", - "description": "Sample description" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.2" - }, - "network": { - "wifi": true, - "carrier": "airtel", - "cellular": true, - "bluetooth": false - }, - "timezone": "Asia/Kolkata", - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)" - }, - "rudderId": "b7b24f86-f7bf-46d8-b2b4-ccafc080239c", - "messageId": "1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce", - "properties": { - "order_id": "1234", - "value": 12.12, - "categories": ["Fiction3", "Children3"], - "checkout_url": "http://www.heythere.com", - "item_names": ["book1", "book2"], - "products": [ - { - "product_id": "b1pid", - "sku": "123x", - "name": "book1", - "url": "heyther.com", - "price": 12.0 - }, - { - "product_id": "b2pid", - "sku": "123x", - "name": "book2", - "url": "heyther2.com", - "price": 14.0 - } - ] - }, - "anonymousId": "9c6bd77ea9da3e68", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-01-25T15:32:56.409Z" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://a.klaviyo.com/api/events", - "headers": { - "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", - "Content-Type": "application/json", - "Accept": "application/json", - "revision": "2023-02-22" - }, - "params": {}, - "body": { - "JSON": { - "data": { - "type": "event", - "attributes": { - "metric": { - "name": "Added to Cart" - }, - "profile": { - "$email": "test@rudderstack.com", - "$phone_number": "9112340375", - "$id": "sajal12", - "age": "22", - "name": "Test", - "description": "Sample description" - }, - "properties": { - "$value": 12.12, - "AddedItemCategories": ["Fiction3", "Children3"], - "ItemNames": ["book1", "book2"], - "CheckoutURL": "http://www.heythere.com", - "items": [ - { - "ProductID": "b1pid", - "SKU": "123x", - "ProductName": "book1", - "ItemPrice": 12, - "ProductURL": "heyther.com" - }, - { - "ProductID": "b2pid", - "SKU": "123x", - "ProductName": "book2", - "ItemPrice": 14, - "ProductURL": "heyther2.com" - } - ] - } - } - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - } -] diff --git a/test/__tests__/data/klaviyo_router.json b/test/__tests__/data/klaviyo_router.json deleted file mode 100644 index 7fae2ad90e..0000000000 --- a/test/__tests__/data/klaviyo_router.json +++ /dev/null @@ -1,599 +0,0 @@ -[ - { - "description": "Router tests", - "input": [ - { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey" - } - }, - "metadata": { - "jobId": 1 - }, - "message": { - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "test", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "traits": { - "firstName": "Test", - "lastName": "Rudderlabs", - "email": "test@rudderstack.com", - "phone": "+12 345 578 900", - "userId": "Testc", - "title": "Developer", - "organization": "Rudder", - "city": "Tokyo", - "region": "Kanto", - "country": "JP", - "zip": "100-0001", - "Flagged": false, - "Residence": "Shibuya", - "properties": { - "consent": ["email", "sms"] - } - }, - "locale": "en-US", - "screen": { - "density": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.11" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - }, - { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey" - } - }, - "metadata": { - "jobId": 2 - }, - "message": { - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "test", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "traits": { - "firstName": "Test", - "lastName": "Rudderlabs", - "email": "test@rudderstack.com", - "phone": "+12 345 578 900", - "userId": "test", - "title": "Developer", - "organization": "Rudder", - "city": "Tokyo", - "region": "Kanto", - "country": "JP", - "zip": "100-0001", - "Flagged": false, - "Residence": "Shibuya", - "properties": { - "listId": "XUepkK", - "subscribe": true, - "consent": ["email", "sms"] - } - }, - "locale": "en-US", - "screen": { - "density": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.11" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - }, - { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey" - } - }, - "metadata": { - "jobId": 3 - }, - "message": { - "userId": "user123", - "type": "group", - "groupId": "XUepkK", - "traits": { - "subscribe": true - }, - "context": { - "traits": { - "email": "test@rudderstack.com", - "phone": "+12 345 678 900", - "consent": ["email"] - }, - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-01-21T00:21:34.208Z" - } - }, - { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey" - } - }, - "metadata": { - "jobId": 4 - }, - "message": { - "userId": "user123", - "type": "random", - "groupId": "XUepkK", - "traits": { - "subscribe": true - }, - "context": { - "traits": { - "email": "test@rudderstack.com", - "phone": "+12 345 678 900", - "consent": "email" - }, - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-01-21T00:21:34.208Z" - } - }, - { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey" - } - }, - "metadata": { - "jobId": 5 - }, - "message": { - "userId": "user123", - "type": "group", - "groupId": "", - "traits": { - "subscribe": true - }, - "context": { - "traits": { - "email": "test@rudderstack.com", - "phone": "+12 345 678 900", - "consent": "email" - }, - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-01-21T00:21:34.208Z" - } - } - ], - "newTransformerOutput": [ - { - "batchedRequest": [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://a.klaviyo.com/api/profile-subscription-bulk-create-jobs", - "headers": { - "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", - "Content-Type": "application/json", - "Accept": "application/json", - "revision": "2023-02-22" - }, - "params": {}, - "body": { - "JSON": { - "data": { - "type": "profile-subscription-bulk-create-job", - "attributes": { - "list_id": "XUepkK", - "subscriptions": [ - { - "email": "test@rudderstack.com", - "phone_number": "+12 345 678 900" - }, - { - "email": "test@rudderstack.com", - "phone_number": "+12 345 578 900", - "channels": { - "email": ["MARKETING"], - "sms": ["MARKETING"] - } - } - ] - } - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ], - "metadata": [ - { - "jobId": 3 - }, - { - "jobId": 2 - } - ], - "batched": true, - "statusCode": 200, - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey" - } - } - }, - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "PATCH", - "endpoint": "https://a.klaviyo.com/api/profiles/01GW3PHVY0MTCDGS0A1612HARX", - "headers": { - "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", - "Content-Type": "application/json", - "Accept": "application/json", - "revision": "2023-02-22" - }, - "params": {}, - "body": { - "JSON": { - "data": { - "type": "profile", - "attributes": { - "external_id": "test", - "email": "test@rudderstack.com", - "first_name": "Test", - "last_name": "Rudderlabs", - "phone_number": "+12 345 578 900", - "title": "Developer", - "organization": "Rudder", - "location": { - "city": "Tokyo", - "region": "Kanto", - "country": "JP", - "zip": "100-0001" - }, - "properties": { - "Flagged": false, - "Residence": "Shibuya" - } - }, - "id": "01GW3PHVY0MTCDGS0A1612HARX" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - "error": "{\"id\":\"01GW3PHVY0MTCDGS0A1612HARX\",\"attributes\":{}}", - "metadata": [ - { - "jobId": 1 - } - ], - "batched": false, - "statusCode": 299, - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey" - } - } - }, - { - "error": "Event type random is not supported", - "metadata": [ - { - "jobId": 4 - } - ], - "batched": false, - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation" - }, - "statusCode": 400, - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey" - } - } - }, - { - "error": "groupId is a required field for group events", - "metadata": [ - { - "jobId": 5 - } - ], - "batched": false, - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation" - }, - "statusCode": 400, - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey" - } - } - } - ], - "oldTransformerOutput": [ - { - "batchedRequest": [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://a.klaviyo.com/api/profile-subscription-bulk-create-jobs", - "headers": { - "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", - "Content-Type": "application/json", - "Accept": "application/json", - "revision": "2023-02-22" - }, - "params": {}, - "body": { - "JSON": { - "data": { - "type": "profile-subscription-bulk-create-job", - "attributes": { - "list_id": "XUepkK", - "subscriptions": [ - { - "email": "test@rudderstack.com", - "phone_number": "+12 345 678 900" - }, - { - "email": "test@rudderstack.com", - "phone_number": "+12 345 578 900", - "channels": { - "email": ["MARKETING"], - "sms": ["MARKETING"] - } - } - ] - } - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "PATCH", - "endpoint": "https://a.klaviyo.com/api/profiles/01GW3PHVY0MTCDGS0A1612HARX", - "headers": { - "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", - "Content-Type": "application/json", - "Accept": "application/json", - "revision": "2023-02-22" - }, - "params": {}, - "body": { - "JSON": { - "data": { - "type": "profile", - "attributes": { - "external_id": "test", - "email": "test@rudderstack.com", - "first_name": "Test", - "last_name": "Rudderlabs", - "phone_number": "+12 345 578 900", - "title": "Developer", - "organization": "Rudder", - "location": { - "city": "Tokyo", - "region": "Kanto", - "country": "JP", - "zip": "100-0001" - }, - "properties": { - "Flagged": false, - "Residence": "Shibuya" - } - }, - "id": "01GW3PHVY0MTCDGS0A1612HARX" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ], - "metadata": [ - { - "jobId": 3 - }, - { - "jobId": 2 - } - ], - "batched": true, - "statusCode": 200, - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey" - } - } - }, - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "PATCH", - "endpoint": "https://a.klaviyo.com/api/profiles/01GW3PHVY0MTCDGS0A1612HARX", - "headers": { - "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", - "Content-Type": "application/json", - "Accept": "application/json", - "revision": "2023-02-22" - }, - "params": {}, - "body": { - "JSON": { - "data": { - "type": "profile", - "attributes": { - "external_id": "test", - "email": "test@rudderstack.com", - "first_name": "Test", - "last_name": "Rudderlabs", - "phone_number": "+12 345 578 900", - "title": "Developer", - "organization": "Rudder", - "location": { - "city": "Tokyo", - "region": "Kanto", - "country": "JP", - "zip": "100-0001" - }, - "properties": { - "Flagged": false, - "Residence": "Shibuya" - } - }, - "id": "01GW3PHVY0MTCDGS0A1612HARX" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "jobId": 1 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey" - } - } - }, - { - "metadata": [ - { - "jobId": 4 - } - ], - "batched": false, - "statusCode": 400, - "error": "Event type random is not supported", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation" - }, - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey" - } - } - }, - { - "metadata": [ - { - "jobId": 5 - } - ], - "batched": false, - "statusCode": 400, - "error": "groupId is a required field for group events", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation" - }, - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey" - } - } - } - ] - } -] diff --git a/test/__tests__/data/kustomer_input.json b/test/__tests__/data/kustomer_input.json deleted file mode 100644 index c711c2499c..0000000000 --- a/test/__tests__/data/kustomer_input.json +++ /dev/null @@ -1,851 +0,0 @@ -[ - { - "destination": { - "Config": { - "apiKey": "dummyApiKey" - } - }, - "message": { - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "Testc", - "channel": "web", - "context": { - "os": { "name": "", "version": "" }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "traits": { - "name": "Test Rudderlabs", - "email": "test@rudderstack.com", - "phone": "+12345578900", - "birthday": "2005-01-01T23:28:56.782Z", - "userId": "Testc", - "address": { - "street": "24 Dovers Lane", - "city": "Miami", - "state": "Florida", - "postalCode": "1890001" - }, - "userName": "Testc47", - "company": "Rudderstack", - "createdAt": "2015-04-17T12:37:42.146Z", - "lastActivityAt": "2016-04-17T12:37:42.146Z", - "lastCustomerActivityAt": "2017-04-17T12:37:42.146Z", - "lastSeenAt": "2017-04-17T12:37:42.146Z", - "avatar": "https://homepages.cae.wisc.edu/~ece533/images/boat.png", - "gender": "m", - "tags": ["happy", "satisfied"], - "website": "www.mattertoast873.com", - "socials": [ - { - "verified": true, - "userid": "100", - "type": "twitter", - "username": "@Testc", - "url": "http://twitter.com/Testc" - }, - { - "verified": false, - "userid": "200", - "type": "facebook", - "username": "Testc", - "url": "http://facebook.com/Testc" - } - ] - }, - "locale": "en-US", - "screen": { "density": 2 }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.1.11" }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "integrations": { "All": true }, - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey" - } - }, - "message": { - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "channel": "web", - "userId": "58210c3db0f09110006b7953", - "context": { - "os": { "name": "", "version": "" }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "traits": { - "name": "Ano Domeni", - "phone": "+12345578000", - "birthday": "2005-01-01T23:28:56.782Z" - }, - "locale": "en-US", - "screen": { "density": 2 }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.1.11" }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "integrations": { "All": true }, - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey" - } - }, - "message": { - "type": "screen", - "event": "Test-Event-Screen", - "sentAt": "2021-01-25T16:12:02.048Z", - "userId": "Testc", - "channel": "mobile", - "context": { - "os": { - "name": "Android", - "version": "10" - }, - "app": { - "name": "KlaviyoTest", - "build": "1", - "version": "1.0", - "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" - }, - "device": { - "id": "9c6bd77ea9da3e68", - "name": "raphaelin", - "type": "android", - "model": "Redmi K20 Pro", - "manufacturer": "Xiaomi" - }, - "locale": "en-IN", - "screen": { - "width": 1080, - "height": 2210, - "density": 440 - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.2" - }, - "network": { - "wifi": true, - "carrier": "airtel", - "cellular": true, - "bluetooth": false - }, - "timezone": "Asia/Kolkata", - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)" - }, - "rudderId": "b7b24f86-f7bf-46d8-b2b4-ccafc080239c", - "messageId": "1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce", - "properties": { - "hasAccount": "true", - "YearSelectedNum": 1801, - "originalServing": "2021-01-25T15:32:56.409Z" - }, - "anonymousId": "9c6bd77ea9da3e68", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-01-25T15:32:56.409Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey" - } - }, - "message": { - "name": "Cart-Viewed", - "type": "page", - "sentAt": "2021-01-03T17:02:53.197Z", - "userId": "user@doe", - "channel": "web", - "context": { - "os": { "name": "", "version": "" }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://morkey.in", - "path": "/cart", - "title": "miphone", - "search": "MI", - "referrer": "morkey" - }, - "locale": "en-US", - "screen": { "density": 2 }, - "traits": { - "userId": "userid", - "profession": "Student", - "anonymousId": "d80b66d5-b33d-412d-866f-r4fft5841af" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.1.11" }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "category": "Cart", - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "15129730-eb00-4db7-8db2-799566ccb2ef", - "properties": { - "url": "http://morkey.in", - "name": "Cart Viewed", - "path": "/cart", - "title": "miphone", - "search": "MI", - "category": "Cart", - "referrer": "morkey", - "domain": "morkey.com" - }, - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "integrations": { "All": true }, - "originalTimestamp": "2021-01-03T17:02:53.195Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey" - } - }, - "message": { - "type": "page", - "sentAt": "2021-01-03T17:02:53.197Z", - "userId": "user@doe", - "channel": "web", - "context": { - "os": { "name": "", "version": "" }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://morkey.in", - "path": "/cart", - "title": "miphone", - "search": "MI", - "referrer": "morkey" - }, - "locale": "en-US", - "screen": { "density": 2 }, - "traits": { - "userId": "userid", - "profession": "Student", - "anonymousId": "d80b66d5-b33d-412d-866f-r4fft5841af" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.1.11" }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "category": "Cart", - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "15129730-eb00-4db7-8db2-799566ccb2ef", - "properties": { - "url": "http://morkey.in", - "path": "/cart", - "title": "miphone", - "search": "MI", - "category": "Cart", - "referrer": "morkey", - "domain": "morkey.com", - "kustomerTrackingId": "829131sjad", - "kustomerSessionId": "hsad522" - }, - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "integrations": { "All": true }, - "originalTimestamp": "2021-01-03T17:02:53.195Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey" - } - }, - "message": { - "type": "track", - "event": "Tracking-Weekender", - "sentAt": "2021-01-03T17:02:53.197Z", - "userId": "user@doe", - "channel": "web", - "context": { - "os": { "name": "", "version": "" }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://morkey.in", - "path": "/cart", - "title": "miphone", - "search": "MI", - "referrer": "morkey" - }, - "locale": "en-US", - "screen": { "density": 2 }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.1.11" }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "15129730-eb00-4db7-8db2-799566ccb2ef", - "properties": { - "YearServicedNum": 211, - "region": "strapis", - "kustomerTrackingId": "sahetwiac", - "kustomerSessionId": "63nsa22" - }, - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "locale": "en-US", - "integrations": { "All": true }, - "originalTimestamp": "2021-01-03T17:02:53.195Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey" - } - }, - "message": { - "type": "track", - "event": "Tracking-Weekender2", - "sentAt": "2021-01-03T17:02:53.197Z", - "userId": "user@doe", - "channel": "web", - "context": { - "os": { "name": "", "version": "" }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://morkey.in", - "path": "/cart", - "title": "miphone", - "search": "MI", - "referrer": "morkey" - }, - "screen": { "density": 2 }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.1.11" }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "15129730-eb00-4db7-8db2-799566ccb2ef", - "properties": { - "YearServicedNum": 211, - "reg_8-821x": false, - "kustomer_tracking_id": "sahetwiac", - "kustomer_session_id": "63nsa22" - }, - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "integrations": { "All": true }, - "locale": "en-US", - "originalTimestamp": "2021-01-03T17:02:53.195Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "genericPage": true - } - }, - "message": { - "type": "page", - "name": "Unfinished page", - "sentAt": "2021-01-03T17:02:53.197Z", - "userId": "user@doe", - "channel": "web", - "context": { - "os": { "name": "", "version": "" }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://morkey.in", - "path": "/cart", - "title": "miphone", - "search": "MI", - "referrer": "morkey" - }, - "screen": { "density": 2 }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.1.11" }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "15129730-eb00-4db7-8db2-799566ccb2ef", - "properties": { - "url": "http://morkey.in", - "path": "/cart", - "title": "miphone", - "search": "MI", - "category": "Cart", - "referrer": "morkey", - "domain": "morkey.com" - }, - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "integrations": { "All": true }, - "locale": "en-US", - "originalTimestamp": "2021-01-03T17:02:53.195Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "genericScreen": true - } - }, - "message": { - "type": "screen", - "event": "Test-Event-Screen", - "sentAt": "2021-01-25T16:12:02.048Z", - "userId": "Testc", - "channel": "mobile", - "context": { - "os": { - "name": "Android", - "version": "10" - }, - "app": { - "name": "KlaviyoTest", - "build": "1", - "version": "1.0", - "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" - }, - "device": { - "id": "9c6bd77ea9da3e68", - "name": "raphaelin", - "type": "android", - "model": "Redmi K20 Pro", - "manufacturer": "Xiaomi" - }, - "locale": "en-IN", - "screen": { - "width": 1080, - "height": 2210, - "density": 440 - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.2" - }, - "network": { - "wifi": true, - "carrier": "airtel", - "cellular": true, - "bluetooth": false - }, - "timezone": "Asia/Kolkata", - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)" - }, - "rudderId": "b7b24f86-f7bf-46d8-b2b4-ccafc080239c", - "messageId": "1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce", - "properties": { - "hasAccount": "true", - "YearSelectedNum": 1801, - "originalServing": "2021-01-25T15:32:56.409Z" - }, - "anonymousId": "9c6bd77ea9da3e68", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-01-25T15:32:56.409Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey" - } - }, - "message": { - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "Testc", - "channel": "web", - "context": { - "os": { "name": "", "version": "" }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "traits": { - "firstName": "Test", - "lastName": "Rudderlabs", - "email": "test@rudderstack.com", - "phone": "+12345578900", - "birthday": "2005-01-01T23:28:56.782Z", - "userId": "Testc", - "address": { - "street": "24 Dovers Lane", - "city": "Miami", - "state": "Florida", - "postalCode": "1890001" - }, - "userName": "Testc47", - "company": "Rudderstack", - "createdAt": "2015-04-17T12:37:42.146Z", - "lastActivityAt": "2016-04-17T12:37:42.146Z", - "lastCustomerActivityAt": "2017-04-17T12:37:42.146Z", - "lastSeenAt": "2017-04-17T12:37:42.146Z", - "avatar": "https://homepages.cae.wisc.edu/~ece533/images/boat.png", - "gender": "m", - "tags": ["happy", "satisfied"], - "website": "www.mattertoast873.com", - "socials": [ - { - "verified": true, - "userid": "100", - "type": "twitter", - "username": "@Testc", - "url": "http://twitter.com/Testc" - }, - { - "verified": false, - "userid": "200", - "type": "facebook", - "username": "Testc", - "url": "http://facebook.com/Testc" - } - ] - }, - "locale": "en-US", - "screen": { "density": 2 }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.1.11" }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "integrations": { "All": true }, - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey" - } - }, - "message": { - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "Testc", - "channel": "web", - "context": { - "os": { "name": "", "version": "" }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "traits": { - "firstName": "Test", - "lastName": "Rudderlabs", - "emails": [ - { - "type": "home", - "email": "test@rudderstack.com" - } - ], - "phones": [ - { - "type": "home", - "phone": "+12345578900" - } - ], - "birthday": "2005-01-01T23:28:56.782Z", - "userId": "Testc", - "address": "test address string", - "userName": "Testc47", - "company": "Rudderstack", - "createdAt": "2015-04-17T12:37:42.146Z", - "lastActivityAt": "2016-04-17T12:37:42.146Z", - "lastCustomerActivityAt": "2017-04-17T12:37:42.146Z", - "lastSeenAt": "2017-04-17T12:37:42.146Z", - "avatar": "https://homepages.cae.wisc.edu/~ece533/images/boat.png", - "gender": "m", - "tags": ["happy", "satisfied"], - "website": "www.mattertoast873.com", - "socials": [ - { - "verified": true, - "userid": "100", - "type": "twitter", - "username": "@Testc", - "url": "http://twitter.com/Testc" - }, - { - "verified": false, - "userid": "200", - "type": "facebook", - "username": "Testc", - "url": "http://facebook.com/Testc" - } - ] - }, - "locale": "en-US", - "screen": { "density": 2 }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.1.11" }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "integrations": { "All": true }, - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey" - } - }, - "message": { - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "Testc", - "channel": "web", - "context": { - "os": { "name": "", "version": "" }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "traits": { - "firstName": "Test", - "lastName": "Rudderlabs", - "emails": [ - { - "type": "home", - "email": "test@rudderstack.com" - } - ], - "phones": [ - { - "type": "home", - "phone": "+12345578900" - } - ], - "birthday": "2005-01-01T23:28:56.782Z", - "userId": "Testc", - "address": "test address string", - "userName": "Testc47", - "company": "Rudderstack", - "createdAt": "2015-04-17T12:37:42.146Z", - "lastActivityAt": "2016-04-17T12:37:42.146Z", - "lastCustomerActivityAt": "2017-04-17T12:37:42.146Z", - "lastSeenAt": "2017-04-17T12:37:42.146Z", - "avatar": "https://homepages.cae.wisc.edu/~ece533/images/boat.png", - "gender": "m", - "tags": ["happy", "satisfied"], - "website": "www.mattertoast873.com", - "socials": [ - { - "verified": true, - "userid": "100", - "type": "twitter", - "username": "@Testc", - "url": "http://twitter.com/Testc" - }, - { - "verified": false, - "userid": "200", - "type": "facebook", - "username": "Testc", - "url": "http://facebook.com/Testc" - } - ] - }, - "locale": "en-US", - "screen": { "density": 2 }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.1.11" }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0", - "externalId": [ - { - "type": "kustomerId", - "id": "abcd1234" - } - ] - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "integrations": { "All": true }, - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "genericScreen": true - } - }, - "message": { - "type": "screen", - "event": "Test-Event-Screen", - "userId": "utsabc", - "channel": "mobile", - "context": { - "os": { - "name": "Android", - "version": "10" - }, - "app": { - "name": "KlaviyoTest", - "build": "1", - "version": "1.0", - "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" - }, - "device": { - "id": "9c6bd77ea9da3e68", - "name": "raphaelin", - "type": "android", - "model": "Redmi K20 Pro", - "manufacturer": "Xiaomi" - }, - "locale": "en-IN", - "screen": { - "width": 1080, - "height": 2210, - "density": 440 - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.2" - }, - "network": { - "wifi": true, - "carrier": "airtel", - "cellular": true, - "bluetooth": false - }, - "timezone": "Asia/Kolkata", - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)", - "sessionId": "hsad522" - }, - "rudderId": "b7b24f86-f7bf-46d8-b2b4-ccafc080239c", - "messageId": "1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce", - "properties": { - "hasAccount": "true", - "YearSelectedNum": 1801 - }, - "anonymousId": "9c6bd77ea9da3e68", - "integrations": { - "All": true - }, - "originalTimestamp": "2023-01-10T15:32:56.409Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyAPIkey", - "baseEndpoint": "https://api.prod2.kustomerapp.com", - "apiKey": "dummyApiKey", - "genericScreen": true - } - }, - "message": { - "type": "screen", - "event": "Test-Event-Screen", - "userId": "Testc", - "channel": "mobile", - "context": { - "os": { - "name": "Android", - "version": "10" - }, - "app": { - "name": "KlaviyoTest", - "build": "1", - "version": "1.0", - "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" - }, - "device": { - "id": "9c6bd77ea9da3e68", - "name": "raphaelin", - "type": "android", - "model": "Redmi K20 Pro", - "manufacturer": "Xiaomi" - }, - "locale": "en-IN", - "screen": { - "width": 1080, - "height": 2210, - "density": 440 - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.2" - }, - "network": { - "wifi": true, - "carrier": "airtel", - "cellular": true, - "bluetooth": false - }, - "timezone": "Asia/Kolkata", - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)", - "sessionId": "hsad522" - }, - "rudderId": "b7b24f86-f7bf-46d8-b2b4-ccafc080239c", - "messageId": "1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce", - "properties": { - "hasAccount": "true", - "YearSelectedNum": 1801 - }, - "anonymousId": "9c6bd77ea9da3e68", - "integrations": { - "All": true - }, - "originalTimestamp": "2023-01-10T15:32:56.409Z" - } - } -] diff --git a/test/__tests__/data/kustomer_output.json b/test/__tests__/data/kustomer_output.json deleted file mode 100644 index 0a0876d29a..0000000000 --- a/test/__tests__/data/kustomer_output.json +++ /dev/null @@ -1,602 +0,0 @@ -[ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.kustomerapp.com/v1/customers", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "name": "Test Rudderlabs", - "externalId": "Testc", - "username": "Testc47", - "company": "Rudderstack", - "signedUpAt": "2015-04-17T12:37:42.146Z", - "lastActivityAt": "2016-04-17T12:37:42.146Z", - "lastCustomerActivityAt": "2017-04-17T12:37:42.146Z", - "lastSeenAt": "2017-04-17T12:37:42.146Z", - "avatarUrl": "https://homepages.cae.wisc.edu/~ece533/images/boat.png", - "gender": "m", - "tags": ["happy", "satisfied"], - "locale": "en-US", - "socials": [ - { - "verified": true, - "userid": "100", - "type": "twitter", - "username": "@Testc", - "url": "http://twitter.com/Testc" - }, - { - "verified": false, - "userid": "200", - "type": "facebook", - "username": "Testc", - "url": "http://facebook.com/Testc" - } - ], - "birthdayAt": "2005-01-01T23:28:56.782Z", - "emails": [ - { - "type": "home", - "email": "test@rudderstack.com" - } - ], - "phones": [ - { - "type": "home", - "phone": "+12345578900" - } - ], - "urls": [ - { - "url": "www.mattertoast873.com" - } - ], - "locations": [ - { - "type": "home", - "address": "24 Dovers Lane Miami Florida 1890001" - } - ] - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "PUT", - "endpoint": "https://api.kustomerapp.com/v1/customers/58210c3db0f09110006b7953?replace=false", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "name": "Ano Domeni", - "externalId": "58210c3db0f09110006b7953", - "locale": "en-US", - "birthdayAt": "2005-01-01T23:28:56.782Z", - "phones": [ - { - "type": "home", - "phone": "+12345578000" - } - ] - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.kustomerapp.com/v1/tracking/identityEvent", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "identity": { - "externalId": "Testc" - }, - "event": { - "name": "Screen-Viewed-Test-Event-Screen", - "meta": { - "hasAccount": "true", - "YearSelectedNum": 1801, - "originalServing": "2021-01-25T15:32:56.409Z" - } - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.kustomerapp.com/v1/tracking/identityEvent", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "identity": { - "externalId": "user@doe" - }, - "event": { - "name": "Web-Page-Viewed-Cart-Viewed", - "meta": { - "url": "http://morkey.in", - "name": "Cart Viewed", - "path": "/cart", - "title": "miphone", - "search": "MI", - "category": "Cart", - "referrer": "morkey", - "domain": "morkey.com" - } - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.kustomerapp.com/v1/tracking/identityEvent", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "identity": { - "externalId": "user@doe" - }, - "event": { - "name": "Web-Page-Viewed", - "sessionId": "hsad522", - "trackingId": "829131sjad", - "meta": { - "url": "http://morkey.in", - "path": "/cart", - "title": "miphone", - "search": "MI", - "category": "Cart", - "referrer": "morkey", - "domain": "morkey.com" - } - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.kustomerapp.com/v1/tracking/identityEvent", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "identity": { - "externalId": "user@doe" - }, - "event": { - "name": "Tracking-Weekender", - "sessionId": "63nsa22", - "trackingId": "sahetwiac", - "meta": { - "YearServicedNum": 211, - "region": "strapis" - } - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.kustomerapp.com/v1/tracking/identityEvent", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "FORM": {}, - "JSON": { - "event": { - "meta": { - "YearServicedNum": 211, - "reg_8-821x": false - }, - "name": "Tracking-Weekender2", - "sessionId": "63nsa22", - "trackingId": "sahetwiac" - }, - "identity": { - "externalId": "user@doe" - } - }, - "XML": {}, - "JSON_ARRAY": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.kustomerapp.com/v1/tracking/identityEvent", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "identity": { - "externalId": "user@doe" - }, - "event": { - "name": "Web-Page-Viewed", - "meta": { - "url": "http://morkey.in", - "path": "/cart", - "title": "miphone", - "search": "MI", - "category": "Cart", - "referrer": "morkey", - "domain": "morkey.com" - } - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.kustomerapp.com/v1/tracking/identityEvent", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "identity": { - "externalId": "Testc" - }, - "event": { - "name": "Screen-Viewed", - "meta": { - "hasAccount": "true", - "YearSelectedNum": 1801, - "originalServing": "2021-01-25T15:32:56.409Z" - } - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.kustomerapp.com/v1/customers", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "name": "Test Rudderlabs", - "externalId": "Testc", - "username": "Testc47", - "company": "Rudderstack", - "signedUpAt": "2015-04-17T12:37:42.146Z", - "lastActivityAt": "2016-04-17T12:37:42.146Z", - "lastCustomerActivityAt": "2017-04-17T12:37:42.146Z", - "lastSeenAt": "2017-04-17T12:37:42.146Z", - "avatarUrl": "https://homepages.cae.wisc.edu/~ece533/images/boat.png", - "gender": "m", - "tags": ["happy", "satisfied"], - "locale": "en-US", - "socials": [ - { - "verified": true, - "userid": "100", - "type": "twitter", - "username": "@Testc", - "url": "http://twitter.com/Testc" - }, - { - "verified": false, - "userid": "200", - "type": "facebook", - "username": "Testc", - "url": "http://facebook.com/Testc" - } - ], - "birthdayAt": "2005-01-01T23:28:56.782Z", - "emails": [ - { - "type": "home", - "email": "test@rudderstack.com" - } - ], - "phones": [ - { - "type": "home", - "phone": "+12345578900" - } - ], - "urls": [ - { - "url": "www.mattertoast873.com" - } - ], - "locations": [ - { - "type": "home", - "address": "24 Dovers Lane Miami Florida 1890001" - } - ] - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.kustomerapp.com/v1/customers", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "name": "Test Rudderlabs", - "externalId": "Testc", - "username": "Testc47", - "company": "Rudderstack", - "signedUpAt": "2015-04-17T12:37:42.146Z", - "lastActivityAt": "2016-04-17T12:37:42.146Z", - "lastCustomerActivityAt": "2017-04-17T12:37:42.146Z", - "lastSeenAt": "2017-04-17T12:37:42.146Z", - "avatarUrl": "https://homepages.cae.wisc.edu/~ece533/images/boat.png", - "gender": "m", - "tags": ["happy", "satisfied"], - "locale": "en-US", - "socials": [ - { - "verified": true, - "userid": "100", - "type": "twitter", - "username": "@Testc", - "url": "http://twitter.com/Testc" - }, - { - "verified": false, - "userid": "200", - "type": "facebook", - "username": "Testc", - "url": "http://facebook.com/Testc" - } - ], - "birthdayAt": "2005-01-01T23:28:56.782Z", - "emails": [ - { - "type": "home", - "email": "test@rudderstack.com" - } - ], - "phones": [ - { - "type": "home", - "phone": "+12345578900" - } - ], - "urls": [ - { - "url": "www.mattertoast873.com" - } - ], - "locations": [ - { - "type": "home", - "address": "test address string" - } - ] - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "PUT", - "endpoint": "https://api.kustomerapp.com/v1/customers/abcd1234?replace=false", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "name": "Test Rudderlabs", - "externalId": "Testc", - "username": "Testc47", - "company": "Rudderstack", - "signedUpAt": "2015-04-17T12:37:42.146Z", - "lastActivityAt": "2016-04-17T12:37:42.146Z", - "lastCustomerActivityAt": "2017-04-17T12:37:42.146Z", - "lastSeenAt": "2017-04-17T12:37:42.146Z", - "avatarUrl": "https://homepages.cae.wisc.edu/~ece533/images/boat.png", - "gender": "m", - "tags": ["happy", "satisfied"], - "locale": "en-US", - "socials": [ - { - "verified": true, - "userid": "100", - "type": "twitter", - "username": "@Testc", - "url": "http://twitter.com/Testc" - }, - { - "verified": false, - "userid": "200", - "type": "facebook", - "username": "Testc", - "url": "http://facebook.com/Testc" - } - ], - "birthdayAt": "2005-01-01T23:28:56.782Z", - "emails": [ - { - "type": "home", - "email": "test@rudderstack.com" - } - ], - "phones": [ - { - "type": "home", - "phone": "+12345578900" - } - ], - "urls": [ - { - "url": "www.mattertoast873.com" - } - ], - "locations": [ - { - "type": "home", - "address": "test address string" - } - ] - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.kustomerapp.com/v1/tracking/identityEvent", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "identity": { - "externalId": "utsabc" - }, - "event": { - "name": "Screen-Viewed", - "sessionId": "hsad522", - "meta": { - "hasAccount": "true", - "YearSelectedNum": 1801 - } - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.prod2.kustomerapp.com/v1/tracking/identityEvent", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "identity": { - "externalId": "Testc" - }, - "event": { - "name": "Screen-Viewed", - "sessionId": "hsad522", - "meta": { - "hasAccount": "true", - "YearSelectedNum": 1801 - } - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - } -] diff --git a/test/__tests__/data/kustomer_router_input.json b/test/__tests__/data/kustomer_router_input.json deleted file mode 100644 index 0e4c88aa20..0000000000 --- a/test/__tests__/data/kustomer_router_input.json +++ /dev/null @@ -1,183 +0,0 @@ -[ - { - "message": { - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "testc", - "channel": "web", - "context": { - "os": { "name": "", "version": "" }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "traits": { - "name": "test Rudderlabs", - "email": "test@rudderstack.com", - "phone": "+12345578900", - "birthday": "2005-01-01T23:28:56.782Z", - "userId": "testc", - "address": { - "street": "24 Dovers Lane", - "city": "Miami", - "state": "Florida", - "postalCode": "1890001" - }, - "userName": "testc47", - "company": "Rudderstack", - "createdAt": "2015-04-17T12:37:42.146Z", - "lastActivityAt": "2016-04-17T12:37:42.146Z", - "lastCustomerActivityAt": "2017-04-17T12:37:42.146Z", - "lastSeenAt": "2017-04-17T12:37:42.146Z", - "avatar": "https://homepages.cae.wisc.edu/~ece533/images/boat.png", - "gender": "m", - "tags": ["happy", "satisfied"], - "website": "www.mattertoast873.com", - "socials": [ - { - "verified": true, - "userid": "100", - "type": "twitter", - "username": "@testc", - "url": "http://twitter.com/testc" - }, - { - "verified": false, - "userid": "200", - "type": "facebook", - "username": "testc", - "url": "http://facebook.com/testc" - } - ] - }, - "locale": "en-US", - "screen": { "density": 2 }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.1.11" }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "integrations": { "All": true }, - "originalTimestamp": "2021-01-03T17:02:53.193Z" - }, - "metadata": { - "jobId": 1 - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "genericPage": false, - "genericScreen": false - } - } - }, - { - "message": { - "type": "track", - "event": "Tracking-Weekender", - "sentAt": "2021-01-03T17:02:53.197Z", - "userId": "user@doe", - "channel": "web", - "context": { - "os": { "name": "", "version": "" }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://morkey.in", - "path": "/cart", - "title": "miphone", - "search": "MI", - "referrer": "morkey" - }, - "locale": "en-US", - "screen": { "density": 2 }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.1.11" }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "15129730-eb00-4db7-8db2-799566ccb2ef", - "properties": { - "YearServicedNum": 211, - "region": "strapis", - "kustomerTrackingId": "sahetwiac", - "kustomerSessionId": "63nsa22" - }, - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "locale": "en-US", - "integrations": { "All": true }, - "originalTimestamp": "2021-01-03T17:02:53.195Z" - }, - "metadata": { - "jobId": 2 - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "genericPage": false, - "genericScreen": false - } - } - }, - { - "message": { - "type": "track", - "event": "Tracking-Weekender", - "sentAt": "2021-01-03T17:02:53.197Z", - "userId": "user@doe", - "channel": "web", - "context": { - "os": { "name": "", "version": "" }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://morkey.in", - "path": "/cart", - "title": "miphone", - "search": "MI", - "referrer": "morkey" - }, - "locale": "en-US", - "screen": { "density": 2 }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.1.11" }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "15129730-eb00-4db7-8db2-799566ccb2ef", - "properties": { - "YearServicedNum": 211, - "region": "strapis", - "kustomerTrackingId": "sahetwiac", - "kustomerSessionId": "63nsa22" - }, - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "locale": "en-US", - "integrations": { "All": true }, - "originalTimestamp": "2021-01-03T17:02:53.195Z" - }, - "metadata": { - "jobId": 2 - }, - "destination": { - "Config": { - "baseEndpoint": "https://api.prod2.kustomerapp.com", - "apiKey": "dummyApiKey", - "genericPage": false, - "genericScreen": false - } - } - } -] diff --git a/test/__tests__/data/kustomer_router_output.json b/test/__tests__/data/kustomer_router_output.json deleted file mode 100644 index 0d3470f74a..0000000000 --- a/test/__tests__/data/kustomer_router_output.json +++ /dev/null @@ -1,184 +0,0 @@ -[ - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.kustomerapp.com/v1/customers", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "name": "test Rudderlabs", - "externalId": "testc", - "username": "testc47", - "company": "Rudderstack", - "signedUpAt": "2015-04-17T12:37:42.146Z", - "lastActivityAt": "2016-04-17T12:37:42.146Z", - "lastCustomerActivityAt": "2017-04-17T12:37:42.146Z", - "lastSeenAt": "2017-04-17T12:37:42.146Z", - "avatarUrl": "https://homepages.cae.wisc.edu/~ece533/images/boat.png", - "gender": "m", - "tags": ["happy", "satisfied"], - "locale": "en-US", - "socials": [ - { - "verified": true, - "userid": "100", - "type": "twitter", - "username": "@testc", - "url": "http://twitter.com/testc" - }, - { - "verified": false, - "userid": "200", - "type": "facebook", - "username": "testc", - "url": "http://facebook.com/testc" - } - ], - "birthdayAt": "2005-01-01T23:28:56.782Z", - "emails": [ - { - "type": "home", - "email": "test@rudderstack.com" - } - ], - "phones": [ - { - "type": "home", - "phone": "+12345578900" - } - ], - "urls": [ - { - "url": "www.mattertoast873.com" - } - ], - "locations": [ - { - "type": "home", - "address": "24 Dovers Lane Miami Florida 1890001" - } - ] - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "jobId": 1 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "genericPage": false, - "genericScreen": false - } - } - }, - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.kustomerapp.com/v1/tracking/identityEvent", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "identity": { - "externalId": "user@doe" - }, - "event": { - "name": "Tracking-Weekender", - "sessionId": "63nsa22", - "trackingId": "sahetwiac", - "meta": { - "YearServicedNum": 211, - "region": "strapis" - } - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "jobId": 2 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "apiKey": "dummyApiKey", - "genericPage": false, - "genericScreen": false - } - } - }, - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.prod2.kustomerapp.com/v1/tracking/identityEvent", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "identity": { - "externalId": "user@doe" - }, - "event": { - "name": "Tracking-Weekender", - "sessionId": "63nsa22", - "trackingId": "sahetwiac", - "meta": { - "YearServicedNum": 211, - "region": "strapis" - } - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "jobId": 2 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "baseEndpoint": "https://api.prod2.kustomerapp.com", - "apiKey": "dummyApiKey", - "genericPage": false, - "genericScreen": false - } - } - } -] diff --git a/test/__tests__/data/mailchimp_batch_input.json b/test/__tests__/data/mailchimp_batch_input.json deleted file mode 100644 index ea382b1d89..0000000000 --- a/test/__tests__/data/mailchimp_batch_input.json +++ /dev/null @@ -1,225 +0,0 @@ -[ - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "apiKey-dummyApiKey", - "audienceId": "1232yyqw22", - "datacenterId": "us20" - }, - "Enabled": true, - "Transformations": [] - }, - "metadata": { - "jobId": 2 - }, - "message": { - "anonymousId": "userId12345", - "channel": "web", - "context": { - "mappedToDestination": true, - "externalId": [ - { - "identifierType": "email_address", - "id": "bob.dole@initech.com", - "type": "audience" - } - ], - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36" - }, - "integrations": { - "All": true - }, - "traits": { - "merge_fields": { - "FIRSTNAME": "Bob" - }, - "status": "subscribed" - }, - "messageId": "21e475b2-3694-477b-afb6-5b94a81aac21", - "originalTimestamp": "2019-11-15T10:22:32Z", - "receivedAt": "2019-11-15T15:52:37+05:30", - "request_ip": "[::1]:62921", - "sentAt": "2019-11-15T10:22:37Z", - "source_id": "1TdhTcwsUVOeEMWyPUpQIgF3pYr", - "timestamp": "2019-11-15T15:52:32+05:30", - "type": "identify", - "userId": "userId12345" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "apiKey-dummyApiKey", - "audienceId": "1232yyqw22", - "datacenterId": "us20" - }, - "Enabled": true, - "Transformations": [] - }, - "metadata": { - "jobId": 3 - }, - "message": { - "type": "identify", - "traits": { - "status": "subscribed" - }, - "userId": "emrichardson820+22822@gmail.com", - "channel": "sources", - "context": { - "sources": { - "job_id": "24c5HJxHomh6YCngEOCgjS5r1KX/Syncher", - "task_id": "vw_rs_mailchimp_mocked_hg_data", - "version": "v1.8.1", - "batch_id": "f252c69d-c40d-450e-bcd2-2cf26cb62762", - "job_run_id": "c8el40l6e87v0c4hkbl0", - "task_run_id": "c8el40l6e87v0c4hkblg" - }, - "externalId": [ - { - "id": "emrichardson820+22822@gmail.com", - "type": "MAILCHIMP-92e1f1ad2c", - "identifierType": "email_address" - } - ], - "mappedToDestination": "true" - }, - "recordId": "1", - "rudderId": "4d5d0ed0-9db8-41cc-9bb0-a032f6bfa97a", - "messageId": "b3bee036-fc26-4f6d-9867-c17f85708a82" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "apiKey-dummyApiKey", - "audienceId": "1232yyqw22", - "datacenterId": "us20" - }, - "Enabled": true, - "Transformations": [] - }, - "metadata": { - "jobId": 4 - }, - "message": { - "type": "identify", - "traits": { - "status": "subscribed" - }, - "userId": "emrichardson820+22822@gmail.com", - "channel": "sources", - "context": { - "sources": { - "job_id": "24c5HJxHomh6YCngEOCgjS5r1KX/Syncher", - "task_id": "vw_rs_mailchimp_mocked_hg_data", - "version": "v1.8.1", - "batch_id": "f252c69d-c40d-450e-bcd2-2cf26cb62762", - "job_run_id": "c8el40l6e87v0c4hkbl0", - "task_run_id": "c8el40l6e87v0c4hkblg" - }, - "externalId": [ - { - "id": "emrichardson820+22822@gmail.com", - "type": "MAILCHIMP-92e1f1ad2c", - "identifierType": "email_address" - } - ], - "mappedToDestination": "true" - }, - "recordId": "1", - "rudderId": "4d5d0ed0-9db8-41cc-9bb0-a032f6bfa97a", - "messageId": "b3bee036-fc26-4f6d-9867-c17f85708a82" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "apiKey-dummyApiKey", - "audienceId": "1232yyqw22", - "datacenterId": "us20" - }, - "Enabled": true, - "Transformations": [] - }, - "metadata": { - "jobId": 5 - }, - "message": { - "type": "identify", - "traits": { - "status": "subscrib" - }, - "userId": "emrichardson820+22822@gmail.com", - "channel": "sources", - "context": { - "sources": { - "job_id": "24c5HJxHomh6YCngEOCgjS5r1KX/Syncher", - "task_id": "vw_rs_mailchimp_mocked_hg_data", - "version": "v1.8.1", - "batch_id": "f252c69d-c40d-450e-bcd2-2cf26cb62762", - "job_run_id": "c8el40l6e87v0c4hkbl0", - "task_run_id": "c8el40l6e87v0c4hkblg" - }, - "externalId": [ - { - "id": "emrichardson820+22822@gmail.com", - "type": "MAILCHIMP-92e1f1ad2c", - "identifierType": "email_address" - } - ], - "mappedToDestination": "true" - }, - "recordId": "1", - "rudderId": "4d5d0ed0-9db8-41cc-9bb0-a032f6bfa97a", - "messageId": "b3bee036-fc26-4f6d-9867-c17f85708a82" - } - } -] diff --git a/test/__tests__/data/mailchimp_batch_output.json b/test/__tests__/data/mailchimp_batch_output.json deleted file mode 100644 index fac07b6a46..0000000000 --- a/test/__tests__/data/mailchimp_batch_output.json +++ /dev/null @@ -1,100 +0,0 @@ -[ - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://us20.api.mailchimp.com/3.0/lists/1232yyqw22?skip_merge_validation=false&skip_duplicate_check=false", - "headers": { - "Content-Type": "application/json", - "Authorization": "Basic YXBpS2V5OmFwaUtleS1kdW1teUFwaUtleQ==" - }, - "params": {}, - "body": { - "JSON": { - "members": [ - { - "merge_fields": { - "FIRSTNAME": "Bob" - }, - "status": "subscribed", - "email_address": "bob.dole@initech.com" - }, - { - "status": "subscribed", - "email_address": "emrichardson820+22822@gmail.com" - }, - { - "status": "subscribed", - "email_address": "emrichardson820+22822@gmail.com" - } - ], - "update_existing": true - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "jobId": 2 - }, - { - "jobId": 3 - }, - { - "jobId": 4 - } - ], - "batched": true, - "statusCode": 200, - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "apiKey-dummyApiKey", - "audienceId": "1232yyqw22", - "datacenterId": "us20" - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "apiKey-dummyApiKey", - "audienceId": "1232yyqw22", - "datacenterId": "us20" - }, - "Enabled": true, - "Transformations": [] - }, - "metadata": [ - { - "jobId": 5 - } - ], - "batched": false, - "statusCode": 400, - "error": "The status must be one of [subscribed, unsubscribed, cleaned, pending, transactional]", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation" - } - } -] diff --git a/test/__tests__/data/mailchimp_input.json b/test/__tests__/data/mailchimp_input.json deleted file mode 100644 index 20b7ba0fc0..0000000000 --- a/test/__tests__/data/mailchimp_input.json +++ /dev/null @@ -1,1299 +0,0 @@ -[ - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "dummyApiKey", - "audienceId": "aud111", - "datacenterId": "usXX", - "enableMergeFields": true - }, - "Enabled": true, - "Transformations": [] - }, - "message": { - "anonymousId": "userId12345", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "anonymousId": "userId12345", - "email": "bob.dole@initech.com", - "firstName": "Bob", - "lastName": "Dole", - "zip": "123", - "state": "test", - "city": "test", - "addressLine1": "test", - "birthday": "2000-05-06" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36" - }, - "integrations": { - "All": true - }, - "messageId": "21e475b2-3694-477b-afb6-5b94a81aac21", - "originalTimestamp": "2019-11-15T10:22:32Z", - "receivedAt": "2019-11-15T15:52:37+05:30", - "request_ip": "[::1]:62921", - "sentAt": "2019-11-15T10:22:37Z", - "source_id": "1TdhTcwsUVOeEMWyPUpQIgF3pYr", - "timestamp": "2019-11-15T15:52:32+05:30", - "type": "identify", - "userId": "userId12345" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "dummyApiKey", - "audienceId": "aud111", - "datacenterId": "usXX", - "enableMergeFields": true - }, - "Enabled": true, - "Transformations": [] - }, - "message": { - "anonymousId": "userId12345", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "anonymousId": "userId12345", - "email": "bob.dole@initech.com" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36" - }, - "integrations": { - "MailChimp": { - "subscriptionStatus": "subscribed" - } - }, - "messageId": "6d1f3ca8-e2d0-4d34-9926-44596171af0c", - "originalTimestamp": "2019-11-15T10:26:53Z", - "receivedAt": "2019-11-15T15:56:58+05:30", - "request_ip": "[::1]:62921", - "sentAt": "2019-11-15T10:26:58Z", - "source_id": "1TdhTcwsUVOeEMWyPUpQIgF3pYr", - "timestamp": "2019-11-15T15:56:53+05:30", - "type": "identify", - "userId": "userId12345" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "Titli Test", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "apiKey-dummyApiKey", - "audienceId": "aud111", - "datacenterId": "usXX" - }, - "Enabled": true, - "Transformations": [] - }, - "message": { - "type": "identify", - "sentAt": "2021-05-18T06:58:57.186Z", - "userId": "test.rudderlabs@yara.com", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.18", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "https://app.rudderstack.com/sources/1qHR2Qzd894ievNGc4aBHmjltLD", - "path": "/sources/1qHR2Qzd894ievNGc4aBHmjltLD", - "title": "RudderStack", - "search": "", - "tab_url": "https://app.rudderstack.com/sources/1qHR2Qzd894ievNGc4aBHmjltLD", - "referrer": "$direct", - "initial_referrer": "https://www.google.com/", - "referring_domain": "", - "initial_referring_domain": "www.google.com" - }, - "locale": "en-US", - "screen": { - "width": 1792, - "height": 1120, - "density": 2 - }, - "traits": { - "name": "test rudderlabs", - "email": "test.rudderlabs@yara.com", - "userId": "1sWVaQTxoVwjvShC0295E6OqMaP", - "first_login": false, - "workspaceId": "1jWrHYPjNGSHbvKwzow0ZFPIQll", - "account_type": "invited" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.18" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36" - }, - "rudderId": "6d612dda-9c8c-4062-9d09-af9425b846ce", - "messageId": "c6d49688-89f2-45cf-b061-0ae3c212a4e5", - "timestamp": "2021-05-18T06:58:57.811Z", - "receivedAt": "2021-05-18T06:58:57.812Z", - "request_ip": "122.172.221.51", - "anonymousId": "6914679f-fd34-45ef-86e0-4930e6e8b91a", - "integrations": { - "Salesforce": true - }, - "originalTimestamp": "2021-05-18T06:58:57.185Z" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "Titli Test", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "dummyApiKey", - "audienceId": "aud111", - "datacenterId": "usXX" - }, - "Enabled": true, - "Transformations": [] - }, - "message": { - "type": "page", - "sentAt": "2021-05-18T07:02:17.675Z", - "userId": "", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.18", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "https://app.rudderstack.com/signup?type=freetrial", - "path": "/signup", - "title": "", - "search": "?type=freetrial", - "tab_url": "https://app.rudderstack.com/signup?type=freetrial", - "referrer": "https://rudderstack.medium.com/kafka-vs-postgresql-how-we-implemented-our-queueing-system-using-postgresql-ec128650e3e", - "initial_referrer": "https://rudderstack.medium.com/kafka-vs-postgresql-how-we-implemented-our-queueing-system-using-postgresql-ec128650e3e", - "referring_domain": "rudderstack.medium.com", - "initial_referring_domain": "rudderstack.medium.com" - }, - "locale": "en-GB", - "screen": { - "density": 2 - }, - "traits": {}, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.18" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36" - }, - "rudderId": "4dbe224c-6aea-4d89-8da6-09d27c0d2908", - "messageId": "72df8cb0-54ab-417c-8e87-e97e9d339feb", - "timestamp": "2021-05-18T07:02:18.566Z", - "properties": { - "url": "https://app.rudderstack.com/signup?type=freetrial", - "path": "/signup", - "title": "", - "search": "?type=freetrial", - "tab_url": "https://app.rudderstack.com/signup?type=freetrial", - "referrer": "https://rudderstack.medium.com/kafka-vs-postgresql-how-we-implemented-our-queueing-system-using-postgresql-ec128650e3e", - "initial_referrer": "https://rudderstack.medium.com/kafka-vs-postgresql-how-we-implemented-our-queueing-system-using-postgresql-ec128650e3e", - "referring_domain": "rudderstack.medium.com", - "initial_referring_domain": "rudderstack.medium.com" - }, - "receivedAt": "2021-05-18T07:02:18.566Z", - "request_ip": "162.44.150.11", - "anonymousId": "58ec7b39-48f1-4d83-9d45-a48c64f96fa0", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-05-18T07:02:17.675Z" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "dummyApiKey", - "audienceId": "aud111", - "datacenterId": "usXX" - }, - "Enabled": true, - "Transformations": [] - }, - "message": { - "anonymousId": "userId12345", - "channel": "web", - "context": { - "mappedToDestination": true, - "externalId": [ - { - "identifierType": "email_address", - "id": "bob.dole@initech.com", - "type": "audience" - } - ], - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36" - }, - "integrations": { - "All": true - }, - "traits": { - "merge_fields": { - "FIRSTNAME": "Bob" - }, - "status": "subscribed" - }, - "messageId": "21e475b2-3694-477b-afb6-5b94a81aac21", - "originalTimestamp": "2019-11-15T10:22:32Z", - "receivedAt": "2019-11-15T15:52:37+05:30", - "request_ip": "[::1]:62921", - "sentAt": "2019-11-15T10:22:37Z", - "source_id": "1TdhTcwsUVOeEMWyPUpQIgF3pYr", - "timestamp": "2019-11-15T15:52:32+05:30", - "type": "identify", - "userId": "userId12345" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "dummyApiKey", - "audienceId": "aud111", - "datacenterId": "usXX" - }, - "Enabled": true, - "Transformations": [] - }, - "message": { - "type": "identify", - "traits": { - "status": "subscri" - }, - "userId": "emrichardson820+22822@gmail.com", - "channel": "sources", - "context": { - "sources": { - "job_id": "24c5HJxHomh6YCngEOCgjS5r1KX/Syncher", - "task_id": "vw_rs_mailchimp_mocked_hg_data", - "version": "v1.8.1", - "batch_id": "f252c69d-c40d-450e-bcd2-2cf26cb62762", - "job_run_id": "c8el40l6e87v0c4hkbl0", - "task_run_id": "c8el40l6e87v0c4hkblg" - }, - "externalId": [ - { - "id": "emrichardson820+22822@gmail.com", - "type": "MAILCHIMP-92e1f1ad2c", - "identifierType": "email_address" - } - ], - "mappedToDestination": "true" - }, - "recordId": "1", - "rudderId": "4d5d0ed0-9db8-41cc-9bb0-a032f6bfa97a", - "messageId": "b3bee036-fc26-4f6d-9867-c17f85708a82" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "dummyApiKey", - "audienceId": "aud111", - "datacenterId": "usXX" - }, - "Enabled": true, - "Transformations": [] - }, - "message": { - "anonymousId": "userId12345", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36" - }, - "integrations": { - "All": true - }, - "messageId": "21e475b2-3694-477b-afb6-5b94a81aac21", - "originalTimestamp": "2019-11-15T10:22:32Z", - "receivedAt": "2019-11-15T15:52:37+05:30", - "request_ip": "[::1]:62921", - "sentAt": "2019-11-15T10:22:37Z", - "source_id": "1TdhTcwsUVOeEMWyPUpQIgF3pYr", - "timestamp": "2019-11-15T15:52:32+05:30", - "type": "identify", - "userId": "userId12345" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "dummyApiKey", - "audienceId": "aud112", - "datacenterId": "usXX" - }, - "Enabled": true, - "Transformations": [] - }, - "message": { - "anonymousId": "userId12345", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "email": "jhon@gmail.com" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36" - }, - "integrations": { - "All": true - }, - "messageId": "21e475b2-3694-477b-afb6-5b94a81aac21", - "originalTimestamp": "2019-11-15T10:22:32Z", - "receivedAt": "2019-11-15T15:52:37+05:30", - "request_ip": "[::1]:62921", - "sentAt": "2019-11-15T10:22:37Z", - "source_id": "1TdhTcwsUVOeEMWyPUpQIgF3pYr", - "timestamp": "2019-11-15T15:52:32+05:30", - "type": "identify", - "userId": "userId12345" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "dummyApiKey", - "audienceId": "aud111", - "datacenterId": "usXX" - }, - "Enabled": true, - "Transformations": [] - }, - "message": { - "anonymousId": "userId12345", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "email": "bob.dole@initech.com" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36" - }, - "integrations": { - "All": true - }, - "messageId": "21e475b2-3694-477b-afb6-5b94a81aac21", - "originalTimestamp": "2019-11-15T10:22:32Z", - "receivedAt": "2019-11-15T15:52:37+05:30", - "request_ip": "[::1]:62921", - "sentAt": "2019-11-15T10:22:37Z", - "source_id": "1TdhTcwsUVOeEMWyPUpQIgF3pYr", - "timestamp": "2019-11-15T15:52:32+05:30", - "type": "identify", - "userId": "userId12345" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "dummyApiKey", - "audienceId": "aud111", - "datacenterId": "usXX" - }, - "Enabled": true, - "Transformations": [] - }, - "message": { - "anonymousId": "userId12345", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "anonymousId": "userId12345", - "email": "bob.dole@initech.com" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36" - }, - "integrations": { - "MailChimp": { - "subscriptionStatus": "subscribed" - } - }, - "messageId": "6d1f3ca8-e2d0-4d34-9926-44596171af0c", - "originalTimestamp": "2019-11-15T10:26:53Z", - "receivedAt": "2019-11-15T15:56:58+05:30", - "request_ip": "[::1]:62921", - "sentAt": "2019-11-15T10:26:58Z", - "source_id": "1TdhTcwsUVOeEMWyPUpQIgF3pYr", - "timestamp": "2019-11-15T15:56:53+05:30", - "type": "identify", - "userId": "userId12345" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "", - "audienceId": "aud111", - "datacenterId": "usXX" - }, - "Enabled": true, - "Transformations": [] - }, - "message": { - "anonymousId": "userId12345", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "anonymousId": "test-rudderlabs", - "email": "test-rudderlabs-test@initech.com", - "firstName": "Test", - "lastName": "Rudderlabs" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36" - }, - "integrations": { - "All": true - }, - "messageId": "21e475b2-3694-477b-afb6-5b94a81aac21", - "originalTimestamp": "2019-11-15T10:22:32Z", - "receivedAt": "2019-11-15T15:52:37+05:30", - "request_ip": "[::1]:62921", - "sentAt": "2019-11-15T10:22:37Z", - "source_id": "1TdhTcwsUVOeEMWyPUpQIgF3pYr", - "timestamp": "2019-11-15T15:52:32+05:30", - "type": "identify", - "userId": "userId12345" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "dummyApiKey", - "datacenterId": "usXX" - }, - "Enabled": true, - "Transformations": [] - }, - "message": { - "anonymousId": "userId12345", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "anonymousId": "test-rudderlabs", - "email": "test-rudderlabs-test@initech.com", - "firstName": "Test", - "lastName": "Rudderlabs" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36" - }, - "integrations": { - "All": true - }, - "messageId": "21e475b2-3694-477b-afb6-5b94a81aac21", - "originalTimestamp": "2019-11-15T10:22:32Z", - "receivedAt": "2019-11-15T15:52:37+05:30", - "request_ip": "[::1]:62921", - "sentAt": "2019-11-15T10:22:37Z", - "source_id": "1TdhTcwsUVOeEMWyPUpQIgF3pYr", - "timestamp": "2019-11-15T15:52:32+05:30", - "type": "identify", - "userId": "userId12345" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "dummyApiKey", - "audienceId": "aud111", - "datacenterId": "" - }, - "Enabled": true, - "Transformations": [] - }, - "message": { - "anonymousId": "userId12345", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "anonymousId": "test-rudderlabs", - "email": "test-rudderlabs-test@initech.com", - "firstName": "Test", - "lastName": "Rudderlabs" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36" - }, - "integrations": { - "All": true - }, - "messageId": "21e475b2-3694-477b-afb6-5b94a81aac21", - "originalTimestamp": "2019-11-15T10:22:32Z", - "receivedAt": "2019-11-15T15:52:37+05:30", - "request_ip": "[::1]:62921", - "sentAt": "2019-11-15T10:22:37Z", - "source_id": "1TdhTcwsUVOeEMWyPUpQIgF3pYr", - "timestamp": "2019-11-15T15:52:32+05:30", - "type": "identify", - "userId": "userId12345" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "dummyApiKey", - "audienceId": "aud111", - "datacenterId": "usXX" - }, - "Enabled": true, - "Transformations": [] - }, - "message": { - "anonymousId": "userId12345", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "anonymousId": "test-rudderlabs", - "email": "test-rudderlabs-test@initech.com", - "firstName": "Test", - "lastName": "Rudderlabs" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36" - }, - "integrations": { - "All": true - }, - "messageId": "21e475b2-3694-477b-afb6-5b94a81aac21", - "originalTimestamp": "2019-11-15T10:22:32Z", - "receivedAt": "2019-11-15T15:52:37+05:30", - "request_ip": "[::1]:62921", - "sentAt": "2019-11-15T10:22:37Z", - "source_id": "1TdhTcwsUVOeEMWyPUpQIgF3pYr", - "timestamp": "2019-11-15T15:52:32+05:30", - "type": "group", - "userId": "userId12345" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "dummyApiKey", - "audienceId": "aud111", - "datacenterId": "usXX" - }, - "Enabled": true, - "Transformations": [] - }, - "message": { - "anonymousId": "userId12345", - "channel": "web", - "context": { - "traits": { - "anonymousId": "userId12345", - "email": "bob.dole@initech.com" - } - }, - "properties": { - "brand": "Aster", - "product": "Garments" - }, - "messageId": "6d1f3ca8-e2d0-4d34-9926-44596171af0c", - "originalTimestamp": "2019-11-15T10:26:53Z", - "receivedAt": "2019-11-15T15:56:58+05:30", - "sentAt": "2019-11-15T10:26:58Z", - "source_id": "1TdhTcwsUVOeEMWyPUpQIgF3pYr", - "timestamp": "2019-11-15T15:56:53+05:30", - "type": "track", - "event": "local testing", - "userId": "userId12345" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "dummyApiKey", - "audienceId": "aud111", - "datacenterId": "usXX" - }, - "Enabled": true, - "Transformations": [] - }, - "message": { - "anonymousId": "userId12345", - "channel": "web", - "context": { - "traits": { - "anonymousId": "userId12345", - "email": "bob.dole@initech.com" - } - }, - "properties": { - "brand": "Aster", - "product": "Garments", - "isSyncing": false - }, - "messageId": "6d1f3ca8-e2d0-4d34-9926-44596171af0c", - "originalTimestamp": "2019-11-15T10:26:53Z", - "receivedAt": "2019-11-15T15:56:58+05:30", - "sentAt": "2019-11-15T10:26:58Z", - "source_id": "1TdhTcwsUVOeEMWyPUpQIgF3pYr", - "timestamp": "2019-11-15T15:56:53+05:30", - "type": "track", - "event": "local testing", - "userId": "userId12345" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "dummyApiKey", - "audienceId": "aud111", - "datacenterId": "usXX" - }, - "Enabled": true, - "Transformations": [] - }, - "message": { - "anonymousId": "userId12345", - "channel": "web", - "context": { - "traits": { - "anonymousId": "userId12345" - } - }, - "messageId": "6d1f3ca8-e2d0-4d34-9926-44596171af0c", - "originalTimestamp": "2019-11-15T10:26:53Z", - "receivedAt": "2019-11-15T15:56:58+05:30", - "sentAt": "2019-11-15T10:26:58Z", - "source_id": "1TdhTcwsUVOeEMWyPUpQIgF3pYr", - "timestamp": "2019-11-15T15:56:53+05:30", - "type": "track", - "event": "local testing", - "userId": "userId12345" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "dummyApiKey", - "audienceId": "aud111", - "datacenterId": "usXX" - }, - "Enabled": true, - "Transformations": [] - }, - "message": { - "anonymousId": "userId12345", - "channel": "web", - "context": { - "traits": { - "anonymousId": "userId12345", - "email": "bob.dole@initech.com" - } - }, - "properties": { - "brand": "Aster", - "product": "Garments", - "isSyncing": false - }, - "messageId": "6d1f3ca8-e2d0-4d34-9926-44596171af0c", - "originalTimestamp": "2019-11-15T10:26:53Z", - "receivedAt": "2019-11-15T15:56:58+05:30", - "sentAt": "2019-11-15T10:26:58Z", - "source_id": "1TdhTcwsUVOeEMWyPUpQIgF3pYr", - "timestamp": "2019-11-15T15:56:53+05:30", - "type": "track", - "userId": "userId12345" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "dummyApiKey", - "audienceId": "aud111", - "datacenterId": "usXX" - }, - "Enabled": true, - "Transformations": [] - }, - "message": { - "anonymousId": "userId12345", - "channel": "web", - "context": { - "traits": { - "anonymousId": "userId12345", - "email": "bob.dole@initech.com" - } - }, - "messageId": "6d1f3ca8-e2d0-4d34-9926-44596171af0c", - "originalTimestamp": "2019-11-15T10:26:53Z", - "receivedAt": "2019-11-15T15:56:58+05:30", - "sentAt": "2019-11-15T10:26:58Z", - "source_id": "1TdhTcwsUVOeEMWyPUpQIgF3pYr", - "timestamp": "2019-11-15T15:56:53+05:30", - "type": "track", - "event": "local testing", - "userId": "userId12345" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "dummyApiKey", - "audienceId": "aud111", - "datacenterId": "usXX" - }, - "Enabled": true, - "Transformations": [] - }, - "message": { - "anonymousId": "userId12345", - "channel": "web", - "context": { - "traits": { - "anonymousId": "userId12345", - "email": "bob.dole@initech.com" - } - }, - "properties": { - "brand": "Aster", - "product": "Garments", - "isSyncing": false, - "products": [ - { - "product_id": "123", - "price": "14" - }, - { - "product_id": "123", - "price": 14 - } - ], - "purchased": false - }, - "messageId": "6d1f3ca8-e2d0-4d34-9926-44596171af0c", - "originalTimestamp": "2019-11-15T10:26:53Z", - "receivedAt": "2019-11-15T15:56:58+05:30", - "sentAt": "2019-11-15T10:26:58Z", - "source_id": "1TdhTcwsUVOeEMWyPUpQIgF3pYr", - "timestamp": "2019-11-15T15:56:53+05:30", - "type": "track", - "event": "local testing", - "userId": "userId12345" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "dummyApiKey", - "audienceId": "aud111", - "datacenterId": "usXX" - }, - "Enabled": true, - "Transformations": [] - }, - "message": { - "anonymousId": "userId12345", - "channel": "web", - "context": { - "traits": { - "anonymousId": "userId12345", - "email": "bob.dole@initech.com" - } - }, - "properties": { - "brand": "Aster", - "product": "Garments", - "isSyncing": false, - "products": [ - { - "product_id": "123", - "price": "14" - }, - { - "product_id": "123", - "price": 14 - } - ], - "purchased": false - }, - "messageId": "6d1f3ca8-e2d0-4d34-9926-44596171af0c", - "originalTimestamp": "2019-11-15T10:26:53Z", - "receivedAt": "2019-11-15T15:56:58+05:30", - "sentAt": "2019-11-15T10:26:58Z", - "source_id": "1TdhTcwsUVOeEMWyPUpQIgF3pYr", - "timestamp": "2019-11-15T15:56:53+05:30", - "type": "track", - "event": 22, - "userId": "userId12345" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "dummyApiKey", - "audienceId": "aud111", - "datacenterId": "usXX" - }, - "Enabled": true, - "Transformations": [] - }, - "message": { - "anonymousId": "userId12345", - "channel": "web", - "context": { - "traits": { - "anonymousId": "userId12345", - "email": "bob.dole@initech.com" - } - }, - "properties": { - "brand": "Aster", - "product": "Garments", - "isSyncing": false, - "products": [ - { - "product_id": "123", - "price": "14" - }, - { - "product_id": "123", - "price": 14 - } - ], - "purchased": false - }, - "messageId": "6d1f3ca8-e2d0-4d34-9926-44596171af0c", - "originalTimestamp": "2019-11-15T10:26:53Z", - "receivedAt": "2019-11-15T15:56:58+05:30", - "sentAt": "2019-11-15T10:26:58Z", - "source_id": "1TdhTcwsUVOeEMWyPUpQIgF3pYr", - "timestamp": "2019-11-15T15:56:53+05:30", - "type": "track", - "event": "E", - "userId": "userId12345" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "dummyApiKey", - "audienceId": "aud111", - "datacenterId": "usXX" - }, - "Enabled": true, - "Transformations": [] - }, - "message": { - "anonymousId": "userId12345", - "channel": "web", - "context": { - "traits": { - "anonymousId": "userId12345", - "email": "bob.dole@initech.com" - } - }, - "properties": { - "brand": "Aster", - "product": "Garments", - "isSyncing": false, - "products": [ - { - "product_id": "123", - "price": "14" - }, - { - "product_id": "123", - "price": 14 - } - ], - "purchased": false - }, - "messageId": "6d1f3ca8-e2d0-4d34-9926-44596171af0c", - "originalTimestamp": "2019-11-15T10:26:53Z", - "receivedAt": "2019-11-15T15:56:58+05:30", - "sentAt": "2019-11-15T10:26:58Z", - "source_id": "1TdhTcwsUVOeEMWyPUpQIgF3pYr", - "timestamp": "2019-11-15T15:56:53+05:30", - "type": "track", - "event": "Event Name more than 30 characters abcdefghijklmno", - "userId": "userId12345" - } - } -] diff --git a/test/__tests__/data/mailchimp_output.json b/test/__tests__/data/mailchimp_output.json deleted file mode 100644 index e1a8384242..0000000000 --- a/test/__tests__/data/mailchimp_output.json +++ /dev/null @@ -1,498 +0,0 @@ -[ - { - "version": "1", - "type": "REST", - "method": "PUT", - "endpoint": "https://usXX.api.mailchimp.com/3.0/lists/aud111/members/48cd6232dc124497369f59c33d3eb4ab", - "headers": { - "Content-Type": "application/json", - "Authorization": "Basic YXBpS2V5OmR1bW15QXBpS2V5" - }, - "params": {}, - "body": { - "JSON": { - "merge_fields": { - "ADDRESS": { - "addr1": "test", - "city": "test", - "state": "test", - "zip": "123" - }, - "FNAME": "Bob", - "LNAME": "Dole", - "ANONYMOUSI": "userId12345", - "BIRTHDAY": "05/06" - }, - "email_address": "bob.dole@initech.com", - "status": "subscribed" - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "audienceId": "aud111" - }, - { - "version": "1", - "type": "REST", - "method": "PUT", - "endpoint": "https://usXX.api.mailchimp.com/3.0/lists/aud111/members/48cd6232dc124497369f59c33d3eb4ab", - "headers": { - "Content-Type": "application/json", - "Authorization": "Basic YXBpS2V5OmR1bW15QXBpS2V5" - }, - "params": {}, - "body": { - "JSON": { - "status": "subscribed", - "email_address": "bob.dole@initech.com", - "merge_fields": { - "ANONYMOUSI": "userId12345" - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "audienceId": "aud111" - }, - { - "error": "User does not have access to the requested operation", - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "Titli Test", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "apiKey-dummyApiKey", - "audienceId": "aud111", - "datacenterId": "usXX" - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "Titli Test", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "apiKey", - "audienceId": "aud111", - "datacenterId": "usXX" - }, - "Enabled": true, - "Transformations": [] - }, - "error": "message type page is not supported" - }, - { - "version": "1", - "type": "REST", - "method": "PUT", - "endpoint": "https://usXX.api.mailchimp.com/3.0/lists/aud111/members/48cd6232dc124497369f59c33d3eb4ab", - "headers": { - "Content-Type": "application/json", - "Authorization": "Basic YXBpS2V5OmR1bW15QXBpS2V5" - }, - "params": {}, - "body": { - "JSON": { - "merge_fields": { - "FIRSTNAME": "Bob" - }, - "status": "subscribed", - "email_address": "bob.dole@initech.com" - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "audienceId": "aud111" - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "94f71917d8522770c97449b0c90caa4c-usXX", - "audienceId": "aud111", - "datacenterId": "usXX" - }, - "Enabled": true, - "Transformations": [] - }, - "error": "The status must be one of [subscribed, unsubscribed, cleaned, pending, transactional]" - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "dummyApiKey", - "audienceId": "ff21810ddc", - "datacenterId": "us14" - }, - "Enabled": true, - "Transformations": [] - }, - "statusCode": 400, - "error": "Email is required for identify", - "statTags": { - "destination": "mailchimp", - "stage": "transform", - "scope": "exception" - } - }, - { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "status": "subscribed", - "email_address": "jhon@gmail.com" - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "PUT", - "params": {}, - "headers": { - "Content-Type": "application/json", - "Authorization": "Basic YXBpS2V5OmR1bW15QXBpS2V5" - }, - "audienceId": "aud112", - "version": "1", - "endpoint": "https://usXX.api.mailchimp.com/3.0/lists/aud112/members/7f3863b197eeff650876bb89eca08e57" - }, - { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "email_address": "bob.dole@initech.com", - "status": "subscribed" - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "PUT", - "params": {}, - "audienceId": "aud111", - "headers": { - "Content-Type": "application/json", - "Authorization": "Basic YXBpS2V5OmR1bW15QXBpS2V5" - }, - "version": "1", - "endpoint": "https://usXX.api.mailchimp.com/3.0/lists/aud111/members/48cd6232dc124497369f59c33d3eb4ab" - }, - { - "version": "1", - "type": "REST", - "method": "PUT", - "endpoint": "https://usXX.api.mailchimp.com/3.0/lists/aud111/members/48cd6232dc124497369f59c33d3eb4ab", - "headers": { - "Content-Type": "application/json", - "Authorization": "Basic YXBpS2V5OmR1bW15QXBpS2V5" - }, - "params": {}, - "body": { - "JSON": { - "status": "subscribed", - "email_address": "bob.dole@initech.com" - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "audienceId": "aud111" - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "", - "audienceId": "aud111", - "datacenterId": "usXX" - }, - "Enabled": true, - "Transformations": [] - }, - "error": "API Key not found. Aborting" - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "awesrdcfgvhbjnkkjhgf", - "datacenterId": "usXX" - }, - "Enabled": true, - "Transformations": [] - }, - "error": "Audience Id not found. Aborting" - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "dummyApiKey", - "audienceId": "aud111", - "datacenterId": "" - }, - "Enabled": true, - "Transformations": [] - }, - "error": "DataCenter Id not found. Aborting" - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "zesrxdthfcjg345yruikyhntbgrafvd", - "audienceId": "aud111", - "datacenterId": "usXX" - }, - "Enabled": true, - "Transformations": [] - }, - "error": "message type group is not supported" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://usXX.api.mailchimp.com/3.0/lists/aud111/members/48cd6232dc124497369f59c33d3eb4ab/events", - "headers": { - "Content-Type": "application/json", - "Authorization": "Basic YXBpS2V5OmR1bW15QXBpS2V5" - }, - "params": {}, - "body": { - "JSON": { - "name": "local_testing", - "occurred_at": "2019-11-15T10:26:53+00:00", - "properties": { - "brand": "Aster", - "product": "Garments" - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "audienceId": "aud111" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://usXX.api.mailchimp.com/3.0/lists/aud111/members/48cd6232dc124497369f59c33d3eb4ab/events", - "headers": { - "Content-Type": "application/json", - "Authorization": "Basic YXBpS2V5OmR1bW15QXBpS2V5" - }, - "params": {}, - "body": { - "JSON": { - "name": "local_testing", - "occurred_at": "2019-11-15T10:26:53+00:00", - "is_syncing": false, - "properties": { - "brand": "Aster", - "product": "Garments" - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "audienceId": "aud111" - }, - { - "error": "Email is required for track" - }, - { - "error": "Missing required value from \"event\"" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://usXX.api.mailchimp.com/3.0/lists/aud111/members/48cd6232dc124497369f59c33d3eb4ab/events", - "headers": { - "Content-Type": "application/json", - "Authorization": "Basic YXBpS2V5OmR1bW15QXBpS2V5" - }, - "params": {}, - "body": { - "JSON": { - "name": "local_testing", - "occurred_at": "2019-11-15T10:26:53+00:00" - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "audienceId": "aud111" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://usXX.api.mailchimp.com/3.0/lists/aud111/members/48cd6232dc124497369f59c33d3eb4ab/events", - "headers": { - "Content-Type": "application/json", - "Authorization": "Basic YXBpS2V5OmR1bW15QXBpS2V5" - }, - "params": {}, - "body": { - "JSON": { - "name": "local_testing", - "occurred_at": "2019-11-15T10:26:53+00:00", - "is_syncing": false, - "properties": { - "brand": "Aster", - "product": "Garments", - "products": "[{\"product_id\":\"123\",\"price\":\"14\"},{\"product_id\":\"123\",\"price\":14}]", - "purchased": "false" - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "audienceId": "aud111" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://usXX.api.mailchimp.com/3.0/lists/aud111/members/48cd6232dc124497369f59c33d3eb4ab/events", - "headers": { - "Content-Type": "application/json", - "Authorization": "Basic YXBpS2V5OmR1bW15QXBpS2V5" - }, - "params": {}, - "body": { - "JSON": { - "name": "22", - "occurred_at": "2019-11-15T10:26:53+00:00", - "is_syncing": false, - "properties": { - "brand": "Aster", - "product": "Garments", - "products": "[{\"product_id\":\"123\",\"price\":\"14\"},{\"product_id\":\"123\",\"price\":14}]", - "purchased": "false" - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "audienceId": "aud111" - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "dummyApiKey", - "audienceId": "ff21810ddc", - "datacenterId": "us14" - }, - "Enabled": true, - "Transformations": [] - }, - "statusCode": 400, - "error": "Event name should be between 2 and 30 characters", - "statTags": { - "destination": "mailchimp", - "stage": "transform", - "scope": "exception" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "dummyApiKey", - "audienceId": "ff21810ddc", - "datacenterId": "us14" - }, - "Enabled": true, - "Transformations": [] - }, - "statusCode": 400, - "error": "Event name should be between 2 and 30 characters", - "statTags": { - "destination": "mailchimp", - "stage": "transform", - "scope": "exception" - } - } -] diff --git a/test/__tests__/data/mailchimp_router_input.json b/test/__tests__/data/mailchimp_router_input.json deleted file mode 100644 index e3cdbdddf5..0000000000 --- a/test/__tests__/data/mailchimp_router_input.json +++ /dev/null @@ -1,347 +0,0 @@ -[ - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "apikey", - "audienceId": "aud111", - "datacenterId": "usXX", - "enableMergeFields": true - }, - "Enabled": true, - "Transformations": [] - }, - "metadata": { - "jobId": 2 - }, - "message": { - "anonymousId": "userId12345", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "anonymousId": "userId12345", - "email": "bob.dole@initech.com", - "firstName": "Bob", - "lastName": "Dole" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36" - }, - "integrations": { - "All": true - }, - "messageId": "21e475b2-3694-477b-afb6-5b94a81aac21", - "originalTimestamp": "2019-11-15T10:22:32Z", - "receivedAt": "2019-11-15T15:52:37+05:30", - "request_ip": "[::1]:62921", - "sentAt": "2019-11-15T10:22:37Z", - "source_id": "1TdhTcwsUVOeEMWyPUpQIgF3pYr", - "timestamp": "2019-11-15T15:52:32+05:30", - "type": "identify", - "userId": "userId12345" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "apikey", - "audienceId": "aud111", - "datacenterId": "usXX", - "enableMergeFields": true - }, - "Enabled": true, - "Transformations": [] - }, - "metadata": { - "jobId": 3 - }, - "message": { - "anonymousId": "userId12345", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "anonymousId": "userId12345", - "email": "bob.dole@initech.com" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36" - }, - "integrations": { - "MailChimp": { - "subscriptionStatus": "subscribed" - } - }, - "messageId": "6d1f3ca8-e2d0-4d34-9926-44596171af0c", - "originalTimestamp": "2019-11-15T10:26:53Z", - "receivedAt": "2019-11-15T15:56:58+05:30", - "request_ip": "[::1]:62921", - "sentAt": "2019-11-15T10:26:58Z", - "source_id": "1TdhTcwsUVOeEMWyPUpQIgF3pYr", - "timestamp": "2019-11-15T15:56:53+05:30", - "type": "identify", - "userId": "userId12345" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "apikey", - "audienceId": "aud111", - "datacenterId": "usXX", - "enableMergeFields": true - }, - "Enabled": true, - "Transformations": [] - }, - "metadata": { - "jobId": 4 - }, - "message": { - "anonymousId": "userId12345", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "anonymousId": "userId12345", - "email": "bob.dole@initech.com" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36" - }, - "integrations": { - "MailChimp": { - "subscriptionStatus": "subscrib" - } - }, - "messageId": "6d1f3ca8-e2d0-4d34-9926-44596171af0c", - "originalTimestamp": "2019-11-15T10:26:53Z", - "receivedAt": "2019-11-15T15:56:58+05:30", - "request_ip": "[::1]:62921", - "sentAt": "2019-11-15T10:26:58Z", - "source_id": "1TdhTcwsUVOeEMWyPUpQIgF3pYr", - "timestamp": "2019-11-15T15:56:53+05:30", - "type": "identify", - "userId": "userId12345" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "apikey", - "audienceId": "aud111", - "datacenterId": "usXX", - "enableMergeFields": true - }, - "Enabled": true, - "Transformations": [] - }, - "metadata": { - "jobId": 5 - }, - "message": { - "anonymousId": "userId12345", - "channel": "web", - "context": { - "traits": { - "anonymousId": "userId12345", - "email": "bob.dole@initech.com" - } - }, - "properties": { - "brand": "Aster", - "product": "Garments" - }, - "messageId": "6d1f3ca8-e2d0-4d34-9926-44596171af0c", - "originalTimestamp": "2019-11-15T10:26:53Z", - "receivedAt": "2019-11-15T15:56:58+05:30", - "sentAt": "2019-11-15T10:26:58Z", - "source_id": "1TdhTcwsUVOeEMWyPUpQIgF3pYr", - "timestamp": "2019-11-15T15:56:53+05:30", - "type": "track", - "event": "local testing", - "userId": "userId12345" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "apikey", - "audienceId": "aud111", - "datacenterId": "usXX", - "enableMergeFields": true - }, - "Enabled": true, - "Transformations": [] - }, - "metadata": { - "jobId": 6 - }, - "message": { - "anonymousId": "userId12345", - "channel": "web", - "context": { - "traits": { - "anonymousId": "userId12345", - "email": "bob.dole@initech.com" - } - }, - "properties": { - "brand": "Aster", - "product": "Garments", - "is_syncing": false - }, - "messageId": "6d1f3ca8-e2d0-4d34-9926-44596171af0c", - "originalTimestamp": "2019-11-15T10:26:53Z", - "receivedAt": "2019-11-15T15:56:58+05:30", - "sentAt": "2019-11-15T10:26:58Z", - "source_id": "1TdhTcwsUVOeEMWyPUpQIgF3pYr", - "timestamp": "2019-11-15T15:56:53+05:30", - "type": "track", - "userId": "userId12345" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "apikey", - "audienceId": "aud111", - "datacenterId": "usXX", - "enableMergeFields": true - }, - "Enabled": true, - "Transformations": [] - }, - "metadata": { - "jobId": 7 - }, - "message": { - "anonymousId": "userId12345", - "channel": "web", - "context": { - "traits": { - "anonymousId": "userId12345", - "email": "bob.dole@initech.com" - } - }, - "properties": { - "brand": "Aster", - "product": "Garments", - "isSyncing": false, - "products": [ - { - "product_id": "123", - "price": "14" - }, - { - "product_id": "123", - "price": 14 - } - ], - "purchased": false - }, - "messageId": "6d1f3ca8-e2d0-4d34-9926-44596171af0c", - "originalTimestamp": "2019-11-15T10:26:53Z", - "receivedAt": "2019-11-15T15:56:58+05:30", - "sentAt": "2019-11-15T10:26:58Z", - "source_id": "1TdhTcwsUVOeEMWyPUpQIgF3pYr", - "timestamp": "2019-11-15T15:56:53+05:30", - "type": "track", - "event": "local testing", - "userId": "userId12345" - } - } -] diff --git a/test/__tests__/data/mailchimp_router_output.json b/test/__tests__/data/mailchimp_router_output.json deleted file mode 100644 index 3a3eec40a9..0000000000 --- a/test/__tests__/data/mailchimp_router_output.json +++ /dev/null @@ -1,238 +0,0 @@ -[ - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://usXX.api.mailchimp.com/3.0/lists/aud111?skip_merge_validation=true&skip_duplicate_check=false", - "headers": { - "Content-Type": "application/json", - "Authorization": "Basic YXBpS2V5OmFwaWtleQ==" - }, - "params": {}, - "body": { - "JSON": { - "members": [ - { - "email_address": "bob.dole@initech.com", - "merge_fields": { - "FNAME": "Bob", - "LNAME": "Dole", - "ANONYMOUSI": "userId12345" - }, - "status": "subscribed" - }, - { - "email_address": "bob.dole@initech.com", - "merge_fields": { - "ANONYMOUSI": "userId12345" - }, - "status": "subscribed" - } - ], - "update_existing": true - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "jobId": 2 - }, - { - "jobId": 3 - } - ], - "batched": true, - "statusCode": 200, - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "apikey", - "audienceId": "aud111", - "datacenterId": "usXX", - "enableMergeFields": true - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://usXX.api.mailchimp.com/3.0/lists/aud111/members/48cd6232dc124497369f59c33d3eb4ab/events", - "headers": { - "Content-Type": "application/json", - "Authorization": "Basic YXBpS2V5OmFwaWtleQ==" - }, - "params": {}, - "body": { - "JSON": { - "name": "local_testing", - "occurred_at": "2019-11-15T10:26:53+00:00", - "properties": { - "brand": "Aster", - "product": "Garments" - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "audienceId": "aud111" - }, - "metadata": [ - { - "jobId": 5 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "apikey", - "audienceId": "aud111", - "datacenterId": "usXX", - "enableMergeFields": true - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://usXX.api.mailchimp.com/3.0/lists/aud111/members/48cd6232dc124497369f59c33d3eb4ab/events", - "headers": { - "Content-Type": "application/json", - "Authorization": "Basic YXBpS2V5OmFwaWtleQ==" - }, - "params": {}, - "body": { - "JSON": { - "name": "local_testing", - "occurred_at": "2019-11-15T10:26:53+00:00", - "is_syncing": false, - "properties": { - "brand": "Aster", - "product": "Garments", - "products": "[{\"product_id\":\"123\",\"price\":\"14\"},{\"product_id\":\"123\",\"price\":14}]", - "purchased": "false" - } - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {}, - "audienceId": "aud111" - }, - "metadata": [ - { - "jobId": 7 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "apikey", - "audienceId": "aud111", - "datacenterId": "usXX", - "enableMergeFields": true - }, - "Enabled": true, - "Transformations": [] - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "apikey", - "audienceId": "aud111", - "datacenterId": "usXX", - "enableMergeFields": true - }, - "Enabled": true, - "Transformations": [] - }, - "metadata": [ - { - "jobId": 6 - } - ], - "batched": false, - "statusCode": 400, - "error": "Missing required value from \"event\"", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation" - } - }, - { - "destination": { - "ID": "1Tdi0lpXwSVwXG1lcdP2pXHKrJ6", - "Name": "test-mc", - "DestinationDefinition": { - "ID": "1SujZGrVEPqYmpUJcV4vSl9tfxn", - "Name": "MC", - "DisplayName": "MailChimp" - }, - "Config": { - "apiKey": "apikey", - "audienceId": "aud111", - "datacenterId": "usXX", - "enableMergeFields": true - }, - "Enabled": true, - "Transformations": [] - }, - "metadata": [ - { - "jobId": 4 - } - ], - "batched": false, - "statusCode": 400, - "error": "The status must be one of [subscribed, unsubscribed, cleaned, pending, transactional]", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation" - } - } -] diff --git a/test/__tests__/data/marketo_input.json b/test/__tests__/data/marketo_input.json deleted file mode 100644 index 122525560e..0000000000 --- a/test/__tests__/data/marketo_input.json +++ /dev/null @@ -1,1157 +0,0 @@ -[ - { - "message": { - "channel": "sources", - "context": { - "externalId": [ - { - "id": "lynnanderson@smith.net", - "identifierType": "email", - "type": "MARKETO-new_user" - } - ], - "mappedToDestination": "true", - "sources": { - "batch_id": "f5f240d0-0acb-46e0-b043-57fb0aabbadd", - "job_id": "1zAj94bEy8komdqnYtSoDp0VmGs/Syncher", - "job_run_id": "c5tar6cqgmgmcjvupdhg", - "task_id": "tt_10_rows_check", - "task_run_id": "c5tar6cqgmgmcjvupdi0", - "version": "release.v1.6.8" - } - }, - "messageId": "2f052f7c-f694-4849-a7ed-a432f7ffa0a4", - "originalTimestamp": "2021-10-28T14:03:50.503Z", - "receivedAt": "2021-10-28T14:03:46.567Z", - "recordId": "8", - "request_ip": "10.1.94.92", - "rudderId": "c0f6843e-e3d6-4946-9752-fa339fbadef2", - "sentAt": "2021-10-28T14:03:50.503Z", - "timestamp": "2021-10-28T14:03:46.566Z", - "traits": { - "marketoGUID": "23", - "administrative_unit": "Minnesota", - "am_pm": "AM", - "boolean": true, - "firstname": "Jacqueline", - "pPower": "AM", - "userId": "Jacqueline" - }, - "type": "identify", - "userId": "lynnanderson@smith.net" - }, - "destination": { - "ID": "1zia9wKshXt80YksLmUdJnr7IHI", - "Name": "test_marketo", - "DestinationDefinition": { - "ID": "1iVQvTRMsPPyJzwol0ifH93QTQ6", - "Name": "MARKETO", - "DisplayName": "Marketo", - "Config": { - "destConfig": { - "defaultConfig": [] - }, - "excludeKeys": [], - "includeKeys": [], - "saveDestinationResponse": true, - "secretKeys": [], - "supportedMessageTypes": ["identify", "page", "screen", "track"], - "supportedSourceTypes": [ - "android", - "ios", - "web", - "unity", - "amp", - "cloud", - "warehouse", - "reactnative", - "flutter", - "cordova" - ], - "supportsVisualMapper": true, - "transformAt": "processor", - "transformAtV1": "processor" - }, - "ResponseRules": null - }, - "Config": { - "clientId": "marketo_client_id_success", - "clientSecret": "marketo_client_secret_success", - "accountId": "marketo_acct_id_success", - "rudderEventsMapping": [] - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": true - }, - "libraries": [], - "request": { - "query": {} - } - }, - { - "message": { - "anonymousId": "anon_id_success", - "channel": "mobile", - "context": { - "app": { - "build": "1", - "name": "TestAppName", - "namespace": "com.android.sample", - "version": "1.0" - }, - "device": { - "id": "anon_id_success", - "manufacturer": "Google", - "model": "Android SDK built for x86", - "name": "generic_x86", - "type": "android" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.1-beta.1" - }, - "locale": "en-US", - "network": { - "carrier": "Android", - "bluetooth": false, - "cellular": true, - "wifi": true - }, - "os": { - "name": "Android", - "version": "8.1.0" - }, - "screen": { - "density": 420, - "height": 1794, - "width": 1080 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "anon_id_success" - }, - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)" - }, - "event": "Product Clicked", - "integrations": { - "All": true - }, - "messageId": "id1", - "properties": { - "name": "Test Product" - }, - "originalTimestamp": "2020-12-17T21:00:59.176Z", - "type": "track", - "sentAt": "2020-03-12T09:05:03.421Z" - }, - "destination": { - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "Config": { - "accountId": "marketo_acct_id_success", - "clientId": "marketo_client_id_success", - "clientSecret": "marketo_client_secret_success", - "trackAnonymousEvents": true, - "customActivityPropertyMap": [ - { - "from": "name", - "to": "productName" - } - ], - "leadTraitMapping": [ - { - "from": "leadScore", - "to": "customLeadScore" - } - ], - "createIfNotExist": true, - "customActivityPrimaryKeyMap": [ - { - "from": "Product Clicked", - "to": "name" - } - ], - "customActivityEventMap": [ - { - "from": "Product Clicked", - "to": "100001" - } - ] - } - } - }, - { - "message": { - "anonymousId": "anon_id_success", - "channel": "mobile", - "context": { - "app": { - "build": "1", - "name": "TestAppName", - "namespace": "com.android.sample", - "version": "1.0" - }, - "device": { - "id": "anon_id_success", - "manufacturer": "Google", - "model": "Android SDK built for x86", - "name": "generic_x86", - "type": "android" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.1-beta.1" - }, - "locale": "en-US", - "network": { - "carrier": "Android", - "bluetooth": false, - "cellular": true, - "wifi": true - }, - "os": { - "name": "Android", - "version": "8.1.0" - }, - "screen": { - "density": 420, - "height": 1794, - "width": 1080 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "anon_id_success" - }, - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)" - }, - "event": "Product Clicked", - "integrations": { - "All": true - }, - "messageId": "id1", - "properties": { - "name": "Test Product", - "product_id": "prod_1" - }, - "originalTimestamp": "2020-12-17T21:00:59.176Z", - "type": "track", - "sentAt": "2020-12-17T21:00:59.176Z" - }, - "destination": { - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "Config": { - "accountId": "marketo_acct_id_success", - "clientId": "marketo_client_id_success", - "clientSecret": "marketo_client_secret_success", - "trackAnonymousEvents": true, - "customActivityPropertyMap": [ - { - "from": "name", - "to": "productName" - }, - { - "from": "product_id", - "to": "productId" - } - ], - "leadTraitMapping": [ - { - "from": "leadScore", - "to": "customLeadScore" - } - ], - "createIfNotExist": true, - "rudderEventsMapping": [ - { - "event": "Product Clicked", - "marketoPrimarykey": "name", - "marketoActivityId": "100001" - } - ] - } - } - }, - { - "message": { - "anonymousId": "anon_id_success", - "channel": "mobile", - "context": { - "app": { - "build": "1", - "name": "TestAppName", - "namespace": "com.android.sample", - "version": "1.0" - }, - "device": { - "id": "anon_id_success", - "manufacturer": "Google", - "model": "Android SDK built for x86", - "name": "generic_x86", - "type": "android" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.1-beta.1" - }, - "locale": "en-US", - "network": { - "carrier": "Android", - "bluetooth": false, - "cellular": true, - "wifi": true - }, - "os": { - "name": "Android", - "version": "8.1.0" - }, - "screen": { - "density": 420, - "height": 1794, - "width": 1080 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "anon_id_success" - }, - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)" - }, - "event": "Product Clicked", - "integrations": { - "All": true - }, - "messageId": "id1", - "properties": { - "name": "Test Product" - }, - "originalTimestamp": "2020-12-17T21:00:59.176Z", - "userId": "user_id_success", - "type": "track", - "sentAt": "2020-03-12T09:05:03.421Z" - }, - "destination": { - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "Config": { - "accountId": "marketo_acct_id_success", - "clientId": "marketo_client_id_success", - "clientSecret": "marketo_client_secret_success", - "trackAnonymousEvents": false, - "customActivityPropertyMap": [ - { - "from": "name", - "to": "productName" - } - ], - "leadTraitMapping": [ - { - "from": "leadScore", - "to": "customLeadScore" - } - ], - "createIfNotExist": true, - "rudderEventsMapping": [ - { - "event": "Product Clicked", - "marketoPrimarykey": "name", - "marketoActivityId": "100001" - } - ] - } - } - }, - { - "message": { - "anonymousId": "anon_id_success", - "channel": "mobile", - "context": { - "traits": { - "anonymousId": "anon_id_success" - }, - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)" - }, - "event": "Product Clicked", - "integrations": { - "All": true - }, - "messageId": "id1", - "properties": { - "name": "Test Product" - }, - "originalTimestamp": "2020-12-17T21:00:59.176Z", - "userId": "user_id_success", - "type": "track", - "sentAt": "2020-03-12T09:05:03.421Z" - }, - "destination": { - "ID": "1mMy5cqbtfuaKZv1IhVQKnBerte", - "Config": { - "accountId": "marketo_acct_id_token_failure", - "clientId": "marketo_acct_id_token_failure", - "clientSecret": "marketo_acct_id_token_failure", - "trackAnonymousEvents": false, - "customActivityPropertyMap": [ - { - "from": "name", - "to": "productName" - } - ], - "leadTraitMapping": [ - { - "from": "leadScore", - "to": "customLeadScore" - } - ], - "createIfNotExist": true, - "rudderEventsMapping": [ - { - "event": "Product Clicked", - "marketoPrimarykey": "name", - "marketoActivityId": "100001" - } - ] - } - } - }, - { - "message": { - "anonymousId": "anon_id_success", - "channel": "mobile", - "context": { - "app": { - "build": "1", - "name": "TestAppName", - "namespace": "com.android.sample", - "version": "1.0" - }, - "device": { - "id": "anon_id_success", - "manufacturer": "Google", - "model": "Android SDK built for x86", - "name": "generic_x86", - "type": "android" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.1-beta.1" - }, - "locale": "en-US", - "network": { - "carrier": "Android", - "bluetooth": false, - "cellular": true, - "wifi": true - }, - "os": { - "name": "Android", - "version": "8.1.0" - }, - "screen": { - "density": 420, - "height": 1794, - "width": 1080 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "anon_id_success" - }, - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)" - }, - "event": "Product Clicked", - "integrations": { - "All": true - }, - "messageId": "id1", - "properties": { - "name": "Test Product" - }, - "originalTimestamp": "2020-12-17T21:00:59.176Z", - "userId": "user_id_success", - "type": "track", - "sentAt": "2020-03-12T09:05:03.421Z" - }, - "destination": { - "ID": "1mMy5cqbtfuaKZv1IhVQKnBerte", - "Config": { - "accountId": "marketo_acct_id_failed", - "clientId": "marketo_client_id_success", - "clientSecret": "marketo_client_secret_success", - "trackAnonymousEvents": false, - "customActivityPropertyMap": [ - { - "from": "name", - "to": "productName" - } - ], - "leadTraitMapping": [ - { - "from": "leadScore", - "to": "customLeadScore" - } - ], - "createIfNotExist": true, - "rudderEventsMapping": [ - { - "event": "Product Clicked", - "marketoPrimarykey": "name", - "marketoActivityId": "100001" - } - ] - } - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "type": "identify", - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "00000000000000000000000000", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "Config": { - "accountId": "marketo_acct_id_success", - "clientId": "marketo_client_id_success", - "clientSecret": "marketo_client_secret_success", - "trackAnonymousEvents": true, - "customActivityPropertyMap": [ - { - "from": "name", - "to": "productName" - }, - { - "from": "product_id", - "to": "productId" - } - ], - "leadTraitMapping": [ - { - "from": "leadScore", - "to": "customLeadScore" - } - ], - "createIfNotExist": true, - "rudderEventsMapping": [ - { - "event": "Product Clicked", - "marketoPrimarykey": "name", - "marketoActivityId": "100001" - } - ] - } - } - }, - { - "message": { - "anonymousId": "anon_id_success", - "channel": "mobile", - "context": { - "app": { - "build": "1", - "name": "TestAppName", - "namespace": "com.android.sample", - "version": "1.0" - }, - "device": { - "id": "anon_id_success", - "manufacturer": "Google", - "model": "Android SDK built for x86", - "name": "generic_x86", - "type": "android" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.1-beta.1" - }, - "locale": "en-US", - "network": { - "carrier": "Android", - "bluetooth": false, - "cellular": true, - "wifi": true - }, - "os": { - "name": "Android", - "version": "8.1.0" - }, - "screen": { - "density": 420, - "height": 1794, - "width": 1080 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "anon_id_success" - }, - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)" - }, - "event": "Product Clicked", - "integrations": { - "All": true - }, - "messageId": "id1", - "properties": { - "name": "Test Product" - }, - "originalTimestamp": "2020-12-17T21:00:59.176Z", - "type": "track", - "sentAt": "2020-03-12T09:05:03.421Z" - }, - "destination": { - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "Config": { - "accountId": "marketo_acct_id_success", - "clientId": "marketo_client_id_success", - "clientSecret": "marketo_client_secret_success", - "trackAnonymousEvents": false, - "customActivityPropertyMap": [ - { - "from": "name", - "to": "productName" - } - ], - "leadTraitMapping": [ - { - "from": "leadScore", - "to": "customLeadScore" - } - ], - "createIfNotExist": true, - "rudderEventsMapping": [ - { - "event": "Product Clicked", - "marketoPrimarykey": "name", - "marketoActivityId": "100001" - } - ] - } - } - }, - { - "message": { - "anonymousId": "anon_id_success", - "channel": "mobile", - "context": { - "app": { - "build": "1", - "name": "TestAppName", - "namespace": "com.android.sample", - "version": "1.0" - }, - "device": { - "id": "anon_id_success", - "manufacturer": "Google", - "model": "Android SDK built for x86", - "name": "generic_x86", - "type": "android" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.1-beta.1" - }, - "locale": "en-US", - "network": { - "carrier": "Android", - "bluetooth": false, - "cellular": true, - "wifi": true - }, - "os": { - "name": "Android", - "version": "8.1.0" - }, - "screen": { - "density": 420, - "height": 1794, - "width": 1080 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "anon_id_success" - }, - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)" - }, - "event": "Product Purchased", - "integrations": { - "All": true - }, - "messageId": "id1", - "properties": { - "name": "Test Product" - }, - "originalTimestamp": "2020-12-17T21:00:59.176Z", - "type": "track", - "sentAt": "2020-03-12T09:05:03.421Z" - }, - "destination": { - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "Config": { - "accountId": "marketo_acct_id_success", - "clientId": "marketo_client_id_success", - "clientSecret": "marketo_client_secret_success", - "trackAnonymousEvents": true, - "customActivityPropertyMap": [ - { - "from": "name", - "to": "productName" - } - ], - "leadTraitMapping": [ - { - "from": "leadScore", - "to": "customLeadScore" - } - ], - "createIfNotExist": true, - "rudderEventsMapping": [ - { - "event": "Product Clicked", - "marketoPrimarykey": "name", - "marketoActivityId": "100001" - } - ] - } - } - }, - { - "message": { - "anonymousId": "anon_id_success", - "channel": "mobile", - "context": { - "app": { - "build": "1", - "name": "TestAppName", - "namespace": "com.android.sample", - "version": "1.0" - }, - "device": { - "id": "anon_id_success", - "manufacturer": "Google", - "model": "Android SDK built for x86", - "name": "generic_x86", - "type": "android" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.1-beta.1" - }, - "locale": "en-US", - "network": { - "carrier": "Android", - "bluetooth": false, - "cellular": true, - "wifi": true - }, - "os": { - "name": "Android", - "version": "8.1.0" - }, - "screen": { - "density": 420, - "height": 1794, - "width": 1080 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "anon_id_success" - }, - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)" - }, - "event": "Product Clicked", - "integrations": { - "All": true - }, - "messageId": "id1", - "properties": { - "product_name": "Test Product" - }, - "originalTimestamp": "2020-12-17T21:00:59.176Z", - "type": "track", - "sentAt": "2020-03-12T09:05:03.421Z" - }, - "destination": { - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "Config": { - "accountId": "marketo_acct_id_success", - "clientId": "marketo_client_id_success", - "clientSecret": "marketo_client_secret_success", - "trackAnonymousEvents": true, - "customActivityPropertyMap": [ - { - "from": "name", - "to": "productName" - } - ], - "leadTraitMapping": [ - { - "from": "leadScore", - "to": "customLeadScore" - } - ], - "createIfNotExist": true, - "rudderEventsMapping": [ - { - "event": "Product Clicked", - "marketoPrimarykey": "name", - "marketoActivityId": "100001" - } - ] - } - } - }, - { - "message": { - "anonymousId": "anon_id_success", - "channel": "mobile", - "context": { - "app": { - "build": "1", - "name": "TestAppName", - "namespace": "com.android.sample", - "version": "1.0" - }, - "device": { - "id": "anon_id_success", - "manufacturer": "Google", - "model": "Android SDK built for x86", - "name": "generic_x86", - "type": "android" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.1-beta.1" - }, - "locale": "en-US", - "network": { - "carrier": "Android", - "bluetooth": false, - "cellular": true, - "wifi": true - }, - "os": { - "name": "Android", - "version": "8.1.0" - }, - "screen": { - "density": 420, - "height": 1794, - "width": 1080 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "anon_id_success" - }, - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)" - }, - "event": "Product Clicked", - "integrations": { - "All": true - }, - "messageId": "id1", - "properties": { - "product_name": "Test Product" - }, - "originalTimestamp": "2020-12-17T21:00:59.176Z", - "sentAt": "2020-03-12T09:05:03.421Z" - }, - "destination": { - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "Config": { - "accountId": "marketo_acct_id_success", - "clientId": "marketo_client_id_success", - "clientSecret": "marketo_client_secret_success", - "trackAnonymousEvents": true, - "customActivityPropertyMap": [ - { - "from": "name", - "to": "productName" - } - ], - "leadTraitMapping": [ - { - "from": "leadScore", - "to": "customLeadScore" - } - ], - "createIfNotExist": true, - "rudderEventsMapping": [ - { - "event": "Product Clicked", - "marketoPrimarykey": "name", - "marketoActivityId": "100001" - } - ] - } - } - }, - { - "message": { - "anonymousId": "anon_id_success", - "channel": "mobile", - "context": { - "app": { - "build": "1", - "name": "TestAppName", - "namespace": "com.android.sample", - "version": "1.0" - }, - "device": { - "id": "anon_id_success", - "manufacturer": "Google", - "model": "Android SDK built for x86", - "name": "generic_x86", - "type": "android" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.1-beta.1" - }, - "locale": "en-US", - "network": { - "carrier": "Android", - "bluetooth": false, - "cellular": true, - "wifi": true - }, - "os": { - "name": "Android", - "version": "8.1.0" - }, - "screen": { - "density": 420, - "height": 1794, - "width": 1080 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "anon_id_success" - }, - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)" - }, - "event": "Product Clicked", - "integrations": { - "All": true - }, - "messageId": "id1", - "properties": { - "product_name": "Test Product" - }, - "originalTimestamp": "2020-12-17T21:00:59.176Z", - "type": "screen", - "sentAt": "2020-03-12T09:05:03.421Z" - }, - "destination": { - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "Config": { - "accountId": "marketo_acct_id_success", - "clientId": "marketo_client_id_success", - "clientSecret": "marketo_client_secret_success", - "trackAnonymousEvents": true, - "customActivityPropertyMap": [ - { - "from": "name", - "to": "productName" - } - ], - "leadTraitMapping": [ - { - "from": "leadScore", - "to": "customLeadScore" - } - ], - "createIfNotExist": true, - "rudderEventsMapping": [ - { - "event": "Product Clicked", - "marketoPrimarykey": "name", - "marketoActivityId": "100001" - } - ] - } - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "type": "identify", - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "00000000000000000000000000", - "integrations": { - "All": true - }, - "traits": { - "score": "0.5" - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "Config": { - "accountId": "marketo_acct_id_success", - "clientId": "marketo_client_id_success", - "clientSecret": "marketo_client_secret_success", - "trackAnonymousEvents": true, - "customActivityPropertyMap": [ - { - "from": "name", - "to": "productName" - }, - { - "from": "product_id", - "to": "productId" - } - ], - "leadTraitMapping": [ - { - "from": "score", - "to": "customLeadScore" - } - ], - "rudderEventsMapping": [ - { - "event": "Product Clicked", - "marketoPrimarykey": "name", - "marketoActivityId": "100001" - } - ] - } - } - }, - { - "message": { - "channel": "sources", - "context": { - "externalId": [ - { - "id": "lynnanderson@smith.net", - "identifierType": "email", - "type": "MARKETO-new_user" - } - ], - "traits": { - "marketoGUID": "23", - "administrative_unit": "Minnesota", - "am_pm": "AM", - "boolean": true, - "firstname": "Jacqueline", - "pPower": "AM", - "userId": "Jacqueline" - }, - "sources": { - "batch_id": "f5f240d0-0acb-46e0-b043-57fb0aabbadd", - "job_id": "1zAj94bEy8komdqnYtSoDp0VmGs/Syncher", - "job_run_id": "c5tar6cqgmgmcjvupdhg", - "task_id": "tt_10_rows_check", - "task_run_id": "c5tar6cqgmgmcjvupdi0", - "version": "release.v1.6.8" - } - }, - "messageId": "2f052f7c-f694-4849-a7ed-a432f7ffa0a4", - "originalTimestamp": "2021-10-28T14:03:50.503Z", - "receivedAt": "2021-10-28T14:03:46.567Z", - "recordId": "8", - "request_ip": "10.1.94.92", - "rudderId": "c0f6843e-e3d6-4946-9752-fa339fbadef2", - "sentAt": "2021-10-28T14:03:50.503Z", - "timestamp": "2021-10-28T14:03:46.566Z", - "type": "identify", - "userId": "dummyMail@dummyDomain.com" - }, - "destination": { - "ID": "1zia9wKshXt80YksLmUdJnr7IHI", - "Name": "test_marketo", - "DestinationDefinition": { - "ID": "1iVQvTRMsPPyJzwol0ifH93QTQ6", - "Name": "MARKETO", - "DisplayName": "Marketo", - "Config": { - "destConfig": { - "defaultConfig": [] - }, - "excludeKeys": [], - "includeKeys": [], - "saveDestinationResponse": true, - "secretKeys": [], - "supportedMessageTypes": ["identify", "page", "screen", "track"], - "supportedSourceTypes": [ - "android", - "ios", - "web", - "unity", - "amp", - "cloud", - "warehouse", - "reactnative", - "flutter", - "cordova" - ], - "supportsVisualMapper": true, - "transformAt": "processor", - "transformAtV1": "processor" - }, - "ResponseRules": null - }, - "Config": { - "clientId": "marketo_client_id_success", - "clientSecret": "marketo_client_secret_success", - "accountId": "marketo_acct_id_success", - "rudderEventsMapping": [] - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": true - }, - "libraries": [], - "request": { - "query": {} - } - } -] diff --git a/test/__tests__/data/marketo_output.json b/test/__tests__/data/marketo_output.json deleted file mode 100644 index 32d31ccaf8..0000000000 --- a/test/__tests__/data/marketo_output.json +++ /dev/null @@ -1,204 +0,0 @@ -[ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://marketo_acct_id_success.mktorest.com/rest/v1/customobjects/new_user.json", - "headers": { - "Authorization": "Bearer access_token_success", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "action": "createOrUpdate", - "dedupeBy": "dedupeFields", - "input": [ - { - "administrative_unit": "Minnesota", - "am_pm": "AM", - "boolean": true, - "firstname": "Jacqueline", - "pPower": "AM", - "userId": "Jacqueline", - "email": "lynnanderson@smith.net" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://marketo_acct_id_success.mktorest.com/rest/v1/activities/external.json", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer access_token_success" - }, - "params": {}, - "body": { - "JSON": { - "input": [ - { - "activityDate": "2020-12-17T21:00:59.176Z", - "activityTypeId": 100001, - "attributes": [], - "leadId": 4, - "primaryAttributeValue": "Test Product" - } - ] - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://marketo_acct_id_success.mktorest.com/rest/v1/activities/external.json", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer access_token_success" - }, - "params": {}, - "body": { - "JSON": { - "input": [ - { - "activityDate": "2020-12-17T21:00:59.176Z", - "activityTypeId": 100001, - "attributes": [ - { - "name": "productId", - "value": "prod_1" - } - ], - "leadId": 4, - "primaryAttributeValue": "Test Product" - } - ] - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://marketo_acct_id_success.mktorest.com/rest/v1/activities/external.json", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer access_token_success" - }, - "params": {}, - "body": { - "JSON": { - "input": [ - { - "activityDate": "2020-12-17T21:00:59.176Z", - "activityTypeId": 100001, - "attributes": [], - "leadId": 4, - "primaryAttributeValue": "Test Product" - } - ] - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - { - "statusCode": 500, - "error": "Request Failed for marketo, Access Token Expired (Retryable).During fetching auth token" - }, - { - "statusCode": 500, - "error": "Request Failed for marketo, Access Token Expired (Retryable).During fetching auth token" - }, - { - "statusCode": 400, - "error": "Invalid traits value for Marketo" - }, - { - "statusCode": 400, - "error": "Anonymous event tracking is turned off and invalid userId" - }, - { - "statusCode": 400, - "error": "Event is not mapped to Custom Activity" - }, - { - "statusCode": 400, - "error": "Primary Key value is invalid for the event" - }, - { - "statusCode": 400, - "error": "Message Type is not present. Aborting message." - }, - { - "statusCode": 400, - "error": "Message type not supported" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://marketo_acct_id_success.mktorest.com/rest/v1/leads.json", - "headers": { - "Authorization": "Bearer access_token_success", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "action": "createOrUpdate", - "input": [ - { - "customLeadScore": "0.5", - "id": 4 - } - ], - "lookupField": "id" - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://marketo_acct_id_success.mktorest.com/rest/v1/leads.json", - "headers": { - "Authorization": "Bearer access_token_success", - "Content-Type": "application/json" - }, - "params": {}, - "body": { - "JSON": { - "action": "createOrUpdate", - "input": [{ "id": 4, "userId": "dummyMail@dummyDomain.com" }], - "lookupField": "id" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } -] diff --git a/test/__tests__/data/marketo_router_input.json b/test/__tests__/data/marketo_router_input.json deleted file mode 100644 index a7a40a221a..0000000000 --- a/test/__tests__/data/marketo_router_input.json +++ /dev/null @@ -1,996 +0,0 @@ -[ - { - "message": { - "anonymousId": "anon_id_success", - "channel": "mobile", - "context": { - "app": { - "build": "1", - "name": "TestAppName", - "namespace": "com.android.sample", - "version": "1.0" - }, - "device": { - "id": "anon_id_success", - "manufacturer": "Google", - "model": "Android SDK built for x86", - "name": "generic_x86", - "type": "android" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.1-beta.1" - }, - "locale": "en-US", - "network": { - "carrier": "Android", - "bluetooth": false, - "cellular": true, - "wifi": true - }, - "os": { - "name": "Android", - "version": "8.1.0" - }, - "screen": { - "density": 420, - "height": 1794, - "width": 1080 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "anon_id_success" - }, - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)" - }, - "event": "Product Clicked", - "integrations": { - "All": true - }, - "messageId": "id1", - "properties": { - "name": "Test Product" - }, - "originalTimestamp": "2020-12-17T21:00:59.176Z", - "type": "track", - "sentAt": "2020-03-12T09:05:03.421Z" - }, - "metadata": { - "jobId": 1 - }, - "destination": { - "Config": { - "accountId": "marketo_acct_id_success", - "clientId": "marketo_client_id_success", - "clientSecret": "marketo_client_secret_success", - "trackAnonymousEvents": true, - "customActivityPropertyMap": [ - { - "from": "name", - "to": "productName" - } - ], - "leadTraitMapping": [ - { - "from": "leadScore", - "to": "customLeadScore" - } - ], - "rudderEventsMapping": [ - { - "event": "Product Clicked", - "marketoPrimarykey": "name", - "marketoActivityId": "100001" - } - ] - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Marketo", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "config": { - "destConfig": { - "defaultConfig": [ - "accountId", - "clientId", - "clientSecret", - "trackAnonymousEvents", - "rudderEventsMapping", - "customActivityPropertyMap", - "leadTraitMapping" - ] - }, - "secretKeys": ["clientSecret"], - "excludeKeys": [], - "includeKeys": [], - "routerTransform": true, - "supportedSourceTypes": ["android", "ios", "web", "unity", "amp", "cloud", "reactnative"] - }, - "responseRules": { - "responseType": "JSON", - "rules": { - "retryable": [ - { - "success": "false", - "errors.0.code": 600 - }, - { - "success": "false", - "errors.0.code": 601 - }, - { - "success": "false", - "errors.0.code": 602 - }, - { - "success": "false", - "errors.0.code": 604 - }, - { - "success": "false", - "errors.0.code": 606 - }, - { - "success": "false", - "errors.0.code": 607 - }, - { - "success": "false", - "errors.0.code": 608 - }, - { - "success": "false", - "errors.0.code": 611 - } - ], - "abortable": [ - { - "success": "false", - "errors.0.code": 603 - }, - { - "success": "false", - "errors.0.code": 605 - }, - { - "success": "false", - "errors.0.code": 609 - }, - { - "success": "false", - "errors.0.code": 610 - } - ] - } - }, - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "MARKETO", - "displayName": "Marketo", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - }, - { - "message": { - "anonymousId": "anon_id_success", - "channel": "mobile", - "context": { - "app": { - "build": "1", - "name": "TestAppName", - "namespace": "com.android.sample", - "version": "1.0" - }, - "device": { - "id": "anon_id_success", - "manufacturer": "Google", - "model": "Android SDK built for x86", - "name": "generic_x86", - "type": "android" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.1-beta.1" - }, - "locale": "en-US", - "network": { - "carrier": "Android", - "bluetooth": false, - "cellular": true, - "wifi": true - }, - "os": { - "name": "Android", - "version": "8.1.0" - }, - "screen": { - "density": 420, - "height": 1794, - "width": 1080 - }, - "timezone": "Asia/Kolkata", - "traits": { - "anonymousId": "anon_id_success" - }, - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)" - }, - "event": "Product Clicked", - "integrations": { - "All": true - }, - "messageId": "id1", - "properties": { - "name": "Test Product", - "product_id": "prod_1" - }, - "originalTimestamp": "2020-12-17T21:00:59.176Z", - "type": "track", - "sentAt": "2020-12-17T21:00:59.176Z" - }, - "metadata": { - "jobId": 2 - }, - "destination": { - "Config": { - "accountId": "marketo_acct_id_success", - "clientId": "marketo_client_id_success", - "clientSecret": "marketo_client_secret_success", - "trackAnonymousEvents": true, - "customActivityPropertyMap": [ - { - "from": "name", - "to": "productName" - } - ], - "leadTraitMapping": [ - { - "from": "leadScore", - "to": "customLeadScore" - } - ], - "rudderEventsMapping": [ - { - "event": "Product Clicked", - "marketoPrimarykey": "name", - "marketoActivityId": "100001" - } - ] - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Marketo", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "config": { - "destConfig": { - "defaultConfig": [ - "accountId", - "clientId", - "clientSecret", - "trackAnonymousEvents", - "rudderEventsMapping", - "customActivityPropertyMap", - "leadTraitMapping" - ] - }, - "secretKeys": ["clientSecret"], - "excludeKeys": [], - "includeKeys": [], - "routerTransform": true, - "supportedSourceTypes": ["android", "ios", "web", "unity", "amp", "cloud", "reactnative"] - }, - "responseRules": { - "responseType": "JSON", - "rules": { - "retryable": [ - { - "success": "false", - "errors.0.code": 600 - }, - { - "success": "false", - "errors.0.code": 601 - }, - { - "success": "false", - "errors.0.code": 602 - }, - { - "success": "false", - "errors.0.code": 604 - }, - { - "success": "false", - "errors.0.code": 606 - }, - { - "success": "false", - "errors.0.code": 607 - }, - { - "success": "false", - "errors.0.code": 608 - }, - { - "success": "false", - "errors.0.code": 611 - } - ], - "abortable": [ - { - "success": "false", - "errors.0.code": 603 - }, - { - "success": "false", - "errors.0.code": 605 - }, - { - "success": "false", - "errors.0.code": 609 - }, - { - "success": "false", - "errors.0.code": 610 - } - ] - } - }, - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "MARKETO", - "displayName": "Marketo", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - }, - { - "message": { - "type": "identify", - "sentAt": "2022-09-19T10:34:02.002Z", - "userId": "e17c5a5e-5e2f-430b-b497-fe3f1ea3a704", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "2.12.1", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "https://accounts.app.t2.broken.com/home", - "path": "/home", - "title": "Home", - "search": "", - "tab_url": "https://accounts.app.t2.broken.com/home", - "referrer": "https://ts50-cvii.core.broken.org/", - "initial_referrer": "https://ts50-cvii.core.broken.org/", - "referring_domain": "ts50-cvii.core.broken.org", - "initial_referring_domain": "ts50-cvii.core.broken.org" - }, - "locale": "en-IN", - "screen": { - "width": 1728, - "height": 1117, - "density": 2, - "innerWidth": 1728, - "innerHeight": 969 - }, - "traits": { - "name": "AM", - "email": "0c7b8b80-9c43-4f8e-b2d2-5e2448a25040@j.mail", - "lastName": "M", - "firstName": "A", - "accountName": "MACDEV", - "billingName": "g g", - "companyName": "macDev", - "currentTier": "Webinar Pro 250", - "billingCycle": "Annually", - "lastBillingDate": "2022-06-29T09:40:42.000Z", - "nextBillingDate": "2023-09-09T04:00:00.000Z", - "subscriptionType": "Webinar Pro 250", - "subscriptionStatus": "ACTIVE", - "lastWebinarEventDate": "2022-09-15T20:00:00.000Z", - "nextWebinarEventDate": "2022-09-16T06:15:00.000Z" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "2.12.1" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36" - }, - "rudderId": "73dc83ef-587f-4077-90f3-c36083e64019", - "messageId": "1663583642000200-e3f31c4c-6361-4f99-b643-7755303a6007", - "timestamp": "2022-09-19T10:34:02.954Z", - "receivedAt": "2022-09-19T10:34:02.956Z", - "request_ip": "11.105.44.120", - "anonymousId": "0c7b8b80-9c43-4f8e-b2d2-5e2448a25040", - "integrations": { - "All": true - }, - "originalTimestamp": "2022-09-19T10:34:02.000Z" - }, - "destination": { - "Config": { - "accountId": "valid_account_broken_event", - "clientId": "504300cd-76b2-a7l4-bhle-90a07420nx73", - "clientSecret": "3l3gJpzRsZagD6gu7tnTeKXz0bomLGnd", - "trackAnonymousEvents": false, - "createIfNotExist": true, - "rudderEventsMapping": [ - { - "event": "acq_signup_completed", - "marketoActivityId": "100026" - }, - { - "event": "act_createwebinarform_submit", - "marketoActivityId": "100025" - }, - { - "event": "act_presentation_style", - "marketoActivityId": "100025" - }, - { - "event": "act_webinar_view", - "marketoActivityId": "100025" - }, - { - "event": "act_webinar_join", - "marketoActivityId": "100025" - }, - { - "event": "act_presentation_addteammember", - "marketoActivityId": "100025" - }, - { - "event": "act_engagement_discussions_savediscussion", - "marketoActivityId": "100025" - }, - { - "event": "act_engagement_networking_savetime", - "marketoActivityId": "100025" - } - ] - }, - "destinationDefinition": { - "config": { - "destConfig": { - "defaultConfig": [ - "accountId", - "clientId", - "clientSecret", - "trackAnonymousEvents", - "rudderEventsMapping", - "customActivityPropertyMap", - "leadTraitMapping" - ] - }, - "secretKeys": ["clientSecret"], - "excludeKeys": [], - "includeKeys": [], - "routerTransform": true, - "supportedSourceTypes": ["android", "ios", "web", "unity", "amp", "cloud", "reactnative"] - }, - "responseRules": { - "responseType": "JSON", - "rules": { - "retryable": [ - { - "success": "false", - "errors.0.code": 600 - }, - { - "success": "false", - "errors.0.code": 601 - }, - { - "success": "false", - "errors.0.code": 602 - }, - { - "success": "false", - "errors.0.code": 604 - }, - { - "success": "false", - "errors.0.code": 606 - }, - { - "success": "false", - "errors.0.code": 607 - }, - { - "success": "false", - "errors.0.code": 608 - }, - { - "success": "false", - "errors.0.code": 611 - } - ], - "abortable": [ - { - "success": "false", - "errors.0.code": 603 - }, - { - "success": "false", - "errors.0.code": 605 - }, - { - "success": "false", - "errors.0.code": 609 - }, - { - "success": "false", - "errors.0.code": 610 - } - ] - } - }, - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "MARKETO", - "displayName": "Marketo", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVke", - "name": "Marketo", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmMd", - "deleted": false, - "createdAt": "2022-02-10T08:39:32.005Z", - "updatedAt": "2022-09-03T16:22:31.374Z", - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - }, - "metadata": { - "jobId": 3 - } - }, - { - "message": { - "type": "identify", - "sentAt": "2022-09-19T10:34:02.002Z", - "userId": "e17c5a5e-5e2f-430b-b497-fe3f1ea3a704", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "2.12.1", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "https://accounts.app.t2.broken.com/home", - "path": "/home", - "title": "Home", - "search": "", - "tab_url": "https://accounts.app.t2.broken.com/home", - "referrer": "https://ts50-cvii.core.broken.org/", - "initial_referrer": "https://ts50-cvii.core.broken.org/", - "referring_domain": "ts50-cvii.core.broken.org", - "initial_referring_domain": "ts50-cvii.core.broken.org" - }, - "locale": "en-IN", - "screen": { - "width": 1728, - "height": 1117, - "density": 2, - "innerWidth": 1728, - "innerHeight": 969 - }, - "traits": { - "name": "AM", - "email": "0c7b8b80-9c43-4f8e-b2d2-5e2448a25040@j.mail", - "lastName": "M", - "firstName": "A", - "accountName": "MACDEV", - "billingName": "g g", - "companyName": "macDev", - "currentTier": "Webinar Pro 250", - "billingCycle": "Annually", - "lastBillingDate": "2022-06-29T09:40:42.000Z", - "nextBillingDate": "2023-09-09T04:00:00.000Z", - "subscriptionType": "Webinar Pro 250", - "subscriptionStatus": "ACTIVE", - "lastWebinarEventDate": "2022-09-15T20:00:00.000Z", - "nextWebinarEventDate": "2022-09-16T06:15:00.000Z" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "2.12.1" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36" - }, - "rudderId": "73dc83ef-587f-4077-90f3-c36083e64019", - "messageId": "1663583642000200-e3f31c4c-6361-4f99-b643-7755303a6007", - "timestamp": "2022-09-19T10:34:02.954Z", - "receivedAt": "2022-09-19T10:34:02.956Z", - "request_ip": "11.105.44.120", - "anonymousId": "0c7b8b80-9c43-4f8e-b2d2-5e2448a25040", - "integrations": { - "All": true - }, - "originalTimestamp": "2022-09-19T10:34:02.000Z" - }, - "destination": { - "Config": { - "accountId": "unhandled_status_code", - "clientId": "504300cd-76b2-a7l4-bhle-90a07420nx73", - "clientSecret": "3l3gJpzRsZagD6gu7tnTeKXz0bomLGnd", - "trackAnonymousEvents": false, - "createIfNotExist": true, - "rudderEventsMapping": [ - { - "event": "acq_signup_completed", - "marketoActivityId": "100026" - }, - { - "event": "act_createwebinarform_submit", - "marketoActivityId": "100025" - }, - { - "event": "act_presentation_style", - "marketoActivityId": "100025" - }, - { - "event": "act_webinar_view", - "marketoActivityId": "100025" - }, - { - "event": "act_webinar_join", - "marketoActivityId": "100025" - }, - { - "event": "act_presentation_addteammember", - "marketoActivityId": "100025" - }, - { - "event": "act_engagement_discussions_savediscussion", - "marketoActivityId": "100025" - }, - { - "event": "act_engagement_networking_savetime", - "marketoActivityId": "100025" - } - ] - }, - "destinationDefinition": { - "config": { - "destConfig": { - "defaultConfig": [ - "accountId", - "clientId", - "clientSecret", - "trackAnonymousEvents", - "rudderEventsMapping", - "customActivityPropertyMap", - "leadTraitMapping" - ] - }, - "secretKeys": ["clientSecret"], - "excludeKeys": [], - "includeKeys": [], - "routerTransform": true, - "supportedSourceTypes": ["android", "ios", "web", "unity", "amp", "cloud", "reactnative"] - }, - "responseRules": { - "responseType": "JSON", - "rules": { - "retryable": [ - { - "success": "false", - "errors.0.code": 600 - }, - { - "success": "false", - "errors.0.code": 601 - }, - { - "success": "false", - "errors.0.code": 602 - }, - { - "success": "false", - "errors.0.code": 604 - }, - { - "success": "false", - "errors.0.code": 606 - }, - { - "success": "false", - "errors.0.code": 607 - }, - { - "success": "false", - "errors.0.code": 608 - }, - { - "success": "false", - "errors.0.code": 611 - } - ], - "abortable": [ - { - "success": "false", - "errors.0.code": 603 - }, - { - "success": "false", - "errors.0.code": 605 - }, - { - "success": "false", - "errors.0.code": 609 - }, - { - "success": "false", - "errors.0.code": 610 - } - ] - } - }, - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "MARKETO", - "displayName": "Marketo", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVke", - "name": "Marketo", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmMd", - "deleted": false, - "createdAt": "2022-02-10T08:39:32.005Z", - "updatedAt": "2022-09-03T16:22:31.374Z", - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - }, - "metadata": { - "jobId": 4 - } - }, - { - "message": { - "type": "identify", - "sentAt": "2022-09-19T10:34:02.002Z", - "userId": "e17c5a5e-5e2f-430b-b497-fe3f1ea3a704", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "2.12.1", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "https://accounts.app.t2.broken.com/home", - "path": "/home", - "title": "Home", - "search": "", - "tab_url": "https://accounts.app.t2.broken.com/home", - "referrer": "https://ts50-cvii.core.broken.org/", - "initial_referrer": "https://ts50-cvii.core.broken.org/", - "referring_domain": "ts50-cvii.core.broken.org", - "initial_referring_domain": "ts50-cvii.core.broken.org" - }, - "locale": "en-IN", - "screen": { - "width": 1728, - "height": 1117, - "density": 2, - "innerWidth": 1728, - "innerHeight": 969 - }, - "traits": { - "name": "AM", - "email": "0c7b8b80-9c43-4f8e-b2d2-5e2448a25040@j.mail", - "lastName": "M", - "firstName": "A", - "accountName": "MACDEV", - "billingName": "g g", - "companyName": "macDev", - "currentTier": "Webinar Pro 250", - "billingCycle": "Annually", - "lastBillingDate": "2022-06-29T09:40:42.000Z", - "nextBillingDate": "2023-09-09T04:00:00.000Z", - "subscriptionType": "Webinar Pro 250", - "subscriptionStatus": "ACTIVE", - "lastWebinarEventDate": "2022-09-15T20:00:00.000Z", - "nextWebinarEventDate": "2022-09-16T06:15:00.000Z" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "2.12.1" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36" - }, - "rudderId": "73dc83ef-587f-4077-90f3-c36083e64019", - "messageId": "1663583642000200-e3f31c4c-6361-4f99-b643-7755303a6007", - "timestamp": "2022-09-19T10:34:02.954Z", - "receivedAt": "2022-09-19T10:34:02.956Z", - "request_ip": "11.105.44.120", - "anonymousId": "0c7b8b80-9c43-4f8e-b2d2-5e2448a25040", - "integrations": { - "All": true - }, - "originalTimestamp": "2022-09-19T10:34:02.000Z" - }, - "destination": { - "Config": { - "accountId": "successful_identify_transformation", - "clientId": "504300cd-76b2-a7l4-bhle-90a07420nx73", - "clientSecret": "3l3gJpzRsZagD6gu7tnTeKXz0bomLGnd", - "trackAnonymousEvents": false, - "createIfNotExist": true, - "rudderEventsMapping": [ - { - "event": "acq_signup_completed", - "marketoActivityId": "100026" - }, - { - "event": "act_createwebinarform_submit", - "marketoActivityId": "100025" - }, - { - "event": "act_presentation_style", - "marketoActivityId": "100025" - }, - { - "event": "act_webinar_view", - "marketoActivityId": "100025" - }, - { - "event": "act_webinar_join", - "marketoActivityId": "100025" - }, - { - "event": "act_presentation_addteammember", - "marketoActivityId": "100025" - }, - { - "event": "act_engagement_discussions_savediscussion", - "marketoActivityId": "100025" - }, - { - "event": "act_engagement_networking_savetime", - "marketoActivityId": "100025" - } - ] - }, - "destinationDefinition": { - "config": { - "destConfig": { - "defaultConfig": [ - "accountId", - "clientId", - "clientSecret", - "trackAnonymousEvents", - "rudderEventsMapping", - "customActivityPropertyMap", - "leadTraitMapping" - ] - }, - "secretKeys": ["clientSecret"], - "excludeKeys": [], - "includeKeys": [], - "routerTransform": true, - "supportedSourceTypes": ["android", "ios", "web", "unity", "amp", "cloud", "reactnative"] - }, - "responseRules": { - "responseType": "JSON", - "rules": { - "retryable": [ - { - "success": "false", - "errors.0.code": 600 - }, - { - "success": "false", - "errors.0.code": 601 - }, - { - "success": "false", - "errors.0.code": 602 - }, - { - "success": "false", - "errors.0.code": 604 - }, - { - "success": "false", - "errors.0.code": 606 - }, - { - "success": "false", - "errors.0.code": 607 - }, - { - "success": "false", - "errors.0.code": 608 - }, - { - "success": "false", - "errors.0.code": 611 - } - ], - "abortable": [ - { - "success": "false", - "errors.0.code": 603 - }, - { - "success": "false", - "errors.0.code": 605 - }, - { - "success": "false", - "errors.0.code": 609 - }, - { - "success": "false", - "errors.0.code": 610 - } - ] - } - }, - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "MARKETO", - "displayName": "Marketo", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVke", - "name": "Marketo", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmMd", - "deleted": false, - "createdAt": "2022-02-10T08:39:32.005Z", - "updatedAt": "2022-09-03T16:22:31.374Z", - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - }, - "metadata": { - "jobId": 5 - } - } -] diff --git a/test/__tests__/data/marketo_router_metadata_input.json b/test/__tests__/data/marketo_router_metadata_input.json deleted file mode 100644 index b1e3a26f69..0000000000 --- a/test/__tests__/data/marketo_router_metadata_input.json +++ /dev/null @@ -1,163 +0,0 @@ -{ - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://marketo_acct_id_success.mktorest.com/rest/v1/activities/external.json", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer access_token_success" - }, - "params": {}, - "body": { - "JSON": { - "input": [ - { - "activityDate": "2020-12-17T21:00:59.176Z", - "activityTypeId": 100001, - "attributes": [], - "leadId": 4, - "primaryAttributeValue": "Test Product" - } - ] - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "jobId": 1 - }, - { - "jobId": 1 - }, - { - "jobId": 1 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "accountId": "marketo_acct_id_success", - "clientId": "marketo_client_id_success", - "clientSecret": "marketo_client_secret_success", - "trackAnonymousEvents": true, - "customActivityPropertyMap": [ - { - "from": "name", - "to": "productName" - } - ], - "rudderEventsMapping": [ - { - "event": "Product Clicked", - "marketoPrimarykey": "name", - "marketoActivityId": "100001" - } - ], - "leadTraitMapping": [ - { - "from": "leadScore", - "to": "customLeadScore" - } - ] - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Marketo", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "config": { - "destConfig": { - "defaultConfig": [ - "accountId", - "clientId", - "clientSecret", - "trackAnonymousEvents", - "customActivityPropertyMap", - "rudderEventsMapping", - "leadTraitMapping" - ] - }, - "secretKeys": ["clientSecret"], - "excludeKeys": [], - "includeKeys": [], - "routerTransform": true, - "supportedSourceTypes": ["android", "ios", "web", "unity", "amp", "cloud", "reactnative"] - }, - "responseRules": { - "responseType": "JSON", - "rules": { - "retryable": [ - { - "success": "false", - "errors.0.code": 600 - }, - { - "success": "false", - "errors.0.code": 601 - }, - { - "success": "false", - "errors.0.code": 602 - }, - { - "success": "false", - "errors.0.code": 604 - }, - { - "success": "false", - "errors.0.code": 606 - }, - { - "success": "false", - "errors.0.code": 607 - }, - { - "success": "false", - "errors.0.code": 608 - }, - { - "success": "false", - "errors.0.code": 611 - } - ], - "abortable": [ - { - "success": "false", - "errors.0.code": 603 - }, - { - "success": "false", - "errors.0.code": 605 - }, - { - "success": "false", - "errors.0.code": 609 - }, - { - "success": "false", - "errors.0.code": 610 - } - ] - } - }, - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "MARKETO", - "displayName": "Marketo", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } -} diff --git a/test/__tests__/data/marketo_router_metadata_output.json b/test/__tests__/data/marketo_router_metadata_output.json deleted file mode 100644 index 4fb7308fe4..0000000000 --- a/test/__tests__/data/marketo_router_metadata_output.json +++ /dev/null @@ -1,20 +0,0 @@ -[ - { - "destInfo": { - "authKey": "1mMy5cqbtfuaKZv1IhVQKnBdVwe" - }, - "jobId": 1 - }, - { - "destInfo": { - "authKey": "1mMy5cqbtfuaKZv1IhVQKnBdVwe" - }, - "jobId": 1 - }, - { - "destInfo": { - "authKey": "1mMy5cqbtfuaKZv1IhVQKnBdVwe" - }, - "jobId": 1 - } -] diff --git a/test/__tests__/data/marketo_router_output.json b/test/__tests__/data/marketo_router_output.json deleted file mode 100644 index c4b59b396d..0000000000 --- a/test/__tests__/data/marketo_router_output.json +++ /dev/null @@ -1,792 +0,0 @@ -[ - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://marketo_acct_id_success.mktorest.com/rest/v1/activities/external.json", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer access_token_success" - }, - "params": {}, - "body": { - "JSON": { - "input": [ - { - "activityDate": "2020-12-17T21:00:59.176Z", - "activityTypeId": 100001, - "attributes": [], - "leadId": 4, - "primaryAttributeValue": "Test Product" - } - ] - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "jobId": 1 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "accountId": "marketo_acct_id_success", - "clientId": "marketo_client_id_success", - "clientSecret": "marketo_client_secret_success", - "trackAnonymousEvents": true, - "customActivityPropertyMap": [ - { - "from": "name", - "to": "productName" - } - ], - "leadTraitMapping": [ - { - "from": "leadScore", - "to": "customLeadScore" - } - ], - "rudderEventsMapping": [ - { - "event": "Product Clicked", - "marketoPrimarykey": "name", - "marketoActivityId": "100001" - } - ] - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Marketo", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "config": { - "destConfig": { - "defaultConfig": [ - "accountId", - "clientId", - "clientSecret", - "trackAnonymousEvents", - "rudderEventsMapping", - "customActivityPropertyMap", - "leadTraitMapping" - ] - }, - "secretKeys": ["clientSecret"], - "excludeKeys": [], - "includeKeys": [], - "routerTransform": true, - "supportedSourceTypes": ["android", "ios", "web", "unity", "amp", "cloud", "reactnative"] - }, - "responseRules": { - "responseType": "JSON", - "rules": { - "retryable": [ - { - "success": "false", - "errors.0.code": 600 - }, - { - "success": "false", - "errors.0.code": 601 - }, - { - "success": "false", - "errors.0.code": 602 - }, - { - "success": "false", - "errors.0.code": 604 - }, - { - "success": "false", - "errors.0.code": 606 - }, - { - "success": "false", - "errors.0.code": 607 - }, - { - "success": "false", - "errors.0.code": 608 - }, - { - "success": "false", - "errors.0.code": 611 - } - ], - "abortable": [ - { - "success": "false", - "errors.0.code": 603 - }, - { - "success": "false", - "errors.0.code": 605 - }, - { - "success": "false", - "errors.0.code": 609 - }, - { - "success": "false", - "errors.0.code": 610 - } - ] - } - }, - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "MARKETO", - "displayName": "Marketo", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - }, - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://marketo_acct_id_success.mktorest.com/rest/v1/activities/external.json", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer access_token_success" - }, - "params": {}, - "body": { - "JSON": { - "input": [ - { - "activityDate": "2020-12-17T21:00:59.176Z", - "activityTypeId": 100001, - "attributes": [], - "leadId": 4, - "primaryAttributeValue": "Test Product" - } - ] - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "jobId": 2 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "accountId": "marketo_acct_id_success", - "clientId": "marketo_client_id_success", - "clientSecret": "marketo_client_secret_success", - "trackAnonymousEvents": true, - "customActivityPropertyMap": [ - { - "from": "name", - "to": "productName" - } - ], - "leadTraitMapping": [ - { - "from": "leadScore", - "to": "customLeadScore" - } - ], - "rudderEventsMapping": [ - { - "event": "Product Clicked", - "marketoPrimarykey": "name", - "marketoActivityId": "100001" - } - ] - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", - "name": "Marketo", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmLd", - "deleted": false, - "createdAt": "2020-12-30T08:39:32.005Z", - "updatedAt": "2021-02-03T16:22:31.374Z", - "destinationDefinition": { - "config": { - "destConfig": { - "defaultConfig": [ - "accountId", - "clientId", - "clientSecret", - "trackAnonymousEvents", - "rudderEventsMapping", - "customActivityPropertyMap", - "leadTraitMapping" - ] - }, - "secretKeys": ["clientSecret"], - "excludeKeys": [], - "includeKeys": [], - "routerTransform": true, - "supportedSourceTypes": ["android", "ios", "web", "unity", "amp", "cloud", "reactnative"] - }, - "responseRules": { - "responseType": "JSON", - "rules": { - "retryable": [ - { - "success": "false", - "errors.0.code": 600 - }, - { - "success": "false", - "errors.0.code": 601 - }, - { - "success": "false", - "errors.0.code": 602 - }, - { - "success": "false", - "errors.0.code": 604 - }, - { - "success": "false", - "errors.0.code": 606 - }, - { - "success": "false", - "errors.0.code": 607 - }, - { - "success": "false", - "errors.0.code": 608 - }, - { - "success": "false", - "errors.0.code": 611 - } - ], - "abortable": [ - { - "success": "false", - "errors.0.code": 603 - }, - { - "success": "false", - "errors.0.code": 605 - }, - { - "success": "false", - "errors.0.code": 609 - }, - { - "success": "false", - "errors.0.code": 610 - } - ] - } - }, - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "MARKETO", - "displayName": "Marketo", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - }, - { - "batched": false, - "statusCode": 400, - "error": "{\"message\":\"Request Failed for marketo, Lookup field 'userId' not found (Aborted).[Marketo Transformer]: During lead look up using email\",\"destinationResponse\":{\"response\":{\"requestId\":\"142e4#1835b117b76\",\"success\":false,\"errors\":[{\"code\":\"1006\",\"message\":\"Lookup field 'userId' not found\"}]},\"status\":200}}", - "statTags": { - "errorCategory": "network", - "errorType": "aborted" - }, - "metadata": [ - { - "jobId": 3 - } - ], - "destination": { - "Config": { - "accountId": "valid_account_broken_event", - "clientId": "504300cd-76b2-a7l4-bhle-90a07420nx73", - "clientSecret": "3l3gJpzRsZagD6gu7tnTeKXz0bomLGnd", - "trackAnonymousEvents": false, - "createIfNotExist": true, - "rudderEventsMapping": [ - { - "event": "acq_signup_completed", - "marketoActivityId": "100026" - }, - { - "event": "act_createwebinarform_submit", - "marketoActivityId": "100025" - }, - { - "event": "act_presentation_style", - "marketoActivityId": "100025" - }, - { - "event": "act_webinar_view", - "marketoActivityId": "100025" - }, - { - "event": "act_webinar_join", - "marketoActivityId": "100025" - }, - { - "event": "act_presentation_addteammember", - "marketoActivityId": "100025" - }, - { - "event": "act_engagement_discussions_savediscussion", - "marketoActivityId": "100025" - }, - { - "event": "act_engagement_networking_savetime", - "marketoActivityId": "100025" - } - ] - }, - "destinationDefinition": { - "config": { - "destConfig": { - "defaultConfig": [ - "accountId", - "clientId", - "clientSecret", - "trackAnonymousEvents", - "rudderEventsMapping", - "customActivityPropertyMap", - "leadTraitMapping" - ] - }, - "secretKeys": ["clientSecret"], - "excludeKeys": [], - "includeKeys": [], - "routerTransform": true, - "supportedSourceTypes": ["android", "ios", "web", "unity", "amp", "cloud", "reactnative"] - }, - "responseRules": { - "responseType": "JSON", - "rules": { - "retryable": [ - { - "success": "false", - "errors.0.code": 600 - }, - { - "success": "false", - "errors.0.code": 601 - }, - { - "success": "false", - "errors.0.code": 602 - }, - { - "success": "false", - "errors.0.code": 604 - }, - { - "success": "false", - "errors.0.code": 606 - }, - { - "success": "false", - "errors.0.code": 607 - }, - { - "success": "false", - "errors.0.code": 608 - }, - { - "success": "false", - "errors.0.code": 611 - } - ], - "abortable": [ - { - "success": "false", - "errors.0.code": 603 - }, - { - "success": "false", - "errors.0.code": 605 - }, - { - "success": "false", - "errors.0.code": 609 - }, - { - "success": "false", - "errors.0.code": 610 - } - ] - } - }, - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "MARKETO", - "displayName": "Marketo", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVke", - "name": "Marketo", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmMd", - "deleted": false, - "createdAt": "2022-02-10T08:39:32.005Z", - "updatedAt": "2022-09-03T16:22:31.374Z", - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - }, - { - "batched": false, - "statusCode": 400, - "error": "{\"message\":\"Error occurred [Marketo Transformer]: During lead look up using email -> some other problem\",\"destinationResponse\":{\"response\":{\"requestId\":\"142e4#1835b117b76\",\"success\":false,\"errors\":[{\"code\":\"random_marketo_code\",\"message\":\"some other problem\"}]},\"status\":200}}", - "statTags": { - "errorCategory": "network", - "errorType": "aborted", - "meta": "unhandledStatusCode" - }, - "destination": { - "Config": { - "accountId": "unhandled_status_code", - "clientId": "504300cd-76b2-a7l4-bhle-90a07420nx73", - "clientSecret": "3l3gJpzRsZagD6gu7tnTeKXz0bomLGnd", - "trackAnonymousEvents": false, - "createIfNotExist": true, - "rudderEventsMapping": [ - { - "event": "acq_signup_completed", - "marketoActivityId": "100026" - }, - { - "event": "act_createwebinarform_submit", - "marketoActivityId": "100025" - }, - { - "event": "act_presentation_style", - "marketoActivityId": "100025" - }, - { - "event": "act_webinar_view", - "marketoActivityId": "100025" - }, - { - "event": "act_webinar_join", - "marketoActivityId": "100025" - }, - { - "event": "act_presentation_addteammember", - "marketoActivityId": "100025" - }, - { - "event": "act_engagement_discussions_savediscussion", - "marketoActivityId": "100025" - }, - { - "event": "act_engagement_networking_savetime", - "marketoActivityId": "100025" - } - ] - }, - "destinationDefinition": { - "config": { - "destConfig": { - "defaultConfig": [ - "accountId", - "clientId", - "clientSecret", - "trackAnonymousEvents", - "rudderEventsMapping", - "customActivityPropertyMap", - "leadTraitMapping" - ] - }, - "secretKeys": ["clientSecret"], - "excludeKeys": [], - "includeKeys": [], - "routerTransform": true, - "supportedSourceTypes": ["android", "ios", "web", "unity", "amp", "cloud", "reactnative"] - }, - "responseRules": { - "responseType": "JSON", - "rules": { - "retryable": [ - { - "success": "false", - "errors.0.code": 600 - }, - { - "success": "false", - "errors.0.code": 601 - }, - { - "success": "false", - "errors.0.code": 602 - }, - { - "success": "false", - "errors.0.code": 604 - }, - { - "success": "false", - "errors.0.code": 606 - }, - { - "success": "false", - "errors.0.code": 607 - }, - { - "success": "false", - "errors.0.code": 608 - }, - { - "success": "false", - "errors.0.code": 611 - } - ], - "abortable": [ - { - "success": "false", - "errors.0.code": 603 - }, - { - "success": "false", - "errors.0.code": 605 - }, - { - "success": "false", - "errors.0.code": 609 - }, - { - "success": "false", - "errors.0.code": 610 - } - ] - } - }, - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "MARKETO", - "displayName": "Marketo", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVke", - "name": "Marketo", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmMd", - "deleted": false, - "createdAt": "2022-02-10T08:39:32.005Z", - "updatedAt": "2022-09-03T16:22:31.374Z", - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - }, - "metadata": [ - { - "jobId": 4 - } - ] - }, - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://successful_identify_transformation.mktorest.com/rest/v1/leads.json", - "headers": { - "Content-Type": "application/json", - "Authorization": "Bearer access_token_success" - }, - "params": {}, - "body": { - "JSON": { - "action": "createOrUpdate", - "input": [ - { - "Email": "0c7b8b80-9c43-4f8e-b2d2-5e2448a25040@j.mail", - "FirstName": "A", - "LastName": "M", - "id": 4, - "userId": "e17c5a5e-5e2f-430b-b497-fe3f1ea3a704" - } - ], - "lookupField": "id" - }, - "XML": {}, - "JSON_ARRAY": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "jobId": 5 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "accountId": "successful_identify_transformation", - "clientId": "504300cd-76b2-a7l4-bhle-90a07420nx73", - "clientSecret": "3l3gJpzRsZagD6gu7tnTeKXz0bomLGnd", - "trackAnonymousEvents": false, - "createIfNotExist": true, - "rudderEventsMapping": [ - { - "event": "acq_signup_completed", - "marketoActivityId": "100026" - }, - { - "event": "act_createwebinarform_submit", - "marketoActivityId": "100025" - }, - { - "event": "act_presentation_style", - "marketoActivityId": "100025" - }, - { - "event": "act_webinar_view", - "marketoActivityId": "100025" - }, - { - "event": "act_webinar_join", - "marketoActivityId": "100025" - }, - { - "event": "act_presentation_addteammember", - "marketoActivityId": "100025" - }, - { - "event": "act_engagement_discussions_savediscussion", - "marketoActivityId": "100025" - }, - { - "event": "act_engagement_networking_savetime", - "marketoActivityId": "100025" - } - ] - }, - "destinationDefinition": { - "config": { - "destConfig": { - "defaultConfig": [ - "accountId", - "clientId", - "clientSecret", - "trackAnonymousEvents", - "rudderEventsMapping", - "customActivityPropertyMap", - "leadTraitMapping" - ] - }, - "secretKeys": ["clientSecret"], - "excludeKeys": [], - "includeKeys": [], - "routerTransform": true, - "supportedSourceTypes": ["android", "ios", "web", "unity", "amp", "cloud", "reactnative"] - }, - "responseRules": { - "responseType": "JSON", - "rules": { - "retryable": [ - { - "success": "false", - "errors.0.code": 600 - }, - { - "success": "false", - "errors.0.code": 601 - }, - { - "success": "false", - "errors.0.code": 602 - }, - { - "success": "false", - "errors.0.code": 604 - }, - { - "success": "false", - "errors.0.code": 606 - }, - { - "success": "false", - "errors.0.code": 607 - }, - { - "success": "false", - "errors.0.code": 608 - }, - { - "success": "false", - "errors.0.code": 611 - } - ], - "abortable": [ - { - "success": "false", - "errors.0.code": 603 - }, - { - "success": "false", - "errors.0.code": 605 - }, - { - "success": "false", - "errors.0.code": 609 - }, - { - "success": "false", - "errors.0.code": 610 - } - ] - } - }, - "id": "1aIXqM806xAVm92nx07YwKbRrO9", - "name": "MARKETO", - "displayName": "Marketo", - "createdAt": "2020-04-09T09:24:31.794Z", - "updatedAt": "2021-01-11T11:03:28.103Z" - }, - "secretConfig": {}, - "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVke", - "name": "Marketo", - "enabled": true, - "workspaceId": "1TSN08muJTZwH8iCDmnnRt1pmMd", - "deleted": false, - "createdAt": "2022-02-10T08:39:32.005Z", - "updatedAt": "2022-09-03T16:22:31.374Z", - "transformations": [], - "isConnectionEnabled": true, - "isProcessorEnabled": true - } - } -] diff --git a/test/__tests__/data/monday.json b/test/__tests__/data/monday.json deleted file mode 100644 index cec99959da..0000000000 --- a/test/__tests__/data/monday.json +++ /dev/null @@ -1,1023 +0,0 @@ -[ - { - "description": "Track call with empty columnToPropertyMapping", - "input": { - "destination": { - "Config": { - "apiToken": "eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih", - "boardId": "339283933", - "groupTitle": "", - "columnToPropertyMapping": [], - "whitelistedEvents": [ - { - "eventName": "create an item" - } - ] - } - }, - "message": { - "event": "create an item", - "type": "track", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "user@27", - "channel": "web", - "properties": { - "name": "Task 1" - }, - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "locale": "en-US", - "screen": { - "density": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.11" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - }, - "output": { - "body": { - "FORM": {}, - "JSON": { - "query": "mutation { create_item (board_id: 339283933, item_name: \"Task 1\", column_values: \"{}\") {id}}" - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://api.monday.com/v2", - "files": {}, - "headers": { - "Authorization": "eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih", - "Content-Type": "application/json" - }, - "method": "POST", - "params": {}, - "type": "REST", - "version": "1" - } - }, - { - "description": "Track call with undefined columnToPropertyMapping", - "input": { - "destination": { - "Config": { - "apiToken": "eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih", - "boardId": "339283933", - "groupTitle": "", - "whitelistedEvents": [ - { - "eventName": "create an item" - } - ] - } - }, - "message": { - "event": "create an item", - "type": "track", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "user@27", - "channel": "web", - "properties": { - "name": "Task 1" - }, - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "locale": "en-US", - "screen": { - "density": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.11" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - }, - "output": { - "body": { - "FORM": {}, - "JSON": { - "query": "mutation { create_item (board_id: 339283933, item_name: \"Task 1\", column_values: \"{}\") {id}}" - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://api.monday.com/v2", - "files": {}, - "headers": { - "Authorization": "eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih", - "Content-Type": "application/json" - }, - "method": "POST", - "params": {}, - "type": "REST", - "version": "1" - } - }, - { - "description": "Check Unsupported message type", - "input": { - "destination": { - "Config": { - "apiToken": "eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih", - "boardId": "339283933", - "groupTitle": "", - "columnToPropertyMapping": [], - "whitelistedEvents": [ - { - "eventName": "create an item" - } - ] - } - }, - "message": { - "event": "create an item", - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "user@27", - "channel": "web", - "properties": { - "name": "Task 1" - }, - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "locale": "en-US", - "screen": { - "density": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.11" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - }, - "output": { - "error": "Event type identify is not supported" - } - }, - { - "description": "Check for empty message type", - "input": { - "destination": { - "Config": { - "apiToken": "eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih", - "boardId": "339283933", - "groupTitle": "", - "columnToPropertyMapping": [], - "whitelistedEvents": [ - { - "eventName": "create an item" - } - ] - } - }, - "message": { - "event": "create an item", - "type": "", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "user@27", - "channel": "web", - "properties": { - "name": "Task 1" - }, - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "locale": "en-US", - "screen": { - "density": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.11" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - }, - "output": { - "error": "Event type is required" - } - }, - { - "description": "Check for empty API Token", - "input": { - "destination": { - "Config": { - "apiToken": "", - "boardId": "339283933", - "groupTitle": "", - "columnToPropertyMapping": [], - "whitelistedEvents": [ - { - "eventName": "create an item" - } - ] - } - }, - "message": { - "event": "create an item", - "type": "track", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "user@27", - "channel": "web", - "properties": { - "name": "Task 1" - }, - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "locale": "en-US", - "screen": { - "density": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.11" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - }, - "output": { - "error": "ApiToken is a required field" - } - }, - { - "description": "Check for empty board Id", - "input": { - "destination": { - "Config": { - "apiToken": "eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih", - "boardId": "", - "groupTitle": "", - "columnToPropertyMapping": [], - "whitelistedEvents": [ - { - "eventName": "create an item" - } - ] - } - }, - "message": { - "event": "create an item", - "type": "track", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "user@27", - "channel": "web", - "properties": { - "name": "Task 1" - }, - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "locale": "en-US", - "screen": { - "density": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.11" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - }, - "output": { - "error": "boardId is a required field" - } - }, - { - "description": "Check for event name", - "input": { - "destination": { - "Config": { - "apiToken": "eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih", - "boardId": "339283933", - "groupTitle": "", - "columnToPropertyMapping": [], - "whitelistedEvents": [ - { - "eventName": "create an item" - } - ] - } - }, - "message": { - "event": "", - "type": "track", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "user@27", - "channel": "web", - "properties": { - "name": "Task 1" - }, - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "locale": "en-US", - "screen": { - "density": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.11" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - }, - "output": { - "error": "Event is a required field and should be a string" - } - }, - { - "description": "Track call with columnToPropertyMapping and with empty groupTitle", - "input": { - "destination": { - "Config": { - "apiToken": "eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih", - "boardId": "339283933", - "groupTitle": "", - "columnToPropertyMapping": [ - { - "from": "Status", - "to": "status" - }, - { - "from": "Email", - "to": "emailId" - } - ], - "whitelistedEvents": [ - { - "eventName": "create an item" - } - ] - } - }, - "message": { - "event": "create an item", - "type": "track", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "user@27", - "channel": "web", - "properties": { - "name": "Task 1", - "status": "Done", - "emailId": "abc@email.com", - "emailText": "emailId" - }, - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "locale": "en-US", - "screen": { - "density": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.11" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.monday.com/v2", - "headers": { - "Content-Type": "application/json", - "Authorization": "eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih" - }, - "params": {}, - "body": { - "JSON": { - "query": "mutation { create_item (board_id: 339283933, item_name: \"Task 1\", column_values: \"{\\\"status\\\":{\\\"label\\\":\\\"Done\\\"},\\\"email\\\":{\\\"email\\\":\\\"abc@email.com\\\",\\\"text\\\":\\\"emailId\\\"}}\") {id}}" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "Track call with columnToPropertyMapping and with groupTitle", - "input": { - "destination": { - "Config": { - "apiToken": "eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih", - "boardId": "339283933", - "groupTitle": "Next month", - "columnToPropertyMapping": [ - { - "from": "Status", - "to": "status" - }, - { - "from": "Email", - "to": "emailId" - } - ], - "whitelistedEvents": [ - { - "eventName": "create an item" - } - ] - } - }, - "message": { - "event": "create an item", - "type": "track", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "user@27", - "channel": "web", - "properties": { - "name": "Task 1", - "status": "Done", - "emailId": "abc@email.com", - "emailText": "emailId" - }, - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "locale": "en-US", - "screen": { - "density": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.11" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.monday.com/v2", - "headers": { - "Content-Type": "application/json", - "Authorization": "eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih" - }, - "params": {}, - "body": { - "JSON": { - "query": "mutation { create_item (board_id: 339283933, group_id: group_title item_name: \"Task 1\", column_values: \"{\\\"status\\\":{\\\"label\\\":\\\"Done\\\"},\\\"email\\\":{\\\"email\\\":\\\"abc@email.com\\\",\\\"text\\\":\\\"emailId\\\"}}\") {id}}" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "Non-existing group title check", - "input": { - "destination": { - "Config": { - "apiToken": "eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih", - "boardId": "339283933", - "groupTitle": "Next year", - "columnToPropertyMapping": [ - { - "from": "Status", - "to": "status" - }, - { - "from": "Email", - "to": "emailId" - } - ], - "whitelistedEvents": [ - { - "eventName": "create an item" - } - ] - } - }, - "message": { - "event": "create an item", - "type": "track", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "user@27", - "channel": "web", - "properties": { - "name": "Task 1", - "status": "Done", - "emailId": "abc@email.com", - "emailText": "emailId" - }, - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "locale": "en-US", - "screen": { - "density": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.11" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - }, - "output": { - "error": "Group Next year doesn't exist in the board" - } - }, - { - "description": "check for item name", - "input": { - "destination": { - "Config": { - "apiToken": "eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih", - "boardId": "339283933", - "groupTitle": "Next month", - "columnToPropertyMapping": [ - { - "from": "Status", - "to": "status" - }, - { - "from": "Email", - "to": "emailId" - } - ], - "whitelistedEvents": [ - { - "eventName": "create an item" - } - ] - } - }, - "message": { - "event": "create an item", - "type": "track", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "user@27", - "channel": "web", - "properties": { - "name": "", - "status": "Done", - "emailId": "abc@email.com", - "emailText": "emailId" - }, - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "locale": "en-US", - "screen": { - "density": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.11" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - }, - "output": { - "error": "Item name is required to create an item" - } - }, - { - "description": "Track call with columnToPropertyMapping and with groupTitle with all supported columns", - "input": { - "destination": { - "Config": { - "apiToken": "eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih", - "boardId": "339283933", - "groupTitle": "Next month", - "columnToPropertyMapping": [ - { - "from": "Status", - "to": "status" - }, - { - "from": "Email", - "to": "emailId" - }, - { - "from": "Checkbox", - "to": "checked" - }, - { - "from": "Numbers", - "to": "number" - }, - { - "from": "Name", - "to": "textKey" - }, - { - "from": "Country", - "to": "countryName" - }, - { - "from": "Location", - "to": "address" - }, - { - "from": "Phone", - "to": "phone" - }, - { - "from": "Rating", - "to": "rating" - }, - { - "from": "Link", - "to": "url" - }, - { - "from": "Long Text", - "to": "description" - }, - { - "from": "World Clock", - "to": "timezone" - } - ], - "whitelistedEvents": [ - { - "eventName": "create an item" - } - ] - } - }, - "message": { - "event": "create an item", - "type": "track", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "user@27", - "channel": "web", - "properties": { - "name": "Task 1", - "status": "Done", - "emailId": "abc@email.com", - "emailText": "emailId", - "countryCode": "US", - "latitude": "51.23", - "longitude": "35.3", - "rating": "3", - "linkText": "websiteLink", - "checked": "true", - "number": "45", - "textKey": "texting", - "countryName": "Unites States", - "countryShortName": "US", - "address": "New York", - "phone": "2626277272", - "url": "demo.com", - "description": "property description", - "timezone": "America/New_York" - }, - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "locale": "en-US", - "screen": { - "density": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.11" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.monday.com/v2", - "headers": { - "Content-Type": "application/json", - "Authorization": "eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih" - }, - "params": {}, - "body": { - "JSON": { - "query": "mutation { create_item (board_id: 339283933, group_id: group_title item_name: \"Task 1\", column_values: \"{\\\"status\\\":{\\\"label\\\":\\\"Done\\\"},\\\"email\\\":{\\\"email\\\":\\\"abc@email.com\\\",\\\"text\\\":\\\"emailId\\\"},\\\"checkbox\\\":{\\\"checked\\\":true},\\\"numbers\\\":\\\"45\\\",\\\"text\\\":\\\"texting\\\",\\\"country\\\":{\\\"countryName\\\":\\\"Unites States\\\",\\\"countryCode\\\":\\\"US\\\"},\\\"location\\\":{\\\"address\\\":\\\"New York\\\",\\\"lat\\\":\\\"51.23\\\",\\\"lng\\\":\\\"35.3\\\"},\\\"phone\\\":{\\\"phone\\\":\\\"2626277272\\\",\\\"countryShortName\\\":\\\"US\\\"},\\\"rating\\\":3,\\\"link\\\":{\\\"url\\\":\\\"demo.com\\\",\\\"text\\\":\\\"websiteLink\\\"},\\\"long_text\\\":{\\\"text\\\":\\\"property description\\\"},\\\"world_clock\\\":{\\\"timezone\\\":\\\"America/New_York\\\"}}\") {id}}" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "check for allowed event name from UI", - "input": { - "destination": { - "Config": { - "apiToken": "eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih", - "boardId": "339283933", - "groupTitle": "Next month", - "columnToPropertyMapping": [ - { - "from": "Status", - "to": "status" - }, - { - "from": "Email", - "to": "emailId" - } - ], - "whitelistedEvents": [ - { - "eventName": "" - } - ] - } - }, - "message": { - "event": "create an item", - "type": "track", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "user@27", - "channel": "web", - "properties": { - "name": "", - "status": "Done", - "emailId": "abc@email.com", - "emailText": "emailId" - }, - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "locale": "en-US", - "screen": { - "density": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.11" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - }, - "output": { - "error": "Event Discarded. To allow this event, add this in Allowlist" - } - }, - { - "description": "check for deleted boards (configured boards are deleted)", - "input": { - "destination": { - "Config": { - "apiToken": "eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih", - "boardId": "339283934", - "groupTitle": "Next year", - "columnToPropertyMapping": [ - { - "from": "Status", - "to": "status" - }, - { - "from": "Email", - "to": "emailId" - } - ], - "whitelistedEvents": [ - { - "eventName": "create an item" - } - ] - } - }, - "message": { - "event": "create an item", - "type": "track", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "user@27", - "channel": "web", - "properties": { - "name": "Task 1", - "status": "Done", - "emailId": "abc@email.com", - "emailText": "emailId" - }, - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "locale": "en-US", - "screen": { - "density": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.11" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - }, - "output": { - "error": "The board with boardId 339283934 does not exist" - } - } -] diff --git a/test/__tests__/data/monday_router_input.json b/test/__tests__/data/monday_router_input.json deleted file mode 100644 index 2770d23cb2..0000000000 --- a/test/__tests__/data/monday_router_input.json +++ /dev/null @@ -1,111 +0,0 @@ -[ - { - "destination": { - "Config": { - "apiToken": "eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih", - "boardId": "339283933", - "groupTitle": "", - "columnToPropertyMapping": [], - "whitelistedEvents": [{ "eventName": "create an item" }] - } - }, - "metadata": { - "jobId": 1 - }, - "message": { - "event": "create an item", - "type": "track", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "user@27", - "channel": "web", - "properties": { - "name": "Task 1" - }, - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "locale": "en-US", - "screen": { - "density": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.11" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - }, - { - "destination": { - "Config": { - "apiToken": "eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih", - "boardId": "339283933", - "groupTitle": "Next month", - "columnToPropertyMapping": [ - { - "from": "Status", - "to": "status" - }, - { "from": "Email", "to": "emailId" } - ], - "whitelistedEvents": [{ "eventName": "create an item" }] - } - }, - "metadata": { - "jobId": 2 - }, - "message": { - "event": "create an item", - "type": "track", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "user@27", - "channel": "web", - "properties": { - "name": "Task 1", - "status": "Done", - "emailId": "abc@email.com", - "emailText": "emailId" - }, - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "locale": "en-US", - "screen": { - "density": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.11" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - } -] diff --git a/test/__tests__/data/monday_router_output.json b/test/__tests__/data/monday_router_output.json deleted file mode 100644 index b0beb35a10..0000000000 --- a/test/__tests__/data/monday_router_output.json +++ /dev/null @@ -1,84 +0,0 @@ -[ - { - "batchedRequest": { - "body": { - "FORM": {}, - "JSON": { - "query": "mutation { create_item (board_id: 339283933, item_name: \"Task 1\", column_values: \"{}\") {id}}" - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://api.monday.com/v2", - "files": {}, - "headers": { - "Authorization": "eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih", - "Content-Type": "application/json" - }, - "method": "POST", - "params": {}, - "type": "REST", - "version": "1" - }, - "metadata": [ - { - "jobId": 1 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "apiToken": "eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih", - "boardId": "339283933", - "groupTitle": "", - "columnToPropertyMapping": [], - "whitelistedEvents": [{ "eventName": "create an item" }] - } - } - }, - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.monday.com/v2", - "headers": { - "Content-Type": "application/json", - "Authorization": "eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih" - }, - "params": {}, - "body": { - "JSON": { - "query": "mutation { create_item (board_id: 339283933, group_id: group_title item_name: \"Task 1\", column_values: \"{\\\"status\\\":{\\\"label\\\":\\\"Done\\\"},\\\"email\\\":{\\\"email\\\":\\\"abc@email.com\\\",\\\"text\\\":\\\"emailId\\\"}}\") {id}}" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "jobId": 2 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "apiToken": "eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih", - "boardId": "339283933", - "groupTitle": "Next month", - "columnToPropertyMapping": [ - { - "from": "Status", - "to": "status" - }, - { "from": "Email", "to": "emailId" } - ], - "whitelistedEvents": [{ "eventName": "create an item" }] - } - } - } -] diff --git a/test/__tests__/data/profitwell_input.json b/test/__tests__/data/profitwell_input.json deleted file mode 100644 index e73a17ad37..0000000000 --- a/test/__tests__/data/profitwell_input.json +++ /dev/null @@ -1,719 +0,0 @@ -[ - { - "destination": { - "Config": { - "privateApiKey": "9270161a8e5abaa0e56efddfd9dbcb62" - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.9" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.9" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "email": "sample@sample.com", - "planId": "23", - "planInterval": "month", - "planCurrency": "usd", - "value": "23", - "subscriptionAlias": "samual", - "status": "active" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36" - }, - "messageId": "6a5f38c0-4e75-4268-a066-2b73fbcad01f", - "originalTimestamp": "2021-01-04T08:25:04.780Z", - "receivedAt": "2021-01-04T13:55:04.799+05:30", - "request_ip": "[::1]", - "rudderId": "79881a62-980a-4d76-89ca-7099440f8c13", - "sentAt": "2021-01-04T08:25:04.781Z", - "timestamp": "2021-09-06T14:15:06.798+05:30", - "type": "identify" - } - }, - { - "destination": { - "Config": { - "privateApiKey": "9270161a8e5abaa0e56efddfd9dbcb62" - } - }, - "message": { - "channel": "web", - "context": { - "externalId": [ - { - "type": "profitwellUserId", - "id": "23453" - } - ], - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.9" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.9" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "email": "sample@sample.com", - "planId": "23", - "planInterval": "month", - "planCurrency": "usd", - "value": "23", - "subscriptionAlias": "samual", - "status": "active" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36" - }, - "messageId": "6a5f38c0-4e75-4268-a066-2b73fbcad01f", - "originalTimestamp": "2021-01-04T08:25:04.780Z", - "receivedAt": "2021-01-04T13:55:04.799+05:30", - "request_ip": "[::1]", - "rudderId": "79881a62-980a-4d76-89ca-7099440f8c13", - "sentAt": "2021-01-04T08:25:04.781Z", - "timestamp": "2021-09-06T14:15:06.798+05:30", - "type": "identify" - } - }, - { - "destination": { - "Config": { - "privateApiKey": "9270161a8e5abaa0e56efddfd9dbcb62" - } - }, - "message": { - "channel": "web", - "userId": "sp_245", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.9" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.9" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - - "traits": { - "email": "sample@sample.com", - "planId": "23", - "planInterval": "month", - "planCurrency": "usd", - "value": "23", - "subscriptionAlias": "samual", - "status": "active" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36" - }, - "messageId": "6a5f38c0-4e75-4268-a066-2b73fbcad01f", - "originalTimestamp": "2021-01-04T08:25:04.780Z", - "receivedAt": "2021-01-04T13:55:04.799+05:30", - "request_ip": "[::1]", - "rudderId": "79881a62-980a-4d76-89ca-7099440f8c13", - "sentAt": "2021-01-04T08:25:04.781Z", - "timestamp": "2021-09-06T14:15:06.798+05:30", - "type": "identify" - } - }, - { - "destination": { - "Config": { - "privateApiKey": "9270161a8e5abaa0e56efddfd9dbcb62" - } - }, - "message": { - "channel": "web", - "userId": "sp_245", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.9" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.9" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "email": "sample@sample.com", - "planId": "23", - "planInterval": "month", - "planCurrency": "usd", - "value": "23", - "status": "active" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36" - }, - "messageId": "6a5f38c0-4e75-4268-a066-2b73fbcad01f", - "originalTimestamp": "2021-01-04T08:25:04.780Z", - "receivedAt": "2021-01-04T13:55:04.799+05:30", - "request_ip": "[::1]", - "rudderId": "79881a62-980a-4d76-89ca-7099440f8c13", - "sentAt": "2021-01-04T08:25:04.781Z", - "timestamp": "2021-09-06T14:15:06.798+05:30", - "type": "identify" - } - }, - { - "destination": { - "Config": { - "privateApiKey": "9270161a8e5abaa0e56efddfd9dbcb62" - } - }, - "message": { - "channel": "web", - "userId": "sp_245", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.9" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.9" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "profitwellUserId", - "id": "1234" - } - ], - "traits": { - "email": "sample@sample.com", - "planId": "23", - "planInterval": "month", - "planCurrency": "usd", - "value": "23", - "subscriptionAlias": "samual", - "status": "active" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36" - }, - "messageId": "6a5f38c0-4e75-4268-a066-2b73fbcad01f", - "originalTimestamp": "2021-01-04T08:25:04.780Z", - "receivedAt": "2021-01-04T13:55:04.799+05:30", - "request_ip": "[::1]", - "rudderId": "79881a62-980a-4d76-89ca-7099440f8c13", - "sentAt": "2021-01-04T08:25:04.781Z", - "timestamp": "2021-09-06T14:15:06.798+05:30", - "type": "identify" - } - }, - { - "destination": { - "Config": { - "privateApiKey": "9270161a8e5abaa0e56efddfd9dbcb62" - } - }, - "message": { - "channel": "web", - "userId": "sp_245", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.9" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.9" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "profitwellUserId", - "id": "pwu_Oea7HXV3bnTP" - } - ], - "traits": { - "email": "sample@sample.com", - "planId": "23", - "planInterval": "month", - "planCurrency": "usd", - "value": "23", - "subscriptionAlias": "samual", - "status": "active" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36" - }, - "messageId": "6a5f38c0-4e75-4268-a066-2b73fbcad01f", - "originalTimestamp": "2021-01-04T08:25:04.780Z", - "receivedAt": "2021-01-04T13:55:04.799+05:30", - "request_ip": "[::1]", - "rudderId": "79881a62-980a-4d76-89ca-7099440f8c13", - "sentAt": "2021-01-04T08:25:04.781Z", - "timestamp": "2021-09-06T14:15:06.798+05:30", - "type": "identify" - } - }, - { - "destination": { - "Config": { - "privateApiKey": "9270161a8e5abaa0e56efddfd9dbcb62" - } - }, - "message": { - "channel": "web", - "userId": "sp_245", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.9" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.9" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "profitwellUserId", - "id": "pwu_Oea7HXV3bnTP" - }, - { - "type": "profitwellSubscriptionId", - "id": "pws_FecTCEyo17rV" - } - ], - "traits": { - "email": "sample@sample.com", - "planId": "23", - "planInterval": "month", - "planCurrency": "usd", - "value": "23", - "subscriptionAlias": "samual", - "status": "active" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36" - }, - "messageId": "6a5f38c0-4e75-4268-a066-2b73fbcad01f", - "originalTimestamp": "2021-01-04T08:25:04.780Z", - "receivedAt": "2021-01-04T13:55:04.799+05:30", - "request_ip": "[::1]", - "rudderId": "79881a62-980a-4d76-89ca-7099440f8c13", - "sentAt": "2021-01-04T08:25:04.781Z", - "timestamp": "2021-09-06T14:15:06.798+05:30", - "type": "identify" - } - }, - { - "destination": { - "Config": { - "privateApiKey": "9270161a8e5abaa0e56efddfd9dbcb62" - } - }, - "message": { - "channel": "web", - "userId": "sp_245", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.9" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.9" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "profitwellUserId", - "id": "pwu_Oea7HXV3bnTP" - }, - { - "type": "profitwellSubscriptionId", - "id": "pws_FecTCEyo17rV" - } - ], - "traits": { - "email": "sample@sample.com", - "planId": "23", - "planInterval": "month", - "planCurrency": "usd", - "value": "23", - "subscriptionAlias": "samual", - "status": "active", - "effectiveDate": "1609748705" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36" - }, - "messageId": "6a5f38c0-4e75-4268-a066-2b73fbcad01f", - "originalTimestamp": "2021-01-04T08:25:04.780Z", - "receivedAt": "2021-01-04T13:55:04.799+05:30", - "request_ip": "[::1]", - "rudderId": "79881a62-980a-4d76-89ca-7099440f8c13", - "sentAt": "2021-01-04T08:25:04.781Z", - "timestamp": "2021-09-06T14:15:06.798+05:30", - "type": "identify" - } - }, - { - "destination": { - "Config": { - "privateApiKey": "9270161a8e5abaa0e56efddfd9dbcb62" - } - }, - "message": { - "channel": "web", - "userId": "sp_245", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.9" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.9" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "profitwellUserId", - "id": "pwu_Oea7HXV3bnTP" - }, - { - "type": "profitwellSubscriptionId", - "id": "pws_FecTCEyo17rV" - } - ], - "traits": { - "email": "sample@sample.com", - "planId": "23", - "planInterval": "monthly", - "planCurrency": "usd", - "value": "23", - "subscriptionAlias": "samual", - "status": "active", - "effectiveDate": "1609748705" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36" - }, - "messageId": "6a5f38c0-4e75-4268-a066-2b73fbcad01f", - "originalTimestamp": "2021-01-04T08:25:04.780Z", - "receivedAt": "2021-01-04T13:55:04.799+05:30", - "request_ip": "[::1]", - "rudderId": "79881a62-980a-4d76-89ca-7099440f8c13", - "sentAt": "2021-01-04T08:25:04.781Z", - "timestamp": "2021-09-06T14:15:06.798+05:30", - "type": "identify" - } - }, - { - "destination": { - "Config": { - "privateApiKey": "9270161a8e5abaa0e56efddfd9dbcb62" - } - }, - "message": { - "channel": "web", - "userId": "sp_245", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.9" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.9" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "profitwellUserId", - "id": "pwu_Oea7HXV3bnTP" - }, - { - "type": "profitwellSubscriptionId", - "id": "pws_FecTCEyo17rV" - } - ], - "traits": { - "email": "sample@sample.com", - "planId": "23", - "planInterval": "month", - "planCurrency": "usd", - "value": "23", - "subscriptionAlias": "samual", - "status": "activate", - "effectiveDate": "1609748705" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36" - }, - "messageId": "6a5f38c0-4e75-4268-a066-2b73fbcad01f", - "originalTimestamp": "2021-01-04T08:25:04.780Z", - "receivedAt": "2021-01-04T13:55:04.799+05:30", - "request_ip": "[::1]", - "rudderId": "79881a62-980a-4d76-89ca-7099440f8c13", - "sentAt": "2021-01-04T08:25:04.781Z", - "timestamp": "2021-09-06T14:15:06.798+05:30", - "type": "identify" - } - }, - { - "destination": { - "Config": {} - }, - "message": { - "channel": "web", - "userId": "sp_245", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.9" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.9" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "profitwellUserId", - "id": "pwu_Oea7HXV3bnTP" - }, - { - "type": "profitwellSubscriptionId", - "id": "pws_FecTCEyo17rV" - } - ], - "traits": { - "email": "sample@sample.com", - "planId": "23", - "planInterval": "month", - "planCurrency": "usd", - "value": "23", - "subscriptionAlias": "samual", - "status": "active", - "effectiveDate": "1609748705" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36" - }, - "messageId": "6a5f38c0-4e75-4268-a066-2b73fbcad01f", - "originalTimestamp": "2021-01-04T08:25:04.780Z", - "receivedAt": "2021-01-04T13:55:04.799+05:30", - "request_ip": "[::1]", - "rudderId": "79881a62-980a-4d76-89ca-7099440f8c13", - "sentAt": "2021-01-04T08:25:04.781Z", - "timestamp": "2021-09-06T14:15:06.798+05:30", - "type": "identify" - } - }, - { - "destination": { - "Config": { - "privateApiKey": "9270161a8e5abaa0e56efddfd9dbcb62" - } - }, - "message": { - "channel": "web", - "userId": "sp_245", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.9" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.9" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "externalId": [ - { - "type": "profitwellUserId", - "id": "pwu_Oea7HXV3bnTP" - }, - { - "type": "profitwellSubscriptionId", - "id": "pws_FecTCEyo17" - } - ], - "traits": { - "email": "sample@sample.com", - "planId": "23", - "planInterval": "month", - "planCurrency": "usd", - "value": "23", - "subscriptionAlias": "samual", - "status": "active", - "effectiveDate": "1609748705" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36" - }, - "messageId": "6a5f38c0-4e75-4268-a066-2b73fbcad01f", - "originalTimestamp": "2021-01-04T08:25:04.780Z", - "receivedAt": "2021-01-04T13:55:04.799+05:30", - "request_ip": "[::1]", - "rudderId": "79881a62-980a-4d76-89ca-7099440f8c13", - "sentAt": "2021-01-04T08:25:04.781Z", - "timestamp": "2021-09-06T14:15:06.798+05:30", - "type": "identify" - } - }, - { - "destination": { - "Config": { - "privateApiKey": "9270161a8e5abaa0e56efddfd9dbcb62" - } - }, - "message": { - "channel": "web", - "userId": "sp_245", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.9" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.9" - }, - "locale": "en-GB", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - }, - "traits": { - "email": "sample@sample.com", - "planId": "23", - "planInterval": "month", - "planCurrency": "usd", - "value": "23", - "subscriptionAlias": "samual", - "status": "active", - "effectiveDate": 1609748705 - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36" - }, - "messageId": "6a5f38c0-4e75-4268-a066-2b73fbcad01f", - "originalTimestamp": "2021-01-04T08:25:04.780Z", - "receivedAt": "2021-01-04T13:55:04.799+05:30", - "request_ip": "[::1]", - "rudderId": "79881a62-980a-4d76-89ca-7099440f8c13", - "sentAt": "2021-01-04T08:25:04.781Z", - "timestamp": "2021-09-06T14:15:06.798+05:30", - "type": "identify" - } - } -] diff --git a/test/__tests__/data/profitwell_output.json b/test/__tests__/data/profitwell_output.json deleted file mode 100644 index 04be6d990f..0000000000 --- a/test/__tests__/data/profitwell_output.json +++ /dev/null @@ -1,166 +0,0 @@ -[ - { - "statusCode": 400, - "error": "userId or userAlias is required for identify" - }, - { - "statusCode": 400, - "error": "No user found for profitwell user_id" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.profitwell.com/v2/subscriptions/", - "headers": { - "Content-Type": "application/json", - "Authorization": "9270161a8e5abaa0e56efddfd9dbcb62" - }, - "params": {}, - "body": { - "JSON": { - "subscription_alias": "samual", - "email": "sample@sample.com", - "plan_id": "23", - "plan_interval": "month", - "plan_currency": "usd", - "status": "active", - "value": "23", - "user_alias": "sp_245", - "effective_date": 1630917906 - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - { - "statusCode": 400, - "error": "subscriptionId or subscriptionAlias is required for identify" - }, - { - "statusCode": 400, - "error": "No user found for profitwell user_id" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.profitwell.com/v2/subscriptions/", - "headers": { - "Content-Type": "application/json", - "Authorization": "9270161a8e5abaa0e56efddfd9dbcb62" - }, - "params": {}, - "body": { - "JSON": { - "subscription_alias": "samual", - "email": "sample@sample.com", - "plan_id": "23", - "plan_interval": "month", - "plan_currency": "usd", - "status": "active", - "value": "23", - "user_id": "pwu_Oea7HXV3bnTP", - "user_alias": "sp_245", - "effective_date": 1630917906 - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - { - "statusCode": 400, - "error": "Missing required value from [\"traits.effectiveDate\",\"context.traits.effectiveDate\"]" - }, - { - "version": "1", - "type": "REST", - "method": "PUT", - "endpoint": "https://api.profitwell.com/v2/subscriptions/pws_FecTCEyo17rV/", - "headers": { - "Content-Type": "application/json", - "Authorization": "9270161a8e5abaa0e56efddfd9dbcb62" - }, - "params": {}, - "body": { - "JSON": { - "plan_id": "23", - "plan_interval": "month", - "value": "23", - "status": "active", - "effective_date": 1609748705 - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - { - "statusCode": 400, - "error": "invalid format for planInterval. Aborting" - }, - { - "version": "1", - "type": "REST", - "method": "PUT", - "endpoint": "https://api.profitwell.com/v2/subscriptions/pws_FecTCEyo17rV/", - "headers": { - "Content-Type": "application/json", - "Authorization": "9270161a8e5abaa0e56efddfd9dbcb62" - }, - "params": {}, - "body": { - "JSON": { - "plan_id": "23", - "plan_interval": "month", - "value": "23", - "effective_date": 1609748705 - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - { - "statusCode": 400, - "error": "Private API Key not found. Aborting." - }, - { - "statusCode": 400, - "error": "Profitwell subscription_id not found" - }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.profitwell.com/v2/subscriptions/", - "headers": { - "Content-Type": "application/json", - "Authorization": "9270161a8e5abaa0e56efddfd9dbcb62" - }, - "params": {}, - "body": { - "JSON": { - "subscription_alias": "samual", - "email": "sample@sample.com", - "plan_id": "23", - "plan_interval": "month", - "plan_currency": "usd", - "status": "active", - "value": "23", - "effective_date": 1609748705, - "user_alias": "sp_245" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } -] diff --git a/test/__tests__/data/profitwell_router_input.json b/test/__tests__/data/profitwell_router_input.json deleted file mode 100644 index 50903283a7..0000000000 --- a/test/__tests__/data/profitwell_router_input.json +++ /dev/null @@ -1,45 +0,0 @@ -[ - { - "destination": { - "Config": { - "privateApiKey": "9270161a8e5abaa0e56efddfd9dbcb62" - } - }, - "metadata": { - "jobId": 2 - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { "name": "", "version": "" }, - "screen": { "density": 2 } - }, - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "type": "identify", - "userId": "samual", - "traits": { - "email": "sample@sample.com", - "planId": "23", - "planInterval": "month", - "planCurrency": "usd", - "value": "23", - "subscriptionAlias": "samual", - "status": "active" - }, - "integrations": { "All": true }, - "sentAt": "2019-10-14T09:03:22.563Z" - } - } -] diff --git a/test/__tests__/data/profitwell_router_output.json b/test/__tests__/data/profitwell_router_output.json deleted file mode 100644 index ca98903838..0000000000 --- a/test/__tests__/data/profitwell_router_output.json +++ /dev/null @@ -1,44 +0,0 @@ -[ - { - "batchedRequest": { - "body": { - "XML": {}, - "FORM": {}, - "JSON": { - "subscription_alias": "samual", - "email": "sample@sample.com", - "plan_id": "23", - "plan_interval": "month", - "plan_currency": "usd", - "status": "active", - "value": "23", - "user_alias": "samual", - "effective_date": 1571043797 - }, - "JSON_ARRAY": {} - }, - "type": "REST", - "files": {}, - "method": "POST", - "params": {}, - "headers": { - "Content-Type": "application/json", - "Authorization": "9270161a8e5abaa0e56efddfd9dbcb62" - }, - "version": "1", - "endpoint": "https://api.profitwell.com/v2/subscriptions/" - }, - "metadata": [ - { - "jobId": 2 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "privateApiKey": "9270161a8e5abaa0e56efddfd9dbcb62" - } - } - } -] diff --git a/test/__tests__/data/sendinblue.json b/test/__tests__/data/sendinblue.json deleted file mode 100644 index 06b6df14d9..0000000000 --- a/test/__tests__/data/sendinblue.json +++ /dev/null @@ -1,1196 +0,0 @@ -[ - { - "description": "Page call without email or phone", - "input": { - "message": { - "type": "page", - "sentAt": "2021-01-03T17:02:53.195Z", - "channel": "web", - "name": "New Page", - "properties": { - "url": "https://www.google.com/", - "title": "Google home" - }, - "context": { - "traits": {}, - "page": { - "url": "http://127.0.0.1:7307/Testing/test/ourSdk.html", - "path": "/Testing/test/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/test/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/test/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - } - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - }, - "destination": { - "Config": { - "apiKey": "apiKey123", - "clientKey": "clientKey123", - "doi": false - } - } - }, - "output": { - "error": "At least one of `email` or `phone` is required" - } - }, - { - "description": "Page call", - "input": { - "message": { - "type": "page", - "sentAt": "2021-01-03T17:02:53.195Z", - "channel": "web", - "name": "New Page", - "properties": { - "url": "https://www.google.com/", - "title": "Google home" - }, - "context": { - "traits": { - "email": "john_doe@example.com" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/test/ourSdk.html", - "path": "/Testing/test/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/test/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/test/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - } - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - }, - "destination": { - "Config": { - "apiKey": "apiKey123", - "clientKey": "clientKey123", - "templateId": 3, - "doi": false, - "redirectionUrl": "https://app.sendinblue.com/marketing-dashboard" - } - } - }, - "output": { - "body": { - "FORM": {}, - "JSON": { - "email": "john_doe@example.com", - "page": "https://www.google.com/", - "properties": { - "ma_path": "/Testing/test/ourSdk.html", - "ma_referrer": "http://127.0.0.1:7307/Testing/test/", - "ma_title": "Google home", - "sib_name": "New Page" - } - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://in-automate.sendinblue.com/api/v2/trackPage", - "files": {}, - "headers": { - "Content-Type": "application/json", - "ma-key": "clientKey123" - }, - "method": "POST", - "params": {}, - "type": "REST", - "version": "1" - } - }, - { - "description": "Track call without email or phone", - "input": { - "message": { - "type": "track", - "sentAt": "2021-01-03T17:02:53.195Z", - "channel": "web", - "event": "Order Completed", - "properties": {}, - "context": { - "traits": { - "first_name": "John", - "lastName": "Doe" - } - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - }, - "destination": { - "Config": { - "apiKey": "apiKey123", - "clientKey": "clientKey123", - "doi": false - } - } - }, - "output": { - "error": "At least one of `email` or `phone` is required" - } - }, - { - "description": "Track call without event", - "input": { - "message": { - "type": "track", - "sentAt": "2021-01-03T17:02:53.195Z", - "channel": "web", - "properties": {}, - "context": {} - }, - "destination": { - "Config": { - "apiKey": "apiKey123", - "clientKey": "clientKey123", - "doi": false - } - } - }, - "output": { - "error": "Event name is required" - } - }, - { - "description": "Track events with sendTraitsInTrack flag set to true", - "input": { - "message": { - "type": "track", - "sentAt": "2021-01-03T17:02:53.195Z", - "channel": "web", - "event": "Order Completed", - "properties": {}, - "context": { - "traits": { - "first_name": "John", - "lastName": "Doe", - "age": 19, - "email": "john_doe@example.com", - "phone": "+919876543210", - "location": "Mumbai", - "role": "SDE" - } - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - }, - "destination": { - "Config": { - "apiKey": "apiKey123", - "clientKey": "clientKey123", - "doi": false, - "sendTraitsInTrack": true - } - } - }, - "output": { - "body": { - "FORM": {}, - "JSON": { - "email": "john_doe@example.com", - "event": "Order Completed", - "eventdata": {}, - "properties": { - "FIRSTNAME": "John", - "LASTNAME": "Doe", - "SMS": "+919876543210", - "age": 19, - "location": "Mumbai", - "role": "SDE" - } - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://in-automate.sendinblue.com/api/v2/trackEvent", - "files": {}, - "headers": { - "Content-Type": "application/json", - "ma-key": "clientKey123" - }, - "method": "POST", - "params": {}, - "type": "REST", - "version": "1" - } - }, - { - "description": "Track events with contactAttributeMapping provided in webapp", - "input": { - "message": { - "type": "track", - "sentAt": "2021-01-03T17:02:53.195Z", - "channel": "web", - "event": "Order Completed", - "properties": {}, - "context": { - "traits": { - "first_name": "John", - "lastName": "Doe", - "age": 19, - "email": "john_doe@example.com", - "phone": "+919876543210", - "location": "Mumbai", - "role": "SDE" - } - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - }, - "destination": { - "Config": { - "apiKey": "apiKey123", - "clientKey": "clientKey123", - "doi": false, - "contactAttributeMapping": [ - { - "from": "location", - "to": "LOCATION" - } - ], - "sendTraitsInTrack": true - } - } - }, - "output": { - "body": { - "FORM": {}, - "JSON": { - "email": "john_doe@example.com", - "event": "Order Completed", - "eventdata": {}, - "properties": { - "FIRSTNAME": "John", - "LASTNAME": "Doe", - "LOCATION": "Mumbai", - "SMS": "+919876543210", - "age": 19, - "role": "SDE" - } - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://in-automate.sendinblue.com/api/v2/trackEvent", - "files": {}, - "headers": { - "Content-Type": "application/json", - "ma-key": "clientKey123" - }, - "method": "POST", - "params": {}, - "type": "REST", - "version": "1" - } - }, - { - "description": "Track events with propertiesIdKey provided in integration object", - "input": { - "message": { - "type": "track", - "sentAt": "2021-01-03T17:02:53.195Z", - "channel": "web", - "event": "Order Completed", - "properties": { - "orderId": "1341394-3812392190", - "products": [ - { - "product_id": 1234, - "product_name": "Track Pants", - "amount": 1, - "price": 220 - }, - { - "product_id": 5768, - "product_name": "T-Shirt", - "amount": 5, - "price": 1058 - } - ] - }, - "context": { - "traits": { - "first_name": "John", - "lastName": "Doe", - "age": 19, - "email": "john_doe@example.com", - "phone": "+919876543210", - "location": "Mumbai", - "role": "SDE" - } - }, - "integrations": { - "All": true, - "sendinblue": { - "propertiesIdKey": "orderId" - } - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - }, - "destination": { - "Config": { - "apiKey": "apiKey123", - "clientKey": "clientKey123", - "doi": false, - "contactAttributeMapping": [ - { - "from": "location", - "to": "LOCATION" - } - ], - "sendTraitsInTrack": true - } - } - }, - "output": { - "body": { - "FORM": {}, - "JSON": { - "email": "john_doe@example.com", - "event": "Order Completed", - "eventdata": { - "data": { - "orderId": "1341394-3812392190", - "products": [ - { - "amount": 1, - "price": 220, - "product_id": 1234, - "product_name": "Track Pants" - }, - { - "amount": 5, - "price": 1058, - "product_id": 5768, - "product_name": "T-Shirt" - } - ] - }, - "id": "1341394-3812392190" - }, - "properties": { - "FIRSTNAME": "John", - "LASTNAME": "Doe", - "LOCATION": "Mumbai", - "SMS": "+919876543210", - "age": 19, - "role": "SDE" - } - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://in-automate.sendinblue.com/api/v2/trackEvent", - "files": {}, - "headers": { - "Content-Type": "application/json", - "ma-key": "clientKey123" - }, - "method": "POST", - "params": {}, - "type": "REST", - "version": "1" - } - }, - { - "description": "Track events with eventdata.id taken from messageId", - "input": { - "message": { - "type": "track", - "sentAt": "2021-01-03T17:02:53.195Z", - "channel": "web", - "event": "Order Completed", - "properties": { - "orderId": "1341394-3812392190", - "products": [ - { - "product_id": 1234, - "product_name": "Track Pants", - "amount": 1, - "price": 220 - }, - { - "product_id": 5768, - "product_name": "T-Shirt", - "amount": 5, - "price": 1058 - } - ] - }, - "context": { - "traits": { - "first_name": "John", - "lastName": "Doe", - "age": 19, - "email": "john_doe@example.com", - "phone": "+919876543210", - "location": "Mumbai", - "role": "SDE" - } - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - }, - "destination": { - "Config": { - "apiKey": "apiKey123", - "clientKey": "clientKey123", - "doi": false, - "contactAttributeMapping": [ - { - "from": "location", - "to": "LOCATION" - } - ], - "sendTraitsInTrack": true - } - } - }, - "output": { - "body": { - "FORM": {}, - "JSON": { - "email": "john_doe@example.com", - "event": "Order Completed", - "eventdata": { - "data": { - "orderId": "1341394-3812392190", - "products": [ - { - "amount": 1, - "price": 220, - "product_id": 1234, - "product_name": "Track Pants" - }, - { - "amount": 5, - "price": 1058, - "product_id": 5768, - "product_name": "T-Shirt" - } - ] - }, - "id": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff" - }, - "properties": { - "FIRSTNAME": "John", - "LASTNAME": "Doe", - "LOCATION": "Mumbai", - "SMS": "+919876543210", - "age": 19, - "role": "SDE" - } - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://in-automate.sendinblue.com/api/v2/trackEvent", - "files": {}, - "headers": { - "Content-Type": "application/json", - "ma-key": "clientKey123" - }, - "method": "POST", - "params": {}, - "type": "REST", - "version": "1" - } - }, - { - "description": "Track link without email or phone", - "input": { - "message": { - "type": "track", - "sentAt": "2021-01-03T17:02:53.195Z", - "channel": "web", - "event": "trackLink", - "properties": { - "link": "https://www.google.com/gmail/", - "emailCount": 19 - }, - "context": { - "traits": {} - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - }, - "destination": { - "Config": { - "apiKey": "apiKey123", - "clientKey": "clientKey123", - "doi": false - } - } - }, - "output": { - "error": "At least one of `email` or `phone` is required" - } - }, - { - "description": "Track link without link", - "input": { - "message": { - "type": "track", - "sentAt": "2021-01-03T17:02:53.195Z", - "channel": "web", - "event": "trackLink", - "properties": {}, - "context": { - "traits": { - "phone": "+919507545089" - } - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - }, - "destination": { - "Config": { - "apiKey": "apiKey123", - "clientKey": "clientKey123", - "doi": false - } - } - }, - "output": { - "error": "Missing required value from \"properties.link\"" - } - }, - { - "description": "Track link", - "input": { - "message": { - "type": "track", - "sentAt": "2021-01-03T17:02:53.195Z", - "channel": "web", - "event": "trackLink", - "properties": { - "link": "https://www.google.com/gmail/", - "emailCount": 19 - }, - "context": { - "traits": { - "phone": "+919507545089" - } - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - }, - "destination": { - "Config": { - "apiKey": "apiKey123", - "clientKey": "clientKey123", - "doi": false - } - } - }, - "output": { - "body": { - "FORM": {}, - "JSON": { - "email": "919507545089@mailin-sms.com", - "link": "https://www.google.com/gmail/", - "properties": { - "emailCount": 19 - } - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://in-automate.sendinblue.com/api/v2/trackLink", - "files": {}, - "headers": { - "Content-Type": "application/json", - "ma-key": "clientKey123" - }, - "method": "POST", - "params": {}, - "type": "REST", - "version": "1" - } - }, - { - "description": "Identify call with invalid email", - "input": { - "message": { - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "channel": "web", - "traits": { "email": "abc.com" }, - "context": {}, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - }, - "destination": { - "Config": { - "apiKey": "apiKey123", - "clientKey": "clientKey123", - "doi": false - } - } - }, - "output": { - "error": "The provided email is invalid" - } - }, - { - "description": "Identify call with invalid phone number", - "input": { - "message": { - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "channel": "web", - "traits": { "phone": "99999999" }, - "context": {}, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - }, - "destination": { - "Config": { - "apiKey": "apiKey123", - "clientKey": "clientKey123", - "doi": false - } - } - }, - "output": { - "error": "The provided phone number is invalid" - } - }, - { - "description": "Identify call to create or update a contact without email or phone", - "input": { - "message": { - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "channel": "web", - "context": {}, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - }, - "destination": { - "Config": { - "apiKey": "apiKey123", - "clientKey": "clientKey123", - "doi": false - } - } - }, - "output": { - "error": "At least one of `email` or `phone` is required" - } - }, - { - "description": "Identify call to create or update a contact", - "input": { - "message": { - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "channel": "web", - "traits": { - "first_name": "John", - "lastName": "Doe", - "age": 19, - "email": "john_doe@example.com", - "phone": "+919876543210", - "location": "Mumbai", - "newEmail": "alex_root@example.com", - "role": "SDE" - }, - "context": { - "externalId": [ - { - "type": "sendinblueIncludeListIds", - "id": [1, 2] - } - ] - }, - "integrations": { - "All": true, - "sendinblue": { - "emailBlacklisted": true - } - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - }, - "destination": { - "Config": { - "apiKey": "apiKey123", - "clientKey": "clientKey123", - "doi": false, - "contactAttributeMapping": [ - { - "from": "location", - "to": "LOCATION" - } - ] - } - } - }, - "output": { - "body": { - "FORM": {}, - "JSON": { - "attributes": { - "FIRSTNAME": "John", - "LASTNAME": "Doe", - "LOCATION": "Mumbai", - "SMS": "+919876543210", - "EMAIL": "alex_root@example.com", - "age": 19, - "role": "SDE" - }, - "email": "john_doe@example.com", - "emailBlacklisted": true, - "listIds": [1, 2], - "updateEnabled": true - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://api.sendinblue.com/v3/contacts", - "files": {}, - "headers": { - "Content-Type": "application/json", - "api-key": "apiKey123" - }, - "method": "POST", - "params": {}, - "type": "REST", - "version": "1" - } - }, - { - "description": "Identify call to create DOI contact with templatedId from externalId", - "input": { - "message": { - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "channel": "web", - "traits": { - "first_name": "John", - "lastName": "Doe", - "age": 19, - "email": "john_doe@example.com", - "phone": "+919876543210", - "location": "Mumbai", - "role": "SDE" - }, - "context": { - "externalId": [ - { - "type": "sendinblueIncludeListIds", - "id": [1, 2] - }, - { - "type": "sendinblueUnlinkListIds", - "id": [5] - }, - { - "type": "sendinblueTemplateId", - "id": 2 - } - ] - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - }, - "destination": { - "Config": { - "apiKey": "apiKey123", - "clientKey": "clientKey123", - "templateId": 3, - "doi": true, - "redirectionUrl": "https://app.sendinblue.com/marketing-dashboard" - } - } - }, - "output": { - "body": { - "FORM": {}, - "JSON": { - "attributes": { - "FIRSTNAME": "John", - "LASTNAME": "Doe", - "SMS": "+919876543210", - "age": 19, - "location": "Mumbai", - "role": "SDE" - }, - "email": "john_doe@example.com", - "includeListIds": [1, 2], - "redirectionUrl": "https://app.sendinblue.com/marketing-dashboard", - "templateId": 3 - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://api.sendinblue.com/v3/contacts/doubleOptinConfirmation", - "files": {}, - "headers": { - "Content-Type": "application/json", - "api-key": "apiKey123" - }, - "method": "POST", - "params": {}, - "type": "REST", - "version": "1" - } - }, - { - "description": "Identify call to create DOI contact without include list Ids", - "input": { - "message": { - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "channel": "web", - "traits": { - "first_name": "John", - "lastName": "Doe", - "age": 19, - "email": "john_doe@example.com", - "phone": "+919876543210", - "location": "Mumbai", - "role": "SDE" - }, - "context": {}, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - }, - "destination": { - "Config": { - "apiKey": "apiKey123", - "clientKey": "clientKey123", - "templateId": 3, - "doi": true, - "redirectionUrl": "https://app.sendinblue.com/marketing-dashboard" - } - } - }, - "output": { - "error": "sendinblueIncludeListIds is required to create a contact using DOI" - } - }, - { - "description": "Identify call to create DOI contact without template Id", - "input": { - "message": { - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "channel": "web", - "traits": { - "first_name": "John", - "lastName": "Doe", - "age": 19, - "email": "john_doe@example.com", - "phone": "+919876543210", - "location": "Mumbai", - "role": "SDE" - }, - "context": {}, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - }, - "destination": { - "Config": { - "apiKey": "apiKey123", - "clientKey": "clientKey123", - "doi": true, - "redirectionUrl": "https://app.sendinblue.com/marketing-dashboard" - } - } - }, - "output": { - "error": "templateId is required to create a contact using DOI" - } - }, - { - "description": "Identify call to update a DOI contact without an email or contact ID", - "input": { - "message": { - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "channel": "web", - "traits": { - "first_name": "Gordon", - "lastName": "Pittman", - "age": 19, - "location": "Mumbai", - "role": "SDE" - }, - "context": {}, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - }, - "destination": { - "Config": { - "apiKey": "apiKey123", - "clientKey": "clientKey123", - "templateId": 3, - "doi": true, - "redirectionUrl": "https://app.sendinblue.com/marketing-dashboard" - } - } - }, - "output": { - "error": "At least one of `email` or `contactId` is required to update the contact using DOI" - } - }, - { - "description": "Identify call to update a DOI contact using contactId as an Identifier and without include list Ids", - "input": { - "message": { - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "channel": "web", - "traits": { - "age": 36, - "location": "Mumbai", - "role": "SDE 2" - }, - "context": { - "externalId": [ - { - "type": "sendinblueContactId", - "id": 42 - } - ] - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - }, - "destination": { - "Config": { - "apiKey": "apiKey123", - "clientKey": "clientKey123", - "templateId": 3, - "doi": true, - "redirectionUrl": "https://app.sendinblue.com/marketing-dashboard" - } - } - }, - "output": { - "body": { - "FORM": {}, - "JSON": { - "attributes": { - "age": 36, - "location": "Mumbai", - "role": "SDE 2" - } - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://api.sendinblue.com/v3/contacts/42", - "files": {}, - "headers": { - "Content-Type": "application/json", - "api-key": "apiKey123" - }, - "method": "PUT", - "params": {}, - "type": "REST", - "version": "1" - } - }, - { - "description": "Identify call to update a DOI contact using email as an Identifier and without include list Ids", - "input": { - "message": { - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "channel": "web", - "traits": { - "age": 36, - "location": "Mumbai", - "role": "SDE 2", - "phone": "+918888888888", - "email": "gordon_pittman@example.com", - "newEmail": "gordon_pittman007@example.com" - }, - "context": { - "externalId": [ - { - "type": "sendinblueIncludeListIds", - "id": [1] - }, - { - "type": "sendinblueUnlinkListIds", - "id": [2] - } - ] - }, - "integrations": { - "All": true, - "sendinblue": { - "emailBlacklisted": true, - "smsBlacklisted": false - } - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - }, - "destination": { - "Config": { - "apiKey": "apiKey123", - "clientKey": "clientKey123", - "templateId": 3, - "doi": true, - "redirectionUrl": "https://app.sendinblue.com/marketing-dashboard" - } - } - }, - "output": { - "body": { - "FORM": {}, - "JSON": { - "attributes": { - "age": 36, - "location": "Mumbai", - "role": "SDE 2", - "SMS": "+918888888888", - "EMAIL": "gordon_pittman007@example.com" - }, - "emailBlacklisted": true, - "smsBlacklisted": false, - "listIds": [1], - "unlinkListIds": [2] - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://api.sendinblue.com/v3/contacts/gordon_pittman%40example.com", - "files": {}, - "headers": { - "Content-Type": "application/json", - "api-key": "apiKey123" - }, - "method": "PUT", - "params": {}, - "type": "REST", - "version": "1" - } - }, - { - "description": "Identify call to unlink a contact from given lists", - "input": { - "message": { - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "channel": "web", - "traits": { - "email": "eric_kim@example.com" - }, - "context": { - "externalId": [ - { - "type": "sendinblueUnlinkListIds", - "id": [2, 5] - } - ] - } - }, - "destination": { - "Config": { - "apiKey": "apiKey123", - "clientKey": "clientKey123", - "doi": false - } - } - }, - "output": [ - { - "body": { - "FORM": {}, - "JSON": { - "emails": ["eric_kim@example.com"] - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://api.sendinblue.com/v3/contacts/lists/2/contacts/remove", - "files": {}, - "headers": { - "Content-Type": "application/json", - "api-key": "apiKey123" - }, - "method": "POST", - "params": {}, - "type": "REST", - "version": "1" - }, - { - "body": { - "FORM": {}, - "JSON": { - "emails": ["eric_kim@example.com"] - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://api.sendinblue.com/v3/contacts/lists/5/contacts/remove", - "files": {}, - "headers": { - "Content-Type": "application/json", - "api-key": "apiKey123" - }, - "method": "POST", - "params": {}, - "type": "REST", - "version": "1" - } - ] - } -] diff --git a/test/__tests__/data/sendinblue_router_input.json b/test/__tests__/data/sendinblue_router_input.json deleted file mode 100644 index 1f2b8a1dc2..0000000000 --- a/test/__tests__/data/sendinblue_router_input.json +++ /dev/null @@ -1,187 +0,0 @@ -[ - { - "message": { - "type": "track", - "sentAt": "2021-01-03T17:02:53.195Z", - "channel": "web", - "event": "Order Completed", - "properties": { - "orderId": "1341394-3812392190", - "products": [ - { - "product_id": 1234, - "product_name": "Track Pants", - "amount": 1, - "price": 220 - }, - { - "product_id": 5768, - "product_name": "T-Shirt", - "amount": 5, - "price": 1058 - } - ] - }, - "context": { - "traits": { - "first_name": "John", - "lastName": "Doe", - "age": 19, - "email": "john_doe@example.com", - "phone": "+919876543210", - "location": "Mumbai", - "role": "SDE" - } - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - }, - "metadata": { - "jobId": 1 - }, - "destination": { - "Config": { - "apiKey": "apiKey123", - "clientKey": "clientKey123", - "doi": false, - "contactAttributeMapping": [ - { - "from": "location", - "to": "LOCATION" - } - ], - "sendTraitsInTrack": true - } - } - }, - { - "message": { - "type": "page", - "sentAt": "2021-01-03T17:02:53.195Z", - "channel": "web", - "name": "New Page", - "properties": { - "url": "https://www.google.com/", - "title": "Google home" - }, - "context": { - "traits": { - "email": "john_doe@example.com" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/test/ourSdk.html", - "path": "/Testing/test/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/test/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/test/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - } - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - }, - "metadata": { - "jobId": 2 - }, - "destination": { - "Config": { - "apiKey": "apiKey123", - "clientKey": "clientKey123", - "templateId": 3, - "doi": false, - "redirectionUrl": "https://app.sendinblue.com/marketing-dashboard" - } - } - }, - { - "message": { - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "channel": "web", - "traits": { - "first_name": "John", - "lastName": "Doe", - "age": 19, - "email": "john_doe@example.com", - "phone": "+919876543210", - "location": "Mumbai", - "newEmail": "alex_root@example.com", - "role": "SDE" - }, - "context": { - "externalId": [ - { - "type": "sendinblueIncludeListIds", - "id": [1, 2] - } - ] - }, - "integrations": { - "All": true, - "sendinblue": { - "emailBlacklisted": true - } - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - }, - "metadata": { - "jobId": 3 - }, - "destination": { - "Config": { - "apiKey": "apiKey123", - "clientKey": "clientKey123", - "doi": false, - "contactAttributeMapping": [ - { - "from": "location", - "to": "LOCATION" - } - ] - } - } - }, - { - "message": { - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "channel": "web", - "traits": { - "first_name": "John", - "lastName": "Doe", - "age": 19, - "email": "john_doe@example.com", - "phone": "+919876543210", - "location": "Mumbai", - "role": "SDE" - }, - "context": {}, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "originalTimestamp": "2021-01-03T17:02:53.193Z" - }, - "metadata": { - "jobId": 4 - }, - "destination": { - "Config": { - "apiKey": "apiKey123", - "clientKey": "clientKey123", - "templateId": 3, - "doi": true, - "redirectionUrl": "https://app.sendinblue.com/marketing-dashboard" - } - } - } -] diff --git a/test/__tests__/data/sendinblue_router_output.json b/test/__tests__/data/sendinblue_router_output.json deleted file mode 100644 index c15c15205c..0000000000 --- a/test/__tests__/data/sendinblue_router_output.json +++ /dev/null @@ -1,196 +0,0 @@ -[ - { - "batched": false, - "batchedRequest": { - "body": { - "FORM": {}, - "JSON": { - "email": "john_doe@example.com", - "event": "Order Completed", - "eventdata": { - "data": { - "orderId": "1341394-3812392190", - "products": [ - { - "amount": 1, - "price": 220, - "product_id": 1234, - "product_name": "Track Pants" - }, - { - "amount": 5, - "price": 1058, - "product_id": 5768, - "product_name": "T-Shirt" - } - ] - }, - "id": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff" - }, - "properties": { - "FIRSTNAME": "John", - "LASTNAME": "Doe", - "LOCATION": "Mumbai", - "SMS": "+919876543210", - "age": 19, - "role": "SDE" - } - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://in-automate.sendinblue.com/api/v2/trackEvent", - "files": {}, - "headers": { - "Content-Type": "application/json", - "ma-key": "clientKey123" - }, - "method": "POST", - "params": {}, - "type": "REST", - "version": "1" - }, - "destination": { - "Config": { - "apiKey": "apiKey123", - "clientKey": "clientKey123", - "contactAttributeMapping": [ - { - "from": "location", - "to": "LOCATION" - } - ], - "doi": false, - "sendTraitsInTrack": true - } - }, - "metadata": [ - { - "jobId": 1 - } - ], - "statusCode": 200 - }, - { - "batched": false, - "batchedRequest": { - "body": { - "FORM": {}, - "JSON": { - "email": "john_doe@example.com", - "page": "https://www.google.com/", - "properties": { - "ma_path": "/Testing/test/ourSdk.html", - "ma_referrer": "http://127.0.0.1:7307/Testing/test/", - "ma_title": "Google home", - "sib_name": "New Page" - } - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://in-automate.sendinblue.com/api/v2/trackPage", - "files": {}, - "headers": { - "Content-Type": "application/json", - "ma-key": "clientKey123" - }, - "method": "POST", - "params": {}, - "type": "REST", - "version": "1" - }, - "destination": { - "Config": { - "apiKey": "apiKey123", - "clientKey": "clientKey123", - "doi": false, - "redirectionUrl": "https://app.sendinblue.com/marketing-dashboard", - "templateId": 3 - } - }, - "metadata": [ - { - "jobId": 2 - } - ], - "statusCode": 200 - }, - { - "batched": false, - "batchedRequest": { - "body": { - "FORM": {}, - "JSON": { - "attributes": { - "EMAIL": "alex_root@example.com", - "FIRSTNAME": "John", - "LASTNAME": "Doe", - "LOCATION": "Mumbai", - "SMS": "+919876543210", - "age": 19, - "role": "SDE" - }, - "email": "john_doe@example.com", - "emailBlacklisted": true, - "listIds": [1, 2], - "updateEnabled": true - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://api.sendinblue.com/v3/contacts", - "files": {}, - "headers": { - "Content-Type": "application/json", - "api-key": "apiKey123" - }, - "method": "POST", - "params": {}, - "type": "REST", - "version": "1" - }, - "destination": { - "Config": { - "apiKey": "apiKey123", - "clientKey": "clientKey123", - "contactAttributeMapping": [ - { - "from": "location", - "to": "LOCATION" - } - ], - "doi": false - } - }, - "metadata": [ - { - "jobId": 3 - } - ], - "statusCode": 200 - }, - { - "batched": false, - "error": "sendinblueIncludeListIds is required to create a contact using DOI", - "metadata": [ - { - "jobId": 4 - } - ], - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation" - }, - "statusCode": 400, - "destination": { - "Config": { - "apiKey": "apiKey123", - "clientKey": "clientKey123", - "templateId": 3, - "doi": true, - "redirectionUrl": "https://app.sendinblue.com/marketing-dashboard" - } - } - } -] diff --git a/test/__tests__/data/sf_input.json b/test/__tests__/data/sf_input.json deleted file mode 100644 index a10caa8d12..0000000000 --- a/test/__tests__/data/sf_input.json +++ /dev/null @@ -1,152 +0,0 @@ -[ - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "anonymousId": "123456" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "type": "identify", - "messageId": "84e26acc-56a5-4835-8233-591137fca468", - "originalTimestamp": "2019-10-14T09:03:17.562Z", - "anonymousId": "123456", - "userId": "123456", - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T09:03:22.563Z" - }, - "destination": { - "Config": { - "trackingID": "abcd" - }, - "Enabled": true - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "test@rudderstack.com", - "anonymousId": "12345" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "type": "page", - "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", - "originalTimestamp": "2019-10-14T11:15:18.299Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "properties": { - "path": "/abc", - "referrer": "", - "search": "", - "title": "", - "url": "" - }, - "integrations": { - "All": true - }, - "name": "ApplicationLoaded", - "sentAt": "2019-10-14T11:15:53.296Z" - }, - "destination": { - "Config": { - "trackingID": "abcd" - }, - "Enabled": true - } - }, - { - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "email": "test@rudderstack.com", - "anonymousId": "12345" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "type": "track", - "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", - "originalTimestamp": "2019-10-14T11:15:18.300Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "event": "test track event GA3", - "properties": { - "user_actual_role": "system_admin, system_user", - "user_actual_id": 12345 - }, - "integrations": { - "All": true - }, - "sentAt": "2019-10-14T11:15:53.296Z" - }, - "destination": { - "Config": { - "trackingID": "UA-149602794-1" - }, - "Enabled": true - } - } -] diff --git a/test/__tests__/data/sf_output.json b/test/__tests__/data/sf_output.json deleted file mode 100644 index 9efe161599..0000000000 --- a/test/__tests__/data/sf_output.json +++ /dev/null @@ -1,43 +0,0 @@ -[ - { - "statusCode": 400, - "message": "message type not supported" - }, - { - "endpoint": "https://www.google-analytics.com/collect", - "requestConfig": { - "requestFormat": "PARAMS", - "requestMethod": "GET" - }, - "header": {}, - "userId": "00000000000000000000000000", - "payload": { - "v": "1", - "t": "pageview", - "tid": "abcd", - "cid": "00000000000000000000000000", - "dt": "", - "dl": "", - "dp": "/abc", - "dr": "" - }, - "statusCode": 200 - }, - { - "endpoint": "https://www.google-analytics.com/collect", - "requestConfig": { - "requestFormat": "PARAMS", - "requestMethod": "GET" - }, - "header": {}, - "userId": "00000000000000000000000000", - "payload": { - "v": "1", - "t": "event", - "tid": "UA-149602794-1", - "cid": "00000000000000000000000000", - "ea": "test track event GA3" - }, - "statusCode": 200 - } -] diff --git a/test/__tests__/data/stormly.json b/test/__tests__/data/stormly.json deleted file mode 100644 index 2f0bb7f4d6..0000000000 --- a/test/__tests__/data/stormly.json +++ /dev/null @@ -1,388 +0,0 @@ -[ - { - "description": "Identify call without userId", - "input": { - "destination": { - "Config": { - "apiKey": "dummyApiKey" - }, - "ID": "stormly123" - }, - "message": { - "type": "identify", - "context": { - "traits": { - "name": "John Doe", - "email": "johndoe@gmail.com", - "age": 25 - } - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - "output": { - "error": "Missing required value from \"userIdOnly\"" - } - }, - { - "description": "Identify call with userId, traits", - "input": { - "destination": { - "Config": { - "apiKey": "dummyApiKey" - }, - "ID": "stormly123" - }, - "message": { - "type": "identify", - "sentAt": "2022-01-20T13:39:21.033Z", - "channel": "web", - "userId": "5136633649", - "context": { - "traits": { - "name": "John Doe", - "email": "johndoe@gmail.com", - "age": 25 - } - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rudderstack.t.stormly.com/webhook/rudderstack/identify", - "headers": { - "Content-Type": "application/json", - "Authorization": "Basic dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "userId": "5136633649", - "traits": { - "name": "John Doe", - "email": "johndoe@gmail.com", - "age": 25 - }, - "timestamp": "2022-01-20T13:39:21.032Z" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "Track call without userId", - "input": { - "destination": { - "Config": { - "apiKey": "dummyApiKey" - }, - "ID": "stormly123" - }, - "message": { - "type": "track", - "event": "Product Reviewed", - "properties": { - "review_id": "12345", - "product_id": "123", - "rating": 3.0, - "review_body": "Average product, expected much more.", - "groupId": "91Yb32830" - }, - "context": {}, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - "output": { - "error": "Missing required value from \"userIdOnly\"" - } - }, - { - "description": "Track call without groupId", - "input": { - "destination": { - "Config": { - "apiKey": "dummyApiKey" - }, - "ID": "stormly123" - }, - "message": { - "type": "track", - "event": "Product Reviewed", - "userId": "5136633649", - "properties": { - "review_id": "12345", - "product_id": "123", - "rating": 3.0, - "review_body": "Average product, expected much more." - }, - "context": {}, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rudderstack.t.stormly.com/webhook/rudderstack/track", - "headers": { - "Content-Type": "application/json", - "Authorization": "Basic dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "userId": "5136633649", - "event": "Product Reviewed", - "properties": { - "review_id": "12345", - "product_id": "123", - "rating": 3, - "review_body": "Average product, expected much more." - }, - "timestamp": "2022-01-20T13:39:21.032Z" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "Track call without properties", - "input": { - "destination": { - "Config": { - "apiKey": "dummyApiKey" - }, - "ID": "stormly123" - }, - "message": { - "type": "track", - "event": "Product Reviewed", - "userId": "5136633649", - "context": {}, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rudderstack.t.stormly.com/webhook/rudderstack/track", - "headers": { - "Content-Type": "application/json", - "Authorization": "Basic dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "userId": "5136633649", - "event": "Product Reviewed", - "timestamp": "2022-01-20T13:39:21.032Z" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "Track call with userId, groupId and properties", - "input": { - "destination": { - "Config": { - "apiKey": "dummyApiKey" - }, - "ID": "stormly123" - }, - "message": { - "type": "track", - "event": "Product Reviewed", - "userId": "5136633649", - "properties": { - "review_id": "12345", - "product_id": "123", - "rating": 3.0, - "review_body": "Average product, expected much more.", - "groupId": "91Yb32830" - }, - "context": {}, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rudderstack.t.stormly.com/webhook/rudderstack/track", - "headers": { - "Content-Type": "application/json", - "Authorization": "Basic dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "userId": "5136633649", - "event": "Product Reviewed", - "properties": { - "review_id": "12345", - "product_id": "123", - "rating": 3, - "review_body": "Average product, expected much more." - }, - "timestamp": "2022-01-20T13:39:21.032Z", - "context": { - "groupId": "91Yb32830" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "Track call with userId, groupId (from externalId) and properties", - "input": { - "destination": { - "Config": { - "apiKey": "dummyApiKey" - }, - "ID": "stormly123" - }, - "message": { - "type": "track", - "event": "Product Reviewed", - "userId": "5136633649", - "properties": { - "review_id": "12345", - "product_id": "123", - "rating": 3.0, - "review_body": "Average product, expected much more.", - "groupId": "test-12345" - }, - "context": { - "externalId": [ - { - "type": "stormlyGroupId", - "id": "91Yb32830" - } - ] - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rudderstack.t.stormly.com/webhook/rudderstack/track", - "headers": { - "Content-Type": "application/json", - "Authorization": "Basic dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "userId": "5136633649", - "event": "Product Reviewed", - "properties": { - "review_id": "12345", - "product_id": "123", - "rating": 3, - "review_body": "Average product, expected much more." - }, - "timestamp": "2022-01-20T13:39:21.032Z", - "context": { - "groupId": "91Yb32830" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - }, - { - "description": "Group call with userId, groupId and traits", - "input": { - "destination": { - "Config": { - "apiKey": "dummyApiKey" - }, - "ID": "stormly123" - }, - "message": { - "type": "group", - "userId": "5136633649", - "traits": { - "name": "Initech", - "employees": 500, - "headquarters": "Redwood City, California, United States", - "ceo": "John Doe", - "revenue": 70000000, - "currency": "USD", - "groupId": "9230AUbd2138h" - }, - "context": {}, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://rudderstack.t.stormly.com/webhook/rudderstack/group", - "headers": { - "Content-Type": "application/json", - "Authorization": "Basic dummyApiKey" - }, - "params": {}, - "body": { - "JSON": { - "userId": "5136633649", - "groupId": "9230AUbd2138h", - "traits": { - "name": "Initech", - "employees": 500, - "headquarters": "Redwood City, California, United States", - "ceo": "John Doe", - "revenue": 70000000, - "currency": "USD" - }, - "timestamp": "2022-01-20T13:39:21.032Z" - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - } -] diff --git a/test/__tests__/data/stormly_router_input.json b/test/__tests__/data/stormly_router_input.json deleted file mode 100644 index 3fa583ebc3..0000000000 --- a/test/__tests__/data/stormly_router_input.json +++ /dev/null @@ -1,55 +0,0 @@ -[ - { - "destination": { - "Config": { - "apiKey": "dummyApiKey" - }, - "ID": "stormly123" - }, - "metadata": { - "jobId": 1 - }, - "message": { - "type": "identify", - "sentAt": "2022-01-20T13:39:21.033Z", - "channel": "web", - "userId": "5136633649", - "context": { - "traits": { - "name": "John Doe", - "email": "johndoe@gmail.com", - "age": 25 - } - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey" - }, - "ID": "stormly123" - }, - "metadata": { - "jobId": 2 - }, - "message": { - "type": "track", - "event": "Product Reviewed", - "properties": { - "review_id": "12345", - "product_id": "123", - "rating": 3.0, - "review_body": "Average product, expected much more.", - "groupId": "91Yb32830" - }, - "context": {}, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - } -] diff --git a/test/__tests__/data/stormly_router_output.json b/test/__tests__/data/stormly_router_output.json deleted file mode 100644 index 2a129dfbaf..0000000000 --- a/test/__tests__/data/stormly_router_output.json +++ /dev/null @@ -1,63 +0,0 @@ -[ - { - "batched": false, - "batchedRequest": { - "body": { - "FORM": {}, - "JSON": { - "timestamp": "2022-01-20T13:39:21.032Z", - "traits": { - "age": 25, - "email": "johndoe@gmail.com", - "name": "John Doe" - }, - "userId": "5136633649" - }, - "JSON_ARRAY": {}, - "XML": {} - }, - "endpoint": "https://rudderstack.t.stormly.com/webhook/rudderstack/identify", - "files": {}, - "headers": { - "Authorization": "Basic dummyApiKey", - "Content-Type": "application/json" - }, - "method": "POST", - "params": {}, - "type": "REST", - "version": "1" - }, - "destination": { - "Config": { - "apiKey": "dummyApiKey" - }, - "ID": "stormly123" - }, - "metadata": [ - { - "jobId": 1 - } - ], - "statusCode": 200 - }, - { - "destination": { - "Config": { - "apiKey": "dummyApiKey" - }, - "ID": "stormly123" - }, - "batched": false, - "error": "Missing required value from \"userIdOnly\"", - "metadata": [ - { - "jobId": 2 - } - ], - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation" - }, - "statusCode": 400 - } -] diff --git a/test/__tests__/data/warehouse/events.js b/test/__tests__/data/warehouse/events.js index 20a6ce89b3..ef9cc21096 100644 --- a/test/__tests__/data/warehouse/events.js +++ b/test/__tests__/data/warehouse/events.js @@ -60,7 +60,17 @@ const sampleEvents = { originalTimestamp: "2020-01-24T06:29:02.364Z", properties: { currency: "USD", - revenue: 50 + revenue: 50, + stack: { + history: { + errorDetails: [ + { + "message": "Cannot set headers after they are sent to the client", + "toString": "[function]" + } + ] + } + } }, receivedAt: "2020-01-24T11:59:02.403+05:30", request_ip: "[::1]:53708", @@ -180,6 +190,12 @@ const sampleEvents = { data: { currency: "USD", revenue: 50, + stack_history_error_details: [ + { + "message": "Cannot set headers after they are sent to the client", + "toString": "[function]" + } + ], context_app_build: "1.0.0", context_app_name: "RudderLabs JavaScript SDK", context_app_namespace: "com.rudderlabs.javascript", @@ -314,6 +330,12 @@ const sampleEvents = { data: { CURRENCY: "USD", REVENUE: 50, + STACK_HISTORY_ERROR_DETAILS: [ + { + "message": "Cannot set headers after they are sent to the client", + "toString": "[function]" + } + ], CONTEXT_APP_BUILD: "1.0.0", CONTEXT_APP_NAME: "RudderLabs JavaScript SDK", CONTEXT_APP_NAMESPACE: "com.rudderlabs.javascript", @@ -340,7 +362,7 @@ const sampleEvents = { RECEIVED_AT: "2020-01-24T06:29:02.403Z", ORIGINAL_TIMESTAMP: "2020-01-24T06:29:02.364Z", CHANNEL: "web", - EVENT: "button_clicked" + EVENT: "button_clicked", } } ], @@ -448,6 +470,12 @@ const sampleEvents = { data: { currency: "USD", revenue: 50, + stack_history_error_details: [ + { + "message": "Cannot set headers after they are sent to the client", + "toString": "[function]" + } + ], context_app_build: "1.0.0", context_app_name: "RudderLabs JavaScript SDK", context_app_namespace: "com.rudderlabs.javascript", @@ -2053,7 +2081,6 @@ const sampleEvents = { id: "string", user_id: "string", received_at: "datetime", - event: "string" }, receivedAt: "2020-01-24T11:59:02.403+05:30" }, @@ -2121,7 +2148,6 @@ const sampleEvents = { id: "string", user_id: "string", received_at: "datetime", - event: "string", boolean_property: "boolean", }, receivedAt: "2020-01-24T11:59:02.403+05:30" diff --git a/test/__tests__/data/wootric.json b/test/__tests__/data/wootric.json deleted file mode 100644 index c7c63694f1..0000000000 --- a/test/__tests__/data/wootric.json +++ /dev/null @@ -1,1467 +0,0 @@ -[ - { - "description": "Wrong Account Token Passed", - "input": { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken12" - }, - "ID": "wootric-1234" - }, - "message": { - "type": "identify", - "sentAt": "2022-01-20T13:39:21.033Z", - "userId": "dummyId2", - "channel": "web", - "context": {}, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - "output": { - "statusCode": 400, - "error": "Access token could not be generated due to {\"error\":\"Not found\",\"status\":404}" - } - }, - { - "description": "Identify call for creating user", - "input": { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "wootric-1234" - }, - "message": { - "type": "identify", - "sentAt": "2022-01-20T13:39:21.033Z", - "userId": "dummyId2", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.2.20", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - }, - "locale": "en-US", - "screen": { - "width": 1440, - "height": 900, - "density": 2, - "innerWidth": 536, - "innerHeight": 689 - }, - "traits": { - "city": "Bangalore", - "name": "Dummy User 2", - "email": "dummyUser2@gmail.com", - "phone": "+19123456777", - "title": "SDE", - "gender": "Male", - "company": "Rudderstack", - "createdAt": "2021-01-20T13:39:21.032Z" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.2.20" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.wootric.com/v1/end_users", - "headers": { - "Content-Type": "application/x-www-form-urlencoded", - "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" - }, - "params": {}, - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": { - "email": "dummyUser2@gmail.com", - "phone_number": "+19123456777", - "last_surveyed": "1642685961", - "external_created_at": "1611149961", - "external_id": "dummyId2", - "properties[city]": "Bangalore", - "properties[name]": "Dummy User 2", - "properties[title]": "SDE", - "properties[gender]": "Male", - "properties[company]": "Rudderstack" - } - }, - "files": {} - } - }, - { - "description": "Identify call for creating user without-sending email and sending phone number", - "input": { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "wootric-1234" - }, - "message": { - "type": "identify", - "sentAt": "2022-01-20T13:39:21.033Z", - "userId": "dummyId2", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.2.20", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - }, - "locale": "en-US", - "screen": { - "width": 1440, - "height": 900, - "density": 2, - "innerWidth": 536, - "innerHeight": 689 - }, - "traits": { - "city": "Bangalore", - "name": "Dummy User 2", - "phone": "+19123456777", - "title": "SDE", - "gender": "Male", - "company": "Rudderstack", - "createdAt": "2021-01-20T13:39:21.032Z" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.2.20" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.wootric.com/v1/end_users", - "headers": { - "Content-Type": "application/x-www-form-urlencoded", - "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" - }, - "params": {}, - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": { - "phone_number": "+19123456777", - "last_surveyed": "1642685961", - "external_created_at": "1611149961", - "external_id": "dummyId2", - "properties[city]": "Bangalore", - "properties[name]": "Dummy User 2", - "properties[title]": "SDE", - "properties[gender]": "Male", - "properties[company]": "Rudderstack" - } - }, - "files": {} - } - }, - { - "description": "Identify call for creating user without-sending phone number and sending email", - "input": { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "wootric-1234" - }, - "message": { - "type": "identify", - "sentAt": "2022-01-20T13:39:21.033Z", - "userId": "dummyId2", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.2.20", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - }, - "locale": "en-US", - "screen": { - "width": 1440, - "height": 900, - "density": 2, - "innerWidth": 536, - "innerHeight": 689 - }, - "traits": { - "email": "dummyUser2@gmail.com", - "city": "Bangalore", - "name": "Dummy User 2", - "title": "SDE", - "gender": "Male", - "company": "Rudderstack", - "createdAt": "2021-01-20T13:39:21.032Z" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.2.20" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.wootric.com/v1/end_users", - "headers": { - "Content-Type": "application/x-www-form-urlencoded", - "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" - }, - "params": {}, - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": { - "email": "dummyUser2@gmail.com", - "last_surveyed": "1642685961", - "external_created_at": "1611149961", - "external_id": "dummyId2", - "properties[city]": "Bangalore", - "properties[name]": "Dummy User 2", - "properties[title]": "SDE", - "properties[gender]": "Male", - "properties[company]": "Rudderstack" - } - }, - "files": {} - } - }, - { - "description": "Identify call for creating user without sending traits", - "input": { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "wootric-1234" - }, - "message": { - "type": "identify", - "sentAt": "2022-01-20T13:39:21.033Z", - "userId": "dummyId2", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.2.20", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - }, - "locale": "en-US", - "screen": { - "width": 1440, - "height": 900, - "density": 2, - "innerWidth": 536, - "innerHeight": 689 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.2.20" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - "output": { - "statusCode": 400, - "error": "email/phone number are missing. At least one parameter must be provided", - "statTags": { - "destination": "wootric", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "Identify call for creating user without-sending (email and phone number)", - "input": { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "wootric-1234" - }, - "message": { - "type": "identify", - "sentAt": "2022-01-20T13:39:21.033Z", - "userId": "dummyId2", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.2.20", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - }, - "locale": "en-US", - "screen": { - "width": 1440, - "height": 900, - "density": 2, - "innerWidth": 536, - "innerHeight": 689 - }, - "traits": { - "city": "Mumbai", - "name": "Dummy User 1", - "title": "SDE", - "gender": "Male", - "company": "Rudderstack", - "createdAt": "2021-01-20T13:39:21.032Z" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.2.20" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - "output": { - "statusCode": 400, - "error": "email/phone number are missing. At least one parameter must be provided", - "statTags": { - "destination": "wootric", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "Identify call for updating existing user with wootric end user id", - "input": { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "wootric-1234" - }, - "message": { - "type": "identify", - "sentAt": "2022-01-20T13:39:21.033Z", - "userId": "dummyId1", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.2.20", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - }, - "locale": "en-US", - "screen": { - "width": 1440, - "height": 900, - "density": 2, - "innerWidth": 536, - "innerHeight": 689 - }, - "traits": { - "title": "VP", - "gender": "Male" - }, - "externalId": [ - { - "type": "wootricEndUserId", - "id": "490635419" - } - ], - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.2.20" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "PUT", - "endpoint": "https://api.wootric.com/v1/end_users/490635419", - "headers": { - "Content-Type": "application/x-www-form-urlencoded", - "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" - }, - "params": {}, - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": { - "last_surveyed": "1642685961", - "properties[Department]": "Marketing", - "properties[product_plan]": "Web", - "properties[revenue amount]": "5000", - "properties[title]": "VP", - "properties[gender]": "Male" - } - }, - "files": {} - } - }, - { - "description": "Identify call for updating existing user with (wootric externalId/ rudderstack userId)", - "input": { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "wootric-1234" - }, - "message": { - "type": "identify", - "sentAt": "2022-01-20T13:39:21.033Z", - "userId": "dummyId1", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.2.20", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - }, - "locale": "en-US", - "screen": { - "width": 1440, - "height": 900, - "density": 2, - "innerWidth": 536, - "innerHeight": 689 - }, - "traits": { - "title": "VP", - "gender": "Male" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.2.20" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "PUT", - "endpoint": "https://api.wootric.com/v1/end_users/486438462", - "headers": { - "Content-Type": "application/x-www-form-urlencoded", - "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" - }, - "params": {}, - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": { - "last_surveyed": "1642685961", - "properties[title]": "VP", - "properties[gender]": "Male", - "properties[city]": "Mumbai", - "properties[name]": "Dummy User 1", - "properties[company]": "Rudderstack" - } - }, - "files": {} - } - }, - { - "description": "Identify call for updating user traits/properties", - "input": { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "wootric-1234" - }, - "message": { - "type": "identify", - "sentAt": "2022-01-20T13:39:21.033Z", - "userId": "dummyId1", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.2.20", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - }, - "locale": "en-US", - "screen": { - "width": 1440, - "height": 900, - "density": 2, - "innerWidth": 536, - "innerHeight": 689 - }, - "traits": { - "city": "Udaipur", - "name": "Dummy User 1 New", - "title": "SDE-2", - "gender": "Male", - "company": "Rudderstack" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.2.20" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "PUT", - "endpoint": "https://api.wootric.com/v1/end_users/486438462", - "headers": { - "Content-Type": "application/x-www-form-urlencoded", - "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" - }, - "params": {}, - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": { - "last_surveyed": "1642685961", - "properties[city]": "Udaipur", - "properties[name]": "Dummy User 1 New", - "properties[title]": "SDE-2", - "properties[gender]": "Male", - "properties[company]": "Rudderstack" - } - }, - "files": {} - } - }, - { - "description": "Track call with existing userId and event type as create response", - "input": { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "wootric-1234" - }, - "message": { - "type": "track", - "sentAt": "2022-01-20T13:39:21.033Z", - "userId": "dummyId1", - "channel": "web", - "properties": { - "feedbackScore": 7, - "feedbackText": "Simple, Easy to use, Reliable, Affordable Product" - }, - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.2.20", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - }, - "locale": "en-US", - "ip": "0.0.0.0", - "screen": { - "width": 1440, - "height": 900, - "density": 2, - "innerWidth": 536, - "innerHeight": 689 - }, - "traits": { - "city": "Mumbai", - "name": "Dummy User 1", - "email": "dummyUser1@gmail.com", - "title": "SDE", - "gender": "Male", - "company": "Rudderstack", - "createdAt": "2021-01-20T13:39:21.032Z" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.2.20" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true, - "Wootric": { - "eventType": "create response" - } - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.wootric.com/v1/end_users/486438462/responses", - "headers": { - "Content-Type": "application/x-www-form-urlencoded", - "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" - }, - "params": {}, - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": { - "score": 7, - "ip_address": "0.0.0.0", - "origin_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "text": "Simple, Easy to use, Reliable, Affordable Product", - "created_at": "1611149961", - "end_user[properties][city]": "Mumbai", - "end_user[properties][name]": "Dummy User 1", - "end_user[properties][title]": "SDE", - "end_user[properties][gender]": "Male", - "end_user[properties][company]": "Rudderstack" - } - }, - "files": {} - } - }, - { - "description": "Track call with non-existing userId", - "input": { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "wootric-1234" - }, - "message": { - "type": "track", - "sentAt": "2022-01-20T13:39:21.033Z", - "userId": "dummyId2", - "channel": "web", - "properties": { - "feedbackScore": 7, - "feedbackText": "Simple, Easy to use, Reliable, Affordable Product" - }, - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.2.20", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - }, - "locale": "en-US", - "ip": "0.0.0.0", - "screen": { - "width": 1440, - "height": 900, - "density": 2, - "innerWidth": 536, - "innerHeight": 689 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.2.20" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true, - "Wootric": { - "eventType": "create response" - } - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - "output": { - "statusCode": 400, - "error": "No user found with userId : dummyId2", - "statTags": { - "destination": "wootric", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "Track call with non-existing wootricEndUserId", - "input": { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "wootric-1234" - }, - "message": { - "type": "track", - "sentAt": "2022-01-20T13:39:21.033Z", - "channel": "web", - "properties": { - "feedbackScore": 7, - "feedbackText": "Simple, Easy to use, Reliable, Affordable Product" - }, - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.2.20", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - }, - "locale": "en-US", - "ip": "0.0.0.0", - "screen": { - "width": 1440, - "height": 900, - "density": 2, - "innerWidth": 536, - "innerHeight": 689 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.2.20" - }, - "externalId": [{ "type": "wootricEndUserId", "id": "12345" }], - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true, - "Wootric": { - "eventType": "create response" - } - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - "output": { - "statusCode": 400, - "error": "No user found with wootric end user Id : 12345", - "statTags": { - "destination": "wootric", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "Track call with existing userId and event type as create response and score out of bound", - "input": { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "wootric-1234" - }, - "message": { - "type": "track", - "sentAt": "2022-01-20T13:39:21.033Z", - "userId": "dummyId1", - "channel": "web", - "properties": { - "feedbackScore": 12, - "feedbackText": "Simple, Easy to use, Reliable, Affordable Product" - }, - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.2.20", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - }, - "locale": "en-US", - "ip": "0.0.0.0", - "screen": { - "width": 1440, - "height": 900, - "density": 2, - "innerWidth": 536, - "innerHeight": 689 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.2.20" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true, - "Wootric": { - "eventType": "create response" - } - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - "output": { - "statusCode": 400, - "error": "Invalid Score", - "statTags": { - "destination": "wootric", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "Track call with existing userId and event type as create decline", - "input": { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "wootric-1234" - }, - "message": { - "type": "track", - "sentAt": "2022-01-20T13:39:21.033Z", - "userId": "dummyId1", - "channel": "web", - "properties": { - "feedbackScore": 9, - "feedbackText": "Simple, Easy to use, Reliable, Affordable Product" - }, - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.2.20", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - }, - "locale": "en-US", - "screen": { - "width": 1440, - "height": 900, - "density": 2, - "innerWidth": 536, - "innerHeight": 689 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.2.20" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true, - "Wootric": { - "eventType": "create decline" - } - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.wootric.com/v1/end_users/486438462/declines", - "headers": { - "Content-Type": "application/x-www-form-urlencoded", - "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" - }, - "params": {}, - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": { - "origin_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html" - } - }, - "files": {} - } - }, - { - "description": "Track call with non-existing userId and event type as create decline", - "input": { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "wootric-1234" - }, - "message": { - "type": "track", - "sentAt": "2022-01-20T13:39:21.033Z", - "userId": "dummyId2", - "channel": "web", - "properties": { - "feedbackScore": 9, - "feedbackText": "Simple, Easy to use, Reliable, Affordable Product" - }, - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.2.20", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - }, - "locale": "en-US", - "screen": { - "width": 1440, - "height": 900, - "density": 2, - "innerWidth": 536, - "innerHeight": 689 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.2.20" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true, - "Wootric": { - "eventType": "create decline" - } - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - "output": { - "statusCode": 400, - "error": "No user found with userId : dummyId2", - "statTags": { - "destination": "wootric", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "Track call with event type other than create response or decline", - "input": { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "wootric-1234" - }, - "message": { - "type": "track", - "sentAt": "2022-01-20T13:39:21.033Z", - "userId": "dummyId1", - "channel": "web", - "properties": { - "feedbackScore": 7, - "feedbackText": "Simple, Easy to use, Reliable, Affordable Product" - }, - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.2.20", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - }, - "locale": "en-US", - "ip": "0.0.0.0", - "screen": { - "width": 1440, - "height": 900, - "density": 2, - "innerWidth": 536, - "innerHeight": 689 - }, - "traits": { - "city": "Mumbai", - "name": "Dummy User 1", - "email": "dummyUser1@gmail.com", - "phone": "+19123456789", - "title": "SDE", - "gender": "Male", - "company": "Rudderstack", - "createdAt": "2021-01-20T13:39:21.032Z" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.2.20" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true, - "Wootric": { - "eventType": "random" - } - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - "output": { - "statusCode": 400, - "error": "Event Type not supported", - "statTags": { - "destination": "wootric", - "stage": "transform", - "scope": "exception" - } - } - }, - { - "description": "Track call with missing event type in integration object", - "input": { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "wootric-1234" - }, - "message": { - "type": "track", - "sentAt": "2022-01-20T13:39:21.033Z", - "userId": "dummyId1", - "channel": "web", - "properties": { - "feedbackScore": 3, - "feedbackText": "Too Slow!!!" - }, - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.2.20", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - }, - "locale": "en-US", - "ip": "0.0.0.0", - "screen": { - "width": 1440, - "height": 900, - "density": 2, - "innerWidth": 536, - "innerHeight": 689 - }, - "traits": { - "city": "Mumbai", - "name": "Dummy User 1", - "email": "dummyUser1@gmail.com", - "phone": "+19123456789", - "title": "SDE", - "gender": "Male", - "company": "Rudderstack", - "createdAt": "2021-01-20T13:39:21.032Z" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.2.20" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - "output": { - "statusCode": 400, - "error": "Event Type is missing from Integration object", - "statTags": { - "destination": "wootric", - "stage": "transform", - "scope": "exception" - } - } - } -] diff --git a/test/__tests__/data/wootric_router_input.json b/test/__tests__/data/wootric_router_input.json deleted file mode 100644 index 360c07afa5..0000000000 --- a/test/__tests__/data/wootric_router_input.json +++ /dev/null @@ -1,1076 +0,0 @@ -[ - { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" - }, - "metadata": { - "jobId": 1 - }, - "message": { - "type": "identify", - "sentAt": "2022-01-20T13:39:21.033Z", - "userId": "dummyId2", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.2.20", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - }, - "locale": "en-US", - "screen": { - "width": 1440, - "height": 900, - "density": 2, - "innerWidth": 536, - "innerHeight": 689 - }, - "traits": { - "city": "Bangalore", - "name": "Dummy User 2", - "email": "dummyUser2@gmail.com", - "phone": "+19123456777", - "title": "SDE", - "gender": "Male", - "company": "Rudderstack", - "createdAt": "2021-01-20T13:39:21.032Z" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.2.20" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" - }, - "metadata": { - "jobId": 2 - }, - "message": { - "type": "identify", - "sentAt": "2022-01-20T13:39:21.033Z", - "userId": "dummyId2", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.2.20", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - }, - "locale": "en-US", - "screen": { - "width": 1440, - "height": 900, - "density": 2, - "innerWidth": 536, - "innerHeight": 689 - }, - "traits": { - "city": "Bangalore", - "name": "Dummy User 2", - "phone": "+19123456777", - "title": "SDE", - "gender": "Male", - "company": "Rudderstack", - "createdAt": "2021-01-20T13:39:21.032Z" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.2.20" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" - }, - "metadata": { - "jobId": 3 - }, - "message": { - "type": "identify", - "sentAt": "2022-01-20T13:39:21.033Z", - "userId": "dummyId2", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.2.20", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - }, - "locale": "en-US", - "screen": { - "width": 1440, - "height": 900, - "density": 2, - "innerWidth": 536, - "innerHeight": 689 - }, - "traits": { - "email": "dummyUser2@gmail.com", - "city": "Bangalore", - "name": "Dummy User 2", - "title": "SDE", - "gender": "Male", - "company": "Rudderstack", - "createdAt": "2021-01-20T13:39:21.032Z" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.2.20" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" - }, - "metadata": { - "jobId": 5 - }, - "message": { - "type": "identify", - "sentAt": "2022-01-20T13:39:21.033Z", - "userId": "dummyId2", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.2.20", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - }, - "locale": "en-US", - "screen": { - "width": 1440, - "height": 900, - "density": 2, - "innerWidth": 536, - "innerHeight": 689 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.2.20" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" - }, - "metadata": { - "jobId": 6 - }, - "message": { - "type": "identify", - "sentAt": "2022-01-20T13:39:21.033Z", - "userId": "dummyId2", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.2.20", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - }, - "locale": "en-US", - "screen": { - "width": 1440, - "height": 900, - "density": 2, - "innerWidth": 536, - "innerHeight": 689 - }, - "traits": { - "city": "Mumbai", - "name": "Dummy User 1", - "title": "SDE", - "gender": "Male", - "company": "Rudderstack", - "createdAt": "2021-01-20T13:39:21.032Z" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.2.20" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" - }, - "metadata": { - "jobId": 7 - }, - "message": { - "type": "identify", - "sentAt": "2022-01-20T13:39:21.033Z", - "userId": "dummyId1", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.2.20", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - }, - "locale": "en-US", - "screen": { - "width": 1440, - "height": 900, - "density": 2, - "innerWidth": 536, - "innerHeight": 689 - }, - "traits": { - "email": "dummyuser1_01@gmail.com" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.2.20" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" - }, - "metadata": { - "jobId": 8 - }, - "message": { - "type": "identify", - "sentAt": "2022-01-20T13:39:21.033Z", - "userId": "dummyId1", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.2.20", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - }, - "locale": "en-US", - "screen": { - "width": 1440, - "height": 900, - "density": 2, - "innerWidth": 536, - "innerHeight": 689 - }, - "traits": { - "phone": "+19777777778" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.2.20" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" - }, - "metadata": { - "jobId": 9 - }, - "message": { - "type": "identify", - "sentAt": "2022-01-20T13:39:21.033Z", - "userId": "dummyId1", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.2.20", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - }, - "locale": "en-US", - "screen": { - "width": 1440, - "height": 900, - "density": 2, - "innerWidth": 536, - "innerHeight": 689 - }, - "traits": { - "city": "Udaipur", - "name": "Dummy User 1 New", - "title": "SDE-2", - "gender": "Male", - "company": "Rudderstack" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.2.20" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" - }, - "metadata": { - "jobId": 10 - }, - "message": { - "type": "track", - "sentAt": "2022-01-20T13:39:21.033Z", - "userId": "dummyId1", - "channel": "web", - "properties": { - "feedbackScore": 7, - "feedbackText": "Simple, Easy to use, Reliable, Affordable Product" - }, - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.2.20", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - }, - "locale": "en-US", - "ip": "0.0.0.0", - "screen": { - "width": 1440, - "height": 900, - "density": 2, - "innerWidth": 536, - "innerHeight": 689 - }, - "traits": { - "city": "Mumbai", - "name": "Dummy User 1", - "email": "dummyUser1@gmail.com", - "title": "SDE", - "gender": "Male", - "company": "Rudderstack", - "createdAt": "2021-01-20T13:39:21.032Z" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.2.20" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true, - "Wootric": { - "eventType": "create response" - } - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" - }, - "metadata": { - "jobId": 11 - }, - "message": { - "type": "track", - "sentAt": "2022-01-20T13:39:21.033Z", - "userId": "dummyId2", - "channel": "web", - "properties": { - "feedbackScore": 7, - "feedbackText": "Simple, Easy to use, Reliable, Affordable Product" - }, - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.2.20", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - }, - "locale": "en-US", - "ip": "0.0.0.0", - "screen": { - "width": 1440, - "height": 900, - "density": 2, - "innerWidth": 536, - "innerHeight": 689 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.2.20" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true, - "Wootric": { - "eventType": "create response" - } - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" - }, - "metadata": { - "jobId": 12 - }, - "message": { - "type": "track", - "sentAt": "2022-01-20T13:39:21.033Z", - "userId": "dummyId1", - "channel": "web", - "properties": { - "feedbackScore": 12, - "feedbackText": "Simple, Easy to use, Reliable, Affordable Product" - }, - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.2.20", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - }, - "locale": "en-US", - "ip": "0.0.0.0", - "screen": { - "width": 1440, - "height": 900, - "density": 2, - "innerWidth": 536, - "innerHeight": 689 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.2.20" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true, - "Wootric": { - "eventType": "create response" - } - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" - }, - "metadata": { - "jobId": 13 - }, - "message": { - "type": "track", - "sentAt": "2022-01-20T13:39:21.033Z", - "userId": "dummyId1", - "channel": "web", - "properties": { - "feedbackScore": 9, - "feedbackText": "Simple, Easy to use, Reliable, Affordable Product" - }, - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.2.20", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - }, - "locale": "en-US", - "screen": { - "width": 1440, - "height": 900, - "density": 2, - "innerWidth": 536, - "innerHeight": 689 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.2.20" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true, - "Wootric": { - "eventType": "create decline" - } - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" - }, - "metadata": { - "jobId": 14 - }, - "message": { - "type": "track", - "sentAt": "2022-01-20T13:39:21.033Z", - "userId": "dummyId2", - "channel": "web", - "properties": { - "feedbackScore": 9, - "feedbackText": "Simple, Easy to use, Reliable, Affordable Product" - }, - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.2.20", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - }, - "locale": "en-US", - "screen": { - "width": 1440, - "height": 900, - "density": 2, - "innerWidth": 536, - "innerHeight": 689 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.2.20" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true, - "Wootric": { - "eventType": "create decline" - } - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" - }, - "metadata": { - "jobId": 15 - }, - "message": { - "type": "track", - "sentAt": "2022-01-20T13:39:21.033Z", - "userId": "dummyId1", - "channel": "web", - "properties": { - "feedbackScore": 7, - "feedbackText": "Simple, Easy to use, Reliable, Affordable Product" - }, - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.2.20", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - }, - "locale": "en-US", - "ip": "0.0.0.0", - "screen": { - "width": 1440, - "height": 900, - "density": 2, - "innerWidth": 536, - "innerHeight": 689 - }, - "traits": { - "city": "Mumbai", - "name": "Dummy User 1", - "email": "dummyUser1@gmail.com", - "phone": "+19123456789", - "title": "SDE", - "gender": "Male", - "company": "Rudderstack", - "createdAt": "2021-01-20T13:39:21.032Z" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.2.20" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true, - "Wootric": { - "eventType": "random" - } - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - }, - { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" - }, - "metadata": { - "jobId": 16 - }, - "message": { - "type": "track", - "sentAt": "2022-01-20T13:39:21.033Z", - "userId": "dummyId1", - "channel": "web", - "properties": { - "feedbackScore": 3, - "feedbackText": "Too Slow!!!" - }, - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.2.20", - "namespace": "com.rudderlabs.javascript" - }, - "page": { - "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", - "title": "Document", - "search": "", - "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", - "initial_referrer": "$direct", - "referring_domain": "127.0.0.1:7307", - "initial_referring_domain": "" - }, - "locale": "en-US", - "ip": "0.0.0.0", - "screen": { - "width": 1440, - "height": 900, - "density": 2, - "innerWidth": 536, - "innerHeight": 689 - }, - "traits": { - "city": "Mumbai", - "name": "Dummy User 1", - "email": "dummyUser1@gmail.com", - "phone": "+19123456789", - "title": "SDE", - "gender": "Male", - "company": "Rudderstack", - "createdAt": "2021-01-20T13:39:21.032Z" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.2.20" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" - }, - "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", - "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", - "anonymousId": "bf412108-0357-4330-b119-7305e767823c", - "integrations": { - "All": true - }, - "originalTimestamp": "2022-01-20T13:39:21.032Z" - } - } -] diff --git a/test/__tests__/data/wootric_router_output.json b/test/__tests__/data/wootric_router_output.json deleted file mode 100644 index 4d23a783c8..0000000000 --- a/test/__tests__/data/wootric_router_output.json +++ /dev/null @@ -1,493 +0,0 @@ -[ - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.wootric.com/v1/end_users", - "headers": { - "Content-Type": "application/x-www-form-urlencoded", - "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" - }, - "params": {}, - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": { - "email": "dummyUser2@gmail.com", - "phone_number": "+19123456777", - "last_surveyed": "1642685961", - "external_created_at": "1611149961", - "external_id": "dummyId2", - "properties[city]": "Bangalore", - "properties[name]": "Dummy User 2", - "properties[title]": "SDE", - "properties[gender]": "Male", - "properties[company]": "Rudderstack" - } - }, - "files": {} - }, - "metadata": [ - { - "jobId": 1 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG", - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - } - } - }, - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.wootric.com/v1/end_users", - "headers": { - "Content-Type": "application/x-www-form-urlencoded", - "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" - }, - "params": {}, - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": { - "phone_number": "+19123456777", - "last_surveyed": "1642685961", - "external_created_at": "1611149961", - "external_id": "dummyId2", - "properties[city]": "Bangalore", - "properties[name]": "Dummy User 2", - "properties[title]": "SDE", - "properties[gender]": "Male", - "properties[company]": "Rudderstack" - } - }, - "files": {} - }, - "metadata": [ - { - "jobId": 2 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG", - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - } - } - }, - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.wootric.com/v1/end_users", - "headers": { - "Content-Type": "application/x-www-form-urlencoded", - "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" - }, - "params": {}, - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": { - "email": "dummyUser2@gmail.com", - "last_surveyed": "1642685961", - "external_created_at": "1611149961", - "external_id": "dummyId2", - "properties[city]": "Bangalore", - "properties[name]": "Dummy User 2", - "properties[title]": "SDE", - "properties[gender]": "Male", - "properties[company]": "Rudderstack" - } - }, - "files": {} - }, - "metadata": [ - { - "jobId": 3 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG", - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - } - } - }, - { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" - }, - "metadata": [ - { - "jobId": 5 - } - ], - "batched": false, - "statusCode": 400, - "error": "email/phone number are missing. At least one parameter must be provided", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation" - } - }, - { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" - }, - "metadata": [ - { - "jobId": 6 - } - ], - "batched": false, - "statusCode": 400, - "error": "email/phone number are missing. At least one parameter must be provided", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation" - } - }, - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "PUT", - "endpoint": "https://api.wootric.com/v1/end_users/486438462", - "headers": { - "Content-Type": "application/x-www-form-urlencoded", - "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" - }, - "params": {}, - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": { - "email": "dummyuser1_01@gmail.com", - "last_surveyed": "1642685961" - } - }, - "files": {} - }, - "metadata": [ - { - "jobId": 7 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG", - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - } - } - }, - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "PUT", - "endpoint": "https://api.wootric.com/v1/end_users/486438462", - "headers": { - "Content-Type": "application/x-www-form-urlencoded", - "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" - }, - "params": {}, - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": { - "phone_number": "+19777777778", - "last_surveyed": "1642685961" - } - }, - "files": {} - }, - "metadata": [ - { - "jobId": 8 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG", - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - } - } - }, - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "PUT", - "endpoint": "https://api.wootric.com/v1/end_users/486438462", - "headers": { - "Content-Type": "application/x-www-form-urlencoded", - "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" - }, - "params": {}, - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": { - "last_surveyed": "1642685961", - "properties[city]": "Udaipur", - "properties[name]": "Dummy User 1 New", - "properties[title]": "SDE-2", - "properties[gender]": "Male", - "properties[company]": "Rudderstack" - } - }, - "files": {} - }, - "metadata": [ - { - "jobId": 9 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG", - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - } - } - }, - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.wootric.com/v1/end_users/486438462/responses", - "headers": { - "Content-Type": "application/x-www-form-urlencoded", - "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" - }, - "params": {}, - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": { - "score": 7, - "ip_address": "0.0.0.0", - "origin_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", - "text": "Simple, Easy to use, Reliable, Affordable Product", - "created_at": "1611149961", - "end_user[properties][city]": "Mumbai", - "end_user[properties][name]": "Dummy User 1", - "end_user[properties][title]": "SDE", - "end_user[properties][gender]": "Male", - "end_user[properties][company]": "Rudderstack" - } - }, - "files": {} - }, - "metadata": [ - { - "jobId": 10 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG", - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - } - } - }, - { - "metadata": [ - { - "jobId": 11 - } - ], - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" - }, - "batched": false, - "statusCode": 400, - "error": "No user found with userId : dummyId2", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation" - } - }, - { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" - }, - "metadata": [ - { - "jobId": 12 - } - ], - "batched": false, - "statusCode": 400, - "error": "Invalid Score", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation" - } - }, - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://api.wootric.com/v1/end_users/486438462/declines", - "headers": { - "Content-Type": "application/x-www-form-urlencoded", - "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" - }, - "params": {}, - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": { - "origin_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html" - } - }, - "files": {} - }, - "metadata": [ - { - "jobId": 13 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG", - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - } - } - }, - { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" - }, - "metadata": [ - { - "jobId": 14 - } - ], - "batched": false, - "statusCode": 400, - "error": "No user found with userId : dummyId2", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation" - } - }, - { - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" - }, - "metadata": [ - { - "jobId": 15 - } - ], - "batched": false, - "statusCode": 400, - "error": "Event Type not supported", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation" - } - }, - { - "metadata": [ - { - "jobId": 16 - } - ], - "destination": { - "Config": { - "username": "wootricfakeuser@example.com", - "password": "password@123", - "accountToken": "NPS-dummyToken" - }, - "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" - }, - "batched": false, - "statusCode": 400, - "error": "Event Type is missing from Integration object", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation" - } - } -] diff --git a/test/__tests__/delighted.test.js b/test/__tests__/delighted.test.js deleted file mode 100644 index 9b5cdefb07..0000000000 --- a/test/__tests__/delighted.test.js +++ /dev/null @@ -1,48 +0,0 @@ -const integration = "delighted"; -const name = "delighted"; - -const fs = require("fs"); -const path = require("path"); -const version = "v0"; - -const transformer = require(`../../src/${version}/destinations/${integration}/transform`); -const inputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_input.json`) -); -const outputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_output.json`) -); -const inputData = JSON.parse(inputDataFile); -const expectedData = JSON.parse(outputDataFile); - -//for router test -const inputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_input.json`) -); -const outputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_output.json`) -); -const inputRouterData = JSON.parse(inputRouterDataFile); -const expectedRouterData = JSON.parse(outputRouterDataFile); - -describe(`${name} Tests`, () => { - describe("Processor Tests", () => { - inputData.forEach((input, index) => { - it(`${name} - payload: ${index}`, async () => { - try { - const output = await transformer.process(input); - expect(output).toEqual(expectedData[index]); - } catch (error) { - expect(error.message).toEqual(expectedData[index].error); - } - }); - }); - }); - - describe("Router Tests", () => { - it("Payload", async () => { - const routerOutput = await transformer.processRouterDest(inputRouterData); - expect(routerOutput).toEqual(expectedRouterData); - }); - }); -}); diff --git a/test/__tests__/drip.test.js b/test/__tests__/drip.test.js deleted file mode 100644 index 3f5b34c7eb..0000000000 --- a/test/__tests__/drip.test.js +++ /dev/null @@ -1,47 +0,0 @@ -const integration = "drip"; -const name = "drip"; - -const fs = require("fs"); -const path = require("path"); -const version = "v0"; - -const transformer = require(`../../src/${version}/destinations/${integration}/transform`); -const inputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_input.json`) -); -const outputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_output.json`) -); -const inputData = JSON.parse(inputDataFile); -const expectedData = JSON.parse(outputDataFile); - -const inputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_input.json`) -); -const outputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_output.json`) -); -const inputRouterData = JSON.parse(inputRouterDataFile); -const expectedRouterData = JSON.parse(outputRouterDataFile); - -describe(`${name} Tests`, () => { - describe("Processor Tests", () => { - inputData.forEach((input, index) => { - it(`${name} - payload: ${index}`, async () => { - try { - const output = await transformer.process(input); - expect(output).toEqual(expectedData[index]); - } catch (error) { - expect(error.message).toEqual(expectedData[index].error); - } - }); - }); - }); - - describe("Router Tests", () => { - it("Payload", async () => { - const routerOutput = await transformer.processRouterDest(inputRouterData); - expect(routerOutput).toEqual(expectedRouterData); - }); - }); -}); diff --git a/test/__tests__/facebook_conversions.test.js b/test/__tests__/facebook_conversions.test.js deleted file mode 100644 index 5bb905b5c8..0000000000 --- a/test/__tests__/facebook_conversions.test.js +++ /dev/null @@ -1,48 +0,0 @@ -const integration = "facebook_conversions"; -const name = "facebook_conversions"; - -const fs = require("fs"); -const path = require("path"); - -const version = "v0"; -const transformer = require(`../../src/${version}/destinations/${integration}/transform`); - -// Processor Test Data -const testDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}.json`) -); -const testData = JSON.parse(testDataFile); - -// Router Test Data -const inputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_input.json`) -); -const outputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_output.json`) -); -const inputRouterData = JSON.parse(inputRouterDataFile); -const expectedRouterData = JSON.parse(outputRouterDataFile); - -Date.now = jest.fn(() => new Date("2023-11-12T15:46:51.000Z")); // 2023-11-12T15:46:51.693229+05:30 - -describe(`${name} Tests`, () => { - describe("Processor", () => { - testData.forEach((dataPoint, index) => { - it(`${index}. ${integration} - ${dataPoint.description}`, async () => { - try { - const output = await transformer.process(dataPoint.input); - expect(output).toEqual(dataPoint.output); - } catch (error) { - expect(error.message).toEqual(dataPoint.output.error); - } - }); - }); - }); - - describe("Router Tests", () => { - it("Payload", async () => { - const routerOutput = await transformer.processRouterDest(inputRouterData); - expect(routerOutput).toEqual(expectedRouterData); - }); - }); -}); diff --git a/test/__tests__/freshmarketer.test.js b/test/__tests__/freshmarketer.test.js deleted file mode 100644 index 5938938b6e..0000000000 --- a/test/__tests__/freshmarketer.test.js +++ /dev/null @@ -1,46 +0,0 @@ -const fs = require("fs"); -const path = require("path"); - -const integration = "freshmarketer"; -const name = "Freshmarketer"; -const version = "v0"; - -const transformer = require(`../../src/${version}/destinations/${integration}/transform`); - -// Processor Test Data -const testDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}.json`) -); -const testData = JSON.parse(testDataFile); - -// // Router Test Data -const inputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_input.json`) -); -const outputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_output.json`) -); -const inputRouterData = JSON.parse(inputRouterDataFile); -const expectedRouterData = JSON.parse(outputRouterDataFile); - -describe(`${name} Tests`, () => { - describe("Processor", () => { - testData.forEach((dataPoint, index) => { - it(`${index}. ${integration} - ${dataPoint.description}`, async () => { - try { - const output = await transformer.process(dataPoint.input); - expect(output).toEqual(dataPoint.output); - } catch (error) { - expect(error.message).toEqual(dataPoint.output.error); - } - }); - }); - }); - - describe("Router Tests", () => { - it("Payload", async () => { - const routerOutput = await transformer.processRouterDest(inputRouterData); - expect(routerOutput).toEqual(expectedRouterData); - }); - }); -}); diff --git a/test/__tests__/freshsales.test.js b/test/__tests__/freshsales.test.js deleted file mode 100644 index 2a9234133a..0000000000 --- a/test/__tests__/freshsales.test.js +++ /dev/null @@ -1,45 +0,0 @@ -const integration = "freshsales"; -const name = "Freshsales"; - -const fs = require("fs"); -const path = require("path"); -const version = "v0"; -const transformer = require(`../../src/${version}/destinations/${integration}/transform`); - -// Processor Test Data -const testDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}.json`) -); -const testData = JSON.parse(testDataFile); - -// Router Test Data -const inputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_input.json`) -); -const outputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_output.json`) -); -const inputRouterData = JSON.parse(inputRouterDataFile); -const expectedRouterData = JSON.parse(outputRouterDataFile); - -describe(`${name} Tests`, () => { - describe("Processor", () => { - testData.forEach((dataPoint, index) => { - it(`${index}. ${integration} - ${dataPoint.description}`, async () => { - try { - const output = await transformer.process(dataPoint.input); - expect(output).toEqual(dataPoint.output); - } catch (error) { - expect(error.message).toEqual(dataPoint.output.error); - } - }); - }); - }); - - describe("Router Tests", () => { - it("Payload", async () => { - const routerOutput = await transformer.processRouterDest(inputRouterData); - expect(routerOutput).toEqual(expectedRouterData); - }); - }); -}); diff --git a/test/__tests__/ga4.test.js b/test/__tests__/ga4.test.js deleted file mode 100644 index e685c5e432..0000000000 --- a/test/__tests__/ga4.test.js +++ /dev/null @@ -1,31 +0,0 @@ -const integration = "ga4"; -const name = "Google Analytics 4"; - -const fs = require("fs"); -const path = require("path"); -const version = "v0"; - -const transformer = require(`../../src/${version}/destinations/${integration}/transform`); - -// Processor Test files -const testDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}.json`) -); -const testData = JSON.parse(testDataFile); - -Date.now = jest.fn(() => new Date("2022-04-29T05:17:09Z")); - -describe(`${name} Tests`, () => { - describe("Processor", () => { - testData.forEach((dataPoint, index) => { - it(`${index}. ${integration} - ${dataPoint.description}`, () => { - try { - const output = transformer.process(dataPoint.input); - expect(output).toEqual(dataPoint.output); - } catch (error) { - expect(error.message).toEqual(dataPoint.output.error); - } - }); - }); - }); -}); diff --git a/test/__tests__/gainsight.test.js b/test/__tests__/gainsight.test.js deleted file mode 100644 index b0ff8d27b7..0000000000 --- a/test/__tests__/gainsight.test.js +++ /dev/null @@ -1,48 +0,0 @@ -const integration = "gainsight"; -const name = "Gainsight CS"; - -const fs = require("fs"); -const path = require("path"); -const version = "v0"; - -const transformer = require(`../../src/${version}/destinations/${integration}/transform`); -const inputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_input.json`) -); -const outputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_output.json`) -); -const inputData = JSON.parse(inputDataFile); -const expectedData = JSON.parse(outputDataFile); - -// Router Test Data -const inputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_input.json`) -); -const outputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_output.json`) -); -const inputRouterData = JSON.parse(inputRouterDataFile); -const expectedRouterData = JSON.parse(outputRouterDataFile); - -describe(`${name} Tests`, () => { - describe("Processor Tests", () => { - inputData.forEach((input, index) => { - it(`${name} - payload: ${index}`, async () => { - try { - const output = await transformer.process(input); - expect(output).toEqual(expectedData[index]); - } catch (error) { - expect(error.message).toEqual(expectedData[index].error); - } - }); - }); - }); - - describe("Router Tests", () => { - it("Payload", async () => { - const routerOutput = await transformer.processRouterDest(inputRouterData); - expect(routerOutput).toEqual(expectedRouterData); - }); - }); -}); diff --git a/test/__tests__/gainsight_px.test.js b/test/__tests__/gainsight_px.test.js deleted file mode 100644 index 24b96d008d..0000000000 --- a/test/__tests__/gainsight_px.test.js +++ /dev/null @@ -1,48 +0,0 @@ -const integration = "gainsight_px"; -const name = "Gainsight PX"; - -const fs = require("fs"); -const path = require("path"); -const version = "v0"; - -const transformer = require(`../../src/${version}/destinations/${integration}/transform`); -const inputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_input.json`) -); -const outputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_output.json`) -); -const inputData = JSON.parse(inputDataFile); -const expectedData = JSON.parse(outputDataFile); - -// Router Test Data -const inputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_input.json`) -); -const outputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_output.json`) -); -const inputRouterData = JSON.parse(inputRouterDataFile); -const expectedRouterData = JSON.parse(outputRouterDataFile); - -describe(`${name} Tests`, () => { - describe("Processor Tests", () => { - inputData.forEach((input, index) => { - it(`${name} - payload: ${index}`, async () => { - try { - const output = await transformer.process(input); - expect(output).toEqual(expectedData[index]); - } catch (error) { - expect(error.message).toEqual(expectedData[index].error); - } - }); - }); - }); - - describe("Router Tests", () => { - it("Payload", async () => { - const routerOutput = await transformer.processRouterDest(inputRouterData); - expect(routerOutput).toEqual(expectedRouterData); - }); - }); -}); diff --git a/test/__tests__/hubspot.test.js b/test/__tests__/hubspot.test.js deleted file mode 100644 index 83f02f5a14..0000000000 --- a/test/__tests__/hubspot.test.js +++ /dev/null @@ -1,139 +0,0 @@ -jest.mock("axios"); - -const integration = "hs"; -const name = "Hubspot"; - -const fs = require("fs"); -const path = require("path"); - -const version = "v0"; - -const transformer = require(`../../src/${version}/destinations/${integration}/transform`); - -// Processor Test files -const inputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_input.json`) -); -const outputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_output.json`) -); -const inputData = JSON.parse(inputDataFile); -const expectedData = JSON.parse(outputDataFile); - -// Router Legacy Test files -const inputLegacyRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_input_legacy.json`) -); -const outputLegacyRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_output_legacy.json`) -); -const inputLegacyRouterData = JSON.parse(inputLegacyRouterDataFile); -const expectedLegacyRouterData = JSON.parse(outputLegacyRouterDataFile); - -// Router Test files (New API) -const inputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_input.json`) -); -const outputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_output.json`) -); -const inputRouterData = JSON.parse(inputRouterDataFile); -const expectedRouterData = JSON.parse(outputRouterDataFile); - -// Router Test files for rETL sources -const inputRouterDataFilerETL = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_rETL_input.json`) -); -const outputRouterDataFilerETL = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_rETL_output.json`) -); -const inputRouterDatarETL = JSON.parse(inputRouterDataFilerETL); -const expectedRouterDatarETL = JSON.parse(outputRouterDataFilerETL); - -// Router Test files for rETL sources (legacy) -const inputRouterDataFilerETLLegacy = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_legacy_rETL_input.json`) -); -const outputRouterDataFilerETLLegacy = fs.readFileSync( - path.resolve( - __dirname, - `./data/${integration}_router_legacy_rETL_output.json` - ) -); -const inputRouterDatarETLLegacy = JSON.parse(inputRouterDataFilerETLLegacy); -const expectedRouterDatarETLLegacy = JSON.parse(outputRouterDataFilerETLLegacy); - -describe(`${name} Tests`, () => { - describe("Processor", () => { - inputData.forEach(async (input, index) => { - it(`Payload - ${index}`, async () => { - try { - const output = await transformer.process(input); - expect(output).toEqual(expectedData[index]); - } catch (error) { - expect(error.message).toEqual(expectedData[index].error); - } - }); - }); - }); - - // Legacy API - // It has different test cases as this (NEW API) destination config can - // change in the middle of legacy batching causing issue with the existing flow - describe("Router Tests (Legacy API)", () => { - it("Payload", async () => { - const routerOutput = await transformer.processRouterDest( - inputLegacyRouterData - ); - expect(routerOutput).toEqual(expectedLegacyRouterData); - }); - }); - - // New API - describe("Router Tests (New API)", () => { - it("Payload", async () => { - const routerOutput = await transformer.processRouterDest(inputRouterData); - expect(routerOutput).toEqual(expectedRouterData); - }); - }); - - describe("Router Tests for rETL sources", () => { - it("Payload", async () => { - const routerOutputrETL = await transformer.processRouterDest( - inputRouterDatarETL - ); - expect(routerOutputrETL).toEqual(expectedRouterDatarETL); - }); - - it("should transform association events", async () => { - const assocInput = JSON.parse( - fs.readFileSync( - path.resolve( - __dirname, - `data/${integration}_router_associations_rEtl_input.json` - ) - ) - ); - const assocExpectedOutput = JSON.parse( - fs.readFileSync( - path.resolve( - __dirname, - `data/${integration}_router_associations_rEtl_output.json` - ) - ) - ); - const actualOutput = await transformer.processRouterDest(assocInput); - - expect(actualOutput).toEqual(assocExpectedOutput); - }); - }); - // rETL Sources - describe("Router Tests for rETL sources (Legacy)", () => { - it("Payload", async () => { - const routerOutputrETLLegacy = await transformer.processRouterDest( - inputRouterDatarETLLegacy - ); - expect(routerOutputrETLLegacy).toEqual(expectedRouterDatarETLLegacy); - }); - }); -}); diff --git a/test/__tests__/intercom.test.js b/test/__tests__/intercom.test.js deleted file mode 100644 index 973b3e8a60..0000000000 --- a/test/__tests__/intercom.test.js +++ /dev/null @@ -1,49 +0,0 @@ -const integration = "intercom"; -const name = "Intercom"; - -const fs = require("fs"); -const path = require("path"); - -const version = "v0"; - -const transformer = require(`../../src/${version}/destinations/${integration}/transform`); -const inputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_input.json`) -); -const outputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_output.json`) -); -const inputData = JSON.parse(inputDataFile); -const expectedData = JSON.parse(outputDataFile); - -// Router Test Data -const inputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_input.json`) -); -const outputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_output.json`) -); -const inputRouterData = JSON.parse(inputRouterDataFile); -const expectedRouterData = JSON.parse(outputRouterDataFile); - -describe(`${name} Tests`, () => { - describe("Processor Tests", () => { - inputData.forEach((input, index) => { - it(`${name} - payload: ${index}`, async () => { - try { - const output = await transformer.process(input); - expect(output).toEqual(expectedData[index]); - } catch (error) { - expect(error.message).toEqual(expectedData[index].error); - } - }); - }); - }); - - describe("Router Tests", () => { - it("Payload", async () => { - const routerOutput = await transformer.processRouterDest(inputRouterData); - expect(routerOutput).toEqual(expectedRouterData); - }); - }); -}); diff --git a/test/__tests__/klaviyo.test.js b/test/__tests__/klaviyo.test.js deleted file mode 100644 index 209811b007..0000000000 --- a/test/__tests__/klaviyo.test.js +++ /dev/null @@ -1,47 +0,0 @@ -const fs = require("fs"); -const path = require("path"); - -const integration = "klaviyo"; -const name = "Klaviyo"; -const version = "v0"; - -const { FEATURE_FILTER_CODE } = require('../../src/v0/util/constant'); -const transformer = require(`../../src/${version}/destinations/${integration}/transform`); - -// Processor Test Data -const testDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}.json`) -); -const testData = JSON.parse(testDataFile); - -// Router Test Data -const routerTestDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router.json`) -); -const routerTestData = JSON.parse(routerTestDataFile); - -describe(`${name} Tests`, () => { - describe("Processor", () => { - testData.forEach((dataPoint, index) => { - it(`${index}. ${integration} - ${dataPoint.description}`, async () => { - try { - const output = await transformer.process(dataPoint.input); - expect(output).toEqual(dataPoint.output); - } catch (error) { - expect(error.message).toEqual(dataPoint.output.error); - } - }); - }); - }); - - describe("Router", () => { - routerTestData.forEach((dataPoint, index) => { - it(`${index}. ${integration} - ${dataPoint.description}`, async () => { - const oldTransformerOutput = await transformer.processRouterDest(dataPoint.input); - const newTransformerOutput = await transformer.processRouterDest(dataPoint.input, { features: { [FEATURE_FILTER_CODE]: true } }); - expect(oldTransformerOutput).toEqual(dataPoint.oldTransformerOutput); - expect(newTransformerOutput).toEqual(dataPoint.newTransformerOutput); - }); - }); - }); -}); diff --git a/test/__tests__/kustomer.test.js b/test/__tests__/kustomer.test.js deleted file mode 100644 index 89c5e844a9..0000000000 --- a/test/__tests__/kustomer.test.js +++ /dev/null @@ -1,49 +0,0 @@ -const integration = "kustomer"; -const name = "Kustomer"; - -const fs = require("fs"); -const path = require("path"); - -const version = "v0"; - -const transformer = require(`../../src/${version}/destinations/${integration}/transform`); -const inputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_input.json`) -); -const outputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_output.json`) -); -const inputData = JSON.parse(inputDataFile); -const expectedData = JSON.parse(outputDataFile); - -// Router Test files -const inputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_input.json`) -); -const outputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_output.json`) -); -const inputRouterData = JSON.parse(inputRouterDataFile); -const expectedRouterData = JSON.parse(outputRouterDataFile); - -describe(`${name} Tests`, () => { - describe("Processor", () => { - inputData.forEach(async (input, index) => { - it(`Payload - ${index}`, async () => { - try { - const output = await transformer.process(input); - expect(output).toEqual(expectedData[index]); - } catch (error) { - expect(error.message).toEqual(expectedData[index].error); - } - }); - }); - }); - - describe("Router Tests", () => { - it("Payload", async () => { - const routerOutput = await transformer.processRouterDest(inputRouterData); - expect(routerOutput).toEqual(expectedRouterData); - }); - }); -}); diff --git a/test/__tests__/mailchimp.test.js b/test/__tests__/mailchimp.test.js deleted file mode 100644 index 5da9d572f7..0000000000 --- a/test/__tests__/mailchimp.test.js +++ /dev/null @@ -1,67 +0,0 @@ -const integration = "mailchimp"; -const name = "Mailchimp"; - -const fs = require("fs"); -const path = require("path"); - -const version = "v0"; - -const transformer = require(`../../src/${version}/destinations/${integration}/transform`); -const inputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_input.json`) -); -const outputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_output.json`) -); -const inputData = JSON.parse(inputDataFile); -const expectedData = JSON.parse(outputDataFile); - -// Router Test Data -const inputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_input.json`) -); -const outputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_output.json`) -); -const inputRouterData = JSON.parse(inputRouterDataFile); -const expectedRouterData = JSON.parse(outputRouterDataFile); - -const batchInputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_batch_input.json`) -); -const batchOutputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_batch_output.json`) -); - -const batchInputData = JSON.parse(batchInputDataFile); -const batchExpectedData = JSON.parse(batchOutputDataFile); - -describe(`${name} Tests`, () => { - describe("Processor Tests", () => { - inputData.forEach((input, index) => { - it(`${name} - payload: ${index}`, async () => { - try { - const output = await transformer.process(input); - expect(output).toEqual(expectedData[index]); - } catch (error) { - expect(error.message).toEqual(expectedData[index].error); - } - }); - }); - }); - - describe("Router Tests", () => { - it("Payload", async () => { - const routerOutput = await transformer.processRouterDest(inputRouterData); - expect(routerOutput).toEqual(expectedRouterData); - }); - }); - - describe("Batching", () => { - it("Payload", async () => { - const output = await transformer.processRouterDest(batchInputData); - expect(Array.isArray(output)).toEqual(true); - expect(output).toEqual(batchExpectedData); - }); - }); -}); diff --git a/test/__tests__/marketo.test.js b/test/__tests__/marketo.test.js deleted file mode 100644 index b300b20f10..0000000000 --- a/test/__tests__/marketo.test.js +++ /dev/null @@ -1,71 +0,0 @@ -jest.mock("axios"); - -const integration = "marketo"; -const name = "Marketo"; -const version = "v0"; - -const fs = require("fs"); -const path = require("path"); - -const transformer = require(`../../src/${version}/destinations/${integration}/transform`); - -// Processor Test files -const inputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_input.json`) -); -const outputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_output.json`) -); -const inputData = JSON.parse(inputDataFile); -const expectedData = JSON.parse(outputDataFile); - -// Router Test files -const inputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_input.json`) -); -const outputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_output.json`) -); -const inputRouterData = JSON.parse(inputRouterDataFile); -const expectedRouterData = JSON.parse(outputRouterDataFile); - -// Router Metadata Test files -const inputRouterMetadataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_metadata_input.json`) -); -const outputRouterMetadataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_metadata_output.json`) -); -const inputRouterMetadata = JSON.parse(inputRouterMetadataFile); -const expectedRouterMetadata = JSON.parse(outputRouterMetadataFile); - -describe(`${name} Tests`, () => { - describe("Processor", () => { - inputData.forEach(async (input, index) => { - it(`Payload - ${index}`, async () => { - try { - const output = await transformer.process(input); - expect(output).toEqual(expectedData[index]); - } catch (error) { - expect(error.message).toEqual(expectedData[index].error); - } - }); - }); - }); - - describe("Router Tests", () => { - it("Payload", async () => { - const routerOutput = await transformer.processRouterDest(inputRouterData); - expect(routerOutput).toEqual(expectedRouterData); - }); - }); - - describe("Router Metadata Tests", () => { - it("Payload", async () => { - const routerMetadataOutput = await transformer.processMetadataForRouter( - inputRouterMetadata - ); - expect(routerMetadataOutput).toEqual(expectedRouterMetadata); - }); - }); -}); diff --git a/test/__tests__/monday.test.js b/test/__tests__/monday.test.js deleted file mode 100644 index 0344cfcf75..0000000000 --- a/test/__tests__/monday.test.js +++ /dev/null @@ -1,46 +0,0 @@ -const fs = require("fs"); -const path = require("path"); - -const integration = "monday"; -const name = "Monday"; -const version = "v0"; - -const transformer = require(`../../src/${version}/destinations/${integration}/transform`); - -// Processor Test Data -const testDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}.json`) -); -const testData = JSON.parse(testDataFile); - -// Router Test Data -const inputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_input.json`) -); -const outputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_output.json`) -); -const inputRouterData = JSON.parse(inputRouterDataFile); -const expectedRouterData = JSON.parse(outputRouterDataFile); - -describe(`${name} Tests`, () => { - describe("Processor", () => { - testData.forEach((dataPoint, index) => { - it(`${index}. ${integration} - ${dataPoint.description}`, async () => { - try { - const output = await transformer.process(dataPoint.input); - expect(output).toEqual(dataPoint.output); - } catch (error) { - expect(error.message).toEqual(dataPoint.output.error); - } - }); - }); - }); - - describe("Router Tests", () => { - it("Payload", async () => { - const routerOutput = await transformer.processRouterDest(inputRouterData); - expect(routerOutput).toEqual(expectedRouterData); - }); - }); -}); diff --git a/test/__tests__/profitwell.test.js b/test/__tests__/profitwell.test.js deleted file mode 100644 index 99ed1a4c43..0000000000 --- a/test/__tests__/profitwell.test.js +++ /dev/null @@ -1,62 +0,0 @@ -const fs = require("fs"); -const path = require("path"); -const { mockaxios } = require("../__mocks__/network"); - -const integration = "profitwell"; -const name = "profitwell"; -const version = "v0"; - -const transformer = require(`../../src/${version}/destinations/${integration}/transform`); - -// Processor Test files -const inputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_input.json`) -); -const outputDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_output.json`) -); -const inputData = JSON.parse(inputDataFile); -const expectedData = JSON.parse(outputDataFile); - -// Router Test Data -const inputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_input.json`) -); -const outputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_output.json`) -); -const inputRouterData = JSON.parse(inputRouterDataFile); -const expectedRouterData = JSON.parse(outputRouterDataFile); - -jest.mock("../../src/adapters/network", () => { - const originalModule = jest.requireActual("../../src/adapters/network"); - - //Mock the default export and named export 'send' - return { - __esModule: true, - ...originalModule, - send: jest.fn(mockaxios) - }; -}); - -describe(`${name} Tests`, () => { - describe("Processor Tests", () => { - inputData.forEach((input, index) => { - it(`${name} - payload: ${index}`, async () => { - try { - const output = await transformer.process(input); - expect(output).toEqual(expectedData[index]); - } catch (error) { - expect(error.message).toEqual(expectedData[index].error); - } - }); - }); - }); - - describe("Router Tests", () => { - it("Payload", async () => { - const routerOutput = await transformer.processRouterDest(inputRouterData); - expect(routerOutput).toEqual(expectedRouterData); - }); - }); -}); diff --git a/test/__tests__/sendinblue.test.js b/test/__tests__/sendinblue.test.js deleted file mode 100644 index 063f5bf282..0000000000 --- a/test/__tests__/sendinblue.test.js +++ /dev/null @@ -1,47 +0,0 @@ -const integration = "sendinblue"; -const name = "Sendinblue"; - -const fs = require("fs"); -const path = require("path"); - -const version = "v0"; - -const transformer = require(`../../src/${version}/destinations/${integration}/transform`); - -// Processor Test files -const testDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}.json`) -); -const testData = JSON.parse(testDataFile); - -// Router Test files -const inputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_input.json`) -); -const outputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_output.json`) -); -const inputRouterData = JSON.parse(inputRouterDataFile); -const expectedRouterData = JSON.parse(outputRouterDataFile); - -describe(`${name} Tests`, () => { - describe("Processor", () => { - testData.forEach(async (dataPoint, index) => { - it(`${index}. ${integration} - ${dataPoint.description}`, async () => { - try { - const output = await transformer.process(dataPoint.input); - expect(output).toEqual(dataPoint.output); - } catch (error) { - expect(error.message).toEqual(dataPoint.output.error); - } - }); - }); - }); - - describe("Router", () => { - it("Payload", async () => { - const routerOutput = await transformer.processRouterDest(inputRouterData); - expect(routerOutput).toEqual(expectedRouterData); - }); - }); -}); diff --git a/test/__tests__/stormly.test.js b/test/__tests__/stormly.test.js deleted file mode 100644 index 2640440b3f..0000000000 --- a/test/__tests__/stormly.test.js +++ /dev/null @@ -1,47 +0,0 @@ -const integration = "stormly"; -const name = "STORMLY"; - -const fs = require("fs"); -const path = require("path"); - -const version = "v0"; - -const transformer = require(`../../src/${version}/destinations/${integration}/transform`); - -// Processor Test files -const testDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}.json`) -); -const testData = JSON.parse(testDataFile); - -// Router Test files -const inputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_input.json`) -); -const outputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_output.json`) -); -const inputRouterData = JSON.parse(inputRouterDataFile); -const expectedRouterData = JSON.parse(outputRouterDataFile); - -describe(`${name} Tests`, () => { - describe("Processor", () => { - testData.forEach(async (dataPoint, index) => { - it(`${index}. ${integration} - ${dataPoint.description}`, async () => { - try { - const output = await transformer.process(dataPoint.input); - expect(output).toEqual(dataPoint.output); - } catch (error) { - expect(error.message).toEqual(dataPoint.output.error); - } - }); - }); - }); - - describe("Router", () => { - it("Payload", async () => { - const routerOutput = await transformer.processRouterDest(inputRouterData); - expect(routerOutput).toEqual(expectedRouterData); - }); - }); -}); diff --git a/test/__tests__/warehouse.test.js b/test/__tests__/warehouse.test.js index 045bab35a6..772e59e65a 100644 --- a/test/__tests__/warehouse.test.js +++ b/test/__tests__/warehouse.test.js @@ -20,6 +20,7 @@ const { const { validTimestamp } = require("../../src/warehouse/util.js"); +const {isBlank} = require("../../src/warehouse/config/helpers.js"); const version = "v0"; const integrations = [ @@ -1096,54 +1097,117 @@ describe("Integration options", () => { describe("validTimestamp", () => { const testCases = [ { + name: "undefined input should return false", input: undefined, expected: false, }, { + name: "negative year and time input should return false #1", input: '-0001-11-30T00:00:00+0000', expected: false, }, { + name: "negative year and time input should return false #2", input: '-2023-06-14T05:23:59.244Z', expected: false, }, { + name: "negative year and time input should return false #3", + input: '-1900-06-14T05:23:59.244Z', + expected: false, + }, + { + name: "positive year and time input should return false", input: '+2023-06-14T05:23:59.244Z', expected: false, }, { + name: "valid timestamp input should return true", input: '2023-06-14T05:23:59.244Z', expected: true, }, { - input: '-1900-06-14T05:23:59.244Z', - expected: false, - }, - { + name: "non-date string input should return false", input: 'abc', expected: false, }, { - input: '%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216Windows%u2216win%u002ein', + name: "malicious string input should return false", + input: '%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216%u002e%u002e%u2216Windows%u2216win%u002ein', expected: false, }, { + name: "empty string input should return false", input: '', expected: false, }, { + name: "valid date input should return true", input: '2023-06-14', expected: true, }, { + name: "time-only input should return false", input: '05:23:59.244Z', expected: false, - } - ] + }, + { + name: "non-string input should return false", + input: { abc: 123 }, + expected: false, + }, + { + name: "object with toString method input should return false", + input: { + toString: '2023-06-14T05:23:59.244Z' + }, + expected: false, + }, + ]; for (const testCase of testCases) { - it(`should return ${testCase.expected} for ${testCase.input}`, () => { + it(`should return ${testCase.expected} for ${testCase.name}`, () => { expect(validTimestamp(testCase.input)).toEqual(testCase.expected); }); } }); + + + +describe("isBlank", () => { + const testCases = [ + { + name: "null", + input: null, + expected: true + }, + { + name: "empty string", + input: "", + expected: true + }, + { + name: "non-empty string", + input: "test", + expected: false + }, + { + name: "numeric value", + input: 1634762544, + expected: false + }, + { + name: "object with toString property", + input: { + toString: '2023-06-14T05:23:59.244Z' + }, + expected: false + }, + ]; + + for (const testCase of testCases) { + it(`should return ${testCase.expected} for ${testCase.name}`, () => { + expect(isBlank(testCase.input)).toEqual(testCase.expected); + }); + } +}); \ No newline at end of file diff --git a/test/__tests__/wootric.test.js b/test/__tests__/wootric.test.js deleted file mode 100644 index 7e7e81cd49..0000000000 --- a/test/__tests__/wootric.test.js +++ /dev/null @@ -1,46 +0,0 @@ -const integration = "wootric"; -const name = "Wootric"; - -const fs = require("fs"); -const path = require("path"); -const version = "v0"; - -const transformer = require(`../../src/${version}/destinations/${integration}/transform`); - -// Processor Test files -const testDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}.json`) -); -const testData = JSON.parse(testDataFile); - -// Router Test files -const inputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_input.json`) -); -const outputRouterDataFile = fs.readFileSync( - path.resolve(__dirname, `./data/${integration}_router_output.json`) -); -const inputRouterData = JSON.parse(inputRouterDataFile); -const expectedRouterData = JSON.parse(outputRouterDataFile); - -describe(`${name} Tests`, () => { - describe("Processor", () => { - testData.forEach(async (dataPoint, index) => { - it(`${index}. ${integration} - ${dataPoint.description}`, async () => { - try { - const output = await transformer.process(dataPoint.input); - expect(output).toEqual(dataPoint.output); - } catch (error) { - expect(error.message).toEqual(dataPoint.output.error); - } - }); - }); - }); - - describe("Router", () => { - it("Payload", async () => { - const routerOutput = await transformer.processRouterDest(inputRouterData); - expect(routerOutput).toEqual(expectedRouterData); - }); - }); -}); diff --git a/test/integrations/destinations/am/batch/data.ts b/test/integrations/destinations/am/batch/data.ts new file mode 100644 index 0000000000..962bb476c4 --- /dev/null +++ b/test/integrations/destinations/am/batch/data.ts @@ -0,0 +1,3274 @@ +export const data = [ + { + name: 'am', + description: 'Test 0: ERROR - Both userId and deviceId cannot be undefined', + feature: 'batch', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + destType: 'am', + input: [ + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: [ + { + ip: '0.0.0.0', + time: 1603132665557, + os_name: '', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + library: 'rudderstack', + event_type: '$identify', + os_version: '', + session_id: -1, + app_version: '1.1.5', + user_properties: { + name: 'some campaign', + plan: 'Open source', + term: 'keyword', + test: 'other value', + email: 'test@rudderstack.com', + logins: 5, + medium: 'medium', + source: 'google', + content: 'some content', + category: 'SampleIdentify', + createdAt: 1599264000, + }, + }, + ], + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + options: { + min_id_length: 1, + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api.eu.amplitude.com/2/httpapi', + }, + metadata: { + job_id: 1, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'EU', + }, + }, + }, + ], + }, + }, + }, + output: { + response: { + status: 200, + body: [ + { + batched: false, + error: 'Both userId and deviceId cannot be undefined', + metadata: { + job_id: 1, + }, + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 1', + feature: 'batch', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + destType: 'am', + input: [ + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: [ + { + ip: '0.0.0.0', + time: 1603132665557, + os_name: '', + user_id: '123', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: '$identify', + os_version: '', + session_id: -1, + app_version: '1.1.5', + user_properties: { + name: 'some campaign', + plan: 'Open source', + term: 'keyword', + test: 'other value', + email: 'test@rudderstack.com', + logins: 5, + medium: 'medium', + source: 'google', + content: 'some content', + category: 'SampleIdentify', + createdAt: 1599264000, + }, + }, + ], + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + options: { + min_id_length: 1, + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api.eu.amplitude.com/2/httpapi', + }, + metadata: { + job_id: 1, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'EU', + }, + }, + }, + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: [ + { + ip: '[::1]', + time: 1603132712347, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: 'Simple track call', + os_version: '', + session_id: -1, + app_version: '1.1.5', + event_properties: { + key: 'val', + }, + }, + ], + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + options: { + min_id_length: 1, + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/2/httpapi', + }, + metadata: { + job_id: 2, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: [ + { + ip: '[::1]', + time: 1603132719505, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: 'Simple track call', + os_version: '', + session_id: -1, + app_version: '1.1.5', + event_properties: { + key: 'val', + }, + }, + ], + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + options: { + min_id_length: 1, + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/2/httpapi', + }, + metadata: { + job_id: 3, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: [ + { + ip: '[::1]', + time: 1603132726413, + groups: { + Company: 'Comapny-ABC', + }, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: '$identify', + os_version: '', + session_id: -1, + app_version: '1.1.5', + user_properties: { + Company: 'Comapny-ABC', + }, + }, + ], + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + options: { + min_id_length: 1, + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/2/httpapi', + }, + metadata: { + job_id: 4, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: [ + { + ip: '[::1]', + time: 1603132726413, + groups: { + Company: 'Comapny-ABC', + }, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: '$identify', + os_version: '', + session_id: -1, + app_version: '1.1.5', + user_properties: { + Company: 'Comapny-ABC', + }, + }, + ], + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + options: { + min_id_length: 1, + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/2/httpapi', + }, + metadata: { + job_id: 5, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: { + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + identification: [ + '{"group_type":"Company","group_value":"Comapny-ABC","group_properties":{"KEY_2":{"CHILD_KEY_102":"value_103","CHILD_KEY_92":"value_95"},"KEY_3":{"CHILD_KEY_102":"value_103","CHILD_KEY_92":"value_95"},"name_trait":"Company","value_trait":"Comapny-ABC"}}', + ], + }, + JSON: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: {}, + version: '1', + endpoint: 'https://api2.amplitude.com/groupidentify', + }, + metadata: { + job_id: 6, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: { + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + mapping: ['{"global_user_id":"newUserIdAlias","user_id":"sampleusrRudder3"}'], + }, + JSON: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: {}, + version: '1', + endpoint: 'https://api2.amplitude.com/usermap', + }, + metadata: { + job_id: 7, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + ], + }, + }, + }, + output: { + response: { + status: 200, + body: [ + { + batchedRequest: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: [ + { + ip: '0.0.0.0', + time: 1603132665557, + os_name: '', + user_id: '123', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: '$identify', + os_version: '', + session_id: -1, + app_version: '1.1.5', + user_properties: { + name: 'some campaign', + plan: 'Open source', + term: 'keyword', + test: 'other value', + email: 'test@rudderstack.com', + logins: 5, + medium: 'medium', + source: 'google', + content: 'some content', + category: 'SampleIdentify', + createdAt: 1599264000, + }, + }, + ], + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + options: { + min_id_length: 1, + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api.eu.amplitude.com/2/httpapi', + }, + metadata: [ + { + job_id: 1, + }, + ], + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'EU', + }, + }, + }, + { + batchedRequest: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: { + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + identification: [ + '{"group_type":"Company","group_value":"Comapny-ABC","group_properties":{"KEY_2":{"CHILD_KEY_102":"value_103","CHILD_KEY_92":"value_95"},"KEY_3":{"CHILD_KEY_102":"value_103","CHILD_KEY_92":"value_95"},"name_trait":"Company","value_trait":"Comapny-ABC"}}', + ], + }, + JSON: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: {}, + version: '1', + endpoint: 'https://api2.amplitude.com/groupidentify', + }, + metadata: [ + { + job_id: 6, + }, + ], + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + batchedRequest: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: { + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + mapping: ['{"global_user_id":"newUserIdAlias","user_id":"sampleusrRudder3"}'], + }, + JSON: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: {}, + version: '1', + endpoint: 'https://api2.amplitude.com/usermap', + }, + metadata: [ + { + job_id: 7, + }, + ], + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + batchedRequest: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: [ + { + ip: '[::1]', + time: 1603132712347, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: 'Simple track call', + os_version: '', + session_id: -1, + app_version: '1.1.5', + event_properties: { + key: 'val', + }, + }, + { + ip: '[::1]', + time: 1603132719505, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: 'Simple track call', + os_version: '', + session_id: -1, + app_version: '1.1.5', + event_properties: { + key: 'val', + }, + }, + { + ip: '[::1]', + time: 1603132726413, + groups: { + Company: 'Comapny-ABC', + }, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: '$identify', + os_version: '', + session_id: -1, + app_version: '1.1.5', + user_properties: { + Company: 'Comapny-ABC', + }, + }, + { + ip: '[::1]', + time: 1603132726413, + groups: { + Company: 'Comapny-ABC', + }, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: '$identify', + os_version: '', + session_id: -1, + app_version: '1.1.5', + user_properties: { + Company: 'Comapny-ABC', + }, + }, + ], + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/batch', + }, + metadata: [ + { + job_id: 2, + }, + { + job_id: 3, + }, + { + job_id: 4, + }, + { + job_id: 5, + }, + ], + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 2', + feature: 'batch', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + destType: 'am', + input: [ + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: { + ip: '0.0.0.0', + time: 1603132665557, + os_name: '', + user_id: '123', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: '$identify', + os_version: '', + session_id: -1, + app_version: '1.1.5', + user_properties: { + name: 'some campaign', + plan: 'Open source', + term: 'keyword', + test: 'other value', + email: 'test@rudderstack.com', + logins: 5, + medium: 'medium', + source: 'google', + content: 'some content', + category: 'SampleIdentify', + createdAt: 1599264000, + }, + }, + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + options: { + min_id_length: 1, + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/2/httpapi', + }, + metadata: { + job_id: 1, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: { + ip: '[::1]', + time: 1603132712347, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: 'Simple track call', + os_version: '', + session_id: -1, + app_version: '1.1.5', + event_properties: { + key: 'val', + }, + }, + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + options: { + min_id_length: 1, + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/2/httpapi', + }, + metadata: { + job_id: 2, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: { + ip: '[::1]', + time: 1603132719505, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: 'Simple track call', + os_version: '', + session_id: -1, + app_version: '1.1.5', + event_properties: { + key: 'val', + }, + }, + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + options: { + min_id_length: 1, + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/2/httpapi', + }, + metadata: { + job_id: 3, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: { + ip: '[::1]', + time: 1603132726413, + groups: { + Company: 'Comapny-ABC', + }, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: '$identify', + os_version: '', + session_id: -1, + app_version: '1.1.5', + user_properties: { + Company: 'Comapny-ABC', + }, + }, + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + options: { + min_id_length: 1, + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/2/httpapi', + }, + metadata: { + job_id: 4, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: { + ip: '[::1]', + time: 1603132726413, + groups: { + Company: 'Comapny-ABC', + }, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: '$identify', + os_version: '', + session_id: -1, + app_version: '1.1.5', + user_properties: { + Company: 'Comapny-ABC', + }, + }, + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + options: { + min_id_length: 1, + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/2/httpapi', + }, + metadata: { + job_id: 5, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: { + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + identification: [ + '{"group_type":"Company","group_value":"Comapny-ABC","group_properties":{"KEY_2":{"CHILD_KEY_102":"value_103","CHILD_KEY_92":"value_95"},"KEY_3":{"CHILD_KEY_102":"value_103","CHILD_KEY_92":"value_95"},"name_trait":"Company","value_trait":"Comapny-ABC"}}', + ], + }, + JSON: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: {}, + version: '1', + endpoint: 'https://api2.amplitude.com/groupidentify', + }, + metadata: { + job_id: 6, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: { + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + mapping: ['{"global_user_id":"newUserIdAlias","user_id":"sampleusrRudder3"}'], + }, + JSON: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: {}, + version: '1', + endpoint: 'https://api2.amplitude.com/usermap', + }, + metadata: { + job_id: 7, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + ], + }, + }, + }, + output: { + response: { + status: 200, + body: [ + { + batchedRequest: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: { + ip: '0.0.0.0', + time: 1603132665557, + os_name: '', + user_id: '123', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: '$identify', + os_version: '', + session_id: -1, + app_version: '1.1.5', + user_properties: { + name: 'some campaign', + plan: 'Open source', + term: 'keyword', + test: 'other value', + email: 'test@rudderstack.com', + logins: 5, + medium: 'medium', + source: 'google', + content: 'some content', + category: 'SampleIdentify', + createdAt: 1599264000, + }, + }, + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + options: { + min_id_length: 1, + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/2/httpapi', + }, + metadata: [ + { + job_id: 1, + }, + ], + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + batchedRequest: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: { + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + identification: [ + '{"group_type":"Company","group_value":"Comapny-ABC","group_properties":{"KEY_2":{"CHILD_KEY_102":"value_103","CHILD_KEY_92":"value_95"},"KEY_3":{"CHILD_KEY_102":"value_103","CHILD_KEY_92":"value_95"},"name_trait":"Company","value_trait":"Comapny-ABC"}}', + ], + }, + JSON: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: {}, + version: '1', + endpoint: 'https://api2.amplitude.com/groupidentify', + }, + metadata: [ + { + job_id: 6, + }, + ], + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + batchedRequest: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: { + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + mapping: ['{"global_user_id":"newUserIdAlias","user_id":"sampleusrRudder3"}'], + }, + JSON: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: {}, + version: '1', + endpoint: 'https://api2.amplitude.com/usermap', + }, + metadata: [ + { + job_id: 7, + }, + ], + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + batchedRequest: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: [ + { + ip: '[::1]', + time: 1603132712347, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: 'Simple track call', + os_version: '', + session_id: -1, + app_version: '1.1.5', + event_properties: { + key: 'val', + }, + }, + { + ip: '[::1]', + time: 1603132719505, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: 'Simple track call', + os_version: '', + session_id: -1, + app_version: '1.1.5', + event_properties: { + key: 'val', + }, + }, + { + ip: '[::1]', + time: 1603132726413, + groups: { + Company: 'Comapny-ABC', + }, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: '$identify', + os_version: '', + session_id: -1, + app_version: '1.1.5', + user_properties: { + Company: 'Comapny-ABC', + }, + }, + { + ip: '[::1]', + time: 1603132726413, + groups: { + Company: 'Comapny-ABC', + }, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: '$identify', + os_version: '', + session_id: -1, + app_version: '1.1.5', + user_properties: { + Company: 'Comapny-ABC', + }, + }, + ], + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/batch', + }, + metadata: [ + { + job_id: 2, + }, + { + job_id: 3, + }, + { + job_id: 4, + }, + { + job_id: 5, + }, + ], + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 3', + feature: 'batch', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + destType: 'am', + input: [ + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: { + ip: '[::1]', + time: 1565586510909, + carrier: 'Android', + app_name: 'RudderAndroidClient', + language: 'en-US', + device_id: 'anon_id', + library: 'rudderstack', + insert_id: 'dd4c4493-a3ff-49c9-9071-6cb72e37cd55', + event_type: 'Demo Track', + session_id: -1, + app_version: '1.0', + device_model: 'Android SDK built for x86', + event_properties: { + label: 'Demo Label', + value: 5, + category: 'Demo Category', + }, + device_manufacturer: 'Google', + }, + api_key: 'afasf', + options: { + min_id_length: 1, + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'anon_id', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/2/httpapi', + }, + metadata: { + userId: '90ca6da0-292e-4e79-9880-f8009e0ae4a3', + jobId: 12, + sourceId: '1fMCVYZboDlYlauh4GFsEo2JU77', + destinationId: '1gXSYmSd7vkfFfJ4vtMCL0i43Lb', + attemptNum: 0, + receivedAt: '2020-10-20T23:47:29.633+05:30', + createdAt: '2020-10-20T18:17:32.465Z', + }, + destination: { + ID: '1iuPwfigf4Fk5F5OBF2T3EVTGlY', + Name: 'braze dev', + DestinationDefinition: { + ID: '1XQoHKJnI6Uf67wN20RlvAQSUB9', + Name: 'BRAZE', + DisplayName: 'Braze', + Config: { + destConfig: { + android: ['useNativeSDK'], + defaultConfig: ['appKey', 'dataCenter', 'restApiKey'], + ios: ['useNativeSDK'], + web: ['useNativeSDK'], + }, + excludeKeys: [], + includeKeys: ['appKey', 'dataCenter'], + secretKeys: ['restApiKey'], + supportedSourceTypes: [ + 'android', + 'ios', + 'web', + 'unity', + 'amp', + 'cloud', + 'reactnative', + ], + }, + }, + Config: { + appKey: 'asdf', + dataCenter: 'asdfasdf', + residencyServer: 'standard', + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: false, + }, + }, + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: { + ip: '[::1]', + time: 1565586510909, + carrier: 'Android', + app_name: 'RudderAndroidClient', + language: 'en-US', + device_id: 'anon_id', + library: 'rudderstack', + insert_id: '69283c05-bbe9-4aba-bb98-3f065d39cf54', + event_type: 'Demo Track', + session_id: -1, + app_version: '1.0', + device_model: 'Android SDK built for x86', + event_properties: { + label: 'Demo Label', + value: 5, + category: 'Demo Category', + }, + device_manufacturer: 'Google', + }, + api_key: 'afasf', + options: { + min_id_length: 1, + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'anon_id', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/2/httpapi', + }, + metadata: { + userId: '90ca6da0-292e-4e79-9880-f8009e0ae4a3', + jobId: 13, + sourceId: '1fMCVYZboDlYlauh4GFsEo2JU77', + destinationId: '1gXSYmSd7vkfFfJ4vtMCL0i43Lb', + attemptNum: 0, + receivedAt: '2020-10-20T23:47:29.914+05:30', + createdAt: '2020-10-20T18:17:32.465Z', + }, + destination: { + ID: '1iuPwfigf4Fk5F5OBF2T3EVTGlY', + Name: 'braze dev', + DestinationDefinition: { + ID: '1XQoHKJnI6Uf67wN20RlvAQSUB9', + Name: 'BRAZE', + DisplayName: 'Braze', + Config: { + destConfig: { + android: ['useNativeSDK'], + defaultConfig: ['appKey', 'dataCenter', 'restApiKey'], + ios: ['useNativeSDK'], + web: ['useNativeSDK'], + }, + excludeKeys: [], + includeKeys: ['appKey', 'dataCenter'], + secretKeys: ['restApiKey'], + supportedSourceTypes: [ + 'android', + 'ios', + 'web', + 'unity', + 'amp', + 'cloud', + 'reactnative', + ], + }, + }, + Config: { + appKey: 'asdf', + dataCenter: 'asdfasdf', + residencyServer: 'standard', + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: false, + }, + }, + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: { + ip: '[::1]', + time: 1565586510909, + carrier: 'Android', + app_name: 'RudderAndroidClient', + language: 'en-US', + device_id: 'anon_id', + library: 'rudderstack', + insert_id: '39f7a1fa-ff79-4fd1-a329-d637f018de7e', + event_type: 'Demo Track', + session_id: -1, + app_version: '1.0', + device_model: 'Android SDK built for x86', + event_properties: { + label: 'Demo Label', + value: 5, + category: 'Demo Category', + }, + device_manufacturer: 'Google', + }, + api_key: 'afasf', + options: { + min_id_length: 1, + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'anon_id', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/2/httpapi', + }, + metadata: { + userId: '90ca6da0-292e-4e79-9880-f8009e0ae4a3', + jobId: 14, + sourceId: '1fMCVYZboDlYlauh4GFsEo2JU77', + destinationId: '1gXSYmSd7vkfFfJ4vtMCL0i43Lb', + attemptNum: 0, + receivedAt: '2020-10-20T23:47:30.166+05:30', + createdAt: '2020-10-20T18:17:32.465Z', + }, + destination: { + ID: '1iuPwfigf4Fk5F5OBF2T3EVTGlY', + Name: 'braze dev', + DestinationDefinition: { + ID: '1XQoHKJnI6Uf67wN20RlvAQSUB9', + Name: 'BRAZE', + DisplayName: 'Braze', + Config: { + destConfig: { + android: ['useNativeSDK'], + defaultConfig: ['appKey', 'dataCenter', 'restApiKey'], + ios: ['useNativeSDK'], + web: ['useNativeSDK'], + }, + excludeKeys: [], + includeKeys: ['appKey', 'dataCenter'], + secretKeys: ['restApiKey'], + supportedSourceTypes: [ + 'android', + 'ios', + 'web', + 'unity', + 'amp', + 'cloud', + 'reactnative', + ], + }, + }, + Config: { + appKey: 'asdf', + dataCenter: 'asdfasdf', + residencyServer: 'standard', + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: false, + }, + }, + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: { + ip: '[::1]', + time: 1565586510909, + carrier: 'Android', + app_name: 'RudderAndroidClient', + language: 'en-US', + device_id: 'anon_id', + library: 'rudderstack', + insert_id: '4314aa01-46a3-4f45-b67d-debe4bc01717', + event_type: 'Demo Track', + session_id: -1, + app_version: '1.0', + device_model: 'Android SDK built for x86', + event_properties: { + label: 'Demo Label', + value: 5, + category: 'Demo Category', + }, + device_manufacturer: 'Google', + }, + api_key: 'afasf', + options: { + min_id_length: 1, + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'anon_id', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/2/httpapi', + }, + metadata: { + userId: '90ca6da0-292e-4e79-9880-f8009e0ae4a3', + jobId: 15, + sourceId: '1fMCVYZboDlYlauh4GFsEo2JU77', + destinationId: '1gXSYmSd7vkfFfJ4vtMCL0i43Lb', + attemptNum: 0, + receivedAt: '2020-10-20T23:47:30.424+05:30', + createdAt: '2020-10-20T18:17:32.465Z', + }, + destination: { + ID: '1iuPwfigf4Fk5F5OBF2T3EVTGlY', + Name: 'braze dev', + DestinationDefinition: { + ID: '1XQoHKJnI6Uf67wN20RlvAQSUB9', + Name: 'BRAZE', + DisplayName: 'Braze', + Config: { + destConfig: { + android: ['useNativeSDK'], + defaultConfig: ['appKey', 'dataCenter', 'restApiKey'], + ios: ['useNativeSDK'], + web: ['useNativeSDK'], + }, + excludeKeys: [], + includeKeys: ['appKey', 'dataCenter'], + secretKeys: ['restApiKey'], + supportedSourceTypes: [ + 'android', + 'ios', + 'web', + 'unity', + 'amp', + 'cloud', + 'reactnative', + ], + }, + }, + Config: { + appKey: 'asdf', + dataCenter: 'asdfasdf', + residencyServer: 'standard', + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: false, + }, + }, + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: { + ip: '[::1]', + time: 1565586510909, + carrier: 'Android', + app_name: 'RudderAndroidClient', + language: 'en-US', + device_id: 'anon_id', + library: 'rudderstack', + insert_id: '4d958d40-2762-44aa-bf83-d47f881bc615', + event_type: 'Demo Track', + session_id: -1, + app_version: '1.0', + device_model: 'Android SDK built for x86', + event_properties: { + label: 'Demo Label', + value: 5, + category: 'Demo Category', + }, + device_manufacturer: 'Google', + }, + api_key: 'afasf', + options: { + min_id_length: 1, + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'anon_id', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/2/httpapi', + }, + metadata: { + userId: '90ca6da0-292e-4e79-9880-f8009e0ae4a3', + jobId: 16, + sourceId: '1fMCVYZboDlYlauh4GFsEo2JU77', + destinationId: '1gXSYmSd7vkfFfJ4vtMCL0i43Lb', + attemptNum: 0, + receivedAt: '2020-10-20T23:47:30.668+05:30', + createdAt: '2020-10-20T18:17:32.465Z', + }, + destination: { + ID: '1iuPwfigf4Fk5F5OBF2T3EVTGlY', + Name: 'braze dev', + DestinationDefinition: { + ID: '1XQoHKJnI6Uf67wN20RlvAQSUB9', + Name: 'BRAZE', + DisplayName: 'Braze', + Config: { + destConfig: { + android: ['useNativeSDK'], + defaultConfig: ['appKey', 'dataCenter', 'restApiKey'], + ios: ['useNativeSDK'], + web: ['useNativeSDK'], + }, + excludeKeys: [], + includeKeys: ['appKey', 'dataCenter'], + secretKeys: ['restApiKey'], + supportedSourceTypes: [ + 'android', + 'ios', + 'web', + 'unity', + 'amp', + 'cloud', + 'reactnative', + ], + }, + }, + Config: { + appKey: 'asdf', + dataCenter: 'asdfasdf', + residencyServer: 'standard', + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: false, + }, + }, + ], + }, + }, + }, + output: { + response: { + status: 200, + body: [ + { + batchedRequest: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: [ + { + ip: '[::1]', + time: 1565586510909, + carrier: 'Android', + app_name: 'RudderAndroidClient', + language: 'en-US', + device_id: 'anon_id', + library: 'rudderstack', + insert_id: 'dd4c4493-a3ff-49c9-9071-6cb72e37cd55', + event_type: 'Demo Track', + session_id: -1, + app_version: '1.0', + device_model: 'Android SDK built for x86', + event_properties: { + label: 'Demo Label', + value: 5, + category: 'Demo Category', + }, + device_manufacturer: 'Google', + }, + { + ip: '[::1]', + time: 1565586510909, + carrier: 'Android', + app_name: 'RudderAndroidClient', + language: 'en-US', + device_id: 'anon_id', + library: 'rudderstack', + insert_id: '69283c05-bbe9-4aba-bb98-3f065d39cf54', + event_type: 'Demo Track', + session_id: -1, + app_version: '1.0', + device_model: 'Android SDK built for x86', + event_properties: { + label: 'Demo Label', + value: 5, + category: 'Demo Category', + }, + device_manufacturer: 'Google', + }, + { + ip: '[::1]', + time: 1565586510909, + carrier: 'Android', + app_name: 'RudderAndroidClient', + language: 'en-US', + device_id: 'anon_id', + library: 'rudderstack', + insert_id: '39f7a1fa-ff79-4fd1-a329-d637f018de7e', + event_type: 'Demo Track', + session_id: -1, + app_version: '1.0', + device_model: 'Android SDK built for x86', + event_properties: { + label: 'Demo Label', + value: 5, + category: 'Demo Category', + }, + device_manufacturer: 'Google', + }, + { + ip: '[::1]', + time: 1565586510909, + carrier: 'Android', + app_name: 'RudderAndroidClient', + language: 'en-US', + device_id: 'anon_id', + library: 'rudderstack', + insert_id: '4314aa01-46a3-4f45-b67d-debe4bc01717', + event_type: 'Demo Track', + session_id: -1, + app_version: '1.0', + device_model: 'Android SDK built for x86', + event_properties: { + label: 'Demo Label', + value: 5, + category: 'Demo Category', + }, + device_manufacturer: 'Google', + }, + { + ip: '[::1]', + time: 1565586510909, + carrier: 'Android', + app_name: 'RudderAndroidClient', + language: 'en-US', + device_id: 'anon_id', + library: 'rudderstack', + insert_id: '4d958d40-2762-44aa-bf83-d47f881bc615', + event_type: 'Demo Track', + session_id: -1, + app_version: '1.0', + device_model: 'Android SDK built for x86', + event_properties: { + label: 'Demo Label', + value: 5, + category: 'Demo Category', + }, + device_manufacturer: 'Google', + }, + ], + api_key: 'afasf', + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'anon_id', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/batch', + }, + metadata: [ + { + userId: '90ca6da0-292e-4e79-9880-f8009e0ae4a3', + jobId: 12, + sourceId: '1fMCVYZboDlYlauh4GFsEo2JU77', + destinationId: '1gXSYmSd7vkfFfJ4vtMCL0i43Lb', + attemptNum: 0, + receivedAt: '2020-10-20T23:47:29.633+05:30', + createdAt: '2020-10-20T18:17:32.465Z', + }, + { + userId: '90ca6da0-292e-4e79-9880-f8009e0ae4a3', + jobId: 13, + sourceId: '1fMCVYZboDlYlauh4GFsEo2JU77', + destinationId: '1gXSYmSd7vkfFfJ4vtMCL0i43Lb', + attemptNum: 0, + receivedAt: '2020-10-20T23:47:29.914+05:30', + createdAt: '2020-10-20T18:17:32.465Z', + }, + { + userId: '90ca6da0-292e-4e79-9880-f8009e0ae4a3', + jobId: 14, + sourceId: '1fMCVYZboDlYlauh4GFsEo2JU77', + destinationId: '1gXSYmSd7vkfFfJ4vtMCL0i43Lb', + attemptNum: 0, + receivedAt: '2020-10-20T23:47:30.166+05:30', + createdAt: '2020-10-20T18:17:32.465Z', + }, + { + userId: '90ca6da0-292e-4e79-9880-f8009e0ae4a3', + jobId: 15, + sourceId: '1fMCVYZboDlYlauh4GFsEo2JU77', + destinationId: '1gXSYmSd7vkfFfJ4vtMCL0i43Lb', + attemptNum: 0, + receivedAt: '2020-10-20T23:47:30.424+05:30', + createdAt: '2020-10-20T18:17:32.465Z', + }, + { + userId: '90ca6da0-292e-4e79-9880-f8009e0ae4a3', + jobId: 16, + sourceId: '1fMCVYZboDlYlauh4GFsEo2JU77', + destinationId: '1gXSYmSd7vkfFfJ4vtMCL0i43Lb', + attemptNum: 0, + receivedAt: '2020-10-20T23:47:30.668+05:30', + createdAt: '2020-10-20T18:17:32.465Z', + }, + ], + destination: { + ID: '1iuPwfigf4Fk5F5OBF2T3EVTGlY', + Name: 'braze dev', + DestinationDefinition: { + ID: '1XQoHKJnI6Uf67wN20RlvAQSUB9', + Name: 'BRAZE', + DisplayName: 'Braze', + Config: { + destConfig: { + android: ['useNativeSDK'], + defaultConfig: ['appKey', 'dataCenter', 'restApiKey'], + ios: ['useNativeSDK'], + web: ['useNativeSDK'], + }, + excludeKeys: [], + includeKeys: ['appKey', 'dataCenter'], + secretKeys: ['restApiKey'], + supportedSourceTypes: [ + 'android', + 'ios', + 'web', + 'unity', + 'amp', + 'cloud', + 'reactnative', + ], + }, + }, + Config: { + appKey: 'asdf', + dataCenter: 'asdfasdf', + residencyServer: 'standard', + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: false, + }, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 4', + feature: 'batch', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + destType: 'am', + input: [ + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: [ + { + ip: '0.0.0.0', + time: 1603132665557, + os_name: '', + user_id: '123', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: '$identify', + os_version: '', + session_id: -1, + app_version: '1.1.5', + user_properties: { + name: 'some campaign', + plan: 'Open source', + term: 'keyword', + test: 'other value', + email: 'test@rudderstack.com', + logins: 5, + medium: 'medium', + source: 'google', + content: 'some content', + category: 'SampleIdentify', + createdAt: 1599264000, + }, + }, + ], + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + options: { + min_id_length: 1, + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/2/httpapi', + }, + metadata: { + job_id: 1, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: [ + { + ip: '[::1]', + time: 1603132712347, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: 'Simple track call', + os_version: '', + session_id: -1, + app_version: '1.1.5', + event_properties: { + key: 'val', + }, + }, + ], + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + options: { + min_id_length: 1, + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/2/httpapi', + }, + metadata: { + job_id: 2, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: [ + { + ip: '[::1]', + time: 1603132719505, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: 'Simple track call', + os_version: '', + session_id: -1, + app_version: '1.1.5', + event_properties: { + key: 'val', + }, + }, + ], + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + options: { + min_id_length: 1, + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/2/httpapi', + }, + metadata: { + job_id: 3, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: [ + { + ip: '[::1]', + time: 1603132726413, + groups: { + Company: 'Comapny-ABC', + }, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: '$identify', + os_version: '', + session_id: -1, + app_version: '1.1.5', + user_properties: { + Company: 'Comapny-ABC', + }, + }, + ], + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + options: { + min_id_length: 1, + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/2/httpapi', + }, + metadata: { + job_id: 4, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: [ + { + ip: '[::1]', + time: 1603132726413, + groups: { + Company: 'Comapny-ABC', + }, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: '$identify', + os_version: '', + session_id: -1, + app_version: '1.1.5', + user_properties: { + Company: 'Comapny-ABC', + }, + }, + ], + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + options: { + min_id_length: 1, + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/2/httpapi', + }, + metadata: { + job_id: 5, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: { + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + identification: [ + '{"group_type":"Company","group_value":"Comapny-ABC","group_properties":{"KEY_2":{"CHILD_KEY_102":"value_103","CHILD_KEY_92":"value_95"},"KEY_3":{"CHILD_KEY_102":"value_103","CHILD_KEY_92":"value_95"},"name_trait":"Company","value_trait":"Comapny-ABC"}}', + ], + }, + JSON: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: {}, + version: '1', + endpoint: 'https://api2.amplitude.com/groupidentify', + }, + metadata: { + job_id: 6, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: { + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + mapping: ['{"global_user_id":"newUserIdAlias","user_id":"sampleusrRudder3"}'], + }, + JSON: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: {}, + version: '1', + endpoint: 'https://api2.amplitude.com/usermap', + }, + metadata: { + job_id: 7, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + ], + }, + }, + }, + output: { + response: { + status: 200, + body: [ + { + batchedRequest: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: [ + { + ip: '0.0.0.0', + time: 1603132665557, + os_name: '', + user_id: '123', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: '$identify', + os_version: '', + session_id: -1, + app_version: '1.1.5', + user_properties: { + name: 'some campaign', + plan: 'Open source', + term: 'keyword', + test: 'other value', + email: 'test@rudderstack.com', + logins: 5, + medium: 'medium', + source: 'google', + content: 'some content', + category: 'SampleIdentify', + createdAt: 1599264000, + }, + }, + ], + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + options: { + min_id_length: 1, + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/2/httpapi', + }, + metadata: [ + { + job_id: 1, + }, + ], + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + batchedRequest: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: { + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + identification: [ + '{"group_type":"Company","group_value":"Comapny-ABC","group_properties":{"KEY_2":{"CHILD_KEY_102":"value_103","CHILD_KEY_92":"value_95"},"KEY_3":{"CHILD_KEY_102":"value_103","CHILD_KEY_92":"value_95"},"name_trait":"Company","value_trait":"Comapny-ABC"}}', + ], + }, + JSON: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: {}, + version: '1', + endpoint: 'https://api2.amplitude.com/groupidentify', + }, + metadata: [ + { + job_id: 6, + }, + ], + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + batchedRequest: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: { + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + mapping: ['{"global_user_id":"newUserIdAlias","user_id":"sampleusrRudder3"}'], + }, + JSON: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: {}, + version: '1', + endpoint: 'https://api2.amplitude.com/usermap', + }, + metadata: [ + { + job_id: 7, + }, + ], + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + batchedRequest: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: [ + { + ip: '[::1]', + time: 1603132712347, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: 'Simple track call', + os_version: '', + session_id: -1, + app_version: '1.1.5', + event_properties: { + key: 'val', + }, + }, + { + ip: '[::1]', + time: 1603132719505, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: 'Simple track call', + os_version: '', + session_id: -1, + app_version: '1.1.5', + event_properties: { + key: 'val', + }, + }, + { + ip: '[::1]', + time: 1603132726413, + groups: { + Company: 'Comapny-ABC', + }, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: '$identify', + os_version: '', + session_id: -1, + app_version: '1.1.5', + user_properties: { + Company: 'Comapny-ABC', + }, + }, + { + ip: '[::1]', + time: 1603132726413, + groups: { + Company: 'Comapny-ABC', + }, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: '$identify', + os_version: '', + session_id: -1, + app_version: '1.1.5', + user_properties: { + Company: 'Comapny-ABC', + }, + }, + ], + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/batch', + }, + metadata: [ + { + job_id: 2, + }, + { + job_id: 3, + }, + { + job_id: 4, + }, + { + job_id: 5, + }, + ], + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 5', + feature: 'batch', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + destType: 'am', + input: [ + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: [ + { + ip: '0.0.0.0', + time: 1603132665557, + os_name: '', + user_id: '123', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + library: 'rudderstack', + event_type: '$identify', + os_version: '', + session_id: -1, + app_version: '1.1.5', + user_properties: { + name: 'some campaign', + plan: 'Open source', + term: 'keyword', + test: 'other value', + email: 'test@rudderstack.com', + logins: 5, + medium: 'medium', + source: 'google', + content: 'some content', + category: 'SampleIdentify', + createdAt: 1599264000, + }, + }, + ], + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + options: { + min_id_length: 1, + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/2/httpapi', + }, + metadata: { + job_id: 1, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: [ + { + ip: '[::1]', + time: 1603132712347, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: 'Simple track call', + os_version: '', + session_id: -1, + app_version: '1.1.5', + event_properties: { + key: 'val', + }, + }, + ], + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + options: { + min_id_length: 1, + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/2/httpapi', + }, + metadata: { + job_id: 2, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: [ + { + ip: '[::1]', + time: 1603132719505, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: 'Simple track call', + os_version: '', + session_id: -1, + app_version: '1.1.5', + event_properties: { + key: 'val', + }, + }, + ], + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + options: { + min_id_length: 1, + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/2/httpapi', + }, + metadata: { + job_id: 3, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: [ + { + ip: '[::1]', + time: 1603132726413, + groups: { + Company: 'Comapny-ABC', + }, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: '$identify', + os_version: '', + session_id: -1, + app_version: '1.1.5', + user_properties: { + Company: 'Comapny-ABC', + }, + }, + ], + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + options: { + min_id_length: 1, + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/2/httpapi', + }, + metadata: { + job_id: 4, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: [ + { + ip: '[::1]', + time: 1603132726413, + groups: { + Company: 'Comapny-ABC', + }, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: '$identify', + os_version: '', + session_id: -1, + app_version: '1.1.5', + user_properties: { + Company: 'Comapny-ABC', + }, + }, + ], + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + options: { + min_id_length: 1, + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/2/httpapi', + }, + metadata: { + job_id: 5, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: { + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + identification: [ + '{"group_type":"Company","group_value":"Comapny-ABC","group_properties":{"KEY_2":{"CHILD_KEY_102":"value_103","CHILD_KEY_92":"value_95"},"KEY_3":{"CHILD_KEY_102":"value_103","CHILD_KEY_92":"value_95"},"name_trait":"Company","value_trait":"Comapny-ABC"}}', + ], + }, + JSON: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: {}, + version: '1', + endpoint: 'https://api2.amplitude.com/groupidentify', + }, + metadata: { + job_id: 6, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + message: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: { + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + mapping: ['{"global_user_id":"newUserIdAlias","user_id":"sampleusrRudder3"}'], + }, + JSON: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: {}, + version: '1', + endpoint: 'https://api2.amplitude.com/usermap', + }, + metadata: { + job_id: 7, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + ], + }, + }, + }, + output: { + response: { + status: 200, + body: [ + { + batchedRequest: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: [ + { + ip: '0.0.0.0', + time: 1603132665557, + os_name: '', + user_id: '123', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + library: 'rudderstack', + event_type: '$identify', + os_version: '', + session_id: -1, + app_version: '1.1.5', + user_properties: { + name: 'some campaign', + plan: 'Open source', + term: 'keyword', + test: 'other value', + email: 'test@rudderstack.com', + logins: 5, + medium: 'medium', + source: 'google', + content: 'some content', + category: 'SampleIdentify', + createdAt: 1599264000, + }, + }, + ], + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + options: { + min_id_length: 1, + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/2/httpapi', + }, + metadata: [ + { + job_id: 1, + }, + ], + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + batchedRequest: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: { + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + identification: [ + '{"group_type":"Company","group_value":"Comapny-ABC","group_properties":{"KEY_2":{"CHILD_KEY_102":"value_103","CHILD_KEY_92":"value_95"},"KEY_3":{"CHILD_KEY_102":"value_103","CHILD_KEY_92":"value_95"},"name_trait":"Company","value_trait":"Comapny-ABC"}}', + ], + }, + JSON: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: {}, + version: '1', + endpoint: 'https://api2.amplitude.com/groupidentify', + }, + metadata: [ + { + job_id: 6, + }, + ], + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + batchedRequest: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: { + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + mapping: ['{"global_user_id":"newUserIdAlias","user_id":"sampleusrRudder3"}'], + }, + JSON: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: {}, + version: '1', + endpoint: 'https://api2.amplitude.com/usermap', + }, + metadata: [ + { + job_id: 7, + }, + ], + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + { + batchedRequest: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + events: [ + { + ip: '[::1]', + time: 1603132712347, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: 'Simple track call', + os_version: '', + session_id: -1, + app_version: '1.1.5', + event_properties: { + key: 'val', + }, + }, + { + ip: '[::1]', + time: 1603132719505, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: 'Simple track call', + os_version: '', + session_id: -1, + app_version: '1.1.5', + event_properties: { + key: 'val', + }, + }, + { + ip: '[::1]', + time: 1603132726413, + groups: { + Company: 'Comapny-ABC', + }, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: '$identify', + os_version: '', + session_id: -1, + app_version: '1.1.5', + user_properties: { + Company: 'Comapny-ABC', + }, + }, + { + ip: '[::1]', + time: 1603132726413, + groups: { + Company: 'Comapny-ABC', + }, + os_name: '', + user_id: 'sampleusrRudder3', + app_name: 'RudderLabs JavaScript SDK', + language: 'en-US', + device_id: 'my-anonymous-id-new', + library: 'rudderstack', + event_type: '$identify', + os_version: '', + session_id: -1, + app_version: '1.1.5', + user_properties: { + Company: 'Comapny-ABC', + }, + }, + ], + api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + userId: 'my-anonymous-id-new', + headers: { + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api2.amplitude.com/batch', + }, + metadata: [ + { + job_id: 2, + }, + { + job_id: 3, + }, + { + job_id: 4, + }, + { + job_id: 5, + }, + ], + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, + }, + ], + }, + }, + }, +]; diff --git a/test/integrations/destinations/am/processor/data.ts b/test/integrations/destinations/am/processor/data.ts new file mode 100644 index 0000000000..f28606da0c --- /dev/null +++ b/test/integrations/destinations/am/processor/data.ts @@ -0,0 +1,11330 @@ +export const data = [ + { + name: 'am', + description: 'Test 0: ERROR - Event not present. Please send event field', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + sentAt: '2020-08-14T05:30:30.118Z', + context: { + source: 'test', + traits: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + library: { + name: 'rudder-sdk-ruby-sync', + version: '1.0.6', + }, + }, + messageId: '7208bbb6-2c4e-45bb-bf5b-ad426f3593e9', + timestamp: '2020-08-14T05:30:30.118Z', + properties: { + tax: 2, + total: 27.5, + coupon: 'hasbros', + revenue: 48, + revenue_type: 'Purchased', + quantity: 2, + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + shipping: 3, + subtotal: 22.5, + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + }, + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + integrations: { + S3: false, + All: true, + }, + }, + destination: { + Config: { + apiKey: 'abcde', + groupTypeTrait: 'email', + groupValueTrait: 'age', + trackProductsOnce: true, + trackRevenuePerProduct: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: 'Event not present. Please send event field', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'AM', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 1: ERROR - message type not supported', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'UNSUPPORTED-TYPE', + event: 'Order Completed', + sentAt: '2020-08-14T05:30:30.118Z', + context: {}, + messageId: '7208bbb6-2c4e-45bb-bf5b-ad426f3593e9', + timestamp: '2020-08-14T05:30:30.118Z', + properties: {}, + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + integrations: { + S3: false, + All: true, + }, + }, + destination: { + Config: { + groupTypeTrait: 'email', + apiKey: 'abcde', + groupValueTrait: 'age', + trackProductsOnce: true, + trackRevenuePerProduct: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: 'message type not supported', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'AM', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 2: ERROR - No API Key is Found. Please Configure API key from dashbaord', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + event: 'Order Completed', + sentAt: '2020-08-14T05:30:30.118Z', + context: {}, + messageId: '7208bbb6-2c4e-45bb-bf5b-ad426f3593e9', + timestamp: '2020-08-14T05:30:30.118Z', + properties: {}, + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + integrations: { + S3: false, + All: true, + }, + }, + destination: { + Config: { + groupTypeTrait: 'email', + groupValueTrait: 'age', + trackProductsOnce: true, + trackRevenuePerProduct: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: 'No API Key is Found. Please Configure API key from dashbaord', + statTags: { + errorCategory: 'dataValidation', + errorType: 'configuration', + destType: 'AM', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 3', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + event: 'Order Completed', + sentAt: '2020-08-14T05:30:30.118Z', + context: { + source: 'test', + traits: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + library: { + name: 'rudder-sdk-ruby-sync', + version: '1.0.6', + }, + }, + messageId: '7208bbb6-2c4e-45bb-bf5b-ad426f3593e9', + timestamp: '2020-08-14T05:30:30.118Z', + properties: { + tax: 2, + total: 27.5, + coupon: 'hasbros', + revenue: 48, + revenue_type: 'Purchased', + quantity: 2, + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + shipping: 3, + subtotal: 22.5, + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + }, + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + integrations: { + S3: false, + All: true, + }, + }, + destination: { + Config: { + apiKey: 'abcde', + groupTypeTrait: 'email', + groupValueTrait: 'age', + trackProductsOnce: true, + trackRevenuePerProduct: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + device_id: '50be5c78-6c3f-4b60-be84-97805a316fb1', + quantity: 1, + revenue: 48, + revenueType: 'Purchased', + insert_id: '7208bbb6-2c4e-45bb-bf5b-ad426f3593e9', + user_properties: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + event_properties: { + tax: 2, + total: 27.5, + coupon: 'hasbros', + revenue_type: 'Purchased', + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + shipping: 3, + subtotal: 22.5, + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + }, + event_type: 'Order Completed', + price: 48, + time: 1597383030118, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 4', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + event: 'Order Completed', + sentAt: '2020-08-14T05:30:30.118Z', + context: { + source: 'test', + traits: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + library: { + name: 'rudder-sdk-ruby-sync', + version: '1.0.6', + }, + }, + messageId: '7208bbb6-2c4e-45bb-bf5b-ad426f3593e9', + timestamp: '2020-08-14T05:30:30.118Z', + properties: { + tax: 2, + total: 27.5, + coupon: 'hasbros', + revenue: 48, + quantity: 2, + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + products: [ + { + sku: '45790-32', + url: 'https://www.example.com/product/path', + name: 'Monopoly: 3rd Edition', + price: 19, + category: 'Games', + quantity: 1, + image_url: 'https:///www.example.com/product/path.jpg', + product_id: '507f1f77bcf86cd799439011', + }, + { + sku: '46493-32', + name: 'Uno Card Game', + price: 3, + category: 'Games', + quantity: 2, + product_id: '505bd76785ebb509fc183733', + }, + ], + shipping: 3, + subtotal: 22.5, + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + }, + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + integrations: { + S3: false, + All: true, + }, + }, + destination: { + Config: { + apiKey: 'abcde', + groupTypeTrait: 'email', + groupValueTrait: 'age', + trackProductsOnce: true, + trackRevenuePerProduct: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + device_id: '50be5c78-6c3f-4b60-be84-97805a316fb1', + insert_id: '7208bbb6-2c4e-45bb-bf5b-ad426f3593e9', + user_properties: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + event_properties: { + tax: 2, + total: 27.5, + coupon: 'hasbros', + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + products: [ + { + sku: '45790-32', + url: 'https://www.example.com/product/path', + name: 'Monopoly: 3rd Edition', + price: 19, + category: 'Games', + quantity: 1, + image_url: 'https:///www.example.com/product/path.jpg', + product_id: '507f1f77bcf86cd799439011', + }, + { + sku: '46493-32', + name: 'Uno Card Game', + price: 3, + category: 'Games', + quantity: 2, + product_id: '505bd76785ebb509fc183733', + }, + ], + shipping: 3, + subtotal: 22.5, + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + }, + event_type: 'Order Completed', + revenueType: 'Purchased', + price: 48, + quantity: 1, + revenue: 48, + time: 1597383030118, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 5', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + integrations: { + Amplitude: { fieldsToUnset: ['email'] }, + All: true, + }, + context: { + externalId: [ + { + id: 'lynnanderson@smith.net', + identifierType: 'device_id', + type: 'AM-users', + }, + ], + mappedToDestination: 'true', + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + anonymousId: '123456', + email: 'test@rudderstack.com', + address: { + country: 'India', + postalCode: 712136, + state: 'WB', + street: '', + os_version: 'test os', + }, + ip: '0.0.0.0', + age: 26, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + }, + traits: { + anonymousId: '123456', + email: 'test@rudderstack.com', + city: 'kolkata', + address: { + country: 'India', + postalCode: 712136, + state: 'WB', + street: '', + }, + os_version: 'test os', + ip: '0.0.0.0', + age: 26, + }, + type: 'identify', + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: '123456', + userId: '123456', + sentAt: '2019-10-14T09:03:22.563Z', + }, + metadata: { + jobId: 2, + }, + destination: { + Config: { + apiKey: 'abcde', + groupTypeTrait: 'email', + groupValueTrait: 'age', + traitsToIncrement: [ + { + traits: '', + }, + ], + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Chrome', + os_version: 'test os', + device_model: 'Mac', + platform: 'Web', + device_id: 'lynnanderson@smith.net', + app_name: 'RudderLabs JavaScript SDK', + app_version: '1.0.0', + language: 'en-US', + insert_id: '84e26acc-56a5-4835-8233-591137fca468', + ip: '0.0.0.0', + user_properties: { + $unset: { + email: '-', + }, + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + anonymousId: '123456', + email: 'test@rudderstack.com', + postalCode: 712136, + state: 'WB', + street: '', + ip: '0.0.0.0', + age: 26, + device_id: 'lynnanderson@smith.net', + }, + event_type: '$identify', + time: 1571043797562, + user_id: '123456', + session_id: -1, + country: 'India', + city: 'kolkata', + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '123456', + }, + metadata: { + jobId: 2, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 6', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + externalId: [ + { + id: 'lynnanderson@smith.net', + identifierType: 'device_id', + type: 'AM-users', + }, + ], + mappedToDestination: 'true', + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + anonymousId: '123456', + email: 'test@rudderstack.com', + address: { + country: 'India', + postalCode: 712136, + state: 'WB', + street: '', + os_version: 'test os', + }, + ip: '0.0.0.0', + age: 26, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + }, + traits: { + anonymousId: '123456', + email: 'test@rudderstack.com', + city: 'kolkata', + address: { + country: 'India', + postalCode: 712136, + state: 'WB', + street: '', + }, + os_version: 'test os', + ip: '0.0.0.0', + age: 26, + }, + type: 'identify', + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: '123456', + userId: '123456', + integrations: { + Amplitude: { fieldsToUnset: ['testObj.unsetField1'] }, + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + metadata: { + jobId: 2, + }, + destination: { + Config: { + apiKey: 'abcde', + groupTypeTrait: 'email', + groupValueTrait: 'age', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Chrome', + os_version: 'test os', + device_model: 'Mac', + platform: 'Web', + device_id: 'lynnanderson@smith.net', + app_name: 'RudderLabs JavaScript SDK', + app_version: '1.0.0', + language: 'en-US', + insert_id: '84e26acc-56a5-4835-8233-591137fca468', + ip: '0.0.0.0', + user_properties: { + $unset: { + 'testObj.unsetField1': '-', + }, + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + anonymousId: '123456', + email: 'test@rudderstack.com', + postalCode: 712136, + state: 'WB', + street: '', + ip: '0.0.0.0', + age: 26, + device_id: 'lynnanderson@smith.net', + }, + event_type: '$identify', + time: 1571043797562, + user_id: '123456', + session_id: -1, + country: 'India', + city: 'kolkata', + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '123456', + }, + metadata: { + jobId: 2, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 7', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + anonymousId: '123456', + email: 'test@rudderstack.com', + address: { + city: 'kolkata', + country: 'India', + postalCode: 712136, + state: 'WB', + street: '', + }, + ip: '0.0.0.0', + age: 26, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + }, + type: 'identify', + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: '123456', + userId: '123456', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + apiKey: 'abcde', + groupTypeTrait: 'email', + groupValueTrait: 'age', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Chrome', + os_version: '77.0.3865.90', + device_model: 'Mac', + platform: 'Web', + device_id: '123456', + app_name: 'RudderLabs JavaScript SDK', + app_version: '1.0.0', + language: 'en-US', + insert_id: '84e26acc-56a5-4835-8233-591137fca468', + user_properties: { + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + anonymousId: '123456', + email: 'test@rudderstack.com', + postalCode: 712136, + state: 'WB', + street: '', + ip: '0.0.0.0', + age: 26, + }, + event_type: '$identify', + time: 1571043797562, + user_id: '123456', + session_id: -1, + country: 'India', + city: 'kolkata', + ip: '0.0.0.0', + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '123456', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 8', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'test@rudderstack.com', + anonymousId: '12345', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + }, + request_ip: '1.1.1.1', + type: 'page', + messageId: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T11:15:18.299Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + properties: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + integrations: { + All: true, + }, + name: 'ApplicationLoaded', + sentAt: '2019-10-14T11:15:53.296Z', + }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Chrome', + os_version: '77.0.3865.90', + device_model: 'Mac', + platform: 'Web', + device_id: '00000000000000000000000000', + app_name: 'RudderLabs JavaScript SDK', + app_version: '1.0.0', + language: 'en-US', + event_type: 'Viewed ApplicationLoaded Page', + event_properties: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + name: 'ApplicationLoaded', + }, + insert_id: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', + ip: '1.1.1.1', + user_properties: { + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + email: 'test@rudderstack.com', + anonymousId: '12345', + }, + user_id: '12345', + time: 1571051718299, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '00000000000000000000000000', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 9', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'test@rudderstack.com', + anonymousId: '12345', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + }, + request_ip: '1.1.1.1', + type: 'page', + messageId: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T11:15:18.299Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + properties: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + integrations: { + All: false, + Amplitude: { + groups: { + Company: 'ABC', + }, + }, + }, + name: 'ApplicationLoaded', + sentAt: '2019-10-14T11:15:53.296Z', + }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Chrome', + os_version: '77.0.3865.90', + device_model: 'Mac', + platform: 'Web', + device_id: '00000000000000000000000000', + app_name: 'RudderLabs JavaScript SDK', + app_version: '1.0.0', + language: 'en-US', + event_type: 'Viewed ApplicationLoaded Page', + event_properties: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + name: 'ApplicationLoaded', + }, + insert_id: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', + ip: '1.1.1.1', + user_properties: { + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + email: 'test@rudderstack.com', + anonymousId: '12345', + }, + user_id: '12345', + groups: { + Company: 'ABC', + }, + time: 1571051718299, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '00000000000000000000000000', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 10', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'test@rudderstack.com', + anonymousId: '12345', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + }, + type: 'track', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T11:15:18.300Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + event: 'test track event', + properties: { + user_actual_role: 'system_admin', + user_actual_id: 12345, + user_time_spent: 50000, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T11:15:53.296Z', + }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Chrome', + os_version: '77.0.3865.90', + device_model: 'Mac', + platform: 'Web', + device_id: '00000000000000000000000000', + app_name: 'RudderLabs JavaScript SDK', + app_version: '1.0.0', + language: 'en-US', + insert_id: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + user_properties: { + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + email: 'test@rudderstack.com', + anonymousId: '12345', + }, + event_properties: { + user_actual_role: 'system_admin', + user_actual_id: 12345, + user_time_spent: 50000, + }, + event_type: 'test track event', + user_id: '12345', + time: 1571051718300, + session_id: -1, + ip: '0.0.0.0', + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '00000000000000000000000000', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 11', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + address: { + city: 'Sealdah', + country: 'India', + postalCode: 700014, + state: 'WB', + street: '', + }, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + }, + traits: { + anonymousId: '123456', + email: 'test@rudderstack.com', + address: { + city: 'kolkata', + country: 'India', + postalCode: 712136, + state: 'WB', + street: '', + }, + ip: '0.0.0.0', + age: 26, + }, + type: 'identify', + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: '123456', + userId: '123456', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Chrome', + os_version: '77.0.3865.90', + device_model: 'Mac', + platform: 'Web', + device_id: '123456', + app_name: 'RudderLabs JavaScript SDK', + app_version: '1.0.0', + language: 'en-US', + insert_id: '84e26acc-56a5-4835-8233-591137fca468', + ip: '0.0.0.0', + user_properties: { + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + anonymousId: '123456', + email: 'test@rudderstack.com', + postalCode: 712136, + state: 'WB', + street: '', + ip: '0.0.0.0', + age: 26, + }, + event_type: '$identify', + time: 1571043797562, + user_id: '123456', + session_id: -1, + country: 'India', + city: 'kolkata', + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '123456', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 12', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'identify', + userId: 'ubcdfghi0001', + anonymousId: '123456', + session_id: '1598597129', + context: { + traits: { + device_id: 'adddd0001', + device_os: 'ios', + device_make: 'apple iphone', + app_version: 'v1.0', + timestamp: '2020-08-28 09:00:00', + }, + library: { + name: 'http', + }, + }, + }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + device_id: '123456', + user_properties: { + device_id: 'adddd0001', + device_os: 'ios', + device_make: 'apple iphone', + app_version: 'v1.0', + timestamp: '2020-08-28 09:00:00', + }, + event_type: '$identify', + time: 0, + user_id: 'ubcdfghi0001', + session_id: 1598597129, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '123456', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 13', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'identify', + userId: 'ubcdfghi0001', + anonymousId: '123456', + session_id: 'user:1598597129', + context: { + traits: { + device_id: 'adddd0001', + device_os: 'ios', + device_make: 'apple iphone', + app_version: 'v1.0', + timestamp: '2020-08-28 09:00:00', + }, + library: { + name: 'http', + }, + }, + }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + device_id: '123456', + user_properties: { + device_id: 'adddd0001', + device_os: 'ios', + device_make: 'apple iphone', + app_version: 'v1.0', + timestamp: '2020-08-28 09:00:00', + }, + event_type: '$identify', + time: 0, + user_id: 'ubcdfghi0001', + session_id: 1598597129, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '123456', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 14', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'identify', + userId: 'ubcdfghi0001', + anonymousId: '123456', + session_id: 1598597129, + context: { + traits: { + device_id: 'adddd0001', + device_os: 'ios', + device_make: 'apple iphone', + app_version: 'v1.0', + timestamp: '2020-08-28 09:00:00', + }, + library: { + name: 'http', + }, + }, + }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + device_id: '123456', + user_properties: { + device_id: 'adddd0001', + device_os: 'ios', + device_make: 'apple iphone', + app_version: 'v1.0', + timestamp: '2020-08-28 09:00:00', + }, + event_type: '$identify', + time: 0, + user_id: 'ubcdfghi0001', + session_id: 1598597129, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '123456', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 15', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'identify', + userId: 'ubcdfghi0001', + anonymousId: '123456', + context: { + traits: { + device_id: 'adddd0001', + device_os: 'ios', + device_make: 'apple iphone', + app_version: 'v1.0', + timestamp: '2020-08-28 09:00:00', + }, + library: { + name: 'http', + }, + }, + }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + device_id: '123456', + user_properties: { + device_id: 'adddd0001', + device_os: 'ios', + device_make: 'apple iphone', + app_version: 'v1.0', + timestamp: '2020-08-28 09:00:00', + }, + event_type: '$identify', + time: 0, + user_id: 'ubcdfghi0001', + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '123456', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 16', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.5', + }, + traits: { + name: 'Shehan Study', + category: 'SampleIdentify', + email: 'test@rudderstack.com', + plan: 'Open source', + logins: 5, + createdAt: 1599264000, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.5', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36', + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 0.8999999761581421, + }, + campaign: { + source: 'google', + medium: 'medium', + term: 'keyword', + content: 'some content', + name: 'some campaign', + test: 'other value', + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + }, + type: 'group', + messageId: 'e5034df0-a404-47b4-a463-76df99934fea', + originalTimestamp: '2020-10-20T07:54:58.983Z', + anonymousId: 'my-anonymous-id-new', + userId: 'sampleusrRudder3', + integrations: { + All: true, + Amplitude: { + groups: { + group_type: 'Company', + group_value: 'ABC', + }, + }, + }, + groupId: 'Sample_groupId23', + traits: { + KEY_3: { + CHILD_KEY_92: 'value_95', + CHILD_KEY_102: 'value_103', + }, + KEY_2: { + CHILD_KEY_92: 'value_95', + CHILD_KEY_102: 'value_103', + }, + name_trait: 'Company', + value_trait: 'ABC', + }, + sentAt: '2020-10-20T07:54:58.983Z', + }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Chrome', + os_version: '85.0.4183.121', + device_model: 'Mac', + platform: 'Web', + device_id: 'my-anonymous-id-new', + app_name: 'RudderLabs JavaScript SDK', + app_version: '1.1.5', + language: 'en-US', + user_properties: { + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + utm_source: 'google', + utm_medium: 'medium', + utm_term: 'keyword', + utm_content: 'some content', + utm_name: 'some campaign', + utm_test: 'other value', + Company: 'ABC', + }, + event_type: '$identify', + groups: { + Company: 'ABC', + }, + time: 1603180498983, + user_id: 'sampleusrRudder3', + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'my-anonymous-id-new', + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/groupidentify', + headers: {}, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: { + api_key: 'abcde', + identification: ['{"group_type":"Company","group_value":"ABC"}'], + }, + }, + files: {}, + userId: 'my-anonymous-id-new', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 17', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.5', + }, + traits: { + name: 'Shehan Study', + category: 'SampleIdentify', + email: 'test@rudderstack.com', + plan: 'Open source', + logins: 5, + createdAt: 1599264000, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.5', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36', + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 0.8999999761581421, + }, + campaign: { + source: 'google', + medium: 'medium', + term: 'keyword', + content: 'some content', + name: 'some campaign', + test: 'other value', + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + }, + type: 'group', + messageId: 'e5034df0-a404-47b4-a463-76df99934fea', + originalTimestamp: '2020-10-20T07:54:58.983Z', + anonymousId: 'my-anonymous-id-new', + userId: 'sampleusrRudder3', + integrations: { + All: true, + }, + groupId: 'Sample_groupId23', + traits: { + KEY_3: { + CHILD_KEY_92: 'value_95', + CHILD_KEY_102: 'value_103', + }, + KEY_2: { + CHILD_KEY_92: 'value_95', + CHILD_KEY_102: 'value_103', + }, + name_trait: 'Company', + value_trait: 'ABC', + }, + sentAt: '2020-10-20T07:54:58.983Z', + }, + destination: { + Config: { + apiKey: 'abcde', + groupTypeTrait: 'name_trait', + groupValueTrait: 'value_trait', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Chrome', + os_version: '85.0.4183.121', + device_model: 'Mac', + platform: 'Web', + device_id: 'my-anonymous-id-new', + app_name: 'RudderLabs JavaScript SDK', + app_version: '1.1.5', + language: 'en-US', + user_properties: { + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + utm_source: 'google', + utm_medium: 'medium', + utm_term: 'keyword', + utm_content: 'some content', + utm_name: 'some campaign', + utm_test: 'other value', + Company: 'ABC', + }, + event_type: '$identify', + groups: { + Company: 'ABC', + }, + time: 1603180498983, + user_id: 'sampleusrRudder3', + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'my-anonymous-id-new', + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/groupidentify', + headers: {}, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: { + api_key: 'abcde', + identification: [ + '{"group_type":"Company","group_value":"ABC","group_properties":{"KEY_3":{"CHILD_KEY_92":"value_95","CHILD_KEY_102":"value_103"},"KEY_2":{"CHILD_KEY_92":"value_95","CHILD_KEY_102":"value_103"},"name_trait":"Company","value_trait":"ABC"}}', + ], + }, + }, + files: {}, + userId: 'my-anonymous-id-new', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 18: ERROR - Group call parameters are not valid', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.5', + }, + traits: { + name: 'Shehan Study', + category: 'SampleIdentify', + email: 'test@rudderstack.com', + plan: 'Open source', + logins: 5, + createdAt: 1599264000, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.5', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36', + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 0.8999999761581421, + }, + campaign: { + source: 'google', + medium: 'medium', + term: 'keyword', + content: 'some content', + name: 'some campaign', + test: 'other value', + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + }, + type: 'group', + messageId: 'e5034df0-a404-47b4-a463-76df99934fea', + originalTimestamp: '2020-10-20T07:54:58.983Z', + anonymousId: 'my-anonymous-id-new', + userId: 'sampleusrRudder3', + integrations: { + All: true, + }, + groupId: 'Sample_groupId23', + traits: { + KEY_3: { + CHILD_KEY_92: 'value_95', + CHILD_KEY_102: 'value_103', + }, + KEY_2: { + CHILD_KEY_92: 'value_95', + CHILD_KEY_102: 'value_103', + }, + name_trait: 'Company', + value_trait: ['ABC'], + }, + sentAt: '2020-10-20T07:54:58.983Z', + }, + destination: { + Config: { + apiKey: 'abcde', + groupTypeTrait: 'name_trait', + groupValueTrait: 'value_trait', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: 'Group call parameters are not valid', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'AM', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 19', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.5', + }, + traits: { + name: 'Shehan Study', + category: 'SampleIdentify', + email: 'test@rudderstack.com', + plan: 'Open source', + logins: 5, + createdAt: 1599264000, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.5', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36', + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 0.8999999761581421, + }, + campaign: { + source: 'google', + medium: 'medium', + term: 'keyword', + content: 'some content', + name: 'some campaign', + test: 'other value', + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + }, + type: 'alias', + messageId: 'dd46338d-5f83-493b-bd28-3b48f55d0be8', + originalTimestamp: '2020-10-20T08:14:28.778Z', + anonymousId: 'my-anonymous-id-new', + userId: 'newUserIdAlias', + integrations: { + All: true, + }, + previousId: 'sampleusrRudder3', + sentAt: '2020-10-20T08:14:28.778Z', + }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/usermap', + headers: {}, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: { + api_key: 'abcde', + mapping: [ + '{"global_user_id":"newUserIdAlias","user_id":"sampleusrRudder3","user_properties":{"initial_referrer":"https://docs.rudderstack.com","initial_referring_domain":"docs.rudderstack.com","utm_source":"google","utm_medium":"medium","utm_term":"keyword","utm_content":"some content","utm_name":"some campaign","utm_test":"other value"}}', + ], + }, + }, + files: {}, + userId: 'my-anonymous-id-new', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 20', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.5', + }, + traits: { + name: 'Shehan Study', + category: 'SampleIdentify', + email: 'test@rudderstack.com', + plan: 'Open source', + logins: 5, + createdAt: 1599264000, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.5', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36', + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 0.8999999761581421, + }, + campaign: { + source: 'google', + medium: 'medium', + term: 'keyword', + content: 'some content', + name: 'some campaign', + test: 'other value', + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + }, + type: 'alias', + messageId: 'dd46338d-5f83-493b-bd28-3b48f55d0be8', + originalTimestamp: '2020-10-20T08:14:28.778Z', + anonymousId: 'my-anonymous-id-new', + userId: 'newUserIdAlias', + integrations: { + All: false, + Amplitude: { + unmap: 'sampleusrRudder3', + }, + }, + previousId: 'sampleusrRudder3', + sentAt: '2020-10-20T08:14:28.778Z', + }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/usermap', + headers: {}, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: { + api_key: 'abcde', + mapping: [ + '{"user_id":"sampleusrRudder3","user_properties":{"initial_referrer":"https://docs.rudderstack.com","initial_referring_domain":"docs.rudderstack.com","utm_source":"google","utm_medium":"medium","utm_term":"keyword","utm_content":"some content","utm_name":"some campaign","utm_test":"other value"},"unmap":true}', + ], + }, + }, + files: {}, + userId: 'my-anonymous-id-new', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 21', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + event: 'Sample track event BEFORE IDENTIFY1**', + sentAt: '2020-09-17T15:07:13.171Z', + userId: '0572f78fa49c648e', + channel: 'mobile', + context: { + os: { + name: 'Android', + version: '9', + }, + app: { + name: 'AMTestProject', + build: '1', + version: '1.0', + namespace: 'com.rudderstack.android.rudderstack.sampleAndroidApp', + }, + locale: 'en-US', + screen: { + width: 1080, + height: 2088, + density: 440, + }, + traits: { + id: '0572f78fa49c648e', + userId: '0572f78fa49c648e', + address: {}, + company: {}, + anonymousId: '0572f78fa49c648e', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.4', + }, + network: { + wifi: true, + carrier: 'Android', + cellular: true, + bluetooth: false, + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + timezone: 'Asia/Kolkata', + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)', + }, + messageId: '1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466', + anonymousId: '0572f78fa49c648e', + integrations: { + All: true, + }, + originalTimestamp: '2020-09-17T15:07:03.515Z', + }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Android', + os_version: '9', + device_id: '0572f78fa49c648e', + carrier: 'Android', + app_name: 'AMTestProject', + app_version: '1.0', + language: 'en-US', + insert_id: '1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466', + user_properties: { + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + id: '0572f78fa49c648e', + userId: '0572f78fa49c648e', + address: {}, + company: {}, + anonymousId: '0572f78fa49c648e', + }, + event_type: 'Sample track event BEFORE IDENTIFY1**', + user_id: '0572f78fa49c648e', + time: 1600355223515, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '0572f78fa49c648e', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 22', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + event: 'Sample track event BEFORE IDENTIFY1**', + sentAt: '2020-09-17T15:07:13.171Z', + userId: '0572f78fa49c648e', + channel: 'mobile', + context: { + os: { + name: 'Android', + version: '9', + }, + app: { + name: 'AMTestProject', + build: '1', + version: '1.0', + namespace: 'com.rudderstack.android.rudderstack.sampleAndroidApp', + }, + device: { + id: '0572f78fa49c648e', + name: 'generic_x86_arm', + type: 'Android', + model: 'AOSP on IA Emulator', + manufacturer: 'Google', + adTrackingEnabled: false, + }, + locale: 'en-US', + screen: { + width: 1080, + height: 2088, + density: 440, + }, + traits: { + id: '0572f78fa49c648e', + userId: '0572f78fa49c648e', + address: {}, + company: {}, + anonymousId: '0572f78fa49c648e', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.4', + }, + network: { + wifi: true, + carrier: 'Android', + cellular: true, + bluetooth: false, + }, + timezone: 'Asia/Kolkata', + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)', + }, + messageId: '1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466', + anonymousId: '0572f78fa49c648e', + integrations: { + All: true, + }, + originalTimestamp: '2020-09-17T15:07:03.515Z', + }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Android', + os_version: '9', + device_model: 'AOSP on IA Emulator', + device_manufacturer: 'Google', + platform: 'Android', + device_id: '0572f78fa49c648e', + carrier: 'Android', + app_name: 'AMTestProject', + app_version: '1.0', + language: 'en-US', + insert_id: '1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466', + user_properties: { + id: '0572f78fa49c648e', + userId: '0572f78fa49c648e', + address: {}, + company: {}, + anonymousId: '0572f78fa49c648e', + }, + event_type: 'Sample track event BEFORE IDENTIFY1**', + user_id: '0572f78fa49c648e', + device_brand: 'Google', + time: 1600355223515, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '0572f78fa49c648e', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 23', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + event: 'Sample track event BEFORE IDENTIFY1**', + sentAt: '2020-09-17T15:07:13.171Z', + userId: '0572f78fa49c648e', + channel: 'mobile', + context: { + os: { + name: 'Android', + version: '9', + }, + app: { + name: 'AMTestProject', + build: '1', + version: '1.0', + namespace: 'com.rudderstack.android.rudderstack.sampleAndroidApp', + }, + device: { + id: '0572f78fa49c648e', + name: 'generic_x86_arm', + type: 'Android', + model: 'AOSP on IA Emulator', + manufacturer: 'Google', + adTrackingEnabled: true, + advertisingId: '44c97318-9040-4361-8bc7-4eb30f665ca8', + }, + locale: 'en-US', + screen: { + width: 1080, + height: 2088, + density: 440, + }, + traits: { + id: '0572f78fa49c648e', + userId: '0572f78fa49c648e', + address: {}, + company: {}, + anonymousId: '0572f78fa49c648e', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.4', + }, + network: { + wifi: true, + carrier: 'Android', + cellular: true, + bluetooth: false, + }, + timezone: 'Asia/Kolkata', + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)', + }, + messageId: '1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466', + anonymousId: '0572f78fa49c648e', + integrations: { + All: true, + }, + originalTimestamp: '2020-09-17T15:07:03.515Z', + }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Android', + os_version: '9', + device_model: 'AOSP on IA Emulator', + device_manufacturer: 'Google', + platform: 'Android', + device_id: '0572f78fa49c648e', + carrier: 'Android', + app_name: 'AMTestProject', + app_version: '1.0', + language: 'en-US', + insert_id: '1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466', + user_properties: { + id: '0572f78fa49c648e', + userId: '0572f78fa49c648e', + address: {}, + company: {}, + anonymousId: '0572f78fa49c648e', + }, + event_type: 'Sample track event BEFORE IDENTIFY1**', + user_id: '0572f78fa49c648e', + device_brand: 'Google', + adid: '44c97318-9040-4361-8bc7-4eb30f665ca8', + time: 1600355223515, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '0572f78fa49c648e', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 24', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + event: 'Sample track event BEFORE IDENTIFY1**', + sentAt: '2020-09-17T15:07:13.171Z', + userId: '0572f78fa49c648e', + channel: 'mobile', + context: { + os: { + name: 'iOS', + version: '14.4.1', + }, + app: { + name: 'AMTestProject', + build: '1', + version: '1.0', + namespace: 'com.rudderstack.android.rudderstack.sampleAndroidApp', + }, + device: { + id: '0572f78fa49c648e', + name: 'iphone_xr_64', + type: 'iOS', + model: 'iPhone XR', + manufacturer: 'Apple', + adTrackingEnabled: false, + }, + locale: 'en-US', + screen: { + width: 1080, + height: 2088, + density: 440, + }, + traits: { + id: '0572f78fa49c648e', + userId: '0572f78fa49c648e', + address: {}, + company: {}, + anonymousId: '0572f78fa49c648e', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.4', + }, + network: { + wifi: true, + carrier: 'AT&T', + cellular: true, + bluetooth: false, + }, + timezone: 'Asia/Kolkata', + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)', + }, + messageId: '1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466', + anonymousId: '0572f78fa49c648e', + integrations: { + All: true, + }, + originalTimestamp: '2020-09-17T15:07:03.515Z', + }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'iOS', + os_version: '14.4.1', + device_model: 'iPhone XR', + device_manufacturer: 'Apple', + platform: 'iOS', + device_id: '0572f78fa49c648e', + carrier: 'AT&T', + app_name: 'AMTestProject', + app_version: '1.0', + language: 'en-US', + insert_id: '1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466', + user_properties: { + id: '0572f78fa49c648e', + userId: '0572f78fa49c648e', + address: {}, + company: {}, + anonymousId: '0572f78fa49c648e', + }, + event_type: 'Sample track event BEFORE IDENTIFY1**', + user_id: '0572f78fa49c648e', + device_brand: 'Apple', + idfv: '0572f78fa49c648e', + time: 1600355223515, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '0572f78fa49c648e', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 25', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + event: 'Sample track event BEFORE IDENTIFY1**', + sentAt: '2020-09-17T15:07:13.171Z', + userId: '0572f78fa49c648e', + channel: 'mobile', + context: { + os: { + name: 'iOS', + version: '14.4.1', + }, + app: { + name: 'AMTestProject', + build: '1', + version: '1.0', + namespace: 'com.rudderstack.android.rudderstack.sampleAndroidApp', + }, + device: { + id: '0572f78fa49c648e', + name: 'iphone_xr_64', + type: 'iOS', + model: 'iPhone XR', + manufacturer: 'Apple', + adTrackingEnabled: true, + advertisingId: '1606e649-c97e-4d5f-a2ef-b81dbc66741a', + }, + locale: 'en-US', + screen: { + width: 1080, + height: 2088, + density: 440, + }, + traits: { + id: '0572f78fa49c648e', + userId: '0572f78fa49c648e', + address: {}, + company: {}, + anonymousId: '0572f78fa49c648e', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.4', + }, + network: { + wifi: true, + carrier: 'AT&T', + cellular: true, + bluetooth: false, + }, + timezone: 'Asia/Kolkata', + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)', + }, + messageId: '1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466', + anonymousId: '0572f78fa49c648e', + integrations: { + All: true, + }, + originalTimestamp: '2020-09-17T15:07:03.515Z', + }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'iOS', + os_version: '14.4.1', + device_model: 'iPhone XR', + device_manufacturer: 'Apple', + platform: 'iOS', + device_id: '0572f78fa49c648e', + carrier: 'AT&T', + app_name: 'AMTestProject', + app_version: '1.0', + language: 'en-US', + insert_id: '1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466', + user_properties: { + id: '0572f78fa49c648e', + userId: '0572f78fa49c648e', + address: {}, + company: {}, + anonymousId: '0572f78fa49c648e', + }, + event_type: 'Sample track event BEFORE IDENTIFY1**', + user_id: '0572f78fa49c648e', + device_brand: 'Apple', + idfa: '1606e649-c97e-4d5f-a2ef-b81dbc66741a', + idfv: '0572f78fa49c648e', + time: 1600355223515, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '0572f78fa49c648e', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 26', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'screen', + userId: 'identified user id', + anonymousId: 'anon-id-new', + event: 'Screen View', + properties: { + prop1: '5', + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + device_id: 'anon-id-new', + event_properties: { + prop1: '5', + name: 'Screen View', + }, + user_properties: {}, + event_type: 'Viewed Screen View Screen', + user_id: 'identified user id', + time: 1580602989544, + session_id: -1, + ip: '14.5.67.21', + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'anon-id-new', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 27', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + event: 'Order Completed', + sentAt: '2020-08-14T05:30:30.118Z', + context: { + source: 'test', + traits: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + library: { + name: 'rudder-sdk-ruby-sync', + version: '1.0.6', + }, + }, + messageId: '7208bbb6-2c4e-45bb-bf5b-ad426f3593e9', + timestamp: '2020-08-14T05:30:30.118Z', + properties: { + tax: 2, + total: 27.5, + coupon: 'hasbros', + revenue: 48, + price: 25, + quantity: 2, + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + products: [ + { + sku: '45790-32', + url: 'https://www.example.com/product/path', + name: 'Monopoly: 3rd Edition', + price: 19, + category: 'Games', + quantity: 1, + image_url: 'https:///www.example.com/product/path.jpg', + product_id: '507f1f77bcf86cd799439011', + }, + { + sku: '46493-32', + name: 'Uno Card Game', + price: 3, + category: 'Games', + quantity: 2, + product_id: '505bd76785ebb509fc183733', + }, + ], + shipping: 3, + subtotal: 22.5, + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + }, + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + integrations: { + S3: false, + All: true, + }, + }, + destination: { + Config: { + apiKey: 'abcde', + groupTypeTrait: 'email', + groupValueTrait: 'age', + trackProductsOnce: false, + trackRevenuePerProduct: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + device_id: '50be5c78-6c3f-4b60-be84-97805a316fb1', + insert_id: '7208bbb6-2c4e-45bb-bf5b-ad426f3593e9', + user_properties: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + event_properties: { + tax: 2, + total: 27.5, + coupon: 'hasbros', + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + shipping: 3, + subtotal: 22.5, + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + }, + event_type: 'Order Completed', + revenueType: 'Purchased', + price: 25, + quantity: 2, + revenue: 48, + time: 1597383030118, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + device_id: '50be5c78-6c3f-4b60-be84-97805a316fb1', + event_type: 'Product Purchased', + insert_id: '7208bbb6-2c4e-45bb-bf5b-ad426f3593e9-1', + user_properties: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + event_properties: { + sku: '45790-32', + url: 'https://www.example.com/product/path', + name: 'Monopoly: 3rd Edition', + price: 19, + category: 'Games', + quantity: 1, + image_url: 'https:///www.example.com/product/path.jpg', + product_id: '507f1f77bcf86cd799439011', + }, + time: 1597383030118, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + device_id: '50be5c78-6c3f-4b60-be84-97805a316fb1', + event_type: 'Product Purchased', + insert_id: '7208bbb6-2c4e-45bb-bf5b-ad426f3593e9-2', + user_properties: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + event_properties: { + sku: '46493-32', + name: 'Uno Card Game', + price: 3, + category: 'Games', + quantity: 2, + product_id: '505bd76785ebb509fc183733', + }, + time: 1597383030118, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 28', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + event: 'Order Completed', + sentAt: '2020-08-14T05:30:30.118Z', + context: { + source: 'test', + traits: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + library: { + name: 'rudder-sdk-ruby-sync', + version: '1.0.6', + }, + }, + messageId: '7208bbb6-2c4e-45bb-bf5b-ad426f3593e9', + timestamp: '2020-08-14T05:30:30.118Z', + properties: { + tax: 2, + total: 27.5, + coupon: 'hasbros', + revenue: 48, + price: 25, + quantity: 2, + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + products: [ + { + sku: '45790-32', + url: 'https://www.example.com/product/path', + name: 'Monopoly: 3rd Edition', + price: 19, + category: 'Games', + quantity: 1, + image_url: 'https:///www.example.com/product/path.jpg', + product_id: '507f1f77bcf86cd799439011', + }, + { + sku: '46493-32', + name: 'Uno Card Game', + price: 3, + category: 'Games', + quantity: 2, + product_id: '505bd76785ebb509fc183733', + }, + ], + shipping: 3, + subtotal: 22.5, + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + }, + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + integrations: { + S3: false, + All: true, + }, + }, + destination: { + Config: { + apiKey: 'abcde', + groupTypeTrait: 'email', + groupValueTrait: 'age', + trackProductsOnce: true, + trackRevenuePerProduct: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + device_id: '50be5c78-6c3f-4b60-be84-97805a316fb1', + insert_id: '7208bbb6-2c4e-45bb-bf5b-ad426f3593e9', + user_properties: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + event_properties: { + tax: 2, + total: 27.5, + coupon: 'hasbros', + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + products: [ + { + sku: '45790-32', + url: 'https://www.example.com/product/path', + name: 'Monopoly: 3rd Edition', + price: 19, + category: 'Games', + quantity: 1, + image_url: 'https:///www.example.com/product/path.jpg', + product_id: '507f1f77bcf86cd799439011', + }, + { + sku: '46493-32', + name: 'Uno Card Game', + price: 3, + category: 'Games', + quantity: 2, + product_id: '505bd76785ebb509fc183733', + }, + ], + shipping: 3, + subtotal: 22.5, + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + }, + event_type: 'Order Completed', + revenueType: 'Purchased', + price: 25, + quantity: 2, + revenue: 48, + time: 1597383030118, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 29', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + event: 'Order Completed', + sentAt: '2020-08-14T05:30:30.118Z', + context: { + source: 'test', + traits: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + library: { + name: 'rudder-sdk-ruby-sync', + version: '1.0.6', + }, + }, + messageId: '7208bbb6-2c4e-45bb-bf5b-ad426f3593e9', + timestamp: '2020-08-14T05:30:30.118Z', + properties: { + tax: 2, + total: 27.5, + coupon: 'hasbros', + revenue: 48, + price: 25, + quantity: 2, + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + products: [ + { + sku: '45790-32', + url: 'https://www.example.com/product/path', + name: 'Monopoly: 3rd Edition', + price: 19, + category: 'Games', + quantity: 1, + image_url: 'https:///www.example.com/product/path.jpg', + product_id: '507f1f77bcf86cd799439011', + }, + { + sku: '46493-32', + name: 'Uno Card Game', + price: 3, + category: 'Games', + quantity: 2, + product_id: '505bd76785ebb509fc183733', + }, + ], + shipping: 3, + subtotal: 22.5, + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + }, + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + integrations: { + S3: false, + All: true, + }, + }, + destination: { + Config: { + apiKey: 'abcde', + groupTypeTrait: 'email', + groupValueTrait: 'age', + trackProductsOnce: false, + trackRevenuePerProduct: true, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + device_id: '50be5c78-6c3f-4b60-be84-97805a316fb1', + insert_id: '7208bbb6-2c4e-45bb-bf5b-ad426f3593e9', + user_properties: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + event_properties: { + tax: 2, + total: 27.5, + coupon: 'hasbros', + revenue: 48, + price: 25, + quantity: 2, + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + shipping: 3, + subtotal: 22.5, + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + }, + event_type: 'Order Completed', + time: 1597383030118, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + device_id: '50be5c78-6c3f-4b60-be84-97805a316fb1', + event_type: 'Product Purchased', + insert_id: '7208bbb6-2c4e-45bb-bf5b-ad426f3593e9-1', + user_properties: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + event_properties: { + sku: '45790-32', + url: 'https://www.example.com/product/path', + name: 'Monopoly: 3rd Edition', + category: 'Games', + image_url: 'https:///www.example.com/product/path.jpg', + }, + productId: '507f1f77bcf86cd799439011', + revenueType: 'Purchased', + price: 19, + quantity: 1, + time: 1597383030118, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + device_id: '50be5c78-6c3f-4b60-be84-97805a316fb1', + event_type: 'Product Purchased', + insert_id: '7208bbb6-2c4e-45bb-bf5b-ad426f3593e9-2', + user_properties: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + event_properties: { + sku: '46493-32', + name: 'Uno Card Game', + category: 'Games', + }, + productId: '505bd76785ebb509fc183733', + revenueType: 'Purchased', + price: 3, + quantity: 2, + time: 1597383030118, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 30', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + event: 'Order Completed', + sentAt: '2020-08-14T05:30:30.118Z', + context: { + source: 'test', + traits: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + library: { + name: 'rudder-sdk-ruby-sync', + version: '1.0.6', + }, + }, + messageId: '7208bbb6-2c4e-45bb-bf5b-ad426f3593e9', + timestamp: '2020-08-14T05:30:30.118Z', + properties: { + tax: 2, + total: 27.5, + coupon: 'hasbros', + revenue: 48, + price: 25, + quantity: 2, + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + products: [ + { + sku: '45790-32', + url: 'https://www.example.com/product/path', + name: 'Monopoly: 3rd Edition', + price: 19, + category: 'Games', + quantity: 1, + image_url: 'https:///www.example.com/product/path.jpg', + product_id: '507f1f77bcf86cd799439011', + }, + { + sku: '46493-32', + name: 'Uno Card Game', + price: 3, + category: 'Games', + quantity: 2, + product_id: '505bd76785ebb509fc183733', + }, + ], + shipping: 3, + subtotal: 22.5, + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + }, + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + integrations: { + S3: false, + All: true, + }, + }, + destination: { + Config: { + apiKey: 'abcde', + groupTypeTrait: 'email', + groupValueTrait: 'age', + trackProductsOnce: true, + trackRevenuePerProduct: true, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + device_id: '50be5c78-6c3f-4b60-be84-97805a316fb1', + insert_id: '7208bbb6-2c4e-45bb-bf5b-ad426f3593e9', + user_properties: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + event_properties: { + tax: 2, + total: 27.5, + coupon: 'hasbros', + revenue: 48, + price: 25, + quantity: 2, + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + products: [ + { + sku: '45790-32', + url: 'https://www.example.com/product/path', + name: 'Monopoly: 3rd Edition', + price: 19, + category: 'Games', + quantity: 1, + image_url: 'https:///www.example.com/product/path.jpg', + product_id: '507f1f77bcf86cd799439011', + }, + { + sku: '46493-32', + name: 'Uno Card Game', + price: 3, + category: 'Games', + quantity: 2, + product_id: '505bd76785ebb509fc183733', + }, + ], + shipping: 3, + subtotal: 22.5, + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + }, + event_type: 'Order Completed', + time: 1597383030118, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + device_id: '50be5c78-6c3f-4b60-be84-97805a316fb1', + event_type: 'Product Purchased', + insert_id: '7208bbb6-2c4e-45bb-bf5b-ad426f3593e9-1', + user_properties: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + event_properties: { + sku: '45790-32', + url: 'https://www.example.com/product/path', + name: 'Monopoly: 3rd Edition', + category: 'Games', + image_url: 'https:///www.example.com/product/path.jpg', + }, + productId: '507f1f77bcf86cd799439011', + revenueType: 'Purchased', + price: 19, + quantity: 1, + time: 1597383030118, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + device_id: '50be5c78-6c3f-4b60-be84-97805a316fb1', + event_type: 'Product Purchased', + insert_id: '7208bbb6-2c4e-45bb-bf5b-ad426f3593e9-2', + user_properties: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + event_properties: { + sku: '46493-32', + name: 'Uno Card Game', + category: 'Games', + }, + productId: '505bd76785ebb509fc183733', + revenueType: 'Purchased', + price: 3, + quantity: 2, + time: 1597383030118, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 31', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + event: 'Order Completed', + sentAt: '2020-08-14T05:30:30.118Z', + context: { + source: 'test', + traits: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + library: { + name: 'rudder-sdk-ruby-sync', + version: '1.0.6', + }, + }, + messageId: '7208bbb6-2c4e-45bb-bf5b-ad426f3593e9', + timestamp: '2020-08-14T05:30:30.118Z', + properties: { + tax: 2, + total: 27.5, + coupon: 'hasbros', + revenue: 48, + price: 25, + quantity: 2, + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + shipping: 3, + subtotal: 22.5, + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + }, + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + integrations: { + S3: false, + All: true, + }, + }, + destination: { + Config: { + apiKey: 'abcde', + groupTypeTrait: 'email', + groupValueTrait: 'age', + trackProductsOnce: true, + trackRevenuePerProduct: true, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + device_id: '50be5c78-6c3f-4b60-be84-97805a316fb1', + insert_id: '7208bbb6-2c4e-45bb-bf5b-ad426f3593e9', + user_properties: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + event_properties: { + tax: 2, + total: 27.5, + coupon: 'hasbros', + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + shipping: 3, + subtotal: 22.5, + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + }, + event_type: 'Order Completed', + revenueType: 'Purchased', + price: 25, + quantity: 2, + revenue: 48, + time: 1597383030118, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 32', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + event: 'Order Completed', + sentAt: '2020-08-14T05:30:30.118Z', + context: { + source: 'test', + traits: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + library: { + name: 'rudder-sdk-ruby-sync', + version: '1.0.6', + }, + }, + messageId: '7208bbb6-2c4e-45bb-bf5b-ad426f3593e9', + timestamp: '2020-08-14T05:30:30.118Z', + properties: { + tax: 2, + total: 27.5, + coupon: 'hasbros', + revenue: 48, + price: 25, + quantity: 2, + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + shipping: 3, + subtotal: 22.5, + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + }, + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + integrations: { + S3: false, + All: true, + }, + }, + destination: { + Config: { + apiKey: 'abcde', + groupTypeTrait: 'email', + groupValueTrait: 'age', + trackProductsOnce: true, + trackRevenuePerProduct: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + device_id: '50be5c78-6c3f-4b60-be84-97805a316fb1', + insert_id: '7208bbb6-2c4e-45bb-bf5b-ad426f3593e9', + user_properties: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + event_properties: { + tax: 2, + total: 27.5, + coupon: 'hasbros', + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + shipping: 3, + subtotal: 22.5, + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + }, + event_type: 'Order Completed', + revenueType: 'Purchased', + price: 25, + quantity: 2, + revenue: 48, + time: 1597383030118, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 33', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + event: 'Order Completed', + sentAt: '2020-08-14T05:30:30.118Z', + context: { + source: 'test', + traits: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + library: { + name: 'rudder-sdk-ruby-sync', + version: '1.0.6', + }, + }, + messageId: '7208bbb6-2c4e-45bb-bf5b-ad426f3593e9', + timestamp: '2020-08-14T05:30:30.118Z', + properties: { + tax: 2, + total: 27.5, + coupon: 'hasbros', + revenue: 48, + price: 25, + quantity: 2, + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + shipping: 3, + subtotal: 22.5, + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + }, + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + integrations: { + S3: false, + All: true, + }, + }, + destination: { + Config: { + apiKey: 'abcde', + groupTypeTrait: 'email', + groupValueTrait: 'age', + trackProductsOnce: false, + trackRevenuePerProduct: true, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + device_id: '50be5c78-6c3f-4b60-be84-97805a316fb1', + insert_id: '7208bbb6-2c4e-45bb-bf5b-ad426f3593e9', + user_properties: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + event_properties: { + tax: 2, + total: 27.5, + coupon: 'hasbros', + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + shipping: 3, + subtotal: 22.5, + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + }, + event_type: 'Order Completed', + revenueType: 'Purchased', + price: 25, + quantity: 2, + revenue: 48, + time: 1597383030118, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 34', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + event: 'Order Completed', + sentAt: '2020-08-14T05:30:30.118Z', + context: { + source: 'test', + traits: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + library: { + name: 'rudder-sdk-ruby-sync', + version: '1.0.6', + }, + }, + messageId: '7208bbb6-2c4e-45bb-bf5b-ad426f3593e9', + timestamp: '2020-08-14T05:30:30.118Z', + properties: { + tax: 2, + total: 27.5, + coupon: 'hasbros', + revenue: 48, + price: 25, + quantity: 2, + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + shipping: 3, + subtotal: 22.5, + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + }, + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + integrations: { + S3: false, + All: true, + }, + }, + destination: { + Config: { + apiKey: 'abcde', + groupTypeTrait: 'email', + groupValueTrait: 'age', + trackProductsOnce: false, + trackRevenuePerProduct: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + device_id: '50be5c78-6c3f-4b60-be84-97805a316fb1', + insert_id: '7208bbb6-2c4e-45bb-bf5b-ad426f3593e9', + user_properties: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + event_properties: { + tax: 2, + total: 27.5, + coupon: 'hasbros', + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + shipping: 3, + subtotal: 22.5, + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + }, + event_type: 'Order Completed', + revenueType: 'Purchased', + price: 25, + quantity: 2, + revenue: 48, + time: 1597383030118, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '50be5c78-6c3f-4b60-be84-97805a316fb1', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 35', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'identify', + sentAt: '2020-11-20T06:18:22.342Z', + userId: 'User_111', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.8', + namespace: 'com.rudderlabs.javascript', + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + locale: 'en-GB', + screen: { + density: 2.5, + }, + traits: { + city: 'Durgapur', + name: 'Manashi', + phone: '990099009900', + friends: 3, + age: 12, + subjects: 5, + experience: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.8', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36', + }, + rudderId: '7e00bf3d-5357-4448-886d-f8fc8abf932d', + messageId: '6f08cc45-95c3-40c1-90f2-2f44a92947ef', + anonymousId: '2f8b0ba7-d76e-4b91-9577-d1b6ebd68946', + integrations: { + All: true, + }, + originalTimestamp: '2020-11-20T06:18:22.342Z', + }, + destination: { + Config: { + apiKey: 'abcde', + groupTypeTrait: 'email', + groupValueTrait: 'age', + traitsToIncrement: [ + { + traits: 'age', + }, + { + traits: 'friends', + }, + ], + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Chrome', + os_version: '86.0.4240.198', + device_model: 'Mac', + platform: 'Web', + device_id: '2f8b0ba7-d76e-4b91-9577-d1b6ebd68946', + app_name: 'RudderLabs JavaScript SDK', + app_version: '1.1.8', + language: 'en-GB', + insert_id: '6f08cc45-95c3-40c1-90f2-2f44a92947ef', + user_properties: { + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + name: 'Manashi', + phone: '990099009900', + subjects: 5, + experience: 2, + $add: { + age: 12, + friends: 3, + }, + }, + event_type: '$identify', + time: 1605853102342, + user_id: 'User_111', + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '2f8b0ba7-d76e-4b91-9577-d1b6ebd68946', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 36', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'identify', + sentAt: '2020-11-20T06:18:22.342Z', + userId: 'User_111', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.8', + namespace: 'com.rudderlabs.javascript', + }, + page: { + url: 'http://localhost:1111/RudderAmplitude.html', + path: '/RudderAmplitude.html', + title: 'Amplitude Testing By Rudder', + search: '', + referrer: 'http://localhost:1111/', + }, + locale: 'en-GB', + screen: { + density: 2.5, + }, + traits: { + city: 'Durgapur', + name: 'Manashi', + phone: '990099009900', + friends: 3, + age: 12, + subjects: 5, + experience: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.8', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36', + }, + rudderId: '7e00bf3d-5357-4448-886d-f8fc8abf932d', + messageId: '6f08cc45-95c3-40c1-90f2-2f44a92947ef', + anonymousId: '2f8b0ba7-d76e-4b91-9577-d1b6ebd68946', + integrations: { + All: true, + }, + originalTimestamp: '2020-11-20T06:18:22.342Z', + }, + destination: { + Config: { + apiKey: 'abcde', + groupTypeTrait: 'email', + groupValueTrait: 'age', + traitsToSetOnce: [ + { + traits: 'subjects', + }, + { + traits: '', + }, + ], + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Chrome', + os_version: '86.0.4240.198', + device_model: 'Mac', + platform: 'Web', + device_id: '2f8b0ba7-d76e-4b91-9577-d1b6ebd68946', + app_name: 'RudderLabs JavaScript SDK', + app_version: '1.1.8', + language: 'en-GB', + insert_id: '6f08cc45-95c3-40c1-90f2-2f44a92947ef', + user_properties: { + name: 'Manashi', + phone: '990099009900', + friends: 3, + age: 12, + experience: 2, + $setOnce: { + subjects: 5, + }, + }, + event_type: '$identify', + time: 1605853102342, + user_id: 'User_111', + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '2f8b0ba7-d76e-4b91-9577-d1b6ebd68946', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 37', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'identify', + sentAt: '2020-11-20T06:18:22.342Z', + userId: 'User_111', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.8', + namespace: 'com.rudderlabs.javascript', + }, + page: { + url: 'http://localhost:1111/RudderAmplitude.html', + path: '/RudderAmplitude.html', + title: 'Amplitude Testing By Rudder', + search: '', + referrer: 'http://localhost:1111/', + }, + locale: 'en-GB', + screen: { + density: 2.5, + }, + traits: { + city: 'Durgapur', + name: 'Manashi', + phone: '990099009900', + friends: 3, + age: 12, + subjects: 5, + experience: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.8', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36', + }, + rudderId: '7e00bf3d-5357-4448-886d-f8fc8abf932d', + messageId: '6f08cc45-95c3-40c1-90f2-2f44a92947ef', + anonymousId: '2f8b0ba7-d76e-4b91-9577-d1b6ebd68946', + integrations: { + All: true, + }, + originalTimestamp: '2020-11-20T06:18:22.342Z', + }, + destination: { + Config: { + apiKey: 'abcde', + groupTypeTrait: 'email', + groupValueTrait: 'age', + traitsToAppend: [ + { + traits: 'name', + }, + { + traits: '', + }, + ], + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Chrome', + os_version: '86.0.4240.198', + device_model: 'Mac', + platform: 'Web', + device_id: '2f8b0ba7-d76e-4b91-9577-d1b6ebd68946', + app_name: 'RudderLabs JavaScript SDK', + app_version: '1.1.8', + language: 'en-GB', + insert_id: '6f08cc45-95c3-40c1-90f2-2f44a92947ef', + user_properties: { + phone: '990099009900', + friends: 3, + age: 12, + subjects: 5, + experience: 2, + $append: { + name: 'Manashi', + }, + }, + event_type: '$identify', + time: 1605853102342, + user_id: 'User_111', + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '2f8b0ba7-d76e-4b91-9577-d1b6ebd68946', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 38', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'identify', + sentAt: '2020-11-20T06:18:22.342Z', + userId: 'User_111', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.8', + namespace: 'com.rudderlabs.javascript', + }, + page: { + url: 'http://localhost:1111/RudderAmplitude.html', + path: '/RudderAmplitude.html', + title: 'Amplitude Testing By Rudder', + search: '', + referrer: 'http://localhost:1111/', + }, + locale: 'en-GB', + screen: { + density: 2.5, + }, + traits: { + city: 'Durgapur', + name: 'Manashi', + phone: '990099009900', + friends: 3, + age: 12, + subjects: 5, + experience: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.8', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36', + }, + rudderId: '7e00bf3d-5357-4448-886d-f8fc8abf932d', + messageId: '6f08cc45-95c3-40c1-90f2-2f44a92947ef', + anonymousId: '2f8b0ba7-d76e-4b91-9577-d1b6ebd68946', + integrations: { + All: true, + }, + originalTimestamp: '2020-11-20T06:18:22.342Z', + }, + destination: { + Config: { + apiKey: 'abcde', + groupTypeTrait: 'email', + groupValueTrait: 'age', + traitsToPrepend: [ + { + traits: 'experience', + }, + { + traits: '', + }, + ], + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Chrome', + os_version: '86.0.4240.198', + device_model: 'Mac', + platform: 'Web', + device_id: '2f8b0ba7-d76e-4b91-9577-d1b6ebd68946', + app_name: 'RudderLabs JavaScript SDK', + app_version: '1.1.8', + language: 'en-GB', + insert_id: '6f08cc45-95c3-40c1-90f2-2f44a92947ef', + user_properties: { + name: 'Manashi', + phone: '990099009900', + friends: 3, + age: 12, + subjects: 5, + $prepend: { + experience: 2, + }, + }, + event_type: '$identify', + time: 1605853102342, + user_id: 'User_111', + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '2f8b0ba7-d76e-4b91-9577-d1b6ebd68946', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 39', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'identify', + sentAt: '2020-11-20T06:18:22.342Z', + userId: 'User_111', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.8', + namespace: 'com.rudderlabs.javascript', + }, + page: { + url: 'http://localhost:1111/RudderAmplitude.html', + path: '/RudderAmplitude.html', + title: 'Amplitude Testing By Rudder', + search: '', + referrer: 'http://localhost:1111/', + }, + locale: 'en-GB', + screen: { + density: 2.5, + }, + traits: { + city: 'Durgapur', + name: 'Manashi', + phone: '990099009900', + friends: 3, + age: 12, + subjects: 5, + experience: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.8', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36', + }, + rudderId: '7e00bf3d-5357-4448-886d-f8fc8abf932d', + messageId: '6f08cc45-95c3-40c1-90f2-2f44a92947ef', + anonymousId: '2f8b0ba7-d76e-4b91-9577-d1b6ebd68946', + integrations: { + All: true, + }, + originalTimestamp: '2020-11-20T06:18:22.342Z', + }, + destination: { + Config: { + apiKey: 'abcde', + groupTypeTrait: 'email', + groupValueTrait: 'age', + traitsToIncrement: [ + { + traits: 'age', + }, + { + traits: 'friends', + }, + ], + traitsToSetOnce: [ + { + traits: 'subjects', + }, + { + traits: '', + }, + ], + traitsToAppend: [ + { + traits: 'name', + }, + { + traits: '', + }, + ], + traitsToPrepend: [ + { + traits: 'experience', + }, + { + traits: '', + }, + ], + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Chrome', + os_version: '86.0.4240.198', + device_model: 'Mac', + platform: 'Web', + device_id: '2f8b0ba7-d76e-4b91-9577-d1b6ebd68946', + app_name: 'RudderLabs JavaScript SDK', + app_version: '1.1.8', + language: 'en-GB', + insert_id: '6f08cc45-95c3-40c1-90f2-2f44a92947ef', + user_properties: { + phone: '990099009900', + $add: { + age: 12, + friends: 3, + }, + $setOnce: { + subjects: 5, + }, + $append: { + name: 'Manashi', + }, + $prepend: { + experience: 2, + }, + }, + event_type: '$identify', + time: 1605853102342, + user_id: 'User_111', + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '2f8b0ba7-d76e-4b91-9577-d1b6ebd68946', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 40', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + event: 'Order Completed', + sentAt: '2020-08-14T05:30:30.118Z', + userId: 'userID123', + context: { + source: 'test', + traits: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + address: { + city: 'kolkata', + country: 'India', + postalCode: 712136, + state: 'WB', + street: '', + }, + }, + locale: 'en-US', + network: { + carrier: 'T-Mobile', + }, + location: { + country: 'United States', + city: 'San Francisco', + region: 'California', + latitude: '37.7672319', + longitude: '-122.4021353', + dma: 'San Francisco-Oakland-San Jose, CA', + }, + library: { + name: 'rudder-sdk-ruby-sync', + version: '1.0.6', + }, + os: { + name: 'Android', + version: '11', + }, + app: { + version: '2.6.0 v3', + }, + device: { + type: 'Android', + model: 'SM-A025M', + manufacturer: 'samsung', + }, + }, + messageId: '7208abb6-2c4e-45bb-bf5b-aa426f3593a2', + timestamp: '2020-08-14T05:30:30.118Z', + properties: { + tax: 2, + total: 27.5, + coupon: 'hasbros', + revenue: 48, + price: 25, + quantity: 2, + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + products: [ + { + sku: '45790-32', + url: 'https://www.example.com/product/path', + name: 'Monopoly: 3rd Edition', + price: 19, + category: 'Games', + quantity: 1, + image_url: 'https:///www.example.com/product/path.jpg', + product_id: '507f1f77bcf86cd799439011', + }, + { + sku: '46493-32', + name: 'Uno Card Game', + price: 3, + category: 'Games', + quantity: 2, + product_id: '505bd76785ebb509fc183733', + }, + ], + shipping: 3, + subtotal: 22.5, + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + }, + anonymousId: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + integrations: { + S3: false, + All: true, + }, + }, + destination: { + Config: { + apiKey: 'abcde', + trackProductsOnce: false, + trackRevenuePerProduct: true, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Android', + os_version: '11', + device_model: 'SM-A025M', + device_manufacturer: 'samsung', + platform: 'Android', + device_id: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + carrier: 'T-Mobile', + app_version: '2.6.0 v3', + language: 'en-US', + insert_id: '7208abb6-2c4e-45bb-bf5b-aa426f3593a2', + user_properties: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + address: { + postalCode: 712136, + state: 'WB', + street: '', + }, + }, + event_properties: { + tax: 2, + total: 27.5, + coupon: 'hasbros', + revenue: 48, + price: 25, + quantity: 2, + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + shipping: 3, + subtotal: 22.5, + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + }, + event_type: 'Order Completed', + user_id: 'userID123', + time: 1597383030118, + session_id: -1, + region: 'California', + location_lat: '37.7672319', + location_lng: '-122.4021353', + dma: 'San Francisco-Oakland-San Jose, CA', + country: 'United States', + city: 'San Francisco', + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Android', + os_version: '11', + device_model: 'SM-A025M', + device_manufacturer: 'samsung', + platform: 'Android', + device_id: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + carrier: 'T-Mobile', + app_version: '2.6.0 v3', + language: 'en-US', + event_type: 'Product Purchased', + insert_id: '7208abb6-2c4e-45bb-bf5b-aa426f3593a2-1', + user_properties: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + address: { + postalCode: 712136, + state: 'WB', + street: '', + }, + }, + event_properties: { + sku: '45790-32', + url: 'https://www.example.com/product/path', + name: 'Monopoly: 3rd Edition', + category: 'Games', + image_url: 'https:///www.example.com/product/path.jpg', + }, + user_id: 'userID123', + productId: '507f1f77bcf86cd799439011', + revenueType: 'Purchased', + price: 19, + quantity: 1, + time: 1597383030118, + session_id: -1, + region: 'California', + location_lat: '37.7672319', + location_lng: '-122.4021353', + dma: 'San Francisco-Oakland-San Jose, CA', + country: 'United States', + city: 'San Francisco', + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Android', + os_version: '11', + device_model: 'SM-A025M', + device_manufacturer: 'samsung', + platform: 'Android', + device_id: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + carrier: 'T-Mobile', + app_version: '2.6.0 v3', + language: 'en-US', + event_type: 'Product Purchased', + insert_id: '7208abb6-2c4e-45bb-bf5b-aa426f3593a2-2', + user_properties: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + address: { + postalCode: 712136, + state: 'WB', + street: '', + }, + }, + event_properties: { + sku: '46493-32', + name: 'Uno Card Game', + category: 'Games', + }, + user_id: 'userID123', + productId: '505bd76785ebb509fc183733', + revenueType: 'Purchased', + price: 3, + quantity: 2, + time: 1597383030118, + session_id: -1, + region: 'California', + location_lat: '37.7672319', + location_lng: '-122.4021353', + dma: 'San Francisco-Oakland-San Jose, CA', + country: 'United States', + city: 'San Francisco', + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 41', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + event: 'Order Completed', + sentAt: '2020-08-14T05:30:30.118Z', + userId: 'userID123', + context: { + source: 'test', + traits: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + address: { + city: 'kolkata', + country: 'India', + postalCode: 712136, + state: 'WB', + street: '', + }, + }, + locale: 'en-US', + network: { + carrier: 'T-Mobile', + }, + location: { + latitude: '37.7672319', + longitude: '-122.4021353', + dma: 'San Francisco-Oakland-San Jose, CA', + }, + library: { + name: 'rudder-sdk-ruby-sync', + version: '1.0.6', + }, + os: { + name: 'Android', + version: '11', + }, + app: { + version: '2.6.0 v3', + }, + device: { + type: 'Android', + model: 'SM-A025M', + manufacturer: 'samsung', + }, + }, + messageId: '7208abb6-2c4e-45bb-bf5b-aa426f3593a2', + timestamp: '2020-08-14T05:30:30.118Z', + properties: { + tax: 2, + total: 27.5, + coupon: 'hasbros', + revenue: 48, + price: 25, + quantity: 2, + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + products: [ + { + sku: '45790-32', + url: 'https://www.example.com/product/path', + name: 'Monopoly: 3rd Edition', + price: 19, + category: 'Games', + quantity: 1, + image_url: 'https:///www.example.com/product/path.jpg', + product_id: '507f1f77bcf86cd799439011', + }, + { + sku: '46493-32', + name: 'Uno Card Game', + price: 3, + category: 'Games', + quantity: 2, + product_id: '505bd76785ebb509fc183733', + }, + ], + shipping: 3, + subtotal: 22.5, + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + }, + anonymousId: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + integrations: { + S3: false, + All: true, + }, + }, + destination: { + Config: { + apiKey: 'abcde', + trackProductsOnce: true, + trackRevenuePerProduct: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Android', + os_version: '11', + device_model: 'SM-A025M', + device_manufacturer: 'samsung', + platform: 'Android', + device_id: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + carrier: 'T-Mobile', + app_version: '2.6.0 v3', + language: 'en-US', + insert_id: '7208abb6-2c4e-45bb-bf5b-aa426f3593a2', + user_properties: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + address: { + postalCode: 712136, + state: 'WB', + street: '', + }, + }, + event_properties: { + tax: 2, + total: 27.5, + coupon: 'hasbros', + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + products: [ + { + sku: '45790-32', + url: 'https://www.example.com/product/path', + name: 'Monopoly: 3rd Edition', + price: 19, + category: 'Games', + quantity: 1, + image_url: 'https:///www.example.com/product/path.jpg', + product_id: '507f1f77bcf86cd799439011', + }, + { + sku: '46493-32', + name: 'Uno Card Game', + price: 3, + category: 'Games', + quantity: 2, + product_id: '505bd76785ebb509fc183733', + }, + ], + shipping: 3, + subtotal: 22.5, + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + }, + event_type: 'Order Completed', + user_id: 'userID123', + revenueType: 'Purchased', + price: 25, + quantity: 2, + revenue: 48, + time: 1597383030118, + session_id: -1, + location_lat: '37.7672319', + location_lng: '-122.4021353', + dma: 'San Francisco-Oakland-San Jose, CA', + country: 'India', + city: 'kolkata', + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 42', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + event: 'App_Opened', + sentAt: '2021-11-17T19:13:52.106Z', + userId: 'ab419c3a-47ce-11ec-82ac-16a1bb813a59', + channel: 'mobile', + context: { + source: 'test', + traits: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + address: { + city: 'kolkata', + country: 'India', + postalCode: 712136, + state: 'WB', + street: '', + }, + }, + locale: 'en-US', + network: { + carrier: 'T-Mobile', + }, + location: { + country: 'United States', + city: 'San Francisco', + latitude: '37.7672319', + longitude: '-122.4021353', + dma: 'San Francisco-Oakland-San Jose, CA', + }, + library: { + name: 'rudder-sdk-ruby-sync', + version: '1.0.6', + }, + os: { + name: 'Android', + version: '11', + }, + app: { + version: '2.6.0 v3', + }, + device: { + type: 'Android', + model: 'SM-A025M', + manufacturer: 'samsung', + }, + }, + messageId: '7208abb6-2c4e-45bb-bf5b-aa426f3593a2', + timestamp: '2020-08-14T05:30:30.118Z', + properties: { + externalID: '1637170658229-3961832492194264209', + }, + integrations: { + All: true, + }, + originalTimestamp: '2021-11-17T19:13:51.143Z', + }, + destination: { + Config: { + apiKey: 'abcde', + trackProductsOnce: true, + trackRevenuePerProduct: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Android', + os_version: '11', + device_model: 'SM-A025M', + device_manufacturer: 'samsung', + platform: 'Android', + carrier: 'T-Mobile', + app_version: '2.6.0 v3', + language: 'en-US', + insert_id: '7208abb6-2c4e-45bb-bf5b-aa426f3593a2', + user_properties: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + address: { + postalCode: 712136, + state: 'WB', + street: '', + }, + }, + event_properties: { + externalID: '1637170658229-3961832492194264209', + }, + event_type: 'App_Opened', + user_id: 'ab419c3a-47ce-11ec-82ac-16a1bb813a59', + device_brand: 'samsung', + time: 1597383030118, + session_id: -1, + location_lat: '37.7672319', + location_lng: '-122.4021353', + dma: 'San Francisco-Oakland-San Jose, CA', + country: 'United States', + city: 'San Francisco', + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 43', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'identify', + sentAt: '2020-11-20T06:18:22.342Z', + userId: 'User_111', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.8', + namespace: 'com.rudderlabs.javascript', + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + locale: 'en-GB', + screen: { + density: 2.5, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.8', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36', + }, + rudderId: '7e00bf3d-5357-4448-886d-f8fc8abf932d', + messageId: '6f08cc45-95c3-40c1-90f2-2f44a92947ef', + anonymousId: '2f8b0ba7-d76e-4b91-9577-d1b6ebd68946', + integrations: { + All: true, + }, + originalTimestamp: '2020-11-20T06:18:22.342Z', + }, + destination: { + Config: { + apiKey: 'abcde', + groupTypeTrait: 'email', + groupValueTrait: 'age', + traitsToIncrement: [ + { + traits: 'age', + }, + { + traits: 'friends', + }, + ], + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Chrome', + os_version: '86.0.4240.198', + device_model: 'Mac', + platform: 'Web', + device_id: '2f8b0ba7-d76e-4b91-9577-d1b6ebd68946', + app_name: 'RudderLabs JavaScript SDK', + app_version: '1.1.8', + language: 'en-GB', + insert_id: '6f08cc45-95c3-40c1-90f2-2f44a92947ef', + user_properties: { + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + event_type: '$identify', + time: 1605853102342, + user_id: 'User_111', + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '2f8b0ba7-d76e-4b91-9577-d1b6ebd68946', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 44', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + event: 'Order Completed', + sentAt: '2020-08-14T05:30:30.118Z', + userId: 'userID123', + context: { + source: 'test', + traits: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + address: { + city: 'kolkata', + country: 'India', + postalCode: 712136, + state: 'WB', + street: '', + }, + }, + locale: 'en-US', + network: { + carrier: 'T-Mobile', + }, + location: { + latitude: '37.7672319', + longitude: '-122.4021353', + dma: 'San Francisco-Oakland-San Jose, CA', + }, + library: { + name: 'rudder-sdk-ruby-sync', + version: '1.0.6', + }, + os: { + name: 'Android', + version: '11', + }, + app: { + version: '2.6.0 v3', + }, + device: { + type: 'Android', + model: 'SM-A025M', + manufacturer: 'samsung', + }, + }, + messageId: '7208abb6-2c4e-45bb-bf5b-aa426f3593a2', + timestamp: '2020-08-14T05:30:30.118Z', + properties: { + tax: 2, + total: 27.5, + coupon: 'hasbros', + revenue: 0, + price: 25, + quantity: 2, + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + products: [ + { + sku: '45790-32', + url: 'https://www.example.com/product/path', + name: 'Monopoly: 3rd Edition', + price: 19, + category: 'Games', + quantity: 1, + image_url: 'https:///www.example.com/product/path.jpg', + product_id: '507f1f77bcf86cd799439011', + }, + { + sku: '46493-32', + name: 'Uno Card Game', + price: 3, + category: 'Games', + quantity: 2, + product_id: '505bd76785ebb509fc183733', + }, + ], + shipping: 3, + subtotal: 22.5, + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + }, + anonymousId: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + integrations: { + S3: false, + All: true, + }, + }, + destination: { + Config: { + apiKey: 'abcde', + trackProductsOnce: true, + trackRevenuePerProduct: true, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Android', + os_version: '11', + device_model: 'SM-A025M', + device_manufacturer: 'samsung', + platform: 'Android', + device_id: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + carrier: 'T-Mobile', + app_version: '2.6.0 v3', + language: 'en-US', + insert_id: '7208abb6-2c4e-45bb-bf5b-aa426f3593a2', + user_properties: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + address: { + postalCode: 712136, + state: 'WB', + street: '', + }, + }, + event_properties: { + tax: 2, + total: 27.5, + coupon: 'hasbros', + revenue: 0, + price: 25, + quantity: 2, + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + products: [ + { + sku: '45790-32', + url: 'https://www.example.com/product/path', + name: 'Monopoly: 3rd Edition', + price: 19, + category: 'Games', + quantity: 1, + image_url: 'https:///www.example.com/product/path.jpg', + product_id: '507f1f77bcf86cd799439011', + }, + { + sku: '46493-32', + name: 'Uno Card Game', + price: 3, + category: 'Games', + quantity: 2, + product_id: '505bd76785ebb509fc183733', + }, + ], + shipping: 3, + subtotal: 22.5, + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + }, + event_type: 'Order Completed', + user_id: 'userID123', + time: 1597383030118, + session_id: -1, + location_lat: '37.7672319', + location_lng: '-122.4021353', + dma: 'San Francisco-Oakland-San Jose, CA', + country: 'India', + city: 'kolkata', + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Android', + os_version: '11', + device_model: 'SM-A025M', + device_manufacturer: 'samsung', + platform: 'Android', + device_id: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + carrier: 'T-Mobile', + app_version: '2.6.0 v3', + language: 'en-US', + event_type: 'Product Purchased', + insert_id: '7208abb6-2c4e-45bb-bf5b-aa426f3593a2-1', + user_properties: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + address: { + postalCode: 712136, + state: 'WB', + street: '', + }, + }, + event_properties: { + sku: '45790-32', + url: 'https://www.example.com/product/path', + name: 'Monopoly: 3rd Edition', + category: 'Games', + image_url: 'https:///www.example.com/product/path.jpg', + }, + user_id: 'userID123', + productId: '507f1f77bcf86cd799439011', + revenueType: 'Purchased', + price: 19, + quantity: 1, + time: 1597383030118, + session_id: -1, + location_lat: '37.7672319', + location_lng: '-122.4021353', + dma: 'San Francisco-Oakland-San Jose, CA', + country: 'India', + city: 'kolkata', + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Android', + os_version: '11', + device_model: 'SM-A025M', + device_manufacturer: 'samsung', + platform: 'Android', + device_id: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + carrier: 'T-Mobile', + app_version: '2.6.0 v3', + language: 'en-US', + event_type: 'Product Purchased', + insert_id: '7208abb6-2c4e-45bb-bf5b-aa426f3593a2-2', + user_properties: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + address: { + postalCode: 712136, + state: 'WB', + street: '', + }, + }, + event_properties: { + sku: '46493-32', + name: 'Uno Card Game', + category: 'Games', + }, + user_id: 'userID123', + productId: '505bd76785ebb509fc183733', + revenueType: 'Purchased', + price: 3, + quantity: 2, + time: 1597383030118, + session_id: -1, + location_lat: '37.7672319', + location_lng: '-122.4021353', + dma: 'San Francisco-Oakland-San Jose, CA', + country: 'India', + city: 'kolkata', + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 45', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'screen', + event: 'Home', + sentAt: '2021-12-09T14:55:17.074Z', + userId: '9e187bff-2867-11ec-82ac-02cdd434d6bf', + channel: 'mobile', + context: { + source: 'test', + traits: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + address: { + city: 'kolkata', + country: 'India', + postalCode: 712136, + state: 'WB', + street: '', + }, + }, + locale: 'en-US', + network: { + carrier: 'T-Mobile', + }, + location: { + country: 'United States', + city: 'San Francisco', + region: 'California', + latitude: '37.7672319', + longitude: '-122.4021353', + dma: 'San Francisco-Oakland-San Jose, CA', + }, + library: { + name: 'rudder-sdk-ruby-sync', + version: '1.0.6', + }, + os: { + name: 'Android', + version: '11', + }, + app: { + version: '2.6.0 v3', + }, + device: { + type: 'Android', + model: 'SM-A025M', + manufacturer: 'samsung', + }, + }, + rudderId: '004670a6-4559-4f2b-aa2a-f35cf81a9423', + messageId: '1639061715808-a934f1c2-7b55-4e78-bd4d-df209c30c8a1', + timestamp: '2021-12-09T14:55:15.914Z', + properties: { + name: 'Home', + externalID: '1637763064335-7225034711957140329', + }, + receivedAt: '2021-12-09T14:55:17.180Z', + request_ip: '186.54.216.75', + anonymousId: '066a37dc92b16284', + integrations: { + All: true, + }, + originalTimestamp: '2021-12-09T14:55:15.808Z', + }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Android', + os_version: '11', + device_model: 'SM-A025M', + device_manufacturer: 'samsung', + device_id: '066a37dc92b16284', + carrier: 'T-Mobile', + app_version: '2.6.0 v3', + platform: 'Android', + language: 'en-US', + event_properties: { + name: 'Home', + externalID: '1637763064335-7225034711957140329', + }, + insert_id: '1639061715808-a934f1c2-7b55-4e78-bd4d-df209c30c8a1', + ip: '186.54.216.75', + user_properties: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + address: { + postalCode: 712136, + state: 'WB', + street: '', + }, + }, + event_type: 'Viewed Home Screen', + user_id: '9e187bff-2867-11ec-82ac-02cdd434d6bf', + device_brand: 'samsung', + time: 1639061715914, + session_id: -1, + region: 'California', + location_lat: '37.7672319', + location_lng: '-122.4021353', + dma: 'San Francisco-Oakland-San Jose, CA', + country: 'United States', + city: 'San Francisco', + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '066a37dc92b16284', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 46', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'screen', + event: 'Home', + sentAt: '2021-12-09T14:55:17.074Z', + userId: 'abcdef123456cf', + channel: 'mobile', + context: { + source: 'test', + traits: { + anonymousId: '50be5c79-6c3f-4b60-be84-97805a32aaa1', + address: { + city: 'kolkata', + country: 'India', + postalCode: 712136, + state: 'WB', + street: '', + }, + }, + locale: 'en-US', + network: { + carrier: 'T-Mobile', + }, + library: { + name: 'rudder-sdk-ruby-sync', + version: '1.0.6', + }, + os: { + name: 'Android', + version: '11', + }, + app: { + version: '2.6.0 v3', + }, + device: { + type: 'Android', + model: 'SM-A025M', + manufacturer: 'samsung', + }, + }, + rudderId: '004670a6-4559-4f2b-aa1a-f12cf81a9423', + messageId: '1639061715808-a934f1c2-7b55-5e78-bd4d-df209c31d8a2', + timestamp: '2021-12-09T14:55:15.914Z', + properties: { + name: 'Home', + externalID: '1637763064336-7225034711957140329', + }, + receivedAt: '2021-12-09T14:55:17.180Z', + request_ip: '186.54.216.75', + anonymousId: '066a37dc92b16284', + integrations: { + All: true, + }, + originalTimestamp: '2021-12-09T14:55:15.808Z', + }, + destination: { + Config: { + apiKey: 'abcde', + groupTypeTrait: 'email', + groupValueTrait: 'age', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Android', + os_version: '11', + device_model: 'SM-A025M', + device_manufacturer: 'samsung', + device_id: '066a37dc92b16284', + carrier: 'T-Mobile', + app_version: '2.6.0 v3', + platform: 'Android', + language: 'en-US', + event_properties: { + name: 'Home', + externalID: '1637763064336-7225034711957140329', + }, + insert_id: '1639061715808-a934f1c2-7b55-5e78-bd4d-df209c31d8a2', + ip: '186.54.216.75', + user_properties: { + anonymousId: '50be5c79-6c3f-4b60-be84-97805a32aaa1', + address: { + postalCode: 712136, + state: 'WB', + street: '', + }, + }, + event_type: 'Viewed Home Screen', + user_id: 'abcdef123456cf', + device_brand: 'samsung', + time: 1639061715914, + session_id: -1, + country: 'India', + city: 'kolkata', + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '066a37dc92b16284', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 47', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + event: 'Sample track event BEFORE IDENTIFY1**', + sentAt: '2020-09-17T15:07:13.171Z', + userId: '0572f78fa49c648e', + channel: 'mobile', + context: { + app: { + name: 'AMTestProject', + build: '1', + version: '1.0', + namespace: 'com.rudderstack.android.rudderstack.sampleAndroidApp', + }, + device: { + id: '0572f78fa49c648e', + type: 'watchos', + manufacturer: 'Apple', + adTrackingEnabled: true, + advertisingId: '1606e649-c97e-4d5f-a2ef-b81dbc66741a', + }, + locale: 'en-US', + screen: { + width: 1080, + height: 2088, + density: 440, + }, + traits: { + id: '0572f78fa49c648e', + userId: '0572f78fa49c648e', + address: {}, + company: {}, + anonymousId: '0572f78fa49c648e', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.4', + }, + network: { + wifi: true, + carrier: 'AT&T', + cellular: true, + bluetooth: false, + }, + timezone: 'Asia/Kolkata', + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)', + }, + messageId: '1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466', + anonymousId: '0572f78fa49c648e', + integrations: { + All: true, + }, + originalTimestamp: '2020-09-17T15:07:03.515Z', + }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + device_manufacturer: 'Apple', + platform: 'watchos', + device_id: '0572f78fa49c648e', + carrier: 'AT&T', + app_name: 'AMTestProject', + app_version: '1.0', + language: 'en-US', + insert_id: '1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466', + user_properties: { + id: '0572f78fa49c648e', + userId: '0572f78fa49c648e', + address: {}, + company: {}, + anonymousId: '0572f78fa49c648e', + }, + event_type: 'Sample track event BEFORE IDENTIFY1**', + user_id: '0572f78fa49c648e', + device_brand: 'Apple', + idfa: '1606e649-c97e-4d5f-a2ef-b81dbc66741a', + idfv: '0572f78fa49c648e', + time: 1600355223515, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '0572f78fa49c648e', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 48', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + event: 'Sample track event BEFORE IDENTIFY1**', + sentAt: '2020-09-17T15:07:13.171Z', + userId: '0572f78fa49c648e', + channel: 'mobile', + context: { + app: { + name: 'AMTestProject', + build: '1', + version: '1.0', + namespace: 'com.rudderstack.android.rudderstack.sampleAndroidApp', + }, + device: { + id: '0572f78fa49c648e', + type: 'ipados', + manufacturer: 'Apple', + adTrackingEnabled: true, + advertisingId: '1606e649-c97e-4d5f-a2ef-b81dbc66741a', + }, + locale: 'en-US', + screen: { + width: 1080, + height: 2088, + density: 440, + }, + traits: { + id: '0572f78fa49c648e', + userId: '0572f78fa49c648e', + address: {}, + company: {}, + anonymousId: '0572f78fa49c648e', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.4', + }, + network: { + wifi: true, + carrier: 'AT&T', + cellular: true, + bluetooth: false, + }, + timezone: 'Asia/Kolkata', + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)', + }, + messageId: '1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466', + anonymousId: '0572f78fa49c648e', + integrations: { + All: true, + }, + originalTimestamp: '2020-09-17T15:07:03.515Z', + }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + device_manufacturer: 'Apple', + platform: 'ipados', + device_id: '0572f78fa49c648e', + carrier: 'AT&T', + app_name: 'AMTestProject', + app_version: '1.0', + language: 'en-US', + insert_id: '1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466', + user_properties: { + id: '0572f78fa49c648e', + userId: '0572f78fa49c648e', + address: {}, + company: {}, + anonymousId: '0572f78fa49c648e', + }, + event_type: 'Sample track event BEFORE IDENTIFY1**', + user_id: '0572f78fa49c648e', + device_brand: 'Apple', + idfa: '1606e649-c97e-4d5f-a2ef-b81dbc66741a', + idfv: '0572f78fa49c648e', + time: 1600355223515, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '0572f78fa49c648e', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 49', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + event: 'Sample track event BEFORE IDENTIFY1**', + sentAt: '2020-09-17T15:07:13.171Z', + userId: '0572f78fa49c648e', + channel: 'mobile', + context: { + app: { + name: 'AMTestProject', + build: '1', + version: '1.0', + namespace: 'com.rudderstack.android.rudderstack.sampleAndroidApp', + }, + device: { + id: '0572f78fa49c648e', + type: 'tvos', + manufacturer: 'Apple', + adTrackingEnabled: true, + advertisingId: '1606e649-c97e-4d5f-a2ef-b81dbc66741a', + }, + locale: 'en-US', + screen: { + width: 1080, + height: 2088, + density: 440, + }, + traits: { + id: '0572f78fa49c648e', + userId: '0572f78fa49c648e', + address: {}, + company: {}, + anonymousId: '0572f78fa49c648e', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.4', + }, + network: { + wifi: true, + carrier: 'AT&T', + cellular: true, + bluetooth: false, + }, + timezone: 'Asia/Kolkata', + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)', + }, + messageId: '1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466', + anonymousId: '0572f78fa49c648e', + integrations: { + All: true, + }, + originalTimestamp: '2020-09-17T15:07:03.515Z', + }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + device_manufacturer: 'Apple', + platform: 'tvos', + device_id: '0572f78fa49c648e', + carrier: 'AT&T', + app_name: 'AMTestProject', + app_version: '1.0', + language: 'en-US', + insert_id: '1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466', + user_properties: { + id: '0572f78fa49c648e', + userId: '0572f78fa49c648e', + address: {}, + company: {}, + anonymousId: '0572f78fa49c648e', + }, + event_type: 'Sample track event BEFORE IDENTIFY1**', + user_id: '0572f78fa49c648e', + device_brand: 'Apple', + idfa: '1606e649-c97e-4d5f-a2ef-b81dbc66741a', + idfv: '0572f78fa49c648e', + time: 1600355223515, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '0572f78fa49c648e', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 50', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + device: { + brand: 'testBrand', + manufacturer: 'testManufacturer', + }, + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + anonymousId: '123456', + email: 'test@rudderstack.com', + address: { + city: 'kolkata', + country: 'India', + postalCode: 712136, + state: 'WB', + street: '', + }, + ip: '0.0.0.0', + age: 26, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + }, + type: 'identify', + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: '123456', + userId: '123456', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + mapDeviceBrand: true, + apiKey: 'abcde', + groupTypeTrait: 'email', + groupValueTrait: 'age', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Chrome', + os_version: '77.0.3865.90', + device_model: 'Mac', + device_manufacturer: 'testManufacturer', + platform: 'Web', + device_brand: 'testBrand', + device_id: '123456', + app_name: 'RudderLabs JavaScript SDK', + app_version: '1.0.0', + language: 'en-US', + insert_id: '84e26acc-56a5-4835-8233-591137fca468', + user_properties: { + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + anonymousId: '123456', + email: 'test@rudderstack.com', + postalCode: 712136, + state: 'WB', + street: '', + ip: '0.0.0.0', + age: 26, + }, + event_type: '$identify', + time: 1571043797562, + user_id: '123456', + session_id: -1, + country: 'India', + city: 'kolkata', + ip: '0.0.0.0', + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '123456', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 51', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + event: 'Sample track event BEFORE IDENTIFY1**', + sentAt: '2020-09-17T15:07:13.171Z', + userId: '0572f78fa49c648e', + channel: 'mobile', + context: { + device: { + brand: 'testBrand', + manufacturer: 'testManufacturer', + }, + os: { + name: 'Android', + version: '9', + }, + app: { + name: 'AMTestProject', + build: '1', + version: '1.0', + namespace: 'com.rudderstack.android.rudderstack.sampleAndroidApp', + }, + locale: 'en-US', + screen: { + width: 1080, + height: 2088, + density: 440, + }, + traits: { + id: '0572f78fa49c648e', + userId: '0572f78fa49c648e', + address: {}, + company: {}, + anonymousId: '0572f78fa49c648e', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.4', + }, + network: { + wifi: true, + carrier: 'Android', + cellular: true, + bluetooth: false, + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + timezone: 'Asia/Kolkata', + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)', + }, + messageId: '1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466', + anonymousId: '0572f78fa49c648e', + integrations: { + All: true, + }, + originalTimestamp: '2020-09-17T15:07:03.515Z', + }, + destination: { + Config: { + mapDeviceBrand: true, + apiKey: 'abcde', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Android', + os_version: '9', + device_manufacturer: 'testManufacturer', + device_brand: 'testBrand', + device_id: '0572f78fa49c648e', + carrier: 'Android', + app_name: 'AMTestProject', + app_version: '1.0', + language: 'en-US', + insert_id: '1600355223510-93e866a7-dc74-4256-a5f4-a41f54532466', + user_properties: { + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + id: '0572f78fa49c648e', + userId: '0572f78fa49c648e', + address: {}, + company: {}, + anonymousId: '0572f78fa49c648e', + }, + event_type: 'Sample track event BEFORE IDENTIFY1**', + user_id: '0572f78fa49c648e', + time: 1600355223515, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '0572f78fa49c648e', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 52', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'screen', + userId: 'identified user id', + anonymousId: 'anon-id-new', + event: 'Screen View', + channel: 'web', + properties: { + prop1: '5', + }, + context: { + ip: '14.5.67.21', + device: { + brand: 'testBrand', + manufacturer: 'testManufacturer', + }, + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + Config: { + apiKey: 'abcde', + mapDeviceBrand: true, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + device_manufacturer: 'testManufacturer', + device_brand: 'testBrand', + device_id: 'anon-id-new', + event_properties: { + prop1: '5', + name: 'Screen View', + }, + user_properties: {}, + event_type: 'Viewed Screen View Screen', + user_id: 'identified user id', + time: 1580602989544, + session_id: -1, + ip: '14.5.67.21', + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'anon-id-new', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 53', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + externalId: [ + { + id: 'lynnanderson@smith.net', + identifierType: 'device_id', + type: 'AM-users', + }, + ], + mappedToDestination: 'true', + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + anonymousId: '123456', + email: 'test@rudderstack.com', + address: { + country: 'India', + postalCode: 712136, + state: 'WB', + street: '', + os_version: 'test os', + }, + ip: '0.0.0.0', + age: 26, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + }, + traits: { + anonymousId: '123456', + email: 'test@rudderstack.com', + city: 'kolkata', + address: { + country: 'India', + postalCode: 712136, + state: 'WB', + street: '', + }, + os_version: 'test os', + ip: '0.0.0.0', + age: 26, + }, + type: 'identify', + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: '123456', + userId: '123456', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + metadata: { + jobId: 2, + }, + destination: { + Config: { + apiKey: 'abcde', + groupTypeTrait: 'email', + groupValueTrait: 'age', + residencyServer: 'EU', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.eu.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Chrome', + os_version: 'test os', + device_model: 'Mac', + platform: 'Web', + device_id: 'lynnanderson@smith.net', + app_name: 'RudderLabs JavaScript SDK', + app_version: '1.0.0', + language: 'en-US', + insert_id: '84e26acc-56a5-4835-8233-591137fca468', + ip: '0.0.0.0', + user_properties: { + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + anonymousId: '123456', + email: 'test@rudderstack.com', + postalCode: 712136, + state: 'WB', + street: '', + ip: '0.0.0.0', + age: 26, + device_id: 'lynnanderson@smith.net', + }, + event_type: '$identify', + time: 1571043797562, + user_id: '123456', + session_id: -1, + country: 'India', + city: 'kolkata', + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '123456', + }, + metadata: { + jobId: 2, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 54', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.5', + }, + traits: { + name: 'Shehan Study', + category: 'SampleIdentify', + email: 'test@rudderstack.com', + plan: 'Open source', + logins: 5, + createdAt: 1599264000, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.5', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36', + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 0.8999999761581421, + }, + campaign: { + source: 'google', + medium: 'medium', + term: 'keyword', + content: 'some content', + name: 'some campaign', + test: 'other value', + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + }, + type: 'group', + messageId: 'e5034df0-a404-47b4-a463-76df99934fea', + originalTimestamp: '2020-10-20T07:54:58.983Z', + anonymousId: 'my-anonymous-id-new', + userId: 'sampleusrRudder3', + integrations: { + All: true, + }, + groupId: 'Sample_groupId23', + traits: { + KEY_3: { + CHILD_KEY_92: 'value_95', + CHILD_KEY_102: 'value_103', + }, + KEY_2: { + CHILD_KEY_92: 'value_95', + CHILD_KEY_102: 'value_103', + }, + name_trait: 'Company', + value_trait: 'ABC', + }, + sentAt: '2020-10-20T07:54:58.983Z', + }, + destination: { + Config: { + apiKey: 'abcde', + groupTypeTrait: 'name_trait', + groupValueTrait: 'value_trait', + residencyServer: 'EU', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.eu.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Chrome', + os_version: '85.0.4183.121', + device_model: 'Mac', + platform: 'Web', + device_id: 'my-anonymous-id-new', + app_name: 'RudderLabs JavaScript SDK', + app_version: '1.1.5', + language: 'en-US', + user_properties: { + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + utm_source: 'google', + utm_medium: 'medium', + utm_term: 'keyword', + utm_content: 'some content', + utm_name: 'some campaign', + utm_test: 'other value', + Company: 'ABC', + }, + event_type: '$identify', + groups: { + Company: 'ABC', + }, + time: 1603180498983, + user_id: 'sampleusrRudder3', + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'my-anonymous-id-new', + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.eu.amplitude.com/groupidentify', + headers: {}, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: { + api_key: 'abcde', + identification: [ + '{"group_type":"Company","group_value":"ABC","group_properties":{"KEY_3":{"CHILD_KEY_92":"value_95","CHILD_KEY_102":"value_103"},"KEY_2":{"CHILD_KEY_92":"value_95","CHILD_KEY_102":"value_103"},"name_trait":"Company","value_trait":"ABC"}}', + ], + }, + }, + files: {}, + userId: 'my-anonymous-id-new', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 55', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.5', + }, + traits: { + name: 'Shehan Study', + category: 'SampleIdentify', + email: 'test@rudderstack.com', + plan: 'Open source', + logins: 5, + createdAt: 1599264000, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.5', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36', + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 0.8999999761581421, + }, + campaign: { + source: 'google', + medium: 'medium', + term: 'keyword', + content: 'some content', + name: 'some campaign', + test: 'other value', + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + }, + type: 'alias', + messageId: 'dd46338d-5f83-493b-bd28-3b48f55d0be8', + originalTimestamp: '2020-10-20T08:14:28.778Z', + anonymousId: 'my-anonymous-id-new', + userId: 'newUserIdAlias', + integrations: { + All: true, + }, + previousId: 'sampleusrRudder3', + sentAt: '2020-10-20T08:14:28.778Z', + }, + destination: { + Config: { + apiKey: 'abcde', + residencyServer: 'EU', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.eu.amplitude.com/usermap', + headers: {}, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: { + api_key: 'abcde', + mapping: [ + '{"global_user_id":"newUserIdAlias","user_id":"sampleusrRudder3","user_properties":{"initial_referrer":"https://docs.rudderstack.com","initial_referring_domain":"docs.rudderstack.com","utm_source":"google","utm_medium":"medium","utm_term":"keyword","utm_content":"some content","utm_name":"some campaign","utm_test":"other value"}}', + ], + }, + }, + files: {}, + userId: 'my-anonymous-id-new', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 56', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + event: 'App_Opened', + sentAt: '2021-11-17T19:13:52.106Z', + userId: 'ab419c3a-47ce-11ec-82ac-16a1bb813a59', + channel: 'mobile', + context: { + source: 'test', + traits: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + address: { + city: 'kolkata', + country: 'India', + postalCode: 712136, + state: 'WB', + street: '', + }, + }, + locale: 'en-US', + network: { + carrier: 'T-Mobile', + }, + location: { + country: 'United States', + city: 'San Francisco', + latitude: '37.7672319', + longitude: '-122.4021353', + dma: 'San Francisco-Oakland-San Jose, CA', + }, + library: { + name: 'rudder-sdk-ruby-sync', + version: '1.0.6', + }, + os: { + name: 'Android', + version: '11', + }, + app: { + version: '2.6.0 v3', + }, + device: { + type: 'Android', + model: 'SM-A025M', + manufacturer: 'samsung', + }, + }, + messageId: '7208abb6-2c4e-45bb-bf5b-aa426f3593a2', + timestamp: '2020-08-14T05:30:30.118Z', + properties: { + externalID: '1637170658229-3961832492194264209', + }, + integrations: { + All: true, + Amplitude: { + event_id: 3, + }, + }, + originalTimestamp: '2021-11-17T19:13:51.143Z', + }, + destination: { + Config: { + apiKey: 'abcde', + trackProductsOnce: true, + trackRevenuePerProduct: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Android', + os_version: '11', + device_model: 'SM-A025M', + device_manufacturer: 'samsung', + platform: 'Android', + event_id: 3, + carrier: 'T-Mobile', + app_version: '2.6.0 v3', + language: 'en-US', + insert_id: '7208abb6-2c4e-45bb-bf5b-aa426f3593a2', + user_properties: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + address: { + postalCode: 712136, + state: 'WB', + street: '', + }, + }, + event_properties: { + externalID: '1637170658229-3961832492194264209', + }, + event_type: 'App_Opened', + user_id: 'ab419c3a-47ce-11ec-82ac-16a1bb813a59', + device_brand: 'samsung', + time: 1597383030118, + session_id: -1, + location_lat: '37.7672319', + location_lng: '-122.4021353', + dma: 'San Francisco-Oakland-San Jose, CA', + country: 'United States', + city: 'San Francisco', + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 57', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + event: 'App_Opened', + sentAt: '2021-11-17T19:13:52.106Z', + userId: 'ab419c3a-47ce-11ec-82ac-16a1bb813a59', + channel: 'mobile', + context: { + source: 'test', + traits: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + address: { + city: 'kolkata', + country: 'India', + postalCode: 712136, + state: 'WB', + street: '', + }, + }, + locale: 'en-US', + network: { + carrier: 'T-Mobile', + }, + location: { + country: 'United States', + city: 'San Francisco', + latitude: '37.7672319', + longitude: '-122.4021353', + dma: 'San Francisco-Oakland-San Jose, CA', + }, + library: { + name: 'rudder-sdk-ruby-sync', + version: '1.0.6', + }, + os: { + name: 'Android', + version: '11', + }, + app: { + version: '2.6.0 v3', + }, + device: { + type: 'Android', + model: 'SM-A025M', + manufacturer: 'samsung', + }, + }, + messageId: '7208abb6-2c4e-45bb-bf5b-aa426f3593a2', + timestamp: '2020-08-14T05:30:30.118Z', + properties: { + externalID: '1637170658229-3961832492194264209', + }, + integrations: { + All: true, + Amplitude: { + event_id: 0, + }, + }, + originalTimestamp: '2021-11-17T19:13:51.143Z', + }, + destination: { + Config: { + apiKey: 'abcde', + trackProductsOnce: true, + trackRevenuePerProduct: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Android', + os_version: '11', + device_model: 'SM-A025M', + device_manufacturer: 'samsung', + platform: 'Android', + event_id: 0, + carrier: 'T-Mobile', + app_version: '2.6.0 v3', + language: 'en-US', + insert_id: '7208abb6-2c4e-45bb-bf5b-aa426f3593a2', + user_properties: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + address: { + postalCode: 712136, + state: 'WB', + street: '', + }, + }, + event_properties: { + externalID: '1637170658229-3961832492194264209', + }, + event_type: 'App_Opened', + user_id: 'ab419c3a-47ce-11ec-82ac-16a1bb813a59', + device_brand: 'samsung', + time: 1597383030118, + session_id: -1, + location_lat: '37.7672319', + location_lng: '-122.4021353', + dma: 'San Francisco-Oakland-San Jose, CA', + country: 'United States', + city: 'San Francisco', + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 58', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + event: 'App_Opened', + sentAt: '2021-11-17T19:13:52.106Z', + userId: 'ab419c3a-47ce-11ec-82ac-16a1bb813a59', + channel: 'mobile', + context: { + source: 'test', + traits: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + address: { + city: 'kolkata', + country: 'India', + postalCode: 712136, + state: 'WB', + street: '', + }, + }, + locale: 'en-US', + network: { + carrier: 'T-Mobile', + }, + location: { + country: 'United States', + city: 'San Francisco', + latitude: '37.7672319', + longitude: '-122.4021353', + dma: 'San Francisco-Oakland-San Jose, CA', + }, + library: { + name: 'rudder-sdk-ruby-sync', + version: '1.0.6', + }, + os: { + name: 'Android', + version: '11', + }, + app: { + version: '2.6.0 v3', + }, + device: { + type: 'Android', + model: 'SM-A025M', + manufacturer: 'samsung', + }, + }, + messageId: '7208abb6-2c4e-45bb-bf5b-aa426f3593a2', + timestamp: '2020-08-14T05:30:30.118Z', + properties: { + externalID: '1637170658229-3961832492194264209', + }, + integrations: { + All: true, + Amplitude: { + event_id: '0', + }, + }, + originalTimestamp: '2021-11-17T19:13:51.143Z', + }, + destination: { + Config: { + apiKey: 'abcde', + trackProductsOnce: true, + trackRevenuePerProduct: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Android', + os_version: '11', + device_model: 'SM-A025M', + device_manufacturer: 'samsung', + platform: 'Android', + carrier: 'T-Mobile', + app_version: '2.6.0 v3', + language: 'en-US', + insert_id: '7208abb6-2c4e-45bb-bf5b-aa426f3593a2', + user_properties: { + anonymousId: '50be5c78-6c3f-4b60-be84-97805a31aaa1', + address: { + postalCode: 712136, + state: 'WB', + street: '', + }, + }, + event_properties: { + externalID: '1637170658229-3961832492194264209', + }, + event_type: 'App_Opened', + user_id: 'ab419c3a-47ce-11ec-82ac-16a1bb813a59', + device_brand: 'samsung', + time: 1597383030118, + session_id: -1, + location_lat: '37.7672319', + location_lng: '-122.4021353', + dma: 'San Francisco-Oakland-San Jose, CA', + country: 'United States', + city: 'San Francisco', + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 59', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + externalId: [ + { + id: 'lynnanderson@smith.net', + identifierType: 'device_id', + type: 'AM-users', + }, + ], + mappedToDestination: 'true', + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + anonymousId: '123456', + email: 'test@rudderstack.com', + address: { + country: 'India', + postalCode: 712136, + state: 'WB', + street: '', + os_version: 'test os', + }, + ip: '0.0.0.0', + age: 26, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + }, + traits: { + anonymousId: '123456', + email: 'test@rudderstack.com', + city: 'kolkata', + address: { + country: 'India', + postalCode: 712136, + state: 'WB', + street: '', + }, + os_version: 'test os', + ip: '0.0.0.0', + age: 26, + }, + type: 'identify', + messageId: '84e26acc-56a5-4835-8233-591137fca468', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: '123456', + userId: '123456', + integrations: { + All: true, + Amplitude: { + event_id: 6, + }, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + metadata: { + jobId: 2, + }, + destination: { + Config: { + apiKey: 'abcde', + groupTypeTrait: 'email', + groupValueTrait: 'age', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Chrome', + os_version: 'test os', + device_model: 'Mac', + platform: 'Web', + event_id: 6, + device_id: 'lynnanderson@smith.net', + app_name: 'RudderLabs JavaScript SDK', + app_version: '1.0.0', + language: 'en-US', + insert_id: '84e26acc-56a5-4835-8233-591137fca468', + ip: '0.0.0.0', + user_properties: { + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + anonymousId: '123456', + email: 'test@rudderstack.com', + postalCode: 712136, + state: 'WB', + street: '', + ip: '0.0.0.0', + age: 26, + device_id: 'lynnanderson@smith.net', + }, + event_type: '$identify', + time: 1571043797562, + user_id: '123456', + session_id: -1, + country: 'India', + city: 'kolkata', + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '123456', + }, + metadata: { + jobId: 2, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 60', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + externalId: [ + { + id: 'lynnanderson@smith.net', + identifierType: 'device_id', + type: 'AM-users', + }, + ], + mappedToDestination: 'true', + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + anonymousId: '123456', + email: 'test@rudderstack.com', + address: { + country: 'India', + postalCode: 712136, + state: 'WB', + street: '', + os_version: 'test os', + }, + ip: '0.0.0.0', + age: 26, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + }, + traits: { + anonymousId: '123456', + email: 'test@rudderstack.com', + city: 'kolkata', + address: { + country: 'India', + postalCode: 712136, + state: 'WB', + street: '', + }, + os_version: 'test os', + ip: '0.0.0.0', + age: 26, + }, + type: 'identify', + messageId: '84e26acc-56a5-4835-8233-591137fca468', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: '123456', + userId: '123456', + integrations: { + All: true, + Amplitude: { + event_id: 6, + }, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + metadata: { + jobId: 2, + }, + destination: { + Config: { + apiKey: 'abcde', + groupTypeTrait: 'email', + groupValueTrait: 'age', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Chrome', + os_version: 'test os', + device_model: 'Mac', + platform: 'Web', + event_id: 6, + device_id: 'lynnanderson@smith.net', + app_name: 'RudderLabs JavaScript SDK', + app_version: '1.0.0', + language: 'en-US', + insert_id: '84e26acc-56a5-4835-8233-591137fca468', + ip: '0.0.0.0', + user_properties: { + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + anonymousId: '123456', + email: 'test@rudderstack.com', + postalCode: 712136, + state: 'WB', + street: '', + ip: '0.0.0.0', + age: 26, + device_id: 'lynnanderson@smith.net', + }, + event_type: '$identify', + time: 1571043797562, + user_id: '123456', + session_id: -1, + country: 'India', + city: 'kolkata', + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '123456', + }, + metadata: { + jobId: 2, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 61', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.5', + }, + traits: { + name: 'Shehan Study', + category: 'SampleIdentify', + email: 'test@rudderstack.com', + plan: 'Open source', + logins: 5, + createdAt: 1599264000, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.5', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36', + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 0.8999999761581421, + }, + campaign: { + source: 'google', + medium: 'medium', + term: 'keyword', + content: 'some content', + name: 'some campaign', + test: 'other value', + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + }, + type: 'group', + messageId: 'e5034df0-a404-47b4-a463-76df99934fea', + originalTimestamp: '2020-10-20T07:54:58.983Z', + anonymousId: 'my-anonymous-id-new', + userId: 'sampleusrRudder3', + integrations: { + All: true, + Amplitude: { + event_id: 3, + }, + }, + groupId: 'Sample_groupId23', + traits: { + KEY_3: { + CHILD_KEY_92: 'value_95', + CHILD_KEY_102: 'value_103', + }, + KEY_2: { + CHILD_KEY_92: 'value_95', + CHILD_KEY_102: 'value_103', + }, + name_trait: 'Company', + value_trait: 'ABC', + }, + sentAt: '2020-10-20T07:54:58.983Z', + }, + destination: { + Config: { + apiKey: 'abcde', + groupTypeTrait: 'name_trait', + groupValueTrait: 'value_trait', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Chrome', + os_version: '85.0.4183.121', + device_model: 'Mac', + platform: 'Web', + event_id: 3, + device_id: 'my-anonymous-id-new', + app_name: 'RudderLabs JavaScript SDK', + app_version: '1.1.5', + language: 'en-US', + user_properties: { + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + utm_source: 'google', + utm_medium: 'medium', + utm_term: 'keyword', + utm_content: 'some content', + utm_name: 'some campaign', + utm_test: 'other value', + Company: 'ABC', + }, + event_type: '$identify', + groups: { + Company: 'ABC', + }, + time: 1603180498983, + user_id: 'sampleusrRudder3', + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'my-anonymous-id-new', + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/groupidentify', + headers: {}, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: { + api_key: 'abcde', + identification: [ + '{"group_type":"Company","group_value":"ABC","group_properties":{"KEY_3":{"CHILD_KEY_92":"value_95","CHILD_KEY_102":"value_103"},"KEY_2":{"CHILD_KEY_92":"value_95","CHILD_KEY_102":"value_103"},"name_trait":"Company","value_trait":"ABC"}}', + ], + }, + }, + files: {}, + userId: 'my-anonymous-id-new', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 62', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'screen', + userId: 'identified user id', + anonymousId: 'anon-id-new', + event: 'Screen View', + properties: { + prop1: '5', + event_id: 7, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + integrations: { + All: true, + Amplitude: { + event_id: 7, + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + event_id: 7, + device_id: 'anon-id-new', + event_properties: { + prop1: '5', + event_id: 7, + name: 'Screen View', + }, + user_properties: {}, + event_type: 'Viewed Screen View Screen', + user_id: 'identified user id', + time: 1580602989544, + session_id: -1, + ip: '14.5.67.21', + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'anon-id-new', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 63', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'test@rudderstack.com', + anonymousId: '12345', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + }, + request_ip: '1.1.1.1', + type: 'page', + messageId: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T11:15:18.299Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + properties: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + integrations: { + All: true, + Amplitude: { + event_id: 2, + }, + }, + name: 'ApplicationLoaded', + sentAt: '2019-10-14T11:15:53.296Z', + }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Chrome', + os_version: '77.0.3865.90', + device_model: 'Mac', + platform: 'Web', + device_id: '00000000000000000000000000', + app_name: 'RudderLabs JavaScript SDK', + app_version: '1.0.0', + language: 'en-US', + event_type: 'Viewed ApplicationLoaded Page', + event_properties: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + name: 'ApplicationLoaded', + }, + insert_id: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', + ip: '1.1.1.1', + event_id: 2, + user_properties: { + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + email: 'test@rudderstack.com', + anonymousId: '12345', + }, + user_id: '12345', + time: 1571051718299, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '00000000000000000000000000', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 64', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.5', + }, + traits: { + name: 'Shehan Study', + category: 'SampleIdentify', + email: 'test@rudderstack.com', + plan: 'Open source', + logins: 5, + createdAt: 1599264000, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.5', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36', + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 0.8999999761581421, + }, + campaign: { + source: 'google', + medium: 'medium', + term: 'keyword', + content: 'some content', + name: 'some campaign', + test: 'other value', + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + }, + type: 'alias', + messageId: 'dd46338d-5f83-493b-bd28-3b48f55d0be8', + originalTimestamp: '2020-10-20T08:14:28.778Z', + anonymousId: 'my-anonymous-id-new', + userId: 'newUserIdAlias', + integrations: { + All: true, + Amplitude: { + event_id: 67, + }, + }, + previousId: 'sampleusrRudder3', + sentAt: '2020-10-20T08:14:28.778Z', + }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/usermap', + headers: {}, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: { + api_key: 'abcde', + mapping: [ + '{"global_user_id":"newUserIdAlias","user_id":"sampleusrRudder3","event_id":67,"user_properties":{"initial_referrer":"https://docs.rudderstack.com","initial_referring_domain":"docs.rudderstack.com","utm_source":"google","utm_medium":"medium","utm_term":"keyword","utm_content":"some content","utm_name":"some campaign","utm_test":"other value"}}', + ], + }, + }, + files: {}, + userId: 'my-anonymous-id-new', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 65', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '5d205961641ee6c5', + channel: 'mobile', + context: { + app: { + build: '6', + name: 'Sample Kotlin', + namespace: 'com.example.testapp1mg', + version: '1.2', + }, + device: { + id: '5d205961641ee6c5', + manufacturer: 'Google', + model: 'Android SDK built for x86', + name: 'generic_x86', + type: 'Android', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.7.0', + }, + locale: 'en-US', + network: { + carrier: 'Android', + bluetooth: false, + cellular: true, + wifi: true, + }, + os: { + name: 'Android', + version: '7.1.1', + }, + screen: { + density: 440, + height: 2148, + width: 1080, + }, + sessionId: '1662393792', + timezone: 'Asia/Kolkata', + traits: { + anonymousId: '5d205961641ee6c5', + id: 'User Android', + userId: 'User Android', + }, + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 7.1.1; Android SDK built for x86 Build/NYC)', + }, + event: 'Screen event', + integrations: { + All: true, + }, + messageId: '1662393883248-509420bf-b812-4f8d-bdb2-8c811bfde87f', + properties: { + name: 'Screen event', + }, + originalTimestamp: '2022-09-05T16:04:43.250Z', + type: 'screen', + userId: 'User Android', + }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Android', + os_version: '7.1.1', + device_model: 'Android SDK built for x86', + device_manufacturer: 'Google', + device_id: '5d205961641ee6c5', + carrier: 'Android', + app_name: 'Sample Kotlin', + app_version: '1.2', + platform: 'Android', + language: 'en-US', + event_properties: { + name: 'Screen event', + }, + insert_id: '1662393883248-509420bf-b812-4f8d-bdb2-8c811bfde87f', + user_properties: { + anonymousId: '5d205961641ee6c5', + id: 'User Android', + userId: 'User Android', + }, + event_type: 'Viewed Screen event Screen', + user_id: 'User Android', + device_brand: 'Google', + time: 1662393883250, + session_id: 1662393792, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '5d205961641ee6c5', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 66', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '5d205961641ee6c5', + channel: 'mobile', + context: { + app: { + build: '6', + name: 'Sample Kotlin', + namespace: 'com.example.testapp1mg', + version: '1.2', + }, + device: { + id: '5d205961641ee6c5', + manufacturer: 'Google', + model: 'Android SDK built for x86', + name: 'generic_x86', + type: 'Android', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.7.0', + }, + locale: 'en-US', + network: { + carrier: 'Android', + bluetooth: false, + cellular: true, + wifi: true, + }, + os: { + name: 'Android', + version: '7.1.1', + }, + screen: { + density: 440, + height: 2148, + width: 1080, + }, + sessionId: '1662393792', + timezone: 'Asia/Kolkata', + traits: { + anonymousId: '5d205961641ee6c5', + id: 'User Android', + userId: 'User Android', + }, + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 7.1.1; Android SDK built for x86 Build/NYC)', + }, + integrations: { + All: true, + }, + messageId: '1662393883248-509420bf-b812-4f8d-bdb2-8c811bfde87f', + properties: {}, + originalTimestamp: '2022-09-05T16:04:43.250Z', + type: 'screen', + userId: 'User Android', + }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Android', + os_version: '7.1.1', + device_model: 'Android SDK built for x86', + device_manufacturer: 'Google', + device_id: '5d205961641ee6c5', + carrier: 'Android', + app_name: 'Sample Kotlin', + app_version: '1.2', + platform: 'Android', + language: 'en-US', + event_properties: {}, + insert_id: '1662393883248-509420bf-b812-4f8d-bdb2-8c811bfde87f', + user_properties: { + anonymousId: '5d205961641ee6c5', + id: 'User Android', + userId: 'User Android', + }, + event_type: 'Viewed Screen', + user_id: 'User Android', + device_brand: 'Google', + time: 1662393883250, + session_id: 1662393792, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '5d205961641ee6c5', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 67', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + externalId: [ + { + id: 'lynnanderson@smith.net', + identifierType: 'device_id', + type: 'AM-users', + }, + ], + mappedToDestination: 'true', + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + anonymousId: '123456', + email: 'test@rudderstack.com', + address: { + country: 'India', + postalCode: 712136, + state: 'WB', + street: '', + os_version: 'test os', + }, + ip: '0.0.0.0', + age: 26, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + sessionId: '1662393792', + }, + traits: { + anonymousId: '123456', + email: 'test@rudderstack.com', + city: 'kolkata', + address: { + country: 'India', + postalCode: 712136, + state: 'WB', + street: '', + }, + os_version: 'test os', + ip: '0.0.0.0', + age: 26, + }, + type: 'identify', + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: '123456', + userId: '123456', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Chrome', + os_version: 'test os', + device_model: 'Mac', + platform: 'Web', + device_id: 'lynnanderson@smith.net', + app_name: 'RudderLabs JavaScript SDK', + app_version: '1.0.0', + language: 'en-US', + insert_id: '84e26acc-56a5-4835-8233-591137fca468', + ip: '0.0.0.0', + user_properties: { + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + anonymousId: '123456', + email: 'test@rudderstack.com', + postalCode: 712136, + state: 'WB', + street: '', + ip: '0.0.0.0', + age: 26, + device_id: 'lynnanderson@smith.net', + }, + event_type: '$identify', + time: 1571043797562, + user_id: '123456', + session_id: 1662393792, + country: 'India', + city: 'kolkata', + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '123456', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 68', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '5d205961641ee6c5', + channel: 'mobile', + context: { + app: { + build: '6', + name: 'Sample Kotlin', + namespace: 'com.example.testapp1mg', + version: '1.2', + }, + device: { + id: '5d205961641ee6c5', + manufacturer: 'Google', + model: 'Android SDK built for x86', + name: 'generic_x86', + type: 'Android', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.7.0', + }, + locale: 'en-US', + network: { + carrier: 'Android', + bluetooth: false, + cellular: true, + wifi: true, + }, + os: { + name: 'Android', + version: '7.1.1', + }, + screen: { + density: 440, + height: 2148, + width: 1080, + }, + sessionId: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + timezone: 'Asia/Kolkata', + traits: { + anonymousId: '5d205961641ee6c5', + id: 'User Android', + userId: 'User Android', + }, + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 7.1.1; Android SDK built for x86 Build/NYC)', + }, + event: 'Screen event', + integrations: { + All: true, + }, + messageId: '1662393883248-509420bf-b812-4f8d-bdb2-8c811bfde87f', + properties: { + name: 'Screen event', + }, + originalTimestamp: '2022-09-05T16:04:43.250Z', + type: 'screen', + userId: 'User Android', + }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Android', + os_version: '7.1.1', + device_model: 'Android SDK built for x86', + device_manufacturer: 'Google', + device_id: '5d205961641ee6c5', + carrier: 'Android', + app_name: 'Sample Kotlin', + app_version: '1.2', + platform: 'Android', + language: 'en-US', + event_properties: { + name: 'Screen event', + }, + insert_id: '1662393883248-509420bf-b812-4f8d-bdb2-8c811bfde87f', + user_properties: { + anonymousId: '5d205961641ee6c5', + id: 'User Android', + userId: 'User Android', + }, + event_type: 'Viewed Screen event Screen', + user_id: 'User Android', + device_brand: 'Google', + time: 1662393883250, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '5d205961641ee6c5', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 69: ERROR - Either of user ID or device ID fields must be specified', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.5', + }, + traits: { + name: 'Shehan Study', + category: 'SampleIdentify', + email: 'test@rudderstack.com', + plan: 'Open source', + logins: 5, + createdAt: 1599264000, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.5', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36', + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 0.8999999761581421, + }, + campaign: { + source: 'google', + medium: 'medium', + term: 'keyword', + content: 'some content', + name: 'some campaign', + test: 'other value', + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + }, + type: 'group', + messageId: 'e5034df0-a404-47b4-a463-76df99934fea', + originalTimestamp: '2020-10-20T07:54:58.983Z', + integrations: { + All: true, + }, + groupId: 'Sample_groupId23', + traits: { + KEY_3: { + CHILD_KEY_92: 'value_95', + CHILD_KEY_102: 'value_103', + }, + KEY_2: { + CHILD_KEY_92: 'value_95', + CHILD_KEY_102: 'value_103', + }, + name_trait: 'Company', + value_trait: 'ABC', + }, + sentAt: '2020-10-20T07:54:58.983Z', + }, + destination: { + Config: { + apiKey: 'abcde', + groupTypeTrait: 'name_trait', + groupValueTrait: 'value_trait', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: 'Either of user ID or device ID fields must be specified', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'AM', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 70', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'test@rudderstack.com', + anonymousId: '12345', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + }, + request_ip: '1.1.1.1', + type: 'page', + messageId: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T11:15:18.299Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + properties: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + integrations: { + All: true, + Amplitude: { + event_id: 2, + }, + }, + name: 'ApplicationLoaded', + sentAt: '2019-10-14T11:15:53.296Z', + }, + destination: { + Config: { + apiKey: 'abcde', + useUserDefinedPageEventName: true, + userProvidedPageEventString: 'My custom Page Name is {{ name }} . Custom Name.', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Chrome', + os_version: '77.0.3865.90', + device_model: 'Mac', + platform: 'Web', + device_id: '00000000000000000000000000', + app_name: 'RudderLabs JavaScript SDK', + app_version: '1.0.0', + language: 'en-US', + event_type: 'My custom Page Name is ApplicationLoaded . Custom Name.', + event_properties: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + name: 'ApplicationLoaded', + }, + insert_id: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', + ip: '1.1.1.1', + event_id: 2, + user_properties: { + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + email: 'test@rudderstack.com', + anonymousId: '12345', + }, + user_id: '12345', + time: 1571051718299, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '00000000000000000000000000', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 71', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'test@rudderstack.com', + anonymousId: '12345', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + }, + request_ip: '1.1.1.1', + type: 'page', + messageId: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T11:15:18.299Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + properties: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + integrations: { + All: true, + Amplitude: { + event_id: 2, + }, + }, + name: 'ApplicationLoaded', + sentAt: '2019-10-14T11:15:53.296Z', + }, + destination: { + Config: { + apiKey: 'abcde', + useUserDefinedPageEventName: true, + userProvidedPageEventString: '{{name}}', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Chrome', + os_version: '77.0.3865.90', + device_model: 'Mac', + platform: 'Web', + device_id: '00000000000000000000000000', + app_name: 'RudderLabs JavaScript SDK', + app_version: '1.0.0', + language: 'en-US', + event_type: 'ApplicationLoaded', + event_properties: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + name: 'ApplicationLoaded', + }, + insert_id: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', + ip: '1.1.1.1', + event_id: 2, + user_properties: { + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + email: 'test@rudderstack.com', + anonymousId: '12345', + }, + user_id: '12345', + time: 1571051718299, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '00000000000000000000000000', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 72', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'test@rudderstack.com', + anonymousId: '12345', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + }, + request_ip: '1.1.1.1', + type: 'page', + messageId: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T11:15:18.299Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + properties: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + integrations: { + All: true, + Amplitude: { + event_id: 2, + }, + }, + name: 'ApplicationLoaded', + sentAt: '2019-10-14T11:15:53.296Z', + }, + destination: { + Config: { + apiKey: 'abcde', + useUserDefinedPageEventName: true, + userProvidedPageEventString: '', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Chrome', + os_version: '77.0.3865.90', + device_model: 'Mac', + platform: 'Web', + device_id: '00000000000000000000000000', + app_name: 'RudderLabs JavaScript SDK', + app_version: '1.0.0', + language: 'en-US', + event_type: 'ApplicationLoaded', + event_properties: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + name: 'ApplicationLoaded', + }, + insert_id: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', + ip: '1.1.1.1', + event_id: 2, + user_properties: { + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + email: 'test@rudderstack.com', + anonymousId: '12345', + }, + user_id: '12345', + time: 1571051718299, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '00000000000000000000000000', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 73', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'test@rudderstack.com', + anonymousId: '12345', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: 'Home Page', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + }, + request_ip: '1.1.1.1', + type: 'page', + messageId: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T11:15:18.299Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + properties: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + integrations: { + All: true, + Amplitude: { + event_id: 2, + }, + }, + sentAt: '2019-10-14T11:15:53.296Z', + }, + destination: { + Config: { + apiKey: 'abcde', + useUserDefinedPageEventName: false, + userProvidedPageEventString: 'Viewed {{context.page.title}} event.', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Chrome', + os_version: '77.0.3865.90', + device_model: 'Mac', + platform: 'Web', + device_id: '00000000000000000000000000', + app_name: 'RudderLabs JavaScript SDK', + app_version: '1.0.0', + language: 'en-US', + event_properties: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + insert_id: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', + ip: '1.1.1.1', + event_id: 2, + user_properties: { + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + email: 'test@rudderstack.com', + anonymousId: '12345', + }, + event_type: 'Viewed Page', + user_id: '12345', + time: 1571051718299, + session_id: -1, + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '00000000000000000000000000', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 74', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'screen', + userId: 'identified user id', + anonymousId: 'anon-id-new', + event: 'Screen View', + properties: { + prop1: '5', + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + Config: { + apiKey: 'abcde', + useUserDefinedScreenEventName: true, + userProvidedScreenEventString: 'My {{ event }} event.', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + device_id: 'anon-id-new', + event_properties: { + prop1: '5', + name: 'Screen View', + }, + user_properties: {}, + event_type: 'My Screen View event.', + user_id: 'identified user id', + time: 1580602989544, + session_id: -1, + ip: '14.5.67.21', + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'anon-id-new', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 75', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'screen', + userId: 'identified user id', + anonymousId: 'anon-id-new', + event: 'Screen View', + properties: { + prop1: '5', + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + Config: { + apiKey: 'abcde', + useUserDefinedScreenEventName: false, + userProvidedScreenEventString: 'My {{ event }} event.', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + device_id: 'anon-id-new', + event_properties: { + prop1: '5', + name: 'Screen View', + }, + user_properties: {}, + event_type: 'Viewed Screen View Screen', + user_id: 'identified user id', + time: 1580602989544, + session_id: -1, + ip: '14.5.67.21', + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'anon-id-new', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 76', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'screen', + userId: 'identified user id', + anonymousId: 'anon-id-new', + event: 'Screen same as event', + properties: { + prop1: '5', + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + Config: { + apiKey: 'abcde', + useUserDefinedScreenEventName: true, + userProvidedScreenEventString: '{{ event }}', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + device_id: 'anon-id-new', + event_properties: { + prop1: '5', + name: 'Screen same as event', + }, + user_properties: {}, + event_type: 'Screen same as event', + user_id: 'identified user id', + time: 1580602989544, + session_id: -1, + ip: '14.5.67.21', + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'anon-id-new', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'am', + description: 'Test 77', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'screen', + userId: 'identified user id', + anonymousId: 'anon-id-new', + name: 'Screen', + properties: { + prop1: '5', + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + Config: { + apiKey: 'abcde', + useUserDefinedScreenEventName: true, + userProvidedScreenEventString: '', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + device_id: 'anon-id-new', + event_properties: { + prop1: '5', + name: 'Screen', + }, + user_properties: {}, + event_type: 'Screen', + user_id: 'identified user id', + time: 1580602989544, + session_id: -1, + ip: '14.5.67.21', + library: 'rudderstack', + }, + ], + options: { + min_id_length: 1, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'anon-id-new', + }, + statusCode: 200, + }, + ], + }, + }, + }, +]; diff --git a/test/integrations/destinations/am/router/data.ts b/test/integrations/destinations/am/router/data.ts new file mode 100644 index 0000000000..7f2e1d0329 --- /dev/null +++ b/test/integrations/destinations/am/router/data.ts @@ -0,0 +1,318 @@ +export const data = [ + { + name: 'am', + description: 'Test 0', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + anonymousId: '123456', + email: 'test@rudderstack.com', + address: { + city: 'kolkata', + country: 'India', + postalCode: 712136, + state: 'WB', + street: '', + }, + ip: '0.0.0.0', + age: 26, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + }, + type: 'identify', + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: '123456', + userId: '123456', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + metadata: { + jobId: 1, + }, + destination: { + Config: { + apiKey: 'abcde', + groupTypeTrait: 'email', + groupValueTrait: 'age', + }, + }, + }, + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'test@rudderstack.com', + anonymousId: '12345', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + }, + request_ip: '1.1.1.1', + type: 'page', + messageId: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T11:15:18.299Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + properties: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + }, + integrations: { + All: true, + }, + name: 'ApplicationLoaded', + sentAt: '2019-10-14T11:15:53.296Z', + }, + metadata: { + jobId: 2, + }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, + }, + ], + destType: 'am', + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: [ + { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Chrome', + os_version: '77.0.3865.90', + device_model: 'Mac', + library: 'rudderstack', + platform: 'Web', + device_id: '123456', + app_name: 'RudderLabs JavaScript SDK', + app_version: '1.0.0', + language: 'en-US', + session_id: -1, + insert_id: '84e26acc-56a5-4835-8233-591137fca468', + city: 'kolkata', + country: 'India', + user_properties: { + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + anonymousId: '123456', + email: 'test@rudderstack.com', + postalCode: 712136, + state: 'WB', + street: '', + ip: '0.0.0.0', + age: 26, + }, + event_type: '$identify', + time: 1571043797562, + user_id: '123456', + ip: '0.0.0.0', + }, + ], + options: { + min_id_length: 1, + }, + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: '123456', + }, + ], + metadata: [ + { + jobId: 1, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + apiKey: 'abcde', + groupTypeTrait: 'email', + groupValueTrait: 'age', + }, + }, + }, + { + batchedRequest: [ + { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api2.amplitude.com/2/httpapi', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + api_key: 'abcde', + events: [ + { + os_name: 'Chrome', + os_version: '77.0.3865.90', + device_model: 'Mac', + library: 'rudderstack', + platform: 'Web', + device_id: '00000000000000000000000000', + app_name: 'RudderLabs JavaScript SDK', + app_version: '1.0.0', + language: 'en-US', + event_type: 'Viewed ApplicationLoaded Page', + event_properties: { + path: '/destinations/amplitude', + referrer: '', + search: '', + title: '', + url: 'https://docs.rudderstack.com/destinations/amplitude', + category: 'destination', + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + name: 'ApplicationLoaded', + }, + session_id: -1, + insert_id: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', + ip: '1.1.1.1', + user_properties: { + initial_referrer: 'https://docs.rudderstack.com', + initial_referring_domain: 'docs.rudderstack.com', + email: 'test@rudderstack.com', + anonymousId: '12345', + }, + user_id: '12345', + time: 1571051718299, + }, + ], + options: { + min_id_length: 1, + }, + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: '00000000000000000000000000', + }, + ], + metadata: [ + { + jobId: 2, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + apiKey: 'abcde', + }, + }, + }, + ], + }, + }, + }, + }, +]; diff --git a/test/integrations/destinations/bingads_audience/processor/data.ts b/test/integrations/destinations/bingads_audience/processor/data.ts new file mode 100644 index 0000000000..b61f4efea8 --- /dev/null +++ b/test/integrations/destinations/bingads_audience/processor/data.ts @@ -0,0 +1,1155 @@ +export const data = [ + { + name: 'bingads_audience', + description: 'unhashed email available with hashEmail as true in config', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user 1', + type: 'audiencelist', + properties: { + listData: { + add: [ + { + email: 'alex@email.com', + }, + { + email: 'amy@abc.com', + }, + { + email: 'van@abc.com', + }, + ], + }, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + Config: { + customerAccountId: '89236978', + customerId: '78678678', + audienceId: '564567', + hashEmail: true, + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + metadata: { + destinationId: 1234, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: '', + headers: {}, + params: {}, + body: { + JSON: { + list: [ + { + hashedEmail: + 'ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b', + email: 'alex@email.com', + }, + { + hashedEmail: + '49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579', + email: 'amy@abc.com', + }, + { + hashedEmail: + '2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c', + email: 'van@abc.com', + }, + ], + action: 'Add', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + destinationId: 1234, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'bingads_audience', + description: 'hashed email available with hashEmail as false in config', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user 1', + type: 'audiencelist', + properties: { + listData: { + add: [ + { + email: 'ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b', + }, + { + email: '49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579', + }, + { + email: '2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c', + }, + ], + }, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + Config: { + customerAccountId: '89236978', + customerId: '78678678', + audienceId: '564567', + hashEmail: false, + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + metadata: { + destinationId: 1234, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: '', + headers: {}, + params: {}, + body: { + JSON: { + list: [ + { + hashedEmail: + 'ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b', + email: 'ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b', + }, + { + hashedEmail: + '49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579', + email: '49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579', + }, + { + hashedEmail: + '2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c', + email: '2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c', + }, + ], + action: 'Add', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + destinationId: 1234, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'bingads_audience', + description: 'Unsupported action type', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user 1', + type: 'audiencelist', + properties: { + listData: { + addition: [ + { + email: 'alex@email.com', + }, + { + email: 'amy@abc.com', + }, + { + email: 'van@abc.com', + }, + ], + }, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + Config: { + customerAccountId: '89236978', + customerId: '78678678', + audienceId: '564567', + hashEmail: true, + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + metadata: { + destinationId: 1234, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + destinationId: 1234, + }, + statusCode: 400, + error: + 'unsupported action type. Aborting message.: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: unsupported action type. Aborting message.', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + implementation: 'cdkV2', + destType: 'BINGADS_AUDIENCE', + module: 'destination', + feature: 'processor', + destinationId: 1234, + }, + }, + ], + }, + }, + }, + { + name: 'bingads_audience', + description: 'Unsupported event type', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user 1', + type: 'track', + properties: { + listData: { + add: [ + { + email: 'alex@email.com', + }, + { + email: 'amy@abc.com', + }, + { + email: 'van@abc.com', + }, + ], + }, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + Config: { + customerAccountId: '89236978', + customerId: '78678678', + audienceId: '564567', + hashEmail: true, + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + metadata: { + destinationId: 1234, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + destinationId: 1234, + }, + statusCode: 400, + error: + 'Event type track is not supported. Aborting message.: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: Event type track is not supported. Aborting message.', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + implementation: 'cdkV2', + destType: 'BINGADS_AUDIENCE', + module: 'destination', + feature: 'processor', + destinationId: 1234, + }, + }, + ], + }, + }, + }, + { + name: 'bingads_audience', + description: 'event type not present', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user 1', + type: '', + properties: { + listData: { + add: [ + { + email: 'alex@email.com', + }, + { + email: 'amy@abc.com', + }, + { + email: 'van@abc.com', + }, + ], + }, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + Config: { + customerAccountId: '89236978', + customerId: '78678678', + audienceId: '564567', + hashEmail: true, + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + metadata: { + destinationId: 1234, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + destinationId: 1234, + }, + statusCode: 400, + error: + 'message Type is not present. Aborting message.: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: message Type is not present. Aborting message.', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + implementation: 'cdkV2', + destType: 'BINGADS_AUDIENCE', + module: 'destination', + feature: 'processor', + destinationId: 1234, + }, + }, + ], + }, + }, + }, + { + name: 'bingads_audience', + description: 'Message properties is not present', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user 1', + type: 'audiencelist', + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + Config: { + customerAccountId: '89236978', + customerId: '78678678', + audienceId: '564567', + hashEmail: true, + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + metadata: { + destinationId: 1234, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + destinationId: 1234, + }, + statusCode: 400, + error: + 'Message properties is not present. Aborting message.: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: Message properties is not present. Aborting message.', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + implementation: 'cdkV2', + destType: 'BINGADS_AUDIENCE', + module: 'destination', + feature: 'processor', + destinationId: 1234, + }, + }, + ], + }, + }, + }, + { + name: 'bingads_audience', + description: 'listData is not present in properties', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user 1', + type: 'audiencelist', + properties: {}, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + Config: { + customerAccountId: '89236978', + customerId: '78678678', + audienceId: '564567', + hashEmail: true, + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + metadata: { + destinationId: 1234, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + destinationId: 1234, + }, + statusCode: 400, + error: + 'listData is not present inside properties. Aborting message.: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: listData is not present inside properties. Aborting message.', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + implementation: 'cdkV2', + destType: 'BINGADS_AUDIENCE', + module: 'destination', + feature: 'processor', + destinationId: 1234, + }, + }, + ], + }, + }, + }, + { + name: 'bingads_audience', + description: 'Both add and remove are present in listData', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user 1', + type: 'audiencelist', + properties: { + listData: { + remove: [ + { + email: 'ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b', + }, + { + email: '49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579', + }, + { + email: '2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c', + }, + ], + update: [ + { + email: 'ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b', + }, + { + email: '49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579', + }, + { + email: '2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c', + }, + ], + }, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + Config: { + customerAccountId: '89236978', + customerId: '78678678', + audienceId: '564567', + hashEmail: false, + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + }, + metadata: { + destinationId: 1234, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: '', + headers: {}, + params: {}, + body: { + JSON: { + list: [ + { + hashedEmail: + 'ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b', + email: 'ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b', + }, + { + hashedEmail: + '49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579', + email: '49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579', + }, + { + hashedEmail: + '2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c', + email: '2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c', + }, + ], + action: 'Remove', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + destinationId: 1234, + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: '', + headers: {}, + params: {}, + body: { + JSON: { + list: [ + { + hashedEmail: + 'ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b', + email: 'ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b', + }, + { + hashedEmail: + '49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579', + email: '49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579', + }, + { + hashedEmail: + '2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c', + email: '2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c', + }, + ], + action: 'Replace', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + destinationId: 1234, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'bingads_audience', + description: 'Only single user data is present', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user 1', + type: 'audiencelist', + properties: { + listData: { + add: [ + { + email: 'alex@email.com', + }, + ], + }, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + metadata: { + sourceType: '', + destinationType: '', + namespace: '', + }, + destination: { + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + Config: { + customerAccountId: '89236978', + customerId: '78678678', + audienceId: '564567', + hashEmail: true, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: '', + headers: {}, + params: {}, + body: { + JSON: { + list: [ + { + hashedEmail: + 'ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b', + email: 'alex@email.com', + }, + ], + action: 'Add', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + sourceType: '', + destinationType: '', + namespace: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'bingads_audience', + description: 'unhashed email available with hashEmail as true in config', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user 1', + type: 'audiencelist', + properties: { + listData: { + add: [ + { + email: 'alex@email.com', + }, + { + email: 'amy@abc.com', + }, + { + email: 'van@abc.com', + }, + ], + }, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + Config: { + customerAccountId: '89236978', + customerId: '78678678', + audienceId: '564567', + hashEmail: true, + }, + }, + metadata: { + sourceType: '', + destinationType: '', + namespace: '', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + destinationType: '', + namespace: '', + sourceType: '', + }, + output: { + body: { + FORM: {}, + JSON: { + list: [ + { + hashedEmail: + 'ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b', + email: 'alex@email.com', + }, + { + hashedEmail: + '49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579', + email: 'amy@abc.com', + }, + { + hashedEmail: + '2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c', + email: 'van@abc.com', + }, + ], + action: 'Add', + }, + JSON_ARRAY: {}, + XML: {}, + }, + endpoint: '', + files: {}, + headers: {}, + method: 'POST', + params: {}, + type: 'REST', + userId: '', + version: '1', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'bingads_audience', + description: 'hashed email available with hashEmail as false in config', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user 1', + type: 'audiencelist', + properties: { + listData: { + update: [ + { + email: 'ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b', + }, + { + email: '49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579', + }, + ], + remove: [ + { + email: '2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c', + }, + ], + }, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + Config: { + customerAccountId: '89236978', + customerId: '78678678', + audienceId: '564567', + hashEmail: false, + }, + }, + metadata: { + sourceType: '', + destinationType: '', + namespace: '', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: '', + headers: {}, + params: {}, + body: { + JSON: { + list: [ + { + hashedEmail: + 'ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b', + email: 'ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b', + }, + { + hashedEmail: + '49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579', + email: '49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579', + }, + ], + action: 'Replace', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + sourceType: '', + destinationType: '', + namespace: '', + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: '', + headers: {}, + params: {}, + body: { + JSON: { + list: [ + { + hashedEmail: + '2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c', + email: '2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c', + }, + ], + action: 'Remove', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + sourceType: '', + destinationType: '', + namespace: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'bingads_audience', + description: 'validateInput should fail when properties are missing', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user 1', + type: 'audiencelist', + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + destination: { + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + Config: { + customerAccountId: '89236978', + customerId: '78678678', + audienceId: '564567', + hashEmail: false, + }, + }, + metadata: { + sourceType: '', + destinationType: '', + namespace: '', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + sourceType: '', + destinationType: '', + namespace: '', + }, + statusCode: 400, + error: + 'Message properties is not present. Aborting message.: Workflow: procWorkflow, Step: validateInput, ChildStep: undefined, OriginalError: Message properties is not present. Aborting message.', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + implementation: 'cdkV2', + destType: 'BINGADS_AUDIENCE', + module: 'destination', + feature: 'processor', + }, + }, + ], + }, + }, + }, +]; diff --git a/test/integrations/destinations/braze/network.ts b/test/integrations/destinations/braze/network.ts index 3db50ca32c..40d75c9d34 100644 --- a/test/integrations/destinations/braze/network.ts +++ b/test/integrations/destinations/braze/network.ts @@ -1,70 +1,4 @@ const dataDeliveryMocksData = [ - { - httpReq: { - url: 'https://api.amplitude.com/2/httpapi/test5', - data: { - api_key: 'c9d8a13b8bcab46a547f7be5200c483d', - events: [ - { - app_name: 'Rudder-CleverTap_Example', - app_version: '1.0', - time: 1619006730330, - user_id: 'gabi_userId_45', - user_properties: { - Residence: 'Shibuya', - city: 'Tokyo', - country: 'JP', - email: 'gabi29@gmail.com', - gender: 'M', - name: 'User2 Gabi2', - organization: 'Company', - region: 'ABC', - title: 'Owner', - zip: '100-0001', - }, - }, - ], - options: { min_id_length: 1 }, - }, - params: { destination: 'any' }, - headers: { 'Content-Type': 'application/json', 'User-Agent': 'RudderLabs' }, - method: 'POST', - }, - httpRes: { response: {} }, - }, - { - httpReq: { - url: 'https://api.amplitude.com/2/httpapi/test6', - data: { - api_key: 'c9d8a13b8bcab46a547f7be5200c483d', - events: [ - { - app_name: 'Rudder-CleverTap_Example', - app_version: '1.0', - time: 1619006730330, - user_id: 'gabi_userId_45', - user_properties: { - Residence: 'Shibuya', - city: 'Tokyo', - country: 'JP', - email: 'gabi29@gmail.com', - gender: 'M', - name: 'User2 Gabi2', - organization: 'Company', - region: 'ABC', - title: 'Owner', - zip: '100-0001', - }, - }, - ], - options: { min_id_length: 1 }, - }, - params: { destination: 'any' }, - headers: { 'Content-Type': 'application/json', 'User-Agent': 'RudderLabs' }, - method: 'POST', - }, - httpRes: {}, - }, { httpReq: { url: 'https://rest.iad-03.braze.com/users/identify/test1', @@ -463,5 +397,131 @@ const deleteNwData = [ status: 401, }, }, + { + httpReq: { + method: 'post', + data: { + external_ids: ['braze_test_user', 'user@50'], + user_aliases: [ + { alias_name: '77e278c9-e984-4cdd-950c-cd0b61befd03', alias_label: 'rudder_id' }, + { alias_name: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', alias_label: 'rudder_id' }, + ], + }, + headers: { Authorization: 'Bearer dummyApiKey' }, + url: 'https://rest.iad-03.braze.com/users/export/ids', + }, + httpRes: { + data: { + users: [ + { + created_at: '2023-03-17T20:51:58.297Z', + external_id: 'braze_test_user', + user_aliases: [], + appboy_id: '6414d2ee33326e3354e3040b', + braze_id: '6414d2ee33326e3354e3040b', + first_name: 'Jackson', + last_name: 'Miranda', + random_bucket: 8134, + email: 'jackson24miranda@gmail.com', + custom_attributes: { + pwa: false, + is_registered: true, + last_identify: 'GOOGLE_SIGN_IN', + account_region: 'ON', + is_pickup_selected: 'false', + has_tradein_attempt: false, + custom_obj_attr: { + key1: 'value1', + key2: 'value2', + key3: 'value3', + }, + custom_arr: [1, 2, 'str1'], + }, + custom_events: [ + { + name: 'Sign In Completed', + first: '2023-03-10T18:36:05.028Z', + last: '2023-03-10T18:36:05.028Z', + count: 2, + }, + ], + total_revenue: 0, + push_subscribe: 'subscribed', + email_subscribe: 'subscribed', + }, + ], + }, + message: 'success', + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + method: 'post', + url: 'https://rest.iad-01.braze.com/users/identify', + }, + httpRes: { + response: {}, + message: 'success', + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + method: 'post', + url: 'https://rest.iad-03.braze.com/users/identify', + }, + httpRes: { + response: {}, + message: 'success', + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://rest.iad-03.braze.com/users/track/testV1', + data: { + partner: 'RudderStack', + attributes: [ + { + email: '123@a.com', + city: 'Disney', + country: 'USA', + firstname: 'Mickey', + external_id: '456345345', + }, + { + email: '123@a.com', + city: 'Disney', + country: 'USA', + firstname: 'Mickey', + external_id: '456345345', + }, + { + email: '123@a.com', + city: 'Disney', + country: 'USA', + firstname: 'Mickey', + external_id: '456345345', + }, + ], + }, + params: { destination: 'braze' }, + headers: { + Accept: 'application/json', + Authorization: 'Bearer api_key', + 'Content-Type': 'application/json', + 'User-Agent': 'RudderLabs', + }, + method: 'POST', + }, + httpRes: { + data: '{"message":"Valid data must be provided in the \'attributes\', \'events\', or \'purchases\' fields.","errors":[{"type":"The value provided for the \'email\' field is not a valid email.","input_array":"attributes","index":0},{"type":"The value provided for the \'email\' field is not a valid email.","input_array":"attributes","index":1}]}', + status: 401, + }, + }, ]; export const networkCallsData = [...deleteNwData, ...dataDeliveryMocksData]; diff --git a/test/integrations/destinations/braze/processor/data.ts b/test/integrations/destinations/braze/processor/data.ts new file mode 100644 index 0000000000..58c54bb232 --- /dev/null +++ b/test/integrations/destinations/braze/processor/data.ts @@ -0,0 +1,3866 @@ +export const data = [ + { + name: 'braze', + description: 'Test 0', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + dataCenter: 'us-01', + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + message: { + anonymousId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.5', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + city: 'Disney', + country: 'USA', + email: 'mickey@disney.com', + firstname: 'Mickey', + closed_at: null, + orderTotal: 0, + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36', + }, + integrations: { + All: true, + }, + messageId: '2536eda4-d638-4c93-8014-8ffe3f083214', + originalTimestamp: '2020-01-24T06:29:02.362Z', + receivedAt: '2020-01-24T11:59:02.403+05:30', + request_ip: '[::1]:53709', + sentAt: '2020-01-24T06:29:02.363Z', + timestamp: '2020-01-24T11:59:02.402+05:30', + type: 'identify', + userId: '', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 200, + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rest.iad-01.braze.com/users/track', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + attributes: [ + { + email: 'mickey@disney.com', + city: 'Disney', + country: 'USA', + firstname: 'Mickey', + closed_at: null, + orderTotal: 0, + _update_existing_only: false, + user_alias: { + alias_name: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + alias_label: 'rudder_id', + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + }, + }, + ], + }, + }, + }, + { + name: 'braze', + description: 'Test 1: ERROR - No attributes found to update the user profile', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + dataCenter: 'us-01', + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + message: { + anonymousId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.5', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36', + }, + integrations: { + All: true, + }, + messageId: '2536eda4-d638-4c93-8014-8ffe3f083214', + originalTimestamp: '2020-01-24T06:29:02.362Z', + receivedAt: '2020-01-24T11:59:02.403+05:30', + request_ip: '[::1]:53709', + sentAt: '2020-01-24T06:29:02.363Z', + timestamp: '2020-01-24T11:59:02.402+05:30', + type: 'identify', + userId: 'mickeyMouse', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: 'No attributes found to update the user profile', + statTags: { + destType: 'BRAZE', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + }, + ], + }, + }, + }, + { + name: 'braze', + description: 'Test 2', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + message: { + anonymousId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.5', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36', + }, + event: 'braze revenue test', + integrations: { + All: true, + }, + messageId: 'a6a0ad5a-bd26-4f19-8f75-38484e580fc7', + originalTimestamp: '2020-01-24T06:29:02.364Z', + properties: { + currency: 'USD', + revenue: 50, + }, + receivedAt: '2020-01-24T11:59:02.403+05:30', + request_ip: '[::1]:53710', + sentAt: '2020-01-24T06:29:02.364Z', + timestamp: '2020-01-24T11:59:02.403+05:30', + type: 'track', + userId: 'mickeyMouse', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rest.fra-01.braze.eu/users/track', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + partner: 'RudderStack', + events: [ + { + name: 'braze revenue test', + time: '2020-01-24T11:59:02.403+05:30', + properties: { + revenue: 50, + }, + external_id: 'mickeyMouse', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'mickeyMouse', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'braze', + description: 'Test 3', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + message: { + anonymousId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.5', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + email: 'mickey@disney.com', + closed_at: null, + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36', + }, + event: 'braze revenue test', + integrations: { + All: true, + }, + messageId: 'a6a0ad5a-bd26-4f19-8f75-38484e580fc7', + originalTimestamp: '2020-01-24T06:29:02.364Z', + properties: { + currency: 'USD', + revenue: 50, + }, + receivedAt: '2020-01-24T11:59:02.403+05:30', + request_ip: '[::1]:53710', + sentAt: '2020-01-24T06:29:02.364Z', + timestamp: '2020-01-24T11:59:02.403+05:30', + type: 'track', + userId: 'mickeyMouse', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rest.fra-01.braze.eu/users/track', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + partner: 'RudderStack', + attributes: [ + { + email: 'mickey@disney.com', + closed_at: null, + external_id: 'mickeyMouse', + }, + ], + events: [ + { + name: 'braze revenue test', + time: '2020-01-24T11:59:02.403+05:30', + properties: { + revenue: 50, + }, + external_id: 'mickeyMouse', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'mickeyMouse', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'braze', + description: 'Test 4', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + dataCenter: 'eu-01', + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + message: { + anonymousId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.5', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36', + }, + integrations: { + All: true, + }, + messageId: 'dd266c67-9199-4a52-ba32-f46ddde67312', + originalTimestamp: '2020-01-24T06:29:02.358Z', + properties: { + path: '/tests/html/index2.html', + referrer: '', + search: '', + title: '', + url: 'http://localhost/tests/html/index2.html', + }, + receivedAt: '2020-01-24T11:59:02.403+05:30', + request_ip: '[::1]:53708', + sentAt: '2020-01-24T06:29:02.359Z', + timestamp: '2020-01-24T11:59:02.402+05:30', + type: 'page', + userId: '', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rest.fra-01.braze.eu/users/track', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + partner: 'RudderStack', + events: [ + { + name: 'Page Viewed', + time: '2020-01-24T11:59:02.402+05:30', + properties: { + path: '/tests/html/index2.html', + referrer: '', + search: '', + title: '', + url: 'http://localhost/tests/html/index2.html', + }, + _update_existing_only: false, + user_alias: { + alias_name: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + alias_label: 'rudder_id', + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'braze', + description: 'Test 5', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + dataCenter: 'us-01', + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + message: { + anonymousId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.5', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + city: 'Disney', + country: 'USA', + email: 'mickey@disney.com', + firstname: 'Mickey', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36', + }, + integrations: { + All: true, + }, + messageId: '2536eda4-d638-4c93-8014-8ffe3f083214', + originalTimestamp: '2020-01-24T06:29:02.362Z', + receivedAt: '2020-01-24T11:59:02.403+05:30', + request_ip: '[::1]:53709', + sentAt: '2020-01-24T06:29:02.363Z', + timestamp: '2020-01-24T11:59:02.402+05:30', + type: 'identify', + userId: '', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 200, + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rest.iad-01.braze.com/users/track', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + attributes: [ + { + city: 'Disney', + country: 'USA', + email: 'mickey@disney.com', + firstname: 'Mickey', + _update_existing_only: false, + user_alias: { + alias_name: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + alias_label: 'rudder_id', + }, + }, + ], + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + }, + }, + ], + }, + }, + }, + { + name: 'braze', + description: 'Test 6', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + enableNestedArrayOperations: false, + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + message: { + anonymousId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.5', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + city: 'Disney', + country: 'USA', + email: 'mickey@disney.com', + firstName: 'Mickey', + gender: 'woman', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36', + }, + event: 'braze revenue test', + integrations: { + All: true, + }, + messageId: 'a6a0ad5a-bd26-4f19-8f75-38484e580fc7', + originalTimestamp: '2020-01-24T06:29:02.364Z', + properties: { + currency: 'USD', + revenue: 50, + }, + receivedAt: '2020-01-24T11:59:02.403+05:30', + request_ip: '[::1]:53710', + sentAt: '2020-01-24T06:29:02.364Z', + timestamp: '2020-01-24T11:59:02.403+05:30', + type: 'track', + userId: '', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rest.fra-01.braze.eu/users/track', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + partner: 'RudderStack', + attributes: [ + { + email: 'mickey@disney.com', + first_name: 'Mickey', + gender: 'F', + city: 'Disney', + country: 'USA', + _update_existing_only: false, + user_alias: { + alias_name: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + alias_label: 'rudder_id', + }, + }, + ], + events: [ + { + name: 'braze revenue test', + time: '2020-01-24T11:59:02.403+05:30', + properties: { + revenue: 50, + }, + _update_existing_only: false, + user_alias: { + alias_name: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + alias_label: 'rudder_id', + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'braze', + description: 'Test 7', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + message: { + anonymousId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.5', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + city: 'Disney', + country: 'USA', + email: 'mickey@disney.com', + firstname: 'Mickey', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36', + }, + event: 'KM Order Completed', + integrations: { + All: true, + }, + messageId: 'aa5f5e44-8756-40ad-ad1e-b0d3b9fa710a', + originalTimestamp: '2020-01-24T06:29:02.367Z', + properties: { + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + coupon: 'hasbros', + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + products: [ + { + category: 'Games', + image_url: 'https:///www.example.com/product/path.jpg', + name: 'Monopoly: 3rd Edition', + price: 19, + product_id: '507f1f77bcf86cd799439011', + quantity: 1, + sku: '45790-32', + url: 'https://www.example.com/product/path', + }, + { + category: 'Games', + name: 'Uno Card Game', + price: 3, + product_id: '505bd76785ebb509fc183733', + quantity: 2, + sku: '46493-32', + }, + ], + revenue: 25, + shipping: 3, + subtotal: 22.5, + tax: 2, + total: 27.5, + }, + receivedAt: '2020-01-24T11:59:02.403+05:30', + request_ip: '[::1]:53712', + sentAt: '2020-01-24T06:29:02.368Z', + timestamp: '2020-01-24T11:59:02.402+05:30', + type: 'track', + userId: '', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rest.fra-01.braze.eu/users/track', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + partner: 'RudderStack', + attributes: [ + { + email: 'mickey@disney.com', + city: 'Disney', + country: 'USA', + firstname: 'Mickey', + _update_existing_only: false, + user_alias: { + alias_name: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + alias_label: 'rudder_id', + }, + }, + ], + events: [ + { + name: 'KM Order Completed', + time: '2020-01-24T11:59:02.402+05:30', + properties: { + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + coupon: 'hasbros', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + products: [ + { + category: 'Games', + image_url: 'https:///www.example.com/product/path.jpg', + name: 'Monopoly: 3rd Edition', + price: 19, + product_id: '507f1f77bcf86cd799439011', + quantity: 1, + sku: '45790-32', + url: 'https://www.example.com/product/path', + }, + { + category: 'Games', + name: 'Uno Card Game', + price: 3, + product_id: '505bd76785ebb509fc183733', + quantity: 2, + sku: '46493-32', + }, + ], + revenue: 25, + shipping: 3, + subtotal: 22.5, + tax: 2, + total: 27.5, + }, + _update_existing_only: false, + user_alias: { + alias_name: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + alias_label: 'rudder_id', + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'braze', + description: 'Test 8', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + event: 'Order Completed', + sentAt: '2020-09-14T12:09:37.491Z', + userId: 'Randomuser2222', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.3', + namespace: 'com.rudderlabs.javascript', + }, + page: { + url: 'file:///Users/manashi/Desktop/rudder-all-sdk-application-testing/Fullstory%20test%20By%20JS%20SDK/braze.html', + path: '/Users/manashi/Desktop/rudder-all-sdk-application-testing/Fullstory%20test%20By%20JS%20SDK/braze.html', + title: 'Fullstory Test', + search: '', + referrer: '', + }, + locale: 'en-GB', + screen: { + density: 2, + }, + traits: { + email: 'manashi@gmaiol.com', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.3', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36', + }, + messageId: '24ecc509-ce3e-473c-8483-ba1ea2c195cb', + properties: { + products: [ + { + sku: '45790-32', + url: 'https://www.example.com/product/path', + key1: { + key11: 'value1', + key22: 'value2', + }, + name: 'Monopoly: 3rd Edition', + price: 19, + category: 'Games', + quantity: 1, + image_url: 'https:///www.example.com/product/path.jpg', + currency78: 'USD', + product_id: '507f1f77bcf86cd799439011', + }, + { + sku: '46493-32', + name: 'Uno Card Game', + price23: 3, + category: 'Games', + quantity: 2, + currency78: 'USD', + product_id: '505bd76785ebb509fc183733', + }, + ], + }, + anonymousId: 'c6ff1462-b692-43d6-8f6a-659efedc99ea', + integrations: { + All: true, + }, + originalTimestamp: '2020-09-14T12:09:37.491Z', + }, + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: + 'Invalid Order Completed event: Message properties and product at index: 0 is missing currency', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'BRAZE', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'braze', + description: 'Test 9', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'group', + event: 'Order Completed', + sentAt: '2020-09-14T12:09:37.491Z', + userId: 'Randomuser2222', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.3', + namespace: 'com.rudderlabs.javascript', + }, + page: { + url: 'file:///Users/manashi/Desktop/rudder-all-sdk-application-testing/Fullstory%20test%20By%20JS%20SDK/braze.html', + path: '/Users/manashi/Desktop/rudder-all-sdk-application-testing/Fullstory%20test%20By%20JS%20SDK/braze.html', + title: 'Fullstory Test', + search: '', + referrer: '', + }, + locale: 'en-GB', + screen: { + density: 2, + }, + traits: { + email: 'manashi@gmaiol.com', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.3', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36', + }, + messageId: '24ecc509-ce3e-473c-8483-ba1ea2c195cb', + traits: { + groupId: '1234', + }, + anonymousId: 'c6ff1462-b692-43d6-8f6a-659efedc99ea', + integrations: { + All: true, + }, + originalTimestamp: '2020-09-14T12:09:37.491Z', + }, + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rest.fra-01.braze.eu/users/track', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + attributes: [ + { + ab_rudder_group_1234: true, + external_id: 'Randomuser2222', + }, + ], + partner: 'RudderStack', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'Randomuser2222', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'braze', + description: 'Test 10', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + dataCenter: 'us-01', + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + message: { + anonymousId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + channel: 'web', + context: { + mappedToDestination: true, + externalId: [ + { + identifierType: 'external_id', + id: 'mickey@disney.com', + }, + ], + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.5', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + home_city: 'Disney', + country: 'USA', + first_name: 'Mickey', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36', + }, + integrations: { + All: true, + }, + messageId: '2536eda4-d638-4c93-8014-8ffe3f083214', + originalTimestamp: '2020-01-24T06:29:02.362Z', + receivedAt: '2020-01-24T11:59:02.403+05:30', + request_ip: '[::1]:53709', + sentAt: '2020-01-24T06:29:02.363Z', + timestamp: '2020-01-24T11:59:02.402+05:30', + type: 'identify', + userId: '', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 200, + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rest.iad-01.braze.com/users/track', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + attributes: [ + { + home_city: 'Disney', + country: 'USA', + external_id: 'mickey@disney.com', + first_name: 'Mickey', + }, + ], + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: 'mickey@disney.com', + }, + }, + ], + }, + }, + }, + { + name: 'braze', + description: 'Test 11', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + message: { + anonymousId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.5', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + city: 'Disney', + country: 'USA', + email: 'mickey@disney.com', + firstname: 'Mickey', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36', + }, + event: 'Order Completed', + integrations: { + All: true, + }, + messageId: 'aa5f5e44-8756-40ad-ad1e-b0d3b9fa710a', + originalTimestamp: '2020-01-24T06:29:02.367Z', + properties: { + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + coupon: 'hasbros', + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + products: [ + { + category: 'Games', + image_url: 'https:///www.example.com/product/path.jpg', + name: 'Monopoly: 3rd Edition', + price: 0, + product_id: '507f1f77bcf86cd799439011', + quantity: 1, + sku: '45790-32', + url: 'https://www.example.com/product/path', + }, + { + category: 'Games', + name: 'Uno Card Game', + price: 0, + product_id: '505bd76785ebb509fc183733', + quantity: 2, + sku: '46493-32', + }, + ], + revenue: 25, + shipping: 3, + subtotal: 22.5, + tax: 2, + total: 27.5, + }, + receivedAt: '2020-01-24T11:59:02.403+05:30', + request_ip: '[::1]:53712', + sentAt: '2020-01-24T06:29:02.368Z', + timestamp: '2020-01-24T11:59:02.402+05:30', + type: 'track', + userId: '', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rest.fra-01.braze.eu/users/track', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + attributes: [ + { + email: 'mickey@disney.com', + city: 'Disney', + country: 'USA', + firstname: 'Mickey', + _update_existing_only: false, + user_alias: { + alias_name: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + alias_label: 'rudder_id', + }, + }, + ], + purchases: [ + { + product_id: '507f1f77bcf86cd799439011', + price: 0, + currency: 'USD', + quantity: 1, + time: '2020-01-24T11:59:02.402+05:30', + _update_existing_only: false, + user_alias: { + alias_name: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + alias_label: 'rudder_id', + }, + }, + { + product_id: '505bd76785ebb509fc183733', + price: 0, + currency: 'USD', + quantity: 2, + time: '2020-01-24T11:59:02.402+05:30', + _update_existing_only: false, + user_alias: { + alias_name: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + alias_label: 'rudder_id', + }, + }, + ], + partner: 'RudderStack', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'braze', + description: 'Test 12', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + message: { + anonymousId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.5', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + city: 'Disney', + country: 'USA', + email: 'mickey@disney.com', + firstname: 'Mickey', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36', + }, + event: 'Order Completed', + integrations: { + All: true, + }, + messageId: 'aa5f5e44-8756-40ad-ad1e-b0d3b9fa710a', + originalTimestamp: '2020-01-24T06:29:02.367Z', + properties: { + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + coupon: 'hasbros', + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + products: [ + { + category: 'Games', + image_url: 'https:///www.example.com/product/path.jpg', + name: 'Monopoly: 3rd Edition', + price: 0, + product_id: '507f1f77bcf86cd799439011', + quantity: 1, + sku: '45790-32', + url: 'https://www.example.com/product/path', + }, + { + category: 'Games', + name: 'Uno Card Game', + price: 10, + product_id: '505bd76785ebb509fc183733', + quantity: 2, + sku: '46493-32', + }, + ], + revenue: 25, + shipping: 3, + subtotal: 22.5, + tax: 2, + total: 27.5, + }, + receivedAt: '2020-01-24T11:59:02.403+05:30', + request_ip: '[::1]:53712', + sentAt: '2020-01-24T06:29:02.368Z', + timestamp: '2020-01-24T11:59:02.402+05:30', + type: 'track', + userId: '', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rest.fra-01.braze.eu/users/track', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + attributes: [ + { + email: 'mickey@disney.com', + city: 'Disney', + country: 'USA', + firstname: 'Mickey', + _update_existing_only: false, + user_alias: { + alias_name: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + alias_label: 'rudder_id', + }, + }, + ], + purchases: [ + { + product_id: '507f1f77bcf86cd799439011', + price: 0, + currency: 'USD', + quantity: 1, + time: '2020-01-24T11:59:02.402+05:30', + _update_existing_only: false, + user_alias: { + alias_name: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + alias_label: 'rudder_id', + }, + }, + { + product_id: '505bd76785ebb509fc183733', + price: 10, + currency: 'USD', + quantity: 2, + time: '2020-01-24T11:59:02.402+05:30', + _update_existing_only: false, + user_alias: { + alias_name: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + alias_label: 'rudder_id', + }, + }, + ], + partner: 'RudderStack', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'braze', + description: 'Test 13', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + enableNestedArrayOperations: true, + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + message: { + anonymousId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.5', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + cars2: { + update: [ + { + age: 30, + id: 2, + identifier: 'id', + name: 'abcd', + }, + { + age: 27, + id: 1, + identifier: 'id', + name: 'abcd', + }, + ], + }, + city: 'Disney', + country: 'USA', + email: 'mickey@disney.com', + firstName: 'Mickey', + gender: 'woman', + pets: { + add: [ + { + age: 27, + id: 1, + name: 'abc', + }, + ], + remove: [ + { + id: 3, + identifier: 'id', + }, + { + id: 4, + identifier: 'id', + }, + ], + update: [ + { + age: 27, + id: 2, + identifier: 'id', + name: 'abc', + }, + ], + }, + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36', + }, + event: 'braze revenue test', + integrations: { + All: true, + }, + messageId: '89140820-c187-4e62-9599-3c633771ee58', + originalTimestamp: '2023-03-14T02:06:26.501+05:30', + properties: { + currency: 'USD', + mergeObjectsUpdateOperation: false, + revenue: 50, + }, + receivedAt: '2023-03-14T02:06:22.433+05:30', + request_ip: '[::1]', + rudderId: '2686e376-7e08-42f7-8edc-ff67eb238a91', + sentAt: '2023-03-14T02:06:26.501+05:30', + timestamp: '2023-03-14T02:06:22.432+05:30', + type: 'track', + userId: 'finalUserTestCA', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rest.fra-01.braze.eu/users/track', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + partner: 'RudderStack', + attributes: [ + { + email: 'mickey@disney.com', + first_name: 'Mickey', + gender: 'F', + cars2: { + $update: [ + { + $identifier_key: 'id', + $identifier_value: 2, + $new_object: { + age: 30, + name: 'abcd', + }, + }, + { + $identifier_key: 'id', + $identifier_value: 1, + $new_object: { + age: 27, + name: 'abcd', + }, + }, + ], + }, + city: 'Disney', + country: 'USA', + pets: { + $update: [ + { + $identifier_key: 'id', + $identifier_value: 2, + $new_object: { + age: 27, + name: 'abc', + }, + }, + ], + $remove: [ + { + $identifier_key: 'id', + $identifier_value: 3, + }, + { + $identifier_key: 'id', + $identifier_value: 4, + }, + ], + $add: [ + { + age: 27, + id: 1, + name: 'abc', + }, + ], + }, + _merge_objects: false, + external_id: 'finalUserTestCA', + }, + ], + events: [ + { + name: 'braze revenue test', + time: '2023-03-14T02:06:22.432+05:30', + properties: { + mergeObjectsUpdateOperation: false, + revenue: 50, + }, + external_id: 'finalUserTestCA', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'finalUserTestCA', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'braze', + description: 'Test 14', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + enableNestedArrayOperations: true, + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + message: { + anonymousId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.5', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + cars: { + add: [ + { + age: 27, + id: 1, + name: 'abc', + }, + ], + update: [ + { + age: 30, + id: 2, + identifier: 'id', + name: 'abcd', + }, + { + age: 27, + id: 1, + identifier: 'id', + name: 'abcd', + }, + ], + }, + city: 'Disney', + country: 'USA', + email: 'mickey@disney.com', + firstName: 'Mickey', + gender: 'woman', + pets: [ + { + breed: 'beagle', + id: 1, + name: 'Gus', + type: 'dog', + }, + { + breed: 'calico', + id: 2, + name: 'Gerald', + type: 'cat', + }, + ], + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36', + }, + event: 'braze revenue test', + integrations: { + All: true, + }, + messageId: 'd1e049af-913c-46ee-8f5c-5b26966e896f', + originalTimestamp: '2023-03-14T02:13:10.758+05:30', + properties: { + currency: 'USD', + mergeObjectsUpdateOperation: false, + revenue: 50, + }, + receivedAt: '2023-03-14T02:13:10.519+05:30', + request_ip: '[::1]', + rudderId: '2686e376-7e08-42f7-8edc-ff67eb238a91', + sentAt: '2023-03-14T02:13:10.758+05:30', + timestamp: '2023-03-14T02:13:10.518+05:30', + type: 'track', + userId: 'finalUserTestCA', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rest.fra-01.braze.eu/users/track', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + partner: 'RudderStack', + attributes: [ + { + email: 'mickey@disney.com', + first_name: 'Mickey', + gender: 'F', + cars: { + $update: [ + { + $identifier_key: 'id', + $identifier_value: 2, + $new_object: { + age: 30, + name: 'abcd', + }, + }, + { + $identifier_key: 'id', + $identifier_value: 1, + $new_object: { + age: 27, + name: 'abcd', + }, + }, + ], + $add: [ + { + age: 27, + id: 1, + name: 'abc', + }, + ], + }, + city: 'Disney', + country: 'USA', + pets: [ + { + breed: 'beagle', + id: 1, + name: 'Gus', + type: 'dog', + }, + { + breed: 'calico', + id: 2, + name: 'Gerald', + type: 'cat', + }, + ], + _merge_objects: false, + external_id: 'finalUserTestCA', + }, + ], + events: [ + { + name: 'braze revenue test', + time: '2023-03-14T02:13:10.518+05:30', + properties: { + mergeObjectsUpdateOperation: false, + revenue: 50, + }, + external_id: 'finalUserTestCA', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'finalUserTestCA', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'braze', + description: 'Test 15', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + dataCenter: 'us-01', + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + message: { + channel: 'web', + context: { + traits: { + address: { + city: 'Mathura', + country: 'India', + }, + email: 'a@gmail.com', + phone: '9988123321', + firstName: 'anuj', + lastName: 'kumar', + gender: 'male', + birthday: '01/01/1971', + avatar: 'https://i.kym-cdn.com/entries/icons/mobile/000/034/772/anuj-1.jpg', + bio: 'Tech and tension go together', + language: 'en-IN', + job: 'Director', + company: 'Plinth India', + }, + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.5', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36', + }, + integrations: { + All: true, + }, + request_ip: '[::1]:53709', + type: 'identify', + userId: 'ank101', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rest.iad-01.braze.com/users/track', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + attributes: [ + { + country: 'India', + dob: '01/01/1971', + email: 'a@gmail.com', + first_name: 'anuj', + gender: 'M', + home_city: 'Mathura', + image_url: + 'https://i.kym-cdn.com/entries/icons/mobile/000/034/772/anuj-1.jpg', + last_name: 'kumar', + phone: '9988123321', + bio: 'Tech and tension go together', + language: 'en-IN', + job: 'Director', + company: 'Plinth India', + external_id: 'ank101', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'ank101', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'braze', + description: 'Test 16', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + dataCenter: 'us-01', + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + message: { + channel: 'web', + context: { + traits: { + address: { + city: 'Mathura', + country: 'India', + }, + email: 'a@gmail.com', + phone: '9988123321', + firstName: 'anuj', + lastName: 'kumar', + gender: null, + birthday: '01/01/1971', + avatar: 'https://i.kym-cdn.com/entries/icons/mobile/000/034/772/anuj-1.jpg', + bio: 'Tech and tension go together', + language: 'en-IN', + job: 'Director', + company: null, + }, + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.5', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36', + }, + integrations: { + All: true, + }, + request_ip: '[::1]:53709', + type: 'identify', + userId: 'ank101', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rest.iad-01.braze.com/users/track', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + attributes: [ + { + country: 'India', + dob: '01/01/1971', + email: 'a@gmail.com', + first_name: 'anuj', + gender: null, + home_city: 'Mathura', + image_url: + 'https://i.kym-cdn.com/entries/icons/mobile/000/034/772/anuj-1.jpg', + last_name: 'kumar', + phone: '9988123321', + bio: 'Tech and tension go together', + language: 'en-IN', + job: 'Director', + company: null, + external_id: 'ank101', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'ank101', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'braze', + description: 'Test 17', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + dataCenter: 'US-03', + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.5', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36', + }, + integrations: { + All: true, + }, + request_ip: '[::1]:53709', + type: 'alias', + previousId: 'userId', + userId: 'userMergeTest2', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rest.iad-03.braze.com/users/merge', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + merge_updates: [ + { + identifier_to_merge: { + external_id: 'userId', + }, + identifier_to_keep: { + external_id: 'userMergeTest2', + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'userMergeTest2', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'braze', + description: 'Test 18: ERROR - previousId is required for alias call', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + dataCenter: 'US-03', + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.5', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36', + }, + integrations: { + All: true, + }, + request_ip: '[::1]:53709', + type: 'alias', + userId: 'userMergeTest2', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: '[BRAZE]: previousId is required for alias call', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'BRAZE', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'braze', + description: 'Test 19: ERROR - userId is required for alias call', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + dataCenter: 'US-03', + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.5', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36', + }, + integrations: { + All: true, + }, + request_ip: '[::1]:53709', + type: 'alias', + previousId: 'userMergeTest2', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: '[BRAZE]: userId is required for alias call', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'BRAZE', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'braze', + description: 'Test 20', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + dataCenter: 'us-01', + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + metadata: { + sourceType: 'metadata.sourceType', + destinationType: 'metadata.destinationType', + k8_namespace: 'metadata.namespace', + }, + message: { + channel: 'web', + context: { + traits: { + email: 'A@HOTMAIL.COM', + phone: '9988123321', + firstName: 'anil', + lastName: 'kumar', + gender: null, + birthday: '01/01/1971', + avatar: 'https://i.kym-cdn.com/entries/icons/mobile/000/034/772/anuj-1.jpg', + bio: 'Tech and tension go together', + language: 'en-IN', + job: 'Director', + company: null, + }, + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.5', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36', + }, + integrations: { + All: true, + }, + request_ip: '[::1]:53709', + type: 'identify', + userId: 'ank101', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rest.iad-01.braze.com/users/track', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + attributes: [ + { + dob: '01/01/1971', + email: 'a@hotmail.com', + first_name: 'anil', + gender: null, + image_url: + 'https://i.kym-cdn.com/entries/icons/mobile/000/034/772/anuj-1.jpg', + last_name: 'kumar', + phone: '9988123321', + bio: 'Tech and tension go together', + language: 'en-IN', + job: 'Director', + company: null, + external_id: 'ank101', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'ank101', + }, + metadata: { + sourceType: 'metadata.sourceType', + destinationType: 'metadata.destinationType', + k8_namespace: 'metadata.namespace', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'braze', + description: 'Test 21', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + dataCenter: 'us-01', + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + metadata: { + sourceType: 'metadata.sourceType', + destinationType: 'metadata.destinationType', + k8_namespace: 'metadata.namespace', + }, + message: { + anonymousId: 'e6ab2c5e-1cda-34a9-g962-r2f62df18abc', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.5', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + city: 'Disney', + country: 'USA', + email: 'mickey@disney.com', + firstname: 'Mickey', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36', + }, + event: 'Order Completed', + integrations: { + All: true, + }, + messageId: 'aa5f5e44-8756-40ad-ad1e-b0d3b9fa710a', + originalTimestamp: '2020-01-24T06:29:02.367Z', + properties: { + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + coupon: 'hasbros', + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + products: [ + { + category: 'Games', + image_url: 'https:///www.example.com/product/path.jpg', + name: 'Monopoly: 3rd Edition', + price: 0, + product_id: '507f1f77bcf86cd799439011', + quantity: 1, + sku: '45790-32', + url: 'https://www.example.com/product/path', + }, + ], + revenue: 25, + shipping: 3, + subtotal: 22.5, + tax: 2, + total: 27.5, + }, + receivedAt: '2020-01-24T11:59:02.403+05:30', + request_ip: '[::1]:53712', + sentAt: '2020-01-24T06:29:02.368Z', + timestamp: '2020-01-24T11:59:02.402+05:30', + type: 'track', + userId: '', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rest.iad-01.braze.com/users/track', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + attributes: [ + { + email: 'mickey@disney.com', + city: 'Disney', + country: 'USA', + firstname: 'Mickey', + _update_existing_only: false, + user_alias: { + alias_name: 'e6ab2c5e-1cda-34a9-g962-r2f62df18abc', + alias_label: 'rudder_id', + }, + }, + ], + purchases: [ + { + product_id: '507f1f77bcf86cd799439011', + price: 0, + currency: 'USD', + quantity: 1, + time: '2020-01-24T11:59:02.402+05:30', + _update_existing_only: false, + user_alias: { + alias_name: 'e6ab2c5e-1cda-34a9-g962-r2f62df18abc', + alias_label: 'rudder_id', + }, + }, + ], + partner: 'RudderStack', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'e6ab2c5e-1cda-34a9-g962-r2f62df18abc', + }, + metadata: { + sourceType: 'metadata.sourceType', + destinationType: 'metadata.destinationType', + k8_namespace: 'metadata.namespace', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'braze', + description: 'Test 22', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'group', + event: 'Order Completed', + sentAt: '2020-09-14T12:09:37.491Z', + userId: 'Randomuser2222', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.3', + namespace: 'com.rudderlabs.javascript', + }, + page: { + url: 'file:///Users/manashi/Desktop/rudder-all-sdk-application-testing/Fullstory%20test%20By%20JS%20SDK/braze.html', + path: '/Users/manashi/Desktop/rudder-all-sdk-application-testing/Fullstory%20test%20By%20JS%20SDK/braze.html', + title: 'Fullstory Test', + search: '', + referrer: '', + }, + locale: 'en-GB', + screen: { + density: 2, + }, + traits: { + email: 'manashi@gmaiol.com', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.3', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36', + }, + messageId: '24ecc509-ce3e-473c-8483-ba1ea2c195cb', + groupId: '1234', + traits: { + phone: '5055077683', + subscriptionState: 'subscribed', + }, + anonymousId: 'c6ff1462-b692-43d6-8f6a-659efedc99ea', + integrations: { + All: true, + }, + originalTimestamp: '2020-09-14T12:09:37.491Z', + }, + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + enableSubscriptionGroupInGroupCall: true, + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rest.fra-01.braze.eu/v2/subscription/status/set', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + subscription_groups: [ + { + subscription_group_id: '1234', + subscription_state: 'subscribed', + external_id: ['Randomuser2222'], + phones: ['5055077683'], + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'braze', + description: 'Test 23', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'group', + event: 'Order Completed', + sentAt: '2020-09-14T12:09:37.491Z', + userId: 'Randomuser2222', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.3', + namespace: 'com.rudderlabs.javascript', + }, + page: { + url: 'file:///Users/manashi/Desktop/rudder-all-sdk-application-testing/Fullstory%20test%20By%20JS%20SDK/braze.html', + path: '/Users/manashi/Desktop/rudder-all-sdk-application-testing/Fullstory%20test%20By%20JS%20SDK/braze.html', + title: 'Fullstory Test', + search: '', + referrer: '', + }, + locale: 'en-GB', + screen: { + density: 2, + }, + traits: { + email: 'manashi@gmaiol.com', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.3', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36', + }, + messageId: '24ecc509-ce3e-473c-8483-ba1ea2c195cb', + groupId: '1234', + traits: { + email: 'abc@test.com', + subscriptionState: 'unsubscribed', + }, + anonymousId: 'c6ff1462-b692-43d6-8f6a-659efedc99ea', + integrations: { + All: true, + }, + originalTimestamp: '2020-09-14T12:09:37.491Z', + }, + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + enableSubscriptionGroupInGroupCall: true, + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rest.fra-01.braze.eu/v2/subscription/status/set', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + subscription_groups: [ + { + subscription_group_id: '1234', + subscription_state: 'unsubscribed', + external_id: ['Randomuser2222'], + emails: ['abc@test.com'], + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'braze', + description: 'Test 24', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + metadata: { + sourceType: '', + destinationType: '', + namespace: '', + }, + message: { + anonymousId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.5', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36', + }, + event: 'braze revenue test', + integrations: { + All: true, + braze: { + appId: '123', + }, + }, + messageId: 'a6a0ad5a-bd26-4f19-8f75-38484e580fc7', + originalTimestamp: '2020-01-24T06:29:02.364Z', + properties: { + currency: 'USD', + revenue: 50, + }, + receivedAt: '2020-01-24T11:59:02.403+05:30', + request_ip: '[::1]:53710', + sentAt: '2020-01-24T06:29:02.364Z', + timestamp: '2020-01-24T11:59:02.403+05:30', + type: 'track', + userId: 'mickeyMouse', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rest.fra-01.braze.eu/users/track', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + partner: 'RudderStack', + events: [ + { + name: 'braze revenue test', + time: '2020-01-24T11:59:02.403+05:30', + properties: { + revenue: 50, + }, + external_id: 'mickeyMouse', + app_id: '123', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'mickeyMouse', + }, + metadata: { + sourceType: '', + destinationType: '', + namespace: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'braze', + description: 'Test 25', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + sendPurchaseEventWithExtraProperties: true, + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + message: { + anonymousId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.5', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + city: 'Disney', + country: 'USA', + email: 'mickey@disney.com', + firstname: 'Mickey', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36', + }, + event: 'Order Completed', + integrations: { + All: true, + }, + messageId: 'aa5f5e44-8756-40ad-ad1e-b0d3b9fa710a', + originalTimestamp: '2020-01-24T06:29:02.367Z', + properties: { + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + coupon: 'hasbros', + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + products: [ + { + category: 'Games', + image_url: 'https:///www.example.com/product/path.jpg', + name: 'Monopoly: 3rd Edition', + price: 0, + product_id: '507f1f77bcf86cd799439023', + quantity: 1, + sku: '45790-32', + url: 'https://www.example.com/product/path', + }, + { + category: 'Games', + name: 'Uno Card Game', + price: 0, + product_id: '505bd76785ebb509fc183724', + quantity: 2, + sku: '46493-32', + }, + ], + revenue: 25, + shipping: 3, + subtotal: 22.5, + tax: 2, + total: 27.5, + }, + receivedAt: '2020-01-24T11:59:02.403+05:30', + request_ip: '[::1]:53712', + sentAt: '2020-01-24T06:29:02.368Z', + timestamp: '2020-01-24T11:59:02.402+05:30', + type: 'track', + userId: '', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rest.fra-01.braze.eu/users/track', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + attributes: [ + { + email: 'mickey@disney.com', + city: 'Disney', + country: 'USA', + firstname: 'Mickey', + _update_existing_only: false, + user_alias: { + alias_name: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + alias_label: 'rudder_id', + }, + }, + ], + purchases: [ + { + product_id: '507f1f77bcf86cd799439023', + price: 0, + currency: 'USD', + quantity: 1, + time: '2020-01-24T11:59:02.402+05:30', + properties: { + category: 'Games', + image_url: 'https:///www.example.com/product/path.jpg', + name: 'Monopoly: 3rd Edition', + url: 'https://www.example.com/product/path', + }, + _update_existing_only: false, + user_alias: { + alias_name: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + alias_label: 'rudder_id', + }, + }, + { + product_id: '505bd76785ebb509fc183724', + price: 0, + currency: 'USD', + quantity: 2, + time: '2020-01-24T11:59:02.402+05:30', + properties: { + category: 'Games', + name: 'Uno Card Game', + }, + _update_existing_only: false, + user_alias: { + alias_name: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + alias_label: 'rudder_id', + }, + }, + ], + partner: 'RudderStack', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'braze', + description: 'Test 25: ERROR - Invalid email, email must be a valid string', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + dataCenter: 'us-01', + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + message: { + anonymousId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + channel: 'web', + context: { + traits: { + city: 'Disney', + country: 'USA', + email: 123, + firstname: 'Mickey', + closed_at: null, + orderTotal: 0, + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36', + }, + integrations: { + All: true, + }, + messageId: '2536eda4-d638-4c93-8014-8ffe3f083214', + originalTimestamp: '2020-01-24T06:29:02.362Z', + receivedAt: '2020-01-24T11:59:02.403+05:30', + request_ip: '[::1]:53709', + sentAt: '2020-01-24T06:29:02.363Z', + timestamp: '2020-01-24T11:59:02.402+05:30', + type: 'identify', + userId: '', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Invalid email, email must be a valid string', + statTags: { + destType: 'BRAZE', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'braze', + description: 'Test 26', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + sendPurchaseEventWithExtraProperties: true, + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + message: { + anonymousId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + channel: 'web', + context: { + traits: { + city: 'Disney', + country: 'USA', + email: null, + firstname: 'Mickey', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36', + }, + event: 'Order Completed', + integrations: { + All: true, + }, + messageId: 'aa5f5e44-8756-40ad-ad1e-b0d3b9fa710a', + originalTimestamp: '2020-01-24T06:29:02.367Z', + properties: { + affiliation: 'Google Store', + checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', + coupon: 'hasbros', + currency: 'USD', + discount: 2.5, + order_id: '50314b8e9bcf000000000000', + products: [ + { + category: 'Games', + image_url: 'https:///www.example.com/product/path.jpg', + name: 'Monopoly: 3rd Edition', + price: 0, + product_id: '507f1f77bcf86cd799439023', + quantity: 1, + sku: '45790-32', + url: 'https://www.example.com/product/path', + }, + { + category: 'Games', + name: 'Uno Card Game', + price: 0, + product_id: '505bd76785ebb509fc183724', + quantity: 2, + sku: '46493-32', + }, + ], + revenue: 25, + shipping: 3, + subtotal: 22.5, + tax: 2, + total: 27.5, + }, + receivedAt: '2020-01-24T11:59:02.403+05:30', + request_ip: '[::1]:53712', + sentAt: '2020-01-24T06:29:02.368Z', + timestamp: '2020-01-24T11:59:02.402+05:30', + type: 'track', + userId: '', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + FORM: {}, + JSON: { + attributes: [ + { + _update_existing_only: false, + city: 'Disney', + country: 'USA', + email: null, + firstname: 'Mickey', + user_alias: { + alias_label: 'rudder_id', + alias_name: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + }, + }, + ], + partner: 'RudderStack', + purchases: [ + { + _update_existing_only: false, + currency: 'USD', + price: 0, + product_id: '507f1f77bcf86cd799439023', + properties: { + category: 'Games', + image_url: 'https:///www.example.com/product/path.jpg', + name: 'Monopoly: 3rd Edition', + url: 'https://www.example.com/product/path', + }, + quantity: 1, + time: '2020-01-24T11:59:02.402+05:30', + user_alias: { + alias_label: 'rudder_id', + alias_name: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + }, + }, + { + _update_existing_only: false, + currency: 'USD', + price: 0, + product_id: '505bd76785ebb509fc183724', + properties: { + category: 'Games', + name: 'Uno Card Game', + }, + quantity: 2, + time: '2020-01-24T11:59:02.402+05:30', + user_alias: { + alias_label: 'rudder_id', + alias_name: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + }, + endpoint: 'https://rest.fra-01.braze.eu/users/track', + files: {}, + headers: { + Accept: 'application/json', + Authorization: 'Bearer dummyApiKey', + 'Content-Type': 'application/json', + }, + method: 'POST', + params: {}, + type: 'REST', + userId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + version: '1', + }, + statusCode: 200, + }, + ], + }, + }, + }, +]; diff --git a/test/integrations/destinations/braze/router/data.ts b/test/integrations/destinations/braze/router/data.ts new file mode 100644 index 0000000000..2e3be35b01 --- /dev/null +++ b/test/integrations/destinations/braze/router/data.ts @@ -0,0 +1,925 @@ +export const data = [ + { + name: 'braze', + description: 'simple router tests', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + dataCenter: 'eu-01', + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + metadata: { + jobId: 1, + }, + message: { + anonymousId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.5', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36', + }, + integrations: { + All: true, + }, + messageId: 'dd266c67-9199-4a52-ba32-f46ddde67312', + originalTimestamp: '2020-01-24T06:29:02.358Z', + properties: { + path: '/tests/html/index2.html', + referrer: '', + search: '', + title: '', + url: 'http://localhost/tests/html/index2.html', + }, + receivedAt: '2020-01-24T11:59:02.403+05:30', + request_ip: '[::1]:53708', + sentAt: '2020-01-24T06:29:02.359Z', + timestamp: '2020-01-24T11:59:02.402+05:30', + type: 'page', + userId: '', + }, + }, + { + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + dataCenter: 'us-01', + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + metadata: { + jobId: 2, + }, + message: { + anonymousId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.5', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + city: 'Disney', + country: 'USA', + email: 'mickey@disney.com', + firstname: 'Mickey', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36', + }, + integrations: { + All: true, + }, + messageId: '2536eda4-d638-4c93-8014-8ffe3f083214', + originalTimestamp: '2020-01-24T06:29:02.362Z', + receivedAt: '2020-01-24T11:59:02.403+05:30', + request_ip: '[::1]:53709', + sentAt: '2020-01-24T06:29:02.363Z', + timestamp: '2020-01-24T11:59:02.402+05:30', + type: 'identify', + userId: '', + }, + }, + { + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + dataCenter: 'us-01', + enableSubscriptionGroupInGroupCall: true, + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + metadata: { + jobId: 3, + }, + message: { + anonymousId: '56yrtsdfgbgxcb-22b4-401d-aae5-1b994be9a969', + groupId: 'c90f0fd2-2a02-4f2f-bf07-7e7d2c2ed2b1', + traits: { + phone: '5055077683', + subscriptionState: 'subscribed', + }, + userId: 'user123', + type: 'group', + }, + }, + { + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + dataCenter: 'us-01', + enableSubscriptionGroupInGroupCall: true, + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + metadata: { + jobId: 4, + }, + message: { + anonymousId: 'dfgdfgdfg-22b4-401d-aae5-1b994be9a969', + groupId: '58d0a278-b55b-4f10-b7d2-98d1c5dd4c30', + traits: { + phone: '5055077683', + subscriptionState: 'subscribed', + }, + userId: 'user877', + type: 'group', + }, + }, + { + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + dataCenter: 'us-01', + enableSubscriptionGroupInGroupCall: true, + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + metadata: { + jobId: 5, + }, + message: { + type: 'alias', + previousId: 'adsfsaf', + userId: 'dsafsdf', + }, + }, + { + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + dataCenter: 'us-01', + enableSubscriptionGroupInGroupCall: true, + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + metadata: { + jobId: 6, + }, + message: { + type: 'alias', + previousId: 'adsfsaf2', + userId: 'dsafsdf2', + }, + }, + ], + destType: 'braze', + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: [ + { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rest.fra-01.braze.eu/users/track', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + partner: 'RudderStack', + events: [ + { + name: 'Page Viewed', + time: '2020-01-24T11:59:02.402+05:30', + properties: { + path: '/tests/html/index2.html', + referrer: '', + search: '', + title: '', + url: 'http://localhost/tests/html/index2.html', + }, + _update_existing_only: false, + user_alias: { + alias_name: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + alias_label: 'rudder_id', + }, + }, + ], + attributes: [ + { + email: 'mickey@disney.com', + city: 'Disney', + country: 'USA', + firstname: 'Mickey', + _update_existing_only: false, + user_alias: { + alias_name: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + alias_label: 'rudder_id', + }, + }, + ], + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + }, + { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rest.fra-01.braze.eu/v2/subscription/status/set', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + subscription_groups: [ + { + external_id: ['user123'], + phones: ['5055077683'], + subscription_group_id: 'c90f0fd2-2a02-4f2f-bf07-7e7d2c2ed2b1', + subscription_state: 'subscribed', + }, + { + external_id: ['user877'], + phones: ['5055077683'], + subscription_group_id: '58d0a278-b55b-4f10-b7d2-98d1c5dd4c30', + subscription_state: 'subscribed', + }, + ], + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + }, + { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rest.fra-01.braze.eu/users/merge', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + merge_updates: [ + { + identifier_to_keep: { + external_id: 'dsafsdf', + }, + identifier_to_merge: { + external_id: 'adsfsaf', + }, + }, + { + identifier_to_keep: { + external_id: 'dsafsdf2', + }, + identifier_to_merge: { + external_id: 'adsfsaf2', + }, + }, + ], + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + }, + ], + metadata: [ + { + jobId: 1, + }, + { + jobId: 2, + }, + { + jobId: 3, + }, + { + jobId: 4, + }, + { + jobId: 5, + }, + { + jobId: 6, + }, + ], + batched: true, + statusCode: 200, + destination: { + Config: { + restApiKey: 'dummyApiKey', + prefixProperties: true, + useNativeSDK: false, + dataCenter: 'eu-01', + }, + DestinationDefinition: { + DisplayName: 'Braze', + ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', + Name: 'BRAZE', + }, + Enabled: true, + ID: '1WhcOCGgj9asZu850HvugU2C3Aq', + Name: 'Braze', + Transformations: [], + }, + }, + ], + }, + }, + }, + }, + { + name: 'braze', + description: 'dedup enabled router tests', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + destination: { + ID: '2N9UakqKF0D35wfzSeofIxPdL8X', + Name: 'Braze-Test', + Config: { + appKey: '0e5440c3-226b-45d0-91b5-c64da56cde16', + blacklistedEvents: [], + dataCenter: 'US-03', + enableNestedArrayOperations: false, + enableSubscriptionGroupInGroupCall: false, + eventFilteringOption: 'disable', + oneTrustCookieCategories: [], + restApiKey: 'dummyApiKey', + supportDedup: true, + trackAnonymousUser: true, + whitelistedEvents: [], + }, + Enabled: true, + WorkspaceID: '27O0bhB6p5ehfOWeeZlOSsSDTLg', + Transformations: [], + IsProcessorEnabled: true, + RevisionID: '2N9Uaf2tWq2QRmatBWQm03Rz6qX', + }, + metadata: { + jobId: 1, + }, + message: { + type: 'track', + event: 'Sign In Completed', + sentAt: '2023-03-10T18:36:04.738Z', + userId: 'braze_test_user', + channel: 'web', + context: { + locale: 'en-US', + traits: { + subscribe_once: true, + pwa: true, + email: 'jackson24miranda@gmail.com', + lastName: 'Miranda', + firstName: 'Spencer', + is_registered: true, + last_identify: 'GOOGLE_SIGN_IN', + account_region: 'ON', + is_pickup_selected: 'false', + has_tradein_attempt: false, + custom_obj_attr: { + key1: 'value1', + key2: 'value2', + key4: 'value4', + }, + custom_arr: [1, 2, 'str1'], + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '2.9.5', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36', + }, + rudderId: '4118560d-e4fc-4fd1-a734-9c69eae2c047', + messageId: '1a342814-a882-4b65-9cc9-347544997268', + timestamp: '2023-03-10T18:36:05.028Z', + properties: { + cause: '/redirector', + method: 'GOOGLE', + region: 'ON', + orderId: '6179367977099', + order_id: '6179367977099', + webhookurl: 'https://my.test.com', + countingMethod: 'standard', + is_first_time_signin: false, + }, + receivedAt: '2023-03-18T01:41:42.257+05:30', + request_ip: '[::1]', + anonymousId: '77e278c9-e984-4cdd-950c-cd0b61befd03', + originalTimestamp: '2023-03-10T18:36:04.733Z', + }, + }, + { + destination: { + ID: '2N9UakqKF0D35wfzSeofIxPdL8X', + Name: 'Braze-Test', + Config: { + appKey: '0e5440c3-226b-45d0-91b5-c64da56cde16', + blacklistedEvents: [], + dataCenter: 'US-03', + enableNestedArrayOperations: false, + enableSubscriptionGroupInGroupCall: false, + eventFilteringOption: 'disable', + oneTrustCookieCategories: [], + restApiKey: 'dummyApiKey', + supportDedup: true, + trackAnonymousUser: true, + whitelistedEvents: [], + }, + Enabled: true, + WorkspaceID: '27O0bhB6p5ehfOWeeZlOSsSDTLg', + Transformations: [], + IsProcessorEnabled: true, + RevisionID: '2N9Uaf2tWq2QRmatBWQm03Rz6qX', + }, + metadata: { + jobId: 2, + }, + message: { + type: 'track', + event: 'Sign In Completed', + sentAt: '2023-03-10T18:36:04.738Z', + userId: 'braze_test_user', + channel: 'web', + context: { + locale: 'en-US', + traits: { + subscribe_once: true, + pwa: true, + email: 'jackson24miranda@gmail.com', + lastName: 'Miranda 2', + firstName: 'Spencer', + is_registered: true, + last_identify: 'GOOGLE_SIGN_IN', + account_region: 'ON', + is_pickup_selected: 'true', + has_tradein_attempt: false, + custom_obj_attr: { + key1: 'value1', + key2: 'value2', + key4: 'value4', + }, + custom_arr: ['1', '2', 'str1'], + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '2.9.5', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36', + }, + rudderId: '4118560d-e4fc-4fd1-a734-9c69eae2c047', + messageId: '1a342814-a882-4b65-9cc9-347544997268', + timestamp: '2023-03-10T18:36:05.028Z', + properties: { + cause: '/redirector', + method: 'GOOGLE', + region: 'ON', + orderId: '6179367977099', + order_id: '6179367977099', + webhookurl: 'https://my.test.com', + countingMethod: 'standard', + is_first_time_signin: false, + }, + receivedAt: '2023-03-18T01:41:42.257+05:30', + request_ip: '[::1]', + anonymousId: '77e278c9-e984-4cdd-950c-cd0b61befd03', + originalTimestamp: '2023-03-10T18:36:04.733Z', + }, + }, + { + destination: { + ID: '2N9UakqKF0D35wfzSeofIxPdL8X', + Name: 'Braze-Test', + Config: { + appKey: '0e5440c3-226b-45d0-91b5-c64da56cde16', + blacklistedEvents: [], + dataCenter: 'US-03', + enableNestedArrayOperations: false, + enableSubscriptionGroupInGroupCall: false, + eventFilteringOption: 'disable', + oneTrustCookieCategories: [], + restApiKey: 'dummyApiKey', + supportDedup: true, + trackAnonymousUser: true, + whitelistedEvents: [], + }, + Enabled: true, + WorkspaceID: '27O0bhB6p5ehfOWeeZlOSsSDTLg', + Transformations: [], + IsProcessorEnabled: true, + RevisionID: '2N9Uaf2tWq2QRmatBWQm03Rz6qX', + }, + metadata: { + jobId: 3, + }, + message: { + anonymousId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.5', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + city: 'Disney', + country: 'USA', + email: 'mickey@disney.com', + firstName: 'Mickey', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36', + }, + integrations: { + All: true, + }, + messageId: '2536eda4-d638-4c93-8014-8ffe3f083214', + type: 'identify', + userId: 'user@50', + }, + }, + { + destination: { + ID: '2N9UakqKF0D35wfzSeofIxPdL8X', + Name: 'Braze-Test', + Config: { + appKey: '0e5440c3-226b-45d0-91b5-c64da56cde16', + blacklistedEvents: [], + dataCenter: 'US-03', + enableNestedArrayOperations: false, + enableSubscriptionGroupInGroupCall: false, + eventFilteringOption: 'disable', + oneTrustCookieCategories: [], + restApiKey: 'dummyApiKey', + supportDedup: true, + trackAnonymousUser: true, + whitelistedEvents: [], + }, + Enabled: true, + WorkspaceID: '27O0bhB6p5ehfOWeeZlOSsSDTLg', + Transformations: [], + IsProcessorEnabled: true, + RevisionID: '2N9Uaf2tWq2QRmatBWQm03Rz6qX', + }, + metadata: { + jobId: 4, + }, + message: { + anonymousId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.5', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + city: 'Disney', + country: 'USA', + email: 'mickey@disney.com', + firstName: 'Mickey', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36', + }, + integrations: { + All: true, + }, + messageId: '2536eda4-d638-4c93-8014-8ffe3f083214', + type: 'identify', + userId: 'user@50', + }, + }, + ], + destType: 'braze', + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: [ + { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rest.iad-03.braze.com/users/track', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + partner: 'RudderStack', + attributes: [ + { + first_name: 'Spencer', + subscribe_once: true, + pwa: true, + external_id: 'braze_test_user', + custom_obj_attr: { + key1: 'value1', + key2: 'value2', + key4: 'value4', + }, + }, + { + last_name: 'Miranda 2', + is_pickup_selected: 'true', + external_id: 'braze_test_user', + custom_arr: ['1', '2', 'str1'], + }, + { + city: 'Disney', + country: 'USA', + email: 'mickey@disney.com', + external_id: 'user@50', + first_name: 'Mickey', + }, + ], + events: [ + { + name: 'Sign In Completed', + time: '2023-03-10T18:36:05.028Z', + properties: { + cause: '/redirector', + method: 'GOOGLE', + region: 'ON', + orderId: '6179367977099', + order_id: '6179367977099', + webhookurl: 'https://my.test.com', + countingMethod: 'standard', + is_first_time_signin: false, + }, + external_id: 'braze_test_user', + }, + { + name: 'Sign In Completed', + time: '2023-03-10T18:36:05.028Z', + properties: { + cause: '/redirector', + method: 'GOOGLE', + region: 'ON', + orderId: '6179367977099', + order_id: '6179367977099', + webhookurl: 'https://my.test.com', + countingMethod: 'standard', + is_first_time_signin: false, + }, + external_id: 'braze_test_user', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + ], + metadata: [ + { + jobId: 1, + }, + { + jobId: 2, + }, + { + jobId: 3, + }, + ], + batched: true, + statusCode: 200, + destination: { + ID: '2N9UakqKF0D35wfzSeofIxPdL8X', + Name: 'Braze-Test', + Config: { + appKey: '0e5440c3-226b-45d0-91b5-c64da56cde16', + blacklistedEvents: [], + dataCenter: 'US-03', + enableNestedArrayOperations: false, + enableSubscriptionGroupInGroupCall: false, + eventFilteringOption: 'disable', + oneTrustCookieCategories: [], + restApiKey: 'dummyApiKey', + supportDedup: true, + trackAnonymousUser: true, + whitelistedEvents: [], + }, + Enabled: true, + WorkspaceID: '27O0bhB6p5ehfOWeeZlOSsSDTLg', + Transformations: [], + IsProcessorEnabled: true, + RevisionID: '2N9Uaf2tWq2QRmatBWQm03Rz6qX', + }, + }, + { + error: '[Braze Deduplication]: Duplicate user detected, the user is dropped', + statTags: { + destType: 'BRAZE', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'router', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + batched: false, + metadata: [ + { + jobId: 4, + }, + ], + destination: { + ID: '2N9UakqKF0D35wfzSeofIxPdL8X', + Name: 'Braze-Test', + Config: { + appKey: '0e5440c3-226b-45d0-91b5-c64da56cde16', + blacklistedEvents: [], + dataCenter: 'US-03', + enableNestedArrayOperations: false, + enableSubscriptionGroupInGroupCall: false, + eventFilteringOption: 'disable', + oneTrustCookieCategories: [], + restApiKey: 'dummyApiKey', + supportDedup: true, + trackAnonymousUser: true, + whitelistedEvents: [], + }, + Enabled: true, + WorkspaceID: '27O0bhB6p5ehfOWeeZlOSsSDTLg', + Transformations: [], + IsProcessorEnabled: true, + RevisionID: '2N9Uaf2tWq2QRmatBWQm03Rz6qX', + }, + }, + ], + }, + }, + }, + }, +]; diff --git a/test/integrations/destinations/clevertap/processor/data.ts b/test/integrations/destinations/clevertap/processor/data.ts new file mode 100644 index 0000000000..d79ebaa8da --- /dev/null +++ b/test/integrations/destinations/clevertap/processor/data.ts @@ -0,0 +1,2427 @@ +export const data = [ + { + name: 'clevertap', + description: 'Test 0', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + passcode: 'sample_passcode', + accountId: '476550467', + trackAnonymous: true, + enableObjectIdMapping: false, + }, + }, + message: { + channel: 'web', + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: 'anon_id', + type: 'identify', + traits: { + anonymousId: 'anon_id', + email: 'jamesDoe@gmail.com', + name: 'James Doe', + phone: '92374162212', + gender: 'M', + employed: true, + birthday: '1614775793', + education: 'Science', + graduate: true, + married: true, + customerType: 'Prime', + msg_push: true, + msgSms: true, + msgemail: true, + msgwhatsapp: false, + custom_tags: ['Test_User', 'Interested_User', 'DIY_Hobby'], + custom_mappings: { + Office: 'Trastkiv', + Country: 'Russia', + }, + address: { + city: 'kolkata', + country: 'India', + postalCode: 789223, + state: 'WB', + street: '', + }, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.clevertap.com/1/upload', + headers: { + 'X-CleverTap-Account-Id': '476550467', + 'X-CleverTap-Passcode': 'sample_passcode', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + d: [ + { + type: 'profile', + profileData: { + Email: 'jamesDoe@gmail.com', + Name: 'James Doe', + Phone: '92374162212', + Gender: 'M', + Employed: true, + DOB: '1614775793', + Education: 'Science', + Married: true, + 'Customer Type': 'Prime', + graduate: true, + msg_push: true, + msgSms: true, + msgemail: true, + msgwhatsapp: false, + custom_tags: '["Test_User","Interested_User","DIY_Hobby"]', + custom_mappings: '{"Office":"Trastkiv","Country":"Russia"}', + address: + '{"city":"kolkata","country":"India","postalCode":789223,"state":"WB","street":""}', + }, + identity: 'anon_id', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'clevertap', + description: 'Test 1', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + passcode: 'sample_passcode', + accountId: '476550467', + trackAnonymous: true, + enableObjectIdMapping: false, + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: 'anon_id', + type: 'identify', + traits: { + anonymousId: 'anon_id', + email: 'jamesDoe@gmail.com', + name: 'James Doe', + phone: '92374162212', + gender: 'M', + employed: true, + birthday: '1614775793', + education: 'Science', + graduate: true, + married: true, + customerType: 'Prime', + msg_push: true, + msgSms: true, + msgemail: true, + msgwhatsapp: false, + custom_tags: ['Test_User', 'Interested_User', 'DIY_Hobby'], + custom_mappings: { + Office: 'Trastkiv', + Country: 'Russia', + }, + address: { + city: 'kolkata', + country: 'India', + postalCode: 789223, + state: 'WB', + street: '', + }, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.clevertap.com/1/upload', + headers: { + 'X-CleverTap-Account-Id': '476550467', + 'X-CleverTap-Passcode': 'sample_passcode', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + d: [ + { + type: 'profile', + profileData: { + Email: 'jamesDoe@gmail.com', + Name: 'James Doe', + Phone: '92374162212', + Gender: 'M', + Employed: true, + DOB: '1614775793', + Education: 'Science', + Married: true, + 'Customer Type': 'Prime', + graduate: true, + msg_push: true, + msgSms: true, + msgemail: true, + msgwhatsapp: false, + custom_tags: '["Test_User","Interested_User","DIY_Hobby"]', + custom_mappings: '{"Office":"Trastkiv","Country":"Russia"}', + address: + '{"city":"kolkata","country":"India","postalCode":789223,"state":"WB","street":""}', + }, + identity: 'anon_id', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'clevertap', + description: 'Test 2', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + passcode: 'sample_passcode', + accountId: '476550467', + trackAnonymous: true, + enableObjectIdMapping: false, + }, + }, + message: { + type: 'page', + anonymousId: 'anon-id-new', + name: 'Rudder', + properties: { + title: 'Home', + path: '/', + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.clevertap.com/1/upload', + headers: { + 'X-CleverTap-Account-Id': '476550467', + 'X-CleverTap-Passcode': 'sample_passcode', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + d: [ + { + evtName: 'Web Page Viewed: Rudder', + evtData: { + title: 'Home', + path: '/', + }, + type: 'event', + identity: 'anon-id-new', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'clevertap', + description: 'Test 3', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + passcode: 'sample_passcode', + accountId: '476550467', + trackAnonymous: true, + enableObjectIdMapping: false, + }, + }, + message: { + type: 'screen', + userId: 'identified_user_id', + name: 'Rudder-Screen', + properties: { + prop1: '5', + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.clevertap.com/1/upload', + headers: { + 'X-CleverTap-Account-Id': '476550467', + 'X-CleverTap-Passcode': 'sample_passcode', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + d: [ + { + evtName: 'Screen Viewed: Rudder-Screen', + evtData: { + prop1: '5', + }, + type: 'event', + identity: 'identified_user_id', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'clevertap', + description: 'Test 4', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + passcode: 'sample_passcode', + accountId: '476550467', + trackAnonymous: true, + enableObjectIdMapping: false, + }, + }, + message: { + type: 'track', + userId: 'user123', + event: 'Product Purchased', + properties: { + name: "Rubik's Cube", + revenue: 4.99, + }, + context: { + ip: '14.5.67.21', + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.clevertap.com/1/upload', + headers: { + 'X-CleverTap-Account-Id': '476550467', + 'X-CleverTap-Passcode': 'sample_passcode', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + d: [ + { + evtName: 'Product Purchased', + evtData: { + name: "Rubik's Cube", + revenue: 4.99, + }, + type: 'event', + identity: 'user123', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'clevertap', + description: 'Test 5: ERROR - Message Type is not present. Aborting message.', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + passcode: 'sample_passcode', + accountId: '476550467', + trackAnonymous: true, + enableObjectIdMapping: false, + }, + }, + message: { + userId: 'user1234', + event: 'FailTest', + properties: { + name: 'Random', + revenue: 4.99, + }, + context: { + ip: '14.5.67.21', + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: 'Message Type is not present. Aborting message.', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'CLEVERTAP', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'clevertap', + description: 'Test 6: ERROR - Message type not supported', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + passcode: 'sample_passcode', + accountId: '476550467', + trackAnonymous: true, + enableObjectIdMapping: false, + }, + }, + message: { + type: 'Rndm', + userId: 'user1234', + event: 'FailTest', + properties: { + name: 'Random2', + revenue: 4.99, + }, + context: { + ip: '14.5.67.21', + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: 'Message type not supported', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'CLEVERTAP', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'clevertap', + description: 'Test 7', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + passcode: 'sample_passcode', + accountId: '476550467', + trackAnonymous: true, + enableObjectIdMapping: false, + }, + }, + message: { + type: 'track', + event: 'Order Completed', + sentAt: '2021-03-10T11:59:57.815Z', + userId: 'riverjohn', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.13', + namespace: 'com.rudderlabs.javascript', + }, + page: { + url: 'http://127.0.0.1:5500/test.html', + path: '/test.html', + title: 'sample source', + search: '', + referrer: 'http://127.0.0.1:5500/', + referring_domain: '127.0.0.1:5500', + }, + locale: 'en-US', + screen: { + density: 2, + }, + traits: { + email: 'riverjohn@gmail.com', + phone: '+12345678900', + avatar: 'https://homepages.cae.wisc.edu/~ece533/images/airplane.png', + testIng: true, + lastName: 'John', + firstname: 'River', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.13', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:86.0) Gecko/20100101 Firefox/86.0', + }, + rudderId: 'fd5d3d37-3ce6-471d-b416-2f351212a44f', + messageId: '8ff6fd1b-b381-43fc-883c-92bf8eb0e725', + properties: { + tax: 1, + total: 20, + coupon: 'ImagePro', + revenue: 15, + currency: 'USD', + discount: 1.5, + order_id: '1234', + ts: '2021-03-10T11:59:22.080Z', + products: [ + { + sku: 'G-32', + url: 'https://www.website.com/product/path', + name: 'Monopoly', + price: 14, + category: 'Games', + quantity: 1, + image_url: 'https://www.website.com/product/path.jpg', + product_id: '123', + }, + { + sku: 'F-32', + name: 'UNO', + price: 3.45, + category: 'Games', + quantity: 2, + product_id: '345', + }, + ], + shipping: 22, + affiliation: 'Apple Store', + checkout_id: '12345', + }, + anonymousId: 'b2e06708-dd2a-4aee-bb32-41855d2fbdab', + integrations: { + All: true, + }, + originalTimestamp: '2021-03-10T11:59:22.080Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.clevertap.com/1/upload', + headers: { + 'X-CleverTap-Account-Id': '476550467', + 'X-CleverTap-Passcode': 'sample_passcode', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + d: [ + { + evtName: 'Charged', + evtData: { + 'Charged ID': '12345', + Amount: 15, + Items: [ + { + sku: 'G-32', + url: 'https://www.website.com/product/path', + name: 'Monopoly', + price: 14, + category: 'Games', + quantity: 1, + image_url: 'https://www.website.com/product/path.jpg', + product_id: '123', + }, + { + sku: 'F-32', + name: 'UNO', + price: 3.45, + category: 'Games', + quantity: 2, + product_id: '345', + }, + ], + tax: 1, + total: 20, + coupon: 'ImagePro', + currency: 'USD', + discount: 1.5, + order_id: '1234', + shipping: 22, + affiliation: 'Apple Store', + }, + ts: 1615377562, + type: 'event', + identity: 'riverjohn', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'clevertap', + description: 'Test 8: ERROR - userId, not present cannot track anonymous user', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + passcode: 'sample_passcode', + accountId: '476550467', + trackAnonymous: false, + enableObjectIdMapping: false, + }, + }, + message: { + type: 'track', + anonymousId: 'random_anon_id', + event: 'FailTest_with_anon', + properties: { + name: 'Random2', + revenue: 4.99, + }, + context: { + ip: '14.5.67.21', + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: 'userId, not present cannot track anonymous user', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'CLEVERTAP', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'clevertap', + description: 'Test 9', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + passcode: 'sample_passcode', + accountId: '476550467', + trackAnonymous: true, + enableObjectIdMapping: false, + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: 'anon_id', + type: 'identify', + traits: { + anonymousId: 'anon_id', + email: 'jamesDoe@gmail.com', + name: 'James Doe', + phone: '92374162212', + gender: 'female', + employed: true, + birthday: '1614775793', + education: 'Science', + graduate: true, + married: true, + customerType: 'Prime', + msg_push: true, + msgSms: true, + msgemail: true, + msgwhatsapp: false, + custom_tags: ['Test_User', 'Interested_User', 'DIY_Hobby'], + custom_mappings: { + Office: 'Trastkiv', + Country: 'Russia', + }, + address: { + city: 'kolkata', + country: 'India', + postalCode: 789223, + state: 'WB', + street: '', + }, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.clevertap.com/1/upload', + headers: { + 'X-CleverTap-Account-Id': '476550467', + 'X-CleverTap-Passcode': 'sample_passcode', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + d: [ + { + type: 'profile', + profileData: { + Email: 'jamesDoe@gmail.com', + Name: 'James Doe', + Phone: '92374162212', + Gender: 'F', + Employed: true, + DOB: '1614775793', + Education: 'Science', + Married: true, + 'Customer Type': 'Prime', + graduate: true, + msg_push: true, + msgSms: true, + msgemail: true, + msgwhatsapp: false, + custom_tags: '["Test_User","Interested_User","DIY_Hobby"]', + custom_mappings: '{"Office":"Trastkiv","Country":"Russia"}', + address: + '{"city":"kolkata","country":"India","postalCode":789223,"state":"WB","street":""}', + }, + identity: 'anon_id', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'clevertap', + description: 'Test 10', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + passcode: 'sample_passcode', + accountId: '476550467', + trackAnonymous: true, + enableObjectIdMapping: false, + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: 'anon_id', + type: 'identify', + traits: { + anonymousId: 'anon_id', + email: 'jamesDoe@gmail.com', + name: 'James Doe', + phone: '92374162212', + gender: 'other', + employed: true, + birthday: '1614775793', + education: 'Science', + graduate: true, + married: true, + customerType: 'Prime', + msg_push: true, + msgSms: true, + msgemail: true, + msgwhatsapp: false, + custom_tags: ['Test_User', 'Interested_User', 'DIY_Hobby'], + custom_mappings: { + Office: 'Trastkiv', + Country: 'Russia', + }, + address: { + city: 'kolkata', + country: 'India', + postalCode: 789223, + state: 'WB', + street: '', + }, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.clevertap.com/1/upload', + headers: { + 'X-CleverTap-Account-Id': '476550467', + 'X-CleverTap-Passcode': 'sample_passcode', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + d: [ + { + type: 'profile', + profileData: { + Email: 'jamesDoe@gmail.com', + Name: 'James Doe', + Phone: '92374162212', + Employed: true, + DOB: '1614775793', + Education: 'Science', + Married: true, + 'Customer Type': 'Prime', + graduate: true, + msg_push: true, + msgSms: true, + msgemail: true, + msgwhatsapp: false, + custom_tags: '["Test_User","Interested_User","DIY_Hobby"]', + custom_mappings: '{"Office":"Trastkiv","Country":"Russia"}', + address: + '{"city":"kolkata","country":"India","postalCode":789223,"state":"WB","street":""}', + }, + identity: 'anon_id', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'clevertap', + description: 'Test 11', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + passcode: 'sample_passcode', + accountId: '476550467', + trackAnonymous: true, + enableObjectIdMapping: true, + }, + }, + message: { + type: 'identify', + event: 'identify', + sentAt: '2021-05-24T08:53:38.762Z', + userId: 'useran4', + channel: 'mobile', + context: { + os: { + name: 'Android', + version: '10', + }, + app: { + name: 'myfirstapp', + build: '1', + version: '1.0', + namespace: 'com.example.myfirstapp', + }, + device: { + id: 'f54bb572361c4fd1', + name: 'whyred', + type: 'Android', + model: 'Redmi Note 5 Pro', + manufacturer: 'Xiaomi', + token: 'frfsgvrwe:APfdsafsgdfsgghfgfgjkhfsfgdhjhbvcvnetry767456fxsasdf', + }, + locale: 'en-IN', + screen: { + width: 1080, + height: 2118, + density: 420, + }, + traits: { + id: 'useran4', + email: 'tony4an@testmail.com', + phone: '4444457700', + userId: 'useran4', + lastname: 'Stark', + firstname: 'Tony4AN', + anonymousId: 'f54bb572361c4fd1', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.12', + }, + network: { + wifi: true, + carrier: 'airtel', + cellular: true, + bluetooth: false, + }, + timezone: 'Asia/Kolkata', + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 10; Redmi Note 5 Pro Build/QQ3A.200805.001)', + }, + rudderId: 'd8dd4917-bdb2-4c17-8f62-24c79d87a937', + messageId: '1621846417928-7fbb739f-5f96-48ca-9ebb-5bfc4076a687', + anonymousId: 'f54bb572361c4fd1', + integrations: { + All: true, + }, + originalTimestamp: '2021-05-24T08:53:37.929Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.clevertap.com/1/upload', + headers: { + 'X-CleverTap-Account-Id': '476550467', + 'X-CleverTap-Passcode': 'sample_passcode', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + d: [ + { + type: 'profile', + profileData: { + Email: 'tony4an@testmail.com', + Phone: '4444457700', + Name: 'Tony4AN Stark', + identity: 'useran4', + }, + objectId: 'f54bb572361c4fd1', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.clevertap.com/1/upload', + headers: { + 'X-CleverTap-Account-Id': '476550467', + 'X-CleverTap-Passcode': 'sample_passcode', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + d: [ + { + type: 'token', + tokenData: { + id: 'frfsgvrwe:APfdsafsgdfsgghfgfgjkhfsfgdhjhbvcvnetry767456fxsasdf', + type: 'fcm', + }, + objectId: 'f54bb572361c4fd1', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'clevertap', + description: 'Test 12', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + passcode: 'sample_passcode', + accountId: '476550467', + trackAnonymous: true, + enableObjectIdMapping: true, + }, + }, + message: { + type: 'identify', + event: 'identify', + sentAt: '2021-04-21T12:05:42.383Z', + userId: 'ankur4', + channel: 'mobile', + context: { + os: { + name: 'iOS', + version: '13.0', + }, + app: { + name: 'Rudder-CleverTap_Example', + build: '1.0', + version: '1.0', + namespace: 'org.cocoapods.demo.Rudder-CleverTap-Example', + }, + device: { + id: 'cd3a4439-7df0-4475-acb9-6659c7c4dfe3', + name: 'iPhone 11 Pro Max', + type: 'iOS', + model: 'iPhone', + manufacturer: 'Apple', + token: 'frfsgvrwe:APfdsafsgdfsgghfgfgjkhfsfgdhjhbvcvnetry767456fxsasdf', + }, + locale: 'en-US', + screen: { + width: 896, + height: 414, + density: 3, + }, + traits: { + name: 'Ankur4 Mittal', + email: 'ankur4gmail', + phone: '8260294239', + userId: 'ankur4', + }, + library: { + name: 'rudder-ios-library', + version: '1.0.11', + }, + network: { + wifi: true, + carrier: 'unavailable', + cellular: false, + bluetooth: false, + }, + timezone: 'Asia/Kolkata', + userAgent: 'unknown', + }, + rudderId: 'f5bb9c22-4987-4ef2-9b58-52788035ffb7', + messageId: '1619006730-60fa60c0-3c77-4de7-95d4-e7dc58214947', + integrations: { + All: true, + }, + originalTimestamp: '2021-04-21T12:05:30.330Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.clevertap.com/1/upload', + headers: { + 'X-CleverTap-Account-Id': '476550467', + 'X-CleverTap-Passcode': 'sample_passcode', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + d: [ + { + type: 'profile', + profileData: { + Email: 'ankur4gmail', + Name: 'Ankur4 Mittal', + Phone: '8260294239', + }, + identity: 'ankur4', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'clevertap', + description: 'Test 13', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + passcode: 'sample_passcode', + accountId: '476550467', + trackAnonymous: true, + enableObjectIdMapping: true, + }, + }, + message: { + event: 'Random', + properties: { + country_region: 'India', + test: 'abc', + }, + receivedAt: '2021-08-20T12:49:07.691Z', + rudderId: '138c4214-b537-4f77-9dea-9abde70b5147', + type: 'track', + anonymousId: 'cd3a4439-7df0-4475-acb9-6659c7c4dfe3', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.clevertap.com/1/upload', + headers: { + 'X-CleverTap-Account-Id': '476550467', + 'X-CleverTap-Passcode': 'sample_passcode', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + d: [ + { + evtName: 'Random', + evtData: { + country_region: 'India', + test: 'abc', + }, + type: 'event', + objectId: 'cd3a4439-7df0-4475-acb9-6659c7c4dfe3', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'clevertap', + description: 'Test 14', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + passcode: 'sample_passcode', + accountId: '476550467', + trackAnonymous: true, + enableObjectIdMapping: true, + }, + }, + message: { + event: 'Random 2', + properties: { + country_region: 'India', + test: 'abc', + }, + receivedAt: '2021-08-20T12:49:07.691Z', + rudderId: '138c4214-b537-4f77-9dea-9abde70b5147', + type: 'track', + userId: 'ankur4', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.clevertap.com/1/upload', + headers: { + 'X-CleverTap-Account-Id': '476550467', + 'X-CleverTap-Passcode': 'sample_passcode', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + d: [ + { + evtName: 'Random 2', + evtData: { + country_region: 'India', + test: 'abc', + }, + type: 'event', + identity: 'ankur4', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'clevertap', + description: 'Test 15', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + passcode: 'sample_passcode', + accountId: '476550467', + trackAnonymous: true, + enableObjectIdMapping: false, + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: 'anon_id', + type: 'identify', + traits: { + anonymousId: 'anon_id', + email: 'jamesDoe@gmail.com', + name: 'James Doe', + phone: '92374162212', + gender: 'M', + employed: true, + birthday: '1614775793', + education: 'Science', + graduate: true, + married: true, + customerType: 'Prime', + ts: '2021-03-10T11:59:22.080Z', + msg_push: true, + msgSms: true, + msgemail: true, + msgwhatsapp: false, + custom_tags: ['Test_User', 'Interested_User', 'DIY_Hobby'], + custom_mappings: { + Office: 'Trastkiv', + Country: 'Russia', + }, + address: { + city: 'kolkata', + country: 'India', + postalCode: 789223, + state: 'WB', + street: '', + }, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.clevertap.com/1/upload', + headers: { + 'X-CleverTap-Account-Id': '476550467', + 'X-CleverTap-Passcode': 'sample_passcode', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + d: [ + { + type: 'profile', + profileData: { + Email: 'jamesDoe@gmail.com', + Name: 'James Doe', + Phone: '92374162212', + Gender: 'M', + Employed: true, + DOB: '1614775793', + Education: 'Science', + Married: true, + 'Customer Type': 'Prime', + graduate: true, + msg_push: true, + msgSms: true, + msgemail: true, + msgwhatsapp: false, + custom_tags: '["Test_User","Interested_User","DIY_Hobby"]', + custom_mappings: '{"Office":"Trastkiv","Country":"Russia"}', + address: + '{"city":"kolkata","country":"India","postalCode":789223,"state":"WB","street":""}', + }, + ts: 1615377562, + identity: 'anon_id', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'clevertap', + description: 'Test 16', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + passcode: 'sample_passcode', + accountId: '476550467', + trackAnonymous: true, + enableObjectIdMapping: true, + }, + }, + message: { + type: 'identify', + event: 'identify', + sentAt: '2021-05-24T08:53:38.762Z', + userId: 'useran4', + channel: 'mobile', + context: { + os: { + name: 'watchos', + }, + app: { + name: 'myfirstapp', + build: '1', + version: '1.0', + namespace: 'com.example.myfirstapp', + }, + device: { + id: 'cd3a4439-7df0-4475-acb9-6659c7c4dfe3', + type: 'watchos', + manufacturer: 'Apple', + token: 'frfsgvrwe:APfdsafsgdfsgghfgfgjkhfsfgdhjhbvcvnetry767456fxsasdf', + }, + locale: 'en-IN', + screen: { + width: 1080, + height: 2118, + density: 420, + }, + traits: { + id: 'useran4', + email: 'tony4an@testmail.com', + phone: '4444457700', + userId: 'useran4', + lastname: 'Stark', + firstname: 'Tony4AN', + anonymousId: 'f54bb572361c4fd1', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.12', + }, + network: { + wifi: true, + carrier: 'airtel', + cellular: true, + bluetooth: false, + }, + timezone: 'Asia/Kolkata', + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 10; Redmi Note 5 Pro Build/QQ3A.200805.001)', + }, + rudderId: 'd8dd4917-bdb2-4c17-8f62-24c79d87a937', + messageId: '1621846417928-7fbb739f-5f96-48ca-9ebb-5bfc4076a687', + anonymousId: 'f54bb572361c4fd1', + integrations: { + All: true, + }, + originalTimestamp: '2021-05-24T08:53:37.929Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.clevertap.com/1/upload', + headers: { + 'X-CleverTap-Account-Id': '476550467', + 'X-CleverTap-Passcode': 'sample_passcode', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + d: [ + { + type: 'profile', + profileData: { + Email: 'tony4an@testmail.com', + Phone: '4444457700', + Name: 'Tony4AN Stark', + identity: 'useran4', + }, + objectId: 'f54bb572361c4fd1', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.clevertap.com/1/upload', + headers: { + 'X-CleverTap-Account-Id': '476550467', + 'X-CleverTap-Passcode': 'sample_passcode', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + d: [ + { + type: 'token', + tokenData: { + id: 'frfsgvrwe:APfdsafsgdfsgghfgfgjkhfsfgdhjhbvcvnetry767456fxsasdf', + type: 'apns', + }, + objectId: 'f54bb572361c4fd1', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'clevertap', + description: 'Test 17', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + passcode: 'sample_passcode', + accountId: '476550467', + trackAnonymous: true, + enableObjectIdMapping: true, + }, + }, + message: { + type: 'alias', + userId: 'newaddedid001', + context: { + traits: { + ts: 1468308340, + }, + }, + rudderId: 'a8556b1b-9d11-478d-9242-be124d1f0c93', + messageId: '46c1a69c-cc24-4a49-8079-3fcbabf15eb8', + previousId: '1122121', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.clevertap.com/1/upload', + headers: { + 'X-CleverTap-Account-Id': '476550467', + 'X-CleverTap-Passcode': 'sample_passcode', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + d: [ + { + type: 'profile', + profileData: { + identity: 'newaddedid001', + }, + ts: 1468308340, + identity: '1122121', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'clevertap', + description: 'Test 18', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + passcode: 'sample_passcode', + accountId: '476550467', + trackAnonymous: true, + enableObjectIdMapping: false, + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: 'anon_id', + type: 'identify', + traits: { + anonymousId: 'anon_id', + email: 'johnDoe@gmail.com', + first_name: 'John', + last_name: 'Doe', + phone: '92374162212', + gender: 'M', + employed: true, + birthday: '1614775793', + education: 'Science', + graduate: true, + married: true, + customerType: 'Prime', + msg_push: true, + msgSms: true, + msgemail: true, + msgwhatsapp: false, + custom_tags: ['Test_User', 'Interested_User', 'DIY_Hobby'], + custom_mappings: { + Office: 'Trastkiv', + Country: 'Russia', + }, + address: { + city: 'kolkata', + country: 'India', + postalCode: 789223, + state: 'WB', + street: '', + }, + overrideFields: { + first_name: 'John', + last_name: 'Doe', + }, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.clevertap.com/1/upload', + headers: { + 'X-CleverTap-Account-Id': '476550467', + 'X-CleverTap-Passcode': 'sample_passcode', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + d: [ + { + type: 'profile', + profileData: { + Email: 'johnDoe@gmail.com', + Phone: '92374162212', + Gender: 'M', + Employed: true, + DOB: '1614775793', + Education: 'Science', + Married: true, + 'Customer Type': 'Prime', + Name: 'John Doe', + graduate: true, + msg_push: true, + msgSms: true, + msgemail: true, + msgwhatsapp: false, + custom_tags: '["Test_User","Interested_User","DIY_Hobby"]', + custom_mappings: '{"Office":"Trastkiv","Country":"Russia"}', + address: + '{"city":"kolkata","country":"India","postalCode":789223,"state":"WB","street":""}', + first_name: 'John', + last_name: 'Doe', + }, + identity: 'anon_id', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'clevertap', + description: 'Test 19', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + passcode: 'sample_passcode', + accountId: '476550467', + trackAnonymous: true, + enableObjectIdMapping: false, + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + overrideFields: { + first_name: 'John', + last_name: 'Doe', + }, + }, + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: 'anon_id', + type: 'identify', + traits: { + anonymousId: 'anon_id', + email: 'johnDoe@gmail.com', + first_name: 'John', + last_name: 'Doe', + phone: '92374162212', + gender: 'M', + employed: true, + birthday: '1614775793', + education: 'Science', + graduate: true, + married: true, + customerType: 'Prime', + msg_push: true, + msgSms: true, + msgemail: true, + msgwhatsapp: false, + custom_tags: ['Test_User', 'Interested_User', 'DIY_Hobby'], + custom_mappings: { + Office: 'Trastkiv', + Country: 'Russia', + }, + address: { + city: 'kolkata', + country: 'India', + postalCode: 789223, + state: 'WB', + street: '', + }, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.clevertap.com/1/upload', + headers: { + 'X-CleverTap-Account-Id': '476550467', + 'X-CleverTap-Passcode': 'sample_passcode', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + d: [ + { + type: 'profile', + profileData: { + Email: 'johnDoe@gmail.com', + Phone: '92374162212', + Gender: 'M', + Employed: true, + DOB: '1614775793', + Education: 'Science', + Married: true, + 'Customer Type': 'Prime', + Name: 'John Doe', + graduate: true, + msg_push: true, + msgSms: true, + msgemail: true, + msgwhatsapp: false, + custom_tags: '["Test_User","Interested_User","DIY_Hobby"]', + custom_mappings: '{"Office":"Trastkiv","Country":"Russia"}', + address: + '{"city":"kolkata","country":"India","postalCode":789223,"state":"WB","street":""}', + first_name: 'John', + last_name: 'Doe', + }, + identity: 'anon_id', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'clevertap', + description: 'Test 20: ERROR - Products property value must be an array of objects', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + passcode: 'sample_passcode', + accountId: '476550467', + trackAnonymous: true, + enableObjectIdMapping: false, + }, + }, + message: { + type: 'track', + event: 'Order Completed', + sentAt: '2021-03-10T11:59:57.815Z', + userId: 'riverjohn', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.13', + namespace: 'com.rudderlabs.javascript', + }, + page: { + url: 'http://127.0.0.1:5500/test.html', + path: '/test.html', + title: 'sample source', + search: '', + referrer: 'http://127.0.0.1:5500/', + referring_domain: '127.0.0.1:5500', + }, + locale: 'en-US', + screen: { + density: 2, + }, + traits: { + email: 'riverjohn@gmail.com', + phone: '+12345678900', + avatar: 'https://homepages.cae.wisc.edu/~ece533/images/airplane.png', + testIng: true, + lastName: 'John', + firstname: 'River', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.13', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:86.0) Gecko/20100101 Firefox/86.0', + }, + rudderId: 'fd5d3d37-3ce6-471d-b416-2f351212a44f', + messageId: '8ff6fd1b-b381-43fc-883c-92bf8eb0e725', + properties: { + tax: 1, + total: 20, + coupon: 'ImagePro', + revenue: 15, + currency: 'USD', + discount: 1.5, + order_id: '1234', + ts: '2021-03-10T11:59:22.080Z', + products: { + sku: 'G-32', + url: 'https://www.website.com/product/path', + name: 'Monopoly', + price: 14, + category: 'Games', + quantity: 1, + image_url: 'https://www.website.com/product/path.jpg', + product_id: '123', + }, + shipping: 22, + affiliation: 'Apple Store', + checkout_id: '12345', + }, + anonymousId: 'b2e06708-dd2a-4aee-bb32-41855d2fbdab', + integrations: { + All: true, + }, + originalTimestamp: '2021-03-10T11:59:22.080Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: 'Products property value must be an array of objects', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'CLEVERTAP', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'clevertap', + description: 'Test 21: ERROR - Unable to process without anonymousId or userId', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + passcode: 'sample_passcode', + accountId: '476550467', + trackAnonymous: true, + enableObjectIdMapping: true, + }, + }, + message: { + event: 'Random', + properties: { + country_region: 'India', + test: 'abc', + }, + receivedAt: '2021-08-20T12:49:07.691Z', + rudderId: '138c4214-b537-4f77-9dea-9abde70b5147', + type: 'track', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: 'Unable to process without anonymousId or userId', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'CLEVERTAP', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, +]; diff --git a/test/integrations/destinations/clevertap/router/data.ts b/test/integrations/destinations/clevertap/router/data.ts new file mode 100644 index 0000000000..2d6ec1dcf0 --- /dev/null +++ b/test/integrations/destinations/clevertap/router/data.ts @@ -0,0 +1,276 @@ +export const data = [ + { + name: 'clevertap', + description: 'simple router tests', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + destination: { + Config: { + passcode: 'dummypasscode', + accountId: 'dummyAccountId', + trackAnonymous: true, + enableObjectIdMapping: true, + }, + }, + metadata: { + jobId: 1, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: 'Android', + version: '', + }, + screen: { + density: 2, + }, + device: { + id: 'f54bb572361c4fd1', + name: 'whyred', + type: 'Android', + model: 'Redmi Note 5 Pro', + manufacturer: 'Xiaomi', + token: 'frfsgvrwe:APfdsafsgdfsgghfgfgjkhfsfgdhjhbvcvnetry767456fxsasdf', + }, + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: 'anon_id', + type: 'identify', + traits: { + ts: '2019-10-14T09:03:17.562Z', + anonymousId: 'anon_id', + email: 'dummyuser@gmail.com', + name: 'Dummy User', + phone: '98765434210', + gender: 'M', + employed: true, + birthday: '1614775793', + education: 'Science', + graduate: true, + married: true, + customerType: 'Prime', + msg_push: true, + msgSms: true, + msgemail: true, + msgwhatsapp: false, + custom_tags: ['Test_User', 'Interested_User', 'DIY_Hobby'], + custom_mappings: { + Office: 'Trastkiv', + Country: 'Russia', + }, + address: { + city: 'kolkata', + country: 'India', + postalCode: 789223, + state: 'WB', + street: '', + }, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + { + destination: { + Config: { + passcode: 'dummypasscode', + accountId: 'dummyAccountId', + trackAnonymous: true, + enableObjectIdMapping: true, + }, + }, + metadata: { + jobId: 2, + }, + message: { + event: 'Random', + properties: { + country_region: 'India', + test: 'abc', + }, + receivedAt: '2021-08-20T12:49:07.691Z', + rudderId: '138c4214-b537-4f77-9dea-9abde70b5147', + type: 'track', + anonymousId: 'cd3a4439-7df0-4475-acb9-6659c7c4dfe3', + }, + }, + { + destination: { + Config: { + passcode: 'dummypasscode', + accountId: 'dummyAccountId', + trackAnonymous: true, + }, + }, + metadata: { + jobId: 3, + }, + message: { + type: 'group', + anonymousId: 'anon-id-new', + name: 'Rudder', + properties: { + title: 'Home', + path: '/', + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + destType: 'clevertap', + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + batched: true, + endpoint: 'https://api.clevertap.com/1/upload', + headers: { + 'X-CleverTap-Account-Id': 'dummyAccountId', + 'X-CleverTap-Passcode': 'dummypasscode', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + d: [ + { + type: 'profile', + ts: 1571043797, + profileData: { + Email: 'dummyuser@gmail.com', + Name: 'Dummy User', + Phone: '98765434210', + Gender: 'M', + Employed: true, + DOB: '1614775793', + Education: 'Science', + Married: true, + 'Customer Type': 'Prime', + graduate: true, + msg_push: true, + msgSms: true, + msgemail: true, + msgwhatsapp: false, + custom_tags: '["Test_User","Interested_User","DIY_Hobby"]', + custom_mappings: '{"Office":"Trastkiv","Country":"Russia"}', + address: + '{"city":"kolkata","country":"India","postalCode":789223,"state":"WB","street":""}', + }, + objectId: 'anon_id', + }, + { + type: 'token', + tokenData: { + id: 'frfsgvrwe:APfdsafsgdfsgghfgfgjkhfsfgdhjhbvcvnetry767456fxsasdf', + type: 'fcm', + }, + objectId: 'anon_id', + }, + { + evtName: 'Random', + evtData: { + country_region: 'India', + test: 'abc', + }, + type: 'event', + objectId: 'cd3a4439-7df0-4475-acb9-6659c7c4dfe3', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + metadata: [ + { + jobId: 1, + }, + { + jobId: 2, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + passcode: 'dummypasscode', + accountId: 'dummyAccountId', + trackAnonymous: true, + enableObjectIdMapping: true, + }, + }, + }, + { + metadata: [ + { + jobId: 3, + }, + ], + batched: false, + statusCode: 400, + error: 'Message type not supported', + statTags: { + destType: 'CLEVERTAP', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'router', + implementation: 'native', + module: 'destination', + }, + destination: { + Config: { + passcode: 'dummypasscode', + accountId: 'dummyAccountId', + trackAnonymous: true, + }, + }, + }, + ], + }, + }, + }, + }, +]; diff --git a/test/integrations/destinations/clickup/network.ts b/test/integrations/destinations/clickup/network.ts new file mode 100644 index 0000000000..1a26209923 --- /dev/null +++ b/test/integrations/destinations/clickup/network.ts @@ -0,0 +1,247 @@ +export const networkCallsData = [ + { + httpReq: { + url: 'https://api.clickup.com/api/v2/list/correctListId123/field', + method: 'GET', + }, + httpRes: { + data: { + "fields": [ + { + "id": "19d3ac4e-2b1e-4569-b33e-ff86c7d94d6e", + "name": "Labels", + "type": "labels", + "type_config": { + "options": [ + { + "id": "32c81c1c-cf53-4829-92f5-0f0270d27a45", + "label": "Option 1", + "color": {} + }, + { + "id": "7e24f329-9dd9-4e68-b426-2c70af6f9347", + "label": "Option 2", + "color": {} + } + ] + }, + "date_created": "1661964865880", + "hide_from_guests": false, + "required": false + }, + { + "id": "22eaffee-ffec-4c3b-bdae-56e69d55eecd", + "name": "Payment Status", + "type": "drop_down", + "type_config": { + "default": 0, + "placeholder": {}, + "new_drop_down": true, + "options": [ + { + "id": "e109e36b-a052-4a31-af16-25da7324990f", + "name": "Sent Request", + "color": "#FF7FAB", + "orderindex": 0 + }, + { + "id": "3a3b4512-2896-44f7-8075-2ff37777fe24", + "name": "Quote sent", + "color": "#EA80FC", + "orderindex": 1 + }, + { + "id": "7afcb6fb-cec8-41d8-bf0c-039a9db28460", + "name": "Pending", + "color": "#ff7800", + "orderindex": 2 + }, + { + "id": "890ecf28-bdd4-4f53-92cc-bc4edb696fcd", + "name": "Payment Recieved", + "color": "#2ecd6f", + "orderindex": 3 + }, + { + "id": "e89f7dd7-fd24-4b32-ac4d-f174d8ca914f", + "name": "n/a", + "color": "#b5bcc2", + "orderindex": 4 + } + ] + }, + "date_created": "1660124553414", + "hide_from_guests": false, + "required": {} + }, + { + "id": "4b7a29be-e261-4340-8f3f-e6de838473e5", + "name": "Plan", + "type": "drop_down", + "type_config": { + "default": 0, + "placeholder": {}, + "new_drop_down": true, + "options": [ + { + "id": "4b9366a7-2592-4b7a-909a-ed4af705e27c", + "name": "Unlimited", + "color": "#02BCD4", + "orderindex": 0 + }, + { + "id": "c5032049-8c05-44e9-a000-3a071d457b8f", + "name": "Business", + "color": "#1bbc9c", + "orderindex": 1 + }, + { + "id": "9fb08801-1130-4650-8e2e-28578344ff3c", + "name": "Enterprise", + "color": "#2ecd6f", + "orderindex": 2 + } + ] + }, + "date_created": "1660124553414", + "hide_from_guests": false, + "required": {} + }, + { + "id": "4bfebc00-9d4a-40d1-aef8-5a87b610186c", + "name": "Contact Title", + "type": "text", + "type_config": {}, + "date_created": "1660124553414", + "hide_from_guests": false, + "required": {} + }, + { + "id": "666f74bf-6d87-41f3-8735-ccf0efe066dd", + "name": "Date", + "type": "date", + "type_config": {}, + "date_created": "1662379321069", + "hide_from_guests": false, + "required": false + }, + { + "id": "a5f5044a-cbad-4caf-bcbb-4cd32bd8db7c", + "name": "Industry", + "type": "drop_down", + "type_config": { + "default": 0, + "placeholder": {}, + "options": [ + { + "id": "75173398-257f-42b6-8bae-4cf767fa99ab", + "name": "Engineering", + "color": "#04A9F4", + "orderindex": 0 + }, + { + "id": "c7f9b6f5-cd98-4609-af10-68a8710cc1bf", + "name": "Retail", + "color": "#ff7800", + "orderindex": 1 + }, + { + "id": "dbe84940-b4e8-4a29-8491-e1aa5f2be4e2", + "name": "Hospitality", + "color": "#2ecd6f", + "orderindex": 2 + } + ] + }, + "date_created": "1660124553414", + "hide_from_guests": false, + "required": {} + }, + { + "id": "b01b32fd-94d3-43e6-9f31-2c855ff169cd", + "name": "Url", + "type": "url", + "type_config": {}, + "date_created": "1661970432587", + "hide_from_guests": false, + "required": false + }, + { + "id": "c9b83d91-b979-4b34-b4bd-88bf9cf2b9a6", + "name": "Phone Number", + "type": "phone", + "type_config": {}, + "date_created": "1661970795061", + "hide_from_guests": false, + "required": false + }, + { + "id": "d0201829-ddcd-4b97-b71f-0f9e672488f2", + "name": "Account Size", + "type": "number", + "type_config": {}, + "date_created": "1660124553414", + "hide_from_guests": false, + "required": {} + }, + { + "id": "ea6c1e48-2abf-4328-b228-79c213e147c8", + "name": "Location", + "type": "location", + "type_config": {}, + "date_created": "1662229589329", + "hide_from_guests": false, + "required": false + }, + { + "id": "ebe825fb-92de-41ce-a29c-25018da039b4", + "name": "Email", + "type": "email", + "type_config": {}, + "date_created": "1660124553414", + "hide_from_guests": false, + "required": {} + }, + { + "id": "f431cda3-a575-4a05-ba8d-583d9b6cb2df", + "name": "Rating", + "type": "emoji", + "type_config": { + "count": 5, + "code_point": "2b50" + }, + "date_created": "1661963909454", + "hide_from_guests": false, + "required": false + }, + { + "id": "ffbe4f03-cbc3-4077-8fea-9e5d08b4dceb", + "name": "Money In INR", + "type": "currency", + "type_config": { + "default": {}, + "precision": 2, + "currency_type": "INR" + }, + "date_created": "1661428276019", + "hide_from_guests": false, + "required": false + } + ] + }, + status: 200 + }, + }, + { + httpReq: { + url: 'https://api.clickup.com/api/v2/list/correctListId456/field', + method: 'GET', + }, + httpRes: { + data: { + "fields": [] + }, + status: 200 + }, + } +]; diff --git a/test/integrations/destinations/clickup/processor/data.ts b/test/integrations/destinations/clickup/processor/data.ts new file mode 100644 index 0000000000..296f0fb8e1 --- /dev/null +++ b/test/integrations/destinations/clickup/processor/data.ts @@ -0,0 +1,829 @@ +export const data = [ + { + "name": "clickup", + "description": "Invalid priority", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiToken": "pk_123", + "listId": "correctListId123" + }, + "ID": "clickup-1234" + }, + "message": { + "type": "track", + "event": "Product Viewed", + "properties": { + "priority": 0 + }, + "context": {}, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Invalid value specified for priority. Value must be Integer and in range \"[1,4]\"", + "statTags": { + "destType": "CLICKUP", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "clickup", + "description": "Custom field: Invalid phone number", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiToken": "pk_123", + "listId": "correctListId123", + "keyToCustomFieldName": [ + { + "from": "phone", + "to": "Phone Number" + } + ] + }, + "ID": "clickup-1234" + }, + "message": { + "type": "track", + "event": "Product Viewed", + "properties": { + "phone": "9999999999" + }, + "context": {}, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "The provided phone number is invalid", + "statTags": { + "destType": "CLICKUP", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "clickup", + "description": "Custom field: Invalid email", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiToken": "pk_123", + "listId": "correctListId123", + "keyToCustomFieldName": [ + { + "from": "email", + "to": "Email" + } + ] + }, + "ID": "clickup-1234" + }, + "message": { + "type": "track", + "event": "Product Viewed", + "properties": { + "email": "test.com" + }, + "context": {}, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "The provided email is invalid", + "statTags": { + "destType": "CLICKUP", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "clickup", + "description": "Custom field: Invalid url", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiToken": "pk_123", + "listId": "correctListId123", + "keyToCustomFieldName": [ + { + "from": "url", + "to": "Url" + } + ] + }, + "ID": "clickup-1234" + }, + "message": { + "type": "track", + "event": "Product Viewed", + "properties": { + "url": "www.test.com" + }, + "context": {}, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "The provided url is invalid", + "statTags": { + "destType": "CLICKUP", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "clickup", + "description": "Custom field: Invalid location latitude", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiToken": "pk_123", + "listId": "correctListId123", + "keyToCustomFieldName": [ + { + "from": "location", + "to": "Location" + } + ] + }, + "ID": "clickup-1234" + }, + "message": { + "type": "track", + "event": "Product Viewed", + "properties": { + "location": { + "lat": -100, + "lng": 124, + "formattedAddress": "Gold Coast QLD, Australia" + } + }, + "context": {}, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Invalid value specified for latitude. Latitude must be in range \"[-90, 90]\"", + "statTags": { + "destType": "CLICKUP", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "clickup", + "description": "Custom field: Invalid rating", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiToken": "pk_123", + "listId": "correctListId123", + "keyToCustomFieldName": [ + { + "from": "rating", + "to": "Rating" + } + ] + }, + "ID": "clickup-1234" + }, + "message": { + "type": "track", + "event": "Product Viewed", + "properties": { + "rating": "7" + }, + "context": {}, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Invalid value specified for rating. Value must be in range \"[0,5]\"", + "statTags": { + "destType": "CLICKUP", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "clickup", + "description": "Creating task with valid custom fields values", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiToken": "pk_123", + "listId": "correctListId123", + "keyToCustomFieldName": [ + { + "from": "industry", + "to": "Industry" + }, + { + "from": "Payment Status", + "to": "Payment Status" + }, + { + "from": "labelKey", + "to": "Labels" + }, + { + "from": "locationKey", + "to": "Location" + }, + { + "from": "phone", + "to": "Phone Number" + }, + { + "from": "email", + "to": "Email" + }, + { + "from": "url", + "to": "Url" + }, + { + "from": "rating", + "to": "Rating" + }, + { + "from": "plan", + "to": "Plan" + }, + { + "from": "contactTitle", + "to": "Contact Title" + }, + { + "from": "date", + "to": "Date" + } + ] + }, + "ID": "clickup-1234" + }, + "message": { + "type": "track", + "event": "Product Viewed", + "properties": { + "description": "Creating task with valid custom fields values", + "tags": [ + "testing", + "custom fields" + ], + "timeEstimate": 10800000, + "status": "Ready", + "priority": 1, + "dueDate": "2022-02-25T13:39:21.032Z", + "includeDueDateTime": true, + "startDate": "2022-01-20T13:39:21.032Z", + "includeStartDateTime": "true", + "notifyAll": false, + "industry": "Retail", + "Payment Status": "Pending", + "labelKey": [ + "option 1", + "option 2", + "option 3" + ], + "locationKey": { + "lat": -20, + "lng": 124, + "formattedAddress": "Gold Coast QLD, Australia" + }, + "phone": "+12233445567", + "email": "test123@example.com", + "url": "https://www.rudderstack.com/", + "rating": 3, + "plan": "Business", + "contactTitle": "VP of Operations", + "date": "2022-02-25T13:39:21.032Z" + }, + "context": {}, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.clickup.com/api/v2/list/correctListId123/task", + "headers": { + "Content-Type": "application/json", + "Authorization": "pk_123" + }, + "params": {}, + "body": { + "JSON": { + "name": "Product Viewed", + "description": "Creating task with valid custom fields values", + "tags": [ + "testing", + "custom fields" + ], + "time_estimate": 10800000, + "status": "Ready", + "priority": 1, + "due_date": 1645796361032, + "due_date_time": true, + "start_date": 1642685961032, + "start_date_time": "true", + "notify_all": false, + "custom_fields": [ + { + "id": "a5f5044a-cbad-4caf-bcbb-4cd32bd8db7c", + "value": "c7f9b6f5-cd98-4609-af10-68a8710cc1bf" + }, + { + "id": "22eaffee-ffec-4c3b-bdae-56e69d55eecd", + "value": "7afcb6fb-cec8-41d8-bf0c-039a9db28460" + }, + { + "id": "19d3ac4e-2b1e-4569-b33e-ff86c7d94d6e", + "value": [ + "32c81c1c-cf53-4829-92f5-0f0270d27a45", + "7e24f329-9dd9-4e68-b426-2c70af6f9347" + ] + }, + { + "id": "ea6c1e48-2abf-4328-b228-79c213e147c8", + "value": { + "location": { + "lat": -20, + "lng": 124 + }, + "formatted_address": "Gold Coast QLD, Australia" + } + }, + { + "id": "c9b83d91-b979-4b34-b4bd-88bf9cf2b9a6", + "value": "+12233445567" + }, + { + "id": "ebe825fb-92de-41ce-a29c-25018da039b4", + "value": "test123@example.com" + }, + { + "id": "b01b32fd-94d3-43e6-9f31-2c855ff169cd", + "value": "https://www.rudderstack.com/" + }, + { + "id": "f431cda3-a575-4a05-ba8d-583d9b6cb2df", + "value": 3 + }, + { + "id": "4b7a29be-e261-4340-8f3f-e6de838473e5", + "value": "c5032049-8c05-44e9-a000-3a071d457b8f" + }, + { + "id": "4bfebc00-9d4a-40d1-aef8-5a87b610186c", + "value": "VP of Operations" + }, + { + "id": "666f74bf-6d87-41f3-8735-ccf0efe066dd", + "value": 1645796361032 + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "clickup", + "description": "Creating task with assignees", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiToken": "pk_123", + "listId": "correctListId123" + }, + "ID": "clickup-1234" + }, + "message": { + "type": "track", + "event": "Product Viewed", + "properties": { + "taskName": "Transformer Testing" + }, + "context": { + "externalId": [ + { + "type": "clickUpAssigneeId", + "id": 61205104 + }, + { + "type": "clickUpAssigneeId", + "id": 61217234 + }, + { + "type": "clickUpAssigneeId", + "id": 61228575 + } + ] + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.clickup.com/api/v2/list/correctListId123/task", + "headers": { + "Content-Type": "application/json", + "Authorization": "pk_123" + }, + "params": {}, + "body": { + "JSON": { + "name": "Transformer Testing", + "assignees": [ + 61205104, + 61217234, + 61228575 + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "clickup", + "description": "Event filtering : Sending non whitelisted event when some events are whitelisted", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiToken": "pk_123", + "listId": "correctListId123", + "whitelistedEvents": [ + { + "eventName": "Anonymous Page Visit" + }, + { + "eventName": "Product Viewed" + }, + { + "eventName": "" + } + ] + }, + "ID": "clickup-1234" + }, + "message": { + "type": "track", + "event": "Credit Card Added", + "context": {}, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "The event was discarded as it was not allow listed in the destination configuration", + "statTags": { + "destType": "CLICKUP", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "clickup", + "description": "Event filtering : No event is whitelisted", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiToken": "pk_123", + "listId": "correctListId123", + "whitelistedEvents": [ + { + "eventName": "" + }, + { + "eventName": "" + }, + { + "eventName": "" + } + ] + }, + "ID": "clickup-1234" + }, + "message": { + "type": "track", + "event": "Credit Card Added", + "context": {}, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "The event was discarded as it was not allow listed in the destination configuration", + "statTags": { + "destType": "CLICKUP", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "clickup", + "description": "Creating task using listId from externalId array", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiToken": "pk_123", + "listId": "correctListId123" + }, + "ID": "clickup-1234" + }, + "message": { + "type": "track", + "event": "anonymous page visit", + "context": { + "externalId": [ + { + "type": "clickUpListId", + "id": "correctListId456" + } + ] + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.clickup.com/api/v2/list/correctListId456/task", + "headers": { + "Content-Type": "application/json", + "Authorization": "pk_123" + }, + "params": {}, + "body": { + "JSON": { + "name": "anonymous page visit" + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + } +] \ No newline at end of file diff --git a/test/integrations/destinations/clickup/router/data.ts b/test/integrations/destinations/clickup/router/data.ts new file mode 100644 index 0000000000..8888024b4f --- /dev/null +++ b/test/integrations/destinations/clickup/router/data.ts @@ -0,0 +1,471 @@ +export const data = [ + { + name: 'clickup', + description: 'Test 0', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + "description": "Creating task using listId from externalId array", + "destination": { + "Config": { + "apiToken": "pk_123", + "listId": "correctListId123" + }, + "ID": "clickup-1234" + }, + "metadata": { + "jobId": 1 + }, + "message": { + "type": "track", + "event": "anonymous page visit", + "context": { + "externalId": [{ "type": "clickUpListId", "id": "correctListId456" }] + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c" + } + }, + { + "description": "Creating task with assignees", + "destination": { + "Config": { + "apiToken": "pk_123", + "listId": "correctListId123" + }, + "ID": "clickup-1234" + }, + "metadata": { + "jobId": 2 + }, + "message": { + "type": "track", + "event": "Product Viewed", + "properties": { + "taskName": "Transformer Testing" + }, + "context": { + "externalId": [ + { + "type": "clickUpAssigneeId", + "id": 61205104 + }, + { + "type": "clickUpAssigneeId", + "id": 61217234 + }, + { + "type": "clickUpAssigneeId", + "id": 61228575 + } + ] + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c" + } + }, + { + "description": "Creating task with valid custom fields values", + "destination": { + "Config": { + "apiToken": "pk_123", + "listId": "correctListId123", + "keyToCustomFieldName": [ + { + "from": "industry", + "to": "Industry" + }, + { + "from": "Payment Status", + "to": "Payment Status" + }, + { + "from": "labelKey", + "to": "Labels" + }, + { + "from": "locationKey", + "to": "Location" + }, + { + "from": "phone", + "to": "Phone Number" + }, + { + "from": "email", + "to": "Email" + }, + { + "from": "url", + "to": "Url" + }, + { + "from": "rating", + "to": "Rating" + }, + { + "from": "plan", + "to": "Plan" + }, + { + "from": "contactTitle", + "to": "Contact Title" + }, + { + "from": "date", + "to": "Date" + } + ] + }, + "ID": "clickup-1234" + }, + "metadata": { + "jobId": 3 + }, + "message": { + "type": "track", + "event": "Product Viewed", + "properties": { + "description": "Creating task with valid custom fields values", + "tags": ["testing", "custom fields"], + "timeEstimate": 10800000, + "status": "Ready", + "priority": 1, + "dueDate": "2022-02-25T13:39:21.032Z", + "includeDueDateTime": true, + "startDate": "2022-01-20T13:39:21.032Z", + "includeStartDateTime": "true", + "notifyAll": false, + "industry": "Retail", + "Payment Status": "Pending", + "labelKey": ["option 1", "option 2", "option 3"], + "locationKey": { + "lat": -20, + "lng": 124, + "formattedAddress": "Gold Coast QLD, Australia" + }, + "phone": "+12233445567", + "email": "test123@example.com", + "url": "https://www.rudderstack.com/", + "rating": 3, + "plan": "Business", + "contactTitle": "VP of Operations", + "date": "2022-02-25T13:39:21.032Z" + }, + "context": {}, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c" + } + }, + { + "description": "Custom field: Invalid location latitude", + "destination": { + "Config": { + "apiToken": "pk_123", + "listId": "correctListId123", + "keyToCustomFieldName": [ + { + "from": "location", + "to": "Location" + } + ] + }, + "ID": "clickup-1234" + }, + "metadata": { + "jobId": 4 + }, + "message": { + "type": "track", + "event": "Product Viewed", + "properties": { + "location": { + "lat": -100, + "lng": 124, + "formattedAddress": "Gold Coast QLD, Australia" + } + }, + "context": {}, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c" + } + } + ] + , + destType: 'clickup', + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + "batched": false, + "batchedRequest": { + "body": { + "FORM": {}, + "JSON": { + "name": "anonymous page visit" + }, + "JSON_ARRAY": {}, + "XML": {} + }, + "endpoint": "https://api.clickup.com/api/v2/list/correctListId456/task", + "files": {}, + "headers": { + "Authorization": "pk_123", + "Content-Type": "application/json" + }, + "method": "POST", + "params": {}, + "type": "REST", + "version": "1" + }, + "destination": { + "Config": { + "apiToken": "pk_123", + "listId": "correctListId123" + }, + "ID": "clickup-1234" + }, + "metadata": [ + { + "jobId": 1 + } + ], + "statusCode": 200 + }, + { + "batched": false, + "batchedRequest": { + "body": { + "FORM": {}, + "JSON": { + "assignees": [61205104, 61217234, 61228575], + "name": "Transformer Testing" + }, + "JSON_ARRAY": {}, + "XML": {} + }, + "endpoint": "https://api.clickup.com/api/v2/list/correctListId123/task", + "files": {}, + "headers": { + "Authorization": "pk_123", + "Content-Type": "application/json" + }, + "method": "POST", + "params": {}, + "type": "REST", + "version": "1" + }, + "destination": { + "Config": { + "apiToken": "pk_123", + "listId": "correctListId123" + }, + "ID": "clickup-1234" + }, + "metadata": [ + { + "jobId": 2 + } + ], + "statusCode": 200 + }, + { + "batched": false, + "batchedRequest": { + "body": { + "FORM": {}, + "JSON": { + "custom_fields": [ + { + "id": "a5f5044a-cbad-4caf-bcbb-4cd32bd8db7c", + "value": "c7f9b6f5-cd98-4609-af10-68a8710cc1bf" + }, + { + "id": "22eaffee-ffec-4c3b-bdae-56e69d55eecd", + "value": "7afcb6fb-cec8-41d8-bf0c-039a9db28460" + }, + { + "id": "19d3ac4e-2b1e-4569-b33e-ff86c7d94d6e", + "value": [ + "32c81c1c-cf53-4829-92f5-0f0270d27a45", + "7e24f329-9dd9-4e68-b426-2c70af6f9347" + ] + }, + { + "id": "ea6c1e48-2abf-4328-b228-79c213e147c8", + "value": { + "formatted_address": "Gold Coast QLD, Australia", + "location": { + "lat": -20, + "lng": 124 + } + } + }, + { + "id": "c9b83d91-b979-4b34-b4bd-88bf9cf2b9a6", + "value": "+12233445567" + }, + { + "id": "ebe825fb-92de-41ce-a29c-25018da039b4", + "value": "test123@example.com" + }, + { + "id": "b01b32fd-94d3-43e6-9f31-2c855ff169cd", + "value": "https://www.rudderstack.com/" + }, + { + "id": "f431cda3-a575-4a05-ba8d-583d9b6cb2df", + "value": 3 + }, + { + "id": "4b7a29be-e261-4340-8f3f-e6de838473e5", + "value": "c5032049-8c05-44e9-a000-3a071d457b8f" + }, + { + "id": "4bfebc00-9d4a-40d1-aef8-5a87b610186c", + "value": "VP of Operations" + }, + { + "id": "666f74bf-6d87-41f3-8735-ccf0efe066dd", + "value": 1645796361032 + } + ], + "name": "Product Viewed", + "description": "Creating task with valid custom fields values", + "tags": ["testing", "custom fields"], + "time_estimate": 10800000, + "status": "Ready", + "priority": 1, + "due_date": 1645796361032, + "due_date_time": true, + "start_date": 1642685961032, + "start_date_time": "true", + "notify_all": false + }, + "JSON_ARRAY": {}, + "XML": {} + }, + "endpoint": "https://api.clickup.com/api/v2/list/correctListId123/task", + "files": {}, + "headers": { + "Authorization": "pk_123", + "Content-Type": "application/json" + }, + "method": "POST", + "params": {}, + "type": "REST", + "version": "1" + }, + "destination": { + "Config": { + "apiToken": "pk_123", + "keyToCustomFieldName": [ + { + "from": "industry", + "to": "Industry" + }, + { + "from": "Payment Status", + "to": "Payment Status" + }, + { + "from": "labelKey", + "to": "Labels" + }, + { + "from": "locationKey", + "to": "Location" + }, + { + "from": "phone", + "to": "Phone Number" + }, + { + "from": "email", + "to": "Email" + }, + { + "from": "url", + "to": "Url" + }, + { + "from": "rating", + "to": "Rating" + }, + { + "from": "plan", + "to": "Plan" + }, + { + "from": "contactTitle", + "to": "Contact Title" + }, + { + "from": "date", + "to": "Date" + } + ], + "listId": "correctListId123" + }, + "ID": "clickup-1234" + }, + "metadata": [ + { + "jobId": 3 + } + ], + "statusCode": 200 + }, + { + "destination": { + "Config": { + "apiToken": "pk_123", + "listId": "correctListId123", + "keyToCustomFieldName": [ + { + "from": "location", + "to": "Location" + } + ] + }, + "ID": "clickup-1234" + }, + "batched": false, + "error": "Invalid value specified for latitude. Latitude must be in range \"[-90, 90]\"", + "metadata": [ + { + "jobId": 4 + } + ], + "statTags": { + "destType": "CLICKUP", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "router", + "implementation": "native", + "module": "destination", + }, + "statusCode": 400 + } + ] + , + }, + }, + }, + }, +]; diff --git a/test/integrations/destinations/custify/network.ts b/test/integrations/destinations/custify/network.ts new file mode 100644 index 0000000000..4af6545f9f --- /dev/null +++ b/test/integrations/destinations/custify/network.ts @@ -0,0 +1,36 @@ +export const networkCallsData = [ + { + httpReq: { + url: 'https://api.custify.com/company', + method: 'POST', + }, + httpRes: { + data: { + "company_id": "6", + "name": "Pizzeria Presto", + "signed_up_at": "2019-05-30T12:00:00.000Z", + "size": 15, + "website": "www.pizzeriapresto.com", + "industry": "Restaurant", + "plan": "Platinum", + "monthly_revenue": 1234567, + "churned": false, + "owners_csm": "john.doe@mail.com", + "owners_account": "john.doe@mail.com", + "parent_companies": [ + { + "id": "5ec50c9829d3c17c7cf455f2" + }, + { + "id": "5ec50c9829d3c17c7cf457f2" + } + ], + "custom_attributes": { + "restaurants": 5, + "custom": "template" + } + }, + status: 200 + }, + } +]; diff --git a/test/integrations/destinations/custify/processor/data.ts b/test/integrations/destinations/custify/processor/data.ts new file mode 100644 index 0000000000..f3a3448b86 --- /dev/null +++ b/test/integrations/destinations/custify/processor/data.ts @@ -0,0 +1,695 @@ +export const data = [ + { + "name": "custify", + "description": "Identify Call with all traits and adding to company", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "apiKey_key_test_001", + "sendAnonymousId": false + }, + "ID": "custify-1234" + }, + "message": { + "type": "identify", + "userId": "user_1234", + "context": { + "traits": { + "email": "user111@gmail.com", + "firstName": "New", + "lastName": "User", + "phone": 9830311522, + "sessionCount": 23, + "unsubscribedFromEmails": false, + "unsubscribedFromCalls": false, + "signed_up_at": "2022-04-27T13:56:13.012Z", + "custom_prop1": "custom_value1", + "custom_prop2": 123, + "custom_prop3": false, + "custom_prop4": { + "test": "test" + }, + "custom_prop5": [ + 1, + 3, + 4 + ], + "createdAt": "2022-04-27T13:56:13.012Z", + "company": { + "id": "company_123" + } + } + }, + "timestamp": "2022-04-27T13:56:13.012Z", + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.custify.com/people", + "headers": { + "Content-Type": "application/json", + "Authorization": "Bearer apiKey_key_test_001", + "Accept": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "user_id": "user_1234", + "email": "user111@gmail.com", + "phone": 9830311522, + "session_count": 23, + "unsubscribed_from_emails": false, + "unsubscribed_from_calls": false, + "signed_up_at": "2022-04-27T13:56:13.012Z", + "custom_attributes": { + "firstName": "New", + "lastName": "User", + "sessionCount": 23, + "unsubscribedFromEmails": false, + "unsubscribedFromCalls": false, + "custom_prop1": "custom_value1", + "custom_prop2": 123, + "custom_prop3": false, + "createdAt": "2022-04-27T13:56:13.012Z" + }, + "name": "New User", + "companies": [ + { + "company_id": "company_123", + "remove": false + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "user_1234" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "custify", + "description": "Identify Call removing the user from company", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "apiKey_key_test_001", + "sendAnonymousId": false + }, + "ID": "custify-1234" + }, + "message": { + "type": "identify", + "userId": "user_1234", + "context": { + "traits": { + "email": "user111@gmail.com", + "firstName": "New", + "lastName": "User", + "phone": 9830311522, + "sessionCount": 23, + "unsubscribedFromEmails": false, + "unsubscribedFromCalls": false, + "signed_up_at": "2022-04-27T13:56:13.012Z", + "custom_prop1": "custom_value1", + "custom_prop2": 123, + "custom_prop3": false, + "custom_prop4": { + "test": "test" + }, + "custom_prop5": [ + 1, + 3, + 4 + ], + "createdAt": "2022-04-27T13:56:13.012Z", + "company": { + "id": "company_123", + "remove": true + } + } + }, + "timestamp": "2022-04-27T13:56:13.012Z", + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.custify.com/people", + "headers": { + "Content-Type": "application/json", + "Authorization": "Bearer apiKey_key_test_001", + "Accept": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "user_id": "user_1234", + "email": "user111@gmail.com", + "phone": 9830311522, + "session_count": 23, + "unsubscribed_from_emails": false, + "unsubscribed_from_calls": false, + "signed_up_at": "2022-04-27T13:56:13.012Z", + "custom_attributes": { + "firstName": "New", + "lastName": "User", + "sessionCount": 23, + "unsubscribedFromEmails": false, + "unsubscribedFromCalls": false, + "custom_prop1": "custom_value1", + "custom_prop2": 123, + "custom_prop3": false, + "createdAt": "2022-04-27T13:56:13.012Z" + }, + "name": "New User", + "companies": [ + { + "company_id": "company_123", + "remove": true + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "user_1234" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "custify", + "description": "Identify Call without userId and email and anoymousId", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "apiKey_key_test_001", + "sendAnonymousId": false + }, + "ID": "custify-1234" + }, + "message": { + "type": "identify", + "context": { + "traits": { + "firstName": "New", + "lastName": "User", + "phone": 9830311522, + "sessionCount": 23, + "unsubscribedFromEmails": false, + "unsubscribedFromCalls": false, + "signed_up_at": "2022-04-27T13:56:13.012Z", + "custom_prop1": "custom_value1", + "custom_prop2": 123, + "custom_prop3": false, + "custom_prop4": { + "test": "test" + }, + "custom_prop5": [ + 1, + 3, + 4 + ], + "createdAt": "2022-04-27T13:56:13.012Z", + "company": { + "id": "company_123", + "remove": true + } + } + }, + "timestamp": "2022-04-27T13:56:13.012Z", + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Email or userId is mandatory", + "statTags": { + "destType": "CUSTIFY", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "custify", + "description": "Identify Call without userId and email and sendAnonymous is false", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "apiKey_key_test_001", + "sendAnonymousId": false + }, + "ID": "custify-1234" + }, + "message": { + "type": "identify", + "context": { + "traits": { + "firstName": "New", + "lastName": "User", + "phone": 9830311522, + "sessionCount": 23, + "unsubscribedFromEmails": false, + "unsubscribedFromCalls": false, + "signed_up_at": "2022-04-27T13:56:13.012Z", + "custom_prop1": "custom_value1", + "custom_prop2": 123, + "custom_prop3": false, + "custom_prop4": { + "test": "test" + }, + "custom_prop5": [ + 1, + 3, + 4 + ], + "createdAt": "2022-04-27T13:56:13.012Z", + "company": { + "id": "company_123", + "remove": true + } + } + }, + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "timestamp": "2022-04-27T13:56:13.012Z", + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Email or userId is mandatory", + "statTags": { + "destType": "CUSTIFY", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "custify", + "description": "Identify Call without userId and email and sendAnonymous is true", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "apiKey_key_test_001", + "sendAnonymousId": true + }, + "ID": "custify-1234" + }, + "message": { + "type": "identify", + "context": { + "traits": { + "firstName": "New", + "lastName": "User", + "phone": 9830311522, + "sessionCount": 23, + "unsubscribedFromEmails": false, + "unsubscribedFromCalls": false, + "signed_up_at": "2022-04-27T13:56:13.012Z", + "custom_prop1": "custom_value1", + "custom_prop2": 123, + "custom_prop3": false, + "custom_prop4": { + "test": "test" + }, + "custom_prop5": [ + 1, + 3, + 4 + ], + "createdAt": "2022-04-27T13:56:13.012Z", + "company": { + "id": "company_123", + "remove": true + } + } + }, + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "timestamp": "2022-04-27T13:56:13.012Z", + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.custify.com/people", + "headers": { + "Content-Type": "application/json", + "Authorization": "Bearer apiKey_key_test_001", + "Accept": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "phone": 9830311522, + "session_count": 23, + "unsubscribed_from_emails": false, + "unsubscribed_from_calls": false, + "signed_up_at": "2022-04-27T13:56:13.012Z", + "custom_attributes": { + "firstName": "New", + "lastName": "User", + "sessionCount": 23, + "unsubscribedFromEmails": false, + "unsubscribedFromCalls": false, + "custom_prop1": "custom_value1", + "custom_prop2": 123, + "custom_prop3": false, + "createdAt": "2022-04-27T13:56:13.012Z" + }, + "user_id": "bf412108-0357-4330-b119-7305e767823c", + "name": "New User", + "companies": [ + { + "company_id": "company_123", + "remove": true + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "bf412108-0357-4330-b119-7305e767823c" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "custify", + "description": "Track call with all properties", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "apiKey_key_test_001", + "sendAnonymousId": false + }, + "ID": "custify-1234" + }, + "message": { + "type": "track", + "event": "Order Completed Version 2", + "sentAt": "2021-08-26T14:16:47.321Z", + "userId": "user_111", + "context": { + "library": { + "name": "analytics-node", + "version": "1.0.3" + }, + "traits": { + "email": "user111@gmail.com" + }, + "page": { + "url": "https://www.website.com/product/path" + } + }, + "rudderId": "70612f39-0607-45bb-8236-bf0995fde4fa", + "_metadata": { + "nodeVersion": "10.24.1" + }, + "messageId": "node-84952e4eb9c6debbda735c49d08a8b31-fcbfed6a-38cf-42c5-881c-f590f59311b1", + "properties": { + "product": "Cube", + "revenue": 9002, + "organization_id": "company_123" + }, + "originalTimestamp": "2021-08-26T14:16:47.317Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.custify.com/event", + "headers": { + "Content-Type": "application/json", + "Authorization": "Bearer apiKey_key_test_001", + "Accept": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "user_id": "user_111", + "email": "user111@gmail.com", + "name": "Order Completed Version 2", + "created_at": "2021-08-26T14:16:47.317Z", + "company_id": "company_123", + "metadata": { + "product": "Cube", + "revenue": 9002, + "organization_id": "company_123", + "user_id": "user_111" + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "user_111" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "custify", + "description": "Group call with all fields success scenario", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "apiKey_key_test_001", + "sendAnonymousId": false + }, + "ID": "custify-1234" + }, + "message": { + "type": "group", + "userId": "user_111", + "groupId": "company_222", + "traits": { + "name": "Absolute Company", + "industry": " Absolute", + "employees": 121, + "size": 100, + "website": "www.rudder.com", + "plan": "GOLD", + "monthly_revenue": 8000, + "churned": false, + "test_att1": "test_att_val1" + }, + "context": { + "traits": { + "firstName": "Absolute", + "lastName": "User", + "phone": 9830311522, + "session_count": 23, + "signed_up_at": "2022-04-27T13:56:13.012Z", + "custom_prop1": "custom_value1", + "custom_prop2": 123, + "custom_prop3": false, + "custom_prop4": { + "test": "test" + }, + "custom_prop5": [ + 1, + 3, + 4 + ], + "createdAt": "2022-04-27T13:56:13.012Z" + }, + "ip": "14.5.67.21", + "library": { + "name": "http" + } + }, + "timestamp": "2020-01-21T00:21:34.208Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.custify.com/people", + "headers": { + "Content-Type": "application/json", + "Authorization": "Bearer apiKey_key_test_001", + "Accept": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "user_id": "user_111", + "phone": 9830311522, + "signed_up_at": "2020-01-21T00:21:34.208Z", + "custom_attributes": { + "firstName": "Absolute", + "lastName": "User", + "custom_prop1": "custom_value1", + "custom_prop2": 123, + "custom_prop3": false, + "createdAt": "2022-04-27T13:56:13.012Z" + }, + "name": "Absolute User", + "companies": [ + { + "company_id": "company_222", + "remove": false + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "user_111" + }, + "statusCode": 200 + } + ] + } + } + } +] \ No newline at end of file diff --git a/test/integrations/destinations/custify/router/data.ts b/test/integrations/destinations/custify/router/data.ts new file mode 100644 index 0000000000..12639192f8 --- /dev/null +++ b/test/integrations/destinations/custify/router/data.ts @@ -0,0 +1,242 @@ +export const data = [ + { + name: 'custify', + description: 'Test 0', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + "description": "Group callw with all parameters", + "destination": { + "Config": { + "apiKey": "apiKey_key_test_001", + "sendAnonymousId": false + }, + "ID": "custify-1234" + }, + "metadata": { + "jobId": 1 + }, + "message": { + "type": "group", + "userId": "user_111", + "groupId": "company_222", + "traits": { + "name": "Absolute Company", + "industry": " Absolute", + "employees": 121, + "size": 100, + "website": "www.rudder.com", + "plan": "GOLD", + "monthly_revenue": 8000, + "churned": false, + "test_att1": "test_att_val1" + }, + "context": { + "traits": { + "firstName": "Absolute", + "lastName": "User", + "phone": 9830311522, + "session_count": 23, + "signed_up_at": "2022-04-27T13:56:13.012Z", + "custom_prop1": "custom_value1", + "custom_prop2": 123, + "custom_prop3": false, + "custom_prop4": { + "test": "test" + }, + "custom_prop5": [1, 3, 4], + "createdAt": "2022-04-27T13:56:13.012Z" + }, + "ip": "14.5.67.21", + "library": { + "name": "http" + } + }, + "timestamp": "2020-01-21T00:21:34.208Z" + } + }, + { + "description": "Identify with all parameters", + "destination": { + "Config": { + "apiKeyToken": "pk_123", + "listId": "correctListId123" + }, + "ID": "custify-1234" + }, + "metadata": { + "jobId": 2 + }, + "message": { + "type": "identify", + "userId": "user_1234", + "context": { + "traits": { + "email": "user111@gmail.com", + "firstName": "New", + "lastName": "User", + "phone": 9830311522, + "sessionCount": 23, + "unsubscribedFromEmails": false, + "unsubscribedFromCalls": false, + + "signed_up_at": "2022-04-27T13:56:13.012Z", + "custom_prop1": "custom_value1", + "custom_prop2": 123, + "custom_prop3": false, + "custom_prop4": { "test": "test" }, + "custom_prop5": [1, 3, 4], + "createdAt": "2022-04-27T13:56:13.012Z", + "company": { + "id": "company_123" + } + } + }, + "timestamp": "2022-04-27T13:56:13.012Z", + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c" + } + ], + destType: 'custify', + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + "batchedRequest": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.custify.com/people", + "headers": { + "Content-Type": "application/json", + "Authorization": "Bearer apiKey_key_test_001", + "Accept": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "user_id": "user_111", + "phone": 9830311522, + "signed_up_at": "2020-01-21T00:21:34.208Z", + "custom_attributes": { + "firstName": "Absolute", + "lastName": "User", + "custom_prop1": "custom_value1", + "custom_prop2": 123, + "custom_prop3": false, + "createdAt": "2022-04-27T13:56:13.012Z" + }, + "name": "Absolute User", + "companies": [ + { + "company_id": "company_222", + "remove": false + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "user_111" + }, + "metadata": [ + { + "jobId": 1 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "Config": { + "apiKey": "apiKey_key_test_001", + "sendAnonymousId": false + }, + "ID": "custify-1234" + } + }, + { + "batchedRequest": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.custify.com/people", + "headers": { + "Content-Type": "application/json", + "Authorization": "Bearer undefined", + "Accept": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "user_id": "user_1234", + "email": "user111@gmail.com", + "phone": 9830311522, + "session_count": 23, + "unsubscribed_from_emails": false, + "unsubscribed_from_calls": false, + "signed_up_at": "2022-04-27T13:56:13.012Z", + "custom_attributes": { + "firstName": "New", + "lastName": "User", + "sessionCount": 23, + "unsubscribedFromEmails": false, + "unsubscribedFromCalls": false, + "custom_prop1": "custom_value1", + "custom_prop2": 123, + "custom_prop3": false, + "createdAt": "2022-04-27T13:56:13.012Z" + }, + "name": "New User", + "companies": [ + { + "company_id": "company_123", + "remove": false + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "user_1234" + }, + "metadata": [ + { + "jobId": 2 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "Config": { + "apiKeyToken": "pk_123", + "listId": "correctListId123" + }, + "ID": "custify-1234" + } + } + ], + }, + }, + }, + }, +]; diff --git a/test/integrations/destinations/delighted/network.ts b/test/integrations/destinations/delighted/network.ts new file mode 100644 index 0000000000..15b0a414e6 --- /dev/null +++ b/test/integrations/destinations/delighted/network.ts @@ -0,0 +1,30 @@ +export const networkCallsData = [ + { + httpReq: { + url: 'https://api.delighted.com/v1/people.json', + method: 'GET', + headers: { Authorization: `Basic ZHVtbXlBcGlLZXk=` }, + params: { + email: "identified_user@email.com" + } + }, + httpRes: { + data: ["user data"], + status: 200 + }, + }, + { + httpReq: { + url: 'https://api.delighted.com/v1/people.json', + method: 'GET', + headers: { Authorization: `Basic ZHVtbXlBcGlLZXlmb3JmYWlsdXJl` }, + params: { + email: "unidentified_user@email.com" + } + }, + httpRes: { + data: [], + status: 200 + }, + } +]; diff --git a/test/integrations/destinations/delighted/processor/data.ts b/test/integrations/destinations/delighted/processor/data.ts new file mode 100644 index 0000000000..1bf6a28354 --- /dev/null +++ b/test/integrations/destinations/delighted/processor/data.ts @@ -0,0 +1,937 @@ +export const data = [ + { + "name": "delighted", + "description": "Test 0", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "channel": "email", + "delay": 0, + "eventNamesSettings": [ + { + "event": "" + } + ] + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "type": "identify", + "userId": "abc@123.com", + "traits": { + "firstName": "James", + "lastName": "Doe", + "phone": "+91237416221", + "last_sent_at": "1626698350" + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.delighted.com/v1/people.json", + "headers": { + "Authorization": "Basic ZHVtbXlBcGlLZXk=", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {}, + "JSON": { + "email": "abc@123.com", + "send": false, + "channel": "email", + "delay": 0, + "name": "James Doe", + "phone_number": "+91237416221", + "last_sent_at": "1626698350" + } + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "delighted", + "description": "Test 1", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "channel": "email", + "delay": 0, + "eventNamesSettings": [ + { + "event": "" + } + ] + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "type": "alias", + "previousId": "123@abc.com", + "userId": "abc@123.com", + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {}, + "JSON": { + "email": "123@abc.com", + "email_update": "abc@123.com" + } + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": {}, + "headers": { + "Authorization": "Basic ZHVtbXlBcGlLZXk=", + "Content-Type": "application/json" + }, + "version": "1", + "endpoint": "https://api.delighted.com/v1/people.json", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "delighted", + "description": "Test 2", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "channel": "email", + "delay": 0, + "eventNamesSettings": [ + { + "event": "Product Reviewed" + } + ] + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "type": "track", + "userId": "identified_user@email.com", + "event": "Product Reviewed", + "properties": { + "review_id": "12345", + "product_id": "123", + "rating": 3, + "review_body": "Average product, expected much more." + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {}, + "JSON": { + "properties": { + "review_id": "12345", + "product_id": "123", + "rating": 3, + "review_body": "Average product, expected much more." + }, + "send": true, + "channel": "email", + "delay": 0, + "email": "identified_user@email.com" + } + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": {}, + "headers": { + "Authorization": "Basic ZHVtbXlBcGlLZXk=", + "Content-Type": "application/json" + }, + "version": "1", + "endpoint": "https://api.delighted.com/v1/people.json", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "delighted", + "description": "Test 3", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKeyforfailure", + "channel": "email", + "delay": 0, + "eventNamesSettings": [ + { + "event": "Product Reviewed" + } + ] + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "type": "track", + "userId": "unidentified_user@email.com", + "event": "Product Reviewed", + "properties": { + "review_id": "12345", + "product_id": "123", + "rating": 3, + "review_body": "Average product, expected much more." + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "user unidentified_user@email.com doesn't exist", + "statTags": { + "destType": "DELIGHTED", + "errorCategory": "network", + "errorType": "aborted", + "feature": "processor", + "implementation": "native", + "meta": "instrumentation", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "delighted", + "description": "Test 4", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "channel": "email", + "delay": 0, + "eventNamesSettings": [ + { + "event": "" + } + ] + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "type": "track", + "userId": "identified_user@email.com", + "event": "Product Reviewed", + "properties": { + "review_id": "12345", + "product_id": "123", + "rating": 3, + "review_body": "Average product, expected much more." + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Event is not configured on your Rudderstack Dashboard", + "statTags": { + "destType": "DELIGHTED", + "errorCategory": "dataValidation", + "errorType": "configuration", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "delighted", + "description": "Test 5", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "channel": "email", + "delay": 0, + "eventNamesSettings": [ + { + "event": "Product Reviewed" + } + ] + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "type": "track", + "anonymousId": "identified_user@email.com", + "event": "Product Reviewed", + "properties": { + "review_id": "12345", + "product_id": "123", + "rating": 3, + "review_body": "Average product, expected much more." + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "userId is required.", + "statTags": { + "destType": "DELIGHTED", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "delighted", + "description": "Test 6", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "channel": "email", + "delay": 0, + "eventNamesSettings": [ + { + "event": "" + } + ] + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "type": "alias", + "previousId": "123@abc.com", + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "userId is required.", + "statTags": { + "destType": "DELIGHTED", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "delighted", + "description": "Test 7", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "channel": "email", + "delay": 0, + "eventNamesSettings": [ + { + "event": "" + } + ] + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "externalId": [ + { + "id": "sms", + "type": "delightedChannelType" + } + ], + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "type": "alias", + "userId": "abc@123.com", + "previousId": "123@abc.com", + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "User Id and Previous Id should be of same type i.e. phone/sms", + "statTags": { + "destType": "DELIGHTED", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "delighted", + "description": "Test 8", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "channel": "email", + "delay": 0, + "eventNamesSettings": [ + { + "event": "" + } + ] + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "externalId": [ + { + "id": "sms", + "type": "delightedChannelType" + } + ], + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "type": "identify", + "userId": "abc@123.com", + "traits": { + "firstName": "James", + "lastName": "Doe", + "phone": "+91237416221", + "last_sent_at": "1626698350" + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Channel is set to sms. Enter correct phone number i.e. E.164", + "statTags": { + "destType": "DELIGHTED", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "delighted", + "description": "Test 9", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "channel": "email", + "delay": 0, + "eventNamesSettings": [ + { + "event": "" + } + ] + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "externalId": [ + { + "id": "sms", + "type": "delightedChannelType" + } + ], + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "type": "identify", + "userId": "+911234567890", + "traits": { + "firstName": "James", + "lastName": "Doe", + "last_sent_at": "1626698350" + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.delighted.com/v1/people.json", + "headers": { + "Authorization": "Basic ZHVtbXlBcGlLZXk=", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {}, + "JSON": { + "send": false, + "channel": "sms", + "delay": 0, + "name": "James Doe", + "phone_number": "+911234567890", + "last_sent_at": "1626698350" + } + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + } +] \ No newline at end of file diff --git a/test/integrations/destinations/delighted/router/data.ts b/test/integrations/destinations/delighted/router/data.ts new file mode 100644 index 0000000000..115ac7b05e --- /dev/null +++ b/test/integrations/destinations/delighted/router/data.ts @@ -0,0 +1,191 @@ +export const data = [ + { + name: 'delighted', + description: 'Test 0', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "channel": "email", + "delay": 0, + "eventNamesSettings": [{ "event": "" }] + } + }, + "metadata": { + "jobId": 1 + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { "name": "", "version": "" }, + "screen": { "density": 2 } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "type": "identify", + "userId": "abc@123.com", + "traits": { + "firstName": "James", + "lastName": "Doe", + "phone": "+92374162212", + "last_sent_at": "1626698350" + }, + "integrations": { "All": true }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + }, + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "channel": "email", + "delay": 0, + "eventNamesSettings": [{ "event": "" }] + } + }, + "metadata": { + "jobId": 2 + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { "name": "", "version": "" }, + "screen": { "density": 2 } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "type": "alias", + "previousId": "123@abc.com", + "userId": "abc@123.com", + "integrations": { "All": true }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ], + destType: 'delighted', + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + "batchedRequest": { + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {}, + "JSON": { + "email": "abc@123.com", + "send": false, + "channel": "email", + "delay": 0, + "last_sent_at": "1626698350", + "name": "James Doe", + "phone_number": "+92374162212" + } + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": {}, + "headers": { + "Authorization": "Basic ZHVtbXlBcGlLZXk=", + "Content-Type": "application/json" + }, + "version": "1", + "endpoint": "https://api.delighted.com/v1/people.json" + }, + "metadata": [ + { + "jobId": 1 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "channel": "email", + "delay": 0, + "eventNamesSettings": [{ "event": "" }] + } + } + }, + { + "batchedRequest": { + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {}, + "JSON": { + "email": "123@abc.com", + "email_update": "abc@123.com" + } + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": {}, + "headers": { + "Authorization": "Basic ZHVtbXlBcGlLZXk=", + "Content-Type": "application/json" + }, + "version": "1", + "endpoint": "https://api.delighted.com/v1/people.json" + }, + "metadata": [ + { + "jobId": 2 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "channel": "email", + "delay": 0, + "eventNamesSettings": [{ "event": "" }] + } + } + } + ] + , + }, + }, + }, + }, +]; diff --git a/test/integrations/destinations/drip/network.ts b/test/integrations/destinations/drip/network.ts new file mode 100644 index 0000000000..cfce027426 --- /dev/null +++ b/test/integrations/destinations/drip/network.ts @@ -0,0 +1,30 @@ +export const networkCallsData = [ + { + httpReq: { + url: 'https://api.getdrip.com/v2/1809802/subscribers/identified_user@gmail.com', + method: 'GET', + }, + httpRes: { + status: 200, + }, + }, + { + httpReq: { + url: 'https://api.getdrip.com/v2/1809802/subscribers/unidentified_user@gmail.com', + method: 'GET', + }, + httpRes: { + status: 400, + }, + }, + , + { + httpReq: { + url: 'https://api.getdrip.com/v2/1809802/subscribers', + method: 'POST', + }, + httpRes: { + status: 200, + }, + }, +]; diff --git a/test/integrations/destinations/drip/processor/data.ts b/test/integrations/destinations/drip/processor/data.ts new file mode 100644 index 0000000000..17cf37d198 --- /dev/null +++ b/test/integrations/destinations/drip/processor/data.ts @@ -0,0 +1,1487 @@ +export const data = [ + { + "name": "drip", + "description": "Test 0", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "accountId": "1809802", + "campaignId": "", + "enableUserCreation": true + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "type": "identify", + "traits": { + "email": "test1@gmail.com", + "firstName": "James", + "lastName": "Doe", + "phone": "237416221", + "customFields": { + "filter1": "filterval1" + } + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.getdrip.com/v2/1809802/subscribers", + "headers": { + "Authorization": "Basic ZHVtbXlBcGlLZXk=", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {}, + "JSON": { + "subscribers": [ + { + "email": "test1@gmail.com", + "first_name": "James", + "last_name": "Doe", + "phone": "237416221", + "ip_address": "0.0.0.0", + "custom_fields": { + "filter1": "filterval1" + } + } + ] + } + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "drip", + "description": "Test 1", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "accountId": "1809802", + "campaignId": "", + "enableUserCreation": true + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "type": "identify", + "traits": { + "email": "12324adfgs", + "firstName": "James", + "lastName": "Doe", + "phone": "237416221", + "customFields": { + "filter1": "filterval1" + } + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "dripId or email is required for the call", + "statTags": { + "destType": "DRIP", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "drip", + "description": "Test 2", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "accountId": "1809802", + "campaignId": "", + "enableUserCreation": true + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "type": "identify", + "traits": { + "email": "test1@gmail.com", + "name": "James Doe", + "phone": "237416221", + "filter1": "filterval1", + "filter2": "filterval2" + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.getdrip.com/v2/1809802/subscribers", + "headers": { + "Authorization": "Basic ZHVtbXlBcGlLZXk=", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {}, + "JSON": { + "subscribers": [ + { + "email": "test1@gmail.com", + "first_name": "James", + "last_name": "Doe", + "phone": "237416221", + "ip_address": "0.0.0.0", + "custom_fields": { + "filter1": "filterval1", + "filter2": "filterval2" + } + } + ] + } + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "drip", + "description": "Test 3", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "accountId": "1809802", + "campaignId": "915194776", + "enableUserCreation": true + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "type": "identify", + "traits": { + "email": "test1@gmail.com", + "name": "James Doe", + "phone": "237416221", + "filter1": "filterval1", + "filter2": "filterval2", + "tags": [ + "tag1", + "tag2" + ], + "startingEmailIndex": 1 + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.getdrip.com/v2/1809802/campaigns/915194776/subscribers", + "headers": { + "Authorization": "Basic ZHVtbXlBcGlLZXk=", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {}, + "JSON": { + "subscribers": [ + { + "email": "test1@gmail.com", + "starting_email_index": 1 + } + ] + } + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "drip", + "description": "Test 4", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "accountId": "1809802", + "campaignId": "915194776", + "enableUserCreation": true + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "type": "track", + "event": "testing", + "properties": { + "email": "user1@gmail.com", + "customFields": { + "field1": "val1" + } + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.getdrip.com/v2/1809802/events", + "headers": { + "Authorization": "Basic ZHVtbXlBcGlLZXk=", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {}, + "JSON": { + "events": [ + { + "email": "user1@gmail.com", + "properties": { + "field1": "val1" + }, + "action": "testing", + "occurred_at": "2019-10-14T09:03:17.562Z" + } + ] + } + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "drip", + "description": "Test 5", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "accountId": "1809802", + "campaignId": "915194776", + "enableUserCreation": true + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "type": "track", + "event": "", + "properties": { + "email": "user1@gmail.com", + "custom_fields": { + "field1": "val1" + } + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Event name is required", + "statTags": { + "destType": "DRIP", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "drip", + "description": "Test 6", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "accountId": "1809802", + "campaignId": "915194776", + "enableUserCreation": false + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "type": "track", + "event": "testing", + "properties": { + "email": "identified_user@gmail.com", + "customFields": { + "field1": "val1" + } + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.getdrip.com/v2/1809802/events", + "headers": { + "Authorization": "Basic ZHVtbXlBcGlLZXk=", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {}, + "JSON": { + "events": [ + { + "email": "identified_user@gmail.com", + "properties": { + "field1": "val1" + }, + "action": "testing", + "occurred_at": "2019-10-14T09:03:17.562Z" + } + ] + } + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "drip", + "description": "Test 7", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "accountId": "1809802", + "campaignId": "915194776", + "enableUserCreation": false + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "type": "track", + "event": "testing", + "properties": { + "email": "identified_user@gmail.com", + "field1": "val1" + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.getdrip.com/v2/1809802/events", + "headers": { + "Authorization": "Basic ZHVtbXlBcGlLZXk=", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {}, + "JSON": { + "events": [ + { + "email": "identified_user@gmail.com", + "properties": { + "field1": "val1" + }, + "action": "testing", + "occurred_at": "2019-10-14T09:03:17.562Z" + } + ] + } + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "drip", + "description": "Test 8", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "accountId": "1809802", + "campaignId": "915194776", + "enableUserCreation": false + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "type": "track", + "event": "testing", + "properties": { + "email": "unidentified_user@gmail.com", + "field1": "val1" + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Error occurred while checking user : error response not found", + "statTags": { + "destType": "DRIP", + "errorCategory": "network", + "errorType": "aborted", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "drip", + "description": "Test 9", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "accountId": "1809802", + "campaignId": "915194776", + "enableUserCreation": false + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "type": "track", + "event": "checkout started", + "properties": { + "email": "identified_user@gmail.com", + "field1": "val1", + "affiliation": "my_custom_order", + "order_id": "456445746" + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.getdrip.com/v3/1809802/shopper_activity/order", + "headers": { + "Authorization": "Basic ZHVtbXlBcGlLZXk=", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {}, + "JSON": { + "action": "placed", + "email": "identified_user@gmail.com", + "occurred_at": "2019-10-14T09:03:17.562Z", + "order_id": "456445746", + "provider": "my_custom_order" + } + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "drip", + "description": "Test 10", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "accountId": "1809802", + "campaignId": "915194776", + "enableUserCreation": false + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "type": "track", + "event": "checkout started", + "properties": { + "email": "identified_user@gmail.com", + "field1": "val1", + "affiliation": "my_custom_order", + "order_id": "456445746", + "products": [ + { + "name": "shirt", + "price": 11.16 + } + ] + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.getdrip.com/v3/1809802/shopper_activity/order", + "headers": { + "Authorization": "Basic ZHVtbXlBcGlLZXk=", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {}, + "JSON": { + "action": "placed", + "email": "identified_user@gmail.com", + "occurred_at": "2019-10-14T09:03:17.562Z", + "order_id": "456445746", + "provider": "my_custom_order", + "items": [ + { + "name": "shirt", + "price": 11.16 + } + ] + } + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "drip", + "description": "Test 11", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "accountId": "1809802", + "campaignId": "915194776", + "enableUserCreation": false + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "type": "track", + "event": "checkout", + "properties": { + "email": "identified_user@gmail.com", + "field1": "val1", + "customFields": { + "field2": "val2" + } + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.getdrip.com/v2/1809802/events", + "headers": { + "Authorization": "Basic ZHVtbXlBcGlLZXk=", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {}, + "JSON": { + "events": [ + { + "action": "checkout", + "email": "identified_user@gmail.com", + "occurred_at": "2019-10-14T09:03:17.562Z", + "properties": { + "field2": "val2" + } + } + ] + } + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "drip", + "description": "Test 12", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "accountId": "1809802", + "campaignId": "", + "enableUserCreation": true + } + }, + "message": { + "type": "identify", + "event": "identify", + "userId": "user@1", + "channel": "mobile", + "context": { + "os": { + "name": "Android", + "version": "13" + }, + "app": { + "name": "rudderstack", + "build": "5425", + "version": "2.4.1" + }, + "device": { + "id": "8b048b94cbec4fcf", + "name": "o1q", + "type": "Android", + "model": "SM-G991U", + "manufacturer": "samsung" + }, + "locale": "en-US", + "traits": { + "id": "ruddertest@gmail.com", + "email": "ruddertest@gmail.com", + "title": "Social Impact Program Manager", + "skills": [ + { + "id": 134, + "name": "Business Development", + "tagGroupId": 2, + "parentTagId": 134, + "huddleVisible": false, + "onboardVisible": false + }, + { + "id": 96, + "name": "Communications", + "tagGroupId": 2, + "parentTagId": 96, + "huddleVisible": true, + "onboardVisible": true + }, + { + "id": 489, + "name": "Construction", + "tagGroupId": 2, + "parentTagId": 489, + "huddleVisible": false, + "onboardVisible": false + }, + { + "id": 671, + "name": "Data Analysis", + "tagGroupId": 2, + "parentTagId": 671, + "huddleVisible": false, + "onboardVisible": false + }, + { + "id": 676, + "name": "Engineering: Mechanical", + "tagGroupId": 2, + "parentTagId": 676, + "huddleVisible": false, + "onboardVisible": false + }, + { + "id": 189, + "name": "Operations", + "tagGroupId": 2, + "parentTagId": 189, + "huddleVisible": true, + "onboardVisible": true + }, + { + "id": 194, + "name": "Product Management", + "tagGroupId": 2, + "parentTagId": 194, + "huddleVisible": true, + "onboardVisible": true + }, + { + "id": 195, + "name": "Program Management", + "tagGroupId": 2, + "parentTagId": 195, + "huddleVisible": false, + "onboardVisible": false + }, + { + "id": 199, + "name": "R&D", + "tagGroupId": 2, + "parentTagId": 199, + "huddleVisible": false, + "onboardVisible": false + }, + { + "id": 102, + "name": "Sales", + "tagGroupId": 2, + "parentTagId": 102, + "huddleVisible": true, + "onboardVisible": true + } + ], + "userId": "ruddertest@gmail.com", + "address": "Chicago, IL, USA", + "industry": "Education", + "lastName": "test", + "lastname": "test", + "verified": false, + "firstName": "rudder", + "firstname": "rudder", + "interests": [ + { + "id": 649, + "name": "Adaptation", + "tagGroupId": 4, + "parentTagId": 745, + "huddleVisible": false, + "onboardVisible": false + }, + { + "id": 663, + "name": "Carbon removal and sequestration", + "tagGroupId": 4, + "parentTagId": 761, + "huddleVisible": false, + "onboardVisible": false + }, + { + "id": 664, + "name": "Clean Energy and Energy Efficiency", + "tagGroupId": 4, + "parentTagId": 259, + "huddleVisible": false, + "onboardVisible": false + }, + { + "id": 654, + "name": "Climate Science and Earth Systems", + "tagGroupId": 4, + "parentTagId": 744, + "huddleVisible": false, + "onboardVisible": false + }, + { + "id": 650, + "name": "Corporate Sustainability", + "tagGroupId": 4, + "parentTagId": 650, + "huddleVisible": false, + "onboardVisible": false + }, + { + "id": 651, + "name": "Finance & Risk", + "tagGroupId": 4, + "parentTagId": 651, + "huddleVisible": false, + "onboardVisible": false + }, + { + "id": 652, + "name": "Food and Agriculture", + "tagGroupId": 4, + "parentTagId": 652, + "huddleVisible": false, + "onboardVisible": false + }, + { + "id": 665, + "name": "Transport", + "tagGroupId": 4, + "parentTagId": 665, + "huddleVisible": false, + "onboardVisible": false + } + ], + "isDeleted": false, + "anonymousId": "8b048b94cbec4fcf", + "jobFunction": "Program manager", + "reminderType": 1, + "jobPreferences": { + "motivationStr": "I am looking for a job in climate change.,I want to learn about climate change.,I’d like to connect with other climate enthusiasts.", + "searchUrgency": "As soon as possible", + "maxCompensation": 0, + "minCompensation": 0 + }, + "visibilityType": "public", + "Linkedin-Signin": true, + "hubbleOnboarded": false, + "sharePreference": false, + "notificationType": 0, + "shortDescription": "Social Impact Program Manager", + "jobProfileComplete": false, + "noOfMonthExperience": 0, + "onboarding_completed": "Yes" + }, + "library": { + "name": "com.rudderstack.android.sdk.core", + "version": "1.8.1" + }, + "timezone": "America/Chicago", + "sessionId": 1681096824, + "userAgent": "Dalvik/2.1.0 (Linux; U; Android 13; SM-G991U Build/TP1A.220624.014)" + }, + "rudderId": "f701966c-5568-4500-92ba-4e9023c8fe31", + "messageId": "77b53247-177f-4ca3-a6b4-aa7558fec280", + "request_ip": "75.209.176.135", + "anonymousId": "8b048b94cbec4fcf", + "integrations": { + "All": true + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.getdrip.com/v2/1809802/subscribers", + "headers": { + "Authorization": "Basic ZHVtbXlBcGlLZXk=", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {}, + "JSON": { + "subscribers": [ + { + "email": "ruddertest@gmail.com", + "user_id": "user@1", + "address1": "Chicago, IL, USA", + "last_name": "test", + "first_name": "rudder", + "custom_fields": { + "title": "Social Impact Program Manager", + "industry": "Education", + "verified": false, + "isDeleted": false, + "jobFunction": "Program manager", + "reminderType": 1, + "jobPreferences": { + "motivationStr": "I am looking for a job in climate change.,I want to learn about climate change.,I’d like to connect with other climate enthusiasts.", + "searchUrgency": "As soon as possible", + "maxCompensation": 0, + "minCompensation": 0 + }, + "visibilityType": "public", + "hubbleOnboarded": false, + "sharePreference": false, + "notificationType": 0, + "shortDescription": "Social Impact Program Manager", + "jobProfileComplete": false, + "noOfMonthExperience": 0, + "onboarding_completed": "Yes" + } + } + ] + } + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + } +] \ No newline at end of file diff --git a/test/integrations/destinations/drip/router/data.ts b/test/integrations/destinations/drip/router/data.ts new file mode 100644 index 0000000000..d13c73a0d1 --- /dev/null +++ b/test/integrations/destinations/drip/router/data.ts @@ -0,0 +1,210 @@ +export const data = [ + { + name: 'drip', + description: 'Test 0', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "accountId": "1809802", + "campaignId": "", + "enableUserCreation": true + } + }, + "metadata": { + "jobId": 1 + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { "name": "", "version": "" }, + "screen": { "density": 2 } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "type": "identify", + "traits": { + "email": "test1@gmail.com", + "firstName": "James", + "lastName": "Doe", + "phone": "237416221", + "customFields": { + "filter1": "filterval1" + } + }, + "integrations": { "All": true }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + }, + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "accountId": "1809802", + "campaignId": "915194776", + "enableUserCreation": true + } + }, + "metadata": { + "jobId": 2 + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { "name": "RudderLabs JavaScript SDK", "version": "1.0.0" }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { "name": "", "version": "" }, + "screen": { "density": 2 } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "type": "track", + "event": "testing", + "properties": { + "email": "user1@gmail.com", + "customFields": { + "field1": "val1" + } + }, + "integrations": { "All": true }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ], + destType: 'drip', + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + "batchedRequest": { + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {}, + "JSON": { + "subscribers": [ + { + "email": "test1@gmail.com", + "first_name": "James", + "last_name": "Doe", + "phone": "237416221", + "ip_address": "0.0.0.0", + "custom_fields": { + "filter1": "filterval1" + } + } + ] + } + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": {}, + "headers": { + "Authorization": "Basic ZHVtbXlBcGlLZXk=", + "Content-Type": "application/json" + }, + "version": "1", + "endpoint": "https://api.getdrip.com/v2/1809802/subscribers" + }, + "metadata": [ + { + "jobId": 1 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "accountId": "1809802", + "campaignId": "", + "enableUserCreation": true + } + } + }, + { + "batchedRequest": { + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {}, + "JSON": { + "events": [ + { + "email": "user1@gmail.com", + "properties": { + "field1": "val1" + }, + "action": "testing", + "occurred_at": "2019-10-14T09:03:17.562Z" + } + ] + } + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": {}, + "headers": { + "Authorization": "Basic ZHVtbXlBcGlLZXk=", + "Content-Type": "application/json" + }, + "version": "1", + "endpoint": "https://api.getdrip.com/v2/1809802/events" + }, + "metadata": [ + { + "jobId": 2 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "accountId": "1809802", + "campaignId": "915194776", + "enableUserCreation": true + } + } + } + ], + }, + }, + }, + }, +]; diff --git a/test/integrations/destinations/facebook_conversions/mocks.ts b/test/integrations/destinations/facebook_conversions/mocks.ts new file mode 100644 index 0000000000..c155897bc4 --- /dev/null +++ b/test/integrations/destinations/facebook_conversions/mocks.ts @@ -0,0 +1,3 @@ +export const defaultMockFns = () => { + jest.spyOn(Date, 'now').mockImplementation(() => new Date('2023-11-12T15:46:51.000Z').valueOf()); +}; diff --git a/test/integrations/destinations/facebook_conversions/processor/data.ts b/test/integrations/destinations/facebook_conversions/processor/data.ts new file mode 100644 index 0000000000..beb7eb32aa --- /dev/null +++ b/test/integrations/destinations/facebook_conversions/processor/data.ts @@ -0,0 +1,1437 @@ +import { defaultMockFns } from '../mocks'; + +export const data = [ + { + name: 'facebook_conversions', + description: + 'Timestamp validation. Events must be sent within seven days of their occurrence or up to one minute in the future', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + channel: 'web', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, + screen: { + height: '100', + density: 50, + }, + traits: { + email: ' aBc@gmail.com ', + address: { + zip: 1234, + }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'randomevent', + integrations: { + All: true, + }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + revenue: 400, + additional_bet_index: 0, + }, + timestamp: '2023-09-01T15:46:51.693229+05:30', + type: 'track', + }, + destination: { + Config: { + limitedDataUsage: true, + blacklistPiiProperties: [ + { + blacklistPiiProperties: '', + blacklistPiiHash: false, + }, + ], + accessToken: '09876', + datasetId: 'dummyID', + eventsToEvents: [ + { + from: '', + to: '', + }, + ], + eventCustomProperties: [ + { + eventCustomProperties: '', + }, + ], + removeExternalId: true, + whitelistPiiProperties: [ + { + whitelistPiiProperties: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: + 'Events must be sent within seven days of their occurrence or up to one minute in the future.', + statusCode: 400, + statTags: { + destType: 'FACEBOOK_CONVERSIONS', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'facebook_conversions', + description: 'Track event without event property set', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + channel: 'web', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, + screen: { + height: '100', + density: 50, + }, + traits: { + email: ' aBc@gmail.com ', + address: { + zip: 1234, + }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: '', + integrations: { + All: true, + }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + revenue: 400, + additional_bet_index: 0, + }, + timestamp: '2023-11-12T15:46:51.693229+05:30', + type: 'track', + }, + destination: { + Config: { + limitedDataUsage: true, + blacklistPiiProperties: [ + { + blacklistPiiProperties: '', + blacklistPiiHash: false, + }, + ], + accessToken: '09876', + datasetId: 'dummyID', + eventsToEvents: [ + { + from: '', + to: '', + }, + ], + eventCustomProperties: [ + { + eventCustomProperties: '', + }, + ], + removeExternalId: true, + whitelistPiiProperties: [ + { + whitelistPiiProperties: '', + }, + ], + actionSource: 'website', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: "'event' is required and should be a string", + statTags: { + destType: 'FACEBOOK_CONVERSIONS', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'facebook_conversions', + description: 'Simple track event', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + channel: 'web', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, + screen: { + height: '100', + density: 50, + }, + traits: { + email: ' aBc@gmail.com ', + address: { + zip: 1234, + }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'spin_result', + integrations: { + All: true, + }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + revenue: 400, + additional_bet_index: 0, + }, + timestamp: '2023-11-12T15:46:51.693229+05:30', + type: 'track', + }, + destination: { + Config: { + limitedDataUsage: true, + blacklistPiiProperties: [ + { + blacklistPiiProperties: '', + blacklistPiiHash: false, + }, + ], + accessToken: '09876', + datasetId: 'dummyID', + eventsToEvents: [ + { + from: '', + to: '', + }, + ], + eventCustomProperties: [ + { + eventCustomProperties: '', + }, + ], + removeExternalId: true, + whitelistPiiProperties: [ + { + whitelistPiiProperties: '', + }, + ], + actionSource: 'website', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://graph.facebook.com/v18.0/dummyID/events?access_token=09876', + headers: {}, + params: {}, + body: { + JSON: {}, + XML: {}, + JSON_ARRAY: {}, + FORM: { + data: [ + '{"user_data":{"em":"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08","zp":"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4"},"event_name":"spin_result","event_time":1699784211,"action_source":"website","custom_data":{"revenue":400,"additional_bet_index":0,"value":400,"currency":"USD"}}', + ], + }, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'facebook_conversions', + description: 'Track event with standard event products searched', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + channel: 'web', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, + screen: { + height: '100', + density: 50, + }, + traits: { + email: ' aBc@gmail.com ', + address: { + zip: 1234, + }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'products searched', + integrations: { + All: true, + }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + revenue: 400, + additional_bet_index: 0, + }, + timestamp: '2023-11-12T15:46:51.693229+05:30', + type: 'track', + }, + destination: { + Config: { + limitedDataUsage: true, + blacklistPiiProperties: [ + { + blacklistPiiProperties: '', + blacklistPiiHash: false, + }, + ], + accessToken: '09876', + datasetId: 'dummyID', + eventsToEvents: [ + { + from: '', + to: '', + }, + ], + eventCustomProperties: [ + { + eventCustomProperties: '', + }, + ], + removeExternalId: true, + whitelistPiiProperties: [ + { + whitelistPiiProperties: '', + }, + ], + actionSource: 'website', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://graph.facebook.com/v18.0/dummyID/events?access_token=09876', + headers: {}, + params: {}, + body: { + JSON: {}, + XML: {}, + JSON_ARRAY: {}, + FORM: { + data: [ + '{"user_data":{"em":"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08","zp":"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4"},"event_name":"Search","event_time":1699784211,"action_source":"website","custom_data":{"revenue":400,"additional_bet_index":0,"content_ids":[],"contents":[],"content_type":"product","currency":"USD","value":400}}', + ], + }, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'facebook_conversions', + description: 'Track event with standard event product added', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + channel: 'web', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, + screen: { + height: '100', + density: 50, + }, + traits: { + email: ' aBc@gmail.com ', + address: { + zip: 1234, + }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'product added', + integrations: { + All: true, + }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + revenue: 400, + additional_bet_index: 0, + }, + timestamp: '2023-11-12T15:46:51.693229+05:30', + type: 'track', + }, + destination: { + Config: { + limitedDataUsage: true, + blacklistPiiProperties: [ + { + blacklistPiiProperties: '', + blacklistPiiHash: false, + }, + ], + accessToken: '09876', + datasetId: 'dummyID', + eventsToEvents: [ + { + from: '', + to: '', + }, + ], + eventCustomProperties: [ + { + eventCustomProperties: '', + }, + ], + removeExternalId: true, + whitelistPiiProperties: [ + { + whitelistPiiProperties: '', + }, + ], + actionSource: 'website', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://graph.facebook.com/v18.0/dummyID/events?access_token=09876', + headers: {}, + params: {}, + body: { + JSON: {}, + XML: {}, + JSON_ARRAY: {}, + FORM: { + data: [ + '{"user_data":{"em":"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08","zp":"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4"},"event_name":"AddToCart","event_time":1699784211,"action_source":"website","custom_data":{"revenue":400,"additional_bet_index":0,"content_ids":[],"contents":[],"content_type":"product","currency":"USD","value":400}}', + ], + }, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'facebook_conversions', + description: 'Track event with standard event product viewed', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + channel: 'web', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, + screen: { + height: '100', + density: 50, + }, + traits: { + email: ' aBc@gmail.com ', + address: { + zip: 1234, + }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'product viewed', + integrations: { + All: true, + }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + revenue: 400, + additional_bet_index: 0, + }, + timestamp: '2023-11-12T15:46:51.693229+05:30', + type: 'track', + }, + destination: { + Config: { + limitedDataUsage: true, + blacklistPiiProperties: [ + { + blacklistPiiProperties: '', + blacklistPiiHash: false, + }, + ], + accessToken: '09876', + datasetId: 'dummyID', + eventsToEvents: [ + { + from: '', + to: '', + }, + ], + eventCustomProperties: [ + { + eventCustomProperties: '', + }, + ], + removeExternalId: true, + whitelistPiiProperties: [ + { + whitelistPiiProperties: '', + }, + ], + actionSource: 'website', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://graph.facebook.com/v18.0/dummyID/events?access_token=09876', + headers: {}, + params: {}, + body: { + JSON: {}, + XML: {}, + JSON_ARRAY: {}, + FORM: { + data: [ + '{"user_data":{"em":"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08","zp":"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4"},"event_name":"ViewContent","event_time":1699784211,"action_source":"website","custom_data":{"revenue":400,"additional_bet_index":0,"content_ids":[],"contents":[],"content_type":"product","currency":"USD","value":400}}', + ], + }, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'facebook_conversions', + description: 'Track event with standard event product list viewed', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + channel: 'web', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, + screen: { + height: '100', + density: 50, + }, + traits: { + email: ' aBc@gmail.com ', + address: { + zip: 1234, + }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'product list viewed', + integrations: { + All: true, + }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + revenue: 400, + additional_bet_index: 0, + products: [ + { + product_id: 1234, + quantity: 5, + price: 55, + }, + ], + }, + timestamp: '2023-11-12T15:46:51.693229+05:30', + type: 'track', + }, + destination: { + Config: { + limitedDataUsage: true, + blacklistPiiProperties: [ + { + blacklistPiiProperties: '', + blacklistPiiHash: false, + }, + ], + accessToken: '09876', + datasetId: 'dummyID', + eventsToEvents: [ + { + from: '', + to: '', + }, + ], + eventCustomProperties: [ + { + eventCustomProperties: '', + }, + ], + removeExternalId: true, + whitelistPiiProperties: [ + { + whitelistPiiProperties: '', + }, + ], + actionSource: 'website', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://graph.facebook.com/v18.0/dummyID/events?access_token=09876', + headers: {}, + params: {}, + body: { + JSON: {}, + XML: {}, + JSON_ARRAY: {}, + FORM: { + data: [ + '{"user_data":{"em":"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08","zp":"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4"},"event_name":"ViewContent","event_time":1699784211,"action_source":"website","custom_data":{"revenue":400,"additional_bet_index":0,"products":[{"product_id":1234,"quantity":5,"price":55}],"content_ids":[1234],"contents":[{"id":1234,"quantity":5,"item_price":55}],"content_type":"product","currency":"USD","value":400}}', + ], + }, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'facebook_conversions', + description: 'Track event with standard event product list viewed without products array', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + channel: 'web', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, + screen: { + height: '100', + density: 50, + }, + traits: { + email: ' aBc@gmail.com ', + address: { + zip: 1234, + }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'product list viewed', + integrations: { + All: true, + }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + revenue: 400, + additional_bet_index: 0, + category: 'randomCategory', + }, + timestamp: '2023-11-12T15:46:51.693229+05:30', + type: 'track', + }, + destination: { + Config: { + limitedDataUsage: true, + blacklistPiiProperties: [ + { + blacklistPiiProperties: '', + blacklistPiiHash: false, + }, + ], + accessToken: '09876', + datasetId: 'dummyID', + eventsToEvents: [ + { + from: '', + to: '', + }, + ], + eventCustomProperties: [ + { + eventCustomProperties: '', + }, + ], + removeExternalId: true, + whitelistPiiProperties: [ + { + whitelistPiiProperties: '', + }, + ], + actionSource: 'website', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://graph.facebook.com/v18.0/dummyID/events?access_token=09876', + headers: {}, + params: {}, + body: { + JSON: {}, + XML: {}, + JSON_ARRAY: {}, + FORM: { + data: [ + '{"user_data":{"em":"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08","zp":"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4"},"event_name":"ViewContent","event_time":1699784211,"action_source":"website","custom_data":{"revenue":400,"additional_bet_index":0,"category":"randomCategory","content_ids":["randomCategory"],"contents":[{"id":"randomCategory","quantity":1}],"content_type":"product_group","content_category":"randomCategory","currency":"USD","value":400}}', + ], + }, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'facebook_conversions', + description: 'Track event with standard event product added to wishlist', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + channel: 'web', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, + screen: { + height: '100', + density: 50, + }, + traits: { + email: ' aBc@gmail.com ', + address: { + zip: 1234, + }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'product added to wishlist', + integrations: { + All: true, + }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + revenue: 400, + additional_bet_index: 0, + }, + timestamp: '2023-11-12T15:46:51.693229+05:30', + type: 'track', + }, + destination: { + Config: { + limitedDataUsage: true, + blacklistPiiProperties: [ + { + blacklistPiiProperties: '', + blacklistPiiHash: false, + }, + ], + accessToken: '09876', + datasetId: 'dummyID', + eventsToEvents: [ + { + from: '', + to: '', + }, + ], + eventCustomProperties: [ + { + eventCustomProperties: '', + }, + ], + removeExternalId: true, + whitelistPiiProperties: [ + { + whitelistPiiProperties: '', + }, + ], + actionSource: 'website', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://graph.facebook.com/v18.0/dummyID/events?access_token=09876', + headers: {}, + params: {}, + body: { + JSON: {}, + XML: {}, + JSON_ARRAY: {}, + FORM: { + data: [ + '{"user_data":{"em":"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08","zp":"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4"},"event_name":"AddToWishlist","event_time":1699784211,"action_source":"website","custom_data":{"revenue":400,"additional_bet_index":0,"content_ids":[],"contents":[],"currency":"USD","value":400}}', + ], + }, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'facebook_conversions', + description: 'Track event with standard event payment info entered', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + channel: 'web', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, + screen: { + height: '100', + density: 50, + }, + traits: { + email: ' aBc@gmail.com ', + address: { + zip: 1234, + }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'payment info entered', + integrations: { + All: true, + }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + revenue: 400, + additional_bet_index: 0, + }, + timestamp: '2023-11-12T15:46:51.693229+05:30', + type: 'track', + }, + destination: { + Config: { + limitedDataUsage: true, + blacklistPiiProperties: [ + { + blacklistPiiProperties: '', + blacklistPiiHash: false, + }, + ], + accessToken: '09876', + datasetId: 'dummyID', + eventsToEvents: [ + { + from: '', + to: '', + }, + ], + eventCustomProperties: [ + { + eventCustomProperties: '', + }, + ], + removeExternalId: true, + whitelistPiiProperties: [ + { + whitelistPiiProperties: '', + }, + ], + actionSource: 'website', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://graph.facebook.com/v18.0/dummyID/events?access_token=09876', + headers: {}, + params: {}, + body: { + JSON: {}, + XML: {}, + JSON_ARRAY: {}, + FORM: { + data: [ + '{"user_data":{"em":"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08","zp":"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4"},"event_name":"AddPaymentInfo","event_time":1699784211,"action_source":"website","custom_data":{"revenue":400,"additional_bet_index":0,"content_ids":[],"contents":[],"currency":"USD","value":400}}', + ], + }, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'facebook_conversions', + description: + 'Track event with standard event order completed with delivery_category in products array', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + channel: 'web', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, + screen: { + height: '100', + density: 50, + }, + traits: { + email: ' aBc@gmail.com ', + address: { + zip: 1234, + }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'order completed', + integrations: { + All: true, + }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + revenue: 400, + additional_bet_index: 0, + products: [ + { + product_id: 1234, + quantity: 5, + price: 55, + delivery_category: 'home_delivery', + }, + ], + }, + timestamp: '2023-11-12T15:46:51.693229+05:30', + type: 'track', + }, + destination: { + Config: { + limitedDataUsage: true, + blacklistPiiProperties: [ + { + blacklistPiiProperties: '', + blacklistPiiHash: false, + }, + ], + accessToken: '09876', + datasetId: 'dummyID', + eventsToEvents: [ + { + from: '', + to: '', + }, + ], + eventCustomProperties: [ + { + eventCustomProperties: '', + }, + ], + removeExternalId: true, + whitelistPiiProperties: [ + { + whitelistPiiProperties: '', + }, + ], + actionSource: 'website', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://graph.facebook.com/v18.0/dummyID/events?access_token=09876', + headers: {}, + params: {}, + body: { + JSON: {}, + XML: {}, + JSON_ARRAY: {}, + FORM: { + data: [ + '{"user_data":{"em":"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08","zp":"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4"},"event_name":"Purchase","event_time":1699784211,"action_source":"website","custom_data":{"revenue":400,"additional_bet_index":0,"products":[{"product_id":1234,"quantity":5,"price":55,"delivery_category":"home_delivery"}],"content_ids":[1234],"contents":[{"id":1234,"quantity":5,"item_price":55,"delivery_category":"home_delivery"}],"content_type":"product","currency":"USD","value":400,"num_items":1}}', + ], + }, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'facebook_conversions', + description: + 'Track event with standard event order completed with delivery_category in properties', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + channel: 'web', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, + screen: { + height: '100', + density: 50, + }, + traits: { + email: ' aBc@gmail.com ', + address: { + zip: 1234, + }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'order completed', + integrations: { + All: true, + }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + revenue: 400, + additional_bet_index: 0, + delivery_category: 'home_delivery', + products: [ + { + product_id: 1234, + quantity: 5, + price: 55, + }, + ], + }, + timestamp: '2023-11-12T15:46:51.693229+05:30', + type: 'track', + }, + destination: { + Config: { + limitedDataUsage: true, + blacklistPiiProperties: [ + { + blacklistPiiProperties: '', + blacklistPiiHash: false, + }, + ], + accessToken: '09876', + datasetId: 'dummyID', + eventsToEvents: [ + { + from: '', + to: '', + }, + ], + eventCustomProperties: [ + { + eventCustomProperties: '', + }, + ], + removeExternalId: true, + whitelistPiiProperties: [ + { + whitelistPiiProperties: '', + }, + ], + actionSource: 'website', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://graph.facebook.com/v18.0/dummyID/events?access_token=09876', + headers: {}, + params: {}, + body: { + JSON: {}, + XML: {}, + JSON_ARRAY: {}, + FORM: { + data: [ + '{"user_data":{"em":"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08","zp":"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4"},"event_name":"Purchase","event_time":1699784211,"action_source":"website","custom_data":{"revenue":400,"additional_bet_index":0,"delivery_category":"home_delivery","products":[{"product_id":1234,"quantity":5,"price":55}],"content_ids":[1234],"contents":[{"id":1234,"quantity":5,"item_price":55,"delivery_category":"home_delivery"}],"content_type":"product","currency":"USD","value":400,"num_items":1}}', + ], + }, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, +]; diff --git a/test/integrations/destinations/facebook_conversions/router/data.ts b/test/integrations/destinations/facebook_conversions/router/data.ts new file mode 100644 index 0000000000..1c7f316538 --- /dev/null +++ b/test/integrations/destinations/facebook_conversions/router/data.ts @@ -0,0 +1,306 @@ +import { defaultMockFns } from '../mocks'; +export const data = [ + { + name: 'facebook_conversions', + description: 'Successfull Remove Group Call ', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + metadata: { + jobId: 1, + }, + message: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + channel: 'web', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, + screen: { + height: '100', + density: 50, + }, + traits: { + email: ' aBc@gmail.com ', + address: { + zip: 1234, + }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'spin_result', + integrations: { + All: true, + }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + revenue: 400, + additional_bet_index: 0, + }, + timestamp: '2023-11-12T15:46:51.693229+05:30', + type: 'track', + }, + destination: { + Config: { + limitedDataUsage: true, + blacklistPiiProperties: [ + { + blacklistPiiProperties: '', + blacklistPiiHash: false, + }, + ], + accessToken: '09876', + datasetId: 'dummyID', + eventsToEvents: [ + { + from: '', + to: '', + }, + ], + eventCustomProperties: [ + { + eventCustomProperties: '', + }, + ], + removeExternalId: true, + whitelistPiiProperties: [ + { + whitelistPiiProperties: '', + }, + ], + actionSource: 'website', + }, + Enabled: true, + }, + }, + { + metadata: { + jobId: 2, + }, + message: { + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + channel: 'web', + context: { + device: { + id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', + manufacturer: 'Xiaomi', + model: 'Redmi 6', + name: 'xiaomi', + }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, + screen: { + height: '100', + density: 50, + }, + traits: { + email: ' aBc@gmail.com ', + address: { + zip: 1234, + }, + anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', + }, + }, + event: 'products searched', + integrations: { + All: true, + }, + message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', + properties: { + revenue: 400, + additional_bet_index: 0, + }, + timestamp: '2023-11-12T15:46:51.693229+05:30', + type: 'track', + }, + destination: { + Config: { + limitedDataUsage: true, + blacklistPiiProperties: [ + { + blacklistPiiProperties: '', + blacklistPiiHash: false, + }, + ], + accessToken: '09876', + datasetId: 'dummyID', + eventsToEvents: [ + { + from: '', + to: '', + }, + ], + eventCustomProperties: [ + { + eventCustomProperties: '', + }, + ], + removeExternalId: true, + whitelistPiiProperties: [ + { + whitelistPiiProperties: '', + }, + ], + actionSource: 'website', + }, + Enabled: true, + }, + }, + ], + destType: 'facebook_conversions', + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://graph.facebook.com/v18.0/dummyID/events?access_token=09876', + headers: {}, + params: {}, + body: { + JSON: {}, + XML: {}, + JSON_ARRAY: {}, + FORM: { + data: [ + '{"user_data":{"em":"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08","zp":"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4"},"event_name":"spin_result","event_time":1699784211,"action_source":"website","custom_data":{"revenue":400,"additional_bet_index":0,"value":400,"currency":"USD"}}', + ], + }, + }, + files: {}, + }, + metadata: [ + { + jobId: 1, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + limitedDataUsage: true, + blacklistPiiProperties: [ + { + blacklistPiiProperties: '', + blacklistPiiHash: false, + }, + ], + accessToken: '09876', + datasetId: 'dummyID', + eventsToEvents: [ + { + from: '', + to: '', + }, + ], + eventCustomProperties: [ + { + eventCustomProperties: '', + }, + ], + removeExternalId: true, + whitelistPiiProperties: [ + { + whitelistPiiProperties: '', + }, + ], + actionSource: 'website', + }, + Enabled: true, + }, + }, + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://graph.facebook.com/v18.0/dummyID/events?access_token=09876', + headers: {}, + params: {}, + body: { + JSON: {}, + XML: {}, + JSON_ARRAY: {}, + FORM: { + data: [ + '{"user_data":{"em":"48ddb93f0b30c475423fe177832912c5bcdce3cc72872f8051627967ef278e08","zp":"03ac674216f3e15c761ee1a5e255f067953623c8b388b4459e13f978d7c846f4"},"event_name":"Search","event_time":1699784211,"action_source":"website","custom_data":{"revenue":400,"additional_bet_index":0,"content_ids":[],"contents":[],"content_type":"product","currency":"USD","value":400}}', + ], + }, + }, + files: {}, + }, + metadata: [ + { + jobId: 2, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + limitedDataUsage: true, + blacklistPiiProperties: [ + { + blacklistPiiProperties: '', + blacklistPiiHash: false, + }, + ], + accessToken: '09876', + datasetId: 'dummyID', + eventsToEvents: [ + { + from: '', + to: '', + }, + ], + eventCustomProperties: [ + { + eventCustomProperties: '', + }, + ], + removeExternalId: true, + whitelistPiiProperties: [ + { + whitelistPiiProperties: '', + }, + ], + actionSource: 'website', + }, + Enabled: true, + }, + }, + ], + }, + }, + }, + mockFns: defaultMockFns, + }, +]; diff --git a/test/integrations/destinations/factorsai/data.ts b/test/integrations/destinations/factorsai/data.ts index fb0a76bf34..be13c291f4 100644 --- a/test/integrations/destinations/factorsai/data.ts +++ b/test/integrations/destinations/factorsai/data.ts @@ -308,6 +308,9 @@ export const data = [ XML: {}, FORM: {}, JSON: { + context: { + ip: '8.8.8.8', + }, type: 'identify', traits: { age: 27, @@ -540,4 +543,271 @@ export const data = [ }, }, }, + { + name: 'factorsai', + description: 'IP fetched from request_ip', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + factorsAIApiKey: 'sdgerghsdfhsdhsdh432141dfgdfsg', + }, + }, + message: { + context: { + page: { + url: 'myurl', + path: '/workspace/index.html', + title: 'test track', + search: '?s=ek8reb577tu65kfc2fv41fbm3j', + referrer: '$direct', + initial_referrer: '$direct', + referring_domain: '', + initial_referring_domain: '', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36', + }, + event: 'finalPageTest', + properties: { + title: 'Intro to Test final segemt context page added context last', + }, + userId: 'PageTestAnonymousUser', + type: 'track', + messageId: '3c0abc14-96a2-4aed-9dfc-ee463832cc24', + originalTimestamp: '2022-10-17T15:32:44.202+05:30', + request_ip: '104.205.211.60', + }, + }, + ], + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + FORM: {}, + JSON: { + type: 'track', + event: 'finalPageTest', + context: { + ip: '104.205.211.60', + page: { + url: 'myurl', + path: '/workspace/index.html', + title: 'test track', + search: '?s=ek8reb577tu65kfc2fv41fbm3j', + referrer: '$direct', + initial_referrer: '$direct', + referring_domain: '', + initial_referring_domain: '', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36', + }, + messageId: '3c0abc14-96a2-4aed-9dfc-ee463832cc24', + timestamp: '2022-10-17T15:32:44.202+05:30', + properties: { + title: 'Intro to Test final segemt context page added context last', + }, + userId: 'PageTestAnonymousUser', + }, + JSON_ARRAY: {}, + }, + type: 'REST', + files: {}, + userId: '', + method: 'POST', + params: {}, + headers: { + 'Content-Type': 'application/json', + Authorization: 'Basic c2RnZXJnaHNkZmhzZGhzZGg0MzIxNDFkZmdkZnNnOg==', + }, + version: '1', + endpoint: 'https://api.factors.ai/integrations/rudderstack_platform', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'factorsai', + description: 'IP fetched from request_ip', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + factorsAIApiKey: 'sdgerghsdfhsdhsdh432141dfgdfsg', + }, + }, + message: { + context: { + locale: 'en-US', + screen: { + density: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + }, + event: 'finalPageTest', + properties: { + title: 'Intro to Test final segemt context page added context last', + }, + userId: 'PageTestAnonymousUser', + type: 'track', + messageId: '3c0abc14-96a2-4aed-9dfc-ee463832cc24', + originalTimestamp: '2022-10-17T15:32:44.202+05:30', + request_ip: '0.0.0.0', + }, + }, + ], + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + FORM: {}, + JSON: { + type: 'track', + event: 'finalPageTest', + context: { + ip: '0.0.0.0', + locale: 'en-US', + screen: { + density: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + }, + messageId: '3c0abc14-96a2-4aed-9dfc-ee463832cc24', + timestamp: '2022-10-17T15:32:44.202+05:30', + properties: { + title: 'Intro to Test final segemt context page added context last', + }, + userId: 'PageTestAnonymousUser', + }, + JSON_ARRAY: {}, + }, + type: 'REST', + files: {}, + userId: '', + method: 'POST', + params: {}, + headers: { + 'Content-Type': 'application/json', + Authorization: 'Basic c2RnZXJnaHNkZmhzZGhzZGg0MzIxNDFkZmdkZnNnOg==', + }, + version: '1', + endpoint: 'https://api.factors.ai/integrations/rudderstack_platform', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'factorsai', + description: 'IP fetched from request_ip withput context in payload', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + factorsAIApiKey: 'sdgerghsdfhsdhsdh432141dfgdfsg', + }, + }, + message: { + event: 'finalPageTest', + properties: { + title: 'Intro to Test final segemt context page added context last', + }, + userId: 'PageTestAnonymousUser', + type: 'track', + messageId: '3c0abc14-96a2-4aed-9dfc-ee463832cc24', + originalTimestamp: '2022-10-17T15:32:44.202+05:30', + request_ip: '1.1.1.1', + }, + }, + ], + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + FORM: {}, + JSON: { + type: 'track', + event: 'finalPageTest', + context: { + ip: '1.1.1.1', + }, + messageId: '3c0abc14-96a2-4aed-9dfc-ee463832cc24', + timestamp: '2022-10-17T15:32:44.202+05:30', + properties: { + title: 'Intro to Test final segemt context page added context last', + }, + userId: 'PageTestAnonymousUser', + }, + JSON_ARRAY: {}, + }, + type: 'REST', + files: {}, + userId: '', + method: 'POST', + params: {}, + headers: { + 'Content-Type': 'application/json', + Authorization: 'Basic c2RnZXJnaHNkZmhzZGhzZGg0MzIxNDFkZmdkZnNnOg==', + }, + version: '1', + endpoint: 'https://api.factors.ai/integrations/rudderstack_platform', + }, + statusCode: 200, + }, + ], + }, + }, + }, ]; diff --git a/test/integrations/destinations/freshmarketer/network.ts b/test/integrations/destinations/freshmarketer/network.ts new file mode 100644 index 0000000000..51f1a0c115 --- /dev/null +++ b/test/integrations/destinations/freshmarketer/network.ts @@ -0,0 +1,487 @@ +export const networkCallsData = [ + { + httpReq: { + url: 'https://domain-rudder.myfreshworks.com/crm/sales/api/sales_accounts/upsert', + method: 'POST' + }, + httpRes: { + data: { + "sales_account": { + "id": 70003771396, + "name": "postman2.0", + "address": "Red Colony", + "city": "Pune", + "state": "Goa", + "zipcode": null, + "country": null, + "number_of_employees": 11, + "annual_revenue": 1000, + "website": null, + "owner_id": null, + "phone": "919191919191", + "open_deals_amount": null, + "open_deals_count": null, + "won_deals_amount": null, + "won_deals_count": null, + "last_contacted": null, + "last_contacted_mode": null, + "facebook": null, + "twitter": null, + "linkedin": null, + "links": { + "conversations": "/crm/sales/sales_accounts/70003771396/conversations/all?include=email_conversation_recipients%2Ctargetable%2Cphone_number%2Cphone_caller%2Cnote%2Cuser&per_page=3", + "document_associations": "/crm/sales/sales_accounts/70003771396/document_associations", + "notes": "/crm/sales/sales_accounts/70003771396/notes?include=creater", + "tasks": "/crm/sales/sales_accounts/70003771396/tasks?include=creater,owner,updater,targetable,users,task_type", + "appointments": "/crm/sales/sales_accounts/70003771396/appointments?include=creater,owner,updater,targetable,appointment_attendees,conference,note" + }, + "custom_field": {}, + "created_at": "2022-08-17T04:15:00-04:00", + "updated_at": "2022-08-24T06:03:31-04:00", + "avatar": null, + "parent_sales_account_id": null, + "recent_note": null, + "last_contacted_via_sales_activity": null, + "last_contacted_sales_activity_mode": null, + "completed_sales_sequences": null, + "active_sales_sequences": null, + "last_assigned_at": null, + "tags": [], + "is_deleted": false, + "team_user_ids": null, + "has_connections": false, + "record_type_id": "71010794477" + } + }, + status: 200 + }, + }, + { + httpReq: { + url: 'https://domain-rudder.myfreshworks.com/crm/sales/api/contacts/upsert?include=sales_accounts', + method: 'POST' + }, + httpRes: { + data: { + "contact": { + "id": 70042006456, + "first_name": "Rk", + "last_name": "Mishra", + "display_name": "Rk Mishra", + "avatar": null, + "job_title": null, + "city": null, + "state": null, + "zipcode": null, + "country": null, + "email": "testuser@google.com", + "emails": [ + { + "id": 70037311213, + "value": "testuser@google.com", + "is_primary": true, + "label": null, + "_destroy": false + } + ], + "time_zone": "IST", + "work_number": "9988776655", + "mobile_number": "19265559504", + "address": null, + "last_seen": null, + "lead_score": 26, + "last_contacted": null, + "open_deals_amount": null, + "won_deals_amount": null, + "links": { + "conversations": "/crm/sales/contacts/70042006456/conversations/all?include=email_conversation_recipients%2Ctargetable%2Cphone_number%2Cphone_caller%2Cnote%2Cuser&per_page=3", + "timeline_feeds": "/crm/sales/contacts/70042006456/timeline_feeds", + "document_associations": "/crm/sales/contacts/70042006456/document_associations", + "notes": "/crm/sales/contacts/70042006456/notes?include=creater", + "tasks": "/crm/sales/contacts/70042006456/tasks?include=creater,owner,updater,targetable,users,task_type", + "appointments": "/crm/sales/contacts/70042006456/appointments?include=creater,owner,updater,targetable,appointment_attendees,conference,note", + "reminders": "/crm/sales/contacts/70042006456/reminders?include=creater,owner,updater,targetable", + "duplicates": "/crm/sales/contacts/70042006456/duplicates", + "connections": "/crm/sales/contacts/70042006456/connections" + }, + "last_contacted_sales_activity_mode": null, + "custom_field": {}, + "created_at": "2022-08-09T03:22:12-04:00", + "updated_at": "2022-08-30T00:33:27-04:00", + "keyword": "drilling", + "medium": "facebook", + "last_contacted_mode": null, + "recent_note": null, + "won_deals_count": null, + "last_contacted_via_sales_activity": null, + "completed_sales_sequences": null, + "active_sales_sequences": null, + "web_form_ids": null, + "open_deals_count": null, + "last_assigned_at": "2022-08-29T05:51:24-04:00", + "tags": [], + "facebook": null, + "twitter": null, + "linkedin": null, + "is_deleted": false, + "team_user_ids": null, + "external_id": "ea5cfab2-3961-4d8a-8187-3d1858c99099", + "work_email": null, + "subscription_status": 1, + "subscription_types": "2;3;4;5;1", + "customer_fit": 2, + "record_type_id": "71010794476", + "whatsapp_subscription_status": 2, + "sms_subscription_status": 2, + "last_seen_chat": null, + "first_seen_chat": null, + "locale": null, + "total_sessions": null, + "phone_numbers": [], + "sales_accounts": [ + { + "partial": true, + "id": 70003771198, + "name": "div-quer", + "avatar": null, + "website": null, + "last_contacted": null, + "record_type_id": "71010794477", + "is_primary": true + }, + { + "partial": true, + "id": 70003825177, + "name": "BisleriGroup", + "avatar": null, + "website": null, + "last_contacted": null, + "record_type_id": "71010794477", + "is_primary": false + } + ] + } + }, + status: 200 + }, + }, + { + httpReq: { + url: 'https://domain-rudder.myfreshworks.com/crm/sales/api/selector/sales_activity_types', + method: 'GET' + }, + httpRes: { + data: { + "sales_activity_types": [ + { + "partial": true, + "id": 70000666879, + "name": "own-calender", + "internal_name": "cappointment", + "show_in_conversation": true, + "position": 1, + "is_default": false, + "is_checkedin": false + }, + { + "partial": true, + "id": 70000663932, + "name": "fb-support", + "internal_name": "facebook", + "show_in_conversation": true, + "position": 2, + "is_default": false, + "is_checkedin": false + }, + { + "partial": true, + "id": 70000663746, + "name": "twitter sales", + "internal_name": "twitter", + "show_in_conversation": true, + "position": 3, + "is_default": false, + "is_checkedin": false + }, + { + "partial": true, + "id": 70000646396, + "name": "linked sales", + "internal_name": "linkedin", + "show_in_conversation": true, + "position": 4, + "is_default": false, + "is_checkedin": false + }, + { + "partial": true, + "id": 70000642330, + "name": "facebook sales", + "internal_name": "facebook", + "show_in_conversation": true, + "position": 5, + "is_default": false, + "is_checkedin": false + }, + { + "partial": true, + "id": 70000612897, + "name": "Chat", + "internal_name": "chat", + "show_in_conversation": true, + "position": 6, + "is_default": true, + "is_checkedin": false + }, + { + "partial": true, + "id": 70000612898, + "name": "Phone", + "internal_name": "phone", + "show_in_conversation": true, + "position": 7, + "is_default": true, + "is_checkedin": false + }, + { + "partial": true, + "id": 70000612899, + "name": "Meeting", + "internal_name": "appointment", + "show_in_conversation": true, + "position": 8, + "is_default": true, + "is_checkedin": true + }, + { + "partial": true, + "id": 70000612900, + "name": "Task", + "internal_name": "task", + "show_in_conversation": true, + "position": 9, + "is_default": true, + "is_checkedin": false + }, + { + "partial": true, + "id": 70000612901, + "name": "Email", + "internal_name": "email", + "show_in_conversation": true, + "position": 10, + "is_default": true, + "is_checkedin": false + }, + { + "partial": true, + "id": 70000612902, + "name": "SMS Outgoing", + "internal_name": "sms_outgoing", + "show_in_conversation": true, + "position": 11, + "is_default": true, + "is_checkedin": false + }, + { + "partial": true, + "id": 70000612903, + "name": "Reminder", + "internal_name": "reminder", + "show_in_conversation": false, + "position": 12, + "is_default": true, + "is_checkedin": false + }, + { + "partial": true, + "id": 70000612904, + "name": "SMS Incoming", + "internal_name": "sms_incoming", + "show_in_conversation": true, + "position": 13, + "is_default": true, + "is_checkedin": false + } + ] + }, + status: 200 + }, + }, + { + httpReq: { + url: 'https://domain-rudder.myfreshworks.com/crm/sales/api/contacts/upsert', + method: 'POST' + }, + httpRes: { + data: { + "contact": { + "id": 70054866612, + "first_name": null, + "last_name": null, + "display_name": "jamessampleton120@gmail.com", + "avatar": null, + "job_title": null, + "city": null, + "state": null, + "zipcode": null, + "country": null, + "email": "jamessampleton120@gmail.com", + "emails": [ + { + "id": 70047409219, + "value": "jamessampleton120@gmail.com", + "is_primary": true, + "label": null, + "_destroy": false + } + ], + "time_zone": null, + "work_number": null, + "mobile_number": null, + "address": null, + "last_seen": null, + "lead_score": 0, + "last_contacted": null, + "open_deals_amount": null, + "won_deals_amount": null, + "links": { + "conversations": "/crm/sales/contacts/70054866612/conversations/all?include=email_conversation_recipients%2Ctargetable%2Cphone_number%2Cphone_caller%2Cnote%2Cuser&per_page=3", + "timeline_feeds": "/crm/sales/contacts/70054866612/timeline_feeds", + "document_associations": "/crm/sales/contacts/70054866612/document_associations", + "notes": "/crm/sales/contacts/70054866612/notes?include=creater", + "tasks": "/crm/sales/contacts/70054866612/tasks?include=creater,owner,updater,targetable,users,task_type", + "appointments": "/crm/sales/contacts/70054866612/appointments?include=creater,owner,updater,targetable,appointment_attendees,conference,note", + "reminders": "/crm/sales/contacts/70054866612/reminders?include=creater,owner,updater,targetable", + "duplicates": "/crm/sales/contacts/70054866612/duplicates", + "connections": "/crm/sales/contacts/70054866612/connections" + }, + "last_contacted_sales_activity_mode": null, + "custom_field": {}, + "created_at": "2022-10-11T08:42:15-04:00", + "updated_at": "2022-10-11T08:42:15-04:00", + "keyword": null, + "medium": null, + "last_contacted_mode": null, + "recent_note": null, + "won_deals_count": null, + "last_contacted_via_sales_activity": null, + "completed_sales_sequences": null, + "active_sales_sequences": null, + "web_form_ids": null, + "open_deals_count": null, + "last_assigned_at": null, + "tags": [], + "facebook": null, + "twitter": null, + "linkedin": null, + "is_deleted": false, + "team_user_ids": null, + "external_id": null, + "work_email": null, + "subscription_status": 1, + "subscription_types": "2;3;4;5;1", + "customer_fit": 0, + "record_type_id": "71012139284", + "whatsapp_subscription_status": 2, + "sms_subscription_status": 2, + "last_seen_chat": null, + "first_seen_chat": null, + "locale": null, + "total_sessions": null, + "phone_numbers": [] + } + }, + status: 200 + }, + }, + { + httpReq: { + url: 'https://domain-rudder.myfreshworks.com/crm/sales/api/lists', + method: 'GET' + }, + httpRes: { + data: { + "lists": [ + { + "id": 70000053624, + "name": "Sample list" + }, + { + "id": 70000056575, + "name": "list1-test" + }, + { + "id": 70000058627, + "name": "Jio 5G Group" + }, + { + "id": 70000058628, + "name": "Airtel 5G Group" + }, + { + "id": 70000059716, + "name": "Voda 5G" + } + ], + "meta": { + "total_pages": 1, + "total": 5 + } + }, + status: 200 + }, + }, + { + httpReq: { + url: 'https://domain-rudder.myfreshworks.com/crm/sales/api/selector/lifecycle_stages', + method: 'GET' + }, + httpRes: { + data: { + "lifecycle_stages": [ + { + "id": 71012139274, + "name": "Sales Qualified Lead start", + "position": 1, + "disabled": false, + "default": true, + "type": "Sales Qualified Lead", + "contact_status_ids": [70000697858, 70000697859, 70000697860] + }, + { + "id": 71012139273, + "name": "Lead", + "position": 2, + "disabled": false, + "default": true, + "type": "Lead", + "contact_status_ids": [70000697854, 70000697855, 70000697856, 70000697857] + }, + { + "id": 71012806409, + "name": "final Customer", + "position": 3, + "disabled": false, + "default": false, + "type": "Custom", + "contact_status_ids": [70000736543, 70000736544] + }, + { + "id": 71012139275, + "name": "Customer", + "position": 4, + "disabled": false, + "default": true, + "type": "Customer", + "contact_status_ids": [70000697861, 70000697862] + } + ] + }, + status: 200 + }, + } +]; + + + diff --git a/test/integrations/destinations/freshmarketer/processor/data.ts b/test/integrations/destinations/freshmarketer/processor/data.ts new file mode 100644 index 0000000000..2af5728f9c --- /dev/null +++ b/test/integrations/destinations/freshmarketer/processor/data.ts @@ -0,0 +1,3130 @@ +export const data = [ + { + "name": "freshmarketer", + "description": "Identify call for creating new user", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "rudderstack-476952domain3105.myfreshworks.com" + } + }, + "message": { + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-06-22T10:57:58Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99099", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + } + }, + "traits": { + "email": "testuser@google.com", + "first_name": "Rk", + "last_name": "Mishra", + "mobileNumber": "1-926-555-9504", + "lifecycleStageId": 71010794467, + "phone": "9988776655", + "owner_id": "70000090119" + }, + "type": "identify", + "sentAt": "2022-04-22T10:57:58Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "FORM": {}, + "JSON": { + "contact": { + "emails": "testuser@google.com", + "last_name": "Mishra", + "created_at": "2022-06-22T10:57:58Z", + "first_name": "Rk", + "updated_at": "2022-06-22T10:57:58Z", + "external_id": "ea5cfab2-3961-4d8a-8187-3d1858c99099", + "work_number": "9988776655", + "mobile_number": "1-926-555-9504", + "lifecycle_stage_id": 71010794467 + }, + "unique_identifier": { + "emails": "testuser@google.com" + } + }, + "JSON_ARRAY": {} + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": {}, + "headers": { + "Content-Type": "application/json", + "Authorization": "Token token=dummyApiKey" + }, + "version": "1", + "endpoint": "https://rudderstack-476952domain3105.myfreshworks.com/crm/sales/api/contacts/upsert", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "freshmarketer", + "description": "Identify call with numbers in lifecycleStageId, ownerId", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "rudderstack-476952domain3105.myfreshworks.com" + } + }, + "message": { + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-06-22T10:57:58Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99099", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + } + }, + "traits": { + "email": "testuser@google.com", + "first_name": "Rk", + "last_name": "Mishra", + "mobileNumber": "1-926-555-9504", + "lifecycleStageId": 71010794467, + "phone": "9988776655", + "owner_id": "70000090119" + }, + "type": "identify", + "sentAt": "2022-04-22T10:57:58Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "FORM": {}, + "JSON": { + "contact": { + "emails": "testuser@google.com", + "last_name": "Mishra", + "created_at": "2022-06-22T10:57:58Z", + "first_name": "Rk", + "updated_at": "2022-06-22T10:57:58Z", + "external_id": "ea5cfab2-3961-4d8a-8187-3d1858c99099", + "work_number": "9988776655", + "mobile_number": "1-926-555-9504", + "lifecycle_stage_id": 71010794467 + }, + "unique_identifier": { + "emails": "testuser@google.com" + } + }, + "JSON_ARRAY": {} + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": {}, + "headers": { + "Content-Type": "application/json", + "Authorization": "Token token=dummyApiKey" + }, + "version": "1", + "endpoint": "https://rudderstack-476952domain3105.myfreshworks.com/crm/sales/api/contacts/upsert", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "freshmarketer", + "description": "Identify call with wrong data type in lifecycleStageId, ownerId", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "rudderstack-476952domain3105.myfreshworks.com" + } + }, + "message": { + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-06-22T10:57:58Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99099", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + } + }, + "traits": { + "email": "testuser@google.com", + "first_name": "Rk", + "last_name": "Mishra", + "mobileNumber": "1-926-555-9504", + "lifecycleStageId": "rudderSample", + "phone": "9988776655", + "ownerId": "rudderSample" + }, + "type": "identify", + "sentAt": "2022-04-22T10:57:58Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "owner_id,lifecycle_stage_id: invalid number format", + "statTags": { + "destType": "FRESHMARKETER", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshmarketer", + "description": "Identify call, email is not provided.", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "rudderstack-476952domain3105.myfreshworks.com" + } + }, + "message": { + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-06-22T10:57:58Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99099", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + } + }, + "traits": { + "first_name": "Rk", + "last_name": "Mishra", + "mobileNumber": "1-926-555-9504", + "lifecycleStageId": "rudderSample", + "phone": "9988776655", + "owner_id": "rudderSample" + }, + "type": "identify", + "sentAt": "2022-04-22T10:57:58Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Missing required value from \"email\"", + "statTags": { + "destType": "FRESHMARKETER", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshmarketer", + "description": "Group call: testing with mock api", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + }, + "message": { + "messageId": "sadjb-1e2r3fhgb-12bvbbj", + "originalTimestamp": "2022-06-22T10:57:58Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "traits": { + "email": "testuser@google.com" + } + }, + "traits": { + "groupType": "accounts", + "name": "Mark Twain", + "phone": "919191919191", + "numberOfEmployees": 51, + "annualRevenue": 1000, + "address": "Red Colony", + "city": "Colony", + "state": "Haryana" + }, + "type": "group", + "sentAt": "2022-04-22T10:57:58Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "FORM": {}, + "JSON": { + "contact": { + "sales_accounts": [ + { + "id": 70003771198, + "name": "div-quer", + "avatar": null, + "partial": true, + "website": null, + "is_primary": true, + "last_contacted": null, + "record_type_id": "71010794477" + }, + { + "id": 70003825177, + "name": "BisleriGroup", + "avatar": null, + "partial": true, + "website": null, + "is_primary": false, + "last_contacted": null, + "record_type_id": "71010794477" + }, + { + "id": 70003771396, + "is_primary": false + } + ] + }, + "unique_identifier": { + "emails": "testuser@google.com" + } + }, + "JSON_ARRAY": {} + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": {}, + "headers": { + "Content-Type": "application/json", + "Authorization": "Token token=dummyApiKey" + }, + "version": "1", + "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/contacts/upsert", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "freshmarketer", + "description": "Group call: name is required field.", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + }, + "message": { + "messageId": "sadjb-1e2r3fhgb-12bvbbj", + "originalTimestamp": "2022-06-22T10:57:58Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "traits": { + "email": "testuser@google.com" + } + }, + "traits": { + "groupType": "accounts", + "phone": "919191919191", + "numberOfEmployees": 51, + "annualRevenue": 1000, + "address": "Red Colony", + "city": "Colony", + "state": "Haryana" + }, + "type": "group", + "sentAt": "2022-04-22T10:57:58Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Missing required value from \"name\"", + "statTags": { + "destType": "FRESHMARKETER", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshmarketer", + "description": "missing message type", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + }, + "message": { + "messageId": "sadjb-1e2r3fhgb-12bvbbj", + "originalTimestamp": "2022-06-22T10:57:58Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "traits": { + "email": "testuser4google.com" + } + }, + "traits": { + "name": "Mark Twain", + "phone": "919191919191", + "numberOfEmployees": 51, + "annualRevenue": 1000, + "address": "Red Colony", + "city": "Colony", + "state": "Haryana" + }, + "sentAt": "2022-04-22T10:57:58Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Message Type is not present. Aborting message.", + "statTags": { + "destType": "FRESHMARKETER", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshmarketer", + "description": "Wrong message type", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + }, + "message": { + "messageId": "sadjb-1e2r3fhgb-12bvbbj", + "originalTimestamp": "2022-06-22T10:57:58Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "traits": { + "email": "testuser4google.com" + } + }, + "traits": { + "name": "Mark Twain", + "phone": "919191919191", + "numberOfEmployees": 51, + "annualRevenue": 1000, + "address": "Red Colony", + "city": "Colony", + "state": "Haryana" + }, + "type": "page", + "sentAt": "2022-04-22T10:57:58Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "message type page not supported", + "statTags": { + "destType": "FRESHMARKETER", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshmarketer", + "description": "Group call: user email is missing", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + }, + "message": { + "messageId": "sadjb-1e2r3fhgb-12bvbbj", + "originalTimestamp": "2022-06-22T10:57:58Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "traits": {} + }, + "traits": { + "groupType": "accounts", + "name": "div-quer", + "phone": "919191919191", + "numberOfEmployees": 51, + "annualRevenue": 1000, + "address": "Red Colony", + "city": "Lal colony", + "state": "Haryana" + }, + "type": "group", + "sentAt": "2022-04-22T10:57:58Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "FORM": {}, + "JSON": { + "sales_account": { + "city": "Lal colony", + "name": "div-quer", + "phone": "919191919191", + "state": "Haryana", + "address": "Red Colony", + "created_at": "2022-06-22T10:57:58Z", + "updated_at": "2022-06-22T10:57:58Z", + "annual_revenue": 1000, + "number_of_employees": 51 + }, + "unique_identifier": { + "name": "div-quer" + } + }, + "JSON_ARRAY": {} + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": {}, + "headers": { + "Content-Type": "application/json", + "Authorization": "Token token=dummyApiKey" + }, + "version": "1", + "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/sales_accounts/upsert", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "freshmarketer", + "description": "Identify call: Email is not present", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-06-22T10:57:58Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99099", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + } + }, + "traits": { + "first_name": "Rk", + "last_name": "Narayan", + "mobileNumber": "1-926-555-9504", + "phone": "9988776655" + }, + "type": "identify", + "sentAt": "2022-04-22T10:57:58Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Missing required value from \"email\"", + "statTags": { + "destType": "FRESHMARKETER", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshmarketer", + "description": "Track call, event is not supported.", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.1.5" + }, + "traits": { + "name": "Shehan Study", + "category": "SampleIdentify", + "email": "test@rudderstack.com", + "plan": "Open source", + "logins": 5, + "createdAt": 1599264000 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.5" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", + "locale": "en-US", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 0.8999999761581421 + }, + "campaign": { + "source": "google", + "medium": "medium", + "term": "keyword", + "content": "some content", + "name": "some campaign", + "test": "other value" + }, + "page": { + "path": "/destinations/amplitude", + "referrer": "", + "search": "", + "title": "", + "url": "https://docs.rudderstack.com/destinations/amplitude", + "category": "destination", + "initial_referrer": "https://docs.rudderstack.com", + "initial_referring_domain": "docs.rudderstack.com" + } + }, + "type": "track", + "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", + "originalTimestamp": "2020-10-20T08:14:28.778Z", + "anonymousId": "my-anonymous-id-new", + "userId": "newUserIdAlias", + "properties": { + "product_name": "Shirt", + "brand": "Wrogn" + }, + "event": "Add to Cart", + "previousId": "sampleusrRudder3", + "sentAt": "2020-10-20T08:14:28.778Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "event name Add to Cart is not supported. Aborting!", + "statTags": { + "destType": "FRESHMARKETER", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshmarketer", + "description": "Track call: some required properties is missing for sales_activity", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.1.5" + }, + "traits": { + "name": "Shehan Study", + "category": "SampleIdentify", + "email": "test@rudderstack.com", + "plan": "Open source", + "logins": 5, + "createdAt": 1599264000 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.5" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", + "locale": "en-US", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 0.8999999761581421 + }, + "campaign": { + "source": "google", + "medium": "medium", + "term": "keyword", + "content": "some content", + "name": "some campaign", + "test": "other value" + }, + "page": { + "path": "/destinations/amplitude", + "referrer": "", + "search": "", + "title": "", + "url": "https://docs.rudderstack.com/destinations/amplitude", + "category": "destination", + "initial_referrer": "https://docs.rudderstack.com", + "initial_referring_domain": "docs.rudderstack.com" + } + }, + "type": "track", + "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", + "originalTimestamp": "2020-10-20T08:14:28.778Z", + "anonymousId": "my-anonymous-id-new", + "userId": "newUserIdAlias", + "email": "test@rudderstack.com", + "properties": { + "product_name": "Shirt", + "brand": "Wrogn" + }, + "event": "sales_activity", + "previousId": "sampleusrRudder3", + "sentAt": "2020-10-20T08:14:28.778Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Missing required value from \"properties.title\"", + "statTags": { + "destType": "FRESHMARKETER", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshmarketer", + "description": "Track call: for salesActivityName", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.1.5" + }, + "traits": { + "name": "Shehan Study", + "category": "SampleIdentify", + "email": "test@rudderstack.com", + "plan": "Open source", + "logins": 5, + "createdAt": 1599264000 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.5" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", + "locale": "en-US", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 0.8999999761581421 + }, + "campaign": { + "source": "google", + "medium": "medium", + "term": "keyword", + "content": "some content", + "name": "some campaign", + "test": "other value" + }, + "page": { + "path": "/destinations/amplitude", + "referrer": "", + "search": "", + "title": "", + "url": "https://docs.rudderstack.com/destinations/amplitude", + "category": "destination", + "initial_referrer": "https://docs.rudderstack.com", + "initial_referring_domain": "docs.rudderstack.com" + }, + "externalId": { + "type": "Contact" + } + }, + "type": "track", + "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", + "originalTimestamp": "2020-10-20T08:14:28.778Z", + "anonymousId": "my-anonymous-id-new", + "userId": "newUserIdAlias", + "email": "test@rudderstack.com", + "properties": { + "product_name": "Shirt", + "brand": "Wrogn", + "salesActivityName": "own-calender", + "title": "new Contact", + "startDate": "2021-05-04T17:00:00+05:30", + "endDate": "2022-06-04T17:30:00+05:30", + "ownerId": "70054866612" + }, + "event": "sales_activity", + "previousId": "sampleusrRudder3", + "sentAt": "2020-10-20T08:14:28.778Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "FORM": {}, + "JSON": { + "sales_activity": { + "title": "new Contact", + "end_date": "2022-06-04T17:30:00+05:30", + "owner_id": "70054866612", + "start_date": "2021-05-04T17:00:00+05:30", + "created_at": "2020-10-20T08:14:28.778Z", + "updated_at": "2020-10-20T08:14:28.778Z", + "targetable_id": 70054866612, + "targetable_type": "Contact", + "sales_activity_name": "own-calender", + "sales_activity_type_id": 70000666879 + } + }, + "JSON_ARRAY": {} + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": {}, + "headers": { + "Content-Type": "application/json", + "Authorization": "Token token=dummyApiKey" + }, + "version": "1", + "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/sales_activities", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "freshmarketer", + "description": "Track call: lifecycle_stage_id", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.1.5" + }, + "traits": { + "name": "Shehan Study", + "category": "SampleIdentify", + "plan": "Open source", + "logins": 5, + "createdAt": 1599264000 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.5" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", + "locale": "en-US", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 0.8999999761581421 + }, + "campaign": { + "source": "google", + "medium": "medium", + "term": "keyword", + "content": "some content", + "name": "some campaign", + "test": "other value" + }, + "page": { + "path": "/destinations/amplitude", + "referrer": "", + "search": "", + "title": "", + "url": "https://docs.rudderstack.com/destinations/amplitude", + "category": "destination", + "initial_referrer": "https://docs.rudderstack.com", + "initial_referring_domain": "docs.rudderstack.com" + } + }, + "type": "track", + "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", + "originalTimestamp": "2020-10-20T08:14:28.778Z", + "anonymousId": "my-anonymous-id-new", + "userId": "newUserIdAlias", + "properties": { + "email": "jamessampleton3@gmail.com", + "lifecycleStageId": "71012139273", + "title": "new Contact", + "startDate": "2021-05-04T17:00:00+05:30", + "endDate": "2022-06-04T17:30:00+05:30", + "ownerId": "70054866612", + "targetableType": "Contact" + }, + "event": "lifecycle_stage", + "previousId": "sampleusrRudder3", + "sentAt": "2020-10-20T08:14:28.778Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/contacts/upsert", + "headers": { + "Authorization": "Token token=dummyApiKey", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "contact": { + "lifecycle_stage_id": "71012139273" + }, + "unique_identifier": { + "emails": "jamessampleton3@gmail.com" + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "freshmarketer", + "description": "Track call: In lifecycle stage, email is missing", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.1.5" + }, + "traits": { + "name": "Shehan Study", + "category": "SampleIdentify", + "plan": "Open source", + "logins": 5, + "createdAt": 1599264000 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.5" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", + "locale": "en-US", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 0.8999999761581421 + }, + "campaign": { + "source": "google", + "medium": "medium", + "term": "keyword", + "content": "some content", + "name": "some campaign", + "test": "other value" + }, + "page": { + "path": "/destinations/amplitude", + "referrer": "", + "search": "", + "title": "", + "url": "https://docs.rudderstack.com/destinations/amplitude", + "category": "destination", + "initial_referrer": "https://docs.rudderstack.com", + "initial_referring_domain": "docs.rudderstack.com" + } + }, + "type": "track", + "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", + "originalTimestamp": "2020-10-20T08:14:28.778Z", + "anonymousId": "my-anonymous-id-new", + "userId": "newUserIdAlias", + "properties": { + "lifecycleStageId": "71012139273", + "title": "new Contact", + "startDate": "2021-05-04T17:00:00+05:30", + "endDate": "2022-06-04T17:30:00+05:30", + "ownerId": "70054866612", + "targetableType": "Contact" + }, + "event": "lifecycle_stage", + "previousId": "sampleusrRudder3", + "sentAt": "2020-10-20T08:14:28.778Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "email is required for updating life Cycle Stages. Aborting!", + "statTags": { + "destType": "FRESHMARKETER", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshmarketer", + "description": "Track call: Either of lifecycleStageName or lifecycleStageId is required", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.1.5" + }, + "traits": { + "name": "Shehan Study", + "category": "SampleIdentify", + "email": "test@rudderstack.com", + "plan": "Open source", + "logins": 5, + "createdAt": 1599264000 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.5" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", + "locale": "en-US", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 0.8999999761581421 + }, + "campaign": { + "source": "google", + "medium": "medium", + "term": "keyword", + "content": "some content", + "name": "some campaign", + "test": "other value" + }, + "page": { + "path": "/destinations/amplitude", + "referrer": "", + "search": "", + "title": "", + "url": "https://docs.rudderstack.com/destinations/amplitude", + "category": "destination", + "initial_referrer": "https://docs.rudderstack.com", + "initial_referring_domain": "docs.rudderstack.com" + } + }, + "type": "track", + "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", + "originalTimestamp": "2020-10-20T08:14:28.778Z", + "anonymousId": "my-anonymous-id-new", + "userId": "newUserIdAlias", + "email": "jamessampleton3@gmail.com", + "properties": { + "title": "new Contact", + "startDate": "2021-05-04T17:00:00+05:30", + "endDate": "2022-06-04T17:30:00+05:30", + "ownerId": "70054866612", + "targetableType": "Contact" + }, + "event": "lifecycle_stage", + "previousId": "sampleusrRudder3", + "sentAt": "2020-10-20T08:14:28.778Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Either of lifecycleStageName or lifecycleStageId is required. Aborting!", + "statTags": { + "destType": "FRESHMARKETER", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshmarketer", + "description": "Track call: Either of sales activity name or sales activity type id is required", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.1.5" + }, + "traits": { + "name": "Shehan Study", + "category": "SampleIdentify", + "email": "test@rudderstack.com", + "plan": "Open source", + "logins": 5, + "createdAt": 1599264000 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.5" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", + "locale": "en-US", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 0.8999999761581421 + }, + "campaign": { + "source": "google", + "medium": "medium", + "term": "keyword", + "content": "some content", + "name": "some campaign", + "test": "other value" + }, + "page": { + "path": "/destinations/amplitude", + "referrer": "", + "search": "", + "title": "", + "url": "https://docs.rudderstack.com/destinations/amplitude", + "category": "destination", + "initial_referrer": "https://docs.rudderstack.com", + "initial_referring_domain": "docs.rudderstack.com" + }, + "externalId": { + "type": "Contact" + } + }, + "type": "track", + "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", + "originalTimestamp": "2020-10-20T08:14:28.778Z", + "anonymousId": "my-anonymous-id-new", + "userId": "newUserIdAlias", + "email": "test@rudderstack.com", + "properties": { + "product_name": "Shirt", + "brand": "Wrogn", + "title": "new Contact", + "startDate": "2021-05-04T17:00:00+05:30", + "endDate": "2022-06-04T17:30:00+05:30", + "ownerId": "70054866612" + }, + "event": "sales_activity", + "previousId": "sampleusrRudder3", + "sentAt": "2020-10-20T08:14:28.778Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Either of sales activity name or sales activity type id is required. Aborting!", + "statTags": { + "destType": "FRESHMARKETER", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshmarketer", + "description": "Track call: Either of email or targetable_id is required for creating sales activity.", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.1.5" + }, + "traits": { + "name": "Shehan Study", + "category": "SampleIdentify", + "plan": "Open source", + "logins": 5, + "createdAt": 1599264000 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.5" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", + "locale": "en-US", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 0.8999999761581421 + }, + "campaign": { + "source": "google", + "medium": "medium", + "term": "keyword", + "content": "some content", + "name": "some campaign", + "test": "other value" + }, + "page": { + "path": "/destinations/amplitude", + "referrer": "", + "search": "", + "title": "", + "url": "https://docs.rudderstack.com/destinations/amplitude", + "category": "destination", + "initial_referrer": "https://docs.rudderstack.com", + "initial_referring_domain": "docs.rudderstack.com" + }, + "externalId": { + "type": "Contact" + } + }, + "type": "track", + "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", + "originalTimestamp": "2020-10-20T08:14:28.778Z", + "anonymousId": "my-anonymous-id-new", + "userId": "newUserIdAlias", + "properties": { + "product_name": "Shirt", + "brand": "Wrogn", + "salesActivityName": "own-calender", + "title": "new Contact", + "startDate": "2021-05-04T17:00:00+05:30", + "endDate": "2022-06-04T17:30:00+05:30", + "ownerId": "70054866612" + }, + "event": "sales_activity", + "previousId": "sampleusrRudder3", + "sentAt": "2020-10-20T08:14:28.778Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Either of email or targetable_id is required for creating sales activity. Aborting!", + "statTags": { + "destType": "FRESHMARKETER", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshmarketer", + "description": "Track call: sales activity with salesActivityTypeId", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.1.5" + }, + "traits": { + "name": "Shehan Study", + "category": "SampleIdentify", + "email": "test@rudderstack.com", + "plan": "Open source", + "logins": 5, + "createdAt": 1599264000 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.5" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", + "locale": "en-US", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 0.8999999761581421 + }, + "campaign": { + "source": "google", + "medium": "medium", + "term": "keyword", + "content": "some content", + "name": "some campaign", + "test": "other value" + }, + "page": { + "path": "/destinations/amplitude", + "referrer": "", + "search": "", + "title": "", + "url": "https://docs.rudderstack.com/destinations/amplitude", + "category": "destination", + "initial_referrer": "https://docs.rudderstack.com", + "initial_referring_domain": "docs.rudderstack.com" + }, + "externalId": { + "type": "Contact" + } + }, + "type": "track", + "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", + "originalTimestamp": "2020-10-20T08:14:28.778Z", + "anonymousId": "my-anonymous-id-new", + "userId": "newUserIdAlias", + "email": "jamessampleton3@gmail.com", + "properties": { + "salesActivityTypeId": "70000663932", + "title": "new Contact", + "startDate": "2021-05-04T17:00:00+05:30", + "endDate": "2022-06-04T17:30:00+05:30", + "ownerId": "70054866612" + }, + "event": "sales_activity", + "previousId": "sampleusrRudder3", + "sentAt": "2020-10-20T08:14:28.778Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "FORM": {}, + "JSON": { + "sales_activity": { + "title": "new Contact", + "end_date": "2022-06-04T17:30:00+05:30", + "owner_id": "70054866612", + "start_date": "2021-05-04T17:00:00+05:30", + "created_at": "2020-10-20T08:14:28.778Z", + "updated_at": "2020-10-20T08:14:28.778Z", + "targetable_id": 70054866612, + "targetable_type": "Contact", + "sales_activity_type_id": "70000663932" + } + }, + "JSON_ARRAY": {} + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": {}, + "headers": { + "Content-Type": "application/json", + "Authorization": "Token token=dummyApiKey" + }, + "version": "1", + "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/sales_activities", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "freshmarketer", + "description": "Track call: updated sales activity with salesActivityTypeId and targetableId", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.1.5" + }, + "traits": { + "name": "Shehan Study", + "category": "SampleIdentify", + "email": "test@rudderstack.com", + "plan": "Open source", + "logins": 5, + "createdAt": 1599264000 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.5" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", + "locale": "en-US", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 0.8999999761581421 + }, + "campaign": { + "source": "google", + "medium": "medium", + "term": "keyword", + "content": "some content", + "name": "some campaign", + "test": "other value" + }, + "page": { + "path": "/destinations/amplitude", + "referrer": "", + "search": "", + "title": "", + "url": "https://docs.rudderstack.com/destinations/amplitude", + "category": "destination", + "initial_referrer": "https://docs.rudderstack.com", + "initial_referring_domain": "docs.rudderstack.com" + }, + "externalId": { + "id": "70052305908", + "type": "Contact" + } + }, + "type": "track", + "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", + "originalTimestamp": "2020-10-20T08:14:28.778Z", + "anonymousId": "my-anonymous-id-new", + "userId": "newUserIdAlias", + "properties": { + "salesActivityTypeId": "70000663932", + "title": "new Contact", + "startDate": "2021-05-04T17:00:00+05:30", + "endDate": "2022-06-04T17:30:00+05:30", + "ownerId": "70054866612" + }, + "event": "sales_activity", + "previousId": "sampleusrRudder3", + "sentAt": "2020-10-20T08:14:28.778Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "FORM": {}, + "JSON": { + "sales_activity": { + "title": "new Contact", + "end_date": "2022-06-04T17:30:00+05:30", + "owner_id": "70054866612", + "start_date": "2021-05-04T17:00:00+05:30", + "created_at": "2020-10-20T08:14:28.778Z", + "updated_at": "2020-10-20T08:14:28.778Z", + "targetable_id": "70052305908", + "targetable_type": "Contact", + "sales_activity_type_id": "70000663932" + } + }, + "JSON_ARRAY": {} + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": {}, + "headers": { + "Content-Type": "application/json", + "Authorization": "Token token=dummyApiKey" + }, + "version": "1", + "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/sales_activities", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "freshmarketer", + "description": "Unsupported message Type", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "type": "page", + "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", + "originalTimestamp": "2020-10-20T08:14:28.778Z", + "anonymousId": "my-anonymous-id-new", + "userId": "newUserIdAlias", + "email": "jamessampleton3@gmail.com", + "properties": { + "lifecycleStageId": "71012139273", + "title": "new Contact", + "startDate": "2021-05-04T17:00:00+05:30", + "endDate": "2022-06-04T17:30:00+05:30", + "ownerId": "70054866612", + "targetableType": "Contact" + }, + "event": "lifecycle_stage", + "previousId": "sampleusrRudder3", + "sentAt": "2020-10-20T08:14:28.778Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "message type page not supported", + "statTags": { + "destType": "FRESHMARKETER", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshmarketer", + "description": "Group call: email is required for adding contacts to marketing lists", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "messageId": "sadjb-1e2r3fhgb-12bvbbj", + "originalTimestamp": "2022-06-22T10:57:58Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "traits": { + "groupType": "marketing_lists" + }, + "type": "group", + "sentAt": "2022-04-22T10:57:58Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "email is required for adding in the marketing lists. Aborting!", + "statTags": { + "destType": "FRESHMARKETER", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshmarketer", + "description": "Group call: group type is not present", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "messageId": "sadjb-1e2r3fhgb-12bvbbj", + "originalTimestamp": "2022-06-22T10:57:58Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "traits": { + "name": "Mark Twain", + "phone": "919191919191", + "numberOfEmployees": 51, + "annualRevenue": 1000, + "address": "Red Colony", + "city": "Colony", + "state": "Haryana" + }, + "type": "group", + "sentAt": "2022-04-22T10:57:58Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "groupType is required for Group call", + "statTags": { + "destType": "FRESHMARKETER", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshmarketer", + "description": "Group call: add contacts in existing marketing lists", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "messageId": "sadjb-1e2r3fhgb-12bvbbj", + "originalTimestamp": "2022-06-22T10:57:58Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "traits": { + "email": "jamessampleton1@gmail.com" + } + }, + "traits": { + "groupType": "marketing_lists", + "listName": "Voda 5G", + "address": "Red Colony", + "city": "Colony", + "state": "Haryana" + }, + "type": "group", + "sentAt": "2022-04-22T10:57:58Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "FORM": {}, + "JSON": { + "ids": [ + 70054866612 + ] + }, + "JSON_ARRAY": {} + }, + "type": "REST", + "files": {}, + "method": "PUT", + "params": {}, + "headers": { + "Content-Type": "application/json", + "Authorization": "Token token=dummyApiKey" + }, + "version": "1", + "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/lists/70000059716/add_contacts", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "freshmarketer", + "description": "Group call: groupType is not supported", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "messageId": "sadjb-1e2r3fhgb-12bvbbj", + "originalTimestamp": "2022-06-22T10:57:58Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "traits": { + "groupType": "marketing", + "listName": "Voda 5G", + "address": "Red Colony", + "city": "Colony", + "state": "Haryana" + }, + "type": "group", + "sentAt": "2022-04-22T10:57:58Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "groupType marketing is not supported. Aborting!", + "statTags": { + "destType": "FRESHMARKETER", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshmarketer", + "description": "Group call: listId or listName is required", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "messageId": "sadjb-1e2r3fhgb-12bvbbj", + "originalTimestamp": "2022-06-22T10:57:58Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "traits": { + "email": "jamessampleton1@gmail.com" + } + }, + "traits": { + "groupType": "marketing_lists", + "address": "Red Colony", + "city": "Colony", + "state": "Haryana" + }, + "type": "group", + "sentAt": "2022-04-22T10:57:58Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "listId or listName is required. Aborting!", + "statTags": { + "destType": "FRESHMARKETER", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshmarketer", + "description": "Group call: add marketing lists with listId", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "messageId": "sadjb-1e2r3fhgb-12bvbbj", + "originalTimestamp": "2022-06-22T10:57:58Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "traits": { + "email": "jamessampleton1@gmail.com" + } + }, + "traits": { + "listId": "70000058627", + "groupType": "marketing_lists", + "address": "Red Colony", + "city": "Colony", + "state": "Haryana" + }, + "type": "group", + "sentAt": "2022-04-22T10:57:58Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "FORM": {}, + "JSON": { + "ids": [ + 70054866612 + ] + }, + "JSON_ARRAY": {} + }, + "type": "REST", + "files": {}, + "method": "PUT", + "params": {}, + "headers": { + "Content-Type": "application/json", + "Authorization": "Token token=dummyApiKey" + }, + "version": "1", + "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/lists/70000058627/add_contacts", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "freshmarketer", + "description": "Track call: with wrong sales activity name", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.1.5" + }, + "traits": { + "name": "Shehan Study", + "category": "SampleIdentify", + "email": "test@rudderstack.com", + "plan": "Open source", + "logins": 5, + "createdAt": 1599264000 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.5" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", + "locale": "en-US", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 0.8999999761581421 + }, + "campaign": { + "source": "google", + "medium": "medium", + "term": "keyword", + "content": "some content", + "name": "some campaign", + "test": "other value" + }, + "page": { + "path": "/destinations/amplitude", + "referrer": "", + "search": "", + "title": "", + "url": "https://docs.rudderstack.com/destinations/amplitude", + "category": "destination", + "initial_referrer": "https://docs.rudderstack.com", + "initial_referring_domain": "docs.rudderstack.com" + }, + "externalId": { + "type": "Contact" + } + }, + "type": "track", + "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", + "originalTimestamp": "2020-10-20T08:14:28.778Z", + "anonymousId": "my-anonymous-id-new", + "userId": "newUserIdAlias", + "email": "test@rudderstack.com", + "properties": { + "product_name": "Shirt", + "brand": "Wrogn", + "salesActivityName": "own-list", + "title": "new Contact", + "startDate": "2021-05-04T17:00:00+05:30", + "endDate": "2022-06-04T17:30:00+05:30", + "ownerId": "70054866612" + }, + "event": "sales_activity", + "previousId": "sampleusrRudder3", + "sentAt": "2020-10-20T08:14:28.778Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "sales Activity own-list doesn't exists. Aborting!", + "statTags": { + "destType": "FRESHMARKETER", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshmarketer", + "description": "Track call: update contacts with sales Activity name", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.1.5" + }, + "traits": { + "name": "Shehan Study", + "category": "SampleIdentify", + "plan": "Open source", + "logins": 5, + "createdAt": 1599264000 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.5" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", + "locale": "en-US", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 0.8999999761581421 + }, + "campaign": { + "source": "google", + "medium": "medium", + "term": "keyword", + "content": "some content", + "name": "some campaign", + "test": "other value" + }, + "page": { + "path": "/destinations/amplitude", + "referrer": "", + "search": "", + "title": "", + "url": "https://docs.rudderstack.com/destinations/amplitude", + "category": "destination", + "initial_referrer": "https://docs.rudderstack.com", + "initial_referring_domain": "docs.rudderstack.com" + } + }, + "type": "track", + "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", + "originalTimestamp": "2020-10-20T08:14:28.778Z", + "anonymousId": "my-anonymous-id-new", + "userId": "newUserIdAlias", + "properties": { + "email": "jamessampleton6@gmail.com", + "lifecycleStageName": "final Customer", + "title": "new Contact", + "startDate": "2021-05-04T17:00:00+05:30", + "endDate": "2022-06-04T17:30:00+05:30", + "ownerId": "70054866612", + "targetableType": "Contact" + }, + "event": "lifecycle_stage", + "previousId": "sampleusrRudder3", + "sentAt": "2020-10-20T08:14:28.778Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "FORM": {}, + "JSON": { + "contact": { + "lifecycle_stage_id": 71012806409 + }, + "unique_identifier": { + "emails": "jamessampleton6@gmail.com" + } + }, + "JSON_ARRAY": {} + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": {}, + "headers": { + "Content-Type": "application/json", + "Authorization": "Token token=dummyApiKey" + }, + "version": "1", + "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/contacts/upsert", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "freshmarketer", + "description": "Track call: with wrong lifecycleStageName", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.1.5" + }, + "traits": { + "name": "Shehan Study", + "category": "SampleIdentify", + "plan": "Open source", + "logins": 5, + "createdAt": 1599264000 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.5" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", + "locale": "en-US", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 0.8999999761581421 + }, + "campaign": { + "source": "google", + "medium": "medium", + "term": "keyword", + "content": "some content", + "name": "some campaign", + "test": "other value" + }, + "page": { + "path": "/destinations/amplitude", + "referrer": "", + "search": "", + "title": "", + "url": "https://docs.rudderstack.com/destinations/amplitude", + "category": "destination", + "initial_referrer": "https://docs.rudderstack.com", + "initial_referring_domain": "docs.rudderstack.com" + } + }, + "type": "track", + "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", + "originalTimestamp": "2020-10-20T08:14:28.778Z", + "anonymousId": "my-anonymous-id-new", + "userId": "newUserIdAlias", + "properties": { + "email": "jamessampleton6@gmail.com", + "lifecycleStageName": "final ExCustomer", + "title": "new Contact", + "startDate": "2021-05-04T17:00:00+05:30", + "endDate": "2022-06-04T17:30:00+05:30", + "ownerId": "70054866612", + "targetableType": "Contact" + }, + "event": "lifecycle_stage", + "previousId": "sampleusrRudder3", + "sentAt": "2020-10-20T08:14:28.778Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "failed to fetch lifeCycleStages with final ExCustomer", + "statTags": { + "destType": "FRESHMARKETER", + "errorCategory": "network", + "errorType": "aborted", + "feature": "processor", + "implementation": "native", + "meta": "instrumentation", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshmarketer", + "description": "Track call: Multiplexing", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.1.5" + }, + "traits": { + "name": "Shehan Study", + "category": "SampleIdentify", + "email": "test@rudderstack.com", + "plan": "Open source", + "logins": 5, + "createdAt": 1599264000 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.5" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", + "locale": "en-US", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 0.8999999761581421 + }, + "campaign": { + "source": "google", + "medium": "medium", + "term": "keyword", + "content": "some content", + "name": "some campaign", + "test": "other value" + }, + "page": { + "path": "/destinations/amplitude", + "referrer": "", + "search": "", + "title": "", + "url": "https://docs.rudderstack.com/destinations/amplitude", + "category": "destination", + "initial_referrer": "https://docs.rudderstack.com", + "initial_referring_domain": "docs.rudderstack.com" + }, + "externalId": { + "type": "Contact" + } + }, + "type": "track", + "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", + "originalTimestamp": "2020-10-20T08:14:28.778Z", + "anonymousId": "my-anonymous-id-new", + "userId": "newUserIdAlias", + "email": "test@rudderstack.com", + "properties": { + "product_name": "Shirt", + "brand": "Wrogn", + "salesActivityName": "own-calender", + "title": "new Contact", + "startDate": "2021-05-04T17:00:00+05:30", + "endDate": "2022-06-04T17:30:00+05:30", + "ownerId": "70054866612", + "lifecycleStageId": "71012139273" + }, + "event": "test_activity", + "previousId": "sampleusrRudder3", + "sentAt": "2020-10-20T08:14:28.778Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com", + "rudderEventsToFreshmarketerEvents": [ + { + "from": "test_activity", + "to": "sales_activity" + }, + { + "from": "test_activity", + "to": "lifecycle_stage" + }, + { + "from": "test_event", + "to": "lifecycle_stage" + } + ] + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "FORM": {}, + "JSON": { + "sales_activity": { + "title": "new Contact", + "end_date": "2022-06-04T17:30:00+05:30", + "owner_id": "70054866612", + "start_date": "2021-05-04T17:00:00+05:30", + "created_at": "2020-10-20T08:14:28.778Z", + "updated_at": "2020-10-20T08:14:28.778Z", + "targetable_id": 70054866612, + "targetable_type": "Contact", + "sales_activity_name": "own-calender", + "sales_activity_type_id": 70000666879 + } + }, + "JSON_ARRAY": {} + }, + "type": "REST", + "files": {}, + "method": "POST", + "userId": "", + "params": {}, + "headers": { + "Content-Type": "application/json", + "Authorization": "Token token=dummyApiKey" + }, + "version": "1", + "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/sales_activities" + }, + "statusCode": 200 + }, + { + "output": { + "body": { + "JSON": { + "contact": { + "lifecycle_stage_id": "71012139273" + }, + "unique_identifier": { + "emails": "test@rudderstack.com" + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "type": "REST", + "files": {}, + "userId": "", + "method": "POST", + "params": {}, + "headers": { + "Authorization": "Token token=dummyApiKey", + "Content-Type": "application/json" + }, + "version": "1", + "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/contacts/upsert" + }, + "statusCode": 200 + } + ] + } + } + } +] \ No newline at end of file diff --git a/test/integrations/destinations/freshmarketer/router/data.ts b/test/integrations/destinations/freshmarketer/router/data.ts new file mode 100644 index 0000000000..bffb361ba5 --- /dev/null +++ b/test/integrations/destinations/freshmarketer/router/data.ts @@ -0,0 +1,361 @@ +export const data = [ + { + name: 'freshmarketer', + description: 'Test 0', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "rudderstack-476952domain3105.myfreshworks.com" + } + }, + "metadata": { + "jobId": 1 + }, + "message": { + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-06-22T10:57:58Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99099", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + } + }, + "traits": { + "email": "testuser@google.com", + "first_name": "Rk", + "last_name": "Mishra", + "mobileNumber": "1-926-555-9504", + "lifecycleStageId": 71010794467, + "phone": "9988776655", + "owner_id": "70000090119" + }, + "type": "identify", + "sentAt": "2022-04-22T10:57:58Z" + } + }, + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "rudderstack-476952domain3105.myfreshworks.com" + } + }, + "metadata": { + "jobId": 2 + }, + "message": { + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-06-22T10:57:58Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99099", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + } + }, + "traits": { + "email": "testuser@google.com", + "first_name": "Rk", + "last_name": "Mishra", + "mobileNumber": "1-926-555-9504", + "lifecycleStageId": 71010794467, + "phone": "9988776655", + "owner_id": "70000090119" + }, + "type": "identify", + "sentAt": "2022-04-22T10:57:58Z" + } + }, + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + }, + "metadata": { + "jobId": 3 + }, + "message": { + "messageId": "sadjb-1e2r3fhgb-12bvbbj", + "originalTimestamp": "2022-06-22T10:57:58Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "traits": { + "email": "testuser@google.com" + } + }, + "traits": { + "groupType": "accounts", + "name": "Mark Twain", + "phone": "919191919191", + "numberOfEmployees": 51, + "annualRevenue": 1000, + "address": "Red Colony", + "city": "Colony", + "state": "Haryana" + }, + "type": "group", + "sentAt": "2022-04-22T10:57:58Z" + } + } + ], + destType: 'freshmarketer', + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + "batchedRequest": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://rudderstack-476952domain3105.myfreshworks.com/crm/sales/api/contacts/upsert", + "headers": { + "Authorization": "Token token=dummyApiKey", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "contact": { + "emails": "testuser@google.com", + "first_name": "Rk", + "last_name": "Mishra", + "work_number": "9988776655", + "external_id": "ea5cfab2-3961-4d8a-8187-3d1858c99099", + "mobile_number": "1-926-555-9504", + "created_at": "2022-06-22T10:57:58Z", + "updated_at": "2022-06-22T10:57:58Z", + "lifecycle_stage_id": 71010794467 + }, + "unique_identifier": { + "emails": "testuser@google.com" + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {} + }, + "metadata": [ + { + "jobId": 1 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "rudderstack-476952domain3105.myfreshworks.com" + } + } + }, + { + "batchedRequest": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://rudderstack-476952domain3105.myfreshworks.com/crm/sales/api/contacts/upsert", + "headers": { + "Authorization": "Token token=dummyApiKey", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "contact": { + "emails": "testuser@google.com", + "first_name": "Rk", + "last_name": "Mishra", + "work_number": "9988776655", + "external_id": "ea5cfab2-3961-4d8a-8187-3d1858c99099", + "mobile_number": "1-926-555-9504", + "created_at": "2022-06-22T10:57:58Z", + "updated_at": "2022-06-22T10:57:58Z", + "lifecycle_stage_id": 71010794467 + }, + "unique_identifier": { + "emails": "testuser@google.com" + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {} + }, + "metadata": [ + { + "jobId": 2 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "rudderstack-476952domain3105.myfreshworks.com" + } + } + }, + { + "batchedRequest": { + "body": { + "XML": {}, + "FORM": {}, + "JSON": { + "contact": { + "sales_accounts": [ + { + "id": 70003771198, + "name": "div-quer", + "avatar": null, + "partial": true, + "website": null, + "is_primary": true, + "last_contacted": null, + "record_type_id": "71010794477" + }, + { + "id": 70003825177, + "name": "BisleriGroup", + "avatar": null, + "partial": true, + "website": null, + "is_primary": false, + "last_contacted": null, + "record_type_id": "71010794477" + }, + { + "id": 70003771396, + "is_primary": false + } + ] + }, + "unique_identifier": { + "emails": "testuser@google.com" + } + }, + "JSON_ARRAY": {} + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": {}, + "headers": { + "Content-Type": "application/json", + "Authorization": "Token token=dummyApiKey" + }, + "version": "1", + "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/contacts/upsert" + }, + "metadata": [ + { + "jobId": 3 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ], + }, + }, + }, + }, +]; diff --git a/test/integrations/destinations/freshsales/network.ts b/test/integrations/destinations/freshsales/network.ts new file mode 100644 index 0000000000..f6043b265f --- /dev/null +++ b/test/integrations/destinations/freshsales/network.ts @@ -0,0 +1,484 @@ +export const networkCallsData = [ + { + httpReq: { + url: 'https://domain-rudder.myfreshworks.com/crm/sales/api/sales_accounts/upsert', + method: 'POST' + }, + httpRes: { + data: { + "sales_account": { + "id": 70003771396, + "name": "postman2.0", + "address": "Red Colony", + "city": "Pune", + "state": "Goa", + "zipcode": null, + "country": null, + "number_of_employees": 11, + "annual_revenue": 1000, + "website": null, + "owner_id": null, + "phone": "919191919191", + "open_deals_amount": null, + "open_deals_count": null, + "won_deals_amount": null, + "won_deals_count": null, + "last_contacted": null, + "last_contacted_mode": null, + "facebook": null, + "twitter": null, + "linkedin": null, + "links": { + "conversations": "/crm/sales/sales_accounts/70003771396/conversations/all?include=email_conversation_recipients%2Ctargetable%2Cphone_number%2Cphone_caller%2Cnote%2Cuser&per_page=3", + "document_associations": "/crm/sales/sales_accounts/70003771396/document_associations", + "notes": "/crm/sales/sales_accounts/70003771396/notes?include=creater", + "tasks": "/crm/sales/sales_accounts/70003771396/tasks?include=creater,owner,updater,targetable,users,task_type", + "appointments": "/crm/sales/sales_accounts/70003771396/appointments?include=creater,owner,updater,targetable,appointment_attendees,conference,note" + }, + "custom_field": {}, + "created_at": "2022-08-17T04:15:00-04:00", + "updated_at": "2022-08-24T06:03:31-04:00", + "avatar": null, + "parent_sales_account_id": null, + "recent_note": null, + "last_contacted_via_sales_activity": null, + "last_contacted_sales_activity_mode": null, + "completed_sales_sequences": null, + "active_sales_sequences": null, + "last_assigned_at": null, + "tags": [], + "is_deleted": false, + "team_user_ids": null, + "has_connections": false, + "record_type_id": "71010794477" + } + }, + status: 200 + }, + }, + { + httpReq: { + url: 'https://domain-rudder.myfreshworks.com/crm/sales/api/contacts/upsert?include=sales_accounts', + method: 'POST' + }, + httpRes: { + data: { + "contact": { + "id": 70042006456, + "first_name": "Rk", + "last_name": "Mishra", + "display_name": "Rk Mishra", + "avatar": null, + "job_title": null, + "city": null, + "state": null, + "zipcode": null, + "country": null, + "email": "testuser@google.com", + "emails": [ + { + "id": 70037311213, + "value": "testuser@google.com", + "is_primary": true, + "label": null, + "_destroy": false + } + ], + "time_zone": "IST", + "work_number": "9988776655", + "mobile_number": "19265559504", + "address": null, + "last_seen": null, + "lead_score": 26, + "last_contacted": null, + "open_deals_amount": null, + "won_deals_amount": null, + "links": { + "conversations": "/crm/sales/contacts/70042006456/conversations/all?include=email_conversation_recipients%2Ctargetable%2Cphone_number%2Cphone_caller%2Cnote%2Cuser&per_page=3", + "timeline_feeds": "/crm/sales/contacts/70042006456/timeline_feeds", + "document_associations": "/crm/sales/contacts/70042006456/document_associations", + "notes": "/crm/sales/contacts/70042006456/notes?include=creater", + "tasks": "/crm/sales/contacts/70042006456/tasks?include=creater,owner,updater,targetable,users,task_type", + "appointments": "/crm/sales/contacts/70042006456/appointments?include=creater,owner,updater,targetable,appointment_attendees,conference,note", + "reminders": "/crm/sales/contacts/70042006456/reminders?include=creater,owner,updater,targetable", + "duplicates": "/crm/sales/contacts/70042006456/duplicates", + "connections": "/crm/sales/contacts/70042006456/connections" + }, + "last_contacted_sales_activity_mode": null, + "custom_field": {}, + "created_at": "2022-08-09T03:22:12-04:00", + "updated_at": "2022-08-30T00:33:27-04:00", + "keyword": "drilling", + "medium": "facebook", + "last_contacted_mode": null, + "recent_note": null, + "won_deals_count": null, + "last_contacted_via_sales_activity": null, + "completed_sales_sequences": null, + "active_sales_sequences": null, + "web_form_ids": null, + "open_deals_count": null, + "last_assigned_at": "2022-08-29T05:51:24-04:00", + "tags": [], + "facebook": null, + "twitter": null, + "linkedin": null, + "is_deleted": false, + "team_user_ids": null, + "external_id": "ea5cfab2-3961-4d8a-8187-3d1858c99099", + "work_email": null, + "subscription_status": 1, + "subscription_types": "2;3;4;5;1", + "customer_fit": 2, + "record_type_id": "71010794476", + "whatsapp_subscription_status": 2, + "sms_subscription_status": 2, + "last_seen_chat": null, + "first_seen_chat": null, + "locale": null, + "total_sessions": null, + "phone_numbers": [], + "sales_accounts": [ + { + "partial": true, + "id": 70003771198, + "name": "div-quer", + "avatar": null, + "website": null, + "last_contacted": null, + "record_type_id": "71010794477", + "is_primary": true + }, + { + "partial": true, + "id": 70003825177, + "name": "BisleriGroup", + "avatar": null, + "website": null, + "last_contacted": null, + "record_type_id": "71010794477", + "is_primary": false + } + ] + } + }, + status: 200 + }, + }, + { + httpReq: { + url: 'https://domain-rudder.myfreshworks.com/crm/sales/api/selector/sales_activity_types', + method: 'GET' + }, + httpRes: { + data: { + "sales_activity_types": [ + { + "partial": true, + "id": 70000666879, + "name": "own-calender", + "internal_name": "cappointment", + "show_in_conversation": true, + "position": 1, + "is_default": false, + "is_checkedin": false + }, + { + "partial": true, + "id": 70000663932, + "name": "fb-support", + "internal_name": "facebook", + "show_in_conversation": true, + "position": 2, + "is_default": false, + "is_checkedin": false + }, + { + "partial": true, + "id": 70000663746, + "name": "twitter sales", + "internal_name": "twitter", + "show_in_conversation": true, + "position": 3, + "is_default": false, + "is_checkedin": false + }, + { + "partial": true, + "id": 70000646396, + "name": "linked sales", + "internal_name": "linkedin", + "show_in_conversation": true, + "position": 4, + "is_default": false, + "is_checkedin": false + }, + { + "partial": true, + "id": 70000642330, + "name": "facebook sales", + "internal_name": "facebook", + "show_in_conversation": true, + "position": 5, + "is_default": false, + "is_checkedin": false + }, + { + "partial": true, + "id": 70000612897, + "name": "Chat", + "internal_name": "chat", + "show_in_conversation": true, + "position": 6, + "is_default": true, + "is_checkedin": false + }, + { + "partial": true, + "id": 70000612898, + "name": "Phone", + "internal_name": "phone", + "show_in_conversation": true, + "position": 7, + "is_default": true, + "is_checkedin": false + }, + { + "partial": true, + "id": 70000612899, + "name": "Meeting", + "internal_name": "appointment", + "show_in_conversation": true, + "position": 8, + "is_default": true, + "is_checkedin": true + }, + { + "partial": true, + "id": 70000612900, + "name": "Task", + "internal_name": "task", + "show_in_conversation": true, + "position": 9, + "is_default": true, + "is_checkedin": false + }, + { + "partial": true, + "id": 70000612901, + "name": "Email", + "internal_name": "email", + "show_in_conversation": true, + "position": 10, + "is_default": true, + "is_checkedin": false + }, + { + "partial": true, + "id": 70000612902, + "name": "SMS Outgoing", + "internal_name": "sms_outgoing", + "show_in_conversation": true, + "position": 11, + "is_default": true, + "is_checkedin": false + }, + { + "partial": true, + "id": 70000612903, + "name": "Reminder", + "internal_name": "reminder", + "show_in_conversation": false, + "position": 12, + "is_default": true, + "is_checkedin": false + }, + { + "partial": true, + "id": 70000612904, + "name": "SMS Incoming", + "internal_name": "sms_incoming", + "show_in_conversation": true, + "position": 13, + "is_default": true, + "is_checkedin": false + } + ] + }, + status: 200 + }, + }, + { + httpReq: { + url: 'https://domain-rudder.myfreshworks.com/crm/sales/api/contacts/upsert', + method: 'POST' + }, + httpRes: { + data: { + "contact": { + "id": 70054866612, + "first_name": null, + "last_name": null, + "display_name": "jamessampleton120@gmail.com", + "avatar": null, + "job_title": null, + "city": null, + "state": null, + "zipcode": null, + "country": null, + "email": "jamessampleton120@gmail.com", + "emails": [ + { + "id": 70047409219, + "value": "jamessampleton120@gmail.com", + "is_primary": true, + "label": null, + "_destroy": false + } + ], + "time_zone": null, + "work_number": null, + "mobile_number": null, + "address": null, + "last_seen": null, + "lead_score": 0, + "last_contacted": null, + "open_deals_amount": null, + "won_deals_amount": null, + "links": { + "conversations": "/crm/sales/contacts/70054866612/conversations/all?include=email_conversation_recipients%2Ctargetable%2Cphone_number%2Cphone_caller%2Cnote%2Cuser&per_page=3", + "timeline_feeds": "/crm/sales/contacts/70054866612/timeline_feeds", + "document_associations": "/crm/sales/contacts/70054866612/document_associations", + "notes": "/crm/sales/contacts/70054866612/notes?include=creater", + "tasks": "/crm/sales/contacts/70054866612/tasks?include=creater,owner,updater,targetable,users,task_type", + "appointments": "/crm/sales/contacts/70054866612/appointments?include=creater,owner,updater,targetable,appointment_attendees,conference,note", + "reminders": "/crm/sales/contacts/70054866612/reminders?include=creater,owner,updater,targetable", + "duplicates": "/crm/sales/contacts/70054866612/duplicates", + "connections": "/crm/sales/contacts/70054866612/connections" + }, + "last_contacted_sales_activity_mode": null, + "custom_field": {}, + "created_at": "2022-10-11T08:42:15-04:00", + "updated_at": "2022-10-11T08:42:15-04:00", + "keyword": null, + "medium": null, + "last_contacted_mode": null, + "recent_note": null, + "won_deals_count": null, + "last_contacted_via_sales_activity": null, + "completed_sales_sequences": null, + "active_sales_sequences": null, + "web_form_ids": null, + "open_deals_count": null, + "last_assigned_at": null, + "tags": [], + "facebook": null, + "twitter": null, + "linkedin": null, + "is_deleted": false, + "team_user_ids": null, + "external_id": null, + "work_email": null, + "subscription_status": 1, + "subscription_types": "2;3;4;5;1", + "customer_fit": 0, + "record_type_id": "71012139284", + "whatsapp_subscription_status": 2, + "sms_subscription_status": 2, + "last_seen_chat": null, + "first_seen_chat": null, + "locale": null, + "total_sessions": null, + "phone_numbers": [] + } + }, + status: 200 + }, + }, + { + httpReq: { + url: 'https://domain-rudder.myfreshworks.com/crm/sales/api/lists', + method: 'GET' + }, + httpRes: { + data: { + "lists": [ + { + "id": 70000053624, + "name": "Sample list" + }, + { + "id": 70000056575, + "name": "list1-test" + }, + { + "id": 70000058627, + "name": "Jio 5G Group" + }, + { + "id": 70000058628, + "name": "Airtel 5G Group" + }, + { + "id": 70000059716, + "name": "Voda 5G" + } + ], + "meta": { + "total_pages": 1, + "total": 5 + } + }, + status: 200 + }, + }, + { + httpReq: { + url: 'https://domain-rudder.myfreshworks.com/crm/sales/api/selector/lifecycle_stages', + method: 'GET' + }, + httpRes: { + data: { + "lifecycle_stages": [ + { + "id": 71012139274, + "name": "Sales Qualified Lead start", + "position": 1, + "disabled": false, + "default": true, + "type": "Sales Qualified Lead", + "contact_status_ids": [70000697858, 70000697859, 70000697860] + }, + { + "id": 71012139273, + "name": "Lead", + "position": 2, + "disabled": false, + "default": true, + "type": "Lead", + "contact_status_ids": [70000697854, 70000697855, 70000697856, 70000697857] + }, + { + "id": 71012806409, + "name": "final Customer", + "position": 3, + "disabled": false, + "default": false, + "type": "Custom", + "contact_status_ids": [70000736543, 70000736544] + }, + { + "id": 71012139275, + "name": "Customer", + "position": 4, + "disabled": false, + "default": true, + "type": "Customer", + "contact_status_ids": [70000697861, 70000697862] + } + ] + }, + status: 200 + }, + } +]; \ No newline at end of file diff --git a/test/integrations/destinations/freshsales/processor/data.ts b/test/integrations/destinations/freshsales/processor/data.ts new file mode 100644 index 0000000000..e3e6a4176a --- /dev/null +++ b/test/integrations/destinations/freshsales/processor/data.ts @@ -0,0 +1,2668 @@ +export const data = [ + { + "name": "freshsales", + "description": "Track call, event is not supported.", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.1.5" + }, + "traits": { + "name": "Shehan Study", + "category": "SampleIdentify", + "email": "test@rudderstack.com", + "plan": "Open source", + "logins": 5, + "createdAt": 1599264000 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.5" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", + "locale": "en-US", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 0.8999999761581421 + }, + "campaign": { + "source": "google", + "medium": "medium", + "term": "keyword", + "content": "some content", + "name": "some campaign", + "test": "other value" + }, + "page": { + "path": "/destinations/amplitude", + "referrer": "", + "search": "", + "title": "", + "url": "https://docs.rudderstack.com/destinations/amplitude", + "category": "destination", + "initial_referrer": "https://docs.rudderstack.com", + "initial_referring_domain": "docs.rudderstack.com" + } + }, + "type": "track", + "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", + "originalTimestamp": "2020-10-20T08:14:28.778Z", + "anonymousId": "my-anonymous-id-new", + "userId": "newUserIdAlias", + "properties": { + "product_name": "Shirt", + "brand": "Wrogn" + }, + "event": { + "name": "Add to Cart" + }, + "previousId": "sampleusrRudder3", + "sentAt": "2020-10-20T08:14:28.778Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Event is a required field and should be a string", + "statTags": { + "destType": "FRESHSALES", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshsales", + "description": "Identify call for creating new user", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "rudderstack-476952domain3105.myfreshworks.com" + } + }, + "message": { + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-06-22T10:57:58Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99099", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + } + }, + "traits": { + "email": "testuser@google.com", + "first_name": "Rk", + "last_name": "Mishra", + "mobileNumber": "1-926-555-9504", + "lifecycleStageId": 71010794467, + "phone": "9988776655", + "owner_id": "70000090119" + }, + "type": "identify", + "sentAt": "2022-04-22T10:57:58Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "FORM": {}, + "JSON": { + "contact": { + "emails": "testuser@google.com", + "last_name": "Mishra", + "created_at": "2022-06-22T10:57:58Z", + "first_name": "Rk", + "updated_at": "2022-06-22T10:57:58Z", + "external_id": "ea5cfab2-3961-4d8a-8187-3d1858c99099", + "work_number": "9988776655", + "mobile_number": "1-926-555-9504", + "lifecycle_stage_id": 71010794467 + }, + "unique_identifier": { + "emails": "testuser@google.com" + } + }, + "JSON_ARRAY": {} + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": {}, + "headers": { + "Content-Type": "application/json", + "Authorization": "Token token=dummyApiKey" + }, + "version": "1", + "endpoint": "https://rudderstack-476952domain3105.myfreshworks.com/crm/sales/api/contacts/upsert", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "freshsales", + "description": "Identify call with numbers in lifecycleStageId, ownerId", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "rudderstack-476952domain3105.myfreshworks.com" + } + }, + "message": { + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-06-22T10:57:58Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99099", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + } + }, + "traits": { + "email": "testuser@google.com", + "first_name": "Rk", + "last_name": "Mishra", + "mobileNumber": "1-926-555-9504", + "lifecycleStageId": 71010794467, + "phone": "9988776655", + "owner_id": "70000090119" + }, + "type": "identify", + "sentAt": "2022-04-22T10:57:58Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "FORM": {}, + "JSON": { + "contact": { + "emails": "testuser@google.com", + "last_name": "Mishra", + "created_at": "2022-06-22T10:57:58Z", + "first_name": "Rk", + "updated_at": "2022-06-22T10:57:58Z", + "external_id": "ea5cfab2-3961-4d8a-8187-3d1858c99099", + "work_number": "9988776655", + "mobile_number": "1-926-555-9504", + "lifecycle_stage_id": 71010794467 + }, + "unique_identifier": { + "emails": "testuser@google.com" + } + }, + "JSON_ARRAY": {} + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": {}, + "headers": { + "Content-Type": "application/json", + "Authorization": "Token token=dummyApiKey" + }, + "version": "1", + "endpoint": "https://rudderstack-476952domain3105.myfreshworks.com/crm/sales/api/contacts/upsert", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "freshsales", + "description": "Identify call with wrong data type in lifecycleStageId, ownerId", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "rudderstack-476952domain3105.myfreshworks.com" + } + }, + "message": { + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-06-22T10:57:58Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99099", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + } + }, + "traits": { + "email": "testuser@google.com", + "first_name": "Rk", + "last_name": "Mishra", + "mobileNumber": "1-926-555-9504", + "lifecycleStageId": "rudderSample", + "phone": "9988776655", + "ownerId": "rudderSample" + }, + "type": "identify", + "sentAt": "2022-04-22T10:57:58Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://rudderstack-476952domain3105.myfreshworks.com/crm/sales/api/contacts/upsert", + "headers": { + "Authorization": "Token token=dummyApiKey", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "contact": { + "emails": "testuser@google.com", + "first_name": "Rk", + "last_name": "Mishra", + "work_number": "9988776655", + "external_id": "ea5cfab2-3961-4d8a-8187-3d1858c99099", + "mobile_number": "1-926-555-9504", + "created_at": "2022-06-22T10:57:58Z", + "updated_at": "2022-06-22T10:57:58Z" + }, + "unique_identifier": { + "emails": "testuser@google.com" + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "freshsales", + "description": "Identify call, email is not provided.", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "rudderstack-476952domain3105.myfreshworks.com" + } + }, + "message": { + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-06-22T10:57:58Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99099", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + } + }, + "traits": { + "first_name": "Rk", + "last_name": "Mishra", + "mobileNumber": "1-926-555-9504", + "lifecycleStageId": "rudderSample", + "phone": "9988776655", + "owner_id": "rudderSample" + }, + "type": "identify", + "sentAt": "2022-04-22T10:57:58Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Missing required value from \"email\"", + "statTags": { + "destType": "FRESHSALES", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshsales", + "description": "Group call: testing with mock api", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + }, + "message": { + "messageId": "sadjb-1e2r3fhgb-12bvbbj", + "originalTimestamp": "2022-06-22T10:57:58Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "traits": { + "email": "testuser@google.com" + } + }, + "traits": { + "groupType": "accounts", + "name": "Mark Twain", + "phone": "919191919191", + "numberOfEmployees": 51, + "annualRevenue": 1000, + "address": "Red Colony", + "city": "Colony", + "state": "Haryana" + }, + "type": "group", + "sentAt": "2022-04-22T10:57:58Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "FORM": {}, + "JSON": { + "contact": { + "sales_accounts": [ + { + "id": 70003771198, + "name": "div-quer", + "avatar": null, + "partial": true, + "website": null, + "is_primary": true, + "last_contacted": null, + "record_type_id": "71010794477" + }, + { + "id": 70003825177, + "name": "BisleriGroup", + "avatar": null, + "partial": true, + "website": null, + "is_primary": false, + "last_contacted": null, + "record_type_id": "71010794477" + }, + { + "id": 70003771396, + "is_primary": false + } + ] + }, + "unique_identifier": { + "emails": "testuser@google.com" + } + }, + "JSON_ARRAY": {} + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": {}, + "headers": { + "Content-Type": "application/json", + "Authorization": "Token token=dummyApiKey" + }, + "version": "1", + "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/contacts/upsert", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "freshsales", + "description": "Group call: name is required field.", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + }, + "message": { + "messageId": "sadjb-1e2r3fhgb-12bvbbj", + "originalTimestamp": "2022-06-22T10:57:58Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "traits": { + "email": "testuser@google.com" + } + }, + "traits": { + "groupType": "accounts", + "phone": "919191919191", + "numberOfEmployees": 51, + "annualRevenue": 1000, + "address": "Red Colony", + "city": "Colony", + "state": "Haryana" + }, + "type": "group", + "sentAt": "2022-04-22T10:57:58Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Missing required value from \"name\"", + "statTags": { + "destType": "FRESHSALES", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshsales", + "description": "missing message type", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + }, + "message": { + "messageId": "sadjb-1e2r3fhgb-12bvbbj", + "originalTimestamp": "2022-06-22T10:57:58Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "traits": { + "email": "testuser4google.com" + } + }, + "traits": { + "name": "Mark Twain", + "phone": "919191919191", + "numberOfEmployees": 51, + "annualRevenue": 1000, + "address": "Red Colony", + "city": "Colony", + "state": "Haryana" + }, + "sentAt": "2022-04-22T10:57:58Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Message Type is not present. Aborting message.", + "statTags": { + "destType": "FRESHSALES", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshsales", + "description": "Wrong message type", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + }, + "message": { + "messageId": "sadjb-1e2r3fhgb-12bvbbj", + "originalTimestamp": "2022-06-22T10:57:58Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "traits": { + "email": "testuser4google.com" + } + }, + "traits": { + "name": "Mark Twain", + "phone": "919191919191", + "numberOfEmployees": 51, + "annualRevenue": 1000, + "address": "Red Colony", + "city": "Colony", + "state": "Haryana" + }, + "type": "page", + "sentAt": "2022-04-22T10:57:58Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "message type page not supported", + "statTags": { + "destType": "FRESHSALES", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshsales", + "description": "Group call: user email is missing", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + }, + "message": { + "messageId": "sadjb-1e2r3fhgb-12bvbbj", + "originalTimestamp": "2022-06-22T10:57:58Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99090", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + }, + "traits": {} + }, + "traits": { + "groupType": "accounts", + "name": "div-quer", + "phone": "919191919191", + "numberOfEmployees": 51, + "annualRevenue": 1000, + "address": "Red Colony", + "city": "Lal colony", + "state": "Haryana" + }, + "type": "group", + "sentAt": "2022-04-22T10:57:58Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/sales_accounts/upsert", + "headers": { + "Authorization": "Token token=dummyApiKey", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "unique_identifier": { + "name": "div-quer" + }, + "sales_account": { + "name": "div-quer", + "phone": "919191919191", + "number_of_employees": 51, + "annual_revenue": 1000, + "address": "", + "city": "Lal colony", + "state": "Haryana", + "created_at": "2022-06-22T10:57:58Z", + "updated_at": "2022-06-22T10:57:58Z" + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "freshsales", + "description": "Identify call: Email is not present", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2022-06-22T10:57:58Z", + "anonymousId": "ea5cfab2-3961-4d8a-8187-3d1858c99099", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "device": { + "advertisingId": "T0T0T072-5e28-45a1-9eda-ce22a3e36d1a", + "id": "3f034872-5e28-45a1-9eda-ce22a3e36d1a", + "manufacturer": "Google", + "model": "AOSP on IA Emulator", + "name": "generic_x86_arm", + "type": "ios", + "attTrackingStatus": 3 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "locale": "en-US", + "os": { + "name": "iOS", + "version": "14.4.1" + }, + "screen": { + "density": 2 + } + }, + "traits": { + "first_name": "Rk", + "last_name": "Narayan", + "mobileNumber": "1-926-555-9504", + "phone": "9988776655" + }, + "type": "identify", + "sentAt": "2022-04-22T10:57:58Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Missing required value from \"email\"", + "statTags": { + "destType": "FRESHSALES", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshsales", + "description": "Track call, event is not supported.", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.1.5" + }, + "traits": { + "name": "Shehan Study", + "category": "SampleIdentify", + "email": "test@rudderstack.com", + "plan": "Open source", + "logins": 5, + "createdAt": 1599264000 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.5" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", + "locale": "en-US", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 0.8999999761581421 + }, + "campaign": { + "source": "google", + "medium": "medium", + "term": "keyword", + "content": "some content", + "name": "some campaign", + "test": "other value" + }, + "page": { + "path": "/destinations/amplitude", + "referrer": "", + "search": "", + "title": "", + "url": "https://docs.rudderstack.com/destinations/amplitude", + "category": "destination", + "initial_referrer": "https://docs.rudderstack.com", + "initial_referring_domain": "docs.rudderstack.com" + } + }, + "type": "track", + "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", + "originalTimestamp": "2020-10-20T08:14:28.778Z", + "anonymousId": "my-anonymous-id-new", + "userId": "newUserIdAlias", + "properties": { + "product_name": "Shirt", + "brand": "Wrogn" + }, + "event": "Add to Cart", + "previousId": "sampleusrRudder3", + "sentAt": "2020-10-20T08:14:28.778Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "event name Add to Cart is not supported. Aborting!", + "statTags": { + "destType": "FRESHSALES", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshsales", + "description": "Track call: some required properties is missing for sales_activity", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.1.5" + }, + "traits": { + "name": "Shehan Study", + "category": "SampleIdentify", + "email": "test@rudderstack.com", + "plan": "Open source", + "logins": 5, + "createdAt": 1599264000 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.5" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", + "locale": "en-US", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 0.8999999761581421 + }, + "campaign": { + "source": "google", + "medium": "medium", + "term": "keyword", + "content": "some content", + "name": "some campaign", + "test": "other value" + }, + "page": { + "path": "/destinations/amplitude", + "referrer": "", + "search": "", + "title": "", + "url": "https://docs.rudderstack.com/destinations/amplitude", + "category": "destination", + "initial_referrer": "https://docs.rudderstack.com", + "initial_referring_domain": "docs.rudderstack.com" + } + }, + "type": "track", + "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", + "originalTimestamp": "2020-10-20T08:14:28.778Z", + "anonymousId": "my-anonymous-id-new", + "userId": "newUserIdAlias", + "email": "test@rudderstack.com", + "properties": { + "product_name": "Shirt", + "brand": "Wrogn" + }, + "event": "sales_activity", + "previousId": "sampleusrRudder3", + "sentAt": "2020-10-20T08:14:28.778Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Missing required value from \"properties.title\"", + "statTags": { + "destType": "FRESHSALES", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshsales", + "description": "Track call: for salesActivityName", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.1.5" + }, + "traits": { + "name": "Shehan Study", + "category": "SampleIdentify", + "email": "test@rudderstack.com", + "plan": "Open source", + "logins": 5, + "createdAt": 1599264000 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.5" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", + "locale": "en-US", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 0.8999999761581421 + }, + "campaign": { + "source": "google", + "medium": "medium", + "term": "keyword", + "content": "some content", + "name": "some campaign", + "test": "other value" + }, + "page": { + "path": "/destinations/amplitude", + "referrer": "", + "search": "", + "title": "", + "url": "https://docs.rudderstack.com/destinations/amplitude", + "category": "destination", + "initial_referrer": "https://docs.rudderstack.com", + "initial_referring_domain": "docs.rudderstack.com" + }, + "externalId": { + "type": "Contact" + } + }, + "type": "track", + "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", + "originalTimestamp": "2020-10-20T08:14:28.778Z", + "anonymousId": "my-anonymous-id-new", + "userId": "newUserIdAlias", + "email": "test@rudderstack.com", + "properties": { + "product_name": "Shirt", + "brand": "Wrogn", + "salesActivityName": "own-calender", + "title": "new Contact", + "startDate": "2021-05-04T17:00:00+05:30", + "endDate": "2022-06-04T17:30:00+05:30", + "ownerId": "70054866612" + }, + "event": "test", + "previousId": "sampleusrRudder3", + "sentAt": "2020-10-20T08:14:28.778Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com", + "rudderEventsToFreshsalesEvents": [ + { + "from": "test", + "to": "sales_activity" + } + ] + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "FORM": {}, + "JSON": { + "sales_activity": { + "title": "new Contact", + "created_at": "2020-10-20T08:14:28.778Z", + "end_date": "2022-06-04T17:30:00+05:30", + "owner_id": "70054866612", + "start_date": "2021-05-04T17:00:00+05:30", + "updated_at": "2020-10-20T08:14:28.778Z", + "targetable_id": 70054866612, + "targetable_type": "Contact", + "sales_activity_name": "own-calender", + "sales_activity_type_id": 70000666879 + } + }, + "JSON_ARRAY": {} + }, + "type": "REST", + "userId": "", + "files": {}, + "method": "POST", + "params": {}, + "headers": { + "Content-Type": "application/json", + "Authorization": "Token token=dummyApiKey" + }, + "version": "1", + "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/sales_activities" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "freshsales", + "description": "Track call: lifecycle_stage_id", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.1.5" + }, + "traits": { + "name": "Shehan Study", + "category": "SampleIdentify", + "plan": "Open source", + "logins": 5, + "createdAt": 1599264000 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.5" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", + "locale": "en-US", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 0.8999999761581421 + }, + "campaign": { + "source": "google", + "medium": "medium", + "term": "keyword", + "content": "some content", + "name": "some campaign", + "test": "other value" + }, + "page": { + "path": "/destinations/amplitude", + "referrer": "", + "search": "", + "title": "", + "url": "https://docs.rudderstack.com/destinations/amplitude", + "category": "destination", + "initial_referrer": "https://docs.rudderstack.com", + "initial_referring_domain": "docs.rudderstack.com" + } + }, + "type": "track", + "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", + "originalTimestamp": "2020-10-20T08:14:28.778Z", + "anonymousId": "my-anonymous-id-new", + "userId": "newUserIdAlias", + "properties": { + "email": "jamessampleton3@gmail.com", + "lifecycleStageId": "71012139273", + "title": "new Contact", + "startDate": "2021-05-04T17:00:00+05:30", + "endDate": "2022-06-04T17:30:00+05:30", + "ownerId": "70054866612", + "targetableType": "Contact" + }, + "event": "lifecycle_stage", + "previousId": "sampleusrRudder3", + "sentAt": "2020-10-20T08:14:28.778Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/contacts/upsert", + "headers": { + "Authorization": "Token token=dummyApiKey", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "contact": { + "lifecycle_stage_id": "71012139273" + }, + "unique_identifier": { + "emails": "jamessampleton3@gmail.com" + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "freshsales", + "description": "Track call: In lifecycle stage, email is missing", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.1.5" + }, + "traits": { + "name": "Shehan Study", + "category": "SampleIdentify", + "plan": "Open source", + "logins": 5, + "createdAt": 1599264000 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.5" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", + "locale": "en-US", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 0.8999999761581421 + }, + "campaign": { + "source": "google", + "medium": "medium", + "term": "keyword", + "content": "some content", + "name": "some campaign", + "test": "other value" + }, + "page": { + "path": "/destinations/amplitude", + "referrer": "", + "search": "", + "title": "", + "url": "https://docs.rudderstack.com/destinations/amplitude", + "category": "destination", + "initial_referrer": "https://docs.rudderstack.com", + "initial_referring_domain": "docs.rudderstack.com" + } + }, + "type": "track", + "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", + "originalTimestamp": "2020-10-20T08:14:28.778Z", + "anonymousId": "my-anonymous-id-new", + "userId": "newUserIdAlias", + "properties": { + "lifecycleStageId": "71012139273", + "title": "new Contact", + "startDate": "2021-05-04T17:00:00+05:30", + "endDate": "2022-06-04T17:30:00+05:30", + "ownerId": "70054866612", + "targetableType": "Contact" + }, + "event": "lifecycle_stage", + "previousId": "sampleusrRudder3", + "sentAt": "2020-10-20T08:14:28.778Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "email is required for updating life Cycle Stages. Aborting!", + "statTags": { + "destType": "FRESHSALES", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshsales", + "description": "Track call: Either of lifecycleStageName or lifecycleStageId is required", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.1.5" + }, + "traits": { + "name": "Shehan Study", + "category": "SampleIdentify", + "email": "test@rudderstack.com", + "plan": "Open source", + "logins": 5, + "createdAt": 1599264000 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.5" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", + "locale": "en-US", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 0.8999999761581421 + }, + "campaign": { + "source": "google", + "medium": "medium", + "term": "keyword", + "content": "some content", + "name": "some campaign", + "test": "other value" + }, + "page": { + "path": "/destinations/amplitude", + "referrer": "", + "search": "", + "title": "", + "url": "https://docs.rudderstack.com/destinations/amplitude", + "category": "destination", + "initial_referrer": "https://docs.rudderstack.com", + "initial_referring_domain": "docs.rudderstack.com" + } + }, + "type": "track", + "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", + "originalTimestamp": "2020-10-20T08:14:28.778Z", + "anonymousId": "my-anonymous-id-new", + "userId": "newUserIdAlias", + "email": "jamessampleton3@gmail.com", + "properties": { + "title": "new Contact", + "startDate": "2021-05-04T17:00:00+05:30", + "endDate": "2022-06-04T17:30:00+05:30", + "ownerId": "70054866612", + "targetableType": "Contact" + }, + "event": "lifecycle_stage", + "previousId": "sampleusrRudder3", + "sentAt": "2020-10-20T08:14:28.778Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Either of lifecycleStageName or lifecycleStageId is required. Aborting!", + "statTags": { + "destType": "FRESHSALES", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshsales", + "description": "Track call: Either of sales activity name or sales activity type id is required", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.1.5" + }, + "traits": { + "name": "Shehan Study", + "category": "SampleIdentify", + "email": "test@rudderstack.com", + "plan": "Open source", + "logins": 5, + "createdAt": 1599264000 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.5" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", + "locale": "en-US", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 0.8999999761581421 + }, + "campaign": { + "source": "google", + "medium": "medium", + "term": "keyword", + "content": "some content", + "name": "some campaign", + "test": "other value" + }, + "page": { + "path": "/destinations/amplitude", + "referrer": "", + "search": "", + "title": "", + "url": "https://docs.rudderstack.com/destinations/amplitude", + "category": "destination", + "initial_referrer": "https://docs.rudderstack.com", + "initial_referring_domain": "docs.rudderstack.com" + }, + "externalId": { + "type": "Contact" + } + }, + "type": "track", + "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", + "originalTimestamp": "2020-10-20T08:14:28.778Z", + "anonymousId": "my-anonymous-id-new", + "userId": "newUserIdAlias", + "email": "test@rudderstack.com", + "properties": { + "product_name": "Shirt", + "brand": "Wrogn", + "title": "new Contact", + "startDate": "2021-05-04T17:00:00+05:30", + "endDate": "2022-06-04T17:30:00+05:30", + "ownerId": "70054866612" + }, + "event": "sales_activity", + "previousId": "sampleusrRudder3", + "sentAt": "2020-10-20T08:14:28.778Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Either of sales activity name or sales activity type id is required. Aborting!", + "statTags": { + "destType": "FRESHSALES", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshsales", + "description": "Track call: Either of email or targetable_id is required for creating sales activity.", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.1.5" + }, + "traits": { + "name": "Shehan Study", + "category": "SampleIdentify", + "plan": "Open source", + "logins": 5, + "createdAt": 1599264000 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.5" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", + "locale": "en-US", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 0.8999999761581421 + }, + "campaign": { + "source": "google", + "medium": "medium", + "term": "keyword", + "content": "some content", + "name": "some campaign", + "test": "other value" + }, + "page": { + "path": "/destinations/amplitude", + "referrer": "", + "search": "", + "title": "", + "url": "https://docs.rudderstack.com/destinations/amplitude", + "category": "destination", + "initial_referrer": "https://docs.rudderstack.com", + "initial_referring_domain": "docs.rudderstack.com" + }, + "externalId": { + "type": "Contact" + } + }, + "type": "track", + "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", + "originalTimestamp": "2020-10-20T08:14:28.778Z", + "anonymousId": "my-anonymous-id-new", + "userId": "newUserIdAlias", + "properties": { + "product_name": "Shirt", + "brand": "Wrogn", + "salesActivityName": "own-calender", + "title": "new Contact", + "startDate": "2021-05-04T17:00:00+05:30", + "endDate": "2022-06-04T17:30:00+05:30", + "ownerId": "70054866612" + }, + "event": "sales_activity", + "previousId": "sampleusrRudder3", + "sentAt": "2020-10-20T08:14:28.778Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Either of email or targetable_id is required for creating sales activity. Aborting!", + "statTags": { + "destType": "FRESHSALES", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshsales", + "description": "Track call: sales activity with salesActivityTypeId", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.1.5" + }, + "traits": { + "name": "Shehan Study", + "category": "SampleIdentify", + "email": "test@rudderstack.com", + "plan": "Open source", + "logins": 5, + "createdAt": 1599264000 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.5" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", + "locale": "en-US", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 0.8999999761581421 + }, + "campaign": { + "source": "google", + "medium": "medium", + "term": "keyword", + "content": "some content", + "name": "some campaign", + "test": "other value" + }, + "page": { + "path": "/destinations/amplitude", + "referrer": "", + "search": "", + "title": "", + "url": "https://docs.rudderstack.com/destinations/amplitude", + "category": "destination", + "initial_referrer": "https://docs.rudderstack.com", + "initial_referring_domain": "docs.rudderstack.com" + }, + "externalId": { + "type": "Contact" + } + }, + "type": "track", + "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", + "originalTimestamp": "2020-10-20T08:14:28.778Z", + "anonymousId": "my-anonymous-id-new", + "userId": "newUserIdAlias", + "email": "jamessampleton3@gmail.com", + "properties": { + "salesActivityTypeId": "70000663932", + "title": "new Contact", + "startDate": "2021-05-04T17:00:00+05:30", + "endDate": "2022-06-04T17:30:00+05:30", + "ownerId": "70054866612" + }, + "event": "sales_activity", + "previousId": "sampleusrRudder3", + "sentAt": "2020-10-20T08:14:28.778Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "FORM": {}, + "JSON": { + "sales_activity": { + "title": "new Contact", + "created_at": "2020-10-20T08:14:28.778Z", + "end_date": "2022-06-04T17:30:00+05:30", + "owner_id": "70054866612", + "start_date": "2021-05-04T17:00:00+05:30", + "updated_at": "2020-10-20T08:14:28.778Z", + "targetable_id": 70054866612, + "targetable_type": "Contact", + "sales_activity_type_id": "70000663932" + } + }, + "JSON_ARRAY": {} + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": {}, + "headers": { + "Content-Type": "application/json", + "Authorization": "Token token=dummyApiKey" + }, + "version": "1", + "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/sales_activities", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "freshsales", + "description": "Track call: updated sales activity with salesActivityTypeId and targetableId", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.1.5" + }, + "traits": { + "name": "Shehan Study", + "category": "SampleIdentify", + "email": "test@rudderstack.com", + "plan": "Open source", + "logins": 5, + "createdAt": 1599264000 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.5" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", + "locale": "en-US", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 0.8999999761581421 + }, + "campaign": { + "source": "google", + "medium": "medium", + "term": "keyword", + "content": "some content", + "name": "some campaign", + "test": "other value" + }, + "page": { + "path": "/destinations/amplitude", + "referrer": "", + "search": "", + "title": "", + "url": "https://docs.rudderstack.com/destinations/amplitude", + "category": "destination", + "initial_referrer": "https://docs.rudderstack.com", + "initial_referring_domain": "docs.rudderstack.com" + }, + "externalId": { + "id": "70052305908", + "type": "Contact" + } + }, + "type": "track", + "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", + "originalTimestamp": "2020-10-20T08:14:28.778Z", + "anonymousId": "my-anonymous-id-new", + "userId": "newUserIdAlias", + "properties": { + "salesActivityTypeId": "70000663932", + "title": "new Contact", + "startDate": "2021-05-04T17:00:00+05:30", + "endDate": "2022-06-04T17:30:00+05:30", + "ownerId": "70054866612" + }, + "event": "sales_activity", + "previousId": "sampleusrRudder3", + "sentAt": "2020-10-20T08:14:28.778Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "FORM": {}, + "JSON": { + "sales_activity": { + "title": "new Contact", + "created_at": "2020-10-20T08:14:28.778Z", + "end_date": "2022-06-04T17:30:00+05:30", + "owner_id": "70054866612", + "start_date": "2021-05-04T17:00:00+05:30", + "updated_at": "2020-10-20T08:14:28.778Z", + "targetable_id": "70052305908", + "targetable_type": "Contact", + "sales_activity_type_id": "70000663932" + } + }, + "JSON_ARRAY": {} + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": {}, + "headers": { + "Content-Type": "application/json", + "Authorization": "Token token=dummyApiKey" + }, + "version": "1", + "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/sales_activities", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "freshsales", + "description": "Unsupported message Type", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "type": "page", + "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", + "originalTimestamp": "2020-10-20T08:14:28.778Z", + "anonymousId": "my-anonymous-id-new", + "userId": "newUserIdAlias", + "email": "jamessampleton3@gmail.com", + "properties": { + "lifecycleStageId": "71012139273", + "title": "new Contact", + "startDate": "2021-05-04T17:00:00+05:30", + "endDate": "2022-06-04T17:30:00+05:30", + "ownerId": "70054866612", + "targetableType": "Contact" + }, + "event": "lifecycle_stage", + "previousId": "sampleusrRudder3", + "sentAt": "2020-10-20T08:14:28.778Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "message type page not supported", + "statTags": { + "destType": "FRESHSALES", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshsales", + "description": "Track call: with wrong sales activity name", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.1.5" + }, + "traits": { + "name": "Shehan Study", + "category": "SampleIdentify", + "email": "test@rudderstack.com", + "plan": "Open source", + "logins": 5, + "createdAt": 1599264000 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.5" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", + "locale": "en-US", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 0.8999999761581421 + }, + "campaign": { + "source": "google", + "medium": "medium", + "term": "keyword", + "content": "some content", + "name": "some campaign", + "test": "other value" + }, + "page": { + "path": "/destinations/amplitude", + "referrer": "", + "search": "", + "title": "", + "url": "https://docs.rudderstack.com/destinations/amplitude", + "category": "destination", + "initial_referrer": "https://docs.rudderstack.com", + "initial_referring_domain": "docs.rudderstack.com" + }, + "externalId": { + "type": "Contact" + } + }, + "type": "track", + "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", + "originalTimestamp": "2020-10-20T08:14:28.778Z", + "anonymousId": "my-anonymous-id-new", + "userId": "newUserIdAlias", + "email": "test@rudderstack.com", + "properties": { + "product_name": "Shirt", + "brand": "Wrogn", + "salesActivityName": "own-list", + "title": "new Contact", + "startDate": "2021-05-04T17:00:00+05:30", + "endDate": "2022-06-04T17:30:00+05:30", + "ownerId": "70054866612" + }, + "event": "sales_activity", + "previousId": "sampleusrRudder3", + "sentAt": "2020-10-20T08:14:28.778Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "sales Activity own-list doesn't exists. Aborting!", + "statTags": { + "destType": "FRESHSALES", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "freshsales", + "description": "Track call: update contacts with sales Activity name", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.1.5" + }, + "traits": { + "name": "Shehan Study", + "category": "SampleIdentify", + "plan": "Open source", + "logins": 5, + "createdAt": 1599264000 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.5" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", + "locale": "en-US", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 0.8999999761581421 + }, + "campaign": { + "source": "google", + "medium": "medium", + "term": "keyword", + "content": "some content", + "name": "some campaign", + "test": "other value" + }, + "page": { + "path": "/destinations/amplitude", + "referrer": "", + "search": "", + "title": "", + "url": "https://docs.rudderstack.com/destinations/amplitude", + "category": "destination", + "initial_referrer": "https://docs.rudderstack.com", + "initial_referring_domain": "docs.rudderstack.com" + } + }, + "type": "track", + "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", + "originalTimestamp": "2020-10-20T08:14:28.778Z", + "anonymousId": "my-anonymous-id-new", + "userId": "newUserIdAlias", + "properties": { + "email": "jamessampleton6@gmail.com", + "lifecycleStageName": "final Customer", + "title": "new Contact", + "startDate": "2021-05-04T17:00:00+05:30", + "endDate": "2022-06-04T17:30:00+05:30", + "ownerId": "70054866612", + "targetableType": "Contact" + }, + "event": "lifecycle_stage", + "previousId": "sampleusrRudder3", + "sentAt": "2020-10-20T08:14:28.778Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "FORM": {}, + "JSON": { + "contact": { + "lifecycle_stage_id": 71012806409 + }, + "unique_identifier": { + "emails": "jamessampleton6@gmail.com" + } + }, + "JSON_ARRAY": {} + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": {}, + "headers": { + "Content-Type": "application/json", + "Authorization": "Token token=dummyApiKey" + }, + "version": "1", + "endpoint": "https://domain-rudder.myfreshworks.com/crm/sales/api/contacts/upsert", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "freshsales", + "description": "Track call: with wrong lifecycleStageName", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.1.5" + }, + "traits": { + "name": "Shehan Study", + "category": "SampleIdentify", + "plan": "Open source", + "logins": 5, + "createdAt": 1599264000 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.5" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36", + "locale": "en-US", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 0.8999999761581421 + }, + "campaign": { + "source": "google", + "medium": "medium", + "term": "keyword", + "content": "some content", + "name": "some campaign", + "test": "other value" + }, + "page": { + "path": "/destinations/amplitude", + "referrer": "", + "search": "", + "title": "", + "url": "https://docs.rudderstack.com/destinations/amplitude", + "category": "destination", + "initial_referrer": "https://docs.rudderstack.com", + "initial_referring_domain": "docs.rudderstack.com" + } + }, + "type": "track", + "messageId": "dd46338d-5f83-493b-bd28-3b48f55d0be8", + "originalTimestamp": "2020-10-20T08:14:28.778Z", + "anonymousId": "my-anonymous-id-new", + "userId": "newUserIdAlias", + "properties": { + "email": "jamessampleton6@gmail.com", + "lifecycleStageName": "final ExCustomer", + "title": "new Contact", + "startDate": "2021-05-04T17:00:00+05:30", + "endDate": "2022-06-04T17:30:00+05:30", + "ownerId": "70054866612", + "targetableType": "Contact" + }, + "event": "lifecycle_stage", + "previousId": "sampleusrRudder3", + "sentAt": "2020-10-20T08:14:28.778Z" + }, + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "domain": "domain-rudder.myfreshworks.com" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "failed to fetch lifeCycleStages with final ExCustomer", + "statTags": { + "destType": "FRESHSALES", + "errorCategory": "network", + "errorType": "aborted", + "feature": "processor", + "implementation": "native", + "meta": "instrumentation", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + } +] \ No newline at end of file diff --git a/test/integrations/destinations/freshsales/router/data.ts b/test/integrations/destinations/freshsales/router/data.ts new file mode 100644 index 0000000000..12cbacf576 --- /dev/null +++ b/test/integrations/destinations/freshsales/router/data.ts @@ -0,0 +1,185 @@ +export const data = [ + { + name: 'freshsales', + description: 'Test 0', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + "message": { + "context": { + "device": { + "name": "Mi", + "token": "dummyDeviceToken" + }, + "os": { + "name": "android" + }, + "traits": { + "address": { + "city": "city", + "country": "country", + "postalCode": "postalCode", + "state": "state", + "street": "street" + }, + "email": "user112@mail.com", + "firstName": "sample1", + "lastName": "user1" + } + }, + "messageId": "8184ebd7-3a19-45a3-a340-d6f449c63d27", + "originalTimestamp": "2022-08-30T11:28:48.429+05:30", + "receivedAt": "2022-08-30T11:28:43.648+05:30", + "request_ip": "[::1]", + "rudderId": "ed33ef22-569d-44b1-a6cb-063c69dca8f0", + "sentAt": "2022-08-30T11:28:48.429+05:30", + "timestamp": "2022-08-30T11:28:43.647+05:30", + "type": "identify", + "userId": "user113" + }, + "destination": { + "ID": "2E3xCNR3sae33y3AkGzuQ3ym05v", + "Name": "test", + "DestinationDefinition": { + "ID": "2E3x3AwySRvh6vXgYslvYApyFPb", + "Name": "FRESHSALES", + "DisplayName": "Freshsales", + "Config": { + "destConfig": { + "defaultConfig": ["apiKey", "domain"] + }, + "excludeKeys": [], + "includeKeys": ["apiKey", "domain"], + "saveDestinationResponse": true, + "supportedMessageTypes": ["identify", "group"], + "supportedSourceTypes": [ + "amp", + "android", + "cordova", + "cloud", + "flutter", + "ios", + "reactnative", + "unity", + "warehouse", + "web" + ], + "transformAt": "processor", + "transformAtV1": "processor" + }, + "ResponseRules": {} + }, + "Config": { + "apiKey": "hrkjfergeferf", + "domain": "rudderstack-479541159204968909.myfreshworks.com" + }, + "Enabled": true, + "Transformations": [], + "IsProcessorEnabled": true, + "RevisionID": "2E3xCLWeb83vOGDh0mkN4Auei3i" + }, + "metadata": {} + } + ], + destType: 'freshsales', + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + "batchedRequest": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://rudderstack-479541159204968909.myfreshworks.com/crm/sales/api/contacts/upsert", + "headers": { + "Authorization": "Token token=hrkjfergeferf", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "contact": { + "emails": "user112@mail.com", + "first_name": "sample1", + "last_name": "user1", + "external_id": "user113", + "address": "street city state country postalCode", + "city": "city", + "state": "state", + "country": "country", + "zipcode": "postalCode", + "created_at": "2022-08-30T11:28:43.647+05:30", + "updated_at": "2022-08-30T11:28:43.647+05:30" + }, + "unique_identifier": { + "emails": "user112@mail.com" + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {} + }, + "metadata": [{}], + "batched": false, + "statusCode": 200, + "destination": { + "ID": "2E3xCNR3sae33y3AkGzuQ3ym05v", + "Name": "test", + "DestinationDefinition": { + "ID": "2E3x3AwySRvh6vXgYslvYApyFPb", + "Name": "FRESHSALES", + "DisplayName": "Freshsales", + "Config": { + "destConfig": { + "defaultConfig": ["apiKey", "domain"] + }, + "excludeKeys": [], + "includeKeys": ["apiKey", "domain"], + "saveDestinationResponse": true, + "supportedMessageTypes": ["identify", "group"], + "supportedSourceTypes": [ + "amp", + "android", + "cordova", + "cloud", + "flutter", + "ios", + "reactnative", + "unity", + "warehouse", + "web" + ], + "transformAt": "processor", + "transformAtV1": "processor" + }, + "ResponseRules": {} + }, + "Config": { + "apiKey": "hrkjfergeferf", + "domain": "rudderstack-479541159204968909.myfreshworks.com" + }, + "Enabled": true, + "Transformations": [], + "IsProcessorEnabled": true, + "RevisionID": "2E3xCLWeb83vOGDh0mkN4Auei3i" + } + } + ], + }, + }, + }, + }, +]; diff --git a/test/integrations/destinations/ga4/mocks.ts b/test/integrations/destinations/ga4/mocks.ts new file mode 100644 index 0000000000..7b47fe9f44 --- /dev/null +++ b/test/integrations/destinations/ga4/mocks.ts @@ -0,0 +1,3 @@ +export const defaultMockFns = () => { + jest.spyOn(Date, 'now').mockImplementation(() => new Date('2022-04-29T05:17:09Z').valueOf()); +}; diff --git a/test/integrations/destinations/ga4/processor/data.ts b/test/integrations/destinations/ga4/processor/data.ts new file mode 100644 index 0000000000..f96ca9e74a --- /dev/null +++ b/test/integrations/destinations/ga4/processor/data.ts @@ -0,0 +1,14903 @@ +import { defaultMockFns } from '../mocks'; +export const data = [ + { + name: 'ga4', + description: "(gtag) check all property mappings for 'Products Searched' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99v4f979fb997ce453373900f891', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'Products Searched', + properties: { + query: 't-shirts', + }, + integrations: { + All: true, + }, + sentAt: '2022-04-22T10:57:58Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + timestamp_micros: 1650950229000000, + events: [ + { + name: 'search', + params: { + search_term: 't-shirts', + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) check all property mappings for 'product list viewed' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + rudderId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99v4f979fb997ce453373900f891', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'product list viewed', + properties: { + list_id: 'related_products', + category: 'Related_products', + products: [ + { + product_id: '507f1f77bcf86cd799439011', + name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + category: 'Apparel', + brand: 'Google', + variant: 'green', + price: '19', + quantity: '2', + position: '1', + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'view_item_list', + params: { + item_list_id: 'related_products', + item_list_name: 'Related_products', + items: [ + { + item_id: '507f1f77bcf86cd799439011', + item_name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + item_category: 'Apparel', + item_brand: 'Google', + item_variant: 'green', + price: 19, + quantity: 2, + index: 1, + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) check all property mappings for 'promotion viewed' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'promotion viewed', + properties: { + creative_name: 'Summer Banner', + creative_slot: 'featured_app_1', + location_id: 'L_12345', + promotion_id: 'P_12345', + promotion_name: 'Summer Sale', + products: [ + { + product_id: '507f1f77bcf86cd799439011', + name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + category: 'Apparel', + brand: 'Google', + variant: 'green', + price: '19', + quantity: '2', + position: '0', + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + promotion_id: 'P_12345', + promotion_name: 'Summer Sale', + creative_name: 'summer_banner2', + creative_slot: 'featured_app_1', + }, + ], + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + client_id: 'client_id', + events: [ + { + name: 'view_promotion', + params: { + creative_name: 'Summer Banner', + creative_slot: 'featured_app_1', + location_id: 'L_12345', + promotion_id: 'P_12345', + promotion_name: 'Summer Sale', + engagement_time_msec: 1, + items: [ + { + item_id: '507f1f77bcf86cd799439011', + item_name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + item_category: 'Apparel', + item_brand: 'Google', + item_variant: 'green', + price: 19, + quantity: 2, + index: 0, + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + promotion_id: 'P_12345', + promotion_name: 'Summer Sale', + creative_name: 'summer_banner2', + creative_slot: 'featured_app_1', + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) check all property mappings for 'promotion clicked' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'promotion clicked', + properties: { + creative_name: 'Summer Banner', + creative_slot: 'featured_app_1', + location_id: 'L_12345', + promotion_id: 'P_12345', + promotion_name: 'Summer Sale', + products: [ + { + product_id: '507f1f77bcf86cd799439011', + name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + category: 'Apparel', + brand: 'Google', + variant: 'green', + price: '19', + quantity: '2', + position: '0', + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + promotion_id: 'P_12345', + promotion_name: 'Summer Sale', + creative_name: 'summer_banner2', + creative_slot: 'featured_app_1', + }, + ], + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'select_promotion', + params: { + creative_name: 'Summer Banner', + creative_slot: 'featured_app_1', + location_id: 'L_12345', + promotion_id: 'P_12345', + promotion_name: 'Summer Sale', + engagement_time_msec: 1, + items: [ + { + item_id: '507f1f77bcf86cd799439011', + item_name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + item_category: 'Apparel', + item_brand: 'Google', + item_variant: 'green', + price: 19, + quantity: 2, + index: 0, + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + promotion_id: 'P_12345', + promotion_name: 'Summer Sale', + creative_name: 'summer_banner2', + creative_slot: 'featured_app_1', + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) exclude only 'products' property from 'promotion clicked' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'promotion clicked', + properties: { + creative_name: 'Summer Banner', + creative_slot: 'featured_app_1', + location_id: 'L_12345', + promotion_id: 'P_12345', + promotion_name: 'Summer Sale', + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'select_promotion', + params: { + creative_name: 'Summer Banner', + creative_slot: 'featured_app_1', + location_id: 'L_12345', + promotion_id: 'P_12345', + promotion_name: 'Summer Sale', + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) check all property mappings for 'product clicked' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'product clicked', + properties: { + list_id: 'related_products', + category: 'Related_products', + product_id: '507f1f77bcf86cd799439011', + name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + brand: 'Google', + variant: 'green', + price: '19', + quantity: '2', + position: '1', + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + timezone: { + name: 'Europe/Tallinn', + }, + engagementTimeMsec: 100, + sessionId: 655, + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'select_item', + params: { + item_list_id: 'related_products', + item_list_name: 'Related_products', + items: [ + { + item_id: '507f1f77bcf86cd799439011', + item_name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + item_category: 'Related_products', + item_brand: 'Google', + item_variant: 'green', + price: 19, + quantity: 2, + index: 1, + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + timezone_name: 'Europe/Tallinn', + engagement_time_msec: 100, + session_id: 655, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) check all property mappings for 'product viewed' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'product viewed', + properties: { + currency: 'USD', + total: '7.77', + product_id: '507f1f77bcf86cd799439011', + name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + category: 'Apparel', + brand: 'Google', + variant: 'green', + price: '19', + quantity: '2', + position: '1', + affiliation: 'Google Merchandise Store', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'view_item', + params: { + currency: 'USD', + value: 7.77, + engagement_time_msec: 1, + items: [ + { + item_id: '507f1f77bcf86cd799439011', + item_name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + item_category: 'Apparel', + item_brand: 'Google', + item_variant: 'green', + price: 19, + quantity: 2, + index: 1, + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) check all property mappings for 'promotion clicked' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'promotion clicked', + properties: { + creative_name: 'Summer Banner', + creative_slot: 'featured_app_1', + location_id: 'L_12345', + promotion_id: 'P_12345', + promotion_name: 'Summer Sale', + products: [ + { + product_id: '507f1f77bcf86cd799439011', + name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + category: 'Apparel', + brand: 'Google', + variant: 'green', + price: '19', + quantity: '2', + position: '0', + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + promotion_id: 'P_12345', + promotion_name: 'Summer Sale', + creative_name: 'summer_banner2', + creative_slot: 'featured_app_1', + }, + ], + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + typesOfClient: 'gtag', + firebaseAppId: '1:17864591371:android:7a9520d3c78962e21f9fee', + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + client_id: 'client_id', + events: [ + { + name: 'select_promotion', + params: { + creative_name: 'Summer Banner', + creative_slot: 'featured_app_1', + location_id: 'L_12345', + promotion_id: 'P_12345', + promotion_name: 'Summer Sale', + engagement_time_msec: 1, + items: [ + { + item_id: '507f1f77bcf86cd799439011', + item_name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + item_category: 'Apparel', + item_brand: 'Google', + item_variant: 'green', + price: 19, + quantity: 2, + index: 0, + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + promotion_id: 'P_12345', + promotion_name: 'Summer Sale', + creative_name: 'summer_banner2', + creative_slot: 'featured_app_1', + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(firebase) check all property mappings for 'promotion clicked' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'promotion clicked', + properties: { + creative_name: 'Summer Banner', + creative_slot: 'featured_app_1', + location_id: 'L_12345', + promotion_id: 'P_12345', + promotion_name: 'Summer Sale', + products: [ + { + product_id: '507f1f77bcf86cd799439011', + name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + category: 'Apparel', + brand: 'Google', + variant: 'green', + price: '19', + quantity: '2', + position: '0', + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + promotion_id: 'P_12345', + promotion_name: 'Summer Sale', + creative_name: 'summer_banner2', + creative_slot: 'featured_app_1', + }, + ], + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + typesOfClient: 'firebase', + firebaseAppId: '1:17864591371:android:7a9520d3c78962e21f9fee', + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + firebase_app_id: '1:17864591371:android:7a9520d3c78962e21f9fee', + }, + body: { + JSON: { + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + app_instance_id: 'f0dd99b6f979fb551ce583373900f937', + events: [ + { + name: 'select_promotion', + params: { + creative_name: 'Summer Banner', + creative_slot: 'featured_app_1', + location_id: 'L_12345', + promotion_id: 'P_12345', + promotion_name: 'Summer Sale', + engagement_time_msec: 1, + items: [ + { + item_id: '507f1f77bcf86cd799439011', + item_name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + item_category: 'Apparel', + item_brand: 'Google', + item_variant: 'green', + price: 19, + quantity: 2, + index: 0, + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + promotion_id: 'P_12345', + promotion_name: 'Summer Sale', + creative_name: 'summer_banner2', + creative_slot: 'featured_app_1', + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) check all property mappings for 'product added' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'product added', + properties: { + currency: 'USD', + total: '7.77', + products: [ + { + product_id: '507f1f77bcf86cd799439011', + name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + category: 'Apparel', + brand: 'Google', + variant: 'green', + price: '19', + quantity: '2', + position: '1', + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'add_to_cart', + params: { + currency: 'USD', + value: 7.77, + engagement_time_msec: 1, + items: [ + { + item_id: '507f1f77bcf86cd799439011', + item_name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + item_category: 'Apparel', + item_brand: 'Google', + item_variant: 'green', + price: 19, + quantity: 2, + index: 1, + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) check all property mappings for 'product removed' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'product removed', + properties: { + currency: 'USD', + total: '7.77', + products: [ + { + product_id: '507f1f77bcf86cd799439011', + name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + category: 'Apparel', + brand: 'Google', + variant: 'green', + price: '19', + quantity: '2', + position: '1', + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + engagementTimeMsec: 100, + sessionId: 655, + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'remove_from_cart', + params: { + currency: 'USD', + value: 7.77, + items: [ + { + item_id: '507f1f77bcf86cd799439011', + item_name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + item_category: 'Apparel', + item_brand: 'Google', + item_variant: 'green', + price: 19, + quantity: 2, + index: 1, + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + engagement_time_msec: 100, + session_id: 655, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) check all property mappings for 'cart viewed' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'cart viewed', + properties: { + currency: 'USD', + total: '7.77', + products: [ + { + product_id: '507f1f77bcf86cd799439011', + name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + category: 'Apparel', + brand: 'Google', + variant: 'green', + price: '19', + quantity: '2', + position: '1', + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'view_cart', + params: { + currency: 'USD', + value: 7.77, + engagement_time_msec: 1, + items: [ + { + item_id: '507f1f77bcf86cd799439011', + item_name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + item_category: 'Apparel', + item_brand: 'Google', + item_variant: 'green', + price: 19, + quantity: 2, + index: 1, + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) check all property mappings for 'checkout started' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'checkout started', + properties: { + currency: 'USD', + total: 7.77, + coupon: 'SUMMER_FUN', + products: [ + { + product_id: '507f1f77bcf86cd799439011', + name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + category: 'Apparel', + brand: 'Google', + variant: 'green', + price: '19', + quantity: '2', + position: '1', + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'begin_checkout', + params: { + currency: 'USD', + value: 7.77, + coupon: 'SUMMER_FUN', + engagement_time_msec: 1, + items: [ + { + item_id: '507f1f77bcf86cd799439011', + item_name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + item_category: 'Apparel', + item_brand: 'Google', + item_variant: 'green', + price: 19, + quantity: 2, + index: 1, + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: + "(gtag) check all property mappings for 'payment info entered' -> 'add_payment_info' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'payment info entered', + properties: { + currency: 'USD', + value: '7.77', + coupon: 'SUMMER_FUN', + payment_method: 'Credit Card', + products: [ + { + product_id: '507f1f77bcf86cd799439011', + name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + category: 'Apparel', + brand: 'Google', + variant: 'green', + price: '19', + quantity: '2', + position: '1', + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + params: { + currency: 'USD', + value: 7.77, + coupon: 'SUMMER_FUN', + payment_type: 'Credit Card', + engagement_time_msec: 1, + items: [ + { + item_id: '507f1f77bcf86cd799439011', + item_name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + item_category: 'Apparel', + item_brand: 'Google', + item_variant: 'green', + price: 19, + quantity: 2, + index: 1, + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + name: 'add_payment_info', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: + "(gtag) check all property mappings for 'checkout Step Completed' -> 'add_shipping_info' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'checkout Step Completed', + properties: { + currency: 'USD', + value: '7.77', + coupon: 'SUMMER_FUN', + shipping_method: 'Ground', + products: [ + { + product_id: '507f1f77bcf86cd799439011', + name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + category: 'Apparel', + brand: 'Google', + variant: 'green', + price: '19', + quantity: '2', + position: '1', + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + params: { + currency: 'USD', + value: 7.77, + coupon: 'SUMMER_FUN', + shipping_tier: 'Ground', + engagement_time_msec: 1, + items: [ + { + item_id: '507f1f77bcf86cd799439011', + item_name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + item_category: 'Apparel', + item_brand: 'Google', + item_variant: 'green', + price: 19, + quantity: 2, + index: 1, + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + name: 'add_shipping_info', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) check all property mappings for 'order completed' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'order completed', + properties: { + currency: 'USD', + order_id: 'T_12345', + total: 12.21, + affiliation: 'Google Store', + coupon: 'SUMMER_FUN', + shipping: 3.33, + tax: 1.11, + products: [ + { + product_id: '507f1f77bcf86cd799439011', + name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + category: 'Apparel', + brand: 'Google', + variant: 'green', + price: '19', + quantity: '2', + position: '1', + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'purchase', + params: { + currency: 'USD', + transaction_id: 'T_12345', + value: 12.21, + affiliation: 'Google Store', + coupon: 'SUMMER_FUN', + shipping: 3.33, + tax: 1.11, + engagement_time_msec: 1, + items: [ + { + item_id: '507f1f77bcf86cd799439011', + item_name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + item_category: 'Apparel', + item_brand: 'Google', + item_variant: 'green', + price: 19, + quantity: 2, + index: 1, + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) check all property mappings for 'order refunded' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'order refunded', + properties: { + currency: 'USD', + order_id: 'T_12345', + total: 12.21, + affiliation: 'Google Store', + coupon: 'SUMMER_FUN', + shipping: 3.33, + tax: 1.11, + products: [ + { + product_id: '507f1f77bcf86cd799439011', + name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + category: 'Apparel', + brand: 'Google', + variant: 'green', + price: '19', + quantity: '2', + position: '1', + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'refund', + params: { + currency: 'USD', + transaction_id: 'T_12345', + value: 12.21, + affiliation: 'Google Store', + coupon: 'SUMMER_FUN', + shipping: 3.33, + tax: 1.11, + engagement_time_msec: 1, + items: [ + { + item_id: '507f1f77bcf86cd799439011', + item_name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + item_category: 'Apparel', + item_brand: 'Google', + item_variant: 'green', + price: 19, + quantity: 2, + index: 1, + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) exclude only 'products' property from 'order refunded' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'order refunded', + properties: { + currency: 'USD', + order_id: 'T_12345', + total: 12.21, + affiliation: 'Google Store', + coupon: 'SUMMER_FUN', + shipping: 3.33, + tax: 1.11, + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'refund', + params: { + currency: 'USD', + transaction_id: 'T_12345', + value: 12.21, + affiliation: 'Google Store', + coupon: 'SUMMER_FUN', + shipping: 3.33, + tax: 1.11, + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) check all property mappings for 'product added to wishlist' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'product added to wishlist', + properties: { + currency: 'USD', + total: '7.77', + products: [ + { + product_id: '507f1f77bcf86cd799439011', + name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + category: 'Apparel', + brand: 'Google', + variant: 'green', + price: '19', + quantity: '2', + position: '1', + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'add_to_wishlist', + params: { + currency: 'USD', + value: 7.77, + engagement_time_msec: 1, + items: [ + { + item_id: '507f1f77bcf86cd799439011', + item_name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + item_category: 'Apparel', + item_brand: 'Google', + item_variant: 'green', + price: 19, + quantity: 2, + index: 1, + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) check all property mappings for 'product_shared' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'product_shared', + properties: { + share_via: 'Twitter', + content_type: 'image', + item_id: 'C_12345', + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'share', + params: { + method: 'Twitter', + content_type: 'image', + item_id: 'C_12345', + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) send only 'product_shared' event name without it's properties", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'product_shared', + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'share', + params: { + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) check all property mappings for 'cart Shared' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'cart Shared', + properties: { + share_via: 'Twitter', + content_type: 'image', + item_id: 'C_12345', + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'share', + params: { + method: 'Twitter', + content_type: 'image', + item_id: 'C_12345', + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) send only 'cart Shared' event name with empty properties: {}", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'cart Shared', + properties: {}, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'share', + params: { + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: '(gtag) check all property mappings for group call', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'group', + properties: { + group_id: 'G_12345', + engagementTimeMsec: 100, + sessionId: 655, + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'group', + params: { + group_id: 'G_12345', + engagement_time_msec: 100, + session_id: 655, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) group: send only group event name without it's properties", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'group', + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'group', + params: { + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) check all property mappings for 'earn virtual currency' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'earn virtual currency', + properties: { + virtual_currency_name: 'Gems', + value: 5, + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'earn_virtual_currency', + params: { + virtual_currency_name: 'Gems', + value: 5, + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) send only 'earn virtual currency' event name without it's properties", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'earn virtual currency', + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'earn_virtual_currency', + params: { + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) check all property mappings for 'generate_lead' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'generate_lead', + properties: { + currency: 'USD', + value: 99.99, + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'generate_lead', + params: { + currency: 'USD', + value: 99.99, + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) check all property mappings for 'level_up' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'level_up', + properties: { + level: 5, + character: 'Player 1', + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'level_up', + params: { + level: 5, + character: 'Player 1', + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) send only 'level_up' event name without it's properties", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'level_up', + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'level_up', + params: { + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) check all property mappings for 'login' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'login', + properties: { + method: 'Google', + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'login', + params: { + method: 'Google', + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) send only 'login' event name without it's properties", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'login', + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'login', + params: { + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) check all property mappings for 'post_score' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'post_score', + properties: { + score: 10000, + level: 5, + character: 'Player 1', + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'post_score', + params: { + score: 10000, + level: 5, + character: 'Player 1', + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) send only 'login' event name with its required `score` properties", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'post_score', + properties: { + score: 10000, + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'post_score', + params: { + score: 10000, + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) check all property mappings for 'select_content' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'select_content', + properties: { + content_type: 'product', + item_id: 'I_12345', + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'select_content', + params: { + content_type: 'product', + item_id: 'I_12345', + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) send only 'group' event name without it's properties", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'select_content', + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'select_content', + params: { + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) check all property mappings for 'sign_up' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'sign_up', + properties: { + method: 'Google', + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'sign_up', + params: { + method: 'Google', + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) send only 'sign_up' event name without it's properties", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'sign_up', + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'sign_up', + params: { + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) check all property mappings for 'spend_virtual_currency' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'spend_virtual_currency', + properties: { + value: 5, + virtual_currency_name: 'Gems', + item_name: 'Starter Boost', + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'spend_virtual_currency', + params: { + value: 5, + virtual_currency_name: 'Gems', + item_name: 'Starter Boost', + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: + "(gtag) send only 'spend_virtual_currency' event name with it's required 'value' and 'virtual_currency_name' properties", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'spend_virtual_currency', + properties: { + value: 5, + virtual_currency_name: 'Gems', + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'spend_virtual_currency', + params: { + value: 5, + virtual_currency_name: 'Gems', + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) send 'tutorial_begin' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'tutorial_begin', + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'tutorial_begin', + params: { + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) send 'tutorial_complete' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'tutorial_complete', + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'tutorial_complete', + params: { + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) send all properties for 'unlock_achievement' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'unlock_achievement', + properties: { + achievement_id: 'A_12345', + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'unlock_achievement', + params: { + achievement_id: 'A_12345', + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) send all properties for 'view_search_results' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'view_search_results', + properties: { + search_term: 'Clothing', + products: [ + { + product_id: '507f1f77bcf86cd799439011', + name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + category: 'Apparel', + brand: 'Google', + variant: 'green', + price: '19', + quantity: '2', + position: '1', + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'view_search_results', + params: { + search_term: 'Clothing', + engagement_time_msec: 1, + items: [ + { + item_id: '507f1f77bcf86cd799439011', + item_name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + item_category: 'Apparel', + item_brand: 'Google', + item_variant: 'green', + price: 19, + quantity: 2, + index: 1, + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) pass only 'products: [...]' property for 'view_search_results' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'view_search_results', + properties: { + products: [ + { + product_id: '507f1f77bcf86cd799439011', + name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + category: 'Apparel', + brand: 'Google', + variant: 'green', + price: '19', + quantity: '2', + position: '1', + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'view_search_results', + params: { + engagement_time_msec: 1, + items: [ + { + item_id: '507f1f77bcf86cd799439011', + item_name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + item_category: 'Apparel', + item_brand: 'Google', + item_variant: 'green', + price: 19, + quantity: 2, + index: 1, + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: + "(gtag) pass custom event name 'rudderstack event' to GA4 along with custom properties", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'rudderstack event', + properties: { + total: '10', + timezone: { + name: 'Europe/Tallinn', + }, + engagementTimeMsec: 100, + sessionId: 655, + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'rudderstack_event', + params: { + total: '10', + timezone_name: 'Europe/Tallinn', + engagement_time_msec: 100, + session_id: 655, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: + "(gtag) pass custom event name 'rudderstack event' to GA4 along with custom properties and user_properties", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'rudderstack event', + properties: { + total: '10', + user_properties: { + price: '19', + }, + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + user_properties: { + price: { + value: '19', + }, + }, + events: [ + { + name: 'rudderstack_event', + params: { + total: '10', + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: '[Error]: (gtag) pass reserved event name to GA4', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'ad_click', + properties: { + total: '10', + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'track:: Reserved event names are not allowed', + statTags: { + destType: 'GA4', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'ga4', + description: '[Exclusion]: (gtag) pass reserved property name to GA4 for custom events', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'rudderstack event', + properties: { + firebase_conversion: 'firebase_conversion', + google_id: '1234', + ga_value: 'ga_value', + value: '10', + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'rudderstack_event', + params: { + value: '10', + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: + '[Exclusion]: (gtag) pass reserved property name and reserved properties in `user_properties` to GA4 for custom events', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'rudderstack event', + properties: { + firebase_conversion: 'firebase_conversion', + google_id: '1234', + ga_value: 'ga_value', + value: '10', + user_properties: { + first_open_time: 'first_open_time', + user_id: 'user_id', + firebase_value: 'firebase_value', + price: '100', + }, + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + user_properties: { + price: { + value: '100', + }, + }, + events: [ + { + name: 'rudderstack_event', + params: { + value: '10', + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: '[Error]: (gtag) pass reserved event names along with reserved properties', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'app_remove', + properties: { + firebase_conversion: 'firebase_conversion', + google_id: '1234', + ga_value: 'ga_value', + value: '10', + user_properties: { + first_open_time: 'first_open_time', + user_id: 'user_id', + firebase_value: 'firebase_value', + price: '100', + }, + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'track:: Reserved event names are not allowed', + statTags: { + destType: 'GA4', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'ga4', + description: '[Error] (gtag) pass reserved custom prefix names to GA4 events', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'firebase_event1', + properties: { + firebase_conversion: 'firebase_conversion', + google_id: '1234', + ga_value: 'ga_value', + value: '10', + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Reserved custom prefix names are not allowed', + statTags: { + destType: 'GA4', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'ga4', + description: "(gtag) check all property mappings for 'product added' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'product added', + properties: { + currency: 'USD', + total: '7.77', + google_data: 'google_data', + products: [ + { + product_id: '507f1f77bcf86cd799439011', + name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + category: 'Apparel', + brand: 'Google', + variant: 'green', + price: '19', + quantity: '2', + position: '1', + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'add_to_cart', + params: { + currency: 'USD', + value: 7.77, + engagement_time_msec: 1, + items: [ + { + item_id: '507f1f77bcf86cd799439011', + item_name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + item_category: 'Apparel', + item_brand: 'Google', + item_variant: 'green', + price: 19, + quantity: 2, + index: 1, + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: '(gtag) pass custom event name with its properties', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'rudderstack event', + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'rudderstack_event', + params: { + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) map 'product added' properties to ga4 'add_to_cart' items array", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'product added', + properties: { + affiliation: 'Google Merchandise Store', + brand: 'Google', + category: 'Related_products', + coupon: 'SUMMER_FUN', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + list_id: 'related_products', + location_id: 'L_12345', + name: 'Monopoly: 3rd Edition', + position: '1', + price: '19', + product_id: '507f1f77bcf86cd799439011', + products: [], + quantity: '2', + total: '7.77', + variant: 'green', + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + FORM: {}, + JSON: { + client_id: 'client_id', + events: [ + { + name: 'add_to_cart', + params: { + currency: 'USD', + engagement_time_msec: 1, + items: [ + { + affiliation: 'Google Merchandise Store', + coupon: 'SUMMER_FUN', + currency: 'USD', + discount: 2.22, + index: 1, + item_brand: 'Google', + item_category: 'Related_products', + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_id: '507f1f77bcf86cd799439011', + item_list_id: 'related_products', + item_list_name: 'Related Products', + item_name: 'Monopoly: 3rd Edition', + item_variant: 'green', + location_id: 'L_12345', + price: 19, + quantity: 2, + }, + ], + list_id: 'related_products', + value: 7.77, + }, + }, + ], + non_personalized_ads: true, + timestamp_micros: 1650950229000000, + }, + JSON_ARRAY: {}, + XML: {}, + }, + endpoint: 'https://www.google-analytics.com/mp/collect', + files: {}, + headers: { + 'Content-Type': 'application/json', + HOST: 'www.google-analytics.com', + }, + method: 'POST', + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + type: 'REST', + version: '1', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: + '(gtag) pass event name with invalid data type for products: {...} properties (when products parameter is optional)', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'product added', + properties: { + currency: 'USD', + total: '7.77', + products: { + product_id: '507f1f77bcf86cd799439011', + name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + category: 'Apparel', + brand: 'Google', + variant: 'green', + price: '19', + quantity: '2', + position: '1', + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + affiliation: 'Google Merchandise Store', + brand: 'Google', + category: 'Related_products', + coupon: 'SUMMER_FUN', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + list_id: 'related_products', + location_id: 'L_12345', + name: 'Monopoly: 3rd Edition', + position: '1', + price: '19', + product_id: '507f1f77bcf86cd799439011', + quantity: '2', + variant: 'green', + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + FORM: {}, + JSON: { + client_id: 'client_id', + events: [ + { + name: 'add_to_cart', + params: { + currency: 'USD', + engagement_time_msec: 1, + items: [ + { + affiliation: 'Google Merchandise Store', + coupon: 'SUMMER_FUN', + currency: 'USD', + discount: 2.22, + index: 1, + item_brand: 'Google', + item_category: 'Related_products', + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_id: '507f1f77bcf86cd799439011', + item_list_id: 'related_products', + item_list_name: 'Related Products', + item_name: 'Monopoly: 3rd Edition', + item_variant: 'green', + location_id: 'L_12345', + price: 19, + quantity: 2, + }, + ], + list_id: 'related_products', + value: 7.77, + }, + }, + ], + non_personalized_ads: true, + timestamp_micros: 1650950229000000, + }, + JSON_ARRAY: {}, + XML: {}, + }, + endpoint: 'https://www.google-analytics.com/mp/collect', + files: {}, + headers: { + 'Content-Type': 'application/json', + HOST: 'www.google-analytics.com', + }, + method: 'POST', + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + type: 'REST', + version: '1', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: + '[Error] (gtag) pass event name to GA4 with missing fields i.e required in products: [..]', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'product added', + properties: { + currency: 'USD', + total: '7.77', + products: [ + { + coupon: 'SUMMER_FUN', + category: 'Apparel', + brand: 'Google', + variant: 'green', + price: '19', + quantity: '2', + position: '1', + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'One of product_id or name is required', + statTags: { + destType: 'GA4', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'ga4', + description: + '[Error] (gtag) pass event name to GA4 with missing fields i.e required in properties', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'Product Viewed', + properties: { + currency: 'USD', + total: '7.77', + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'One of product_id or name is required', + statTags: { + destType: 'GA4', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'ga4', + description: '[Error] (gtag) missing API Secret', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'tutotial complete', + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'API Secret not found. Aborting ', + statTags: { + destType: 'GA4', + errorCategory: 'dataValidation', + errorType: 'configuration', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'ga4', + description: '[Error] (gtag) missing measurementId', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'tutotial complete', + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: '', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'measurementId must be provided. Aborting', + statTags: { + destType: 'GA4', + errorCategory: 'dataValidation', + errorType: 'configuration', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'ga4', + description: '(gtag) firing group event with event name. should take event name by default', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'group', + event: 'tutorial complete', + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + client_id: 'client_id', + events: [ + { + name: 'join_group', + params: { + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: '[Error] (gtag) payload has missing message.type', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + event: 'tutotial complete', + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Message Type is not present. Aborting message.', + statTags: { + destType: 'GA4', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'ga4', + description: '[Error] (gtag) payload has missing event name', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Event name is required', + statTags: { + destType: 'GA4', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'ga4', + description: '(gtag) taking client_id from anonymousId', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'tutotial complete', + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + client_id: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + events: [ + { + name: 'tutotial_complete', + params: { + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: '[Error] (firebase) payload has missing ga4AppInstanceId', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'tutotial complete', + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: '', + firebaseAppId: '1:17864591371:android:7a9520d3c78962e21f9fee', + blockPageViewEvent: false, + typesOfClient: 'firebase', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'ga4AppInstanceId must be provided under externalId', + statTags: { + destType: 'GA4', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'ga4', + description: '[Error] (firebase) pass reserved event name', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'app_store_subscription_cancel', + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: '', + firebaseAppId: '1:17864591371:android:7a9520d3c78962e21f9fee', + blockPageViewEvent: false, + typesOfClient: 'firebase', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Reserved custom event names are not allowed', + statTags: { + destType: 'GA4', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'ga4', + description: "(gtag) check all property mappings for 'tutorial complete' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'tutorial complete', + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + non_personalized_ads: true, + events: [ + { + name: 'tutorial_complete', + params: { + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) check all property mappings for 'cart viewed' event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'cart viewed', + properties: { + currency: 'USD', + total: '7.77', + products: [ + { + product_id: 0, + coupon: 'SUMMER_FUN', + category: 'Apparel', + brand: 'Google', + variant: 'green', + price: '19', + quantity: '2', + position: '1', + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'view_cart', + params: { + currency: 'USD', + value: 7.77, + engagement_time_msec: 1, + items: [ + { + item_id: 0, + coupon: 'SUMMER_FUN', + item_category: 'Apparel', + item_brand: 'Google', + item_variant: 'green', + price: 19, + quantity: 2, + index: 1, + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: '[Error]: (firebase) missing firebaseAppId', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'promotion clicked', + properties: { + creative_name: 'Summer Banner', + creative_slot: 'featured_app_1', + location_id: 'L_12345', + promotion_id: 'P_12345', + promotion_name: 'Summer Sale', + products: [ + { + product_id: '507f1f77bcf86cd799439011', + name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + category: 'Apparel', + brand: 'Google', + variant: 'green', + price: '19', + quantity: '2', + position: '0', + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + promotion_id: 'P_12345', + promotion_name: 'Summer Sale', + creative_name: 'summer_banner2', + creative_slot: 'featured_app_1', + }, + ], + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: '', + typesOfClient: 'firebase', + firebaseAppId: '', + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'firebaseAppId must be provided. Aborting', + statTags: { + destType: 'GA4', + errorCategory: 'dataValidation', + errorType: 'configuration', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'ga4', + description: '(gtag) firing page call', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + rudderId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'page', + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + typesOfClient: 'gtag', + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + client_id: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + events: [ + { + name: 'page_view', + params: { + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: '(gtag) firing page call with custom properties', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + rudderId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'page', + event: 'page view', + properties: { + view: 'login', + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + typesOfClient: 'gtag', + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + client_id: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + events: [ + { + name: 'page_view', + params: { + view: 'login', + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: '[Error]: (gtag) pass timestamp more than 72 hours into the past', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-20T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'tutotial complete', + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + typesOfClient: 'gtag', + blockPageViewEvent: false, + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Allowed timestamp is [72 hours] into the past', + statTags: { + destType: 'GA4', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'ga4', + description: '[Error]: (gtag) pass timestamp more than 15 min into the future', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-05-05T15:47:57Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'tutotial complete', + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + typesOfClient: 'gtag', + blockPageViewEvent: false, + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Allowed timestamp is [15 minutes] into the future', + statTags: { + destType: 'GA4', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'ga4', + description: + '(gtag) pass custom properties along with products: [..] parameters to GA4 standard events along with its stated ones', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'order completed', + properties: { + checkout_id: '12345', + order_id: '1234', + myCustomProp: 'My arbitray value', + affiliation: 'Apple Store', + total: 20, + revenue: 15, + shipping: 22, + tax: 1, + discount: 1.5, + coupon: 'ImagePro', + currency: 'USD', + products: [ + { + product_id: '123', + sku: 'G-32', + name: 'Monopoly', + price: 14, + quantity: 1, + category: 'Games', + item_category2: 'Board games', + url: 'https://www.website.com/product/path', + image_url: 'https://www.website.com/product/path.jpg', + }, + ], + timezone: { + name: 'Europe/Tallinn', + }, + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'purchase', + params: { + checkout_id: '12345', + transaction_id: '1234', + myCustomProp: 'My arbitray value', + affiliation: 'Apple Store', + value: 20, + shipping: 22, + tax: 1, + discount: 1.5, + coupon: 'ImagePro', + currency: 'USD', + engagement_time_msec: 1, + items: [ + { + item_id: '123', + sku: 'G-32', + item_name: 'Monopoly', + price: 14, + quantity: 1, + item_category: 'Games', + item_category2: 'Board games', + url: 'https://www.website.com/product/path', + image_url: 'https://www.website.com/product/path.jpg', + }, + ], + timezone_name: 'Europe/Tallinn', + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: + '(gtag) pass custom properties excluding products: [..] parameter to GA4 standard events along with its stated ones', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'promotion clicked', + properties: { + 'customProp-1': 'check-1', + 'customProp-2': 'check-2', + timezone: { + name: 'Europe/Tallinn', + }, + creative_name: 'Summer Banner', + creative_slot: 'featured_app_1', + location_id: 'L_12345', + promotion_id: 'P_12345', + promotion_name: 'Summer Sale', + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + client_id: 'client_id', + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + events: [ + { + name: 'select_promotion', + params: { + 'customProp-1': 'check-1', + 'customProp-2': 'check-2', + timezone_name: 'Europe/Tallinn', + creative_name: 'Summer Banner', + creative_slot: 'featured_app_1', + location_id: 'L_12345', + promotion_id: 'P_12345', + promotion_name: 'Summer Sale', + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: "(gtag) message type group -> 'join_group' with custom event", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'group', + traits: { + custom1: 1234, + custom2: 'custom2', + timezone: { + name: 'Europe/Tallinn', + }, + engagementTimeMsec: 100, + sessionId: 655, + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + client_id: 'client_id', + events: [ + { + name: 'join_group', + params: { + custom1: 1234, + custom2: 'custom2', + timezone_name: 'Europe/Tallinn', + engagement_time_msec: 100, + session_id: 655, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: '(gtag): check args keyword for price x currency multiplication', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'product added', + properties: { + currency: 'USD', + price: 2.4, + quantity: 2, + products: [ + { + product_id: '507f1f77bcf86cd799439011', + name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + category: 'Apparel', + brand: 'Google', + variant: 'green', + price: '19', + quantity: '2', + position: '1', + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + client_id: 'client_id', + events: [ + { + name: 'add_to_cart', + params: { + currency: 'USD', + value: 4.8, + engagement_time_msec: 1, + items: [ + { + item_id: '507f1f77bcf86cd799439011', + item_name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + item_category: 'Apparel', + item_brand: 'Google', + item_variant: 'green', + price: 19, + quantity: 2, + index: 1, + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + price: 2.4, + quantity: 2, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: + "(gtag): take page properties from context.page for 'page' call along with custom properties", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + rudderId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + page: { + url: 'http://morkey.in', + path: '/cart', + title: 'miphone', + search: 'MI', + referrer: 'morkey', + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'page', + integrations: { + All: true, + }, + properties: { + cust1: 1234, + engagementTimeMsec: 100, + sessionId: 655, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + client_id: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + events: [ + { + name: 'page_view', + params: { + page_referrer: 'morkey', + page_title: 'miphone', + page_location: 'http://morkey.in', + cust1: 1234, + engagement_time_msec: 100, + session_id: 655, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: '[Error] GA4: event not as string', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + originalTimestamp: '2022-04-26T05:17:09Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: { + name: 'promotion_viewed', + }, + properties: { + creative_name: 'Summer Banner', + creative_slot: 'featured_app_1', + location_id: 'L_12345', + promotion_id: 'P_12345', + promotion_name: 'Summer Sale', + products: [ + { + product_id: '507f1f77bcf86cd799439011', + name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + category: 'Apparel', + brand: 'Google', + variant: 'green', + price: '19', + quantity: '2', + position: '0', + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + promotion_id: 'P_12345', + promotion_name: 'Summer Sale', + creative_name: 'summer_banner2', + creative_slot: 'featured_app_1', + }, + ], + }, + integrations: { + All: true, + }, + sentAt: '2022-04-20T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'track:: event name should be string', + statTags: { + destType: 'GA4', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'ga4', + description: '[Error] GA4: client_id not found in all four path', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'product added', + properties: { + currency: 'USD', + price: 2.4, + quantity: 2, + products: [ + { + product_id: '507f1f77bcf86cd799439011', + name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + category: 'Apparel', + brand: 'Google', + variant: 'green', + price: '19', + quantity: '2', + position: '1', + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + integrations: { + All: true, + }, + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6BET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: true, + sendLoginSignup: true, + newOrExistingUserTrait: 'firstLogin', + loginSignupMethod: 'method', + generateLead: true, + generateLeadValueTrait: 'value', + generateLeadCurrencyTrait: 'currency', + clientIdFieldIdentifier: 'properties.client_id', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'ga4ClientId, anonymousId or messageId must be provided', + statTags: { + destType: 'GA4', + errorCategory: 'dataValidation', + errorType: 'configuration', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'ga4', + description: + "client_id isn't sent from the path defined in the webapp config, falling back to default values i.e here it is anonymousId", + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'product added', + properties: { + currency: 'USD', + price: 2.4, + quantity: 2, + products: [ + { + product_id: '507f1f77bcf86cd799439011', + name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + category: 'Apparel', + brand: 'Google', + variant: 'green', + price: '19', + quantity: '2', + position: '1', + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + integrations: { + All: true, + }, + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6BET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: true, + sendLoginSignup: true, + newOrExistingUserTrait: 'firstLogin', + loginSignupMethod: 'method', + generateLead: true, + generateLeadValueTrait: 'value', + generateLeadCurrencyTrait: 'currency', + clientIdFieldIdentifier: 'properties.client_id', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + FORM: {}, + JSON: { + events: [ + { + name: 'add_to_cart', + params: { + items: [ + { + index: 1, + price: 19, + coupon: 'SUMMER_FUN', + item_id: '507f1f77bcf86cd799439011', + currency: 'USD', + discount: 2.22, + quantity: 2, + item_name: 'Monopoly: 3rd Edition', + item_brand: 'Google', + affiliation: 'Google Merchandise Store', + location_id: 'L_12345', + item_list_id: 'related_products', + item_variant: 'green', + item_category: 'Apparel', + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_name: 'Related Products', + }, + ], + price: 2.4, + value: 4.8, + currency: 'USD', + quantity: 2, + engagement_time_msec: 1, + }, + }, + ], + client_id: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + non_personalized_ads: true, + }, + JSON_ARRAY: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6BET4', + }, + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://www.google-analytics.com/mp/collect', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: + 'any custom or item property with array value, is flattened with underscore delimeter', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'product added', + originalTimestamp: '2022-04-26T05:17:09Z', + properties: { + currency: 'USD', + total: '7.77', + product_id: '507f1f77bcf86cd799439011', + name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + category: 'Apparel', + brand: 'Google', + variant: 'green', + price: '19', + quantity: '2', + position: '1', + affiliation: 'Google Merchandise Store', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + address: { + city: 'kolkata', + district: '24pgs', + }, + categoryLevels: ['Furniture', 'Bedroom Furniture', 'Dressers & Chests'], + products: [ + { + product_id: '1234', + product_details: { + colour: 'red', + shape: 'rectangle', + }, + productLevels: ['test1', 'test2', 'test3'], + }, + ], + }, + integrations: { + All: true, + }, + sentAt: '2022-11-14T15:20:57Z', + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: false, + sendLoginSignup: false, + generateLead: false, + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + timestamp_micros: 1650950229000000, + non_personalized_ads: true, + client_id: 'client_id', + events: [ + { + name: 'add_to_cart', + params: { + currency: 'USD', + value: 7.77, + items: [ + { + item_id: '1234', + product_details_colour: 'red', + product_details_shape: 'rectangle', + productLevels_0: 'test1', + productLevels_1: 'test2', + productLevels_2: 'test3', + }, + ], + product_id: '507f1f77bcf86cd799439011', + name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + category: 'Apparel', + brand: 'Google', + variant: 'green', + price: '19', + quantity: '2', + position: '1', + affiliation: 'Google Merchandise Store', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + address_city: 'kolkata', + address_district: '24pgs', + categoryLevels_0: 'Furniture', + categoryLevels_1: 'Bedroom Furniture', + categoryLevels_2: 'Dressers & Chests', + engagement_time_msec: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: 'extract session_id from context.sessionId', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + sessionId: 16678456735, + }, + type: 'track', + event: 'product added', + properties: { + currency: 'USD', + price: 2.4, + quantity: 2, + client_id: 'client@1234', + products: [ + { + product_id: '507f1f77bcf86cd799439011', + name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + category: 'Apparel', + brand: 'Google', + variant: 'green', + price: '19', + quantity: '2', + position: '1', + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + integrations: { + All: true, + }, + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6BET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: true, + sendLoginSignup: true, + newOrExistingUserTrait: 'firstLogin', + loginSignupMethod: 'method', + generateLead: true, + generateLeadValueTrait: 'value', + generateLeadCurrencyTrait: 'currency', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + FORM: {}, + JSON: { + events: [ + { + name: 'add_to_cart', + params: { + items: [ + { + index: 1, + price: 19, + coupon: 'SUMMER_FUN', + item_id: '507f1f77bcf86cd799439011', + currency: 'USD', + discount: 2.22, + quantity: 2, + item_name: 'Monopoly: 3rd Edition', + item_brand: 'Google', + affiliation: 'Google Merchandise Store', + location_id: 'L_12345', + item_list_id: 'related_products', + item_variant: 'green', + item_category: 'Apparel', + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_name: 'Related Products', + }, + ], + price: 2.4, + value: 4.8, + currency: 'USD', + quantity: 2, + session_id: 16678456735, + engagement_time_msec: 1, + client_id: 'client@1234', + }, + }, + ], + client_id: 'client_id', + non_personalized_ads: true, + }, + JSON_ARRAY: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6BET4', + }, + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://www.google-analytics.com/mp/collect', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: '(gtag) send integer userId', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + userId: 34567, + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + sessionId: 16678456735, + }, + type: 'track', + event: 'product added', + properties: { + currency: 'USD', + price: 2.4, + quantity: 2, + client_id: 'client@1234', + products: [ + { + product_id: '507f1f77bcf86cd799439011', + name: 'Monopoly: 3rd Edition', + coupon: 'SUMMER_FUN', + category: 'Apparel', + brand: 'Google', + variant: 'green', + price: '19', + quantity: '2', + position: '1', + affiliation: 'Google Merchandise Store', + currency: 'USD', + discount: 2.22, + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_id: 'related_products', + item_list_name: 'Related Products', + location_id: 'L_12345', + }, + ], + }, + integrations: { + All: true, + }, + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6BET4', + firebaseAppId: '', + blockPageViewEvent: false, + typesOfClient: 'gtag', + extendPageViewParams: false, + sendUserId: false, + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + enableServerSideIdentify: true, + sendLoginSignup: true, + newOrExistingUserTrait: 'firstLogin', + loginSignupMethod: 'method', + generateLead: true, + generateLeadValueTrait: 'value', + generateLeadCurrencyTrait: 'currency', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + FORM: {}, + JSON: { + events: [ + { + name: 'add_to_cart', + params: { + items: [ + { + index: 1, + price: 19, + coupon: 'SUMMER_FUN', + item_id: '507f1f77bcf86cd799439011', + currency: 'USD', + discount: 2.22, + quantity: 2, + item_name: 'Monopoly: 3rd Edition', + item_brand: 'Google', + affiliation: 'Google Merchandise Store', + location_id: 'L_12345', + item_list_id: 'related_products', + item_variant: 'green', + item_category: 'Apparel', + item_category2: 'Adult', + item_category3: 'Shirts', + item_category4: 'Crew', + item_category5: 'Short sleeve', + item_list_name: 'Related Products', + }, + ], + price: 2.4, + value: 4.8, + currency: 'USD', + quantity: 2, + session_id: 16678456735, + engagement_time_msec: 1, + client_id: 'client@1234', + }, + }, + ], + client_id: 'client_id', + user_id: '34567', + non_personalized_ads: true, + }, + JSON_ARRAY: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6BET4', + }, + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://www.google-analytics.com/mp/collect', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: '(gtag) login event with user_properties', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user@1', + channel: 'web', + anonymousId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + traits: { + campaign: 'advertizing', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'login', + properties: { + method: 'facebook', + }, + integrations: { + All: true, + }, + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6BET4', + firebaseAppId: '', + typesOfClient: 'gtag', + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + FORM: {}, + JSON: { + events: [ + { + name: 'login', + params: { + method: 'facebook', + engagement_time_msec: 1, + }, + }, + ], + user_id: 'user@1', + user_properties: { + campaign: { + value: 'advertizing', + }, + }, + client_id: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + non_personalized_ads: true, + }, + JSON_ARRAY: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6BET4', + }, + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://www.google-analytics.com/mp/collect', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: '(gtag) sign_up event', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user@1', + channel: 'web', + anonymousId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + traits: { + campaign: 'advertizing', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'sign_up', + properties: { + method: 'google', + }, + integrations: { + All: true, + }, + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6BET4', + firebaseAppId: '', + typesOfClient: 'gtag', + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + FORM: {}, + JSON: { + events: [ + { + name: 'sign_up', + params: { + method: 'google', + engagement_time_msec: 1, + }, + }, + ], + user_id: 'user@1', + user_properties: { + campaign: { + value: 'advertizing', + }, + }, + client_id: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + non_personalized_ads: true, + }, + JSON_ARRAY: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6BET4', + }, + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://www.google-analytics.com/mp/collect', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: '(gtag) generate_lead event', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user@1', + channel: 'web', + anonymousId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + traits: { + campaign: 'advertizing', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'generate_lead', + properties: { + source: 'instagram', + value: 20, + }, + integrations: { + All: true, + }, + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6BET4', + firebaseAppId: '', + typesOfClient: 'gtag', + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + FORM: {}, + JSON: { + events: [ + { + name: 'generate_lead', + params: { + currency: 'USD', + value: 20, + source: 'instagram', + engagement_time_msec: 1, + }, + }, + ], + user_id: 'user@1', + user_properties: { + campaign: { + value: 'advertizing', + }, + }, + client_id: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + non_personalized_ads: true, + }, + JSON_ARRAY: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6BET4', + }, + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://www.google-analytics.com/mp/collect', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: '(gtag) track call with page information such as url, title, referrer', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user@1', + channel: 'web', + anonymousId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + page: { + initial_referrer: '$direct', + path: '/', + referrer: '$direct', + tab_url: 'https://www.rudderstack.com/', + title: 'Document', + url: 'https://www.rudderstack.com/', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'generate_lead', + properties: { + source: 'instagram', + value: 20, + }, + integrations: { + All: true, + }, + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6BET4', + firebaseAppId: '', + typesOfClient: 'gtag', + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + FORM: {}, + JSON: { + events: [ + { + name: 'generate_lead', + params: { + currency: 'USD', + value: 20, + source: 'instagram', + page_location: 'https://www.rudderstack.com/', + page_referrer: '$direct', + page_title: 'Document', + engagement_time_msec: 1, + }, + }, + ], + user_id: 'user@1', + client_id: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + non_personalized_ads: true, + }, + JSON_ARRAY: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6BET4', + }, + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://www.google-analytics.com/mp/collect', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: + '(gtag) track event with hybrid connection mode using buffer cloud mode event approach', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user@1', + channel: 'web', + anonymousId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + traits: { + campaign: 'advertizing', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'generate_lead', + properties: { + source: 'instagram', + value: 20, + }, + integrations: { + All: true, + 'Google Analytics 4 (GA4)': { + clientId: '554581488.1683172875', + sessionId: '1683172875', + }, + }, + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6BET4', + firebaseAppId: '', + typesOfClient: 'gtag', + eventFilteringOption: 'disable', + connectionMode: 'hybrid', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + FORM: {}, + JSON: { + events: [ + { + name: 'generate_lead', + params: { + currency: 'USD', + value: 20, + source: 'instagram', + session_id: '1683172875', + engagement_time_msec: 1, + }, + }, + ], + user_id: 'user@1', + user_properties: { + campaign: { + value: 'advertizing', + }, + }, + client_id: '554581488.1683172875', + non_personalized_ads: true, + }, + JSON_ARRAY: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6BET4', + }, + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://www.google-analytics.com/mp/collect', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: + '(gtag) track event with hybrid connection mode using override client_id and session_id approach', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user@1', + channel: 'web', + anonymousId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + traits: { + campaign: 'advertizing', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + sessionId: 1683172874065, + }, + type: 'track', + event: 'generate_lead', + properties: { + source: 'instagram', + value: 20, + }, + integrations: { + All: true, + }, + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6BET4', + firebaseAppId: '', + typesOfClient: 'gtag', + eventFilteringOption: 'disable', + connectionMode: 'hybrid', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + FORM: {}, + JSON: { + events: [ + { + name: 'generate_lead', + params: { + currency: 'USD', + value: 20, + source: 'instagram', + session_id: 1683172874065, + engagement_time_msec: 1, + }, + }, + ], + user_id: 'user@1', + user_properties: { + campaign: { + value: 'advertizing', + }, + }, + client_id: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + non_personalized_ads: true, + }, + JSON_ARRAY: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6BET4', + }, + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://www.google-analytics.com/mp/collect', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: '(gtag) firing group calls with GA4 hybrid mode connection', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'group', + event: 'tutorial complete', + integrations: { + 'Google Analytics 4': { + clientId: '4718026.1683606287', + sessionId: '1683606287', + sessionNumber: 1, + }, + }, + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + typesOfClient: 'gtag', + eventFilteringOption: 'disable', + connectionMode: 'hybrid', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://www.google-analytics.com/mp/collect', + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + body: { + JSON: { + non_personalized_ads: true, + client_id: '4718026.1683606287', + events: [ + { + name: 'join_group', + params: { + engagement_time_msec: 1, + session_id: '1683606287', + session_number: 1, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: '(gtag) sign_up event with all data types of user_properties', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user@1', + channel: 'web', + anonymousId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + traits: { + campaign: 'advertizing', + name: 'rudder', + age: 45, + hobby: ['dancing', 'singing', 'reading'], + enableEURegion: false, + isEnterpriseUser: { + value: false, + }, + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'sign_up', + properties: { + method: 'google', + }, + integrations: { + All: true, + }, + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6BET4', + firebaseAppId: '', + typesOfClient: 'gtag', + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + FORM: {}, + JSON: { + events: [ + { + name: 'sign_up', + params: { + method: 'google', + engagement_time_msec: 1, + }, + }, + ], + user_id: 'user@1', + client_id: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + user_properties: { + age: { + value: 45, + }, + name: { + value: 'rudder', + }, + campaign: { + value: 'advertizing', + }, + enableEURegion: { + value: false, + }, + }, + non_personalized_ads: true, + }, + JSON_ARRAY: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6BET4', + }, + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://www.google-analytics.com/mp/collect', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: '[Error]: (gtag) event name starts with numbers', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: '1234_sign_up', + properties: { + total: '10', + }, + integrations: { + All: true, + }, + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + typesOfClient: 'gtag', + eventFilteringOption: 'disable', + connectionMode: 'cloud', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: + 'Event name must start with a letter and can only contain letters, numbers, and underscores', + statTags: { + destType: 'GA4', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'ga4', + description: '(gtag) event having multiple empty array and object parameters', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + event: 'logIn', + userId: 'user@1', + group_id: 'group@1', + anon_id: '78e95d6d-58c0-4237-b99e-2ef510b6d502', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'ga4AppInstanceId', + id: 'f0dd99b6f979fb551ce583373900f937', + }, + { + type: 'ga4ClientId', + id: 'client_id', + }, + ], + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + properties: { + user_interest: 'Moderate', + company_interest: '', + profile: [ + { + is_6qa: true, + product: null, + product_fit: 'Moderate', + product_stage: 'Purchase', + intent_score: 89, + profile_score: 52, + product_display$name: 'rudderstack', + }, + ], + user_company: 'Analytics consulting', + user_account: '1', + user_id_mappings: '330098|245252|461224|282599', + company_naics_6sense: '5173', + usr_consent: null, + firebase_user_id: 'kdgMnP', + google_user_id: 'G-123456', + company_domain: 'consulting.net', + company_region: 'New Zealand', + user_product_interests: { + ids: [], + list: [ + { + id: 330098, + name: [], + }, + { + id: 245252, + name: {}, + }, + ], + names: [], + }, + company_country: {}, + company_industry: 'Business Analytics', + company_revenue: '$5M - $10M', + company_annual_revenue: '5568000', + company_sic_description: '', + company_naics_description: [], + }, + integrations: { + All: true, + }, + }, + destination: { + Config: { + apiSecret: 'dummyApiSecret', + measurementId: 'G-T40PE6KET4', + firebaseAppId: '', + typesOfClient: 'gtag', + eventFilteringOption: 'disable', + connectionMode: 'cloud', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + FORM: {}, + JSON: { + events: [ + { + name: 'login', + params: { + company_annual_revenue: '5568000', + company_domain: 'consulting.net', + company_industry: 'Business Analytics', + company_naics_6sense: '5173', + company_region: 'New Zealand', + company_revenue: '$5M - $10M', + engagement_time_msec: 1, + profile_0_intent_score: 89, + profile_0_is_6qa: true, + profile_0_product_display$name: 'rudderstack', + profile_0_product_fit: 'Moderate', + profile_0_product_stage: 'Purchase', + profile_0_profile_score: 52, + user_account: '1', + user_company: 'Analytics consulting', + user_id_mappings: '330098|245252|461224|282599', + user_interest: 'Moderate', + user_product_interests_list_0_id: 330098, + user_product_interests_list_1_id: 245252, + }, + }, + ], + user_id: 'user@1', + client_id: 'client_id', + non_personalized_ads: true, + }, + JSON_ARRAY: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: { + api_secret: 'dummyApiSecret', + measurement_id: 'G-T40PE6KET4', + }, + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://www.google-analytics.com/mp/collect', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'ga4', + description: '(gtag) campaign_details custom event', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + userId: 'user@1', + channel: 'web', + anonymousId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + campaign: { + id: 'google_1234', + name: 'Summer_fun', + source: 'google', + medium: 'cpc', + term: 'summer+travel', + content: 'logo link', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }, + type: 'track', + event: 'Campaign Details', + properties: {}, + integrations: { + All: true, + }, + }, + destination: { + Config: { + apiSecret: 'QyWKGHj8QhG2L4ePAPiXCA', + measurementId: 'G-T40PE6BET4', + typesOfClient: 'gtag', + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + FORM: {}, + JSON: { + events: [ + { + name: 'campaign_details', + params: { + campaign_id: 'google_1234', + campaign: 'Summer_fun', + source: 'google', + medium: 'cpc', + term: 'summer+travel', + content: 'logo link', + engagement_time_msec: 1, + }, + }, + ], + user_id: 'user@1', + client_id: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', + non_personalized_ads: true, + }, + JSON_ARRAY: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: { + api_secret: 'QyWKGHj8QhG2L4ePAPiXCA', + measurement_id: 'G-T40PE6BET4', + }, + headers: { + HOST: 'www.google-analytics.com', + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://www.google-analytics.com/mp/collect', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + mockFns: defaultMockFns, + }, +]; diff --git a/test/integrations/destinations/gainsight/network.ts b/test/integrations/destinations/gainsight/network.ts new file mode 100644 index 0000000000..c8adf871b9 --- /dev/null +++ b/test/integrations/destinations/gainsight/network.ts @@ -0,0 +1,71 @@ +export const networkCallsData = [ + { + httpReq: { + url: 'https://demo-domain.gainsightcloud.com/v1/data/objects/query/Company', + method: 'POST', + }, + httpRes: { + data: { + "result": true, + "errorCode": null, + "errorDesc": null, + "requestId": "47d9c8be-4912-4610-806c-0eec22b73236", + "data": { + "records": [] + }, + "message": null + }, + status: 200 + }, + }, + { + httpReq: { + url: 'https://demo-domain.gainsightcloud.com/v1/data/objects/Company', + method: 'POST', + }, + httpRes: { + data: { + "result": true, + "errorCode": null, + "errorDesc": null, + "requestId": "3ce46d4a-6a83-4a92-97b3-d9788a296af8", + "data": { + "count": 1, + "errors": null, + "records": [ + { + "Gsid": "1P0203VCESP7AUQMV9E953G" + } + ] + }, + "message": null + }, + status: 200 + }, + }, + { + httpReq: { + url: "https://demo-domain.gainsightcloud.com/v1/data/objects/Company?keys=Name", + method: 'GET', + }, + httpRes: { + data: { + "result": true, + "errorCode": null, + "errorDesc": null, + "requestId": "30630809-40a7-45d2-9673-ac2e80d06f33", + "data": { + "count": 1, + "errors": null, + "records": [ + { + "Gsid": "1P0203VCESP7AUQMV9E953G" + } + ] + }, + "message": null + }, + status: 200 + }, + } +]; diff --git a/test/integrations/destinations/gainsight/processor/data.ts b/test/integrations/destinations/gainsight/processor/data.ts new file mode 100644 index 0000000000..5844c22b65 --- /dev/null +++ b/test/integrations/destinations/gainsight/processor/data.ts @@ -0,0 +1,970 @@ +export const data = [ + { + "name": "gainsight", + "description": "Test 0", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "domain": "demo-domain.gainsightcloud.com", + "accessKey": "sample-access-key", + "personMap": [], + "companyMap": [], + "eventNameMap": [], + "eventVersionMap": [] + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "anonymousId": "anon_id", + "type": "identify", + "traits": { + "email": "cosmo@krammer.com", + "name": "Cosmo Krammer", + "linkedinUrl": "https://linkedin.com/cosmo-krammer", + "location": "New York", + "emailOptOut": true, + "masterAvatarTypeCode": 10 + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {}, + "JSON": { + "Email": "cosmo@krammer.com", + "Name": "Cosmo Krammer", + "LinkedinUrl": "https://linkedin.com/cosmo-krammer", + "Location": "New York", + "EmailOptOut": true, + "MasterAvatarTypeCode": 10 + } + }, + "type": "REST", + "files": {}, + "method": "PUT", + "params": {}, + "headers": { + "Accesskey": "sample-access-key", + "Content-Type": "application/json" + }, + "version": "1", + "endpoint": "https://demo-domain.gainsightcloud.com/v1.0/api/people", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "gainsight", + "description": "Test 1", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "domain": "demo-domain.gainsightcloud.com", + "accessKey": "sample-access-key", + "personMap": [ + { + "from": "age", + "to": "age__gc" + } + ], + "companyMap": [], + "eventNameMap": [], + "eventVersionMap": [] + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "anonymousId": "anon_id", + "type": "identify", + "traits": { + "email": "cosmo@krammer.com", + "name": "Cosmo Krammer", + "linkedinUrl": "https://linkedin.com/cosmo-krammer", + "location": "New York", + "emailOptOut": true, + "masterAvatarTypeCode": 10, + "age": 35, + "randomKey": "this should be dropped" + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {}, + "JSON": { + "Email": "cosmo@krammer.com", + "Name": "Cosmo Krammer", + "LinkedinUrl": "https://linkedin.com/cosmo-krammer", + "Location": "New York", + "EmailOptOut": true, + "MasterAvatarTypeCode": 10, + "age__gc": 35 + } + }, + "type": "REST", + "files": {}, + "method": "PUT", + "params": {}, + "headers": { + "Accesskey": "sample-access-key", + "Content-Type": "application/json" + }, + "version": "1", + "endpoint": "https://demo-domain.gainsightcloud.com/v1.0/api/people", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "gainsight", + "description": "Test 2", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "domain": "demo-domain.gainsightcloud.com", + "accessKey": "sample-access-key", + "personMap": [], + "companyMap": [], + "eventNameMap": [], + "eventVersionMap": [] + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "anonymousId": "anon_id", + "type": "identify", + "traits": { + "name": "Cosmo Krammer", + "linkedinUrl": "https://linkedin.com/cosmo-krammer", + "location": "New York", + "emailOptOut": true, + "masterAvatarTypeCode": 10 + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "email is required for identify", + "statTags": { + "destType": "GAINSIGHT", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "gainsight", + "description": "Test 3", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "domain": "demo-domain.gainsightcloud.com", + "accessKey": "sample-access-key", + "sharedSecret": "sample-shared-secret", + "eventNameMap": [ + { + "from": "Ticket Resolved", + "to": "Ticket Resolved Event" + } + ], + "eventVersionMap": [ + { + "from": "Ticket Resolved", + "to": "1.0.0" + } + ], + "topicName": "Ticket Actions", + "tenantId": "sample-tenant-id", + "personMap": [], + "companyMap": [] + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "anonymousId": "anon_id", + "type": "track", + "event": "Ticket Resolved", + "properties": { + "ticketId": "sample-ticket-id", + "actionEmail": "sample@email.com", + "status": "resovled" + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {}, + "JSON": { + "ticketId": "sample-ticket-id", + "actionEmail": "sample@email.com", + "status": "resovled" + } + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": {}, + "headers": { + "Accesskey": "sample-access-key", + "tenantId": "sample-tenant-id", + "sharedSecret": "sample-shared-secret", + "Content-Type": "application/json", + "topicName": "Ticket Actions", + "eventName": "Ticket Resolved Event", + "eventVersion": "1.0.0" + }, + "version": "1", + "endpoint": "https://demo-domain.gainsightcloud.com/v1.0/api/eventManager/event", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "gainsight", + "description": "Test 4", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "domain": "demo-domain.gainsightcloud.com", + "accessKey": "sample-access-key", + "sharedSecret": "sample-shared-secret", + "personMap": [], + "companyMap": [], + "eventNameMap": [], + "eventVersionMap": [] + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + }, + "traits": { + "email": "krammer@seinfeld.com" + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "anonymousId": "anon_id", + "type": "group", + "traits": { + "name": "Kramerica Industries", + "industry": "Sitcom", + "employees": "100", + "status": "complete", + "companyType": "spoof" + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {}, + "JSON": { + "Email": "krammer@seinfeld.com", + "companies": [ + { + "Company_ID": "1P0203VCESP7AUQMV9E953G" + } + ] + } + }, + "type": "REST", + "files": {}, + "method": "PUT", + "params": {}, + "headers": { + "Accesskey": "sample-access-key", + "Content-Type": "application/json" + }, + "version": "1", + "endpoint": "https://demo-domain.gainsightcloud.com/v1.0/api/people", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "gainsight", + "description": "Test 5", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "domain": "demo-domain.gainsightcloud.com", + "accessKey": "sample-access-key", + "sharedSecret": "sample-shared-secret", + "personMap": [], + "companyMap": [], + "eventNameMap": [], + "eventVersionMap": [] + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + }, + "traits": { + "email": "krammer@seinfeld.com" + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "anonymousId": "anon_id", + "type": "group", + "traits": { + "name": "Seinfeld Corps", + "industry": "TV Series", + "employees": "50", + "status": "complete" + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {}, + "JSON": { + "Email": "krammer@seinfeld.com", + "companies": [ + { + "Company_ID": "1P0203VCESP7AUQMV9E953G" + } + ] + } + }, + "type": "REST", + "files": {}, + "method": "PUT", + "params": {}, + "headers": { + "Accesskey": "sample-access-key", + "Content-Type": "application/json" + }, + "version": "1", + "endpoint": "https://demo-domain.gainsightcloud.com/v1.0/api/people", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "gainsight", + "description": "Test 6", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "domain": "demo-domain.gainsightcloud.com", + "accessKey": "sample-access-key", + "personMap": [], + "companyMap": [], + "eventNameMap": [], + "eventVersionMap": [] + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "anonymousId": "anon_id", + "type": "identify", + "traits": { + "email": "cosmo@krammer.com", + "firstname": "Cosmo", + "lastname": "Krammer", + "linkedinUrl": "https://linkedin.com/cosmo-krammer", + "location": "New York", + "emailOptOut": true, + "masterAvatarTypeCode": 10 + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {}, + "JSON": { + "Email": "cosmo@krammer.com", + "FirstName": "Cosmo", + "LastName": "Krammer", + "Name": "Cosmo Krammer", + "LinkedinUrl": "https://linkedin.com/cosmo-krammer", + "Location": "New York", + "EmailOptOut": true, + "MasterAvatarTypeCode": 10 + } + }, + "type": "REST", + "files": {}, + "method": "PUT", + "params": {}, + "headers": { + "Accesskey": "sample-access-key", + "Content-Type": "application/json" + }, + "version": "1", + "endpoint": "https://demo-domain.gainsightcloud.com/v1.0/api/people", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "gainsight", + "description": "Test 7", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "domain": "demo-domain.gainsightcloud.com", + "accessKey": "sample-access-key", + "sharedSecret": "sample-shared-secret", + "eventNameMap": [ + { + "from": "Ticket Resolved", + "to": "Ticket Resolved Event" + } + ], + "eventVersionMap": [ + { + "from": "Ticket Resolved", + "to": "1.0.0" + } + ], + "topicName": "Ticket Actions", + "tenantId": "sample-tenant-id", + "personMap": [], + "companyMap": [], + "contractId": "externalId-shall-get-precedence" + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + }, + "externalId": [ + { + "type": "gainsightEventContractId", + "id": "sample-contract-id" + } + ] + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "anonymousId": "anon_id", + "type": "track", + "event": "Ticket Resolved", + "properties": { + "ticketId": "sample-ticket-id", + "actionEmail": "sample@email.com", + "status": "resovled" + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {}, + "JSON": { + "ticketId": "sample-ticket-id", + "actionEmail": "sample@email.com", + "status": "resovled" + } + }, + "type": "REST", + "files": {}, + "method": "POST", + "params": {}, + "headers": { + "Accesskey": "sample-access-key", + "tenantId": "sample-tenant-id", + "sharedSecret": "sample-shared-secret", + "Content-Type": "application/json", + "topicName": "Ticket Actions", + "eventName": "Ticket Resolved Event", + "eventVersion": "1.0.0", + "contractId": "sample-contract-id" + }, + "version": "1", + "endpoint": "https://demo-domain.gainsightcloud.com/v1.0/api/eventManager/event", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "gainsight", + "description": "Test 8", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "domain": "demo-domain.gainsightcloud.com", + "accessKey": "sample-access-key", + "personMap": [ + { + "from": "car", + "to": "car__gc" + } + ], + "companyMap": [], + "eventNameMap": [], + "eventVersionMap": [] + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "session_id": "3049dc4c-5a95-4ccd-a3e7-d74a7e411f22", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "anonymousId": "anon_id", + "type": "identify", + "traits": { + "name": "Bruce Wayne", + "email": "ceo@waynefoundation.com", + "car": "Batmobile", + "comments": "I am Batman!", + "lastName": "Wayne", + "location": "Gotham Central", + "firstName": "Bruce", + "linkedinUrl": "https://www.linkedin.com/in/notyourBatman/" + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "body": { + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {}, + "JSON": { + "Name": "Bruce Wayne", + "Email": "ceo@waynefoundation.com", + "car__gc": "Batmobile", + "Comments": "I am Batman!", + "LastName": "Wayne", + "Location": "Gotham Central", + "FirstName": "Bruce", + "LinkedinUrl": "https://www.linkedin.com/in/notyourBatman/" + } + }, + "type": "REST", + "files": {}, + "method": "PUT", + "params": {}, + "headers": { + "Accesskey": "sample-access-key", + "Content-Type": "application/json" + }, + "version": "1", + "endpoint": "https://demo-domain.gainsightcloud.com/v1.0/api/people", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + } +] \ No newline at end of file diff --git a/test/integrations/destinations/gainsight/router/data.ts b/test/integrations/destinations/gainsight/router/data.ts new file mode 100644 index 0000000000..d5873e8465 --- /dev/null +++ b/test/integrations/destinations/gainsight/router/data.ts @@ -0,0 +1,451 @@ +export const data = [ + { + name: 'gainsight', + description: 'Test 0', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + "message": { + "type": "identify", + "sentAt": "2021-05-28T11:22:01.842Z", + "userId": "live-test", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.1.18", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "file:///Users/anurajguha/workspace/simple-html-test/index.html", + "path": "/Users/anurajguha/workspace/simple-html-test/index.html", + "title": "Test", + "search": "", + "tab_url": "file:///Users/anurajguha/workspace/simple-html-test/index.html", + "referrer": "$direct", + "initial_referrer": "$direct", + "referring_domain": "", + "initial_referring_domain": "" + }, + "locale": "en-GB", + "screen": { + "density": 2 + }, + "traits": { + "name": "Cosmo Krammer", + "email": "cosmo@krammer.com", + "location": "New York", + "emailOptOut": true, + "linkedinUrl": "https://linkedin.com/cosmo-krammer", + "masterAvatarTypeCode": 10 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.18" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36" + }, + "rudderId": "94d40f2f-5787-4798-8a03-34f3b02f5ede", + "messageId": "8274e525-d99c-4f55-b67a-bbc890d1444c", + "timestamp": "2021-05-28T16:52:01.859+05:30", + "receivedAt": "2021-05-28T16:52:01.859+05:30", + "request_ip": "[::1]", + "anonymousId": "1585ea2f-dddc-4d23-935f-c1196405d61e", + "integrations": { + "All": true + }, + "originalTimestamp": "2021-05-28T11:22:01.842Z" + }, + "metadata": { + "userId": "94d40f2f-5787-4798-8a03-34f3b02f5ede", + "jobId": 1, + "sourceId": "1syvMwC0K62eIb4yAV9kFJtbDEA", + "destinationId": "1syvZAuiGo4l1SIsil0TxDEx34G", + "attemptNum": 0, + "receivedAt": "2021-05-28T16:52:01.859+05:30", + "createdAt": "2021-05-28T11:22:02.463Z", + "firstAttemptedAt": "", + "transformAt": "router" + }, + "destination": { + "ID": "1syvZAuiGo4l1SIsil0TxDEx34G", + "Name": "gainsight-dev-dest", + "DestinationDefinition": { + "ID": "1syuhEt4I8jpvlwJc4lr1IiLjPu", + "Name": "GAINSIGHT", + "DisplayName": "Gainsight", + "Config": { + "destConfig": { + "defaultConfig": [ + "accessKey", + "sharedSecret", + "tenantId", + "domain", + "personMap", + "companyMap", + "topicName", + "eventNameMap", + "eventVersionMap", + "contractId" + ] + }, + "excludeKeys": [], + "includeKeys": [], + "saveDestinationResponse": true, + "secretKeys": ["accessKey", "sharedSecret"], + "supportedSourceTypes": ["android", "ios", "web", "unity", "amp", "cloud", "reactnative"], + "transformAt": "router", + "transformAtV1": "router" + }, + "ResponseRules": {} + }, + "Config": { + "accessKey": "sample-access-key", + "contractId": "", + "domain": "demo-account.gainsightcloud.com", + "sharedSecret": "", + "tenantId": "", + "topicName": "" + }, + "Enabled": true, + "Transformations": [], + "IsProcessorEnabled": true + } + }, + { + "message": { + "type": "track", + "event": "Demo Request", + "sentAt": "2021-05-28T11:52:12.893Z", + "userId": "", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.1.18", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "file:///Users/anurajguha/workspace/simple-html-test/index.html", + "path": "/Users/anurajguha/workspace/simple-html-test/index.html", + "title": "Test", + "search": "", + "tab_url": "file:///Users/anurajguha/workspace/simple-html-test/index.html", + "referrer": "$direct", + "initial_referrer": "$direct", + "referring_domain": "", + "initial_referring_domain": "" + }, + "locale": "en-GB", + "screen": { + "density": 2 + }, + "traits": {}, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.18" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36" + }, + "rudderId": "1a30a93f-916b-4c39-ad20-1ce7bbbd7754", + "messageId": "f5619b1a-8704-42a8-bab9-92bbeaa44896", + "timestamp": "2021-05-28T17:22:12.905+05:30", + "properties": { + "email": "sample@user.com", + "status": "active" + }, + "receivedAt": "2021-05-28T17:22:12.905+05:30", + "request_ip": "[::1]", + "anonymousId": "1585ea2f-dddc-4d23-935f-c1196405d61e", + "integrations": { + "All": true + }, + "originalTimestamp": "2021-05-28T11:52:12.893Z" + }, + "metadata": { + "userId": "1a30a93f-916b-4c39-ad20-1ce7bbbd7754", + "jobId": 2, + "sourceId": "1syvMwC0K62eIb4yAV9kFJtbDEA", + "destinationId": "1syvZAuiGo4l1SIsil0TxDEx34G", + "attemptNum": 0, + "receivedAt": "2021-05-28T17:22:12.905+05:30", + "createdAt": "2021-05-28T11:52:15.283Z", + "firstAttemptedAt": "", + "transformAt": "router" + }, + "destination": { + "ID": "1syvZAuiGo4l1SIsil0TxDEx34G", + "Name": "gainsight-dev-dest", + "DestinationDefinition": { + "ID": "1syuhEt4I8jpvlwJc4lr1IiLjPu", + "Name": "GAINSIGHT", + "DisplayName": "Gainsight", + "Config": { + "destConfig": { + "defaultConfig": [ + "accessKey", + "sharedSecret", + "tenantId", + "domain", + "personMap", + "companyMap", + "topicName", + "eventNameMap", + "eventVersionMap", + "contractId" + ] + }, + "excludeKeys": [], + "includeKeys": [], + "saveDestinationResponse": true, + "secretKeys": ["accessKey", "sharedSecret"], + "supportedSourceTypes": ["android", "ios", "web", "unity", "amp", "cloud", "reactnative"], + "transformAt": "router", + "transformAtV1": "router" + }, + "ResponseRules": {} + }, + "Config": { + "accessKey": "sample-access-key", + "contractId": "sample-contract-id", + "domain": "demo-account.gainsightcloud.com", + "eventNameMap": [ + { + "from": "Demo Request", + "to": "Product Demo" + } + ], + "eventVersionMap": [ + { + "from": "Demo Request", + "to": "1.0.0" + } + ], + "sharedSecret": "sample-shared-secret", + "tenantId": "sample-tenant-id", + "topicName": "Support Tickets" + }, + "Enabled": true, + "Transformations": [], + "IsProcessorEnabled": true + } + } + ], + destType: 'gainsight', + }, + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + "batchedRequest": { + "version": "1", + "type": "REST", + "method": "PUT", + "endpoint": "https://demo-account.gainsightcloud.com/v1.0/api/people", + "headers": { + "Accesskey": "sample-access-key", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "Email": "cosmo@krammer.com", + "Name": "Cosmo Krammer", + "LinkedinUrl": "https://linkedin.com/cosmo-krammer", + "Location": "New York", + "EmailOptOut": true, + "MasterAvatarTypeCode": 10 + }, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {} + }, + "metadata": [ + { + "userId": "94d40f2f-5787-4798-8a03-34f3b02f5ede", + "jobId": 1, + "sourceId": "1syvMwC0K62eIb4yAV9kFJtbDEA", + "destinationId": "1syvZAuiGo4l1SIsil0TxDEx34G", + "attemptNum": 0, + "receivedAt": "2021-05-28T16:52:01.859+05:30", + "createdAt": "2021-05-28T11:22:02.463Z", + "firstAttemptedAt": "", + "transformAt": "router" + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "ID": "1syvZAuiGo4l1SIsil0TxDEx34G", + "Name": "gainsight-dev-dest", + "DestinationDefinition": { + "ID": "1syuhEt4I8jpvlwJc4lr1IiLjPu", + "Name": "GAINSIGHT", + "DisplayName": "Gainsight", + "Config": { + "destConfig": { + "defaultConfig": [ + "accessKey", + "sharedSecret", + "tenantId", + "domain", + "personMap", + "companyMap", + "topicName", + "eventNameMap", + "eventVersionMap", + "contractId" + ] + }, + "excludeKeys": [], + "includeKeys": [], + "saveDestinationResponse": true, + "secretKeys": ["accessKey", "sharedSecret"], + "supportedSourceTypes": ["android", "ios", "web", "unity", "amp", "cloud", "reactnative"], + "transformAt": "router", + "transformAtV1": "router" + }, + "ResponseRules": {} + }, + "Config": { + "accessKey": "sample-access-key", + "contractId": "", + "domain": "demo-account.gainsightcloud.com", + "sharedSecret": "", + "tenantId": "", + "topicName": "" + }, + "Enabled": true, + "Transformations": [], + "IsProcessorEnabled": true + } + }, + { + "batchedRequest": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://demo-account.gainsightcloud.com/v1.0/api/eventManager/event", + "headers": { + "sharedSecret": "sample-shared-secret", + "topicName": "Support Tickets", + "tenantId": "sample-tenant-id", + "Content-Type": "application/json", + "eventName": "Product Demo", + "eventVersion": "1.0.0", + "contractId": "sample-contract-id", + "Accesskey": "sample-access-key" + }, + "params": {}, + "body": { + "JSON": { + "email": "sample@user.com", + "status": "active" + }, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {} + }, + "metadata": [ + { + "userId": "1a30a93f-916b-4c39-ad20-1ce7bbbd7754", + "jobId": 2, + "sourceId": "1syvMwC0K62eIb4yAV9kFJtbDEA", + "destinationId": "1syvZAuiGo4l1SIsil0TxDEx34G", + "attemptNum": 0, + "receivedAt": "2021-05-28T17:22:12.905+05:30", + "createdAt": "2021-05-28T11:52:15.283Z", + "firstAttemptedAt": "", + "transformAt": "router" + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "ID": "1syvZAuiGo4l1SIsil0TxDEx34G", + "Name": "gainsight-dev-dest", + "DestinationDefinition": { + "ID": "1syuhEt4I8jpvlwJc4lr1IiLjPu", + "Name": "GAINSIGHT", + "DisplayName": "Gainsight", + "Config": { + "destConfig": { + "defaultConfig": [ + "accessKey", + "sharedSecret", + "tenantId", + "domain", + "personMap", + "companyMap", + "topicName", + "eventNameMap", + "eventVersionMap", + "contractId" + ] + }, + "excludeKeys": [], + "includeKeys": [], + "saveDestinationResponse": true, + "secretKeys": ["accessKey", "sharedSecret"], + "supportedSourceTypes": ["android", "ios", "web", "unity", "amp", "cloud", "reactnative"], + "transformAt": "router", + "transformAtV1": "router" + }, + "ResponseRules": {} + }, + "Config": { + "accessKey": "sample-access-key", + "contractId": "sample-contract-id", + "domain": "demo-account.gainsightcloud.com", + "eventNameMap": [ + { + "from": "Demo Request", + "to": "Product Demo" + } + ], + "eventVersionMap": [ + { + "from": "Demo Request", + "to": "1.0.0" + } + ], + "sharedSecret": "sample-shared-secret", + "tenantId": "sample-tenant-id", + "topicName": "Support Tickets" + }, + "Enabled": true, + "Transformations": [], + "IsProcessorEnabled": true + } + } + ], + }, + }, + }, + }, +]; diff --git a/test/integrations/destinations/gainsight_px/network.ts b/test/integrations/destinations/gainsight_px/network.ts new file mode 100644 index 0000000000..d9dd6bbaa0 --- /dev/null +++ b/test/integrations/destinations/gainsight_px/network.ts @@ -0,0 +1,222 @@ +export const networkCallsData = [ + { + httpReq: { + url: 'https://api.aptrinsic.com/v1/users/sample-user-id', + method: 'GET', + }, + httpRes: { + data: { + "aptrinsicId": "347c4c87-98c7-4ca6-a6da-678ed6924c22", + "identifyId": "sample-user-id", + "type": "USER", + "gender": "MALE", + "email": "user@email.com", + "firstName": "Sample", + "lastName": "User", + "lastSeenDate": 0, + "signUpDate": 1624431528295, + "firstVisitDate": 0, + "title": "engineer", + "phone": "", + "score": 0, + "role": "", + "subscriptionId": "", + "accountId": "", + "numberOfVisits": 1, + "location": { + "countryName": "USA", + "countryCode": "US", + "stateName": "", + "stateCode": "", + "city": "New York", + "street": "", + "postalCode": "", + "continent": "", + "regionName": "", + "timeZone": "", + "coordinates": { + "latitude": 0.0, + "longitude": 0.0 + } + }, + "propertyKeys": ["AP-XABC-123"], + "createDate": 1624431528295, + "lastModifiedDate": 1624431528295, + "customAttributes": null, + "globalUnsubscribe": false, + "sfdcContactId": "", + "lastVisitedUserAgentData": null, + "id": "sample-user-id", + "lastInferredLocation": { + "countryName": "", + "countryCode": "", + "stateName": "", + "stateCode": "", + "city": "", + "street": "", + "postalCode": "", + "continent": "", + "regionName": "", + "timeZone": "", + "coordinates": { + "latitude": 0.0, + "longitude": 0.0 + } + } + }, + status: 200 + }, + }, + { + httpReq: { + url: 'https://api.aptrinsic.com/v1/accounts/ecorp-id', + method: 'GET', + }, + httpRes: { + data: { + "id": "ecorp-id", + "name": "ECorp", + "trackedSubscriptionId": "", + "sfdcId": "", + "lastSeenDate": 0, + "dunsNumber": "", + "industry": "software", + "numberOfEmployees": 400, + "sicCode": "", + "website": "www.ecorp.com", + "naicsCode": "", + "plan": "premium", + "location": { + "countryName": "", + "countryCode": "", + "stateName": "", + "stateCode": "", + "city": "", + "street": "", + "postalCode": "", + "continent": "", + "regionName": "", + "timeZone": "", + "coordinates": { + "latitude": 0.0, + "longitude": 0.0 + } + }, + "numberOfUsers": 0, + "propertyKeys": ["AP-XABC-123"], + "createDate": 1624261864923, + "lastModifiedDate": 1624261864923, + "customAttributes": null, + "parentGroupId": "" + }, + status: 200 + }, + }, + { + httpReq: { + url: 'https://api.aptrinsic.com/v1/accounts/ecorp-id', + method: 'PUT', + }, + httpRes: { + data: { + "id": "ecorp-id", + "name": "ECorp", + "trackedSubscriptionId": "", + "sfdcId": "", + "lastSeenDate": 0, + "dunsNumber": "", + "industry": "software", + "numberOfEmployees": 400, + "sicCode": "", + "website": "www.ecorp.com", + "naicsCode": "", + "plan": "premium", + "location": { + "countryName": "", + "countryCode": "", + "stateName": "", + "stateCode": "", + "city": "", + "street": "", + "postalCode": "", + "continent": "", + "regionName": "", + "timeZone": "", + "coordinates": { + "latitude": 0.0, + "longitude": 0.0 + } + }, + "numberOfUsers": 0, + "propertyKeys": ["AP-XABC-123"], + "createDate": 1624261864923, + "lastModifiedDate": 1624261864923, + "customAttributes": null, + "parentGroupId": "" + }, + status: 204 + }, + }, + { + httpReq: { + url: 'https://api.aptrinsic.com/v1/users/absent-id', + method: 'GET', + }, + httpRes: { + data: { + externalapierror: { + status: "NOT_FOUND", + message: "User was not found for parameters {id=absent-id}", + debugMessage: null, + subErrors: null + } + }, + status: 404 + }, + }, + { + httpReq: { + url: 'https://api.aptrinsic.com/v1/users/stanley-kubrick', + method: 'GET', + }, + httpRes: { + data: { + "id": "ecorp-id", + "name": "ECorp", + "trackedSubscriptionId": "", + "sfdcId": "", + "lastSeenDate": 0, + "dunsNumber": "", + "industry": "software", + "numberOfEmployees": 400, + "sicCode": "", + "website": "www.ecorp.com", + "naicsCode": "", + "plan": "premium", + "location": { + "countryName": "", + "countryCode": "", + "stateName": "", + "stateCode": "", + "city": "", + "street": "", + "postalCode": "", + "continent": "", + "regionName": "", + "timeZone": "", + "coordinates": { + "latitude": 0.0, + "longitude": 0.0 + } + }, + "numberOfUsers": 0, + "propertyKeys": ["AP-XABC-123"], + "createDate": 1624261864923, + "lastModifiedDate": 1624261864923, + "customAttributes": null, + "parentGroupId": "" + }, + status: 200 + }, + } +]; diff --git a/test/integrations/destinations/gainsight_px/processor/data.ts b/test/integrations/destinations/gainsight_px/processor/data.ts new file mode 100644 index 0000000000..3dfe86aa98 --- /dev/null +++ b/test/integrations/destinations/gainsight_px/processor/data.ts @@ -0,0 +1,2165 @@ +export const data = [ + { + name: 'gainsight_px', + description: 'Test 0', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'sample-api-key', + productTagKey: 'AP-XABC-123', + accountAttributeMap: [ + { + from: '', + to: '', + }, + ], + userAttributeMap: [ + { + from: '', + to: '', + }, + ], + globalContextMap: [ + { + from: 'projectId', + to: 'p-123', + }, + { + from: 'tag', + to: 'sample-category-tag', + }, + ], + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + userId: 'sample-user-id', + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: 'sample-anon-id', + type: 'track', + event: 'Product Added', + properties: { + product_id: '123', + sku: 'F16', + category: 'Games', + name: 'Game', + brand: 'Gamepro', + variant: '111', + price: 13.49, + quantity: 11, + coupon: 'DISC21', + position: 1, + url: 'https://www.website.com/product/path', + image_url: 'https://www.website.com/product/path.png', + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + attributes: { + product_id: '123', + sku: 'F16', + category: 'Games', + name: 'Game', + brand: 'Gamepro', + variant: '111', + price: 13.49, + quantity: 11, + coupon: 'DISC21', + position: 1, + url: 'https://www.website.com/product/path', + image_url: 'https://www.website.com/product/path.png', + }, + propertyKey: 'AP-XABC-123', + userType: 'USER', + identifyId: 'sample-user-id', + date: 1571043797562, + eventName: 'Product Added', + globalContext: { + projectId: 'p-123', + tag: 'sample-category-tag', + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + headers: { + 'X-APTRINSIC-API-KEY': 'sample-api-key', + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api.aptrinsic.com/v1/events/custom', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'gainsight_px', + description: 'Test 1', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'sample-api-key', + productTagKey: 'AP-XABC-123', + accountAttributeMap: [ + { + from: '', + to: '', + }, + ], + userAttributeMap: [ + { + from: '', + to: '', + }, + ], + globalContextMap: [ + { + from: 'projectId', + to: 'p-123', + }, + { + from: 'tag', + to: 'sample-category-tag', + }, + ], + }, + }, + message: { + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + version: '1.27.0', + namespace: 'com.rudderlabs.javascript', + }, + page: { + url: 'http://127.0.0.1:8887/', + path: '/', + title: 'RudderStack in 5', + search: '', + tab_url: 'http://127.0.0.1:8887/', + referrer: '$direct', + initial_referrer: '$direct', + referring_domain: '', + initial_referring_domain: '', + }, + locale: 'en-US', + screen: { + width: 1512, + height: 982, + density: 2, + innerWidth: 774, + innerHeight: 774, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.27.0', + }, + campaign: {}, + sessionId: 1679967592314, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36', + properties: { + email: '84@84.com', + price: '56.0', + quantity: '5', + }, + }, + userId: 'sample-user-id', + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: 'sample-anon-id', + type: 'track', + event: 'Marketing - Plan Change Events', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + attributes: {}, + url: 'http://127.0.0.1:8887/', + propertyKey: 'AP-XABC-123', + userType: 'USER', + identifyId: 'sample-user-id', + referrer: '$direct', + date: 1571043797562, + sessionId: 1679967592314, + eventName: 'Marketing - Plan Change Events', + globalContext: { + projectId: 'p-123', + tag: 'sample-category-tag', + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + headers: { + 'X-APTRINSIC-API-KEY': 'sample-api-key', + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api.aptrinsic.com/v1/events/custom', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'gainsight_px', + description: 'Test 2', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'sample-api-key', + productTagKey: 'AP-XABC-123', + accountAttributeMap: [ + { + from: '', + to: '', + }, + ], + userAttributeMap: [ + { + from: '', + to: '', + }, + ], + globalContextMap: [ + { + from: 'projectId', + to: 'p-123', + }, + { + from: 'tag', + to: 'sample-category-tag', + }, + ], + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + userId: 'sample-user-id', + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: 'sample-anon-id', + type: 'track', + event: 'Track Me', + properties: { + description: 'Sample Track call', + globalContext: { + testOverride: 'some-value', + }, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + attributes: { + description: 'Sample Track call', + }, + propertyKey: 'AP-XABC-123', + userType: 'USER', + identifyId: 'sample-user-id', + date: 1571043797562, + eventName: 'Track Me', + globalContext: { + testOverride: 'some-value', + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + headers: { + 'X-APTRINSIC-API-KEY': 'sample-api-key', + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api.aptrinsic.com/v1/events/custom', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'gainsight_px', + description: 'Test 3', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'sample-api-key', + productTagKey: 'AP-XABC-123', + accountAttributeMap: [ + { + from: '', + to: '', + }, + ], + userAttributeMap: [ + { + from: 'hobbyCustomField', + to: 'hobby', + }, + ], + globalContextMap: [], + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + userId: 'sample-user-id', + anonymousId: 'sample-anon-id', + type: 'identify', + traits: { + type: 'USER', + gender: 'MALE', + email: 'user@email.com', + firstName: 'Sample', + lastName: 'User', + signUpDate: 1624431528295, + title: 'engineer', + countryName: 'USA', + countryCode: 'US', + city: 'New York', + hobbyCustomField: 'Sample Hobby', + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + type: 'USER', + gender: 'MALE', + email: 'user@email.com', + firstName: 'Sample', + lastName: 'User', + signUpDate: 1624431528295, + title: 'engineer', + propertyKeys: ['AP-XABC-123'], + location: { + countryName: 'USA', + countryCode: 'US', + city: 'New York', + }, + customAttributes: { + hobby: 'Sample Hobby', + }, + }, + }, + type: 'REST', + files: {}, + method: 'PUT', + params: {}, + headers: { + 'X-APTRINSIC-API-KEY': 'sample-api-key', + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api.aptrinsic.com/v1/users/sample-user-id', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'gainsight_px', + description: 'Test 4', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'sample-api-key', + productTagKey: 'AP-XABC-123', + accountAttributeMap: [ + { + from: '', + to: '', + }, + ], + userAttributeMap: [], + globalContextMap: [], + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + type: 'USER', + gender: 'MALE', + email: 'user@email.com', + firstName: 'Sample', + lastName: 'User', + medium: null, + }, + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: 'sample-anon-id', + userId: 'sample-user-id', + groupId: 'ecorp-id', + type: 'group', + traits: { + name: 'ECorp', + industry: 'software', + numberOfEmployees: 400, + website: 'www.ecorp.com', + plan: 'premium', + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + accountId: 'ecorp-id', + }, + }, + type: 'REST', + files: {}, + method: 'PUT', + params: {}, + headers: { + 'X-APTRINSIC-API-KEY': 'sample-api-key', + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api.aptrinsic.com/v1/users/sample-user-id', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'gainsight_px', + description: 'Test 5', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'sample-api-key', + productTagKey: 'AP-XABC-123', + accountAttributeMap: [ + { + from: '', + to: '', + }, + ], + userAttributeMap: [ + { + from: 'hobbyCustomField', + to: 'hobby', + }, + ], + globalContextMap: [], + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + type: 'identify', + traits: { + type: 'USER', + gender: 'MALE', + email: 'user@email.com', + firstName: 'Sample', + lastName: 'User', + signUpDate: 1624431528295, + title: 'engineer', + countryName: 'USA', + countryCode: 'US', + city: 'New York', + hobbyCustomField: 'Sample Hobby', + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'userId or anonymousId is required for identify', + statTags: { + destType: 'GAINSIGHT_PX', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'gainsight_px', + description: 'Test 6', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'sample-api-key', + productTagKey: 'AP-XABC-123', + accountAttributeMap: [ + { + from: '', + to: '', + }, + ], + userAttributeMap: [ + { + from: '', + to: '', + }, + ], + globalContextMap: [ + { + from: 'projectId', + to: 'p-123', + }, + { + from: 'tag', + to: 'sample-category-tag', + }, + ], + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + type: 'track', + event: 'Product Added', + properties: { + product_id: '123', + sku: 'F16', + category: 'Games', + name: 'Game', + brand: 'Gamepro', + variant: '111', + price: 13.49, + quantity: 11, + coupon: 'DISC21', + position: 1, + url: 'https://www.website.com/product/path', + image_url: 'https://www.website.com/product/path.png', + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Missing required value from "userId"', + statTags: { + destType: 'GAINSIGHT_PX', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'gainsight_px', + description: 'Test 7', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'sample-api-key', + productTagKey: 'AP-XABC-123', + accountAttributeMap: [ + { + from: '', + to: '', + }, + ], + userAttributeMap: [], + globalContextMap: [], + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + type: 'USER', + gender: 'MALE', + email: 'user@email.com', + firstName: 'Sample', + lastName: 'User', + }, + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: 'sample-anon-id', + userId: 'sample-user-id', + type: 'group', + traits: { + name: 'ECorp', + industry: 'software', + numberOfEmployees: 400, + website: 'www.ecorp.com', + plan: 'premium', + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'groupId is required for group', + statTags: { + destType: 'GAINSIGHT_PX', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'gainsight_px', + description: 'Test 8', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'sample-api-key', + productTagKey: 'AP-XABC-123', + accountAttributeMap: [ + { + from: '', + to: '', + }, + ], + userAttributeMap: [ + { + from: '', + to: '', + }, + ], + globalContextMap: [ + { + from: 'projectId', + to: 'p-123', + }, + { + from: 'tag', + to: 'sample-category-tag', + }, + ], + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + userId: 'sample-user-id', + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: 'sample-anon-id', + type: 'track', + event: 'Stringify Test', + properties: { + description: 'Stringify test for object values', + nested: { + a: [1, 2, 3], + b: { + c: 1, + }, + }, + arr: [1, 2, 3], + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + attributes: { + description: 'Stringify test for object values', + nested: '{"a":[1,2,3],"b":{"c":1}}', + arr: '[1,2,3]', + }, + propertyKey: 'AP-XABC-123', + userType: 'USER', + identifyId: 'sample-user-id', + date: 1571043797562, + eventName: 'Stringify Test', + globalContext: { + projectId: 'p-123', + tag: 'sample-category-tag', + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + headers: { + 'X-APTRINSIC-API-KEY': 'sample-api-key', + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api.aptrinsic.com/v1/events/custom', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'gainsight_px', + description: 'Test 9', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'sample-api-key', + productTagKey: 'AP-XABC-123', + accountAttributeMap: [ + { + from: '', + to: '', + }, + ], + userAttributeMap: [ + { + from: '', + to: '', + }, + ], + globalContextMap: [ + { + from: 'projectId', + to: 'p-123', + }, + { + from: 'tag', + to: 'sample-category-tag', + }, + ], + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + userId: 'sample-user-id', + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: 'sample-anon-id', + type: 'track', + event: 'Stringify Test', + properties: { + description: 'Stringify test for object values', + nested: { + a: [1, 2, 3], + b: { + c: 1, + }, + }, + arr: [1, 2, 3], + globalContext: { + someKey: 'someVal', + }, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + attributes: { + description: 'Stringify test for object values', + nested: '{"a":[1,2,3],"b":{"c":1}}', + arr: '[1,2,3]', + }, + propertyKey: 'AP-XABC-123', + userType: 'USER', + identifyId: 'sample-user-id', + date: 1571043797562, + eventName: 'Stringify Test', + globalContext: { + someKey: 'someVal', + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + headers: { + 'X-APTRINSIC-API-KEY': 'sample-api-key', + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api.aptrinsic.com/v1/events/custom', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'gainsight_px', + description: 'Test 10', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'sample-api-key', + productTagKey: 'AP-XABC-123', + accountAttributeMap: [ + { + from: '', + to: '', + }, + ], + userAttributeMap: [], + globalContextMap: [], + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + type: 'USER', + gender: 'MALE', + email: 'user@email.com', + firstName: 'Sample', + lastName: 'User', + }, + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: 'sample-anon-id', + userId: 'absent-id', + groupId: 'ecorp-id', + type: 'group', + traits: { + name: 'ECorp', + industry: 'software', + numberOfEmployees: 400, + website: 'www.ecorp.com', + plan: 'premium', + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: + 'aborting group call: {"status":"NOT_FOUND","message":"User was not found for parameters {id=absent-id}","debugMessage":null,"subErrors":null}', + statTags: { + destType: 'GAINSIGHT_PX', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'gainsight_px', + description: 'Test 11', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'sample-api-key', + productTagKey: 'AP-XABC-123', + accountAttributeMap: [ + { + from: '', + to: '', + }, + ], + userAttributeMap: [ + { + from: 'hobbyCustomField', + to: 'hobby', + }, + ], + globalContextMap: [], + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + userId: 'absent-id', + anonymousId: 'sample-anon-id', + type: 'identify', + traits: { + type: 'USER', + gender: 'MALE', + email: 'user@email.com', + firstName: 'Sample', + lastName: 'User', + signUpDate: 1624431528295, + title: 'engineer', + countryName: 'USA', + countryCode: 'US', + city: 'New York', + hobbyCustomField: 'Sample Hobby', + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + identifyId: 'absent-id', + type: 'USER', + gender: 'MALE', + email: 'user@email.com', + firstName: 'Sample', + lastName: 'User', + signUpDate: 1624431528295, + createDate: 1571043797562, + title: 'engineer', + propertyKeys: ['AP-XABC-123'], + location: { + countryName: 'USA', + countryCode: 'US', + city: 'New York', + }, + customAttributes: { + hobby: 'Sample Hobby', + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + headers: { + 'X-APTRINSIC-API-KEY': 'sample-api-key', + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api.aptrinsic.com/v1/users', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'gainsight_px', + description: 'Test 12', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'sample-api-key', + productTagKey: 'AP-XABC-123', + accountAttributeMap: [ + { + from: '', + to: '', + }, + ], + userAttributeMap: [ + { + from: '', + to: '', + }, + ], + globalContextMap: [], + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + userId: 'absent-id', + anonymousId: 'sample-anon-id', + type: 'identify', + traits: { + type: 'USER', + gender: 'MALE', + email: 'user@email.com', + firstName: 'Sample', + lastName: 'User', + signUpDate: 1624431528295, + title: 'engineer', + countryName: 'USA', + countryCode: 'US', + city: 'New York', + hobbyCustomField: 'Sample Hobby', + accountId: 1234, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + identifyId: 'absent-id', + type: 'USER', + gender: 'MALE', + email: 'user@email.com', + firstName: 'Sample', + lastName: 'User', + signUpDate: 1624431528295, + createDate: 1571043797562, + title: 'engineer', + propertyKeys: ['AP-XABC-123'], + accountId: '1234', + location: { + countryName: 'USA', + countryCode: 'US', + city: 'New York', + }, + customAttributes: {}, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + headers: { + 'X-APTRINSIC-API-KEY': 'sample-api-key', + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api.aptrinsic.com/v1/users', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'gainsight_px', + description: 'Test 13', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'sample-api-key', + productTagKey: 'AP-XABC-123', + accountAttributeMap: [ + { + from: '', + to: '', + }, + ], + userAttributeMap: [], + globalContextMap: [], + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + type: 'USER', + gender: 'MALE', + email: 'user@email.com', + firstName: 'Sample', + lastName: 'User', + }, + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: 'sample-anon-id', + userId: 'absent-id', + groupId: 'ecorp-id', + type: 'group', + traits: { + name: 'ECorp', + industry: 'software', + numberOfEmployees: 400, + website: 'www.ecorp.com', + plan: 'premium', + term: null, + }, + integrations: { + All: true, + GAINSIGHT_PX: { + limitAPIForGroup: true, + }, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'PUT', + endpoint: 'https://api.aptrinsic.com/v1/users/absent-id', + headers: { + 'X-APTRINSIC-API-KEY': 'sample-api-key', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + accountId: 'ecorp-id', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'gainsight_px', + description: 'Test 14 : existing user with no createdAt field in traits but signUpDate exists', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'sample-api-key', + productTagKey: 'AP-XABC-123', + accountAttributeMap: [ + { + from: '', + to: '', + }, + ], + userAttributeMap: [ + { + from: 'hobbyCustomField', + to: 'hobby', + }, + ], + globalContextMap: [], + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + userId: 'sample-user-id', + anonymousId: 'sample-anon-id', + type: 'identify', + traits: { + type: 'USER', + gender: 'MALE', + email: 'user@email.com', + firstName: 'Sample', + lastName: 'User', + signUpDate: 1624431528295, + title: 'engineer', + countryName: 'USA', + countryCode: 'US', + city: 'New York', + hobbyCustomField: 'Sample Hobby', + term: null, + campaign: '', + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + type: 'USER', + gender: 'MALE', + email: 'user@email.com', + firstName: 'Sample', + lastName: 'User', + signUpDate: 1624431528295, + title: 'engineer', + propertyKeys: ['AP-XABC-123'], + location: { + countryName: 'USA', + countryCode: 'US', + city: 'New York', + }, + customAttributes: { + hobby: 'Sample Hobby', + }, + }, + }, + type: 'REST', + files: {}, + method: 'PUT', + params: {}, + headers: { + 'X-APTRINSIC-API-KEY': 'sample-api-key', + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api.aptrinsic.com/v1/users/sample-user-id', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'gainsight_px', + description: 'Test 15 : new user with no signUpDate and createDate in traits', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'sample-api-key', + productTagKey: 'AP-XABC-123', + accountAttributeMap: [ + { + from: '', + to: '', + }, + ], + userAttributeMap: [ + { + from: 'hobbyCustomField', + to: 'hobby', + }, + ], + globalContextMap: [], + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + userId: 'absent-id', + anonymousId: 'sample-anon-id', + type: 'identify', + traits: { + type: 'USER', + gender: 'MALE', + email: 'user@email.com', + firstName: 'Sample', + lastName: 'User', + title: 'engineer', + countryName: 'USA', + countryCode: 'US', + city: 'New York', + hobbyCustomField: 'Sample Hobby', + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + JSON: { + identifyId: 'absent-id', + type: 'USER', + gender: 'MALE', + email: 'user@email.com', + firstName: 'Sample', + lastName: 'User', + signUpDate: 1571043797562, + createDate: 1571043797562, + title: 'engineer', + propertyKeys: ['AP-XABC-123'], + location: { + countryName: 'USA', + countryCode: 'US', + city: 'New York', + }, + customAttributes: { + hobby: 'Sample Hobby', + }, + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + headers: { + 'X-APTRINSIC-API-KEY': 'sample-api-key', + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api.aptrinsic.com/v1/users', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'gainsight_px', + description: 'Test 16 : existing user with no signUpDate and createDate in traits', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1uLy1tqsoo9RhL1zLiqLQTKBIKL', + Name: 'gainsight-px-dest', + DestinationDefinition: { + ID: '1uLuOdwPCqtei55ZKXewwPhjQPf', + Name: 'GAINSIGHT_PX', + DisplayName: 'Gainsight PX', + Config: { + destConfig: { + defaultConfig: [ + 'apiKey', + 'productTagKey', + 'userAttributeMap', + 'accountAttributeMap', + 'globalContextMap', + ], + }, + excludeKeys: [], + includeKeys: [], + saveDestinationResponse: true, + secretKeys: ['apiKey', 'productTagKey'], + supportedSourceTypes: [ + 'android', + 'ios', + 'web', + 'unity', + 'amp', + 'cloud', + 'reactnative', + 'flutter', + ], + transformAt: 'router', + transformAtV1: 'router', + }, + ResponseRules: {}, + }, + Config: { + accountAttributeMap: [ + { + from: 'cultureCustomField', + to: 'culture', + }, + ], + apiKey: 'sample-api-key', + eventDelivery: false, + eventDeliveryTS: 1624472902670, + globalContextMap: [ + { + from: 'kubrickTest', + to: 'value', + }, + ], + productTagKey: 'AP-SAMPLE-2', + userAttributeMap: [ + { + from: 'hobbyCustomField', + to: 'hobby', + }, + ], + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + message: { + type: 'identify', + sentAt: '2021-06-25T08:59:52.891Z', + userId: 'stanley-kubrick', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.18', + namespace: 'com.rudderlabs.javascript', + }, + page: { + title: 'Test', + search: '', + path: 'index.html', + url: 'http://127.0.0.1:3003/index.html', + tab_url: 'http://127.0.0.1:3003/index.html', + referrer: '$direct', + initial_referrer: '$direct', + referring_domain: '', + initial_referring_domain: '', + }, + locale: 'en-GB', + screen: { + width: 1920, + height: 1080, + density: 1, + innerWidth: 1920, + innerHeight: 436, + }, + traits: { + name: 'Stanley Kubrick', + email: 'stanley@kubrick.com', + score: 100, + title: 'Director/Film Maker', + gender: 'Male', + countryCode: 'US', + countryName: 'USA', + hobbyCustomField: 'Making films. Being a genius', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.18', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36', + }, + rudderId: '9a7820d0-0ff2-4451-b655-682cec15cbd2', + messageId: 'ff90d62e-a6e3-4e23-af20-03b4a249ef48', + timestamp: '2021-06-25T14:29:52.911+05:30', + receivedAt: '2021-06-25T14:29:52.911+05:30', + request_ip: '[::1]', + anonymousId: '1585ea2f-dddc-4d23-935f-c1196405d61e', + integrations: { + All: true, + }, + originalTimestamp: '2021-06-25T08:59:52.891Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'PUT', + endpoint: 'https://api.aptrinsic.com/v1/users/stanley-kubrick', + userId: '', + headers: { + 'X-APTRINSIC-API-KEY': 'sample-api-key', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + email: 'stanley@kubrick.com', + gender: 'MALE', + title: 'Director/Film Maker', + score: 100, + location: { + countryName: 'USA', + countryCode: 'US', + }, + firstName: 'Stanley', + lastName: 'Kubrick', + customAttributes: { + hobby: 'Making films. Being a genius', + }, + propertyKeys: ['AP-SAMPLE-2'], + type: 'USER', + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + }, + statusCode: 200, + }, + ], + }, + }, + }, +]; diff --git a/test/integrations/destinations/gainsight_px/router/data.ts b/test/integrations/destinations/gainsight_px/router/data.ts new file mode 100644 index 0000000000..3b735c5b69 --- /dev/null +++ b/test/integrations/destinations/gainsight_px/router/data.ts @@ -0,0 +1,557 @@ +export const data = [ + { + name: 'gainsight_px', + description: 'Test 0', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + message: { + type: 'identify', + sentAt: '2021-06-25T08:59:52.891Z', + userId: 'stanley-kubrick', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.18', + namespace: 'com.rudderlabs.javascript', + }, + page: { + title: 'Test', + search: '', + path: 'index.html', + url: 'http://127.0.0.1:3003/index.html', + tab_url: 'http://127.0.0.1:3003/index.html', + referrer: '$direct', + initial_referrer: '$direct', + referring_domain: '', + initial_referring_domain: '', + }, + locale: 'en-GB', + screen: { + width: 1920, + height: 1080, + density: 1, + innerWidth: 1920, + innerHeight: 436, + }, + traits: { + name: 'Stanley Kubrick', + email: 'stanley@kubrick.com', + score: 100, + title: 'Director/Film Maker', + gender: 'Male', + countryCode: 'US', + countryName: 'USA', + hobbyCustomField: 'Making films. Being a genius', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.18', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36', + }, + rudderId: '9a7820d0-0ff2-4451-b655-682cec15cbd2', + messageId: 'ff90d62e-a6e3-4e23-af20-03b4a249ef48', + timestamp: '2021-06-25T14:29:52.911+05:30', + receivedAt: '2021-06-25T14:29:52.911+05:30', + request_ip: '[::1]', + anonymousId: '1585ea2f-dddc-4d23-935f-c1196405d61e', + integrations: { + All: true, + }, + originalTimestamp: '2021-06-25T08:59:52.891Z', + }, + metadata: { + userId: '9a7820d0-0ff2-4451-b655-682cec15cbd2', + jobId: 1, + sourceId: '1s9eG8UCer6YSKsD8ZlQCyLa3pj', + destinationId: '1uLy1tqsoo9RhL1zLiqLQTKBIKL', + attemptNum: 0, + receivedAt: '2021-06-25T14:29:52.911+05:30', + createdAt: '2021-06-25T08:59:56.329Z', + firstAttemptedAt: '', + transformAt: 'router', + }, + destination: { + ID: '1uLy1tqsoo9RhL1zLiqLQTKBIKL', + Name: 'gainsight-px-dest', + DestinationDefinition: { + ID: '1uLuOdwPCqtei55ZKXewwPhjQPf', + Name: 'GAINSIGHT_PX', + DisplayName: 'Gainsight PX', + Config: { + destConfig: { + defaultConfig: [ + 'apiKey', + 'productTagKey', + 'userAttributeMap', + 'accountAttributeMap', + 'globalContextMap', + ], + }, + excludeKeys: [], + includeKeys: [], + saveDestinationResponse: true, + secretKeys: ['apiKey', 'productTagKey'], + supportedSourceTypes: [ + 'android', + 'ios', + 'web', + 'unity', + 'amp', + 'cloud', + 'reactnative', + 'flutter', + ], + transformAt: 'router', + transformAtV1: 'router', + }, + ResponseRules: {}, + }, + Config: { + accountAttributeMap: [ + { + from: 'cultureCustomField', + to: 'culture', + }, + ], + apiKey: 'sample-api-key', + eventDelivery: false, + eventDeliveryTS: 1624472902670, + globalContextMap: [ + { + from: 'kubrickTest', + to: 'value', + }, + ], + productTagKey: 'AP-SAMPLE-2', + userAttributeMap: [ + { + from: 'hobbyCustomField', + to: 'hobby', + }, + ], + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + }, + { + message: { + type: 'track', + event: 'nested test2', + sentAt: '2021-06-26T10:41:22.316Z', + userId: 'adifhas9734', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.18', + namespace: 'com.rudderlabs.javascript', + }, + page: { + url: 'file:///Users/anurajguha/workspace/simple-html-test/index.html', + path: '/Users/anurajguha/workspace/simple-html-test/index.html', + title: 'Test', + search: '', + tab_url: 'file:///Users/anurajguha/workspace/simple-html-test/index.html', + referrer: '$direct', + initial_referrer: '$direct', + referring_domain: '', + initial_referring_domain: '', + }, + locale: 'en-GB', + screen: { + width: 1920, + height: 1080, + density: 1, + innerWidth: 1920, + innerHeight: 585, + }, + traits: { + name: 'Update test unique', + phone: '9900990899', + lastname: 'user6', + firstname: 'test', + previousCompany: 'testprevCompany2', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.18', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36', + }, + rudderId: 'a27a8a8a-9e81-4898-beeb-e6041fc1552d', + messageId: '595dae36-5e4f-4feb-a2e4-8a7849615d38', + timestamp: '2021-06-26T16:11:22.335+05:30', + properties: { + array: [1, 2, 3], + nested: { + json: 'test', + }, + status: 'testing', + description: 'Example track call', + fullyNested: [ + { + a: 1, + b: 2, + }, + { + a: 1, + b: [1, 2, 3], + }, + ], + }, + receivedAt: '2021-06-26T16:11:22.335+05:30', + request_ip: '[::1]', + anonymousId: '1585ea2f-dddc-4d23-935f-c1196405d61e', + integrations: { + All: true, + }, + originalTimestamp: '2021-06-26T10:41:22.316Z', + }, + metadata: { + userId: 'a27a8a8a-9e81-4898-beeb-e6041fc1552d', + jobId: 2, + sourceId: '1s9eG8UCer6YSKsD8ZlQCyLa3pj', + destinationId: '1uLy1tqsoo9RhL1zLiqLQTKBIKL', + attemptNum: 0, + receivedAt: '2021-06-26T16:11:22.335+05:30', + createdAt: '2021-06-26T10:41:24.126Z', + firstAttemptedAt: '', + transformAt: 'router', + }, + destination: { + ID: '1uLy1tqsoo9RhL1zLiqLQTKBIKL', + Name: 'gainsight-px-dest', + DestinationDefinition: { + ID: '1uLuOdwPCqtei55ZKXewwPhjQPf', + Name: 'GAINSIGHT_PX', + DisplayName: 'Gainsight PX', + Config: { + destConfig: { + defaultConfig: [ + 'apiKey', + 'productTagKey', + 'userAttributeMap', + 'accountAttributeMap', + 'globalContextMap', + ], + }, + excludeKeys: [], + includeKeys: [], + saveDestinationResponse: true, + secretKeys: ['apiKey', 'productTagKey'], + supportedSourceTypes: [ + 'android', + 'ios', + 'web', + 'unity', + 'amp', + 'cloud', + 'reactnative', + 'flutter', + ], + transformAt: 'router', + transformAtV1: 'router', + }, + ResponseRules: {}, + }, + Config: { + accountAttributeMap: [ + { + from: 'cultureCustomField', + to: 'culture', + }, + ], + apiKey: 'sample-api-key', + eventDelivery: false, + eventDeliveryTS: 1624472902670, + globalContextMap: [ + { + from: 'kubrickTest', + to: 'value', + }, + ], + productTagKey: 'AP-SAMPLE-2', + userAttributeMap: [ + { + from: 'hobbyCustomField', + to: 'hobby', + }, + ], + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + }, + ], + destType: 'gainsight_px', + }, + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'PUT', + endpoint: 'https://api.aptrinsic.com/v1/users/stanley-kubrick', + headers: { + 'X-APTRINSIC-API-KEY': 'sample-api-key', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + email: 'stanley@kubrick.com', + gender: 'MALE', + title: 'Director/Film Maker', + score: 100, + location: { + countryName: 'USA', + countryCode: 'US', + }, + firstName: 'Stanley', + lastName: 'Kubrick', + customAttributes: { + hobby: 'Making films. Being a genius', + }, + propertyKeys: ['AP-SAMPLE-2'], + type: 'USER', + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + }, + metadata: [ + { + userId: '9a7820d0-0ff2-4451-b655-682cec15cbd2', + jobId: 1, + sourceId: '1s9eG8UCer6YSKsD8ZlQCyLa3pj', + destinationId: '1uLy1tqsoo9RhL1zLiqLQTKBIKL', + attemptNum: 0, + receivedAt: '2021-06-25T14:29:52.911+05:30', + createdAt: '2021-06-25T08:59:56.329Z', + firstAttemptedAt: '', + transformAt: 'router', + }, + ], + batched: false, + statusCode: 200, + destination: { + ID: '1uLy1tqsoo9RhL1zLiqLQTKBIKL', + Name: 'gainsight-px-dest', + DestinationDefinition: { + ID: '1uLuOdwPCqtei55ZKXewwPhjQPf', + Name: 'GAINSIGHT_PX', + DisplayName: 'Gainsight PX', + Config: { + destConfig: { + defaultConfig: [ + 'apiKey', + 'productTagKey', + 'userAttributeMap', + 'accountAttributeMap', + 'globalContextMap', + ], + }, + excludeKeys: [], + includeKeys: [], + saveDestinationResponse: true, + secretKeys: ['apiKey', 'productTagKey'], + supportedSourceTypes: [ + 'android', + 'ios', + 'web', + 'unity', + 'amp', + 'cloud', + 'reactnative', + 'flutter', + ], + transformAt: 'router', + transformAtV1: 'router', + }, + ResponseRules: {}, + }, + Config: { + accountAttributeMap: [ + { + from: 'cultureCustomField', + to: 'culture', + }, + ], + apiKey: 'sample-api-key', + eventDelivery: false, + eventDeliveryTS: 1624472902670, + globalContextMap: [ + { + from: 'kubrickTest', + to: 'value', + }, + ], + productTagKey: 'AP-SAMPLE-2', + userAttributeMap: [ + { + from: 'hobbyCustomField', + to: 'hobby', + }, + ], + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + }, + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.aptrinsic.com/v1/events/custom', + headers: { + 'X-APTRINSIC-API-KEY': 'sample-api-key', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + identifyId: 'adifhas9734', + eventName: 'nested test2', + date: 1624704082335, + attributes: { + array: '[1,2,3]', + nested: '{"json":"test"}', + status: 'testing', + description: 'Example track call', + fullyNested: '[{"a":1,"b":2},{"a":1,"b":[1,2,3]}]', + }, + url: 'file:///Users/anurajguha/workspace/simple-html-test/index.html', + referrer: '$direct', + propertyKey: 'AP-SAMPLE-2', + userType: 'USER', + globalContext: { + kubrickTest: 'value', + }, + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + }, + metadata: [ + { + userId: 'a27a8a8a-9e81-4898-beeb-e6041fc1552d', + jobId: 2, + sourceId: '1s9eG8UCer6YSKsD8ZlQCyLa3pj', + destinationId: '1uLy1tqsoo9RhL1zLiqLQTKBIKL', + attemptNum: 0, + receivedAt: '2021-06-26T16:11:22.335+05:30', + createdAt: '2021-06-26T10:41:24.126Z', + firstAttemptedAt: '', + transformAt: 'router', + }, + ], + batched: false, + statusCode: 200, + destination: { + ID: '1uLy1tqsoo9RhL1zLiqLQTKBIKL', + Name: 'gainsight-px-dest', + DestinationDefinition: { + ID: '1uLuOdwPCqtei55ZKXewwPhjQPf', + Name: 'GAINSIGHT_PX', + DisplayName: 'Gainsight PX', + Config: { + destConfig: { + defaultConfig: [ + 'apiKey', + 'productTagKey', + 'userAttributeMap', + 'accountAttributeMap', + 'globalContextMap', + ], + }, + excludeKeys: [], + includeKeys: [], + saveDestinationResponse: true, + secretKeys: ['apiKey', 'productTagKey'], + supportedSourceTypes: [ + 'android', + 'ios', + 'web', + 'unity', + 'amp', + 'cloud', + 'reactnative', + 'flutter', + ], + transformAt: 'router', + transformAtV1: 'router', + }, + ResponseRules: {}, + }, + Config: { + accountAttributeMap: [ + { + from: 'cultureCustomField', + to: 'culture', + }, + ], + apiKey: 'sample-api-key', + eventDelivery: false, + eventDeliveryTS: 1624472902670, + globalContextMap: [ + { + from: 'kubrickTest', + to: 'value', + }, + ], + productTagKey: 'AP-SAMPLE-2', + userAttributeMap: [ + { + from: 'hobbyCustomField', + to: 'hobby', + }, + ], + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + }, + ], + }, + }, + }, + }, +]; diff --git a/test/integrations/destinations/google_adwords_enhanced_conversions/dataDelivery/data.ts b/test/integrations/destinations/google_adwords_enhanced_conversions/dataDelivery/data.ts index c9bfac233d..b544baaebd 100644 --- a/test/integrations/destinations/google_adwords_enhanced_conversions/dataDelivery/data.ts +++ b/test/integrations/destinations/google_adwords_enhanced_conversions/dataDelivery/data.ts @@ -1,290 +1,307 @@ export const data = [ - { - name: 'google_adwords_enhanced_conversions', - description: 'Test 0', - feature: 'dataDelivery', - module: 'destination', - version: 'v0', - input: { - request: { - body: { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/1234567890:uploadConversionAdjustments", - "headers": { - "Authorization": "Bearer abcd1234", - "Content-Type": "application/json", - "developer-token": "ijkl91011", - "login-customer-id": "0987654321" + { + name: 'google_adwords_enhanced_conversions', + description: 'Test 0', + feature: 'dataDelivery', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/1234567890:uploadConversionAdjustments', + headers: { + Authorization: 'Bearer abcd1234', + 'Content-Type': 'application/json', + 'developer-token': 'ijkl91011', + 'login-customer-id': '0987654321', + }, + params: { + event: 'Product Added', + customerId: '1234567890', + destination: 'google_adwords_enhanced_conversions', + }, + body: { + JSON: { + partialFailure: true, + conversionAdjustments: [ + { + gclidDateTimePair: { + gclid: 'gclid1234', + conversionDateTime: '2022-01-01 12:32:45-08:00', + }, + restatementValue: { + adjustedValue: 10, + currency: 'INR', + }, + order_id: '10000', + adjustmentDateTime: '2022-01-01 12:32:45-08:00', + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + userIdentifiers: [ + { + addressInfo: { + hashedFirstName: + 'a8cfcd74832004951b4408cdb0a5dbcd8c7e52d43f7fe244bf720582e05241da', + hashedLastName: + '1c574b17eefa532b6d61c963550a82d2d3dfca4a7fb69e183374cfafd5328ee4', + state: 'UK', + city: 'London', + hashedStreetAddress: + '9a4d2e50828448f137f119a3ebdbbbab8d6731234a67595fdbfeb2a2315dd550', + }, }, - "params": { - "event": "Product Added", - "customerId": "1234567890", - "destination": "google_adwords_enhanced_conversions" - }, - "body": { - "JSON": { - "partialFailure": true, - "conversionAdjustments": [ - { - "gclidDateTimePair": { - "gclid": "gclid1234", - "conversionDateTime": "2022-01-01 12:32:45-08:00" - }, - "restatementValue": { - "adjustedValue": 10, - "currency": "INR" - }, - "order_id": "10000", - "adjustmentDateTime": "2022-01-01 12:32:45-08:00", - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "userIdentifiers": [ - { - "addressInfo": { - "hashedFirstName": "a8cfcd74832004951b4408cdb0a5dbcd8c7e52d43f7fe244bf720582e05241da", - "hashedLastName": "1c574b17eefa532b6d61c963550a82d2d3dfca4a7fb69e183374cfafd5328ee4", - "state": "UK", - "city": "London", - "hashedStreetAddress": "9a4d2e50828448f137f119a3ebdbbbab8d6731234a67595fdbfeb2a2315dd550" - } - } - ], - "adjustmentType": "ENHANCEMENT" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} + ], + adjustmentType: 'ENHANCEMENT', }, - method: 'POST', + ], }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, }, - output: { - response: { - status: 401, - body: { - output: { - "message": "\"\"Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.\" during Google_adwords_enhanced_conversions response transformation\"", - "authErrorCategory": "REFRESH_TOKEN", - "destinationResponse": [ - { - "error": { - "code": 401, - "message": "Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.", - "status": "UNAUTHENTICATED" - } - } - ], - "statTags": { - "destType": "GOOGLE_ADWORDS_ENHANCED_CONVERSIONS", - "errorCategory": "network", - "destinationId": "Non-determininable", - "workspaceId": "Non-determininable", - "errorType": "aborted", - "feature": "dataDelivery", - "implementation": "native", - "module": "destination" - }, - "status": 401 - } + method: 'POST', + }, + }, + output: { + response: { + status: 401, + body: { + output: { + message: + '""Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project." during Google_adwords_enhanced_conversions response transformation"', + authErrorCategory: 'REFRESH_TOKEN', + destinationResponse: [ + { + error: { + code: 401, + message: + 'Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.', + status: 'UNAUTHENTICATED', }, + }, + ], + statTags: { + destType: 'GOOGLE_ADWORDS_ENHANCED_CONVERSIONS', + errorCategory: 'network', + destinationId: 'Non-determininable', + workspaceId: 'Non-determininable', + errorType: 'aborted', + feature: 'dataDelivery', + implementation: 'native', + module: 'destination', }, + status: 401, + }, }, + }, }, - { - name: 'google_adwords_enhanced_conversions', - description: 'Test 1', - feature: 'dataDelivery', - module: 'destination', - version: 'v0', - input: { - request: { - body: { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/1234567899:uploadConversionAdjustments", - "headers": { - "Authorization": "Bearer abcd1234", - "Content-Type": "application/json", - "developer-token": "ijkl91011", - "login-customer-id": "0987654321" + }, + { + name: 'google_adwords_enhanced_conversions', + description: 'Test 1', + feature: 'dataDelivery', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/1234567899:uploadConversionAdjustments', + headers: { + Authorization: 'Bearer abcd1234', + 'Content-Type': 'application/json', + 'developer-token': 'ijkl91011', + 'login-customer-id': '0987654321', + }, + params: { + event: 'Product Added', + customerId: '1234567899', + destination: 'google_adwords_enhanced_conversions', + }, + body: { + JSON: { + partialFailure: true, + conversionAdjustments: [ + { + gclidDateTimePair: { + gclid: 'gclid1234', + conversionDateTime: '2022-01-01 12:32:45-08:00', + }, + restatementValue: { + adjustedValue: 10, + currency: 'INR', + }, + order_id: '10000', + adjustmentDateTime: '2022-01-01 12:32:45-08:00', + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + userIdentifiers: [ + { + addressInfo: { + hashedFirstName: + 'a8cfcd74832004951b4408cdb0a5dbcd8c7e52d43f7fe244bf720582e05241da', + hashedLastName: + '1c574b17eefa532b6d61c963550a82d2d3dfca4a7fb69e183374cfafd5328ee4', + state: 'UK', + city: 'London', + hashedStreetAddress: + '9a4d2e50828448f137f119a3ebdbbbab8d6731234a67595fdbfeb2a2315dd550', + }, }, - "params": { - "event": "Product Added", - "customerId": "1234567899", - "destination": "google_adwords_enhanced_conversions" - }, - "body": { - "JSON": { - "partialFailure": true, - "conversionAdjustments": [ - { - "gclidDateTimePair": { - "gclid": "gclid1234", - "conversionDateTime": "2022-01-01 12:32:45-08:00" - }, - "restatementValue": { - "adjustedValue": 10, - "currency": "INR" - }, - "order_id": "10000", - "adjustmentDateTime": "2022-01-01 12:32:45-08:00", - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "userIdentifiers": [ - { - "addressInfo": { - "hashedFirstName": "a8cfcd74832004951b4408cdb0a5dbcd8c7e52d43f7fe244bf720582e05241da", - "hashedLastName": "1c574b17eefa532b6d61c963550a82d2d3dfca4a7fb69e183374cfafd5328ee4", - "state": "UK", - "city": "London", - "hashedStreetAddress": "9a4d2e50828448f137f119a3ebdbbbab8d6731234a67595fdbfeb2a2315dd550" - } - } - ], - "adjustmentType": "ENHANCEMENT" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} + ], + adjustmentType: 'ENHANCEMENT', }, - method: 'POST', + ], }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, }, - output: { - response: { - status: 200, - body: { - "output": { - "destinationResponse": { - "response": [ - { - "results": [ - { - "adjustmentDateTime": "2021-01-01 12:32:45-08:00", - "adjustmentType": "ENHANCEMENT", - "conversionAction": "customers/7693729833/conversionActions/874224905", - "gclidDateTimePair": { - "conversionDateTime": "2021-01-01 12:32:45-08:00", - "gclid": "1234", - }, - "orderId": "12345", - }, - ], - }, - ], - "status": 200, - }, - "message": "Request Processed Successfully", - "status": 200, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: { + destinationResponse: { + response: [ + { + results: [ + { + adjustmentDateTime: '2021-01-01 12:32:45-08:00', + adjustmentType: 'ENHANCEMENT', + conversionAction: 'customers/7693729833/conversionActions/874224905', + gclidDateTimePair: { + conversionDateTime: '2021-01-01 12:32:45-08:00', + gclid: '1234', + }, + orderId: '12345', }, + ], }, + ], + status: 200, }, + message: 'Request Processed Successfully', + status: 200, + }, }, + }, }, - { - name: 'google_adwords_enhanced_conversions', - description: 'Test 2', - feature: 'dataDelivery', - module: 'destination', - version: 'v0', - input: { - request: { - body: { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/1234567891:uploadConversionAdjustments", - "headers": { - "Authorization": "Bearer abcd1234", - "Content-Type": "application/json", - "developer-token": "ijkl91011", - "login-customer-id": "0987654321" + }, + { + name: 'google_adwords_enhanced_conversions', + description: 'Test 2', + feature: 'dataDelivery', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/1234567891:uploadConversionAdjustments', + headers: { + Authorization: 'Bearer abcd1234', + 'Content-Type': 'application/json', + 'developer-token': 'ijkl91011', + 'login-customer-id': '0987654321', + }, + params: { + event: 'Product Added', + customerId: '1234567891', + destination: 'google_adwords_enhanced_conversions', + }, + body: { + JSON: { + partialFailure: true, + conversionAdjustments: [ + { + gclidDateTimePair: { + gclid: 'gclid1234', + conversionDateTime: '2022-01-01 12:32:45-08:00', + }, + restatementValue: { + adjustedValue: 10, + currency: 'INR', + }, + order_id: '10000', + adjustmentDateTime: '2022-01-01 12:32:45-08:00', + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + userIdentifiers: [ + { + addressInfo: { + hashedFirstName: + 'a8cfcd74832004951b4408cdb0a5dbcd8c7e52d43f7fe244bf720582e05241da', + hashedLastName: + '1c574b17eefa532b6d61c963550a82d2d3dfca4a7fb69e183374cfafd5328ee4', + state: 'UK', + city: 'London', + hashedStreetAddress: + '9a4d2e50828448f137f119a3ebdbbbab8d6731234a67595fdbfeb2a2315dd550', + }, }, - "params": { - "event": "Product Added", - "customerId": "1234567891", - "destination": "google_adwords_enhanced_conversions" - }, - "body": { - "JSON": { - "partialFailure": true, - "conversionAdjustments": [ - { - "gclidDateTimePair": { - "gclid": "gclid1234", - "conversionDateTime": "2022-01-01 12:32:45-08:00" - }, - "restatementValue": { - "adjustedValue": 10, - "currency": "INR" - }, - "order_id": "10000", - "adjustmentDateTime": "2022-01-01 12:32:45-08:00", - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "userIdentifiers": [ - { - "addressInfo": { - "hashedFirstName": "a8cfcd74832004951b4408cdb0a5dbcd8c7e52d43f7fe244bf720582e05241da", - "hashedLastName": "1c574b17eefa532b6d61c963550a82d2d3dfca4a7fb69e183374cfafd5328ee4", - "state": "UK", - "city": "London", - "hashedStreetAddress": "9a4d2e50828448f137f119a3ebdbbbab8d6731234a67595fdbfeb2a2315dd550" - } - } - ], - "adjustmentType": "ENHANCEMENT" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} + ], + adjustmentType: 'ENHANCEMENT', }, - method: 'POST', + ], }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, }, - output: { - response: { - status: 400, - body: { - "output": { - "destinationResponse": [ - { - results: [ - { - "conversionAction": { - "id": 123434342, - } - } - ] - } - ], - "message": "\" during Google_adwords_enhanced_conversions response transformation", - "statTags": { - "destType": "GOOGLE_ADWORDS_ENHANCED_CONVERSIONS", - "destinationId": "Non-determininable", - "errorCategory": "network", - "errorType": "aborted", - "feature": "dataDelivery", - "implementation": "native", - "module": "destination", - "workspaceId": "Non-determininable", - }, - "status": 400, + method: 'POST', + }, + }, + output: { + response: { + status: 400, + body: { + output: { + destinationResponse: [ + { + results: [ + { + conversionAction: { + id: 123434342, }, - }, + }, + ], + }, + ], + message: '" during Google_adwords_enhanced_conversions response transformation', + statTags: { + destType: 'GOOGLE_ADWORDS_ENHANCED_CONVERSIONS', + destinationId: 'Non-determininable', + errorCategory: 'network', + errorType: 'aborted', + feature: 'dataDelivery', + implementation: 'native', + module: 'destination', + workspaceId: 'Non-determininable', }, + status: 400, + }, }, - } + }, + }, + }, ]; diff --git a/test/integrations/destinations/google_adwords_enhanced_conversions/network.ts b/test/integrations/destinations/google_adwords_enhanced_conversions/network.ts index ca49ea30ab..672cd73bf7 100644 --- a/test/integrations/destinations/google_adwords_enhanced_conversions/network.ts +++ b/test/integrations/destinations/google_adwords_enhanced_conversions/network.ts @@ -1,236 +1,276 @@ export const networkCallsData = [ - { - httpReq: { - url: 'https://googleads.googleapis.com/v14/customers/1234567890/googleAds:searchStream', - data: { - query: `SELECT conversion_action.id FROM conversion_action WHERE conversion_action.name = 'Product Added'`, - }, - headers: { - Authorization: 'Bearer abcd1234', - 'Content-Type': 'application/json', - 'developer-token': 'ijkl91011', - 'login-customer-id': '0987654321', - }, - method: 'POST', - }, - httpRes: { - "data": [ - { - "error": { - "code": 401, - "message": "Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.", - "status": "UNAUTHENTICATED" - } - } - ], - "status": 401 + { + httpReq: { + url: 'https://googleads.googleapis.com/v15/customers/1234567890/googleAds:searchStream', + data: { + query: `SELECT conversion_action.id FROM conversion_action WHERE conversion_action.name = 'Product Added'`, + }, + headers: { + Authorization: 'Bearer abcd1234', + 'Content-Type': 'application/json', + 'developer-token': 'ijkl91011', + 'login-customer-id': '0987654321', + }, + method: 'POST', + }, + httpRes: { + data: [ + { + error: { + code: 401, + message: + 'Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.', + status: 'UNAUTHENTICATED', + }, }, + ], + status: 401, }, - { - httpReq: { - url: 'https://googleads.googleapis.com/v14/customers/1234567899/googleAds:searchStream', - data: { - query: `SELECT conversion_action.id FROM conversion_action WHERE conversion_action.name = 'Product Added'` - }, - params: { destination: 'google_adwords_enhanced_conversion' }, - headers: { - Authorization: 'Bearer abcd1234', - 'Content-Type': 'application/json', - 'developer-token': 'ijkl91011', - 'login-customer-id': '0987654321', + }, + { + httpReq: { + url: 'https://googleads.googleapis.com/v15/customers/1234567899/googleAds:searchStream', + data: { + query: `SELECT conversion_action.id FROM conversion_action WHERE conversion_action.name = 'Product Added'`, + }, + params: { destination: 'google_adwords_enhanced_conversion' }, + headers: { + Authorization: 'Bearer abcd1234', + 'Content-Type': 'application/json', + 'developer-token': 'ijkl91011', + 'login-customer-id': '0987654321', + }, + method: 'POST', + }, + httpRes: { + data: [ + { + results: [ + { + conversionAction: { + id: 123434342, + }, }, - method: 'POST', - }, - httpRes: { - data: [{ - results: [{ - conversionAction: { - id: 123434342 - } - }] - }], - status: 200, + ], }, + ], + status: 200, }, - { - httpReq: { - url: 'https://googleads.googleapis.com/v14/customers/1234567899:uploadConversionAdjustments', - data: { - conversionAdjustments: [{ - adjustmentDateTime: '2022-01-01 12:32:45-08:00', - adjustmentType: 'ENHANCEMENT', - conversionAction: 'customers/1234567899/conversionActions/123434342', - gclidDateTimePair: { - conversionDateTime: '2022-01-01 12:32:45-08:00', - gclid: 'gclid1234' - }, - order_id: '10000', - restatementValue: { adjustedValue: 10, currency: 'INR' }, - userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - userIdentifiers: [{ - addressInfo: { - hashedFirstName: 'a8cfcd74832004951b4408cdb0a5dbcd8c7e52d43f7fe244bf720582e05241da', - hashedLastName: '1c574b17eefa532b6d61c963550a82d2d3dfca4a7fb69e183374cfafd5328ee4', - state: 'UK', - city: 'London', - hashedStreetAddress: '9a4d2e50828448f137f119a3ebdbbbab8d6731234a67595fdbfeb2a2315dd550' - } - }] - }], - partialFailure: true + }, + { + httpReq: { + url: 'https://googleads.googleapis.com/v15/customers/1234567899:uploadConversionAdjustments', + data: { + conversionAdjustments: [ + { + adjustmentDateTime: '2022-01-01 12:32:45-08:00', + adjustmentType: 'ENHANCEMENT', + conversionAction: 'customers/1234567899/conversionActions/123434342', + gclidDateTimePair: { + conversionDateTime: '2022-01-01 12:32:45-08:00', + gclid: 'gclid1234', }, - params: { destination: 'google_adwords_enhanced_conversion' }, - headers: { - Authorization: 'Bearer abcd1234', - 'Content-Type': 'application/json', - 'developer-token': 'ijkl91011', - 'login-customer-id': '0987654321', + order_id: '10000', + restatementValue: { adjustedValue: 10, currency: 'INR' }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + userIdentifiers: [ + { + addressInfo: { + hashedFirstName: + 'a8cfcd74832004951b4408cdb0a5dbcd8c7e52d43f7fe244bf720582e05241da', + hashedLastName: + '1c574b17eefa532b6d61c963550a82d2d3dfca4a7fb69e183374cfafd5328ee4', + state: 'UK', + city: 'London', + hashedStreetAddress: + '9a4d2e50828448f137f119a3ebdbbbab8d6731234a67595fdbfeb2a2315dd550', + }, + }, + ], + }, + ], + partialFailure: true, + }, + params: { destination: 'google_adwords_enhanced_conversion' }, + headers: { + Authorization: 'Bearer abcd1234', + 'Content-Type': 'application/json', + 'developer-token': 'ijkl91011', + 'login-customer-id': '0987654321', + }, + method: 'POST', + }, + httpRes: { + data: [ + { + results: [ + { + adjustmentType: 'ENHANCEMENT', + conversionAction: 'customers/7693729833/conversionActions/874224905', + adjustmentDateTime: '2021-01-01 12:32:45-08:00', + gclidDateTimePair: { + gclid: '1234', + conversionDateTime: '2021-01-01 12:32:45-08:00', + }, + orderId: '12345', }, - method: 'POST', - }, - httpRes: { - data: [{ - results: [{ - "adjustmentType": "ENHANCEMENT", - "conversionAction": "customers/7693729833/conversionActions/874224905", - "adjustmentDateTime": "2021-01-01 12:32:45-08:00", - "gclidDateTimePair": { - "gclid": "1234", - "conversionDateTime": "2021-01-01 12:32:45-08:00" - }, - "orderId": "12345" - }] - }], - status: 200, + ], }, + ], + status: 200, }, - { - httpReq: { - url: 'https://googleads.googleapis.com/v14/customers/1234567891/googleAds:searchStream', - data: { - query: `SELECT conversion_action.id FROM conversion_action WHERE conversion_action.name = 'Product Added'` - }, - params: { destination: 'google_adwords_enhanced_conversion' }, - headers: { - Authorization: 'Bearer abcd1234', - 'Content-Type': 'application/json', - 'developer-token': 'ijkl91011', - 'login-customer-id': '0987654321', + }, + { + httpReq: { + url: 'https://googleads.googleapis.com/v15/customers/1234567891/googleAds:searchStream', + data: { + query: `SELECT conversion_action.id FROM conversion_action WHERE conversion_action.name = 'Product Added'`, + }, + params: { destination: 'google_adwords_enhanced_conversion' }, + headers: { + Authorization: 'Bearer abcd1234', + 'Content-Type': 'application/json', + 'developer-token': 'ijkl91011', + 'login-customer-id': '0987654321', + }, + method: 'POST', + }, + httpRes: { + data: [ + { + results: [ + { + conversionAction: { + id: 123434342, + }, }, - method: 'POST', - }, - httpRes: { - data: [{ - results: [{ - conversionAction: { - id: 123434342 - } - }] - }], - status: 200, + ], }, + ], + status: 200, }, - { - httpReq: { - url: 'https://googleads.googleapis.com/v14/customers/1234567891:uploadConversionAdjustments', - data: { - conversionAdjustments: [{ - adjustmentDateTime: '2022-01-01 12:32:45-08:00', - adjustmentType: 'ENHANCEMENT', - conversionAction: 'customers/1234567891/conversionActions/123434342', - gclidDateTimePair: { - conversionDateTime: '2022-01-01 12:32:45-08:00', - gclid: 'gclid1234' - }, - order_id: '10000', - restatementValue: { adjustedValue: 10, currency: 'INR' }, - userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - userIdentifiers: [{ - addressInfo: { - hashedFirstName: 'a8cfcd74832004951b4408cdb0a5dbcd8c7e52d43f7fe244bf720582e05241da', - hashedLastName: '1c574b17eefa532b6d61c963550a82d2d3dfca4a7fb69e183374cfafd5328ee4', - state: 'UK', - city: 'London', - hashedStreetAddress: '9a4d2e50828448f137f119a3ebdbbbab8d6731234a67595fdbfeb2a2315dd550' - } - }] - }], - partialFailure: true - }, - params: { - destination: 'google_adwords_enhanced_conversion', - + }, + { + httpReq: { + url: 'https://googleads.googleapis.com/v15/customers/1234567891:uploadConversionAdjustments', + data: { + conversionAdjustments: [ + { + adjustmentDateTime: '2022-01-01 12:32:45-08:00', + adjustmentType: 'ENHANCEMENT', + conversionAction: 'customers/1234567891/conversionActions/123434342', + gclidDateTimePair: { + conversionDateTime: '2022-01-01 12:32:45-08:00', + gclid: 'gclid1234', }, - headers: { - Authorization: 'Bearer abcd1234', - 'Content-Type': 'application/json', - 'developer-token': 'ijkl91011', - 'login-customer-id': '0987654321', + order_id: '10000', + restatementValue: { adjustedValue: 10, currency: 'INR' }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + userIdentifiers: [ + { + addressInfo: { + hashedFirstName: + 'a8cfcd74832004951b4408cdb0a5dbcd8c7e52d43f7fe244bf720582e05241da', + hashedLastName: + '1c574b17eefa532b6d61c963550a82d2d3dfca4a7fb69e183374cfafd5328ee4', + state: 'UK', + city: 'London', + hashedStreetAddress: + '9a4d2e50828448f137f119a3ebdbbbab8d6731234a67595fdbfeb2a2315dd550', + }, + }, + ], + }, + ], + partialFailure: true, + }, + params: { + destination: 'google_adwords_enhanced_conversion', + }, + headers: { + Authorization: 'Bearer abcd1234', + 'Content-Type': 'application/json', + 'developer-token': 'ijkl91011', + 'login-customer-id': '0987654321', + }, + method: 'POST', + }, + httpRes: { + data: [ + { + results: [ + { + conversionAction: { + id: 123434342, + }, }, - method: 'POST', - }, - httpRes: { - data: [{ - results: [{ - conversionAction: { - id: 123434342 - } - }] - }], - status: 400, + ], }, + ], + status: 400, }, - { - httpReq: { - url: 'https://googleads.googleapis.com/v14/customers/1234567891:uploadClickConversions', - data: { - conversionAdjustments: [{ - adjustmentDateTime: '2022-01-01 12:32:45-08:00', - adjustmentType: 'ENHANCEMENT', - conversionAction: 'customers/1234567891/conversionActions/123434342', - gclidDateTimePair: { - conversionDateTime: '2022-01-01 12:32:45-08:00', - gclid: 'gclid1234' - }, - order_id: '10000', - restatementValue: { adjustedValue: 10, currency: 'INR' }, - userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - userIdentifiers: [{ - addressInfo: { - hashedFirstName: 'a8cfcd74832004951b4408cdb0a5dbcd8c7e52d43f7fe244bf720582e05241da', - hashedLastName: '1c574b17eefa532b6d61c963550a82d2d3dfca4a7fb69e183374cfafd5328ee4', - state: 'UK', - city: 'London', - hashedStreetAddress: '9a4d2e50828448f137f119a3ebdbbbab8d6731234a67595fdbfeb2a2315dd550' - } - }] - }], - partialFailure: true + }, + { + httpReq: { + url: 'https://googleads.googleapis.com/v15/customers/1234567891:uploadClickConversions', + data: { + conversionAdjustments: [ + { + adjustmentDateTime: '2022-01-01 12:32:45-08:00', + adjustmentType: 'ENHANCEMENT', + conversionAction: 'customers/1234567891/conversionActions/123434342', + gclidDateTimePair: { + conversionDateTime: '2022-01-01 12:32:45-08:00', + gclid: 'gclid1234', }, - params: { - destination: 'google_adwords_enhanced_conversion', - - }, - headers: { - Authorization: 'Bearer abcd1234', - 'Content-Type': 'application/json', - 'developer-token': 'ijkl91011', - 'login-customer-id': '0987654321', + order_id: '10000', + restatementValue: { adjustedValue: 10, currency: 'INR' }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + userIdentifiers: [ + { + addressInfo: { + hashedFirstName: + 'a8cfcd74832004951b4408cdb0a5dbcd8c7e52d43f7fe244bf720582e05241da', + hashedLastName: + '1c574b17eefa532b6d61c963550a82d2d3dfca4a7fb69e183374cfafd5328ee4', + state: 'UK', + city: 'London', + hashedStreetAddress: + '9a4d2e50828448f137f119a3ebdbbbab8d6731234a67595fdbfeb2a2315dd550', + }, + }, + ], + }, + ], + partialFailure: true, + }, + params: { + destination: 'google_adwords_enhanced_conversion', + }, + headers: { + Authorization: 'Bearer abcd1234', + 'Content-Type': 'application/json', + 'developer-token': 'ijkl91011', + 'login-customer-id': '0987654321', + }, + method: 'POST', + }, + httpRes: { + data: [ + { + results: [ + { + conversionAction: { + id: 123434342, + }, }, - method: 'POST', + ], }, - httpRes: { - data: [{ - results: [{ - conversionAction: { - id: 123434342 - } - }] - }], - status: 400, - }, - } + ], + status: 400, + }, + }, ]; - - - diff --git a/test/integrations/destinations/google_adwords_enhanced_conversions/processor/data.ts b/test/integrations/destinations/google_adwords_enhanced_conversions/processor/data.ts index 09a9b406f6..0a9542a5d5 100644 --- a/test/integrations/destinations/google_adwords_enhanced_conversions/processor/data.ts +++ b/test/integrations/destinations/google_adwords_enhanced_conversions/processor/data.ts @@ -1,1694 +1,1726 @@ export const data = [ - { - "name": "google_adwords_enhanced_conversions", - "description": "Test 0", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "metadata": { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl91011" - } - }, - "destination": { - "Config": { - "rudderAccountId": "25u5whFH7gVTnCiAjn4ykoCLGoC", - "customerId": "123-456-7890", - "subAccount": true, - "loginCustomerId": "123-456-7890", - "listOfConversions": [ - { - "conversions": "Page View" - }, - { - "conversions": "Product Added" - } - ], - "authStatus": "active" - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "phone": "912382193", - "firstName": "John", - "lastName": "Gomes", - "city": "London", - "state": "UK", - "countryCode": "us", - "streetAddress": "71 Cherry Court SOUTHAMPTON SO53 5PD UK" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "event": "Page View", - "type": "track", - "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", - "originalTimestamp": "2019-10-14T11:15:18.299Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "properties": { - "gclid": "gclid1234", - "conversionDateTime": "2022-01-01 12:32:45-08:00", - "adjustedValue": "10", - "currency": "INR", - "adjustmentDateTime": "2022-01-01 12:32:45-08:00", - "partialFailure": true, - "campaignId": "1", - "templateId": "0", - "order_id": 10000, - "total": 1000, - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "sku": "45790-32", - "name": "Monopoly: 3rd Edition", - "price": "19", - "position": "1", - "category": "cars", - "url": "https://www.example.com/product/path", - "image_url": "https://www.example.com/product/path.jpg", - "quantity": "2" - }, - { - "product_id": "507f1f77bcf86cd7994390112", - "sku": "45790-322", - "name": "Monopoly: 3rd Edition2", - "price": "192", - "quantity": 22, - "position": "12", - "category": "Cars2", - "url": "https://www.example.com/product/path2", - "image_url": "https://www.example.com/product/path.jpg2" - } - ] - }, - "integrations": { - "All": true - }, - "name": "ApplicationLoaded", - "sentAt": "2019-10-14T11:15:53.296Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/1234567890:uploadConversionAdjustments", - "headers": { - "Authorization": "Bearer abcd1234", - "Content-Type": "application/json", - "developer-token": "ijkl91011", - "login-customer-id": "1234567890" - }, - "params": { - "event": "Page View", - "customerId": "1234567890" - }, - "body": { - "JSON": { - "conversionAdjustments": [ - { - "gclidDateTimePair": { - "gclid": "gclid1234", - "conversionDateTime": "2022-01-01 12:32:45-08:00" - }, - "restatementValue": { - "adjustedValue": 10, - "currencyCode": "INR" - }, - "orderId": "10000", - "adjustmentDateTime": "2022-01-01 12:32:45-08:00", - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "userIdentifiers": [ - { - "hashedPhoneNumber": "04387707e6cbed8c4538c81cc570ed9252d579469f36c273839b26d784e4bdbe" - }, - { - "addressInfo": { - "hashedFirstName": "a8cfcd74832004951b4408cdb0a5dbcd8c7e52d43f7fe244bf720582e05241da", - "hashedLastName": "1c574b17eefa532b6d61c963550a82d2d3dfca4a7fb69e183374cfafd5328ee4", - "state": "UK", - "city": "London", - "countryCode": "us", - "hashedStreetAddress": "9a4d2e50828448f137f119a3ebdbbbab8d6731234a67595fdbfeb2a2315dd550" - } - } - ], - "adjustmentType": "ENHANCEMENT" - } - ], - "partialFailure": true - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "metadata": { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl91011" - } - }, - "statusCode": 200 - } - ] - } - } + { + name: 'google_adwords_enhanced_conversions', + description: 'Test 0', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + }, + destination: { + Config: { + rudderAccountId: '25u5whFH7gVTnCiAjn4ykoCLGoC', + customerId: '123-456-7890', + subAccount: true, + loginCustomerId: '123-456-7890', + listOfConversions: [ + { + conversions: 'Page View', + }, + { + conversions: 'Product Added', + }, + ], + authStatus: 'active', + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + phone: '912382193', + firstName: 'John', + lastName: 'Gomes', + city: 'London', + state: 'UK', + countryCode: 'us', + streetAddress: '71 Cherry Court SOUTHAMPTON SO53 5PD UK', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + event: 'Page View', + type: 'track', + messageId: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', + originalTimestamp: '2019-10-14T11:15:18.299Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + properties: { + gclid: 'gclid1234', + conversionDateTime: '2022-01-01 12:32:45-08:00', + adjustedValue: '10', + currency: 'INR', + adjustmentDateTime: '2022-01-01 12:32:45-08:00', + partialFailure: true, + campaignId: '1', + templateId: '0', + order_id: 10000, + total: 1000, + products: [ + { + product_id: '507f1f77bcf86cd799439011', + sku: '45790-32', + name: 'Monopoly: 3rd Edition', + price: '19', + position: '1', + category: 'cars', + url: 'https://www.example.com/product/path', + image_url: 'https://www.example.com/product/path.jpg', + quantity: '2', + }, + { + product_id: '507f1f77bcf86cd7994390112', + sku: '45790-322', + name: 'Monopoly: 3rd Edition2', + price: '192', + quantity: 22, + position: '12', + category: 'Cars2', + url: 'https://www.example.com/product/path2', + image_url: 'https://www.example.com/product/path.jpg2', + }, + ], + }, + integrations: { + All: true, + }, + name: 'ApplicationLoaded', + sentAt: '2019-10-14T11:15:53.296Z', + }, + }, + ], + }, }, - { - "name": "google_adwords_enhanced_conversions", - "description": "Test 1", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/1234567890:uploadConversionAdjustments', + headers: { + Authorization: 'Bearer abcd1234', + 'Content-Type': 'application/json', + 'developer-token': 'ijkl91011', + 'login-customer-id': '1234567890', + }, + params: { + event: 'Page View', + customerId: '1234567890', + }, + body: { + JSON: { + conversionAdjustments: [ { - "metadata": { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl91011" - } + gclidDateTimePair: { + gclid: 'gclid1234', + conversionDateTime: '2022-01-01 12:32:45-08:00', + }, + restatementValue: { + adjustedValue: 10, + currencyCode: 'INR', + }, + orderId: '10000', + adjustmentDateTime: '2022-01-01 12:32:45-08:00', + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + userIdentifiers: [ + { + hashedPhoneNumber: + '04387707e6cbed8c4538c81cc570ed9252d579469f36c273839b26d784e4bdbe', }, - "destination": { - "Config": { - "rudderAccountId": "25u5whFH7gVTnCiAjn4ykoCLGoC", - "customerId": "1234567890", - "subAccount": true, - "loginCustomerId": "11", - "listOfConversions": [ - { - "conversions": "Page View" - }, - { - "conversions": "Product Added" - } - ], - "authStatus": "active" - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "phone": "912382193", - "firstName": "John", - "lastName": "Gomes", - "city": "London", - "state": "UK", - "streetAddress": "71 Cherry Court SOUTHAMPTON SO53 5PD UK" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "event": "Checkout Started", - "type": "track", - "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", - "originalTimestamp": "2019-10-14T11:15:18.299Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "properties": { - "gclid": "gclid1234", - "conversionDateTime": "2022-01-01 12:32:45-08:00", - "adjustedValue": "10", - "currency": "INR", - "adjustmentDateTime": "2022-01-01 12:32:45-08:00", - "partialFailure": true, - "campaignId": "1", - "templateId": "0", - "order_id": 10000, - "total": 1000, - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "sku": "45790-32", - "name": "Monopoly: 3rd Edition", - "price": "19", - "position": "1", - "category": "cars", - "url": "https://www.example.com/product/path", - "image_url": "https://www.example.com/product/path.jpg", - "quantity": "2" - }, - { - "product_id": "507f1f77bcf86cd7994390112", - "sku": "45790-322", - "name": "Monopoly: 3rd Edition2", - "price": "192", - "quantity": 22, - "position": "12", - "category": "Cars2", - "url": "https://www.example.com/product/path2", - "image_url": "https://www.example.com/product/path.jpg2" - } - ] - }, - "integrations": { - "All": true - }, - "name": "ApplicationLoaded", - "sentAt": "2019-10-14T11:15:53.296Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "metadata": { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl91011" - } + { + addressInfo: { + hashedFirstName: + 'a8cfcd74832004951b4408cdb0a5dbcd8c7e52d43f7fe244bf720582e05241da', + hashedLastName: + '1c574b17eefa532b6d61c963550a82d2d3dfca4a7fb69e183374cfafd5328ee4', + state: 'UK', + city: 'London', + countryCode: 'us', + hashedStreetAddress: + '9a4d2e50828448f137f119a3ebdbbbab8d6731234a67595fdbfeb2a2315dd550', + }, }, - "statusCode": 400, - "error": "Conversion named \"Checkout Started\" was not specified in the RudderStack destination configuration", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "configuration", - "destType": "GOOGLE_ADWORDS_ENHANCED_CONVERSIONS", - "module": "destination", - "implementation": "native", - "feature": "processor" - } - } - ] - } - } + ], + adjustmentType: 'ENHANCEMENT', + }, + ], + partialFailure: true, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + }, + statusCode: 200, + }, + ], + }, }, - { - "name": "google_adwords_enhanced_conversions", - "description": "Test 2", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "metadata": { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl91011" - } - }, - "destination": { - "Config": { - "rudderAccountId": "25u5whFH7gVTnCiAjn4ykoCLGoC", - "customerId": "1234567890", - "subAccount": true, - "loginCustomerId": "11", - "listOfConversions": [ - { - "conversions": "Page View" - }, - { - "conversions": "Product Added" - } - ], - "authStatus": "active" - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "event": "Product Added", - "type": "track", - "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", - "originalTimestamp": "2019-10-14T11:15:18.299Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "properties": { - "gclid": "gclid1234", - "conversionDateTime": "2022-01-01 12:32:45-08:00", - "adjustedValue": "10", - "currency": "INR", - "adjustmentDateTime": "2022-01-01 12:32:45-08:00", - "partialFailure": true, - "campaignId": "1", - "templateId": "0", - "order_id": 10000, - "total": 1000, - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "sku": "45790-32", - "name": "Monopoly: 3rd Edition", - "price": "19", - "position": "1", - "category": "cars", - "url": "https://www.example.com/product/path", - "image_url": "https://www.example.com/product/path.jpg", - "quantity": "2" - }, - { - "product_id": "507f1f77bcf86cd7994390112", - "sku": "45790-322", - "name": "Monopoly: 3rd Edition2", - "price": "192", - "quantity": 22, - "position": "12", - "category": "Cars2", - "url": "https://www.example.com/product/path2", - "image_url": "https://www.example.com/product/path.jpg2" - } - ] - }, - "integrations": { - "All": true - }, - "name": "ApplicationLoaded", - "sentAt": "2019-10-14T11:15:53.296Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "metadata": { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl91011" - } - }, - "statusCode": 400, - "error": "Any of email, phone, firstName, lastName, city, street, countryCode, postalCode or streetAddress is required in traits.", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation", - "destType": "GOOGLE_ADWORDS_ENHANCED_CONVERSIONS", - "module": "destination", - "implementation": "native", - "feature": "processor" - } - } - ] - } - } + }, + { + name: 'google_adwords_enhanced_conversions', + description: 'Test 1', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + }, + destination: { + Config: { + rudderAccountId: '25u5whFH7gVTnCiAjn4ykoCLGoC', + customerId: '1234567890', + subAccount: true, + loginCustomerId: '11', + listOfConversions: [ + { + conversions: 'Page View', + }, + { + conversions: 'Product Added', + }, + ], + authStatus: 'active', + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + phone: '912382193', + firstName: 'John', + lastName: 'Gomes', + city: 'London', + state: 'UK', + streetAddress: '71 Cherry Court SOUTHAMPTON SO53 5PD UK', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + event: 'Checkout Started', + type: 'track', + messageId: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', + originalTimestamp: '2019-10-14T11:15:18.299Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + properties: { + gclid: 'gclid1234', + conversionDateTime: '2022-01-01 12:32:45-08:00', + adjustedValue: '10', + currency: 'INR', + adjustmentDateTime: '2022-01-01 12:32:45-08:00', + partialFailure: true, + campaignId: '1', + templateId: '0', + order_id: 10000, + total: 1000, + products: [ + { + product_id: '507f1f77bcf86cd799439011', + sku: '45790-32', + name: 'Monopoly: 3rd Edition', + price: '19', + position: '1', + category: 'cars', + url: 'https://www.example.com/product/path', + image_url: 'https://www.example.com/product/path.jpg', + quantity: '2', + }, + { + product_id: '507f1f77bcf86cd7994390112', + sku: '45790-322', + name: 'Monopoly: 3rd Edition2', + price: '192', + quantity: 22, + position: '12', + category: 'Cars2', + url: 'https://www.example.com/product/path2', + image_url: 'https://www.example.com/product/path.jpg2', + }, + ], + }, + integrations: { + All: true, + }, + name: 'ApplicationLoaded', + sentAt: '2019-10-14T11:15:53.296Z', + }, + }, + ], + }, }, - { - "name": "google_adwords_enhanced_conversions", - "description": "Test 3", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "metadata": { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl91011" - } - }, - "destination": { - "Config": { - "rudderAccountId": "25u5whFH7gVTnCiAjn4ykoCLGoC", - "customerId": "1234567890", - "subAccount": true, - "loginCustomerId": "11", - "listOfConversions": [ - { - "conversions": "Page View" - }, - { - "conversions": "Product Added" - } - ], - "authStatus": "active" - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "firstName": "John", - "lastName": "Gomes", - "address": { - "city": "London", - "state": "UK", - "streetAddress": "71 Cherry Court SOUTHAMPTON SO53 5PD UK", - "country": "us" - } - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "event": "Product Added", - "type": "track", - "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", - "originalTimestamp": "2019-10-14T11:15:18.299Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "properties": { - "gclid": "gclid1234", - "conversionDateTime": "2022-01-01 12:32:45-08:00", - "adjustedValue": "10", - "currencyCode": "INR", - "adjustmentDateTime": "2022-01-01 12:32:45-08:00", - "partialFailure": "true", - "campaignId": "1", - "templateId": "0", - "order_id": 10000, - "total": 1000, - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "sku": "45790-32", - "name": "Monopoly: 3rd Edition", - "price": "19", - "position": "1", - "category": "cars", - "url": "https://www.example.com/product/path", - "image_url": "https://www.example.com/product/path.jpg", - "quantity": "2" - }, - { - "product_id": "507f1f77bcf86cd7994390112", - "sku": "45790-322", - "name": "Monopoly: 3rd Edition2", - "price": "192", - "quantity": 22, - "position": "12", - "category": "Cars2", - "url": "https://www.example.com/product/path2", - "image_url": "https://www.example.com/product/path.jpg2" - } - ] - }, - "integrations": { - "All": true - }, - "name": "ApplicationLoaded", - "sentAt": "2019-10-14T11:15:53.296Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/1234567890:uploadConversionAdjustments", - "headers": { - "Authorization": "Bearer abcd1234", - "Content-Type": "application/json", - "developer-token": "ijkl91011", - "login-customer-id": "11" - }, - "params": { - "event": "Product Added", - "customerId": "1234567890" - }, - "body": { - "JSON": { - "conversionAdjustments": [ - { - "gclidDateTimePair": { - "gclid": "gclid1234", - "conversionDateTime": "2022-01-01 12:32:45-08:00" - }, - "restatementValue": { - "adjustedValue": 10, - "currencyCode": "INR" - }, - "orderId": "10000", - "adjustmentDateTime": "2022-01-01 12:32:45-08:00", - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "userIdentifiers": [ - { - "addressInfo": { - "hashedFirstName": "a8cfcd74832004951b4408cdb0a5dbcd8c7e52d43f7fe244bf720582e05241da", - "hashedLastName": "1c574b17eefa532b6d61c963550a82d2d3dfca4a7fb69e183374cfafd5328ee4", - "state": "UK", - "city": "London", - "countryCode": "us", - "hashedStreetAddress": "b28c94b2195c8ed259f0b415aaee3f39b0b2920a4537611499fa044956917a21" - } - } - ], - "adjustmentType": "ENHANCEMENT" - } - ], - "partialFailure": true - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "metadata": { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl91011" - } - }, - "statusCode": 200 - } - ] - } - } + output: { + response: { + status: 200, + body: [ + { + metadata: { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + }, + statusCode: 400, + error: + 'Conversion named "Checkout Started" was not specified in the RudderStack destination configuration', + statTags: { + errorCategory: 'dataValidation', + errorType: 'configuration', + destType: 'GOOGLE_ADWORDS_ENHANCED_CONVERSIONS', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, }, - { - "name": "google_adwords_enhanced_conversions", - "description": "Test 4", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "metadata": { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl91011" - } - }, - "destination": { - "Config": { - "rudderAccountId": "25u5whFH7gVTnCiAjn4ykoCLGoC", - "customerId": "1234567890", - "subAccount": true, - "loginCustomerId": "", - "listOfConversions": [ - { - "conversions": "Page View" - }, - { - "conversions": "Product Added" - } - ], - "authStatus": "active" - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "firstName": "John", - "lastName": "Gomes", - "city": "London", - "state": "UK", - "streetAddress": "71 Cherry Court SOUTHAMPTON SO53 5PD UK" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "event": "Product Added", - "type": "track", - "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", - "originalTimestamp": "2019-10-14T11:15:18.299Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "properties": { - "gclid": "gclid1234", - "conversionDateTime": "2022-01-01 12:32:45-08:00", - "adjustedValue": "10", - "currencyCode": "INR", - "adjustmentDateTime": "2022-01-01 12:32:45-08:00", - "partialFailure": true, - "campaignId": "1", - "templateId": "0", - "orderId": 10000, - "total": 1000, - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "sku": "45790-32", - "name": "Monopoly: 3rd Edition", - "price": "19", - "position": "1", - "category": "cars", - "url": "https://www.example.com/product/path", - "image_url": "https://www.example.com/product/path.jpg", - "quantity": "2" - }, - { - "product_id": "507f1f77bcf86cd7994390112", - "sku": "45790-322", - "name": "Monopoly: 3rd Edition2", - "price": "192", - "quantity": 22, - "position": "12", - "category": "Cars2", - "url": "https://www.example.com/product/path2", - "image_url": "https://www.example.com/product/path.jpg2" - } - ] - }, - "integrations": { - "All": true - }, - "name": "ApplicationLoaded", - "sentAt": "2019-10-14T11:15:53.296Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "metadata": { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl91011" - } - }, - "statusCode": 400, - "error": "LoginCustomerId is required as subAccount is true.", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "configuration", - "destType": "GOOGLE_ADWORDS_ENHANCED_CONVERSIONS", - "module": "destination", - "implementation": "native", - "feature": "processor" - } - } - ] - } - } + }, + { + name: 'google_adwords_enhanced_conversions', + description: 'Test 2', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + }, + destination: { + Config: { + rudderAccountId: '25u5whFH7gVTnCiAjn4ykoCLGoC', + customerId: '1234567890', + subAccount: true, + loginCustomerId: '11', + listOfConversions: [ + { + conversions: 'Page View', + }, + { + conversions: 'Product Added', + }, + ], + authStatus: 'active', + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + event: 'Product Added', + type: 'track', + messageId: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', + originalTimestamp: '2019-10-14T11:15:18.299Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + properties: { + gclid: 'gclid1234', + conversionDateTime: '2022-01-01 12:32:45-08:00', + adjustedValue: '10', + currency: 'INR', + adjustmentDateTime: '2022-01-01 12:32:45-08:00', + partialFailure: true, + campaignId: '1', + templateId: '0', + order_id: 10000, + total: 1000, + products: [ + { + product_id: '507f1f77bcf86cd799439011', + sku: '45790-32', + name: 'Monopoly: 3rd Edition', + price: '19', + position: '1', + category: 'cars', + url: 'https://www.example.com/product/path', + image_url: 'https://www.example.com/product/path.jpg', + quantity: '2', + }, + { + product_id: '507f1f77bcf86cd7994390112', + sku: '45790-322', + name: 'Monopoly: 3rd Edition2', + price: '192', + quantity: 22, + position: '12', + category: 'Cars2', + url: 'https://www.example.com/product/path2', + image_url: 'https://www.example.com/product/path.jpg2', + }, + ], + }, + integrations: { + All: true, + }, + name: 'ApplicationLoaded', + sentAt: '2019-10-14T11:15:53.296Z', + }, + }, + ], + }, }, - { - "name": "google_adwords_enhanced_conversions", - "description": "Test 5", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "metadata": { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl91011" - } - }, - "destination": { - "Config": { - "rudderAccountId": "25u5whFH7gVTnCiAjn4ykoCLGoC", - "customerId": "1234567890", - "subAccount": true, - "loginCustomerId": "", - "listOfConversions": [ - { - "conversions": "Page View" - }, - { - "conversions": "Product Added" - } - ], - "authStatus": "active" - } - }, - "message": { - "type": "identify", - "traits": { - "status": "elizabeth" - }, - "userId": "emrichardson820+22822@gmail.com", - "channel": "sources", - "context": { - "sources": { - "job_id": "24c5HJxHomh6YCngEOCgjS5r1KX/Syncher", - "task_id": "vw_rs_mailchimp_mocked_hg_data", - "version": "v1.8.1", - "batch_id": "f252c69d-c40d-450e-bcd2-2cf26cb62762", - "job_run_id": "c8el40l6e87v0c4hkbl0", - "task_run_id": "c8el40l6e87v0c4hkblg" - }, - "externalId": [ - { - "id": "emrichardson820+22822@gmail.com", - "type": "MAILCHIMP-92e1f1ad2c", - "identifierType": "email_address" - } - ], - "mappedToDestination": "true" - }, - "recordId": "1", - "rudderId": "4d5d0ed0-9db8-41cc-9bb0-a032f6bfa97a", - "messageId": "b3bee036-fc26-4f6d-9867-c17f85708a82" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "metadata": { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl91011" - } - }, - "statusCode": 400, - "error": "Message Type identify is not supported. Aborting message.", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation", - "destType": "GOOGLE_ADWORDS_ENHANCED_CONVERSIONS", - "module": "destination", - "implementation": "native", - "feature": "processor" - } - } - ] - } - } + output: { + response: { + status: 200, + body: [ + { + metadata: { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + }, + statusCode: 400, + error: + 'Any of email, phone, firstName, lastName, city, street, countryCode, postalCode or streetAddress is required in traits.', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'GOOGLE_ADWORDS_ENHANCED_CONVERSIONS', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, }, - { - "name": "google_adwords_enhanced_conversions", - "description": "Test 6", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "metadata": { - "secret": null - }, - "destination": { - "Config": { - "rudderAccountId": "25u5whFH7gVTnCiAjn4ykoCLGoC", - "customerId": "1234567890", - "subAccount": true, - "loginCustomerId": "11", - "listOfConversions": [ - { - "conversions": "Page View" - }, - { - "conversions": "Product Added" - } - ], - "authStatus": "active" - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "phone": "912382193", - "firstName": "John", - "lastName": "Gomes", - "city": "London", - "state": "UK", - "streetAddress": "71 Cherry Court SOUTHAMPTON SO53 5PD UK" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "event": "Page View", - "type": "track", - "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", - "originalTimestamp": "2019-10-14T11:15:18.299Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "properties": { - "gclid": "gclid1234", - "conversionDateTime": "2022-01-01 12:32:45-08:00", - "adjustedValue": "10", - "currency": "INR", - "adjustmentDateTime": "2022-01-01 12:32:45-08:00", - "partialFailure": true, - "campaignId": "1", - "templateId": "0", - "order_id": 10000, - "total": 1000, - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "sku": "45790-32", - "name": "Monopoly: 3rd Edition", - "price": "19", - "position": "1", - "category": "cars", - "url": "https://www.example.com/product/path", - "image_url": "https://www.example.com/product/path.jpg", - "quantity": "2" - }, - { - "product_id": "507f1f77bcf86cd7994390112", - "sku": "45790-322", - "name": "Monopoly: 3rd Edition2", - "price": "192", - "quantity": 22, - "position": "12", - "category": "Cars2", - "url": "https://www.example.com/product/path2", - "image_url": "https://www.example.com/product/path.jpg2" - } - ] - }, - "integrations": { - "All": true - }, - "name": "ApplicationLoaded", - "sentAt": "2019-10-14T11:15:53.296Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "metadata": { - "secret": null - }, - "statusCode": 500, - "error": "OAuth - access token not found", - "statTags": { - "errorCategory": "platform", - "errorType": "oAuthSecret", - "destType": "GOOGLE_ADWORDS_ENHANCED_CONVERSIONS", - "module": "destination", - "implementation": "native", - "feature": "processor" - } - } - ] - } - } + }, + { + name: 'google_adwords_enhanced_conversions', + description: 'Test 3', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + }, + destination: { + Config: { + rudderAccountId: '25u5whFH7gVTnCiAjn4ykoCLGoC', + customerId: '1234567890', + subAccount: true, + loginCustomerId: '11', + listOfConversions: [ + { + conversions: 'Page View', + }, + { + conversions: 'Product Added', + }, + ], + authStatus: 'active', + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + firstName: 'John', + lastName: 'Gomes', + address: { + city: 'London', + state: 'UK', + streetAddress: '71 Cherry Court SOUTHAMPTON SO53 5PD UK', + country: 'us', + }, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + event: 'Product Added', + type: 'track', + messageId: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', + originalTimestamp: '2019-10-14T11:15:18.299Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + properties: { + gclid: 'gclid1234', + conversionDateTime: '2022-01-01 12:32:45-08:00', + adjustedValue: '10', + currencyCode: 'INR', + adjustmentDateTime: '2022-01-01 12:32:45-08:00', + partialFailure: 'true', + campaignId: '1', + templateId: '0', + order_id: 10000, + total: 1000, + products: [ + { + product_id: '507f1f77bcf86cd799439011', + sku: '45790-32', + name: 'Monopoly: 3rd Edition', + price: '19', + position: '1', + category: 'cars', + url: 'https://www.example.com/product/path', + image_url: 'https://www.example.com/product/path.jpg', + quantity: '2', + }, + { + product_id: '507f1f77bcf86cd7994390112', + sku: '45790-322', + name: 'Monopoly: 3rd Edition2', + price: '192', + quantity: 22, + position: '12', + category: 'Cars2', + url: 'https://www.example.com/product/path2', + image_url: 'https://www.example.com/product/path.jpg2', + }, + ], + }, + integrations: { + All: true, + }, + name: 'ApplicationLoaded', + sentAt: '2019-10-14T11:15:53.296Z', + }, + }, + ], + }, }, - { - "name": "google_adwords_enhanced_conversions", - "description": "Test 7", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/1234567890:uploadConversionAdjustments', + headers: { + Authorization: 'Bearer abcd1234', + 'Content-Type': 'application/json', + 'developer-token': 'ijkl91011', + 'login-customer-id': '11', + }, + params: { + event: 'Product Added', + customerId: '1234567890', + }, + body: { + JSON: { + conversionAdjustments: [ { - "metadata": { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl91011" - } + gclidDateTimePair: { + gclid: 'gclid1234', + conversionDateTime: '2022-01-01 12:32:45-08:00', + }, + restatementValue: { + adjustedValue: 10, + currencyCode: 'INR', + }, + orderId: '10000', + adjustmentDateTime: '2022-01-01 12:32:45-08:00', + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + userIdentifiers: [ + { + addressInfo: { + hashedFirstName: + 'a8cfcd74832004951b4408cdb0a5dbcd8c7e52d43f7fe244bf720582e05241da', + hashedLastName: + '1c574b17eefa532b6d61c963550a82d2d3dfca4a7fb69e183374cfafd5328ee4', + state: 'UK', + city: 'London', + countryCode: 'us', + hashedStreetAddress: + 'b28c94b2195c8ed259f0b415aaee3f39b0b2920a4537611499fa044956917a21', + }, }, - "destination": { - "Config": { - "rudderAccountId": "25u5whFH7gVTnCiAjn4ykoCLGoC", - "customerId": "123-456-7890", - "subAccount": true, - "loginCustomerId": "123-456-7890", - "listOfConversions": [ - { - "conversions": "Page View" - }, - { - "conversions": "Product Added" - } - ], - "authStatus": "active" - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "phone": "912382193", - "firstName": "John", - "lastName": "Gomes", - "city": "London", - "state": "UK", - "countryCode": "us", - "streetAddress": "71 Cherry Court SOUTHAMPTON SO53 5PD UK" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "event": "Product Viewed", - "type": "track", - "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", - "originalTimestamp": "2019-10-14T11:15:18.299Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "properties": { - "gclid": "gclid1234", - "conversionDateTime": "2022-01-01 12:32:45-08:00", - "adjustedValue": "10", - "currency": "INR", - "adjustmentDateTime": "2022-01-01 12:32:45-08:00", - "partialFailure": true, - "campaignId": "1", - "templateId": "0", - "orde_id": 10000, - "total": 1000, - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "sku": "45790-32", - "name": "Monopoly: 3rd Edition", - "price": "19", - "position": "1", - "category": "cars", - "url": "https://www.example.com/product/path", - "image_url": "https://www.example.com/product/path.jpg", - "quantity": "2" - }, - { - "product_id": "507f1f77bcf86cd7994390112", - "sku": "45790-322", - "name": "Monopoly: 3rd Edition2", - "price": "192", - "quantity": 22, - "position": "12", - "category": "Cars2", - "url": "https://www.example.com/product/path2", - "image_url": "https://www.example.com/product/path.jpg2" - } - ] - }, - "integrations": { - "All": true - }, - "name": "ApplicationLoaded", - "sentAt": "2019-10-14T11:15:53.296Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "metadata": { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl91011" - } - }, - "statusCode": 400, - "error": "Conversion named \"Product Viewed\" was not specified in the RudderStack destination configuration", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "configuration", - "destType": "GOOGLE_ADWORDS_ENHANCED_CONVERSIONS", - "module": "destination", - "implementation": "native", - "feature": "processor" - } - } - ] - } - } + ], + adjustmentType: 'ENHANCEMENT', + }, + ], + partialFailure: true, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + }, + statusCode: 200, + }, + ], + }, }, - { - "name": "google_adwords_enhanced_conversions", - "description": "Test 8", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "metadata": { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl91011" - } - }, - "destination": { - "Config": { - "requireHash": true, - "rudderAccountId": "25u5whFH7gVTnCiAjn4ykoCLGoC", - "customerId": "123-456-7890", - "subAccount": true, - "loginCustomerId": "123-456-7890", - "listOfConversions": [ - { - "conversions": "Page View" - }, - { - "conversions": "Product Added" - } - ], - "authStatus": "active" - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "phone": "912382193", - "firstName": "John", - "lastName": "Gomes", - "city": "London", - "state": "UK", - "countryCode": "us", - "streetAddress": "71 Cherry Court SOUTHAMPTON SO53 5PD UK" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "event": "Page View", - "type": "track", - "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", - "originalTimestamp": "2019-10-14T11:15:18.299Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "properties": { - "gclid": "gclid1234", - "conversionDateTime": "2022-01-01 12:32:45-08:00", - "adjustedValue": "10", - "currency": "INR", - "adjustmentDateTime": "2022-01-01 12:32:45-08:00", - "partialFailure": true, - "campaignId": "1", - "templateId": "0", - "order_id": 10000, - "total": 1000, - "products": [ - { - "product_id": "507f1f77bcf86cd7994390112", - "sku": "45790-322", - "name": "Monopoly: 3rd Edition2", - "price": "192", - "quantity": 22, - "position": "12", - "category": "Cars2", - "url": "https://www.example.com/product/path2", - "image_url": "https://www.example.com/product/path.jpg2" - } - ] - }, - "integrations": { - "All": true - }, - "name": "ApplicationLoaded", - "sentAt": "2019-10-14T11:15:53.296Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/1234567890:uploadConversionAdjustments", - "headers": { - "Authorization": "Bearer abcd1234", - "Content-Type": "application/json", - "developer-token": "ijkl91011", - "login-customer-id": "1234567890" - }, - "params": { - "event": "Page View", - "customerId": "1234567890" - }, - "body": { - "JSON": { - "conversionAdjustments": [ - { - "gclidDateTimePair": { - "gclid": "gclid1234", - "conversionDateTime": "2022-01-01 12:32:45-08:00" - }, - "restatementValue": { - "adjustedValue": 10, - "currencyCode": "INR" - }, - "orderId": "10000", - "adjustmentDateTime": "2022-01-01 12:32:45-08:00", - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "userIdentifiers": [ - { - "hashedPhoneNumber": "04387707e6cbed8c4538c81cc570ed9252d579469f36c273839b26d784e4bdbe" - }, - { - "addressInfo": { - "hashedFirstName": "a8cfcd74832004951b4408cdb0a5dbcd8c7e52d43f7fe244bf720582e05241da", - "hashedLastName": "1c574b17eefa532b6d61c963550a82d2d3dfca4a7fb69e183374cfafd5328ee4", - "state": "UK", - "city": "London", - "countryCode": "us", - "hashedStreetAddress": "9a4d2e50828448f137f119a3ebdbbbab8d6731234a67595fdbfeb2a2315dd550" - } - } - ], - "adjustmentType": "ENHANCEMENT" - } - ], - "partialFailure": true - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "metadata": { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl91011" - } - }, - "statusCode": 200 - } - ] - } - } + }, + { + name: 'google_adwords_enhanced_conversions', + description: 'Test 4', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + }, + destination: { + Config: { + rudderAccountId: '25u5whFH7gVTnCiAjn4ykoCLGoC', + customerId: '1234567890', + subAccount: true, + loginCustomerId: '', + listOfConversions: [ + { + conversions: 'Page View', + }, + { + conversions: 'Product Added', + }, + ], + authStatus: 'active', + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + firstName: 'John', + lastName: 'Gomes', + city: 'London', + state: 'UK', + streetAddress: '71 Cherry Court SOUTHAMPTON SO53 5PD UK', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + event: 'Product Added', + type: 'track', + messageId: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', + originalTimestamp: '2019-10-14T11:15:18.299Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + properties: { + gclid: 'gclid1234', + conversionDateTime: '2022-01-01 12:32:45-08:00', + adjustedValue: '10', + currencyCode: 'INR', + adjustmentDateTime: '2022-01-01 12:32:45-08:00', + partialFailure: true, + campaignId: '1', + templateId: '0', + orderId: 10000, + total: 1000, + products: [ + { + product_id: '507f1f77bcf86cd799439011', + sku: '45790-32', + name: 'Monopoly: 3rd Edition', + price: '19', + position: '1', + category: 'cars', + url: 'https://www.example.com/product/path', + image_url: 'https://www.example.com/product/path.jpg', + quantity: '2', + }, + { + product_id: '507f1f77bcf86cd7994390112', + sku: '45790-322', + name: 'Monopoly: 3rd Edition2', + price: '192', + quantity: 22, + position: '12', + category: 'Cars2', + url: 'https://www.example.com/product/path2', + image_url: 'https://www.example.com/product/path.jpg2', + }, + ], + }, + integrations: { + All: true, + }, + name: 'ApplicationLoaded', + sentAt: '2019-10-14T11:15:53.296Z', + }, + }, + ], + }, }, - { - "name": "google_adwords_enhanced_conversions", - "description": "Test 9", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "metadata": { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl91011" - } - }, - "destination": { - "Config": { - "requireHash": false, - "rudderAccountId": "25u5whFH7gVTnCiAjn4ykoCLGoC", - "customerId": "123-456-7890", - "subAccount": true, - "loginCustomerId": "123-456-7890", - "listOfConversions": [ - { - "conversions": "Page View" - }, - { - "conversions": "Product Added" - } - ], - "authStatus": "active" - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "phone": "912382193", - "firstName": "John", - "lastName": "Gomes", - "city": "London", - "state": "UK", - "countryCode": "us", - "streetAddress": "71 Cherry Court SOUTHAMPTON SO53 5PD UK" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "event": "Page View", - "type": "track", - "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", - "originalTimestamp": "2019-10-14T11:15:18.299Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "properties": { - "gclid": "gclid1234", - "conversionDateTime": "2022-01-01 12:32:45-08:00", - "adjustedValue": "10", - "currency": "INR", - "adjustmentDateTime": "2022-01-01 12:32:45-08:00", - "partialFailure": true, - "campaignId": "1", - "templateId": "0", - "order_id": 10000, - "total": 1000, - "products": [ - { - "product_id": "507f1f77bcf86cd7994390112", - "sku": "45790-322", - "name": "Monopoly: 3rd Edition2", - "price": "192", - "quantity": 22, - "position": "12", - "category": "Cars2", - "url": "https://www.example.com/product/path2", - "image_url": "https://www.example.com/product/path.jpg2" - } - ] - }, - "integrations": { - "All": true - }, - "name": "ApplicationLoaded", - "sentAt": "2019-10-14T11:15:53.296Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ + output: { + response: { + status: 200, + body: [ + { + metadata: { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + }, + statusCode: 400, + error: 'LoginCustomerId is required as subAccount is true.', + statTags: { + errorCategory: 'dataValidation', + errorType: 'configuration', + destType: 'GOOGLE_ADWORDS_ENHANCED_CONVERSIONS', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'google_adwords_enhanced_conversions', + description: 'Test 5', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + }, + destination: { + Config: { + rudderAccountId: '25u5whFH7gVTnCiAjn4ykoCLGoC', + customerId: '1234567890', + subAccount: true, + loginCustomerId: '', + listOfConversions: [ + { + conversions: 'Page View', + }, + { + conversions: 'Product Added', + }, + ], + authStatus: 'active', + }, + }, + message: { + type: 'identify', + traits: { + status: 'elizabeth', + }, + userId: 'emrichardson820+22822@gmail.com', + channel: 'sources', + context: { + sources: { + job_id: '24c5HJxHomh6YCngEOCgjS5r1KX/Syncher', + task_id: 'vw_rs_mailchimp_mocked_hg_data', + version: 'v1.8.1', + batch_id: 'f252c69d-c40d-450e-bcd2-2cf26cb62762', + job_run_id: 'c8el40l6e87v0c4hkbl0', + task_run_id: 'c8el40l6e87v0c4hkblg', + }, + externalId: [ + { + id: 'emrichardson820+22822@gmail.com', + type: 'MAILCHIMP-92e1f1ad2c', + identifierType: 'email_address', + }, + ], + mappedToDestination: 'true', + }, + recordId: '1', + rudderId: '4d5d0ed0-9db8-41cc-9bb0-a032f6bfa97a', + messageId: 'b3bee036-fc26-4f6d-9867-c17f85708a82', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + }, + statusCode: 400, + error: 'Message Type identify is not supported. Aborting message.', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'GOOGLE_ADWORDS_ENHANCED_CONVERSIONS', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'google_adwords_enhanced_conversions', + description: 'Test 6', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: null, + }, + destination: { + Config: { + rudderAccountId: '25u5whFH7gVTnCiAjn4ykoCLGoC', + customerId: '1234567890', + subAccount: true, + loginCustomerId: '11', + listOfConversions: [ + { + conversions: 'Page View', + }, + { + conversions: 'Product Added', + }, + ], + authStatus: 'active', + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + phone: '912382193', + firstName: 'John', + lastName: 'Gomes', + city: 'London', + state: 'UK', + streetAddress: '71 Cherry Court SOUTHAMPTON SO53 5PD UK', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + event: 'Page View', + type: 'track', + messageId: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', + originalTimestamp: '2019-10-14T11:15:18.299Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + properties: { + gclid: 'gclid1234', + conversionDateTime: '2022-01-01 12:32:45-08:00', + adjustedValue: '10', + currency: 'INR', + adjustmentDateTime: '2022-01-01 12:32:45-08:00', + partialFailure: true, + campaignId: '1', + templateId: '0', + order_id: 10000, + total: 1000, + products: [ + { + product_id: '507f1f77bcf86cd799439011', + sku: '45790-32', + name: 'Monopoly: 3rd Edition', + price: '19', + position: '1', + category: 'cars', + url: 'https://www.example.com/product/path', + image_url: 'https://www.example.com/product/path.jpg', + quantity: '2', + }, + { + product_id: '507f1f77bcf86cd7994390112', + sku: '45790-322', + name: 'Monopoly: 3rd Edition2', + price: '192', + quantity: 22, + position: '12', + category: 'Cars2', + url: 'https://www.example.com/product/path2', + image_url: 'https://www.example.com/product/path.jpg2', + }, + ], + }, + integrations: { + All: true, + }, + name: 'ApplicationLoaded', + sentAt: '2019-10-14T11:15:53.296Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + secret: null, + }, + statusCode: 500, + error: 'OAuth - access token not found', + statTags: { + errorCategory: 'platform', + errorType: 'oAuthSecret', + destType: 'GOOGLE_ADWORDS_ENHANCED_CONVERSIONS', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'google_adwords_enhanced_conversions', + description: 'Test 7', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + }, + destination: { + Config: { + rudderAccountId: '25u5whFH7gVTnCiAjn4ykoCLGoC', + customerId: '123-456-7890', + subAccount: true, + loginCustomerId: '123-456-7890', + listOfConversions: [ + { + conversions: 'Page View', + }, + { + conversions: 'Product Added', + }, + ], + authStatus: 'active', + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + phone: '912382193', + firstName: 'John', + lastName: 'Gomes', + city: 'London', + state: 'UK', + countryCode: 'us', + streetAddress: '71 Cherry Court SOUTHAMPTON SO53 5PD UK', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + event: 'Product Viewed', + type: 'track', + messageId: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', + originalTimestamp: '2019-10-14T11:15:18.299Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + properties: { + gclid: 'gclid1234', + conversionDateTime: '2022-01-01 12:32:45-08:00', + adjustedValue: '10', + currency: 'INR', + adjustmentDateTime: '2022-01-01 12:32:45-08:00', + partialFailure: true, + campaignId: '1', + templateId: '0', + orde_id: 10000, + total: 1000, + products: [ + { + product_id: '507f1f77bcf86cd799439011', + sku: '45790-32', + name: 'Monopoly: 3rd Edition', + price: '19', + position: '1', + category: 'cars', + url: 'https://www.example.com/product/path', + image_url: 'https://www.example.com/product/path.jpg', + quantity: '2', + }, + { + product_id: '507f1f77bcf86cd7994390112', + sku: '45790-322', + name: 'Monopoly: 3rd Edition2', + price: '192', + quantity: 22, + position: '12', + category: 'Cars2', + url: 'https://www.example.com/product/path2', + image_url: 'https://www.example.com/product/path.jpg2', + }, + ], + }, + integrations: { + All: true, + }, + name: 'ApplicationLoaded', + sentAt: '2019-10-14T11:15:53.296Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + }, + statusCode: 400, + error: + 'Conversion named "Product Viewed" was not specified in the RudderStack destination configuration', + statTags: { + errorCategory: 'dataValidation', + errorType: 'configuration', + destType: 'GOOGLE_ADWORDS_ENHANCED_CONVERSIONS', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'google_adwords_enhanced_conversions', + description: 'Test 8', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + }, + destination: { + Config: { + requireHash: true, + rudderAccountId: '25u5whFH7gVTnCiAjn4ykoCLGoC', + customerId: '123-456-7890', + subAccount: true, + loginCustomerId: '123-456-7890', + listOfConversions: [ + { + conversions: 'Page View', + }, + { + conversions: 'Product Added', + }, + ], + authStatus: 'active', + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + phone: '912382193', + firstName: 'John', + lastName: 'Gomes', + city: 'London', + state: 'UK', + countryCode: 'us', + streetAddress: '71 Cherry Court SOUTHAMPTON SO53 5PD UK', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + event: 'Page View', + type: 'track', + messageId: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', + originalTimestamp: '2019-10-14T11:15:18.299Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + properties: { + gclid: 'gclid1234', + conversionDateTime: '2022-01-01 12:32:45-08:00', + adjustedValue: '10', + currency: 'INR', + adjustmentDateTime: '2022-01-01 12:32:45-08:00', + partialFailure: true, + campaignId: '1', + templateId: '0', + order_id: 10000, + total: 1000, + products: [ + { + product_id: '507f1f77bcf86cd7994390112', + sku: '45790-322', + name: 'Monopoly: 3rd Edition2', + price: '192', + quantity: 22, + position: '12', + category: 'Cars2', + url: 'https://www.example.com/product/path2', + image_url: 'https://www.example.com/product/path.jpg2', + }, + ], + }, + integrations: { + All: true, + }, + name: 'ApplicationLoaded', + sentAt: '2019-10-14T11:15:53.296Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/1234567890:uploadConversionAdjustments', + headers: { + Authorization: 'Bearer abcd1234', + 'Content-Type': 'application/json', + 'developer-token': 'ijkl91011', + 'login-customer-id': '1234567890', + }, + params: { + event: 'Page View', + customerId: '1234567890', + }, + body: { + JSON: { + conversionAdjustments: [ { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/1234567890:uploadConversionAdjustments", - "headers": { - "Authorization": "Bearer abcd1234", - "Content-Type": "application/json", - "developer-token": "ijkl91011", - "login-customer-id": "1234567890" - }, - "params": { - "event": "Page View", - "customerId": "1234567890" - }, - "body": { - "JSON": { - "conversionAdjustments": [ - { - "gclidDateTimePair": { - "gclid": "gclid1234", - "conversionDateTime": "2022-01-01 12:32:45-08:00" - }, - "restatementValue": { - "adjustedValue": 10, - "currencyCode": "INR" - }, - "orderId": "10000", - "adjustmentDateTime": "2022-01-01 12:32:45-08:00", - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "userIdentifiers": [ - { - "hashedPhoneNumber": "912382193" - }, - { - "addressInfo": { - "hashedFirstName": "John", - "hashedLastName": "Gomes", - "state": "UK", - "city": "London", - "countryCode": "us", - "hashedStreetAddress": "71 Cherry Court SOUTHAMPTON SO53 5PD UK" - } - } - ], - "adjustmentType": "ENHANCEMENT" - } - ], - "partialFailure": true - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" + gclidDateTimePair: { + gclid: 'gclid1234', + conversionDateTime: '2022-01-01 12:32:45-08:00', + }, + restatementValue: { + adjustedValue: 10, + currencyCode: 'INR', + }, + orderId: '10000', + adjustmentDateTime: '2022-01-01 12:32:45-08:00', + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + userIdentifiers: [ + { + hashedPhoneNumber: + '04387707e6cbed8c4538c81cc570ed9252d579469f36c273839b26d784e4bdbe', }, - "metadata": { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl91011" - } + { + addressInfo: { + hashedFirstName: + 'a8cfcd74832004951b4408cdb0a5dbcd8c7e52d43f7fe244bf720582e05241da', + hashedLastName: + '1c574b17eefa532b6d61c963550a82d2d3dfca4a7fb69e183374cfafd5328ee4', + state: 'UK', + city: 'London', + countryCode: 'us', + hashedStreetAddress: + '9a4d2e50828448f137f119a3ebdbbbab8d6731234a67595fdbfeb2a2315dd550', + }, }, - "statusCode": 200 - } - ] - } - } + ], + adjustmentType: 'ENHANCEMENT', + }, + ], + partialFailure: true, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'google_adwords_enhanced_conversions', + description: 'Test 9', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + }, + destination: { + Config: { + requireHash: false, + rudderAccountId: '25u5whFH7gVTnCiAjn4ykoCLGoC', + customerId: '123-456-7890', + subAccount: true, + loginCustomerId: '123-456-7890', + listOfConversions: [ + { + conversions: 'Page View', + }, + { + conversions: 'Product Added', + }, + ], + authStatus: 'active', + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + phone: '912382193', + firstName: 'John', + lastName: 'Gomes', + city: 'London', + state: 'UK', + countryCode: 'us', + streetAddress: '71 Cherry Court SOUTHAMPTON SO53 5PD UK', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + event: 'Page View', + type: 'track', + messageId: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', + originalTimestamp: '2019-10-14T11:15:18.299Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + properties: { + gclid: 'gclid1234', + conversionDateTime: '2022-01-01 12:32:45-08:00', + adjustedValue: '10', + currency: 'INR', + adjustmentDateTime: '2022-01-01 12:32:45-08:00', + partialFailure: true, + campaignId: '1', + templateId: '0', + order_id: 10000, + total: 1000, + products: [ + { + product_id: '507f1f77bcf86cd7994390112', + sku: '45790-322', + name: 'Monopoly: 3rd Edition2', + price: '192', + quantity: 22, + position: '12', + category: 'Cars2', + url: 'https://www.example.com/product/path2', + image_url: 'https://www.example.com/product/path.jpg2', + }, + ], + }, + integrations: { + All: true, + }, + name: 'ApplicationLoaded', + sentAt: '2019-10-14T11:15:53.296Z', + }, + }, + ], + }, }, - { - "name": "google_adwords_enhanced_conversions", - "description": "Test 10", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/1234567890:uploadConversionAdjustments', + headers: { + Authorization: 'Bearer abcd1234', + 'Content-Type': 'application/json', + 'developer-token': 'ijkl91011', + 'login-customer-id': '1234567890', + }, + params: { + event: 'Page View', + customerId: '1234567890', + }, + body: { + JSON: { + conversionAdjustments: [ { - "metadata": { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl91011" - } + gclidDateTimePair: { + gclid: 'gclid1234', + conversionDateTime: '2022-01-01 12:32:45-08:00', + }, + restatementValue: { + adjustedValue: 10, + currencyCode: 'INR', + }, + orderId: '10000', + adjustmentDateTime: '2022-01-01 12:32:45-08:00', + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + userIdentifiers: [ + { + hashedPhoneNumber: '912382193', }, - "destination": { - "Config": { - "requireHash": false, - "rudderAccountId": "25u5whFH7gVTnCiAjn4ykoCLGoC", - "customerId": "123-456-7890", - "subAccount": true, - "loginCustomerId": "123-456-7890", - "listOfConversions": [ - { - "conversions": "Page View" - }, - { - "conversions": "Product Added" - } - ], - "authStatus": "active" - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "phone": "912382193", - "firstName": "John", - "lastName": "Gomes", - "city": "London", - "state": "UK", - "countryCode": "us", - "streetAddress": "71 Cherry Court SOUTHAMPTON SO53 5PD UK" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "event": "Page View", - "type": "track", - "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", - "originalTimestamp": "2019-10-14T11:15:18.299Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "properties": { - "gclid": "gclid1234", - "conversionDateTime": "2022-01-01 12:32:45-08:00", - "adjustedValue": "10", - "currency": "INR", - "adjustmentDateTime": "2022-01-01 12:32:45-08:00", - "partialFailure": true, - "campaignId": "1", - "templateId": "0", - "total": 1000, - "products": [ - { - "product_id": "507f1f77bcf86cd7994390112", - "sku": "45790-322", - "name": "Monopoly: 3rd Edition2", - "price": "192", - "quantity": 22, - "position": "12", - "category": "Cars2", - "url": "https://www.example.com/product/path2", - "image_url": "https://www.example.com/product/path.jpg2" - } - ] - }, - "integrations": { - "All": true - }, - "name": "ApplicationLoaded", - "sentAt": "2019-10-14T11:15:53.296Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "metadata": { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl91011" - } + { + addressInfo: { + hashedFirstName: 'John', + hashedLastName: 'Gomes', + state: 'UK', + city: 'London', + countryCode: 'us', + hashedStreetAddress: '71 Cherry Court SOUTHAMPTON SO53 5PD UK', + }, }, - "statusCode": 400, - "error": "Missing required value from [\"properties.orderId\",\"properties.order_id\"]", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation", - "destType": "GOOGLE_ADWORDS_ENHANCED_CONVERSIONS", - "module": "destination", - "implementation": "native", - "feature": "processor" - } - } - ] - } - } - } -] \ No newline at end of file + ], + adjustmentType: 'ENHANCEMENT', + }, + ], + partialFailure: true, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'google_adwords_enhanced_conversions', + description: 'Test 10', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + }, + destination: { + Config: { + requireHash: false, + rudderAccountId: '25u5whFH7gVTnCiAjn4ykoCLGoC', + customerId: '123-456-7890', + subAccount: true, + loginCustomerId: '123-456-7890', + listOfConversions: [ + { + conversions: 'Page View', + }, + { + conversions: 'Product Added', + }, + ], + authStatus: 'active', + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + phone: '912382193', + firstName: 'John', + lastName: 'Gomes', + city: 'London', + state: 'UK', + countryCode: 'us', + streetAddress: '71 Cherry Court SOUTHAMPTON SO53 5PD UK', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + event: 'Page View', + type: 'track', + messageId: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', + originalTimestamp: '2019-10-14T11:15:18.299Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + properties: { + gclid: 'gclid1234', + conversionDateTime: '2022-01-01 12:32:45-08:00', + adjustedValue: '10', + currency: 'INR', + adjustmentDateTime: '2022-01-01 12:32:45-08:00', + partialFailure: true, + campaignId: '1', + templateId: '0', + total: 1000, + products: [ + { + product_id: '507f1f77bcf86cd7994390112', + sku: '45790-322', + name: 'Monopoly: 3rd Edition2', + price: '192', + quantity: 22, + position: '12', + category: 'Cars2', + url: 'https://www.example.com/product/path2', + image_url: 'https://www.example.com/product/path.jpg2', + }, + ], + }, + integrations: { + All: true, + }, + name: 'ApplicationLoaded', + sentAt: '2019-10-14T11:15:53.296Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + }, + statusCode: 400, + error: 'Missing required value from ["properties.orderId","properties.order_id"]', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'GOOGLE_ADWORDS_ENHANCED_CONVERSIONS', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, +]; diff --git a/test/integrations/destinations/google_adwords_enhanced_conversions/router/data.ts b/test/integrations/destinations/google_adwords_enhanced_conversions/router/data.ts index efaa0072e2..4153630323 100644 --- a/test/integrations/destinations/google_adwords_enhanced_conversions/router/data.ts +++ b/test/integrations/destinations/google_adwords_enhanced_conversions/router/data.ts @@ -1,447 +1,457 @@ export const data = [ - { - name: 'google_adwords_enhanced_conversions', - description: 'Test 0', - feature: 'router', - module: 'destination', - version: 'v0', - input: { - request: { - body: { - input: [ - { - "metadata": { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl91011" - }, - "jobId": 1 - }, - "destination": { - "Config": { - "rudderAccountId": "25u5whFH7gVTnCiAjn4ykoCLGoC", - "customerId": "1234567890", - "subAccount": true, - "loginCustomerId": "11", - "listOfConversions": [ - { - "conversions": "Page View" - }, - { - "conversions": "Product Added" - } - ], - "authStatus": "active" - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "phone": "912382193", - "firstName": "John", - "lastName": "Gomes", - "city": "London", - "state": "UK", - "streetAddress": "71 Cherry Court SOUTHAMPTON SO53 5PD UK" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "event": "Page View", - "type": "track", - "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", - "originalTimestamp": "2019-10-14T11:15:18.299Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "properties": { - "gclid": "gclid1234", - "conversionDateTime": "2022-01-01 12:32:45-08:00", - "adjustedValue": "10", - "currency": "INR", - "adjustmentDateTime": "2022-01-01 12:32:45-08:00", - "partialFailure": true, - "campaignId": "1", - "templateId": "0", - "order_id": 10000, - "total": 1000, - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "sku": "45790-32", - "name": "Monopoly: 3rd Edition", - "price": "19", - "position": "1", - "category": "cars", - "url": "https://www.example.com/product/path", - "image_url": "https://www.example.com/product/path.jpg", - "quantity": "2" - }, - { - "product_id": "507f1f77bcf86cd7994390112", - "sku": "45790-322", - "name": "Monopoly: 3rd Edition2", - "price": "192", - "quantity": 22, - "position": "12", - "category": "Cars2", - "url": "https://www.example.com/product/path2", - "image_url": "https://www.example.com/product/path.jpg2" - } - ] - }, - "integrations": { - "All": true - }, - "name": "ApplicationLoaded", - "sentAt": "2019-10-14T11:15:53.296Z" - } - }, - { - "metadata": { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl91011" - }, - "jobId": 2 - }, - "destination": { - "Config": { - "rudderAccountId": "25u5whFH7gVTnCiAjn4ykoCLGoC", - "customerId": "1234567890", - "subAccount": true, - "loginCustomerId": "", - "listOfConversions": [ - { - "conversions": "Page View" - }, - { - "conversions": "Product Added" - } - ], - "authStatus": "active" - } - }, - "message": { - "type": "identify", - "traits": { - "status": "elizabeth" - }, - "userId": "emrichardson820+22822@gmail.com", - "channel": "sources", - "context": { - "sources": { - "job_id": "24c5HJxHomh6YCngEOCgjS5r1KX/Syncher", - "task_id": "vw_rs_mailchimp_mocked_hg_data", - "version": "v1.8.1", - "batch_id": "f252c69d-c40d-450e-bcd2-2cf26cb62762", - "job_run_id": "c8el40l6e87v0c4hkbl0", - "task_run_id": "c8el40l6e87v0c4hkblg" - }, - "externalId": [ - { - "id": "emrichardson820+22822@gmail.com", - "type": "MAILCHIMP-92e1f1ad2c", - "identifierType": "email_address" - } - ], - "mappedToDestination": "true" - }, - "recordId": "1", - "rudderId": "4d5d0ed0-9db8-41cc-9bb0-a032f6bfa97a", - "messageId": "b3bee036-fc26-4f6d-9867-c17f85708a82" - } - }, - { - "metadata": { - "secret": {}, - "jobId": 3 - }, - "destination": { - "Config": { - "rudderAccountId": "25u5whFH7gVTnCiAjn4ykoCLGoC", - "customerId": "1234567890", - "subAccount": true, - "loginCustomerId": "11", - "listOfConversions": [ - { - "conversions": "Page View" - }, - { - "conversions": "Product Added" - } - ], - "authStatus": "active" - } - }, - "message": { - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.0.0" - }, - "traits": { - "phone": "912382193", - "firstName": "John", - "lastName": "Gomes", - "city": "London", - "state": "UK", - "streetAddress": "71 Cherry Court SOUTHAMPTON SO53 5PD UK" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.0.0" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "locale": "en-US", - "ip": "0.0.0.0", - "os": { - "name": "", - "version": "" - }, - "screen": { - "density": 2 - } - }, - "event": "Page View", - "type": "track", - "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", - "originalTimestamp": "2019-10-14T11:15:18.299Z", - "anonymousId": "00000000000000000000000000", - "userId": "12345", - "properties": { - "gclid": "gclid1234", - "conversionDateTime": "2022-01-01 12:32:45-08:00", - "adjustedValue": "10", - "currency": "INR", - "adjustmentDateTime": "2022-01-01 12:32:45-08:00", - "partialFailure": true, - "campaignId": "1", - "templateId": "0", - "order_id": 10000, - "total": 1000, - "products": [ - { - "product_id": "507f1f77bcf86cd799439011", - "sku": "45790-32", - "name": "Monopoly: 3rd Edition", - "price": "19", - "position": "1", - "category": "cars", - "url": "https://www.example.com/product/path", - "image_url": "https://www.example.com/product/path.jpg", - "quantity": "2" - }, - { - "product_id": "507f1f77bcf86cd7994390112", - "sku": "45790-322", - "name": "Monopoly: 3rd Edition2", - "price": "192", - "quantity": 22, - "position": "12", - "category": "Cars2", - "url": "https://www.example.com/product/path2", - "image_url": "https://www.example.com/product/path.jpg2" - } - ] - }, - "integrations": { - "All": true - }, - "name": "ApplicationLoaded", - "sentAt": "2019-10-14T11:15:53.296Z" - } - }, - ], - destType: 'google_adwords_enhanced_conversions', + { + name: 'google_adwords_enhanced_conversions', + description: 'Test 0', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + metadata: { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', }, - method: 'POST', + jobId: 1, + }, + destination: { + Config: { + rudderAccountId: '25u5whFH7gVTnCiAjn4ykoCLGoC', + customerId: '1234567890', + subAccount: true, + loginCustomerId: '11', + listOfConversions: [ + { + conversions: 'Page View', + }, + { + conversions: 'Product Added', + }, + ], + authStatus: 'active', + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + phone: '912382193', + firstName: 'John', + lastName: 'Gomes', + city: 'London', + state: 'UK', + streetAddress: '71 Cherry Court SOUTHAMPTON SO53 5PD UK', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + event: 'Page View', + type: 'track', + messageId: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', + originalTimestamp: '2019-10-14T11:15:18.299Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + properties: { + gclid: 'gclid1234', + conversionDateTime: '2022-01-01 12:32:45-08:00', + adjustedValue: '10', + currency: 'INR', + adjustmentDateTime: '2022-01-01 12:32:45-08:00', + partialFailure: true, + campaignId: '1', + templateId: '0', + order_id: 10000, + total: 1000, + products: [ + { + product_id: '507f1f77bcf86cd799439011', + sku: '45790-32', + name: 'Monopoly: 3rd Edition', + price: '19', + position: '1', + category: 'cars', + url: 'https://www.example.com/product/path', + image_url: 'https://www.example.com/product/path.jpg', + quantity: '2', + }, + { + product_id: '507f1f77bcf86cd7994390112', + sku: '45790-322', + name: 'Monopoly: 3rd Edition2', + price: '192', + quantity: 22, + position: '12', + category: 'Cars2', + url: 'https://www.example.com/product/path2', + image_url: 'https://www.example.com/product/path.jpg2', + }, + ], + }, + integrations: { + All: true, + }, + name: 'ApplicationLoaded', + sentAt: '2019-10-14T11:15:53.296Z', + }, }, + { + metadata: { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + jobId: 2, + }, + destination: { + Config: { + rudderAccountId: '25u5whFH7gVTnCiAjn4ykoCLGoC', + customerId: '1234567890', + subAccount: true, + loginCustomerId: '', + listOfConversions: [ + { + conversions: 'Page View', + }, + { + conversions: 'Product Added', + }, + ], + authStatus: 'active', + }, + }, + message: { + type: 'identify', + traits: { + status: 'elizabeth', + }, + userId: 'emrichardson820+22822@gmail.com', + channel: 'sources', + context: { + sources: { + job_id: '24c5HJxHomh6YCngEOCgjS5r1KX/Syncher', + task_id: 'vw_rs_mailchimp_mocked_hg_data', + version: 'v1.8.1', + batch_id: 'f252c69d-c40d-450e-bcd2-2cf26cb62762', + job_run_id: 'c8el40l6e87v0c4hkbl0', + task_run_id: 'c8el40l6e87v0c4hkblg', + }, + externalId: [ + { + id: 'emrichardson820+22822@gmail.com', + type: 'MAILCHIMP-92e1f1ad2c', + identifierType: 'email_address', + }, + ], + mappedToDestination: 'true', + }, + recordId: '1', + rudderId: '4d5d0ed0-9db8-41cc-9bb0-a032f6bfa97a', + messageId: 'b3bee036-fc26-4f6d-9867-c17f85708a82', + }, + }, + { + metadata: { + secret: {}, + jobId: 3, + }, + destination: { + Config: { + rudderAccountId: '25u5whFH7gVTnCiAjn4ykoCLGoC', + customerId: '1234567890', + subAccount: true, + loginCustomerId: '11', + listOfConversions: [ + { + conversions: 'Page View', + }, + { + conversions: 'Product Added', + }, + ], + authStatus: 'active', + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + phone: '912382193', + firstName: 'John', + lastName: 'Gomes', + city: 'London', + state: 'UK', + streetAddress: '71 Cherry Court SOUTHAMPTON SO53 5PD UK', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + event: 'Page View', + type: 'track', + messageId: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', + originalTimestamp: '2019-10-14T11:15:18.299Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + properties: { + gclid: 'gclid1234', + conversionDateTime: '2022-01-01 12:32:45-08:00', + adjustedValue: '10', + currency: 'INR', + adjustmentDateTime: '2022-01-01 12:32:45-08:00', + partialFailure: true, + campaignId: '1', + templateId: '0', + order_id: 10000, + total: 1000, + products: [ + { + product_id: '507f1f77bcf86cd799439011', + sku: '45790-32', + name: 'Monopoly: 3rd Edition', + price: '19', + position: '1', + category: 'cars', + url: 'https://www.example.com/product/path', + image_url: 'https://www.example.com/product/path.jpg', + quantity: '2', + }, + { + product_id: '507f1f77bcf86cd7994390112', + sku: '45790-322', + name: 'Monopoly: 3rd Edition2', + price: '192', + quantity: 22, + position: '12', + category: 'Cars2', + url: 'https://www.example.com/product/path2', + image_url: 'https://www.example.com/product/path.jpg2', + }, + ], + }, + integrations: { + All: true, + }, + name: 'ApplicationLoaded', + sentAt: '2019-10-14T11:15:53.296Z', + }, + }, + ], + destType: 'google_adwords_enhanced_conversions', }, - output: { - response: { - status: 200, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/1234567890:uploadConversionAdjustments', + headers: { + Authorization: 'Bearer abcd1234', + 'Content-Type': 'application/json', + 'developer-token': 'ijkl91011', + 'login-customer-id': '11', + }, + params: { event: 'Page View', customerId: '1234567890' }, body: { - output: [ - { - "batchedRequest": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/1234567890:uploadConversionAdjustments", - "headers": { - "Authorization": "Bearer abcd1234", - "Content-Type": "application/json", - "developer-token": "ijkl91011", - "login-customer-id": "11" - }, - "params": { "event": "Page View", "customerId": "1234567890" }, - "body": { - "JSON": { - "partialFailure": true, - "conversionAdjustments": [ - { - "gclidDateTimePair": { - "gclid": "gclid1234", - "conversionDateTime": "2022-01-01 12:32:45-08:00" - }, - "restatementValue": { - "adjustedValue": 10, - "currencyCode": "INR" - }, - "orderId": "10000", - "adjustmentDateTime": "2022-01-01 12:32:45-08:00", - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", - "userIdentifiers": [ - { - "hashedPhoneNumber": "04387707e6cbed8c4538c81cc570ed9252d579469f36c273839b26d784e4bdbe" - }, - { - "addressInfo": { - "hashedFirstName": "a8cfcd74832004951b4408cdb0a5dbcd8c7e52d43f7fe244bf720582e05241da", - "hashedLastName": "1c574b17eefa532b6d61c963550a82d2d3dfca4a7fb69e183374cfafd5328ee4", - "state": "UK", - "city": "London", - "hashedStreetAddress": "9a4d2e50828448f137f119a3ebdbbbab8d6731234a67595fdbfeb2a2315dd550" - } - } - ], - "adjustmentType": "ENHANCEMENT" - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - "metadata": [ - { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl91011" - }, - "jobId": 1 - } - ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "rudderAccountId": "25u5whFH7gVTnCiAjn4ykoCLGoC", - "customerId": "1234567890", - "subAccount": true, - "loginCustomerId": "11", - "listOfConversions": [{ "conversions": "Page View" }, { "conversions": "Product Added" }], - "authStatus": "active" - } - } + JSON: { + partialFailure: true, + conversionAdjustments: [ + { + gclidDateTimePair: { + gclid: 'gclid1234', + conversionDateTime: '2022-01-01 12:32:45-08:00', }, - { - "metadata": [ - { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl91011" - }, - "jobId": 2 - } - ], - "destination": { - "Config": { - "rudderAccountId": "25u5whFH7gVTnCiAjn4ykoCLGoC", - "customerId": "1234567890", - "subAccount": true, - "loginCustomerId": "", - "listOfConversions": [ - { - "conversions": "Page View" - }, - { - "conversions": "Product Added" - } - ], - "authStatus": "active" - } - }, - "batched": false, - "statusCode": 400, - "error": "Message Type identify is not supported. Aborting message.", - "statTags": { - "destType": "GOOGLE_ADWORDS_ENHANCED_CONVERSIONS", - "errorCategory": "dataValidation", - "errorType": "instrumentation", - "feature": "router", - "implementation": "native", - "module": "destination", - } + restatementValue: { + adjustedValue: 10, + currencyCode: 'INR', }, - { - "metadata": [ - { - "secret": {}, - "jobId": 3 - } - ], - "destination": { - "Config": { - "rudderAccountId": "25u5whFH7gVTnCiAjn4ykoCLGoC", - "customerId": "1234567890", - "subAccount": true, - "loginCustomerId": "11", - "listOfConversions": [ - { - "conversions": "Page View" - }, - { - "conversions": "Product Added" - } - ], - "authStatus": "active" - } + orderId: '10000', + adjustmentDateTime: '2022-01-01 12:32:45-08:00', + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + userIdentifiers: [ + { + hashedPhoneNumber: + '04387707e6cbed8c4538c81cc570ed9252d579469f36c273839b26d784e4bdbe', + }, + { + addressInfo: { + hashedFirstName: + 'a8cfcd74832004951b4408cdb0a5dbcd8c7e52d43f7fe244bf720582e05241da', + hashedLastName: + '1c574b17eefa532b6d61c963550a82d2d3dfca4a7fb69e183374cfafd5328ee4', + state: 'UK', + city: 'London', + hashedStreetAddress: + '9a4d2e50828448f137f119a3ebdbbbab8d6731234a67595fdbfeb2a2315dd550', }, - "batched": false, - "statusCode": 500, - "error": "OAuth - access token not found", - "statTags": { - "destType": "GOOGLE_ADWORDS_ENHANCED_CONVERSIONS", - "errorCategory": "platform", - "errorType": "oAuthSecret", - "feature": "router", - "implementation": "native", - "module": "destination", - } - } - ] - , + }, + ], + adjustmentType: 'ENHANCEMENT', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + metadata: [ + { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + jobId: 1, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + rudderAccountId: '25u5whFH7gVTnCiAjn4ykoCLGoC', + customerId: '1234567890', + subAccount: true, + loginCustomerId: '11', + listOfConversions: [ + { conversions: 'Page View' }, + { conversions: 'Product Added' }, + ], + authStatus: 'active', + }, + }, + }, + { + metadata: [ + { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl91011', + }, + jobId: 2, + }, + ], + destination: { + Config: { + rudderAccountId: '25u5whFH7gVTnCiAjn4ykoCLGoC', + customerId: '1234567890', + subAccount: true, + loginCustomerId: '', + listOfConversions: [ + { + conversions: 'Page View', + }, + { + conversions: 'Product Added', + }, + ], + authStatus: 'active', + }, + }, + batched: false, + statusCode: 400, + error: 'Message Type identify is not supported. Aborting message.', + statTags: { + destType: 'GOOGLE_ADWORDS_ENHANCED_CONVERSIONS', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'router', + implementation: 'native', + module: 'destination', + }, + }, + { + metadata: [ + { + secret: {}, + jobId: 3, + }, + ], + destination: { + Config: { + rudderAccountId: '25u5whFH7gVTnCiAjn4ykoCLGoC', + customerId: '1234567890', + subAccount: true, + loginCustomerId: '11', + listOfConversions: [ + { + conversions: 'Page View', + }, + { + conversions: 'Product Added', + }, + ], + authStatus: 'active', }, + }, + batched: false, + statusCode: 500, + error: 'OAuth - access token not found', + statTags: { + destType: 'GOOGLE_ADWORDS_ENHANCED_CONVERSIONS', + errorCategory: 'platform', + errorType: 'oAuthSecret', + feature: 'router', + implementation: 'native', + module: 'destination', + }, }, + ], }, - } + }, + }, + }, ]; diff --git a/test/integrations/destinations/google_adwords_remarketing_lists/dataDelivery/data.ts b/test/integrations/destinations/google_adwords_remarketing_lists/dataDelivery/data.ts index b41d725799..414e46ea19 100644 --- a/test/integrations/destinations/google_adwords_remarketing_lists/dataDelivery/data.ts +++ b/test/integrations/destinations/google_adwords_remarketing_lists/dataDelivery/data.ts @@ -1,247 +1,261 @@ export const data = [ - { - name: 'google_adwords_remarketing_lists', - description: 'Test 0', - feature: 'dataDelivery', - module: 'destination', - version: 'v0', - input: { - request: { - body: { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs", - "headers": { - "Authorization": "Bearer dummy-access", - "Content-Type": "application/json", - "developer-token": "dummy-dev-token" - }, - "params": { - "destination": "google_adwords_remarketing_lists", - "listId": "709078448", - "customerId": "7693729833" - }, - "body": { - "JSON": { - "enablePartialFailure": true, - "operations": [ - { - "create": { - "userIdentifiers": [ - { - "hashedEmail": "85cc9fefa1eff1baab55d10df0cecff2acb25344867a5d0f96e1b1c5e2f10f05" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "hashedEmail": "85cc9fefa1eff1baab55d10df0cecff2acb25344867a5d0f96e1b1c5e2f10f05" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "e56d336922eaab3be8c1244dbaa713e134a8eba50ddbd4f50fd2fe18d72595cd" - } - } - ] - } - } - ] + { + name: 'google_adwords_remarketing_lists', + description: 'Test 0', + feature: 'dataDelivery', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs', + headers: { + Authorization: 'Bearer dummy-access', + 'Content-Type': 'application/json', + 'developer-token': 'dummy-dev-token', + }, + params: { + destination: 'google_adwords_remarketing_lists', + listId: '709078448', + customerId: '7693729833', + consent: {}, + }, + body: { + JSON: { + enablePartialFailure: true, + operations: [ + { + create: { + userIdentifiers: [ + { + hashedEmail: + '85cc9fefa1eff1baab55d10df0cecff2acb25344867a5d0f96e1b1c5e2f10f05', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + hashedEmail: + '85cc9fefa1eff1baab55d10df0cecff2acb25344867a5d0f96e1b1c5e2f10f05', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + 'e56d336922eaab3be8c1244dbaa713e134a8eba50ddbd4f50fd2fe18d72595cd', }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} + }, + ], + }, }, - method: 'POST' + ], }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, }, - output: { - response: { - status: 200, - body: { - "output": { - "status": 200, - "message": "Request Processed Successfully", - "destinationResponse": { "response": "", "status": 200 } - } - }, - }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: { + status: 200, + message: 'Request Processed Successfully', + destinationResponse: { response: '', status: 200 }, + }, }, + }, }, - { - name: 'google_adwords_remarketing_lists', - description: 'Test 1', - feature: 'dataDelivery', - module: 'destination', - version: 'v0', - input: { - request: { - body: { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/7693729834/offlineUserDataJobs", - "headers": { - "Authorization": "Bearer dummy-access", - "Content-Type": "application/json", - "developer-token": "dummy-dev-token" - }, - "params": { - "listId": "709078448", - "customerId": "7693729833", - "destination": "google_adwords_remarketing_lists" - }, - "body": { - "JSON": { - "enablePartialFailure": true, - "operations": [ - { - "create": { - "userIdentifiers": [ - { - "hashedEmail": "abcd@testmail.com" - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} + }, + { + name: 'google_adwords_remarketing_lists', + description: 'Test 1', + feature: 'dataDelivery', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://googleads.googleapis.com/v15/customers/7693729834/offlineUserDataJobs', + headers: { + Authorization: 'Bearer dummy-access', + 'Content-Type': 'application/json', + 'developer-token': 'dummy-dev-token', + }, + params: { + listId: '709078448', + customerId: '7693729833', + destination: 'google_adwords_remarketing_lists', + consent: {}, + }, + body: { + JSON: { + enablePartialFailure: true, + operations: [ + { + create: { + userIdentifiers: [ + { + hashedEmail: 'abcd@testmail.com', + }, + ], + }, }, - method: 'POST' + ], }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, }, - output: { - response: { - status: 400, - body: { - output: { - "status": 400, - "message": "Request contains an invalid argument. during ga_audience response transformation", - "destinationResponse": { - "error": { - "code": 400, - "details": [ - { - "@type": "type.googleapis.com/google.ads.googleads.v9.errors.GoogleAdsFailure", - "errors": [ - { - "errorCode": { - "offlineUserDataJobError": "INVALID_SHA256_FORMAT" - }, - "message": "The SHA256 encoded value is malformed.", - "location": { - "fieldPathElements": [ - { "fieldName": "operations", "index": 0 }, - { "fieldName": "remove" }, - { "fieldName": "user_identifiers", "index": 0 }, - { "fieldName": "hashed_email" } - ] - } - } - ] - } - ], - "message": "Request contains an invalid argument.", - "status": "INVALID_ARGUMENT" - } + method: 'POST', + }, + }, + output: { + response: { + status: 400, + body: { + output: { + status: 400, + message: + 'Request contains an invalid argument. during ga_audience response transformation', + destinationResponse: { + error: { + code: 400, + details: [ + { + '@type': 'type.googleapis.com/google.ads.googleads.v9.errors.GoogleAdsFailure', + errors: [ + { + errorCode: { + offlineUserDataJobError: 'INVALID_SHA256_FORMAT', }, - "statTags": { - "destType": "GOOGLE_ADWORDS_REMARKETING_LISTS", - "errorCategory": "network", - "destinationId": "Non-determininable", - "workspaceId": "Non-determininable", - "errorType": "aborted", - "feature": "dataDelivery", - "implementation": "native", - "module": "destination" - } - }, - }, + message: 'The SHA256 encoded value is malformed.', + location: { + fieldPathElements: [ + { fieldName: 'operations', index: 0 }, + { fieldName: 'remove' }, + { fieldName: 'user_identifiers', index: 0 }, + { fieldName: 'hashed_email' }, + ], + }, + }, + ], + }, + ], + message: 'Request contains an invalid argument.', + status: 'INVALID_ARGUMENT', + }, + }, + statTags: { + destType: 'GOOGLE_ADWORDS_REMARKETING_LISTS', + errorCategory: 'network', + destinationId: 'Non-determininable', + workspaceId: 'Non-determininable', + errorType: 'aborted', + feature: 'dataDelivery', + implementation: 'native', + module: 'destination', }, + }, }, + }, }, - { - name: 'google_adwords_remarketing_lists', - description: 'Test 2', - feature: 'dataDelivery', - module: 'destination', - version: 'v0', - input: { - request: { - body: { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs", - "headers": { - "Authorization": "Bearer dummy-access", - "Content-Type": "application/json", - "developer-token": "dummy-dev-token" - }, - "params": { - "listId": "709078448", - "customerId": "7693729833", - "destination": "google_adwords_remarketing_lists" - }, - "body": { - "JSON": { - "enablePartialFailure": true, - "operations": [ - { - "remove": { - "userIdentifiers": [ - { - "hashedEmail": "85cc9fefa1eff1baab55d10df0cecff2acb25344867a5d0f96e1b1c5e2f10f05" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "hashedEmail": "85cc9fefa1eff1baab55d10df0cecff2acb25344867a5d0f96e1b1c5e2f10f05" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "e56d336922eaab3be8c1244dbaa713e134a8eba50ddbd4f50fd2fe18d72595cd" - } - } - ] - } - } - ] + }, + { + name: 'google_adwords_remarketing_lists', + description: 'Test 2', + feature: 'dataDelivery', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs', + headers: { + Authorization: 'Bearer dummy-access', + 'Content-Type': 'application/json', + 'developer-token': 'dummy-dev-token', + }, + params: { + listId: '709078448', + customerId: '7693729833', + destination: 'google_adwords_remarketing_lists', + consent: {}, + }, + body: { + JSON: { + enablePartialFailure: true, + operations: [ + { + remove: { + userIdentifiers: [ + { + hashedEmail: + '85cc9fefa1eff1baab55d10df0cecff2acb25344867a5d0f96e1b1c5e2f10f05', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + hashedEmail: + '85cc9fefa1eff1baab55d10df0cecff2acb25344867a5d0f96e1b1c5e2f10f05', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + 'e56d336922eaab3be8c1244dbaa713e134a8eba50ddbd4f50fd2fe18d72595cd', }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} + }, + ], + }, }, - method: 'POST' + ], }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, }, - output: { - response: { - status: 200, - body: { - output: { - "status": 200, - "message": "Request Processed Successfully", - "destinationResponse": { "response": "", "status": 200 } - }, - }, - }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: { + status: 200, + message: 'Request Processed Successfully', + destinationResponse: { response: '', status: 200 }, + }, }, - } + }, + }, + }, ]; diff --git a/test/integrations/destinations/google_adwords_remarketing_lists/network.ts b/test/integrations/destinations/google_adwords_remarketing_lists/network.ts index 11cbfa7cd8..8e1edd21aa 100644 --- a/test/integrations/destinations/google_adwords_remarketing_lists/network.ts +++ b/test/integrations/destinations/google_adwords_remarketing_lists/network.ts @@ -1,115 +1,204 @@ import { enhanceRequestOptions, getFormData } from '../../../../src/adapters/network'; export const networkCallsData = [ - { - httpReq: { - url: 'https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs:create', - data: { "job": { "type": "CUSTOMER_MATCH_USER_LIST", "customerMatchUserListMetadata": { "userList": "customers/7693729833/userLists/709078448" } } }, - headers: { "Authorization": "Bearer dummy-access", "Content-Type": "application/json", "developer-token": "dummy-dev-token" }, - method: 'POST', - }, - httpRes: { - "status": 200, - "data": { - "resourceName": "customers/9249589672/offlineUserDataJobs/18025019461" - } + { + httpReq: { + url: 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs:create', + data: { + job: { + type: 'CUSTOMER_MATCH_USER_LIST', + customerMatchUserListMetadata: { userList: 'customers/7693729833/userLists/709078448' }, }, + }, + headers: { + Authorization: 'Bearer dummy-access', + 'Content-Type': 'application/json', + 'developer-token': 'dummy-dev-token', + }, + method: 'POST', }, - { - httpReq: { - url: 'https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs/18025019461:addOperations', - data: { "enablePartialFailure": true, "operations": [{ "create": { "userIdentifiers": [{ "hashedEmail": "85cc9fefa1eff1baab55d10df0cecff2acb25344867a5d0f96e1b1c5e2f10f05" }, { "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" }, { "hashedEmail": "85cc9fefa1eff1baab55d10df0cecff2acb25344867a5d0f96e1b1c5e2f10f05" }, { "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" }, { "addressInfo": { "hashedFirstName": "e56d336922eaab3be8c1244dbaa713e134a8eba50ddbd4f50fd2fe18d72595cd" } }] } }] }, - headers: { "Authorization": "Bearer dummy-access", "Content-Type": "application/json", "developer-token": "dummy-dev-token" }, - method: 'POST', - }, - httpRes: { - "status": 200, - "data": {} - }, + httpRes: { + status: 200, + data: { + resourceName: 'customers/9249589672/offlineUserDataJobs/18025019461', + }, }, - { - httpReq: { - url: 'https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs/18025019461:run', - headers: { "Authorization": "Bearer dummy-access", "Content-Type": "application/json", "developer-token": "dummy-dev-token" }, - method: 'POST', - }, - httpRes: { - "status": 200, - }, + }, + { + httpReq: { + url: 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs/18025019461:addOperations', + data: { + enablePartialFailure: true, + operations: [ + { + create: { + userIdentifiers: [ + { hashedEmail: '85cc9fefa1eff1baab55d10df0cecff2acb25344867a5d0f96e1b1c5e2f10f05' }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { hashedEmail: '85cc9fefa1eff1baab55d10df0cecff2acb25344867a5d0f96e1b1c5e2f10f05' }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + 'e56d336922eaab3be8c1244dbaa713e134a8eba50ddbd4f50fd2fe18d72595cd', + }, + }, + ], + }, + }, + ], + }, + headers: { + Authorization: 'Bearer dummy-access', + 'Content-Type': 'application/json', + 'developer-token': 'dummy-dev-token', + }, + method: 'POST', }, - { - httpReq: { - url: 'https://googleads.googleapis.com/v14/customers/7693729834/offlineUserDataJobs:create', - data: { "job": { "type": "CUSTOMER_MATCH_USER_LIST", "customerMatchUserListMetadata": { "userList": "customers/7693729833/userLists/709078448" } } }, - headers: { "Authorization": "Bearer dummy-access", "Content-Type": "application/json", "developer-token": "dummy-dev-token" }, - method: 'POST', - }, - httpRes: { - "status": 200, - "data": { - "resourceName": "customers/9249589672/offlineUserDataJobs/18025019462" - } - }, + httpRes: { + status: 200, + data: {}, + }, + }, + { + httpReq: { + url: 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs/18025019461:run', + headers: { + Authorization: 'Bearer dummy-access', + 'Content-Type': 'application/json', + 'developer-token': 'dummy-dev-token', + }, + method: 'POST', }, - { - httpReq: { - url: 'https://googleads.googleapis.com/v14/customers/7693729834/offlineUserDataJobs/18025019462:addOperations', - data: { "enablePartialFailure": true, "operations": [{ "create": { "userIdentifiers": [{ "hashedEmail": "abcd@testmail.com" }] } }] }, - headers: { "Authorization": "Bearer dummy-access", "Content-Type": "application/json", "developer-token": "dummy-dev-token" }, - method: 'POST', + httpRes: { + status: 200, + }, + }, + { + httpReq: { + url: 'https://googleads.googleapis.com/v15/customers/7693729834/offlineUserDataJobs:create', + data: { + job: { + type: 'CUSTOMER_MATCH_USER_LIST', + customerMatchUserListMetadata: { userList: 'customers/7693729833/userLists/709078448' }, }, - httpRes: { - "data": { - "error": { - "code": 400, - "details": [ - { - "@type": "type.googleapis.com/google.ads.googleads.v9.errors.GoogleAdsFailure", - "errors": [ - { - "errorCode": { - "offlineUserDataJobError": "INVALID_SHA256_FORMAT" - }, - "message": "The SHA256 encoded value is malformed.", - "location": { - "fieldPathElements": [ - { - "fieldName": "operations", - "index": 0 - }, - { - "fieldName": "remove" - }, - { - "fieldName": "user_identifiers", - "index": 0 - }, - { - "fieldName": "hashed_email" - } - ] - } - } - ] - } + }, + headers: { + Authorization: 'Bearer dummy-access', + 'Content-Type': 'application/json', + 'developer-token': 'dummy-dev-token', + }, + method: 'POST', + }, + httpRes: { + status: 200, + data: { + resourceName: 'customers/9249589672/offlineUserDataJobs/18025019462', + }, + }, + }, + { + httpReq: { + url: 'https://googleads.googleapis.com/v15/customers/7693729834/offlineUserDataJobs/18025019462:addOperations', + data: { + enablePartialFailure: true, + operations: [{ create: { userIdentifiers: [{ hashedEmail: 'abcd@testmail.com' }] } }], + }, + headers: { + Authorization: 'Bearer dummy-access', + 'Content-Type': 'application/json', + 'developer-token': 'dummy-dev-token', + }, + method: 'POST', + }, + httpRes: { + data: { + error: { + code: 400, + details: [ + { + '@type': 'type.googleapis.com/google.ads.googleads.v9.errors.GoogleAdsFailure', + errors: [ + { + errorCode: { + offlineUserDataJobError: 'INVALID_SHA256_FORMAT', + }, + message: 'The SHA256 encoded value is malformed.', + location: { + fieldPathElements: [ + { + fieldName: 'operations', + index: 0, + }, + { + fieldName: 'remove', + }, + { + fieldName: 'user_identifiers', + index: 0, + }, + { + fieldName: 'hashed_email', + }, ], - "message": "Request contains an invalid argument.", - "status": "INVALID_ARGUMENT" - } + }, + }, + ], }, - "status": 400 + ], + message: 'Request contains an invalid argument.', + status: 'INVALID_ARGUMENT', }, + }, + status: 400, }, - { - httpReq: { - url: 'https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs/18025019461:addOperations', - data: { "enablePartialFailure": true, "operations": [{ "remove": { "userIdentifiers": [{ "hashedEmail": "85cc9fefa1eff1baab55d10df0cecff2acb25344867a5d0f96e1b1c5e2f10f05" }, { "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" }, { "hashedEmail": "85cc9fefa1eff1baab55d10df0cecff2acb25344867a5d0f96e1b1c5e2f10f05" }, { "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" }, { "addressInfo": { "hashedFirstName": "e56d336922eaab3be8c1244dbaa713e134a8eba50ddbd4f50fd2fe18d72595cd" } }] } }] }, - headers: { "Authorization": "Bearer dummy-access", "Content-Type": "application/json", "developer-token": "dummy-dev-token" }, - method: 'POST', - }, - httpRes: { - "status": 200, - "data": {} - }, - } -]; \ No newline at end of file + }, + { + httpReq: { + url: 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs/18025019461:addOperations', + data: { + enablePartialFailure: true, + operations: [ + { + remove: { + userIdentifiers: [ + { hashedEmail: '85cc9fefa1eff1baab55d10df0cecff2acb25344867a5d0f96e1b1c5e2f10f05' }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { hashedEmail: '85cc9fefa1eff1baab55d10df0cecff2acb25344867a5d0f96e1b1c5e2f10f05' }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + 'e56d336922eaab3be8c1244dbaa713e134a8eba50ddbd4f50fd2fe18d72595cd', + }, + }, + ], + }, + }, + ], + }, + headers: { + Authorization: 'Bearer dummy-access', + 'Content-Type': 'application/json', + 'developer-token': 'dummy-dev-token', + }, + method: 'POST', + }, + httpRes: { + status: 200, + data: {}, + }, + }, +]; diff --git a/test/integrations/destinations/google_adwords_remarketing_lists/processor/data.ts b/test/integrations/destinations/google_adwords_remarketing_lists/processor/data.ts index a6733f5daf..804efec220 100644 --- a/test/integrations/destinations/google_adwords_remarketing_lists/processor/data.ts +++ b/test/integrations/destinations/google_adwords_remarketing_lists/processor/data.ts @@ -1,10453 +1,12096 @@ export const data = [ - { - "name": "google_adwords_remarketing_lists", - "description": "Test 0", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "destination": { - "Config": { - "rudderAccountId": "rudder-acc-id", - "listId": "list111", - "customerId": "7693729833", - "loginCustomerId": "", - "subAccount": false, - "userSchema": [ - "email", - "phone", - "addressInfo" - ], - "isHashRequired": true, - "typeOfList": "General" - } - }, - "message": { - "userId": "user 1", - "anonymousId": "anon-id-new", - "event": "event1", - "type": "audiencelist", - "properties": { - "listData": { - "add": [ - { - "email": "test@abc.com", - "phone": "@09876543210", - "firstName": "test", - "lastName": "rudderlabs", - "country": "US", - "postalCode": "1245" - } - ] - }, - "enablePartialFailure": true - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs", - "headers": { - "Authorization": "Bearer dummy-access", - "Content-Type": "application/json", - "developer-token": "dummy-dev-token" - }, - "params": { - "listId": "list111", - "customerId": "7693729833" - }, - "body": { - "JSON": { - "enablePartialFailure": true, - "operations": [ - { - "create": { - "userIdentifiers": [ - { - "hashedEmail": "d3142c8f9c9129484daf28df80cc5c955791efed5e69afabb603bc8cb9ffd419" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08", - "hashedLastName": "dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "google_adwords_remarketing_lists", - "description": "Test 1", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "destination": { - "Config": { - "rudderAccountId": "rudder-acc-id", - "listId": "list111", - "customerId": "769-372-9833", - "loginCustomerId": "870-483-0944", - "subAccount": true, - "userSchema": [ - "email", - "phone", - "addressInfo" - ], - "isHashRequired": true, - "typeOfList": "userID" - } - }, - "message": { - "userId": "user 1", - "anonymousId": "anon-id-new", - "event": "event1", - "type": "audiencelist", - "properties": { - "listData": { - "add": [ - { - "email": "test@abc.com", - "phone": "@09876543210", - "firstName": "test", - "lastName": "rudderlabs", - "country": "US", - "postalCode": "1245", - "thirdPartyUserId": "useri1234" - } - ] - }, - "enablePartialFailure": true - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs", - "headers": { - "Authorization": "Bearer dummy-access", - "Content-Type": "application/json", - "developer-token": "dummy-dev-token", - "login-customer-id": "8704830944" - }, - "params": { - "listId": "list111", - "customerId": "7693729833" - }, - "body": { - "JSON": { - "enablePartialFailure": true, - "operations": [ - { - "create": { - "userIdentifiers": [ - { - "thirdPartyUserId": "useri1234" - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "google_adwords_remarketing_lists", - "description": "Test 2", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "destination": { - "Config": { - "rudderAccountId": "rudder-acc-id", - "listId": "list111", - "customerId": "7693729833", - "loginCustomerId": "", - "subAccount": false, - "userSchema": [ - "email", - "phone", - "addressInfo" - ], - "isHashRequired": true, - "typeOfList": "mobileDeviceID" - } - }, - "message": { - "userId": "user 1", - "anonymousId": "anon-id-new", - "event": "event1", - "type": "audiencelist", - "properties": { - "listData": { - "add": [ - { - "email": "test@abc.com", - "phone": "@09876543210", - "firstName": "test", - "lastName": "rudderlabs", - "country": "US", - "postalCode": "1245", - "thirdPartyUserId": "useri1234", - "mobileId": "abcd-1234-567h" - } - ] - }, - "enablePartialFailure": true - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs", - "headers": { - "Authorization": "Bearer dummy-access", - "Content-Type": "application/json", - "developer-token": "dummy-dev-token" - }, - "params": { - "listId": "list111", - "customerId": "7693729833" - }, - "body": { - "JSON": { - "enablePartialFailure": true, - "operations": [ - { - "create": { - "userIdentifiers": [ - { - "mobileId": "abcd-1234-567h" - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "google_adwords_remarketing_lists", - "description": "Test 3", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "destination": { - "Config": { - "rudderAccountId": "rudder-acc-id", - "listId": "list111", - "customerId": "7693729833", - "loginCustomerId": "", - "subAccount": false, - "userSchema": [ - "email", - "phone", - "addressInfo" - ], - "isHashRequired": true, - "typeOfList": "mobileDeviceID" - } - }, - "message": { - "userId": "user 1", - "anonymousId": "anon-id-new", - "event": "event1", - "type": "audiencelist", - "properties": { - "listData": { - "add": [ - { - "email": "abc@abc.com", - "phone": "@09876543210", - "firstName": "abc", - "lastName": "efg", - "country": "US", - "postalCode": "1245", - "thirdPartyUserId": "useri1234" - }, - { - "email": "def@abc.com", - "phone": "@09876543210", - "firstName": "def", - "lastName": "ghi", - "country": "US", - "postalCode": "1245", - "thirdPartyUserId": "useri1234" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245", - "thirdPartyUserId": "useri1234" - } - ] - }, - "enablePartialFailure": true - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "statusCode": 400, - "error": "Neither 'add' nor 'remove' property is present inside 'listData' or there are no attributes inside 'add' or 'remove' properties matching with the schema fields. Aborting message.", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation", - "destType": "GOOGLE_ADWORDS_REMARKETING_LISTS", - "module": "destination", - "implementation": "native", - "feature": "processor" - } - } - ] - } - } - }, - { - "name": "google_adwords_remarketing_lists", - "description": "Test 4", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "destination": { - "Config": { - "rudderAccountId": "rudder-acc-id", - "listId": "list111", - "customerId": "7693729833", - "loginCustomerId": "", - "subAccount": false, - "userSchema": [ - "email", - "phone", - "addressInfo" - ], - "isHashRequired": true, - "typeOfList": "mobileDeviceID" - } - }, - "message": { - "userId": "user 1", - "anonymousId": "anon-id-new", - "event": "event1", - "type": "audiencelist", - "properties": { - "listData": { - "remove": [ - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245", - "thirdPartyUserId": "useri1234" - } - ] - }, - "enablePartialFailure": true - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "statusCode": 400, - "error": "Neither 'add' nor 'remove' property is present inside 'listData' or there are no attributes inside 'add' or 'remove' properties matching with the schema fields. Aborting message.", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation", - "destType": "GOOGLE_ADWORDS_REMARKETING_LISTS", - "module": "destination", - "implementation": "native", - "feature": "processor" - } - } - ] - } - } - }, - { - "name": "google_adwords_remarketing_lists", - "description": "Test 5", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "destination": { - "Config": { - "rudderAccountId": "rudder-acc-id", - "listId": "list111", - "customerId": "7693729833", - "loginCustomerId": "", - "subAccount": false, - "userSchema": [ - "email", - "phone", - "addressInfo" - ], - "isHashRequired": true, - "typeOfList": "mobileDeviceID" - } - }, - "message": { - "userId": "user 1", - "anonymousId": "anon-id-new", - "event": "event1", - "properties": { - "listData": { - "remove": [ - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245", - "thirdPartyUserId": "useri1234" - } - ] - }, - "enablePartialFailure": true - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "statusCode": 400, - "error": "Message Type is not present. Aborting message.", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation", - "destType": "GOOGLE_ADWORDS_REMARKETING_LISTS", - "module": "destination", - "implementation": "native", - "feature": "processor" - } - } - ] - } - } - }, - { - "name": "google_adwords_remarketing_lists", - "description": "Test 6", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "destination": { - "Config": { - "rudderAccountId": "rudder-acc-id", - "listId": "list111", - "customerId": "7693729833", - "loginCustomerId": "", - "subAccount": false, - "userSchema": [ - "email", - "phone", - "addressInfo" - ], - "isHashRequired": true, - "typeOfList": "mobileDeviceID" - } - }, - "message": { - "type": "audiencelist", - "userId": "user 1", - "anonymousId": "anon-id-new", - "event": "event1", - "properties": { - "enablePartialFailure": true - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "statusCode": 400, - "error": "listData is not present inside properties. Aborting message.", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation", - "destType": "GOOGLE_ADWORDS_REMARKETING_LISTS", - "module": "destination", - "implementation": "native", - "feature": "processor" - } - } - ] - } - } - }, - { - "name": "google_adwords_remarketing_lists", - "description": "Test 7", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "destination": { - "Config": { - "rudderAccountId": "rudder-acc-id", - "listId": "list111", - "customerId": "7693729833", - "loginCustomerId": "", - "subAccount": true, - "userSchema": [ - "email", - "phone", - "addressInfo" - ], - "isHashRequired": true, - "typeOfList": "mobileDeviceID" - } - }, - "message": { - "userId": "user 1", - "anonymousId": "anon-id-new", - "event": "event1", - "type": "audiencelisT", - "properties": { - "listData": { - "add": [ - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "mobileId": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - } - ] - }, - "enablePartialFailure": true - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "statusCode": 400, - "error": "loginCustomerId is required as subAccount is true.", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "configuration", - "destType": "GOOGLE_ADWORDS_REMARKETING_LISTS", - "module": "destination", - "implementation": "native", - "feature": "processor" - } - } - ] - } - } - }, - { - "name": "google_adwords_remarketing_lists", - "description": "Test 8", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "destination": { - "Config": { - "rudderAccountId": "rudder-acc-id", - "listId": "list111", - "customerId": "7693729833", - "loginCustomerId": "", - "subAccount": false, - "userSchema": [ - "email", - "phone", - "addressInfo" - ], - "isHashRequired": true, - "typeOfList": "General" - } - }, - "message": { - "userId": "user 1", - "anonymousId": "anon-id-new", - "event": "event1", - "type": "audiencelisT", - "properties": { - "listData": { - "add": [ - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "mobileId": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - } - ] - }, - "enablePartialFailure": true - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs", - "headers": { - "Authorization": "Bearer dummy-access", - "Content-Type": "application/json", - "developer-token": "dummy-dev-token" - }, - "params": { - "listId": "list111", - "customerId": "7693729833" - }, - "body": { - "JSON": { - "enablePartialFailure": true, - "operations": [ - { - "create": { - "userIdentifiers": [ - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - } - ] - } - }, - { - "create": { - "userIdentifiers": [ - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - } - ] - } - }, - { - "create": { - "userIdentifiers": [ - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - }, - { - "create": { - "userIdentifiers": [ - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - } - ] - } - }, - { - "create": { - "userIdentifiers": [ - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - } - ] - } - }, - { - "create": { - "userIdentifiers": [ - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - }, - { - "create": { - "userIdentifiers": [ - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - } - ] - } - }, - { - "create": { - "userIdentifiers": [ - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - } - ] - } - }, - { - "create": { - "userIdentifiers": [ - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - }, - { - "create": { - "userIdentifiers": [ - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "google_adwords_remarketing_lists", - "description": "Test 9", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "destination": { - "Config": { - "rudderAccountId": "rudder-acc-id", - "listId": "list111", - "customerId": "7693729833", - "loginCustomerId": "", - "subAccount": false, - "userSchema": [ - "email", - "phone", - "addressInfo" - ], - "isHashRequired": true, - "typeOfList": "General" - } - }, - "message": { - "userId": "user 1", - "anonymousId": "anon-id-new", - "event": "event1", - "type": "audiencelisT", - "properties": { - "listData": { - "add": [ - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "mobileId": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - } - ], - "remove": [ - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "mobileId": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - } - ] - }, - "enablePartialFailure": true - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs", - "headers": { - "Authorization": "Bearer dummy-access", - "Content-Type": "application/json", - "developer-token": "dummy-dev-token" - }, - "params": { - "listId": "list111", - "customerId": "7693729833" - }, - "body": { - "JSON": { - "enablePartialFailure": true, - "operations": [ - { - "create": { - "userIdentifiers": [ - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "statusCode": 200 - }, - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs", - "headers": { - "Authorization": "Bearer dummy-access", - "Content-Type": "application/json", - "developer-token": "dummy-dev-token" - }, - "params": { - "listId": "list111", - "customerId": "7693729833" - }, - "body": { - "JSON": { - "enablePartialFailure": true, - "operations": [ - { - "remove": { - "userIdentifiers": [ - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "google_adwords_remarketing_lists", - "description": "Test 10", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "destination": { - "Config": { - "rudderAccountId": "rudder-acc-id", - "listId": "list111", - "customerId": "7693729833", - "loginCustomerId": "", - "subAccount": false, - "userSchema": [ - "email", - "phone", - "addressInfo" - ], - "isHashRequired": true, - "typeOfList": "General" - } - }, - "message": { - "userId": "user 1", - "anonymousId": "anon-id-new", - "event": "event1", - "type": "audiencelisT", - "properties": { - "listData": { - "add": [ - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "mobileId": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - } - ], - "remove": [ - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "mobileId": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - } - ] - }, - "enablePartialFailure": true - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs", - "headers": { - "Authorization": "Bearer dummy-access", - "Content-Type": "application/json", - "developer-token": "dummy-dev-token" - }, - "params": { - "listId": "list111", - "customerId": "7693729833" - }, - "body": { - "JSON": { - "enablePartialFailure": true, - "operations": [ - { - "create": { - "userIdentifiers": [ - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - } - ] - } - }, - { - "create": { - "userIdentifiers": [ - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - } - ] - } - }, - { - "create": { - "userIdentifiers": [ - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - }, - { - "create": { - "userIdentifiers": [ - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - } - ] - } - }, - { - "create": { - "userIdentifiers": [ - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - } - ] - } - }, - { - "create": { - "userIdentifiers": [ - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - }, - { - "create": { - "userIdentifiers": [ - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - } - ] - } - }, - { - "create": { - "userIdentifiers": [ - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - } - ] - } - }, - { - "create": { - "userIdentifiers": [ - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - }, - { - "create": { - "userIdentifiers": [ - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "statusCode": 200 - }, - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs", - "headers": { - "Authorization": "Bearer dummy-access", - "Content-Type": "application/json", - "developer-token": "dummy-dev-token" - }, - "params": { - "listId": "list111", - "customerId": "7693729833" - }, - "body": { - "JSON": { - "enablePartialFailure": true, - "operations": [ - { - "remove": { - "userIdentifiers": [ - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - } - ] - } - }, - { - "remove": { - "userIdentifiers": [ - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - } - ] - } - }, - { - "remove": { - "userIdentifiers": [ - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - }, - { - "remove": { - "userIdentifiers": [ - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - } - ] - } - }, - { - "remove": { - "userIdentifiers": [ - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - } - ] - } - }, - { - "remove": { - "userIdentifiers": [ - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - }, - { - "remove": { - "userIdentifiers": [ - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - } - ] - } - }, - { - "remove": { - "userIdentifiers": [ - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - } - ] - } - }, - { - "remove": { - "userIdentifiers": [ - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - }, - { - "remove": { - "userIdentifiers": [ - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "google_adwords_remarketing_lists", - "description": "Test 11", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "destination": { - "Config": { - "rudderAccountId": "rudder-acc-id", - "listId": "list111", - "customerId": "7693729833", - "loginCustomerId": "", - "subAccount": false, - "userSchema": [ - "email", - "phone", - "addressInfo" - ], - "isHashRequired": true, - "typeOfList": "General" - } - }, - "message": { - "userId": "user 1", - "anonymousId": "anon-id-new", - "event": "event1", - "type": "audiencelisT", - "properties": { - "listData": { - "remove": [ - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "mobileId": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - } - ] - }, - "enablePartialFailure": true - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs", - "headers": { - "Authorization": "Bearer dummy-access", - "Content-Type": "application/json", - "developer-token": "dummy-dev-token" - }, - "params": { - "listId": "list111", - "customerId": "7693729833" - }, - "body": { - "JSON": { - "enablePartialFailure": true, - "operations": [ - { - "remove": { - "userIdentifiers": [ - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "google_adwords_remarketing_lists", - "description": "Test 12", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "destination": { - "Config": { - "rudderAccountId": "rudder-acc-id", - "listId": "list111", - "customerId": "7693729833", - "loginCustomerId": "", - "subAccount": false, - "userSchema": [ - "email", - "phone", - "addressInfo" - ], - "isHashRequired": true, - "typeOfList": "General" - } - }, - "message": { - "userId": "user 1", - "anonymousId": "anon-id-new", - "event": "event1", - "type": "audiencelisT", - "properties": { - "listData": { - "delete": [ - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "mobileId": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - } - ] - }, - "enablePartialFailure": true - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "statusCode": 400, - "error": "Neither 'add' nor 'remove' property is present inside 'listData' or there are no attributes inside 'add' or 'remove' properties matching with the schema fields. Aborting message.", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation", - "destType": "GOOGLE_ADWORDS_REMARKETING_LISTS", - "module": "destination", - "implementation": "native", - "feature": "processor" - } - } - ] - } - } - }, - { - "name": "google_adwords_remarketing_lists", - "description": "Test 13", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "destination": { - "Config": { - "rudderAccountId": "rudder-acc-id", - "listId": "list111", - "customerId": "7693729833", - "loginCustomerId": "", - "subAccount": false, - "userSchema": [ - "email", - "phone", - "addressInfo" - ], - "isHashRequired": true, - "typeOfList": "General" - } - }, - "message": { - "userId": "user 1", - "anonymousId": "anon-id-new", - "event": "event1", - "type": "audiencelisT", - "properties": { - "listData": { - "remove": [ - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "mobileId": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - } - ], - "add": [ - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "mobileId": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - } - ] - }, - "enablePartialFailure": true - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs", - "headers": { - "Authorization": "Bearer dummy-access", - "Content-Type": "application/json", - "developer-token": "dummy-dev-token" - }, - "params": { - "listId": "list111", - "customerId": "7693729833" - }, - "body": { - "JSON": { - "enablePartialFailure": true, - "operations": [ - { - "remove": { - "userIdentifiers": [ - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - } - ] - } - }, - { - "remove": { - "userIdentifiers": [ - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - } - ] - } - }, - { - "remove": { - "userIdentifiers": [ - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - }, - { - "remove": { - "userIdentifiers": [ - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - } - ] - } - }, - { - "remove": { - "userIdentifiers": [ - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - } - ] - } - }, - { - "remove": { - "userIdentifiers": [ - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - }, - { - "remove": { - "userIdentifiers": [ - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - } - ] - } - }, - { - "remove": { - "userIdentifiers": [ - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - } - ] - } - }, - { - "remove": { - "userIdentifiers": [ - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - }, - { - "remove": { - "userIdentifiers": [ - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "statusCode": 200 - }, - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs", - "headers": { - "Authorization": "Bearer dummy-access", - "Content-Type": "application/json", - "developer-token": "dummy-dev-token" - }, - "params": { - "listId": "list111", - "customerId": "7693729833" - }, - "body": { - "JSON": { - "enablePartialFailure": true, - "operations": [ - { - "create": { - "userIdentifiers": [ - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - } - ] - } - }, - { - "create": { - "userIdentifiers": [ - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - } - ] - } - }, - { - "create": { - "userIdentifiers": [ - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - }, - { - "create": { - "userIdentifiers": [ - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - } - ] - } - }, - { - "create": { - "userIdentifiers": [ - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - } - ] - } - }, - { - "create": { - "userIdentifiers": [ - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - }, - { - "create": { - "userIdentifiers": [ - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - } - ] - } - }, - { - "create": { - "userIdentifiers": [ - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - } - ] - } - }, - { - "create": { - "userIdentifiers": [ - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - }, - { - "create": { - "userIdentifiers": [ - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "google_adwords_remarketing_lists", - "description": "Test 14", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "destination": { - "Config": { - "rudderAccountId": "rudder-acc-id", - "listId": "list111", - "customerId": "7693729833", - "loginCustomerId": "", - "subAccount": false, - "userSchema": [ - "email", - "phone", - "addressInfo" - ], - "isHashRequired": true, - "typeOfList": "General" - } - }, - "message": { - "userId": "user 1", - "anonymousId": "anon-id-new", - "event": "event1", - "type": "audiencelisT", - "properties": { - "listData": { - "remove": [ - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "mobileId": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - } - ], - "add": [ - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "mobileId": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - } - ] - }, - "enablePartialFailure": true - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs", - "headers": { - "Authorization": "Bearer dummy-access", - "Content-Type": "application/json", - "developer-token": "dummy-dev-token" - }, - "params": { - "listId": "list111", - "customerId": "7693729833" - }, - "body": { - "JSON": { - "enablePartialFailure": true, - "operations": [ - { - "remove": { - "userIdentifiers": [ - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "statusCode": 200 - }, - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs", - "headers": { - "Authorization": "Bearer dummy-access", - "Content-Type": "application/json", - "developer-token": "dummy-dev-token" - }, - "params": { - "listId": "list111", - "customerId": "7693729833" - }, - "body": { - "JSON": { - "enablePartialFailure": true, - "operations": [ - { - "create": { - "userIdentifiers": [ - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "google_adwords_remarketing_lists", - "description": "Test 15", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "destination": { - "Config": { - "rudderAccountId": "rudder-acc-id", - "listId": "list111", - "customerId": "7693729833", - "loginCustomerId": "", - "subAccount": false, - "userSchema": [ - "email", - "phone", - "addressInfo" - ], - "isHashRequired": true, - "typeOfList": "General" - } - }, - "message": { - "userId": "user 1", - "anonymousId": "anon-id-new", - "event": "event1", - "type": "audiencelisT", - "properties": { - "listData": { - "remove": [ - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": null, - "lastName": "jkl", - "country": "US", - "mobileId": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - } - ], - "add": [ - { - "email": "ghi@abc.com", - "phone": null, - "firstName": "ghi", - "lastName": "jkl", - "country": null, - "mobileId": "1245" - }, - { - "email": "ghi@abc.com", - "phone": "@09876543210", - "firstName": "ghi", - "lastName": "jkl", - "country": "US", - "postalCode": "1245" - } - ] - }, - "enablePartialFailure": true - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs", - "headers": { - "Authorization": "Bearer dummy-access", - "Content-Type": "application/json", - "developer-token": "dummy-dev-token" - }, - "params": { - "listId": "list111", - "customerId": "7693729833" - }, - "body": { - "JSON": { - "enablePartialFailure": true, - "operations": [ - { - "remove": { - "userIdentifiers": [ - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "statusCode": 200 - }, - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs", - "headers": { - "Authorization": "Bearer dummy-access", - "Content-Type": "application/json", - "developer-token": "dummy-dev-token" - }, - "params": { - "listId": "list111", - "customerId": "7693729833" - }, - "body": { - "JSON": { - "enablePartialFailure": true, - "operations": [ - { - "create": { - "userIdentifiers": [ - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1" - } - }, - { - "hashedEmail": "a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb", - "hashedLastName": "268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "google_adwords_remarketing_lists", - "description": "Test 16", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "destination": { - "Config": { - "rudderAccountId": "rudder-acc-id", - "listId": "list111", - "customerId": "7693729833", - "loginCustomerId": "", - "subAccount": false, - "userSchema": [ - "email", - "phone", - "addressInfo" - ], - "isHashRequired": true, - "typeOfList": "General" - } - }, - "message": { - "userId": "user 1", - "anonymousId": "anon-id-new", - "event": "event1", - "type": "audiencelist", - "properties": { - "listData": { - "add": [ - { - "email": "test@abc.com", - "phone": false, - "firstName": "test", - "lastName": null, - "country": "US", - "postalCode": 0 - } - ] - }, - "enablePartialFailure": true - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs", - "headers": { - "Authorization": "Bearer dummy-access", - "Content-Type": "application/json", - "developer-token": "dummy-dev-token" - }, - "params": { - "listId": "list111", - "customerId": "7693729833" - }, - "body": { - "JSON": { - "enablePartialFailure": true, - "operations": [ - { - "create": { - "userIdentifiers": [ - { - "hashedEmail": "d3142c8f9c9129484daf28df80cc5c955791efed5e69afabb603bc8cb9ffd419" - }, - { - "addressInfo": { - "hashedFirstName": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08", - "countryCode": "US", - "postalCode": 0 - } - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "google_adwords_remarketing_lists", - "description": "Test 17", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "metadata": { - "secret": null - }, - "destination": { - "Config": { - "rudderAccountId": "rudder-acc-id", - "listId": "list111", - "customerId": "7693729833", - "loginCustomerId": "", - "subAccount": false, - "userSchema": [ - "email", - "phone", - "addressInfo" - ], - "isHashRequired": true, - "typeOfList": "General" - } - }, - "message": { - "userId": "user 1", - "anonymousId": "anon-id-new", - "event": "event1", - "type": "audiencelist", - "properties": { - "listData": { - "add": [ - { - "email": "test@abc.com", - "phone": "@09876543210", - "firstName": "test", - "lastName": "rudderlabs", - "country": "US", - "postalCode": "1245" - } - ] - }, - "enablePartialFailure": true - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "metadata": { - "secret": null - }, - "statusCode": 500, - "error": "OAuth - access token not found", - "statTags": { - "errorCategory": "platform", - "errorType": "oAuthSecret", - "destType": "GOOGLE_ADWORDS_REMARKETING_LISTS", - "module": "destination", - "implementation": "native", - "feature": "processor" - } - } - ] - } - } - }, - { - "name": "google_adwords_remarketing_lists", - "description": "Test 18", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "destination": { - "Config": { - "rudderAccountId": "rudder-acc-id", - "listId": "list111", - "customerId": "7693729833", - "loginCustomerId": "", - "subAccount": false, - "userSchema": [ - "email", - "phone", - "addressInfo" - ], - "isHashRequired": true, - "typeOfList": "General", - "audienceId": "aud1234" - } - }, - "message": { - "userId": "user 1", - "anonymousId": "anon-id-new", - "event": "event1", - "type": "audiencelist", - "properties": { - "listData": { - "add": [ - { - "email": "sudip@abc.com", - "phone": false, - "firstName": "sudip", - "lastName": null, - "country": "US", - "postalCode": 0 - } - ] - }, - "enablePartialFailure": true - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs", - "headers": { - "Authorization": "Bearer dummy-access", - "Content-Type": "application/json", - "developer-token": "dummy-dev-token" - }, - "params": { - "listId": "aud1234", - "customerId": "7693729833" - }, - "body": { - "JSON": { - "enablePartialFailure": true, - "operations": [ - { - "create": { - "userIdentifiers": [ - { - "hashedEmail": "938758751f5af66652a118e26503af824404bc13acd1cb7642ddff99916f0e1c" - }, - { - "addressInfo": { - "hashedFirstName": "a512ebb75e941411945c9a18bca4ecc315830e0b5cff8a525472c86c1f540844", - "countryCode": "US", - "postalCode": 0 - } - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "google_adwords_remarketing_lists", - "description": "Test 19", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "destination": { - "Config": { - "rudderAccountId": "rudder-acc-id", - "customerId": "7693729833", - "loginCustomerId": "", - "subAccount": false, - "userSchema": [ - "email", - "phone", - "addressInfo" - ], - "isHashRequired": true, - "typeOfList": "General" - } - }, - "message": { - "anonymousId": "24ed22ae-0681-4882-8c33-012e298e1c17", - "channel": "sources", - "context": { - "destinationFields": "email", - "externalId": [ - { - "identifierType": "email", - "type": "GOOGLE_ADWORDS_REMARKETING_LISTS-830441345" - } - ], - "mappedToDestination": "true", - "sources": { - "job_id": "2UcqQB4ygGtTBAvwCWl7xz8dJgt", - "job_run_id": "cjmsdip7m95b7aee7tpg", - "task_run_id": "cjmsdip7m95b7aee7tq0", - "version": "master" - } - }, - "event": "Add_Audience", - "messageId": "bd2d67ca-0c9a-4d3b-a2f8-35a3c3f75ba7", - "properties": { - "listData": { - "remove": [ - { - "email": "test1@mail.com" - }, - { - "email": "test5@xmail.com" - }, - { - "email": "test3@mail.com" - } - ] - } - }, - "recordId": "a071551c-87e0-48a7-aa5c-7c4144cec5cf/1/5", - "rudderId": "5e9ada0e-5f50-4cb8-a015-f6842a7615fd", - "sentAt": "2023-08-29 10:22:06.395377223 +0000 UTC", - "type": "audienceList", - "userId": "23423423" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs", - "headers": { - "Authorization": "Bearer dummy-access", - "Content-Type": "application/json", - "developer-token": "dummy-dev-token" - }, - "params": { - "listId": "830441345", - "customerId": "7693729833" - }, - "body": { - "JSON": { - "operations": [ - { - "remove": { - "userIdentifiers": [ - { - "hashedEmail": "78310d2dd727b704ff9d9c4742d01941b1217b89f45ab71d1e9bf5a010144048" - }, - { - "hashedEmail": "34a6406a076b943abfb9e97a6761e0c6b8cf049ab15b013412c57cf8370b5436" - }, - { - "hashedEmail": "8075d00e5f006b95eb090bf50f5246bc3c18c3d771fa1edf967b033b274b8d84" - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "google_adwords_remarketing_lists", - "description": "Test 20", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "destination": { - "Config": { - "rudderAccountId": "rudder-acc-id", - "customerId": "7693729833", - "loginCustomerId": "", - "subAccount": false, - "userSchema": [ - "email", - "phone", - "addressInfo" - ], - "isHashRequired": true, - "typeOfList": "General" - } - }, - "message": { - "anonymousId": "24ed22ae-0681-4882-8c33-012e298e1c17", - "channel": "sources", - "context": { - "destinationFields": "email", - "externalId": [ - { - "identifierType": "email", - "type": "GOOGLE_ADWORDS_REMARKETING_LISTS-830441345" - } - ], - "mappedToDestination": "true", - "sources": { - "job_id": "2UcqQB4ygGtTBAvwCWl7xz8dJgt", - "job_run_id": "cjmsdip7m95b7aee7tpg", - "task_run_id": "cjmsdip7m95b7aee7tq0", - "version": "master" - } - }, - "event": "Add_Audience", - "messageId": "bd2d67ca-0c9a-4d3b-a2f8-35a3c3f75ba7", - "properties": { - "listData": { - "add": [ - { - "email": "test1@mail.com" - }, - { - "email": "test5@xmail.com" - }, - { - "email": "test3@mail.com" - } - ] - } - }, - "recordId": "a071551c-87e0-48a7-aa5c-7c4144cec5cf/1/5", - "rudderId": "5e9ada0e-5f50-4cb8-a015-f6842a7615fd", - "sentAt": "2023-08-29 10:22:06.395377223 +0000 UTC", - "type": "audienceList", - "userId": "23423423" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs", - "headers": { - "Authorization": "Bearer dummy-access", - "Content-Type": "application/json", - "developer-token": "dummy-dev-token" - }, - "params": { - "listId": "830441345", - "customerId": "7693729833" - }, - "body": { - "JSON": { - "operations": [ - { - "create": { - "userIdentifiers": [ - { - "hashedEmail": "78310d2dd727b704ff9d9c4742d01941b1217b89f45ab71d1e9bf5a010144048" - }, - { - "hashedEmail": "34a6406a076b943abfb9e97a6761e0c6b8cf049ab15b013412c57cf8370b5436" - }, - { - "hashedEmail": "8075d00e5f006b95eb090bf50f5246bc3c18c3d771fa1edf967b033b274b8d84" - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "metadata": { - "secret": { - "access_token": "dummy-access", - "refresh_token": "dummy-refresh", - "developer_token": "dummy-dev-token" - } - }, - "statusCode": 200 - } - ] - } - } - } -] \ No newline at end of file + { + name: 'google_adwords_remarketing_lists', + description: 'Test 0', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + destination: { + Config: { + rudderAccountId: 'rudder-acc-id', + listId: 'list111', + customerId: '7693729833', + loginCustomerId: '', + subAccount: false, + userSchema: ['email', 'phone', 'addressInfo'], + isHashRequired: true, + typeOfList: 'General', + }, + }, + message: { + userId: 'user 1', + anonymousId: 'anon-id-new', + event: 'event1', + type: 'audiencelist', + properties: { + listData: { + add: [ + { + email: 'test@abc.com', + phone: '@09876543210', + firstName: 'test', + lastName: 'rudderlabs', + country: 'US', + postalCode: '1245', + }, + ], + }, + enablePartialFailure: true, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs', + headers: { + Authorization: 'Bearer dummy-access', + 'Content-Type': 'application/json', + 'developer-token': 'dummy-dev-token', + }, + params: { + listId: 'list111', + customerId: '7693729833', + consent: {}, + }, + body: { + JSON: { + enablePartialFailure: true, + operations: [ + { + create: { + userIdentifiers: [ + { + hashedEmail: + 'd3142c8f9c9129484daf28df80cc5c955791efed5e69afabb603bc8cb9ffd419', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08', + hashedLastName: + 'dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251', + countryCode: 'US', + postalCode: '1245', + }, + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'google_adwords_remarketing_lists', + description: 'Test 1', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + destination: { + Config: { + rudderAccountId: 'rudder-acc-id', + listId: 'list111', + customerId: '769-372-9833', + loginCustomerId: '870-483-0944', + subAccount: true, + userSchema: ['email', 'phone', 'addressInfo'], + isHashRequired: true, + typeOfList: 'userID', + }, + }, + message: { + userId: 'user 1', + anonymousId: 'anon-id-new', + event: 'event1', + type: 'audiencelist', + properties: { + listData: { + add: [ + { + email: 'test@abc.com', + phone: '@09876543210', + firstName: 'test', + lastName: 'rudderlabs', + country: 'US', + postalCode: '1245', + thirdPartyUserId: 'useri1234', + }, + ], + }, + enablePartialFailure: true, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs', + headers: { + Authorization: 'Bearer dummy-access', + 'Content-Type': 'application/json', + 'developer-token': 'dummy-dev-token', + 'login-customer-id': '8704830944', + }, + params: { + listId: 'list111', + customerId: '7693729833', + consent: {}, + }, + body: { + JSON: { + enablePartialFailure: true, + operations: [ + { + create: { + userIdentifiers: [ + { + thirdPartyUserId: 'useri1234', + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'google_adwords_remarketing_lists', + description: 'Test 2', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + destination: { + Config: { + rudderAccountId: 'rudder-acc-id', + listId: 'list111', + customerId: '7693729833', + loginCustomerId: '', + subAccount: false, + userSchema: ['email', 'phone', 'addressInfo'], + isHashRequired: true, + typeOfList: 'mobileDeviceID', + }, + }, + message: { + userId: 'user 1', + anonymousId: 'anon-id-new', + event: 'event1', + type: 'audiencelist', + properties: { + listData: { + add: [ + { + email: 'test@abc.com', + phone: '@09876543210', + firstName: 'test', + lastName: 'rudderlabs', + country: 'US', + postalCode: '1245', + thirdPartyUserId: 'useri1234', + mobileId: 'abcd-1234-567h', + }, + ], + }, + enablePartialFailure: true, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs', + headers: { + Authorization: 'Bearer dummy-access', + 'Content-Type': 'application/json', + 'developer-token': 'dummy-dev-token', + }, + params: { + listId: 'list111', + customerId: '7693729833', + consent: {}, + }, + body: { + JSON: { + enablePartialFailure: true, + operations: [ + { + create: { + userIdentifiers: [ + { + mobileId: 'abcd-1234-567h', + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'google_adwords_remarketing_lists', + description: 'Test 3', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + destination: { + Config: { + rudderAccountId: 'rudder-acc-id', + listId: 'list111', + customerId: '7693729833', + loginCustomerId: '', + subAccount: false, + userSchema: ['email', 'phone', 'addressInfo'], + isHashRequired: true, + typeOfList: 'mobileDeviceID', + }, + }, + message: { + userId: 'user 1', + anonymousId: 'anon-id-new', + event: 'event1', + type: 'audiencelist', + properties: { + listData: { + add: [ + { + email: 'abc@abc.com', + phone: '@09876543210', + firstName: 'abc', + lastName: 'efg', + country: 'US', + postalCode: '1245', + thirdPartyUserId: 'useri1234', + }, + { + email: 'def@abc.com', + phone: '@09876543210', + firstName: 'def', + lastName: 'ghi', + country: 'US', + postalCode: '1245', + thirdPartyUserId: 'useri1234', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + thirdPartyUserId: 'useri1234', + }, + ], + }, + enablePartialFailure: true, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + statusCode: 400, + error: + "Neither 'add' nor 'remove' property is present inside 'listData' or there are no attributes inside 'add' or 'remove' properties matching with the schema fields. Aborting message.", + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'GOOGLE_ADWORDS_REMARKETING_LISTS', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'google_adwords_remarketing_lists', + description: 'Test 4', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + destination: { + Config: { + rudderAccountId: 'rudder-acc-id', + listId: 'list111', + customerId: '7693729833', + loginCustomerId: '', + subAccount: false, + userSchema: ['email', 'phone', 'addressInfo'], + isHashRequired: true, + typeOfList: 'mobileDeviceID', + }, + }, + message: { + userId: 'user 1', + anonymousId: 'anon-id-new', + event: 'event1', + type: 'audiencelist', + properties: { + listData: { + remove: [ + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + thirdPartyUserId: 'useri1234', + }, + ], + }, + enablePartialFailure: true, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + statusCode: 400, + error: + "Neither 'add' nor 'remove' property is present inside 'listData' or there are no attributes inside 'add' or 'remove' properties matching with the schema fields. Aborting message.", + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'GOOGLE_ADWORDS_REMARKETING_LISTS', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'google_adwords_remarketing_lists', + description: 'Test 5', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + destination: { + Config: { + rudderAccountId: 'rudder-acc-id', + listId: 'list111', + customerId: '7693729833', + loginCustomerId: '', + subAccount: false, + userSchema: ['email', 'phone', 'addressInfo'], + isHashRequired: true, + typeOfList: 'mobileDeviceID', + }, + }, + message: { + userId: 'user 1', + anonymousId: 'anon-id-new', + event: 'event1', + properties: { + listData: { + remove: [ + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + thirdPartyUserId: 'useri1234', + }, + ], + }, + enablePartialFailure: true, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + statusCode: 400, + error: 'Message Type is not present. Aborting message.', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'GOOGLE_ADWORDS_REMARKETING_LISTS', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'google_adwords_remarketing_lists', + description: 'Test 6', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + destination: { + Config: { + rudderAccountId: 'rudder-acc-id', + listId: 'list111', + customerId: '7693729833', + loginCustomerId: '', + subAccount: false, + userSchema: ['email', 'phone', 'addressInfo'], + isHashRequired: true, + typeOfList: 'mobileDeviceID', + }, + }, + message: { + type: 'audiencelist', + userId: 'user 1', + anonymousId: 'anon-id-new', + event: 'event1', + properties: { + enablePartialFailure: true, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + statusCode: 400, + error: 'listData is not present inside properties. Aborting message.', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'GOOGLE_ADWORDS_REMARKETING_LISTS', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'google_adwords_remarketing_lists', + description: 'Test 7', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + destination: { + Config: { + rudderAccountId: 'rudder-acc-id', + listId: 'list111', + customerId: '7693729833', + loginCustomerId: '', + subAccount: true, + userSchema: ['email', 'phone', 'addressInfo'], + isHashRequired: true, + typeOfList: 'mobileDeviceID', + }, + }, + message: { + userId: 'user 1', + anonymousId: 'anon-id-new', + event: 'event1', + type: 'audiencelisT', + properties: { + listData: { + add: [ + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + mobileId: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + ], + }, + enablePartialFailure: true, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + statusCode: 400, + error: 'loginCustomerId is required as subAccount is true.', + statTags: { + errorCategory: 'dataValidation', + errorType: 'configuration', + destType: 'GOOGLE_ADWORDS_REMARKETING_LISTS', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'google_adwords_remarketing_lists', + description: 'Test 8', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + destination: { + Config: { + rudderAccountId: 'rudder-acc-id', + listId: 'list111', + customerId: '7693729833', + loginCustomerId: '', + subAccount: false, + userSchema: ['email', 'phone', 'addressInfo'], + isHashRequired: true, + typeOfList: 'General', + }, + }, + message: { + userId: 'user 1', + anonymousId: 'anon-id-new', + event: 'event1', + type: 'audiencelisT', + properties: { + listData: { + add: [ + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + mobileId: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + ], + }, + enablePartialFailure: true, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs', + headers: { + Authorization: 'Bearer dummy-access', + 'Content-Type': 'application/json', + 'developer-token': 'dummy-dev-token', + }, + params: { + listId: 'list111', + customerId: '7693729833', + consent: {}, + }, + body: { + JSON: { + enablePartialFailure: true, + operations: [ + { + create: { + userIdentifiers: [ + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + ], + }, + }, + { + create: { + userIdentifiers: [ + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + ], + }, + }, + { + create: { + userIdentifiers: [ + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + ], + }, + }, + { + create: { + userIdentifiers: [ + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + ], + }, + }, + { + create: { + userIdentifiers: [ + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + ], + }, + }, + { + create: { + userIdentifiers: [ + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + ], + }, + }, + { + create: { + userIdentifiers: [ + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + ], + }, + }, + { + create: { + userIdentifiers: [ + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + ], + }, + }, + { + create: { + userIdentifiers: [ + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + ], + }, + }, + { + create: { + userIdentifiers: [ + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'google_adwords_remarketing_lists', + description: 'Test 9', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + destination: { + Config: { + rudderAccountId: 'rudder-acc-id', + listId: 'list111', + customerId: '7693729833', + loginCustomerId: '', + subAccount: false, + userSchema: ['email', 'phone', 'addressInfo'], + isHashRequired: true, + typeOfList: 'General', + }, + }, + message: { + userId: 'user 1', + anonymousId: 'anon-id-new', + event: 'event1', + type: 'audiencelisT', + properties: { + listData: { + add: [ + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + mobileId: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + ], + remove: [ + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + mobileId: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + ], + }, + enablePartialFailure: true, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs', + headers: { + Authorization: 'Bearer dummy-access', + 'Content-Type': 'application/json', + 'developer-token': 'dummy-dev-token', + }, + params: { + listId: 'list111', + customerId: '7693729833', + consent: {}, + }, + body: { + JSON: { + enablePartialFailure: true, + operations: [ + { + create: { + userIdentifiers: [ + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs', + headers: { + Authorization: 'Bearer dummy-access', + 'Content-Type': 'application/json', + 'developer-token': 'dummy-dev-token', + }, + params: { + listId: 'list111', + customerId: '7693729833', + consent: {}, + }, + body: { + JSON: { + enablePartialFailure: true, + operations: [ + { + remove: { + userIdentifiers: [ + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'google_adwords_remarketing_lists', + description: 'Test 10', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + destination: { + Config: { + rudderAccountId: 'rudder-acc-id', + listId: 'list111', + customerId: '7693729833', + loginCustomerId: '', + subAccount: false, + userSchema: ['email', 'phone', 'addressInfo'], + isHashRequired: true, + typeOfList: 'General', + }, + }, + message: { + userId: 'user 1', + anonymousId: 'anon-id-new', + event: 'event1', + type: 'audiencelisT', + properties: { + listData: { + add: [ + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + mobileId: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + ], + remove: [ + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + mobileId: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + ], + }, + enablePartialFailure: true, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs', + headers: { + Authorization: 'Bearer dummy-access', + 'Content-Type': 'application/json', + 'developer-token': 'dummy-dev-token', + }, + params: { + listId: 'list111', + customerId: '7693729833', + consent: {}, + }, + body: { + JSON: { + enablePartialFailure: true, + operations: [ + { + create: { + userIdentifiers: [ + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + ], + }, + }, + { + create: { + userIdentifiers: [ + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + ], + }, + }, + { + create: { + userIdentifiers: [ + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + ], + }, + }, + { + create: { + userIdentifiers: [ + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + ], + }, + }, + { + create: { + userIdentifiers: [ + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + ], + }, + }, + { + create: { + userIdentifiers: [ + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + ], + }, + }, + { + create: { + userIdentifiers: [ + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + ], + }, + }, + { + create: { + userIdentifiers: [ + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + ], + }, + }, + { + create: { + userIdentifiers: [ + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + ], + }, + }, + { + create: { + userIdentifiers: [ + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs', + headers: { + Authorization: 'Bearer dummy-access', + 'Content-Type': 'application/json', + 'developer-token': 'dummy-dev-token', + }, + params: { + listId: 'list111', + customerId: '7693729833', + consent: {}, + }, + body: { + JSON: { + enablePartialFailure: true, + operations: [ + { + remove: { + userIdentifiers: [ + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + ], + }, + }, + { + remove: { + userIdentifiers: [ + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + ], + }, + }, + { + remove: { + userIdentifiers: [ + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + ], + }, + }, + { + remove: { + userIdentifiers: [ + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + ], + }, + }, + { + remove: { + userIdentifiers: [ + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + ], + }, + }, + { + remove: { + userIdentifiers: [ + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + ], + }, + }, + { + remove: { + userIdentifiers: [ + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + ], + }, + }, + { + remove: { + userIdentifiers: [ + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + ], + }, + }, + { + remove: { + userIdentifiers: [ + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + ], + }, + }, + { + remove: { + userIdentifiers: [ + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'google_adwords_remarketing_lists', + description: 'Test 11', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + destination: { + Config: { + rudderAccountId: 'rudder-acc-id', + listId: 'list111', + customerId: '7693729833', + loginCustomerId: '', + subAccount: false, + userSchema: ['email', 'phone', 'addressInfo'], + isHashRequired: true, + typeOfList: 'General', + }, + }, + message: { + userId: 'user 1', + anonymousId: 'anon-id-new', + event: 'event1', + type: 'audiencelisT', + properties: { + listData: { + remove: [ + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + mobileId: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + ], + }, + enablePartialFailure: true, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs', + headers: { + Authorization: 'Bearer dummy-access', + 'Content-Type': 'application/json', + 'developer-token': 'dummy-dev-token', + }, + params: { + listId: 'list111', + customerId: '7693729833', + consent: {}, + }, + body: { + JSON: { + enablePartialFailure: true, + operations: [ + { + remove: { + userIdentifiers: [ + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'google_adwords_remarketing_lists', + description: 'Test 12', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + destination: { + Config: { + rudderAccountId: 'rudder-acc-id', + listId: 'list111', + customerId: '7693729833', + loginCustomerId: '', + subAccount: false, + userSchema: ['email', 'phone', 'addressInfo'], + isHashRequired: true, + typeOfList: 'General', + }, + }, + message: { + userId: 'user 1', + anonymousId: 'anon-id-new', + event: 'event1', + type: 'audiencelisT', + properties: { + listData: { + delete: [ + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + mobileId: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + ], + }, + enablePartialFailure: true, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + statusCode: 400, + error: + "Neither 'add' nor 'remove' property is present inside 'listData' or there are no attributes inside 'add' or 'remove' properties matching with the schema fields. Aborting message.", + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'GOOGLE_ADWORDS_REMARKETING_LISTS', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'google_adwords_remarketing_lists', + description: 'Test 13', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + destination: { + Config: { + rudderAccountId: 'rudder-acc-id', + listId: 'list111', + customerId: '7693729833', + loginCustomerId: '', + subAccount: false, + userSchema: ['email', 'phone', 'addressInfo'], + isHashRequired: true, + typeOfList: 'General', + }, + }, + message: { + userId: 'user 1', + anonymousId: 'anon-id-new', + event: 'event1', + type: 'audiencelisT', + properties: { + listData: { + remove: [ + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + mobileId: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + ], + add: [ + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + mobileId: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + ], + }, + enablePartialFailure: true, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs', + headers: { + Authorization: 'Bearer dummy-access', + 'Content-Type': 'application/json', + 'developer-token': 'dummy-dev-token', + }, + params: { + listId: 'list111', + customerId: '7693729833', + consent: {}, + }, + body: { + JSON: { + enablePartialFailure: true, + operations: [ + { + remove: { + userIdentifiers: [ + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + ], + }, + }, + { + remove: { + userIdentifiers: [ + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + ], + }, + }, + { + remove: { + userIdentifiers: [ + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + ], + }, + }, + { + remove: { + userIdentifiers: [ + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + ], + }, + }, + { + remove: { + userIdentifiers: [ + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + ], + }, + }, + { + remove: { + userIdentifiers: [ + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + ], + }, + }, + { + remove: { + userIdentifiers: [ + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + ], + }, + }, + { + remove: { + userIdentifiers: [ + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + ], + }, + }, + { + remove: { + userIdentifiers: [ + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + ], + }, + }, + { + remove: { + userIdentifiers: [ + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs', + headers: { + Authorization: 'Bearer dummy-access', + 'Content-Type': 'application/json', + 'developer-token': 'dummy-dev-token', + }, + params: { + listId: 'list111', + customerId: '7693729833', + consent: {}, + }, + body: { + JSON: { + enablePartialFailure: true, + operations: [ + { + create: { + userIdentifiers: [ + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + ], + }, + }, + { + create: { + userIdentifiers: [ + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + ], + }, + }, + { + create: { + userIdentifiers: [ + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + ], + }, + }, + { + create: { + userIdentifiers: [ + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + ], + }, + }, + { + create: { + userIdentifiers: [ + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + ], + }, + }, + { + create: { + userIdentifiers: [ + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + ], + }, + }, + { + create: { + userIdentifiers: [ + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + ], + }, + }, + { + create: { + userIdentifiers: [ + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + ], + }, + }, + { + create: { + userIdentifiers: [ + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + ], + }, + }, + { + create: { + userIdentifiers: [ + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'google_adwords_remarketing_lists', + description: 'Test 14', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + destination: { + Config: { + rudderAccountId: 'rudder-acc-id', + listId: 'list111', + customerId: '7693729833', + loginCustomerId: '', + subAccount: false, + userSchema: ['email', 'phone', 'addressInfo'], + isHashRequired: true, + typeOfList: 'General', + }, + }, + message: { + userId: 'user 1', + anonymousId: 'anon-id-new', + event: 'event1', + type: 'audiencelisT', + properties: { + listData: { + remove: [ + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + mobileId: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + ], + add: [ + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + mobileId: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + ], + }, + enablePartialFailure: true, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs', + headers: { + Authorization: 'Bearer dummy-access', + 'Content-Type': 'application/json', + 'developer-token': 'dummy-dev-token', + }, + params: { + listId: 'list111', + customerId: '7693729833', + consent: {}, + }, + body: { + JSON: { + enablePartialFailure: true, + operations: [ + { + remove: { + userIdentifiers: [ + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs', + headers: { + Authorization: 'Bearer dummy-access', + 'Content-Type': 'application/json', + 'developer-token': 'dummy-dev-token', + }, + params: { + listId: 'list111', + customerId: '7693729833', + consent: {}, + }, + body: { + JSON: { + enablePartialFailure: true, + operations: [ + { + create: { + userIdentifiers: [ + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'google_adwords_remarketing_lists', + description: 'Test 15', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + destination: { + Config: { + rudderAccountId: 'rudder-acc-id', + listId: 'list111', + customerId: '7693729833', + loginCustomerId: '', + subAccount: false, + userSchema: ['email', 'phone', 'addressInfo'], + isHashRequired: true, + typeOfList: 'General', + }, + }, + message: { + userId: 'user 1', + anonymousId: 'anon-id-new', + event: 'event1', + type: 'audiencelisT', + properties: { + listData: { + remove: [ + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: null, + lastName: 'jkl', + country: 'US', + mobileId: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + ], + add: [ + { + email: 'ghi@abc.com', + phone: null, + firstName: 'ghi', + lastName: 'jkl', + country: null, + mobileId: '1245', + }, + { + email: 'ghi@abc.com', + phone: '@09876543210', + firstName: 'ghi', + lastName: 'jkl', + country: 'US', + postalCode: '1245', + }, + ], + }, + enablePartialFailure: true, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs', + headers: { + Authorization: 'Bearer dummy-access', + 'Content-Type': 'application/json', + 'developer-token': 'dummy-dev-token', + }, + params: { + listId: 'list111', + customerId: '7693729833', + consent: {}, + }, + body: { + JSON: { + enablePartialFailure: true, + operations: [ + { + remove: { + userIdentifiers: [ + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs', + headers: { + Authorization: 'Bearer dummy-access', + 'Content-Type': 'application/json', + 'developer-token': 'dummy-dev-token', + }, + params: { + listId: 'list111', + customerId: '7693729833', + consent: {}, + }, + body: { + JSON: { + enablePartialFailure: true, + operations: [ + { + create: { + userIdentifiers: [ + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + }, + }, + { + hashedEmail: + 'a3d3807256168f51fc644aef9bda6c7f15c850702be01cf4c77af26a37aec026', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '50ae61e841fac4e8f9e40baf2ad36ec868922ea48368c18f9535e47db56dd7fb', + hashedLastName: + '268f277c6d766d31334fda0f7a5533a185598d269e61c76a805870244828a5f1', + countryCode: 'US', + postalCode: '1245', + }, + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'google_adwords_remarketing_lists', + description: 'Test 16', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + destination: { + Config: { + rudderAccountId: 'rudder-acc-id', + listId: 'list111', + customerId: '7693729833', + loginCustomerId: '', + subAccount: false, + userSchema: ['email', 'phone', 'addressInfo'], + isHashRequired: true, + typeOfList: 'General', + }, + }, + message: { + userId: 'user 1', + anonymousId: 'anon-id-new', + event: 'event1', + type: 'audiencelist', + properties: { + listData: { + add: [ + { + email: 'test@abc.com', + phone: false, + firstName: 'test', + lastName: null, + country: 'US', + postalCode: 0, + }, + ], + }, + enablePartialFailure: true, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs', + headers: { + Authorization: 'Bearer dummy-access', + 'Content-Type': 'application/json', + 'developer-token': 'dummy-dev-token', + }, + params: { + listId: 'list111', + customerId: '7693729833', + consent: {}, + }, + body: { + JSON: { + enablePartialFailure: true, + operations: [ + { + create: { + userIdentifiers: [ + { + hashedEmail: + 'd3142c8f9c9129484daf28df80cc5c955791efed5e69afabb603bc8cb9ffd419', + }, + { + addressInfo: { + hashedFirstName: + '9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08', + countryCode: 'US', + postalCode: 0, + }, + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'google_adwords_remarketing_lists', + description: 'Test 17', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: null, + }, + destination: { + Config: { + rudderAccountId: 'rudder-acc-id', + listId: 'list111', + customerId: '7693729833', + loginCustomerId: '', + subAccount: false, + userSchema: ['email', 'phone', 'addressInfo'], + isHashRequired: true, + typeOfList: 'General', + }, + }, + message: { + userId: 'user 1', + anonymousId: 'anon-id-new', + event: 'event1', + type: 'audiencelist', + properties: { + listData: { + add: [ + { + email: 'test@abc.com', + phone: '@09876543210', + firstName: 'test', + lastName: 'rudderlabs', + country: 'US', + postalCode: '1245', + }, + ], + }, + enablePartialFailure: true, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + secret: null, + }, + statusCode: 500, + error: 'OAuth - access token not found', + statTags: { + errorCategory: 'platform', + errorType: 'oAuthSecret', + destType: 'GOOGLE_ADWORDS_REMARKETING_LISTS', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'google_adwords_remarketing_lists', + description: 'Test 18', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + destination: { + Config: { + rudderAccountId: 'rudder-acc-id', + listId: 'list111', + customerId: '7693729833', + loginCustomerId: '', + subAccount: false, + userSchema: ['email', 'phone', 'addressInfo'], + isHashRequired: true, + typeOfList: 'General', + audienceId: 'aud1234', + }, + }, + message: { + userId: 'user 1', + anonymousId: 'anon-id-new', + event: 'event1', + type: 'audiencelist', + properties: { + listData: { + add: [ + { + email: 'sudip@abc.com', + phone: false, + firstName: 'sudip', + lastName: null, + country: 'US', + postalCode: 0, + }, + ], + }, + enablePartialFailure: true, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs', + headers: { + Authorization: 'Bearer dummy-access', + 'Content-Type': 'application/json', + 'developer-token': 'dummy-dev-token', + }, + params: { + listId: 'aud1234', + customerId: '7693729833', + consent: {}, + }, + body: { + JSON: { + enablePartialFailure: true, + operations: [ + { + create: { + userIdentifiers: [ + { + hashedEmail: + '938758751f5af66652a118e26503af824404bc13acd1cb7642ddff99916f0e1c', + }, + { + addressInfo: { + hashedFirstName: + 'a512ebb75e941411945c9a18bca4ecc315830e0b5cff8a525472c86c1f540844', + countryCode: 'US', + postalCode: 0, + }, + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'google_adwords_remarketing_lists', + description: 'Test 19', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + destination: { + Config: { + rudderAccountId: 'rudder-acc-id', + customerId: '7693729833', + loginCustomerId: '', + subAccount: false, + userSchema: ['email', 'phone', 'addressInfo'], + isHashRequired: true, + typeOfList: 'General', + }, + }, + message: { + anonymousId: '24ed22ae-0681-4882-8c33-012e298e1c17', + channel: 'sources', + context: { + destinationFields: 'email', + externalId: [ + { + identifierType: 'email', + type: 'GOOGLE_ADWORDS_REMARKETING_LISTS-830441345', + }, + ], + mappedToDestination: 'true', + sources: { + job_id: '2UcqQB4ygGtTBAvwCWl7xz8dJgt', + job_run_id: 'cjmsdip7m95b7aee7tpg', + task_run_id: 'cjmsdip7m95b7aee7tq0', + version: 'master', + }, + }, + event: 'Add_Audience', + messageId: 'bd2d67ca-0c9a-4d3b-a2f8-35a3c3f75ba7', + properties: { + listData: { + remove: [ + { + email: 'test1@mail.com', + }, + { + email: 'test5@xmail.com', + }, + { + email: 'test3@mail.com', + }, + ], + }, + }, + recordId: 'a071551c-87e0-48a7-aa5c-7c4144cec5cf/1/5', + rudderId: '5e9ada0e-5f50-4cb8-a015-f6842a7615fd', + sentAt: '2023-08-29 10:22:06.395377223 +0000 UTC', + type: 'audienceList', + userId: '23423423', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs', + headers: { + Authorization: 'Bearer dummy-access', + 'Content-Type': 'application/json', + 'developer-token': 'dummy-dev-token', + }, + params: { + listId: '830441345', + customerId: '7693729833', + consent: {}, + }, + body: { + JSON: { + operations: [ + { + remove: { + userIdentifiers: [ + { + hashedEmail: + '78310d2dd727b704ff9d9c4742d01941b1217b89f45ab71d1e9bf5a010144048', + }, + { + hashedEmail: + '34a6406a076b943abfb9e97a6761e0c6b8cf049ab15b013412c57cf8370b5436', + }, + { + hashedEmail: + '8075d00e5f006b95eb090bf50f5246bc3c18c3d771fa1edf967b033b274b8d84', + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'google_adwords_remarketing_lists', + description: 'Test 20', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + destination: { + Config: { + rudderAccountId: 'rudder-acc-id', + customerId: '7693729833', + loginCustomerId: '', + subAccount: false, + userSchema: ['email', 'phone', 'addressInfo'], + isHashRequired: true, + typeOfList: 'General', + }, + }, + message: { + anonymousId: '24ed22ae-0681-4882-8c33-012e298e1c17', + channel: 'sources', + context: { + destinationFields: 'email', + externalId: [ + { + identifierType: 'email', + type: 'GOOGLE_ADWORDS_REMARKETING_LISTS-830441345', + }, + ], + mappedToDestination: 'true', + sources: { + job_id: '2UcqQB4ygGtTBAvwCWl7xz8dJgt', + job_run_id: 'cjmsdip7m95b7aee7tpg', + task_run_id: 'cjmsdip7m95b7aee7tq0', + version: 'master', + }, + }, + event: 'Add_Audience', + messageId: 'bd2d67ca-0c9a-4d3b-a2f8-35a3c3f75ba7', + properties: { + listData: { + add: [ + { + email: 'test1@mail.com', + }, + { + email: 'test5@xmail.com', + }, + { + email: 'test3@mail.com', + }, + ], + }, + }, + recordId: 'a071551c-87e0-48a7-aa5c-7c4144cec5cf/1/5', + rudderId: '5e9ada0e-5f50-4cb8-a015-f6842a7615fd', + sentAt: '2023-08-29 10:22:06.395377223 +0000 UTC', + type: 'audienceList', + userId: '23423423', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs', + headers: { + Authorization: 'Bearer dummy-access', + 'Content-Type': 'application/json', + 'developer-token': 'dummy-dev-token', + }, + params: { + listId: '830441345', + customerId: '7693729833', + consent: {}, + }, + body: { + JSON: { + operations: [ + { + create: { + userIdentifiers: [ + { + hashedEmail: + '78310d2dd727b704ff9d9c4742d01941b1217b89f45ab71d1e9bf5a010144048', + }, + { + hashedEmail: + '34a6406a076b943abfb9e97a6761e0c6b8cf049ab15b013412c57cf8370b5436', + }, + { + hashedEmail: + '8075d00e5f006b95eb090bf50f5246bc3c18c3d771fa1edf967b033b274b8d84', + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'google_adwords_remarketing_lists', + description: 'Test 20: adding consent object', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + destination: { + Config: { + rudderAccountId: 'rudder-acc-id', + customerId: '7693729833', + loginCustomerId: '', + subAccount: false, + userSchema: ['email', 'phone', 'addressInfo'], + isHashRequired: true, + typeOfList: 'General', + }, + }, + message: { + anonymousId: '24ed22ae-0681-4882-8c33-012e298e1c17', + channel: 'sources', + context: { + destinationFields: 'email', + externalId: [ + { + identifierType: 'email', + type: 'GOOGLE_ADWORDS_REMARKETING_LISTS-830441345', + }, + ], + mappedToDestination: 'true', + sources: { + job_id: '2UcqQB4ygGtTBAvwCWl7xz8dJgt', + job_run_id: 'cjmsdip7m95b7aee7tpg', + task_run_id: 'cjmsdip7m95b7aee7tq0', + version: 'master', + }, + }, + event: 'Add_Audience', + messageId: 'bd2d67ca-0c9a-4d3b-a2f8-35a3c3f75ba7', + properties: { + userDataConsent: 'UNSPECIFIED', + personalizationConsent: 'GRANTED', + listData: { + add: [ + { + email: 'test1@mail.com', + }, + { + email: 'test5@xmail.com', + }, + { + email: 'test3@mail.com', + }, + ], + }, + }, + recordId: 'a071551c-87e0-48a7-aa5c-7c4144cec5cf/1/5', + rudderId: '5e9ada0e-5f50-4cb8-a015-f6842a7615fd', + sentAt: '2023-08-29 10:22:06.395377223 +0000 UTC', + type: 'audienceList', + userId: '23423423', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs', + headers: { + Authorization: 'Bearer dummy-access', + 'Content-Type': 'application/json', + 'developer-token': 'dummy-dev-token', + }, + params: { + listId: '830441345', + customerId: '7693729833', + consent: { + adUserData: 'UNSPECIFIED', + adPersonalization: 'GRANTED', + }, + }, + body: { + JSON: { + operations: [ + { + create: { + userIdentifiers: [ + { + hashedEmail: + '78310d2dd727b704ff9d9c4742d01941b1217b89f45ab71d1e9bf5a010144048', + }, + { + hashedEmail: + '34a6406a076b943abfb9e97a6761e0c6b8cf049ab15b013412c57cf8370b5436', + }, + { + hashedEmail: + '8075d00e5f006b95eb090bf50f5246bc3c18c3d771fa1edf967b033b274b8d84', + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'google_adwords_remarketing_lists', + description: 'Test 20 : consent field values are discarded if it does not match allowed values', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + destination: { + Config: { + rudderAccountId: 'rudder-acc-id', + customerId: '7693729833', + loginCustomerId: '', + subAccount: false, + userSchema: ['email', 'phone', 'addressInfo'], + isHashRequired: true, + typeOfList: 'General', + }, + }, + message: { + anonymousId: '24ed22ae-0681-4882-8c33-012e298e1c17', + channel: 'sources', + context: { + destinationFields: 'email', + externalId: [ + { + identifierType: 'email', + type: 'GOOGLE_ADWORDS_REMARKETING_LISTS-830441345', + }, + ], + mappedToDestination: 'true', + sources: { + job_id: '2UcqQB4ygGtTBAvwCWl7xz8dJgt', + job_run_id: 'cjmsdip7m95b7aee7tpg', + task_run_id: 'cjmsdip7m95b7aee7tq0', + version: 'master', + }, + }, + event: 'Add_Audience', + messageId: 'bd2d67ca-0c9a-4d3b-a2f8-35a3c3f75ba7', + properties: { + userDataConsent: 'RANDOM', + personalizationConsent: 'RANDOM', + listData: { + add: [ + { + email: 'test1@mail.com', + }, + { + email: 'test5@xmail.com', + }, + { + email: 'test3@mail.com', + }, + ], + }, + }, + recordId: 'a071551c-87e0-48a7-aa5c-7c4144cec5cf/1/5', + rudderId: '5e9ada0e-5f50-4cb8-a015-f6842a7615fd', + sentAt: '2023-08-29 10:22:06.395377223 +0000 UTC', + type: 'audienceList', + userId: '23423423', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs', + headers: { + Authorization: 'Bearer dummy-access', + 'Content-Type': 'application/json', + 'developer-token': 'dummy-dev-token', + }, + params: { + listId: '830441345', + customerId: '7693729833', + consent: {}, + }, + body: { + JSON: { + operations: [ + { + create: { + userIdentifiers: [ + { + hashedEmail: + '78310d2dd727b704ff9d9c4742d01941b1217b89f45ab71d1e9bf5a010144048', + }, + { + hashedEmail: + '34a6406a076b943abfb9e97a6761e0c6b8cf049ab15b013412c57cf8370b5436', + }, + { + hashedEmail: + '8075d00e5f006b95eb090bf50f5246bc3c18c3d771fa1edf967b033b274b8d84', + }, + ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + secret: { + access_token: 'dummy-access', + refresh_token: 'dummy-refresh', + developer_token: 'dummy-dev-token', + }, + }, + statusCode: 200, + }, + ], + }, + }, + }, +]; diff --git a/test/integrations/destinations/google_adwords_remarketing_lists/router/data.ts b/test/integrations/destinations/google_adwords_remarketing_lists/router/data.ts index 3d3de6a587..c60e32aaf6 100644 --- a/test/integrations/destinations/google_adwords_remarketing_lists/router/data.ts +++ b/test/integrations/destinations/google_adwords_remarketing_lists/router/data.ts @@ -1,555 +1,576 @@ export const data = [ - { - name: 'google_adwords_remarketing_lists', - description: 'Test 0', - feature: 'router', - module: 'destination', - version: 'v0', - input: { - request: { - body: { - input: [ - { - "metadata": { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl9101" - }, - "jobId": 1 - }, - "destination": { - "Config": { - "rudderAccountId": "258Yea7usSKNpbkIaesL9oJ9iYw", - "listId": "7090784486", - "customerId": "7693729833", - "loginCustomerId": "", - "subAccount": false, - "userSchema": ["email", "phone", "addressInfo"], - "isHashRequired": true, - "typeOfList": "General" - } - }, - "message": { - "userId": "user 1", - "anonymousId": "anon-id-new", - "event": "event1", - "type": "audiencelist", - "properties": { - "listData": { - "add": [ - { - "email": "test@abc.com", - "phone": "@09876543210", - "firstName": "test", - "lastName": "rudderlabs", - "country": "US", - "postalCode": "1245" - } - ] - }, - "enablePartialFailure": true - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - }, - { - "metadata": { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl9101" - }, - "jobId": 2 - }, - "destination": { - "Config": { - "rudderAccountId": "258Yea7usSKNpbkIaesL9oJ9iYw", - "listId": "7090784486", - "customerId": "7693729833", - "loginCustomerId": "", - "subAccount": false, - "userSchema": ["email", "phone", "addressInfo"], - "isHashRequired": true, - "typeOfList": "userID" - } - }, - "message": { - "userId": "user 1", - "anonymousId": "anon-id-new", - "event": "event1", - "type": "audiencelist", - "properties": { - "listData": { - "add": [ - { - "email": "test@abc.com", - "phone": "@09876543210", - "firstName": "test", - "lastName": "rudderlabs", - "country": "US", - "postalCode": "1245", - "thirdPartyUserId": "useri1234" - } - ] - }, - "enablePartialFailure": true - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - }, - { - "metadata": { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl9101" - }, - "jobId": 3 - }, - "destination": { - "Config": { - "rudderAccountId": "258Yea7usSKNpbkIaesL9oJ9iYw", - "listId": "7090784486", - "customerId": "7693729833", - "loginCustomerId": "", - "subAccount": false, - "userSchema": ["email", "phone", "addressInfo"], - "isHashRequired": true, - "typeOfList": "General" - } - }, - "message": { - "userId": "user 1", - "anonymousId": "anon-id-new", - "event": "event1", - "type": "audiencelist", - "properties": { - "listData": { - "remove": [ - { - "email": "test@abc.com", - "phone": "@09876543210", - "firstName": "test", - "lastName": "rudderlabs", - "country": "US", - "postalCode": "1245" - } - ] - }, - "enablePartialFailure": true - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - }, - { - "metadata": { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl9101" - }, - "jobId": 4 - }, - "destination": { - "Config": { - "rudderAccountId": "258Yea7usSKNpbkIaesL9oJ9iYw", - "listId": "7090784486", - "customerId": "7693729833", - "loginCustomerId": "", - "subAccount": false, - "userSchema": ["email", "phone", "addressInfo"], - "isHashRequired": true, - "typeOfList": "General" - } - }, - "message": { - "userId": "user 1", - "anonymousId": "anon-id-new", - "event": "event1", - "type": "audiencelist", - "properties": { - "listData": { - "remove": [ - { - "email": "test@abc.com", - "phone": "@09876543210", - "firstName": "test", - "lastName": "rudderlabs", - "country": "US", - "postalCode": "1245" - } - ], - "add": [ - { - "email": "test@abc.com", - "phone": "@09876543210", - "firstName": "test", - "lastName": "rudderlabs", - "country": "US", - "postalCode": "1245" - } - ] - }, - "enablePartialFailure": true - }, - "context": { - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-02-02T00:23:09.544Z" - } - } + { + name: 'google_adwords_remarketing_lists', + description: 'Test 0', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + metadata: { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl9101', + }, + jobId: 1, + }, + destination: { + Config: { + rudderAccountId: '258Yea7usSKNpbkIaesL9oJ9iYw', + listId: '7090784486', + customerId: '7693729833', + loginCustomerId: '', + subAccount: false, + userSchema: ['email', 'phone', 'addressInfo'], + isHashRequired: true, + typeOfList: 'General', + }, + }, + message: { + userId: 'user 1', + anonymousId: 'anon-id-new', + event: 'event1', + type: 'audiencelist', + properties: { + listData: { + add: [ + { + email: 'test@abc.com', + phone: '@09876543210', + firstName: 'test', + lastName: 'rudderlabs', + country: 'US', + postalCode: '1245', + }, + ], + }, + enablePartialFailure: true, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + { + metadata: { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl9101', + }, + jobId: 2, + }, + destination: { + Config: { + rudderAccountId: '258Yea7usSKNpbkIaesL9oJ9iYw', + listId: '7090784486', + customerId: '7693729833', + loginCustomerId: '', + subAccount: false, + userSchema: ['email', 'phone', 'addressInfo'], + isHashRequired: true, + typeOfList: 'userID', + }, + }, + message: { + userId: 'user 1', + anonymousId: 'anon-id-new', + event: 'event1', + type: 'audiencelist', + properties: { + listData: { + add: [ + { + email: 'test@abc.com', + phone: '@09876543210', + firstName: 'test', + lastName: 'rudderlabs', + country: 'US', + postalCode: '1245', + thirdPartyUserId: 'useri1234', + }, + ], + }, + enablePartialFailure: true, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + { + metadata: { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl9101', + }, + jobId: 3, + }, + destination: { + Config: { + rudderAccountId: '258Yea7usSKNpbkIaesL9oJ9iYw', + listId: '7090784486', + customerId: '7693729833', + loginCustomerId: '', + subAccount: false, + userSchema: ['email', 'phone', 'addressInfo'], + isHashRequired: true, + typeOfList: 'General', + }, + }, + message: { + userId: 'user 1', + anonymousId: 'anon-id-new', + event: 'event1', + type: 'audiencelist', + properties: { + listData: { + remove: [ + { + email: 'test@abc.com', + phone: '@09876543210', + firstName: 'test', + lastName: 'rudderlabs', + country: 'US', + postalCode: '1245', + }, ], - destType: 'google_adwords_remarketing_lists', + }, + enablePartialFailure: true, }, - method: 'POST', + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, }, + { + metadata: { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl9101', + }, + jobId: 4, + }, + destination: { + Config: { + rudderAccountId: '258Yea7usSKNpbkIaesL9oJ9iYw', + listId: '7090784486', + customerId: '7693729833', + loginCustomerId: '', + subAccount: false, + userSchema: ['email', 'phone', 'addressInfo'], + isHashRequired: true, + typeOfList: 'General', + }, + }, + message: { + userId: 'user 1', + anonymousId: 'anon-id-new', + event: 'event1', + type: 'audiencelist', + properties: { + listData: { + remove: [ + { + email: 'test@abc.com', + phone: '@09876543210', + firstName: 'test', + lastName: 'rudderlabs', + country: 'US', + postalCode: '1245', + }, + ], + add: [ + { + email: 'test@abc.com', + phone: '@09876543210', + firstName: 'test', + lastName: 'rudderlabs', + country: 'US', + postalCode: '1245', + }, + ], + }, + enablePartialFailure: true, + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-02-02T00:23:09.544Z', + }, + }, + ], + destType: 'google_adwords_remarketing_lists', }, - output: { - response: { - status: 200, - body: { - output: [ + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: [ + { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs', + headers: { + Authorization: 'Bearer abcd1234', + 'Content-Type': 'application/json', + 'developer-token': 'ijkl9101', + }, + params: { listId: '7090784486', customerId: '7693729833', consent: {} }, + body: { + JSON: { + enablePartialFailure: true, + operations: [ { - "batchedRequest": [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs", - "headers": { - "Authorization": "Bearer abcd1234", - "Content-Type": "application/json", - "developer-token": "ijkl9101" - }, - "params": { "listId": "7090784486", "customerId": "7693729833" }, - "body": { - "JSON": { - "enablePartialFailure": true, - "operations": [ - { - "create": { - "userIdentifiers": [ - { - "hashedEmail": "d3142c8f9c9129484daf28df80cc5c955791efed5e69afabb603bc8cb9ffd419" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08", - "hashedLastName": "dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ], - "metadata": [ - { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl9101" - }, - "jobId": 1 - } + create: { + userIdentifiers: [ + { + hashedEmail: + 'd3142c8f9c9129484daf28df80cc5c955791efed5e69afabb603bc8cb9ffd419', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08', + hashedLastName: + 'dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251', + countryCode: 'US', + postalCode: '1245', + }, + }, ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "rudderAccountId": "258Yea7usSKNpbkIaesL9oJ9iYw", - "listId": "7090784486", - "customerId": "7693729833", - "loginCustomerId": "", - "subAccount": false, - "userSchema": ["email", "phone", "addressInfo"], - "isHashRequired": true, - "typeOfList": "General" - } - } + }, }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + ], + metadata: [ + { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl9101', + }, + jobId: 1, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + rudderAccountId: '258Yea7usSKNpbkIaesL9oJ9iYw', + listId: '7090784486', + customerId: '7693729833', + loginCustomerId: '', + subAccount: false, + userSchema: ['email', 'phone', 'addressInfo'], + isHashRequired: true, + typeOfList: 'General', + }, + }, + }, + { + batchedRequest: [ + { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs', + headers: { + Authorization: 'Bearer abcd1234', + 'Content-Type': 'application/json', + 'developer-token': 'ijkl9101', + }, + params: { listId: '7090784486', customerId: '7693729833', consent: {} }, + body: { + JSON: { + enablePartialFailure: true, + operations: [ { - "batchedRequest": [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs", - "headers": { - "Authorization": "Bearer abcd1234", - "Content-Type": "application/json", - "developer-token": "ijkl9101" - }, - "params": { "listId": "7090784486", "customerId": "7693729833" }, - "body": { - "JSON": { - "enablePartialFailure": true, - "operations": [ - { - "create": { - "userIdentifiers": [ - { - "thirdPartyUserId": "useri1234" - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ], - "metadata": [ - { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl9101" - }, - "jobId": 2 - } + create: { + userIdentifiers: [ + { + thirdPartyUserId: 'useri1234', + }, ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "rudderAccountId": "258Yea7usSKNpbkIaesL9oJ9iYw", - "listId": "7090784486", - "customerId": "7693729833", - "loginCustomerId": "", - "subAccount": false, - "userSchema": ["email", "phone", "addressInfo"], - "isHashRequired": true, - "typeOfList": "userID" - } - } + }, }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + ], + metadata: [ + { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl9101', + }, + jobId: 2, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + rudderAccountId: '258Yea7usSKNpbkIaesL9oJ9iYw', + listId: '7090784486', + customerId: '7693729833', + loginCustomerId: '', + subAccount: false, + userSchema: ['email', 'phone', 'addressInfo'], + isHashRequired: true, + typeOfList: 'userID', + }, + }, + }, + { + batchedRequest: [ + { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs', + headers: { + Authorization: 'Bearer abcd1234', + 'Content-Type': 'application/json', + 'developer-token': 'ijkl9101', + }, + params: { listId: '7090784486', customerId: '7693729833', consent: {} }, + body: { + JSON: { + enablePartialFailure: true, + operations: [ { - "batchedRequest": [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs", - "headers": { - "Authorization": "Bearer abcd1234", - "Content-Type": "application/json", - "developer-token": "ijkl9101" - }, - "params": { "listId": "7090784486", "customerId": "7693729833" }, - "body": { - "JSON": { - "enablePartialFailure": true, - "operations": [ - { - "remove": { - "userIdentifiers": [ - { - "hashedEmail": "d3142c8f9c9129484daf28df80cc5c955791efed5e69afabb603bc8cb9ffd419" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08", - "hashedLastName": "dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } - ], - "metadata": [ - { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl9101" - }, - "jobId": 3 - } + remove: { + userIdentifiers: [ + { + hashedEmail: + 'd3142c8f9c9129484daf28df80cc5c955791efed5e69afabb603bc8cb9ffd419', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08', + hashedLastName: + 'dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251', + countryCode: 'US', + postalCode: '1245', + }, + }, ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "rudderAccountId": "258Yea7usSKNpbkIaesL9oJ9iYw", - "listId": "7090784486", - "customerId": "7693729833", - "loginCustomerId": "", - "subAccount": false, - "userSchema": ["email", "phone", "addressInfo"], - "isHashRequired": true, - "typeOfList": "General" - } - } + }, }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + ], + metadata: [ + { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl9101', + }, + jobId: 3, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + rudderAccountId: '258Yea7usSKNpbkIaesL9oJ9iYw', + listId: '7090784486', + customerId: '7693729833', + loginCustomerId: '', + subAccount: false, + userSchema: ['email', 'phone', 'addressInfo'], + isHashRequired: true, + typeOfList: 'General', + }, + }, + }, + { + batchedRequest: [ + { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs', + headers: { + Authorization: 'Bearer abcd1234', + 'Content-Type': 'application/json', + 'developer-token': 'ijkl9101', + }, + params: { listId: '7090784486', customerId: '7693729833', consent: {} }, + body: { + JSON: { + enablePartialFailure: true, + operations: [ { - "batchedRequest": [ - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs", - "headers": { - "Authorization": "Bearer abcd1234", - "Content-Type": "application/json", - "developer-token": "ijkl9101" - }, - "params": { "listId": "7090784486", "customerId": "7693729833" }, - "body": { - "JSON": { - "enablePartialFailure": true, - "operations": [ - { - "remove": { - "userIdentifiers": [ - { - "hashedEmail": "d3142c8f9c9129484daf28df80cc5c955791efed5e69afabb603bc8cb9ffd419" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08", - "hashedLastName": "dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} + remove: { + userIdentifiers: [ + { + hashedEmail: + 'd3142c8f9c9129484daf28df80cc5c955791efed5e69afabb603bc8cb9ffd419', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08', + hashedLastName: + 'dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251', + countryCode: 'US', + postalCode: '1245', }, - { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://googleads.googleapis.com/v14/customers/7693729833/offlineUserDataJobs", - "headers": { - "Authorization": "Bearer abcd1234", - "Content-Type": "application/json", - "developer-token": "ijkl9101" - }, - "params": { "listId": "7090784486", "customerId": "7693729833" }, - "body": { - "JSON": { - "enablePartialFailure": true, - "operations": [ - { - "create": { - "userIdentifiers": [ - { - "hashedEmail": "d3142c8f9c9129484daf28df80cc5c955791efed5e69afabb603bc8cb9ffd419" - }, - { - "hashedPhoneNumber": "8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45" - }, - { - "addressInfo": { - "hashedFirstName": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08", - "hashedLastName": "dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251", - "countryCode": "US", - "postalCode": "1245" - } - } - ] - } - } - ] - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - } + }, ], - "metadata": [ - { - "secret": { - "access_token": "abcd1234", - "refresh_token": "efgh5678", - "developer_token": "ijkl9101" - }, - "jobId": 4 - } + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://googleads.googleapis.com/v15/customers/7693729833/offlineUserDataJobs', + headers: { + Authorization: 'Bearer abcd1234', + 'Content-Type': 'application/json', + 'developer-token': 'ijkl9101', + }, + params: { listId: '7090784486', customerId: '7693729833', consent: {} }, + body: { + JSON: { + enablePartialFailure: true, + operations: [ + { + create: { + userIdentifiers: [ + { + hashedEmail: + 'd3142c8f9c9129484daf28df80cc5c955791efed5e69afabb603bc8cb9ffd419', + }, + { + hashedPhoneNumber: + '8846dcb6ab2d73a0e67dbd569fa17cec2d9d391e5b05d1dd42919bc21ae82c45', + }, + { + addressInfo: { + hashedFirstName: + '9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08', + hashedLastName: + 'dcf000c2386fb76d22cefc0d118a8511bb75999019cd373df52044bccd1bd251', + countryCode: 'US', + postalCode: '1245', + }, + }, ], - "batched": false, - "statusCode": 200, - "destination": { - "Config": { - "rudderAccountId": "258Yea7usSKNpbkIaesL9oJ9iYw", - "listId": "7090784486", - "customerId": "7693729833", - "loginCustomerId": "", - "subAccount": false, - "userSchema": ["email", "phone", "addressInfo"], - "isHashRequired": true, - "typeOfList": "General" - } - } - } - ], + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + ], + metadata: [ + { + secret: { + access_token: 'abcd1234', + refresh_token: 'efgh5678', + developer_token: 'ijkl9101', + }, + jobId: 4, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + rudderAccountId: '258Yea7usSKNpbkIaesL9oJ9iYw', + listId: '7090784486', + customerId: '7693729833', + loginCustomerId: '', + subAccount: false, + userSchema: ['email', 'phone', 'addressInfo'], + isHashRequired: true, + typeOfList: 'General', }, + }, }, + ], }, - } + }, + }, + }, ]; diff --git a/test/integrations/destinations/hs/network.ts b/test/integrations/destinations/hs/network.ts new file mode 100644 index 0000000000..e29cc27562 --- /dev/null +++ b/test/integrations/destinations/hs/network.ts @@ -0,0 +1,664 @@ +export const networkCallsData = [ + { + httpReq: { + url: 'https://api.hubapi.com/properties/v1/contacts/properties?hapikey=dummy-apikey', + method: 'GET', + }, + httpRes: { + status: 200, + data: [ + { name: 'company_size', type: 'string' }, + { name: 'date_of_birth', type: 'string' }, + { name: 'days_to_close', type: 'number' }, + { + name: 'date_submitted', + type: 'date', + }, + { + name: 'days_create', + type: 'date', + }, + { + name: 'days_closed', + type: 'date', + }, + { name: 'degree', type: 'string' }, + { name: 'field_of_study', type: 'string' }, + { name: 'first_conversion_date', type: 'datetime' }, + { name: 'first_conversion_event_name', type: 'string' }, + { name: 'first_deal_created_date', type: 'datetime' }, + { name: 'gender', type: 'string' }, + { name: 'graduation_date', type: 'string' }, + { name: 'hs_additional_emails', type: 'enumeration' }, + { name: 'hs_all_contact_vids', type: 'enumeration' }, + { + name: 'hs_analytics_first_touch_converting_campaign', + type: 'string', + }, + { name: 'hs_analytics_last_touch_converting_campaign', type: 'string' }, + { name: 'hs_avatar_filemanager_key', type: 'string' }, + { name: 'hs_calculated_form_submissions', type: 'enumeration' }, + { name: 'hs_calculated_merged_vids', type: 'enumeration' }, + { name: 'hs_calculated_mobile_number', type: 'string' }, + { name: 'hs_calculated_phone_number', type: 'string' }, + { name: 'hs_calculated_phone_number_area_code', type: 'string' }, + { name: 'hs_calculated_phone_number_country_code', type: 'string' }, + { name: 'hs_calculated_phone_number_region_code', type: 'string' }, + { name: 'hs_content_membership_email_confirmed', type: 'bool' }, + { name: 'hs_content_membership_notes', type: 'string' }, + { name: 'hs_content_membership_registered_at', type: 'datetime' }, + { + name: 'hs_content_membership_registration_domain_sent_to', + type: 'string', + }, + { + name: 'hs_content_membership_registration_email_sent_at', + type: 'datetime', + }, + { name: 'hs_content_membership_status', type: 'enumeration' }, + { name: 'hs_conversations_visitor_email', type: 'string' }, + { name: 'hs_created_by_conversations', type: 'bool' }, + { name: 'hs_created_by_user_id', type: 'string' }, + { name: 'hs_createdate', type: 'datetime' }, + { name: 'hs_document_last_revisited', type: 'datetime' }, + { name: 'hs_email_domain', type: 'string' }, + { name: 'hs_email_quarantined', type: 'bool' }, + { name: 'hs_email_quarantined_reason', type: 'enumeration' }, + { name: 'hs_email_recipient_fatigue_recovery_time', type: 'datetime' }, + { name: 'hs_email_sends_since_last_engagement', type: 'number' }, + { name: 'hs_emailconfirmationstatus', type: 'enumeration' }, + { name: 'hs_facebook_ad_clicked', type: 'bool' }, + { name: 'hs_feedback_last_nps_follow_up', type: 'string' }, + { name: 'hs_feedback_last_nps_rating', type: 'enumeration' }, + { name: 'hs_feedback_last_survey_date', type: 'datetime' }, + { name: 'hs_feedback_show_nps_web_survey', type: 'bool' }, + { name: 'hs_google_click_id', type: 'string' }, + { name: 'hs_ip_timezone', type: 'string' }, + { name: 'hs_is_contact', type: 'bool' }, + { name: 'hs_last_sales_activity_date', type: 'datetime' }, + { name: 'hs_lastmodifieddate', type: 'datetime' }, + { name: 'hs_lead_status', type: 'enumeration' }, + { name: 'hs_legal_basis', type: 'enumeration' }, + { name: 'hs_merged_object_ids', type: 'enumeration' }, + { name: 'hs_object_id', type: 'number' }, + { name: 'hs_predictivecontactscore_v2', type: 'number' }, + { name: 'hs_predictivescoringtier', type: 'enumeration' }, + { name: 'hs_sales_email_last_clicked', type: 'datetime' }, + { name: 'hs_sales_email_last_opened', type: 'datetime' }, + { + name: 'hs_searchable_calculated_international_mobile_number', + type: 'phone_number', + }, + { + name: 'hs_searchable_calculated_international_phone_number', + type: 'phone_number', + }, + { + name: 'hs_searchable_calculated_mobile_number', + type: 'phone_number', + }, + { name: 'hs_searchable_calculated_phone_number', type: 'phone_number' }, + { name: 'hs_sequences_is_enrolled', type: 'bool' }, + { name: 'hs_updated_by_user_id', type: 'string' }, + { name: 'hubspot_owner_assigneddate', type: 'datetime' }, + { name: 'ip_city', type: 'string' }, + { name: 'ip_country', type: 'string' }, + { name: 'ip_country_code', type: 'string' }, + { name: 'ip_latlon', type: 'string' }, + { name: 'ip_state', type: 'string' }, + { name: 'ip_state_code', type: 'string' }, + { name: 'ip_zipcode', type: 'string' }, + { name: 'job_function', type: 'string' }, + { name: 'lastmodifieddate', type: 'datetime' }, + { name: 'marital_status', type: 'string' }, + { name: 'military_status', type: 'string' }, + { name: 'num_associated_deals', type: 'number' }, + { name: 'num_conversion_events', type: 'number' }, + { name: 'num_unique_conversion_events', type: 'number' }, + { name: 'recent_conversion_date', type: 'datetime' }, + { name: 'recent_conversion_event_name', type: 'string' }, + { name: 'recent_deal_amount', type: 'number' }, + { name: 'recent_deal_close_date', type: 'datetime' }, + { name: 'relationship_status', type: 'string' }, + { name: 'school', type: 'string' }, + { name: 'seniority', type: 'string' }, + { name: 'start_date', type: 'string' }, + { name: 'test_date', type: 'date' }, + { name: 'test_key', type: 'string' }, + { name: 'test_prop', type: 'string' }, + { name: 'test_property', type: 'string' }, + { name: 'total_revenue', type: 'number' }, + { name: 'work_email', type: 'string' }, + { name: 'firstname', type: 'string' }, + { name: 'hs_analytics_first_url', type: 'string' }, + { name: 'hs_email_delivered', type: 'number' }, + { name: 'hs_email_optout_7283808', type: 'enumeration' }, + { name: 'twitterhandle', type: 'string' }, + { name: 'currentlyinworkflow', type: 'enumeration' }, + { name: 'hs_analytics_last_url', type: 'string' }, + { name: 'hs_email_open', type: 'number' }, + { name: 'fax', type: 'string' }, + { name: 'hs_analytics_first_timestamp', type: 'datetime' }, + { name: 'hs_email_last_email_name', type: 'string' }, + { name: 'hs_email_last_send_date', type: 'datetime' }, + { name: 'address', type: 'string' }, + { name: 'engagements_last_meeting_booked', type: 'datetime' }, + { name: 'engagements_last_meeting_booked_campaign', type: 'string' }, + { name: 'engagements_last_meeting_booked_medium', type: 'string' }, + { name: 'engagements_last_meeting_booked_source', type: 'string' }, + { name: 'hs_analytics_first_visit_timestamp', type: 'datetime' }, + { name: 'hs_email_last_open_date', type: 'datetime' }, + { name: 'hs_sales_email_last_replied', type: 'datetime' }, + { name: 'hubspot_owner_id', type: 'enumeration' }, + { name: 'notes_last_contacted', type: 'datetime' }, + { name: 'notes_last_updated', type: 'datetime' }, + { name: 'notes_next_activity_date', type: 'datetime' }, + { name: 'num_contacted_notes', type: 'number' }, + { name: 'num_notes', type: 'number' }, + { name: 'surveymonkeyeventlastupdated', type: 'number' }, + { name: 'webinareventlastupdated', type: 'number' }, + { name: 'city', type: 'string' }, + { name: 'hs_analytics_last_timestamp', type: 'datetime' }, + { name: 'hs_email_last_click_date', type: 'datetime' }, + { name: 'hubspot_team_id', type: 'enumeration' }, + { name: 'hs_all_owner_ids', type: 'enumeration' }, + { name: 'hs_analytics_last_visit_timestamp', type: 'datetime' }, + { name: 'hs_email_first_send_date', type: 'datetime' }, + { name: 'state', type: 'string' }, + { name: 'hs_all_team_ids', type: 'enumeration' }, + { name: 'hs_analytics_source', type: 'enumeration' }, + { name: 'hs_email_first_open_date', type: 'datetime' }, + { name: 'zip', type: 'string' }, + { name: 'country', type: 'string' }, + { name: 'hs_all_accessible_team_ids', type: 'enumeration' }, + { name: 'hs_analytics_source_data_1', type: 'string' }, + { name: 'hs_email_first_click_date', type: 'datetime' }, + { name: 'hs_analytics_source_data_2', type: 'string' }, + { name: 'hs_email_is_ineligible', type: 'bool' }, + { name: 'hs_language', type: 'enumeration' }, + { name: 'hs_analytics_first_referrer', type: 'string' }, + { name: 'jobtitle', type: 'string' }, + { name: 'hs_analytics_last_referrer', type: 'string' }, + { name: 'message', type: 'string' }, + { name: 'closedate', type: 'datetime' }, + { name: 'hs_analytics_average_page_views', type: 'number' }, + { name: 'hs_analytics_revenue', type: 'number' }, + { name: 'hs_lifecyclestage_lead_date', type: 'datetime' }, + { + name: 'hs_lifecyclestage_marketingqualifiedlead_date', + type: 'datetime', + }, + { name: 'hs_lifecyclestage_opportunity_date', type: 'datetime' }, + { name: 'lifecyclestage', type: 'enumeration' }, + { name: 'hs_lifecyclestage_salesqualifiedlead_date', type: 'datetime' }, + { name: 'createdate', type: 'datetime' }, + { name: 'hs_lifecyclestage_evangelist_date', type: 'datetime' }, + { name: 'hs_lifecyclestage_customer_date', type: 'datetime' }, + { name: 'hubspotscore', type: 'number' }, + { name: 'company', type: 'string' }, + { name: 'hs_lifecyclestage_subscriber_date', type: 'datetime' }, + { name: 'hs_lifecyclestage_other_date', type: 'datetime' }, + { name: 'website', type: 'string' }, + { name: 'numemployees', type: 'enumeration' }, + { name: 'annualrevenue', type: 'string' }, + { name: 'industry', type: 'string' }, + { name: 'associatedcompanyid', type: 'number' }, + { name: 'associatedcompanylastupdated', type: 'number' }, + { name: 'hs_predictivecontactscorebucket', type: 'enumeration' }, + { name: 'hs_predictivecontactscore', type: 'number' }, + ], + }, + }, + { + httpReq: { + url: 'https://api.hubapi.com/properties/v1/contacts/properties', + method: 'GET', + }, + httpRes: { + status: 200, + data: [ + { name: 'company_size', type: 'string' }, + { name: 'date_of_birth', type: 'string' }, + { name: 'days_to_close', type: 'number' }, + { + name: 'date_submitted', + type: 'date', + }, + { + name: 'date_created', + type: 'date', + }, + { + name: 'date_closed', + type: 'date', + }, + { name: 'degree', type: 'string' }, + { name: 'field_of_study', type: 'string' }, + { name: 'first_conversion_date', type: 'datetime' }, + { name: 'first_conversion_event_name', type: 'string' }, + { name: 'first_deal_created_date', type: 'datetime' }, + { name: 'gender', type: 'string' }, + { name: 'graduation_date', type: 'string' }, + { name: 'hs_additional_emails', type: 'enumeration' }, + { name: 'hs_all_contact_vids', type: 'enumeration' }, + { + name: 'hs_analytics_first_touch_converting_campaign', + type: 'string', + }, + { name: 'hs_analytics_last_touch_converting_campaign', type: 'string' }, + { name: 'hs_avatar_filemanager_key', type: 'string' }, + { name: 'hs_calculated_form_submissions', type: 'enumeration' }, + { name: 'hs_calculated_merged_vids', type: 'enumeration' }, + { name: 'hs_calculated_mobile_number', type: 'string' }, + { name: 'hs_calculated_phone_number', type: 'string' }, + { name: 'hs_calculated_phone_number_area_code', type: 'string' }, + { name: 'hs_calculated_phone_number_country_code', type: 'string' }, + { name: 'hs_calculated_phone_number_region_code', type: 'string' }, + { name: 'hs_content_membership_email_confirmed', type: 'bool' }, + { name: 'hs_content_membership_notes', type: 'string' }, + { name: 'hs_content_membership_registered_at', type: 'datetime' }, + { + name: 'hs_content_membership_registration_domain_sent_to', + type: 'string', + }, + { + name: 'hs_content_membership_registration_email_sent_at', + type: 'datetime', + }, + { name: 'hs_content_membership_status', type: 'enumeration' }, + { name: 'hs_conversations_visitor_email', type: 'string' }, + { name: 'hs_created_by_conversations', type: 'bool' }, + { name: 'hs_created_by_user_id', type: 'string' }, + { name: 'hs_createdate', type: 'datetime' }, + { name: 'hs_document_last_revisited', type: 'datetime' }, + { name: 'hs_email_domain', type: 'string' }, + { name: 'hs_email_quarantined', type: 'bool' }, + { name: 'hs_email_quarantined_reason', type: 'enumeration' }, + { name: 'hs_email_recipient_fatigue_recovery_time', type: 'datetime' }, + { name: 'hs_email_sends_since_last_engagement', type: 'number' }, + { name: 'hs_emailconfirmationstatus', type: 'enumeration' }, + { name: 'hs_facebook_ad_clicked', type: 'bool' }, + { name: 'hs_feedback_last_nps_follow_up', type: 'string' }, + { name: 'hs_feedback_last_nps_rating', type: 'enumeration' }, + { name: 'hs_feedback_last_survey_date', type: 'datetime' }, + { name: 'hs_feedback_show_nps_web_survey', type: 'bool' }, + { name: 'hs_google_click_id', type: 'string' }, + { name: 'hs_ip_timezone', type: 'string' }, + { name: 'hs_is_contact', type: 'bool' }, + { name: 'hs_last_sales_activity_date', type: 'datetime' }, + { name: 'hs_lastmodifieddate', type: 'datetime' }, + { name: 'hs_lead_status', type: 'enumeration' }, + { name: 'hs_legal_basis', type: 'enumeration' }, + { name: 'hs_merged_object_ids', type: 'enumeration' }, + { name: 'hs_object_id', type: 'number' }, + { name: 'hs_predictivecontactscore_v2', type: 'number' }, + { name: 'hs_predictivescoringtier', type: 'enumeration' }, + { name: 'hs_sales_email_last_clicked', type: 'datetime' }, + { name: 'hs_sales_email_last_opened', type: 'datetime' }, + { + name: 'hs_searchable_calculated_international_mobile_number', + type: 'phone_number', + }, + { + name: 'hs_searchable_calculated_international_phone_number', + type: 'phone_number', + }, + { + name: 'hs_searchable_calculated_mobile_number', + type: 'phone_number', + }, + { name: 'hs_searchable_calculated_phone_number', type: 'phone_number' }, + { name: 'hs_sequences_is_enrolled', type: 'bool' }, + { name: 'hs_updated_by_user_id', type: 'string' }, + { name: 'hubspot_owner_assigneddate', type: 'datetime' }, + { name: 'ip_city', type: 'string' }, + { name: 'ip_country', type: 'string' }, + { name: 'ip_country_code', type: 'string' }, + { name: 'ip_latlon', type: 'string' }, + { name: 'ip_state', type: 'string' }, + { name: 'ip_state_code', type: 'string' }, + { name: 'ip_zipcode', type: 'string' }, + { name: 'job_function', type: 'string' }, + { name: 'lastmodifieddate', type: 'datetime' }, + { name: 'marital_status', type: 'string' }, + { name: 'military_status', type: 'string' }, + { name: 'num_associated_deals', type: 'number' }, + { name: 'num_conversion_events', type: 'number' }, + { name: 'num_unique_conversion_events', type: 'number' }, + { name: 'recent_conversion_date', type: 'datetime' }, + { name: 'recent_conversion_event_name', type: 'string' }, + { name: 'recent_deal_amount', type: 'number' }, + { name: 'recent_deal_close_date', type: 'datetime' }, + { name: 'relationship_status', type: 'string' }, + { name: 'school', type: 'string' }, + { name: 'seniority', type: 'string' }, + { name: 'start_date', type: 'string' }, + { name: 'test_date', type: 'date' }, + { name: 'test_key', type: 'string' }, + { name: 'test_prop', type: 'string' }, + { name: 'test_property', type: 'string' }, + { name: 'total_revenue', type: 'number' }, + { name: 'work_email', type: 'string' }, + { name: 'firstname', type: 'string' }, + { name: 'hs_analytics_first_url', type: 'string' }, + { name: 'hs_email_delivered', type: 'number' }, + { name: 'hs_email_optout_7283808', type: 'enumeration' }, + { name: 'twitterhandle', type: 'string' }, + { name: 'currentlyinworkflow', type: 'enumeration' }, + { name: 'hs_analytics_last_url', type: 'string' }, + { name: 'hs_email_open', type: 'number' }, + { name: 'fax', type: 'string' }, + { name: 'hs_analytics_first_timestamp', type: 'datetime' }, + { name: 'hs_email_last_email_name', type: 'string' }, + { name: 'hs_email_last_send_date', type: 'datetime' }, + { name: 'address', type: 'string' }, + { name: 'engagements_last_meeting_booked', type: 'datetime' }, + { name: 'engagements_last_meeting_booked_campaign', type: 'string' }, + { name: 'engagements_last_meeting_booked_medium', type: 'string' }, + { name: 'engagements_last_meeting_booked_source', type: 'string' }, + { name: 'hs_analytics_first_visit_timestamp', type: 'datetime' }, + { name: 'hs_email_last_open_date', type: 'datetime' }, + { name: 'hs_sales_email_last_replied', type: 'datetime' }, + { name: 'hubspot_owner_id', type: 'enumeration' }, + { name: 'notes_last_contacted', type: 'datetime' }, + { name: 'notes_last_updated', type: 'datetime' }, + { name: 'notes_next_activity_date', type: 'datetime' }, + { name: 'num_contacted_notes', type: 'number' }, + { name: 'num_notes', type: 'number' }, + { name: 'surveymonkeyeventlastupdated', type: 'number' }, + { name: 'webinareventlastupdated', type: 'number' }, + { name: 'city', type: 'string' }, + { name: 'hs_analytics_last_timestamp', type: 'datetime' }, + { name: 'hs_email_last_click_date', type: 'datetime' }, + { name: 'hubspot_team_id', type: 'enumeration' }, + { name: 'hs_all_owner_ids', type: 'enumeration' }, + { name: 'hs_analytics_last_visit_timestamp', type: 'datetime' }, + { name: 'hs_email_first_send_date', type: 'datetime' }, + { name: 'state', type: 'string' }, + { name: 'hs_all_team_ids', type: 'enumeration' }, + { name: 'hs_analytics_source', type: 'enumeration' }, + { name: 'hs_email_first_open_date', type: 'datetime' }, + { name: 'zip', type: 'string' }, + { name: 'country', type: 'string' }, + { name: 'hs_all_accessible_team_ids', type: 'enumeration' }, + { name: 'hs_analytics_source_data_1', type: 'string' }, + { name: 'hs_email_first_click_date', type: 'datetime' }, + { name: 'hs_analytics_source_data_2', type: 'string' }, + { name: 'hs_email_is_ineligible', type: 'bool' }, + { name: 'hs_language', type: 'enumeration' }, + { name: 'hs_analytics_first_referrer', type: 'string' }, + { name: 'jobtitle', type: 'string' }, + { name: 'hs_analytics_last_referrer', type: 'string' }, + { name: 'message', type: 'string' }, + { name: 'closedate', type: 'datetime' }, + { name: 'hs_analytics_average_page_views', type: 'number' }, + { name: 'hs_analytics_revenue', type: 'number' }, + { name: 'hs_lifecyclestage_lead_date', type: 'datetime' }, + { + name: 'hs_lifecyclestage_marketingqualifiedlead_date', + type: 'datetime', + }, + { name: 'hs_lifecyclestage_opportunity_date', type: 'datetime' }, + { name: 'lifecyclestage', type: 'enumeration' }, + { name: 'hs_lifecyclestage_salesqualifiedlead_date', type: 'datetime' }, + { name: 'createdate', type: 'datetime' }, + { name: 'hs_lifecyclestage_evangelist_date', type: 'datetime' }, + { name: 'hs_lifecyclestage_customer_date', type: 'datetime' }, + { name: 'hubspotscore', type: 'number' }, + { name: 'company', type: 'string' }, + { name: 'hs_lifecyclestage_subscriber_date', type: 'datetime' }, + { name: 'hs_lifecyclestage_other_date', type: 'datetime' }, + { name: 'website', type: 'string' }, + { name: 'numemployees', type: 'enumeration' }, + { name: 'annualrevenue', type: 'string' }, + { name: 'industry', type: 'string' }, + { name: 'associatedcompanyid', type: 'number' }, + { name: 'associatedcompanylastupdated', type: 'number' }, + { name: 'hs_predictivecontactscorebucket', type: 'enumeration' }, + { name: 'hs_predictivecontactscore', type: 'number' }, + ], + }, + }, + { + httpReq: { + url: 'https://api.hubapi.com/crm/v3/objects/contacts/search', + method: 'POST', + headers: { + Authorization: 'Bearer dummy-access-token', + }, + }, + httpRes: { + status: 200, + }, + }, + { + httpReq: { + url: 'https://api.hubapi.com/crm/v3/objects/contacts/search', + method: 'POST', + headers: { + Authorization: 'Bearer dummy-access-tokensuccess', + }, + }, + httpRes: { + data: { + total: 1, + results: [ + { + id: '103604', + properties: { + createdate: '2022-07-15T15:25:08.975Z', + email: 'testhubspot@email.com', + hs_object_id: '103604', + lastmodifieddate: '2022-07-15T15:26:49.590Z', + }, + createdAt: '2022-07-15T15:25:08.975Z', + updatedAt: '2022-07-15T15:26:49.590Z', + archived: false, + }, + ], + }, + status: 200, + }, + }, + { + httpReq: { + url: 'https://api.hubapi.com/crm/v3/objects/contacts/search', + method: 'POST', + headers: { + Authorization: 'Bearer dummy-access-tokenmultiple', + }, + }, + httpRes: { + data: { + total: 2, + results: [ + { + id: '103604', + properties: { + createdate: '2022-07-15T15:25:08.975Z', + email: 'testhubspot@email.com', + hs_object_id: '103604', + lastmodifieddate: '2022-07-15T15:26:49.590Z', + }, + createdAt: '2022-07-15T15:25:08.975Z', + updatedAt: '2022-07-15T15:26:49.590Z', + archived: false, + }, + { + id: '103604', + properties: { + createdate: '2022-07-15T15:25:08.975Z', + email: 'testhubspot@email.com', + hs_object_id: '103604', + lastmodifieddate: '2022-07-15T15:26:49.590Z', + }, + createdAt: '2022-07-15T15:25:08.975Z', + updatedAt: '2022-07-15T15:26:49.590Z', + archived: false, + }, + ], + }, + status: 200, + }, + }, + { + httpReq: { + url: 'https://api.hubapi.com/crm/v3/objects/lead/search', + method: 'POST', + }, + httpRes: { + status: 200, + data: { + total: 1, + results: [ + { + id: '103605', + properties: { + createdate: '2022-08-15T15:25:08.975Z', + email: 'testhubspot2@email.com', + hs_object_id: '103605', + lastmodifieddate: '2022-08-15T15:26:49.590Z', + }, + createdAt: '2022-08-15T15:25:08.975Z', + updatedAt: '2022-08-15T15:26:49.590Z', + archived: false, + }, + ], + }, + }, + }, + { + httpReq: { + url: 'https://api.hubapi.com/crm/v3/objects/lead/search?hapikey=dummy-apikey', + method: 'POST', + }, + httpRes: { + data: { + total: 1, + results: [ + { + id: '103605', + properties: { + createdate: '2022-08-15T15:25:08.975Z', + email: 'testhubspot2@email.com', + hs_object_id: '103605', + lastmodifieddate: '2022-08-15T15:26:49.590Z', + }, + createdAt: '2022-08-15T15:25:08.975Z', + updatedAt: '2022-08-15T15:26:49.590Z', + archived: false, + }, + ], + }, + status: 200, + }, + }, + { + httpReq: { + url: 'https://api.hubapi.com/crm/v3/objects/lead/search?hapikey=rate-limit-id', + method: 'POST', + }, + httpRes: { + data: { + status: 'error', + message: 'Request Rate Limit reached', + correlationId: '4d39ff11-e121-4514-bcd8-132a9dd1ff50', + category: 'RATE-LIMIT_REACHED', + links: { + 'api key': 'https://app.hubspot.com/l/api-key/', + }, + }, + status: 429, + }, + }, + { + httpReq: { + url: 'https://api.hubapi.com/crm/v3/objects/contacts/search?hapikey=dummy-apikey', + method: 'POST', + }, + httpRes: { + data: { + total: 1, + results: [ + { + id: '103604', + properties: { + createdate: '2022-07-15T15:25:08.975Z', + email: 'testhubspot@email.com', + hs_object_id: '103604', + lastmodifieddate: '2022-07-15T15:26:49.590Z', + }, + createdAt: '2022-07-15T15:25:08.975Z', + updatedAt: '2022-07-15T15:26:49.590Z', + archived: false, + }, + ], + }, + status: 200, + }, + }, + { + httpReq: { + url: 'https://api.hubapi.com/crm/v3/objects/contacts/search?hapikey=dummy-apikeysuccess', + method: 'POST', + }, + httpRes: { + status: 200, + }, + }, + { + httpReq: { + url: 'https://api.hubapi.com/properties/v1/contacts/properties?hapikey=dummy-apikeysuccess', + method: 'GET', + }, + httpRes: { + status: 200, + }, + }, + { + httpReq: { + url: 'https://api.hubapi.com/properties/v1/contacts/properties?hapikey=rate-limit-id', + method: 'GET', + }, + httpRes: { + data: { + status: 'error', + message: 'Request Rate Limit reached', + correlationId: '4d39ff11-e121-4514-bcd8-132a9dd1ff50', + category: 'RATE-LIMIT_REACHED', + links: { + 'api key': 'https://app.hubspot.com/l/api-key/', + }, + }, + status: 429, + }, + }, + { + httpReq: { + url: 'https://api.hubapi.com/properties/v1/contacts/properties?hapikey=invalid-api-key', + method: 'GET', + }, + httpRes: { + data: { + status: 'error', + message: + 'The API key provided is invalid. View or manage your API key here: https://app.hubspot.com/l/api-key/', + correlationId: '4d39ff11-e121-4514-bcd8-132a9dd1ff50', + category: 'INVALID_AUTHENTICATION', + links: { + 'api key': 'https://app.hubspot.com/l/api-key/', + }, + }, + status: 401, + }, + }, + { + httpReq: { + url: 'https://api.hubapi.com/crm/v3/objects/association/search', + method: 'POST', + }, + httpRes: { + status: 200, + }, + }, +]; diff --git a/test/integrations/destinations/hs/processor/data.ts b/test/integrations/destinations/hs/processor/data.ts new file mode 100644 index 0000000000..5eaa109dc4 --- /dev/null +++ b/test/integrations/destinations/hs/processor/data.ts @@ -0,0 +1,5272 @@ +export const data = [ + { + name: 'hs', + description: 'Test 0', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'testhubspot2@email.com', + firstname: 'Test Hubspot', + anonymousId: '12345', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '', + referrer: '', + search: '', + title: '', + url: '', + }, + }, + type: 'identify', + messageId: '50360b9c-ea8d-409c-b672-c9230f91cce5', + originalTimestamp: '2019-10-15T09:35:31.288Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + apiKey: 'dummy-apikey', + hubID: 'dummy-hubId', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + userId: '', + method: 'POST', + endpoint: + 'https://api.hubapi.com/contacts/v1/contact/createOrUpdate/email/testhubspot2@email.com', + headers: { + 'Content-Type': 'application/json', + }, + params: { + hapikey: 'dummy-apikey', + }, + body: { + JSON: { + properties: [ + { + property: 'email', + value: 'testhubspot2@email.com', + }, + { + property: 'firstname', + value: 'Test Hubspot', + }, + ], + }, + XML: {}, + FORM: {}, + JSON_ARRAY: {}, + }, + files: {}, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'hs', + description: 'Test 1', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'testhubspot2@email.com', + firstname: 'Test Hubspot', + anonymousId: '12345', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + type: 'page', + messageId: 'e8585d9a-7137-4223-b295-68ab1b17dad7', + originalTimestamp: '2019-10-15T09:35:31.289Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + properties: { + path: '', + referrer: '', + search: '', + title: '', + url: '', + }, + integrations: { + All: true, + }, + name: 'ApplicationLoaded', + sentAt: '2019-10-14T11:15:53.296Z', + }, + destination: { + Config: { + apiKey: 'dummy-apikey', + hubID: 'dummy-hubId', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Message type page is not supported', + statTags: { + destType: 'HS', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'hs', + description: 'Test 2', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'testhubspot2@email.com', + firstname: 'Test Hubspot', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + type: 'track', + messageId: '08829772-d991-427c-b976-b4c4f4430b4e', + originalTimestamp: '2019-10-15T09:35:31.291Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + event: 'test track event HS', + properties: { + user_actual_role: 'system_admin, system_user', + user_actual_id: 12345, + }, + sentAt: '2019-10-14T11:15:53.296Z', + }, + destination: { + Config: { + apiKey: 'dummy-apikey', + hubID: 'dummy-hubId', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'GET', + messageType: 'track', + endpoint: 'https://track.hubspot.com/v1/event', + headers: { + 'Content-Type': 'application/json', + }, + params: { + _a: 'dummy-hubId', + _n: 'test track event HS', + email: 'testhubspot2@email.com', + firstname: 'Test Hubspot', + }, + body: { + JSON: {}, + XML: {}, + FORM: {}, + JSON_ARRAY: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'hs', + description: 'Test 3', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '', + referrer: '', + search: '', + title: '', + url: '', + }, + }, + traits: { + email: 'testhubspot2@email.com', + firstname: 'Test Hubspot', + anonymousId: '12345', + }, + type: 'identify', + messageId: '50360b9c-ea8d-409c-b672-c9230f91cce5', + originalTimestamp: '2019-10-15T09:35:31.288Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + apiKey: 'dummy-apikey', + hubID: 'dummy-hubId', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + userId: '', + method: 'POST', + endpoint: + 'https://api.hubapi.com/contacts/v1/contact/createOrUpdate/email/testhubspot2@email.com', + headers: { + 'Content-Type': 'application/json', + }, + params: { + hapikey: 'dummy-apikey', + }, + body: { + JSON: { + properties: [ + { + property: 'email', + value: 'testhubspot2@email.com', + }, + { + property: 'firstname', + value: 'Test Hubspot', + }, + ], + }, + XML: {}, + FORM: {}, + JSON_ARRAY: {}, + }, + files: {}, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'hs', + description: 'Test 4', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + firstname: 'Test Hubspot', + anonymousId: '12345', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '', + referrer: '', + search: '', + title: '', + url: '', + }, + }, + type: 'identify', + messageId: '50360b9c-ea8d-409c-b672-c9230f91cce5', + originalTimestamp: '2019-10-15T09:35:31.288Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + apiKey: 'dummy-apikey', + hubID: 'dummy-hubId', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Identify without email is not supported.', + statTags: { + destType: 'HS', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'hs', + description: 'Test 5', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'testhubspot2@email.com', + firstname: 'Test Hubspot', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + type: 'track', + messageId: '08829772-d991-427c-b976-b4c4f4430b4e', + originalTimestamp: '2019-10-15T09:35:31.291Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + event: 'test track event HS', + properties: { + revenue: 4.99, + user_actual_role: 'system_admin, system_user', + user_actual_id: 12345, + }, + sentAt: '2019-10-14T11:15:53.296Z', + }, + destination: { + Config: { + apiKey: 'dummy-apikey', + hubID: 'dummy-hubId', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'GET', + messageType: 'track', + endpoint: 'https://track.hubspot.com/v1/event', + headers: { + 'Content-Type': 'application/json', + }, + params: { + _a: 'dummy-hubId', + _n: 'test track event HS', + _m: 4.99, + email: 'testhubspot2@email.com', + firstname: 'Test Hubspot', + }, + body: { + JSON: {}, + XML: {}, + FORM: {}, + JSON_ARRAY: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'hs', + description: 'Test 6', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'testhubspot2@email.com', + firstname: 'Test Hubspot', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + type: 'track', + messageId: '08829772-d991-427c-b976-b4c4f4430b4e', + originalTimestamp: '2019-10-15T09:35:31.291Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + event: 'test track event HS', + properties: { + value: 4.99, + user_actual_role: 'system_admin, system_user', + user_actual_id: 12345, + }, + sentAt: '2019-10-14T11:15:53.296Z', + }, + destination: { + Config: { + apiKey: 'dummy-apikey', + hubID: 'dummy-hubId', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'GET', + messageType: 'track', + endpoint: 'https://track.hubspot.com/v1/event', + headers: { + 'Content-Type': 'application/json', + }, + params: { + _a: 'dummy-hubId', + _n: 'test track event HS', + _m: 4.99, + email: 'testhubspot2@email.com', + firstname: 'Test Hubspot', + }, + body: { + JSON: {}, + XML: {}, + FORM: {}, + JSON_ARRAY: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'hs', + description: 'Test 7', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'testhubspot2@email.com', + firstname: 'Test Hubspot', + anonymousId: '12345', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '', + referrer: '', + search: '', + title: '', + url: '', + }, + }, + type: 'identify', + messageId: '50360b9c-ea8d-409c-b672-c9230f91cce5', + originalTimestamp: '2019-10-15T09:35:31.288Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + metadata: { + jobId: 2, + }, + destination: { + Config: { + apiKey: 'invalid-api-key', + hubID: 'dummy-hubId', + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + name: 'Hubspot', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmLd', + deleted: false, + createdAt: '2020-12-30T08:39:32.005Z', + updatedAt: '2021-02-03T16:22:31.374Z', + destinationDefinition: { + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'HS', + displayName: 'Hubspot', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + jobId: 2, + }, + error: + '{"message":"Failed to get hubspot properties: {\\"status\\":\\"error\\",\\"message\\":\\"The API key provided is invalid. View or manage your API key here: https://app.hubspot.com/l/api-key/\\",\\"correlationId\\":\\"4d39ff11-e121-4514-bcd8-132a9dd1ff50\\",\\"category\\":\\"INVALID_AUTHENTICATION\\",\\"links\\":{\\"api key\\":\\"https://app.hubspot.com/l/api-key/\\"}}","destinationResponse":{"response":{"status":"error","message":"The API key provided is invalid. View or manage your API key here: https://app.hubspot.com/l/api-key/","correlationId":"4d39ff11-e121-4514-bcd8-132a9dd1ff50","category":"INVALID_AUTHENTICATION","links":{"api key":"https://app.hubspot.com/l/api-key/"}},"status":401}}', + statTags: { + destType: 'HS', + errorCategory: 'network', + errorType: 'aborted', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 401, + }, + ], + }, + }, + }, + { + name: 'hs', + description: 'Test 8', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'testhubspot2@email.com', + firstname: 'Test Hubspot', + anonymousId: '12345', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '', + referrer: '', + search: '', + title: '', + url: '', + }, + }, + type: 'identify', + messageId: '50360b9c-ea8d-409c-b672-c9230f91cce5', + originalTimestamp: '2019-10-15T09:35:31.288Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + metadata: { + jobId: 2, + }, + destination: { + Config: { + apiKey: 'rate-limit-id', + hubID: 'dummy-hubId', + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + name: 'Hubspot', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmLd', + deleted: false, + createdAt: '2020-12-30T08:39:32.005Z', + updatedAt: '2021-02-03T16:22:31.374Z', + destinationDefinition: { + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'HS', + displayName: 'Hubspot', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + jobId: 2, + }, + error: + '{"message":"Failed to get hubspot properties: {\\"status\\":\\"error\\",\\"message\\":\\"Request Rate Limit reached\\",\\"correlationId\\":\\"4d39ff11-e121-4514-bcd8-132a9dd1ff50\\",\\"category\\":\\"RATE-LIMIT_REACHED\\",\\"links\\":{\\"api key\\":\\"https://app.hubspot.com/l/api-key/\\"}}","destinationResponse":{"response":{"status":"error","message":"Request Rate Limit reached","correlationId":"4d39ff11-e121-4514-bcd8-132a9dd1ff50","category":"RATE-LIMIT_REACHED","links":{"api key":"https://app.hubspot.com/l/api-key/"}},"status":429}}', + statTags: { + destType: 'HS', + errorCategory: 'network', + errorType: 'throttled', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 429, + }, + ], + }, + }, + }, + { + name: 'hs', + description: 'Test 9', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'testhubspot2@email.com', + firstname: 'Test Hubspot', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + type: 'track', + messageId: '08829772-d991-427c-b976-b4c4f4430b4e', + originalTimestamp: '2019-10-15T09:35:31.291Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + event: 'test track event HS', + sentAt: '2019-10-14T11:15:53.296Z', + }, + destination: { + Config: { + apiKey: 'dummy-apikey', + hubID: 'dummy-hubId', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'GET', + messageType: 'track', + endpoint: 'https://track.hubspot.com/v1/event', + headers: { + 'Content-Type': 'application/json', + }, + params: { + _a: 'dummy-hubId', + _n: 'test track event HS', + email: 'testhubspot2@email.com', + firstname: 'Test Hubspot', + }, + body: { + JSON: {}, + XML: {}, + FORM: {}, + JSON_ARRAY: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'hs', + description: '[HS] (legacyApiKey): trigger update all objects endpoint for rETL source', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + description: '[HS] (legacyApiKey): trigger update all objects endpoint for rETL source', + message: { + channel: 'web', + context: { + mappedToDestination: true, + externalId: [ + { + identifierType: 'email', + id: 'testhubspot2@email.com', + type: 'HS-lead', + }, + ], + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '', + referrer: '', + search: '', + title: '', + url: '', + }, + }, + type: 'identify', + traits: { + firstname: 'Test Hubspot', + anonymousId: '12345', + country: 'India', + }, + messageId: '50360b9c-ea8d-409c-b672-c9230f91cce5', + originalTimestamp: '2019-10-15T09:35:31.288Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + apiKey: 'dummy-apikey', + hubID: 'dummy-hubId', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + userId: '', + method: 'PATCH', + endpoint: 'https://api.hubapi.com/crm/v3/objects/lead/103605', + source: 'rETL', + operation: 'updateObject', + headers: { + 'Content-Type': 'application/json', + }, + params: { + hapikey: 'dummy-apikey', + }, + body: { + JSON: { + properties: { + firstname: 'Test Hubspot', + anonymousId: '12345', + country: 'India', + email: 'testhubspot2@email.com', + }, + }, + XML: {}, + FORM: {}, + JSON_ARRAY: {}, + }, + files: {}, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'hs', + description: '[HS] (legacyApiKey): trigger create custom objects endpoint', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + description: '[HS] (legacyApiKey): trigger create custom objects endpoint', + message: { + channel: 'web', + context: { + mappedToDestination: true, + externalId: [ + { + identifierType: 'email', + id: 'testhubspot@email.com', + type: 'HS-lead', + }, + ], + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '', + referrer: '', + search: '', + title: '', + url: '', + }, + }, + type: 'identify', + traits: { + firstname: 'Test Hubspot', + anonymousId: '12345', + country: 'India', + }, + messageId: '50360b9c-ea8d-409c-b672-c9230f91cce5', + originalTimestamp: '2019-10-15T09:35:31.288Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + apiKey: 'dummy-apikey', + hubID: 'dummy-hubId', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + userId: '', + method: 'POST', + endpoint: 'https://api.hubapi.com/crm/v3/objects/lead', + source: 'rETL', + operation: 'createObject', + headers: { + 'Content-Type': 'application/json', + }, + params: { + hapikey: 'dummy-apikey', + }, + body: { + JSON: { + properties: { + firstname: 'Test Hubspot', + anonymousId: '12345', + country: 'India', + email: 'testhubspot@email.com', + }, + }, + XML: {}, + FORM: {}, + JSON_ARRAY: {}, + }, + files: {}, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'hs', + description: '[HS] (newApiKey): trigger create all objects endpoint for rETL source', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + description: '[HS] (newApiKey): trigger create all objects endpoint for rETL source', + message: { + channel: 'web', + context: { + mappedToDestination: true, + externalId: [ + { + identifierType: 'email', + id: 'testhubspot@email.com', + type: 'HS-lead', + }, + ], + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '', + referrer: '', + search: '', + title: '', + url: '', + }, + }, + type: 'identify', + traits: { + firstname: 'Test Hubspot', + anonymousId: '12345', + country: 'India', + }, + messageId: '50360b9c-ea8d-409c-b672-c9230f91cce5', + originalTimestamp: '2019-10-15T09:35:31.288Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + authorizationType: 'newPrivateAppApi', + hubID: '', + apiKey: '', + accessToken: 'dummy-access-token', + apiVersion: 'newApi', + lookupField: 'lookupField', + hubspotEvents: [], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + userId: '', + type: 'REST', + method: 'POST', + endpoint: 'https://api.hubapi.com/crm/v3/objects/lead', + source: 'rETL', + operation: 'createObject', + headers: { + Authorization: 'Bearer dummy-access-token', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + properties: { + firstname: 'Test Hubspot', + anonymousId: '12345', + country: 'India', + email: 'testhubspot@email.com', + }, + }, + XML: {}, + FORM: {}, + JSON_ARRAY: {}, + }, + files: {}, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'hs', + description: '[HS] (newApiKey): trigger update all objects endpoint for rETL source', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + description: '[HS] (newApiKey): trigger update all objects endpoint for rETL source', + message: { + channel: 'web', + context: { + mappedToDestination: true, + externalId: [ + { + identifierType: 'email', + id: 'testhubspot2@email.com', + type: 'HS-lead', + }, + ], + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '', + referrer: '', + search: '', + title: '', + url: '', + }, + }, + type: 'identify', + traits: { + firstname: 'Test Hubspot', + anonymousId: '12345', + country: 'India', + }, + messageId: '50360b9c-ea8d-409c-b672-c9230f91cce5', + originalTimestamp: '2019-10-15T09:35:31.288Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + authorizationType: 'newPrivateAppApi', + hubID: '', + apiKey: '', + accessToken: 'dummy-access-token', + apiVersion: 'newApi', + lookupField: 'lookupField', + hubspotEvents: [], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + userId: '', + method: 'PATCH', + endpoint: 'https://api.hubapi.com/crm/v3/objects/lead/103605', + source: 'rETL', + operation: 'updateObject', + headers: { + Authorization: 'Bearer dummy-access-token', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + properties: { + firstname: 'Test Hubspot', + anonymousId: '12345', + country: 'India', + email: 'testhubspot2@email.com', + }, + }, + XML: {}, + FORM: {}, + JSON_ARRAY: {}, + }, + files: {}, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'hs', + description: 'Test 14', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: {}, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + type: 'track', + messageId: '08829772-d991-427c-b976-b4c4f4430b4e', + originalTimestamp: '2019-10-15T09:35:31.291Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + event: 'test track event HS', + sentAt: '2019-10-14T11:15:53.296Z', + properties: { + email: 'testhubspot2@email.com', + firstname: 'Test Hubspot', + }, + }, + destination: { + Config: { + apiKey: 'dummy-apikey', + hubID: 'dummy-hubId', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'GET', + messageType: 'track', + endpoint: 'https://track.hubspot.com/v1/event', + headers: { + 'Content-Type': 'application/json', + }, + params: { + _a: 'dummy-hubId', + _n: 'test track event HS', + email: 'testhubspot2@email.com', + firstname: 'Test Hubspot', + }, + body: { + JSON: {}, + XML: {}, + FORM: {}, + JSON_ARRAY: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'hs', + description: 'Test 15', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + description: '[HS] (legacyApi): use (API Key) - check external id i.e hubspotId', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'testhubspot2@email.com', + firstname: 'Test Hubspot', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'hubspotId', + id: '6556', + }, + ], + }, + type: 'track', + messageId: '08829772-d991-427c-b976-b4c4f4430b4e', + originalTimestamp: '2019-10-15T09:35:31.291Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + event: 'test track event HS 2', + properties: { + user_actual_role: 'system_admin, system_user', + user_actual_id: 12345, + }, + sentAt: '2019-10-14T11:15:53.296Z', + }, + destination: { + Config: { + apiKey: 'dummy-apikey', + hubID: 'dummy-hubId', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'GET', + messageType: 'track', + endpoint: 'https://track.hubspot.com/v1/event', + headers: { + 'Content-Type': 'application/json', + }, + params: { + _a: 'dummy-hubId', + _n: 'test track event HS 2', + id: '6556', + email: 'testhubspot2@email.com', + firstname: 'Test Hubspot', + }, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'hs', + description: 'Test 16', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + description: '[HS] (legacyApi): use (API Key) - check HS common config mappings', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'hubspotId', + id: '6556', + }, + ], + }, + type: 'track', + messageId: '08829772-d991-427c-b976-b4c4f4430b4e', + originalTimestamp: '2019-10-15T09:35:31.291Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + event: 'test track event HS 2', + properties: { + user_actual_role: 'system_admin, system_user', + user_actual_id: 12345, + address: { + street: '24. park', + }, + company: { + name: 'RudderStack', + }, + }, + sentAt: '2019-10-14T11:15:53.296Z', + }, + destination: { + Config: { + apiKey: 'dummy-apikey', + hubID: 'dummy-hubId', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'GET', + messageType: 'track', + endpoint: 'https://track.hubspot.com/v1/event', + headers: { + 'Content-Type': 'application/json', + }, + params: { + _a: 'dummy-hubId', + _n: 'test track event HS 2', + id: '6556', + address: '24. park', + company: 'RudderStack', + }, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'hs', + description: 'Test 17', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + description: '[HS] (legacyApi): use (newPrivateAppApi) for contact endpoint', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'testhubspot2@email.com', + firstname: 'Test Hubspot', + anonymousId: '12345', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '', + referrer: '', + search: '', + title: '', + url: '', + }, + }, + type: 'identify', + messageId: '50360b9c-ea8d-409c-b672-c9230f91cce5', + originalTimestamp: '2019-10-15T09:35:31.288Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + authorizationType: 'newPrivateAppApi', + hubID: 'dummy-hubId', + apiKey: 'dummy-apikey', + accessToken: 'dummy-access-token', + apiVersion: 'legacyApi', + lookupField: '', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + userId: '', + method: 'POST', + endpoint: + 'https://api.hubapi.com/contacts/v1/contact/createOrUpdate/email/testhubspot2@email.com', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer dummy-access-token', + }, + params: {}, + body: { + JSON: { + properties: [ + { + property: 'email', + value: 'testhubspot2@email.com', + }, + { + property: 'firstname', + value: 'Test Hubspot', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'hs', + description: 'Test 18', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + description: + '[HS] (newApi): get contact from hs with email (lookupField) exactly matching with one contact', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'testhubspot@email.com', + firstname: 'Test Hubspot', + anonymousId: '12345', + lookupField: 'email', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '', + referrer: '', + search: '', + title: '', + url: '', + }, + }, + type: 'identify', + messageId: '50360b9c-ea8d-409c-b672-c9230f91cce5', + originalTimestamp: '2019-10-15T09:35:31.288Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + authorizationType: 'newPrivateAppApi', + accessToken: 'dummy-access-tokensuccess', + hubID: 'dummy-hubId', + apiKey: 'dummy-apikey', + apiVersion: 'newApi', + lookupField: 'lookupField', + hubspotEvents: [], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + userId: '', + method: 'POST', + endpoint: 'https://api.hubapi.com/crm/v3/objects/contacts/103604', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer dummy-access-tokensuccess', + }, + params: {}, + operation: 'updateContacts', + body: { + JSON: { + properties: { + email: 'testhubspot@email.com', + firstname: 'Test Hubspot', + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'hs', + description: 'Test 19', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + description: + '[HS] (newApi): get contact from hs with email (lookupField) having no contacts', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'noname@email.com', + firstname: 'Test Hubspot', + anonymousId: '12345', + lookupField: 'email', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '', + referrer: '', + search: '', + title: '', + url: '', + }, + }, + type: 'identify', + messageId: '50360b9c-ea8d-409c-b672-c9230f91cce5', + originalTimestamp: '2019-10-15T09:35:31.288Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + authorizationType: 'newPrivateAppApi', + accessToken: 'dummy-access-token', + hubID: 'dummy-hubId', + apiKey: 'dummy-apikey', + apiVersion: 'newApi', + lookupField: 'email', + hubspotEvents: [], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + userId: '', + method: 'POST', + endpoint: 'https://api.hubapi.com/crm/v3/objects/contacts', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer dummy-access-token', + }, + params: {}, + operation: 'createContacts', + body: { + JSON: { + properties: { + email: 'noname@email.com', + firstname: 'Test Hubspot', + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'hs', + description: 'Test 20', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + description: + '[HS] (newApi): get contact from hs with firstname (lookupField) having more than one result', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'nonamess@email.com', + firstname: 'Jhon', + anonymousId: '12345', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '', + referrer: '', + search: '', + title: '', + url: '', + }, + }, + type: 'identify', + messageId: '50360b9c-ea8d-409c-b672-c9230f91cce5', + originalTimestamp: '2019-10-15T09:35:31.288Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + authorizationType: 'newPrivateAppApi', + accessToken: 'dummy-access-tokenmultiple', + hubID: 'dummy-hubId', + apiKey: 'dummy-apikey', + apiVersion: 'newApi', + lookupField: 'firstname', + hubspotEvents: [], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: + 'Unable to get single Hubspot contact. More than one contacts found. Retry with unique lookupPropertyName and lookupValue', + statTags: { + destType: 'HS', + errorCategory: 'network', + errorType: 'aborted', + feature: 'processor', + implementation: 'native', + meta: 'instrumentation', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'hs', + description: 'Test 21', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + description: '[HS] (newApi): Track - validate properties of custom behavioral events', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'testhubspot2@email.com', + firstname: 'Test Hubspot', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + type: 'track', + messageId: '08829772-d991-427c-b976-b4c4f4430b4e', + originalTimestamp: '2019-10-15T09:35:31.291Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + event: 'Purchase', + properties: { + user_actual_role: 'system_admin, system_user', + user_actual_id: 12345, + Revenue: 100, + }, + sentAt: '2019-10-14T11:15:53.296Z', + }, + destination: { + Config: { + authorizationType: 'newPrivateAppApi', + hubID: '1', + apiKey: '1', + accessToken: 'dummy-access-token', + apiVersion: 'newApi', + lookupField: 'lookupField', + hubspotEvents: [ + { + rsEventName: 'Purchase', + hubspotEventName: 'pe22315509_rs_hub_test', + eventProperties: [ + { + from: 'Revenue', + to: 'value', + }, + { + from: 'Price', + to: 'cost', + }, + ], + }, + { + rsEventName: 'Order Complete', + hubspotEventName: 'pe22315509_rs_hub_chair', + eventProperties: [ + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, + ], + }, + ], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + messageType: 'track', + endpoint: 'https://api.hubapi.com/events/v3/send', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer dummy-access-token', + }, + params: {}, + body: { + JSON: { + email: 'testhubspot2@email.com', + occurredAt: '2019-10-15T09:35:31.291Z', + eventName: 'pe22315509_rs_hub_test', + properties: { + value: 100, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'hs', + description: 'Test 22', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + description: + '[HS] (legacyApi): (legacyApiKey) Identify - testing legacy api with new destination config', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'testhubspot2@email.com', + firstname: 'Test Hubspot', + anonymousId: '12345', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '', + referrer: '', + search: '', + title: '', + url: '', + }, + }, + type: 'identify', + messageId: '50360b9c-ea8d-409c-b672-c9230f91cce5', + originalTimestamp: '2019-10-15T09:35:31.288Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + authorizationType: 'legacyApiKey', + hubID: 'dummy-hubId', + apiKey: 'dummy-apikey', + accessToken: '', + apiVersion: 'legacyApi', + lookupField: 'lookupField', + hubspotEvents: [ + { + rsEventName: 'Purchase', + hubspotEventName: 'pe22315509_rs_hub_test', + eventProperties: [ + { + from: 'Revenue', + to: 'value', + }, + { + from: 'Price', + to: 'cost', + }, + ], + }, + { + rsEventName: 'Order Complete', + hubspotEventName: 'pe22315509_rs_hub_chair', + eventProperties: [ + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, + ], + }, + ], + eventFilteringOption: 'disable', + whitelistedEvents: [ + { + eventName: '', + }, + ], + blacklistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + userId: '', + method: 'POST', + endpoint: + 'https://api.hubapi.com/contacts/v1/contact/createOrUpdate/email/testhubspot2@email.com', + headers: { + 'Content-Type': 'application/json', + }, + params: { + hapikey: 'dummy-apikey', + }, + body: { + JSON: { + properties: [ + { + property: 'email', + value: 'testhubspot2@email.com', + }, + { + property: 'firstname', + value: 'Test Hubspot', + }, + ], + }, + XML: {}, + FORM: {}, + JSON_ARRAY: {}, + }, + files: {}, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'hs', + description: 'Test 23', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + description: + '[HS] (legacyApi): (legacyApiKey) Track - testing legacy api with new destination config', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'testhubspot2@email.com', + firstname: 'Test Hubspot', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + type: 'track', + messageId: '08829772-d991-427c-b976-b4c4f4430b4e', + originalTimestamp: '2019-10-15T09:35:31.291Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + event: 'test track event HS', + properties: { + user_actual_role: 'system_admin, system_user', + user_actual_id: 12345, + }, + sentAt: '2019-10-14T11:15:53.296Z', + }, + destination: { + Config: { + authorizationType: 'legacyApiKey', + hubID: 'dummy-hubId', + apiKey: 'dummy-apikey', + accessToken: '', + apiVersion: 'legacyApi', + lookupField: 'lookupField', + hubspotEvents: [ + { + rsEventName: 'Purchase', + hubspotEventName: 'pe22315509_rs_hub_test', + eventProperties: [ + { + from: 'Revenue', + to: 'value', + }, + { + from: 'Price', + to: 'cost', + }, + ], + }, + { + rsEventName: 'Order Complete', + hubspotEventName: 'pe22315509_rs_hub_chair', + eventProperties: [ + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, + ], + }, + ], + eventFilteringOption: 'disable', + whitelistedEvents: [ + { + eventName: '', + }, + ], + blacklistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'GET', + messageType: 'track', + endpoint: 'https://track.hubspot.com/v1/event', + headers: { + 'Content-Type': 'application/json', + }, + params: { + _a: 'dummy-hubId', + _n: 'test track event HS', + email: 'testhubspot2@email.com', + firstname: 'Test Hubspot', + }, + body: { + JSON: {}, + XML: {}, + FORM: {}, + JSON_ARRAY: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'hs', + description: + '[HS] (New API v3) - (newPrivateAppApi) check for email in traits which is the deafult lookup field', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + description: + '[HS] (New API v3) - (newPrivateAppApi) check for email in traits which is the deafult lookup field', + message: { + type: 'identify', + traits: {}, + context: { + externalId: [ + { + id: 'osvaldocostaferreira98@gmail.com', + type: 'HS-contacts', + identifierType: 'email', + }, + ], + mappedToDestination: false, + }, + }, + destination: { + Config: { + authorizationType: 'newPrivateAppApi', + hubID: '', + apiKey: '', + accessToken: 'dummy-access-token', + apiVersion: 'newApi', + lookupField: 'lookupField', + hubspotEvents: [ + { + rsEventName: 'Purchase', + hubspotEventName: 'pe22315509_rs_hub_test', + eventProperties: [ + { + from: 'Revenue', + to: 'value', + }, + { + from: 'Price', + to: 'cost', + }, + ], + }, + { + rsEventName: 'Order Complete', + hubspotEventName: 'pe22315509_rs_hub_chair', + eventProperties: [ + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, + ], + }, + ], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: + 'Identify:: email i.e a default lookup field for contact lookup not found in traits', + statTags: { + destType: 'HS', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'hs', + description: + '[HS] (New API v3) - (newPrivateAppApi) email is present in traits as a default lookup field', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + description: + '[HS] (New API v3) - (newPrivateAppApi) email is present in traits as a default lookup field', + message: { + type: 'identify', + traits: { + email: 'noname@email.com', + }, + context: { + mappedToDestination: false, + }, + }, + destination: { + Config: { + authorizationType: 'newPrivateAppApi', + hubID: '', + apiKey: '', + accessToken: 'dummy-access-token', + apiVersion: 'newApi', + lookupField: 'lookupField', + hubspotEvents: [ + { + rsEventName: 'Purchase', + hubspotEventName: 'pe22315509_rs_hub_test', + eventProperties: [ + { + from: 'Revenue', + to: 'value', + }, + { + from: 'Price', + to: 'cost', + }, + ], + }, + { + rsEventName: 'Order Complete', + hubspotEventName: 'pe22315509_rs_hub_chair', + eventProperties: [ + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, + ], + }, + ], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + userId: '', + method: 'POST', + endpoint: 'https://api.hubapi.com/crm/v3/objects/contacts', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer dummy-access-token', + }, + params: {}, + body: { + JSON: { + properties: { + email: 'noname@email.com', + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + operation: 'createContacts', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'hs', + description: '[HS] (New API v3) - (newPrivateAppApi) - rETL source - minimum config check', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + description: + '[HS] (New API v3) - (newPrivateAppApi) - rETL source - minimum config check', + message: { + type: 'identify', + traits: {}, + context: { + externalId: [ + { + id: 'osvaldocostaferreira98@gmail.com', + type: 'HS-contacts', + identifierType: 'email', + }, + ], + mappedToDestination: 'true', + }, + }, + destination: { + Config: { + authorizationType: 'newPrivateAppApi', + hubID: '', + apiKey: '', + accessToken: 'dummy-access-token', + apiVersion: 'newApi', + lookupField: 'lookupField', + hubspotEvents: [ + { + rsEventName: 'Purchase', + hubspotEventName: 'pe22315509_rs_hub_test', + eventProperties: [ + { + from: 'Revenue', + to: 'value', + }, + { + from: 'Price', + to: 'cost', + }, + ], + }, + { + rsEventName: 'Order Complete', + hubspotEventName: 'pe22315509_rs_hub_chair', + eventProperties: [ + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, + ], + }, + ], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + userId: '', + method: 'POST', + endpoint: 'https://api.hubapi.com/crm/v3/objects/contacts', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer dummy-access-token', + }, + params: {}, + body: { + JSON: { + properties: { + email: 'osvaldocostaferreira98@gmail.com', + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + source: 'rETL', + operation: 'createObject', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'hs', + description: + '[HS] (New API v3) - (newPrivateAppApi) rETL - object type is not provided i.e externalId is empty', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + description: + '[HS] (New API v3) - (newPrivateAppApi) rETL - object type is not provided i.e externalId is empty', + message: { + type: 'identify', + traits: {}, + context: { + mappedToDestination: 'true', + }, + }, + destination: { + Config: { + authorizationType: 'newPrivateAppApi', + hubID: '', + apiKey: '', + accessToken: 'dummy-access-token', + apiVersion: 'newApi', + lookupField: 'lookupField', + hubspotEvents: [ + { + rsEventName: 'Purchase', + hubspotEventName: 'pe22315509_rs_hub_test', + eventProperties: [ + { + from: 'Revenue', + to: 'value', + }, + { + from: 'Price', + to: 'cost', + }, + ], + }, + { + rsEventName: 'Order Complete', + hubspotEventName: 'pe22315509_rs_hub_chair', + eventProperties: [ + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, + ], + }, + ], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'rETL - external Id not found.', + statTags: { + destType: 'HS', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'hs', + description: '[HS] (New API v3) - (newPrivateAppApi) sample track call for property check', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + description: + '[HS] (New API v3) - (newPrivateAppApi) sample track call for property check', + message: { + type: 'track', + traits: {}, + context: { + externalId: [ + { + id: 'osvaldocostaferreira98@gmail.com', + type: 'HS-contacts', + identifierType: 'email', + }, + ], + }, + event: 'Purchase', + properties: { + Revenue: 'name1', + }, + }, + destination: { + Config: { + authorizationType: 'newPrivateAppApi', + hubID: '', + apiKey: '', + accessToken: 'dummy-access-token', + apiVersion: 'newApi', + lookupField: 'lookupField', + hubspotEvents: [ + { + rsEventName: 'Purchase', + hubspotEventName: 'pe22315509_rs_hub_test', + eventProperties: [ + { + from: 'Revenue', + to: 'value', + }, + { + from: 'Price', + to: 'cost', + }, + ], + }, + { + rsEventName: 'Order Complete', + hubspotEventName: 'pe22315509_rs_hub_chair', + eventProperties: [ + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, + ], + }, + ], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.hubapi.com/events/v3/send', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer dummy-access-token', + }, + params: {}, + body: { + JSON: { + email: 'osvaldocostaferreira98@gmail.com', + eventName: 'pe22315509_rs_hub_test', + properties: { + value: 'name1', + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + messageType: 'track', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'hs', + description: '[HS] (New API v3) - (newPrivateAppApi) - check for accesstoken existence', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + description: '[HS] (New API v3) - (newPrivateAppApi) - check for accesstoken existence', + message: { + type: 'identify', + traits: { + lookupField: 'firstname', + firstname: 'Test', + }, + context: { + externalId: [ + { + id: 'osvaldocostaferreira98@gmail.com', + type: 'HS-contacts', + identifierType: 'email', + }, + ], + }, + event: 'Purchase', + properties: { + revenue: 'name1', + }, + }, + destination: { + Config: { + authorizationType: 'newPrivateAppApi', + hubID: '', + apiKey: '', + accessToken: '', + apiVersion: 'newApi', + lookupField: 'lookupField', + hubspotEvents: [ + { + rsEventName: 'Purchase', + hubspotEventName: 'pe22315509_rs_hub_test', + eventProperties: [ + { + from: 'Revenue', + to: 'value', + }, + { + from: 'Price', + to: 'cost', + }, + ], + }, + { + rsEventName: 'Order Complete', + hubspotEventName: 'pe22315509_rs_hub_chair', + eventProperties: [ + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, + ], + }, + ], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Access Token not found. Aborting', + statTags: { + destType: 'HS', + errorCategory: 'dataValidation', + errorType: 'configuration', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'hs', + description: '[HS] (New API v3) - (legacyApiKey) - check for hubId existence', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + description: '[HS] (New API v3) - (legacyApiKey) - check for hubId existence', + message: { + type: 'identify', + traits: { + lookupField: 'firstname', + firstname: 'Test', + }, + context: { + externalId: [ + { + id: 'osvaldocostaferreira98@gmail.com', + type: 'HS-contacts', + identifierType: 'email', + }, + ], + }, + event: 'Purchase', + properties: { + revenue: 'name1', + }, + }, + destination: { + Config: { + authorizationType: 'legacyApiKey', + hubID: '', + apiKey: '', + accessToken: '', + apiVersion: 'newApi', + lookupField: 'lookupField', + hubspotEvents: [ + { + rsEventName: 'Purchase', + hubspotEventName: 'pe22315509_rs_hub_test', + eventProperties: [ + { + from: 'Revenue', + to: 'value', + }, + { + from: 'Price', + to: 'cost', + }, + ], + }, + { + rsEventName: 'Order Complete', + hubspotEventName: 'pe22315509_rs_hub_chair', + eventProperties: [ + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, + ], + }, + ], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Hub ID not found. Aborting', + statTags: { + destType: 'HS', + errorCategory: 'dataValidation', + errorType: 'configuration', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'hs', + description: '[HS] (New API v3) - (legacyApiKey) - check basic track call', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + description: '[HS] (New API v3) - (legacyApiKey) - check basic track call', + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + type: 'track', + messageId: '08829772-d991-427c-b976-b4c4f4430b4e', + originalTimestamp: '2019-10-15T09:35:31.291Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + event: 'Purchase', + properties: { + user_actual_role: 'system_admin, system_user', + user_actual_id: 12345, + address: { + city: 'kolkata', + country: 'India', + }, + objectId: '5005', + }, + sentAt: '2019-10-14T11:15:53.296Z', + }, + destination: { + Config: { + authorizationType: 'legacyApiKey', + hubID: 'dummy-hubId', + apiKey: 'dummy-apikey', + accessToken: '', + apiVersion: 'newApi', + lookupField: 'lookupField', + hubspotEvents: [ + { + rsEventName: 'Purchase', + hubspotEventName: 'pe22315509_rs_hub_test', + eventProperties: [ + { + from: 'Revenue', + to: 'value', + }, + { + from: 'Price', + to: 'cost', + }, + ], + }, + { + rsEventName: 'Order Complete', + hubspotEventName: 'pe22315509_rs_hub_chair', + eventProperties: [ + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, + ], + }, + ], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.hubapi.com/events/v3/send?hapikey=dummy-apikey', + headers: { + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + occurredAt: '2019-10-15T09:35:31.291Z', + objectId: '5005', + eventName: 'pe22315509_rs_hub_test', + properties: { + hs_city: 'kolkata', + hs_country: 'India', + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + messageType: 'track', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'hs', + description: + '[HS] (New API v3) - (legacyApiKey) - either of email, utk or objectId must be present', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + description: + '[HS] (New API v3) - (legacyApiKey) - either of email, utk or objectId must be present', + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + type: 'track', + messageId: '08829772-d991-427c-b976-b4c4f4430b4e', + originalTimestamp: '2019-10-15T09:35:31.291Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + event: 'Purchase', + properties: { + user_actual_role: 'system_admin, system_user', + user_actual_id: 12345, + address: { + city: 'kolkata', + country: 'India', + }, + }, + sentAt: '2019-10-14T11:15:53.296Z', + }, + destination: { + Config: { + authorizationType: 'legacyApiKey', + hubID: 'dummy-hubId', + apiKey: 'dummy-apikey', + accessToken: '', + apiVersion: 'newApi', + lookupField: 'lookupField', + hubspotEvents: [ + { + rsEventName: 'Purchase', + hubspotEventName: 'pe22315509_rs_hub_test', + eventProperties: [ + { + from: 'Revenue', + to: 'value', + }, + { + from: 'Price', + to: 'cost', + }, + ], + }, + { + rsEventName: 'Order Complete', + hubspotEventName: 'pe22315509_rs_hub_chair', + eventProperties: [ + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, + ], + }, + ], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Either of email, utk or objectId is required for custom behavioral events', + statTags: { + destType: 'HS', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'hs', + description: 'Test 33', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + description: '[HS] (newApi): check for legacyApiKey', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'noname@email.com', + firstname: 'Test Hubspot', + anonymousId: '12345', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '', + referrer: '', + search: '', + title: '', + url: '', + }, + }, + type: 'identify', + messageId: '50360b9c-ea8d-409c-b672-c9230f91cce5', + originalTimestamp: '2019-10-15T09:35:31.288Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + authorizationType: 'legacyApiKey', + accessToken: 'dummy-access-token', + hubID: 'dummy-hubId', + apiKey: 'dummy-apikeysuccess', + apiVersion: 'newApi', + lookupField: 'email', + hubspotEvents: [], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + userId: '', + method: 'POST', + endpoint: 'https://api.hubapi.com/crm/v3/objects/contacts', + headers: { + 'Content-Type': 'application/json', + }, + params: { + hapikey: 'dummy-apikeysuccess', + }, + operation: 'createContacts', + body: { + JSON: { + properties: { + email: 'noname@email.com', + firstname: 'Test Hubspot', + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'hs', + description: '[HS] (New API v3) - (newPrivateAppApi) message type not present', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + description: '[HS] (New API v3) - (newPrivateAppApi) message type not present', + message: { + traits: {}, + context: { + externalId: [ + { + id: 'osvaldocostaferreira98@gmail.com', + type: 'HS-contacts', + identifierType: 'email', + }, + ], + }, + event: 'Purchase', + properties: { + revenue: 'name1', + }, + }, + destination: { + Config: { + authorizationType: 'newPrivateAppApi', + hubID: '', + apiKey: '', + accessToken: 'dummy-access-token', + apiVersion: 'newApi', + lookupField: 'lookupField', + hubspotEvents: [ + { + rsEventName: 'Purchase', + hubspotEventName: 'pe22315509_rs_hub_test', + eventProperties: [ + { + from: 'Revenue', + to: 'value', + }, + { + from: 'Price', + to: 'cost', + }, + ], + }, + { + rsEventName: 'Order Complete', + hubspotEventName: 'pe22315509_rs_hub_chair', + eventProperties: [ + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, + ], + }, + ], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Message type is not present. Aborting message.', + statTags: { + destType: 'HS', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'hs', + description: '[HS] (New API v3) - (legacyApiKey) - check for api key existence', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + description: '[HS] (New API v3) - (legacyApiKey) - check for api key existence', + message: { + type: 'identify', + traits: { + lookupField: 'firstname', + firstname: 'Test', + }, + context: { + externalId: [ + { + id: 'osvaldocostaferreira98@gmail.com', + type: 'HS-contacts', + identifierType: 'email', + }, + ], + }, + event: 'Purchase', + properties: { + revenue: 'name1', + }, + }, + destination: { + Config: { + authorizationType: 'legacyApiKey', + hubID: 'dummy-hubId', + apiKey: '', + accessToken: '', + apiVersion: 'newApi', + lookupField: 'lookupField', + hubspotEvents: [ + { + rsEventName: 'Purchase', + hubspotEventName: 'pe22315509_rs_hub_test', + eventProperties: [ + { + from: 'Revenue', + to: 'value', + }, + { + from: 'Price', + to: 'cost', + }, + ], + }, + { + rsEventName: 'Order Complete', + hubspotEventName: 'pe22315509_rs_hub_chair', + eventProperties: [ + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, + ], + }, + ], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'API Key not found. Aborting', + statTags: { + destType: 'HS', + errorCategory: 'dataValidation', + errorType: 'configuration', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'hs', + description: '[HS] (New API v3) - (newPrivateAppApi) Identify: traits is not supplied', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + description: '[HS] (New API v3) - (newPrivateAppApi) Identify: traits is not supplied', + message: { + type: 'identify', + context: { + mappedToDestination: false, + }, + }, + destination: { + Config: { + authorizationType: 'newPrivateAppApi', + hubID: '', + apiKey: '', + accessToken: 'dummy-access-token', + apiVersion: 'newApi', + lookupField: 'lookupField', + hubspotEvents: [ + { + rsEventName: 'Purchase', + hubspotEventName: 'pe22315509_rs_hub_test', + eventProperties: [ + { + from: 'Revenue', + to: 'value', + }, + { + from: 'Price', + to: 'cost', + }, + ], + }, + { + rsEventName: 'Order Complete', + hubspotEventName: 'pe22315509_rs_hub_chair', + eventProperties: [ + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, + ], + }, + ], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Identify - Invalid traits value for lookup field', + statTags: { + destType: 'HS', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'hs', + description: '[HS] (New API v3) - (legacyApiKey) - event not found', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + description: '[HS] (New API v3) - (legacyApiKey) - event not found', + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + type: 'track', + messageId: '08829772-d991-427c-b976-b4c4f4430b4e', + originalTimestamp: '2019-10-15T09:35:31.291Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + event: 'Temp Event', + properties: { + user_actual_role: 'system_admin, system_user', + user_actual_id: 12345, + address: { + city: 'kolkata', + country: 'India', + }, + objectId: '5005', + }, + sentAt: '2019-10-14T11:15:53.296Z', + }, + destination: { + Config: { + authorizationType: 'legacyApiKey', + hubID: 'dummy-hubId', + apiKey: 'dummy-apikey', + accessToken: '', + apiVersion: 'newApi', + lookupField: 'lookupField', + hubspotEvents: [ + { + rsEventName: 'Purchase', + hubspotEventName: 'pe22315509_rs_hub_test', + eventProperties: [ + { + from: 'Revenue', + to: 'value', + }, + { + from: 'Price', + to: 'cost', + }, + ], + }, + { + rsEventName: 'Order Complete', + hubspotEventName: 'pe22315509_rs_hub_chair', + eventProperties: [ + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, + ], + }, + ], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: "Event name 'temp event' mappings are not configured in the destination", + statTags: { + destType: 'HS', + errorCategory: 'dataValidation', + errorType: 'configuration', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'hs', + description: '[HS] (New API v3) - (legacyApiKey) - event name is required', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + description: '[HS] (New API v3) - (legacyApiKey) - event name is required', + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + type: 'track', + messageId: '08829772-d991-427c-b976-b4c4f4430b4e', + originalTimestamp: '2019-10-15T09:35:31.291Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + properties: { + user_actual_role: 'system_admin, system_user', + user_actual_id: 12345, + address: { + city: 'kolkata', + country: 'India', + }, + objectId: '5005', + }, + sentAt: '2019-10-14T11:15:53.296Z', + }, + destination: { + Config: { + authorizationType: 'legacyApiKey', + hubID: 'dummy-hubId', + apiKey: 'dummy-apikey', + accessToken: '', + apiVersion: 'newApi', + lookupField: 'lookupField', + hubspotEvents: [ + { + rsEventName: 'Purchase', + hubspotEventName: 'pe22315509_rs_hub_test', + eventProperties: [ + { + from: 'Revenue', + to: 'value', + }, + { + from: 'Price', + to: 'cost', + }, + ], + }, + { + rsEventName: 'Order Complete', + hubspotEventName: 'pe22315509_rs_hub_chair', + eventProperties: [ + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, + ], + }, + ], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'event name is required for track call', + statTags: { + destType: 'HS', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'hs', + description: + '[HS] (Legacy API v1) - (newPrivateAppApi) rETL - object type is not provided i.e externalId is empty', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + description: + '[HS] (Legacy API v1) - (newPrivateAppApi) rETL - object type is not provided i.e externalId is empty', + message: { + type: 'identify', + traits: {}, + context: { + mappedToDestination: 'true', + }, + }, + destination: { + Config: { + authorizationType: 'newPrivateAppApi', + hubID: '', + apiKey: '', + accessToken: 'dummy-access-token', + apiVersion: 'legacyApi', + lookupField: 'lookupField', + hubspotEvents: [ + { + rsEventName: 'Purchase', + hubspotEventName: 'pe22315509_rs_hub_test', + eventProperties: [ + { + from: 'Revenue', + to: 'value', + }, + { + from: 'Price', + to: 'cost', + }, + ], + }, + { + rsEventName: 'Order Complete', + hubspotEventName: 'pe22315509_rs_hub_chair', + eventProperties: [ + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, + ], + }, + ], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'rETL - external Id not found.', + statTags: { + destType: 'HS', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'hs', + description: + '[HS] (Legacy API v1) - (newPrivateAppApi) - sample track call for legacy api with newPrivateAppApi', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + description: + '[HS] (Legacy API v1) - (newPrivateAppApi) - sample track call for legacy api with newPrivateAppApi', + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'testhubspot2@email.com', + firstname: 'Test Hubspot', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + type: 'track', + messageId: '08829772-d991-427c-b976-b4c4f4430b4e', + originalTimestamp: '2019-10-15T09:35:31.291Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + event: 'test track event HS', + properties: { + user_actual_role: 'system_admin, system_user', + user_actual_id: 12345, + }, + sentAt: '2019-10-14T11:15:53.296Z', + }, + destination: { + Config: { + apiKey: 'dummy-apikey', + hubID: 'dummy-hubId', + authorizationType: 'newPrivateAppApi', + accessToken: 'dummy-access-token', + apiVersion: 'legacyApi', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'GET', + messageType: 'track', + endpoint: 'https://track.hubspot.com/v1/event', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer dummy-access-token', + }, + params: { + _a: 'dummy-hubId', + _n: 'test track event HS', + email: 'testhubspot2@email.com', + firstname: 'Test Hubspot', + }, + body: { + JSON: {}, + XML: {}, + FORM: {}, + JSON_ARRAY: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'hs', + description: 'Test 41', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + mappedToDestination: true, + externalId: [ + { + identifierType: 'email', + id: 'testhubspot2@email.com', + type: 'HS-lead', + }, + ], + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '', + referrer: '', + search: '', + title: '', + url: '', + }, + }, + type: 'identify', + traits: { + firstname: 'Test Hubspot', + anonymousId: '12345', + country: 'India', + }, + messageId: '50360b9c-ea8d-409c-b672-c9230f91cce5', + originalTimestamp: '2019-10-15T09:35:31.288Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + metadata: { + jobId: 2, + }, + destination: { + Config: { + apiKey: 'rate-limit-id', + hubID: 'dummy-hubId', + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + name: 'Hubspot', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmLd', + deleted: false, + createdAt: '2020-12-30T08:39:32.005Z', + updatedAt: '2021-02-03T16:22:31.374Z', + destinationDefinition: { + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'HS', + displayName: 'Hubspot', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: + '{"message":"rETL - Error during searching object record. Request Rate Limit reached","destinationResponse":{"response":{"status":"error","message":"Request Rate Limit reached","correlationId":"4d39ff11-e121-4514-bcd8-132a9dd1ff50","category":"RATE-LIMIT_REACHED","links":{"api key":"https://app.hubspot.com/l/api-key/"}},"status":429}}', + metadata: { + jobId: 2, + }, + statTags: { + destType: 'HS', + errorCategory: 'network', + errorType: 'throttled', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 429, + }, + ], + }, + }, + }, + { + name: 'hs', + description: 'Test 42', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '', + referrer: '', + search: '', + title: '', + url: '', + }, + traits: { + email: 'testhubspot2@email.com', + firstname: 'Test Hubspot', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + days_to_close: '29 days to close', + }, + }, + type: 'identify', + messageId: '50360b9c-ea8d-409c-b672-c9230f91cce5', + originalTimestamp: '2023-04-11T09:35:31.288Z', + anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', + userId: 'user@1', + integrations: { + All: true, + }, + }, + destination: { + Config: { + apiKey: 'dummy-apikey', + hubID: 'dummy-hubId', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: + 'Property days_to_close data type string is not matching with Hubspot property data type number', + statTags: { + destType: 'HS', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'hs', + description: 'Test 43', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'testhubspot2@email.com', + firstname: 'Test Hubspot', + anonymousId: '12345', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + type: 'identify', + messageId: 'e8585d9a-7137-4223-b295-68ab1b17dad7', + originalTimestamp: '2019-10-15T09:35:31.289Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + properties: {}, + integrations: { + All: true, + }, + name: 'ApplicationLoaded', + sentAt: '2019-10-14T11:15:53.296Z', + }, + destination: { + Config: { + apiKey: 'dummy-apikey', + hubID: 'dummy-hubId', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + FORM: {}, + JSON: { + properties: [ + { + property: 'email', + value: 'testhubspot2@email.com', + }, + { + property: 'firstname', + value: 'Test Hubspot', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + }, + endpoint: + 'https://api.hubapi.com/contacts/v1/contact/createOrUpdate/email/testhubspot2@email.com', + files: {}, + headers: { + 'Content-Type': 'application/json', + }, + method: 'POST', + params: { + hapikey: 'dummy-apikey', + }, + type: 'REST', + userId: '', + version: '1', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'hs', + description: 'Test 44', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'testhubspot2@email.com', + firstname: 'Test Hubspot', + anonymousId: '12345', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + type: 'identify', + messageId: 'e8585d9a-7137-4223-b295-68ab1b17dad7', + originalTimestamp: '2019-10-15T09:35:31.289Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + integrations: { + All: true, + }, + name: 'ApplicationLoaded', + sentAt: '2019-10-14T11:15:53.296Z', + }, + destination: { + Config: { + apiKey: 'dummy-apikey', + hubID: 'dummy-hubId', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + FORM: {}, + JSON: { + properties: [ + { + property: 'email', + value: 'testhubspot2@email.com', + }, + { + property: 'firstname', + value: 'Test Hubspot', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + }, + endpoint: + 'https://api.hubapi.com/contacts/v1/contact/createOrUpdate/email/testhubspot2@email.com', + files: {}, + headers: { + 'Content-Type': 'application/json', + }, + method: 'POST', + params: { + hapikey: 'dummy-apikey', + }, + type: 'REST', + userId: '', + version: '1', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'hs', + description: 'Test 45', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'testhubspot2@email.com', + firstname: 'Test Hubspot', + anonymousId: '12345', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + type: 'identify', + messageId: 'e8585d9a-7137-4223-b295-68ab1b17dad7', + originalTimestamp: '2019-10-15T09:35:31.289Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + properties: '', + integrations: { + All: true, + }, + name: 'ApplicationLoaded', + sentAt: '2019-10-14T11:15:53.296Z', + }, + destination: { + Config: { + apiKey: 'dummy-apikey', + hubID: 'dummy-hubId', + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + FORM: {}, + JSON: { + properties: [ + { + property: 'email', + value: 'testhubspot2@email.com', + }, + { + property: 'firstname', + value: 'Test Hubspot', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + }, + endpoint: + 'https://api.hubapi.com/contacts/v1/contact/createOrUpdate/email/testhubspot2@email.com', + files: {}, + headers: { + 'Content-Type': 'application/json', + }, + method: 'POST', + params: { + hapikey: 'dummy-apikey', + }, + type: 'REST', + userId: '', + version: '1', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'hs', + description: + '[HS] (New API v3) - (newPrivateAppApi) sample track call when hubspotEvents is undefined', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + description: + '[HS] (New API v3) - (newPrivateAppApi) sample track call when hubspotEvents is undefined', + message: { + type: 'track', + traits: {}, + context: { + externalId: [ + { + id: 'osvaldocostaferreira98@gmail.com', + type: 'HS-contacts', + identifierType: 'email', + }, + ], + }, + event: 'Purchase', + properties: { + Revenue: 'name1', + }, + }, + destination: { + Config: { + authorizationType: 'newPrivateAppApi', + hubID: '', + apiKey: '', + accessToken: 'dummy-access-token', + apiVersion: 'newApi', + lookupField: 'lookupField', + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + Enabled: true, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Event and property mappings are required for track call', + statTags: { + destType: 'HS', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, +]; diff --git a/test/integrations/destinations/hs/router/data.ts b/test/integrations/destinations/hs/router/data.ts new file mode 100644 index 0000000000..95d9d88212 --- /dev/null +++ b/test/integrations/destinations/hs/router/data.ts @@ -0,0 +1,2245 @@ +export const data = [ + { + name: 'hs', + description: 'router associated retl test', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + destination: { + ID: '123', + Config: { + authorizationType: 'newPrivateAppApi', + accessToken: 'pat-123', + apiVersion: 'newApi', + }, + }, + message: { + type: 'identify', + sentAt: '2022-08-23T05:59:38.214Z', + traits: { + to: { + id: 1, + }, + from: { + id: 9405415215, + }, + }, + userId: '1', + channel: 'sources', + context: { + sources: { + job_id: '2DkDam0hJ8CXZA43zksWMdPAPRe/Syncher', + task_id: 'HUBSPOT_ASSOC_COMPANY_CONTACT', + version: 'v1.8.15', + batch_id: '8d566f29-5f9b-4fa7-ad0c-d8087ca52d6a', + job_run_id: 'cc26p35qhlpr6fd4jrmg', + task_run_id: 'cc26p35qhlpr6fd4jrn0', + }, + externalId: [ + { + id: 1, + type: 'HS-association', + toObjectType: 'contacts', + fromObjectType: 'companies', + identifierType: 'id', + associationTypeId: 'engineer', + }, + ], + mappedToDestination: 'true', + }, + recordId: '1', + rudderId: '3afcdbfe-b6ec-4bdd-8ba6-28696e3cc163', + messageId: 'e0c554aa-0a9a-4e24-9a9a-c951a71a0875', + timestamp: '2022-08-23T05:59:33.758Z', + receivedAt: '2022-08-23T05:59:33.759Z', + request_ip: '10.1.90.32', + originalTimestamp: '2022-08-23T05:59:38.214Z', + }, + metadata: { + jobId: 2, + }, + }, + ], + destType: 'hs', + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://api.hubapi.com/crm/v3/associations/companies/contacts/batch/create', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer pat-123', + }, + params: {}, + body: { + JSON: { + inputs: [ + { + to: { + id: 1, + }, + from: { + id: 9405415215, + }, + type: 'engineer', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + metadata: [ + { + jobId: 2, + }, + ], + batched: true, + statusCode: 200, + destination: { + ID: '123', + Config: { + authorizationType: 'newPrivateAppApi', + accessToken: 'pat-123', + apiVersion: 'newApi', + }, + }, + }, + ], + }, + }, + }, + }, + { + name: 'hs', + description: 'legacy router tests', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'testhubspot1@email.com', + firstname: 'Test Hubspot1', + anonymousId: '1111', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '', + referrer: '', + search: '', + title: '', + url: '', + }, + }, + type: 'identify', + messageId: '50360b9c-ea8d-409c-b672-c9230f91cce5', + originalTimestamp: '2019-10-15T09:35:31.288Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + metadata: { + jobId: 1, + }, + destination: { + Config: { + apiKey: 'dummy-apikey', + hubID: 'dummy-hubId', + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + name: 'Hubspot', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmLd', + deleted: false, + createdAt: '2020-12-30T08:39:32.005Z', + updatedAt: '2021-02-03T16:22:31.374Z', + destinationDefinition: { + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'HS', + displayName: 'Hubspot', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + }, + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'testhubspot2@email.com', + firstname: 'Test Hubspot2', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + type: 'track', + messageId: '08829772-d991-427c-b976-b4c4f4430b4e', + originalTimestamp: '2019-10-15T09:35:31.291Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + event: 'test track event HS', + properties: { + user_actual_role: 'system_admin, system_user', + user_actual_id: 12345, + }, + sentAt: '2019-10-14T11:15:53.296Z', + }, + metadata: { + jobId: 2, + }, + destination: { + Config: { + apiKey: 'dummy-apikey', + hubID: 'dummy-hubId', + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + name: 'Hubspot', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmLd', + deleted: false, + createdAt: '2020-12-30T08:39:32.005Z', + updatedAt: '2021-02-03T16:22:31.374Z', + destinationDefinition: { + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'HS', + displayName: 'Hubspot', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + }, + { + message: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://api.hubapi.com/contacts/v1/contact/createOrUpdate/email/testhubspot2@email.com', + headers: { + 'Content-Type': 'application/json', + }, + userId: '00000000000000000000000000', + params: { + hapikey: 'dummy-apikey', + }, + body: { + JSON: { + properties: [ + { + property: 'email', + value: 'testhubspot3@email.com', + }, + { + property: 'firstname', + value: 'Test Hubspot3', + }, + ], + }, + XML: {}, + FORM: {}, + }, + files: {}, + statusCode: 200, + }, + metadata: { + jobId: 3, + }, + destination: { + Config: { + apiKey: 'dummy-apikey', + hubID: 'dummy-hubId', + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + name: 'Hubspot', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmLd', + deleted: false, + createdAt: '2020-12-30T08:39:32.005Z', + updatedAt: '2021-02-03T16:22:31.374Z', + destinationDefinition: { + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'HS', + displayName: 'Hubspot', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + }, + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'testhubspot4@email.com', + firstname: 'Test Hubspot4', + anonymousId: '4444', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '', + referrer: '', + search: '', + title: '', + url: '', + }, + }, + type: 'identify', + messageId: '50360b9c-ea8d-409c-b672-c9230f91cce5', + originalTimestamp: '2019-10-15T09:35:31.288Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + metadata: { + jobId: 4, + }, + destination: { + Config: { + apiKey: 'rate-limit-id', + hubID: 'dummy-hubId', + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + name: 'Hubspot', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmLd', + deleted: false, + createdAt: '2020-12-30T08:39:32.005Z', + updatedAt: '2021-02-03T16:22:31.374Z', + destinationDefinition: { + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'HS', + displayName: 'Hubspot', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + }, + ], + destType: 'hs', + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.hubapi.com/contacts/v1/contact/batch/', + headers: { + 'Content-Type': 'application/json', + }, + params: { + hapikey: 'dummy-apikey', + }, + body: { + JSON: {}, + JSON_ARRAY: { + batch: + '[{"email":"testhubspot3@email.com","properties":[{"property":"firstname","value":"Test Hubspot3"}]},{"email":"testhubspot1@email.com","properties":[{"property":"firstname","value":"Test Hubspot1"}]},{"email":"testhubspot4@email.com","properties":[{"property":"firstname","value":"Test Hubspot4"}]}]', + }, + XML: {}, + FORM: {}, + }, + files: {}, + }, + metadata: [ + { + jobId: 3, + }, + { + jobId: 1, + }, + { + jobId: 4, + }, + ], + batched: true, + statusCode: 200, + destination: { + Config: { + apiKey: 'dummy-apikey', + hubID: 'dummy-hubId', + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + name: 'Hubspot', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmLd', + deleted: false, + createdAt: '2020-12-30T08:39:32.005Z', + updatedAt: '2021-02-03T16:22:31.374Z', + destinationDefinition: { + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'HS', + displayName: 'Hubspot', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + }, + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'GET', + endpoint: 'https://track.hubspot.com/v1/event', + headers: { + 'Content-Type': 'application/json', + }, + params: { + _a: 'dummy-hubId', + _n: 'test track event HS', + email: 'testhubspot2@email.com', + firstname: 'Test Hubspot2', + }, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + metadata: [ + { + jobId: 2, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + apiKey: 'dummy-apikey', + hubID: 'dummy-hubId', + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + name: 'Hubspot', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmLd', + deleted: false, + createdAt: '2020-12-30T08:39:32.005Z', + updatedAt: '2021-02-03T16:22:31.374Z', + destinationDefinition: { + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'HS', + displayName: 'Hubspot', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + }, + ], + }, + }, + }, + }, + { + name: 'hs', + description: 'legacy router retl tests', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + message: { + channel: 'web', + context: { + mappedToDestination: true, + externalId: [ + { + identifierType: 'email', + id: 'testhubspot2@email.com', + type: 'HS-lead', + }, + ], + sources: { + job_id: '24c5HJxHomh6YCngEOCgjS5r1KX/Syncher', + task_id: 'vw_rs_mailchimp_mocked_hg_data', + version: 'v1.8.1', + batch_id: 'f252c69d-c40d-450e-bcd2-2cf26cb62762', + job_run_id: 'c8el40l6e87v0c4hkbl0', + task_run_id: 'c8el40l6e87v0c4hkblg', + }, + }, + type: 'identify', + traits: { + firstname: 'Test Hubspot', + anonymousId: '12345', + country: 'India', + }, + messageId: '50360b9c-ea8d-409c-b672-c9230f91cce5', + originalTimestamp: '2019-10-15T09:35:31.288Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + apiKey: 'dummy-apikey', + hubID: 'dummy-hubId', + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + name: 'Hubspot', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmLd', + deleted: false, + createdAt: '2020-12-30T08:39:32.005Z', + updatedAt: '2021-02-03T16:22:31.374Z', + destinationDefinition: { + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'HS', + displayName: 'Hubspot', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + metadata: { + jobId: 2, + }, + }, + { + message: { + channel: 'web', + context: { + mappedToDestination: true, + externalId: [ + { + identifierType: 'email', + id: 'testhubspot@email.com', + type: 'HS-lead', + }, + ], + sources: { + job_id: '24c5HJxHomh6YCngEOCgjS5r1KX/Syncher', + task_id: 'vw_rs_mailchimp_mocked_hg_data', + version: 'v1.8.1', + batch_id: 'f252c69d-c40d-450e-bcd2-2cf26cb62762', + job_run_id: 'c8el40l6e87v0c4hkbl0', + task_run_id: 'c8el40l6e87v0c4hkblg', + }, + }, + type: 'identify', + traits: { + firstname: 'Test Hubspot 1', + anonymousId: '123451', + country: 'India 1', + }, + messageId: '50360b9c-ea8d-409c-b672-c9230f91cce5', + originalTimestamp: '2019-10-15T09:35:31.288Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + apiKey: 'dummy-apikey', + hubID: 'dummy-hubId', + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + name: 'Hubspot', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmLd', + deleted: false, + createdAt: '2020-12-30T08:39:32.005Z', + updatedAt: '2021-02-03T16:22:31.374Z', + destinationDefinition: { + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'HS', + displayName: 'Hubspot', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + metadata: { + jobId: 3, + }, + }, + ], + destType: 'hs', + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.hubapi.com/crm/v3/objects/lead/batch/create', + headers: { + 'Content-Type': 'application/json', + }, + params: { + hapikey: 'dummy-apikey', + }, + body: { + JSON: { + inputs: [ + { + properties: { + firstname: 'Test Hubspot 1', + anonymousId: '123451', + country: 'India 1', + email: 'testhubspot@email.com', + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + metadata: [ + { + jobId: 3, + }, + ], + batched: true, + statusCode: 200, + destination: { + Config: { + apiKey: 'dummy-apikey', + hubID: 'dummy-hubId', + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + name: 'Hubspot', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmLd', + deleted: false, + createdAt: '2020-12-30T08:39:32.005Z', + updatedAt: '2021-02-03T16:22:31.374Z', + destinationDefinition: { + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'HS', + displayName: 'Hubspot', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + }, + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.hubapi.com/crm/v3/objects/lead/batch/update', + headers: { + 'Content-Type': 'application/json', + }, + params: { + hapikey: 'dummy-apikey', + }, + body: { + JSON: { + inputs: [ + { + properties: { + firstname: 'Test Hubspot', + anonymousId: '12345', + country: 'India', + email: 'testhubspot2@email.com', + }, + id: '103605', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + metadata: [ + { + jobId: 2, + }, + ], + batched: true, + statusCode: 200, + destination: { + Config: { + apiKey: 'dummy-apikey', + hubID: 'dummy-hubId', + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + name: 'Hubspot', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmLd', + deleted: false, + createdAt: '2020-12-30T08:39:32.005Z', + updatedAt: '2021-02-03T16:22:31.374Z', + destinationDefinition: { + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'HS', + displayName: 'Hubspot', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + }, + ], + }, + }, + }, + }, + { + name: 'hs', + description: 'router retl tests', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + message: { + channel: 'web', + context: { + mappedToDestination: true, + externalId: [ + { + identifierType: 'email', + id: 'testhubspot2@email.com', + type: 'HS-lead', + }, + ], + sources: { + job_id: '24c5HJxHomh6YCngEOCgjS5r1KX/Syncher', + task_id: 'vw_rs_mailchimp_mocked_hg_data', + version: 'v1.8.1', + batch_id: 'f252c69d-c40d-450e-bcd2-2cf26cb62762', + job_run_id: 'c8el40l6e87v0c4hkbl0', + task_run_id: 'c8el40l6e87v0c4hkblg', + }, + }, + type: 'identify', + traits: { + firstname: 'Test Hubspot', + anonymousId: '12345', + country: 'India', + }, + messageId: '50360b9c-ea8d-409c-b672-c9230f91cce5', + originalTimestamp: '2019-10-15T09:35:31.288Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + authorizationType: 'newPrivateAppApi', + accessToken: 'dummy-access-token', + hubID: 'dummy-hubId', + apiKey: 'dummy-apikey', + apiVersion: 'newApi', + lookupField: 'lookupField', + hubspotEvents: [ + { + rsEventName: 'Purchase', + hubspotEventName: 'pedummy-hubId_rs_hub_test', + eventProperties: [ + { + from: 'Revenue', + to: 'value', + }, + { + from: 'Price', + to: 'cost', + }, + ], + }, + { + rsEventName: 'Order Complete', + hubspotEventName: 'pedummy-hubId_rs_hub_chair', + eventProperties: [ + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, + ], + }, + ], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + name: 'Hubspot', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmLd', + deleted: false, + createdAt: '2020-12-30T08:39:32.005Z', + updatedAt: '2021-02-03T16:22:31.374Z', + destinationDefinition: { + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'HS', + displayName: 'Hubspot', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + metadata: { + jobId: 2, + }, + }, + { + message: { + channel: 'web', + context: { + mappedToDestination: true, + externalId: [ + { + identifierType: 'email', + id: 'testhubspot@email.com', + type: 'HS-lead', + }, + ], + sources: { + job_id: '24c5HJxHomh6YCngEOCgjS5r1KX/Syncher', + task_id: 'vw_rs_mailchimp_mocked_hg_data', + version: 'v1.8.1', + batch_id: 'f252c69d-c40d-450e-bcd2-2cf26cb62762', + job_run_id: 'c8el40l6e87v0c4hkbl0', + task_run_id: 'c8el40l6e87v0c4hkblg', + }, + }, + type: 'identify', + traits: { + firstname: 'Test Hubspot 1', + anonymousId: '123451', + country: 'India 1', + }, + messageId: '50360b9c-ea8d-409c-b672-c9230f91cce5', + originalTimestamp: '2019-10-15T09:35:31.288Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + authorizationType: 'newPrivateAppApi', + accessToken: 'dummy-access-token', + hubID: 'dummy-hubId', + apiKey: 'dummy-apikey', + apiVersion: 'newApi', + lookupField: 'lookupField', + hubspotEvents: [ + { + rsEventName: 'Purchase', + hubspotEventName: 'pedummy-hubId_rs_hub_test', + eventProperties: [ + { + from: 'Revenue', + to: 'value', + }, + { + from: 'Price', + to: 'cost', + }, + ], + }, + { + rsEventName: 'Order Complete', + hubspotEventName: 'pedummy-hubId_rs_hub_chair', + eventProperties: [ + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, + ], + }, + ], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + name: 'Hubspot', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmLd', + deleted: false, + createdAt: '2020-12-30T08:39:32.005Z', + updatedAt: '2021-02-03T16:22:31.374Z', + destinationDefinition: { + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'HS', + displayName: 'Hubspot', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + metadata: { + jobId: 3, + }, + }, + { + message: { + channel: 'web', + context: { + mappedToDestination: true, + externalId: [ + { + identifierType: 'email', + id: 'testhubspotdatetime@email.com', + type: 'HS-lead', + }, + ], + sources: { + job_id: '24c5HJxHomh6YCngEOCgjS5r1KX/Syncher', + task_id: 'vw_rs_mailchimp_mocked_hg_data', + version: 'v1.8.1', + batch_id: 'f252c69d-c40d-450e-bcd2-2cf26cb62762', + job_run_id: 'c8el40l6e87v0c4hkbl0', + task_run_id: 'c8el40l6e87v0c4hkblg', + }, + }, + type: 'identify', + traits: { + firstname: 'Test Hubspot', + anonymousId: '123451', + country: 'India', + date_submitted: '2023-09-25T17:31:04.128251Z', + date_created: '2023-03-30T01:02:03.05Z', + date_closed: '2023-10-18T04:38:59.229347Z', + }, + messageId: '50360b9c-ea8d-409c-b672-c9230f91cce5', + originalTimestamp: '2019-10-15T09:35:31.288Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + authorizationType: 'newPrivateAppApi', + accessToken: 'dummy-access-token', + hubID: 'dummy-hubId', + apiKey: 'dummy-apikey', + apiVersion: 'newApi', + lookupField: 'lookupField', + hubspotEvents: [ + { + rsEventName: 'Purchase', + hubspotEventName: 'pedummy-hubId_rs_hub_test', + eventProperties: [ + { + from: 'Revenue', + to: 'value', + }, + { + from: 'Price', + to: 'cost', + }, + ], + }, + { + rsEventName: 'Order Complete', + hubspotEventName: 'pedummy-hubId_rs_hub_chair', + eventProperties: [ + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, + ], + }, + ], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + name: 'Hubspot', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmLd', + deleted: false, + createdAt: '2020-12-30T08:39:32.005Z', + updatedAt: '2021-02-03T16:22:31.374Z', + destinationDefinition: { + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'HS', + displayName: 'Hubspot', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + metadata: { + jobId: 4, + }, + }, + ], + destType: 'hs', + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.hubapi.com/crm/v3/objects/lead/batch/create', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer dummy-access-token', + }, + params: {}, + body: { + JSON: { + inputs: [ + { + properties: { + firstname: 'Test Hubspot 1', + anonymousId: '123451', + country: 'India 1', + email: 'testhubspot@email.com', + }, + }, + { + properties: { + firstname: 'Test Hubspot', + anonymousId: '123451', + country: 'India', + email: 'testhubspotdatetime@email.com', + date_closed: 1697587200000, + date_created: 1680134400000, + date_submitted: 1695600000000, + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + metadata: [ + { + jobId: 3, + }, + { + jobId: 4, + }, + ], + batched: true, + statusCode: 200, + destination: { + Config: { + authorizationType: 'newPrivateAppApi', + accessToken: 'dummy-access-token', + hubID: 'dummy-hubId', + apiKey: 'dummy-apikey', + apiVersion: 'newApi', + lookupField: 'lookupField', + hubspotEvents: [ + { + rsEventName: 'Purchase', + hubspotEventName: 'pedummy-hubId_rs_hub_test', + eventProperties: [ + { + from: 'Revenue', + to: 'value', + }, + { + from: 'Price', + to: 'cost', + }, + ], + }, + { + rsEventName: 'Order Complete', + hubspotEventName: 'pedummy-hubId_rs_hub_chair', + eventProperties: [ + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, + ], + }, + ], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + name: 'Hubspot', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmLd', + deleted: false, + createdAt: '2020-12-30T08:39:32.005Z', + updatedAt: '2021-02-03T16:22:31.374Z', + destinationDefinition: { + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'HS', + displayName: 'Hubspot', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + }, + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.hubapi.com/crm/v3/objects/lead/batch/update', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer dummy-access-token', + }, + params: {}, + body: { + JSON: { + inputs: [ + { + properties: { + firstname: 'Test Hubspot', + anonymousId: '12345', + country: 'India', + email: 'testhubspot2@email.com', + }, + id: '103605', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + metadata: [ + { + jobId: 2, + }, + ], + batched: true, + statusCode: 200, + destination: { + Config: { + authorizationType: 'newPrivateAppApi', + accessToken: 'dummy-access-token', + hubID: 'dummy-hubId', + apiKey: 'dummy-apikey', + apiVersion: 'newApi', + lookupField: 'lookupField', + hubspotEvents: [ + { + rsEventName: 'Purchase', + hubspotEventName: 'pedummy-hubId_rs_hub_test', + eventProperties: [ + { + from: 'Revenue', + to: 'value', + }, + { + from: 'Price', + to: 'cost', + }, + ], + }, + { + rsEventName: 'Order Complete', + hubspotEventName: 'pedummy-hubId_rs_hub_chair', + eventProperties: [ + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, + ], + }, + ], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + name: 'Hubspot', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmLd', + deleted: false, + createdAt: '2020-12-30T08:39:32.005Z', + updatedAt: '2021-02-03T16:22:31.374Z', + destinationDefinition: { + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'HS', + displayName: 'Hubspot', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + }, + ], + }, + }, + }, + }, + { + name: 'hs', + description: 'router tests', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'noname@email.com', + firstname: 'Test Hubspot22', + anonymousId: '4444', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '', + referrer: '', + search: '', + title: '', + url: '', + }, + }, + type: 'identify', + messageId: '50360b9c-ea8d-409c-b672-c9230f91cce5', + originalTimestamp: '2019-10-15T09:35:31.288Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + metadata: { + jobId: 1, + }, + destination: { + Config: { + authorizationType: 'newPrivateAppApi', + accessToken: 'dummy-access-token', + hubID: 'dummy-hubId', + apiKey: 'dummy-apikey', + apiVersion: 'newApi', + lookupField: 'email', + hubspotEvents: [ + { + rsEventName: 'Purchase', + hubspotEventName: 'pedummy-hubId_rs_hub_test', + eventProperties: [ + { + from: 'Revenue', + to: 'value', + }, + { + from: 'Price', + to: 'cost', + }, + ], + }, + { + rsEventName: 'Order Complete', + hubspotEventName: 'pedummy-hubId_rs_hub_chair', + eventProperties: [ + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, + ], + }, + ], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + name: 'Hubspot', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmLd', + deleted: false, + createdAt: '2020-12-30T08:39:32.005Z', + updatedAt: '2021-02-03T16:22:31.374Z', + destinationDefinition: { + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'HS', + displayName: 'Hubspot', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + }, + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'noname@email.com', + firstname: 'Test Hubspot44', + anonymousId: '4444', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '', + referrer: '', + search: '', + title: '', + url: '', + }, + }, + type: 'identify', + messageId: '50360b9c-ea8d-409c-b672-c9230f91cce5', + originalTimestamp: '2019-10-15T09:35:31.288Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + metadata: { + jobId: 2, + }, + destination: { + Config: { + authorizationType: 'newPrivateAppApi', + accessToken: 'dummy-access-token', + hubID: 'dummy-hubId', + apiKey: 'dummy-apikey', + apiVersion: 'newApi', + lookupField: 'email', + hubspotEvents: [ + { + rsEventName: 'Purchase', + hubspotEventName: 'pedummy-hubId_rs_hub_test', + eventProperties: [ + { + from: 'Revenue', + to: 'value', + }, + { + from: 'Price', + to: 'cost', + }, + ], + }, + { + rsEventName: 'Order Complete', + hubspotEventName: 'pedummy-hubId_rs_hub_chair', + eventProperties: [ + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, + ], + }, + ], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + name: 'Hubspot', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmLd', + deleted: false, + createdAt: '2020-12-30T08:39:32.005Z', + updatedAt: '2021-02-03T16:22:31.374Z', + destinationDefinition: { + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'HS', + displayName: 'Hubspot', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + }, + { + message: { + type: 'track', + traits: {}, + context: { + externalId: [ + { + id: 'osvaldocostaferreira98@gmail.com', + type: 'HS-contacts', + identifierType: 'email', + }, + ], + }, + event: 'Purchase', + properties: { + Revenue: 'name1', + }, + }, + metadata: { + jobId: 3, + }, + destination: { + Config: { + authorizationType: 'newPrivateAppApi', + accessToken: 'dummy-access-token', + hubID: 'dummy-hubId', + apiKey: 'dummy-apikey', + apiVersion: 'newApi', + lookupField: 'lookupField', + hubspotEvents: [ + { + rsEventName: 'Purchase', + hubspotEventName: 'pedummy-hubId_rs_hub_test', + eventProperties: [ + { + from: 'Revenue', + to: 'value', + }, + { + from: 'Price', + to: 'cost', + }, + ], + }, + { + rsEventName: 'Order Complete', + hubspotEventName: 'pedummy-hubId_rs_hub_chair', + eventProperties: [ + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, + ], + }, + ], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + name: 'Hubspot', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmLd', + deleted: false, + createdAt: '2020-12-30T08:39:32.005Z', + updatedAt: '2021-02-03T16:22:31.374Z', + destinationDefinition: { + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'HS', + displayName: 'Hubspot', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + }, + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'testhubspot@email.com', + firstname: 'Test Hubspot22', + anonymousId: '4444', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '', + referrer: '', + search: '', + title: '', + url: '', + }, + }, + type: 'identify', + messageId: '50360b9c-ea8d-409c-b672-c9230f91cce5', + originalTimestamp: '2019-10-15T09:35:31.288Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + metadata: { + jobId: 4, + }, + destination: { + Config: { + authorizationType: 'newPrivateAppApi', + accessToken: 'dummy-access-token', + hubID: 'dummy-hubId', + apiKey: 'dummy-apikey', + apiVersion: 'newApi', + lookupField: 'email', + hubspotEvents: [ + { + rsEventName: 'Purchase', + hubspotEventName: 'pedummy-hubId_rs_hub_test', + eventProperties: [ + { + from: 'Revenue', + to: 'value', + }, + { + from: 'Price', + to: 'cost', + }, + ], + }, + { + rsEventName: 'Order Complete', + hubspotEventName: 'pedummy-hubId_rs_hub_chair', + eventProperties: [ + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, + ], + }, + ], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + name: 'Hubspot', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmLd', + deleted: false, + createdAt: '2020-12-30T08:39:32.005Z', + updatedAt: '2021-02-03T16:22:31.374Z', + destinationDefinition: { + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'HS', + displayName: 'Hubspot', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + }, + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + traits: { + email: 'testhubspot@email.com', + firstname: 'Test Hubspot44', + anonymousId: '4444', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-GB', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + page: { + path: '', + referrer: '', + search: '', + title: '', + url: '', + }, + }, + type: 'identify', + messageId: '50360b9c-ea8d-409c-b672-c9230f91cce5', + originalTimestamp: '2019-10-15T09:35:31.288Z', + anonymousId: '00000000000000000000000000', + userId: '12345', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + metadata: { + jobId: 5, + }, + destination: { + Config: { + authorizationType: 'newPrivateAppApi', + accessToken: 'dummy-access-token', + hubID: 'dummy-hubId', + apiKey: 'dummy-apikey', + apiVersion: 'newApi', + lookupField: 'email', + hubspotEvents: [ + { + rsEventName: 'Purchase', + hubspotEventName: 'pedummy-hubId_rs_hub_test', + eventProperties: [ + { + from: 'Revenue', + to: 'value', + }, + { + from: 'Price', + to: 'cost', + }, + ], + }, + { + rsEventName: 'Order Complete', + hubspotEventName: 'pedummy-hubId_rs_hub_chair', + eventProperties: [ + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, + ], + }, + ], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + name: 'Hubspot', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmLd', + deleted: false, + createdAt: '2020-12-30T08:39:32.005Z', + updatedAt: '2021-02-03T16:22:31.374Z', + destinationDefinition: { + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'HS', + displayName: 'Hubspot', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + }, + ], + destType: 'hs', + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.hubapi.com/crm/v3/objects/contacts/batch/create', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer dummy-access-token', + }, + params: {}, + body: { + JSON: { + inputs: [ + { + properties: { + email: 'noname@email.com', + firstname: 'Test Hubspot44', + }, + }, + { + properties: { + email: 'testhubspot@email.com', + firstname: 'Test Hubspot44', + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + metadata: [ + { + jobId: 1, + }, + { + jobId: 2, + }, + { + jobId: 4, + }, + { + jobId: 5, + }, + ], + batched: true, + statusCode: 200, + destination: { + Config: { + authorizationType: 'newPrivateAppApi', + accessToken: 'dummy-access-token', + hubID: 'dummy-hubId', + apiKey: 'dummy-apikey', + apiVersion: 'newApi', + lookupField: 'email', + hubspotEvents: [ + { + rsEventName: 'Purchase', + hubspotEventName: 'pedummy-hubId_rs_hub_test', + eventProperties: [ + { + from: 'Revenue', + to: 'value', + }, + { + from: 'Price', + to: 'cost', + }, + ], + }, + { + rsEventName: 'Order Complete', + hubspotEventName: 'pedummy-hubId_rs_hub_chair', + eventProperties: [ + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, + ], + }, + ], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + name: 'Hubspot', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmLd', + deleted: false, + createdAt: '2020-12-30T08:39:32.005Z', + updatedAt: '2021-02-03T16:22:31.374Z', + destinationDefinition: { + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'HS', + displayName: 'Hubspot', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + }, + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.hubapi.com/events/v3/send', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer dummy-access-token', + }, + params: {}, + body: { + JSON: { + email: 'osvaldocostaferreira98@gmail.com', + eventName: 'pedummy-hubId_rs_hub_test', + properties: { + value: 'name1', + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + metadata: [ + { + jobId: 3, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + authorizationType: 'newPrivateAppApi', + accessToken: 'dummy-access-token', + hubID: 'dummy-hubId', + apiKey: 'dummy-apikey', + apiVersion: 'newApi', + lookupField: 'email', + hubspotEvents: [ + { + rsEventName: 'Purchase', + hubspotEventName: 'pedummy-hubId_rs_hub_test', + eventProperties: [ + { + from: 'Revenue', + to: 'value', + }, + { + from: 'Price', + to: 'cost', + }, + ], + }, + { + rsEventName: 'Order Complete', + hubspotEventName: 'pedummy-hubId_rs_hub_chair', + eventProperties: [ + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, + ], + }, + ], + eventFilteringOption: 'disable', + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + name: 'Hubspot', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmLd', + deleted: false, + createdAt: '2020-12-30T08:39:32.005Z', + updatedAt: '2021-02-03T16:22:31.374Z', + destinationDefinition: { + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'HS', + displayName: 'Hubspot', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + }, + ], + }, + }, + }, + }, +]; diff --git a/test/integrations/destinations/intercom/processor/data.ts b/test/integrations/destinations/intercom/processor/data.ts new file mode 100644 index 0000000000..14d1884ba2 --- /dev/null +++ b/test/integrations/destinations/intercom/processor/data.ts @@ -0,0 +1,2311 @@ +export const data = [ + { + name: 'intercom', + description: 'Test 0', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + channel: 'mobile', + context: { + app: { + build: '1.0', + name: 'Test_Example', + namespace: 'com.example.testapp', + version: '1.0', + }, + device: { + id: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + manufacturer: 'Apple', + model: 'iPhone', + name: 'iPod touch (7th generation)', + type: 'iOS', + }, + library: { + name: 'test-ios-library', + version: '1.0.7', + }, + locale: 'en-US', + network: { + bluetooth: false, + carrier: 'unavailable', + cellular: false, + wifi: true, + }, + os: { + name: 'iOS', + version: '14.0', + }, + screen: { + density: 2, + height: 320, + width: 568, + }, + timezone: 'Asia/Kolkata', + traits: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + name: 'Test Name', + firstName: 'Test', + lastName: 'Name', + createdAt: '2020-09-30T19:11:00.337Z', + userId: 'test_user_id_1', + email: 'test_1@test.com', + phone: '9876543210', + key1: 'value1', + address: { + city: 'Kolkata', + state: 'West Bengal', + }, + originalArray: [ + { + nested_field: 'nested value', + tags: ['tag_1', 'tag_2', 'tag_3'], + }, + { + nested_field: 'nested value', + tags: ['tag_1'], + }, + { + nested_field: 'nested value', + }, + ], + }, + userAgent: 'unknown', + }, + event: 'Test Event 2', + integrations: { + All: true, + }, + messageId: '1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8', + originalTimestamp: '2020-09-30T19:11:00.337Z', + receivedAt: '2020-10-01T00:41:11.369+05:30', + request_ip: '2405:201:8005:9856:7911:25e7:5603:5e18', + sentAt: '2020-09-30T19:11:10.382Z', + timestamp: '2020-10-01T00:41:01.324+05:30', + type: 'identify', + }, + destination: { + Config: { + apiKey: 'intercomApiKey', + appId: '9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0', + collectContext: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.intercom.io/users', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer intercomApiKey', + Accept: 'application/json', + 'Intercom-Version': '1.4', + }, + params: {}, + body: { + JSON: { + user_id: 'test_user_id_1', + email: 'test_1@test.com', + phone: '9876543210', + name: 'Test Name', + signed_up_at: 1601493060, + last_seen_user_agent: 'unknown', + custom_attributes: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + key1: 'value1', + 'address.city': 'Kolkata', + 'address.state': 'West Bengal', + 'originalArray[0].nested_field': 'nested value', + 'originalArray[0].tags[0]': 'tag_1', + 'originalArray[0].tags[1]': 'tag_2', + 'originalArray[0].tags[2]': 'tag_3', + 'originalArray[1].nested_field': 'nested value', + 'originalArray[1].tags[0]': 'tag_1', + 'originalArray[2].nested_field': 'nested value', + }, + update_last_request_at: true, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'intercom', + description: 'Test 1', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + channel: 'mobile', + context: { + app: { + build: '1.0', + name: 'Test_Example', + namespace: 'com.example.testapp', + version: '1.0', + }, + device: { + id: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + manufacturer: 'Apple', + model: 'iPhone', + name: 'iPod touch (7th generation)', + type: 'iOS', + }, + library: { + name: 'test-ios-library', + version: '1.0.7', + }, + locale: 'en-US', + network: { + bluetooth: false, + carrier: 'unavailable', + cellular: false, + wifi: true, + }, + os: { + name: 'iOS', + version: '14.0', + }, + screen: { + density: 2, + height: 320, + width: 568, + }, + timezone: 'Asia/Kolkata', + traits: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + firstName: 'Test', + lastName: 'Name', + createdAt: '2020-09-30T19:11:00.337Z', + email: 'test_1@test.com', + phone: '9876543210', + key1: 'value1', + }, + userAgent: 'unknown', + }, + event: 'Test Event 2', + integrations: { + All: true, + }, + messageId: '1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8', + originalTimestamp: '2020-09-30T19:11:00.337Z', + receivedAt: '2020-10-01T00:41:11.369+05:30', + request_ip: '2405:201:8005:9856:7911:25e7:5603:5e18', + sentAt: '2020-09-30T19:11:10.382Z', + timestamp: '2020-10-01T00:41:01.324+05:30', + type: 'identify', + }, + destination: { + Config: { + apiKey: 'intercomApiKey', + appId: '9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0', + collectContext: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.intercom.io/users', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer intercomApiKey', + Accept: 'application/json', + 'Intercom-Version': '1.4', + }, + params: {}, + body: { + JSON: { + email: 'test_1@test.com', + phone: '9876543210', + signed_up_at: 1601493060, + last_seen_user_agent: 'unknown', + custom_attributes: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + key1: 'value1', + }, + update_last_request_at: true, + name: 'Test Name', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'intercom', + description: 'Test 2', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + channel: 'mobile', + context: { + app: { + build: '1.0', + name: 'Test_Example', + namespace: 'com.example.testapp', + version: '1.0', + }, + device: { + id: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + manufacturer: 'Apple', + model: 'iPhone', + name: 'iPod touch (7th generation)', + type: 'iOS', + }, + library: { + name: 'test-ios-library', + version: '1.0.7', + }, + locale: 'en-US', + network: { + bluetooth: false, + carrier: 'unavailable', + cellular: false, + wifi: true, + }, + os: { + name: 'iOS', + version: '14.0', + }, + screen: { + density: 2, + height: 320, + width: 568, + }, + timezone: 'Asia/Kolkata', + traits: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + lastName: 'Name', + createdAt: '2020-09-30T19:11:00.337Z', + email: 'test_1@test.com', + phone: '9876543210', + key1: 'value1', + }, + userAgent: 'unknown', + }, + event: 'Test Event 2', + integrations: { + All: true, + }, + messageId: '1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8', + originalTimestamp: '2020-09-30T19:11:00.337Z', + receivedAt: '2020-10-01T00:41:11.369+05:30', + request_ip: '2405:201:8005:9856:7911:25e7:5603:5e18', + sentAt: '2020-09-30T19:11:10.382Z', + timestamp: '2020-10-01T00:41:01.324+05:30', + type: 'identify', + }, + destination: { + Config: { + apiKey: 'intercomApiKey', + appId: '9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0', + collectContext: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.intercom.io/users', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer intercomApiKey', + Accept: 'application/json', + 'Intercom-Version': '1.4', + }, + params: {}, + body: { + JSON: { + email: 'test_1@test.com', + phone: '9876543210', + signed_up_at: 1601493060, + last_seen_user_agent: 'unknown', + custom_attributes: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + key1: 'value1', + }, + update_last_request_at: true, + name: 'Name', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'intercom', + description: 'Test 3', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + channel: 'mobile', + context: { + app: { + build: '1.0', + name: 'Test_Example', + namespace: 'com.example.testapp', + version: '1.0', + }, + device: { + id: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + manufacturer: 'Apple', + model: 'iPhone', + name: 'iPod touch (7th generation)', + type: 'iOS', + }, + library: { + name: 'test-ios-library', + version: '1.0.7', + }, + locale: 'en-US', + network: { + bluetooth: false, + carrier: 'unavailable', + cellular: false, + wifi: true, + }, + os: { + name: 'iOS', + version: '14.0', + }, + screen: { + density: 2, + height: 320, + width: 568, + }, + timezone: 'Asia/Kolkata', + traits: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + firstName: 'Name', + createdAt: '2020-09-30T19:11:00.337Z', + email: 'test_1@test.com', + phone: '9876543210', + key1: 'value1', + }, + userAgent: 'unknown', + }, + event: 'Test Event 2', + integrations: { + All: true, + }, + messageId: '1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8', + originalTimestamp: '2020-09-30T19:11:00.337Z', + receivedAt: '2020-10-01T00:41:11.369+05:30', + request_ip: '2405:201:8005:9856:7911:25e7:5603:5e18', + sentAt: '2020-09-30T19:11:10.382Z', + timestamp: '2020-10-01T00:41:01.324+05:30', + type: 'identify', + }, + destination: { + Config: { + apiKey: 'intercomApiKey', + appId: '9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0', + collectContext: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.intercom.io/users', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer intercomApiKey', + Accept: 'application/json', + 'Intercom-Version': '1.4', + }, + params: {}, + body: { + JSON: { + email: 'test_1@test.com', + phone: '9876543210', + signed_up_at: 1601493060, + last_seen_user_agent: 'unknown', + custom_attributes: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + key1: 'value1', + }, + update_last_request_at: true, + name: 'Name', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'intercom', + description: 'Test 4: ERROR - Either of `email` or `userId` is required for Identify call', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + channel: 'mobile', + context: { + app: { + build: '1.0', + name: 'Test_Example', + namespace: 'com.example.testapp', + version: '1.0', + }, + device: { + id: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + manufacturer: 'Apple', + model: 'iPhone', + name: 'iPod touch (7th generation)', + type: 'iOS', + }, + library: { + name: 'test-ios-library', + version: '1.0.7', + }, + locale: 'en-US', + network: { + bluetooth: false, + carrier: 'unavailable', + cellular: false, + wifi: true, + }, + os: { + name: 'iOS', + version: '14.0', + }, + screen: { + density: 2, + height: 320, + width: 568, + }, + timezone: 'Asia/Kolkata', + traits: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + firstName: 'Name', + createdAt: '2020-09-30T19:11:00.337Z', + phone: '9876543210', + key1: 'value1', + }, + userAgent: 'unknown', + }, + event: 'Test Event 2', + integrations: { + All: true, + }, + messageId: '1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8', + originalTimestamp: '2020-09-30T19:11:00.337Z', + receivedAt: '2020-10-01T00:41:11.369+05:30', + request_ip: '2405:201:8005:9856:7911:25e7:5603:5e18', + sentAt: '2020-09-30T19:11:10.382Z', + timestamp: '2020-10-01T00:41:01.324+05:30', + type: 'identify', + }, + destination: { + Config: { + apiKey: 'intercomApiKey', + appId: '9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0', + collectContext: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: 'Either of `email` or `userId` is required for Identify call', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'INTERCOM', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'intercom', + description: 'Test 5', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + channel: 'mobile', + context: { + app: { + build: '1.0', + name: 'Test_Example', + namespace: 'com.example.testapp', + version: '1.0', + }, + device: { + id: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + manufacturer: 'Apple', + model: 'iPhone', + name: 'iPod touch (7th generation)', + type: 'iOS', + }, + library: { + name: 'test-ios-library', + version: '1.0.7', + }, + locale: 'en-US', + network: { + bluetooth: false, + carrier: 'unavailable', + cellular: false, + wifi: true, + }, + os: { + name: 'iOS', + version: '14.0', + }, + screen: { + density: 2, + height: 320, + width: 568, + }, + timezone: 'Asia/Kolkata', + traits: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + lastName: 'Name', + createdAt: '2020-09-30T19:11:00.337Z', + email: 'test_1@test.com', + phone: '9876543210', + key1: 'value1', + company: { + name: 'Test Comp', + id: 'company_id', + industry: 'test industry', + key1: 'value1', + key2: { + a: 'a', + }, + key3: [1, 2, 3], + }, + }, + userAgent: 'unknown', + }, + event: 'Test Event 2', + integrations: { + All: true, + }, + messageId: '1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8', + originalTimestamp: '2020-09-30T19:11:00.337Z', + receivedAt: '2020-10-01T00:41:11.369+05:30', + request_ip: '2405:201:8005:9856:7911:25e7:5603:5e18', + sentAt: '2020-09-30T19:11:10.382Z', + timestamp: '2020-10-01T00:41:01.324+05:30', + type: 'identify', + }, + destination: { + Config: { + apiKey: 'intercomApiKey', + appId: '9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0', + collectContext: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.intercom.io/users', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer intercomApiKey', + Accept: 'application/json', + 'Intercom-Version': '1.4', + }, + params: {}, + body: { + JSON: { + email: 'test_1@test.com', + phone: '9876543210', + signed_up_at: 1601493060, + last_seen_user_agent: 'unknown', + custom_attributes: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + key1: 'value1', + }, + update_last_request_at: true, + name: 'Name', + companies: [ + { + company_id: 'company_id', + custom_attributes: { + key1: 'value1', + key2: '{"a":"a"}', + key3: '[1,2,3]', + }, + name: 'Test Comp', + industry: 'test industry', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'intercom', + description: 'Test 6', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + channel: 'mobile', + context: { + app: { + build: '1.0', + name: 'Test_Example', + namespace: 'com.example.testapp', + version: '1.0', + }, + device: { + id: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + manufacturer: 'Apple', + model: 'iPhone', + name: 'iPod touch (7th generation)', + type: 'iOS', + }, + library: { + name: 'test-ios-library', + version: '1.0.7', + }, + locale: 'en-US', + network: { + bluetooth: false, + carrier: 'unavailable', + cellular: false, + wifi: true, + }, + os: { + name: 'iOS', + version: '14.0', + }, + screen: { + density: 2, + height: 320, + width: 568, + }, + timezone: 'Asia/Kolkata', + traits: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + lastName: 'Name', + createdAt: '2020-09-30T19:11:00.337Z', + email: 'test_1@test.com', + phone: '9876543210', + key1: 'value1', + company: { + name: 'Test Comp', + industry: 'test industry', + key1: 'value1', + key2: null, + key3: ['value1', 'value2'], + key4: { + foo: 'bar', + }, + }, + }, + userAgent: 'unknown', + }, + event: 'Test Event 2', + integrations: { + All: true, + }, + messageId: '1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8', + originalTimestamp: '2020-09-30T19:11:00.337Z', + receivedAt: '2020-10-01T00:41:11.369+05:30', + request_ip: '2405:201:8005:9856:7911:25e7:5603:5e18', + sentAt: '2020-09-30T19:11:10.382Z', + timestamp: '2020-10-01T00:41:01.324+05:30', + type: 'identify', + }, + destination: { + Config: { + apiKey: 'intercomApiKey', + appId: '9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0', + collectContext: false, + updateLastRequestAt: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.intercom.io/users', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer intercomApiKey', + Accept: 'application/json', + 'Intercom-Version': '1.4', + }, + params: {}, + body: { + JSON: { + email: 'test_1@test.com', + phone: '9876543210', + signed_up_at: 1601493060, + last_seen_user_agent: 'unknown', + custom_attributes: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + key1: 'value1', + }, + update_last_request_at: false, + name: 'Name', + companies: [ + { + company_id: 'c0277b5c814453e5135f515f943d085a', + custom_attributes: { + key1: 'value1', + key3: '["value1","value2"]', + key4: '{"foo":"bar"}', + }, + name: 'Test Comp', + industry: 'test industry', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'intercom', + description: 'Test 7', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + channel: 'mobile', + context: { + app: { + build: '1.0', + name: 'Test_Example', + namespace: 'com.example.testapp', + version: '1.0', + }, + device: { + id: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + manufacturer: 'Apple', + model: 'iPhone', + name: 'iPod touch (7th generation)', + type: 'iOS', + }, + library: { + name: 'test-ios-library', + version: '1.0.7', + }, + locale: 'en-US', + network: { + bluetooth: false, + carrier: 'unavailable', + cellular: false, + wifi: true, + }, + os: { + name: 'iOS', + version: '14.0', + }, + screen: { + density: 2, + height: 320, + width: 568, + }, + timezone: 'Asia/Kolkata', + traits: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + lastName: 'Name', + createdAt: '2020-09-30T19:11:00.337Z', + email: 'test_1@test.com', + phone: '9876543210', + key1: 'value1', + company: { + industry: 'test industry', + key1: 'value1', + key2: null, + }, + }, + userAgent: 'unknown', + }, + event: 'Test Event 2', + integrations: { + All: true, + }, + messageId: '1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8', + originalTimestamp: '2020-09-30T19:11:00.337Z', + receivedAt: '2020-10-01T00:41:11.369+05:30', + request_ip: '2405:201:8005:9856:7911:25e7:5603:5e18', + sentAt: '2020-09-30T19:11:10.382Z', + timestamp: '2020-10-01T00:41:01.324+05:30', + type: 'identify', + }, + destination: { + Config: { + apiKey: 'intercomApiKey', + appId: '9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0', + collectContext: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.intercom.io/users', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer intercomApiKey', + Accept: 'application/json', + 'Intercom-Version': '1.4', + }, + params: {}, + body: { + JSON: { + email: 'test_1@test.com', + phone: '9876543210', + signed_up_at: 1601493060, + last_seen_user_agent: 'unknown', + custom_attributes: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + key1: 'value1', + }, + update_last_request_at: true, + name: 'Name', + companies: [], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'intercom', + description: 'Test 8', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + channel: 'mobile', + context: { + app: { + build: '1.0', + name: 'Test_Example', + namespace: 'com.example.testapp', + version: '1.0', + }, + device: { + id: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + manufacturer: 'Apple', + model: 'iPhone', + name: 'iPod touch (7th generation)', + type: 'iOS', + }, + library: { + name: 'test-ios-library', + version: '1.0.7', + }, + locale: 'en-US', + network: { + bluetooth: false, + carrier: 'unavailable', + cellular: false, + wifi: true, + }, + os: { + name: 'iOS', + version: '14.0', + }, + screen: { + density: 2, + height: 320, + width: 568, + }, + timezone: 'Asia/Kolkata', + traits: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + name: 'Test Name', + firstName: 'Test', + lastName: 'Name', + createdAt: '2020-09-30T19:11:00.337Z', + userId: 'test_user_id_1', + email: 'test_1@test.com', + phone: '9876543210', + key1: 'value1', + }, + userAgent: 'unknown', + }, + properties: { + property1: 1, + property2: 'test', + property3: true, + property4: '2020-10-05T09:09:03.731Z', + property5: { + property1: 1, + property2: 'test', + property3: { + subProp1: { + a: 'a', + b: 'b', + }, + subProp2: ['a', 'b'], + }, + }, + properties6: null, + revenue: { + amount: 1232, + currency: 'inr', + test: 123, + }, + price: { + amount: 3000, + currency: 'USD', + }, + article: { + url: 'https://example.org/ab1de.html', + value: 'the dude abides', + }, + }, + event: 'Test Event 2', + integrations: { + All: true, + }, + messageId: '1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8', + originalTimestamp: '2020-09-30T19:11:00.337Z', + receivedAt: '2020-10-01T00:41:11.369+05:30', + request_ip: '2405:201:8005:9856:7911:25e7:5603:5e18', + sentAt: '2020-09-30T19:11:10.382Z', + timestamp: '2020-10-01T00:41:01.324+05:30', + type: 'track', + }, + destination: { + Config: { + apiKey: 'intercomApiKey', + appId: '9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0', + collectContext: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.intercom.io/events', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer intercomApiKey', + Accept: 'application/json', + 'Intercom-Version': '1.4', + }, + params: {}, + body: { + JSON: { + user_id: 'test_user_id_1', + email: 'test_1@test.com', + event_name: 'Test Event 2', + created: 1601493061, + metadata: { + revenue: { + amount: 1232, + currency: 'inr', + test: 123, + }, + price: { + amount: 3000, + currency: 'USD', + }, + article: { + url: 'https://example.org/ab1de.html', + value: 'the dude abides', + }, + property1: 1, + property2: 'test', + property3: true, + property4: '2020-10-05T09:09:03.731Z', + 'property5.property1': 1, + 'property5.property2': 'test', + 'property5.property3.subProp1.a': 'a', + 'property5.property3.subProp1.b': 'b', + 'property5.property3.subProp2[0]': 'a', + 'property5.property3.subProp2[1]': 'b', + properties6: null, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'intercom', + description: 'Test 9', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + channel: 'mobile', + context: { + app: { + build: '1.0', + name: 'Test_Example', + namespace: 'com.example.testapp', + version: '1.0', + }, + device: { + id: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + manufacturer: 'Apple', + model: 'iPhone', + name: 'iPod touch (7th generation)', + type: 'iOS', + }, + library: { + name: 'test-ios-library', + version: '1.0.7', + }, + locale: 'en-US', + network: { + bluetooth: false, + carrier: 'unavailable', + cellular: false, + wifi: true, + }, + os: { + name: 'iOS', + version: '14.0', + }, + screen: { + density: 2, + height: 320, + width: 568, + }, + timezone: 'Asia/Kolkata', + traits: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + name: 'Test Name', + firstName: 'Test', + lastName: 'Name', + createdAt: '2020-09-30T19:11:00.337Z', + email: 'test_1@test.com', + phone: '9876543210', + key1: 'value1', + }, + userAgent: 'unknown', + }, + event: 'Test Event 2', + integrations: { + All: true, + }, + messageId: '1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8', + originalTimestamp: '2020-09-30T19:11:00.337Z', + receivedAt: '2020-10-01T00:41:11.369+05:30', + request_ip: '2405:201:8005:9856:7911:25e7:5603:5e18', + sentAt: '2020-09-30T19:11:10.382Z', + timestamp: '2020-10-01T00:41:01.324+05:30', + type: 'track', + }, + destination: { + Config: { + apiKey: 'intercomApiKey', + appId: '9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0', + collectContext: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.intercom.io/events', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer intercomApiKey', + Accept: 'application/json', + 'Intercom-Version': '1.4', + }, + params: {}, + body: { + JSON: { + email: 'test_1@test.com', + event_name: 'Test Event 2', + created: 1601493061, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'intercom', + description: 'Test 10: ERROR - Either of `email` or `userId` is required for Track call', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + channel: 'mobile', + context: { + app: { + build: '1.0', + name: 'Test_Example', + namespace: 'com.example.testapp', + version: '1.0', + }, + device: { + id: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + manufacturer: 'Apple', + model: 'iPhone', + name: 'iPod touch (7th generation)', + type: 'iOS', + }, + library: { + name: 'test-ios-library', + version: '1.0.7', + }, + locale: 'en-US', + network: { + bluetooth: false, + carrier: 'unavailable', + cellular: false, + wifi: true, + }, + os: { + name: 'iOS', + version: '14.0', + }, + screen: { + density: 2, + height: 320, + width: 568, + }, + timezone: 'Asia/Kolkata', + traits: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + name: 'Test Name', + firstName: 'Test', + lastName: 'Name', + createdAt: '2020-09-30T19:11:00.337Z', + phone: '9876543210', + key1: 'value1', + }, + userAgent: 'unknown', + }, + event: 'Test Event 2', + integrations: { + All: true, + }, + messageId: '1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8', + originalTimestamp: '2020-09-30T19:11:00.337Z', + receivedAt: '2020-10-01T00:41:11.369+05:30', + request_ip: '2405:201:8005:9856:7911:25e7:5603:5e18', + sentAt: '2020-09-30T19:11:10.382Z', + timestamp: '2020-10-01T00:41:01.324+05:30', + type: 'track', + }, + destination: { + Config: { + apiKey: 'intercomApiKey', + appId: '9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0', + collectContext: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: 'Either of `email` or `userId` is required for Track call', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'INTERCOM', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'intercom', + description: 'Test 11', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + channel: 'mobile', + context: { + app: { + build: '1.0', + name: 'Test_Example', + namespace: 'com.example.testapp', + version: '1.0', + }, + externalId: [ + { + identifierType: 'email', + id: 'test@gmail.com', + }, + ], + mappedToDestination: true, + device: { + id: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + manufacturer: 'Apple', + model: 'iPhone', + name: 'iPod touch (7th generation)', + type: 'iOS', + }, + library: { + name: 'test-ios-library', + version: '1.0.7', + }, + locale: 'en-US', + network: { + bluetooth: false, + carrier: 'unavailable', + cellular: false, + wifi: true, + }, + os: { + name: 'iOS', + version: '14.0', + }, + screen: { + density: 2, + height: 320, + width: 568, + }, + timezone: 'Asia/Kolkata', + traits: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + name: 'Test Name', + firstName: 'Test', + lastName: 'Name', + createdAt: '2020-09-30T19:11:00.337Z', + phone: '9876543210', + key1: 'value1', + }, + userAgent: 'unknown', + }, + event: 'Test Event 2', + integrations: { + All: true, + }, + messageId: '1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8', + originalTimestamp: '2020-09-30T19:11:00.337Z', + receivedAt: '2020-10-01T00:41:11.369+05:30', + request_ip: '2405:201:8005:9856:7911:25e7:5603:5e18', + sentAt: '2020-09-30T19:11:10.382Z', + timestamp: '2020-10-01T00:41:01.324+05:30', + type: 'identify', + }, + destination: { + Config: { + apiKey: 'intercomApiKey', + appId: '9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0', + collectContext: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.intercom.io/users', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer intercomApiKey', + Accept: 'application/json', + 'Intercom-Version': '1.4', + }, + params: {}, + body: { + JSON: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + name: 'Test Name', + firstName: 'Test', + lastName: 'Name', + createdAt: '2020-09-30T19:11:00.337Z', + phone: '9876543210', + key1: 'value1', + email: 'test@gmail.com', + update_last_request_at: true, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'intercom', + description: 'Test 12', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + channel: 'mobile', + context: { + app: { + build: '1.0', + name: 'Test_Example', + namespace: 'com.example.testapp', + version: '1.0', + }, + device: { + id: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + manufacturer: 'Apple', + model: 'iPhone', + name: 'iPod touch (7th generation)', + type: 'iOS', + }, + library: { + name: 'test-ios-library', + version: '1.0.7', + }, + locale: 'en-US', + network: { + bluetooth: false, + carrier: 'unavailable', + cellular: false, + wifi: true, + }, + os: { + name: 'iOS', + version: '14.0', + }, + screen: { + density: 2, + height: 320, + width: 568, + }, + timezone: 'Asia/Kolkata', + traits: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + name: 'Test Name', + firstName: 'Test', + lastName: 'Name', + createdAt: '2020-09-30T19:11:00.337Z', + phone: '9876543210', + key1: 'value1', + }, + userAgent: 'unknown', + }, + event: 'Test Event 2', + integrations: { + All: true, + }, + messageId: '1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8', + originalTimestamp: '2020-09-30T19:11:00.337Z', + receivedAt: '2020-10-01T00:41:11.369+05:30', + request_ip: '2405:201:8005:9856:7911:25e7:5603:5e18', + sentAt: '2020-09-30T19:11:10.382Z', + timestamp: '2020-10-01T00:41:01.324+05:30', + type: 'identify', + }, + destination: { + Config: { + apiKey: 'intercomApiKey', + appId: '9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0', + collectContext: false, + sendAnonymousId: true, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.intercom.io/users', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer intercomApiKey', + Accept: 'application/json', + 'Intercom-Version': '1.4', + }, + params: {}, + body: { + JSON: { + phone: '9876543210', + name: 'Test Name', + signed_up_at: 1601493060, + last_seen_user_agent: 'unknown', + custom_attributes: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + key1: 'value1', + }, + user_id: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + update_last_request_at: true, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'intercom', + description: 'Test 13: ERROR - Either of `email` or `userId` is required for Identify call', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + channel: 'mobile', + context: { + app: { + build: '1.0', + name: 'Test_Example', + namespace: 'com.example.testapp', + version: '1.0', + }, + device: { + id: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + manufacturer: 'Apple', + model: 'iPhone', + name: 'iPod touch (7th generation)', + type: 'iOS', + }, + library: { + name: 'test-ios-library', + version: '1.0.7', + }, + locale: 'en-US', + network: { + bluetooth: false, + carrier: 'unavailable', + cellular: false, + wifi: true, + }, + os: { + name: 'iOS', + version: '14.0', + }, + screen: { + density: 2, + height: 320, + width: 568, + }, + timezone: 'Asia/Kolkata', + traits: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + name: 'Test Name', + firstName: 'Test', + lastName: 'Name', + createdAt: '2020-09-30T19:11:00.337Z', + phone: '9876543210', + key1: 'value1', + }, + userAgent: 'unknown', + }, + event: 'Test Event 2', + integrations: { + All: true, + }, + messageId: '1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8', + originalTimestamp: '2020-09-30T19:11:00.337Z', + receivedAt: '2020-10-01T00:41:11.369+05:30', + request_ip: '2405:201:8005:9856:7911:25e7:5603:5e18', + sentAt: '2020-09-30T19:11:10.382Z', + timestamp: '2020-10-01T00:41:01.324+05:30', + type: 'identify', + }, + destination: { + Config: { + apiKey: 'intercomApiKey', + appId: '9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0', + collectContext: false, + sendAnonymousId: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: 'Either of `email` or `userId` is required for Identify call', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'INTERCOM', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'intercom', + description: 'Test 14', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + groupId: 'test_company_id_wdasda', + traits: { + employees: 450, + plan: 'basic', + userId: 'sdfrsdfsdfsf', + email: 'test@test.com', + name: 'rudderUpdate', + size: '50', + industry: 'IT', + monthlySpend: '2131231', + remoteCreatedAt: '1683017572', + key1: 'val1', + }, + anonymousId: 'sdfrsdfsdfsf', + integrations: { + All: true, + }, + type: 'group', + userId: 'sdfrsdfsdfsf', + }, + destination: { + Config: { + apiKey: 'abcd=', + appId: 'asdasdasd', + collectContext: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.intercom.io/companies', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer abcd=', + Accept: 'application/json', + 'Intercom-Version': '1.4', + }, + params: {}, + body: { + JSON: { + company_id: 'test_company_id_wdasda', + name: 'rudderUpdate', + plan: 'basic', + size: 50, + industry: 'IT', + monthly_spend: 2131231, + remote_created_at: 1683017572, + custom_attributes: { + employees: 450, + email: 'test@test.com', + key1: 'val1', + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'sdfrsdfsdfsf', + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.intercom.io/users', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer abcd=', + Accept: 'application/json', + 'Intercom-Version': '1.4', + }, + params: {}, + body: { + JSON: { + user_id: 'sdfrsdfsdfsf', + companies: [ + { + company_id: 'test_company_id_wdasda', + name: 'rudderUpdate', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'sdfrsdfsdfsf', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'intercom', + description: 'Test 15', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + groupId: 'test_company_id', + traits: { + plan: 'basic', + name: 'rudderUpdate', + size: 50, + industry: 'IT', + monthlySpend: '2131231', + email: 'comanyemail@abc.com', + }, + anonymousId: '12312312', + context: { + app: { + build: '1.0', + name: 'Test_Example', + namespace: 'com.example.testapp', + version: '1.0', + }, + device: { + id: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + manufacturer: 'Apple', + model: 'iPhone', + name: 'iPod touch (7th generation)', + type: 'iOS', + }, + library: { + name: 'test-ios-library', + version: '1.0.7', + }, + locale: 'en-US', + network: { + bluetooth: false, + carrier: 'unavailable', + cellular: false, + wifi: true, + }, + os: { + name: 'iOS', + version: '14.0', + }, + screen: { + density: 2, + height: 320, + width: 568, + }, + timezone: 'Asia/Kolkata', + userAgent: 'unknown', + }, + integrations: { + All: true, + }, + messageId: '1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8', + type: 'group', + }, + destination: { + Config: { + apiKey: 'abcd=', + appId: 'asdasdasd', + collectContext: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.intercom.io/companies', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer abcd=', + Accept: 'application/json', + 'Intercom-Version': '1.4', + }, + params: {}, + body: { + JSON: { + company_id: 'test_company_id', + name: 'rudderUpdate', + plan: 'basic', + size: 50, + industry: 'IT', + monthly_spend: 2131231, + custom_attributes: { + email: 'comanyemail@abc.com', + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '12312312', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'intercom', + description: 'Test 16', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + groupId: 'test_company_id_wdasda', + context: { + traits: { + email: 'testUser@test.com', + }, + }, + traits: { + employees: 450, + plan: 'basic', + email: 'test@test.com', + name: 'rudderUpdate', + size: '50', + industry: 'IT', + website: 'url', + monthlySpend: '2131231', + remoteCreatedAt: '1683017572', + key1: 'val1', + }, + anonymousId: 'sdfrsdfsdfsf', + integrations: { + All: true, + }, + type: 'group', + userId: 'sdfrsdfsdfsf', + }, + destination: { + Config: { + apiKey: 'abcd=', + appId: 'asdasdasd', + collectContext: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.intercom.io/companies', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer abcd=', + Accept: 'application/json', + 'Intercom-Version': '1.4', + }, + params: {}, + body: { + JSON: { + company_id: 'test_company_id_wdasda', + name: 'rudderUpdate', + plan: 'basic', + size: 50, + website: 'url', + industry: 'IT', + monthly_spend: 2131231, + remote_created_at: 1683017572, + custom_attributes: { + employees: 450, + email: 'test@test.com', + key1: 'val1', + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'sdfrsdfsdfsf', + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.intercom.io/users', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer abcd=', + Accept: 'application/json', + 'Intercom-Version': '1.4', + }, + params: {}, + body: { + JSON: { + user_id: 'sdfrsdfsdfsf', + email: 'testUser@test.com', + companies: [ + { + company_id: 'test_company_id_wdasda', + name: 'rudderUpdate', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'sdfrsdfsdfsf', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'intercom', + description: 'Test 17', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + groupId: 'test_company_id_wdasda', + context: { + traits: { + email: 'testUser@test.com', + }, + }, + traits: { + employees: 450, + plan: 'basic', + email: 'test@test.com', + name: 'rudderUpdate', + size: '50', + industry: 'IT', + website: 'url', + monthlySpend: '2131231', + remoteCreatedAt: '1683017572', + key1: 'val1', + key2: { + a: 'a', + b: 'b', + }, + key3: [1, 2, 3], + key4: null, + }, + anonymousId: 'anonId', + integrations: { + All: true, + }, + type: 'group', + }, + destination: { + Config: { + apiKey: 'abcd=', + appId: 'asdasdasd', + collectContext: false, + sendAnonymousId: true, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.intercom.io/companies', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer abcd=', + Accept: 'application/json', + 'Intercom-Version': '1.4', + }, + params: {}, + body: { + JSON: { + company_id: 'test_company_id_wdasda', + name: 'rudderUpdate', + plan: 'basic', + size: 50, + website: 'url', + industry: 'IT', + monthly_spend: 2131231, + remote_created_at: 1683017572, + custom_attributes: { + employees: 450, + email: 'test@test.com', + key1: 'val1', + 'key2.a': 'a', + 'key2.b': 'b', + 'key3[0]': 1, + 'key3[1]': 2, + 'key3[2]': 3, + key4: null, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'anonId', + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.intercom.io/users', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer abcd=', + Accept: 'application/json', + 'Intercom-Version': '1.4', + }, + params: {}, + body: { + JSON: { + user_id: 'anonId', + email: 'testUser@test.com', + companies: [ + { + company_id: 'test_company_id_wdasda', + name: 'rudderUpdate', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: 'anonId', + }, + statusCode: 200, + }, + ], + }, + }, + }, +]; diff --git a/test/integrations/destinations/intercom/router/data.ts b/test/integrations/destinations/intercom/router/data.ts new file mode 100644 index 0000000000..74c514d082 --- /dev/null +++ b/test/integrations/destinations/intercom/router/data.ts @@ -0,0 +1,272 @@ +export const data = [ + { + name: 'intercom', + description: 'Test 0', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + message: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + channel: 'mobile', + context: { + app: { + build: '1.0', + name: 'Test_Example', + namespace: 'com.example.testapp', + version: '1.0', + }, + device: { + id: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + manufacturer: 'Apple', + model: 'iPhone', + name: 'iPod touch (7th generation)', + type: 'iOS', + }, + library: { + name: 'test-ios-library', + version: '1.0.7', + }, + locale: 'en-US', + network: { + bluetooth: false, + carrier: 'unavailable', + cellular: false, + wifi: true, + }, + os: { + name: 'iOS', + version: '14.0', + }, + screen: { + density: 2, + height: 320, + width: 568, + }, + timezone: 'Asia/Kolkata', + traits: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + name: 'Test Name', + firstName: 'Test', + lastName: 'Name', + createdAt: '2020-09-30T19:11:00.337Z', + userId: 'test_user_id_1', + email: 'test_1@test.com', + phone: '9876543210', + key1: 'value1', + }, + userAgent: 'unknown', + }, + event: 'Test Event 2', + integrations: { + All: true, + }, + messageId: '1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8', + originalTimestamp: '2020-09-30T19:11:00.337Z', + receivedAt: '2020-10-01T00:41:11.369+05:30', + request_ip: '2405:201:8005:9856:7911:25e7:5603:5e18', + sentAt: '2020-09-30T19:11:10.382Z', + timestamp: '2020-10-01T00:41:01.324+05:30', + type: 'identify', + }, + metadata: { + jobId: 1, + }, + destination: { + Config: { + apiKey: 'intercomApiKey', + appId: '9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0', + collectContext: false, + }, + }, + }, + { + message: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + channel: 'mobile', + context: { + app: { + build: '1.0', + name: 'Test_Example', + namespace: 'com.example.testapp', + version: '1.0', + }, + device: { + id: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + manufacturer: 'Apple', + model: 'iPhone', + name: 'iPod touch (7th generation)', + type: 'iOS', + }, + library: { + name: 'test-ios-library', + version: '1.0.7', + }, + locale: 'en-US', + network: { + bluetooth: false, + carrier: 'unavailable', + cellular: false, + wifi: true, + }, + os: { + name: 'iOS', + version: '14.0', + }, + screen: { + density: 2, + height: 320, + width: 568, + }, + timezone: 'Asia/Kolkata', + traits: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + firstName: 'Test', + lastName: 'Name', + createdAt: '2020-09-30T19:11:00.337Z', + email: 'test_1@test.com', + phone: '9876543210', + key1: 'value1', + }, + userAgent: 'unknown', + }, + event: 'Test Event 2', + integrations: { + All: true, + }, + messageId: '1601493060-39010c49-e6e4-4626-a75c-0dbf1925c9e8', + originalTimestamp: '2020-09-30T19:11:00.337Z', + receivedAt: '2020-10-01T00:41:11.369+05:30', + request_ip: '2405:201:8005:9856:7911:25e7:5603:5e18', + sentAt: '2020-09-30T19:11:10.382Z', + timestamp: '2020-10-01T00:41:01.324+05:30', + type: 'identify', + }, + metadata: { + jobId: 2, + }, + destination: { + Config: { + apiKey: 'intercomApiKey', + appId: '9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0', + collectContext: false, + }, + }, + }, + ], + destType: 'intercom', + }, + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.intercom.io/users', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer intercomApiKey', + Accept: 'application/json', + 'Intercom-Version': '1.4', + }, + params: {}, + body: { + JSON: { + email: 'test_1@test.com', + phone: '9876543210', + name: 'Test Name', + signed_up_at: 1601493060, + last_seen_user_agent: 'unknown', + update_last_request_at: true, + user_id: 'test_user_id_1', + custom_attributes: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + key1: 'value1', + }, + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + }, + metadata: [ + { + jobId: 1, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + apiKey: 'intercomApiKey', + appId: '9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0', + collectContext: false, + }, + }, + }, + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.intercom.io/users', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer intercomApiKey', + Accept: 'application/json', + 'Intercom-Version': '1.4', + }, + params: {}, + body: { + JSON: { + email: 'test_1@test.com', + phone: '9876543210', + signed_up_at: 1601493060, + name: 'Test Name', + last_seen_user_agent: 'unknown', + update_last_request_at: true, + custom_attributes: { + anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + key1: 'value1', + }, + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + }, + metadata: [ + { + jobId: 2, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + apiKey: 'intercomApiKey', + appId: '9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0', + collectContext: false, + }, + }, + }, + ], + }, + }, + }, + }, +]; diff --git a/test/integrations/destinations/klaviyo/network.ts b/test/integrations/destinations/klaviyo/network.ts new file mode 100644 index 0000000000..aa788a60da --- /dev/null +++ b/test/integrations/destinations/klaviyo/network.ts @@ -0,0 +1,75 @@ +export const networkCallsData = [ + { + httpReq: { + url: 'https://a.klaviyo.com/api/v2/list/XUepkK/subscribe', + method: 'GET', + }, + httpRes: { + status: 200 + }, + }, + { + httpReq: { + url: 'https://a.klaviyo.com/api/v2/list/XUepkK/members', + method: 'GET', + }, + httpRes: { + status: 200 + }, + }, + { + httpReq: { + url: 'https://a.klaviyo.com/api/profiles', + method: 'GET', + data: { + attributes: { + email: "test3@rudderstack.com" + } + } + }, + httpRes: { + status: 409, + data: { + } + }, + }, + { + httpReq: { + url: 'https://a.klaviyo.com/api/profiles', + method: 'GET', + }, + httpRes: { + status: 201, + data: { + data: { + id: '01GW3PHVY0MTCDGS0A1612HARX', + attributes: {} + }, + } + }, + }, + { + httpReq: { + url: 'https://a.klaviyo.com/api/profiles', + method: 'POST', + headers: { Authorization: 'Klaviyo-API-Key dummyPrivateApiKeyforfailure' } + }, + httpRes: { + }, + }, + { + httpReq: { + url: 'https://a.klaviyo.com/api/profiles', + method: 'POST', + }, + httpRes: { + status: 201, + data: { + data: { + id: '01GW3PHVY0MTCDGS0A1612HARX', + attributes: {} + }, + } + }, + } +]; diff --git a/test/integrations/destinations/klaviyo/processor/data.ts b/test/integrations/destinations/klaviyo/processor/data.ts new file mode 100644 index 0000000000..2025957716 --- /dev/null +++ b/test/integrations/destinations/klaviyo/processor/data.ts @@ -0,0 +1,2430 @@ +export const data = [ + { + "name": "klaviyo", + "description": "Profile updating call and subscribe user (old transformer)", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "publicApiKey": "dummyPublicApiKey", + "privateApiKey": "dummyPrivateApiKey" + } + }, + "message": { + "type": "identify", + "sentAt": "2021-01-03T17:02:53.195Z", + "userId": "user@1", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.1.11", + "namespace": "com.rudderlabs.javascript" + }, + "traits": { + "firstName": "Test", + "lastName": "Rudderlabs", + "email": "test@rudderstack.com", + "phone": "+12 345 578 900", + "userId": "user@1", + "title": "Developer", + "organization": "Rudder", + "city": "Tokyo", + "region": "Kanto", + "country": "JP", + "zip": "100-0001", + "Flagged": false, + "Residence": "Shibuya", + "properties": { + "listId": "XUepkK", + "subscribe": true, + "consent": [ + "email", + "sms" + ] + } + }, + "locale": "en-US", + "screen": { + "density": 2 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.11" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" + }, + "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", + "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", + "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", + "integrations": { + "All": true + }, + "originalTimestamp": "2021-01-03T17:02:53.193Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": + { + "version": "1", + "type": "REST", + "userId": "", + "method": "PATCH", + "endpoint": "https://a.klaviyo.com/api/profiles/01GW3PHVY0MTCDGS0A1612HARX", + "headers": { + "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", + "Content-Type": "application/json", + "Accept": "application/json", + "revision": "2023-02-22" + }, + "params": {}, + "body": { + "JSON": { + "data": { + "type": "profile", + "attributes": { + "external_id": "user@1", + "email": "test@rudderstack.com", + "first_name": "Test", + "last_name": "Rudderlabs", + "phone_number": "+12 345 578 900", + "title": "Developer", + "organization": "Rudder", + "location": { + "city": "Tokyo", + "region": "Kanto", + "country": "JP", + "zip": "100-0001" + }, + "properties": { + "Flagged": false, + "Residence": "Shibuya" + } + }, + "id": "01GW3PHVY0MTCDGS0A1612HARX" + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {} + }, + "statusCode": 200 + }, { + "output": + { + "version": "1", + "type": "REST", + "method": "POST", + "userId": "", + "endpoint": "https://a.klaviyo.com/api/profile-subscription-bulk-create-jobs", + "headers": { + "Content-Type": "application/json", + "Accept": "application/json", + "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", + "revision": "2023-02-22" + }, + "params": {}, + "body": { + "JSON": { + "data": { + "type": "profile-subscription-bulk-create-job", + "attributes": { + "list_id": "XUepkK", + "subscriptions": [ + { + "email": "test@rudderstack.com", + "phone_number": "+12 345 578 900", + "channels": { + "email": [ + "MARKETING" + ], + "sms": [ + "MARKETING" + ] + } + } + ] + } + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {} + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "klaviyo", + "description": "Identify call for with flattenProperties enabled (old transformer)", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "publicApiKey": "dummyPublicApiKey", + "privateApiKey": "dummyPrivateApiKey", + "flattenProperties": true + } + }, + "message": { + "type": "identify", + "sentAt": "2021-01-03T17:02:53.195Z", + "userId": "user@1", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.1.11", + "namespace": "com.rudderlabs.javascript" + }, + "traits": { + "firstName": "Test", + "lastName": "Rudderlabs", + "email": "test@rudderstack.com", + "phone": "+12 345 578 900", + "userId": "user@1", + "title": "Developer", + "organization": "Rudder", + "city": "Tokyo", + "region": "Kanto", + "country": "JP", + "zip": "100-0001", + "Flagged": false, + "Residence": "Shibuya", + "friend": { + "names": { + "first": "Alice", + "last": "Smith" + }, + "age": 25 + }, + "properties": { + "listId": "XUepkK", + "subscribe": true, + "consent": [ + "email", + "sms" + ] + } + }, + "locale": "en-US", + "screen": { + "density": 2 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.11" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" + }, + "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", + "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", + "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", + "integrations": { + "All": true + }, + "originalTimestamp": "2021-01-03T17:02:53.193Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": + { + "version": "1", + "type": "REST", + "userId": "", + "method": "PATCH", + "endpoint": "https://a.klaviyo.com/api/profiles/01GW3PHVY0MTCDGS0A1612HARX", + "headers": { + "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", + "Content-Type": "application/json", + "Accept": "application/json", + "revision": "2023-02-22" + }, + "params": {}, + "body": { + "JSON": { + "data": { + "type": "profile", + "attributes": { + "external_id": "user@1", + "email": "test@rudderstack.com", + "first_name": "Test", + "last_name": "Rudderlabs", + "phone_number": "+12 345 578 900", + "title": "Developer", + "organization": "Rudder", + "location": { + "city": "Tokyo", + "region": "Kanto", + "country": "JP", + "zip": "100-0001" + }, + "properties": { + "friend.age": 25, + "friend.names.first": "Alice", + "friend.names.last": "Smith", + "Flagged": false, + "Residence": "Shibuya" + } + }, + "id": "01GW3PHVY0MTCDGS0A1612HARX" + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {} + }, + "statusCode": 200 + }, + { + "output": { + "version": "1", + "type": "REST", + "userId": "", + "method": "POST", + "endpoint": "https://a.klaviyo.com/api/profile-subscription-bulk-create-jobs", + "headers": { + "Content-Type": "application/json", + "Accept": "application/json", + "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", + "revision": "2023-02-22" + }, + "params": {}, + "body": { + "JSON": { + "data": { + "type": "profile-subscription-bulk-create-job", + "attributes": { + "list_id": "XUepkK", + "subscriptions": [ + { + "email": "test@rudderstack.com", + "phone_number": "+12 345 578 900", + "channels": { + "email": [ + "MARKETING" + ], + "sms": [ + "MARKETING" + ] + } + } + ] + } + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {} + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "klaviyo", + "description": "Profile updation call and subcribe user", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "publicApiKey": "dummyPublicApiKey", + "privateApiKey": "dummyPrivateApiKeyforfailure" + } + }, + "message": { + "type": "identify", + "sentAt": "2021-01-03T17:02:53.195Z", + "userId": "user@1", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.1.11", + "namespace": "com.rudderlabs.javascript" + }, + "traits": { + "firstName": "Test", + "lastName": "Rudderlabs", + "email": "test3@rudderstack.com", + "phone": "+12 345 578 900", + "userId": "user@1", + "title": "Developer", + "organization": "Rudder", + "city": "Tokyo", + "region": "Kanto", + "country": "JP", + "zip": "100-0001", + "Flagged": false, + "Residence": "Shibuya", + "properties": { + "listId": "XUepkK", + "subscribe": true, + "consent": [ + "email", + "sms" + ] + } + }, + "locale": "en-US", + "screen": { + "density": 2 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.11" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" + }, + "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", + "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", + "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", + "integrations": { + "All": true + }, + "originalTimestamp": "2021-01-03T17:02:53.193Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "{\"message\":\"Failed to create user due to \\\"\\\"\",\"destinationResponse\":\"\\\"\\\"\"}", + "statTags": { + "destType": "KLAVIYO", + "errorCategory": "network", + "errorType": "retryable", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 500 + } + ] + } + } + }, + { + "name": "klaviyo", + "description": "Profile updation call listId is not provided for subscribing the user", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "publicApiKey": "dummyPublicApiKey", + "privateApiKey": "dummyPrivateApiKey" + } + }, + "message": { + "type": "identify", + "sentAt": "2021-01-03T17:02:53.195Z", + "userId": "user@1", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.1.11", + "namespace": "com.rudderlabs.javascript" + }, + "traits": { + "firstName": "Test", + "lastName": "Rudderlabs", + "email": "test@rudderstack.com", + "phone": "+12 345 578 900", + "userId": "user@1", + "title": "Developer", + "organization": "Rudder", + "city": "Tokyo", + "region": "Kanto", + "country": "JP", + "zip": "100-0001", + "Flagged": false, + "Residence": "Shibuya", + "properties": { + "subscribe": false, + "consent": [ + "email", + "sms" + ] + } + }, + "locale": "en-US", + "screen": { + "density": 2 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.11" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" + }, + "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", + "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", + "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", + "integrations": { + "All": true + }, + "originalTimestamp": "2021-01-03T17:02:53.193Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "PATCH", + "endpoint": "https://a.klaviyo.com/api/profiles/01GW3PHVY0MTCDGS0A1612HARX", + "headers": { + "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", + "Content-Type": "application/json", + "Accept": "application/json", + "revision": "2023-02-22" + }, + "params": {}, + "body": { + "JSON": { + "data": { + "type": "profile", + "attributes": { + "external_id": "user@1", + "email": "test@rudderstack.com", + "first_name": "Test", + "last_name": "Rudderlabs", + "phone_number": "+12 345 578 900", + "title": "Developer", + "organization": "Rudder", + "location": { + "city": "Tokyo", + "region": "Kanto", + "country": "JP", + "zip": "100-0001" + }, + "properties": { + "Flagged": false, + "Residence": "Shibuya" + } + }, + "id": "01GW3PHVY0MTCDGS0A1612HARX" + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "klaviyo", + "description": "Identify call with enforceEmailAsPrimary enabled from UI", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "publicApiKey": "dummyPublicApiKey", + "privateApiKey": "dummyPrivateApiKey", + "enforceEmailAsPrimary": true + } + }, + "message": { + "type": "identify", + "sentAt": "2021-01-03T17:02:53.195Z", + "userId": "user@1", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.1.11", + "namespace": "com.rudderlabs.javascript" + }, + "traits": { + "firstName": "Test", + "lastName": "Rudderlabs", + "email": "test@rudderstack.com", + "phone": "+12 345 578 900", + "userId": "user@1", + "title": "Developer", + "organization": "Rudder", + "city": "Tokyo", + "region": "Kanto", + "country": "JP", + "zip": "100-0001", + "Flagged": false, + "Residence": "Shibuya", + "properties": { + "listId": "XUepkK", + "subscribe": true, + "consent": [ + "email", + "sms" + ] + } + }, + "locale": "en-US", + "screen": { + "density": 2 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.11" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" + }, + "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", + "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", + "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", + "integrations": { + "All": true + }, + "originalTimestamp": "2021-01-03T17:02:53.193Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": + { + "version": "1", + "type": "REST", + "userId": "", + "method": "PATCH", + "endpoint": "https://a.klaviyo.com/api/profiles/01GW3PHVY0MTCDGS0A1612HARX", + "headers": { + "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", + "Content-Type": "application/json", + "Accept": "application/json", + "revision": "2023-02-22" + }, + "params": {}, + "body": { + "JSON": { + "data": { + "type": "profile", + "attributes": { + "email": "test@rudderstack.com", + "first_name": "Test", + "last_name": "Rudderlabs", + "phone_number": "+12 345 578 900", + "title": "Developer", + "organization": "Rudder", + "location": { + "city": "Tokyo", + "region": "Kanto", + "country": "JP", + "zip": "100-0001" + }, + "properties": { + "Flagged": false, + "Residence": "Shibuya", + "_id": "user@1" + } + }, + "id": "01GW3PHVY0MTCDGS0A1612HARX" + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {} + }, + "statusCode": 200 + }, + { + "output": { + "version": "1", + "type": "REST", + "userId": "", + "method": "POST", + "endpoint": "https://a.klaviyo.com/api/profile-subscription-bulk-create-jobs", + "headers": { + "Content-Type": "application/json", + "Accept": "application/json", + "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", + "revision": "2023-02-22" + }, + "params": {}, + "body": { + "JSON": { + "data": { + "type": "profile-subscription-bulk-create-job", + "attributes": { + "list_id": "XUepkK", + "subscriptions": [ + { + "email": "test@rudderstack.com", + "phone_number": "+12 345 578 900", + "channels": { + "email": [ + "MARKETING" + ], + "sms": [ + "MARKETING" + ] + } + } + ] + } + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {} + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "klaviyo", + "description": "Identify call without user custom Properties", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "publicApiKey": "dummyPublicApiKey", + "privateApiKey": "dummyPrivateApiKey", + "enforceEmailAsPrimary": false + } + }, + "message": { + "type": "identify", + "sentAt": "2021-01-03T17:02:53.195Z", + "userId": "user@1", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.1.11", + "namespace": "com.rudderlabs.javascript" + }, + "traits": { + "firstName": "Test", + "lastName": "Rudderlabs", + "email": "test@rudderstack.com", + "phone": "+12 345 578 900", + "userId": "user@1", + "title": "Developer", + "organization": "Rudder", + "city": "Tokyo", + "region": "Kanto", + "country": "JP", + "zip": "100-0001", + "properties": { + "listId": "XUepkK", + "subscribe": true, + "consent": [ + "email", + "sms" + ] + } + }, + "locale": "en-US", + "screen": { + "density": 2 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.11" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" + }, + "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", + "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", + "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", + "integrations": { + "All": true + }, + "originalTimestamp": "2021-01-03T17:02:53.193Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "userId": "", + "method": "PATCH", + "endpoint": "https://a.klaviyo.com/api/profiles/01GW3PHVY0MTCDGS0A1612HARX", + "headers": { + "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", + "Content-Type": "application/json", + "Accept": "application/json", + "revision": "2023-02-22" + }, + "params": {}, + "body": { + "JSON": { + "data": { + "type": "profile", + "attributes": { + "email": "test@rudderstack.com", + "first_name": "Test", + "last_name": "Rudderlabs", + "phone_number": "+12 345 578 900", + "external_id": "user@1", + "title": "Developer", + "organization": "Rudder", + "location": { + "city": "Tokyo", + "region": "Kanto", + "country": "JP", + "zip": "100-0001" + } + }, + "id": "01GW3PHVY0MTCDGS0A1612HARX" + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {} + }, + "statusCode": 200 + }, + { + "output": { + "version": "1", + "type": "REST", + "userId": "", + "method": "POST", + "endpoint": "https://a.klaviyo.com/api/profile-subscription-bulk-create-jobs", + "headers": { + "Content-Type": "application/json", + "Accept": "application/json", + "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", + "revision": "2023-02-22" + }, + "params": {}, + "body": { + "JSON": { + "data": { + "type": "profile-subscription-bulk-create-job", + "attributes": { + "list_id": "XUepkK", + "subscriptions": [ + { + "email": "test@rudderstack.com", + "phone_number": "+12 345 578 900", + "channels": { + "email": [ + "MARKETING" + ], + "sms": [ + "MARKETING" + ] + } + } + ] + } + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {} + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "klaviyo", + "description": "Identify call without email and phone & enforceEmailAsPrimary enabled from UI", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "publicApiKey": "dummyPublicApiKey", + "privateApiKey": "dummyPrivateApiKey", + "enforceEmailAsPrimary": true + } + }, + "message": { + "type": "identify", + "sentAt": "2021-01-03T17:02:53.195Z", + "userId": "user@1", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.1.11", + "namespace": "com.rudderlabs.javascript" + }, + "traits": { + "firstName": "Test", + "lastName": "Rudderlabs", + "userId": "user@1", + "title": "Developer", + "organization": "Rudder", + "city": "Tokyo", + "region": "Kanto", + "country": "JP", + "zip": "100-0001", + "Flagged": false, + "Residence": "Shibuya", + "properties": { + "listId": "XUepkK", + "subscribe": true, + "consent": [ + "email", + "sms" + ] + } + }, + "locale": "en-US", + "screen": { + "density": 2 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.11" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" + }, + "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", + "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", + "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", + "integrations": { + "All": true + }, + "originalTimestamp": "2021-01-03T17:02:53.193Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "None of email and phone are present in the payload", + "statTags": { + "destType": "KLAVIYO", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "klaviyo", + "description": "Screen event call", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "publicApiKey": "dummyPublicApiKey", + "privateApiKey": "dummyPrivateApiKey" + } + }, + "message": { + "type": "screen", + "event": "TestEven001", + "sentAt": "2021-01-25T16:12:02.048Z", + "userId": "sajal12", + "channel": "mobile", + "context": { + "os": { + "name": "Android", + "version": "10" + }, + "app": { + "name": "KlaviyoTest", + "build": "1", + "version": "1.0", + "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" + }, + "device": { + "id": "9c6bd77ea9da3e68", + "name": "raphaelin", + "type": "android", + "model": "Redmi K20 Pro", + "manufacturer": "Xiaomi" + }, + "locale": "en-IN", + "screen": { + "width": 1080, + "height": 2210, + "density": 440 + }, + "traits": { + "id": "user@1", + "age": "22", + "email": "test@rudderstack.com", + "phone": "9112340375", + "anonymousId": "9c6bd77ea9da3e68" + }, + "library": { + "name": "com.rudderstack.android.sdk.core", + "version": "1.0.2" + }, + "network": { + "wifi": true, + "carrier": "airtel", + "cellular": true, + "bluetooth": false + }, + "timezone": "Asia/Kolkata", + "userAgent": "Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)" + }, + "rudderId": "b7b24f86-f7bf-46d8-b2b4-ccafc080239c", + "messageId": "1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce", + "properties": { + "PreviouslyVicePresident": true, + "YearElected": 1801, + "VicePresidents": [ + "Aaron Burr", + "George Clinton" + ] + }, + "anonymousId": "9c6bd77ea9da3e68", + "integrations": { + "All": true + }, + "originalTimestamp": "2021-01-25T15:32:56.409Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://a.klaviyo.com/api/events", + "headers": { + "Accept": "application/json", + "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", + "Content-Type": "application/json", + "revision": "2023-02-22" + }, + "params": {}, + "body": { + "JSON": { + "data": { + "type": "event", + "attributes": { + "metric": { + "name": "TestEven001" + }, + "properties": { + "PreviouslyVicePresident": true, + "YearElected": 1801, + "VicePresidents": [ + "Aaron Burr", + "George Clinton" + ] + }, + "profile": { + "$email": "test@rudderstack.com", + "$phone_number": "9112340375", + "$id": "sajal12", + "age": "22" + } + } + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "klaviyo", + "description": "Track event call with flatten properties enabled", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "publicApiKey": "dummyPublicApiKey", + "privateApiKey": "dummyPrivateApiKey", + "flattenProperties": true + } + }, + "message": { + "type": "track", + "event": "TestEven001", + "sentAt": "2021-01-25T16:12:02.048Z", + "userId": "sajal12", + "channel": "mobile", + "context": { + "os": { + "name": "Android", + "version": "10" + }, + "app": { + "name": "KlaviyoTest", + "build": "1", + "version": "1.0", + "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" + }, + "device": { + "id": "9c6bd77ea9da3e68", + "name": "raphaelin", + "type": "android", + "model": "Redmi K20 Pro", + "manufacturer": "Xiaomi" + }, + "locale": "en-IN", + "screen": { + "width": 1080, + "height": 2210, + "density": 440 + }, + "traits": { + "id": "user@1", + "age": "22", + "email": "test@rudderstack.com", + "phone": "9112340375", + "anonymousId": "9c6bd77ea9da3e68", + "plan_details": { + "plan_type": "gold", + "duration": "3 months" + } + }, + "library": { + "name": "com.rudderstack.android.sdk.core", + "version": "1.0.2" + }, + "network": { + "wifi": true, + "carrier": "airtel", + "cellular": true, + "bluetooth": false + }, + "timezone": "Asia/Kolkata", + "userAgent": "Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)" + }, + "rudderId": "b7b24f86-f7bf-46d8-b2b4-ccafc080239c", + "messageId": "1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce", + "properties": { + "vicePresdentInfo": { + "PreviouslVicePresident": true, + "YearElected": 1801, + "VicePresidents": [ + "AaronBurr", + "GeorgeClinton" + ] + } + }, + "anonymousId": "9c6bd77ea9da3e68", + "integrations": { + "All": true + }, + "originalTimestamp": "2021-01-25T15:32:56.409Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://a.klaviyo.com/api/events", + "headers": { + "Accept": "application/json", + "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", + "Content-Type": "application/json", + "revision": "2023-02-22" + }, + "params": {}, + "body": { + "JSON": { + "data": { + "type": "event", + "attributes": { + "metric": { + "name": "TestEven001" + }, + "properties": { + "vicePresdentInfo.PreviouslVicePresident": true, + "vicePresdentInfo.VicePresidents": [ + "AaronBurr", + "GeorgeClinton" + ], + "vicePresdentInfo.YearElected": 1801 + }, + "profile": { + "$email": "test@rudderstack.com", + "$phone_number": "9112340375", + "$id": "sajal12", + "age": "22", + "plan_details.plan_type": "gold", + "plan_details.duration": "3 months" + } + } + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "klaviyo", + "description": "Track event call", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "publicApiKey": "dummyPublicApiKey", + "privateApiKey": "dummyPrivateApiKey" + } + }, + "message": { + "type": "track", + "event": "TestEven002", + "sentAt": "2021-01-25T16:12:02.048Z", + "userId": "sajal12", + "channel": "mobile", + "context": { + "os": { + "name": "Android", + "version": "10" + }, + "app": { + "name": "KlaviyoTest", + "build": "1", + "version": "1.0", + "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" + }, + "device": { + "id": "9c6bd77ea9da3e68", + "name": "raphaelin", + "type": "android", + "model": "Redmi K20 Pro", + "manufacturer": "Xiaomi" + }, + "locale": "en-IN", + "screen": { + "width": 1080, + "height": 2210, + "density": 440 + }, + "traits": { + "id": "user@1", + "age": "22", + "name": "Test", + "email": "test@rudderstack.com", + "phone": "9112340375", + "anonymousId": "9c6bd77ea9da3e68", + "description": "Sample description" + }, + "library": { + "name": "com.rudderstack.android.sdk.core", + "version": "1.0.2" + }, + "network": { + "wifi": true, + "carrier": "airtel", + "cellular": true, + "bluetooth": false + }, + "timezone": "Asia/Kolkata", + "userAgent": "Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)" + }, + "rudderId": "b7b24f86-f7bf-46d8-b2b4-ccafc080239c", + "messageId": "1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce", + "properties": { + "PreviouslyVicePresident": true, + "YearElected": 1801, + "VicePresidents": [ + "Aaron Burr", + "George Clinton" + ], + "revenue": 3000 + }, + "anonymousId": "9c6bd77ea9da3e68", + "integrations": { + "All": true + }, + "originalTimestamp": "2021-01-25T15:32:56.409Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://a.klaviyo.com/api/events", + "headers": { + "Accept": "application/json", + "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", + "Content-Type": "application/json", + "revision": "2023-02-22" + }, + "params": {}, + "body": { + "JSON": { + "data": { + "type": "event", + "attributes": { + "metric": { + "name": "TestEven002" + }, + "properties": { + "PreviouslyVicePresident": true, + "YearElected": 1801, + "VicePresidents": [ + "Aaron Burr", + "George Clinton" + ] + }, + "profile": { + "$email": "test@rudderstack.com", + "$phone_number": "9112340375", + "$id": "sajal12", + "age": "22", + "name": "Test", + "description": "Sample description" + }, + "value": 3000 + } + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "klaviyo", + "description": "Track event call, with make email or phone as primary identifier toggle on", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "publicApiKey": "dummyPublicApiKey", + "privateApiKey": "dummyPrivateApiKey", + "enforceEmailAsPrimary": true + } + }, + "message": { + "type": "track", + "event": "TestEven001", + "sentAt": "2021-01-25T16:12:02.048Z", + "userId": "sajal12", + "channel": "mobile", + "context": { + "os": { + "name": "Android", + "version": "10" + }, + "app": { + "name": "KlaviyoTest", + "build": "1", + "version": "1.0", + "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" + }, + "device": { + "id": "9c6bd77ea9da3e68", + "name": "raphaelin", + "type": "android", + "model": "Redmi K20 Pro", + "manufacturer": "Xiaomi" + }, + "locale": "en-IN", + "screen": { + "width": 1080, + "height": 2210, + "density": 440 + }, + "traits": { + "id": "user@1", + "age": "22", + "email": "test@rudderstack.com", + "phone": "9112340375", + "anonymousId": "9c6bd77ea9da3e68" + }, + "library": { + "name": "com.rudderstack.android.sdk.core", + "version": "1.0.2" + }, + "network": { + "wifi": true, + "carrier": "airtel", + "cellular": true, + "bluetooth": false + }, + "timezone": "Asia/Kolkata", + "userAgent": "Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)" + }, + "rudderId": "b7b24f86-f7bf-46d8-b2b4-ccafc080239c", + "messageId": "1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce", + "properties": { + "PreviouslyVicePresident": true, + "YearElected": 1801, + "VicePresidents": [ + "Aaron Burr", + "George Clinton" + ] + }, + "anonymousId": "9c6bd77ea9da3e68", + "integrations": { + "All": true + }, + "originalTimestamp": "2021-01-25T15:32:56.409Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://a.klaviyo.com/api/events", + "headers": { + "Accept": "application/json", + "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", + "Content-Type": "application/json", + "revision": "2023-02-22" + }, + "params": {}, + "body": { + "JSON": { + "data": { + "type": "event", + "attributes": { + "metric": { + "name": "TestEven001" + }, + "properties": { + "PreviouslyVicePresident": true, + "YearElected": 1801, + "VicePresidents": [ + "Aaron Burr", + "George Clinton" + ] + }, + "profile": { + "$email": "test@rudderstack.com", + "$phone_number": "9112340375", + "age": "22", + "_id": "sajal12" + } + } + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "klaviyo", + "description": "Track event call, without email and phone & with (make email or phone as primary identifier) toggle on", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "publicApiKey": "dummyPublicApiKey", + "privateApiKey": "dummyPrivateApiKey", + "enforceEmailAsPrimary": true + } + }, + "message": { + "type": "track", + "event": "TestEven001", + "sentAt": "2021-01-25T16:12:02.048Z", + "userId": "sajal12", + "channel": "mobile", + "context": { + "os": { + "name": "Android", + "version": "10" + }, + "app": { + "name": "KlaviyoTest", + "build": "1", + "version": "1.0", + "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" + }, + "device": { + "id": "9c6bd77ea9da3e68", + "name": "raphaelin", + "type": "android", + "model": "Redmi K20 Pro", + "manufacturer": "Xiaomi" + }, + "locale": "en-IN", + "screen": { + "width": 1080, + "height": 2210, + "density": 440 + }, + "traits": { + "id": "user@1", + "age": "22", + "anonymousId": "9c6bd77ea9da3e68" + }, + "library": { + "name": "com.rudderstack.android.sdk.core", + "version": "1.0.2" + }, + "network": { + "wifi": true, + "carrier": "airtel", + "cellular": true, + "bluetooth": false + }, + "timezone": "Asia/Kolkata", + "userAgent": "Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)" + }, + "rudderId": "b7b24f86-f7bf-46d8-b2b4-ccafc080239c", + "messageId": "1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce", + "properties": { + "PreviouslyVicePresident": true, + "YearElected": 1801, + "VicePresidents": [ + "Aaron Burr", + "George Clinton" + ] + }, + "anonymousId": "9c6bd77ea9da3e68", + "integrations": { + "All": true + }, + "originalTimestamp": "2021-01-25T15:32:56.409Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "None of email and phone are present in the payload", + "statTags": { + "destType": "KLAVIYO", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "klaviyo", + "description": "group call", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "publicApiKey": "dummyPublicApiKey", + "privateApiKey": "dummyPrivateApiKey" + } + }, + "message": { + "userId": "user123", + "type": "group", + "groupId": "XUepkK", + "traits": { + "subscribe": true + }, + "context": { + "traits": { + "email": "test@rudderstack.com", + "phone": "+12 345 678 900", + "consent": [ + "email" + ] + }, + "ip": "14.5.67.21", + "library": { + "name": "http" + } + }, + "timestamp": "2020-01-21T00:21:34.208Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { "output": { "body": { "FORM": {}, "JSON": { "data": { "attributes": { "list_id": "XUepkK", "subscriptions": [{ "email": "test@rudderstack.com", "phone_number": "+12 345 678 900" }] }, "type": "profile-subscription-bulk-create-job" } }, "JSON_ARRAY": {}, "XML": {} }, "endpoint": "https://a.klaviyo.com/api/profile-subscription-bulk-create-jobs", "files": {}, "headers": { "Accept": "application/json", "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", "Content-Type": "application/json", "revision": "2023-02-22" }, "method": "POST", "params": {}, "type": "REST", "userId": "", "version": "1" }, "statusCode": 200 } + ] + } + } + }, + { + "name": "klaviyo", + "description": "group call without groupId", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "publicApiKey": "dummyPublicApiKey", + "privateApiKey": "dummyPrivateApiKey" + } + }, + "message": { + "userId": "user123", + "type": "group", + "groupId": "", + "traits": { + "subscribe": true + }, + "context": { + "traits": { + "email": "test@rudderstack.com", + "phone": "+12 345 678 900", + "consent": "email" + }, + "ip": "14.5.67.21", + "library": { + "name": "http" + } + }, + "timestamp": "2020-01-21T00:21:34.208Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "groupId is a required field for group events", + "statTags": { + "destType": "KLAVIYO", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "klaviyo", + "description": "[Error]: Check for unsupported message type", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "publicApiKey": "dummyPublicApiKey", + "privateApiKey": "dummyPrivateApiKey" + } + }, + "message": { + "userId": "user123", + "type": "random", + "groupId": "XUepkK", + "traits": { + "subscribe": true + }, + "context": { + "traits": { + "email": "test@rudderstack.com", + "phone": "+12 345 678 900", + "consent": "email" + }, + "ip": "14.5.67.21", + "library": { + "name": "http" + } + }, + "timestamp": "2020-01-21T00:21:34.208Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Event type random is not supported", + "statTags": { + "destType": "KLAVIYO", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "klaviyo", + "description": "Track call with Ecom events (Viewed Product)", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "publicApiKey": "dummyPublicApiKey", + "privateApiKey": "dummyPrivateApiKey" + } + }, + "message": { + "type": "track", + "event": "product viewed", + "sentAt": "2021-01-25T16:12:02.048Z", + "userId": "sajal12", + "channel": "mobile", + "context": { + "os": { + "name": "Android", + "version": "10" + }, + "app": { + "name": "KlaviyoTest", + "build": "1", + "version": "1.0", + "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" + }, + "device": { + "id": "9c6bd77ea9da3e68", + "name": "raphaelin", + "type": "android", + "model": "Redmi K20 Pro", + "manufacturer": "Xiaomi" + }, + "locale": "en-IN", + "screen": { + "width": 1080, + "height": 2210, + "density": 440 + }, + "traits": { + "id": "user@1", + "age": "22", + "name": "Test", + "email": "test@rudderstack.com", + "phone": "9112340375", + "anonymousId": "9c6bd77ea9da3e68", + "description": "Sample description" + }, + "library": { + "name": "com.rudderstack.android.sdk.core", + "version": "1.0.2" + }, + "network": { + "wifi": true, + "carrier": "airtel", + "cellular": true, + "bluetooth": false + }, + "timezone": "Asia/Kolkata", + "userAgent": "Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)" + }, + "rudderId": "b7b24f86-f7bf-46d8-b2b4-ccafc080239c", + "messageId": "1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce", + "properties": { + "name": "test product", + "product_id": "1114", + "sku": "WINNIePuh12", + "image_url": "http://www.example.com/path/to/product/image.png", + "url": "http://www.example.com/path/to/product", + "brand": "Not for Kids", + "price": 9.9, + "categories": [ + "Fiction", + "Children" + ] + }, + "anonymousId": "9c6bd77ea9da3e68", + "integrations": { + "All": true + }, + "originalTimestamp": "2021-01-25T15:32:56.409Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://a.klaviyo.com/api/events", + "headers": { + "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", + "Content-Type": "application/json", + "Accept": "application/json", + "revision": "2023-02-22" + }, + "params": {}, + "body": { + "JSON": { + "data": { + "type": "event", + "attributes": { + "metric": { + "name": "Viewed Product" + }, + "profile": { + "$email": "test@rudderstack.com", + "$phone_number": "9112340375", + "$id": "sajal12", + "age": "22", + "name": "Test", + "description": "Sample description" + }, + "properties": { + "ProductName": "test product", + "ProductID": "1114", + "SKU": "WINNIePuh12", + "ImageURL": "http://www.example.com/path/to/product/image.png", + "URL": "http://www.example.com/path/to/product", + "Brand": "Not for Kids", + "Price": 9.9, + "Categories": [ + "Fiction", + "Children" + ] + } + } + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "klaviyo", + "description": "Track call with Ecom events (Checkout Started) with enabled flattenProperties", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "publicApiKey": "dummyPublicApiKey", + "privateApiKey": "dummyPrivateApiKey", + "flattenProperties": true + } + }, + "message": { + "type": "track", + "event": "checkout started", + "sentAt": "2021-01-25T16:12:02.048Z", + "userId": "sajal12", + "channel": "mobile", + "context": { + "os": { + "name": "Android", + "version": "10" + }, + "app": { + "name": "KlaviyoTest", + "build": "1", + "version": "1.0", + "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" + }, + "device": { + "id": "9c6bd77ea9da3e68", + "name": "raphaelin", + "type": "android", + "model": "Redmi K20 Pro", + "manufacturer": "Xiaomi" + }, + "locale": "en-IN", + "screen": { + "width": 1080, + "height": 2210, + "density": 440 + }, + "traits": { + "id": "user@1", + "age": "22", + "name": "Test", + "email": "test@rudderstack.com", + "phone": "9112340375", + "anonymousId": "9c6bd77ea9da3e68", + "description": "Sample description" + }, + "library": { + "name": "com.rudderstack.android.sdk.core", + "version": "1.0.2" + }, + "network": { + "wifi": true, + "carrier": "airtel", + "cellular": true, + "bluetooth": false + }, + "timezone": "Asia/Kolkata", + "userAgent": "Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)" + }, + "rudderId": "b7b24f86-f7bf-46d8-b2b4-ccafc080239c", + "messageId": "1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce", + "properties": { + "order_id": "1234", + "affiliation": "Apple Store", + "value": 20, + "revenue": 15, + "shipping": 4, + "tax": 1, + "discount": 1.5, + "coupon": "ImagePro", + "currency": "USD", + "products": [ + { + "product_id": "123", + "sku": "G-32", + "name": "Monopoly", + "price": 14, + "quantity": 1, + "category": "Games", + "url": "https://www.website.com/product/path", + "image_url": "https://www.website.com/product/path.jpg" + }, + { + "product_id": "345", + "sku": "F-32", + "name": "UNO", + "price": 3.45, + "quantity": 2, + "category": "Games" + } + ] + }, + "anonymousId": "9c6bd77ea9da3e68", + "integrations": { + "All": true + }, + "originalTimestamp": "2021-01-25T15:32:56.409Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://a.klaviyo.com/api/events", + "headers": { + "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", + "Content-Type": "application/json", + "Accept": "application/json", + "revision": "2023-02-22" + }, + "params": {}, + "body": { + "JSON": { + "data": { + "type": "event", + "attributes": { + "metric": { + "name": "Started Checkout" + }, + "properties": { + "$event_id": "1234", + "$value": 20, + "items[0].ProductID": "123", + "items[0].SKU": "G-32", + "items[0].ProductName": "Monopoly", + "items[0].Quantity": 1, + "items[0].ItemPrice": 14, + "items[0].ProductURL": "https://www.website.com/product/path", + "items[0].ImageURL": "https://www.website.com/product/path.jpg", + "items[1].ProductID": "345", + "items[1].SKU": "F-32", + "items[1].ProductName": "UNO", + "items[1].Quantity": 2, + "items[1].ItemPrice": 3.45 + }, + "profile": { + "$email": "test@rudderstack.com", + "$phone_number": "9112340375", + "$id": "sajal12", + "age": "22", + "name": "Test", + "description": "Sample description" + } + } + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "klaviyo", + "description": "Track call with Ecom events (Added to Cart) with properties.products", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "publicApiKey": "dummyPublicApiKey", + "privateApiKey": "dummyPrivateApiKey" + } + }, + "message": { + "type": "track", + "event": "product added", + "sentAt": "2021-01-25T16:12:02.048Z", + "userId": "sajal12", + "channel": "mobile", + "context": { + "os": { + "name": "Android", + "version": "10" + }, + "app": { + "name": "KlaviyoTest", + "build": "1", + "version": "1.0", + "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" + }, + "device": { + "id": "9c6bd77ea9da3e68", + "name": "raphaelin", + "type": "android", + "model": "Redmi K20 Pro", + "manufacturer": "Xiaomi" + }, + "locale": "en-IN", + "screen": { + "width": 1080, + "height": 2210, + "density": 440 + }, + "traits": { + "id": "user@1", + "age": "22", + "name": "Test", + "email": "test@rudderstack.com", + "phone": "9112340375", + "anonymousId": "9c6bd77ea9da3e68", + "description": "Sample description" + }, + "library": { + "name": "com.rudderstack.android.sdk.core", + "version": "1.0.2" + }, + "network": { + "wifi": true, + "carrier": "airtel", + "cellular": true, + "bluetooth": false + }, + "timezone": "Asia/Kolkata", + "userAgent": "Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)" + }, + "rudderId": "b7b24f86-f7bf-46d8-b2b4-ccafc080239c", + "messageId": "1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce", + "properties": { + "order_id": "1234", + "value": 12.12, + "categories": [ + "Fiction3", + "Children3" + ], + "checkout_url": "http://www.heythere.com", + "item_names": [ + "book1", + "book2" + ], + "products": [ + { + "product_id": "b1pid", + "sku": "123x", + "name": "book1", + "url": "heyther.com", + "price": 12 + }, + { + "product_id": "b2pid", + "sku": "123x", + "name": "book2", + "url": "heyther2.com", + "price": 14 + } + ] + }, + "anonymousId": "9c6bd77ea9da3e68", + "integrations": { + "All": true + }, + "originalTimestamp": "2021-01-25T15:32:56.409Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://a.klaviyo.com/api/events", + "headers": { + "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", + "Content-Type": "application/json", + "Accept": "application/json", + "revision": "2023-02-22" + }, + "params": {}, + "body": { + "JSON": { + "data": { + "type": "event", + "attributes": { + "metric": { + "name": "Added to Cart" + }, + "profile": { + "$email": "test@rudderstack.com", + "$phone_number": "9112340375", + "$id": "sajal12", + "age": "22", + "name": "Test", + "description": "Sample description" + }, + "properties": { + "$value": 12.12, + "AddedItemCategories": [ + "Fiction3", + "Children3" + ], + "ItemNames": [ + "book1", + "book2" + ], + "CheckoutURL": "http://www.heythere.com", + "items": [ + { + "ProductID": "b1pid", + "SKU": "123x", + "ProductName": "book1", + "ItemPrice": 12, + "ProductURL": "heyther.com" + }, + { + "ProductID": "b2pid", + "SKU": "123x", + "ProductName": "book2", + "ItemPrice": 14, + "ProductURL": "heyther2.com" + } + ] + } + } + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + } +] \ No newline at end of file diff --git a/test/integrations/destinations/klaviyo/router/data.ts b/test/integrations/destinations/klaviyo/router/data.ts new file mode 100644 index 0000000000..0fb735d6bf --- /dev/null +++ b/test/integrations/destinations/klaviyo/router/data.ts @@ -0,0 +1,464 @@ +export const data = [ + { + name: 'klaviyo', + description: 'Test 0', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + destination: { + Config: { + publicApiKey: 'dummyPublicApiKey', + privateApiKey: 'dummyPrivateApiKey', + }, + }, + metadata: { + jobId: 1, + }, + message: { + type: 'identify', + sentAt: '2021-01-03T17:02:53.195Z', + userId: 'test', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + traits: { + firstName: 'Test', + lastName: 'Rudderlabs', + email: 'test@rudderstack.com', + phone: '+12 345 578 900', + userId: 'Testc', + title: 'Developer', + organization: 'Rudder', + city: 'Tokyo', + region: 'Kanto', + country: 'JP', + zip: '100-0001', + Flagged: false, + Residence: 'Shibuya', + properties: { + consent: ['email', 'sms'], + }, + }, + locale: 'en-US', + screen: { + density: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + integrations: { + All: true, + }, + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + }, + { + destination: { + Config: { + publicApiKey: 'dummyPublicApiKey', + privateApiKey: 'dummyPrivateApiKey', + }, + }, + metadata: { + jobId: 2, + }, + message: { + type: 'identify', + sentAt: '2021-01-03T17:02:53.195Z', + userId: 'test', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + traits: { + firstName: 'Test', + lastName: 'Rudderlabs', + email: 'test@rudderstack.com', + phone: '+12 345 578 900', + userId: 'test', + title: 'Developer', + organization: 'Rudder', + city: 'Tokyo', + region: 'Kanto', + country: 'JP', + zip: '100-0001', + Flagged: false, + Residence: 'Shibuya', + properties: { + listId: 'XUepkK', + subscribe: true, + consent: ['email', 'sms'], + }, + }, + locale: 'en-US', + screen: { + density: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + integrations: { + All: true, + }, + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + }, + { + destination: { + Config: { + publicApiKey: 'dummyPublicApiKey', + privateApiKey: 'dummyPrivateApiKey', + }, + }, + metadata: { + jobId: 3, + }, + message: { + userId: 'user123', + type: 'group', + groupId: 'XUepkK', + traits: { + subscribe: true, + }, + context: { + traits: { + email: 'test@rudderstack.com', + phone: '+12 345 678 900', + consent: ['email'], + }, + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-01-21T00:21:34.208Z', + }, + }, + { + destination: { + Config: { + publicApiKey: 'dummyPublicApiKey', + privateApiKey: 'dummyPrivateApiKey', + }, + }, + metadata: { + jobId: 4, + }, + message: { + userId: 'user123', + type: 'random', + groupId: 'XUepkK', + traits: { + subscribe: true, + }, + context: { + traits: { + email: 'test@rudderstack.com', + phone: '+12 345 678 900', + consent: 'email', + }, + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-01-21T00:21:34.208Z', + }, + }, + { + destination: { + Config: { + publicApiKey: 'dummyPublicApiKey', + privateApiKey: 'dummyPrivateApiKey', + }, + }, + metadata: { + jobId: 5, + }, + message: { + userId: 'user123', + type: 'group', + groupId: '', + traits: { + subscribe: true, + }, + context: { + traits: { + email: 'test@rudderstack.com', + phone: '+12 345 678 900', + consent: 'email', + }, + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-01-21T00:21:34.208Z', + }, + }, + ], + destType: 'klaviyo', + }, + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: [ + { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://a.klaviyo.com/api/profile-subscription-bulk-create-jobs', + headers: { + Authorization: 'Klaviyo-API-Key dummyPrivateApiKey', + 'Content-Type': 'application/json', + Accept: 'application/json', + revision: '2023-02-22', + }, + params: {}, + body: { + JSON: { + data: { + type: 'profile-subscription-bulk-create-job', + attributes: { + list_id: 'XUepkK', + subscriptions: [ + { + email: 'test@rudderstack.com', + phone_number: '+12 345 678 900', + }, + { + email: 'test@rudderstack.com', + phone_number: '+12 345 578 900', + channels: { + email: ['MARKETING'], + sms: ['MARKETING'], + }, + }, + ], + }, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + { + version: '1', + type: 'REST', + method: 'PATCH', + endpoint: 'https://a.klaviyo.com/api/profiles/01GW3PHVY0MTCDGS0A1612HARX', + headers: { + Authorization: 'Klaviyo-API-Key dummyPrivateApiKey', + 'Content-Type': 'application/json', + Accept: 'application/json', + revision: '2023-02-22', + }, + params: {}, + body: { + JSON: { + data: { + type: 'profile', + attributes: { + external_id: 'test', + email: 'test@rudderstack.com', + first_name: 'Test', + last_name: 'Rudderlabs', + phone_number: '+12 345 578 900', + title: 'Developer', + organization: 'Rudder', + location: { + city: 'Tokyo', + region: 'Kanto', + country: 'JP', + zip: '100-0001', + }, + properties: { + Flagged: false, + Residence: 'Shibuya', + }, + }, + id: '01GW3PHVY0MTCDGS0A1612HARX', + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + ], + metadata: [ + { + jobId: 3, + }, + { + jobId: 2, + }, + ], + batched: true, + statusCode: 200, + destination: { + Config: { + publicApiKey: 'dummyPublicApiKey', + privateApiKey: 'dummyPrivateApiKey', + }, + }, + }, + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'PATCH', + endpoint: 'https://a.klaviyo.com/api/profiles/01GW3PHVY0MTCDGS0A1612HARX', + headers: { + Authorization: 'Klaviyo-API-Key dummyPrivateApiKey', + 'Content-Type': 'application/json', + Accept: 'application/json', + revision: '2023-02-22', + }, + params: {}, + body: { + JSON: { + data: { + type: 'profile', + attributes: { + external_id: 'test', + email: 'test@rudderstack.com', + first_name: 'Test', + last_name: 'Rudderlabs', + phone_number: '+12 345 578 900', + title: 'Developer', + organization: 'Rudder', + location: { + city: 'Tokyo', + region: 'Kanto', + country: 'JP', + zip: '100-0001', + }, + properties: { + Flagged: false, + Residence: 'Shibuya', + }, + }, + id: '01GW3PHVY0MTCDGS0A1612HARX', + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + metadata: [ + { + jobId: 1, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + publicApiKey: 'dummyPublicApiKey', + privateApiKey: 'dummyPrivateApiKey', + }, + }, + }, + { + metadata: [ + { + jobId: 4, + }, + ], + batched: false, + statusCode: 400, + error: 'Event type random is not supported', + statTags: { + destType: 'KLAVIYO', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'router', + implementation: 'native', + module: 'destination', + }, + destination: { + Config: { + publicApiKey: 'dummyPublicApiKey', + privateApiKey: 'dummyPrivateApiKey', + }, + }, + }, + { + metadata: [ + { + jobId: 5, + }, + ], + batched: false, + statusCode: 400, + error: 'groupId is a required field for group events', + statTags: { + destType: 'KLAVIYO', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'router', + implementation: 'native', + module: 'destination', + }, + destination: { + Config: { + publicApiKey: 'dummyPublicApiKey', + privateApiKey: 'dummyPrivateApiKey', + }, + }, + }, + ], + }, + }, + }, + }, +]; diff --git a/test/integrations/destinations/kustomer/network.ts b/test/integrations/destinations/kustomer/network.ts new file mode 100644 index 0000000000..527b47ce2f --- /dev/null +++ b/test/integrations/destinations/kustomer/network.ts @@ -0,0 +1,423 @@ +export const networkCallsData = [ + { + httpReq: { + url: 'https://api.kustomerapp.com/v1/customers/externalId=annodD', + method: 'GET', + }, + httpRes: { + data: { + data: { + type: 'customer', + id: '58210c3db0f09110006b7953', + attributes: { + name: 'AnnoD', + displayName: 'AnnoD', + displayColor: 'yellow', + displayIcon: 'flower', + externalId: 'annodD', + externalIds: [ + { + externalId: 'annodD', + verified: true, + id: null, + }, + ], + sharedExternalIds: [], + signedUpAt: null, + avatarUrl: null, + username: null, + emails: [ + { + email: 'annod@kustomer.com', + verified: true, + type: 'home', + id: null, + }, + ], + sharedEmails: [ + { + email: 'annod@kustomer.com', + verified: false, + type: 'home', + id: null, + }, + ], + phones: [], + sharedPhones: [], + socials: [], + sharedSocials: [], + urls: [], + locations: [], + activeUsers: [], + watchers: [], + recentLocation: { + updatedAt: '2016-11-07T23:22:01.746Z', + }, + locale: null, + timeZone: null, + birthdayAt: null, + gender: null, + presence: 'offline', + createdAt: '2016-11-07T23:20:29.080Z', + updatedAt: '2016-11-09T04:47:07.036Z', + modifiedAt: '2016-11-09T04:47:07.036Z', + lastSeenAt: '2016-11-07T23:23:51.582Z', + lastActivityAt: '2016-11-09T04:47:07.036Z', + lastCustomerActivityAt: '2016-11-07T23:23:51.582Z', + lastMessageIn: { + sentAt: '2016-11-07T23:22:02.281Z', + sentiment: null, + }, + lastConversation: { + id: '58210c99b0f09110006b7969', + sentiment: { + confidence: 0.649023, + polarity: 1, + }, + tags: [], + }, + conversationCounts: { + all: 3, + snoozed: 0, + open: 2, + done: 1, + }, + preview: { + previewAt: '2016-11-07T23:23:26.039Z', + type: 'message_out', + text: 'dfsd fsdsfdsfdsf', + subject: 'Hi, do you guys have an XXL hoodie', + }, + tags: [], + sentiment: { + polarity: 1, + confidence: 0.649023, + }, + progressiveStatus: 'open', + verified: true, + rev: 37, + }, + relationships: { + org: { + links: { + self: '/v1/orgs/57f29863a1dbf61100e6aa92', + }, + data: { + type: 'org', + id: '57f29863a1dbf61100e6aa92', + }, + }, + messages: { + links: { + self: '/v1/customers/58210c3db0f09110006b7953/messages', + }, + }, + modifiedBy: { + links: { + self: '/v1/users/58190b991f2932100010d683', + }, + data: { + type: 'user', + id: '58190b991f2932100010d683', + }, + }, + }, + links: { + self: '/v1/customers/58210c3db0f09110006b7953', + }, + }, + }, + status: 200, + }, + }, + { + httpReq: { + url: 'https://api.kustomerapp.com/v1/customers/externalId=58210c3db0f09110006b7953', + method: 'GET', + }, + httpRes: { + data: { + data: { + type: 'customer', + id: '58210c3db0f09110006b7953', + attributes: { + name: 'AnnoD', + displayName: 'AnnoD', + displayColor: 'yellow', + displayIcon: 'flower', + externalId: 'annodD', + externalIds: [ + { + externalId: 'annodD', + verified: true, + id: null, + }, + ], + sharedExternalIds: [], + signedUpAt: null, + avatarUrl: null, + username: null, + emails: [ + { + email: 'annod@kustomer.com', + verified: true, + type: 'home', + id: null, + }, + ], + sharedEmails: [ + { + email: 'annod@kustomer.com', + verified: false, + type: 'home', + id: null, + }, + ], + phones: [], + sharedPhones: [], + socials: [], + sharedSocials: [], + urls: [], + locations: [], + activeUsers: [], + watchers: [], + recentLocation: { + updatedAt: '2016-11-07T23:22:01.746Z', + }, + locale: null, + timeZone: null, + birthdayAt: null, + gender: null, + presence: 'offline', + createdAt: '2016-11-07T23:20:29.080Z', + updatedAt: '2016-11-09T04:47:07.036Z', + modifiedAt: '2016-11-09T04:47:07.036Z', + lastSeenAt: '2016-11-07T23:23:51.582Z', + lastActivityAt: '2016-11-09T04:47:07.036Z', + lastCustomerActivityAt: '2016-11-07T23:23:51.582Z', + lastMessageIn: { + sentAt: '2016-11-07T23:22:02.281Z', + sentiment: null, + }, + lastConversation: { + id: '58210c99b0f09110006b7969', + sentiment: { + confidence: 0.649023, + polarity: 1, + }, + tags: [], + }, + conversationCounts: { + all: 3, + snoozed: 0, + open: 2, + done: 1, + }, + preview: { + previewAt: '2016-11-07T23:23:26.039Z', + type: 'message_out', + text: 'dfsd fsdsfdsfdsf', + subject: 'Hi, do you guys have an XXL hoodie', + }, + tags: [], + sentiment: { + polarity: 1, + confidence: 0.649023, + }, + progressiveStatus: 'open', + verified: true, + rev: 37, + }, + relationships: { + org: { + links: { + self: '/v1/orgs/57f29863a1dbf61100e6aa92', + }, + data: { + type: 'org', + id: '57f29863a1dbf61100e6aa92', + }, + }, + messages: { + links: { + self: '/v1/customers/58210c3db0f09110006b7953/messages', + }, + }, + modifiedBy: { + links: { + self: '/v1/users/58190b991f2932100010d683', + }, + data: { + type: 'user', + id: '58190b991f2932100010d683', + }, + }, + }, + links: { + self: '/v1/customers/58210c3db0f09110006b7953', + }, + }, + }, + status: 200, + }, + }, + { + httpReq: { + url: 'https://api.prod2.kustomerapp.com/v1/customers/externalId=58210c3db0f09110006b7953', + method: 'GET', + }, + httpRes: { + data: { + data: { + type: 'customer', + id: '58210c3db0f09110006b7953', + attributes: { + name: 'AnnoD', + displayName: 'AnnoD', + displayColor: 'yellow', + displayIcon: 'flower', + externalId: 'annodD', + externalIds: [ + { + externalId: 'annodD', + verified: true, + id: null, + }, + ], + sharedExternalIds: [], + signedUpAt: null, + avatarUrl: null, + username: null, + emails: [ + { + email: 'annod@kustomer.com', + verified: true, + type: 'home', + id: null, + }, + ], + sharedEmails: [ + { + email: 'annod@kustomer.com', + verified: false, + type: 'home', + id: null, + }, + ], + phones: [], + sharedPhones: [], + socials: [], + sharedSocials: [], + urls: [], + locations: [], + activeUsers: [], + watchers: [], + recentLocation: { + updatedAt: '2016-11-07T23:22:01.746Z', + }, + locale: null, + timeZone: null, + birthdayAt: null, + gender: null, + presence: 'offline', + createdAt: '2016-11-07T23:20:29.080Z', + updatedAt: '2016-11-09T04:47:07.036Z', + modifiedAt: '2016-11-09T04:47:07.036Z', + lastSeenAt: '2016-11-07T23:23:51.582Z', + lastActivityAt: '2016-11-09T04:47:07.036Z', + lastCustomerActivityAt: '2016-11-07T23:23:51.582Z', + lastMessageIn: { + sentAt: '2016-11-07T23:22:02.281Z', + sentiment: null, + }, + lastConversation: { + id: '58210c99b0f09110006b7969', + sentiment: { + confidence: 0.649023, + polarity: 1, + }, + tags: [], + }, + conversationCounts: { + all: 3, + snoozed: 0, + open: 2, + done: 1, + }, + preview: { + previewAt: '2016-11-07T23:23:26.039Z', + type: 'message_out', + text: 'dfsd fsdsfdsfdsf', + subject: 'Hi, do you guys have an XXL hoodie', + }, + tags: [], + sentiment: { + polarity: 1, + confidence: 0.649023, + }, + progressiveStatus: 'open', + verified: true, + rev: 37, + }, + relationships: { + org: { + links: { + self: '/v1/orgs/57f29863a1dbf61100e6aa92', + }, + data: { + type: 'org', + id: '57f29863a1dbf61100e6aa92', + }, + }, + messages: { + links: { + self: '/v1/customers/58210c3db0f09110006b7953/messages', + }, + }, + modifiedBy: { + links: { + self: '/v1/users/58190b991f2932100010d683', + }, + data: { + type: 'user', + id: '58190b991f2932100010d683', + }, + }, + }, + links: { + self: '/v1/customers/58210c3db0f09110006b7953', + }, + }, + }, + status: 204, + }, + }, + { + httpReq: { + url: 'https://api.kustomerapp.com/v1/customers/externalId=Testc', + method: 'GET', + }, + httpRes: { error: 'Request failed', status: 404 }, + }, + { + httpReq: { + url: 'https://api.kustomerapp.com/v1/customers/email=test@rudderstack.com', + method: 'GET', + }, + httpRes: { error: 'Request failed', status: 404 }, + }, + { + httpReq: { + url: 'https://api.kustomerapp.com/v1/customers/externalId=97c46c81-3140-456d-b2a9-690d70aaca35', + method: 'GET', + }, + httpRes: { error: 'Request failed', status: 404 }, + }, + { + httpReq: { + url: 'https://api.kustomerapp.com/v1/customers/externalId=testc', + method: 'GET', + }, + httpRes: { error: 'Request failed', status: 404 }, + }, +]; diff --git a/test/integrations/destinations/kustomer/processor/data.ts b/test/integrations/destinations/kustomer/processor/data.ts new file mode 100644 index 0000000000..ba8407baaf --- /dev/null +++ b/test/integrations/destinations/kustomer/processor/data.ts @@ -0,0 +1,1901 @@ +export const data = [ + { + name: 'kustomer', + description: 'Test 0', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'dummyApiKey', + }, + }, + message: { + type: 'identify', + sentAt: '2021-01-03T17:02:53.195Z', + userId: 'Testc', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + traits: { + name: 'Test Rudderlabs', + email: 'test@rudderstack.com', + phone: '+12345578900', + birthday: '2005-01-01T23:28:56.782Z', + userId: 'Testc', + address: { + street: '24 Dovers Lane', + city: 'Miami', + state: 'Florida', + postalCode: '1890001', + }, + userName: 'Testc47', + company: 'Rudderstack', + createdAt: '2015-04-17T12:37:42.146Z', + lastActivityAt: '2016-04-17T12:37:42.146Z', + lastCustomerActivityAt: '2017-04-17T12:37:42.146Z', + lastSeenAt: '2017-04-17T12:37:42.146Z', + avatar: 'https://homepages.cae.wisc.edu/~ece533/images/boat.png', + gender: 'm', + tags: ['happy', 'satisfied'], + website: 'www.mattertoast873.com', + socials: [ + { + verified: true, + userid: '100', + type: 'twitter', + username: '@Testc', + url: 'http://twitter.com/Testc', + }, + { + verified: false, + userid: '200', + type: 'facebook', + username: 'Testc', + url: 'http://facebook.com/Testc', + }, + ], + }, + locale: 'en-US', + screen: { + density: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + integrations: { + All: true, + }, + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.kustomerapp.com/v1/customers', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + name: 'Test Rudderlabs', + externalId: 'Testc', + username: 'Testc47', + company: 'Rudderstack', + signedUpAt: '2015-04-17T12:37:42.146Z', + lastActivityAt: '2016-04-17T12:37:42.146Z', + lastCustomerActivityAt: '2017-04-17T12:37:42.146Z', + lastSeenAt: '2017-04-17T12:37:42.146Z', + avatarUrl: 'https://homepages.cae.wisc.edu/~ece533/images/boat.png', + gender: 'm', + tags: ['happy', 'satisfied'], + locale: 'en-US', + socials: [ + { + verified: true, + userid: '100', + type: 'twitter', + username: '@Testc', + url: 'http://twitter.com/Testc', + }, + { + verified: false, + userid: '200', + type: 'facebook', + username: 'Testc', + url: 'http://facebook.com/Testc', + }, + ], + birthdayAt: '2005-01-01T23:28:56.782Z', + emails: [ + { + type: 'home', + email: 'test@rudderstack.com', + }, + ], + phones: [ + { + type: 'home', + phone: '+12345578900', + }, + ], + urls: [ + { + url: 'www.mattertoast873.com', + }, + ], + locations: [ + { + type: 'home', + address: '24 Dovers Lane Miami Florida 1890001', + }, + ], + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'kustomer', + description: 'Test 1', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'dummyApiKey', + }, + }, + message: { + type: 'identify', + sentAt: '2021-01-03T17:02:53.195Z', + channel: 'web', + userId: '58210c3db0f09110006b7953', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + traits: { + name: 'Ano Domeni', + phone: '+12345578000', + birthday: '2005-01-01T23:28:56.782Z', + }, + locale: 'en-US', + screen: { + density: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + integrations: { + All: true, + }, + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'PUT', + endpoint: + 'https://api.kustomerapp.com/v1/customers/58210c3db0f09110006b7953?replace=false', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + name: 'Ano Domeni', + externalId: '58210c3db0f09110006b7953', + locale: 'en-US', + birthdayAt: '2005-01-01T23:28:56.782Z', + phones: [ + { + type: 'home', + phone: '+12345578000', + }, + ], + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'kustomer', + description: 'Test 2', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'dummyApiKey', + }, + }, + message: { + type: 'screen', + event: 'Test-Event-Screen', + sentAt: '2021-01-25T16:12:02.048Z', + userId: 'Testc', + channel: 'mobile', + context: { + os: { + name: 'Android', + version: '10', + }, + app: { + name: 'KlaviyoTest', + build: '1', + version: '1.0', + namespace: 'com.rudderstack.android.rudderstack.sampleAndroidApp', + }, + device: { + id: '9c6bd77ea9da3e68', + name: 'raphaelin', + type: 'android', + model: 'Redmi K20 Pro', + manufacturer: 'Xiaomi', + }, + locale: 'en-IN', + screen: { + width: 1080, + height: 2210, + density: 440, + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.2', + }, + network: { + wifi: true, + carrier: 'airtel', + cellular: true, + bluetooth: false, + }, + timezone: 'Asia/Kolkata', + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)', + }, + rudderId: 'b7b24f86-f7bf-46d8-b2b4-ccafc080239c', + messageId: '1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce', + properties: { + hasAccount: 'true', + YearSelectedNum: 1801, + originalServing: '2021-01-25T15:32:56.409Z', + }, + anonymousId: '9c6bd77ea9da3e68', + integrations: { + All: true, + }, + originalTimestamp: '2021-01-25T15:32:56.409Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.kustomerapp.com/v1/tracking/identityEvent', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + identity: { + externalId: 'Testc', + }, + event: { + name: 'Screen-Viewed-Test-Event-Screen', + meta: { + hasAccount: 'true', + YearSelectedNum: 1801, + originalServing: '2021-01-25T15:32:56.409Z', + }, + }, + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'kustomer', + description: 'Test 3', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'dummyApiKey', + }, + }, + message: { + name: 'Cart-Viewed', + type: 'page', + sentAt: '2021-01-03T17:02:53.197Z', + userId: 'user@doe', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + page: { + url: 'http://morkey.in', + path: '/cart', + title: 'miphone', + search: 'MI', + referrer: 'morkey', + }, + locale: 'en-US', + screen: { + density: 2, + }, + traits: { + userId: 'userid', + profession: 'Student', + anonymousId: 'd80b66d5-b33d-412d-866f-r4fft5841af', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + category: 'Cart', + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '15129730-eb00-4db7-8db2-799566ccb2ef', + properties: { + url: 'http://morkey.in', + name: 'Cart Viewed', + path: '/cart', + title: 'miphone', + search: 'MI', + category: 'Cart', + referrer: 'morkey', + domain: 'morkey.com', + }, + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + integrations: { + All: true, + }, + originalTimestamp: '2021-01-03T17:02:53.195Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.kustomerapp.com/v1/tracking/identityEvent', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + identity: { + externalId: 'user@doe', + }, + event: { + name: 'Web-Page-Viewed-Cart-Viewed', + meta: { + url: 'http://morkey.in', + name: 'Cart Viewed', + path: '/cart', + title: 'miphone', + search: 'MI', + category: 'Cart', + referrer: 'morkey', + domain: 'morkey.com', + }, + }, + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'kustomer', + description: 'Test 4', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'dummyApiKey', + }, + }, + message: { + type: 'page', + sentAt: '2021-01-03T17:02:53.197Z', + userId: 'user@doe', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + page: { + url: 'http://morkey.in', + path: '/cart', + title: 'miphone', + search: 'MI', + referrer: 'morkey', + }, + locale: 'en-US', + screen: { + density: 2, + }, + traits: { + userId: 'userid', + profession: 'Student', + anonymousId: 'd80b66d5-b33d-412d-866f-r4fft5841af', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + category: 'Cart', + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '15129730-eb00-4db7-8db2-799566ccb2ef', + properties: { + url: 'http://morkey.in', + path: '/cart', + title: 'miphone', + search: 'MI', + category: 'Cart', + referrer: 'morkey', + domain: 'morkey.com', + kustomerTrackingId: '829131sjad', + kustomerSessionId: 'hsad522', + }, + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + integrations: { + All: true, + }, + originalTimestamp: '2021-01-03T17:02:53.195Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.kustomerapp.com/v1/tracking/identityEvent', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + identity: { + externalId: 'user@doe', + }, + event: { + name: 'Web-Page-Viewed', + sessionId: 'hsad522', + trackingId: '829131sjad', + meta: { + url: 'http://morkey.in', + path: '/cart', + title: 'miphone', + search: 'MI', + category: 'Cart', + referrer: 'morkey', + domain: 'morkey.com', + }, + }, + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'kustomer', + description: 'Test 5', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'dummyApiKey', + }, + }, + message: { + type: 'track', + event: 'Tracking-Weekender', + sentAt: '2021-01-03T17:02:53.197Z', + userId: 'user@doe', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + page: { + url: 'http://morkey.in', + path: '/cart', + title: 'miphone', + search: 'MI', + referrer: 'morkey', + }, + locale: 'en-US', + screen: { + density: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '15129730-eb00-4db7-8db2-799566ccb2ef', + properties: { + YearServicedNum: 211, + region: 'strapis', + kustomerTrackingId: 'sahetwiac', + kustomerSessionId: '63nsa22', + }, + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + locale: 'en-US', + integrations: { + All: true, + }, + originalTimestamp: '2021-01-03T17:02:53.195Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.kustomerapp.com/v1/tracking/identityEvent', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + identity: { + externalId: 'user@doe', + }, + event: { + name: 'Tracking-Weekender', + sessionId: '63nsa22', + trackingId: 'sahetwiac', + meta: { + YearServicedNum: 211, + region: 'strapis', + }, + }, + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'kustomer', + description: 'Test 6', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'dummyApiKey', + }, + }, + message: { + type: 'track', + event: 'Tracking-Weekender2', + sentAt: '2021-01-03T17:02:53.197Z', + userId: 'user@doe', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + page: { + url: 'http://morkey.in', + path: '/cart', + title: 'miphone', + search: 'MI', + referrer: 'morkey', + }, + screen: { + density: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '15129730-eb00-4db7-8db2-799566ccb2ef', + properties: { + YearServicedNum: 211, + 'reg_8-821x': false, + kustomer_tracking_id: 'sahetwiac', + kustomer_session_id: '63nsa22', + }, + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + integrations: { + All: true, + }, + locale: 'en-US', + originalTimestamp: '2021-01-03T17:02:53.195Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.kustomerapp.com/v1/tracking/identityEvent', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + FORM: {}, + JSON: { + event: { + meta: { + YearServicedNum: 211, + 'reg_8-821x': false, + }, + name: 'Tracking-Weekender2', + sessionId: '63nsa22', + trackingId: 'sahetwiac', + }, + identity: { + externalId: 'user@doe', + }, + }, + XML: {}, + JSON_ARRAY: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'kustomer', + description: 'Test 7', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'dummyApiKey', + genericPage: true, + }, + }, + message: { + type: 'page', + name: 'Unfinished page', + sentAt: '2021-01-03T17:02:53.197Z', + userId: 'user@doe', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + page: { + url: 'http://morkey.in', + path: '/cart', + title: 'miphone', + search: 'MI', + referrer: 'morkey', + }, + screen: { + density: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '15129730-eb00-4db7-8db2-799566ccb2ef', + properties: { + url: 'http://morkey.in', + path: '/cart', + title: 'miphone', + search: 'MI', + category: 'Cart', + referrer: 'morkey', + domain: 'morkey.com', + }, + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + integrations: { + All: true, + }, + locale: 'en-US', + originalTimestamp: '2021-01-03T17:02:53.195Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.kustomerapp.com/v1/tracking/identityEvent', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + identity: { + externalId: 'user@doe', + }, + event: { + name: 'Web-Page-Viewed', + meta: { + url: 'http://morkey.in', + path: '/cart', + title: 'miphone', + search: 'MI', + category: 'Cart', + referrer: 'morkey', + domain: 'morkey.com', + }, + }, + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'kustomer', + description: 'Test 8', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'dummyApiKey', + genericScreen: true, + }, + }, + message: { + type: 'screen', + event: 'Test-Event-Screen', + sentAt: '2021-01-25T16:12:02.048Z', + userId: 'Testc', + channel: 'mobile', + context: { + os: { + name: 'Android', + version: '10', + }, + app: { + name: 'KlaviyoTest', + build: '1', + version: '1.0', + namespace: 'com.rudderstack.android.rudderstack.sampleAndroidApp', + }, + device: { + id: '9c6bd77ea9da3e68', + name: 'raphaelin', + type: 'android', + model: 'Redmi K20 Pro', + manufacturer: 'Xiaomi', + }, + locale: 'en-IN', + screen: { + width: 1080, + height: 2210, + density: 440, + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.2', + }, + network: { + wifi: true, + carrier: 'airtel', + cellular: true, + bluetooth: false, + }, + timezone: 'Asia/Kolkata', + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)', + }, + rudderId: 'b7b24f86-f7bf-46d8-b2b4-ccafc080239c', + messageId: '1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce', + properties: { + hasAccount: 'true', + YearSelectedNum: 1801, + originalServing: '2021-01-25T15:32:56.409Z', + }, + anonymousId: '9c6bd77ea9da3e68', + integrations: { + All: true, + }, + originalTimestamp: '2021-01-25T15:32:56.409Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.kustomerapp.com/v1/tracking/identityEvent', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + identity: { + externalId: 'Testc', + }, + event: { + name: 'Screen-Viewed', + meta: { + hasAccount: 'true', + YearSelectedNum: 1801, + originalServing: '2021-01-25T15:32:56.409Z', + }, + }, + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'kustomer', + description: 'Test 9', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'dummyApiKey', + }, + }, + message: { + type: 'identify', + sentAt: '2021-01-03T17:02:53.195Z', + userId: 'Testc', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + traits: { + firstName: 'Test', + lastName: 'Rudderlabs', + email: 'test@rudderstack.com', + phone: '+12345578900', + birthday: '2005-01-01T23:28:56.782Z', + userId: 'Testc', + address: { + street: '24 Dovers Lane', + city: 'Miami', + state: 'Florida', + postalCode: '1890001', + }, + userName: 'Testc47', + company: 'Rudderstack', + createdAt: '2015-04-17T12:37:42.146Z', + lastActivityAt: '2016-04-17T12:37:42.146Z', + lastCustomerActivityAt: '2017-04-17T12:37:42.146Z', + lastSeenAt: '2017-04-17T12:37:42.146Z', + avatar: 'https://homepages.cae.wisc.edu/~ece533/images/boat.png', + gender: 'm', + tags: ['happy', 'satisfied'], + website: 'www.mattertoast873.com', + socials: [ + { + verified: true, + userid: '100', + type: 'twitter', + username: '@Testc', + url: 'http://twitter.com/Testc', + }, + { + verified: false, + userid: '200', + type: 'facebook', + username: 'Testc', + url: 'http://facebook.com/Testc', + }, + ], + }, + locale: 'en-US', + screen: { + density: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + integrations: { + All: true, + }, + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.kustomerapp.com/v1/customers', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + name: 'Test Rudderlabs', + externalId: 'Testc', + username: 'Testc47', + company: 'Rudderstack', + signedUpAt: '2015-04-17T12:37:42.146Z', + lastActivityAt: '2016-04-17T12:37:42.146Z', + lastCustomerActivityAt: '2017-04-17T12:37:42.146Z', + lastSeenAt: '2017-04-17T12:37:42.146Z', + avatarUrl: 'https://homepages.cae.wisc.edu/~ece533/images/boat.png', + gender: 'm', + tags: ['happy', 'satisfied'], + locale: 'en-US', + socials: [ + { + verified: true, + userid: '100', + type: 'twitter', + username: '@Testc', + url: 'http://twitter.com/Testc', + }, + { + verified: false, + userid: '200', + type: 'facebook', + username: 'Testc', + url: 'http://facebook.com/Testc', + }, + ], + birthdayAt: '2005-01-01T23:28:56.782Z', + emails: [ + { + type: 'home', + email: 'test@rudderstack.com', + }, + ], + phones: [ + { + type: 'home', + phone: '+12345578900', + }, + ], + urls: [ + { + url: 'www.mattertoast873.com', + }, + ], + locations: [ + { + type: 'home', + address: '24 Dovers Lane Miami Florida 1890001', + }, + ], + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'kustomer', + description: 'Test 10', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'dummyApiKey', + }, + }, + message: { + type: 'identify', + sentAt: '2021-01-03T17:02:53.195Z', + userId: 'Testc', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + traits: { + firstName: 'Test', + lastName: 'Rudderlabs', + emails: [ + { + type: 'home', + email: 'test@rudderstack.com', + }, + ], + phones: [ + { + type: 'home', + phone: '+12345578900', + }, + ], + birthday: '2005-01-01T23:28:56.782Z', + userId: 'Testc', + address: 'test address string', + userName: 'Testc47', + company: 'Rudderstack', + createdAt: '2015-04-17T12:37:42.146Z', + lastActivityAt: '2016-04-17T12:37:42.146Z', + lastCustomerActivityAt: '2017-04-17T12:37:42.146Z', + lastSeenAt: '2017-04-17T12:37:42.146Z', + avatar: 'https://homepages.cae.wisc.edu/~ece533/images/boat.png', + gender: 'm', + tags: ['happy', 'satisfied'], + website: 'www.mattertoast873.com', + socials: [ + { + verified: true, + userid: '100', + type: 'twitter', + username: '@Testc', + url: 'http://twitter.com/Testc', + }, + { + verified: false, + userid: '200', + type: 'facebook', + username: 'Testc', + url: 'http://facebook.com/Testc', + }, + ], + }, + locale: 'en-US', + screen: { + density: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + integrations: { + All: true, + }, + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.kustomerapp.com/v1/customers', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + name: 'Test Rudderlabs', + externalId: 'Testc', + username: 'Testc47', + company: 'Rudderstack', + signedUpAt: '2015-04-17T12:37:42.146Z', + lastActivityAt: '2016-04-17T12:37:42.146Z', + lastCustomerActivityAt: '2017-04-17T12:37:42.146Z', + lastSeenAt: '2017-04-17T12:37:42.146Z', + avatarUrl: 'https://homepages.cae.wisc.edu/~ece533/images/boat.png', + gender: 'm', + tags: ['happy', 'satisfied'], + locale: 'en-US', + socials: [ + { + verified: true, + userid: '100', + type: 'twitter', + username: '@Testc', + url: 'http://twitter.com/Testc', + }, + { + verified: false, + userid: '200', + type: 'facebook', + username: 'Testc', + url: 'http://facebook.com/Testc', + }, + ], + birthdayAt: '2005-01-01T23:28:56.782Z', + emails: [ + { + type: 'home', + email: 'test@rudderstack.com', + }, + ], + phones: [ + { + type: 'home', + phone: '+12345578900', + }, + ], + urls: [ + { + url: 'www.mattertoast873.com', + }, + ], + locations: [ + { + type: 'home', + address: 'test address string', + }, + ], + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'kustomer', + description: 'Test 11', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'dummyApiKey', + }, + }, + message: { + type: 'identify', + sentAt: '2021-01-03T17:02:53.195Z', + userId: 'Testc', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + traits: { + firstName: 'Test', + lastName: 'Rudderlabs', + emails: [ + { + type: 'home', + email: 'test@rudderstack.com', + }, + ], + phones: [ + { + type: 'home', + phone: '+12345578900', + }, + ], + birthday: '2005-01-01T23:28:56.782Z', + userId: 'Testc', + address: 'test address string', + userName: 'Testc47', + company: 'Rudderstack', + createdAt: '2015-04-17T12:37:42.146Z', + lastActivityAt: '2016-04-17T12:37:42.146Z', + lastCustomerActivityAt: '2017-04-17T12:37:42.146Z', + lastSeenAt: '2017-04-17T12:37:42.146Z', + avatar: 'https://homepages.cae.wisc.edu/~ece533/images/boat.png', + gender: 'm', + tags: ['happy', 'satisfied'], + website: 'www.mattertoast873.com', + socials: [ + { + verified: true, + userid: '100', + type: 'twitter', + username: '@Testc', + url: 'http://twitter.com/Testc', + }, + { + verified: false, + userid: '200', + type: 'facebook', + username: 'Testc', + url: 'http://facebook.com/Testc', + }, + ], + }, + locale: 'en-US', + screen: { + density: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + externalId: [ + { + type: 'kustomerId', + id: 'abcd1234', + }, + ], + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + integrations: { + All: true, + }, + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'PUT', + endpoint: 'https://api.kustomerapp.com/v1/customers/abcd1234?replace=false', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + name: 'Test Rudderlabs', + externalId: 'Testc', + username: 'Testc47', + company: 'Rudderstack', + signedUpAt: '2015-04-17T12:37:42.146Z', + lastActivityAt: '2016-04-17T12:37:42.146Z', + lastCustomerActivityAt: '2017-04-17T12:37:42.146Z', + lastSeenAt: '2017-04-17T12:37:42.146Z', + avatarUrl: 'https://homepages.cae.wisc.edu/~ece533/images/boat.png', + gender: 'm', + tags: ['happy', 'satisfied'], + locale: 'en-US', + socials: [ + { + verified: true, + userid: '100', + type: 'twitter', + username: '@Testc', + url: 'http://twitter.com/Testc', + }, + { + verified: false, + userid: '200', + type: 'facebook', + username: 'Testc', + url: 'http://facebook.com/Testc', + }, + ], + birthdayAt: '2005-01-01T23:28:56.782Z', + emails: [ + { + type: 'home', + email: 'test@rudderstack.com', + }, + ], + phones: [ + { + type: 'home', + phone: '+12345578900', + }, + ], + urls: [ + { + url: 'www.mattertoast873.com', + }, + ], + locations: [ + { + type: 'home', + address: 'test address string', + }, + ], + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'kustomer', + description: 'Test 12', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'dummyApiKey', + genericScreen: true, + }, + }, + message: { + type: 'screen', + event: 'Test-Event-Screen', + userId: 'utsabc', + channel: 'mobile', + context: { + os: { + name: 'Android', + version: '10', + }, + app: { + name: 'KlaviyoTest', + build: '1', + version: '1.0', + namespace: 'com.rudderstack.android.rudderstack.sampleAndroidApp', + }, + device: { + id: '9c6bd77ea9da3e68', + name: 'raphaelin', + type: 'android', + model: 'Redmi K20 Pro', + manufacturer: 'Xiaomi', + }, + locale: 'en-IN', + screen: { + width: 1080, + height: 2210, + density: 440, + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.2', + }, + network: { + wifi: true, + carrier: 'airtel', + cellular: true, + bluetooth: false, + }, + timezone: 'Asia/Kolkata', + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)', + sessionId: 'hsad522', + }, + rudderId: 'b7b24f86-f7bf-46d8-b2b4-ccafc080239c', + messageId: '1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce', + properties: { + hasAccount: 'true', + YearSelectedNum: 1801, + }, + anonymousId: '9c6bd77ea9da3e68', + integrations: { + All: true, + }, + originalTimestamp: '2023-01-10T15:32:56.409Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.kustomerapp.com/v1/tracking/identityEvent', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + identity: { + externalId: 'utsabc', + }, + event: { + name: 'Screen-Viewed', + sessionId: 'hsad522', + meta: { + hasAccount: 'true', + YearSelectedNum: 1801, + }, + }, + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'kustomer', + description: 'Test 13', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'dummyApiKey', + baseEndpoint: 'https://api.prod2.kustomerapp.com', + genericScreen: true, + }, + }, + message: { + type: 'screen', + event: 'Test-Event-Screen', + userId: 'Testc', + channel: 'mobile', + context: { + os: { + name: 'Android', + version: '10', + }, + app: { + name: 'KlaviyoTest', + build: '1', + version: '1.0', + namespace: 'com.rudderstack.android.rudderstack.sampleAndroidApp', + }, + device: { + id: '9c6bd77ea9da3e68', + name: 'raphaelin', + type: 'android', + model: 'Redmi K20 Pro', + manufacturer: 'Xiaomi', + }, + locale: 'en-IN', + screen: { + width: 1080, + height: 2210, + density: 440, + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.2', + }, + network: { + wifi: true, + carrier: 'airtel', + cellular: true, + bluetooth: false, + }, + timezone: 'Asia/Kolkata', + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)', + sessionId: 'hsad522', + }, + rudderId: 'b7b24f86-f7bf-46d8-b2b4-ccafc080239c', + messageId: '1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce', + properties: { + hasAccount: 'true', + YearSelectedNum: 1801, + }, + anonymousId: '9c6bd77ea9da3e68', + integrations: { + All: true, + }, + originalTimestamp: '2023-01-10T15:32:56.409Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.prod2.kustomerapp.com/v1/tracking/identityEvent', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + identity: { + externalId: 'Testc', + }, + event: { + name: 'Screen-Viewed', + sessionId: 'hsad522', + meta: { + hasAccount: 'true', + YearSelectedNum: 1801, + }, + }, + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, +]; diff --git a/test/integrations/destinations/kustomer/router/data.ts b/test/integrations/destinations/kustomer/router/data.ts new file mode 100644 index 0000000000..6dae5d5e76 --- /dev/null +++ b/test/integrations/destinations/kustomer/router/data.ts @@ -0,0 +1,393 @@ +export const data = [ + { + name: 'kustomer', + description: 'Test 0', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + message: { + type: 'identify', + sentAt: '2021-01-03T17:02:53.195Z', + userId: 'testc', + channel: 'web', + context: { + os: { name: '', version: '' }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + traits: { + name: 'test Rudderlabs', + email: 'test@rudderstack.com', + phone: '+12345578900', + birthday: '2005-01-01T23:28:56.782Z', + userId: 'testc', + address: { + street: '24 Dovers Lane', + city: 'Miami', + state: 'Florida', + postalCode: '1890001', + }, + userName: 'testc47', + company: 'Rudderstack', + createdAt: '2015-04-17T12:37:42.146Z', + lastActivityAt: '2016-04-17T12:37:42.146Z', + lastCustomerActivityAt: '2017-04-17T12:37:42.146Z', + lastSeenAt: '2017-04-17T12:37:42.146Z', + avatar: 'https://homepages.cae.wisc.edu/~ece533/images/boat.png', + gender: 'm', + tags: ['happy', 'satisfied'], + website: 'www.mattertoast873.com', + socials: [ + { + verified: true, + userid: '100', + type: 'twitter', + username: '@testc', + url: 'http://twitter.com/testc', + }, + { + verified: false, + userid: '200', + type: 'facebook', + username: 'testc', + url: 'http://facebook.com/testc', + }, + ], + }, + locale: 'en-US', + screen: { density: 2 }, + library: { name: 'RudderLabs JavaScript SDK', version: '1.1.11' }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + integrations: { All: true }, + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + metadata: { + jobId: 1, + }, + destination: { + Config: { + apiKey: 'dummyApiKey', + genericPage: false, + genericScreen: false, + }, + }, + }, + { + message: { + type: 'track', + event: 'Tracking-Weekender', + sentAt: '2021-01-03T17:02:53.197Z', + userId: 'user@doe', + channel: 'web', + context: { + os: { name: '', version: '' }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + page: { + url: 'http://morkey.in', + path: '/cart', + title: 'miphone', + search: 'MI', + referrer: 'morkey', + }, + locale: 'en-US', + screen: { density: 2 }, + library: { name: 'RudderLabs JavaScript SDK', version: '1.1.11' }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '15129730-eb00-4db7-8db2-799566ccb2ef', + properties: { + YearServicedNum: 211, + region: 'strapis', + kustomerTrackingId: 'sahetwiac', + kustomerSessionId: '63nsa22', + }, + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + locale: 'en-US', + integrations: { All: true }, + originalTimestamp: '2021-01-03T17:02:53.195Z', + }, + metadata: { + jobId: 2, + }, + destination: { + Config: { + apiKey: 'dummyApiKey', + genericPage: false, + genericScreen: false, + }, + }, + }, + { + message: { + type: 'track', + event: 'Tracking-Weekender', + sentAt: '2021-01-03T17:02:53.197Z', + userId: 'user@doe', + channel: 'web', + context: { + os: { name: '', version: '' }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + page: { + url: 'http://morkey.in', + path: '/cart', + title: 'miphone', + search: 'MI', + referrer: 'morkey', + }, + locale: 'en-US', + screen: { density: 2 }, + library: { name: 'RudderLabs JavaScript SDK', version: '1.1.11' }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '15129730-eb00-4db7-8db2-799566ccb2ef', + properties: { + YearServicedNum: 211, + region: 'strapis', + kustomerTrackingId: 'sahetwiac', + kustomerSessionId: '63nsa22', + }, + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + locale: 'en-US', + integrations: { All: true }, + originalTimestamp: '2021-01-03T17:02:53.195Z', + }, + metadata: { + jobId: 2, + }, + destination: { + Config: { + baseEndpoint: 'https://api.prod2.kustomerapp.com', + apiKey: 'dummyApiKey', + genericPage: false, + genericScreen: false, + }, + }, + }, + ], + destType: 'kustomer', + }, + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.kustomerapp.com/v1/customers', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + name: 'test Rudderlabs', + externalId: 'testc', + username: 'testc47', + company: 'Rudderstack', + signedUpAt: '2015-04-17T12:37:42.146Z', + lastActivityAt: '2016-04-17T12:37:42.146Z', + lastCustomerActivityAt: '2017-04-17T12:37:42.146Z', + lastSeenAt: '2017-04-17T12:37:42.146Z', + avatarUrl: 'https://homepages.cae.wisc.edu/~ece533/images/boat.png', + gender: 'm', + tags: ['happy', 'satisfied'], + locale: 'en-US', + socials: [ + { + verified: true, + userid: '100', + type: 'twitter', + username: '@testc', + url: 'http://twitter.com/testc', + }, + { + verified: false, + userid: '200', + type: 'facebook', + username: 'testc', + url: 'http://facebook.com/testc', + }, + ], + birthdayAt: '2005-01-01T23:28:56.782Z', + emails: [ + { + type: 'home', + email: 'test@rudderstack.com', + }, + ], + phones: [ + { + type: 'home', + phone: '+12345578900', + }, + ], + urls: [ + { + url: 'www.mattertoast873.com', + }, + ], + locations: [ + { + type: 'home', + address: '24 Dovers Lane Miami Florida 1890001', + }, + ], + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + }, + metadata: [ + { + jobId: 1, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + apiKey: 'dummyApiKey', + genericPage: false, + genericScreen: false, + }, + }, + }, + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.kustomerapp.com/v1/tracking/identityEvent', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + identity: { + externalId: 'user@doe', + }, + event: { + name: 'Tracking-Weekender', + sessionId: '63nsa22', + trackingId: 'sahetwiac', + meta: { + YearServicedNum: 211, + region: 'strapis', + }, + }, + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + }, + metadata: [ + { + jobId: 2, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + apiKey: 'dummyApiKey', + genericPage: false, + genericScreen: false, + }, + }, + }, + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.prod2.kustomerapp.com/v1/tracking/identityEvent', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer dummyApiKey', + }, + params: {}, + body: { + JSON: { + identity: { + externalId: 'user@doe', + }, + event: { + name: 'Tracking-Weekender', + sessionId: '63nsa22', + trackingId: 'sahetwiac', + meta: { + YearServicedNum: 211, + region: 'strapis', + }, + }, + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + }, + metadata: [ + { + jobId: 2, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + baseEndpoint: 'https://api.prod2.kustomerapp.com', + apiKey: 'dummyApiKey', + genericPage: false, + genericScreen: false, + }, + }, + }, + ], + }, + }, + }, + }, +]; diff --git a/test/integrations/destinations/mailchimp/network.ts b/test/integrations/destinations/mailchimp/network.ts new file mode 100644 index 0000000000..b036bf566c --- /dev/null +++ b/test/integrations/destinations/mailchimp/network.ts @@ -0,0 +1,80 @@ +export const networkCallsData = [ + { + httpReq: { + url: 'https://usXXX.api.mailchimp.com/3.0/lists/aud111/members/0b63fa319d113aede8b7b409e4fc6437', + method: 'GET', + }, + httpRes: { + data: { + data: { + type: 'https://mailchimp.com/developer/marketing/docs/errors/', + title: 'Forbidden', + status: 403, + detail: "The API key provided is linked to datacenter 'us6'", + instance: 'ff092056-4d86-aa05-bbe9-9e9466108d81', + }, + }, + status: 200, + }, + }, + { + httpReq: { + url: 'https://usXX.api.mailchimp.com/3.0/lists/aud111/members/48cd6232dc124497369f59c33d3eb4ab', + method: 'GET', + }, + httpRes: { + data: { + contact_id: 821932121, + }, + status: 200, + }, + }, + { + httpReq: { + url: 'https://usXX.api.mailchimp.com/3.0/lists/aud111/members/b599284b872e06d29bb796a260ae7c1f', + method: 'GET', + }, + httpRes: { + data: { + contact_id: 821932121, + }, + status: 204, + }, + }, + { + httpReq: { + url: 'https://usXX.api.mailchimp.com/3.0/lists/aud000', + method: 'GET', + }, + httpRes: { + data: { + double_optin: false, + }, + status: 200, + }, + }, + { + httpReq: { + url: 'https://usXX.api.mailchimp.com/3.0/lists/aud112', + method: 'GET', + }, + httpRes: { + data: { + double_optin: false, + }, + status: 200, + }, + }, + { + httpReq: { + url: 'https://usXX.api.mailchimp.com/3.0/lists/aud002', + method: 'GET', + }, + httpRes: { + data: { + double_optin: false, + }, + status: 200, + }, + }, +]; diff --git a/test/integrations/destinations/mailchimp/processor/data.ts b/test/integrations/destinations/mailchimp/processor/data.ts new file mode 100644 index 0000000000..a0ee5de3d3 --- /dev/null +++ b/test/integrations/destinations/mailchimp/processor/data.ts @@ -0,0 +1,2259 @@ +export const data = [ + { + name: 'mailchimp', + description: 'Test 0', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'dummyApiKey', + audienceId: 'aud111', + datacenterId: 'usXX', + enableMergeFields: true, + }, + Enabled: true, + Transformations: [], + }, + message: { + anonymousId: 'userId12345', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + anonymousId: 'userId12345', + email: 'bob.dole@initech.com', + firstName: 'Bob', + lastName: 'Dole', + zip: '123', + state: 'test', + city: 'test', + addressLine1: 'test', + birthday: '2000-05-06', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36', + }, + integrations: { + All: true, + }, + messageId: '21e475b2-3694-477b-afb6-5b94a81aac21', + originalTimestamp: '2019-11-15T10:22:32Z', + receivedAt: '2019-11-15T15:52:37+05:30', + request_ip: '[::1]:62921', + sentAt: '2019-11-15T10:22:37Z', + source_id: '1TdhTcwsUVOeEMWyPUpQIgF3pYr', + timestamp: '2019-11-15T15:52:32+05:30', + type: 'identify', + userId: 'userId12345', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'PUT', + endpoint: + 'https://usXX.api.mailchimp.com/3.0/lists/aud111/members/48cd6232dc124497369f59c33d3eb4ab', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Basic YXBpS2V5OmR1bW15QXBpS2V5', + }, + params: {}, + body: { + JSON: { + merge_fields: { + ADDRESS: { + addr1: 'test', + city: 'test', + state: 'test', + zip: '123', + }, + FNAME: 'Bob', + LNAME: 'Dole', + ANONYMOUSI: 'userId12345', + BIRTHDAY: '05/06', + }, + email_address: 'bob.dole@initech.com', + status: 'subscribed', + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + audienceId: 'aud111', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'mailchimp', + description: 'Test 1', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'dummyApiKey', + audienceId: 'aud111', + datacenterId: 'usXX', + enableMergeFields: true, + }, + Enabled: true, + Transformations: [], + }, + message: { + anonymousId: 'userId12345', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + anonymousId: 'userId12345', + email: 'bob.dole@initech.com', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36', + }, + integrations: { + MailChimp: { + subscriptionStatus: 'subscribed', + }, + }, + messageId: '6d1f3ca8-e2d0-4d34-9926-44596171af0c', + originalTimestamp: '2019-11-15T10:26:53Z', + receivedAt: '2019-11-15T15:56:58+05:30', + request_ip: '[::1]:62921', + sentAt: '2019-11-15T10:26:58Z', + source_id: '1TdhTcwsUVOeEMWyPUpQIgF3pYr', + timestamp: '2019-11-15T15:56:53+05:30', + type: 'identify', + userId: 'userId12345', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'PUT', + endpoint: + 'https://usXX.api.mailchimp.com/3.0/lists/aud111/members/48cd6232dc124497369f59c33d3eb4ab', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Basic YXBpS2V5OmR1bW15QXBpS2V5', + }, + params: {}, + body: { + JSON: { + status: 'subscribed', + email_address: 'bob.dole@initech.com', + merge_fields: { + ANONYMOUSI: 'userId12345', + }, + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + audienceId: 'aud111', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'mailchimp', + description: 'Test 2', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'Titli Test', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'apiKey-dummyApiKey', + audienceId: 'aud111', + datacenterId: 'usXX', + }, + Enabled: true, + Transformations: [], + }, + message: { + type: 'identify', + sentAt: '2021-05-18T06:58:57.186Z', + userId: 'test.rudderlabs@yara.com', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.18', + namespace: 'com.rudderlabs.javascript', + }, + page: { + url: 'https://app.rudderstack.com/sources/1qHR2Qzd894ievNGc4aBHmjltLD', + path: '/sources/1qHR2Qzd894ievNGc4aBHmjltLD', + title: 'RudderStack', + search: '', + tab_url: 'https://app.rudderstack.com/sources/1qHR2Qzd894ievNGc4aBHmjltLD', + referrer: '$direct', + initial_referrer: 'https://www.google.com/', + referring_domain: '', + initial_referring_domain: 'www.google.com', + }, + locale: 'en-US', + screen: { + width: 1792, + height: 1120, + density: 2, + }, + traits: { + name: 'test rudderlabs', + email: 'test.rudderlabs@yara.com', + userId: '1sWVaQTxoVwjvShC0295E6OqMaP', + first_login: false, + workspaceId: '1jWrHYPjNGSHbvKwzow0ZFPIQll', + account_type: 'invited', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.18', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36', + }, + rudderId: '6d612dda-9c8c-4062-9d09-af9425b846ce', + messageId: 'c6d49688-89f2-45cf-b061-0ae3c212a4e5', + timestamp: '2021-05-18T06:58:57.811Z', + receivedAt: '2021-05-18T06:58:57.812Z', + request_ip: '122.172.221.51', + anonymousId: '6914679f-fd34-45ef-86e0-4930e6e8b91a', + integrations: { + Salesforce: true, + }, + originalTimestamp: '2021-05-18T06:58:57.185Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'User does not have access to the requested operation', + statTags: { + destType: 'MAILCHIMP', + errorCategory: 'network', + errorType: 'aborted', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'mailchimp', + description: 'Test 3', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'Titli Test', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'dummyApiKey', + audienceId: 'aud111', + datacenterId: 'usXX', + }, + Enabled: true, + Transformations: [], + }, + message: { + type: 'page', + sentAt: '2021-05-18T07:02:17.675Z', + userId: '', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.18', + namespace: 'com.rudderlabs.javascript', + }, + page: { + url: 'https://app.rudderstack.com/signup?type=freetrial', + path: '/signup', + title: '', + search: '?type=freetrial', + tab_url: 'https://app.rudderstack.com/signup?type=freetrial', + referrer: + 'https://rudderstack.medium.com/kafka-vs-postgresql-how-we-implemented-our-queueing-system-using-postgresql-ec128650e3e', + initial_referrer: + 'https://rudderstack.medium.com/kafka-vs-postgresql-how-we-implemented-our-queueing-system-using-postgresql-ec128650e3e', + referring_domain: 'rudderstack.medium.com', + initial_referring_domain: 'rudderstack.medium.com', + }, + locale: 'en-GB', + screen: { + density: 2, + }, + traits: {}, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.18', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36', + }, + rudderId: '4dbe224c-6aea-4d89-8da6-09d27c0d2908', + messageId: '72df8cb0-54ab-417c-8e87-e97e9d339feb', + timestamp: '2021-05-18T07:02:18.566Z', + properties: { + url: 'https://app.rudderstack.com/signup?type=freetrial', + path: '/signup', + title: '', + search: '?type=freetrial', + tab_url: 'https://app.rudderstack.com/signup?type=freetrial', + referrer: + 'https://rudderstack.medium.com/kafka-vs-postgresql-how-we-implemented-our-queueing-system-using-postgresql-ec128650e3e', + initial_referrer: + 'https://rudderstack.medium.com/kafka-vs-postgresql-how-we-implemented-our-queueing-system-using-postgresql-ec128650e3e', + referring_domain: 'rudderstack.medium.com', + initial_referring_domain: 'rudderstack.medium.com', + }, + receivedAt: '2021-05-18T07:02:18.566Z', + request_ip: '162.44.150.11', + anonymousId: '58ec7b39-48f1-4d83-9d45-a48c64f96fa0', + integrations: { + All: true, + }, + originalTimestamp: '2021-05-18T07:02:17.675Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'message type page is not supported', + statTags: { + destType: 'MAILCHIMP', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'mailchimp', + description: 'Test 4', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'dummyApiKey', + audienceId: 'aud111', + datacenterId: 'usXX', + }, + Enabled: true, + Transformations: [], + }, + message: { + anonymousId: 'userId12345', + channel: 'web', + context: { + mappedToDestination: true, + externalId: [ + { + identifierType: 'email_address', + id: 'bob.dole@initech.com', + type: 'audience', + }, + ], + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36', + }, + integrations: { + All: true, + }, + traits: { + merge_fields: { + FIRSTNAME: 'Bob', + }, + status: 'subscribed', + }, + messageId: '21e475b2-3694-477b-afb6-5b94a81aac21', + originalTimestamp: '2019-11-15T10:22:32Z', + receivedAt: '2019-11-15T15:52:37+05:30', + request_ip: '[::1]:62921', + sentAt: '2019-11-15T10:22:37Z', + source_id: '1TdhTcwsUVOeEMWyPUpQIgF3pYr', + timestamp: '2019-11-15T15:52:32+05:30', + type: 'identify', + userId: 'userId12345', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'PUT', + endpoint: + 'https://usXX.api.mailchimp.com/3.0/lists/aud111/members/48cd6232dc124497369f59c33d3eb4ab', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Basic YXBpS2V5OmR1bW15QXBpS2V5', + }, + params: {}, + body: { + JSON: { + merge_fields: { + FIRSTNAME: 'Bob', + }, + status: 'subscribed', + email_address: 'bob.dole@initech.com', + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + audienceId: 'aud111', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'mailchimp', + description: 'Test 5', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'dummyApiKey', + audienceId: 'aud111', + datacenterId: 'usXX', + }, + Enabled: true, + Transformations: [], + }, + message: { + type: 'identify', + traits: { + status: 'subscri', + }, + userId: 'emrichardson820+22822@gmail.com', + channel: 'sources', + context: { + sources: { + job_id: '24c5HJxHomh6YCngEOCgjS5r1KX/Syncher', + task_id: 'vw_rs_mailchimp_mocked_hg_data', + version: 'v1.8.1', + batch_id: 'f252c69d-c40d-450e-bcd2-2cf26cb62762', + job_run_id: 'c8el40l6e87v0c4hkbl0', + task_run_id: 'c8el40l6e87v0c4hkblg', + }, + externalId: [ + { + id: 'emrichardson820+22822@gmail.com', + type: 'MAILCHIMP-92e1f1ad2c', + identifierType: 'email_address', + }, + ], + mappedToDestination: 'true', + }, + recordId: '1', + rudderId: '4d5d0ed0-9db8-41cc-9bb0-a032f6bfa97a', + messageId: 'b3bee036-fc26-4f6d-9867-c17f85708a82', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: + 'The status must be one of [subscribed, unsubscribed, cleaned, pending, transactional]', + statTags: { + destType: 'MAILCHIMP', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'mailchimp', + description: 'Test 6', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'dummyApiKey', + audienceId: 'aud111', + datacenterId: 'usXX', + }, + Enabled: true, + Transformations: [], + }, + message: { + anonymousId: 'userId12345', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36', + }, + integrations: { + All: true, + }, + messageId: '21e475b2-3694-477b-afb6-5b94a81aac21', + originalTimestamp: '2019-11-15T10:22:32Z', + receivedAt: '2019-11-15T15:52:37+05:30', + request_ip: '[::1]:62921', + sentAt: '2019-11-15T10:22:37Z', + source_id: '1TdhTcwsUVOeEMWyPUpQIgF3pYr', + timestamp: '2019-11-15T15:52:32+05:30', + type: 'identify', + userId: 'userId12345', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Email is required for identify', + statTags: { + destType: 'MAILCHIMP', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'mailchimp', + description: 'Test 7', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'dummyApiKey', + audienceId: 'aud112', + datacenterId: 'usXX', + }, + Enabled: true, + Transformations: [], + }, + message: { + anonymousId: 'userId12345', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + email: 'jhon@gmail.com', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36', + }, + integrations: { + All: true, + }, + messageId: '21e475b2-3694-477b-afb6-5b94a81aac21', + originalTimestamp: '2019-11-15T10:22:32Z', + receivedAt: '2019-11-15T15:52:37+05:30', + request_ip: '[::1]:62921', + sentAt: '2019-11-15T10:22:37Z', + source_id: '1TdhTcwsUVOeEMWyPUpQIgF3pYr', + timestamp: '2019-11-15T15:52:32+05:30', + type: 'identify', + userId: 'userId12345', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + FORM: {}, + JSON: { + status: 'subscribed', + email_address: 'jhon@gmail.com', + }, + JSON_ARRAY: {}, + }, + type: 'REST', + files: {}, + method: 'PUT', + params: {}, + headers: { + 'Content-Type': 'application/json', + Authorization: 'Basic YXBpS2V5OmR1bW15QXBpS2V5', + }, + audienceId: 'aud112', + version: '1', + endpoint: + 'https://usXX.api.mailchimp.com/3.0/lists/aud112/members/7f3863b197eeff650876bb89eca08e57', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'mailchimp', + description: 'Test 8', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'dummyApiKey', + audienceId: 'aud111', + datacenterId: 'usXX', + }, + Enabled: true, + Transformations: [], + }, + message: { + anonymousId: 'userId12345', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + email: 'bob.dole@initech.com', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36', + }, + integrations: { + All: true, + }, + messageId: '21e475b2-3694-477b-afb6-5b94a81aac21', + originalTimestamp: '2019-11-15T10:22:32Z', + receivedAt: '2019-11-15T15:52:37+05:30', + request_ip: '[::1]:62921', + sentAt: '2019-11-15T10:22:37Z', + source_id: '1TdhTcwsUVOeEMWyPUpQIgF3pYr', + timestamp: '2019-11-15T15:52:32+05:30', + type: 'identify', + userId: 'userId12345', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + FORM: {}, + JSON: { + email_address: 'bob.dole@initech.com', + status: 'subscribed', + }, + JSON_ARRAY: {}, + }, + type: 'REST', + files: {}, + method: 'PUT', + params: {}, + audienceId: 'aud111', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Basic YXBpS2V5OmR1bW15QXBpS2V5', + }, + version: '1', + endpoint: + 'https://usXX.api.mailchimp.com/3.0/lists/aud111/members/48cd6232dc124497369f59c33d3eb4ab', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'mailchimp', + description: 'Test 9', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'dummyApiKey', + audienceId: 'aud111', + datacenterId: 'usXX', + }, + Enabled: true, + Transformations: [], + }, + message: { + anonymousId: 'userId12345', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + anonymousId: 'userId12345', + email: 'bob.dole@initech.com', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36', + }, + integrations: { + MailChimp: { + subscriptionStatus: 'subscribed', + }, + }, + messageId: '6d1f3ca8-e2d0-4d34-9926-44596171af0c', + originalTimestamp: '2019-11-15T10:26:53Z', + receivedAt: '2019-11-15T15:56:58+05:30', + request_ip: '[::1]:62921', + sentAt: '2019-11-15T10:26:58Z', + source_id: '1TdhTcwsUVOeEMWyPUpQIgF3pYr', + timestamp: '2019-11-15T15:56:53+05:30', + type: 'identify', + userId: 'userId12345', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'PUT', + endpoint: + 'https://usXX.api.mailchimp.com/3.0/lists/aud111/members/48cd6232dc124497369f59c33d3eb4ab', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Basic YXBpS2V5OmR1bW15QXBpS2V5', + }, + params: {}, + body: { + JSON: { + status: 'subscribed', + email_address: 'bob.dole@initech.com', + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + audienceId: 'aud111', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'mailchimp', + description: 'Test 10', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: '', + audienceId: 'aud111', + datacenterId: 'usXX', + }, + Enabled: true, + Transformations: [], + }, + message: { + anonymousId: 'userId12345', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + anonymousId: 'test-rudderlabs', + email: 'test-rudderlabs-test@initech.com', + firstName: 'Test', + lastName: 'Rudderlabs', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36', + }, + integrations: { + All: true, + }, + messageId: '21e475b2-3694-477b-afb6-5b94a81aac21', + originalTimestamp: '2019-11-15T10:22:32Z', + receivedAt: '2019-11-15T15:52:37+05:30', + request_ip: '[::1]:62921', + sentAt: '2019-11-15T10:22:37Z', + source_id: '1TdhTcwsUVOeEMWyPUpQIgF3pYr', + timestamp: '2019-11-15T15:52:32+05:30', + type: 'identify', + userId: 'userId12345', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'API Key not found. Aborting', + statTags: { + destType: 'MAILCHIMP', + errorCategory: 'dataValidation', + errorType: 'configuration', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'mailchimp', + description: 'Test 11', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'dummyApiKey', + datacenterId: 'usXX', + }, + Enabled: true, + Transformations: [], + }, + message: { + anonymousId: 'userId12345', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + anonymousId: 'test-rudderlabs', + email: 'test-rudderlabs-test@initech.com', + firstName: 'Test', + lastName: 'Rudderlabs', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36', + }, + integrations: { + All: true, + }, + messageId: '21e475b2-3694-477b-afb6-5b94a81aac21', + originalTimestamp: '2019-11-15T10:22:32Z', + receivedAt: '2019-11-15T15:52:37+05:30', + request_ip: '[::1]:62921', + sentAt: '2019-11-15T10:22:37Z', + source_id: '1TdhTcwsUVOeEMWyPUpQIgF3pYr', + timestamp: '2019-11-15T15:52:32+05:30', + type: 'identify', + userId: 'userId12345', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Audience Id not found. Aborting', + statTags: { + destType: 'MAILCHIMP', + errorCategory: 'dataValidation', + errorType: 'configuration', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'mailchimp', + description: 'Test 12', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'dummyApiKey', + audienceId: 'aud111', + datacenterId: '', + }, + Enabled: true, + Transformations: [], + }, + message: { + anonymousId: 'userId12345', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + anonymousId: 'test-rudderlabs', + email: 'test-rudderlabs-test@initech.com', + firstName: 'Test', + lastName: 'Rudderlabs', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36', + }, + integrations: { + All: true, + }, + messageId: '21e475b2-3694-477b-afb6-5b94a81aac21', + originalTimestamp: '2019-11-15T10:22:32Z', + receivedAt: '2019-11-15T15:52:37+05:30', + request_ip: '[::1]:62921', + sentAt: '2019-11-15T10:22:37Z', + source_id: '1TdhTcwsUVOeEMWyPUpQIgF3pYr', + timestamp: '2019-11-15T15:52:32+05:30', + type: 'identify', + userId: 'userId12345', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'DataCenter Id not found. Aborting', + statTags: { + destType: 'MAILCHIMP', + errorCategory: 'dataValidation', + errorType: 'configuration', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'mailchimp', + description: 'Test 13', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'dummyApiKey', + audienceId: 'aud111', + datacenterId: 'usXX', + }, + Enabled: true, + Transformations: [], + }, + message: { + anonymousId: 'userId12345', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + anonymousId: 'test-rudderlabs', + email: 'test-rudderlabs-test@initech.com', + firstName: 'Test', + lastName: 'Rudderlabs', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36', + }, + integrations: { + All: true, + }, + messageId: '21e475b2-3694-477b-afb6-5b94a81aac21', + originalTimestamp: '2019-11-15T10:22:32Z', + receivedAt: '2019-11-15T15:52:37+05:30', + request_ip: '[::1]:62921', + sentAt: '2019-11-15T10:22:37Z', + source_id: '1TdhTcwsUVOeEMWyPUpQIgF3pYr', + timestamp: '2019-11-15T15:52:32+05:30', + type: 'group', + userId: 'userId12345', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'message type group is not supported', + statTags: { + destType: 'MAILCHIMP', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'mailchimp', + description: 'Test 14', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'dummyApiKey', + audienceId: 'aud111', + datacenterId: 'usXX', + }, + Enabled: true, + Transformations: [], + }, + message: { + anonymousId: 'userId12345', + channel: 'web', + context: { + traits: { + anonymousId: 'userId12345', + email: 'bob.dole@initech.com', + }, + }, + properties: { + brand: 'Aster', + product: 'Garments', + }, + messageId: '6d1f3ca8-e2d0-4d34-9926-44596171af0c', + originalTimestamp: '2019-11-15T10:26:53Z', + receivedAt: '2019-11-15T15:56:58+05:30', + sentAt: '2019-11-15T10:26:58Z', + source_id: '1TdhTcwsUVOeEMWyPUpQIgF3pYr', + timestamp: '2019-11-15T15:56:53+05:30', + type: 'track', + event: 'local testing', + userId: 'userId12345', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://usXX.api.mailchimp.com/3.0/lists/aud111/members/48cd6232dc124497369f59c33d3eb4ab/events', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Basic YXBpS2V5OmR1bW15QXBpS2V5', + }, + params: {}, + body: { + JSON: { + name: 'local_testing', + occurred_at: '2019-11-15T10:26:53+00:00', + properties: { + brand: 'Aster', + product: 'Garments', + }, + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + audienceId: 'aud111', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'mailchimp', + description: 'Test 15', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'dummyApiKey', + audienceId: 'aud111', + datacenterId: 'usXX', + }, + Enabled: true, + Transformations: [], + }, + message: { + anonymousId: 'userId12345', + channel: 'web', + context: { + traits: { + anonymousId: 'userId12345', + email: 'bob.dole@initech.com', + }, + }, + properties: { + brand: 'Aster', + product: 'Garments', + isSyncing: false, + }, + messageId: '6d1f3ca8-e2d0-4d34-9926-44596171af0c', + originalTimestamp: '2019-11-15T10:26:53Z', + receivedAt: '2019-11-15T15:56:58+05:30', + sentAt: '2019-11-15T10:26:58Z', + source_id: '1TdhTcwsUVOeEMWyPUpQIgF3pYr', + timestamp: '2019-11-15T15:56:53+05:30', + type: 'track', + event: 'local testing', + userId: 'userId12345', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://usXX.api.mailchimp.com/3.0/lists/aud111/members/48cd6232dc124497369f59c33d3eb4ab/events', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Basic YXBpS2V5OmR1bW15QXBpS2V5', + }, + params: {}, + body: { + JSON: { + name: 'local_testing', + occurred_at: '2019-11-15T10:26:53+00:00', + is_syncing: false, + properties: { + brand: 'Aster', + product: 'Garments', + }, + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + audienceId: 'aud111', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'mailchimp', + description: 'Test 16', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'dummyApiKey', + audienceId: 'aud111', + datacenterId: 'usXX', + }, + Enabled: true, + Transformations: [], + }, + message: { + anonymousId: 'userId12345', + channel: 'web', + context: { + traits: { + anonymousId: 'userId12345', + }, + }, + messageId: '6d1f3ca8-e2d0-4d34-9926-44596171af0c', + originalTimestamp: '2019-11-15T10:26:53Z', + receivedAt: '2019-11-15T15:56:58+05:30', + sentAt: '2019-11-15T10:26:58Z', + source_id: '1TdhTcwsUVOeEMWyPUpQIgF3pYr', + timestamp: '2019-11-15T15:56:53+05:30', + type: 'track', + event: 'local testing', + userId: 'userId12345', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Email is required for track', + statTags: { + destType: 'MAILCHIMP', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'mailchimp', + description: 'Test 17', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'dummyApiKey', + audienceId: 'aud111', + datacenterId: 'usXX', + }, + Enabled: true, + Transformations: [], + }, + message: { + anonymousId: 'userId12345', + channel: 'web', + context: { + traits: { + anonymousId: 'userId12345', + email: 'bob.dole@initech.com', + }, + }, + properties: { + brand: 'Aster', + product: 'Garments', + isSyncing: false, + }, + messageId: '6d1f3ca8-e2d0-4d34-9926-44596171af0c', + originalTimestamp: '2019-11-15T10:26:53Z', + receivedAt: '2019-11-15T15:56:58+05:30', + sentAt: '2019-11-15T10:26:58Z', + source_id: '1TdhTcwsUVOeEMWyPUpQIgF3pYr', + timestamp: '2019-11-15T15:56:53+05:30', + type: 'track', + userId: 'userId12345', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Missing required value from "event"', + statTags: { + destType: 'MAILCHIMP', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'mailchimp', + description: 'Test 18', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'dummyApiKey', + audienceId: 'aud111', + datacenterId: 'usXX', + }, + Enabled: true, + Transformations: [], + }, + message: { + anonymousId: 'userId12345', + channel: 'web', + context: { + traits: { + anonymousId: 'userId12345', + email: 'bob.dole@initech.com', + }, + }, + messageId: '6d1f3ca8-e2d0-4d34-9926-44596171af0c', + originalTimestamp: '2019-11-15T10:26:53Z', + receivedAt: '2019-11-15T15:56:58+05:30', + sentAt: '2019-11-15T10:26:58Z', + source_id: '1TdhTcwsUVOeEMWyPUpQIgF3pYr', + timestamp: '2019-11-15T15:56:53+05:30', + type: 'track', + event: 'local testing', + userId: 'userId12345', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://usXX.api.mailchimp.com/3.0/lists/aud111/members/48cd6232dc124497369f59c33d3eb4ab/events', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Basic YXBpS2V5OmR1bW15QXBpS2V5', + }, + params: {}, + body: { + JSON: { + name: 'local_testing', + occurred_at: '2019-11-15T10:26:53+00:00', + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + audienceId: 'aud111', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'mailchimp', + description: 'Test 19', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'dummyApiKey', + audienceId: 'aud111', + datacenterId: 'usXX', + }, + Enabled: true, + Transformations: [], + }, + message: { + anonymousId: 'userId12345', + channel: 'web', + context: { + traits: { + anonymousId: 'userId12345', + email: 'bob.dole@initech.com', + }, + }, + properties: { + brand: 'Aster', + product: 'Garments', + isSyncing: false, + products: [ + { + product_id: '123', + price: '14', + }, + { + product_id: '123', + price: 14, + }, + ], + purchased: false, + }, + messageId: '6d1f3ca8-e2d0-4d34-9926-44596171af0c', + originalTimestamp: '2019-11-15T10:26:53Z', + receivedAt: '2019-11-15T15:56:58+05:30', + sentAt: '2019-11-15T10:26:58Z', + source_id: '1TdhTcwsUVOeEMWyPUpQIgF3pYr', + timestamp: '2019-11-15T15:56:53+05:30', + type: 'track', + event: 'local testing', + userId: 'userId12345', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://usXX.api.mailchimp.com/3.0/lists/aud111/members/48cd6232dc124497369f59c33d3eb4ab/events', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Basic YXBpS2V5OmR1bW15QXBpS2V5', + }, + params: {}, + body: { + JSON: { + name: 'local_testing', + occurred_at: '2019-11-15T10:26:53+00:00', + is_syncing: false, + properties: { + brand: 'Aster', + product: 'Garments', + products: '[{"product_id":"123","price":"14"},{"product_id":"123","price":14}]', + purchased: 'false', + }, + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + audienceId: 'aud111', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'mailchimp', + description: 'Test 20', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'dummyApiKey', + audienceId: 'aud111', + datacenterId: 'usXX', + }, + Enabled: true, + Transformations: [], + }, + message: { + anonymousId: 'userId12345', + channel: 'web', + context: { + traits: { + anonymousId: 'userId12345', + email: 'bob.dole@initech.com', + }, + }, + properties: { + brand: 'Aster', + product: 'Garments', + isSyncing: false, + products: [ + { + product_id: '123', + price: '14', + }, + { + product_id: '123', + price: 14, + }, + ], + purchased: false, + }, + messageId: '6d1f3ca8-e2d0-4d34-9926-44596171af0c', + originalTimestamp: '2019-11-15T10:26:53Z', + receivedAt: '2019-11-15T15:56:58+05:30', + sentAt: '2019-11-15T10:26:58Z', + source_id: '1TdhTcwsUVOeEMWyPUpQIgF3pYr', + timestamp: '2019-11-15T15:56:53+05:30', + type: 'track', + event: 22, + userId: 'userId12345', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://usXX.api.mailchimp.com/3.0/lists/aud111/members/48cd6232dc124497369f59c33d3eb4ab/events', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Basic YXBpS2V5OmR1bW15QXBpS2V5', + }, + params: {}, + body: { + JSON: { + name: '22', + occurred_at: '2019-11-15T10:26:53+00:00', + is_syncing: false, + properties: { + brand: 'Aster', + product: 'Garments', + products: '[{"product_id":"123","price":"14"},{"product_id":"123","price":14}]', + purchased: 'false', + }, + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + audienceId: 'aud111', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'mailchimp', + description: 'Test 21', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'dummyApiKey', + audienceId: 'aud111', + datacenterId: 'usXX', + }, + Enabled: true, + Transformations: [], + }, + message: { + anonymousId: 'userId12345', + channel: 'web', + context: { + traits: { + anonymousId: 'userId12345', + email: 'bob.dole@initech.com', + }, + }, + properties: { + brand: 'Aster', + product: 'Garments', + isSyncing: false, + products: [ + { + product_id: '123', + price: '14', + }, + { + product_id: '123', + price: 14, + }, + ], + purchased: false, + }, + messageId: '6d1f3ca8-e2d0-4d34-9926-44596171af0c', + originalTimestamp: '2019-11-15T10:26:53Z', + receivedAt: '2019-11-15T15:56:58+05:30', + sentAt: '2019-11-15T10:26:58Z', + source_id: '1TdhTcwsUVOeEMWyPUpQIgF3pYr', + timestamp: '2019-11-15T15:56:53+05:30', + type: 'track', + event: 'E', + userId: 'userId12345', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Event name should be between 2 and 30 characters', + statTags: { + destType: 'MAILCHIMP', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'mailchimp', + description: 'Test 22', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'dummyApiKey', + audienceId: 'aud111', + datacenterId: 'usXX', + }, + Enabled: true, + Transformations: [], + }, + message: { + anonymousId: 'userId12345', + channel: 'web', + context: { + traits: { + anonymousId: 'userId12345', + email: 'bob.dole@initech.com', + }, + }, + properties: { + brand: 'Aster', + product: 'Garments', + isSyncing: false, + products: [ + { + product_id: '123', + price: '14', + }, + { + product_id: '123', + price: 14, + }, + ], + purchased: false, + }, + messageId: '6d1f3ca8-e2d0-4d34-9926-44596171af0c', + originalTimestamp: '2019-11-15T10:26:53Z', + receivedAt: '2019-11-15T15:56:58+05:30', + sentAt: '2019-11-15T10:26:58Z', + source_id: '1TdhTcwsUVOeEMWyPUpQIgF3pYr', + timestamp: '2019-11-15T15:56:53+05:30', + type: 'track', + event: 'Event Name more than 30 characters abcdefghijklmno', + userId: 'userId12345', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Event name should be between 2 and 30 characters', + statTags: { + destType: 'MAILCHIMP', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, +]; diff --git a/test/integrations/destinations/mailchimp/router/data.ts b/test/integrations/destinations/mailchimp/router/data.ts new file mode 100644 index 0000000000..f6a9627719 --- /dev/null +++ b/test/integrations/destinations/mailchimp/router/data.ts @@ -0,0 +1,977 @@ +export const data = [ + { + name: 'mailchimp', + description: 'Test 0', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'apikey', + audienceId: 'aud111', + datacenterId: 'usXX', + enableMergeFields: true, + }, + Enabled: true, + Transformations: [], + }, + metadata: { + jobId: 2, + }, + message: { + anonymousId: 'userId12345', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + anonymousId: 'userId12345', + email: 'bob.dole@initech.com', + firstName: 'Bob', + lastName: 'Dole', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36', + }, + integrations: { + All: true, + }, + messageId: '21e475b2-3694-477b-afb6-5b94a81aac21', + originalTimestamp: '2019-11-15T10:22:32Z', + receivedAt: '2019-11-15T15:52:37+05:30', + request_ip: '[::1]:62921', + sentAt: '2019-11-15T10:22:37Z', + source_id: '1TdhTcwsUVOeEMWyPUpQIgF3pYr', + timestamp: '2019-11-15T15:52:32+05:30', + type: 'identify', + userId: 'userId12345', + }, + }, + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'apikey', + audienceId: 'aud111', + datacenterId: 'usXX', + enableMergeFields: true, + }, + Enabled: true, + Transformations: [], + }, + metadata: { + jobId: 3, + }, + message: { + anonymousId: 'userId12345', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + anonymousId: 'userId12345', + email: 'bob.dole@initech.com', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36', + }, + integrations: { + MailChimp: { + subscriptionStatus: 'subscribed', + }, + }, + messageId: '6d1f3ca8-e2d0-4d34-9926-44596171af0c', + originalTimestamp: '2019-11-15T10:26:53Z', + receivedAt: '2019-11-15T15:56:58+05:30', + request_ip: '[::1]:62921', + sentAt: '2019-11-15T10:26:58Z', + source_id: '1TdhTcwsUVOeEMWyPUpQIgF3pYr', + timestamp: '2019-11-15T15:56:53+05:30', + type: 'identify', + userId: 'userId12345', + }, + }, + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'apikey', + audienceId: 'aud111', + datacenterId: 'usXX', + enableMergeFields: true, + }, + Enabled: true, + Transformations: [], + }, + metadata: { + jobId: 4, + }, + message: { + anonymousId: 'userId12345', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + anonymousId: 'userId12345', + email: 'bob.dole@initech.com', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36', + }, + integrations: { + MailChimp: { + subscriptionStatus: 'subscrib', + }, + }, + messageId: '6d1f3ca8-e2d0-4d34-9926-44596171af0c', + originalTimestamp: '2019-11-15T10:26:53Z', + receivedAt: '2019-11-15T15:56:58+05:30', + request_ip: '[::1]:62921', + sentAt: '2019-11-15T10:26:58Z', + source_id: '1TdhTcwsUVOeEMWyPUpQIgF3pYr', + timestamp: '2019-11-15T15:56:53+05:30', + type: 'identify', + userId: 'userId12345', + }, + }, + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'apikey', + audienceId: 'aud111', + datacenterId: 'usXX', + enableMergeFields: true, + }, + Enabled: true, + Transformations: [], + }, + metadata: { + jobId: 5, + }, + message: { + anonymousId: 'userId12345', + channel: 'web', + context: { + traits: { + anonymousId: 'userId12345', + email: 'bob.dole@initech.com', + }, + }, + properties: { + brand: 'Aster', + product: 'Garments', + }, + messageId: '6d1f3ca8-e2d0-4d34-9926-44596171af0c', + originalTimestamp: '2019-11-15T10:26:53Z', + receivedAt: '2019-11-15T15:56:58+05:30', + sentAt: '2019-11-15T10:26:58Z', + source_id: '1TdhTcwsUVOeEMWyPUpQIgF3pYr', + timestamp: '2019-11-15T15:56:53+05:30', + type: 'track', + event: 'local testing', + userId: 'userId12345', + }, + }, + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'apikey', + audienceId: 'aud111', + datacenterId: 'usXX', + enableMergeFields: true, + }, + Enabled: true, + Transformations: [], + }, + metadata: { + jobId: 6, + }, + message: { + anonymousId: 'userId12345', + channel: 'web', + context: { + traits: { + anonymousId: 'userId12345', + email: 'bob.dole@initech.com', + }, + }, + properties: { + brand: 'Aster', + product: 'Garments', + is_syncing: false, + }, + messageId: '6d1f3ca8-e2d0-4d34-9926-44596171af0c', + originalTimestamp: '2019-11-15T10:26:53Z', + receivedAt: '2019-11-15T15:56:58+05:30', + sentAt: '2019-11-15T10:26:58Z', + source_id: '1TdhTcwsUVOeEMWyPUpQIgF3pYr', + timestamp: '2019-11-15T15:56:53+05:30', + type: 'track', + userId: 'userId12345', + }, + }, + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'apikey', + audienceId: 'aud111', + datacenterId: 'usXX', + enableMergeFields: true, + }, + Enabled: true, + Transformations: [], + }, + metadata: { + jobId: 7, + }, + message: { + anonymousId: 'userId12345', + channel: 'web', + context: { + traits: { + anonymousId: 'userId12345', + email: 'bob.dole@initech.com', + }, + }, + properties: { + brand: 'Aster', + product: 'Garments', + isSyncing: false, + products: [ + { + product_id: '123', + price: '14', + }, + { + product_id: '123', + price: 14, + }, + ], + purchased: false, + }, + messageId: '6d1f3ca8-e2d0-4d34-9926-44596171af0c', + originalTimestamp: '2019-11-15T10:26:53Z', + receivedAt: '2019-11-15T15:56:58+05:30', + sentAt: '2019-11-15T10:26:58Z', + source_id: '1TdhTcwsUVOeEMWyPUpQIgF3pYr', + timestamp: '2019-11-15T15:56:53+05:30', + type: 'track', + event: 'local testing', + userId: 'userId12345', + }, + }, + ], + destType: 'mailchimp', + }, + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://usXX.api.mailchimp.com/3.0/lists/aud111?skip_merge_validation=true&skip_duplicate_check=false', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Basic YXBpS2V5OmFwaWtleQ==', + }, + params: {}, + body: { + JSON: { + members: [ + { + email_address: 'bob.dole@initech.com', + merge_fields: { + FNAME: 'Bob', + LNAME: 'Dole', + ANONYMOUSI: 'userId12345', + }, + status: 'subscribed', + }, + { + email_address: 'bob.dole@initech.com', + merge_fields: { + ANONYMOUSI: 'userId12345', + }, + status: 'subscribed', + }, + ], + update_existing: true, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + metadata: [ + { + jobId: 2, + }, + { + jobId: 3, + }, + ], + batched: true, + statusCode: 200, + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'apikey', + audienceId: 'aud111', + datacenterId: 'usXX', + enableMergeFields: true, + }, + Enabled: true, + Transformations: [], + }, + }, + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://usXX.api.mailchimp.com/3.0/lists/aud111/members/48cd6232dc124497369f59c33d3eb4ab/events', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Basic YXBpS2V5OmFwaWtleQ==', + }, + params: {}, + body: { + JSON: { + name: 'local_testing', + occurred_at: '2019-11-15T10:26:53+00:00', + properties: { + brand: 'Aster', + product: 'Garments', + }, + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + audienceId: 'aud111', + }, + metadata: [ + { + jobId: 5, + }, + ], + batched: false, + statusCode: 200, + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'apikey', + audienceId: 'aud111', + datacenterId: 'usXX', + enableMergeFields: true, + }, + Enabled: true, + Transformations: [], + }, + }, + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://usXX.api.mailchimp.com/3.0/lists/aud111/members/48cd6232dc124497369f59c33d3eb4ab/events', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Basic YXBpS2V5OmFwaWtleQ==', + }, + params: {}, + body: { + JSON: { + name: 'local_testing', + occurred_at: '2019-11-15T10:26:53+00:00', + is_syncing: false, + properties: { + brand: 'Aster', + product: 'Garments', + products: + '[{"product_id":"123","price":"14"},{"product_id":"123","price":14}]', + purchased: 'false', + }, + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + audienceId: 'aud111', + }, + metadata: [ + { + jobId: 7, + }, + ], + batched: false, + statusCode: 200, + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'apikey', + audienceId: 'aud111', + datacenterId: 'usXX', + enableMergeFields: true, + }, + Enabled: true, + Transformations: [], + }, + }, + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'apikey', + audienceId: 'aud111', + datacenterId: 'usXX', + enableMergeFields: true, + }, + Enabled: true, + Transformations: [], + }, + metadata: [ + { + jobId: 6, + }, + ], + batched: false, + statusCode: 400, + error: 'Missing required value from "event"', + statTags: { + destType: 'MAILCHIMP', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'router', + implementation: 'native', + module: 'destination', + }, + }, + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'apikey', + audienceId: 'aud111', + datacenterId: 'usXX', + enableMergeFields: true, + }, + Enabled: true, + Transformations: [], + }, + metadata: [ + { + jobId: 4, + }, + ], + batched: false, + statusCode: 400, + error: + 'The status must be one of [subscribed, unsubscribed, cleaned, pending, transactional]', + statTags: { + destType: 'MAILCHIMP', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'router', + implementation: 'native', + module: 'destination', + }, + }, + ], + }, + }, + }, + }, + { + name: 'mailchimp', + description: 'events batching', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'apiKey-dummyApiKey', + audienceId: '1232yyqw22', + datacenterId: 'us20', + }, + Enabled: true, + Transformations: [], + }, + metadata: { + jobId: 2, + }, + message: { + anonymousId: 'userId12345', + channel: 'web', + context: { + mappedToDestination: true, + externalId: [ + { + identifierType: 'email_address', + id: 'bob.dole@initech.com', + type: 'audience', + }, + ], + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36', + }, + integrations: { + All: true, + }, + traits: { + merge_fields: { + FIRSTNAME: 'Bob', + }, + status: 'subscribed', + }, + messageId: '21e475b2-3694-477b-afb6-5b94a81aac21', + originalTimestamp: '2019-11-15T10:22:32Z', + receivedAt: '2019-11-15T15:52:37+05:30', + request_ip: '[::1]:62921', + sentAt: '2019-11-15T10:22:37Z', + source_id: '1TdhTcwsUVOeEMWyPUpQIgF3pYr', + timestamp: '2019-11-15T15:52:32+05:30', + type: 'identify', + userId: 'userId12345', + }, + }, + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'apiKey-dummyApiKey', + audienceId: '1232yyqw22', + datacenterId: 'us20', + }, + Enabled: true, + Transformations: [], + }, + metadata: { + jobId: 3, + }, + message: { + type: 'identify', + traits: { + status: 'subscribed', + }, + userId: 'emrichardson820+22822@gmail.com', + channel: 'sources', + context: { + sources: { + job_id: '24c5HJxHomh6YCngEOCgjS5r1KX/Syncher', + task_id: 'vw_rs_mailchimp_mocked_hg_data', + version: 'v1.8.1', + batch_id: 'f252c69d-c40d-450e-bcd2-2cf26cb62762', + job_run_id: 'c8el40l6e87v0c4hkbl0', + task_run_id: 'c8el40l6e87v0c4hkblg', + }, + externalId: [ + { + id: 'emrichardson820+22822@gmail.com', + type: 'MAILCHIMP-92e1f1ad2c', + identifierType: 'email_address', + }, + ], + mappedToDestination: 'true', + }, + recordId: '1', + rudderId: '4d5d0ed0-9db8-41cc-9bb0-a032f6bfa97a', + messageId: 'b3bee036-fc26-4f6d-9867-c17f85708a82', + }, + }, + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'apiKey-dummyApiKey', + audienceId: '1232yyqw22', + datacenterId: 'us20', + }, + Enabled: true, + Transformations: [], + }, + metadata: { + jobId: 4, + }, + message: { + type: 'identify', + traits: { + status: 'subscribed', + }, + userId: 'emrichardson820+22822@gmail.com', + channel: 'sources', + context: { + sources: { + job_id: '24c5HJxHomh6YCngEOCgjS5r1KX/Syncher', + task_id: 'vw_rs_mailchimp_mocked_hg_data', + version: 'v1.8.1', + batch_id: 'f252c69d-c40d-450e-bcd2-2cf26cb62762', + job_run_id: 'c8el40l6e87v0c4hkbl0', + task_run_id: 'c8el40l6e87v0c4hkblg', + }, + externalId: [ + { + id: 'emrichardson820+22822@gmail.com', + type: 'MAILCHIMP-92e1f1ad2c', + identifierType: 'email_address', + }, + ], + mappedToDestination: 'true', + }, + recordId: '1', + rudderId: '4d5d0ed0-9db8-41cc-9bb0-a032f6bfa97a', + messageId: 'b3bee036-fc26-4f6d-9867-c17f85708a82', + }, + }, + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'apiKey-dummyApiKey', + audienceId: '1232yyqw22', + datacenterId: 'us20', + }, + Enabled: true, + Transformations: [], + }, + metadata: { + jobId: 5, + }, + message: { + type: 'identify', + traits: { + status: 'subscrib', + }, + userId: 'emrichardson820+22822@gmail.com', + channel: 'sources', + context: { + sources: { + job_id: '24c5HJxHomh6YCngEOCgjS5r1KX/Syncher', + task_id: 'vw_rs_mailchimp_mocked_hg_data', + version: 'v1.8.1', + batch_id: 'f252c69d-c40d-450e-bcd2-2cf26cb62762', + job_run_id: 'c8el40l6e87v0c4hkbl0', + task_run_id: 'c8el40l6e87v0c4hkblg', + }, + externalId: [ + { + id: 'emrichardson820+22822@gmail.com', + type: 'MAILCHIMP-92e1f1ad2c', + identifierType: 'email_address', + }, + ], + mappedToDestination: 'true', + }, + recordId: '1', + rudderId: '4d5d0ed0-9db8-41cc-9bb0-a032f6bfa97a', + messageId: 'b3bee036-fc26-4f6d-9867-c17f85708a82', + }, + }, + ], + destType: 'mailchimp', + }, + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://us20.api.mailchimp.com/3.0/lists/1232yyqw22?skip_merge_validation=false&skip_duplicate_check=false', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Basic YXBpS2V5OmFwaUtleS1kdW1teUFwaUtleQ==', + }, + params: {}, + body: { + JSON: { + members: [ + { + merge_fields: { + FIRSTNAME: 'Bob', + }, + status: 'subscribed', + email_address: 'bob.dole@initech.com', + }, + { + status: 'subscribed', + email_address: 'emrichardson820+22822@gmail.com', + }, + { + status: 'subscribed', + email_address: 'emrichardson820+22822@gmail.com', + }, + ], + update_existing: true, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + metadata: [ + { + jobId: 2, + }, + { + jobId: 3, + }, + { + jobId: 4, + }, + ], + batched: true, + statusCode: 200, + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'apiKey-dummyApiKey', + audienceId: '1232yyqw22', + datacenterId: 'us20', + }, + Enabled: true, + Transformations: [], + }, + }, + { + destination: { + ID: '1Tdi0lpXwSVwXG1lcdP2pXHKrJ6', + Name: 'test-mc', + DestinationDefinition: { + ID: '1SujZGrVEPqYmpUJcV4vSl9tfxn', + Name: 'MC', + DisplayName: 'MailChimp', + }, + Config: { + apiKey: 'apiKey-dummyApiKey', + audienceId: '1232yyqw22', + datacenterId: 'us20', + }, + Enabled: true, + Transformations: [], + }, + metadata: [ + { + jobId: 5, + }, + ], + batched: false, + statusCode: 400, + error: + 'The status must be one of [subscribed, unsubscribed, cleaned, pending, transactional]', + statTags: { + destType: 'MAILCHIMP', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'router', + implementation: 'native', + module: 'destination', + }, + }, + ], + }, + }, + }, + }, +]; diff --git a/test/integrations/destinations/marketo/network.ts b/test/integrations/destinations/marketo/network.ts index b0c6174281..9c28a9aef1 100644 --- a/test/integrations/destinations/marketo/network.ts +++ b/test/integrations/destinations/marketo/network.ts @@ -241,4 +241,732 @@ export const networkCallsData = [ statusText: 'OK', }, }, + { + httpReq: { + url: 'https://marketo_acct_id_success.mktorest.com/identity/oauth/token', + method: 'GET', + }, + httpRes: { + data: { + access_token: 'access_token_success', + expires_in: 3599, + scope: 'integrations@rudderstack.com', + token_type: 'bearer', + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://marketo_acct_id_token_failure.mktorest.com/identity/oauth/token', + method: 'GET', + }, + httpRes: { + data: { + access_token: 'access_token_expired', + expires_in: 0, + scope: 'integrations@rudderstack.com', + token_type: 'bearer', + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://marketo_acct_id_success.mktorest.com/rest/v1/leads.json', + method: 'get', + }, + httpRes: { + data: { + requestId: '7ab2#17672a46a99', + result: [ + { + id: 4, + status: 'created', + }, + ], + success: true, + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://marketo_acct_id_success.mktorest.com/rest/v1/leads.json?filterType=email&filterValues=arnab.compsc%40gmail.com', + method: 'GET', + }, + httpRes: { + data: { + requestId: '107#17672aeadba', + result: [], + success: true, + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://marketo_acct_id_success.mktorest.com/rest/v1/leads.json?filterType=userId&filterValues=test-user-6j55yr', + method: 'GET', + }, + httpRes: { + data: { + requestId: '12093#17672aeaee6', + result: [ + { + createdAt: '2020-12-17T21:39:07Z', + email: null, + firstName: null, + id: 4, + lastName: null, + updatedAt: '2020-12-17T21:39:07Z', + userId: 'test-user-6j55yr', + }, + ], + success: true, + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://marketo_acct_id_failed.mktorest.com/identity/oauth/token', + method: 'GET', + }, + httpRes: { + data: { + success: false, + errors: [ + { + code: '601', + message: 'Access Token Expired', + }, + ], + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://munchkinId.mktorest.com/identity/oauth/token?client_id=b&client_secret=clientSecret&grant_type=client_credentials', + method: 'GET', + }, + httpRes: { + data: { + access_token: 'test_acess', + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://munchkinId.mktorest.com/identity/oauth/token?client_id=wrongClientId&client_secret=clientSecret&grant_type=client_credentials', + method: 'GET', + }, + httpRes: { + data: { + access_token: 'test_access_token', + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://munchkinId.mktorest.com/rest/v1/leads/describe2.json', + method: 'GET', + }, + httpRes: { + data: { + requestId: '7fa1#17fd1da66fe', + result: [ + { + name: 'API Lead', + searchableFields: [['email']], + fields: [ + { + name: 'email', + displayName: 'Email Address', + dataType: 'email', + length: 255, + updateable: true, + crmManaged: false, + }, + ], + }, + ], + success: true, + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://munchkinId.mktorest.com/bulk/v1/leads.json', + method: 'GET', + }, + httpRes: { + data: { + requestId: '5bdd#17fd1ff88cd', + result: [ + { + batchId: 2977, + importId: '2977', + status: 'Queued', + }, + ], + success: true, + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://a.mktorest.com/identity/oauth/token?client_id=b&client_secret=c&grant_type=client_credentials', + method: 'GET', + }, + httpRes: { + data: { + access_token: 'test_access_token', + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://a.mktorest.com/identity/oauth/token?client_id=b&client_secret=forThrottle&grant_type=client_credentials', + method: 'GET', + }, + httpRes: { + data: { + access_token: 'test_access_token', + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://a.mktorest.com/rest/v1/leads/describe2.json', + method: 'GET', + }, + httpRes: { + data: { + requestId: '7fa1#17fd1da66fe', + result: [ + { + name: 'API Lead', + searchableFields: [['email']], + fields: [ + { + name: 'email', + displayName: 'Email Address', + dataType: 'email', + length: 255, + updateable: true, + crmManaged: false, + }, + ], + }, + ], + success: true, + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://testMunchkin4.mktorest.com/identity/oauth/token?client_id=b&client_secret=c&grant_type=client_credentials', + method: 'GET', + }, + httpRes: { + data: { + access_token: 'test_access_token', + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://testMunchkin4.mktorest.com/bulk/v1/leads/batch/1234.json', + method: 'GET', + }, + httpRes: { + data: { + errors: [ + { + message: 'Any 400 error', + code: 1000, + }, + ], + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://testMunchkin3.mktorest.com/identity/oauth/token?client_id=b&client_secret=c&grant_type=client_credentials', + method: 'GET', + }, + httpRes: { + data: { + access_token: 'test_access_token', + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://testMunchkin500.mktorest.com/identity/oauth/token?client_id=b&client_secret=c&grant_type=client_credentials', + method: 'GET', + }, + httpRes: { + data: { + access_token: 'test_access_token', + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://testMunchkin500.mktorest.com/bulk/v1/leads/batch/1234.json', + method: 'GET', + }, + httpRes: { + data: { + errors: [ + { + message: 'Any 500 error', + code: 502, + }, + ], + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://a.mktorest.com/bulk/v1/leads/batch/12345/warnings.json', + method: 'GET', + }, + httpRes: { + data: 'data \n data', + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://a.mktorest.com/bulk/v1/leads/batch/12345/failures.json', + method: 'GET', + }, + httpRes: { + data: 'data \n data', + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://testMunchkin1.mktorest.com/identity/oauth/token?client_id=b&client_secret=c&grant_type=client_credentials', + method: 'GET', + }, + httpRes: { + data: { + access_token: 'access_token_success', + expires_in: 3599, + scope: 'integrations@rudderstack.com', + token_type: 'bearer', + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://testMunchkin1.mktorest.com/rest/v1/leads/describe2.json', + method: 'GET', + }, + httpRes: { + data: { + requestId: '7fa1#17fd1da66fe', + result: [ + { + name: 'API Lead', + searchableFields: [['email']], + fields: [ + { + name: 'email', + displayName: 'Email Address', + dataType: 'email', + length: 255, + updateable: true, + crmManaged: false, + }, + ], + }, + ], + success: true, + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://testMunchkin1.mktorest.com/bulk/v1/leads.json', + method: 'GET', + }, + httpRes: { + data: { + success: false, + errors: [ + { + code: 603, + }, + ], + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://testMunchkin2.mktorest.com/identity/oauth/token?client_id=b&client_secret=c&grant_type=client_credentials', + method: 'GET', + }, + httpRes: { + data: { + access_token: 'access_token_success', + expires_in: 3599, + scope: 'integrations@rudderstack.com', + token_type: 'bearer', + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://testMunchkin2.mktorest.com/rest/v1/leads/describe2.json', + method: 'GET', + }, + httpRes: { + data: { + requestId: '7fa1#17fd1da66fe', + result: [ + { + name: 'API Lead', + searchableFields: [['email']], + fields: [ + { + name: 'Email', + displayName: 'Email Address', + dataType: 'email', + length: 255, + updateable: true, + crmManaged: false, + }, + ], + }, + ], + success: true, + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://testMunchkin2.mktorest.com/bulk/v1/leads.json', + method: 'GET', + }, + httpRes: { + data: { + success: false, + errors: [ + { + message: 'There are 10 imports currently being processed. Please try again later', + }, + ], + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://testMunchkin3.mktorest.com/rest/v1/leads/describe2.json', + method: 'GET', + }, + httpRes: { + data: { + requestId: '7fa1#17fd1da66fe', + result: [ + { + name: 'API Lead', + searchableFields: [['email']], + fields: [ + { + name: 'Email', + displayName: 'Email Address', + dataType: 'email', + length: 255, + updateable: true, + crmManaged: false, + }, + ], + }, + ], + success: true, + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://testMunchkin3.mktorest.com/bulk/v1/leads.json', + method: 'GET', + }, + httpRes: { + data: { + success: false, + errors: [ + { + message: 'Empty file', + }, + ], + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://testMunchkin4.mktorest.com/rest/v1/leads/describe2.json', + method: 'GET', + }, + httpRes: { + data: { + requestId: '7fa1#17fd1da66fe', + result: [ + { + name: 'API Lead', + searchableFields: [['email']], + fields: [ + { + name: 'Email', + displayName: 'Email Address', + dataType: 'email', + length: 255, + updateable: true, + crmManaged: false, + }, + ], + }, + ], + success: true, + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://testMunchkin4.mktorest.com/bulk/v1/leads.json', + method: 'GET', + }, + httpRes: { + data: { + success: false, + errors: [ + { + message: 'Any other error', + }, + ], + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://valid_account_broken_event.mktorest.com/identity/oauth/token', + method: 'GET', + }, + httpRes: { + data: { + access_token: 'access_token_success', + expires_in: 3599, + scope: 'integrations@rudderstack.com', + token_type: 'bearer', + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://valid_account_broken_event.mktorest.com/rest/v1/leads.json?filterType=email&filterValues=0c7b8b80-9c43-4f8e-b2d2-5e2448a25040@j.mail', + method: 'GET', + }, + httpRes: { + data: { + requestId: '12093#17672aeaee6', + result: [], + success: true, + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://valid_account_broken_event.mktorest.com/rest/v1/leads.json', + method: 'GET', + }, + httpRes: { + data: { + requestId: '142e4#1835b117b76', + success: false, + errors: [ + { + code: '1006', + message: "Lookup field 'userId' not found", + }, + ], + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://unhandled_status_code.mktorest.com/identity/oauth/token', + method: 'GET', + }, + httpRes: { + data: { + access_token: 'access_token_success', + expires_in: 3599, + scope: 'integrations@rudderstack.com', + token_type: 'bearer', + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://unhandled_status_code.mktorest.com/rest/v1/leads.json?filterType=email&filterValues=0c7b8b80-9c43-4f8e-b2d2-5e2448a25040@j.mail', + method: 'GET', + }, + httpRes: { + data: { + requestId: '12093#17672aeaee6', + result: [], + success: true, + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://unhandled_status_code.mktorest.com/rest/v1/leads.json', + method: 'GET', + }, + httpRes: { + data: { + requestId: '142e4#1835b117b76', + success: false, + errors: [ + { + code: 'random_marketo_code', + message: 'some other problem', + }, + ], + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://successful_identify_transformation.mktorest.com/identity/oauth/token', + method: 'GET', + }, + httpRes: { + data: { + access_token: 'access_token_success', + expires_in: 3599, + scope: 'integrations@rudderstack.com', + token_type: 'bearer', + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://successful_identify_transformation.mktorest.com/rest/v1/leads.json', + method: 'GET', + }, + httpRes: { + data: { + requestId: '7ab2#17672a46a99', + result: [ + { + id: 4, + status: 'created', + }, + ], + success: true, + }, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://successful_identify_transformation.mktorest.com/rest/v1/leads.json?filterType=email&filterValues=0c7b8b80-9c43-4f8e-b2d2-5e2448a25040@j.mail', + method: 'GET', + }, + httpRes: { + data: { + requestId: '12093#17672aeaee6', + result: [ + { + createdAt: '2022-09-17T21:39:07Z', + email: '0c7b8b80-9c43-4f8e-b2d2-5e2448a25040@j.mail', + firstName: 'random_first', + id: 4, + lastName: 'random_last', + updatedAt: '2022-09-20T21:48:07Z', + userId: 'test-user-957ue', + }, + ], + success: true, + }, + status: 200, + statusText: 'OK', + }, + }, ]; diff --git a/test/integrations/destinations/marketo/processor/data.ts b/test/integrations/destinations/marketo/processor/data.ts new file mode 100644 index 0000000000..38201bd60d --- /dev/null +++ b/test/integrations/destinations/marketo/processor/data.ts @@ -0,0 +1,1745 @@ +export const data = [ + { + name: 'marketo', + description: 'Test 0', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'sources', + context: { + externalId: [ + { + id: 'lynnanderson@smith.net', + identifierType: 'email', + type: 'MARKETO-new_user', + }, + ], + mappedToDestination: 'true', + sources: { + batch_id: 'f5f240d0-0acb-46e0-b043-57fb0aabbadd', + job_id: '1zAj94bEy8komdqnYtSoDp0VmGs/Syncher', + job_run_id: 'c5tar6cqgmgmcjvupdhg', + task_id: 'tt_10_rows_check', + task_run_id: 'c5tar6cqgmgmcjvupdi0', + version: 'release.v1.6.8', + }, + }, + messageId: '2f052f7c-f694-4849-a7ed-a432f7ffa0a4', + originalTimestamp: '2021-10-28T14:03:50.503Z', + receivedAt: '2021-10-28T14:03:46.567Z', + recordId: '8', + request_ip: '10.1.94.92', + rudderId: 'c0f6843e-e3d6-4946-9752-fa339fbadef2', + sentAt: '2021-10-28T14:03:50.503Z', + timestamp: '2021-10-28T14:03:46.566Z', + traits: { + marketoGUID: '23', + administrative_unit: 'Minnesota', + am_pm: 'AM', + boolean: true, + firstname: 'Jacqueline', + pPower: 'AM', + userId: 'Jacqueline', + }, + type: 'identify', + userId: 'lynnanderson@smith.net', + }, + destination: { + ID: '1zia9wKshXt80YksLmUdJnr7IHI', + Name: 'test_marketo', + DestinationDefinition: { + ID: '1iVQvTRMsPPyJzwol0ifH93QTQ6', + Name: 'MARKETO', + DisplayName: 'Marketo', + Config: { + destConfig: { + defaultConfig: [], + }, + excludeKeys: [], + includeKeys: [], + saveDestinationResponse: true, + secretKeys: [], + supportedMessageTypes: ['identify', 'page', 'screen', 'track'], + supportedSourceTypes: [ + 'android', + 'ios', + 'web', + 'unity', + 'amp', + 'cloud', + 'warehouse', + 'reactnative', + 'flutter', + 'cordova', + ], + supportsVisualMapper: true, + transformAt: 'processor', + transformAtV1: 'processor', + }, + ResponseRules: null, + }, + Config: { + clientId: 'marketo_client_id_success', + clientSecret: 'marketo_client_secret_success', + accountId: 'marketo_acct_id_success', + rudderEventsMapping: [], + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + libraries: [], + request: { + query: {}, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + userId: '', + method: 'POST', + endpoint: + 'https://marketo_acct_id_success.mktorest.com/rest/v1/customobjects/new_user.json', + headers: { + Authorization: 'Bearer access_token_success', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + action: 'createOrUpdate', + dedupeBy: 'dedupeFields', + input: [ + { + administrative_unit: 'Minnesota', + am_pm: 'AM', + boolean: true, + firstname: 'Jacqueline', + pPower: 'AM', + userId: 'Jacqueline', + email: 'lynnanderson@smith.net', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'marketo', + description: 'Test 1', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'anon_id_success', + channel: 'mobile', + context: { + app: { + build: '1', + name: 'TestAppName', + namespace: 'com.android.sample', + version: '1.0', + }, + device: { + id: 'anon_id_success', + manufacturer: 'Google', + model: 'Android SDK built for x86', + name: 'generic_x86', + type: 'android', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.1-beta.1', + }, + locale: 'en-US', + network: { + carrier: 'Android', + bluetooth: false, + cellular: true, + wifi: true, + }, + os: { + name: 'Android', + version: '8.1.0', + }, + screen: { + density: 420, + height: 1794, + width: 1080, + }, + timezone: 'Asia/Kolkata', + traits: { + anonymousId: 'anon_id_success', + }, + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)', + }, + event: 'Product Clicked', + integrations: { + All: true, + }, + messageId: 'id1', + properties: { + name: 'Test Product', + }, + originalTimestamp: '2020-12-17T21:00:59.176Z', + type: 'track', + sentAt: '2020-03-12T09:05:03.421Z', + }, + destination: { + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + Config: { + accountId: 'marketo_acct_id_success', + clientId: 'marketo_client_id_success', + clientSecret: 'marketo_client_secret_success', + trackAnonymousEvents: true, + customActivityPropertyMap: [ + { + from: 'name', + to: 'productName', + }, + ], + leadTraitMapping: [ + { + from: 'leadScore', + to: 'customLeadScore', + }, + ], + createIfNotExist: true, + customActivityPrimaryKeyMap: [ + { + from: 'Product Clicked', + to: 'name', + }, + ], + customActivityEventMap: [ + { + from: 'Product Clicked', + to: '100001', + }, + ], + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + userId: '', + method: 'POST', + endpoint: + 'https://marketo_acct_id_success.mktorest.com/rest/v1/activities/external.json', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer access_token_success', + }, + params: {}, + body: { + JSON: { + input: [ + { + activityDate: '2020-12-17T21:00:59.176Z', + activityTypeId: 100001, + attributes: [], + leadId: 4, + primaryAttributeValue: 'Test Product', + }, + ], + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'marketo', + description: 'Test 2', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'anon_id_success', + channel: 'mobile', + context: { + app: { + build: '1', + name: 'TestAppName', + namespace: 'com.android.sample', + version: '1.0', + }, + device: { + id: 'anon_id_success', + manufacturer: 'Google', + model: 'Android SDK built for x86', + name: 'generic_x86', + type: 'android', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.1-beta.1', + }, + locale: 'en-US', + network: { + carrier: 'Android', + bluetooth: false, + cellular: true, + wifi: true, + }, + os: { + name: 'Android', + version: '8.1.0', + }, + screen: { + density: 420, + height: 1794, + width: 1080, + }, + timezone: 'Asia/Kolkata', + traits: { + anonymousId: 'anon_id_success', + }, + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)', + }, + event: 'Product Clicked', + integrations: { + All: true, + }, + messageId: 'id1', + properties: { + name: 'Test Product', + product_id: 'prod_1', + }, + originalTimestamp: '2020-12-17T21:00:59.176Z', + type: 'track', + sentAt: '2020-12-17T21:00:59.176Z', + }, + destination: { + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + Config: { + accountId: 'marketo_acct_id_success', + clientId: 'marketo_client_id_success', + clientSecret: 'marketo_client_secret_success', + trackAnonymousEvents: true, + customActivityPropertyMap: [ + { + from: 'name', + to: 'productName', + }, + { + from: 'product_id', + to: 'productId', + }, + ], + leadTraitMapping: [ + { + from: 'leadScore', + to: 'customLeadScore', + }, + ], + createIfNotExist: true, + rudderEventsMapping: [ + { + event: 'Product Clicked', + marketoPrimarykey: 'name', + marketoActivityId: '100001', + }, + ], + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + userId: '', + method: 'POST', + endpoint: + 'https://marketo_acct_id_success.mktorest.com/rest/v1/activities/external.json', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer access_token_success', + }, + params: {}, + body: { + JSON: { + input: [ + { + activityDate: '2020-12-17T21:00:59.176Z', + activityTypeId: 100001, + attributes: [ + { + name: 'productId', + value: 'prod_1', + }, + ], + leadId: 4, + primaryAttributeValue: 'Test Product', + }, + ], + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'marketo', + description: 'Test 3', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'anon_id_success', + channel: 'mobile', + context: { + app: { + build: '1', + name: 'TestAppName', + namespace: 'com.android.sample', + version: '1.0', + }, + device: { + id: 'anon_id_success', + manufacturer: 'Google', + model: 'Android SDK built for x86', + name: 'generic_x86', + type: 'android', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.1-beta.1', + }, + locale: 'en-US', + network: { + carrier: 'Android', + bluetooth: false, + cellular: true, + wifi: true, + }, + os: { + name: 'Android', + version: '8.1.0', + }, + screen: { + density: 420, + height: 1794, + width: 1080, + }, + timezone: 'Asia/Kolkata', + traits: { + anonymousId: 'anon_id_success', + }, + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)', + }, + event: 'Product Clicked', + integrations: { + All: true, + }, + messageId: 'id1', + properties: { + name: 'Test Product', + }, + originalTimestamp: '2020-12-17T21:00:59.176Z', + userId: 'user_id_success', + type: 'track', + sentAt: '2020-03-12T09:05:03.421Z', + }, + destination: { + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + Config: { + accountId: 'marketo_acct_id_success', + clientId: 'marketo_client_id_success', + clientSecret: 'marketo_client_secret_success', + trackAnonymousEvents: false, + customActivityPropertyMap: [ + { + from: 'name', + to: 'productName', + }, + ], + leadTraitMapping: [ + { + from: 'leadScore', + to: 'customLeadScore', + }, + ], + createIfNotExist: true, + rudderEventsMapping: [ + { + event: 'Product Clicked', + marketoPrimarykey: 'name', + marketoActivityId: '100001', + }, + ], + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + userId: '', + method: 'POST', + endpoint: + 'https://marketo_acct_id_success.mktorest.com/rest/v1/activities/external.json', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer access_token_success', + }, + params: {}, + body: { + JSON: { + input: [ + { + activityDate: '2020-12-17T21:00:59.176Z', + activityTypeId: 100001, + attributes: [], + leadId: 4, + primaryAttributeValue: 'Test Product', + }, + ], + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'marketo', + description: 'Test 4: ERROR - Request Failed for marketo, Access Token Expired', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'anon_id_success', + channel: 'mobile', + context: { + traits: { + anonymousId: 'anon_id_success', + }, + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)', + }, + event: 'Product Clicked', + integrations: { + All: true, + }, + messageId: 'id1', + properties: { + name: 'Test Product', + }, + originalTimestamp: '2020-12-17T21:00:59.176Z', + userId: 'user_id_success', + type: 'track', + sentAt: '2020-03-12T09:05:03.421Z', + }, + destination: { + ID: '1mMy5cqbtfuaKZv1IhVQKnBerte', + Config: { + accountId: 'marketo_acct_id_token_failure', + clientId: 'marketo_acct_id_token_failure', + clientSecret: 'marketo_acct_id_token_failure', + trackAnonymousEvents: false, + customActivityPropertyMap: [ + { + from: 'name', + to: 'productName', + }, + ], + leadTraitMapping: [ + { + from: 'leadScore', + to: 'customLeadScore', + }, + ], + createIfNotExist: true, + rudderEventsMapping: [ + { + event: 'Product Clicked', + marketoPrimarykey: 'name', + marketoActivityId: '100001', + }, + ], + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 500, + error: + '{"message":"Request Failed for marketo, Access Token Expired (Retryable).During fetching auth token","destinationResponse":{"access_token":"access_token_expired","expires_in":0,"scope":"integrations@rudderstack.com","token_type":"bearer"}}', + statTags: { + errorCategory: 'network', + errorType: 'retryable', + destType: 'MARKETO', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'marketo', + description: 'Test 5: ERROR - Request Failed for marketo, Access Token Expired', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'anon_id_success', + channel: 'mobile', + context: { + app: { + build: '1', + name: 'TestAppName', + namespace: 'com.android.sample', + version: '1.0', + }, + device: { + id: 'anon_id_success', + manufacturer: 'Google', + model: 'Android SDK built for x86', + name: 'generic_x86', + type: 'android', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.1-beta.1', + }, + locale: 'en-US', + network: { + carrier: 'Android', + bluetooth: false, + cellular: true, + wifi: true, + }, + os: { + name: 'Android', + version: '8.1.0', + }, + screen: { + density: 420, + height: 1794, + width: 1080, + }, + timezone: 'Asia/Kolkata', + traits: { + anonymousId: 'anon_id_success', + }, + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)', + }, + event: 'Product Clicked', + integrations: { + All: true, + }, + messageId: 'id1', + properties: { + name: 'Test Product', + }, + originalTimestamp: '2020-12-17T21:00:59.176Z', + userId: 'user_id_success', + type: 'track', + sentAt: '2020-03-12T09:05:03.421Z', + }, + destination: { + ID: '1mMy5cqbtfuaKZv1IhVQKnBerte', + Config: { + accountId: 'marketo_acct_id_failed', + clientId: 'marketo_client_id_success', + clientSecret: 'marketo_client_secret_success', + trackAnonymousEvents: false, + customActivityPropertyMap: [ + { + from: 'name', + to: 'productName', + }, + ], + leadTraitMapping: [ + { + from: 'leadScore', + to: 'customLeadScore', + }, + ], + createIfNotExist: true, + rudderEventsMapping: [ + { + event: 'Product Clicked', + marketoPrimarykey: 'name', + marketoActivityId: '100001', + }, + ], + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 500, + error: + '{"message":"Request Failed for marketo, Access Token Expired (Retryable).During fetching auth token","destinationResponse":{"response":{"success":false,"errors":[{"code":"601","message":"Access Token Expired"}]},"status":200}}', + statTags: { + errorCategory: 'network', + errorType: 'retryable', + destType: 'MARKETO', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'marketo', + description: 'Test 6: ERROR - Invalid traits value for Marketo', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + type: 'identify', + messageId: '84e26acc-56a5-4835-8233-591137fca468', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: '00000000000000000000000000', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + Config: { + accountId: 'marketo_acct_id_success', + clientId: 'marketo_client_id_success', + clientSecret: 'marketo_client_secret_success', + trackAnonymousEvents: true, + customActivityPropertyMap: [ + { + from: 'name', + to: 'productName', + }, + { + from: 'product_id', + to: 'productId', + }, + ], + leadTraitMapping: [ + { + from: 'leadScore', + to: 'customLeadScore', + }, + ], + createIfNotExist: true, + rudderEventsMapping: [ + { + event: 'Product Clicked', + marketoPrimarykey: 'name', + marketoActivityId: '100001', + }, + ], + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: 'Invalid traits value for Marketo', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'MARKETO', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'marketo', + description: 'Test 7: ERROR - Anonymous event tracking is turned off and invalid userId', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'anon_id_success', + channel: 'mobile', + context: { + app: { + build: '1', + name: 'TestAppName', + namespace: 'com.android.sample', + version: '1.0', + }, + device: { + id: 'anon_id_success', + manufacturer: 'Google', + model: 'Android SDK built for x86', + name: 'generic_x86', + type: 'android', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.1-beta.1', + }, + locale: 'en-US', + network: { + carrier: 'Android', + bluetooth: false, + cellular: true, + wifi: true, + }, + os: { + name: 'Android', + version: '8.1.0', + }, + screen: { + density: 420, + height: 1794, + width: 1080, + }, + timezone: 'Asia/Kolkata', + traits: { + anonymousId: 'anon_id_success', + }, + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)', + }, + event: 'Product Clicked', + integrations: { + All: true, + }, + messageId: 'id1', + properties: { + name: 'Test Product', + }, + originalTimestamp: '2020-12-17T21:00:59.176Z', + type: 'track', + sentAt: '2020-03-12T09:05:03.421Z', + }, + destination: { + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + Config: { + accountId: 'marketo_acct_id_success', + clientId: 'marketo_client_id_success', + clientSecret: 'marketo_client_secret_success', + trackAnonymousEvents: false, + customActivityPropertyMap: [ + { + from: 'name', + to: 'productName', + }, + ], + leadTraitMapping: [ + { + from: 'leadScore', + to: 'customLeadScore', + }, + ], + createIfNotExist: true, + rudderEventsMapping: [ + { + event: 'Product Clicked', + marketoPrimarykey: 'name', + marketoActivityId: '100001', + }, + ], + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: 'Anonymous event tracking is turned off and invalid userId', + statTags: { + errorCategory: 'dataValidation', + errorType: 'configuration', + destType: 'MARKETO', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'marketo', + description: 'Test 8: ERROR - Event is not mapped to Custom Activity', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'anon_id_success', + channel: 'mobile', + context: { + app: { + build: '1', + name: 'TestAppName', + namespace: 'com.android.sample', + version: '1.0', + }, + device: { + id: 'anon_id_success', + manufacturer: 'Google', + model: 'Android SDK built for x86', + name: 'generic_x86', + type: 'android', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.1-beta.1', + }, + locale: 'en-US', + network: { + carrier: 'Android', + bluetooth: false, + cellular: true, + wifi: true, + }, + os: { + name: 'Android', + version: '8.1.0', + }, + screen: { + density: 420, + height: 1794, + width: 1080, + }, + timezone: 'Asia/Kolkata', + traits: { + anonymousId: 'anon_id_success', + }, + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)', + }, + event: 'Product Purchased', + integrations: { + All: true, + }, + messageId: 'id1', + properties: { + name: 'Test Product', + }, + originalTimestamp: '2020-12-17T21:00:59.176Z', + type: 'track', + sentAt: '2020-03-12T09:05:03.421Z', + }, + destination: { + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + Config: { + accountId: 'marketo_acct_id_success', + clientId: 'marketo_client_id_success', + clientSecret: 'marketo_client_secret_success', + trackAnonymousEvents: true, + customActivityPropertyMap: [ + { + from: 'name', + to: 'productName', + }, + ], + leadTraitMapping: [ + { + from: 'leadScore', + to: 'customLeadScore', + }, + ], + createIfNotExist: true, + rudderEventsMapping: [ + { + event: 'Product Clicked', + marketoPrimarykey: 'name', + marketoActivityId: '100001', + }, + ], + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: 'Event is not mapped to Custom Activity', + statTags: { + errorCategory: 'dataValidation', + errorType: 'configuration', + destType: 'MARKETO', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'marketo', + description: 'Test 9: ERROR - Primary Key value is invalid for the event', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'anon_id_success', + channel: 'mobile', + context: { + app: { + build: '1', + name: 'TestAppName', + namespace: 'com.android.sample', + version: '1.0', + }, + device: { + id: 'anon_id_success', + manufacturer: 'Google', + model: 'Android SDK built for x86', + name: 'generic_x86', + type: 'android', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.1-beta.1', + }, + locale: 'en-US', + network: { + carrier: 'Android', + bluetooth: false, + cellular: true, + wifi: true, + }, + os: { + name: 'Android', + version: '8.1.0', + }, + screen: { + density: 420, + height: 1794, + width: 1080, + }, + timezone: 'Asia/Kolkata', + traits: { + anonymousId: 'anon_id_success', + }, + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)', + }, + event: 'Product Clicked', + integrations: { + All: true, + }, + messageId: 'id1', + properties: { + product_name: 'Test Product', + }, + originalTimestamp: '2020-12-17T21:00:59.176Z', + type: 'track', + sentAt: '2020-03-12T09:05:03.421Z', + }, + destination: { + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + Config: { + accountId: 'marketo_acct_id_success', + clientId: 'marketo_client_id_success', + clientSecret: 'marketo_client_secret_success', + trackAnonymousEvents: true, + customActivityPropertyMap: [ + { + from: 'name', + to: 'productName', + }, + ], + leadTraitMapping: [ + { + from: 'leadScore', + to: 'customLeadScore', + }, + ], + createIfNotExist: true, + rudderEventsMapping: [ + { + event: 'Product Clicked', + marketoPrimarykey: 'name', + marketoActivityId: '100001', + }, + ], + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: 'Primary Key value is invalid for the event', + statTags: { + errorCategory: 'dataValidation', + errorType: 'configuration', + destType: 'MARKETO', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'marketo', + description: 'Test 10: ERROR - Message Type is not present. Aborting message.', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'anon_id_success', + channel: 'mobile', + context: { + app: { + build: '1', + name: 'TestAppName', + namespace: 'com.android.sample', + version: '1.0', + }, + device: { + id: 'anon_id_success', + manufacturer: 'Google', + model: 'Android SDK built for x86', + name: 'generic_x86', + type: 'android', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.1-beta.1', + }, + locale: 'en-US', + network: { + carrier: 'Android', + bluetooth: false, + cellular: true, + wifi: true, + }, + os: { + name: 'Android', + version: '8.1.0', + }, + screen: { + density: 420, + height: 1794, + width: 1080, + }, + timezone: 'Asia/Kolkata', + traits: { + anonymousId: 'anon_id_success', + }, + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)', + }, + event: 'Product Clicked', + integrations: { + All: true, + }, + messageId: 'id1', + properties: { + product_name: 'Test Product', + }, + originalTimestamp: '2020-12-17T21:00:59.176Z', + sentAt: '2020-03-12T09:05:03.421Z', + }, + destination: { + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + Config: { + accountId: 'marketo_acct_id_success', + clientId: 'marketo_client_id_success', + clientSecret: 'marketo_client_secret_success', + trackAnonymousEvents: true, + customActivityPropertyMap: [ + { + from: 'name', + to: 'productName', + }, + ], + leadTraitMapping: [ + { + from: 'leadScore', + to: 'customLeadScore', + }, + ], + createIfNotExist: true, + rudderEventsMapping: [ + { + event: 'Product Clicked', + marketoPrimarykey: 'name', + marketoActivityId: '100001', + }, + ], + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: 'Message Type is not present. Aborting message.', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'MARKETO', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'marketo', + description: 'Test 11: ERROR - Message type not supported', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: 'anon_id_success', + channel: 'mobile', + context: { + app: { + build: '1', + name: 'TestAppName', + namespace: 'com.android.sample', + version: '1.0', + }, + device: { + id: 'anon_id_success', + manufacturer: 'Google', + model: 'Android SDK built for x86', + name: 'generic_x86', + type: 'android', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.1-beta.1', + }, + locale: 'en-US', + network: { + carrier: 'Android', + bluetooth: false, + cellular: true, + wifi: true, + }, + os: { + name: 'Android', + version: '8.1.0', + }, + screen: { + density: 420, + height: 1794, + width: 1080, + }, + timezone: 'Asia/Kolkata', + traits: { + anonymousId: 'anon_id_success', + }, + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)', + }, + event: 'Product Clicked', + integrations: { + All: true, + }, + messageId: 'id1', + properties: { + product_name: 'Test Product', + }, + originalTimestamp: '2020-12-17T21:00:59.176Z', + type: 'screen', + sentAt: '2020-03-12T09:05:03.421Z', + }, + destination: { + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + Config: { + accountId: 'marketo_acct_id_success', + clientId: 'marketo_client_id_success', + clientSecret: 'marketo_client_secret_success', + trackAnonymousEvents: true, + customActivityPropertyMap: [ + { + from: 'name', + to: 'productName', + }, + ], + leadTraitMapping: [ + { + from: 'leadScore', + to: 'customLeadScore', + }, + ], + createIfNotExist: true, + rudderEventsMapping: [ + { + event: 'Product Clicked', + marketoPrimarykey: 'name', + marketoActivityId: '100001', + }, + ], + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: 'Message type not supported', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'MARKETO', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'marketo', + description: 'Test 12', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + type: 'identify', + messageId: '84e26acc-56a5-4835-8233-591137fca468', + originalTimestamp: '2019-10-14T09:03:17.562Z', + anonymousId: '00000000000000000000000000', + integrations: { + All: true, + }, + traits: { + score: '0.5', + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + Config: { + accountId: 'marketo_acct_id_success', + clientId: 'marketo_client_id_success', + clientSecret: 'marketo_client_secret_success', + trackAnonymousEvents: true, + customActivityPropertyMap: [ + { + from: 'name', + to: 'productName', + }, + { + from: 'product_id', + to: 'productId', + }, + ], + leadTraitMapping: [ + { + from: 'score', + to: 'customLeadScore', + }, + ], + rudderEventsMapping: [ + { + event: 'Product Clicked', + marketoPrimarykey: 'name', + marketoActivityId: '100001', + }, + ], + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + userId: '', + method: 'POST', + endpoint: 'https://marketo_acct_id_success.mktorest.com/rest/v1/leads.json', + headers: { + Authorization: 'Bearer access_token_success', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + action: 'createOrUpdate', + input: [ + { + customLeadScore: '0.5', + id: 4, + }, + ], + lookupField: 'id', + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'marketo', + description: 'Test 13', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + channel: 'sources', + context: { + externalId: [ + { + id: 'lynnanderson@smith.net', + identifierType: 'email', + type: 'MARKETO-new_user', + }, + ], + traits: { + marketoGUID: '23', + administrative_unit: 'Minnesota', + am_pm: 'AM', + boolean: true, + firstname: 'Jacqueline', + pPower: 'AM', + userId: 'Jacqueline', + }, + sources: { + batch_id: 'f5f240d0-0acb-46e0-b043-57fb0aabbadd', + job_id: '1zAj94bEy8komdqnYtSoDp0VmGs/Syncher', + job_run_id: 'c5tar6cqgmgmcjvupdhg', + task_id: 'tt_10_rows_check', + task_run_id: 'c5tar6cqgmgmcjvupdi0', + version: 'release.v1.6.8', + }, + }, + messageId: '2f052f7c-f694-4849-a7ed-a432f7ffa0a4', + originalTimestamp: '2021-10-28T14:03:50.503Z', + receivedAt: '2021-10-28T14:03:46.567Z', + recordId: '8', + request_ip: '10.1.94.92', + rudderId: 'c0f6843e-e3d6-4946-9752-fa339fbadef2', + sentAt: '2021-10-28T14:03:50.503Z', + timestamp: '2021-10-28T14:03:46.566Z', + type: 'identify', + userId: 'dummyMail@dummyDomain.com', + }, + destination: { + ID: '1zia9wKshXt80YksLmUdJnr7IHI', + Name: 'test_marketo', + DestinationDefinition: { + ID: '1iVQvTRMsPPyJzwol0ifH93QTQ6', + Name: 'MARKETO', + DisplayName: 'Marketo', + Config: { + destConfig: { + defaultConfig: [], + }, + excludeKeys: [], + includeKeys: [], + saveDestinationResponse: true, + secretKeys: [], + supportedMessageTypes: ['identify', 'page', 'screen', 'track'], + supportedSourceTypes: [ + 'android', + 'ios', + 'web', + 'unity', + 'amp', + 'cloud', + 'warehouse', + 'reactnative', + 'flutter', + 'cordova', + ], + supportsVisualMapper: true, + transformAt: 'processor', + transformAtV1: 'processor', + }, + ResponseRules: null, + }, + Config: { + clientId: 'marketo_client_id_success', + clientSecret: 'marketo_client_secret_success', + accountId: 'marketo_acct_id_success', + rudderEventsMapping: [], + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + libraries: [], + request: { + query: {}, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + userId: '', + method: 'POST', + endpoint: 'https://marketo_acct_id_success.mktorest.com/rest/v1/leads.json', + headers: { + Authorization: 'Bearer access_token_success', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + action: 'createOrUpdate', + input: [{ id: 4, userId: 'dummyMail@dummyDomain.com' }], + lookupField: 'id', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + statusCode: 200, + }, + ], + }, + }, + }, +]; diff --git a/test/integrations/destinations/marketo/router/data.ts b/test/integrations/destinations/marketo/router/data.ts new file mode 100644 index 0000000000..0fa79b77df --- /dev/null +++ b/test/integrations/destinations/marketo/router/data.ts @@ -0,0 +1,2132 @@ +export const data = [ + { + name: 'marketo', + description: 'Test 0', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + message: { + anonymousId: 'anon_id_success', + channel: 'mobile', + context: { + app: { + build: '1', + name: 'TestAppName', + namespace: 'com.android.sample', + version: '1.0', + }, + device: { + id: 'anon_id_success', + manufacturer: 'Google', + model: 'Android SDK built for x86', + name: 'generic_x86', + type: 'android', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.1-beta.1', + }, + locale: 'en-US', + network: { + carrier: 'Android', + bluetooth: false, + cellular: true, + wifi: true, + }, + os: { + name: 'Android', + version: '8.1.0', + }, + screen: { + density: 420, + height: 1794, + width: 1080, + }, + timezone: 'Asia/Kolkata', + traits: { + anonymousId: 'anon_id_success', + }, + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)', + }, + event: 'Product Clicked', + integrations: { + All: true, + }, + messageId: 'id1', + properties: { + name: 'Test Product', + }, + originalTimestamp: '2020-12-17T21:00:59.176Z', + type: 'track', + sentAt: '2020-03-12T09:05:03.421Z', + }, + metadata: { + jobId: 1, + }, + destination: { + Config: { + accountId: 'marketo_acct_id_success', + clientId: 'marketo_client_id_success', + clientSecret: 'marketo_client_secret_success', + trackAnonymousEvents: true, + customActivityPropertyMap: [ + { + from: 'name', + to: 'productName', + }, + ], + leadTraitMapping: [ + { + from: 'leadScore', + to: 'customLeadScore', + }, + ], + rudderEventsMapping: [ + { + event: 'Product Clicked', + marketoPrimarykey: 'name', + marketoActivityId: '100001', + }, + ], + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + name: 'Marketo', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmLd', + deleted: false, + createdAt: '2020-12-30T08:39:32.005Z', + updatedAt: '2021-02-03T16:22:31.374Z', + destinationDefinition: { + config: { + destConfig: { + defaultConfig: [ + 'accountId', + 'clientId', + 'clientSecret', + 'trackAnonymousEvents', + 'rudderEventsMapping', + 'customActivityPropertyMap', + 'leadTraitMapping', + ], + }, + secretKeys: ['clientSecret'], + excludeKeys: [], + includeKeys: [], + routerTransform: true, + supportedSourceTypes: [ + 'android', + 'ios', + 'web', + 'unity', + 'amp', + 'cloud', + 'reactnative', + ], + }, + responseRules: { + responseType: 'JSON', + rules: { + retryable: [ + { + success: 'false', + 'errors.0.code': 600, + }, + { + success: 'false', + 'errors.0.code': 601, + }, + { + success: 'false', + 'errors.0.code': 602, + }, + { + success: 'false', + 'errors.0.code': 604, + }, + { + success: 'false', + 'errors.0.code': 606, + }, + { + success: 'false', + 'errors.0.code': 607, + }, + { + success: 'false', + 'errors.0.code': 608, + }, + { + success: 'false', + 'errors.0.code': 611, + }, + ], + abortable: [ + { + success: 'false', + 'errors.0.code': 603, + }, + { + success: 'false', + 'errors.0.code': 605, + }, + { + success: 'false', + 'errors.0.code': 609, + }, + { + success: 'false', + 'errors.0.code': 610, + }, + ], + }, + }, + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'MARKETO', + displayName: 'Marketo', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + }, + { + message: { + anonymousId: 'anon_id_success', + channel: 'mobile', + context: { + app: { + build: '1', + name: 'TestAppName', + namespace: 'com.android.sample', + version: '1.0', + }, + device: { + id: 'anon_id_success', + manufacturer: 'Google', + model: 'Android SDK built for x86', + name: 'generic_x86', + type: 'android', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.1-beta.1', + }, + locale: 'en-US', + network: { + carrier: 'Android', + bluetooth: false, + cellular: true, + wifi: true, + }, + os: { + name: 'Android', + version: '8.1.0', + }, + screen: { + density: 420, + height: 1794, + width: 1080, + }, + timezone: 'Asia/Kolkata', + traits: { + anonymousId: 'anon_id_success', + }, + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)', + }, + event: 'Product Clicked', + integrations: { + All: true, + }, + messageId: 'id1', + properties: { + name: 'Test Product', + product_id: 'prod_1', + }, + originalTimestamp: '2020-12-17T21:00:59.176Z', + type: 'track', + sentAt: '2020-12-17T21:00:59.176Z', + }, + metadata: { + jobId: 2, + }, + destination: { + Config: { + accountId: 'marketo_acct_id_success', + clientId: 'marketo_client_id_success', + clientSecret: 'marketo_client_secret_success', + trackAnonymousEvents: true, + customActivityPropertyMap: [ + { + from: 'name', + to: 'productName', + }, + ], + leadTraitMapping: [ + { + from: 'leadScore', + to: 'customLeadScore', + }, + ], + rudderEventsMapping: [ + { + event: 'Product Clicked', + marketoPrimarykey: 'name', + marketoActivityId: '100001', + }, + ], + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + name: 'Marketo', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmLd', + deleted: false, + createdAt: '2020-12-30T08:39:32.005Z', + updatedAt: '2021-02-03T16:22:31.374Z', + destinationDefinition: { + config: { + destConfig: { + defaultConfig: [ + 'accountId', + 'clientId', + 'clientSecret', + 'trackAnonymousEvents', + 'rudderEventsMapping', + 'customActivityPropertyMap', + 'leadTraitMapping', + ], + }, + secretKeys: ['clientSecret'], + excludeKeys: [], + includeKeys: [], + routerTransform: true, + supportedSourceTypes: [ + 'android', + 'ios', + 'web', + 'unity', + 'amp', + 'cloud', + 'reactnative', + ], + }, + responseRules: { + responseType: 'JSON', + rules: { + retryable: [ + { + success: 'false', + 'errors.0.code': 600, + }, + { + success: 'false', + 'errors.0.code': 601, + }, + { + success: 'false', + 'errors.0.code': 602, + }, + { + success: 'false', + 'errors.0.code': 604, + }, + { + success: 'false', + 'errors.0.code': 606, + }, + { + success: 'false', + 'errors.0.code': 607, + }, + { + success: 'false', + 'errors.0.code': 608, + }, + { + success: 'false', + 'errors.0.code': 611, + }, + ], + abortable: [ + { + success: 'false', + 'errors.0.code': 603, + }, + { + success: 'false', + 'errors.0.code': 605, + }, + { + success: 'false', + 'errors.0.code': 609, + }, + { + success: 'false', + 'errors.0.code': 610, + }, + ], + }, + }, + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'MARKETO', + displayName: 'Marketo', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + }, + { + message: { + type: 'identify', + sentAt: '2022-09-19T10:34:02.002Z', + userId: 'e17c5a5e-5e2f-430b-b497-fe3f1ea3a704', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '2.12.1', + namespace: 'com.rudderlabs.javascript', + }, + page: { + url: 'https://accounts.app.t2.broken.com/home', + path: '/home', + title: 'Home', + search: '', + tab_url: 'https://accounts.app.t2.broken.com/home', + referrer: 'https://ts50-cvii.core.broken.org/', + initial_referrer: 'https://ts50-cvii.core.broken.org/', + referring_domain: 'ts50-cvii.core.broken.org', + initial_referring_domain: 'ts50-cvii.core.broken.org', + }, + locale: 'en-IN', + screen: { + width: 1728, + height: 1117, + density: 2, + innerWidth: 1728, + innerHeight: 969, + }, + traits: { + name: 'AM', + email: '0c7b8b80-9c43-4f8e-b2d2-5e2448a25040@j.mail', + lastName: 'M', + firstName: 'A', + accountName: 'MACDEV', + billingName: 'g g', + companyName: 'macDev', + currentTier: 'Webinar Pro 250', + billingCycle: 'Annually', + lastBillingDate: '2022-06-29T09:40:42.000Z', + nextBillingDate: '2023-09-09T04:00:00.000Z', + subscriptionType: 'Webinar Pro 250', + subscriptionStatus: 'ACTIVE', + lastWebinarEventDate: '2022-09-15T20:00:00.000Z', + nextWebinarEventDate: '2022-09-16T06:15:00.000Z', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '2.12.1', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36', + }, + rudderId: '73dc83ef-587f-4077-90f3-c36083e64019', + messageId: '1663583642000200-e3f31c4c-6361-4f99-b643-7755303a6007', + timestamp: '2022-09-19T10:34:02.954Z', + receivedAt: '2022-09-19T10:34:02.956Z', + request_ip: '11.105.44.120', + anonymousId: '0c7b8b80-9c43-4f8e-b2d2-5e2448a25040', + integrations: { + All: true, + }, + originalTimestamp: '2022-09-19T10:34:02.000Z', + }, + destination: { + Config: { + accountId: 'valid_account_broken_event', + clientId: '504300cd-76b2-a7l4-bhle-90a07420nx73', + clientSecret: '3l3gJpzRsZagD6gu7tnTeKXz0bomLGnd', + trackAnonymousEvents: false, + createIfNotExist: true, + rudderEventsMapping: [ + { + event: 'acq_signup_completed', + marketoActivityId: '100026', + }, + { + event: 'act_createwebinarform_submit', + marketoActivityId: '100025', + }, + { + event: 'act_presentation_style', + marketoActivityId: '100025', + }, + { + event: 'act_webinar_view', + marketoActivityId: '100025', + }, + { + event: 'act_webinar_join', + marketoActivityId: '100025', + }, + { + event: 'act_presentation_addteammember', + marketoActivityId: '100025', + }, + { + event: 'act_engagement_discussions_savediscussion', + marketoActivityId: '100025', + }, + { + event: 'act_engagement_networking_savetime', + marketoActivityId: '100025', + }, + ], + }, + destinationDefinition: { + config: { + destConfig: { + defaultConfig: [ + 'accountId', + 'clientId', + 'clientSecret', + 'trackAnonymousEvents', + 'rudderEventsMapping', + 'customActivityPropertyMap', + 'leadTraitMapping', + ], + }, + secretKeys: ['clientSecret'], + excludeKeys: [], + includeKeys: [], + routerTransform: true, + supportedSourceTypes: [ + 'android', + 'ios', + 'web', + 'unity', + 'amp', + 'cloud', + 'reactnative', + ], + }, + responseRules: { + responseType: 'JSON', + rules: { + retryable: [ + { + success: 'false', + 'errors.0.code': 600, + }, + { + success: 'false', + 'errors.0.code': 601, + }, + { + success: 'false', + 'errors.0.code': 602, + }, + { + success: 'false', + 'errors.0.code': 604, + }, + { + success: 'false', + 'errors.0.code': 606, + }, + { + success: 'false', + 'errors.0.code': 607, + }, + { + success: 'false', + 'errors.0.code': 608, + }, + { + success: 'false', + 'errors.0.code': 611, + }, + ], + abortable: [ + { + success: 'false', + 'errors.0.code': 603, + }, + { + success: 'false', + 'errors.0.code': 605, + }, + { + success: 'false', + 'errors.0.code': 609, + }, + { + success: 'false', + 'errors.0.code': 610, + }, + ], + }, + }, + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'MARKETO', + displayName: 'Marketo', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVke', + name: 'Marketo', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmMd', + deleted: false, + createdAt: '2022-02-10T08:39:32.005Z', + updatedAt: '2022-09-03T16:22:31.374Z', + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + metadata: { + jobId: 3, + }, + }, + { + message: { + type: 'identify', + sentAt: '2022-09-19T10:34:02.002Z', + userId: 'e17c5a5e-5e2f-430b-b497-fe3f1ea3a704', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '2.12.1', + namespace: 'com.rudderlabs.javascript', + }, + page: { + url: 'https://accounts.app.t2.broken.com/home', + path: '/home', + title: 'Home', + search: '', + tab_url: 'https://accounts.app.t2.broken.com/home', + referrer: 'https://ts50-cvii.core.broken.org/', + initial_referrer: 'https://ts50-cvii.core.broken.org/', + referring_domain: 'ts50-cvii.core.broken.org', + initial_referring_domain: 'ts50-cvii.core.broken.org', + }, + locale: 'en-IN', + screen: { + width: 1728, + height: 1117, + density: 2, + innerWidth: 1728, + innerHeight: 969, + }, + traits: { + name: 'AM', + email: '0c7b8b80-9c43-4f8e-b2d2-5e2448a25040@j.mail', + lastName: 'M', + firstName: 'A', + accountName: 'MACDEV', + billingName: 'g g', + companyName: 'macDev', + currentTier: 'Webinar Pro 250', + billingCycle: 'Annually', + lastBillingDate: '2022-06-29T09:40:42.000Z', + nextBillingDate: '2023-09-09T04:00:00.000Z', + subscriptionType: 'Webinar Pro 250', + subscriptionStatus: 'ACTIVE', + lastWebinarEventDate: '2022-09-15T20:00:00.000Z', + nextWebinarEventDate: '2022-09-16T06:15:00.000Z', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '2.12.1', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36', + }, + rudderId: '73dc83ef-587f-4077-90f3-c36083e64019', + messageId: '1663583642000200-e3f31c4c-6361-4f99-b643-7755303a6007', + timestamp: '2022-09-19T10:34:02.954Z', + receivedAt: '2022-09-19T10:34:02.956Z', + request_ip: '11.105.44.120', + anonymousId: '0c7b8b80-9c43-4f8e-b2d2-5e2448a25040', + integrations: { + All: true, + }, + originalTimestamp: '2022-09-19T10:34:02.000Z', + }, + destination: { + Config: { + accountId: 'unhandled_status_code', + clientId: '504300cd-76b2-a7l4-bhle-90a07420nx73', + clientSecret: '3l3gJpzRsZagD6gu7tnTeKXz0bomLGnd', + trackAnonymousEvents: false, + createIfNotExist: true, + rudderEventsMapping: [ + { + event: 'acq_signup_completed', + marketoActivityId: '100026', + }, + { + event: 'act_createwebinarform_submit', + marketoActivityId: '100025', + }, + { + event: 'act_presentation_style', + marketoActivityId: '100025', + }, + { + event: 'act_webinar_view', + marketoActivityId: '100025', + }, + { + event: 'act_webinar_join', + marketoActivityId: '100025', + }, + { + event: 'act_presentation_addteammember', + marketoActivityId: '100025', + }, + { + event: 'act_engagement_discussions_savediscussion', + marketoActivityId: '100025', + }, + { + event: 'act_engagement_networking_savetime', + marketoActivityId: '100025', + }, + ], + }, + destinationDefinition: { + config: { + destConfig: { + defaultConfig: [ + 'accountId', + 'clientId', + 'clientSecret', + 'trackAnonymousEvents', + 'rudderEventsMapping', + 'customActivityPropertyMap', + 'leadTraitMapping', + ], + }, + secretKeys: ['clientSecret'], + excludeKeys: [], + includeKeys: [], + routerTransform: true, + supportedSourceTypes: [ + 'android', + 'ios', + 'web', + 'unity', + 'amp', + 'cloud', + 'reactnative', + ], + }, + responseRules: { + responseType: 'JSON', + rules: { + retryable: [ + { + success: 'false', + 'errors.0.code': 600, + }, + { + success: 'false', + 'errors.0.code': 601, + }, + { + success: 'false', + 'errors.0.code': 602, + }, + { + success: 'false', + 'errors.0.code': 604, + }, + { + success: 'false', + 'errors.0.code': 606, + }, + { + success: 'false', + 'errors.0.code': 607, + }, + { + success: 'false', + 'errors.0.code': 608, + }, + { + success: 'false', + 'errors.0.code': 611, + }, + ], + abortable: [ + { + success: 'false', + 'errors.0.code': 603, + }, + { + success: 'false', + 'errors.0.code': 605, + }, + { + success: 'false', + 'errors.0.code': 609, + }, + { + success: 'false', + 'errors.0.code': 610, + }, + ], + }, + }, + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'MARKETO', + displayName: 'Marketo', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVke', + name: 'Marketo', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmMd', + deleted: false, + createdAt: '2022-02-10T08:39:32.005Z', + updatedAt: '2022-09-03T16:22:31.374Z', + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + metadata: { + jobId: 4, + }, + }, + { + message: { + type: 'identify', + sentAt: '2022-09-19T10:34:02.002Z', + userId: 'e17c5a5e-5e2f-430b-b497-fe3f1ea3a704', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '2.12.1', + namespace: 'com.rudderlabs.javascript', + }, + page: { + url: 'https://accounts.app.t2.broken.com/home', + path: '/home', + title: 'Home', + search: '', + tab_url: 'https://accounts.app.t2.broken.com/home', + referrer: 'https://ts50-cvii.core.broken.org/', + initial_referrer: 'https://ts50-cvii.core.broken.org/', + referring_domain: 'ts50-cvii.core.broken.org', + initial_referring_domain: 'ts50-cvii.core.broken.org', + }, + locale: 'en-IN', + screen: { + width: 1728, + height: 1117, + density: 2, + innerWidth: 1728, + innerHeight: 969, + }, + traits: { + name: 'AM', + email: '0c7b8b80-9c43-4f8e-b2d2-5e2448a25040@j.mail', + lastName: 'M', + firstName: 'A', + accountName: 'MACDEV', + billingName: 'g g', + companyName: 'macDev', + currentTier: 'Webinar Pro 250', + billingCycle: 'Annually', + lastBillingDate: '2022-06-29T09:40:42.000Z', + nextBillingDate: '2023-09-09T04:00:00.000Z', + subscriptionType: 'Webinar Pro 250', + subscriptionStatus: 'ACTIVE', + lastWebinarEventDate: '2022-09-15T20:00:00.000Z', + nextWebinarEventDate: '2022-09-16T06:15:00.000Z', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '2.12.1', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36', + }, + rudderId: '73dc83ef-587f-4077-90f3-c36083e64019', + messageId: '1663583642000200-e3f31c4c-6361-4f99-b643-7755303a6007', + timestamp: '2022-09-19T10:34:02.954Z', + receivedAt: '2022-09-19T10:34:02.956Z', + request_ip: '11.105.44.120', + anonymousId: '0c7b8b80-9c43-4f8e-b2d2-5e2448a25040', + integrations: { + All: true, + }, + originalTimestamp: '2022-09-19T10:34:02.000Z', + }, + destination: { + Config: { + accountId: 'successful_identify_transformation', + clientId: '504300cd-76b2-a7l4-bhle-90a07420nx73', + clientSecret: '3l3gJpzRsZagD6gu7tnTeKXz0bomLGnd', + trackAnonymousEvents: false, + createIfNotExist: true, + rudderEventsMapping: [ + { + event: 'acq_signup_completed', + marketoActivityId: '100026', + }, + { + event: 'act_createwebinarform_submit', + marketoActivityId: '100025', + }, + { + event: 'act_presentation_style', + marketoActivityId: '100025', + }, + { + event: 'act_webinar_view', + marketoActivityId: '100025', + }, + { + event: 'act_webinar_join', + marketoActivityId: '100025', + }, + { + event: 'act_presentation_addteammember', + marketoActivityId: '100025', + }, + { + event: 'act_engagement_discussions_savediscussion', + marketoActivityId: '100025', + }, + { + event: 'act_engagement_networking_savetime', + marketoActivityId: '100025', + }, + ], + }, + destinationDefinition: { + config: { + destConfig: { + defaultConfig: [ + 'accountId', + 'clientId', + 'clientSecret', + 'trackAnonymousEvents', + 'rudderEventsMapping', + 'customActivityPropertyMap', + 'leadTraitMapping', + ], + }, + secretKeys: ['clientSecret'], + excludeKeys: [], + includeKeys: [], + routerTransform: true, + supportedSourceTypes: [ + 'android', + 'ios', + 'web', + 'unity', + 'amp', + 'cloud', + 'reactnative', + ], + }, + responseRules: { + responseType: 'JSON', + rules: { + retryable: [ + { + success: 'false', + 'errors.0.code': 600, + }, + { + success: 'false', + 'errors.0.code': 601, + }, + { + success: 'false', + 'errors.0.code': 602, + }, + { + success: 'false', + 'errors.0.code': 604, + }, + { + success: 'false', + 'errors.0.code': 606, + }, + { + success: 'false', + 'errors.0.code': 607, + }, + { + success: 'false', + 'errors.0.code': 608, + }, + { + success: 'false', + 'errors.0.code': 611, + }, + ], + abortable: [ + { + success: 'false', + 'errors.0.code': 603, + }, + { + success: 'false', + 'errors.0.code': 605, + }, + { + success: 'false', + 'errors.0.code': 609, + }, + { + success: 'false', + 'errors.0.code': 610, + }, + ], + }, + }, + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'MARKETO', + displayName: 'Marketo', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVke', + name: 'Marketo', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmMd', + deleted: false, + createdAt: '2022-02-10T08:39:32.005Z', + updatedAt: '2022-09-03T16:22:31.374Z', + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + metadata: { + jobId: 5, + }, + }, + ], + destType: 'marketo', + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://marketo_acct_id_success.mktorest.com/rest/v1/activities/external.json', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer access_token_success', + }, + params: {}, + body: { + JSON: { + input: [ + { + activityDate: '2020-12-17T21:00:59.176Z', + activityTypeId: 100001, + attributes: [], + leadId: 4, + primaryAttributeValue: 'Test Product', + }, + ], + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + }, + metadata: [ + { + destInfo: { + authKey: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + }, + jobId: 1, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + accountId: 'marketo_acct_id_success', + clientId: 'marketo_client_id_success', + clientSecret: 'marketo_client_secret_success', + trackAnonymousEvents: true, + customActivityPropertyMap: [ + { + from: 'name', + to: 'productName', + }, + ], + leadTraitMapping: [ + { + from: 'leadScore', + to: 'customLeadScore', + }, + ], + rudderEventsMapping: [ + { + event: 'Product Clicked', + marketoPrimarykey: 'name', + marketoActivityId: '100001', + }, + ], + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + name: 'Marketo', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmLd', + deleted: false, + createdAt: '2020-12-30T08:39:32.005Z', + updatedAt: '2021-02-03T16:22:31.374Z', + destinationDefinition: { + config: { + destConfig: { + defaultConfig: [ + 'accountId', + 'clientId', + 'clientSecret', + 'trackAnonymousEvents', + 'rudderEventsMapping', + 'customActivityPropertyMap', + 'leadTraitMapping', + ], + }, + secretKeys: ['clientSecret'], + excludeKeys: [], + includeKeys: [], + routerTransform: true, + supportedSourceTypes: [ + 'android', + 'ios', + 'web', + 'unity', + 'amp', + 'cloud', + 'reactnative', + ], + }, + responseRules: { + responseType: 'JSON', + rules: { + retryable: [ + { + success: 'false', + 'errors.0.code': 600, + }, + { + success: 'false', + 'errors.0.code': 601, + }, + { + success: 'false', + 'errors.0.code': 602, + }, + { + success: 'false', + 'errors.0.code': 604, + }, + { + success: 'false', + 'errors.0.code': 606, + }, + { + success: 'false', + 'errors.0.code': 607, + }, + { + success: 'false', + 'errors.0.code': 608, + }, + { + success: 'false', + 'errors.0.code': 611, + }, + ], + abortable: [ + { + success: 'false', + 'errors.0.code': 603, + }, + { + success: 'false', + 'errors.0.code': 605, + }, + { + success: 'false', + 'errors.0.code': 609, + }, + { + success: 'false', + 'errors.0.code': 610, + }, + ], + }, + }, + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'MARKETO', + displayName: 'Marketo', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + }, + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://marketo_acct_id_success.mktorest.com/rest/v1/activities/external.json', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer access_token_success', + }, + params: {}, + body: { + JSON: { + input: [ + { + activityDate: '2020-12-17T21:00:59.176Z', + activityTypeId: 100001, + attributes: [], + leadId: 4, + primaryAttributeValue: 'Test Product', + }, + ], + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + }, + metadata: [ + { + destInfo: { + authKey: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + }, + jobId: 2, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + accountId: 'marketo_acct_id_success', + clientId: 'marketo_client_id_success', + clientSecret: 'marketo_client_secret_success', + trackAnonymousEvents: true, + customActivityPropertyMap: [ + { + from: 'name', + to: 'productName', + }, + ], + leadTraitMapping: [ + { + from: 'leadScore', + to: 'customLeadScore', + }, + ], + rudderEventsMapping: [ + { + event: 'Product Clicked', + marketoPrimarykey: 'name', + marketoActivityId: '100001', + }, + ], + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + name: 'Marketo', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmLd', + deleted: false, + createdAt: '2020-12-30T08:39:32.005Z', + updatedAt: '2021-02-03T16:22:31.374Z', + destinationDefinition: { + config: { + destConfig: { + defaultConfig: [ + 'accountId', + 'clientId', + 'clientSecret', + 'trackAnonymousEvents', + 'rudderEventsMapping', + 'customActivityPropertyMap', + 'leadTraitMapping', + ], + }, + secretKeys: ['clientSecret'], + excludeKeys: [], + includeKeys: [], + routerTransform: true, + supportedSourceTypes: [ + 'android', + 'ios', + 'web', + 'unity', + 'amp', + 'cloud', + 'reactnative', + ], + }, + responseRules: { + responseType: 'JSON', + rules: { + retryable: [ + { + success: 'false', + 'errors.0.code': 600, + }, + { + success: 'false', + 'errors.0.code': 601, + }, + { + success: 'false', + 'errors.0.code': 602, + }, + { + success: 'false', + 'errors.0.code': 604, + }, + { + success: 'false', + 'errors.0.code': 606, + }, + { + success: 'false', + 'errors.0.code': 607, + }, + { + success: 'false', + 'errors.0.code': 608, + }, + { + success: 'false', + 'errors.0.code': 611, + }, + ], + abortable: [ + { + success: 'false', + 'errors.0.code': 603, + }, + { + success: 'false', + 'errors.0.code': 605, + }, + { + success: 'false', + 'errors.0.code': 609, + }, + { + success: 'false', + 'errors.0.code': 610, + }, + ], + }, + }, + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'MARKETO', + displayName: 'Marketo', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + }, + { + batched: false, + statusCode: 400, + error: + '{"message":"Request Failed for marketo, Lookup field \'userId\' not found (Aborted).[Marketo Transformer]: During lead look up using email","destinationResponse":{"response":{"requestId":"142e4#1835b117b76","success":false,"errors":[{"code":"1006","message":"Lookup field \'userId\' not found"}]},"status":200}}', + statTags: { + errorCategory: 'network', + errorType: 'aborted', + }, + metadata: [ + { + destInfo: { + authKey: '1mMy5cqbtfuaKZv1IhVQKnBdVke', + }, + jobId: 3, + }, + ], + destination: { + Config: { + accountId: 'valid_account_broken_event', + clientId: '504300cd-76b2-a7l4-bhle-90a07420nx73', + clientSecret: '3l3gJpzRsZagD6gu7tnTeKXz0bomLGnd', + trackAnonymousEvents: false, + createIfNotExist: true, + rudderEventsMapping: [ + { + event: 'acq_signup_completed', + marketoActivityId: '100026', + }, + { + event: 'act_createwebinarform_submit', + marketoActivityId: '100025', + }, + { + event: 'act_presentation_style', + marketoActivityId: '100025', + }, + { + event: 'act_webinar_view', + marketoActivityId: '100025', + }, + { + event: 'act_webinar_join', + marketoActivityId: '100025', + }, + { + event: 'act_presentation_addteammember', + marketoActivityId: '100025', + }, + { + event: 'act_engagement_discussions_savediscussion', + marketoActivityId: '100025', + }, + { + event: 'act_engagement_networking_savetime', + marketoActivityId: '100025', + }, + ], + }, + destinationDefinition: { + config: { + destConfig: { + defaultConfig: [ + 'accountId', + 'clientId', + 'clientSecret', + 'trackAnonymousEvents', + 'rudderEventsMapping', + 'customActivityPropertyMap', + 'leadTraitMapping', + ], + }, + secretKeys: ['clientSecret'], + excludeKeys: [], + includeKeys: [], + routerTransform: true, + supportedSourceTypes: [ + 'android', + 'ios', + 'web', + 'unity', + 'amp', + 'cloud', + 'reactnative', + ], + }, + responseRules: { + responseType: 'JSON', + rules: { + retryable: [ + { + success: 'false', + 'errors.0.code': 600, + }, + { + success: 'false', + 'errors.0.code': 601, + }, + { + success: 'false', + 'errors.0.code': 602, + }, + { + success: 'false', + 'errors.0.code': 604, + }, + { + success: 'false', + 'errors.0.code': 606, + }, + { + success: 'false', + 'errors.0.code': 607, + }, + { + success: 'false', + 'errors.0.code': 608, + }, + { + success: 'false', + 'errors.0.code': 611, + }, + ], + abortable: [ + { + success: 'false', + 'errors.0.code': 603, + }, + { + success: 'false', + 'errors.0.code': 605, + }, + { + success: 'false', + 'errors.0.code': 609, + }, + { + success: 'false', + 'errors.0.code': 610, + }, + ], + }, + }, + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'MARKETO', + displayName: 'Marketo', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVke', + name: 'Marketo', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmMd', + deleted: false, + createdAt: '2022-02-10T08:39:32.005Z', + updatedAt: '2022-09-03T16:22:31.374Z', + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + }, + { + batched: false, + statusCode: 400, + error: + '{"message":"Error occurred [Marketo Transformer]: During lead look up using email -> some other problem","destinationResponse":{"response":{"requestId":"142e4#1835b117b76","success":false,"errors":[{"code":"random_marketo_code","message":"some other problem"}]},"status":200}}', + statTags: { + errorCategory: 'network', + errorType: 'aborted', + meta: 'unhandledStatusCode', + }, + destination: { + Config: { + accountId: 'unhandled_status_code', + clientId: '504300cd-76b2-a7l4-bhle-90a07420nx73', + clientSecret: '3l3gJpzRsZagD6gu7tnTeKXz0bomLGnd', + trackAnonymousEvents: false, + createIfNotExist: true, + rudderEventsMapping: [ + { + event: 'acq_signup_completed', + marketoActivityId: '100026', + }, + { + event: 'act_createwebinarform_submit', + marketoActivityId: '100025', + }, + { + event: 'act_presentation_style', + marketoActivityId: '100025', + }, + { + event: 'act_webinar_view', + marketoActivityId: '100025', + }, + { + event: 'act_webinar_join', + marketoActivityId: '100025', + }, + { + event: 'act_presentation_addteammember', + marketoActivityId: '100025', + }, + { + event: 'act_engagement_discussions_savediscussion', + marketoActivityId: '100025', + }, + { + event: 'act_engagement_networking_savetime', + marketoActivityId: '100025', + }, + ], + }, + destinationDefinition: { + config: { + destConfig: { + defaultConfig: [ + 'accountId', + 'clientId', + 'clientSecret', + 'trackAnonymousEvents', + 'rudderEventsMapping', + 'customActivityPropertyMap', + 'leadTraitMapping', + ], + }, + secretKeys: ['clientSecret'], + excludeKeys: [], + includeKeys: [], + routerTransform: true, + supportedSourceTypes: [ + 'android', + 'ios', + 'web', + 'unity', + 'amp', + 'cloud', + 'reactnative', + ], + }, + responseRules: { + responseType: 'JSON', + rules: { + retryable: [ + { + success: 'false', + 'errors.0.code': 600, + }, + { + success: 'false', + 'errors.0.code': 601, + }, + { + success: 'false', + 'errors.0.code': 602, + }, + { + success: 'false', + 'errors.0.code': 604, + }, + { + success: 'false', + 'errors.0.code': 606, + }, + { + success: 'false', + 'errors.0.code': 607, + }, + { + success: 'false', + 'errors.0.code': 608, + }, + { + success: 'false', + 'errors.0.code': 611, + }, + ], + abortable: [ + { + success: 'false', + 'errors.0.code': 603, + }, + { + success: 'false', + 'errors.0.code': 605, + }, + { + success: 'false', + 'errors.0.code': 609, + }, + { + success: 'false', + 'errors.0.code': 610, + }, + ], + }, + }, + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'MARKETO', + displayName: 'Marketo', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVke', + name: 'Marketo', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmMd', + deleted: false, + createdAt: '2022-02-10T08:39:32.005Z', + updatedAt: '2022-09-03T16:22:31.374Z', + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + metadata: [ + { + destInfo: { + authKey: '1mMy5cqbtfuaKZv1IhVQKnBdVke', + }, + jobId: 4, + }, + ], + }, + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://successful_identify_transformation.mktorest.com/rest/v1/leads.json', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer access_token_success', + }, + params: {}, + body: { + JSON: { + action: 'createOrUpdate', + input: [ + { + Email: '0c7b8b80-9c43-4f8e-b2d2-5e2448a25040@j.mail', + FirstName: 'A', + LastName: 'M', + id: 4, + userId: 'e17c5a5e-5e2f-430b-b497-fe3f1ea3a704', + }, + ], + lookupField: 'id', + }, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, + files: {}, + }, + metadata: [ + { + destInfo: { + authKey: '1mMy5cqbtfuaKZv1IhVQKnBdVke', + }, + jobId: 5, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + accountId: 'successful_identify_transformation', + clientId: '504300cd-76b2-a7l4-bhle-90a07420nx73', + clientSecret: '3l3gJpzRsZagD6gu7tnTeKXz0bomLGnd', + trackAnonymousEvents: false, + createIfNotExist: true, + rudderEventsMapping: [ + { + event: 'acq_signup_completed', + marketoActivityId: '100026', + }, + { + event: 'act_createwebinarform_submit', + marketoActivityId: '100025', + }, + { + event: 'act_presentation_style', + marketoActivityId: '100025', + }, + { + event: 'act_webinar_view', + marketoActivityId: '100025', + }, + { + event: 'act_webinar_join', + marketoActivityId: '100025', + }, + { + event: 'act_presentation_addteammember', + marketoActivityId: '100025', + }, + { + event: 'act_engagement_discussions_savediscussion', + marketoActivityId: '100025', + }, + { + event: 'act_engagement_networking_savetime', + marketoActivityId: '100025', + }, + ], + }, + destinationDefinition: { + config: { + destConfig: { + defaultConfig: [ + 'accountId', + 'clientId', + 'clientSecret', + 'trackAnonymousEvents', + 'rudderEventsMapping', + 'customActivityPropertyMap', + 'leadTraitMapping', + ], + }, + secretKeys: ['clientSecret'], + excludeKeys: [], + includeKeys: [], + routerTransform: true, + supportedSourceTypes: [ + 'android', + 'ios', + 'web', + 'unity', + 'amp', + 'cloud', + 'reactnative', + ], + }, + responseRules: { + responseType: 'JSON', + rules: { + retryable: [ + { + success: 'false', + 'errors.0.code': 600, + }, + { + success: 'false', + 'errors.0.code': 601, + }, + { + success: 'false', + 'errors.0.code': 602, + }, + { + success: 'false', + 'errors.0.code': 604, + }, + { + success: 'false', + 'errors.0.code': 606, + }, + { + success: 'false', + 'errors.0.code': 607, + }, + { + success: 'false', + 'errors.0.code': 608, + }, + { + success: 'false', + 'errors.0.code': 611, + }, + ], + abortable: [ + { + success: 'false', + 'errors.0.code': 603, + }, + { + success: 'false', + 'errors.0.code': 605, + }, + { + success: 'false', + 'errors.0.code': 609, + }, + { + success: 'false', + 'errors.0.code': 610, + }, + ], + }, + }, + id: '1aIXqM806xAVm92nx07YwKbRrO9', + name: 'MARKETO', + displayName: 'Marketo', + createdAt: '2020-04-09T09:24:31.794Z', + updatedAt: '2021-01-11T11:03:28.103Z', + }, + secretConfig: {}, + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVke', + name: 'Marketo', + enabled: true, + workspaceId: '1TSN08muJTZwH8iCDmnnRt1pmMd', + deleted: false, + createdAt: '2022-02-10T08:39:32.005Z', + updatedAt: '2022-09-03T16:22:31.374Z', + transformations: [], + isConnectionEnabled: true, + isProcessorEnabled: true, + }, + }, + ], + }, + }, + }, + }, + { + name: 'marketo', + description: 'processMetadataForRouter function specific test', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + message: { + anonymousId: 'anon_id_success', + channel: 'mobile', + context: { + app: { + build: '1', + name: 'TestAppName', + namespace: 'com.android.sample', + version: '1.0', + }, + device: { + id: 'anon_id_success', + manufacturer: 'Google', + model: 'Android SDK built for x86', + name: 'generic_x86', + type: 'android', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.1-beta.1', + }, + locale: 'en-US', + network: { + carrier: 'Android', + bluetooth: false, + cellular: true, + wifi: true, + }, + os: { + name: 'Android', + version: '8.1.0', + }, + screen: { + density: 420, + height: 1794, + width: 1080, + }, + timezone: 'Asia/Kolkata', + traits: { + anonymousId: 'anon_id_success', + }, + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)', + }, + event: 'Product Clicked', + integrations: { + All: true, + }, + messageId: 'id1', + properties: { + name: 'Test Product', + product_id: 'prod_1', + }, + originalTimestamp: '2020-12-17T21:00:59.176Z', + type: 'track', + sentAt: '2020-12-17T21:00:59.176Z', + }, + destination: { + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + Config: { + accountId: 'marketo_acct_id_success', + clientId: 'marketo_client_id_success', + clientSecret: 'marketo_client_secret_success', + trackAnonymousEvents: true, + customActivityPropertyMap: [ + { + from: 'name', + to: 'productName', + }, + { + from: 'product_id', + to: 'productId', + }, + ], + leadTraitMapping: [ + { + from: 'leadScore', + to: 'customLeadScore', + }, + ], + createIfNotExist: true, + rudderEventsMapping: [ + { + event: 'Product Clicked', + marketoPrimarykey: 'name', + marketoActivityId: '100001', + }, + ], + }, + }, + metadata: [ + { + jobId: 1, + }, + { + jobId: 1, + }, + { + jobId: 1, + }, + ], + batched: false, + statusCode: 200, + }, + ], + destType: 'marketo', + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: + 'https://marketo_acct_id_success.mktorest.com/rest/v1/activities/external.json', + headers: { + Authorization: 'Bearer access_token_success', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + input: [ + { + activityDate: '2020-12-17T21:00:59.176Z', + activityTypeId: 100001, + attributes: [ + { + name: 'productId', + value: 'prod_1', + }, + ], + leadId: 4, + primaryAttributeValue: 'Test Product', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + metadata: [ + [ + { + jobId: 1, + }, + { + jobId: 1, + }, + { + jobId: 1, + }, + ], + ], + batched: false, + statusCode: 200, + destination: { + ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + Config: { + accountId: 'marketo_acct_id_success', + clientId: 'marketo_client_id_success', + clientSecret: 'marketo_client_secret_success', + trackAnonymousEvents: true, + customActivityPropertyMap: [ + { + from: 'name', + to: 'productName', + }, + { + from: 'product_id', + to: 'productId', + }, + ], + leadTraitMapping: [ + { + from: 'leadScore', + to: 'customLeadScore', + }, + ], + createIfNotExist: true, + rudderEventsMapping: [ + { + event: 'Product Clicked', + marketoPrimarykey: 'name', + marketoActivityId: '100001', + }, + ], + }, + }, + }, + ], + }, + }, + }, + }, +]; diff --git a/test/integrations/destinations/marketo_bulk_upload/processor/data.ts b/test/integrations/destinations/marketo_bulk_upload/processor/data.ts new file mode 100644 index 0000000000..5c86afd372 --- /dev/null +++ b/test/integrations/destinations/marketo_bulk_upload/processor/data.ts @@ -0,0 +1,499 @@ +export const data = [ + { + "name": "marketo_bulk_upload", + "description": "Test 0", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "type": "identify", + "traits": { + "name": "Carlo Lombard", + "plan": "Quarterly Team+ Plan for Enuffsaid Media", + "email": "carlo@enuffsaid.media" + }, + "userId": 476335, + "context": { + "ip": "14.0.2.238", + "page": { + "url": "enuffsaid.proposify.com", + "path": "/settings", + "method": "POST", + "referrer": "https://enuffsaid.proposify.com/login" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "786dfec9-jfh", + "messageId": "5d9bc6e2-ekjh" + }, + "destination": { + "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", + "Config": { + "munchkinId": "XXXX", + "clientId": "YYYY", + "clientSecret": "ZZZZ", + "columnFieldsMapping": [ + { + "to": "name__c", + "from": "name" + }, + { + "to": "email__c", + "from": "email" + }, + { + "to": "plan__c", + "from": "plan" + } + ] + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "/fileUpload", + "headers": {}, + "params": {}, + "body": { + "JSON": { + "name__c": "Carlo Lombard", + "email__c": "carlo@enuffsaid.media", + "plan__c": "Quarterly Team+ Plan for Enuffsaid Media" + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "marketo_bulk_upload", + "description": "Test 1", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "traits": { + "name": "Carlo Lombard", + "plan": "Quarterly Team+ Plan for Enuffsaid Media", + "email": "carlo@enuffsaid.media" + }, + "userId": 476335, + "context": { + "ip": "14.0.2.238", + "page": { + "url": "enuffsaid.proposify.com", + "path": "/settings", + "method": "POST", + "referrer": "https://enuffsaid.proposify.com/login" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "786dfec9-jfh", + "messageId": "5d9bc6e2-ekjh" + }, + "destination": { + "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", + "Config": { + "munchkinId": "XXXX", + "clientId": "YYYY", + "clientSecret": "ZZZZ", + "columnFieldsMapping": [ + { + "to": "name__c", + "from": "name" + }, + { + "to": "email__c", + "from": "email" + }, + { + "to": "plan__c", + "from": "plan" + } + ] + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Event type is required", + "statTags": { + "destType": "MARKETO_BULK_UPLOAD", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "marketo_bulk_upload", + "description": "Test 2", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "type": "track", + "traits": { + "name": "Carlo Lombard", + "plan": "Quarterly Team+ Plan for Enuffsaid Media", + "email": "carlo@enuffsaid.media" + }, + "userId": 476335, + "context": { + "ip": "14.0.2.238", + "page": { + "url": "enuffsaid.proposify.com", + "path": "/settings", + "method": "POST", + "referrer": "https://enuffsaid.proposify.com/login" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "786dfec9-jfh", + "messageId": "5d9bc6e2-ekjh" + }, + "destination": { + "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", + "Config": { + "munchkinId": "XXXX", + "clientId": "YYYY", + "clientSecret": "ZZZZ", + "columnFieldsMapping": [ + { + "to": "name__c", + "from": "name" + }, + { + "to": "email__c", + "from": "email" + }, + { + "to": "plan__c", + "from": "plan" + } + ] + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Event type track is not supported", + "statTags": { + "destType": "MARKETO_BULK_UPLOAD", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "marketo_bulk_upload", + "description": "Test 3", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "type": "identify", + "traits": { + "name": "Carlo Lombard", + "plan": "Quarterly Team+ Plan for Enuffsaid Media", + "email": "carlo@enuffsaid.media" + }, + "userId": 476335, + "context": { + "ip": "14.0.2.238", + "page": { + "url": "enuffsaid.proposify.com", + "path": "/settings", + "method": "POST", + "referrer": "https://enuffsaid.proposify.com/login" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "786dfec9-jfh", + "messageId": "5d9bc6e2-ekjh" + }, + "destination": { + "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", + "Config": { + "munchkinId": "XXXX", + "clientId": "YYYY", + "clientSecret": "ZZZZ", + "columnFieldsMapping": [ + { + "to": "name__c", + "from": "1" + }, + { + "to": "email__c", + "from": "email1" + }, + { + "to": "plan__c", + "from": "plan1" + } + ] + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "/fileUpload", + "headers": {}, + "params": {}, + "body": { + "JSON": {}, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "marketo_bulk_upload", + "description": "Test 4", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "type": "identify", + "traits": { + "name": "Carlo Lombard", + "plan": "Quarterly Team+ Plan for Enuffsaid Media", + "email": "carlo@enuffsaid.media" + }, + "userId": 476335, + "context": { + "ip": "14.0.2.238", + "page": { + "url": "enuffsaid.proposify.com", + "path": "/settings", + "method": "POST", + "referrer": "https://enuffsaid.proposify.com/login" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "786dfec9-jfh", + "messageId": "5d9bc6e2-ekjh" + }, + "destination": { + "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", + "Config": { + "munchkinId": "XXXX", + "clientId": "YYYY", + "clientSecret": "ZZZZ", + "columnFieldsMapping": [ + { + "to": "name__c", + "from": "name" + }, + { + "to": "email__c", + "from": "email1" + }, + { + "to": "plan__c", + "from": "plan1" + } + ] + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "/fileUpload", + "headers": {}, + "params": {}, + "body": { + "JSON": { + "name__c": "Carlo Lombard" + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "marketo_bulk_upload", + "description": "Test 5", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "type": "identify", + "traits": { + "name": "Carlo Lombard", + "plan": 1 + }, + "userId": 476335, + "context": { + "ip": "14.0.2.238", + "page": { + "url": "enuffsaid.proposify.com", + "path": "/settings", + "method": "POST", + "referrer": "https://enuffsaid.proposify.com/login" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "786dfec9-jfh", + "messageId": "5d9bc6e2-ekjh" + }, + "destination": { + "ID": "1mMy5cqbtfuaKZv1IhVQKnBdVwe", + "Config": { + "munchkinId": "XXXX", + "clientId": "YYYY", + "clientSecret": "ZZZZ", + "columnFieldsMapping": [ + { + "to": "name__c", + "from": "name" + }, + { + "to": "email__c", + "from": "email" + }, + { + "to": "plan__c", + "from": "plan" + } + ] + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "/fileUpload", + "headers": {}, + "params": {}, + "body": { + "JSON": { + "name__c": "Carlo Lombard", + "plan__c": 1 + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + } +] \ No newline at end of file diff --git a/test/integrations/destinations/monday/network.ts b/test/integrations/destinations/monday/network.ts new file mode 100644 index 0000000000..f23b9061f8 --- /dev/null +++ b/test/integrations/destinations/monday/network.ts @@ -0,0 +1,242 @@ +export const networkCallsData = [ + { + httpReq: { + url: 'https://api.monday.com/v2', + method: 'POST', + headers: { + Authorization: + 'eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih', + }, + }, + httpRes: { + data: { + data: { + boards: [ + { + name: 'Planning', + columns: [ + { + id: 'name', + title: 'Name', + type: 'name', + description: null, + settings_str: '{}', + }, + { + id: 'subitems', + title: 'Subitems', + type: 'subtasks', + description: null, + settings_str: + '{"allowMultipleItems":true,"itemTypeName":"column.subtasks.title","displayType":"BOARD_INLINE","boardIds":[3160974974]}', + }, + { + id: 'person', + title: 'Person', + type: 'multiple-person', + description: null, + settings_str: '{}', + }, + { + id: 'status', + title: 'Status', + type: 'color', + description: null, + settings_str: + '{"labels":{"0":"Working on it","1":"Done","2":"Stuck"},"labels_positions_v2":{"0":0,"1":2,"2":1,"5":3},"labels_colors":{"0":{"color":"#fdab3d","border":"#E99729","var_name":"orange"},"1":{"color":"#00c875","border":"#00B461","var_name":"green-shadow"},"2":{"color":"#e2445c","border":"#CE3048","var_name":"red-shadow"}}}', + }, + { + id: 'date4', + title: 'Date', + type: 'date', + description: null, + settings_str: '{}', + }, + { + id: 'checkbox', + title: 'Checkbox', + type: 'boolean', + description: null, + settings_str: '{}', + }, + { + id: 'connect_boards', + title: 'Connect boards', + type: 'board-relation', + description: null, + settings_str: '{"allowCreateReflectionColumn":false}', + }, + { + id: 'status_1', + title: 'Other', + type: 'color', + description: null, + settings_str: + '{"labels":{"0":"Working on it","1":"Done","2":"Stuck"},"labels_colors":{"0":{"color":"#fdab3d","border":"#E99729","var_name":"orange"},"1":{"color":"#00c875","border":"#00B461","var_name":"green-shadow"},"2":{"color":"#e2445c","border":"#CE3048","var_name":"red-shadow"}}}', + }, + { + id: 'date_1', + title: 'Date 1', + type: 'date', + description: null, + settings_str: '{"hide_footer":false}', + }, + { + id: 'status_12', + title: 'new status', + type: 'color', + description: null, + settings_str: + '{"labels":{"0":"Working on it","1":"Done","2":"Stuck"},"labels_colors":{"0":{"color":"#fdab3d","border":"#E99729","var_name":"orange"},"1":{"color":"#00c875","border":"#00B461","var_name":"green-shadow"},"2":{"color":"#e2445c","border":"#CE3048","var_name":"red-shadow"}}}', + }, + { + id: 'numbers', + title: 'Numbers', + type: 'numeric', + description: null, + settings_str: '{}', + }, + { + id: 'text', + title: 'Name', + type: 'text', + description: null, + settings_str: '{}', + }, + { + id: 'country', + title: 'Country', + type: 'country', + description: null, + settings_str: '{}', + }, + { + id: 'dropdown', + title: 'Dropdown', + type: 'dropdown', + description: null, + settings_str: + '{"hide_footer":false,"labels":[{"id":1,"name":"dropdown"},{"id":2,"name":"dropup"}]}', + }, + { + id: 'email', + title: 'Email', + type: 'email', + description: null, + settings_str: '{}', + }, + { + id: 'location', + title: 'Location', + type: 'location', + description: null, + settings_str: '{}', + }, + { + id: 'phone', + title: 'Phone', + type: 'phone', + description: null, + settings_str: '{}', + }, + { + id: 'rating', + title: 'Rating', + type: 'rating', + description: null, + settings_str: '{}', + }, + { + id: 'timeline', + title: 'Timeline', + type: 'timerange', + description: null, + settings_str: '{"hide_footer":false}', + }, + { + id: 'dependent_on', + title: 'Dependent On', + type: 'dependency', + description: + 'Choose the item your task will be dependent on. If the “dependent on” item’s date is changing, the other dates will adjust automatically', + settings_str: + '{"boardIds":[3142482015],"dependencyNewInfra":true,"allowMultipleItems":true}', + }, + { + id: 'long_text', + title: 'Long Text', + type: 'long-text', + description: null, + settings_str: '{}', + }, + { + id: 'link', + title: 'Link', + type: 'link', + description: null, + settings_str: '{}', + }, + { + id: 'tags', + title: 'Tags', + type: 'tag', + description: null, + settings_str: '{"hide_footer":false}', + }, + { + id: 'label', + title: 'Label', + type: 'color', + description: '', + settings_str: + '{"done_colors":[1],"labels":{"3":"Label 2","105":"Label 1","156":"Label 3"},"labels_positions_v2":{"3":1,"5":3,"105":0,"156":2},"labels_colors":{"3":{"color":"#0086c0","border":"#3DB0DF","var_name":"blue-links"},"105":{"color":"#9AADBD","border":"#9AADBD","var_name":"winter"},"156":{"color":"#9D99B9","border":"#9D99B9","var_name":"purple_gray"}}}', + }, + { + id: 'world_clock', + title: 'World Clock', + type: 'timezone', + description: null, + settings_str: '{}', + }, + { + id: 'week', + title: 'Week', + type: 'week', + description: null, + settings_str: '{}', + }, + ], + groups: [ + { + id: 'topics', + title: 'This month', + }, + { + id: 'group_title', + title: 'Next month', + }, + ], + }, + ], + }, + account_id: 13215538, + }, + status: 200, + }, + }, + { + httpReq: { + url: 'https://api.monday.com/v2', + method: 'POST', + headers: { + Authorization: 'failedApiToken', + }, + }, + httpRes: { + data: { + boards: [], + }, + status: 200, + }, + }, +]; diff --git a/test/integrations/destinations/monday/processor/data.ts b/test/integrations/destinations/monday/processor/data.ts new file mode 100644 index 0000000000..4e5280efcb --- /dev/null +++ b/test/integrations/destinations/monday/processor/data.ts @@ -0,0 +1,1399 @@ +export const data = [ + { + name: 'monday', + description: 'Track call with empty columnToPropertyMapping', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiToken: + 'eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih', + boardId: '339283933', + groupTitle: '', + columnToPropertyMapping: [], + whitelistedEvents: [ + { + eventName: 'create an item', + }, + ], + }, + }, + message: { + event: 'create an item', + type: 'track', + sentAt: '2021-01-03T17:02:53.195Z', + userId: 'user@27', + channel: 'web', + properties: { + name: 'Task 1', + }, + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + locale: 'en-US', + screen: { + density: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + FORM: {}, + JSON: { + query: + 'mutation { create_item (board_id: 339283933, item_name: "Task 1", column_values: "{}") {id}}', + }, + JSON_ARRAY: {}, + XML: {}, + }, + endpoint: 'https://api.monday.com/v2', + files: {}, + headers: { + Authorization: + 'eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih', + 'Content-Type': 'application/json', + }, + method: 'POST', + params: {}, + type: 'REST', + version: '1', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'monday', + description: 'Track call with undefined columnToPropertyMapping', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiToken: + 'eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih', + boardId: '339283933', + groupTitle: '', + whitelistedEvents: [ + { + eventName: 'create an item', + }, + ], + }, + }, + message: { + event: 'create an item', + type: 'track', + sentAt: '2021-01-03T17:02:53.195Z', + userId: 'user@27', + channel: 'web', + properties: { + name: 'Task 1', + }, + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + locale: 'en-US', + screen: { + density: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + FORM: {}, + JSON: { + query: + 'mutation { create_item (board_id: 339283933, item_name: "Task 1", column_values: "{}") {id}}', + }, + JSON_ARRAY: {}, + XML: {}, + }, + endpoint: 'https://api.monday.com/v2', + files: {}, + headers: { + Authorization: + 'eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih', + 'Content-Type': 'application/json', + }, + method: 'POST', + params: {}, + type: 'REST', + version: '1', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'monday', + description: 'Check Unsupported message type', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiToken: + 'eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih', + boardId: '339283933', + groupTitle: '', + columnToPropertyMapping: [], + whitelistedEvents: [ + { + eventName: 'create an item', + }, + ], + }, + }, + message: { + event: 'create an item', + type: 'identify', + sentAt: '2021-01-03T17:02:53.195Z', + userId: 'user@27', + channel: 'web', + properties: { + name: 'Task 1', + }, + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + locale: 'en-US', + screen: { + density: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Event type identify is not supported', + statTags: { + destType: 'MONDAY', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'monday', + description: 'Check for empty message type', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiToken: + 'eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih', + boardId: '339283933', + groupTitle: '', + columnToPropertyMapping: [], + whitelistedEvents: [ + { + eventName: 'create an item', + }, + ], + }, + }, + message: { + event: 'create an item', + type: '', + sentAt: '2021-01-03T17:02:53.195Z', + userId: 'user@27', + channel: 'web', + properties: { + name: 'Task 1', + }, + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + locale: 'en-US', + screen: { + density: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Event type is required', + statTags: { + destType: 'MONDAY', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'monday', + description: 'Check for empty API Token', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiToken: '', + boardId: '339283933', + groupTitle: '', + columnToPropertyMapping: [], + whitelistedEvents: [ + { + eventName: 'create an item', + }, + ], + }, + }, + message: { + event: 'create an item', + type: 'track', + sentAt: '2021-01-03T17:02:53.195Z', + userId: 'user@27', + channel: 'web', + properties: { + name: 'Task 1', + }, + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + locale: 'en-US', + screen: { + density: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'ApiToken is a required field', + statTags: { + destType: 'MONDAY', + errorCategory: 'dataValidation', + errorType: 'configuration', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'monday', + description: 'Check for empty board Id', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiToken: + 'eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih', + boardId: '', + groupTitle: '', + columnToPropertyMapping: [], + whitelistedEvents: [ + { + eventName: 'create an item', + }, + ], + }, + }, + message: { + event: 'create an item', + type: 'track', + sentAt: '2021-01-03T17:02:53.195Z', + userId: 'user@27', + channel: 'web', + properties: { + name: 'Task 1', + }, + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + locale: 'en-US', + screen: { + density: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'boardId is a required field', + statTags: { + destType: 'MONDAY', + errorCategory: 'dataValidation', + errorType: 'configuration', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'monday', + description: 'Check for event name', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiToken: + 'eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih', + boardId: '339283933', + groupTitle: '', + columnToPropertyMapping: [], + whitelistedEvents: [ + { + eventName: 'create an item', + }, + ], + }, + }, + message: { + event: '', + type: 'track', + sentAt: '2021-01-03T17:02:53.195Z', + userId: 'user@27', + channel: 'web', + properties: { + name: 'Task 1', + }, + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + locale: 'en-US', + screen: { + density: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Event is a required field and should be a string', + statTags: { + destType: 'MONDAY', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'monday', + description: 'Track call with columnToPropertyMapping and with empty groupTitle', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiToken: + 'eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih', + boardId: '339283933', + groupTitle: '', + columnToPropertyMapping: [ + { + from: 'Status', + to: 'status', + }, + { + from: 'Email', + to: 'emailId', + }, + ], + whitelistedEvents: [ + { + eventName: 'create an item', + }, + ], + }, + }, + message: { + event: 'create an item', + type: 'track', + sentAt: '2021-01-03T17:02:53.195Z', + userId: 'user@27', + channel: 'web', + properties: { + name: 'Task 1', + status: 'Done', + emailId: 'abc@email.com', + emailText: 'emailId', + }, + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + locale: 'en-US', + screen: { + density: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.monday.com/v2', + headers: { + 'Content-Type': 'application/json', + Authorization: + 'eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih', + }, + params: {}, + body: { + JSON: { + query: + 'mutation { create_item (board_id: 339283933, item_name: "Task 1", column_values: "{\\"status\\":{\\"label\\":\\"Done\\"},\\"email\\":{\\"email\\":\\"abc@email.com\\",\\"text\\":\\"emailId\\"}}") {id}}', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'monday', + description: 'Track call with columnToPropertyMapping and with groupTitle', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiToken: + 'eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih', + boardId: '339283933', + groupTitle: 'Next month', + columnToPropertyMapping: [ + { + from: 'Status', + to: 'status', + }, + { + from: 'Email', + to: 'emailId', + }, + ], + whitelistedEvents: [ + { + eventName: 'create an item', + }, + ], + }, + }, + message: { + event: 'create an item', + type: 'track', + sentAt: '2021-01-03T17:02:53.195Z', + userId: 'user@27', + channel: 'web', + properties: { + name: 'Task 1', + status: 'Done', + emailId: 'abc@email.com', + emailText: 'emailId', + }, + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + locale: 'en-US', + screen: { + density: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.monday.com/v2', + headers: { + 'Content-Type': 'application/json', + Authorization: + 'eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih', + }, + params: {}, + body: { + JSON: { + query: + 'mutation { create_item (board_id: 339283933, group_id: group_title item_name: "Task 1", column_values: "{\\"status\\":{\\"label\\":\\"Done\\"},\\"email\\":{\\"email\\":\\"abc@email.com\\",\\"text\\":\\"emailId\\"}}") {id}}', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'monday', + description: 'Non-existing group title check', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiToken: + 'eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih', + boardId: '339283933', + groupTitle: 'Next year', + columnToPropertyMapping: [ + { + from: 'Status', + to: 'status', + }, + { + from: 'Email', + to: 'emailId', + }, + ], + whitelistedEvents: [ + { + eventName: 'create an item', + }, + ], + }, + }, + message: { + event: 'create an item', + type: 'track', + sentAt: '2021-01-03T17:02:53.195Z', + userId: 'user@27', + channel: 'web', + properties: { + name: 'Task 1', + status: 'Done', + emailId: 'abc@email.com', + emailText: 'emailId', + }, + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + locale: 'en-US', + screen: { + density: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: "Group Next year doesn't exist in the board", + statTags: { + destType: 'MONDAY', + errorCategory: 'dataValidation', + errorType: 'configuration', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'monday', + description: 'check for item name', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiToken: + 'eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih', + boardId: '339283933', + groupTitle: 'Next month', + columnToPropertyMapping: [ + { + from: 'Status', + to: 'status', + }, + { + from: 'Email', + to: 'emailId', + }, + ], + whitelistedEvents: [ + { + eventName: 'create an item', + }, + ], + }, + }, + message: { + event: 'create an item', + type: 'track', + sentAt: '2021-01-03T17:02:53.195Z', + userId: 'user@27', + channel: 'web', + properties: { + name: '', + status: 'Done', + emailId: 'abc@email.com', + emailText: 'emailId', + }, + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + locale: 'en-US', + screen: { + density: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Item name is required to create an item', + statTags: { + destType: 'MONDAY', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'monday', + description: + 'Track call with columnToPropertyMapping and with groupTitle with all supported columns', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiToken: + 'eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih', + boardId: '339283933', + groupTitle: 'Next month', + columnToPropertyMapping: [ + { + from: 'Status', + to: 'status', + }, + { + from: 'Email', + to: 'emailId', + }, + { + from: 'Checkbox', + to: 'checked', + }, + { + from: 'Numbers', + to: 'number', + }, + { + from: 'Name', + to: 'textKey', + }, + { + from: 'Country', + to: 'countryName', + }, + { + from: 'Location', + to: 'address', + }, + { + from: 'Phone', + to: 'phone', + }, + { + from: 'Rating', + to: 'rating', + }, + { + from: 'Link', + to: 'url', + }, + { + from: 'Long Text', + to: 'description', + }, + { + from: 'World Clock', + to: 'timezone', + }, + ], + whitelistedEvents: [ + { + eventName: 'create an item', + }, + ], + }, + }, + message: { + event: 'create an item', + type: 'track', + sentAt: '2021-01-03T17:02:53.195Z', + userId: 'user@27', + channel: 'web', + properties: { + name: 'Task 1', + status: 'Done', + emailId: 'abc@email.com', + emailText: 'emailId', + countryCode: 'US', + latitude: '51.23', + longitude: '35.3', + rating: '3', + linkText: 'websiteLink', + checked: 'true', + number: '45', + textKey: 'texting', + countryName: 'Unites States', + countryShortName: 'US', + address: 'New York', + phone: '2626277272', + url: 'demo.com', + description: 'property description', + timezone: 'America/New_York', + }, + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + locale: 'en-US', + screen: { + density: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.monday.com/v2', + headers: { + 'Content-Type': 'application/json', + Authorization: + 'eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih', + }, + params: {}, + body: { + JSON: { + query: + 'mutation { create_item (board_id: 339283933, group_id: group_title item_name: "Task 1", column_values: "{\\"status\\":{\\"label\\":\\"Done\\"},\\"email\\":{\\"email\\":\\"abc@email.com\\",\\"text\\":\\"emailId\\"},\\"checkbox\\":{\\"checked\\":true},\\"numbers\\":\\"45\\",\\"text\\":\\"texting\\",\\"country\\":{\\"countryName\\":\\"Unites States\\",\\"countryCode\\":\\"US\\"},\\"location\\":{\\"address\\":\\"New York\\",\\"lat\\":\\"51.23\\",\\"lng\\":\\"35.3\\"},\\"phone\\":{\\"phone\\":\\"2626277272\\",\\"countryShortName\\":\\"US\\"},\\"rating\\":3,\\"link\\":{\\"url\\":\\"demo.com\\",\\"text\\":\\"websiteLink\\"},\\"long_text\\":{\\"text\\":\\"property description\\"},\\"world_clock\\":{\\"timezone\\":\\"America/New_York\\"}}") {id}}', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'monday', + description: 'check for allowed event name from UI', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiToken: + 'eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih', + boardId: '339283933', + groupTitle: 'Next month', + columnToPropertyMapping: [ + { + from: 'Status', + to: 'status', + }, + { + from: 'Email', + to: 'emailId', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], + }, + }, + message: { + event: 'create an item', + type: 'track', + sentAt: '2021-01-03T17:02:53.195Z', + userId: 'user@27', + channel: 'web', + properties: { + name: '', + status: 'Done', + emailId: 'abc@email.com', + emailText: 'emailId', + }, + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + locale: 'en-US', + screen: { + density: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Event Discarded. To allow this event, add this in Allowlist', + statTags: { + destType: 'MONDAY', + errorCategory: 'dataValidation', + errorType: 'configuration', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'monday', + description: 'check for deleted boards (configured boards are deleted)', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiToken: 'failedApiToken', + boardId: '339283934', + groupTitle: 'Next year', + columnToPropertyMapping: [ + { + from: 'Status', + to: 'status', + }, + { + from: 'Email', + to: 'emailId', + }, + ], + whitelistedEvents: [ + { + eventName: 'create an item', + }, + ], + }, + }, + message: { + event: 'create an item', + type: 'track', + sentAt: '2021-01-03T17:02:53.195Z', + userId: 'user@27', + channel: 'web', + properties: { + name: 'Task 1', + status: 'Done', + emailId: 'abc@email.com', + emailText: 'emailId', + }, + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + locale: 'en-US', + screen: { + density: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'The board with boardId 339283934 does not exist', + statTags: { + destType: 'MONDAY', + errorCategory: 'dataValidation', + errorType: 'configuration', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, +]; diff --git a/test/integrations/destinations/monday/router/data.ts b/test/integrations/destinations/monday/router/data.ts new file mode 100644 index 0000000000..eefc106274 --- /dev/null +++ b/test/integrations/destinations/monday/router/data.ts @@ -0,0 +1,228 @@ +export const data = [ + { + name: 'monday', + description: 'Test 0', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + destination: { + Config: { + apiToken: + 'eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih', + boardId: '339283933', + groupTitle: '', + columnToPropertyMapping: [], + whitelistedEvents: [{ eventName: 'create an item' }], + }, + }, + metadata: { + jobId: 1, + }, + message: { + event: 'create an item', + type: 'track', + sentAt: '2021-01-03T17:02:53.195Z', + userId: 'user@27', + channel: 'web', + properties: { + name: 'Task 1', + }, + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + locale: 'en-US', + screen: { + density: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + }, + { + destination: { + Config: { + apiToken: + 'eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih', + boardId: '339283933', + groupTitle: 'Next month', + columnToPropertyMapping: [ + { + from: 'Status', + to: 'status', + }, + { from: 'Email', to: 'emailId' }, + ], + whitelistedEvents: [{ eventName: 'create an item' }], + }, + }, + metadata: { + jobId: 2, + }, + message: { + event: 'create an item', + type: 'track', + sentAt: '2021-01-03T17:02:53.195Z', + userId: 'user@27', + channel: 'web', + properties: { + name: 'Task 1', + status: 'Done', + emailId: 'abc@email.com', + emailText: 'emailId', + }, + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + locale: 'en-US', + screen: { + density: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + }, + ], + destType: 'monday', + }, + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: { + body: { + FORM: {}, + JSON: { + query: + 'mutation { create_item (board_id: 339283933, item_name: "Task 1", column_values: "{}") {id}}', + }, + JSON_ARRAY: {}, + XML: {}, + }, + endpoint: 'https://api.monday.com/v2', + files: {}, + headers: { + Authorization: + 'eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih', + 'Content-Type': 'application/json', + }, + method: 'POST', + params: {}, + type: 'REST', + version: '1', + }, + metadata: [ + { + jobId: 1, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + apiToken: + 'eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih', + boardId: '339283933', + groupTitle: '', + columnToPropertyMapping: [], + whitelistedEvents: [{ eventName: 'create an item' }], + }, + }, + }, + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.monday.com/v2', + headers: { + 'Content-Type': 'application/json', + Authorization: + 'eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih', + }, + params: {}, + body: { + JSON: { + query: + 'mutation { create_item (board_id: 339283933, group_id: group_title item_name: "Task 1", column_values: "{\\"status\\":{\\"label\\":\\"Done\\"},\\"email\\":{\\"email\\":\\"abc@email.com\\",\\"text\\":\\"emailId\\"}}") {id}}', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + metadata: [ + { + jobId: 2, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + apiToken: + 'eywwakzdjiksjhriherniSFsjhnskdojsSDFhsdns.sSRSSREWdnfnsjshfjsjskshfiskskdS__Fskilhih', + boardId: '339283933', + groupTitle: 'Next month', + columnToPropertyMapping: [ + { + from: 'Status', + to: 'status', + }, + { from: 'Email', to: 'emailId' }, + ], + whitelistedEvents: [{ eventName: 'create an item' }], + }, + }, + }, + ], + }, + }, + }, + }, +]; diff --git a/test/integrations/destinations/profitwell/network.ts b/test/integrations/destinations/profitwell/network.ts new file mode 100644 index 0000000000..e4e7247c74 --- /dev/null +++ b/test/integrations/destinations/profitwell/network.ts @@ -0,0 +1,94 @@ +export const networkCallsData = [ + { + httpReq: { + url: 'https://api.profitwell.com/v2/users/pwu_Oea7HXV3bnTP/', + method: 'GET', + }, + httpRes: { + data: [ + { + user_id: 'pwu_Oea7HXV3bnTP', + subscription_id: 'pws_FecTCEyo17rV', + user_alias: 'spiderman_1a', + subscription_alias: 'spiderman_sub_1a', + email: 'spiderman@profitwell.com', + plan_id: 'web_plan', + plan_interval: 'month', + plan_currency: 'usd', + status: 'active', + value: 5000, + effective_date: 1514764800, + meta: {}, + }, + ], + status: 200, + }, + }, + { + httpReq: { + url: 'https://api.profitwell.com/v2/users/spiderman_1a/', + method: 'GET', + }, + httpRes: { + data: [ + { + user_id: 'pwu_Oea7HXV3bnTP', + subscription_id: 'pws_FecTCEyo17rV', + user_alias: 'spiderman_1a', + subscription_alias: 'spiderman_sub_1a', + email: 'spiderman@profitwell.com', + plan_id: 'web_plan', + plan_interval: 'month', + plan_currency: 'usd', + status: 'active', + value: 5000, + effective_date: 1514764800, + meta: {}, + }, + ], + status: 200, + }, + }, + { + httpReq: { + url: 'https://api.profitwell.com/v2/users/23453/', + method: 'GET', + }, + httpRes: { + status: 404, + }, + }, + { + httpReq: { + url: 'https://api.profitwell.com/v2/users/sp_245/', + method: 'GET', + }, + httpRes: { + message: 'Request failed with status code 404', + status: 404, + statusText: 'Not Found', + }, + }, + { + httpReq: { + url: 'https://api.profitwell.com/v2/users/1234/', + method: 'GET', + }, + httpRes: { + message: 'Request failed with status code 404', + status: 404, + statusText: 'Not Found', + }, + }, + { + httpReq: { + url: 'https://api.profitwell.com/v2/users/samual/', + method: 'GET', + }, + httpRes: { + message: 'Request failed with status code 404', + status: 404, + statusText: 'Not Found', + }, + }, +]; diff --git a/test/integrations/destinations/profitwell/processor/data.ts b/test/integrations/destinations/profitwell/processor/data.ts new file mode 100644 index 0000000000..58bd2ed35f --- /dev/null +++ b/test/integrations/destinations/profitwell/processor/data.ts @@ -0,0 +1,1241 @@ +export const data = [ + { + name: 'profitwell', + description: 'Test 0', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + privateApiKey: '9270161a8e5abaa0e56efddfd9dbcb62', + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.9', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.9', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + email: 'sample@sample.com', + planId: '23', + planInterval: 'month', + planCurrency: 'usd', + value: '23', + subscriptionAlias: 'samual', + status: 'active', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36', + }, + messageId: '6a5f38c0-4e75-4268-a066-2b73fbcad01f', + originalTimestamp: '2021-01-04T08:25:04.780Z', + receivedAt: '2021-01-04T13:55:04.799+05:30', + request_ip: '[::1]', + rudderId: '79881a62-980a-4d76-89ca-7099440f8c13', + sentAt: '2021-01-04T08:25:04.781Z', + timestamp: '2021-09-06T14:15:06.798+05:30', + type: 'identify', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'userId or userAlias is required for identify', + statTags: { + destType: 'PROFITWELL', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'profitwell', + description: 'Test 1', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + privateApiKey: '9270161a8e5abaa0e56efddfd9dbcb62', + }, + }, + message: { + channel: 'web', + context: { + externalId: [ + { + type: 'profitwellUserId', + id: '23453', + }, + ], + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.9', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.9', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + email: 'sample@sample.com', + planId: '23', + planInterval: 'month', + planCurrency: 'usd', + value: '23', + subscriptionAlias: 'samual', + status: 'active', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36', + }, + messageId: '6a5f38c0-4e75-4268-a066-2b73fbcad01f', + originalTimestamp: '2021-01-04T08:25:04.780Z', + receivedAt: '2021-01-04T13:55:04.799+05:30', + request_ip: '[::1]', + rudderId: '79881a62-980a-4d76-89ca-7099440f8c13', + sentAt: '2021-01-04T08:25:04.781Z', + timestamp: '2021-09-06T14:15:06.798+05:30', + type: 'identify', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'No user found for profitwell user_id', + statTags: { + destType: 'PROFITWELL', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'profitwell', + description: 'Test 2', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + privateApiKey: '9270161a8e5abaa0e56efddfd9dbcb62', + }, + }, + message: { + channel: 'web', + userId: 'sp_245', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.9', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.9', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + email: 'sample@sample.com', + planId: '23', + planInterval: 'month', + planCurrency: 'usd', + value: '23', + subscriptionAlias: 'samual', + status: 'active', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36', + }, + messageId: '6a5f38c0-4e75-4268-a066-2b73fbcad01f', + originalTimestamp: '2021-01-04T08:25:04.780Z', + receivedAt: '2021-01-04T13:55:04.799+05:30', + request_ip: '[::1]', + rudderId: '79881a62-980a-4d76-89ca-7099440f8c13', + sentAt: '2021-01-04T08:25:04.781Z', + timestamp: '2021-09-06T14:15:06.798+05:30', + type: 'identify', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.profitwell.com/v2/subscriptions/', + headers: { + 'Content-Type': 'application/json', + Authorization: '9270161a8e5abaa0e56efddfd9dbcb62', + }, + params: {}, + body: { + JSON: { + subscription_alias: 'samual', + email: 'sample@sample.com', + plan_id: '23', + plan_interval: 'month', + plan_currency: 'usd', + status: 'active', + value: '23', + user_alias: 'sp_245', + effective_date: 1630917906, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'profitwell', + description: 'Test 3', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + privateApiKey: '9270161a8e5abaa0e56efddfd9dbcb62', + }, + }, + message: { + channel: 'web', + userId: 'sp_245', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.9', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.9', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + email: 'sample@sample.com', + planId: '23', + planInterval: 'month', + planCurrency: 'usd', + value: '23', + status: 'active', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36', + }, + messageId: '6a5f38c0-4e75-4268-a066-2b73fbcad01f', + originalTimestamp: '2021-01-04T08:25:04.780Z', + receivedAt: '2021-01-04T13:55:04.799+05:30', + request_ip: '[::1]', + rudderId: '79881a62-980a-4d76-89ca-7099440f8c13', + sentAt: '2021-01-04T08:25:04.781Z', + timestamp: '2021-09-06T14:15:06.798+05:30', + type: 'identify', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'subscriptionId or subscriptionAlias is required for identify', + statTags: { + destType: 'PROFITWELL', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'profitwell', + description: 'Test 4', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + privateApiKey: '9270161a8e5abaa0e56efddfd9dbcb62', + }, + }, + message: { + channel: 'web', + userId: 'sp_245', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.9', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.9', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'profitwellUserId', + id: '1234', + }, + ], + traits: { + email: 'sample@sample.com', + planId: '23', + planInterval: 'month', + planCurrency: 'usd', + value: '23', + subscriptionAlias: 'samual', + status: 'active', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36', + }, + messageId: '6a5f38c0-4e75-4268-a066-2b73fbcad01f', + originalTimestamp: '2021-01-04T08:25:04.780Z', + receivedAt: '2021-01-04T13:55:04.799+05:30', + request_ip: '[::1]', + rudderId: '79881a62-980a-4d76-89ca-7099440f8c13', + sentAt: '2021-01-04T08:25:04.781Z', + timestamp: '2021-09-06T14:15:06.798+05:30', + type: 'identify', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'No user found for profitwell user_id', + statTags: { + destType: 'PROFITWELL', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'profitwell', + description: 'Test 5', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + privateApiKey: '9270161a8e5abaa0e56efddfd9dbcb62', + }, + }, + message: { + channel: 'web', + userId: 'sp_245', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.9', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.9', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'profitwellUserId', + id: 'pwu_Oea7HXV3bnTP', + }, + ], + traits: { + email: 'sample@sample.com', + planId: '23', + planInterval: 'month', + planCurrency: 'usd', + value: '23', + subscriptionAlias: 'samual', + status: 'active', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36', + }, + messageId: '6a5f38c0-4e75-4268-a066-2b73fbcad01f', + originalTimestamp: '2021-01-04T08:25:04.780Z', + receivedAt: '2021-01-04T13:55:04.799+05:30', + request_ip: '[::1]', + rudderId: '79881a62-980a-4d76-89ca-7099440f8c13', + sentAt: '2021-01-04T08:25:04.781Z', + timestamp: '2021-09-06T14:15:06.798+05:30', + type: 'identify', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.profitwell.com/v2/subscriptions/', + headers: { + 'Content-Type': 'application/json', + Authorization: '9270161a8e5abaa0e56efddfd9dbcb62', + }, + params: {}, + body: { + JSON: { + subscription_alias: 'samual', + email: 'sample@sample.com', + plan_id: '23', + plan_interval: 'month', + plan_currency: 'usd', + status: 'active', + value: '23', + user_id: 'pwu_Oea7HXV3bnTP', + user_alias: 'sp_245', + effective_date: 1630917906, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'profitwell', + description: 'Test 6', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + privateApiKey: '9270161a8e5abaa0e56efddfd9dbcb62', + }, + }, + message: { + channel: 'web', + userId: 'sp_245', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.9', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.9', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'profitwellUserId', + id: 'pwu_Oea7HXV3bnTP', + }, + { + type: 'profitwellSubscriptionId', + id: 'pws_FecTCEyo17rV', + }, + ], + traits: { + email: 'sample@sample.com', + planId: '23', + planInterval: 'month', + planCurrency: 'usd', + value: '23', + subscriptionAlias: 'samual', + status: 'active', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36', + }, + messageId: '6a5f38c0-4e75-4268-a066-2b73fbcad01f', + originalTimestamp: '2021-01-04T08:25:04.780Z', + receivedAt: '2021-01-04T13:55:04.799+05:30', + request_ip: '[::1]', + rudderId: '79881a62-980a-4d76-89ca-7099440f8c13', + sentAt: '2021-01-04T08:25:04.781Z', + timestamp: '2021-09-06T14:15:06.798+05:30', + type: 'identify', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: + 'Missing required value from ["traits.effectiveDate","context.traits.effectiveDate"]', + statTags: { + destType: 'PROFITWELL', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'profitwell', + description: 'Test 7', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + privateApiKey: '9270161a8e5abaa0e56efddfd9dbcb62', + }, + }, + message: { + channel: 'web', + userId: 'sp_245', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.9', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.9', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'profitwellUserId', + id: 'pwu_Oea7HXV3bnTP', + }, + { + type: 'profitwellSubscriptionId', + id: 'pws_FecTCEyo17rV', + }, + ], + traits: { + email: 'sample@sample.com', + planId: '23', + planInterval: 'month', + planCurrency: 'usd', + value: '23', + subscriptionAlias: 'samual', + status: 'active', + effectiveDate: '1609748705', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36', + }, + messageId: '6a5f38c0-4e75-4268-a066-2b73fbcad01f', + originalTimestamp: '2021-01-04T08:25:04.780Z', + receivedAt: '2021-01-04T13:55:04.799+05:30', + request_ip: '[::1]', + rudderId: '79881a62-980a-4d76-89ca-7099440f8c13', + sentAt: '2021-01-04T08:25:04.781Z', + timestamp: '2021-09-06T14:15:06.798+05:30', + type: 'identify', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'PUT', + endpoint: 'https://api.profitwell.com/v2/subscriptions/pws_FecTCEyo17rV/', + headers: { + 'Content-Type': 'application/json', + Authorization: '9270161a8e5abaa0e56efddfd9dbcb62', + }, + params: {}, + body: { + JSON: { + plan_id: '23', + plan_interval: 'month', + value: '23', + status: 'active', + effective_date: 1609748705, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'profitwell', + description: 'Test 8', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + privateApiKey: '9270161a8e5abaa0e56efddfd9dbcb62', + }, + }, + message: { + channel: 'web', + userId: 'sp_245', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.9', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.9', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'profitwellUserId', + id: 'pwu_Oea7HXV3bnTP', + }, + { + type: 'profitwellSubscriptionId', + id: 'pws_FecTCEyo17rV', + }, + ], + traits: { + email: 'sample@sample.com', + planId: '23', + planInterval: 'monthly', + planCurrency: 'usd', + value: '23', + subscriptionAlias: 'samual', + status: 'active', + effectiveDate: '1609748705', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36', + }, + messageId: '6a5f38c0-4e75-4268-a066-2b73fbcad01f', + originalTimestamp: '2021-01-04T08:25:04.780Z', + receivedAt: '2021-01-04T13:55:04.799+05:30', + request_ip: '[::1]', + rudderId: '79881a62-980a-4d76-89ca-7099440f8c13', + sentAt: '2021-01-04T08:25:04.781Z', + timestamp: '2021-09-06T14:15:06.798+05:30', + type: 'identify', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'invalid format for planInterval. Aborting', + statTags: { + destType: 'PROFITWELL', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'profitwell', + description: 'Test 9', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + privateApiKey: '9270161a8e5abaa0e56efddfd9dbcb62', + }, + }, + message: { + channel: 'web', + userId: 'sp_245', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.9', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.9', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'profitwellUserId', + id: 'pwu_Oea7HXV3bnTP', + }, + { + type: 'profitwellSubscriptionId', + id: 'pws_FecTCEyo17rV', + }, + ], + traits: { + email: 'sample@sample.com', + planId: '23', + planInterval: 'month', + planCurrency: 'usd', + value: '23', + subscriptionAlias: 'samual', + status: 'activate', + effectiveDate: '1609748705', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36', + }, + messageId: '6a5f38c0-4e75-4268-a066-2b73fbcad01f', + originalTimestamp: '2021-01-04T08:25:04.780Z', + receivedAt: '2021-01-04T13:55:04.799+05:30', + request_ip: '[::1]', + rudderId: '79881a62-980a-4d76-89ca-7099440f8c13', + sentAt: '2021-01-04T08:25:04.781Z', + timestamp: '2021-09-06T14:15:06.798+05:30', + type: 'identify', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'PUT', + endpoint: 'https://api.profitwell.com/v2/subscriptions/pws_FecTCEyo17rV/', + headers: { + 'Content-Type': 'application/json', + Authorization: '9270161a8e5abaa0e56efddfd9dbcb62', + }, + params: {}, + body: { + JSON: { + plan_id: '23', + plan_interval: 'month', + value: '23', + effective_date: 1609748705, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'profitwell', + description: 'Test 10', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: {}, + }, + message: { + channel: 'web', + userId: 'sp_245', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.9', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.9', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'profitwellUserId', + id: 'pwu_Oea7HXV3bnTP', + }, + { + type: 'profitwellSubscriptionId', + id: 'pws_FecTCEyo17rV', + }, + ], + traits: { + email: 'sample@sample.com', + planId: '23', + planInterval: 'month', + planCurrency: 'usd', + value: '23', + subscriptionAlias: 'samual', + status: 'active', + effectiveDate: '1609748705', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36', + }, + messageId: '6a5f38c0-4e75-4268-a066-2b73fbcad01f', + originalTimestamp: '2021-01-04T08:25:04.780Z', + receivedAt: '2021-01-04T13:55:04.799+05:30', + request_ip: '[::1]', + rudderId: '79881a62-980a-4d76-89ca-7099440f8c13', + sentAt: '2021-01-04T08:25:04.781Z', + timestamp: '2021-09-06T14:15:06.798+05:30', + type: 'identify', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Private API Key not found. Aborting.', + statTags: { + destType: 'PROFITWELL', + errorCategory: 'dataValidation', + errorType: 'configuration', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'profitwell', + description: 'Test 11', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + privateApiKey: '9270161a8e5abaa0e56efddfd9dbcb62', + }, + }, + message: { + channel: 'web', + userId: 'sp_245', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.9', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.9', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'profitwellUserId', + id: 'pwu_Oea7HXV3bnTP', + }, + { + type: 'profitwellSubscriptionId', + id: 'pws_FecTCEyo17', + }, + ], + traits: { + email: 'sample@sample.com', + planId: '23', + planInterval: 'month', + planCurrency: 'usd', + value: '23', + subscriptionAlias: 'samual', + status: 'active', + effectiveDate: '1609748705', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36', + }, + messageId: '6a5f38c0-4e75-4268-a066-2b73fbcad01f', + originalTimestamp: '2021-01-04T08:25:04.780Z', + receivedAt: '2021-01-04T13:55:04.799+05:30', + request_ip: '[::1]', + rudderId: '79881a62-980a-4d76-89ca-7099440f8c13', + sentAt: '2021-01-04T08:25:04.781Z', + timestamp: '2021-09-06T14:15:06.798+05:30', + type: 'identify', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Profitwell subscription_id not found', + statTags: { + destType: 'PROFITWELL', + errorCategory: 'network', + errorType: 'aborted', + feature: 'processor', + implementation: 'native', + meta: 'instrumentation', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'profitwell', + description: 'Test 12', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + privateApiKey: '9270161a8e5abaa0e56efddfd9dbcb62', + }, + }, + message: { + channel: 'web', + userId: 'sp_245', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.9', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.9', + }, + locale: 'en-GB', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + email: 'sample@sample.com', + planId: '23', + planInterval: 'month', + planCurrency: 'usd', + value: '23', + subscriptionAlias: 'samual', + status: 'active', + effectiveDate: 1609748705, + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36', + }, + messageId: '6a5f38c0-4e75-4268-a066-2b73fbcad01f', + originalTimestamp: '2021-01-04T08:25:04.780Z', + receivedAt: '2021-01-04T13:55:04.799+05:30', + request_ip: '[::1]', + rudderId: '79881a62-980a-4d76-89ca-7099440f8c13', + sentAt: '2021-01-04T08:25:04.781Z', + timestamp: '2021-09-06T14:15:06.798+05:30', + type: 'identify', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.profitwell.com/v2/subscriptions/', + headers: { + 'Content-Type': 'application/json', + Authorization: '9270161a8e5abaa0e56efddfd9dbcb62', + }, + params: {}, + body: { + JSON: { + subscription_alias: 'samual', + email: 'sample@sample.com', + plan_id: '23', + plan_interval: 'month', + plan_currency: 'usd', + status: 'active', + value: '23', + effective_date: 1609748705, + user_alias: 'sp_245', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, +]; diff --git a/test/integrations/destinations/profitwell/router/data.ts b/test/integrations/destinations/profitwell/router/data.ts new file mode 100644 index 0000000000..11f08c2139 --- /dev/null +++ b/test/integrations/destinations/profitwell/router/data.ts @@ -0,0 +1,113 @@ +export const data = [ + { + name: 'profitwell', + description: 'Test 0', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + destination: { + Config: { + privateApiKey: '9270161a8e5abaa0e56efddfd9dbcb62', + }, + }, + metadata: { + jobId: 2, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { name: '', version: '' }, + screen: { density: 2 }, + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + type: 'identify', + userId: 'samual', + traits: { + email: 'sample@sample.com', + planId: '23', + planInterval: 'month', + planCurrency: 'usd', + value: '23', + subscriptionAlias: 'samual', + status: 'active', + }, + integrations: { All: true }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + destType: 'profitwell', + }, + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: { + body: { + XML: {}, + FORM: {}, + JSON: { + subscription_alias: 'samual', + email: 'sample@sample.com', + plan_id: '23', + plan_interval: 'month', + plan_currency: 'usd', + status: 'active', + value: '23', + user_alias: 'samual', + effective_date: 1571043797, + }, + JSON_ARRAY: {}, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + headers: { + 'Content-Type': 'application/json', + Authorization: '9270161a8e5abaa0e56efddfd9dbcb62', + }, + version: '1', + endpoint: 'https://api.profitwell.com/v2/subscriptions/', + }, + metadata: [ + { + jobId: 2, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + privateApiKey: '9270161a8e5abaa0e56efddfd9dbcb62', + }, + }, + }, + ], + }, + }, + }, + }, +]; diff --git a/test/integrations/destinations/sendgrid/network.ts b/test/integrations/destinations/sendgrid/network.ts index 18a8a8d34d..29cfbf8446 100644 --- a/test/integrations/destinations/sendgrid/network.ts +++ b/test/integrations/destinations/sendgrid/network.ts @@ -106,5 +106,165 @@ const deleteNwData = [ }, }, }, + { + httpReq: { + method: 'get', + url: 'https://api.sendgrid.com/v3/marketing/field_definitions', + headers: { + Authorization: 'Bearer apikey', + 'Content-Type': 'application/json', + }, + }, + httpRes: { + status: 200, + statusText: 'OK', + data: { + custom_fields: [ + { + id: 'w1_T', + name: 'user_name', + field_type: 'Text', + _metadata: { + self: 'https://api.sendgrid.com/v3/marketing/field_definitions/w1_T', + }, + }, + ], + reserved_fields: [ + { + id: '_rf0_T', + name: 'first_name', + field_type: 'Text', + }, + { + id: '_rf1_T', + name: 'last_name', + field_type: 'Text', + }, + { + id: '_rf2_T', + name: 'email', + field_type: 'Text', + }, + { + id: '_rf3_T', + name: 'alternate_emails', + field_type: 'Text', + }, + { + id: '_rf4_T', + name: 'address_line_1', + field_type: 'Text', + }, + { + id: '_rf5_T', + name: 'address_line_2', + field_type: 'Text', + }, + { + id: '_rf6_T', + name: 'city', + field_type: 'Text', + }, + { + id: '_rf7_T', + name: 'state_province_region', + field_type: 'Text', + }, + { + id: '_rf8_T', + name: 'postal_code', + field_type: 'Text', + }, + { + id: '_rf9_T', + name: 'country', + field_type: 'Text', + }, + { + id: '_rf10_T', + name: 'phone_number', + field_type: 'Text', + }, + { + id: '_rf11_T', + name: 'whatsapp', + field_type: 'Text', + }, + { + id: '_rf12_T', + name: 'line', + field_type: 'Text', + }, + { + id: '_rf13_T', + name: 'facebook', + field_type: 'Text', + }, + { + id: '_rf14_T', + name: 'unique_name', + field_type: 'Text', + }, + { + id: '_rf15_T', + name: 'email_domains', + field_type: 'Text', + read_only: true, + }, + { + id: '_rf16_D', + name: 'last_clicked', + field_type: 'Date', + read_only: true, + }, + { + id: '_rf17_D', + name: 'last_opened', + field_type: 'Date', + read_only: true, + }, + { + id: '_rf18_D', + name: 'last_emailed', + field_type: 'Date', + read_only: true, + }, + { + id: '_rf19_T', + name: 'singlesend_id', + field_type: 'Text', + read_only: true, + }, + { + id: '_rf20_T', + name: 'automation_id', + field_type: 'Text', + read_only: true, + }, + { + id: '_rf21_D', + name: 'created_at', + field_type: 'Date', + read_only: true, + }, + { + id: '_rf22_D', + name: 'updated_at', + field_type: 'Date', + read_only: true, + }, + { + id: '_rf23_T', + name: 'contact_id', + field_type: 'Text', + read_only: true, + }, + ], + _metadata: { + self: 'https://api.sendgrid.com/v3/marketing/field_definitions', + }, + }, + }, + }, ]; export const networkCallsData = [...deleteNwData]; diff --git a/test/integrations/destinations/sendgrid/processor/data.ts b/test/integrations/destinations/sendgrid/processor/data.ts new file mode 100644 index 0000000000..b1550787b5 --- /dev/null +++ b/test/integrations/destinations/sendgrid/processor/data.ts @@ -0,0 +1,1544 @@ +export const data = [ + { + name: 'sendgrid', + description: 'Identify call without an email', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + IPPoolName: '', + apiKey: 'apikey', + attachments: [ + { + content: '', + contentId: '', + disposition: '', + filename: '', + type: '', + }, + ], + clickTracking: true, + clickTrackingEnableText: true, + contents: [ + { + type: 'text/html', + value: + '

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

', + }, + ], + eventDelivery: false, + eventDeliveryTS: 1668424218224, + eventNamesSettings: [ + { + event: 'open', + }, + ], + footer: false, + fromEmail: 'a@g.com', + fromName: '', + ganalytics: false, + group: '', + groupsToDisplay: [ + { + groupId: '', + }, + ], + html: '', + listId: 'list111', + mailFromTraits: false, + openTracking: false, + openTrackingSubstitutionTag: '', + replyToEmail: '', + replyToName: '', + sandboxMode: false, + subject: 'hello there from webflow', + subscriptionTracking: false, + substitutionTag: '', + templateId: '', + text: '', + }, + }, + message: { + type: 'identify', + userId: 'user@1', + context: { + traits: { + age: '25', + city: 'Surat', + phone: '+91 9876543210', + lastName: 'test', + firstName: 'rudder', + state: 'Gujarat', + }, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: 'Parameter mail is required', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'SENDGRID', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'sendgrid', + description: 'Identify call with list_id configured from web-app', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + IPPoolName: '', + apiKey: 'apikey', + attachments: [ + { + content: '', + contentId: '', + disposition: '', + filename: '', + type: '', + }, + ], + clickTracking: true, + clickTrackingEnableText: true, + contents: [ + { + type: 'text/html', + value: + '

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

', + }, + ], + eventDelivery: false, + eventDeliveryTS: 1668424218224, + eventNamesSettings: [ + { + event: 'open', + }, + ], + footer: false, + fromEmail: 'a@g.com', + fromName: '', + ganalytics: false, + group: '', + groupsToDisplay: [ + { + groupId: '', + }, + ], + html: '', + listId: 'list111', + mailFromTraits: false, + openTracking: false, + openTrackingSubstitutionTag: '', + replyToEmail: '', + replyToName: '', + sandboxMode: false, + subject: 'hello there from webflow', + subscriptionTracking: false, + substitutionTag: '', + templateId: '', + text: '', + }, + }, + message: { + type: 'identify', + userId: 'user@1', + context: { + traits: { + age: '25', + city: 'Surat', + email: 'test@rudderstack.com', + phone: '+91 9876543210', + lastName: 'test', + firstName: 'rudder', + state: 'Gujarat', + }, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'PUT', + endpoint: 'https://api.sendgrid.com/v3/marketing/contacts', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer apikey', + }, + params: {}, + body: { + JSON: { + contactDetails: { + email: 'test@rudderstack.com', + phone_number: '+91 9876543210', + first_name: 'rudder', + last_name: 'test', + custom_fields: {}, + }, + contactListIds: 'list111', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'sendgrid', + description: 'Identify call with no list-id given', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '2HOQOO6wWKaKjeQrEABXgiH6cmU', + Config: { + IPPoolName: '', + apiKey: 'apikey', + attachments: [ + { + content: '', + contentId: '', + disposition: '', + filename: '', + type: '', + }, + ], + clickTracking: true, + clickTrackingEnableText: true, + contents: [ + { + type: 'text/html', + value: + '

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

', + }, + ], + customFieldsMapping: [ + { + from: 'name', + to: 'user_name', + }, + ], + eventDelivery: false, + eventDeliveryTS: 1668424218224, + eventNamesSettings: [ + { + event: 'open', + }, + ], + footer: false, + fromEmail: 'a@g.com', + fromName: '', + ganalytics: false, + group: '', + groupsToDisplay: [ + { + groupId: '', + }, + ], + html: '', + mailFromTraits: false, + openTracking: false, + openTrackingSubstitutionTag: '', + replyToEmail: '', + replyToName: '', + sandboxMode: false, + subject: 'hello there from webflow', + subscriptionTracking: false, + substitutionTag: '', + templateId: '', + text: '', + }, + }, + message: { + type: 'identify', + userId: 'user@1', + context: { + traits: { + age: '25', + city: 'Surat', + name: 'rudder test', + email: 'test@rudderstack.com', + phone: '+91 9876543210', + lastName: 'test', + firstName: 'rudder', + state: 'Gujarat', + }, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + XML: {}, + FORM: {}, + JSON: { + contactDetails: { + email: 'test@rudderstack.com', + last_name: 'test', + first_name: 'rudder', + unique_name: 'rudder test', + phone_number: '+91 9876543210', + custom_fields: { + w1_T: 'rudder test', + }, + }, + contactListIds: '', + }, + JSON_ARRAY: {}, + }, + type: 'REST', + userId: '', + files: {}, + method: 'PUT', + params: {}, + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer apikey', + }, + version: '1', + endpoint: 'https://api.sendgrid.com/v3/marketing/contacts', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'sendgrid', + description: 'Track Call', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'apikey', + eventNamesSettings: [ + { + event: 'testing', + }, + { + event: 'clicked', + }, + ], + subject: 'A sample subject', + replyToEmail: 'ankit@rudderstack.com', + contents: [ + { + type: 'text/html', + value: + '

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

', + }, + ], + footer: false, + bypassListManagement: false, + sandboxMode: false, + clickTracking: false, + openTracking: false, + ganalytics: false, + subscriptionTracking: false, + clickTrackingEnableText: false, + text: null, + utmContent: null, + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + type: 'track', + event: 'testing', + properties: { + personalizations: [ + { + to: [ + { + email: 'a@g.com', + }, + { + name: 'hello', + }, + ], + subject: 'hey there', + }, + ], + from: { + email: 'ankit@rudderstack.com', + }, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.sendgrid.com/v3/mail/send', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer apikey', + }, + params: {}, + body: { + JSON: { + from: { + email: 'ankit@rudderstack.com', + }, + personalizations: [ + { + to: [ + { + email: 'a@g.com', + }, + ], + subject: 'hey there', + }, + ], + content: [ + { + type: 'text/html', + value: + '

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

', + }, + ], + subject: 'A sample subject', + reply_to: { + email: 'ankit@rudderstack.com', + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'sendgrid', + description: 'Track Call', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'apikey', + eventNamesSettings: [ + { + event: 'testing', + }, + { + event: 'clicked', + }, + ], + subject: 'A sample subject', + replyToEmail: 'ankit@rudderstack.com', + contents: [ + { + type: 'text/html', + value: + '

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

', + }, + ], + footer: false, + footerText: 'some text', + bypassListManagement: false, + sandboxMode: false, + clickTracking: false, + openTracking: false, + ganalytics: false, + subscriptionTracking: false, + clickTrackingEnableText: false, + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + type: 'track', + event: 'testing', + properties: { + replyTo: { + email: 'testing@gmail.com', + }, + personalizations: [ + { + to: [ + { + email: 'a@g.com', + }, + { + name: 'hello', + }, + ], + subject: 'hey there', + }, + ], + from: { + email: 'ankit@rudderstack.com', + }, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.sendgrid.com/v3/mail/send', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer apikey', + }, + params: {}, + body: { + JSON: { + from: { + email: 'ankit@rudderstack.com', + }, + personalizations: [ + { + to: [ + { + email: 'a@g.com', + }, + ], + subject: 'hey there', + }, + ], + reply_to: { + email: 'testing@gmail.com', + }, + content: [ + { + type: 'text/html', + value: + '

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

', + }, + ], + subject: 'A sample subject', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'sendgrid', + description: 'Track Call', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'apikey', + eventNamesSettings: [ + { + event: 'testing', + }, + { + event: 'clicked', + }, + ], + subject: 'A sample subject', + replyToEmail: 'ankit@rudderstack.com', + contents: [ + { + type: 'text/html', + value: + '

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

', + }, + ], + footer: false, + footerText: 'some text', + bypassListManagement: false, + sandboxMode: false, + clickTracking: false, + openTracking: false, + ganalytics: false, + subscriptionTracking: false, + clickTrackingEnableText: false, + group: '12345', + groupsToDisplay: [ + { + groupId: '12345', + }, + { + groupId: 'abc', + }, + { + groupId: '12346', + }, + ], + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + type: 'track', + event: 'testing', + properties: { + replyTo: { + email: 'testing@gmail.com', + }, + personalizations: [ + { + to: [ + { + email: 'a@g.com', + }, + { + name: 'hello', + }, + ], + subject: 'hey there', + }, + ], + from: { + email: 'ankit@rudderstack.com', + }, + }, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.sendgrid.com/v3/mail/send', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer apikey', + }, + params: {}, + body: { + JSON: { + from: { + email: 'ankit@rudderstack.com', + }, + personalizations: [ + { + to: [ + { + email: 'a@g.com', + }, + ], + subject: 'hey there', + }, + ], + reply_to: { + email: 'testing@gmail.com', + }, + content: [ + { + type: 'text/html', + value: + '

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

', + }, + ], + subject: 'A sample subject', + asm: { + group_id: 12345, + groups_to_display: [12345, 12346], + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'sendgrid', + description: 'Track call without an event name', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'apikey', + eventNamesSettings: [ + { + event: 'testing', + }, + { + event: 'clicked', + }, + ], + subject: 'A sample subject', + replyToEmail: 'ankit@rudderstack.com', + contents: [ + { + type: 'text/html', + value: + '

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

', + }, + ], + footer: false, + footerText: 'some text', + bypassListManagement: false, + sandboxMode: false, + clickTracking: false, + openTracking: false, + ganalytics: false, + subscriptionTracking: false, + clickTrackingEnableText: false, + group: '12345', + groupsToDisplay: [ + { + groupId: '12345', + }, + { + groupId: 'abc', + }, + { + groupId: '12346', + }, + ], + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + type: 'track', + event: 'new event', + properties: { + replyTo: { + email: 'testing@gmail.com', + }, + personalizations: [ + { + to: [ + { + email: 'a@g.com', + }, + { + name: 'hello', + }, + ], + subject: 'hey there', + }, + ], + from: { + email: 'ankit@rudderstack.com', + }, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: 'Event not configured on dashboard', + statTags: { + errorCategory: 'dataValidation', + errorType: 'configuration', + destType: 'SENDGRID', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'sendgrid', + description: 'Track Call', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'apikey', + eventNamesSettings: [ + { + event: 'testing', + }, + { + event: 'clicked', + }, + ], + subject: 'A sample subject', + replyToEmail: 'ankit@rudderstack.com', + contents: [ + { + type: 'text/html', + value: + '

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

', + }, + ], + footer: false, + footerText: 'some text', + bypassListManagement: false, + sandboxMode: false, + clickTracking: false, + openTracking: false, + ganalytics: false, + subscriptionTracking: false, + clickTrackingEnableText: false, + group: '12345', + groupsToDisplay: [ + { + groupId: '12345', + }, + { + groupId: 'abc', + }, + { + groupId: '12346', + }, + ], + attachments: [ + { + content: 'YXNkZ2FmZ3FlcmRxZ2Iua2puYWRrbGpuYWtqc2Rmbg==', + filename: 'index.html', + }, + ], + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + type: 'track', + event: 'testing', + properties: { + replyTo: { + email: 'testing@gmail.com', + }, + personalizations: [ + { + to: [ + { + email: 'a@g.com', + }, + { + name: 'hello', + }, + ], + subject: 'hey there', + }, + ], + from: { + email: 'ankit@rudderstack.com', + }, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.sendgrid.com/v3/mail/send', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer apikey', + }, + params: {}, + body: { + JSON: { + from: { + email: 'ankit@rudderstack.com', + }, + personalizations: [ + { + to: [ + { + email: 'a@g.com', + }, + ], + subject: 'hey there', + }, + ], + reply_to: { + email: 'testing@gmail.com', + }, + attachments: [ + { + content: 'YXNkZ2FmZ3FlcmRxZ2Iua2puYWRrbGpuYWtqc2Rmbg==', + filename: 'index.html', + }, + ], + content: [ + { + type: 'text/html', + value: + '

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

', + }, + ], + subject: 'A sample subject', + asm: { + group_id: 12345, + groups_to_display: [12345, 12346], + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'sendgrid', + description: 'Track Call', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'apikey', + eventNamesSettings: [ + { + event: 'testing', + }, + { + event: 'clicked', + }, + ], + subject: 'A sample subject', + replyToEmail: 'ankit@rudderstack.com', + contents: [ + { + type: 'text/html', + value: + '

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

', + }, + ], + footer: false, + footerText: 'some text', + bypassListManagement: false, + sandboxMode: false, + clickTracking: false, + openTracking: false, + ganalytics: false, + subscriptionTracking: false, + clickTrackingEnableText: false, + group: '12345', + groupsToDisplay: [ + { + groupId: '12345', + }, + { + groupId: 'abc', + }, + { + groupId: '12346', + }, + ], + attachments: [ + { + content: 'YXNkZ21hcyxkLm1mO29xd2llbGpmbWwuYWRrbXMuLGFtZHM=', + filename: 'index.html', + }, + { + content: 'bGFqa3NtZGZrZ2hxaWVybmtsYSBmZGtvamx3bWVGTC5NQW5kcy5rbmtmYWtkZg==', + }, + ], + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + type: 'track', + event: 'testing', + properties: { + replyTo: { + email: 'testing@gmail.com', + }, + personalizations: [ + { + to: [ + { + email: 'a@g.com', + }, + { + name: 'hello', + }, + ], + subject: 'hey there', + }, + ], + from: { + email: 'ankit@rudderstack.com', + }, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.sendgrid.com/v3/mail/send', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer apikey', + }, + params: {}, + body: { + JSON: { + from: { + email: 'ankit@rudderstack.com', + }, + personalizations: [ + { + to: [ + { + email: 'a@g.com', + }, + ], + subject: 'hey there', + }, + ], + reply_to: { + email: 'testing@gmail.com', + }, + attachments: [ + { + content: 'YXNkZ21hcyxkLm1mO29xd2llbGpmbWwuYWRrbXMuLGFtZHM=', + filename: 'index.html', + }, + ], + content: [ + { + type: 'text/html', + value: + '

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

', + }, + ], + subject: 'A sample subject', + asm: { + group_id: 12345, + groups_to_display: [12345, 12346], + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'sendgrid', + description: 'Track Call', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'apikey', + eventNamesSettings: [ + { + event: 'testing', + }, + { + event: 'clicked', + }, + ], + subject: 'A sample subject', + replyToEmail: 'ankit@rudderstack.com', + contents: [ + { + type: 'text/html', + value: + '

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

', + }, + ], + footer: false, + footerText: 'some text', + bypassListManagement: false, + sandboxMode: false, + clickTracking: false, + openTracking: false, + ganalytics: false, + subscriptionTracking: false, + clickTrackingEnableText: false, + group: '12345', + groupsToDisplay: [ + { + groupId: '12345', + }, + { + groupId: 'abc', + }, + { + groupId: '12346', + }, + ], + attachments: [ + { + content: 'YXNkZ21hcyxkLm1mO29xd2llbGpmbWwuYWRrbXMuLGFtZHM=', + filename: 'index.html', + }, + { + content: 'bGFqa3NtZGZrZ2hxaWVybmtsYSBmZGtvamx3bWVGTC5NQW5kcy5rbmtmYWtkZg==', + }, + ], + }, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + type: 'track', + event: 'testing', + properties: { + replyTo: { + email: 'testing@gmail.com', + }, + mailSettings: { + bypassListManagement: true, + footer: true, + }, + personalizations: [ + { + to: [ + { + email: 'a@g.com', + }, + { + name: 'hello', + }, + ], + subject: 'hey there', + }, + ], + from: { + email: 'ankit@rudderstack.com', + }, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.sendgrid.com/v3/mail/send', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer apikey', + }, + params: {}, + body: { + JSON: { + from: { + email: 'ankit@rudderstack.com', + }, + personalizations: [ + { + to: [ + { + email: 'a@g.com', + }, + ], + subject: 'hey there', + }, + ], + reply_to: { + email: 'testing@gmail.com', + }, + attachments: [ + { + content: 'YXNkZ21hcyxkLm1mO29xd2llbGpmbWwuYWRrbXMuLGFtZHM=', + filename: 'index.html', + }, + ], + content: [ + { + type: 'text/html', + value: + '

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

', + }, + ], + subject: 'A sample subject', + asm: { + group_id: 12345, + groups_to_display: [12345, 12346], + }, + mail_settings: { + bypass_list_management: { + enable: true, + }, + footer: { + enable: true, + text: 'some text', + }, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, +]; diff --git a/test/integrations/destinations/sendgrid/router/data.ts b/test/integrations/destinations/sendgrid/router/data.ts new file mode 100644 index 0000000000..6d79e556eb --- /dev/null +++ b/test/integrations/destinations/sendgrid/router/data.ts @@ -0,0 +1,177 @@ +import { FEATURES } from '../../../../../src/v0/util/tags'; + +export const data = [ + { + name: 'sendgrid', + description: 'Router Test Case', + feature: FEATURES.ROUTER, + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + destination: { + Config: { + apiKey: 'apikey', + eventNamesSettings: [{ event: 'testing' }, { event: 'clicked' }], + subject: 'A sample subject', + replyToEmail: 'ankit@rudderstack.com', + contents: [ + { + type: 'text/html', + value: + '

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

', + }, + ], + footer: false, + bypassListManagement: false, + sandboxMode: false, + clickTracking: false, + openTracking: false, + ganalytics: false, + subscriptionTracking: false, + clickTrackingEnableText: false, + }, + }, + metadata: { + jobId: 2, + }, + message: { + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { name: '', version: '' }, + screen: { density: 2 }, + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + type: 'track', + event: 'testing', + properties: { + personalizations: [ + { + to: [ + { + email: 'a@g.com', + }, + { + name: 'hello', + }, + ], + subject: 'hey there', + }, + ], + from: { + email: 'ankit@rudderstack.com', + }, + }, + integrations: { All: true }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + }, + ], + destType: 'sendgrid', + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: { + body: { + XML: {}, + FORM: {}, + JSON_ARRAY: {}, + JSON: { + personalizations: [ + { + to: [ + { + email: 'a@g.com', + }, + ], + subject: 'hey there', + }, + ], + from: { + email: 'ankit@rudderstack.com', + }, + reply_to: { email: 'ankit@rudderstack.com' }, + subject: 'A sample subject', + content: [ + { + type: 'text/html', + value: + '

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

', + }, + ], + }, + }, + type: 'REST', + files: {}, + method: 'POST', + params: {}, + headers: { + Authorization: 'Bearer apikey', + 'Content-Type': 'application/json', + }, + version: '1', + endpoint: 'https://api.sendgrid.com/v3/mail/send', + }, + metadata: [ + { + jobId: 2, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + apiKey: 'apikey', + eventNamesSettings: [{ event: 'testing' }, { event: 'clicked' }], + subject: 'A sample subject', + replyToEmail: 'ankit@rudderstack.com', + contents: [ + { + type: 'text/html', + value: + '

Hello from Twilio SendGrid!

Sending with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.

%open-track%

', + }, + ], + footer: false, + bypassListManagement: false, + sandboxMode: false, + clickTracking: false, + openTracking: false, + ganalytics: false, + subscriptionTracking: false, + clickTrackingEnableText: false, + }, + }, + }, + ], + }, + }, + }, + }, +]; diff --git a/test/integrations/destinations/sendinblue/network.ts b/test/integrations/destinations/sendinblue/network.ts new file mode 100644 index 0000000000..f4f7e84fa7 --- /dev/null +++ b/test/integrations/destinations/sendinblue/network.ts @@ -0,0 +1,92 @@ +export const networkCallsData = [ + { + httpReq: { + url: 'https://api.sendinblue.com/v3/contacts/gordon_pittman%40example.com', + method: 'GET', + }, + httpRes: { + data: { + email: 'gordon_pittman@example.com', + id: 42, + emailBlacklisted: false, + smsBlacklisted: false, + createdAt: '2022-12-04T18:22:48.384+05:30', + modifiedAt: '2022-12-18T14:06:20.515+05:30', + attributes: { + LASTNAME: 'Pittman', + FIRSTNAME: 'Gordon', + AGE: 33, + }, + listIds: [5], + statistics: {}, + }, + status: 200, + }, + }, + { + httpReq: { + url: 'https://api.sendinblue.com/v3/contacts/42', + method: 'GET', + }, + httpRes: { + data: { + email: 'gordon_pittman@example.com', + id: 42, + emailBlacklisted: false, + smsBlacklisted: false, + createdAt: '2022-12-04T18:22:48.384+05:30', + modifiedAt: '2022-12-18T14:06:20.515+05:30', + attributes: { + LASTNAME: 'Pittman', + FIRSTNAME: 'Gordon', + AGE: 33, + }, + listIds: [5], + statistics: {}, + }, + status: 200, + }, + }, + { + httpReq: { + url: 'https://api.sendinblue.com/v3/contacts/john_doe%40example.com', + method: 'GET', + }, + httpRes: { + status: 404, + }, + }, + { + httpReq: { + url: 'https://api.profitwell.com/v2/users/sp_245/', + method: 'GET', + }, + httpRes: { + message: 'Request failed with status code 404', + status: 404, + statusText: 'Not Found', + }, + }, + { + httpReq: { + url: 'https://api.profitwell.com/v2/users/1234/', + method: 'GET', + }, + httpRes: { + message: 'Request failed with status code 404', + status: 404, + statusText: 'Not Found', + }, + }, + { + httpReq: { + url: 'https://api.profitwell.com/v2/users/samual/', + method: 'GET', + }, + httpRes: { + message: 'Request failed with status code 404', + status: 404, + statusText: 'Not Found', + }, + }, +]; diff --git a/test/integrations/destinations/sendinblue/processor/data.ts b/test/integrations/destinations/sendinblue/processor/data.ts new file mode 100644 index 0000000000..e50bb9c003 --- /dev/null +++ b/test/integrations/destinations/sendinblue/processor/data.ts @@ -0,0 +1,1722 @@ +export const data = [ + { + name: 'sendinblue', + description: 'Page call without email or phone', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'page', + sentAt: '2021-01-03T17:02:53.195Z', + channel: 'web', + name: 'New Page', + properties: { + url: 'https://www.google.com/', + title: 'Google home', + }, + context: { + traits: {}, + page: { + url: 'http://127.0.0.1:7307/Testing/test/ourSdk.html', + path: '/Testing/test/ourSdk.html', + title: 'Document', + search: '', + tab_url: 'http://127.0.0.1:7307/Testing/test/ourSdk.html', + referrer: 'http://127.0.0.1:7307/Testing/test/', + initial_referrer: '$direct', + referring_domain: '127.0.0.1:7307', + initial_referring_domain: '', + }, + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + destination: { + Config: { + apiKey: 'apiKey123', + clientKey: 'clientKey123', + doi: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'At least one of `email` or `phone` is required', + statTags: { + destType: 'SENDINBLUE', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'sendinblue', + description: 'Page call', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'page', + sentAt: '2021-01-03T17:02:53.195Z', + channel: 'web', + name: 'New Page', + properties: { + url: 'https://www.google.com/', + title: 'Google home', + }, + context: { + traits: { + email: 'john_doe@example.com', + }, + page: { + url: 'http://127.0.0.1:7307/Testing/test/ourSdk.html', + path: '/Testing/test/ourSdk.html', + title: 'Document', + search: '', + tab_url: 'http://127.0.0.1:7307/Testing/test/ourSdk.html', + referrer: 'http://127.0.0.1:7307/Testing/test/', + initial_referrer: '$direct', + referring_domain: '127.0.0.1:7307', + initial_referring_domain: '', + }, + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + destination: { + Config: { + apiKey: 'apiKey123', + clientKey: 'clientKey123', + templateId: 3, + doi: false, + redirectionUrl: 'https://app.sendinblue.com/marketing-dashboard', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + FORM: {}, + JSON: { + email: 'john_doe@example.com', + page: 'https://www.google.com/', + properties: { + ma_path: '/Testing/test/ourSdk.html', + ma_referrer: 'http://127.0.0.1:7307/Testing/test/', + ma_title: 'Google home', + sib_name: 'New Page', + }, + }, + JSON_ARRAY: {}, + XML: {}, + }, + endpoint: 'https://in-automate.sendinblue.com/api/v2/trackPage', + files: {}, + headers: { + 'Content-Type': 'application/json', + 'ma-key': 'clientKey123', + }, + method: 'POST', + params: {}, + type: 'REST', + version: '1', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'sendinblue', + description: 'Track call without email or phone', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + sentAt: '2021-01-03T17:02:53.195Z', + channel: 'web', + event: 'Order Completed', + properties: {}, + context: { + traits: { + first_name: 'John', + lastName: 'Doe', + }, + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + destination: { + Config: { + apiKey: 'apiKey123', + clientKey: 'clientKey123', + doi: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'At least one of `email` or `phone` is required', + statTags: { + destType: 'SENDINBLUE', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'sendinblue', + description: 'Track call without event', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + sentAt: '2021-01-03T17:02:53.195Z', + channel: 'web', + properties: {}, + context: {}, + }, + destination: { + Config: { + apiKey: 'apiKey123', + clientKey: 'clientKey123', + doi: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Event name is required', + statTags: { + destType: 'SENDINBLUE', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'sendinblue', + description: 'Track events with sendTraitsInTrack flag set to true', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + sentAt: '2021-01-03T17:02:53.195Z', + channel: 'web', + event: 'Order Completed', + properties: {}, + context: { + traits: { + first_name: 'John', + lastName: 'Doe', + age: 19, + email: 'john_doe@example.com', + phone: '+919876543210', + location: 'Mumbai', + role: 'SDE', + }, + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + destination: { + Config: { + apiKey: 'apiKey123', + clientKey: 'clientKey123', + doi: false, + sendTraitsInTrack: true, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + FORM: {}, + JSON: { + email: 'john_doe@example.com', + event: 'Order Completed', + eventdata: {}, + properties: { + FIRSTNAME: 'John', + LASTNAME: 'Doe', + SMS: '+919876543210', + age: 19, + location: 'Mumbai', + role: 'SDE', + }, + }, + JSON_ARRAY: {}, + XML: {}, + }, + endpoint: 'https://in-automate.sendinblue.com/api/v2/trackEvent', + files: {}, + headers: { + 'Content-Type': 'application/json', + 'ma-key': 'clientKey123', + }, + method: 'POST', + params: {}, + type: 'REST', + version: '1', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'sendinblue', + description: 'Track events with contactAttributeMapping provided in webapp', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + sentAt: '2021-01-03T17:02:53.195Z', + channel: 'web', + event: 'Order Completed', + properties: {}, + context: { + traits: { + first_name: 'John', + lastName: 'Doe', + age: 19, + email: 'john_doe@example.com', + phone: '+919876543210', + location: 'Mumbai', + role: 'SDE', + }, + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + destination: { + Config: { + apiKey: 'apiKey123', + clientKey: 'clientKey123', + doi: false, + contactAttributeMapping: [ + { + from: 'location', + to: 'LOCATION', + }, + ], + sendTraitsInTrack: true, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + FORM: {}, + JSON: { + email: 'john_doe@example.com', + event: 'Order Completed', + eventdata: {}, + properties: { + FIRSTNAME: 'John', + LASTNAME: 'Doe', + LOCATION: 'Mumbai', + SMS: '+919876543210', + age: 19, + role: 'SDE', + }, + }, + JSON_ARRAY: {}, + XML: {}, + }, + endpoint: 'https://in-automate.sendinblue.com/api/v2/trackEvent', + files: {}, + headers: { + 'Content-Type': 'application/json', + 'ma-key': 'clientKey123', + }, + method: 'POST', + params: {}, + type: 'REST', + version: '1', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'sendinblue', + description: 'Track events with propertiesIdKey provided in integration object', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + sentAt: '2021-01-03T17:02:53.195Z', + channel: 'web', + event: 'Order Completed', + properties: { + orderId: '1341394-3812392190', + products: [ + { + product_id: 1234, + product_name: 'Track Pants', + amount: 1, + price: 220, + }, + { + product_id: 5768, + product_name: 'T-Shirt', + amount: 5, + price: 1058, + }, + ], + }, + context: { + traits: { + first_name: 'John', + lastName: 'Doe', + age: 19, + email: 'john_doe@example.com', + phone: '+919876543210', + location: 'Mumbai', + role: 'SDE', + }, + }, + integrations: { + All: true, + sendinblue: { + propertiesIdKey: 'orderId', + }, + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + destination: { + Config: { + apiKey: 'apiKey123', + clientKey: 'clientKey123', + doi: false, + contactAttributeMapping: [ + { + from: 'location', + to: 'LOCATION', + }, + ], + sendTraitsInTrack: true, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + FORM: {}, + JSON: { + email: 'john_doe@example.com', + event: 'Order Completed', + eventdata: { + data: { + orderId: '1341394-3812392190', + products: [ + { + amount: 1, + price: 220, + product_id: 1234, + product_name: 'Track Pants', + }, + { + amount: 5, + price: 1058, + product_id: 5768, + product_name: 'T-Shirt', + }, + ], + }, + id: '1341394-3812392190', + }, + properties: { + FIRSTNAME: 'John', + LASTNAME: 'Doe', + LOCATION: 'Mumbai', + SMS: '+919876543210', + age: 19, + role: 'SDE', + }, + }, + JSON_ARRAY: {}, + XML: {}, + }, + endpoint: 'https://in-automate.sendinblue.com/api/v2/trackEvent', + files: {}, + headers: { + 'Content-Type': 'application/json', + 'ma-key': 'clientKey123', + }, + method: 'POST', + params: {}, + type: 'REST', + version: '1', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'sendinblue', + description: 'Track events with eventdata.id taken from messageId', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + sentAt: '2021-01-03T17:02:53.195Z', + channel: 'web', + event: 'Order Completed', + properties: { + orderId: '1341394-3812392190', + products: [ + { + product_id: 1234, + product_name: 'Track Pants', + amount: 1, + price: 220, + }, + { + product_id: 5768, + product_name: 'T-Shirt', + amount: 5, + price: 1058, + }, + ], + }, + context: { + traits: { + first_name: 'John', + lastName: 'Doe', + age: 19, + email: 'john_doe@example.com', + phone: '+919876543210', + location: 'Mumbai', + role: 'SDE', + }, + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + destination: { + Config: { + apiKey: 'apiKey123', + clientKey: 'clientKey123', + doi: false, + contactAttributeMapping: [ + { + from: 'location', + to: 'LOCATION', + }, + ], + sendTraitsInTrack: true, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + FORM: {}, + JSON: { + email: 'john_doe@example.com', + event: 'Order Completed', + eventdata: { + data: { + orderId: '1341394-3812392190', + products: [ + { + amount: 1, + price: 220, + product_id: 1234, + product_name: 'Track Pants', + }, + { + amount: 5, + price: 1058, + product_id: 5768, + product_name: 'T-Shirt', + }, + ], + }, + id: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + }, + properties: { + FIRSTNAME: 'John', + LASTNAME: 'Doe', + LOCATION: 'Mumbai', + SMS: '+919876543210', + age: 19, + role: 'SDE', + }, + }, + JSON_ARRAY: {}, + XML: {}, + }, + endpoint: 'https://in-automate.sendinblue.com/api/v2/trackEvent', + files: {}, + headers: { + 'Content-Type': 'application/json', + 'ma-key': 'clientKey123', + }, + method: 'POST', + params: {}, + type: 'REST', + version: '1', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'sendinblue', + description: 'Track link without email or phone', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + sentAt: '2021-01-03T17:02:53.195Z', + channel: 'web', + event: 'trackLink', + properties: { + link: 'https://www.google.com/gmail/', + emailCount: 19, + }, + context: { + traits: {}, + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + destination: { + Config: { + apiKey: 'apiKey123', + clientKey: 'clientKey123', + doi: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'At least one of `email` or `phone` is required', + statTags: { + destType: 'SENDINBLUE', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'sendinblue', + description: 'Track link without link', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + sentAt: '2021-01-03T17:02:53.195Z', + channel: 'web', + event: 'trackLink', + properties: {}, + context: { + traits: { + phone: '+919507545089', + }, + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + destination: { + Config: { + apiKey: 'apiKey123', + clientKey: 'clientKey123', + doi: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Missing required value from "properties.link"', + statTags: { + destType: 'SENDINBLUE', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'sendinblue', + description: 'Track link', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'track', + sentAt: '2021-01-03T17:02:53.195Z', + channel: 'web', + event: 'trackLink', + properties: { + link: 'https://www.google.com/gmail/', + emailCount: 19, + }, + context: { + traits: { + phone: '+919507545089', + }, + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + destination: { + Config: { + apiKey: 'apiKey123', + clientKey: 'clientKey123', + doi: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + FORM: {}, + JSON: { + email: '919507545089@mailin-sms.com', + link: 'https://www.google.com/gmail/', + properties: { + emailCount: 19, + }, + }, + JSON_ARRAY: {}, + XML: {}, + }, + endpoint: 'https://in-automate.sendinblue.com/api/v2/trackLink', + files: {}, + headers: { + 'Content-Type': 'application/json', + 'ma-key': 'clientKey123', + }, + method: 'POST', + params: {}, + type: 'REST', + version: '1', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'sendinblue', + description: 'Identify call with invalid email', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'identify', + sentAt: '2021-01-03T17:02:53.195Z', + channel: 'web', + traits: { + email: 'abc.com', + }, + context: {}, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + destination: { + Config: { + apiKey: 'apiKey123', + clientKey: 'clientKey123', + doi: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'The provided email is invalid', + statTags: { + destType: 'SENDINBLUE', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'sendinblue', + description: 'Identify call with invalid phone number', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'identify', + sentAt: '2021-01-03T17:02:53.195Z', + channel: 'web', + traits: { + phone: '99999999', + }, + context: {}, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + destination: { + Config: { + apiKey: 'apiKey123', + clientKey: 'clientKey123', + doi: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'The provided phone number is invalid', + statTags: { + destType: 'SENDINBLUE', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'sendinblue', + description: 'Identify call to create or update a contact without email or phone', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'identify', + sentAt: '2021-01-03T17:02:53.195Z', + channel: 'web', + context: {}, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + destination: { + Config: { + apiKey: 'apiKey123', + clientKey: 'clientKey123', + doi: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'At least one of `email` or `phone` is required', + statTags: { + destType: 'SENDINBLUE', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'sendinblue', + description: 'Identify call to create or update a contact', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'identify', + sentAt: '2021-01-03T17:02:53.195Z', + channel: 'web', + traits: { + first_name: 'John', + lastName: 'Doe', + age: 19, + email: 'john_doe@example.com', + phone: '+919876543210', + location: 'Mumbai', + newEmail: 'alex_root@example.com', + role: 'SDE', + }, + context: { + externalId: [ + { + type: 'sendinblueIncludeListIds', + id: [1, 2], + }, + ], + }, + integrations: { + All: true, + sendinblue: { + emailBlacklisted: true, + }, + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + destination: { + Config: { + apiKey: 'apiKey123', + clientKey: 'clientKey123', + doi: false, + contactAttributeMapping: [ + { + from: 'location', + to: 'LOCATION', + }, + ], + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + FORM: {}, + JSON: { + attributes: { + FIRSTNAME: 'John', + LASTNAME: 'Doe', + LOCATION: 'Mumbai', + SMS: '+919876543210', + EMAIL: 'alex_root@example.com', + age: 19, + role: 'SDE', + }, + email: 'john_doe@example.com', + emailBlacklisted: true, + listIds: [1, 2], + updateEnabled: true, + }, + JSON_ARRAY: {}, + XML: {}, + }, + endpoint: 'https://api.sendinblue.com/v3/contacts', + files: {}, + headers: { + 'Content-Type': 'application/json', + 'api-key': 'apiKey123', + }, + method: 'POST', + params: {}, + type: 'REST', + version: '1', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'sendinblue', + description: 'Identify call to create DOI contact with templatedId from externalId', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'identify', + sentAt: '2021-01-03T17:02:53.195Z', + channel: 'web', + traits: { + first_name: 'John', + lastName: 'Doe', + age: 19, + email: 'john_doe@example.com', + phone: '+919876543210', + location: 'Mumbai', + role: 'SDE', + }, + context: { + externalId: [ + { + type: 'sendinblueIncludeListIds', + id: [1, 2], + }, + { + type: 'sendinblueUnlinkListIds', + id: [5], + }, + { + type: 'sendinblueTemplateId', + id: 2, + }, + ], + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + destination: { + Config: { + apiKey: 'apiKey123', + clientKey: 'clientKey123', + templateId: 3, + doi: true, + redirectionUrl: 'https://app.sendinblue.com/marketing-dashboard', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + FORM: {}, + JSON: { + attributes: { + FIRSTNAME: 'John', + LASTNAME: 'Doe', + SMS: '+919876543210', + age: 19, + location: 'Mumbai', + role: 'SDE', + }, + email: 'john_doe@example.com', + includeListIds: [1, 2], + redirectionUrl: 'https://app.sendinblue.com/marketing-dashboard', + templateId: 3, + }, + JSON_ARRAY: {}, + XML: {}, + }, + endpoint: 'https://api.sendinblue.com/v3/contacts/doubleOptinConfirmation', + files: {}, + headers: { + 'Content-Type': 'application/json', + 'api-key': 'apiKey123', + }, + method: 'POST', + params: {}, + type: 'REST', + version: '1', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'sendinblue', + description: 'Identify call to create DOI contact without include list Ids', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'identify', + sentAt: '2021-01-03T17:02:53.195Z', + channel: 'web', + traits: { + first_name: 'John', + lastName: 'Doe', + age: 19, + email: 'john_doe@example.com', + phone: '+919876543210', + location: 'Mumbai', + role: 'SDE', + }, + context: {}, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + destination: { + Config: { + apiKey: 'apiKey123', + clientKey: 'clientKey123', + templateId: 3, + doi: true, + redirectionUrl: 'https://app.sendinblue.com/marketing-dashboard', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'sendinblueIncludeListIds is required to create a contact using DOI', + statTags: { + destType: 'SENDINBLUE', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'sendinblue', + description: 'Identify call to create DOI contact without template Id', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'identify', + sentAt: '2021-01-03T17:02:53.195Z', + channel: 'web', + traits: { + first_name: 'John', + lastName: 'Doe', + age: 19, + email: 'john_doe@example.com', + phone: '+919876543210', + location: 'Mumbai', + role: 'SDE', + }, + context: {}, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + destination: { + Config: { + apiKey: 'apiKey123', + clientKey: 'clientKey123', + doi: true, + redirectionUrl: 'https://app.sendinblue.com/marketing-dashboard', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'templateId is required to create a contact using DOI', + statTags: { + destType: 'SENDINBLUE', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'sendinblue', + description: 'Identify call to update a DOI contact without an email or contact ID', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'identify', + sentAt: '2021-01-03T17:02:53.195Z', + channel: 'web', + traits: { + first_name: 'Gordon', + lastName: 'Pittman', + age: 19, + location: 'Mumbai', + role: 'SDE', + }, + context: {}, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + destination: { + Config: { + apiKey: 'apiKey123', + clientKey: 'clientKey123', + templateId: 3, + doi: true, + redirectionUrl: 'https://app.sendinblue.com/marketing-dashboard', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: + 'At least one of `email` or `contactId` is required to update the contact using DOI', + statTags: { + destType: 'SENDINBLUE', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'sendinblue', + description: + 'Identify call to update a DOI contact using contactId as an Identifier and without include list Ids', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'identify', + sentAt: '2021-01-03T17:02:53.195Z', + channel: 'web', + traits: { + age: 36, + location: 'Mumbai', + role: 'SDE 2', + }, + context: { + externalId: [ + { + type: 'sendinblueContactId', + id: 42, + }, + ], + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + destination: { + Config: { + apiKey: 'apiKey123', + clientKey: 'clientKey123', + templateId: 3, + doi: true, + redirectionUrl: 'https://app.sendinblue.com/marketing-dashboard', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + FORM: {}, + JSON: { + attributes: { + age: 36, + location: 'Mumbai', + role: 'SDE 2', + }, + }, + JSON_ARRAY: {}, + XML: {}, + }, + endpoint: 'https://api.sendinblue.com/v3/contacts/42', + files: {}, + headers: { + 'Content-Type': 'application/json', + 'api-key': 'apiKey123', + }, + method: 'PUT', + params: {}, + type: 'REST', + version: '1', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'sendinblue', + description: + 'Identify call to update a DOI contact using email as an Identifier and without include list Ids', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'identify', + sentAt: '2021-01-03T17:02:53.195Z', + channel: 'web', + traits: { + age: 36, + location: 'Mumbai', + role: 'SDE 2', + phone: '+918888888888', + email: 'gordon_pittman@example.com', + newEmail: 'gordon_pittman007@example.com', + }, + context: { + externalId: [ + { + type: 'sendinblueIncludeListIds', + id: [1], + }, + { + type: 'sendinblueUnlinkListIds', + id: [2], + }, + ], + }, + integrations: { + All: true, + sendinblue: { + emailBlacklisted: true, + smsBlacklisted: false, + }, + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + destination: { + Config: { + apiKey: 'apiKey123', + clientKey: 'clientKey123', + templateId: 3, + doi: true, + redirectionUrl: 'https://app.sendinblue.com/marketing-dashboard', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + FORM: {}, + JSON: { + attributes: { + age: 36, + location: 'Mumbai', + role: 'SDE 2', + SMS: '+918888888888', + EMAIL: 'gordon_pittman007@example.com', + }, + emailBlacklisted: true, + smsBlacklisted: false, + listIds: [1], + unlinkListIds: [2], + }, + JSON_ARRAY: {}, + XML: {}, + }, + endpoint: 'https://api.sendinblue.com/v3/contacts/gordon_pittman%40example.com', + files: {}, + headers: { + 'Content-Type': 'application/json', + 'api-key': 'apiKey123', + }, + method: 'PUT', + params: {}, + type: 'REST', + version: '1', + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'sendinblue', + description: 'Identify call to unlink a contact from given lists', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + type: 'identify', + sentAt: '2021-01-03T17:02:53.195Z', + channel: 'web', + traits: { + email: 'eric_kim@example.com', + }, + context: { + externalId: [ + { + type: 'sendinblueUnlinkListIds', + id: [2, 5], + }, + ], + }, + }, + destination: { + Config: { + apiKey: 'apiKey123', + clientKey: 'clientKey123', + doi: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + FORM: {}, + JSON: { + emails: ['eric_kim@example.com'], + }, + JSON_ARRAY: {}, + XML: {}, + }, + endpoint: 'https://api.sendinblue.com/v3/contacts/lists/2/contacts/remove', + files: {}, + headers: { + 'Content-Type': 'application/json', + 'api-key': 'apiKey123', + }, + method: 'POST', + params: {}, + type: 'REST', + userId: '', + version: '1', + }, + statusCode: 200, + }, + { + output: { + body: { + FORM: {}, + JSON: { + emails: ['eric_kim@example.com'], + }, + JSON_ARRAY: {}, + XML: {}, + }, + endpoint: 'https://api.sendinblue.com/v3/contacts/lists/5/contacts/remove', + files: {}, + headers: { + 'Content-Type': 'application/json', + 'api-key': 'apiKey123', + }, + method: 'POST', + params: {}, + type: 'REST', + userId: '', + version: '1', + }, + statusCode: 200, + }, + ], + }, + }, + }, +]; diff --git a/test/integrations/destinations/sendinblue/router/data.ts b/test/integrations/destinations/sendinblue/router/data.ts new file mode 100644 index 0000000000..31781e4c4f --- /dev/null +++ b/test/integrations/destinations/sendinblue/router/data.ts @@ -0,0 +1,410 @@ +export const data = [ + { + name: 'sendinblue', + description: 'Test 0', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + message: { + type: 'track', + sentAt: '2021-01-03T17:02:53.195Z', + channel: 'web', + event: 'Order Completed', + properties: { + orderId: '1341394-3812392190', + products: [ + { + product_id: 1234, + product_name: 'Track Pants', + amount: 1, + price: 220, + }, + { + product_id: 5768, + product_name: 'T-Shirt', + amount: 5, + price: 1058, + }, + ], + }, + context: { + traits: { + first_name: 'John', + lastName: 'Doe', + age: 19, + email: 'john_doe@example.com', + phone: '+919876543210', + location: 'Mumbai', + role: 'SDE', + }, + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + metadata: { + jobId: 1, + }, + destination: { + Config: { + apiKey: 'apiKey123', + clientKey: 'clientKey123', + doi: false, + contactAttributeMapping: [ + { + from: 'location', + to: 'LOCATION', + }, + ], + sendTraitsInTrack: true, + }, + }, + }, + { + message: { + type: 'page', + sentAt: '2021-01-03T17:02:53.195Z', + channel: 'web', + name: 'New Page', + properties: { + url: 'https://www.google.com/', + title: 'Google home', + }, + context: { + traits: { + email: 'john_doe@example.com', + }, + page: { + url: 'http://127.0.0.1:7307/Testing/test/ourSdk.html', + path: '/Testing/test/ourSdk.html', + title: 'Document', + search: '', + tab_url: 'http://127.0.0.1:7307/Testing/test/ourSdk.html', + referrer: 'http://127.0.0.1:7307/Testing/test/', + initial_referrer: '$direct', + referring_domain: '127.0.0.1:7307', + initial_referring_domain: '', + }, + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + metadata: { + jobId: 2, + }, + destination: { + Config: { + apiKey: 'apiKey123', + clientKey: 'clientKey123', + templateId: 3, + doi: false, + redirectionUrl: 'https://app.sendinblue.com/marketing-dashboard', + }, + }, + }, + { + message: { + type: 'identify', + sentAt: '2021-01-03T17:02:53.195Z', + channel: 'web', + traits: { + first_name: 'John', + lastName: 'Doe', + age: 19, + email: 'john_doe@example.com', + phone: '+919876543210', + location: 'Mumbai', + newEmail: 'alex_root@example.com', + role: 'SDE', + }, + context: { + externalId: [ + { + type: 'sendinblueIncludeListIds', + id: [1, 2], + }, + ], + }, + integrations: { + All: true, + sendinblue: { + emailBlacklisted: true, + }, + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + metadata: { + jobId: 3, + }, + destination: { + Config: { + apiKey: 'apiKey123', + clientKey: 'clientKey123', + doi: false, + contactAttributeMapping: [ + { + from: 'location', + to: 'LOCATION', + }, + ], + }, + }, + }, + { + message: { + type: 'identify', + sentAt: '2021-01-03T17:02:53.195Z', + channel: 'web', + traits: { + first_name: 'John', + lastName: 'Doe', + age: 19, + email: 'john_doe@example.com', + phone: '+919876543210', + location: 'Mumbai', + role: 'SDE', + }, + context: {}, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + metadata: { + jobId: 4, + }, + destination: { + Config: { + apiKey: 'apiKey123', + clientKey: 'clientKey123', + templateId: 3, + doi: true, + redirectionUrl: 'https://app.sendinblue.com/marketing-dashboard', + }, + }, + }, + ], + destType: 'sendinblue', + }, + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batched: false, + batchedRequest: { + body: { + FORM: {}, + JSON: { + email: 'john_doe@example.com', + event: 'Order Completed', + eventdata: { + data: { + orderId: '1341394-3812392190', + products: [ + { + amount: 1, + price: 220, + product_id: 1234, + product_name: 'Track Pants', + }, + { + amount: 5, + price: 1058, + product_id: 5768, + product_name: 'T-Shirt', + }, + ], + }, + id: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + }, + properties: { + FIRSTNAME: 'John', + LASTNAME: 'Doe', + LOCATION: 'Mumbai', + SMS: '+919876543210', + age: 19, + role: 'SDE', + }, + }, + JSON_ARRAY: {}, + XML: {}, + }, + endpoint: 'https://in-automate.sendinblue.com/api/v2/trackEvent', + files: {}, + headers: { + 'Content-Type': 'application/json', + 'ma-key': 'clientKey123', + }, + method: 'POST', + params: {}, + type: 'REST', + version: '1', + }, + destination: { + Config: { + apiKey: 'apiKey123', + clientKey: 'clientKey123', + contactAttributeMapping: [ + { + from: 'location', + to: 'LOCATION', + }, + ], + doi: false, + sendTraitsInTrack: true, + }, + }, + metadata: [ + { + jobId: 1, + }, + ], + statusCode: 200, + }, + { + batched: false, + batchedRequest: { + body: { + FORM: {}, + JSON: { + email: 'john_doe@example.com', + page: 'https://www.google.com/', + properties: { + ma_path: '/Testing/test/ourSdk.html', + ma_referrer: 'http://127.0.0.1:7307/Testing/test/', + ma_title: 'Google home', + sib_name: 'New Page', + }, + }, + JSON_ARRAY: {}, + XML: {}, + }, + endpoint: 'https://in-automate.sendinblue.com/api/v2/trackPage', + files: {}, + headers: { + 'Content-Type': 'application/json', + 'ma-key': 'clientKey123', + }, + method: 'POST', + params: {}, + type: 'REST', + version: '1', + }, + destination: { + Config: { + apiKey: 'apiKey123', + clientKey: 'clientKey123', + doi: false, + redirectionUrl: 'https://app.sendinblue.com/marketing-dashboard', + templateId: 3, + }, + }, + metadata: [ + { + jobId: 2, + }, + ], + statusCode: 200, + }, + { + batched: false, + batchedRequest: { + body: { + FORM: {}, + JSON: { + attributes: { + EMAIL: 'alex_root@example.com', + FIRSTNAME: 'John', + LASTNAME: 'Doe', + LOCATION: 'Mumbai', + SMS: '+919876543210', + age: 19, + role: 'SDE', + }, + email: 'john_doe@example.com', + emailBlacklisted: true, + listIds: [1, 2], + updateEnabled: true, + }, + JSON_ARRAY: {}, + XML: {}, + }, + endpoint: 'https://api.sendinblue.com/v3/contacts', + files: {}, + headers: { + 'Content-Type': 'application/json', + 'api-key': 'apiKey123', + }, + method: 'POST', + params: {}, + type: 'REST', + version: '1', + }, + destination: { + Config: { + apiKey: 'apiKey123', + clientKey: 'clientKey123', + contactAttributeMapping: [ + { + from: 'location', + to: 'LOCATION', + }, + ], + doi: false, + }, + }, + metadata: [ + { + jobId: 3, + }, + ], + statusCode: 200, + }, + { + batched: false, + error: 'sendinblueIncludeListIds is required to create a contact using DOI', + metadata: [ + { + jobId: 4, + }, + ], + statTags: { + destType: 'SENDINBLUE', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'router', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + destination: { + Config: { + apiKey: 'apiKey123', + clientKey: 'clientKey123', + templateId: 3, + doi: true, + redirectionUrl: 'https://app.sendinblue.com/marketing-dashboard', + }, + }, + }, + ], + }, + }, + }, + }, +]; diff --git a/test/integrations/destinations/sprig/deleteUsers/data.ts b/test/integrations/destinations/sprig/deleteUsers/data.ts new file mode 100644 index 0000000000..7ab5620e66 --- /dev/null +++ b/test/integrations/destinations/sprig/deleteUsers/data.ts @@ -0,0 +1,217 @@ +export const data = [ + { + name: 'sprig', + description: 'Missing api key', + feature: 'userDeletion', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destType: 'SPRIG', + userAttributes: [ + { + userId: '1', + }, + { + userId: '2', + }, + ], + config: { + apiKey: undefined, + }, + }, + ], + }, + }, + output: { + response: { + status: 400, + body: [ + { + statusCode: 400, + error: 'Api Key is required for user deletion', + }, + ], + }, + }, + }, + { + name: 'sprig', + description: 'Invalid api key', + feature: 'userDeletion', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destType: 'SPRIG', + userAttributes: [ + { + userId: '1', + }, + { + userId: '2', + }, + ], + config: { + apiKey: 'invalidApiKey', + }, + }, + ], + }, + }, + output: { + response: { + status: 403, + body: [ + { + statusCode: 403, + error: 'User deletion request failed', + }, + ], + }, + }, + }, + { + name: 'sprig', + description: 'Too many requests', + feature: 'userDeletion', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destType: 'SPRIG', + userAttributes: [ + { + userId: '1', + }, + { + userId: '2', + }, + { + userId: '3', + }, + { + userId: '4', + }, + { + userId: '5', + }, + { + userId: '6', + }, + { + userId: '7', + }, + { + userId: '8', + }, + { + userId: '9', + }, + { + userId: '10', + }, + ], + config: { + apiKey: 'testApiKey', + }, + }, + ], + }, + }, + output: { + response: { + status: 429, + body: [ + { + statusCode: 429, + error: 'User deletion request failed', + }, + ], + }, + }, + }, + { + name: 'sprig', + description: 'Given userId is not present for user deletion', + feature: 'userDeletion', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destType: 'SPRIG', + userAttributes: [ + { + userId: '9', + }, + ], + config: { + apiKey: 'testApiKey', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 200, + status: 'successful', + }, + , + ], + }, + }, + }, + { + name: 'sprig', + description: 'Successful user deletion', + feature: 'userDeletion', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destType: 'SPRIG', + userAttributes: [ + { + userId: '1', + }, + { + userId: '2', + }, + { + userId: '3', + }, + ], + config: { + apiKey: 'testApiKey', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 200, + status: 'successful', + }, + ], + }, + }, + }, +]; diff --git a/test/integrations/destinations/sprig/network.ts b/test/integrations/destinations/sprig/network.ts new file mode 100644 index 0000000000..e5f2ff23b1 --- /dev/null +++ b/test/integrations/destinations/sprig/network.ts @@ -0,0 +1,79 @@ +const deleteNwData = [ + { + httpReq: { + method: 'post', + url: 'https://api.sprig.com/v2/purge/visitors', + data: { + userIds: ['1', '2'], + }, + headers: { + Accept: 'application/json', + Authorization: 'API-Key invalidApiKey', + 'Content-Type': 'application/json', + }, + }, + httpRes: { + data: 'Forbidden', + status: 403, + }, + }, + { + httpReq: { + method: 'post', + url: 'https://api.sprig.com/v2/purge/visitors', + data: { + userIds: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10'], + }, + headers: { + Accept: 'application/json', + Authorization: 'API-Key testApiKey', + 'Content-Type': 'application/json', + }, + }, + httpRes: { + data: 'Your application has made too many requests in too short a time.', + status: 429, + }, + }, + { + httpReq: { + method: 'post', + url: 'https://api.sprig.com/v2/purge/visitors', + data: { + userIds: ['9'], + }, + headers: { + Accept: 'application/json', + Authorization: 'API-Key testApiKey', + 'Content-Type': 'application/json', + }, + }, + httpRes: { + data: { + error: 'User deletion request failed', + }, + status: 400, + }, + }, + { + httpReq: { + method: 'post', + url: 'https://api.sprig.com/v2/purge/visitors', + data: { + userIds: ['1', '2', '3'], + }, + headers: { + Accept: 'application/json', + Authorization: 'API-Key testApiKey', + 'Content-Type': 'application/json', + }, + }, + httpRes: { + data: { + requestId: 'request_1', + }, + status: 200, + }, + }, +]; +export const networkCallsData = [...deleteNwData]; diff --git a/test/integrations/destinations/stormly/processor/data.ts b/test/integrations/destinations/stormly/processor/data.ts new file mode 100644 index 0000000000..52356ba9e0 --- /dev/null +++ b/test/integrations/destinations/stormly/processor/data.ts @@ -0,0 +1,566 @@ +export const data = [ + { + name: 'stormly', + description: 'Identify call without userId', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'dummyApiKey', + }, + ID: 'stormly123', + }, + message: { + type: 'identify', + context: { + traits: { + name: 'John Doe', + email: 'johndoe@gmail.com', + age: 25, + }, + }, + rudderId: '553b5522-c575-40a7-8072-9741c5f9a647', + anonymousId: 'bf412108-0357-4330-b119-7305e767823c', + originalTimestamp: '2022-01-20T13:39:21.032Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: 'Missing required value from "userIdOnly"', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'STORMLY', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'stormly', + description: 'Identify call with userId, traits', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'dummyApiKey', + }, + ID: 'stormly123', + }, + message: { + type: 'identify', + sentAt: '2022-01-20T13:39:21.033Z', + channel: 'web', + userId: '5136633649', + context: { + traits: { + name: 'John Doe', + email: 'johndoe@gmail.com', + age: 25, + }, + }, + rudderId: '553b5522-c575-40a7-8072-9741c5f9a647', + anonymousId: 'bf412108-0357-4330-b119-7305e767823c', + originalTimestamp: '2022-01-20T13:39:21.032Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rudderstack.t.stormly.com/webhook/rudderstack/identify', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Basic dummyApiKey', + }, + params: {}, + body: { + JSON: { + userId: '5136633649', + timestamp: '2022-01-20T13:39:21.032Z', + traits: { + name: 'John Doe', + email: 'johndoe@gmail.com', + age: 25, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'stormly', + description: 'Track call without userId', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'dummyApiKey', + }, + ID: 'stormly123', + }, + message: { + type: 'track', + event: 'Product Reviewed', + properties: { + review_id: '12345', + product_id: '123', + rating: 3, + review_body: 'Average product, expected much more.', + groupId: '91Yb32830', + }, + context: {}, + rudderId: '553b5522-c575-40a7-8072-9741c5f9a647', + anonymousId: 'bf412108-0357-4330-b119-7305e767823c', + originalTimestamp: '2022-01-20T13:39:21.032Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: 'Missing required value from "userIdOnly"', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'STORMLY', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'stormly', + description: 'Track call without groupId', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'dummyApiKey', + }, + ID: 'stormly123', + }, + message: { + type: 'track', + event: 'Product Reviewed', + userId: '5136633649', + properties: { + review_id: '12345', + product_id: '123', + rating: 3, + review_body: 'Average product, expected much more.', + }, + context: {}, + rudderId: '553b5522-c575-40a7-8072-9741c5f9a647', + anonymousId: 'bf412108-0357-4330-b119-7305e767823c', + originalTimestamp: '2022-01-20T13:39:21.032Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rudderstack.t.stormly.com/webhook/rudderstack/track', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Basic dummyApiKey', + }, + params: {}, + body: { + JSON: { + userId: '5136633649', + event: 'Product Reviewed', + properties: { + review_id: '12345', + product_id: '123', + rating: 3, + review_body: 'Average product, expected much more.', + }, + timestamp: '2022-01-20T13:39:21.032Z', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'stormly', + description: 'Track call without properties', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'dummyApiKey', + }, + ID: 'stormly123', + }, + message: { + type: 'track', + event: 'Product Reviewed', + userId: '5136633649', + context: {}, + rudderId: '553b5522-c575-40a7-8072-9741c5f9a647', + anonymousId: 'bf412108-0357-4330-b119-7305e767823c', + originalTimestamp: '2022-01-20T13:39:21.032Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rudderstack.t.stormly.com/webhook/rudderstack/track', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Basic dummyApiKey', + }, + params: {}, + body: { + JSON: { + userId: '5136633649', + event: 'Product Reviewed', + timestamp: '2022-01-20T13:39:21.032Z', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'stormly', + description: 'Track call with userId, groupId and properties', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'dummyApiKey', + }, + ID: 'stormly123', + }, + message: { + type: 'track', + event: 'Product Reviewed', + userId: '5136633649', + properties: { + review_id: '12345', + product_id: '123', + rating: 3, + review_body: 'Average product, expected much more.', + groupId: '91Yb32830', + }, + context: {}, + rudderId: '553b5522-c575-40a7-8072-9741c5f9a647', + anonymousId: 'bf412108-0357-4330-b119-7305e767823c', + originalTimestamp: '2022-01-20T13:39:21.032Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rudderstack.t.stormly.com/webhook/rudderstack/track', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Basic dummyApiKey', + }, + params: {}, + body: { + JSON: { + userId: '5136633649', + event: 'Product Reviewed', + properties: { + review_id: '12345', + product_id: '123', + rating: 3, + review_body: 'Average product, expected much more.', + }, + timestamp: '2022-01-20T13:39:21.032Z', + context: { + groupId: '91Yb32830', + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'stormly', + description: 'Track call with userId, groupId (from externalId) and properties', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'dummyApiKey', + }, + ID: 'stormly123', + }, + message: { + type: 'track', + event: 'Product Reviewed', + userId: '5136633649', + properties: { + review_id: '12345', + product_id: '123', + rating: 3, + review_body: 'Average product, expected much more.', + groupId: 'test-12345', + }, + context: { + externalId: [ + { + type: 'stormlyGroupId', + id: '91Yb32830', + }, + ], + }, + rudderId: '553b5522-c575-40a7-8072-9741c5f9a647', + anonymousId: 'bf412108-0357-4330-b119-7305e767823c', + originalTimestamp: '2022-01-20T13:39:21.032Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rudderstack.t.stormly.com/webhook/rudderstack/track', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Basic dummyApiKey', + }, + params: {}, + body: { + JSON: { + userId: '5136633649', + event: 'Product Reviewed', + properties: { + review_id: '12345', + product_id: '123', + rating: 3, + review_body: 'Average product, expected much more.', + }, + timestamp: '2022-01-20T13:39:21.032Z', + context: { + groupId: '91Yb32830', + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'stormly', + description: 'Group call with userId, groupId and traits', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + apiKey: 'dummyApiKey', + }, + ID: 'stormly123', + }, + message: { + type: 'group', + userId: '5136633649', + traits: { + name: 'Initech', + employees: 500, + headquarters: 'Redwood City, California, United States', + ceo: 'John Doe', + revenue: 70000000, + currency: 'USD', + groupId: '9230AUbd2138h', + }, + context: {}, + rudderId: '553b5522-c575-40a7-8072-9741c5f9a647', + anonymousId: 'bf412108-0357-4330-b119-7305e767823c', + originalTimestamp: '2022-01-20T13:39:21.032Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://rudderstack.t.stormly.com/webhook/rudderstack/group', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Basic dummyApiKey', + }, + params: {}, + body: { + JSON: { + userId: '5136633649', + groupId: '9230AUbd2138h', + timestamp: '2022-01-20T13:39:21.032Z', + traits: { + name: 'Initech', + employees: 500, + headquarters: 'Redwood City, California, United States', + ceo: 'John Doe', + revenue: 70000000, + currency: 'USD', + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, +]; diff --git a/test/integrations/destinations/stormly/router/data.ts b/test/integrations/destinations/stormly/router/data.ts new file mode 100644 index 0000000000..efdae153e4 --- /dev/null +++ b/test/integrations/destinations/stormly/router/data.ts @@ -0,0 +1,148 @@ +import { FEATURES } from '../../../../../src/v0/util/tags'; + +export const data = [ + { + name: 'stormly', + description: 'Test 0', + feature: FEATURES.ROUTER, + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + destination: { + Config: { + apiKey: 'dummyApiKey', + }, + ID: 'stormly123', + }, + metadata: { + jobId: 1, + }, + message: { + type: 'identify', + sentAt: '2022-01-20T13:39:21.033Z', + channel: 'web', + userId: '5136633649', + context: { + traits: { + name: 'John Doe', + email: 'johndoe@gmail.com', + age: 25, + }, + }, + rudderId: '553b5522-c575-40a7-8072-9741c5f9a647', + anonymousId: 'bf412108-0357-4330-b119-7305e767823c', + originalTimestamp: '2022-01-20T13:39:21.032Z', + }, + }, + { + destination: { + Config: { + apiKey: 'dummyApiKey', + }, + ID: 'stormly123', + }, + metadata: { + jobId: 2, + }, + message: { + type: 'track', + event: 'Product Reviewed', + properties: { + review_id: '12345', + product_id: '123', + rating: 3.0, + review_body: 'Average product, expected much more.', + groupId: '91Yb32830', + }, + context: {}, + rudderId: '553b5522-c575-40a7-8072-9741c5f9a647', + anonymousId: 'bf412108-0357-4330-b119-7305e767823c', + originalTimestamp: '2022-01-20T13:39:21.032Z', + }, + }, + ], + destType: 'stormly', + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batched: false, + batchedRequest: { + body: { + FORM: {}, + JSON: { + timestamp: '2022-01-20T13:39:21.032Z', + traits: { + age: 25, + email: 'johndoe@gmail.com', + name: 'John Doe', + }, + userId: '5136633649', + }, + JSON_ARRAY: {}, + XML: {}, + }, + endpoint: 'https://rudderstack.t.stormly.com/webhook/rudderstack/identify', + files: {}, + headers: { + Authorization: 'Basic dummyApiKey', + 'Content-Type': 'application/json', + }, + method: 'POST', + params: {}, + type: 'REST', + version: '1', + }, + destination: { + Config: { + apiKey: 'dummyApiKey', + }, + ID: 'stormly123', + }, + metadata: [ + { + jobId: 1, + }, + ], + statusCode: 200, + }, + { + destination: { + Config: { + apiKey: 'dummyApiKey', + }, + ID: 'stormly123', + }, + batched: false, + error: 'Missing required value from "userIdOnly"', + metadata: [ + { + jobId: 2, + }, + ], + statTags: { + destType: 'STORMLY', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'router', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + }, +]; diff --git a/test/integrations/destinations/the_trade_desk/common.ts b/test/integrations/destinations/the_trade_desk/common.ts new file mode 100644 index 0000000000..d792c7faae --- /dev/null +++ b/test/integrations/destinations/the_trade_desk/common.ts @@ -0,0 +1,44 @@ +const destType = 'the_trade_desk'; +const destTypeInUpperCase = 'THE_TRADE_DESK'; +const advertiserId = 'test-advertiser-id'; +const dataProviderId = 'rudderstack'; +const segmentName = 'test-segment'; +const sampleDestination = { + Config: { + advertiserId, + advertiserSecretKey: 'test-advertiser-secret-key', + dataServer: 'apac', + ttlInDays: 30, + audienceId: segmentName, + }, + DestinationDefinition: { Config: { cdkV2Enabled: true } }, +}; + +const sampleSource = { + job_id: 'test-job-id', + job_run_id: 'test-job-run-id', + task_run_id: 'test-task-run-id', + version: 'v1.40.4', +}; + +const sampleContext = { + destinationFields: 'daid, uid2', + externalId: [ + { + identifierType: 'tdid', + type: 'THE_TRADE_DESK-test-segment', + }, + ], + mappedToDestination: 'true', + sources: sampleSource, +}; + +export { + destType, + destTypeInUpperCase, + advertiserId, + dataProviderId, + segmentName, + sampleDestination, + sampleContext, +}; diff --git a/test/integrations/destinations/the_trade_desk/delivery/data.ts b/test/integrations/destinations/the_trade_desk/delivery/data.ts new file mode 100644 index 0000000000..320eb6dcfe --- /dev/null +++ b/test/integrations/destinations/the_trade_desk/delivery/data.ts @@ -0,0 +1,248 @@ +import { + destType, + destTypeInUpperCase, + advertiserId, + dataProviderId, + segmentName, + sampleDestination, +} from '../common'; + +beforeAll(() => { + process.env.THE_TRADE_DESK_DATA_PROVIDER_SECRET_KEY = 'mockedDataProviderSecretKey'; +}); + +afterAll(() => { + delete process.env.THE_TRADE_DESK_DATA_PROVIDER_SECRET_KEY; +}); + +export const data = [ + { + name: destType, + description: 'Successful delivery of Add/Remove IDs to/from Trade Desk', + feature: 'dataDelivery', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://sin-data.adsrvr.org/data/advertiser', + headers: {}, + params: {}, + destinationConfig: sampleDestination.Config, + body: { + JSON: { + AdvertiserId: advertiserId, + DataProviderId: dataProviderId, + Items: [ + { + DAID: 'test-daid-1', + Data: [ + { + Name: segmentName, + TTLInMinutes: 43200, + }, + ], + }, + { + Data: [ + { + Name: segmentName, + TTLInMinutes: 43200, + }, + ], + UID2: 'test-uid2-1', + }, + { + DAID: 'test-daid-2', + Data: [ + { + Name: segmentName, + TTLInMinutes: 0, + }, + ], + }, + { + Data: [ + { + Name: segmentName, + TTLInMinutes: 0, + }, + ], + UID2: 'test-uid2-2', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: { + destinationResponse: { + response: {}, + status: 200, + }, + message: 'Request Processed Successfully', + status: 200, + }, + }, + }, + }, + }, + { + name: destType, + description: 'Error response from The Trade Desk due to invalid IDs', + feature: 'dataDelivery', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://sin-data.adsrvr.org/data/advertiser', + headers: {}, + params: {}, + destinationConfig: sampleDestination.Config, + body: { + JSON: { + AdvertiserId: advertiserId, + DataProviderId: dataProviderId, + Items: [ + { + DAID: 'test-daid', + Data: [ + { + Name: segmentName, + TTLInMinutes: 43200, + }, + ], + }, + { + Data: [ + { + Name: segmentName, + TTLInMinutes: 43200, + }, + ], + UID2: 'test-invalid-uid2', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + method: 'POST', + }, + }, + output: { + response: { + status: 400, + body: { + output: { + destinationResponse: { + response: { + FailedLines: [{ ErrorCode: 'MissingUserId', Message: 'Invalid UID2, item #2' }], + }, + status: 200, + }, + message: + 'Request failed with status: 200 due to {"FailedLines":[{"ErrorCode":"MissingUserId","Message":"Invalid UID2, item #2"}]}', + statTags: { + destType: destTypeInUpperCase, + destinationId: 'Non-determininable', + errorCategory: 'network', + errorType: 'aborted', + feature: 'dataDelivery', + implementation: 'native', + module: 'destination', + workspaceId: 'Non-determininable', + }, + status: 400, + }, + }, + }, + }, + }, + { + name: destType, + description: + 'Missing advertiser secret key in destination config from proxy request from server', + feature: 'dataDelivery', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://sin-data.adsrvr.org/data/advertiser', + headers: {}, + params: {}, + body: { + JSON: { + AdvertiserId: advertiserId, + DataProviderId: dataProviderId, + Items: [ + { + DAID: 'test-daid-1', + Data: [ + { + Name: segmentName, + TTLInMinutes: 43200, + }, + ], + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + method: 'POST', + }, + }, + output: { + response: { + status: 400, + body: { + output: { + destinationResponse: '', + message: 'Advertiser secret key is missing in destination config. Aborting', + statTags: { + destType: destTypeInUpperCase, + destinationId: 'Non-determininable', + errorCategory: 'platform', + feature: 'dataDelivery', + implementation: 'native', + module: 'destination', + workspaceId: 'Non-determininable', + }, + status: 400, + }, + }, + }, + }, + }, +]; diff --git a/test/integrations/destinations/the_trade_desk/mocks.ts b/test/integrations/destinations/the_trade_desk/mocks.ts new file mode 100644 index 0000000000..ddcbebae88 --- /dev/null +++ b/test/integrations/destinations/the_trade_desk/mocks.ts @@ -0,0 +1,5 @@ +import config from '../../../../src/cdk/v2/destinations/the_trade_desk/config'; + +export const defaultMockFns = () => { + jest.replaceProperty(config, 'MAX_REQUEST_SIZE_IN_BYTES', 250); +}; diff --git a/test/integrations/destinations/the_trade_desk/network.ts b/test/integrations/destinations/the_trade_desk/network.ts new file mode 100644 index 0000000000..ed6bdf4c7d --- /dev/null +++ b/test/integrations/destinations/the_trade_desk/network.ts @@ -0,0 +1,106 @@ +import { destType, advertiserId, dataProviderId, segmentName } from './common'; + +export const networkCallsData = [ + { + httpReq: { + url: 'https://sin-data.adsrvr.org/data/advertiser', + data: { + AdvertiserId: advertiserId, + DataProviderId: dataProviderId, + Items: [ + { + DAID: 'test-daid-1', + Data: [ + { + Name: segmentName, + TTLInMinutes: 43200, + }, + ], + }, + { + Data: [ + { + Name: segmentName, + TTLInMinutes: 43200, + }, + ], + UID2: 'test-uid2-1', + }, + { + DAID: 'test-daid-2', + Data: [ + { + Name: segmentName, + TTLInMinutes: 0, + }, + ], + }, + { + Data: [ + { + Name: 'test-segment', + TTLInMinutes: 0, + }, + ], + UID2: 'test-uid2-2', + }, + ], + }, + params: { destination: destType }, + headers: { + TtdSignature: '8LqGha6I7e3duvhngEvhXoTden0=', + 'TtdSignature-dp': 'tLpf4t5xebsr9Xcqp9PjhOJX7p0=', + 'Content-Type': 'application/json', + 'User-Agent': 'RudderLabs', + }, + method: 'POST', + }, + httpRes: { + data: {}, + status: 200, + statusText: 'OK', + }, + }, + { + httpReq: { + url: 'https://sin-data.adsrvr.org/data/advertiser', + data: { + AdvertiserId: advertiserId, + DataProviderId: dataProviderId, + Items: [ + { + DAID: 'test-daid', + Data: [ + { + Name: segmentName, + TTLInMinutes: 43200, + }, + ], + }, + { + Data: [ + { + Name: segmentName, + TTLInMinutes: 43200, + }, + ], + UID2: 'test-invalid-uid2', + }, + ], + }, + params: { destination: destType }, + headers: { + TtdSignature: '9EIeoIGkRkV5oJHfGtoq1lwQl+M=', + 'TtdSignature-dp': 'ZpHWNd1uGvQAv/QW685SQT8tl1I=', + 'Content-Type': 'application/json', + 'User-Agent': 'RudderLabs', + }, + method: 'POST', + }, + httpRes: { + data: { FailedLines: [{ ErrorCode: 'MissingUserId', Message: 'Invalid UID2, item #2' }] }, + status: 200, + statusText: 'Ok', + }, + }, +]; diff --git a/test/integrations/destinations/the_trade_desk/router/data.ts b/test/integrations/destinations/the_trade_desk/router/data.ts new file mode 100644 index 0000000000..3c9cb1cc70 --- /dev/null +++ b/test/integrations/destinations/the_trade_desk/router/data.ts @@ -0,0 +1,536 @@ +import { overrideDestination } from '../../../testUtils'; +import { defaultMockFns } from '../mocks'; +import { + destType, + destTypeInUpperCase, + advertiserId, + dataProviderId, + segmentName, + sampleDestination, + sampleContext, +} from '../common'; + +export const data = [ + { + name: destType, + description: 'Add IDs to the segment', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + message: { + type: 'record', + action: 'insert', + fields: { + DAID: 'test-daid-1', + UID2: 'test-uid2-1', + }, + channel: 'sources', + context: sampleContext, + recordId: '1', + }, + destination: sampleDestination, + metadata: { + jobId: 1, + }, + }, + { + message: { + type: 'record', + action: 'insert', + fields: { + DAID: 'test-daid-2', + UID2: null, + }, + channel: 'sources', + context: sampleContext, + recordId: '2', + }, + destination: sampleDestination, + metadata: { + jobId: 2, + }, + }, + ], + destType, + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: [ + { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://sin-data.adsrvr.org/data/advertiser', + headers: {}, + params: {}, + body: { + JSON: { + DataProviderId: dataProviderId, + AdvertiserId: advertiserId, + Items: [ + { + DAID: 'test-daid-1', + Data: [ + { + Name: segmentName, + TTLInMinutes: 43200, + }, + ], + }, + { + UID2: 'test-uid2-1', + Data: [ + { + Name: segmentName, + TTLInMinutes: 43200, + }, + ], + }, + { + DAID: 'test-daid-2', + Data: [ + { + Name: segmentName, + TTLInMinutes: 43200, + }, + ], + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + ], + metadata: [ + { + jobId: 1, + }, + { + jobId: 2, + }, + ], + batched: true, + statusCode: 200, + destination: sampleDestination, + }, + ], + }, + }, + }, + mockFns: defaultMockFns, + }, + { + name: destType, + description: + 'Add/Remove IDs to/from the segment and split into multiple requests based on size', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + message: { + type: 'record', + action: 'insert', + fields: { + DAID: 'test-daid-1', + UID2: 'test-uid2-1', + }, + channel: 'sources', + context: sampleContext, + recordId: '1', + }, + destination: sampleDestination, + metadata: { + jobId: 1, + }, + }, + { + message: { + type: 'record', + action: 'delete', + fields: { + DAID: 'test-daid-2', + UID2: 'test-uid2-2', + }, + channel: 'sources', + context: sampleContext, + recordId: '2', + }, + destination: sampleDestination, + metadata: { + jobId: 2, + }, + }, + ], + destType, + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: [ + { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://sin-data.adsrvr.org/data/advertiser', + headers: {}, + params: {}, + body: { + JSON: { + DataProviderId: dataProviderId, + AdvertiserId: advertiserId, + Items: [ + { + DAID: 'test-daid-1', + Data: [ + { + Name: segmentName, + TTLInMinutes: 43200, + }, + ], + }, + { + UID2: 'test-uid2-1', + Data: [ + { + Name: segmentName, + TTLInMinutes: 43200, + }, + ], + }, + { + DAID: 'test-daid-2', + Data: [ + { + Name: segmentName, + TTLInMinutes: 0, + }, + ], + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://sin-data.adsrvr.org/data/advertiser', + headers: {}, + params: {}, + body: { + JSON: { + DataProviderId: dataProviderId, + AdvertiserId: advertiserId, + Items: [ + { + UID2: 'test-uid2-2', + Data: [ + { + Name: segmentName, + TTLInMinutes: 0, + }, + ], + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + ], + metadata: [ + { + jobId: 1, + }, + { + jobId: 2, + }, + ], + batched: true, + statusCode: 200, + destination: sampleDestination, + }, + ], + }, + }, + }, + mockFns: defaultMockFns, + }, + { + name: destType, + description: + 'Missing segment name (audienceId) in the config (segment name will be populated from vdm)', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + message: { + type: 'record', + action: 'insert', + fields: { + DAID: 'test-daid-1', + UID2: 'test-uid2-1', + }, + channel: 'sources', + context: sampleContext, + recordId: '1', + }, + destination: overrideDestination(sampleDestination, { audienceId: '' }), + metadata: { + jobId: 1, + }, + }, + { + message: { + type: 'record', + action: 'insert', + fields: { + DAID: 'test-daid-2', + UID2: 'test-uid2-2', + }, + channel: 'sources', + context: sampleContext, + recordId: '2', + }, + destination: overrideDestination(sampleDestination, { audienceId: '' }), + metadata: { + jobId: 2, + }, + }, + ], + destType, + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batched: false, + metadata: [{ jobId: 1 }, { jobId: 2 }], + statusCode: 400, + error: 'Segment name is not present. Aborting', + statTags: { + destType: destTypeInUpperCase, + implementation: 'cdkV2', + feature: 'router', + module: 'destination', + errorCategory: 'dataValidation', + errorType: 'configuration', + }, + }, + ], + }, + }, + }, + }, + { + name: destType, + description: 'Missing advertiser ID in the config', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + message: { + type: 'record', + action: 'insert', + fields: { + DAID: 'test-daid-1', + UID2: 'test-uid2-1', + }, + channel: 'sources', + context: sampleContext, + recordId: '1', + }, + destination: overrideDestination(sampleDestination, { advertiserId: '' }), + metadata: { + jobId: 1, + }, + }, + ], + destType, + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batched: false, + metadata: [{ jobId: 1 }], + statusCode: 400, + error: 'Advertiser ID is not present. Aborting', + statTags: { + destType: destTypeInUpperCase, + implementation: 'cdkV2', + feature: 'router', + module: 'destination', + errorCategory: 'dataValidation', + errorType: 'configuration', + }, + }, + ], + }, + }, + }, + }, + { + name: destType, + description: 'Missing advertiser secret key in the config', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + message: { + type: 'record', + action: 'insert', + fields: { + DAID: 'test-daid-1', + UID2: 'test-uid2-1', + }, + channel: 'sources', + context: sampleContext, + recordId: '1', + }, + destination: overrideDestination(sampleDestination, { advertiserSecretKey: '' }), + metadata: { + jobId: 1, + }, + }, + ], + destType, + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batched: false, + metadata: [{ jobId: 1 }], + statusCode: 400, + error: 'Advertiser Secret Key is not present. Aborting', + statTags: { + destType: destTypeInUpperCase, + implementation: 'cdkV2', + feature: 'router', + module: 'destination', + errorCategory: 'dataValidation', + errorType: 'configuration', + }, + }, + ], + }, + }, + }, + }, + { + name: destType, + description: 'TTL is out of range', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + message: { + type: 'record', + action: 'insert', + fields: { + DAID: 'test-daid-1', + UID2: 'test-uid2-1', + }, + channel: 'sources', + context: sampleContext, + recordId: '1', + }, + destination: overrideDestination(sampleDestination, { ttlInDays: 190 }), + metadata: { + jobId: 1, + }, + }, + ], + destType, + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batched: false, + metadata: [{ jobId: 1 }], + statusCode: 400, + error: 'TTL is out of range. Allowed values are 0 to 180 days', + statTags: { + destType: destTypeInUpperCase, + implementation: 'cdkV2', + feature: 'router', + module: 'destination', + errorCategory: 'dataValidation', + errorType: 'configuration', + }, + }, + ], + }, + }, + }, + }, +]; diff --git a/test/integrations/destinations/wootric/network.ts b/test/integrations/destinations/wootric/network.ts new file mode 100644 index 0000000000..2407efa62b --- /dev/null +++ b/test/integrations/destinations/wootric/network.ts @@ -0,0 +1,183 @@ +export const networkCallsData = [ + { + httpReq: { + url: 'https://api.wootric.com/v1/end_users/dummyId1?lookup_by_external_id=true', + method: 'GET', + }, + httpRes: { + status: 200, + data: { + "id": 486438462, + "created_at": "2022-08-10 11:39:50 -0700", + "updated_at": "2022-08-10 11:39:50 -0700", + "email": "dummyuser1@gmail.com", + "last_surveyed": "2022-01-20 05:39:21 -0800", + "external_created_at": 1611149961, + "last_seen_at": null, + "properties": { + "city": "Mumbai", + "name": "Dummy User 1", + "title": "SDE", + "gender": "Male", + "company": "Rudderstack" + }, + "phone_number": "+19123456789", + "external_id": "dummyId1", + "last_response": null, + "settings": { + "email_nps": true, + "mobile_nps": true, + "web_nps": true, + "force_mobile_survey": null, + "force_web_survey": null, + "surveys_disabled_by_end_user": null + } + }, + }, + }, + { + httpReq: { + url: 'https://api.wootric.com/v1/end_users/exclueFunTestId?lookup_by_external_id=true', + method: 'GET', + }, + httpRes: { + status: 200, + data: { + "id": 486336190, + "created_at": "2022-08-10 07:30:50 -0700", + "updated_at": "2022-08-10 10:12:46 -0700", + "email": "excludeUser@gmail.com", + "last_surveyed": "2022-01-20 05:39:21 -0800", + "external_created_at": 1579755367, + "last_seen_at": null, + "properties": { + "city": "Mumbai", + "name": "exclude test user", + "email": "excludeUser@gmail.com", + "title": "AD", + "gender": "Male", + "company": "Rockstar" + }, + "phone_number": "+18324671283", + "external_id": "exclueFunTestId", + "last_response": null, + "settings": { + "email_nps": true, + "mobile_nps": true, + "web_nps": true, + "force_mobile_survey": null, + "force_web_survey": null, + "surveys_disabled_by_end_user": null + } + }, + }, + }, + { + httpReq: { + url: 'https://api.wootric.com/v1/end_users/my-external-id-1234?lookup_by_external_id=true', + method: 'POST', + + }, + httpRes: { + status: 200, + data: { + "type": "error_list", + "errors": [ + { + "status": "record_not_found", + "message": "The record could not be found", + "field": null + } + ] + } + }, + }, + { + httpReq: { + url: 'https://api.wootric.com/v1/end_users/490635419', + method: 'GET' + }, + httpRes: { + data: { + "id": 490635419, + "created_at": "2022-08-20 00:55:26 -0700", + "updated_at": "2022-08-22 11:17:05 -0700", + "email": "firstuser@gmail.com", + "last_surveyed": "2022-08-01 00:11:44 -0700", + "external_created_at": 1661002761, + "last_seen_at": null, + "properties": { + "Department": "Marketing", + "product_plan": "Web", + "revenue amount": "5000" + }, + "phone_number": "+8859133456781", + "external_id": "firstUserId123", + "last_response": { + "id": 101013218, + "score": 9, + "text": "Good !!!", + "survey": { + "channel": "web" + } + }, + "settings": { + "email_nps": true, + "mobile_nps": true, + "web_nps": true, + "force_mobile_survey": null, + "force_web_survey": null, + "surveys_disabled_by_end_user": null + } + }, + status: 200, + }, + }, + { + httpReq: { + url: 'https://api.wootric.com/oauth/token?account_token=NPS-dummyToken', + method: 'POST' + }, + httpRes: { + data: { + "access_token": "2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c", + "token_type": "Bearer", + "expires_in": 7200, + "refresh_token": "f4033a61742e84405a5ef8b2e09b82395dc041f0259fd5fb715fc196a1b9cd52", + "scope": "delete_account admin respond export read survey invalidate_response", + "created_at": 1660292389 + }, + status: 200, + }, + }, + { + httpReq: { + url: 'https://api.wootric.com/v1/end_users/dummyId2?lookup_by_external_id=true', + method: 'GET' + }, + httpRes: { + status: 200, + }, + }, + { + httpReq: { + url: 'https://api.wootric.com/v1/end_users/12345', + method: 'GET' + }, + httpRes: { + status: 200, + }, + }, + { + httpReq: { + url: 'https://api.wootric.com/oauth/token?account_token=NPS-dummyToken12', + method: 'POST' + }, + httpRes: { + data: { + error: "Not found", + status: 404 + } + }, + } +]; diff --git a/test/integrations/destinations/wootric/processor/data.ts b/test/integrations/destinations/wootric/processor/data.ts new file mode 100644 index 0000000000..cdff2f1079 --- /dev/null +++ b/test/integrations/destinations/wootric/processor/data.ts @@ -0,0 +1,1825 @@ +export const data = [ + { + "name": "wootric", + "description": "Wrong Account Token Passed", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken12" + }, + "ID": "wootric-1234" + }, + "message": { + "type": "identify", + "sentAt": "2022-01-20T13:39:21.033Z", + "userId": "dummyId2", + "channel": "web", + "context": {}, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "{\"message\":\"Access token could not be generated due to {\\\"error\\\":\\\"Not found\\\",\\\"status\\\":404}\",\"destinationResponse\":{\"response\":{\"error\":\"Not found\",\"status\":404},\"status\":500}}", + "statTags": { + "destType": "WOOTRIC", + "errorCategory": "network", + "errorType": "retryable", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 500 + } + ] + } + } + }, + { + "name": "wootric", + "description": "Identify call for creating user", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "wootric-1234" + }, + "message": { + "type": "identify", + "sentAt": "2022-01-20T13:39:21.033Z", + "userId": "dummyId2", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.2.20", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", + "title": "Document", + "search": "", + "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", + "initial_referrer": "$direct", + "referring_domain": "127.0.0.1:7307", + "initial_referring_domain": "" + }, + "locale": "en-US", + "screen": { + "width": 1440, + "height": 900, + "density": 2, + "innerWidth": 536, + "innerHeight": 689 + }, + "traits": { + "city": "Bangalore", + "name": "Dummy User 2", + "email": "dummyUser2@gmail.com", + "phone": "+19123456777", + "title": "SDE", + "gender": "Male", + "company": "Rudderstack", + "createdAt": "2021-01-20T13:39:21.032Z" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.2.20" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.wootric.com/v1/end_users", + "headers": { + "Content-Type": "application/x-www-form-urlencoded", + "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" + }, + "params": {}, + "body": { + "JSON": {}, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": { + "email": "dummyUser2@gmail.com", + "phone_number": "+19123456777", + "last_surveyed": "1642685961", + "external_created_at": "1611149961", + "external_id": "dummyId2", + "properties[city]": "Bangalore", + "properties[name]": "Dummy User 2", + "properties[title]": "SDE", + "properties[gender]": "Male", + "properties[company]": "Rudderstack" + } + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "wootric", + "description": "Identify call for creating user without-sending email and sending phone number", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "wootric-1234" + }, + "message": { + "type": "identify", + "sentAt": "2022-01-20T13:39:21.033Z", + "userId": "dummyId2", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.2.20", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", + "title": "Document", + "search": "", + "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", + "initial_referrer": "$direct", + "referring_domain": "127.0.0.1:7307", + "initial_referring_domain": "" + }, + "locale": "en-US", + "screen": { + "width": 1440, + "height": 900, + "density": 2, + "innerWidth": 536, + "innerHeight": 689 + }, + "traits": { + "city": "Bangalore", + "name": "Dummy User 2", + "phone": "+19123456777", + "title": "SDE", + "gender": "Male", + "company": "Rudderstack", + "createdAt": "2021-01-20T13:39:21.032Z" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.2.20" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.wootric.com/v1/end_users", + "headers": { + "Content-Type": "application/x-www-form-urlencoded", + "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" + }, + "params": {}, + "body": { + "JSON": {}, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": { + "phone_number": "+19123456777", + "last_surveyed": "1642685961", + "external_created_at": "1611149961", + "external_id": "dummyId2", + "properties[city]": "Bangalore", + "properties[name]": "Dummy User 2", + "properties[title]": "SDE", + "properties[gender]": "Male", + "properties[company]": "Rudderstack" + } + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "wootric", + "description": "Identify call for creating user without-sending phone number and sending email", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "wootric-1234" + }, + "message": { + "type": "identify", + "sentAt": "2022-01-20T13:39:21.033Z", + "userId": "dummyId2", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.2.20", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", + "title": "Document", + "search": "", + "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", + "initial_referrer": "$direct", + "referring_domain": "127.0.0.1:7307", + "initial_referring_domain": "" + }, + "locale": "en-US", + "screen": { + "width": 1440, + "height": 900, + "density": 2, + "innerWidth": 536, + "innerHeight": 689 + }, + "traits": { + "email": "dummyUser2@gmail.com", + "city": "Bangalore", + "name": "Dummy User 2", + "title": "SDE", + "gender": "Male", + "company": "Rudderstack", + "createdAt": "2021-01-20T13:39:21.032Z" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.2.20" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.wootric.com/v1/end_users", + "headers": { + "Content-Type": "application/x-www-form-urlencoded", + "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" + }, + "params": {}, + "body": { + "JSON": {}, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": { + "email": "dummyUser2@gmail.com", + "last_surveyed": "1642685961", + "external_created_at": "1611149961", + "external_id": "dummyId2", + "properties[city]": "Bangalore", + "properties[name]": "Dummy User 2", + "properties[title]": "SDE", + "properties[gender]": "Male", + "properties[company]": "Rudderstack" + } + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "wootric", + "description": "Identify call for creating user without sending traits", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "wootric-1234" + }, + "message": { + "type": "identify", + "sentAt": "2022-01-20T13:39:21.033Z", + "userId": "dummyId2", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.2.20", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", + "title": "Document", + "search": "", + "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", + "initial_referrer": "$direct", + "referring_domain": "127.0.0.1:7307", + "initial_referring_domain": "" + }, + "locale": "en-US", + "screen": { + "width": 1440, + "height": 900, + "density": 2, + "innerWidth": 536, + "innerHeight": 689 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.2.20" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "email/phone number are missing. At least one parameter must be provided", + "statTags": { + "destType": "WOOTRIC", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "wootric", + "description": "Identify call for creating user without-sending (email and phone number)", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "wootric-1234" + }, + "message": { + "type": "identify", + "sentAt": "2022-01-20T13:39:21.033Z", + "userId": "dummyId2", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.2.20", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", + "title": "Document", + "search": "", + "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", + "initial_referrer": "$direct", + "referring_domain": "127.0.0.1:7307", + "initial_referring_domain": "" + }, + "locale": "en-US", + "screen": { + "width": 1440, + "height": 900, + "density": 2, + "innerWidth": 536, + "innerHeight": 689 + }, + "traits": { + "city": "Mumbai", + "name": "Dummy User 1", + "title": "SDE", + "gender": "Male", + "company": "Rudderstack", + "createdAt": "2021-01-20T13:39:21.032Z" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.2.20" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "email/phone number are missing. At least one parameter must be provided", + "statTags": { + "destType": "WOOTRIC", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "wootric", + "description": "Identify call for updating existing user with wootric end user id", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "wootric-1234" + }, + "message": { + "type": "identify", + "sentAt": "2022-01-20T13:39:21.033Z", + "userId": "dummyId1", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.2.20", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", + "title": "Document", + "search": "", + "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", + "initial_referrer": "$direct", + "referring_domain": "127.0.0.1:7307", + "initial_referring_domain": "" + }, + "locale": "en-US", + "screen": { + "width": 1440, + "height": 900, + "density": 2, + "innerWidth": 536, + "innerHeight": 689 + }, + "traits": { + "title": "VP", + "gender": "Male" + }, + "externalId": [ + { + "type": "wootricEndUserId", + "id": "490635419" + } + ], + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.2.20" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "PUT", + "endpoint": "https://api.wootric.com/v1/end_users/490635419", + "headers": { + "Content-Type": "application/x-www-form-urlencoded", + "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" + }, + "params": {}, + "body": { + "JSON": {}, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": { + "last_surveyed": "1642685961", + "properties[Department]": "Marketing", + "properties[product_plan]": "Web", + "properties[revenue amount]": "5000", + "properties[title]": "VP", + "properties[gender]": "Male" + } + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "wootric", + "description": "Identify call for updating existing user with (wootric externalId/ rudderstack userId)", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "wootric-1234" + }, + "message": { + "type": "identify", + "sentAt": "2022-01-20T13:39:21.033Z", + "userId": "dummyId1", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.2.20", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", + "title": "Document", + "search": "", + "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", + "initial_referrer": "$direct", + "referring_domain": "127.0.0.1:7307", + "initial_referring_domain": "" + }, + "locale": "en-US", + "screen": { + "width": 1440, + "height": 900, + "density": 2, + "innerWidth": 536, + "innerHeight": 689 + }, + "traits": { + "title": "VP", + "gender": "Male" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.2.20" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "PUT", + "endpoint": "https://api.wootric.com/v1/end_users/486438462", + "headers": { + "Content-Type": "application/x-www-form-urlencoded", + "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" + }, + "params": {}, + "body": { + "JSON": {}, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": { + "last_surveyed": "1642685961", + "properties[title]": "VP", + "properties[gender]": "Male", + "properties[city]": "Mumbai", + "properties[name]": "Dummy User 1", + "properties[company]": "Rudderstack" + } + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "wootric", + "description": "Identify call for updating user traits/properties", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "wootric-1234" + }, + "message": { + "type": "identify", + "sentAt": "2022-01-20T13:39:21.033Z", + "userId": "dummyId1", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.2.20", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", + "title": "Document", + "search": "", + "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", + "initial_referrer": "$direct", + "referring_domain": "127.0.0.1:7307", + "initial_referring_domain": "" + }, + "locale": "en-US", + "screen": { + "width": 1440, + "height": 900, + "density": 2, + "innerWidth": 536, + "innerHeight": 689 + }, + "traits": { + "city": "Udaipur", + "name": "Dummy User 1 New", + "title": "SDE-2", + "gender": "Male", + "company": "Rudderstack" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.2.20" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "PUT", + "endpoint": "https://api.wootric.com/v1/end_users/486438462", + "headers": { + "Content-Type": "application/x-www-form-urlencoded", + "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" + }, + "params": {}, + "body": { + "JSON": {}, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": { + "last_surveyed": "1642685961", + "properties[city]": "Udaipur", + "properties[name]": "Dummy User 1 New", + "properties[title]": "SDE-2", + "properties[gender]": "Male", + "properties[company]": "Rudderstack" + } + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "wootric", + "description": "Track call with existing userId and event type as create response", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "wootric-1234" + }, + "message": { + "type": "track", + "sentAt": "2022-01-20T13:39:21.033Z", + "userId": "dummyId1", + "channel": "web", + "properties": { + "feedbackScore": 7, + "feedbackText": "Simple, Easy to use, Reliable, Affordable Product" + }, + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.2.20", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", + "title": "Document", + "search": "", + "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", + "initial_referrer": "$direct", + "referring_domain": "127.0.0.1:7307", + "initial_referring_domain": "" + }, + "locale": "en-US", + "ip": "0.0.0.0", + "screen": { + "width": 1440, + "height": 900, + "density": 2, + "innerWidth": 536, + "innerHeight": 689 + }, + "traits": { + "city": "Mumbai", + "name": "Dummy User 1", + "email": "dummyUser1@gmail.com", + "title": "SDE", + "gender": "Male", + "company": "Rudderstack", + "createdAt": "2021-01-20T13:39:21.032Z" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.2.20" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true, + "Wootric": { + "eventType": "create response" + } + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.wootric.com/v1/end_users/486438462/responses", + "headers": { + "Content-Type": "application/x-www-form-urlencoded", + "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" + }, + "params": {}, + "body": { + "JSON": {}, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": { + "score": 7, + "ip_address": "0.0.0.0", + "origin_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "text": "Simple, Easy to use, Reliable, Affordable Product", + "created_at": "1611149961", + "end_user[properties][city]": "Mumbai", + "end_user[properties][name]": "Dummy User 1", + "end_user[properties][title]": "SDE", + "end_user[properties][gender]": "Male", + "end_user[properties][company]": "Rudderstack" + } + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "wootric", + "description": "Track call with non-existing userId", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "wootric-1234" + }, + "message": { + "type": "track", + "sentAt": "2022-01-20T13:39:21.033Z", + "userId": "dummyId2", + "channel": "web", + "properties": { + "feedbackScore": 7, + "feedbackText": "Simple, Easy to use, Reliable, Affordable Product" + }, + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.2.20", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", + "title": "Document", + "search": "", + "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", + "initial_referrer": "$direct", + "referring_domain": "127.0.0.1:7307", + "initial_referring_domain": "" + }, + "locale": "en-US", + "ip": "0.0.0.0", + "screen": { + "width": 1440, + "height": 900, + "density": 2, + "innerWidth": 536, + "innerHeight": 689 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.2.20" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true, + "Wootric": { + "eventType": "create response" + } + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "No user found with userId : dummyId2", + "statTags": { + "destType": "WOOTRIC", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "wootric", + "description": "Track call with non-existing wootricEndUserId", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "wootric-1234" + }, + "message": { + "type": "track", + "sentAt": "2022-01-20T13:39:21.033Z", + "channel": "web", + "properties": { + "feedbackScore": 7, + "feedbackText": "Simple, Easy to use, Reliable, Affordable Product" + }, + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.2.20", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", + "title": "Document", + "search": "", + "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", + "initial_referrer": "$direct", + "referring_domain": "127.0.0.1:7307", + "initial_referring_domain": "" + }, + "locale": "en-US", + "ip": "0.0.0.0", + "screen": { + "width": 1440, + "height": 900, + "density": 2, + "innerWidth": 536, + "innerHeight": 689 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.2.20" + }, + "externalId": [ + { + "type": "wootricEndUserId", + "id": "12345" + } + ], + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true, + "Wootric": { + "eventType": "create response" + } + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "No user found with wootric end user Id : 12345", + "statTags": { + "destType": "WOOTRIC", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "wootric", + "description": "Track call with existing userId and event type as create response and score out of bound", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "wootric-1234" + }, + "message": { + "type": "track", + "sentAt": "2022-01-20T13:39:21.033Z", + "userId": "dummyId1", + "channel": "web", + "properties": { + "feedbackScore": 12, + "feedbackText": "Simple, Easy to use, Reliable, Affordable Product" + }, + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.2.20", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", + "title": "Document", + "search": "", + "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", + "initial_referrer": "$direct", + "referring_domain": "127.0.0.1:7307", + "initial_referring_domain": "" + }, + "locale": "en-US", + "ip": "0.0.0.0", + "screen": { + "width": 1440, + "height": 900, + "density": 2, + "innerWidth": 536, + "innerHeight": 689 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.2.20" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true, + "Wootric": { + "eventType": "create response" + } + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Invalid Score", + "statTags": { + "destType": "WOOTRIC", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "wootric", + "description": "Track call with existing userId and event type as create decline", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "wootric-1234" + }, + "message": { + "type": "track", + "sentAt": "2022-01-20T13:39:21.033Z", + "userId": "dummyId1", + "channel": "web", + "properties": { + "feedbackScore": 9, + "feedbackText": "Simple, Easy to use, Reliable, Affordable Product" + }, + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.2.20", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", + "title": "Document", + "search": "", + "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", + "initial_referrer": "$direct", + "referring_domain": "127.0.0.1:7307", + "initial_referring_domain": "" + }, + "locale": "en-US", + "screen": { + "width": 1440, + "height": 900, + "density": 2, + "innerWidth": 536, + "innerHeight": 689 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.2.20" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true, + "Wootric": { + "eventType": "create decline" + } + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.wootric.com/v1/end_users/486438462/declines", + "headers": { + "Content-Type": "application/x-www-form-urlencoded", + "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" + }, + "params": {}, + "body": { + "JSON": {}, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": { + "origin_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html" + } + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "wootric", + "description": "Track call with non-existing userId and event type as create decline", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "wootric-1234" + }, + "message": { + "type": "track", + "sentAt": "2022-01-20T13:39:21.033Z", + "userId": "dummyId2", + "channel": "web", + "properties": { + "feedbackScore": 9, + "feedbackText": "Simple, Easy to use, Reliable, Affordable Product" + }, + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.2.20", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", + "title": "Document", + "search": "", + "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", + "initial_referrer": "$direct", + "referring_domain": "127.0.0.1:7307", + "initial_referring_domain": "" + }, + "locale": "en-US", + "screen": { + "width": 1440, + "height": 900, + "density": 2, + "innerWidth": 536, + "innerHeight": 689 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.2.20" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true, + "Wootric": { + "eventType": "create decline" + } + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "No user found with userId : dummyId2", + "statTags": { + "destType": "WOOTRIC", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "wootric", + "description": "Track call with event type other than create response or decline", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "wootric-1234" + }, + "message": { + "type": "track", + "sentAt": "2022-01-20T13:39:21.033Z", + "userId": "dummyId1", + "channel": "web", + "properties": { + "feedbackScore": 7, + "feedbackText": "Simple, Easy to use, Reliable, Affordable Product" + }, + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.2.20", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", + "title": "Document", + "search": "", + "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", + "initial_referrer": "$direct", + "referring_domain": "127.0.0.1:7307", + "initial_referring_domain": "" + }, + "locale": "en-US", + "ip": "0.0.0.0", + "screen": { + "width": 1440, + "height": 900, + "density": 2, + "innerWidth": 536, + "innerHeight": 689 + }, + "traits": { + "city": "Mumbai", + "name": "Dummy User 1", + "email": "dummyUser1@gmail.com", + "phone": "+19123456789", + "title": "SDE", + "gender": "Male", + "company": "Rudderstack", + "createdAt": "2021-01-20T13:39:21.032Z" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.2.20" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true, + "Wootric": { + "eventType": "random" + } + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Event Type not supported", + "statTags": { + "destType": "WOOTRIC", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "wootric", + "description": "Track call with missing event type in integration object", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "wootric-1234" + }, + "message": { + "type": "track", + "sentAt": "2022-01-20T13:39:21.033Z", + "userId": "dummyId1", + "channel": "web", + "properties": { + "feedbackScore": 3, + "feedbackText": "Too Slow!!!" + }, + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.2.20", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", + "title": "Document", + "search": "", + "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", + "initial_referrer": "$direct", + "referring_domain": "127.0.0.1:7307", + "initial_referring_domain": "" + }, + "locale": "en-US", + "ip": "0.0.0.0", + "screen": { + "width": 1440, + "height": 900, + "density": 2, + "innerWidth": 536, + "innerHeight": 689 + }, + "traits": { + "city": "Mumbai", + "name": "Dummy User 1", + "email": "dummyUser1@gmail.com", + "phone": "+19123456789", + "title": "SDE", + "gender": "Male", + "company": "Rudderstack", + "createdAt": "2021-01-20T13:39:21.032Z" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.2.20" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Event Type is missing from Integration object", + "statTags": { + "destType": "WOOTRIC", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + } +] \ No newline at end of file diff --git a/test/integrations/destinations/wootric/router/data.ts b/test/integrations/destinations/wootric/router/data.ts new file mode 100644 index 0000000000..724ba176f2 --- /dev/null +++ b/test/integrations/destinations/wootric/router/data.ts @@ -0,0 +1,1622 @@ +export const data = [ + { + name: 'wootric', + description: 'Succesfull Idenitfy Call', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" + }, + "metadata": { + "jobId": 1 + }, + "message": { + "type": "identify", + "sentAt": "2022-01-20T13:39:21.033Z", + "userId": "dummyId2", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.2.20", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", + "title": "Document", + "search": "", + "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", + "initial_referrer": "$direct", + "referring_domain": "127.0.0.1:7307", + "initial_referring_domain": "" + }, + "locale": "en-US", + "screen": { + "width": 1440, + "height": 900, + "density": 2, + "innerWidth": 536, + "innerHeight": 689 + }, + "traits": { + "city": "Bangalore", + "name": "Dummy User 2", + "email": "dummyUser2@gmail.com", + "phone": "+19123456777", + "title": "SDE", + "gender": "Male", + "company": "Rudderstack", + "createdAt": "2021-01-20T13:39:21.032Z" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.2.20" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + }, + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" + }, + "metadata": { + "jobId": 2 + }, + "message": { + "type": "identify", + "sentAt": "2022-01-20T13:39:21.033Z", + "userId": "dummyId2", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.2.20", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", + "title": "Document", + "search": "", + "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", + "initial_referrer": "$direct", + "referring_domain": "127.0.0.1:7307", + "initial_referring_domain": "" + }, + "locale": "en-US", + "screen": { + "width": 1440, + "height": 900, + "density": 2, + "innerWidth": 536, + "innerHeight": 689 + }, + "traits": { + "city": "Bangalore", + "name": "Dummy User 2", + "phone": "+19123456777", + "title": "SDE", + "gender": "Male", + "company": "Rudderstack", + "createdAt": "2021-01-20T13:39:21.032Z" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.2.20" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + }, + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" + }, + "metadata": { + "jobId": 3 + }, + "message": { + "type": "identify", + "sentAt": "2022-01-20T13:39:21.033Z", + "userId": "dummyId2", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.2.20", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", + "title": "Document", + "search": "", + "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", + "initial_referrer": "$direct", + "referring_domain": "127.0.0.1:7307", + "initial_referring_domain": "" + }, + "locale": "en-US", + "screen": { + "width": 1440, + "height": 900, + "density": 2, + "innerWidth": 536, + "innerHeight": 689 + }, + "traits": { + "email": "dummyUser2@gmail.com", + "city": "Bangalore", + "name": "Dummy User 2", + "title": "SDE", + "gender": "Male", + "company": "Rudderstack", + "createdAt": "2021-01-20T13:39:21.032Z" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.2.20" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + }, + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" + }, + "metadata": { + "jobId": 5 + }, + "message": { + "type": "identify", + "sentAt": "2022-01-20T13:39:21.033Z", + "userId": "dummyId2", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.2.20", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", + "title": "Document", + "search": "", + "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", + "initial_referrer": "$direct", + "referring_domain": "127.0.0.1:7307", + "initial_referring_domain": "" + }, + "locale": "en-US", + "screen": { + "width": 1440, + "height": 900, + "density": 2, + "innerWidth": 536, + "innerHeight": 689 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.2.20" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + }, + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" + }, + "metadata": { + "jobId": 6 + }, + "message": { + "type": "identify", + "sentAt": "2022-01-20T13:39:21.033Z", + "userId": "dummyId2", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.2.20", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", + "title": "Document", + "search": "", + "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", + "initial_referrer": "$direct", + "referring_domain": "127.0.0.1:7307", + "initial_referring_domain": "" + }, + "locale": "en-US", + "screen": { + "width": 1440, + "height": 900, + "density": 2, + "innerWidth": 536, + "innerHeight": 689 + }, + "traits": { + "city": "Mumbai", + "name": "Dummy User 1", + "title": "SDE", + "gender": "Male", + "company": "Rudderstack", + "createdAt": "2021-01-20T13:39:21.032Z" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.2.20" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + }, + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" + }, + "metadata": { + "jobId": 7 + }, + "message": { + "type": "identify", + "sentAt": "2022-01-20T13:39:21.033Z", + "userId": "dummyId1", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.2.20", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", + "title": "Document", + "search": "", + "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", + "initial_referrer": "$direct", + "referring_domain": "127.0.0.1:7307", + "initial_referring_domain": "" + }, + "locale": "en-US", + "screen": { + "width": 1440, + "height": 900, + "density": 2, + "innerWidth": 536, + "innerHeight": 689 + }, + "traits": { + "email": "dummyuser1_01@gmail.com" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.2.20" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + }, + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" + }, + "metadata": { + "jobId": 8 + }, + "message": { + "type": "identify", + "sentAt": "2022-01-20T13:39:21.033Z", + "userId": "dummyId1", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.2.20", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", + "title": "Document", + "search": "", + "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", + "initial_referrer": "$direct", + "referring_domain": "127.0.0.1:7307", + "initial_referring_domain": "" + }, + "locale": "en-US", + "screen": { + "width": 1440, + "height": 900, + "density": 2, + "innerWidth": 536, + "innerHeight": 689 + }, + "traits": { + "phone": "+19777777778" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.2.20" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + }, + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" + }, + "metadata": { + "jobId": 9 + }, + "message": { + "type": "identify", + "sentAt": "2022-01-20T13:39:21.033Z", + "userId": "dummyId1", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.2.20", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", + "title": "Document", + "search": "", + "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", + "initial_referrer": "$direct", + "referring_domain": "127.0.0.1:7307", + "initial_referring_domain": "" + }, + "locale": "en-US", + "screen": { + "width": 1440, + "height": 900, + "density": 2, + "innerWidth": 536, + "innerHeight": 689 + }, + "traits": { + "city": "Udaipur", + "name": "Dummy User 1 New", + "title": "SDE-2", + "gender": "Male", + "company": "Rudderstack" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.2.20" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + }, + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" + }, + "metadata": { + "jobId": 10 + }, + "message": { + "type": "track", + "sentAt": "2022-01-20T13:39:21.033Z", + "userId": "dummyId1", + "channel": "web", + "properties": { + "feedbackScore": 7, + "feedbackText": "Simple, Easy to use, Reliable, Affordable Product" + }, + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.2.20", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", + "title": "Document", + "search": "", + "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", + "initial_referrer": "$direct", + "referring_domain": "127.0.0.1:7307", + "initial_referring_domain": "" + }, + "locale": "en-US", + "ip": "0.0.0.0", + "screen": { + "width": 1440, + "height": 900, + "density": 2, + "innerWidth": 536, + "innerHeight": 689 + }, + "traits": { + "city": "Mumbai", + "name": "Dummy User 1", + "email": "dummyUser1@gmail.com", + "title": "SDE", + "gender": "Male", + "company": "Rudderstack", + "createdAt": "2021-01-20T13:39:21.032Z" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.2.20" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true, + "Wootric": { + "eventType": "create response" + } + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + }, + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" + }, + "metadata": { + "jobId": 11 + }, + "message": { + "type": "track", + "sentAt": "2022-01-20T13:39:21.033Z", + "userId": "dummyId2", + "channel": "web", + "properties": { + "feedbackScore": 7, + "feedbackText": "Simple, Easy to use, Reliable, Affordable Product" + }, + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.2.20", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", + "title": "Document", + "search": "", + "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", + "initial_referrer": "$direct", + "referring_domain": "127.0.0.1:7307", + "initial_referring_domain": "" + }, + "locale": "en-US", + "ip": "0.0.0.0", + "screen": { + "width": 1440, + "height": 900, + "density": 2, + "innerWidth": 536, + "innerHeight": 689 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.2.20" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true, + "Wootric": { + "eventType": "create response" + } + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + }, + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" + }, + "metadata": { + "jobId": 12 + }, + "message": { + "type": "track", + "sentAt": "2022-01-20T13:39:21.033Z", + "userId": "dummyId1", + "channel": "web", + "properties": { + "feedbackScore": 12, + "feedbackText": "Simple, Easy to use, Reliable, Affordable Product" + }, + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.2.20", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", + "title": "Document", + "search": "", + "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", + "initial_referrer": "$direct", + "referring_domain": "127.0.0.1:7307", + "initial_referring_domain": "" + }, + "locale": "en-US", + "ip": "0.0.0.0", + "screen": { + "width": 1440, + "height": 900, + "density": 2, + "innerWidth": 536, + "innerHeight": 689 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.2.20" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true, + "Wootric": { + "eventType": "create response" + } + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + }, + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" + }, + "metadata": { + "jobId": 13 + }, + "message": { + "type": "track", + "sentAt": "2022-01-20T13:39:21.033Z", + "userId": "dummyId1", + "channel": "web", + "properties": { + "feedbackScore": 9, + "feedbackText": "Simple, Easy to use, Reliable, Affordable Product" + }, + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.2.20", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", + "title": "Document", + "search": "", + "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", + "initial_referrer": "$direct", + "referring_domain": "127.0.0.1:7307", + "initial_referring_domain": "" + }, + "locale": "en-US", + "screen": { + "width": 1440, + "height": 900, + "density": 2, + "innerWidth": 536, + "innerHeight": 689 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.2.20" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true, + "Wootric": { + "eventType": "create decline" + } + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + }, + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" + }, + "metadata": { + "jobId": 14 + }, + "message": { + "type": "track", + "sentAt": "2022-01-20T13:39:21.033Z", + "userId": "dummyId2", + "channel": "web", + "properties": { + "feedbackScore": 9, + "feedbackText": "Simple, Easy to use, Reliable, Affordable Product" + }, + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.2.20", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", + "title": "Document", + "search": "", + "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", + "initial_referrer": "$direct", + "referring_domain": "127.0.0.1:7307", + "initial_referring_domain": "" + }, + "locale": "en-US", + "screen": { + "width": 1440, + "height": 900, + "density": 2, + "innerWidth": 536, + "innerHeight": 689 + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.2.20" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true, + "Wootric": { + "eventType": "create decline" + } + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + }, + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" + }, + "metadata": { + "jobId": 15 + }, + "message": { + "type": "track", + "sentAt": "2022-01-20T13:39:21.033Z", + "userId": "dummyId1", + "channel": "web", + "properties": { + "feedbackScore": 7, + "feedbackText": "Simple, Easy to use, Reliable, Affordable Product" + }, + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.2.20", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", + "title": "Document", + "search": "", + "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", + "initial_referrer": "$direct", + "referring_domain": "127.0.0.1:7307", + "initial_referring_domain": "" + }, + "locale": "en-US", + "ip": "0.0.0.0", + "screen": { + "width": 1440, + "height": 900, + "density": 2, + "innerWidth": 536, + "innerHeight": 689 + }, + "traits": { + "city": "Mumbai", + "name": "Dummy User 1", + "email": "dummyUser1@gmail.com", + "phone": "+19123456789", + "title": "SDE", + "gender": "Male", + "company": "Rudderstack", + "createdAt": "2021-01-20T13:39:21.032Z" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.2.20" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true, + "Wootric": { + "eventType": "random" + } + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + }, + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" + }, + "metadata": { + "jobId": 16 + }, + "message": { + "type": "track", + "sentAt": "2022-01-20T13:39:21.033Z", + "userId": "dummyId1", + "channel": "web", + "properties": { + "feedbackScore": 3, + "feedbackText": "Too Slow!!!" + }, + "context": { + "os": { + "name": "", + "version": "" + }, + "app": { + "name": "RudderLabs JavaScript SDK", + "build": "1.0.0", + "version": "1.2.20", + "namespace": "com.rudderlabs.javascript" + }, + "page": { + "url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "path": "/Testing/App_for_LaunchDarkly/ourSdk.html", + "title": "Document", + "search": "", + "tab_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "referrer": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/", + "initial_referrer": "$direct", + "referring_domain": "127.0.0.1:7307", + "initial_referring_domain": "" + }, + "locale": "en-US", + "ip": "0.0.0.0", + "screen": { + "width": 1440, + "height": 900, + "density": 2, + "innerWidth": 536, + "innerHeight": 689 + }, + "traits": { + "city": "Mumbai", + "name": "Dummy User 1", + "email": "dummyUser1@gmail.com", + "phone": "+19123456789", + "title": "SDE", + "gender": "Male", + "company": "Rudderstack", + "createdAt": "2021-01-20T13:39:21.032Z" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.2.20" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" + }, + "rudderId": "553b5522-c575-40a7-8072-9741c5f9a647", + "messageId": "831f1fa5-de84-4f22-880a-4c3f23fc3f04", + "anonymousId": "bf412108-0357-4330-b119-7305e767823c", + "integrations": { + "All": true + }, + "originalTimestamp": "2022-01-20T13:39:21.032Z" + } + } + ] + , + destType: 'wootric', + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + "batchedRequest": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.wootric.com/v1/end_users", + "headers": { + "Content-Type": "application/x-www-form-urlencoded", + "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" + }, + "params": {}, + "body": { + "JSON": {}, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": { + "email": "dummyUser2@gmail.com", + "phone_number": "+19123456777", + "last_surveyed": "1642685961", + "external_created_at": "1611149961", + "external_id": "dummyId2", + "properties[city]": "Bangalore", + "properties[name]": "Dummy User 2", + "properties[title]": "SDE", + "properties[gender]": "Male", + "properties[company]": "Rudderstack" + } + }, + "files": {} + }, + "metadata": [ + { + "jobId": 1 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG", + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + } + } + }, + { + "batchedRequest": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.wootric.com/v1/end_users", + "headers": { + "Content-Type": "application/x-www-form-urlencoded", + "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" + }, + "params": {}, + "body": { + "JSON": {}, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": { + "phone_number": "+19123456777", + "last_surveyed": "1642685961", + "external_created_at": "1611149961", + "external_id": "dummyId2", + "properties[city]": "Bangalore", + "properties[name]": "Dummy User 2", + "properties[title]": "SDE", + "properties[gender]": "Male", + "properties[company]": "Rudderstack" + } + }, + "files": {} + }, + "metadata": [ + { + "jobId": 2 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG", + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + } + } + }, + { + "batchedRequest": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.wootric.com/v1/end_users", + "headers": { + "Content-Type": "application/x-www-form-urlencoded", + "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" + }, + "params": {}, + "body": { + "JSON": {}, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": { + "email": "dummyUser2@gmail.com", + "last_surveyed": "1642685961", + "external_created_at": "1611149961", + "external_id": "dummyId2", + "properties[city]": "Bangalore", + "properties[name]": "Dummy User 2", + "properties[title]": "SDE", + "properties[gender]": "Male", + "properties[company]": "Rudderstack" + } + }, + "files": {} + }, + "metadata": [ + { + "jobId": 3 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG", + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + } + } + }, + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" + }, + "metadata": [ + { + "jobId": 5 + } + ], + "batched": false, + "statusCode": 400, + "error": "email/phone number are missing. At least one parameter must be provided", + "statTags": { + "destType": "WOOTRIC", + "feature": "router", + "implementation": "native", + "module": "destination", + "errorCategory": "dataValidation", + "errorType": "instrumentation" + } + }, + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" + }, + "metadata": [ + { + "jobId": 6 + } + ], + "batched": false, + "statusCode": 400, + "error": "email/phone number are missing. At least one parameter must be provided", + "statTags": { + "destType": "WOOTRIC", + "feature": "router", + "implementation": "native", + "module": "destination", + "errorCategory": "dataValidation", + "errorType": "instrumentation" + } + }, + { + "batchedRequest": { + "version": "1", + "type": "REST", + "method": "PUT", + "endpoint": "https://api.wootric.com/v1/end_users/486438462", + "headers": { + "Content-Type": "application/x-www-form-urlencoded", + "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" + }, + "params": {}, + "body": { + "JSON": {}, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": { + "email": "dummyuser1_01@gmail.com", + "last_surveyed": "1642685961" + } + }, + "files": {} + }, + "metadata": [ + { + "jobId": 7 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG", + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + } + } + }, + { + "batchedRequest": { + "version": "1", + "type": "REST", + "method": "PUT", + "endpoint": "https://api.wootric.com/v1/end_users/486438462", + "headers": { + "Content-Type": "application/x-www-form-urlencoded", + "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" + }, + "params": {}, + "body": { + "JSON": {}, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": { + "phone_number": "+19777777778", + "last_surveyed": "1642685961" + } + }, + "files": {} + }, + "metadata": [ + { + "jobId": 8 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG", + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + } + } + }, + { + "batchedRequest": { + "version": "1", + "type": "REST", + "method": "PUT", + "endpoint": "https://api.wootric.com/v1/end_users/486438462", + "headers": { + "Content-Type": "application/x-www-form-urlencoded", + "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" + }, + "params": {}, + "body": { + "JSON": {}, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": { + "last_surveyed": "1642685961", + "properties[city]": "Udaipur", + "properties[name]": "Dummy User 1 New", + "properties[title]": "SDE-2", + "properties[gender]": "Male", + "properties[company]": "Rudderstack" + } + }, + "files": {} + }, + "metadata": [ + { + "jobId": 9 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG", + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + } + } + }, + { + "batchedRequest": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.wootric.com/v1/end_users/486438462/responses", + "headers": { + "Content-Type": "application/x-www-form-urlencoded", + "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" + }, + "params": {}, + "body": { + "JSON": {}, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": { + "score": 7, + "ip_address": "0.0.0.0", + "origin_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html", + "text": "Simple, Easy to use, Reliable, Affordable Product", + "created_at": "1611149961", + "end_user[properties][city]": "Mumbai", + "end_user[properties][name]": "Dummy User 1", + "end_user[properties][title]": "SDE", + "end_user[properties][gender]": "Male", + "end_user[properties][company]": "Rudderstack" + } + }, + "files": {} + }, + "metadata": [ + { + "jobId": 10 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG", + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + } + } + }, + { + "metadata": [ + { + "jobId": 11 + } + ], + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" + }, + "batched": false, + "statusCode": 400, + "error": "No user found with userId : dummyId2", + "statTags": { + "destType": "WOOTRIC", + "feature": "router", + "implementation": "native", + "module": "destination", + "errorCategory": "dataValidation", + "errorType": "instrumentation" + } + }, + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" + }, + "metadata": [ + { + "jobId": 12 + } + ], + "batched": false, + "statusCode": 400, + "error": "Invalid Score", + "statTags": { + "destType": "WOOTRIC", + "feature": "router", + "implementation": "native", + "module": "destination", + "errorCategory": "dataValidation", + "errorType": "instrumentation" + } + }, + { + "batchedRequest": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.wootric.com/v1/end_users/486438462/declines", + "headers": { + "Content-Type": "application/x-www-form-urlencoded", + "Authorization": "Bearer 2fe581c1c72851e73d60f4191f720be93e5d3e8a6147e37c4e8e852b1a8f506c" + }, + "params": {}, + "body": { + "JSON": {}, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": { + "origin_url": "http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html" + } + }, + "files": {} + }, + "metadata": [ + { + "jobId": 13 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG", + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + } + } + }, + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" + }, + "metadata": [ + { + "jobId": 14 + } + ], + "batched": false, + "statusCode": 400, + "error": "No user found with userId : dummyId2", + "statTags": { + "destType": "WOOTRIC", + "feature": "router", + "implementation": "native", + "module": "destination", + "errorCategory": "dataValidation", + "errorType": "instrumentation" + } + }, + { + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" + }, + "metadata": [ + { + "jobId": 15 + } + ], + "batched": false, + "statusCode": 400, + "error": "Event Type not supported", + "statTags": { + "destType": "WOOTRIC", + "feature": "router", + "implementation": "native", + "module": "destination", + "errorCategory": "dataValidation", + "errorType": "instrumentation" + } + }, + { + "metadata": [ + { + "jobId": 16 + } + ], + "destination": { + "Config": { + "username": "wootricfakeuser@example.com", + "password": "password@123", + "accountToken": "NPS-dummyToken" + }, + "ID": "2D7TqLto9tnkBuR1ciMrbiA4cbG" + }, + "batched": false, + "statusCode": 400, + "error": "Event Type is missing from Integration object", + "statTags": { + "destType": "WOOTRIC", + "feature": "router", + "implementation": "native", + "module": "destination", + "errorCategory": "dataValidation", + "errorType": "instrumentation" + } + } + ], + }, + }, + }, + } +]; From 2486029c0a21d3d4ebca0b63123eb85f62f10aa2 Mon Sep 17 00:00:00 2001 From: Dilip Kola Date: Tue, 9 Jan 2024 16:48:19 +0530 Subject: [PATCH 122/135] chore: ignore test folder from coverage --- jest.config.js | 2 +- jest.config.typescript.js | 2 +- jest.default.config.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/jest.config.js b/jest.config.js index 6ccb91259a..f126aee9ca 100644 --- a/jest.config.js +++ b/jest.config.js @@ -27,7 +27,7 @@ module.exports = { coverageDirectory: 'reports/coverage', // An array of regexp pattern strings used to skip coverage collection - coveragePathIgnorePatterns: ['/node_modules/', '__tests__', 'warehouse/v0'], + coveragePathIgnorePatterns: ['/node_modules/', '__tests__', 'warehouse/v0', 'test'], // A list of reporter names that Jest uses when writing coverage reports coverageReporters: ['json', 'text', 'lcov', 'clover'], diff --git a/jest.config.typescript.js b/jest.config.typescript.js index fde50e3d5e..7350f1e19d 100644 --- a/jest.config.typescript.js +++ b/jest.config.typescript.js @@ -27,7 +27,7 @@ module.exports = { coverageDirectory: 'reports/ts-coverage', // An array of regexp pattern strings used to skip coverage collection - coveragePathIgnorePatterns: ['/node_modules/', '__tests__'], + coveragePathIgnorePatterns: ['/node_modules/', '__tests__', 'test'], // A list of reporter names that Jest uses when writing coverage reports coverageReporters: ['json', 'text', 'lcov', 'clover'], diff --git a/jest.default.config.js b/jest.default.config.js index 2d591cd833..59ca844902 100644 --- a/jest.default.config.js +++ b/jest.default.config.js @@ -27,7 +27,7 @@ module.exports = { coverageDirectory: 'reports/coverage', // An array of regexp pattern strings used to skip coverage collection - coveragePathIgnorePatterns: ['/node_modules/', '__tests__', 'warehouse/v0'], + coveragePathIgnorePatterns: ['/node_modules/', '__tests__', 'warehouse/v0' ,'test'], // A list of reporter names that Jest uses when writing coverage reports coverageReporters: ['json', 'text', 'lcov', 'clover'], From 81ab6e86070a9992141bad405c6f52d1ab186f11 Mon Sep 17 00:00:00 2001 From: Sankeerth Date: Wed, 10 Jan 2024 15:26:54 +0530 Subject: [PATCH 123/135] fix: optimise build and coverage (#2985) * fix: optimise build and coverage Signed-off-by: Sai Sankeerth * fix: add additional steps of checking out transformer before executing UT tests Signed-off-by: Sai Sankeerth * chore: refactor test github workflows * chore: refactor test github workflows * chore: supress logs during tests in github * chore: remove logs from tests --------- Signed-off-by: Sai Sankeerth Co-authored-by: Sai Sankeerth Co-authored-by: Dilip Kola --- ...l => dt-test-and-report-code-coverage.yml} | 7 +++--- .github/workflows/{test.yml => ut-tests.yml} | 25 ++++++++----------- src/adapters/networkHandlerFactory.test.js | 2 -- src/v0/destinations/bqstream/util.test.js | 2 -- src/v0/destinations/ga4/utils.test.js | 1 - src/v0/destinations/mp/util.test.js | 1 - src/v0/util/index.test.js | 1 - test/__tests__/marketo_bulk_upload.test.js | 3 --- .../user_transformation_errors.test.js | 1 - tsconfig.json | 2 +- 10 files changed, 15 insertions(+), 30 deletions(-) rename .github/workflows/{report-code-coverage.yml => dt-test-and-report-code-coverage.yml} (92%) rename .github/workflows/{test.yml => ut-tests.yml} (94%) diff --git a/.github/workflows/report-code-coverage.yml b/.github/workflows/dt-test-and-report-code-coverage.yml similarity index 92% rename from .github/workflows/report-code-coverage.yml rename to .github/workflows/dt-test-and-report-code-coverage.yml index af6326ae88..4096227400 100644 --- a/.github/workflows/report-code-coverage.yml +++ b/.github/workflows/dt-test-and-report-code-coverage.yml @@ -1,4 +1,4 @@ -name: Report Code Coverage +name: DT Tests on: workflow_call: secrets: @@ -30,8 +30,9 @@ jobs: - name: Run Tests run: | - npm run test:js:ci - npm run test:ts:ci + # Supress logging in tests + LOG_LEVEL=100 npm run test:js:ci + LOG_LEVEL=100 npm run test:ts:ci - name: Run Lint Checks run: | diff --git a/.github/workflows/test.yml b/.github/workflows/ut-tests.yml similarity index 94% rename from .github/workflows/test.yml rename to .github/workflows/ut-tests.yml index 71a6706f94..530a532325 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/ut-tests.yml @@ -8,10 +8,18 @@ on: - synchronize jobs: - test: - name: Run Tests + ut_tests: + name: UT Tests runs-on: ubuntu-latest steps: + - name: Setup Go + uses: actions/setup-go@v4.1.0 + with: + go-version: 1.17 + + - name: Install Latest Version of Kind + run: go install sigs.k8s.io/kind@v0.17.0 + - name: Checkout uses: actions/checkout@v4.1.1 with: @@ -26,19 +34,6 @@ jobs: - name: Install Dependencies run: npm ci - - name: Run Unit Tests - run: | - npm run test:js:ci - npm run test:ts:ci - - - name: Setup Go - uses: actions/setup-go@v4.1.0 - with: - go-version: 1.17 - - - name: Install Latest Version of Kind - run: go install sigs.k8s.io/kind@v0.17.0 - - name: Create Kind cluster run: kind create cluster --name kind-cluster --config=test/__tests__/data/worker-nodes-kind.yml diff --git a/src/adapters/networkHandlerFactory.test.js b/src/adapters/networkHandlerFactory.test.js index ff5f26a02d..e2b4a231e1 100644 --- a/src/adapters/networkHandlerFactory.test.js +++ b/src/adapters/networkHandlerFactory.test.js @@ -23,14 +23,12 @@ describe(`Network Handler Tests`, () => { it('Should return v0 handler if v1 version and handler is present for destination in v0', () => { const { networkHandler, handlerVersion } = getNetworkHandler('braze', `v1`); const brazeProxy = require(`../v0/destinations/braze/networkHandler`).networkHandler; - console.log(networkHandler); expect(networkHandler).toEqual(new brazeProxy()); }); it('Should return generic handler', () => { const { networkHandler, handlerVersion } = getNetworkHandler('abc', `v1`); const brazeProxy = require(`../v0/destinations/braze/networkHandler`).networkHandler; - console.log(networkHandler); expect(networkHandler).toEqual(new GenericNetworkHandler()); }); }); diff --git a/src/v0/destinations/bqstream/util.test.js b/src/v0/destinations/bqstream/util.test.js index c7635772ac..ae07d90383 100644 --- a/src/v0/destinations/bqstream/util.test.js +++ b/src/v0/destinations/bqstream/util.test.js @@ -196,7 +196,6 @@ describe('getRearrangedEvents', () => { ], ]; const result = getRearrangedEvents(successEventslist, errorEventsList); - console.log(JSON.stringify(result)); expect(result).toEqual(expected); }); @@ -261,7 +260,6 @@ describe('getRearrangedEvents', () => { ], ]; const result = getRearrangedEvents(successEventslist, errorEventsList); - console.log(JSON.stringify(result)); expect(result).toEqual(expected); }); }); diff --git a/src/v0/destinations/ga4/utils.test.js b/src/v0/destinations/ga4/utils.test.js index 7826c23d35..18b3ab5766 100644 --- a/src/v0/destinations/ga4/utils.test.js +++ b/src/v0/destinations/ga4/utils.test.js @@ -147,7 +147,6 @@ describe('Google Analytics 4 utils test', () => { const output = validateEventName('Grisly1234567_Open_General_Setting'); expect(output).toEqual(); } catch (error) { - console.log(error.message); expect(error.message).toEqual(); } }); diff --git a/src/v0/destinations/mp/util.test.js b/src/v0/destinations/mp/util.test.js index fbaa6f9b9f..ebf140fadd 100644 --- a/src/v0/destinations/mp/util.test.js +++ b/src/v0/destinations/mp/util.test.js @@ -611,7 +611,6 @@ describe('Mixpanel utils test', () => { const setOnceProperties = ['name', 'email']; const result = trimTraits(traits, contextTraits, setOnceProperties); - console.log(result); expect(result).toEqual({ traits: { diff --git a/src/v0/util/index.test.js b/src/v0/util/index.test.js index 65d6313e30..a46b55fdd4 100644 --- a/src/v0/util/index.test.js +++ b/src/v0/util/index.test.js @@ -60,7 +60,6 @@ describe('Utility Functions Tests', () => { test.each(funcTestData)('$description', async ({ description, input, output }) => { try { let result; - console.log(Object.values(input)); result = utilities[funcName](...Object.values(input)); expect(result).toEqual(output); } catch (e) { diff --git a/test/__tests__/marketo_bulk_upload.test.js b/test/__tests__/marketo_bulk_upload.test.js index be4efa14e2..6cf4d559b9 100644 --- a/test/__tests__/marketo_bulk_upload.test.js +++ b/test/__tests__/marketo_bulk_upload.test.js @@ -93,9 +93,6 @@ describe(`${integration} Tests`, () => { const output = await vRouter.pollStatus(input); expect(output).toEqual(respPollBody[index]); } catch (error) { - console.log("CHEEECKKKK"); - console.log(error); - console.log(respPollBody[index].error); expect(error.message).toEqual(respPollBody[index].error); } }); diff --git a/test/__tests__/user_transformation_errors.test.js b/test/__tests__/user_transformation_errors.test.js index 62bf4db3ce..c2a99ce09d 100644 --- a/test/__tests__/user_transformation_errors.test.js +++ b/test/__tests__/user_transformation_errors.test.js @@ -163,7 +163,6 @@ describe("JS Transformation Error Tests", () => { true, ); - console.log('XTE: ', result.transformedEvents) expect(result.transformedEvents.length).toBe(1); result.transformedEvents.forEach(ev => { expect(ev.error).toEqual( `ReferenceError: x is not defined diff --git a/tsconfig.json b/tsconfig.json index 3d91523d78..9db40dd0e1 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -102,6 +102,6 @@ // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ "skipLibCheck": true /* Skip type checking all .d.ts files. */ }, - "exclude": ["./src/**/*.test.js", "./src/**/*.test.ts"], + "exclude": ["./src/**/*.test.js", "./src/**/*.test.ts", "./test"], "include": ["./src", "./src/**/*.json"] } From 7390888525311b0e0d0844759520f76701f763be Mon Sep 17 00:00:00 2001 From: Dilip Kola Date: Wed, 10 Jan 2024 16:53:56 +0530 Subject: [PATCH 124/135] chore: fix @amplitude/ua-parser-js version --- package-lock.json | 18 ++++-------------- package.json | 2 +- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7c65ce612e..36ea9a1b52 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "1.53.0", "license": "ISC", "dependencies": { - "@amplitude/ua-parser-js": "^0.7.24", + "@amplitude/ua-parser-js": "0.7.24", "@aws-sdk/client-personalize": "^3.470.0", "@aws-sdk/client-s3": "^3.474.0", "@aws-sdk/credential-providers": "^3.391.0", @@ -124,19 +124,9 @@ } }, "node_modules/@amplitude/ua-parser-js": { - "version": "0.7.33", - "resolved": "https://registry.npmjs.org/@amplitude/ua-parser-js/-/ua-parser-js-0.7.33.tgz", - "integrity": "sha512-wKEtVR4vXuPT9cVEIJkYWnlF++Gx3BdLatPBM+SZ1ztVIvnhdGBZR/mn9x/PzyrMcRlZmyi6L56I2J3doVBnjA==", - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/ua-parser-js" - }, - { - "type": "paypal", - "url": "https://paypal.me/faisalman" - } - ], + "version": "0.7.24", + "resolved": "https://registry.npmjs.org/@amplitude/ua-parser-js/-/ua-parser-js-0.7.24.tgz", + "integrity": "sha512-VbQuJymJ20WEw0HtI2np7EdC3NJGUWi8+Xdbc7uk8WfMIF308T0howpzkQ3JFMN7ejnrcSM/OyNGveeE3TP3TA==", "engines": { "node": "*" } diff --git a/package.json b/package.json index 15490c04dc..112099b918 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ "check:lint": "eslint . -f json -o reports/eslint.json || exit 0" }, "dependencies": { - "@amplitude/ua-parser-js": "^0.7.24", + "@amplitude/ua-parser-js": "0.7.24", "@aws-sdk/client-personalize": "^3.470.0", "@aws-sdk/client-s3": "^3.474.0", "@aws-sdk/credential-providers": "^3.391.0", From 2ae437820952b87dace289ec04d5c116d77cf70c Mon Sep 17 00:00:00 2001 From: Dilip Kola Date: Thu, 11 Jan 2024 18:16:57 +0530 Subject: [PATCH 125/135] feat: add regulation to features.json --- src/features.json | 14 ++++++++++++++ test/apitests/service.api.test.ts | 32 ++++++++++++++++++++++++++++++- 2 files changed, 45 insertions(+), 1 deletion(-) diff --git a/src/features.json b/src/features.json index cc75b16a74..a94ddda57a 100644 --- a/src/features.json +++ b/src/features.json @@ -67,6 +67,20 @@ "THE_TRADE_DESK": true, "INTERCOM": true }, + "regulation": [ + "BRAZE", + "AM", + "INTERCOM", + "CLEVERTAP", + "AF", + "MP", + "GA", + "ITERABLE", + "ENGAGE", + "CUSTIFY", + "SENDGRID", + "SPRIG" + ], "supportSourceTransformV1": true, "supportTransformerProxyV1": false } diff --git a/test/apitests/service.api.test.ts b/test/apitests/service.api.test.ts index ee534d7b37..e7e1517565 100644 --- a/test/apitests/service.api.test.ts +++ b/test/apitests/service.api.test.ts @@ -35,7 +35,7 @@ const getDataFromPath = (pathInput) => { return JSON.parse(testDataFile.toString()); }; -describe('Basic route tests', () => { +describe('features tests', () => { test('successful features response', async () => { const expectedData = JSON.parse( fs.readFileSync(path.resolve(__dirname, '../../src/features.json'), 'utf8'), @@ -44,6 +44,36 @@ describe('Basic route tests', () => { expect(response.status).toEqual(200); expect(JSON.parse(response.text)).toEqual(expectedData); }); + + test('features regulation should be array', async () => { + const response = await request(server).get('/features'); + expect(response.status).toEqual(200); + const regulation = JSON.parse(response.text).regulation; + expect(Array.isArray(regulation)).toBeTruthy(); + }); + + test('features routerTransform should be object', async () => { + const response = await request(server).get('/features'); + expect(response.status).toEqual(200); + const routerTransform = JSON.parse(response.text).routerTransform; + expect(Array.isArray(routerTransform)).toBeFalsy(); + expect(typeof routerTransform).toBe('object'); + expect(Object.keys(routerTransform).length).toBeGreaterThan(0); + }); + + test('features supportSourceTransformV1 to be boolean', async () => { + const response = await request(server).get('/features'); + expect(response.status).toEqual(200); + const supportSourceTransformV1 = JSON.parse(response.text).supportSourceTransformV1; + expect(typeof supportSourceTransformV1).toBe('boolean'); + }); + + test('features supportTransformerProxyV1 to be boolean', async () => { + const response = await request(server).get('/features'); + expect(response.status).toEqual(200); + const supportTransformerProxyV1 = JSON.parse(response.text).supportTransformerProxyV1; + expect(typeof supportTransformerProxyV1).toBe('boolean'); + }); }); describe('Destination api tests', () => { From f6652b579c5a1c59b093058537e89dacdf118da3 Mon Sep 17 00:00:00 2001 From: Dilip Kola Date: Fri, 12 Jan 2024 10:43:50 +0530 Subject: [PATCH 126/135] refactor: rename regulation to regulations --- src/features.json | 2 +- test/apitests/service.api.test.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/features.json b/src/features.json index a94ddda57a..8709dce432 100644 --- a/src/features.json +++ b/src/features.json @@ -67,7 +67,7 @@ "THE_TRADE_DESK": true, "INTERCOM": true }, - "regulation": [ + "regulations": [ "BRAZE", "AM", "INTERCOM", diff --git a/test/apitests/service.api.test.ts b/test/apitests/service.api.test.ts index e7e1517565..cbc2abb3b2 100644 --- a/test/apitests/service.api.test.ts +++ b/test/apitests/service.api.test.ts @@ -45,11 +45,11 @@ describe('features tests', () => { expect(JSON.parse(response.text)).toEqual(expectedData); }); - test('features regulation should be array', async () => { + test('features regulations should be array', async () => { const response = await request(server).get('/features'); expect(response.status).toEqual(200); - const regulation = JSON.parse(response.text).regulation; - expect(Array.isArray(regulation)).toBeTruthy(); + const regulations = JSON.parse(response.text).regulations; + expect(Array.isArray(regulations)).toBeTruthy(); }); test('features routerTransform should be object', async () => { From 38c6e60799397e27ffde2d37c1662c137abe7b20 Mon Sep 17 00:00:00 2001 From: chandumlg <54652834+chandumlg@users.noreply.github.com> Date: Tue, 16 Jan 2024 06:25:25 -0600 Subject: [PATCH 127/135] chore: clean up test data (#2987) --- src/controllers/util/index.test.ts | 412 ++++++ test/controllerUtility/ctrl-utility.test.ts | 1446 ------------------- 2 files changed, 412 insertions(+), 1446 deletions(-) delete mode 100644 test/controllerUtility/ctrl-utility.test.ts diff --git a/src/controllers/util/index.test.ts b/src/controllers/util/index.test.ts index e23d3f6832..6065920846 100644 --- a/src/controllers/util/index.test.ts +++ b/src/controllers/util/index.test.ts @@ -1,4 +1,11 @@ +import { + Destination, + Metadata, + ProcessorTransformationRequest, + RouterTransformationRequestData, +} from '../../types'; import { ControllerUtility } from './index'; +import lodash from 'lodash'; describe('adaptInputToVersion', () => { it('should return the input unchanged when the implementation version is not found', () => { @@ -147,3 +154,408 @@ describe('adaptInputToVersion', () => { expect(result).toEqual(expected); }); }); + +type timestampTestCases = { + caseName: string; + expectedOutputEvents: Array; + inputEvents: Array; +}; + +const metadata: Metadata = { + sourceId: '27O0bmEEx3GgfmEhZHUcPwJQVWC', + workspaceId: '27O0bhB6p5ehfOWeeZlOSsSDTLg', + namespace: '', + instanceId: '1', + sourceType: 'HTTP', + sourceCategory: '', + trackingPlanId: '', + trackingPlanVersion: 0, + sourceTpConfig: {}, + mergedTpConfig: {}, + destinationId: '2JH9GMQf2YFJFaTw7rz1pxHAJPx', + jobRunId: '', + jobId: 1, + sourceBatchId: '', + sourceJobId: '', + sourceJobRunId: '', + sourceTaskId: '', + sourceTaskRunId: '', + recordId: {}, + destinationType: 'WEBHOOK', + messageId: 'e3a51e9a-6313-4389-ae73-07e487c8d9d0', + oauthAccessToken: '', + messageIds: [], + rudderId: '<<>>2073230<<>>2564871', + receivedAt: '2022-12-23T00:29:10.189+05:30', + eventName: 'Test', + eventType: 'track', + sourceDefinitionId: '1b6gJdqOPOCadT3cddw8eidV591', + destinationDefinitionId: '', + transformationId: '', +}; + +const destination: Destination = { + ID: 'string', + Name: 'string', + DestinationDefinition: { + ID: 'defid1', + Name: 'INTERCOM', + DisplayName: 'intercom', + Config: {}, + }, + Config: {}, + Enabled: true, + WorkspaceID: 'wspId', + Transformations: [], +}; + +const message = { + anonymousId: '2073230', + event: 'Test', + messageId: 'e3a51e9a-6313-4389-ae73-07e487c8d9d0', + originalTimestamp: '2022-12-23T00:29:12.117+05:30', + channel: 'sources', + properties: { + timestamp: '2023-01-23T00:29:12.117+05:30', + }, + sentAt: '2022-12-23T00:29:12.117+05:30', + timestamp: '2023-01-23T00:29:12.117+05:30', + type: 'track', + userId: '2564871', +}; + +function getMetadata(overrides: Metadata): Metadata { + return lodash.merge({}, metadata, overrides); +} + +function getDestination(overrides: Destination): Destination { + return lodash.merge({}, destination, overrides); +} + +function getMessage(overrides: object): object { + return lodash.merge({}, message, overrides); +} + +function getMessageWithShallowMerge(overrides: object): object { + return lodash.assign({}, message, overrides); +} + +const timestampEventsCases: timestampTestCases[] = [ + { + caseName: 'when events(all track), timestamp should be taken from properties.timestamp', + expectedOutputEvents: [ + { + message: message, + metadata: metadata, + destination: destination, + }, + ], + inputEvents: [ + { + message: getMessage({ + timestamp: '2022-12-23T00:29:10.188+05:30', + }), + metadata: metadata, + destination: destination, + }, + ], + }, + { + caseName: + 'when events(all track) without properties.timestamp, timestamp should be taken from timestamp', + expectedOutputEvents: [ + { + message: getMessageWithShallowMerge({ + properties: { + someTime: '2023-01-23T00:29:12.117+05:30', + }, + timestamp: '2022-11-22T00:29:10.188+05:30', + }), + metadata: metadata, + destination: destination, + }, + ], + inputEvents: [ + { + message: getMessageWithShallowMerge({ + properties: { + someTime: '2023-01-23T00:29:12.117+05:30', + }, + timestamp: '2022-11-22T00:29:10.188+05:30', + }), + metadata: metadata, + destination: destination, + }, + ], + }, + { + caseName: + 'when events(all identify) without context.timestamp, timestamp should be taken from timestamp', + expectedOutputEvents: [ + { + message: getMessage({ + context: { + timestamp: '2023-01-12T00:29:12.117+05:30', + }, + timestamp: '2023-01-12T00:29:12.117+05:30', + type: 'identify', + }), + metadata: metadata, + destination: destination, + }, + ], + inputEvents: [ + { + message: getMessage({ + context: { + timestamp: '2023-01-12T00:29:12.117+05:30', + }, + timestamp: '2022-11-22T00:29:10.188+05:30', + type: 'identify', + }), + metadata: metadata, + destination: destination, + }, + ], + }, + { + caseName: + 'when proc events(identify, track, group) are mixed, timestamp should be taken from relevant places for identify & track, skipped for group', + expectedOutputEvents: [ + { + message: getMessage({ + context: { + traits: { + timestamp: '2023-01-22T00:29:12.117+05:30', + }, + }, + timestamp: '2023-01-22T00:29:12.117+05:30', + type: 'identify', + }), + metadata: metadata, + destination: destination, + }, + { + message: getMessage({ + anonymousId: '2073231', + traits: { + timestamp: '2023-01-11T00:29:12.117+05:30', + }, + timestamp: '2023-01-11T00:29:12.117+05:30', + type: 'identify', + }), + metadata: metadata, + destination: destination, + }, + { + message: getMessage({ + anonymousId: '2073232', + properties: { + timestamp: '2023-01-13T00:29:12.117+05:30', + }, + timestamp: '2023-01-13T00:29:12.117+05:30', + }), + metadata: metadata, + destination: destination, + }, + { + message: getMessage({ + anonymousId: '2073232', + properties: { + timestamp: '2023-01-13T00:29:12.117+05:30', + }, + timestamp: '2022-11-22T00:29:10.188+05:30', + type: 'group', + }), + metadata: metadata, + destination: destination, + }, + ], + inputEvents: [ + { + message: getMessage({ + context: { + traits: { + timestamp: '2023-01-22T00:29:12.117+05:30', + }, + }, + timestamp: '2022-11-22T00:29:10.188+05:30', + type: 'identify', + }), + metadata: metadata, + destination: destination, + }, + { + message: getMessage({ + anonymousId: '2073231', + traits: { + timestamp: '2023-01-11T00:29:12.117+05:30', + }, + timestamp: '2022-11-22T00:29:10.188+05:30', + type: 'identify', + }), + metadata: metadata, + destination: destination, + }, + { + message: getMessage({ + anonymousId: '2073232', + properties: { + timestamp: '2023-01-13T00:29:12.117+05:30', + }, + timestamp: '2022-11-22T00:29:10.188+05:30', + }), + metadata: metadata, + destination: destination, + }, + { + message: getMessage({ + anonymousId: '2073232', + properties: { + timestamp: '2023-01-13T00:29:12.117+05:30', + }, + timestamp: '2022-11-22T00:29:10.188+05:30', + type: 'group', + }), + metadata: metadata, + destination: destination, + }, + ], + }, + { + caseName: + 'when a mix of VDM enabled & non-VDM destinations are available, the timestamp will be applied to only non-VDM destination', + expectedOutputEvents: [ + { + message: getMessage({ + context: { + traits: { + timestamp: '2023-01-22T00:29:12.117+05:30', + }, + mappedToDestination: true, + }, + timestamp: '2022-11-22T00:29:10.188+05:30', + type: 'identify', + }), + metadata: metadata, + destination: destination, + }, + { + message: getMessage({ + anonymousId: '2073231', + traits: { + timestamp: '2023-01-11T00:29:12.117+05:30', + }, + timestamp: '2023-01-11T00:29:12.117+05:30', + type: 'identify', + }), + metadata: getMetadata({ + destinationId: '2JH9GMQf2YFJFaTw7rz1pxHAJPy', + } as any), + destination: getDestination({ + ID: 'string-2', + } as any), + }, + { + message: getMessage({ + anonymousId: '2073232', + context: { + mappedToDestination: true, + }, + properties: { + timestamp: '2023-01-13T00:29:12.117+05:30', + }, + timestamp: '2022-11-22T00:29:10.188+05:30', + }), + metadata: metadata, + destination: destination, + }, + { + message: getMessage({ + anonymousId: '2073232', + context: { + mappedToDestination: true, + }, + properties: { + timestamp: '2023-01-13T00:29:12.117+05:30', + }, + timestamp: '2022-11-22T00:29:10.188+05:30', + type: 'group', + }), + metadata: metadata, + destination: destination, + }, + ], + inputEvents: [ + { + message: getMessage({ + context: { + traits: { + timestamp: '2023-01-22T00:29:12.117+05:30', + }, + mappedToDestination: true, + }, + timestamp: '2022-11-22T00:29:10.188+05:30', + type: 'identify', + }), + metadata: metadata, + destination: destination, + }, + { + message: getMessage({ + anonymousId: '2073231', + traits: { + timestamp: '2023-01-11T00:29:12.117+05:30', + }, + timestamp: '2022-11-22T00:29:10.188+05:30', + type: 'identify', + }), + metadata: getMetadata({ + destinationId: '2JH9GMQf2YFJFaTw7rz1pxHAJPy', + } as any), + destination: getDestination({ + ID: 'string-2', + } as any), + }, + { + message: getMessage({ + anonymousId: '2073232', + context: { + mappedToDestination: true, + }, + properties: { + timestamp: '2023-01-13T00:29:12.117+05:30', + }, + timestamp: '2022-11-22T00:29:10.188+05:30', + }), + metadata: metadata, + destination: destination, + }, + { + message: getMessage({ + anonymousId: '2073232', + context: { + mappedToDestination: true, + }, + properties: { + timestamp: '2023-01-13T00:29:12.117+05:30', + }, + timestamp: '2022-11-22T00:29:10.188+05:30', + type: 'group', + }), + metadata: metadata, + destination: destination, + }, + ], + }, +]; + +describe('controller utility tests -- handleTimestampInEvents for retl connections', () => { + test.each(timestampEventsCases)( + '$caseName', + ({ inputEvents, expectedOutputEvents: outputEvents }) => { + const actualEvents = ControllerUtility.handleTimestampInEvents(inputEvents); + expect(actualEvents).toStrictEqual(outputEvents); + }, + ); +}); diff --git a/test/controllerUtility/ctrl-utility.test.ts b/test/controllerUtility/ctrl-utility.test.ts deleted file mode 100644 index bf9eef1846..0000000000 --- a/test/controllerUtility/ctrl-utility.test.ts +++ /dev/null @@ -1,1446 +0,0 @@ -import { ProcessorTransformationRequest, RouterTransformationRequestData } from '../../src/types'; -import { ControllerUtility } from '../../src/controllers/util'; - -type timestampTestCases = { - caseName: string; - expectedOutputEvents: Array; - inputEvents: Array; -}; - -const timestampEventsCases: timestampTestCases[] = [ - { - caseName: 'when events(all track), timestamp should be taken from properties.timestamp', - expectedOutputEvents: [ - { - message: { - anonymousId: '2073230', - event: 'Test', - messageId: 'e3a51e9a-6313-4389-ae73-07e487c8d9d0', - originalTimestamp: '2022-12-23T00:29:12.117+05:30', - channel: 'sources', - properties: { - timestamp: '2023-01-23T00:29:12.117+05:30', - }, - sentAt: '2022-12-23T00:29:12.117+05:30', - timestamp: '2023-01-23T00:29:12.117+05:30', - type: 'track', - userId: '2564871', - }, - metadata: { - sourceId: '27O0bmEEx3GgfmEhZHUcPwJQVWC', - workspaceId: '27O0bhB6p5ehfOWeeZlOSsSDTLg', - namespace: '', - instanceId: '1', - sourceType: 'HTTP', - sourceCategory: '', - trackingPlanId: '', - trackingPlanVersion: 0, - sourceTpConfig: {}, - mergedTpConfig: {}, - destinationId: '2JH9GMQf2YFJFaTw7rz1pxHAJPx', - jobRunId: '', - jobId: 1, - sourceBatchId: '', - sourceJobId: '', - sourceJobRunId: '', - sourceTaskId: '', - sourceTaskRunId: '', - recordId: {}, - destinationType: 'WEBHOOK', - messageId: 'e3a51e9a-6313-4389-ae73-07e487c8d9d0', - oauthAccessToken: '', - messageIds: [], - rudderId: '<<>>2073230<<>>2564871', - receivedAt: '2022-12-23T00:29:10.189+05:30', - eventName: 'Test', - eventType: 'track', - sourceDefinitionId: '1b6gJdqOPOCadT3cddw8eidV591', - destinationDefinitionId: '', - transformationId: '', - }, - destination: { - ID: 'string', - Name: 'string', - DestinationDefinition: { - ID: 'defid1', - Name: 'INTERCOM', - DisplayName: 'intercom', - Config: {}, - }, - Config: {}, - Enabled: true, - WorkspaceID: 'wspId', - Transformations: [], - }, - }, - ], - inputEvents: [ - { - message: { - anonymousId: '2073230', - event: 'Test', - messageId: 'e3a51e9a-6313-4389-ae73-07e487c8d9d0', - originalTimestamp: '2022-12-23T00:29:12.117+05:30', - channel: 'sources', - properties: { - timestamp: '2023-01-23T00:29:12.117+05:30', - }, - sentAt: '2022-12-23T00:29:12.117+05:30', - timestamp: '2022-12-23T00:29:10.188+05:30', - type: 'track', - userId: '2564871', - }, - metadata: { - sourceId: '27O0bmEEx3GgfmEhZHUcPwJQVWC', - workspaceId: '27O0bhB6p5ehfOWeeZlOSsSDTLg', - namespace: '', - instanceId: '1', - sourceType: 'HTTP', - sourceCategory: '', - trackingPlanId: '', - trackingPlanVersion: 0, - sourceTpConfig: {}, - mergedTpConfig: {}, - destinationId: '2JH9GMQf2YFJFaTw7rz1pxHAJPx', - jobRunId: '', - jobId: 1, - sourceBatchId: '', - sourceJobId: '', - sourceJobRunId: '', - sourceTaskId: '', - sourceTaskRunId: '', - recordId: {}, - destinationType: 'WEBHOOK', - messageId: 'e3a51e9a-6313-4389-ae73-07e487c8d9d0', - oauthAccessToken: '', - messageIds: [], - rudderId: '<<>>2073230<<>>2564871', - receivedAt: '2022-12-23T00:29:10.189+05:30', - eventName: 'Test', - eventType: 'track', - sourceDefinitionId: '1b6gJdqOPOCadT3cddw8eidV591', - destinationDefinitionId: '', - transformationId: '', - }, - destination: { - ID: 'string', - Name: 'string', - DestinationDefinition: { - ID: 'defid1', - Name: 'INTERCOM', - DisplayName: 'intercom', - Config: {}, - }, - Config: {}, - Enabled: true, - WorkspaceID: 'wspId', - Transformations: [], - }, - }, - ], - }, - { - caseName: - 'when events(all track) without properties.timestamp, timestamp should be taken from timestamp', - expectedOutputEvents: [ - { - message: { - anonymousId: '2073230', - event: 'Test', - messageId: 'e3a51e9a-6313-4389-ae73-07e487c8d9d0', - originalTimestamp: '2022-12-23T00:29:12.117+05:30', - channel: 'sources', - properties: { - someTime: '2023-01-23T00:29:12.117+05:30', - }, - sentAt: '2022-12-23T00:29:12.117+05:30', - timestamp: '2022-11-22T00:29:10.188+05:30', - type: 'track', - userId: '2564871', - }, - metadata: { - sourceId: '27O0bmEEx3GgfmEhZHUcPwJQVWC', - workspaceId: '27O0bhB6p5ehfOWeeZlOSsSDTLg', - namespace: '', - instanceId: '1', - sourceType: 'HTTP', - sourceCategory: '', - trackingPlanId: '', - trackingPlanVersion: 0, - sourceTpConfig: {}, - mergedTpConfig: {}, - destinationId: '2JH9GMQf2YFJFaTw7rz1pxHAJPx', - jobRunId: '', - jobId: 1, - sourceBatchId: '', - sourceJobId: '', - sourceJobRunId: '', - sourceTaskId: '', - sourceTaskRunId: '', - recordId: {}, - destinationType: 'WEBHOOK', - messageId: 'e3a51e9a-6313-4389-ae73-07e487c8d9d0', - oauthAccessToken: '', - messageIds: [], - rudderId: '<<>>2073230<<>>2564871', - receivedAt: '2022-12-23T00:29:10.189+05:30', - eventName: 'Test', - eventType: 'track', - sourceDefinitionId: '1b6gJdqOPOCadT3cddw8eidV591', - destinationDefinitionId: '', - transformationId: '', - }, - destination: { - ID: 'string', - Name: 'string', - DestinationDefinition: { - ID: 'defid1', - Name: 'INTERCOM', - DisplayName: 'intercom', - Config: {}, - }, - Config: {}, - Enabled: true, - WorkspaceID: 'wspId', - Transformations: [], - }, - }, - ], - inputEvents: [ - { - message: { - anonymousId: '2073230', - event: 'Test', - messageId: 'e3a51e9a-6313-4389-ae73-07e487c8d9d0', - originalTimestamp: '2022-12-23T00:29:12.117+05:30', - channel: 'sources', - properties: { - someTime: '2023-01-23T00:29:12.117+05:30', - }, - sentAt: '2022-12-23T00:29:12.117+05:30', - timestamp: '2022-11-22T00:29:10.188+05:30', - type: 'track', - userId: '2564871', - }, - metadata: { - sourceId: '27O0bmEEx3GgfmEhZHUcPwJQVWC', - workspaceId: '27O0bhB6p5ehfOWeeZlOSsSDTLg', - namespace: '', - instanceId: '1', - sourceType: 'HTTP', - sourceCategory: '', - trackingPlanId: '', - trackingPlanVersion: 0, - sourceTpConfig: {}, - mergedTpConfig: {}, - destinationId: '2JH9GMQf2YFJFaTw7rz1pxHAJPx', - jobRunId: '', - jobId: 1, - sourceBatchId: '', - sourceJobId: '', - sourceJobRunId: '', - sourceTaskId: '', - sourceTaskRunId: '', - recordId: {}, - destinationType: 'WEBHOOK', - messageId: 'e3a51e9a-6313-4389-ae73-07e487c8d9d0', - oauthAccessToken: '', - messageIds: [], - rudderId: '<<>>2073230<<>>2564871', - receivedAt: '2022-12-23T00:29:10.189+05:30', - eventName: 'Test', - eventType: 'track', - sourceDefinitionId: '1b6gJdqOPOCadT3cddw8eidV591', - destinationDefinitionId: '', - transformationId: '', - }, - destination: { - ID: 'string', - Name: 'string', - DestinationDefinition: { - ID: 'defid1', - Name: 'INTERCOM', - DisplayName: 'intercom', - Config: {}, - }, - Config: {}, - Enabled: true, - WorkspaceID: 'wspId', - Transformations: [], - }, - }, - ], - }, - { - caseName: - 'when events(all identify) without context.timestamp, timestamp should be taken from timestamp', - expectedOutputEvents: [ - { - message: { - anonymousId: '2073230', - event: 'Test', - messageId: 'e3a51e9a-6313-4389-ae73-07e487c8d9d0', - originalTimestamp: '2022-12-23T00:29:12.117+05:30', - channel: 'sources', - context: { - timestamp: '2023-01-12T00:29:12.117+05:30', - }, - sentAt: '2022-12-23T00:29:12.117+05:30', - timestamp: '2023-01-12T00:29:12.117+05:30', - type: 'identify', - userId: '2564871', - }, - metadata: { - sourceId: '27O0bmEEx3GgfmEhZHUcPwJQVWC', - workspaceId: '27O0bhB6p5ehfOWeeZlOSsSDTLg', - namespace: '', - instanceId: '1', - sourceType: 'HTTP', - sourceCategory: '', - trackingPlanId: '', - trackingPlanVersion: 0, - sourceTpConfig: {}, - mergedTpConfig: {}, - destinationId: '2JH9GMQf2YFJFaTw7rz1pxHAJPx', - jobRunId: '', - jobId: 1, - sourceBatchId: '', - sourceJobId: '', - sourceJobRunId: '', - sourceTaskId: '', - sourceTaskRunId: '', - recordId: {}, - destinationType: 'WEBHOOK', - messageId: 'e3a51e9a-6313-4389-ae73-07e487c8d9d0', - oauthAccessToken: '', - messageIds: [], - rudderId: '<<>>2073230<<>>2564871', - receivedAt: '2022-12-23T00:29:10.189+05:30', - eventName: 'Test', - eventType: 'track', - sourceDefinitionId: '1b6gJdqOPOCadT3cddw8eidV591', - destinationDefinitionId: '', - transformationId: '', - }, - destination: { - ID: 'string', - Name: 'string', - DestinationDefinition: { - ID: 'defid1', - Name: 'INTERCOM', - DisplayName: 'intercom', - Config: {}, - }, - Config: {}, - Enabled: true, - WorkspaceID: 'wspId', - Transformations: [], - }, - }, - ], - inputEvents: [ - { - message: { - anonymousId: '2073230', - event: 'Test', - messageId: 'e3a51e9a-6313-4389-ae73-07e487c8d9d0', - originalTimestamp: '2022-12-23T00:29:12.117+05:30', - channel: 'sources', - context: { - timestamp: '2023-01-12T00:29:12.117+05:30', - }, - sentAt: '2022-12-23T00:29:12.117+05:30', - timestamp: '2022-11-22T00:29:10.188+05:30', - type: 'identify', - userId: '2564871', - }, - metadata: { - sourceId: '27O0bmEEx3GgfmEhZHUcPwJQVWC', - workspaceId: '27O0bhB6p5ehfOWeeZlOSsSDTLg', - namespace: '', - instanceId: '1', - sourceType: 'HTTP', - sourceCategory: '', - trackingPlanId: '', - trackingPlanVersion: 0, - sourceTpConfig: {}, - mergedTpConfig: {}, - destinationId: '2JH9GMQf2YFJFaTw7rz1pxHAJPx', - jobRunId: '', - jobId: 1, - sourceBatchId: '', - sourceJobId: '', - sourceJobRunId: '', - sourceTaskId: '', - sourceTaskRunId: '', - recordId: {}, - destinationType: 'WEBHOOK', - messageId: 'e3a51e9a-6313-4389-ae73-07e487c8d9d0', - oauthAccessToken: '', - messageIds: [], - rudderId: '<<>>2073230<<>>2564871', - receivedAt: '2022-12-23T00:29:10.189+05:30', - eventName: 'Test', - eventType: 'track', - sourceDefinitionId: '1b6gJdqOPOCadT3cddw8eidV591', - destinationDefinitionId: '', - transformationId: '', - }, - destination: { - ID: 'string', - Name: 'string', - DestinationDefinition: { - ID: 'defid1', - Name: 'INTERCOM', - DisplayName: 'intercom', - Config: {}, - }, - Config: {}, - Enabled: true, - WorkspaceID: 'wspId', - Transformations: [], - }, - }, - ], - }, - { - caseName: - 'when proc events(identify, track, group) are mixed, timestamp should be taken from relevant places for identify & track, skipped for group', - expectedOutputEvents: [ - { - message: { - anonymousId: '2073230', - event: 'Test', - messageId: 'e3a51e9a-6313-4389-ae73-07e487c8d9d0', - originalTimestamp: '2022-12-23T00:29:12.117+05:30', - channel: 'sources', - context: { - traits: { - timestamp: '2023-01-22T00:29:12.117+05:30', - }, - }, - sentAt: '2022-12-23T00:29:12.117+05:30', - timestamp: '2023-01-22T00:29:12.117+05:30', - type: 'identify', - userId: '2564871', - }, - metadata: { - sourceId: '27O0bmEEx3GgfmEhZHUcPwJQVWC', - workspaceId: '27O0bhB6p5ehfOWeeZlOSsSDTLg', - namespace: '', - instanceId: '1', - sourceType: 'HTTP', - sourceCategory: '', - trackingPlanId: '', - trackingPlanVersion: 0, - sourceTpConfig: {}, - mergedTpConfig: {}, - destinationId: '2JH9GMQf2YFJFaTw7rz1pxHAJPx', - jobRunId: '', - jobId: 1, - sourceBatchId: '', - sourceJobId: '', - sourceJobRunId: '', - sourceTaskId: '', - sourceTaskRunId: '', - recordId: {}, - destinationType: 'WEBHOOK', - messageId: 'e3a51e9a-6313-4389-ae73-07e487c8d9d0', - oauthAccessToken: '', - messageIds: [], - rudderId: '<<>>2073230<<>>2564871', - receivedAt: '2022-12-23T00:29:10.189+05:30', - eventName: 'Test', - eventType: 'track', - sourceDefinitionId: '1b6gJdqOPOCadT3cddw8eidV591', - destinationDefinitionId: '', - transformationId: '', - }, - destination: { - ID: 'string', - Name: 'string', - DestinationDefinition: { - ID: 'defid1', - Name: 'INTERCOM', - DisplayName: 'intercom', - Config: {}, - }, - Config: {}, - Enabled: true, - WorkspaceID: 'wspId', - Transformations: [], - }, - }, - { - message: { - anonymousId: '2073231', - event: 'Test', - messageId: 'e3a51e9a-6313-4389-ae73-07e487c8d9d0', - originalTimestamp: '2022-12-23T00:29:12.117+05:30', - channel: 'sources', - traits: { - timestamp: '2023-01-11T00:29:12.117+05:30', - }, - sentAt: '2022-12-23T00:29:12.117+05:30', - timestamp: '2023-01-11T00:29:12.117+05:30', - type: 'identify', - userId: '2564871', - }, - metadata: { - sourceId: '27O0bmEEx3GgfmEhZHUcPwJQVWC', - workspaceId: '27O0bhB6p5ehfOWeeZlOSsSDTLg', - namespace: '', - instanceId: '1', - sourceType: 'HTTP', - sourceCategory: '', - trackingPlanId: '', - trackingPlanVersion: 0, - sourceTpConfig: {}, - mergedTpConfig: {}, - destinationId: '2JH9GMQf2YFJFaTw7rz1pxHAJPx', - jobRunId: '', - jobId: 1, - sourceBatchId: '', - sourceJobId: '', - sourceJobRunId: '', - sourceTaskId: '', - sourceTaskRunId: '', - recordId: {}, - destinationType: 'WEBHOOK', - messageId: 'e3a51e9a-6313-4389-ae73-07e487c8d9d0', - oauthAccessToken: '', - messageIds: [], - rudderId: '<<>>2073230<<>>2564871', - receivedAt: '2022-12-23T00:29:10.189+05:30', - eventName: 'Test', - eventType: 'track', - sourceDefinitionId: '1b6gJdqOPOCadT3cddw8eidV591', - destinationDefinitionId: '', - transformationId: '', - }, - destination: { - ID: 'string', - Name: 'string', - DestinationDefinition: { - ID: 'defid1', - Name: 'INTERCOM', - DisplayName: 'intercom', - Config: {}, - }, - Config: {}, - Enabled: true, - WorkspaceID: 'wspId', - Transformations: [], - }, - }, - { - message: { - anonymousId: '2073232', - event: 'Test', - messageId: 'e3a51e9a-6313-4389-ae73-07e487c8d9d0', - originalTimestamp: '2022-12-23T00:29:12.117+05:30', - channel: 'sources', - properties: { - timestamp: '2023-01-13T00:29:12.117+05:30', - }, - sentAt: '2022-12-23T00:29:12.117+05:30', - timestamp: '2023-01-13T00:29:12.117+05:30', - type: 'track', - userId: '2564871', - }, - metadata: { - sourceId: '27O0bmEEx3GgfmEhZHUcPwJQVWC', - workspaceId: '27O0bhB6p5ehfOWeeZlOSsSDTLg', - namespace: '', - instanceId: '1', - sourceType: 'HTTP', - sourceCategory: '', - trackingPlanId: '', - trackingPlanVersion: 0, - sourceTpConfig: {}, - mergedTpConfig: {}, - destinationId: '2JH9GMQf2YFJFaTw7rz1pxHAJPx', - jobRunId: '', - jobId: 1, - sourceBatchId: '', - sourceJobId: '', - sourceJobRunId: '', - sourceTaskId: '', - sourceTaskRunId: '', - recordId: {}, - destinationType: 'WEBHOOK', - messageId: 'e3a51e9a-6313-4389-ae73-07e487c8d9d0', - oauthAccessToken: '', - messageIds: [], - rudderId: '<<>>2073230<<>>2564871', - receivedAt: '2022-12-23T00:29:10.189+05:30', - eventName: 'Test', - eventType: 'track', - sourceDefinitionId: '1b6gJdqOPOCadT3cddw8eidV591', - destinationDefinitionId: '', - transformationId: '', - }, - destination: { - ID: 'string', - Name: 'string', - DestinationDefinition: { - ID: 'defid1', - Name: 'INTERCOM', - DisplayName: 'intercom', - Config: {}, - }, - Config: {}, - Enabled: true, - WorkspaceID: 'wspId', - Transformations: [], - }, - }, - { - message: { - anonymousId: '2073232', - event: 'Test', - messageId: 'e3a51e9a-6313-4389-ae73-07e487c8d9d0', - originalTimestamp: '2022-12-23T00:29:12.117+05:30', - channel: 'sources', - properties: { - timestamp: '2023-01-13T00:29:12.117+05:30', - }, - sentAt: '2022-12-23T00:29:12.117+05:30', - timestamp: '2022-11-22T00:29:10.188+05:30', - type: 'group', - userId: '2564871', - }, - metadata: { - sourceId: '27O0bmEEx3GgfmEhZHUcPwJQVWC', - workspaceId: '27O0bhB6p5ehfOWeeZlOSsSDTLg', - namespace: '', - instanceId: '1', - sourceType: 'HTTP', - sourceCategory: '', - trackingPlanId: '', - trackingPlanVersion: 0, - sourceTpConfig: {}, - mergedTpConfig: {}, - destinationId: '2JH9GMQf2YFJFaTw7rz1pxHAJPx', - jobRunId: '', - jobId: 1, - sourceBatchId: '', - sourceJobId: '', - sourceJobRunId: '', - sourceTaskId: '', - sourceTaskRunId: '', - recordId: {}, - destinationType: 'WEBHOOK', - messageId: 'e3a51e9a-6313-4389-ae73-07e487c8d9d0', - oauthAccessToken: '', - messageIds: [], - rudderId: '<<>>2073230<<>>2564871', - receivedAt: '2022-12-23T00:29:10.189+05:30', - eventName: 'Test', - eventType: 'track', - sourceDefinitionId: '1b6gJdqOPOCadT3cddw8eidV591', - destinationDefinitionId: '', - transformationId: '', - }, - destination: { - ID: 'string', - Name: 'string', - DestinationDefinition: { - ID: 'defid1', - Name: 'INTERCOM', - DisplayName: 'intercom', - Config: {}, - }, - Config: {}, - Enabled: true, - WorkspaceID: 'wspId', - Transformations: [], - }, - }, - ], - inputEvents: [ - { - message: { - anonymousId: '2073230', - event: 'Test', - messageId: 'e3a51e9a-6313-4389-ae73-07e487c8d9d0', - originalTimestamp: '2022-12-23T00:29:12.117+05:30', - channel: 'sources', - context: { - traits: { - timestamp: '2023-01-22T00:29:12.117+05:30', - }, - }, - sentAt: '2022-12-23T00:29:12.117+05:30', - timestamp: '2022-11-22T00:29:10.188+05:30', - type: 'identify', - userId: '2564871', - }, - metadata: { - sourceId: '27O0bmEEx3GgfmEhZHUcPwJQVWC', - workspaceId: '27O0bhB6p5ehfOWeeZlOSsSDTLg', - namespace: '', - instanceId: '1', - sourceType: 'HTTP', - sourceCategory: '', - trackingPlanId: '', - trackingPlanVersion: 0, - sourceTpConfig: {}, - mergedTpConfig: {}, - destinationId: '2JH9GMQf2YFJFaTw7rz1pxHAJPx', - jobRunId: '', - jobId: 1, - sourceBatchId: '', - sourceJobId: '', - sourceJobRunId: '', - sourceTaskId: '', - sourceTaskRunId: '', - recordId: {}, - destinationType: 'WEBHOOK', - messageId: 'e3a51e9a-6313-4389-ae73-07e487c8d9d0', - oauthAccessToken: '', - messageIds: [], - rudderId: '<<>>2073230<<>>2564871', - receivedAt: '2022-12-23T00:29:10.189+05:30', - eventName: 'Test', - eventType: 'track', - sourceDefinitionId: '1b6gJdqOPOCadT3cddw8eidV591', - destinationDefinitionId: '', - transformationId: '', - }, - destination: { - ID: 'string', - Name: 'string', - DestinationDefinition: { - ID: 'defid1', - Name: 'INTERCOM', - DisplayName: 'intercom', - Config: {}, - }, - Config: {}, - Enabled: true, - WorkspaceID: 'wspId', - Transformations: [], - }, - }, - { - message: { - anonymousId: '2073231', - event: 'Test', - messageId: 'e3a51e9a-6313-4389-ae73-07e487c8d9d0', - originalTimestamp: '2022-12-23T00:29:12.117+05:30', - channel: 'sources', - traits: { - timestamp: '2023-01-11T00:29:12.117+05:30', - }, - sentAt: '2022-12-23T00:29:12.117+05:30', - timestamp: '2022-11-22T00:29:10.188+05:30', - type: 'identify', - userId: '2564871', - }, - metadata: { - sourceId: '27O0bmEEx3GgfmEhZHUcPwJQVWC', - workspaceId: '27O0bhB6p5ehfOWeeZlOSsSDTLg', - namespace: '', - instanceId: '1', - sourceType: 'HTTP', - sourceCategory: '', - trackingPlanId: '', - trackingPlanVersion: 0, - sourceTpConfig: {}, - mergedTpConfig: {}, - destinationId: '2JH9GMQf2YFJFaTw7rz1pxHAJPx', - jobRunId: '', - jobId: 1, - sourceBatchId: '', - sourceJobId: '', - sourceJobRunId: '', - sourceTaskId: '', - sourceTaskRunId: '', - recordId: {}, - destinationType: 'WEBHOOK', - messageId: 'e3a51e9a-6313-4389-ae73-07e487c8d9d0', - oauthAccessToken: '', - messageIds: [], - rudderId: '<<>>2073230<<>>2564871', - receivedAt: '2022-12-23T00:29:10.189+05:30', - eventName: 'Test', - eventType: 'track', - sourceDefinitionId: '1b6gJdqOPOCadT3cddw8eidV591', - destinationDefinitionId: '', - transformationId: '', - }, - destination: { - ID: 'string', - Name: 'string', - DestinationDefinition: { - ID: 'defid1', - Name: 'INTERCOM', - DisplayName: 'intercom', - Config: {}, - }, - Config: {}, - Enabled: true, - WorkspaceID: 'wspId', - Transformations: [], - }, - }, - { - message: { - anonymousId: '2073232', - event: 'Test', - messageId: 'e3a51e9a-6313-4389-ae73-07e487c8d9d0', - originalTimestamp: '2022-12-23T00:29:12.117+05:30', - channel: 'sources', - properties: { - timestamp: '2023-01-13T00:29:12.117+05:30', - }, - sentAt: '2022-12-23T00:29:12.117+05:30', - timestamp: '2022-11-22T00:29:10.188+05:30', - type: 'track', - userId: '2564871', - }, - metadata: { - sourceId: '27O0bmEEx3GgfmEhZHUcPwJQVWC', - workspaceId: '27O0bhB6p5ehfOWeeZlOSsSDTLg', - namespace: '', - instanceId: '1', - sourceType: 'HTTP', - sourceCategory: '', - trackingPlanId: '', - trackingPlanVersion: 0, - sourceTpConfig: {}, - mergedTpConfig: {}, - destinationId: '2JH9GMQf2YFJFaTw7rz1pxHAJPx', - jobRunId: '', - jobId: 1, - sourceBatchId: '', - sourceJobId: '', - sourceJobRunId: '', - sourceTaskId: '', - sourceTaskRunId: '', - recordId: {}, - destinationType: 'WEBHOOK', - messageId: 'e3a51e9a-6313-4389-ae73-07e487c8d9d0', - oauthAccessToken: '', - messageIds: [], - rudderId: '<<>>2073230<<>>2564871', - receivedAt: '2022-12-23T00:29:10.189+05:30', - eventName: 'Test', - eventType: 'track', - sourceDefinitionId: '1b6gJdqOPOCadT3cddw8eidV591', - destinationDefinitionId: '', - transformationId: '', - }, - destination: { - ID: 'string', - Name: 'string', - DestinationDefinition: { - ID: 'defid1', - Name: 'INTERCOM', - DisplayName: 'intercom', - Config: {}, - }, - Config: {}, - Enabled: true, - WorkspaceID: 'wspId', - Transformations: [], - }, - }, - { - message: { - anonymousId: '2073232', - event: 'Test', - messageId: 'e3a51e9a-6313-4389-ae73-07e487c8d9d0', - originalTimestamp: '2022-12-23T00:29:12.117+05:30', - channel: 'sources', - properties: { - timestamp: '2023-01-13T00:29:12.117+05:30', - }, - sentAt: '2022-12-23T00:29:12.117+05:30', - timestamp: '2022-11-22T00:29:10.188+05:30', - type: 'group', - userId: '2564871', - }, - metadata: { - sourceId: '27O0bmEEx3GgfmEhZHUcPwJQVWC', - workspaceId: '27O0bhB6p5ehfOWeeZlOSsSDTLg', - namespace: '', - instanceId: '1', - sourceType: 'HTTP', - sourceCategory: '', - trackingPlanId: '', - trackingPlanVersion: 0, - sourceTpConfig: {}, - mergedTpConfig: {}, - destinationId: '2JH9GMQf2YFJFaTw7rz1pxHAJPx', - jobRunId: '', - jobId: 1, - sourceBatchId: '', - sourceJobId: '', - sourceJobRunId: '', - sourceTaskId: '', - sourceTaskRunId: '', - recordId: {}, - destinationType: 'WEBHOOK', - messageId: 'e3a51e9a-6313-4389-ae73-07e487c8d9d0', - oauthAccessToken: '', - messageIds: [], - rudderId: '<<>>2073230<<>>2564871', - receivedAt: '2022-12-23T00:29:10.189+05:30', - eventName: 'Test', - eventType: 'track', - sourceDefinitionId: '1b6gJdqOPOCadT3cddw8eidV591', - destinationDefinitionId: '', - transformationId: '', - }, - destination: { - ID: 'string', - Name: 'string', - DestinationDefinition: { - ID: 'defid1', - Name: 'INTERCOM', - DisplayName: 'intercom', - Config: {}, - }, - Config: {}, - Enabled: true, - WorkspaceID: 'wspId', - Transformations: [], - }, - }, - ], - }, - { - caseName: - 'when a mix of VDM enabled & non-VDM destinations are available, the timestamp will be applied to only non-VDM destination', - expectedOutputEvents: [ - { - message: { - anonymousId: '2073230', - event: 'Test', - messageId: 'e3a51e9a-6313-4389-ae73-07e487c8d9d0', - originalTimestamp: '2022-12-23T00:29:12.117+05:30', - channel: 'sources', - context: { - traits: { - timestamp: '2023-01-22T00:29:12.117+05:30', - }, - mappedToDestination: true, - }, - sentAt: '2022-12-23T00:29:12.117+05:30', - timestamp: '2022-11-22T00:29:10.188+05:30', - type: 'identify', - userId: '2564871', - }, - metadata: { - sourceId: '27O0bmEEx3GgfmEhZHUcPwJQVWC', - workspaceId: '27O0bhB6p5ehfOWeeZlOSsSDTLg', - namespace: '', - instanceId: '1', - sourceType: 'HTTP', - sourceCategory: '', - trackingPlanId: '', - trackingPlanVersion: 0, - sourceTpConfig: {}, - mergedTpConfig: {}, - destinationId: '2JH9GMQf2YFJFaTw7rz1pxHAJPx', - jobRunId: '', - jobId: 1, - sourceBatchId: '', - sourceJobId: '', - sourceJobRunId: '', - sourceTaskId: '', - sourceTaskRunId: '', - recordId: {}, - destinationType: 'WEBHOOK', - messageId: 'e3a51e9a-6313-4389-ae73-07e487c8d9d0', - oauthAccessToken: '', - messageIds: [], - rudderId: '<<>>2073230<<>>2564871', - receivedAt: '2022-12-23T00:29:10.189+05:30', - eventName: 'Test', - eventType: 'track', - sourceDefinitionId: '1b6gJdqOPOCadT3cddw8eidV591', - destinationDefinitionId: '', - transformationId: '', - }, - destination: { - ID: 'string', - Name: 'string', - DestinationDefinition: { - ID: 'defid1', - Name: 'INTERCOM', - DisplayName: 'intercom', - Config: {}, - }, - Config: {}, - Enabled: true, - WorkspaceID: 'wspId', - Transformations: [], - }, - }, - { - message: { - anonymousId: '2073231', - event: 'Test', - messageId: 'e3a51e9a-6313-4389-ae73-07e487c8d9d0', - originalTimestamp: '2022-12-23T00:29:12.117+05:30', - channel: 'sources', - traits: { - timestamp: '2023-01-11T00:29:12.117+05:30', - }, - sentAt: '2022-12-23T00:29:12.117+05:30', - timestamp: '2023-01-11T00:29:12.117+05:30', - type: 'identify', - userId: '2564871', - }, - metadata: { - sourceId: '27O0bmEEx3GgfmEhZHUcPwJQVWC', - workspaceId: '27O0bhB6p5ehfOWeeZlOSsSDTLg', - namespace: '', - instanceId: '1', - sourceType: 'HTTP', - sourceCategory: '', - trackingPlanId: '', - trackingPlanVersion: 0, - sourceTpConfig: {}, - mergedTpConfig: {}, - destinationId: '2JH9GMQf2YFJFaTw7rz1pxHAJPy', - jobRunId: '', - jobId: 1, - sourceBatchId: '', - sourceJobId: '', - sourceJobRunId: '', - sourceTaskId: '', - sourceTaskRunId: '', - recordId: {}, - destinationType: 'WEBHOOK', - messageId: 'e3a51e9a-6313-4389-ae73-07e487c8d9d0', - oauthAccessToken: '', - messageIds: [], - rudderId: '<<>>2073230<<>>2564871', - receivedAt: '2022-12-23T00:29:10.189+05:30', - eventName: 'Test', - eventType: 'track', - sourceDefinitionId: '1b6gJdqOPOCadT3cddw8eidV591', - destinationDefinitionId: '', - transformationId: '', - }, - destination: { - ID: 'string-2', - Name: 'string', - DestinationDefinition: { - ID: 'defid1', - Name: 'INTERCOM', - DisplayName: 'intercom', - Config: {}, - }, - Config: {}, - Enabled: true, - WorkspaceID: 'wspId', - Transformations: [], - }, - }, - { - message: { - anonymousId: '2073232', - event: 'Test', - messageId: 'e3a51e9a-6313-4389-ae73-07e487c8d9d0', - originalTimestamp: '2022-12-23T00:29:12.117+05:30', - channel: 'sources', - context: { - mappedToDestination: true, - }, - properties: { - timestamp: '2023-01-13T00:29:12.117+05:30', - }, - sentAt: '2022-12-23T00:29:12.117+05:30', - timestamp: '2022-11-22T00:29:10.188+05:30', - type: 'track', - userId: '2564871', - }, - metadata: { - sourceId: '27O0bmEEx3GgfmEhZHUcPwJQVWC', - workspaceId: '27O0bhB6p5ehfOWeeZlOSsSDTLg', - namespace: '', - instanceId: '1', - sourceType: 'HTTP', - sourceCategory: '', - trackingPlanId: '', - trackingPlanVersion: 0, - sourceTpConfig: {}, - mergedTpConfig: {}, - destinationId: '2JH9GMQf2YFJFaTw7rz1pxHAJPx', - jobRunId: '', - jobId: 1, - sourceBatchId: '', - sourceJobId: '', - sourceJobRunId: '', - sourceTaskId: '', - sourceTaskRunId: '', - recordId: {}, - destinationType: 'WEBHOOK', - messageId: 'e3a51e9a-6313-4389-ae73-07e487c8d9d0', - oauthAccessToken: '', - messageIds: [], - rudderId: '<<>>2073230<<>>2564871', - receivedAt: '2022-12-23T00:29:10.189+05:30', - eventName: 'Test', - eventType: 'track', - sourceDefinitionId: '1b6gJdqOPOCadT3cddw8eidV591', - destinationDefinitionId: '', - transformationId: '', - }, - destination: { - ID: 'string', - Name: 'string', - DestinationDefinition: { - ID: 'defid1', - Name: 'INTERCOM', - DisplayName: 'intercom', - Config: {}, - }, - Config: {}, - Enabled: true, - WorkspaceID: 'wspId', - Transformations: [], - }, - }, - { - message: { - anonymousId: '2073232', - event: 'Test', - context: { - mappedToDestination: true, - }, - messageId: 'e3a51e9a-6313-4389-ae73-07e487c8d9d0', - originalTimestamp: '2022-12-23T00:29:12.117+05:30', - channel: 'sources', - properties: { - timestamp: '2023-01-13T00:29:12.117+05:30', - }, - sentAt: '2022-12-23T00:29:12.117+05:30', - timestamp: '2022-11-22T00:29:10.188+05:30', - type: 'group', - userId: '2564871', - }, - metadata: { - sourceId: '27O0bmEEx3GgfmEhZHUcPwJQVWC', - workspaceId: '27O0bhB6p5ehfOWeeZlOSsSDTLg', - namespace: '', - instanceId: '1', - sourceType: 'HTTP', - sourceCategory: '', - trackingPlanId: '', - trackingPlanVersion: 0, - sourceTpConfig: {}, - mergedTpConfig: {}, - destinationId: '2JH9GMQf2YFJFaTw7rz1pxHAJPx', - jobRunId: '', - jobId: 1, - sourceBatchId: '', - sourceJobId: '', - sourceJobRunId: '', - sourceTaskId: '', - sourceTaskRunId: '', - recordId: {}, - destinationType: 'WEBHOOK', - messageId: 'e3a51e9a-6313-4389-ae73-07e487c8d9d0', - oauthAccessToken: '', - messageIds: [], - rudderId: '<<>>2073230<<>>2564871', - receivedAt: '2022-12-23T00:29:10.189+05:30', - eventName: 'Test', - eventType: 'track', - sourceDefinitionId: '1b6gJdqOPOCadT3cddw8eidV591', - destinationDefinitionId: '', - transformationId: '', - }, - destination: { - ID: 'string', - Name: 'string', - DestinationDefinition: { - ID: 'defid1', - Name: 'INTERCOM', - DisplayName: 'intercom', - Config: {}, - }, - Config: {}, - Enabled: true, - WorkspaceID: 'wspId', - Transformations: [], - }, - }, - ], - inputEvents: [ - { - message: { - anonymousId: '2073230', - event: 'Test', - messageId: 'e3a51e9a-6313-4389-ae73-07e487c8d9d0', - originalTimestamp: '2022-12-23T00:29:12.117+05:30', - channel: 'sources', - context: { - traits: { - timestamp: '2023-01-22T00:29:12.117+05:30', - }, - mappedToDestination: true, - }, - sentAt: '2022-12-23T00:29:12.117+05:30', - timestamp: '2022-11-22T00:29:10.188+05:30', - type: 'identify', - userId: '2564871', - }, - metadata: { - sourceId: '27O0bmEEx3GgfmEhZHUcPwJQVWC', - workspaceId: '27O0bhB6p5ehfOWeeZlOSsSDTLg', - namespace: '', - instanceId: '1', - sourceType: 'HTTP', - sourceCategory: '', - trackingPlanId: '', - trackingPlanVersion: 0, - sourceTpConfig: {}, - mergedTpConfig: {}, - destinationId: '2JH9GMQf2YFJFaTw7rz1pxHAJPx', - jobRunId: '', - jobId: 1, - sourceBatchId: '', - sourceJobId: '', - sourceJobRunId: '', - sourceTaskId: '', - sourceTaskRunId: '', - recordId: {}, - destinationType: 'WEBHOOK', - messageId: 'e3a51e9a-6313-4389-ae73-07e487c8d9d0', - oauthAccessToken: '', - messageIds: [], - rudderId: '<<>>2073230<<>>2564871', - receivedAt: '2022-12-23T00:29:10.189+05:30', - eventName: 'Test', - eventType: 'track', - sourceDefinitionId: '1b6gJdqOPOCadT3cddw8eidV591', - destinationDefinitionId: '', - transformationId: '', - }, - destination: { - ID: 'string', - Name: 'string', - DestinationDefinition: { - ID: 'defid1', - Name: 'INTERCOM', - DisplayName: 'intercom', - Config: {}, - }, - Config: {}, - Enabled: true, - WorkspaceID: 'wspId', - Transformations: [], - }, - }, - { - message: { - anonymousId: '2073231', - event: 'Test', - messageId: 'e3a51e9a-6313-4389-ae73-07e487c8d9d0', - originalTimestamp: '2022-12-23T00:29:12.117+05:30', - channel: 'sources', - traits: { - timestamp: '2023-01-11T00:29:12.117+05:30', - }, - sentAt: '2022-12-23T00:29:12.117+05:30', - timestamp: '2022-11-22T00:29:10.188+05:30', - type: 'identify', - userId: '2564871', - }, - metadata: { - sourceId: '27O0bmEEx3GgfmEhZHUcPwJQVWC', - workspaceId: '27O0bhB6p5ehfOWeeZlOSsSDTLg', - namespace: '', - instanceId: '1', - sourceType: 'HTTP', - sourceCategory: '', - trackingPlanId: '', - trackingPlanVersion: 0, - sourceTpConfig: {}, - mergedTpConfig: {}, - destinationId: '2JH9GMQf2YFJFaTw7rz1pxHAJPy', - jobRunId: '', - jobId: 1, - sourceBatchId: '', - sourceJobId: '', - sourceJobRunId: '', - sourceTaskId: '', - sourceTaskRunId: '', - recordId: {}, - destinationType: 'WEBHOOK', - messageId: 'e3a51e9a-6313-4389-ae73-07e487c8d9d0', - oauthAccessToken: '', - messageIds: [], - rudderId: '<<>>2073230<<>>2564871', - receivedAt: '2022-12-23T00:29:10.189+05:30', - eventName: 'Test', - eventType: 'track', - sourceDefinitionId: '1b6gJdqOPOCadT3cddw8eidV591', - destinationDefinitionId: '', - transformationId: '', - }, - destination: { - ID: 'string-2', - Name: 'string', - DestinationDefinition: { - ID: 'defid1', - Name: 'INTERCOM', - DisplayName: 'intercom', - Config: {}, - }, - Config: {}, - Enabled: true, - WorkspaceID: 'wspId', - Transformations: [], - }, - }, - { - message: { - anonymousId: '2073232', - event: 'Test', - messageId: 'e3a51e9a-6313-4389-ae73-07e487c8d9d0', - originalTimestamp: '2022-12-23T00:29:12.117+05:30', - channel: 'sources', - context: { - mappedToDestination: true, - }, - properties: { - timestamp: '2023-01-13T00:29:12.117+05:30', - }, - sentAt: '2022-12-23T00:29:12.117+05:30', - timestamp: '2022-11-22T00:29:10.188+05:30', - type: 'track', - userId: '2564871', - }, - metadata: { - sourceId: '27O0bmEEx3GgfmEhZHUcPwJQVWC', - workspaceId: '27O0bhB6p5ehfOWeeZlOSsSDTLg', - namespace: '', - instanceId: '1', - sourceType: 'HTTP', - sourceCategory: '', - trackingPlanId: '', - trackingPlanVersion: 0, - sourceTpConfig: {}, - mergedTpConfig: {}, - destinationId: '2JH9GMQf2YFJFaTw7rz1pxHAJPx', - jobRunId: '', - jobId: 1, - sourceBatchId: '', - sourceJobId: '', - sourceJobRunId: '', - sourceTaskId: '', - sourceTaskRunId: '', - recordId: {}, - destinationType: 'WEBHOOK', - messageId: 'e3a51e9a-6313-4389-ae73-07e487c8d9d0', - oauthAccessToken: '', - messageIds: [], - rudderId: '<<>>2073230<<>>2564871', - receivedAt: '2022-12-23T00:29:10.189+05:30', - eventName: 'Test', - eventType: 'track', - sourceDefinitionId: '1b6gJdqOPOCadT3cddw8eidV591', - destinationDefinitionId: '', - transformationId: '', - }, - destination: { - ID: 'string', - Name: 'string', - DestinationDefinition: { - ID: 'defid1', - Name: 'INTERCOM', - DisplayName: 'intercom', - Config: {}, - }, - Config: {}, - Enabled: true, - WorkspaceID: 'wspId', - Transformations: [], - }, - }, - { - message: { - anonymousId: '2073232', - event: 'Test', - messageId: 'e3a51e9a-6313-4389-ae73-07e487c8d9d0', - originalTimestamp: '2022-12-23T00:29:12.117+05:30', - channel: 'sources', - context: { - mappedToDestination: true, - }, - properties: { - timestamp: '2023-01-13T00:29:12.117+05:30', - }, - sentAt: '2022-12-23T00:29:12.117+05:30', - timestamp: '2022-11-22T00:29:10.188+05:30', - type: 'group', - userId: '2564871', - }, - metadata: { - sourceId: '27O0bmEEx3GgfmEhZHUcPwJQVWC', - workspaceId: '27O0bhB6p5ehfOWeeZlOSsSDTLg', - namespace: '', - instanceId: '1', - sourceType: 'HTTP', - sourceCategory: '', - trackingPlanId: '', - trackingPlanVersion: 0, - sourceTpConfig: {}, - mergedTpConfig: {}, - destinationId: '2JH9GMQf2YFJFaTw7rz1pxHAJPx', - jobRunId: '', - jobId: 1, - sourceBatchId: '', - sourceJobId: '', - sourceJobRunId: '', - sourceTaskId: '', - sourceTaskRunId: '', - recordId: {}, - destinationType: 'WEBHOOK', - messageId: 'e3a51e9a-6313-4389-ae73-07e487c8d9d0', - oauthAccessToken: '', - messageIds: [], - rudderId: '<<>>2073230<<>>2564871', - receivedAt: '2022-12-23T00:29:10.189+05:30', - eventName: 'Test', - eventType: 'track', - sourceDefinitionId: '1b6gJdqOPOCadT3cddw8eidV591', - destinationDefinitionId: '', - transformationId: '', - }, - destination: { - ID: 'string', - Name: 'string', - DestinationDefinition: { - ID: 'defid1', - Name: 'INTERCOM', - DisplayName: 'intercom', - Config: {}, - }, - Config: {}, - Enabled: true, - WorkspaceID: 'wspId', - Transformations: [], - }, - }, - ], - }, -]; - -describe('controller utility tests -- handleTimestampInEvents', () => { - test.each(timestampEventsCases)( - '$caseName', - ({ inputEvents, expectedOutputEvents: outputEvents }) => { - const actualEvents = ControllerUtility.handleTimestampInEvents(inputEvents); - expect(actualEvents).toStrictEqual(outputEvents); - }, - ); -}); From ff12d8ffddccbdac934c7cbac03730cd2593147f Mon Sep 17 00:00:00 2001 From: Sudip Paul <67197965+ItsSudip@users.noreply.github.com> Date: Wed, 17 Jan 2024 16:33:03 +0530 Subject: [PATCH 128/135] fix(slack): add support of blank space in handlebar (#2959) * fix(slack): add supprot of blank space in handlber * chore: added test cases description * update test case description --------- Co-authored-by: Anant Jain <62471433+anantjain45823@users.noreply.github.com> --- src/v0/destinations/slack/util.js | 4 +- .../destinations/slack/processor/data.ts | 4000 +++++++++-------- 2 files changed, 2021 insertions(+), 1983 deletions(-) diff --git a/src/v0/destinations/slack/util.js b/src/v0/destinations/slack/util.js index 658ffe4d37..f5d407018b 100644 --- a/src/v0/destinations/slack/util.js +++ b/src/v0/destinations/slack/util.js @@ -80,12 +80,12 @@ const buildDefaultTraitTemplate = (traitsList, traits, template) => { let generatedStringFromTemplate = template; // build template with whitelisted traits traitsList.forEach((trait) => { - generatedStringFromTemplate += `${trait}: {{${trait}}} `; + generatedStringFromTemplate += `${trait}: {{"${trait}"}} `; }); // else with all traits if (traitsList.length === 0) { Object.keys(traits).forEach((traitKey) => { - generatedStringFromTemplate += `${traitKey}: {{${traitKey}}} `; + generatedStringFromTemplate += `${traitKey}: {{"${traitKey}"}} `; }); } return generatedStringFromTemplate; diff --git a/test/integrations/destinations/slack/processor/data.ts b/test/integrations/destinations/slack/processor/data.ts index be05a13ab5..7deb555fa9 100644 --- a/test/integrations/destinations/slack/processor/data.ts +++ b/test/integrations/destinations/slack/processor/data.ts @@ -1,1982 +1,2020 @@ export const data = [ - { - "name": "slack", - "description": "Test 0", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "destination": { - "ID": "1ZQVSU9SXNg6KYgZALaqjAO3PIL", - "Name": "test-slack", - "DestinationDefinition": { - "ID": "1ZQUiJVMlmF7lfsdfXg7KXQnlLV", - "Name": "SLACK", - "DisplayName": "Slack", - "Config": { - "excludeKeys": [], - "includeKeys": [] - } - }, - "Config": { - "eventChannelSettings": [ - { - "eventChannelWebhook": "https://hooks.slack.com/services/example/test/demo", - "eventName": "is", - "eventRegex": true - } - ], - "eventTemplateSettings": [ - { - "eventName": "is", - "eventRegex": true, - "eventTemplate": "{{name}} performed {{event}} with {{properties.key1}} {{properties.key2}}" - }, - { - "eventName": "", - "eventRegex": false, - "eventTemplate": "" - } - ], - "webhookUrl": "https://hooks.slack.com/services/THZM86VSS/BV9HZ2UN6/demo", - "whitelistedTraitsSettings": [ - { - "trait": "hiji" - }, - { - "trait": "" - } - ] - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": true - }, - "message": { - "anonymousId": "4de817fb-7f8e-4e23-b9be-f6736dbda20f", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.1-rc.1" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.1-rc.1" - }, - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "page": { - "path": "/tests/html/script-test.html", - "referrer": "http://localhost:1111/tests/html/", - "search": "", - "title": "", - "url": "http://localhost:1111/tests/html/script-test.html" - }, - "screen": { - "density": 1.7999999523162842 - }, - "traits": { - "country": "India", - "email": "name@domain.com", - "hiji": "hulala", - "name": "my-name" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36" - }, - "integrations": { - "All": true - }, - "messageId": "9ecc0183-89ed-48bd-87eb-b2d8e1ca6780", - "originalTimestamp": "2020-03-23T03:46:30.916Z", - "properties": { - "path": "/tests/html/script-test.html", - "referrer": "http://localhost:1111/tests/html/", - "search": "", - "title": "", - "url": "http://localhost:1111/tests/html/script-test.html" - }, - "receivedAt": "2020-03-23T09:16:31.041+05:30", - "request_ip": "[::1]:52056", - "sentAt": "2020-03-23T03:46:30.916Z", - "timestamp": "2020-03-23T09:16:31.041+05:30", - "type": "identify", - "userId": "12345" - }, - "metadata": { - "anonymousId": "4de817fb-7f8e-4e23-b9be-f6736dbda20f", - "destinationId": "1ZQVSU9SXNg6KYgZALaqjAO3PIL", - "destinationType": "SLACK", - "jobId": 126, - "messageId": "9ecc0183-89ed-48bd-87eb-b2d8e1ca6780", - "sourceId": "1YhwKyDcKstudlGxkeN5p2wgsrp" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://hooks.slack.com/services/THZM86VSS/BV9HZ2UN6/demo", - "headers": { - "Content-Type": "application/x-www-form-urlencoded" - }, - "params": {}, - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": { - "payload": "{\"text\":\"Identified my-namehiji: hulala \",\"username\":\"RudderStack\",\"icon_url\":\"https://cdn.rudderlabs.com/rudderstack.png\"}" - } - }, - "files": {}, - "userId": "12345", - "statusCode": 200 - }, - "metadata": { - "anonymousId": "4de817fb-7f8e-4e23-b9be-f6736dbda20f", - "destinationId": "1ZQVSU9SXNg6KYgZALaqjAO3PIL", - "destinationType": "SLACK", - "jobId": 126, - "messageId": "9ecc0183-89ed-48bd-87eb-b2d8e1ca6780", - "sourceId": "1YhwKyDcKstudlGxkeN5p2wgsrp" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "slack", - "description": "Test 1", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "destination": { - "ID": "1ZQVSU9SXNg6KYgZALaqjAO3PIL", - "Name": "test-slack", - "DestinationDefinition": { - "ID": "1ZQUiJVMlmF7lfsdfXg7KXQnlLV", - "Name": "SLACK", - "DisplayName": "Slack", - "Config": { - "excludeKeys": [], - "includeKeys": [] - } - }, - "Config": { - "eventChannelSettings": [ - { - "eventChannelWebhook": "https://hooks.slack.com/services/example/test/demo", - "eventName": "is", - "eventRegex": true - } - ], - "eventTemplateSettings": [ - { - "eventName": "is", - "eventRegex": true, - "eventTemplate": "{{name}} performed {{event}} with {{properties.key1}} {{properties.key2}}" - }, - { - "eventName": "", - "eventRegex": false, - "eventTemplate": "" - } - ], - "identifyTemplate": "identified {{name}} with {{traits}}", - "webhookUrl": "https://hooks.slack.com/services/THZM86VSS/BV9HZ2UN6/demo", - "whitelistedTraitsSettings": [ - { - "trait": "hiji" - }, - { - "trait": "" - } - ], - "denyListOfEvents": [ - { - "eventName": "black_event" - } - ] - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": true - }, - "message": { - "anonymousId": "4de817fb-7f8e-4e23-b9be-f6736dbda20f", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.1-rc.1" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.1-rc.1" - }, - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "page": { - "path": "/tests/html/script-test.html", - "referrer": "http://localhost:1111/tests/html/", - "search": "", - "title": "", - "url": "http://localhost:1111/tests/html/script-test.html" - }, - "screen": { - "density": 1.7999999523162842 - }, - "traits": { - "country": "India", - "email": "name@domain.com", - "hiji": "hulala", - "name": "my-name" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36" - }, - "integrations": { - "All": true - }, - "messageId": "9ecc0183-89ed-48bd-87eb-b2d8e1ca6780", - "originalTimestamp": "2020-03-23T03:46:30.916Z", - "properties": { - "path": "/tests/html/script-test.html", - "referrer": "http://localhost:1111/tests/html/", - "search": "", - "title": "", - "url": "http://localhost:1111/tests/html/script-test.html" - }, - "receivedAt": "2020-03-23T09:16:31.041+05:30", - "request_ip": "[::1]:52056", - "sentAt": "2020-03-23T03:46:30.916Z", - "timestamp": "2020-03-23T09:16:31.041+05:30", - "type": "page", - "userId": "12345" - }, - "metadata": { - "anonymousId": "4de817fb-7f8e-4e23-b9be-f6736dbda20f", - "destinationId": "1ZQVSU9SXNg6KYgZALaqjAO3PIL", - "destinationType": "SLACK", - "jobId": 126, - "messageId": "9ecc0183-89ed-48bd-87eb-b2d8e1ca6780", - "sourceId": "1YhwKyDcKstudlGxkeN5p2wgsrp" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "metadata": { - "anonymousId": "4de817fb-7f8e-4e23-b9be-f6736dbda20f", - "destinationId": "1ZQVSU9SXNg6KYgZALaqjAO3PIL", - "destinationType": "SLACK", - "jobId": 126, - "messageId": "9ecc0183-89ed-48bd-87eb-b2d8e1ca6780", - "sourceId": "1YhwKyDcKstudlGxkeN5p2wgsrp" - }, - "statusCode": 400, - "error": "Event type page is not supported", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation", - "destType": "SLACK", - "module": "destination", - "implementation": "native", - "feature": "processor", - "destinationId": "1ZQVSU9SXNg6KYgZALaqjAO3PIL" - } - } - ] - } - } - }, - { - "name": "slack", - "description": "Test 2", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "destination": { - "ID": "1ZQVSU9SXNg6KYgZALaqjAO3PIL", - "Name": "test-slack", - "DestinationDefinition": { - "ID": "1ZQUiJVMlmF7lfsdfXg7KXQnlLV", - "Name": "SLACK", - "DisplayName": "Slack", - "Config": { - "excludeKeys": [], - "includeKeys": [] - } - }, - "Config": { - "eventChannelSettings": [ - { - "eventChannelWebhook": "https://hooks.slack.com/services/id1/id2/example", - "eventName": "is", - "eventRegex": true - } - ], - "eventTemplateSettings": [ - { - "eventName": "is", - "eventRegex": true, - "eventTemplate": "{{name}} performed {{event}} with {{properties.key1}} {{properties.key2}}" - }, - { - "eventName": "", - "eventRegex": false, - "eventTemplate": "" - } - ], - "identifyTemplate": "identified {{name}} with {{traits}}", - "webhookUrl": "https://hooks.slack.com/services/THZM86VSS/BV9HZ2UN6/demo", - "whitelistedTraitsSettings": [ - { - "trait": "hiji" - }, - { - "trait": "" - } - ] - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": true - }, - "message": { - "anonymousId": "12345", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.1-rc.1" - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.1-rc.1" - }, - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "page": { - "path": "", - "referrer": "", - "search": "", - "title": "", - "url": "" - }, - "screen": { - "density": 1.7999999523162842 - }, - "traits": { - "country": "India", - "email": "name@domain.com", - "hiji": "hulala", - "name": "my-name" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36" - }, - "traits": { - "country": "USA", - "email": "test@domain.com", - "hiji": "hulala-1", - "name": "my-name-1" - }, - "integrations": { - "All": true - }, - "messageId": "4aaecff2-a513-4bbf-9824-c471f4ac9777", - "originalTimestamp": "2020-03-23T03:41:46.122Z", - "receivedAt": "2020-03-23T09:11:46.244+05:30", - "request_ip": "[::1]:52055", - "sentAt": "2020-03-23T03:41:46.123Z", - "timestamp": "2020-03-23T09:11:46.243+05:30", - "type": "identify", - "userId": "12345" - }, - "metadata": { - "anonymousId": "12345", - "destinationId": "1ZQVSU9SXNg6KYgZALaqjAO3PIL", - "destinationType": "SLACK", - "jobId": 123, - "messageId": "4aaecff2-a513-4bbf-9824-c471f4ac9777", - "sourceId": "1YhwKyDcKstudlGxkeN5p2wgsrp" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://hooks.slack.com/services/THZM86VSS/BV9HZ2UN6/demo", - "headers": { - "Content-Type": "application/x-www-form-urlencoded" - }, - "params": {}, - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": { - "payload": "{\"text\":\"identified my-name-1 with hiji: hulala-1 \",\"username\":\"RudderStack\",\"icon_url\":\"https://cdn.rudderlabs.com/rudderstack.png\"}" - } - }, - "files": {}, - "userId": "12345", - "statusCode": 200 - }, - "metadata": { - "anonymousId": "12345", - "destinationId": "1ZQVSU9SXNg6KYgZALaqjAO3PIL", - "destinationType": "SLACK", - "jobId": 123, - "messageId": "4aaecff2-a513-4bbf-9824-c471f4ac9777", - "sourceId": "1YhwKyDcKstudlGxkeN5p2wgsrp" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "slack", - "description": "Test 3", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "destination": { - "ID": "1ZQVSU9SXNg6KYgZALaqjAO3PIL", - "Name": "test-slack", - "DestinationDefinition": { - "ID": "1ZQUiJVMlmF7lfsdfXg7KXQnlLV", - "Name": "SLACK", - "DisplayName": "Slack", - "Config": { - "excludeKeys": [], - "includeKeys": [] - } - }, - "Config": { - "incomingWebhooksType": "modern", - "eventChannelSettings": [ - { - "eventChannelWebhook": "https://hooks.slack.com/services/id1/id2/demo", - "eventName": "is", - "eventRegex": true - }, - { - "eventChannelWebhook": "https://hooks.slack.com/services/id1/id2/example+1", - "eventName": "is", - "eventRegex": true - } - ], - "eventTemplateSettings": [ - { - "eventName": "is", - "eventRegex": true, - "eventTemplate": "{{name}} performed {{event}} with {{properties.key1}} {{properties.key2}} and traits {{traitsList.hiji}}" - }, - { - "eventName": "", - "eventRegex": false, - "eventTemplate": "" - } - ], - "identifyTemplate": "identified {{name}} with {{traits}}", - "webhookUrl": "https://hooks.slack.com/services/THZM86VSS/BV9HZ2UN6/demo", - "whitelistedTraitsSettings": [ - { - "trait": "hiji" - }, - { - "trait": "" - } - ], - "denyListOfEvents": [ - { - "eventName": "black_event" - } - ] - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": true - }, - "message": { - "anonymousId": "00000000000000000000000000", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.1-rc.1" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.1-rc.1" - }, - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "page": { - "path": "/tests/html/script-test.html", - "referrer": "http://localhost:1111/tests/html/", - "search": "", - "title": "", - "url": "http://localhost:1111/tests/html/script-test.html" - }, - "screen": { - "density": 1.7999999523162842 - }, - "traits": { - "country": "India", - "email": "name@domain.com", - "hiji": "hulala", - "name": "my-name" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36" - }, - "event": "test_isent1", - "integrations": { - "All": true - }, - "messageId": "78102118-56ac-4c5a-a495-8cd7c8f71cc2", - "originalTimestamp": "2020-03-23T03:46:30.921Z", - "properties": { - "currency": "USD", - "key1": "test_val1", - "key2": "test_val2", - "revenue": 30, - "user_actual_id": 12345 - }, - "receivedAt": "2020-03-23T09:16:31.064+05:30", - "request_ip": "[::1]:52057", - "sentAt": "2020-03-23T03:46:30.921Z", - "timestamp": "2020-03-23T09:16:31.064+05:30", - "type": "track", - "userId": "12345" - }, - "metadata": { - "anonymousId": "00000000000000000000000000", - "destinationId": "1ZQVSU9SXNg6KYgZALaqjAO3PIL", - "destinationType": "SLACK", - "jobId": 128, - "messageId": "78102118-56ac-4c5a-a495-8cd7c8f71cc2", - "sourceId": "1YhwKyDcKstudlGxkeN5p2wgsrp" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://hooks.slack.com/services/id1/id2/demo", - "headers": { - "Content-Type": "application/x-www-form-urlencoded" - }, - "params": {}, - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": { - "payload": "{\"text\":\"my-name performed test_isent1 with test_val1 test_val2 and traits hulala\"}" - } - }, - "files": {}, - "userId": "12345", - "statusCode": 200 - }, - "metadata": { - "anonymousId": "00000000000000000000000000", - "destinationId": "1ZQVSU9SXNg6KYgZALaqjAO3PIL", - "destinationType": "SLACK", - "jobId": 128, - "messageId": "78102118-56ac-4c5a-a495-8cd7c8f71cc2", - "sourceId": "1YhwKyDcKstudlGxkeN5p2wgsrp" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "slack", - "description": "Test 4", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "destination": { - "ID": "1ZQVSU9SXNg6KYgZALaqjAO3PIL", - "Name": "test-slack", - "DestinationDefinition": { - "ID": "1ZQUiJVMlmF7lfsdfXg7KXQnlLV", - "Name": "SLACK", - "DisplayName": "Slack", - "Config": { - "excludeKeys": [], - "includeKeys": [] - } - }, - "Config": { - "incomingWebhooksType": "modern", - "eventChannelSettings": [ - { - "eventChannelWebhook": "https://hooks.slack.com/services/id1/id2/example", - "eventName": "is", - "eventChannel": "example_channel", - "eventRegex": true - }, - { - "eventChannelWebhook": "https://hooks.slack.com/services/id1/id2/example+1", - "eventName": "is", - "eventChannel": "example_channel", - "eventRegex": true - } - ], - "eventTemplateSettings": [ - { - "eventName": "is", - "eventRegex": true, - "eventTemplate": "{{name}} performed {{event}} with {{properties.key1}} {{properties.key2}}" - }, - { - "eventName": "", - "eventRegex": false, - "eventTemplate": "" - } - ], - "identifyTemplate": "identified {{name}} with {{traits}}", - "webhookUrl": "https://hooks.slack.com/services/THZM86VSS/BV9HZ2UN6/demo", - "whitelistedTraitsSettings": [ - { - "trait": "hiji" - }, - { - "trait": "" - } - ], - "denyListOfEvents": [ - { - "eventName": "black_event" - } - ] - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": true - }, - "message": { - "anonymousId": "00000000000000000000000000", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.1-rc.1" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.1-rc.1" - }, - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "page": { - "path": "/tests/html/script-test.html", - "referrer": "http://localhost:1111/tests/html/", - "search": "", - "title": "", - "url": "http://localhost:1111/tests/html/script-test.html" - }, - "screen": { - "density": 1.7999999523162842 - }, - "traits": { - "country": "India", - "email": "name@domain.com", - "hiji": "hulala", - "name": "my-name" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36" - }, - "event": "test_eventing_testis", - "integrations": { - "All": true - }, - "messageId": "8b8d5937-09bc-49dc-a35e-8cd6370575f8", - "originalTimestamp": "2020-03-23T03:46:30.922Z", - "properties": { - "currency": "USD", - "key1": "test_val1", - "key2": "test_val2", - "revenue": 30, - "user_actual_id": 12345 - }, - "receivedAt": "2020-03-23T09:16:31.064+05:30", - "request_ip": "[::1]:52054", - "sentAt": "2020-03-23T03:46:30.923Z", - "timestamp": "2020-03-23T09:16:31.063+05:30", - "type": "track", - "userId": "12345" - }, - "metadata": { - "anonymousId": "00000000000000000000000000", - "destinationId": "1ZQVSU9SXNg6KYgZALaqjAO3PIL", - "destinationType": "SLACK", - "jobId": 129, - "messageId": "8b8d5937-09bc-49dc-a35e-8cd6370575f8", - "sourceId": "1YhwKyDcKstudlGxkeN5p2wgsrp" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://hooks.slack.com/services/id1/id2/example", - "headers": { - "Content-Type": "application/x-www-form-urlencoded" - }, - "params": {}, - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": { - "payload": "{\"text\":\"my-name performed test_eventing_testis with test_val1 test_val2\"}" - } - }, - "files": {}, - "userId": "12345", - "statusCode": 200 - }, - "metadata": { - "anonymousId": "00000000000000000000000000", - "destinationId": "1ZQVSU9SXNg6KYgZALaqjAO3PIL", - "destinationType": "SLACK", - "jobId": 129, - "messageId": "8b8d5937-09bc-49dc-a35e-8cd6370575f8", - "sourceId": "1YhwKyDcKstudlGxkeN5p2wgsrp" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "slack", - "description": "Test 5", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "destination": { - "ID": "1ZQVSU9SXNg6KYgZALaqjAO3PIL", - "Name": "test-slack", - "DestinationDefinition": { - "ID": "1ZQUiJVMlmF7lfsdfXg7KXQnlLV", - "Name": "SLACK", - "DisplayName": "Slack", - "Config": { - "excludeKeys": [], - "includeKeys": [] - } - }, - "Config": { - "incomingWebhooksType": "modern", - "eventChannelSettings": [ - { - "eventChannelWebhook": "https://hooks.slack.com/services/id1/id2/example", - "eventName": "test_eventing_test", - "eventChannel": "example_channel", - "eventRegex": false - }, - { - "eventChannelWebhook": "https://hooks.slack.com/services/id1/id2/example+1", - "eventName": "", - "eventChannel": "example_channel", - "eventRegex": true - } - ], - "eventTemplateSettings": [ - { - "eventName": "is", - "eventRegex": true, - "eventTemplate": "{{name}} performed {{event}} with {{properties.key1}} {{properties.key2}}" - }, - { - "eventName": "", - "eventRegex": false, - "eventTemplate": "" - } - ], - "identifyTemplate": "identified {{name}} with {{traits}}", - "webhookUrl": "https://hooks.slack.com/services/THZM86VSS/BV9HZ2UN6/demo", - "whitelistedTraitsSettings": [ - { - "trait": "hiji" - }, - { - "trait": "" - } - ], - "denyListOfEvents": [ - { - "eventName": "black_event" - } - ] - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": true - }, - "message": { - "anonymousId": "00000000000000000000000000", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.1-rc.1" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.1-rc.1" - }, - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "page": { - "path": "/tests/html/script-test.html", - "referrer": "http://localhost:1111/tests/html/", - "search": "", - "title": "", - "url": "http://localhost:1111/tests/html/script-test.html" - }, - "screen": { - "density": 1.7999999523162842 - }, - "traits": { - "country": "India", - "email": "name@domain.com", - "hiji": "hulala", - "name": "my-name" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36" - }, - "event": "test_eventing_test", - "integrations": { - "All": true - }, - "messageId": "8b8d5937-09bc-49dc-a35e-8cd6370575f8", - "originalTimestamp": "2020-03-23T03:46:30.922Z", - "properties": { - "currency": "USD", - "key1": "test_val1", - "key2": "test_val2", - "revenue": 30, - "user_actual_id": 12345 - }, - "receivedAt": "2020-03-23T09:16:31.064+05:30", - "request_ip": "[::1]:52054", - "sentAt": "2020-03-23T03:46:30.923Z", - "timestamp": "2020-03-23T09:16:31.063+05:30", - "type": "track", - "userId": "12345" - }, - "metadata": { - "anonymousId": "00000000000000000000000000", - "destinationId": "1ZQVSU9SXNg6KYgZALaqjAO3PIL", - "destinationType": "SLACK", - "jobId": 129, - "messageId": "8b8d5937-09bc-49dc-a35e-8cd6370575f8", - "sourceId": "1YhwKyDcKstudlGxkeN5p2wgsrp" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://hooks.slack.com/services/id1/id2/example", - "headers": { - "Content-Type": "application/x-www-form-urlencoded" - }, - "params": {}, - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": { - "payload": "{\"text\":\"my-name did test_eventing_test\"}" - } - }, - "files": {}, - "userId": "12345", - "statusCode": 200 - }, - "metadata": { - "anonymousId": "00000000000000000000000000", - "destinationId": "1ZQVSU9SXNg6KYgZALaqjAO3PIL", - "destinationType": "SLACK", - "jobId": 129, - "messageId": "8b8d5937-09bc-49dc-a35e-8cd6370575f8", - "sourceId": "1YhwKyDcKstudlGxkeN5p2wgsrp" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "slack", - "description": "Test 6", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "destination": { - "ID": "1ZQVSU9SXNg6KYgZALaqjAO3PIL", - "Name": "test-slack", - "DestinationDefinition": { - "ID": "1ZQUiJVMlmF7lfsdfXg7KXQnlLV", - "Name": "SLACK", - "DisplayName": "Slack", - "Config": { - "excludeKeys": [], - "includeKeys": [] - } - }, - "Config": { - "incomingWebhooksType": "legacy", - "eventChannelSettings": [ - { - "eventChannelWebhook": "https://hooks.slack.com/services/id1/id2/demo", - "eventName": "is", - "eventRegex": true - }, - { - "eventChannelWebhook": "https://hooks.slack.com/services/id1/id2/example+1", - "eventName": "is", - "eventRegex": true - } - ], - "eventTemplateSettings": [ - { - "eventName": "is", - "eventRegex": true, - "eventTemplate": "{{name}} performed {{event}} with {{properties.key1}} {{properties.key2}} and traits {{traitsList.hiji}}" - }, - { - "eventName": "", - "eventRegex": false, - "eventTemplate": "" - } - ], - "identifyTemplate": "identified {{name}} with {{traits}}", - "webhookUrl": "https://hooks.slack.com/services/THZM86VSS/BV9HZ2UN6/demo", - "whitelistedTraitsSettings": [ - { - "trait": "hiji" - }, - { - "trait": "" - } - ], - "denyListOfEvents": [ - { - "eventName": "black_event" - } - ] - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": true - }, - "message": { - "anonymousId": "00000000000000000000000000", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.1-rc.1" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.1-rc.1" - }, - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "page": { - "path": "/tests/html/script-test.html", - "referrer": "http://localhost:1111/tests/html/", - "search": "", - "title": "", - "url": "http://localhost:1111/tests/html/script-test.html" - }, - "screen": { - "density": 1.7999999523162842 - }, - "traits": { - "country": "India", - "email": "name@domain.com", - "hiji": "hulala", - "name": "my-name" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36" - }, - "event": "test_isent1", - "integrations": { - "All": true - }, - "messageId": "78102118-56ac-4c5a-a495-8cd7c8f71cc2", - "originalTimestamp": "2020-03-23T03:46:30.921Z", - "properties": { - "currency": "USD", - "key1": "test_val1", - "key2": "test_val2", - "revenue": 30, - "user_actual_id": 12345 - }, - "receivedAt": "2020-03-23T09:16:31.064+05:30", - "request_ip": "[::1]:52057", - "sentAt": "2020-03-23T03:46:30.921Z", - "timestamp": "2020-03-23T09:16:31.064+05:30", - "type": "track", - "userId": "12345" - }, - "metadata": { - "anonymousId": "00000000000000000000000000", - "destinationId": "1ZQVSU9SXNg6KYgZALaqjAO3PIL", - "destinationType": "SLACK", - "jobId": 128, - "messageId": "78102118-56ac-4c5a-a495-8cd7c8f71cc2", - "sourceId": "1YhwKyDcKstudlGxkeN5p2wgsrp" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://hooks.slack.com/services/THZM86VSS/BV9HZ2UN6/demo", - "headers": { - "Content-Type": "application/x-www-form-urlencoded" - }, - "params": {}, - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": { - "payload": "{\"text\":\"my-name performed test_isent1 with test_val1 test_val2 and traits hulala\",\"username\":\"RudderStack\",\"icon_url\":\"https://cdn.rudderlabs.com/rudderstack.png\"}" - } - }, - "files": {}, - "userId": "12345", - "statusCode": 200 - }, - "metadata": { - "anonymousId": "00000000000000000000000000", - "destinationId": "1ZQVSU9SXNg6KYgZALaqjAO3PIL", - "destinationType": "SLACK", - "jobId": 128, - "messageId": "78102118-56ac-4c5a-a495-8cd7c8f71cc2", - "sourceId": "1YhwKyDcKstudlGxkeN5p2wgsrp" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "slack", - "description": "Test 7", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "destination": { - "ID": "1ZQVSU9SXNg6KYgZALaqjAO3PIL", - "Name": "test-slack", - "DestinationDefinition": { - "ID": "1ZQUiJVMlmF7lfsdfXg7KXQnlLV", - "Name": "SLACK", - "DisplayName": "Slack", - "Config": { - "excludeKeys": [], - "includeKeys": [] - } - }, - "Config": { - "incomingWebhooksType": "legacy", - "eventChannelSettings": [ - { - "eventChannelWebhook": "https://hooks.slack.com/services/id1/id2/example", - "eventName": "is", - "eventRegex": true - }, - { - "eventChannelWebhook": "https://hooks.slack.com/services/id1/id2/example+1", - "eventChannel": "example-of-legacy", - "eventName": "is", - "eventRegex": true - } - ], - "eventTemplateSettings": [ - { - "eventName": "is", - "eventRegex": true, - "eventTemplate": "{{name}} performed {{event}} with {{properties.key1}} {{properties.key2}}" - }, - { - "eventName": "", - "eventRegex": false, - "eventTemplate": "" - } - ], - "identifyTemplate": "identified {{name}} with {{traits}}", - "webhookUrl": "https://hooks.slack.com/services/THZM86VSS/BV9HZ2UN6/demo", - "whitelistedTraitsSettings": [ - { - "trait": "hiji" - }, - { - "trait": "" - } - ], - "denyListOfEvents": [ - { - "eventName": "black_event" - } - ] - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": true - }, - "message": { - "anonymousId": "00000000000000000000000000", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.1-rc.1" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.1-rc.1" - }, - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "page": { - "path": "/tests/html/script-test.html", - "referrer": "http://localhost:1111/tests/html/", - "search": "", - "title": "", - "url": "http://localhost:1111/tests/html/script-test.html" - }, - "screen": { - "density": 1.7999999523162842 - }, - "traits": { - "country": "India", - "email": "name@domain.com", - "hiji": "hulala", - "name": "my-name" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36" - }, - "event": "test_eventing_testis", - "integrations": { - "All": true - }, - "messageId": "8b8d5937-09bc-49dc-a35e-8cd6370575f8", - "originalTimestamp": "2020-03-23T03:46:30.922Z", - "properties": { - "currency": "USD", - "key1": "test_val1", - "key2": "test_val2", - "revenue": 30, - "user_actual_id": 12345 - }, - "receivedAt": "2020-03-23T09:16:31.064+05:30", - "request_ip": "[::1]:52054", - "sentAt": "2020-03-23T03:46:30.923Z", - "timestamp": "2020-03-23T09:16:31.063+05:30", - "type": "track", - "userId": "12345" - }, - "metadata": { - "anonymousId": "00000000000000000000000000", - "destinationId": "1ZQVSU9SXNg6KYgZALaqjAO3PIL", - "destinationType": "SLACK", - "jobId": 129, - "messageId": "8b8d5937-09bc-49dc-a35e-8cd6370575f8", - "sourceId": "1YhwKyDcKstudlGxkeN5p2wgsrp" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://hooks.slack.com/services/THZM86VSS/BV9HZ2UN6/demo", - "headers": { - "Content-Type": "application/x-www-form-urlencoded" - }, - "params": {}, - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": { - "payload": "{\"channel\":\"example-of-legacy\",\"text\":\"my-name performed test_eventing_testis with test_val1 test_val2\",\"username\":\"RudderStack\",\"icon_url\":\"https://cdn.rudderlabs.com/rudderstack.png\"}" - } - }, - "files": {}, - "userId": "12345", - "statusCode": 200 - }, - "metadata": { - "anonymousId": "00000000000000000000000000", - "destinationId": "1ZQVSU9SXNg6KYgZALaqjAO3PIL", - "destinationType": "SLACK", - "jobId": 129, - "messageId": "8b8d5937-09bc-49dc-a35e-8cd6370575f8", - "sourceId": "1YhwKyDcKstudlGxkeN5p2wgsrp" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "slack", - "description": "Test 8", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "destination": { - "ID": "1ZQVSU9SXNg6KYgZALaqjAO3PIL", - "Name": "test-slack", - "DestinationDefinition": { - "ID": "1ZQUiJVMlmF7lfsdfXg7KXQnlLV", - "Name": "SLACK", - "DisplayName": "Slack", - "Config": { - "excludeKeys": [], - "includeKeys": [] - } - }, - "Config": { - "eventChannelSettings": [ - { - "eventChannelWebhook": "https://hooks.slack.com/services/example/test/demo", - "eventName": "is", - "eventRegex": true - } - ], - "eventTemplateSettings": [ - { - "eventName": "is", - "eventRegex": true, - "eventTemplate": "{{name}} performed {{event}} with {{properties.key1}} {{properties.key2}}" - }, - { - "eventName": "", - "eventRegex": false, - "eventTemplate": "" - } - ], - "identifyTemplate": "identified {{name}} with {{traits}}", - "webhookUrl": "https://hooks.slack.com/services/THZM86VSS/BV9HZ2UN6/demo", - "whitelistedTraitsSettings": [ - { - "trait": "hiji" - }, - { - "trait": "" - } - ] - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": true - }, - "message": { - "anonymousId": "00000000000000000000000000", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.1-rc.1" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.1-rc.1" - }, - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "page": { - "path": "/tests/html/script-test.html", - "referrer": "http://localhost:1111/tests/html/", - "search": "", - "title": "", - "url": "http://localhost:1111/tests/html/script-test.html" - }, - "screen": { - "density": 1.7999999523162842 - }, - "traits": { - "country": "India", - "email": "name@domain.com", - "hiji": "hulala", - "name": "my-name" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36" - }, - "event": "test_eventing_testis", - "integrations": { - "All": true - }, - "messageId": "8b8d5937-09bc-49dc-a35e-8cd6370575f8", - "originalTimestamp": "2020-03-23T03:46:30.922Z", - "properties": { - "currency": "USD", - "key1": "test_val1", - "key2": "test_val2", - "revenue": 30, - "user_actual_id": 12345 - }, - "receivedAt": "2020-03-23T09:16:31.064+05:30", - "request_ip": "[::1]:52054", - "sentAt": "2020-03-23T03:46:30.923Z", - "timestamp": "2020-03-23T09:16:31.063+05:30", - "userId": "12345" - }, - "metadata": { - "anonymousId": "00000000000000000000000000", - "destinationId": "1ZQVSU9SXNg6KYgZALaqjAO3PIL", - "destinationType": "SLACK", - "jobId": 129, - "messageId": "8b8d5937-09bc-49dc-a35e-8cd6370575f8", - "sourceId": "1YhwKyDcKstudlGxkeN5p2wgsrp" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "metadata": { - "anonymousId": "00000000000000000000000000", - "destinationId": "1ZQVSU9SXNg6KYgZALaqjAO3PIL", - "destinationType": "SLACK", - "jobId": 129, - "messageId": "8b8d5937-09bc-49dc-a35e-8cd6370575f8", - "sourceId": "1YhwKyDcKstudlGxkeN5p2wgsrp" - }, - "statusCode": 400, - "error": "Event type is required", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation", - "destType": "SLACK", - "module": "destination", - "implementation": "native", - "feature": "processor", - "destinationId": "1ZQVSU9SXNg6KYgZALaqjAO3PIL" - } - } - ] - } - } - }, - { - "name": "slack", - "description": "Test 9", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "destination": { - "ID": "1ZQVSU9SXNg6KYgZALaqjAO3PIL", - "Name": "test-slack", - "DestinationDefinition": { - "ID": "1ZQUiJVMlmF7lfsdfXg7KXQnlLV", - "Name": "SLACK", - "DisplayName": "Slack", - "Config": { - "excludeKeys": [], - "includeKeys": [] - } - }, - "Config": { - "eventChannelSettings": [ - { - "eventChannelWebhook": "https://hooks.slack.com/services/example/test/demo", - "eventName": "is", - "eventRegex": true - } - ], - "eventTemplateSettings": [ - { - "eventName": "is", - "eventRegex": true, - "eventTemplate": "{{name}} performed {{event}} with {{properties.key1}} {{properties.key2}}" - }, - { - "eventName": "", - "eventRegex": false, - "eventTemplate": "" - } - ], - "identifyTemplate": "identified {{name}} with {{traits}}", - "webhookUrl": "https://hooks.slack.com/services/THZM86VSS/BV9HZ2UN6/demo", - "whitelistedTraitsSettings": [ - { - "trait": "hiji" - }, - { - "trait": "" - } - ] - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": true - }, - "message": { - "anonymousId": "00000000000000000000000000", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.1-rc.1" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.1-rc.1" - }, - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "page": { - "path": "/tests/html/script-test.html", - "referrer": "http://localhost:1111/tests/html/", - "search": "", - "title": "", - "url": "http://localhost:1111/tests/html/script-test.html" - }, - "screen": { - "density": 1.7999999523162842 - }, - "traits": { - "country": "India", - "email": "name@domain.com", - "hiji": "hulala", - "name": "my-name" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36" - }, - "integrations": { - "All": true - }, - "messageId": "8b8d5937-09bc-49dc-a35e-8cd6370575f8", - "originalTimestamp": "2020-03-23T03:46:30.922Z", - "properties": { - "currency": "USD", - "key1": "test_val1", - "key2": "test_val2", - "revenue": 30, - "user_actual_id": 12345 - }, - "receivedAt": "2020-03-23T09:16:31.064+05:30", - "request_ip": "[::1]:52054", - "sentAt": "2020-03-23T03:46:30.923Z", - "timestamp": "2020-03-23T09:16:31.063+05:30", - "type": "track", - "userId": "12345" - }, - "metadata": { - "anonymousId": "00000000000000000000000000", - "destinationId": "1ZQVSU9SXNg6KYgZALaqjAO3PIL", - "destinationType": "SLACK", - "jobId": 129, - "messageId": "8b8d5937-09bc-49dc-a35e-8cd6370575f8", - "sourceId": "1YhwKyDcKstudlGxkeN5p2wgsrp" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "metadata": { - "anonymousId": "00000000000000000000000000", - "destinationId": "1ZQVSU9SXNg6KYgZALaqjAO3PIL", - "destinationType": "SLACK", - "jobId": 129, - "messageId": "8b8d5937-09bc-49dc-a35e-8cd6370575f8", - "sourceId": "1YhwKyDcKstudlGxkeN5p2wgsrp" - }, - "statusCode": 400, - "error": "Event name is required", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "instrumentation", - "destType": "SLACK", - "module": "destination", - "implementation": "native", - "feature": "processor", - "destinationId": "1ZQVSU9SXNg6KYgZALaqjAO3PIL" - } - } - ] - } - } - }, - { - "name": "slack", - "description": "Test 10", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "destination": { - "ID": "1ZQVSU9SXNg6KYgZALaqjAO3PIL", - "Name": "test-slack", - "DestinationDefinition": { - "ID": "1ZQUiJVMlmF7lfsdfXg7KXQnlLV", - "Name": "SLACK", - "DisplayName": "Slack", - "Config": { - "excludeKeys": [], - "includeKeys": [] - } - }, - "Config": { - "eventChannelSettings": [ - { - "eventChannelWebhook": "https://hooks.slack.com/services/example/test/demo", - "eventName": "is", - "eventRegex": true - } - ], - "eventTemplateSettings": [ - { - "eventName": "is", - "eventRegex": true, - "eventTemplate": "{{name}} performed {{event}} with {{properties. key1}} {{properties.key2}} and traits {{traitsList.hiji}}" - }, - { - "eventName": "", - "eventRegex": false, - "eventTemplate": "" - } - ], - "identifyTemplate": "identified {{name}} with {{traits}}", - "webhookUrl": "https://hooks.slack.com/services/THZM86VSS/BV9HZ2UN6/demo", - "whitelistedTraitsSettings": [ - { - "trait": "hiji" - }, - { - "trait": "" - } - ] - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": true - }, - "message": { - "anonymousId": "00000000000000000000000000", - "channel": "web", - "context": { - "app": { - "build": "1.0.0", - "name": "RudderLabs JavaScript SDK", - "namespace": "com.rudderlabs.javascript", - "version": "1.1.1-rc.1" - }, - "ip": "0.0.0.0", - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.1-rc.1" - }, - "locale": "en-US", - "os": { - "name": "", - "version": "" - }, - "page": { - "path": "/tests/html/script-test.html", - "referrer": "http://localhost:1111/tests/html/", - "search": "", - "title": "", - "url": "http://localhost:1111/tests/html/script-test.html" - }, - "screen": { - "density": 1.7999999523162842 - }, - "traits": { - "country": "India", - "email": "name@domain.com", - "hiji": "hulala", - "name": "my-name" - }, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36" - }, - "event": "test_isent1", - "integrations": { - "All": true - }, - "messageId": "78102118-56ac-4c5a-a495-8cd7c8f71cc2", - "originalTimestamp": "2020-03-23T03:46:30.921Z", - "properties": { - "currency": "USD", - "key1": "test_val1", - "key2": "test_val2", - "revenue": 30, - "user_actual_id": 12345 - }, - "receivedAt": "2020-03-23T09:16:31.064+05:30", - "request_ip": "[::1]:52057", - "sentAt": "2020-03-23T03:46:30.921Z", - "timestamp": "2020-03-23T09:16:31.064+05:30", - "type": "track", - "userId": "12345" - }, - "metadata": { - "anonymousId": "00000000000000000000000000", - "destinationId": "1ZQVSU9SXNg6KYgZALaqjAO3PIL", - "destinationType": "SLACK", - "jobId": 128, - "messageId": "78102118-56ac-4c5a-a495-8cd7c8f71cc2", - "sourceId": "1YhwKyDcKstudlGxkeN5p2wgsrp" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "metadata": { - "anonymousId": "00000000000000000000000000", - "destinationId": "1ZQVSU9SXNg6KYgZALaqjAO3PIL", - "destinationType": "SLACK", - "jobId": 128, - "messageId": "78102118-56ac-4c5a-a495-8cd7c8f71cc2", - "sourceId": "1YhwKyDcKstudlGxkeN5p2wgsrp" - }, - "statusCode": 400, - "error": "Something is wrong with the event template: '{{name}} performed {{event}} with {{properties. key1}} {{properties.key2}} and traits {{traitsList.hiji}}'", - "statTags": { - "errorCategory": "dataValidation", - "errorType": "configuration", - "destType": "SLACK", - "module": "destination", - "implementation": "native", - "feature": "processor", - "destinationId": "1ZQVSU9SXNg6KYgZALaqjAO3PIL" - } - } - ] - } - } - }, - { - "name": "slack", - "description": "Test 11", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "destination": { - "ID": "1ZQVSU9SXNg6KYgZALaqjAO3PIL", - "Name": "test-slack", - "DestinationDefinition": { - "ID": "1ZQUiJVMlmF7lfsdfXg7KXQnlLV", - "Name": "SLACK", - "DisplayName": "Slack", - "Config": { - "excludeKeys": [], - "includeKeys": [] - } - }, - "Config": { - "eventChannelSettings": [ - { - "eventChannelWebhook": "https://hooks.slack.com/services/example/test/demo", - "eventName": "is", - "eventRegex": true - } - ], - "eventTemplateSettings": [ - { - "eventName": "is", - "eventRegex": true, - "eventTemplate": "{{name}} performed {{event}} with {{properties.key1}} {{properties.key2}}" - }, - { - "eventName": "", - "eventRegex": false, - "eventTemplate": "" - } - ], - "webhookUrl": "https://hooks.slack.com/services/THZM86VSS/BV9HZ2UN6/demo", - "whitelistedTraitsSettings": [ - { - "trait": "hiji" - }, - { - "trait": "" - } - ] - }, - "Enabled": true, - "Transformations": [], - "IsProcessorEnabled": true - }, - "message": { - "anonymousId": "00000000000000000000000000", - "channel": "web", - "context": {}, - "event": "black_event", - "integrations": { - "All": true - }, - "messageId": "8b8d5937-09bc-49dc-a35e-8cd6370575f8", - "originalTimestamp": "2020-03-23T03:46:30.922Z", - "properties": { - "currency": "USD", - "key1": "test_val1", - "key2": "test_val2", - "revenue": 30, - "user_actual_id": 12345 - }, - "receivedAt": "2020-03-23T09:16:31.064+05:30", - "request_ip": "[::1]:52054", - "sentAt": "2020-03-23T03:46:30.923Z", - "timestamp": "2020-03-23T09:16:31.063+05:30", - "type": "track", - "userId": "12345" - }, - "metadata": { - "anonymousId": "00000000000000000000000000", - "destinationId": "1ZQVSU9SXNg6KYgZALaqjAO3PIL", - "destinationType": "SLACK", - "jobId": 129, - "messageId": "8b8d5937-09bc-49dc-a35e-8cd6370575f8", - "sourceId": "1YhwKyDcKstudlGxkeN5p2wgsrp" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://hooks.slack.com/services/THZM86VSS/BV9HZ2UN6/demo", - "headers": { - "Content-Type": "application/x-www-form-urlencoded" - }, - "params": {}, - "body": { - "JSON": {}, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": { - "payload": "{\"text\":\"User 12345 did black_event\",\"username\":\"RudderStack\",\"icon_url\":\"https://cdn.rudderlabs.com/rudderstack.png\"}" - } - }, - "files": {}, - "userId": "12345", - "statusCode": 200 - }, - "metadata": { - "anonymousId": "00000000000000000000000000", - "destinationId": "1ZQVSU9SXNg6KYgZALaqjAO3PIL", - "destinationType": "SLACK", - "jobId": 129, - "messageId": "8b8d5937-09bc-49dc-a35e-8cd6370575f8", - "sourceId": "1YhwKyDcKstudlGxkeN5p2wgsrp" - }, - "statusCode": 200 - } - ] - } - } - } -] \ No newline at end of file + { + name: 'slack', + description: + 'Test 0-> Identify -> Default template with some whiteListed traits and some of them are with a space in between', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1ZQVSU9SXNg6KYgZALaqjAO3PIL', + Name: 'test-slack', + DestinationDefinition: { + ID: '1ZQUiJVMlmF7lfsdfXg7KXQnlLV', + Name: 'SLACK', + DisplayName: 'Slack', + Config: { + excludeKeys: [], + includeKeys: [], + }, + }, + Config: { + eventChannelSettings: [ + { + eventChannelWebhook: 'https://hooks.slack.com/services/example/test/demo', + eventName: 'is', + eventRegex: true, + }, + ], + eventTemplateSettings: [ + { + eventName: 'is', + eventRegex: true, + eventTemplate: + '{{name}} performed {{event}} with {{properties.key1}} {{properties.key2}}', + }, + { + eventName: '', + eventRegex: false, + eventTemplate: '', + }, + ], + webhookUrl: 'https://hooks.slack.com/services/THZM86VSS/BV9HZ2UN6/demo', + whitelistedTraitsSettings: [ + { + trait: 'hiji', + }, + { + trait: 'favorite color', + }, + ], + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + message: { + anonymousId: '4de817fb-7f8e-4e23-b9be-f6736dbda20f', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.1-rc.1', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.1-rc.1', + }, + locale: 'en-US', + os: { + name: '', + version: '', + }, + page: { + path: '/tests/html/script-test.html', + referrer: 'http://localhost:1111/tests/html/', + search: '', + title: '', + url: 'http://localhost:1111/tests/html/script-test.html', + }, + screen: { + density: 1.7999999523162842, + }, + traits: { + country: 'India', + email: 'name@domain.com', + hiji: 'hulala', + name: 'my-name', + 'favorite color': 'black', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36', + }, + integrations: { + All: true, + }, + messageId: '9ecc0183-89ed-48bd-87eb-b2d8e1ca6780', + originalTimestamp: '2020-03-23T03:46:30.916Z', + properties: { + path: '/tests/html/script-test.html', + referrer: 'http://localhost:1111/tests/html/', + search: '', + title: '', + url: 'http://localhost:1111/tests/html/script-test.html', + }, + receivedAt: '2020-03-23T09:16:31.041+05:30', + request_ip: '[::1]:52056', + sentAt: '2020-03-23T03:46:30.916Z', + timestamp: '2020-03-23T09:16:31.041+05:30', + type: 'identify', + userId: '12345', + }, + metadata: { + anonymousId: '4de817fb-7f8e-4e23-b9be-f6736dbda20f', + destinationId: '1ZQVSU9SXNg6KYgZALaqjAO3PIL', + destinationType: 'SLACK', + jobId: 126, + messageId: '9ecc0183-89ed-48bd-87eb-b2d8e1ca6780', + sourceId: '1YhwKyDcKstudlGxkeN5p2wgsrp', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://hooks.slack.com/services/THZM86VSS/BV9HZ2UN6/demo', + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + }, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: { + payload: + '{"text":"Identified my-namehiji: hulala favorite color: black ","username":"RudderStack","icon_url":"https://cdn.rudderlabs.com/rudderstack.png"}', + }, + }, + files: {}, + userId: '12345', + statusCode: 200, + }, + metadata: { + anonymousId: '4de817fb-7f8e-4e23-b9be-f6736dbda20f', + destinationId: '1ZQVSU9SXNg6KYgZALaqjAO3PIL', + destinationType: 'SLACK', + jobId: 126, + messageId: '9ecc0183-89ed-48bd-87eb-b2d8e1ca6780', + sourceId: '1YhwKyDcKstudlGxkeN5p2wgsrp', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'slack', + description: 'Test 1-> Unsupported event type', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1ZQVSU9SXNg6KYgZALaqjAO3PIL', + Name: 'test-slack', + DestinationDefinition: { + ID: '1ZQUiJVMlmF7lfsdfXg7KXQnlLV', + Name: 'SLACK', + DisplayName: 'Slack', + Config: { + excludeKeys: [], + includeKeys: [], + }, + }, + Config: { + eventChannelSettings: [ + { + eventChannelWebhook: 'https://hooks.slack.com/services/example/test/demo', + eventName: 'is', + eventRegex: true, + }, + ], + eventTemplateSettings: [ + { + eventName: 'is', + eventRegex: true, + eventTemplate: + '{{name}} performed {{event}} with {{properties.key1}} {{properties.key2}}', + }, + { + eventName: '', + eventRegex: false, + eventTemplate: '', + }, + ], + identifyTemplate: 'identified {{name}} with {{traits}}', + webhookUrl: 'https://hooks.slack.com/services/THZM86VSS/BV9HZ2UN6/demo', + whitelistedTraitsSettings: [ + { + trait: 'hiji', + }, + { + trait: '', + }, + ], + denyListOfEvents: [ + { + eventName: 'black_event', + }, + ], + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + message: { + anonymousId: '4de817fb-7f8e-4e23-b9be-f6736dbda20f', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.1-rc.1', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.1-rc.1', + }, + locale: 'en-US', + os: { + name: '', + version: '', + }, + page: { + path: '/tests/html/script-test.html', + referrer: 'http://localhost:1111/tests/html/', + search: '', + title: '', + url: 'http://localhost:1111/tests/html/script-test.html', + }, + screen: { + density: 1.7999999523162842, + }, + traits: { + country: 'India', + email: 'name@domain.com', + hiji: 'hulala', + name: 'my-name', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36', + }, + integrations: { + All: true, + }, + messageId: '9ecc0183-89ed-48bd-87eb-b2d8e1ca6780', + originalTimestamp: '2020-03-23T03:46:30.916Z', + properties: { + path: '/tests/html/script-test.html', + referrer: 'http://localhost:1111/tests/html/', + search: '', + title: '', + url: 'http://localhost:1111/tests/html/script-test.html', + }, + receivedAt: '2020-03-23T09:16:31.041+05:30', + request_ip: '[::1]:52056', + sentAt: '2020-03-23T03:46:30.916Z', + timestamp: '2020-03-23T09:16:31.041+05:30', + type: 'page', + userId: '12345', + }, + metadata: { + anonymousId: '4de817fb-7f8e-4e23-b9be-f6736dbda20f', + destinationId: '1ZQVSU9SXNg6KYgZALaqjAO3PIL', + destinationType: 'SLACK', + jobId: 126, + messageId: '9ecc0183-89ed-48bd-87eb-b2d8e1ca6780', + sourceId: '1YhwKyDcKstudlGxkeN5p2wgsrp', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + anonymousId: '4de817fb-7f8e-4e23-b9be-f6736dbda20f', + destinationId: '1ZQVSU9SXNg6KYgZALaqjAO3PIL', + destinationType: 'SLACK', + jobId: 126, + messageId: '9ecc0183-89ed-48bd-87eb-b2d8e1ca6780', + sourceId: '1YhwKyDcKstudlGxkeN5p2wgsrp', + }, + statusCode: 400, + error: 'Event type page is not supported', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'SLACK', + module: 'destination', + implementation: 'native', + feature: 'processor', + destinationId: '1ZQVSU9SXNg6KYgZALaqjAO3PIL', + }, + }, + ], + }, + }, + }, + { + name: 'slack', + description: 'Test 2 -> Identify call with custom template', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1ZQVSU9SXNg6KYgZALaqjAO3PIL', + Name: 'test-slack', + DestinationDefinition: { + ID: '1ZQUiJVMlmF7lfsdfXg7KXQnlLV', + Name: 'SLACK', + DisplayName: 'Slack', + Config: { + excludeKeys: [], + includeKeys: [], + }, + }, + Config: { + eventChannelSettings: [ + { + eventChannelWebhook: 'https://hooks.slack.com/services/id1/id2/example', + eventName: 'is', + eventRegex: true, + }, + ], + eventTemplateSettings: [ + { + eventName: 'is', + eventRegex: true, + eventTemplate: + '{{name}} performed {{event}} with {{properties.key1}} {{properties.key2}}', + }, + { + eventName: '', + eventRegex: false, + eventTemplate: '', + }, + ], + identifyTemplate: 'identified {{name}} with {{traits}}', + webhookUrl: 'https://hooks.slack.com/services/THZM86VSS/BV9HZ2UN6/demo', + whitelistedTraitsSettings: [ + { + trait: 'hiji', + }, + { + trait: '', + }, + ], + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + message: { + anonymousId: '12345', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.1-rc.1', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.1-rc.1', + }, + locale: 'en-US', + os: { + name: '', + version: '', + }, + page: { + path: '', + referrer: '', + search: '', + title: '', + url: '', + }, + screen: { + density: 1.7999999523162842, + }, + traits: { + country: 'India', + email: 'name@domain.com', + hiji: 'hulala', + name: 'my-name', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36', + }, + traits: { + country: 'USA', + email: 'test@domain.com', + hiji: 'hulala-1', + name: 'my-name-1', + }, + integrations: { + All: true, + }, + messageId: '4aaecff2-a513-4bbf-9824-c471f4ac9777', + originalTimestamp: '2020-03-23T03:41:46.122Z', + receivedAt: '2020-03-23T09:11:46.244+05:30', + request_ip: '[::1]:52055', + sentAt: '2020-03-23T03:41:46.123Z', + timestamp: '2020-03-23T09:11:46.243+05:30', + type: 'identify', + userId: '12345', + }, + metadata: { + anonymousId: '12345', + destinationId: '1ZQVSU9SXNg6KYgZALaqjAO3PIL', + destinationType: 'SLACK', + jobId: 123, + messageId: '4aaecff2-a513-4bbf-9824-c471f4ac9777', + sourceId: '1YhwKyDcKstudlGxkeN5p2wgsrp', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://hooks.slack.com/services/THZM86VSS/BV9HZ2UN6/demo', + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + }, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: { + payload: + '{"text":"identified my-name-1 with hiji: hulala-1 ","username":"RudderStack","icon_url":"https://cdn.rudderlabs.com/rudderstack.png"}', + }, + }, + files: {}, + userId: '12345', + statusCode: 200, + }, + metadata: { + anonymousId: '12345', + destinationId: '1ZQVSU9SXNg6KYgZALaqjAO3PIL', + destinationType: 'SLACK', + jobId: 123, + messageId: '4aaecff2-a513-4bbf-9824-c471f4ac9777', + sourceId: '1YhwKyDcKstudlGxkeN5p2wgsrp', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'slack', + description: 'Test 3 -> Track with modern webhook and with custom template including a trait', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1ZQVSU9SXNg6KYgZALaqjAO3PIL', + Name: 'test-slack', + DestinationDefinition: { + ID: '1ZQUiJVMlmF7lfsdfXg7KXQnlLV', + Name: 'SLACK', + DisplayName: 'Slack', + Config: { + excludeKeys: [], + includeKeys: [], + }, + }, + Config: { + incomingWebhooksType: 'modern', + eventChannelSettings: [ + { + eventChannelWebhook: 'https://hooks.slack.com/services/id1/id2/demo', + eventName: 'is', + eventRegex: true, + }, + { + eventChannelWebhook: 'https://hooks.slack.com/services/id1/id2/example+1', + eventName: 'is', + eventRegex: true, + }, + ], + eventTemplateSettings: [ + { + eventName: 'is', + eventRegex: true, + eventTemplate: + '{{name}} performed {{event}} with {{properties.key1}} {{properties.key2}} and traits {{traitsList.hiji}}', + }, + { + eventName: '', + eventRegex: false, + eventTemplate: '', + }, + ], + identifyTemplate: 'identified {{name}} with {{traits}}', + webhookUrl: 'https://hooks.slack.com/services/THZM86VSS/BV9HZ2UN6/demo', + whitelistedTraitsSettings: [ + { + trait: 'hiji', + }, + { + trait: '', + }, + ], + denyListOfEvents: [ + { + eventName: 'black_event', + }, + ], + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + message: { + anonymousId: '00000000000000000000000000', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.1-rc.1', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.1-rc.1', + }, + locale: 'en-US', + os: { + name: '', + version: '', + }, + page: { + path: '/tests/html/script-test.html', + referrer: 'http://localhost:1111/tests/html/', + search: '', + title: '', + url: 'http://localhost:1111/tests/html/script-test.html', + }, + screen: { + density: 1.7999999523162842, + }, + traits: { + country: 'India', + email: 'name@domain.com', + hiji: 'hulala', + name: 'my-name', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36', + }, + event: 'test_isent1', + integrations: { + All: true, + }, + messageId: '78102118-56ac-4c5a-a495-8cd7c8f71cc2', + originalTimestamp: '2020-03-23T03:46:30.921Z', + properties: { + currency: 'USD', + key1: 'test_val1', + key2: 'test_val2', + revenue: 30, + user_actual_id: 12345, + }, + receivedAt: '2020-03-23T09:16:31.064+05:30', + request_ip: '[::1]:52057', + sentAt: '2020-03-23T03:46:30.921Z', + timestamp: '2020-03-23T09:16:31.064+05:30', + type: 'track', + userId: '12345', + }, + metadata: { + anonymousId: '00000000000000000000000000', + destinationId: '1ZQVSU9SXNg6KYgZALaqjAO3PIL', + destinationType: 'SLACK', + jobId: 128, + messageId: '78102118-56ac-4c5a-a495-8cd7c8f71cc2', + sourceId: '1YhwKyDcKstudlGxkeN5p2wgsrp', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://hooks.slack.com/services/id1/id2/demo', + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + }, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: { + payload: + '{"text":"my-name performed test_isent1 with test_val1 test_val2 and traits hulala"}', + }, + }, + files: {}, + userId: '12345', + statusCode: 200, + }, + metadata: { + anonymousId: '00000000000000000000000000', + destinationId: '1ZQVSU9SXNg6KYgZALaqjAO3PIL', + destinationType: 'SLACK', + jobId: 128, + messageId: '78102118-56ac-4c5a-a495-8cd7c8f71cc2', + sourceId: '1YhwKyDcKstudlGxkeN5p2wgsrp', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'slack', + description: + 'Test 4 -> Track call with custom template with no trait and only properties and modern webhook', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1ZQVSU9SXNg6KYgZALaqjAO3PIL', + Name: 'test-slack', + DestinationDefinition: { + ID: '1ZQUiJVMlmF7lfsdfXg7KXQnlLV', + Name: 'SLACK', + DisplayName: 'Slack', + Config: { + excludeKeys: [], + includeKeys: [], + }, + }, + Config: { + incomingWebhooksType: 'modern', + eventChannelSettings: [ + { + eventChannelWebhook: 'https://hooks.slack.com/services/id1/id2/example', + eventName: 'is', + eventChannel: 'example_channel', + eventRegex: true, + }, + { + eventChannelWebhook: 'https://hooks.slack.com/services/id1/id2/example+1', + eventName: 'is', + eventChannel: 'example_channel', + eventRegex: true, + }, + ], + eventTemplateSettings: [ + { + eventName: 'is', + eventRegex: true, + eventTemplate: + '{{name}} performed {{event}} with {{properties.key1}} {{properties.key2}}', + }, + { + eventName: '', + eventRegex: false, + eventTemplate: '', + }, + ], + identifyTemplate: 'identified {{name}} with {{traits}}', + webhookUrl: 'https://hooks.slack.com/services/THZM86VSS/BV9HZ2UN6/demo', + whitelistedTraitsSettings: [ + { + trait: 'hiji', + }, + { + trait: '', + }, + ], + denyListOfEvents: [ + { + eventName: 'black_event', + }, + ], + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + message: { + anonymousId: '00000000000000000000000000', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.1-rc.1', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.1-rc.1', + }, + locale: 'en-US', + os: { + name: '', + version: '', + }, + page: { + path: '/tests/html/script-test.html', + referrer: 'http://localhost:1111/tests/html/', + search: '', + title: '', + url: 'http://localhost:1111/tests/html/script-test.html', + }, + screen: { + density: 1.7999999523162842, + }, + traits: { + country: 'India', + email: 'name@domain.com', + hiji: 'hulala', + name: 'my-name', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36', + }, + event: 'test_eventing_testis', + integrations: { + All: true, + }, + messageId: '8b8d5937-09bc-49dc-a35e-8cd6370575f8', + originalTimestamp: '2020-03-23T03:46:30.922Z', + properties: { + currency: 'USD', + key1: 'test_val1', + key2: 'test_val2', + revenue: 30, + user_actual_id: 12345, + }, + receivedAt: '2020-03-23T09:16:31.064+05:30', + request_ip: '[::1]:52054', + sentAt: '2020-03-23T03:46:30.923Z', + timestamp: '2020-03-23T09:16:31.063+05:30', + type: 'track', + userId: '12345', + }, + metadata: { + anonymousId: '00000000000000000000000000', + destinationId: '1ZQVSU9SXNg6KYgZALaqjAO3PIL', + destinationType: 'SLACK', + jobId: 129, + messageId: '8b8d5937-09bc-49dc-a35e-8cd6370575f8', + sourceId: '1YhwKyDcKstudlGxkeN5p2wgsrp', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://hooks.slack.com/services/id1/id2/example', + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + }, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: { + payload: + '{"text":"my-name performed test_eventing_testis with test_val1 test_val2"}', + }, + }, + files: {}, + userId: '12345', + statusCode: 200, + }, + metadata: { + anonymousId: '00000000000000000000000000', + destinationId: '1ZQVSU9SXNg6KYgZALaqjAO3PIL', + destinationType: 'SLACK', + jobId: 129, + messageId: '8b8d5937-09bc-49dc-a35e-8cd6370575f8', + sourceId: '1YhwKyDcKstudlGxkeN5p2wgsrp', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'slack', + description: + 'Test 5 -> Track call with default template and an extra empty event to template mapping containg blank string as event', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1ZQVSU9SXNg6KYgZALaqjAO3PIL', + Name: 'test-slack', + DestinationDefinition: { + ID: '1ZQUiJVMlmF7lfsdfXg7KXQnlLV', + Name: 'SLACK', + DisplayName: 'Slack', + Config: { + excludeKeys: [], + includeKeys: [], + }, + }, + Config: { + incomingWebhooksType: 'modern', + eventChannelSettings: [ + { + eventChannelWebhook: 'https://hooks.slack.com/services/id1/id2/example', + eventName: 'test_eventing_test', + eventChannel: 'example_channel', + eventRegex: false, + }, + { + eventChannelWebhook: 'https://hooks.slack.com/services/id1/id2/example+1', + eventName: '', + eventChannel: 'example_channel', + eventRegex: true, + }, + ], + eventTemplateSettings: [ + { + eventName: 'is', + eventRegex: true, + eventTemplate: + '{{name}} performed {{event}} with {{properties.key1}} {{properties.key2}}', + }, + { + eventName: '', + eventRegex: false, + eventTemplate: '', + }, + ], + identifyTemplate: 'identified {{name}} with {{traits}}', + webhookUrl: 'https://hooks.slack.com/services/THZM86VSS/BV9HZ2UN6/demo', + whitelistedTraitsSettings: [ + { + trait: 'hiji', + }, + { + trait: '', + }, + ], + denyListOfEvents: [ + { + eventName: 'black_event', + }, + ], + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + message: { + anonymousId: '00000000000000000000000000', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.1-rc.1', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.1-rc.1', + }, + locale: 'en-US', + os: { + name: '', + version: '', + }, + page: { + path: '/tests/html/script-test.html', + referrer: 'http://localhost:1111/tests/html/', + search: '', + title: '', + url: 'http://localhost:1111/tests/html/script-test.html', + }, + screen: { + density: 1.7999999523162842, + }, + traits: { + country: 'India', + email: 'name@domain.com', + hiji: 'hulala', + name: 'my-name', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36', + }, + event: 'test_eventing_test', + integrations: { + All: true, + }, + messageId: '8b8d5937-09bc-49dc-a35e-8cd6370575f8', + originalTimestamp: '2020-03-23T03:46:30.922Z', + properties: { + currency: 'USD', + key1: 'test_val1', + key2: 'test_val2', + revenue: 30, + user_actual_id: 12345, + }, + receivedAt: '2020-03-23T09:16:31.064+05:30', + request_ip: '[::1]:52054', + sentAt: '2020-03-23T03:46:30.923Z', + timestamp: '2020-03-23T09:16:31.063+05:30', + type: 'track', + userId: '12345', + }, + metadata: { + anonymousId: '00000000000000000000000000', + destinationId: '1ZQVSU9SXNg6KYgZALaqjAO3PIL', + destinationType: 'SLACK', + jobId: 129, + messageId: '8b8d5937-09bc-49dc-a35e-8cd6370575f8', + sourceId: '1YhwKyDcKstudlGxkeN5p2wgsrp', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://hooks.slack.com/services/id1/id2/example', + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + }, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: { + payload: '{"text":"my-name did test_eventing_test"}', + }, + }, + files: {}, + userId: '12345', + statusCode: 200, + }, + metadata: { + anonymousId: '00000000000000000000000000', + destinationId: '1ZQVSU9SXNg6KYgZALaqjAO3PIL', + destinationType: 'SLACK', + jobId: 129, + messageId: '8b8d5937-09bc-49dc-a35e-8cd6370575f8', + sourceId: '1YhwKyDcKstudlGxkeN5p2wgsrp', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'slack', + description: + 'Test 6 -> Track call with legacy webhook and custom template with properties and traits', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1ZQVSU9SXNg6KYgZALaqjAO3PIL', + Name: 'test-slack', + DestinationDefinition: { + ID: '1ZQUiJVMlmF7lfsdfXg7KXQnlLV', + Name: 'SLACK', + DisplayName: 'Slack', + Config: { + excludeKeys: [], + includeKeys: [], + }, + }, + Config: { + incomingWebhooksType: 'legacy', + eventChannelSettings: [ + { + eventChannelWebhook: 'https://hooks.slack.com/services/id1/id2/demo', + eventName: 'is', + eventRegex: true, + }, + { + eventChannelWebhook: 'https://hooks.slack.com/services/id1/id2/example+1', + eventName: 'is', + eventRegex: true, + }, + ], + eventTemplateSettings: [ + { + eventName: 'is', + eventRegex: true, + eventTemplate: + '{{name}} performed {{event}} with {{properties.key1}} {{properties.key2}} and traits {{traitsList.hiji}}', + }, + { + eventName: '', + eventRegex: false, + eventTemplate: '', + }, + ], + identifyTemplate: 'identified {{name}} with {{traits}}', + webhookUrl: 'https://hooks.slack.com/services/THZM86VSS/BV9HZ2UN6/demo', + whitelistedTraitsSettings: [ + { + trait: 'hiji', + }, + { + trait: '', + }, + ], + denyListOfEvents: [ + { + eventName: 'black_event', + }, + ], + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + message: { + anonymousId: '00000000000000000000000000', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.1-rc.1', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.1-rc.1', + }, + locale: 'en-US', + os: { + name: '', + version: '', + }, + page: { + path: '/tests/html/script-test.html', + referrer: 'http://localhost:1111/tests/html/', + search: '', + title: '', + url: 'http://localhost:1111/tests/html/script-test.html', + }, + screen: { + density: 1.7999999523162842, + }, + traits: { + country: 'India', + email: 'name@domain.com', + hiji: 'hulala', + name: 'my-name', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36', + }, + event: 'test_isent1', + integrations: { + All: true, + }, + messageId: '78102118-56ac-4c5a-a495-8cd7c8f71cc2', + originalTimestamp: '2020-03-23T03:46:30.921Z', + properties: { + currency: 'USD', + key1: 'test_val1', + key2: 'test_val2', + revenue: 30, + user_actual_id: 12345, + }, + receivedAt: '2020-03-23T09:16:31.064+05:30', + request_ip: '[::1]:52057', + sentAt: '2020-03-23T03:46:30.921Z', + timestamp: '2020-03-23T09:16:31.064+05:30', + type: 'track', + userId: '12345', + }, + metadata: { + anonymousId: '00000000000000000000000000', + destinationId: '1ZQVSU9SXNg6KYgZALaqjAO3PIL', + destinationType: 'SLACK', + jobId: 128, + messageId: '78102118-56ac-4c5a-a495-8cd7c8f71cc2', + sourceId: '1YhwKyDcKstudlGxkeN5p2wgsrp', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://hooks.slack.com/services/THZM86VSS/BV9HZ2UN6/demo', + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + }, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: { + payload: + '{"text":"my-name performed test_isent1 with test_val1 test_val2 and traits hulala","username":"RudderStack","icon_url":"https://cdn.rudderlabs.com/rudderstack.png"}', + }, + }, + files: {}, + userId: '12345', + statusCode: 200, + }, + metadata: { + anonymousId: '00000000000000000000000000', + destinationId: '1ZQVSU9SXNg6KYgZALaqjAO3PIL', + destinationType: 'SLACK', + jobId: 128, + messageId: '78102118-56ac-4c5a-a495-8cd7c8f71cc2', + sourceId: '1YhwKyDcKstudlGxkeN5p2wgsrp', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'slack', + description: + 'Test 7 -> Track call with legacy webhook and custom template with properties and custom channel from mapping', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1ZQVSU9SXNg6KYgZALaqjAO3PIL', + Name: 'test-slack', + DestinationDefinition: { + ID: '1ZQUiJVMlmF7lfsdfXg7KXQnlLV', + Name: 'SLACK', + DisplayName: 'Slack', + Config: { + excludeKeys: [], + includeKeys: [], + }, + }, + Config: { + incomingWebhooksType: 'legacy', + eventChannelSettings: [ + { + eventChannelWebhook: 'https://hooks.slack.com/services/id1/id2/example', + eventName: 'is', + eventRegex: true, + }, + { + eventChannelWebhook: 'https://hooks.slack.com/services/id1/id2/example+1', + eventChannel: 'example-of-legacy', + eventName: 'is', + eventRegex: true, + }, + ], + eventTemplateSettings: [ + { + eventName: 'is', + eventRegex: true, + eventTemplate: + '{{name}} performed {{event}} with {{properties.key1}} {{properties.key2}}', + }, + { + eventName: '', + eventRegex: false, + eventTemplate: '', + }, + ], + identifyTemplate: 'identified {{name}} with {{traits}}', + webhookUrl: 'https://hooks.slack.com/services/THZM86VSS/BV9HZ2UN6/demo', + whitelistedTraitsSettings: [ + { + trait: 'hiji', + }, + { + trait: '', + }, + ], + denyListOfEvents: [ + { + eventName: 'black_event', + }, + ], + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + message: { + anonymousId: '00000000000000000000000000', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.1-rc.1', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.1-rc.1', + }, + locale: 'en-US', + os: { + name: '', + version: '', + }, + page: { + path: '/tests/html/script-test.html', + referrer: 'http://localhost:1111/tests/html/', + search: '', + title: '', + url: 'http://localhost:1111/tests/html/script-test.html', + }, + screen: { + density: 1.7999999523162842, + }, + traits: { + country: 'India', + email: 'name@domain.com', + hiji: 'hulala', + name: 'my-name', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36', + }, + event: 'test_eventing_testis', + integrations: { + All: true, + }, + messageId: '8b8d5937-09bc-49dc-a35e-8cd6370575f8', + originalTimestamp: '2020-03-23T03:46:30.922Z', + properties: { + currency: 'USD', + key1: 'test_val1', + key2: 'test_val2', + revenue: 30, + user_actual_id: 12345, + }, + receivedAt: '2020-03-23T09:16:31.064+05:30', + request_ip: '[::1]:52054', + sentAt: '2020-03-23T03:46:30.923Z', + timestamp: '2020-03-23T09:16:31.063+05:30', + type: 'track', + userId: '12345', + }, + metadata: { + anonymousId: '00000000000000000000000000', + destinationId: '1ZQVSU9SXNg6KYgZALaqjAO3PIL', + destinationType: 'SLACK', + jobId: 129, + messageId: '8b8d5937-09bc-49dc-a35e-8cd6370575f8', + sourceId: '1YhwKyDcKstudlGxkeN5p2wgsrp', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://hooks.slack.com/services/THZM86VSS/BV9HZ2UN6/demo', + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + }, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: { + payload: + '{"channel":"example-of-legacy","text":"my-name performed test_eventing_testis with test_val1 test_val2","username":"RudderStack","icon_url":"https://cdn.rudderlabs.com/rudderstack.png"}', + }, + }, + files: {}, + userId: '12345', + statusCode: 200, + }, + metadata: { + anonymousId: '00000000000000000000000000', + destinationId: '1ZQVSU9SXNg6KYgZALaqjAO3PIL', + destinationType: 'SLACK', + jobId: 129, + messageId: '8b8d5937-09bc-49dc-a35e-8cd6370575f8', + sourceId: '1YhwKyDcKstudlGxkeN5p2wgsrp', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'slack', + description: 'Test 8 -> No Event Type', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1ZQVSU9SXNg6KYgZALaqjAO3PIL', + Name: 'test-slack', + DestinationDefinition: { + ID: '1ZQUiJVMlmF7lfsdfXg7KXQnlLV', + Name: 'SLACK', + DisplayName: 'Slack', + Config: { + excludeKeys: [], + includeKeys: [], + }, + }, + Config: { + eventChannelSettings: [ + { + eventChannelWebhook: 'https://hooks.slack.com/services/example/test/demo', + eventName: 'is', + eventRegex: true, + }, + ], + eventTemplateSettings: [ + { + eventName: 'is', + eventRegex: true, + eventTemplate: + '{{name}} performed {{event}} with {{properties.key1}} {{properties.key2}}', + }, + { + eventName: '', + eventRegex: false, + eventTemplate: '', + }, + ], + identifyTemplate: 'identified {{name}} with {{traits}}', + webhookUrl: 'https://hooks.slack.com/services/THZM86VSS/BV9HZ2UN6/demo', + whitelistedTraitsSettings: [ + { + trait: 'hiji', + }, + { + trait: '', + }, + ], + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + message: { + anonymousId: '00000000000000000000000000', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.1-rc.1', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.1-rc.1', + }, + locale: 'en-US', + os: { + name: '', + version: '', + }, + page: { + path: '/tests/html/script-test.html', + referrer: 'http://localhost:1111/tests/html/', + search: '', + title: '', + url: 'http://localhost:1111/tests/html/script-test.html', + }, + screen: { + density: 1.7999999523162842, + }, + traits: { + country: 'India', + email: 'name@domain.com', + hiji: 'hulala', + name: 'my-name', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36', + }, + event: 'test_eventing_testis', + integrations: { + All: true, + }, + messageId: '8b8d5937-09bc-49dc-a35e-8cd6370575f8', + originalTimestamp: '2020-03-23T03:46:30.922Z', + properties: { + currency: 'USD', + key1: 'test_val1', + key2: 'test_val2', + revenue: 30, + user_actual_id: 12345, + }, + receivedAt: '2020-03-23T09:16:31.064+05:30', + request_ip: '[::1]:52054', + sentAt: '2020-03-23T03:46:30.923Z', + timestamp: '2020-03-23T09:16:31.063+05:30', + userId: '12345', + }, + metadata: { + anonymousId: '00000000000000000000000000', + destinationId: '1ZQVSU9SXNg6KYgZALaqjAO3PIL', + destinationType: 'SLACK', + jobId: 129, + messageId: '8b8d5937-09bc-49dc-a35e-8cd6370575f8', + sourceId: '1YhwKyDcKstudlGxkeN5p2wgsrp', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + anonymousId: '00000000000000000000000000', + destinationId: '1ZQVSU9SXNg6KYgZALaqjAO3PIL', + destinationType: 'SLACK', + jobId: 129, + messageId: '8b8d5937-09bc-49dc-a35e-8cd6370575f8', + sourceId: '1YhwKyDcKstudlGxkeN5p2wgsrp', + }, + statusCode: 400, + error: 'Event type is required', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'SLACK', + module: 'destination', + implementation: 'native', + feature: 'processor', + destinationId: '1ZQVSU9SXNg6KYgZALaqjAO3PIL', + }, + }, + ], + }, + }, + }, + { + name: 'slack', + description: 'Test 9 -> Track call with no Event name', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1ZQVSU9SXNg6KYgZALaqjAO3PIL', + Name: 'test-slack', + DestinationDefinition: { + ID: '1ZQUiJVMlmF7lfsdfXg7KXQnlLV', + Name: 'SLACK', + DisplayName: 'Slack', + Config: { + excludeKeys: [], + includeKeys: [], + }, + }, + Config: { + eventChannelSettings: [ + { + eventChannelWebhook: 'https://hooks.slack.com/services/example/test/demo', + eventName: 'is', + eventRegex: true, + }, + ], + eventTemplateSettings: [ + { + eventName: 'is', + eventRegex: true, + eventTemplate: + '{{name}} performed {{event}} with {{properties.key1}} {{properties.key2}}', + }, + { + eventName: '', + eventRegex: false, + eventTemplate: '', + }, + ], + identifyTemplate: 'identified {{name}} with {{traits}}', + webhookUrl: 'https://hooks.slack.com/services/THZM86VSS/BV9HZ2UN6/demo', + whitelistedTraitsSettings: [ + { + trait: 'hiji', + }, + { + trait: '', + }, + ], + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + message: { + anonymousId: '00000000000000000000000000', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.1-rc.1', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.1-rc.1', + }, + locale: 'en-US', + os: { + name: '', + version: '', + }, + page: { + path: '/tests/html/script-test.html', + referrer: 'http://localhost:1111/tests/html/', + search: '', + title: '', + url: 'http://localhost:1111/tests/html/script-test.html', + }, + screen: { + density: 1.7999999523162842, + }, + traits: { + country: 'India', + email: 'name@domain.com', + hiji: 'hulala', + name: 'my-name', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36', + }, + integrations: { + All: true, + }, + messageId: '8b8d5937-09bc-49dc-a35e-8cd6370575f8', + originalTimestamp: '2020-03-23T03:46:30.922Z', + properties: { + currency: 'USD', + key1: 'test_val1', + key2: 'test_val2', + revenue: 30, + user_actual_id: 12345, + }, + receivedAt: '2020-03-23T09:16:31.064+05:30', + request_ip: '[::1]:52054', + sentAt: '2020-03-23T03:46:30.923Z', + timestamp: '2020-03-23T09:16:31.063+05:30', + type: 'track', + userId: '12345', + }, + metadata: { + anonymousId: '00000000000000000000000000', + destinationId: '1ZQVSU9SXNg6KYgZALaqjAO3PIL', + destinationType: 'SLACK', + jobId: 129, + messageId: '8b8d5937-09bc-49dc-a35e-8cd6370575f8', + sourceId: '1YhwKyDcKstudlGxkeN5p2wgsrp', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + anonymousId: '00000000000000000000000000', + destinationId: '1ZQVSU9SXNg6KYgZALaqjAO3PIL', + destinationType: 'SLACK', + jobId: 129, + messageId: '8b8d5937-09bc-49dc-a35e-8cd6370575f8', + sourceId: '1YhwKyDcKstudlGxkeN5p2wgsrp', + }, + statusCode: 400, + error: 'Event name is required', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'SLACK', + module: 'destination', + implementation: 'native', + feature: 'processor', + destinationId: '1ZQVSU9SXNg6KYgZALaqjAO3PIL', + }, + }, + ], + }, + }, + }, + { + name: 'slack', + description: + 'Test 10-> Track call with custom template but template is wrong ( space in `{{properties. key1}}` )', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1ZQVSU9SXNg6KYgZALaqjAO3PIL', + Name: 'test-slack', + DestinationDefinition: { + ID: '1ZQUiJVMlmF7lfsdfXg7KXQnlLV', + Name: 'SLACK', + DisplayName: 'Slack', + Config: { + excludeKeys: [], + includeKeys: [], + }, + }, + Config: { + eventChannelSettings: [ + { + eventChannelWebhook: 'https://hooks.slack.com/services/example/test/demo', + eventName: 'is', + eventRegex: true, + }, + ], + eventTemplateSettings: [ + { + eventName: 'is', + eventRegex: true, + eventTemplate: + '{{name}} performed {{event}} with {{properties. key1}} {{properties.key2}} and traits {{traitsList.hiji}}', + }, + { + eventName: '', + eventRegex: false, + eventTemplate: '', + }, + ], + identifyTemplate: 'identified {{name}} with {{traits}}', + webhookUrl: 'https://hooks.slack.com/services/THZM86VSS/BV9HZ2UN6/demo', + whitelistedTraitsSettings: [ + { + trait: 'hiji', + }, + { + trait: '', + }, + ], + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + message: { + anonymousId: '00000000000000000000000000', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.1-rc.1', + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.1-rc.1', + }, + locale: 'en-US', + os: { + name: '', + version: '', + }, + page: { + path: '/tests/html/script-test.html', + referrer: 'http://localhost:1111/tests/html/', + search: '', + title: '', + url: 'http://localhost:1111/tests/html/script-test.html', + }, + screen: { + density: 1.7999999523162842, + }, + traits: { + country: 'India', + email: 'name@domain.com', + hiji: 'hulala', + name: 'my-name', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36', + }, + event: 'test_isent1', + integrations: { + All: true, + }, + messageId: '78102118-56ac-4c5a-a495-8cd7c8f71cc2', + originalTimestamp: '2020-03-23T03:46:30.921Z', + properties: { + currency: 'USD', + key1: 'test_val1', + key2: 'test_val2', + revenue: 30, + user_actual_id: 12345, + }, + receivedAt: '2020-03-23T09:16:31.064+05:30', + request_ip: '[::1]:52057', + sentAt: '2020-03-23T03:46:30.921Z', + timestamp: '2020-03-23T09:16:31.064+05:30', + type: 'track', + userId: '12345', + }, + metadata: { + anonymousId: '00000000000000000000000000', + destinationId: '1ZQVSU9SXNg6KYgZALaqjAO3PIL', + destinationType: 'SLACK', + jobId: 128, + messageId: '78102118-56ac-4c5a-a495-8cd7c8f71cc2', + sourceId: '1YhwKyDcKstudlGxkeN5p2wgsrp', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + metadata: { + anonymousId: '00000000000000000000000000', + destinationId: '1ZQVSU9SXNg6KYgZALaqjAO3PIL', + destinationType: 'SLACK', + jobId: 128, + messageId: '78102118-56ac-4c5a-a495-8cd7c8f71cc2', + sourceId: '1YhwKyDcKstudlGxkeN5p2wgsrp', + }, + statusCode: 400, + error: + "Something is wrong with the event template: '{{name}} performed {{event}} with {{properties. key1}} {{properties.key2}} and traits {{traitsList.hiji}}'", + statTags: { + errorCategory: 'dataValidation', + errorType: 'configuration', + destType: 'SLACK', + module: 'destination', + implementation: 'native', + feature: 'processor', + destinationId: '1ZQVSU9SXNg6KYgZALaqjAO3PIL', + }, + }, + ], + }, + }, + }, + { + name: 'slack', + description: 'Test 11 -> Track call with default template', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + ID: '1ZQVSU9SXNg6KYgZALaqjAO3PIL', + Name: 'test-slack', + DestinationDefinition: { + ID: '1ZQUiJVMlmF7lfsdfXg7KXQnlLV', + Name: 'SLACK', + DisplayName: 'Slack', + Config: { + excludeKeys: [], + includeKeys: [], + }, + }, + Config: { + eventChannelSettings: [ + { + eventChannelWebhook: 'https://hooks.slack.com/services/example/test/demo', + eventName: 'is', + eventRegex: true, + }, + ], + eventTemplateSettings: [ + { + eventName: 'is', + eventRegex: true, + eventTemplate: + '{{name}} performed {{event}} with {{properties.key1}} {{properties.key2}}', + }, + { + eventName: '', + eventRegex: false, + eventTemplate: '', + }, + ], + webhookUrl: 'https://hooks.slack.com/services/THZM86VSS/BV9HZ2UN6/demo', + whitelistedTraitsSettings: [ + { + trait: 'hiji', + }, + { + trait: '', + }, + ], + }, + Enabled: true, + Transformations: [], + IsProcessorEnabled: true, + }, + message: { + anonymousId: '00000000000000000000000000', + channel: 'web', + context: {}, + event: 'black_event', + integrations: { + All: true, + }, + messageId: '8b8d5937-09bc-49dc-a35e-8cd6370575f8', + originalTimestamp: '2020-03-23T03:46:30.922Z', + properties: { + currency: 'USD', + key1: 'test_val1', + key2: 'test_val2', + revenue: 30, + user_actual_id: 12345, + }, + receivedAt: '2020-03-23T09:16:31.064+05:30', + request_ip: '[::1]:52054', + sentAt: '2020-03-23T03:46:30.923Z', + timestamp: '2020-03-23T09:16:31.063+05:30', + type: 'track', + userId: '12345', + }, + metadata: { + anonymousId: '00000000000000000000000000', + destinationId: '1ZQVSU9SXNg6KYgZALaqjAO3PIL', + destinationType: 'SLACK', + jobId: 129, + messageId: '8b8d5937-09bc-49dc-a35e-8cd6370575f8', + sourceId: '1YhwKyDcKstudlGxkeN5p2wgsrp', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://hooks.slack.com/services/THZM86VSS/BV9HZ2UN6/demo', + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + }, + params: {}, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: { + payload: + '{"text":"User 12345 did black_event","username":"RudderStack","icon_url":"https://cdn.rudderlabs.com/rudderstack.png"}', + }, + }, + files: {}, + userId: '12345', + statusCode: 200, + }, + metadata: { + anonymousId: '00000000000000000000000000', + destinationId: '1ZQVSU9SXNg6KYgZALaqjAO3PIL', + destinationType: 'SLACK', + jobId: 129, + messageId: '8b8d5937-09bc-49dc-a35e-8cd6370575f8', + sourceId: '1YhwKyDcKstudlGxkeN5p2wgsrp', + }, + statusCode: 200, + }, + ], + }, + }, + }, +]; From e53b3046252bb5abcae046445baf4a67c40f37a3 Mon Sep 17 00:00:00 2001 From: Sankeerth Date: Wed, 17 Jan 2024 17:13:25 +0530 Subject: [PATCH 129/135] fix: mixpanel alias simplified merge error message (#2996) --- src/v0/destinations/mp/transform.js | 4 +++- test/integrations/destinations/mp/processor/data.ts | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/v0/destinations/mp/transform.js b/src/v0/destinations/mp/transform.js index 3d0aaa7c4c..0cfedafafb 100644 --- a/src/v0/destinations/mp/transform.js +++ b/src/v0/destinations/mp/transform.js @@ -441,7 +441,9 @@ const processSingleMessage = (message, destination) => { return processIdentifyEvents(clonedMessage, clonedMessage.type, destination); case EventType.ALIAS: if (destination.Config?.identityMergeApi === 'simplified') { - throw new InstrumentationError('Alias call is deprecated in `Simplified ID merge`'); + throw new InstrumentationError( + 'The use of the alias call in the context of the `Simplified ID merge` feature is not supported anymore.', + ); } return processAliasEvents(message, message.type, destination); case EventType.GROUP: diff --git a/test/integrations/destinations/mp/processor/data.ts b/test/integrations/destinations/mp/processor/data.ts index a6ba51ee78..bdfa82242e 100644 --- a/test/integrations/destinations/mp/processor/data.ts +++ b/test/integrations/destinations/mp/processor/data.ts @@ -4986,7 +4986,8 @@ export const data = [ status: 200, body: [ { - error: 'Alias call is deprecated in `Simplified ID merge`', + error: + 'The use of the alias call in the context of the `Simplified ID merge` feature is not supported anymore.', statTags: { destType: 'MP', errorCategory: 'dataValidation', From 7aa6687829783df3924a89698a53b9cb315449eb Mon Sep 17 00:00:00 2001 From: Anant Jain <62471433+anantjain45823@users.noreply.github.com> Date: Thu, 18 Jan 2024 11:42:53 +0530 Subject: [PATCH 130/135] fix: klaviyo validate event name to be string before accessing it (#2998) --- src/v0/destinations/klaviyo/transform.js | 3 + .../destinations/klaviyo/processor/data.ts | 4928 +++++++++-------- 2 files changed, 2502 insertions(+), 2429 deletions(-) diff --git a/src/v0/destinations/klaviyo/transform.js b/src/v0/destinations/klaviyo/transform.js index 9273b6a048..3c2f8137f2 100644 --- a/src/v0/destinations/klaviyo/transform.js +++ b/src/v0/destinations/klaviyo/transform.js @@ -156,6 +156,9 @@ const trackRequestHandler = (message, category, destination) => { const payload = {}; const { privateApiKey, flattenProperties } = destination.Config; let event = get(message, 'event'); + if (event && typeof event !== 'string') { + throw new InstrumentationError('Event type should be a string'); + } event = event ? event.trim().toLowerCase() : event; let attributes = {}; if (ecomEvents.includes(event) && message.properties) { diff --git a/test/integrations/destinations/klaviyo/processor/data.ts b/test/integrations/destinations/klaviyo/processor/data.ts index 2025957716..58a1064251 100644 --- a/test/integrations/destinations/klaviyo/processor/data.ts +++ b/test/integrations/destinations/klaviyo/processor/data.ts @@ -1,2430 +1,2500 @@ export const data = [ - { - "name": "klaviyo", - "description": "Profile updating call and subscribe user (old transformer)", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey" - } - }, - "message": { - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "user@1", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "traits": { - "firstName": "Test", - "lastName": "Rudderlabs", - "email": "test@rudderstack.com", - "phone": "+12 345 578 900", - "userId": "user@1", - "title": "Developer", - "organization": "Rudder", - "city": "Tokyo", - "region": "Kanto", - "country": "JP", - "zip": "100-0001", - "Flagged": false, - "Residence": "Shibuya", - "properties": { - "listId": "XUepkK", - "subscribe": true, - "consent": [ - "email", - "sms" - ] - } - }, - "locale": "en-US", - "screen": { - "density": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.11" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": - { - "version": "1", - "type": "REST", - "userId": "", - "method": "PATCH", - "endpoint": "https://a.klaviyo.com/api/profiles/01GW3PHVY0MTCDGS0A1612HARX", - "headers": { - "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", - "Content-Type": "application/json", - "Accept": "application/json", - "revision": "2023-02-22" - }, - "params": {}, - "body": { - "JSON": { - "data": { - "type": "profile", - "attributes": { - "external_id": "user@1", - "email": "test@rudderstack.com", - "first_name": "Test", - "last_name": "Rudderlabs", - "phone_number": "+12 345 578 900", - "title": "Developer", - "organization": "Rudder", - "location": { - "city": "Tokyo", - "region": "Kanto", - "country": "JP", - "zip": "100-0001" - }, - "properties": { - "Flagged": false, - "Residence": "Shibuya" - } - }, - "id": "01GW3PHVY0MTCDGS0A1612HARX" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - "statusCode": 200 - }, { - "output": - { - "version": "1", - "type": "REST", - "method": "POST", - "userId": "", - "endpoint": "https://a.klaviyo.com/api/profile-subscription-bulk-create-jobs", - "headers": { - "Content-Type": "application/json", - "Accept": "application/json", - "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", - "revision": "2023-02-22" - }, - "params": {}, - "body": { - "JSON": { - "data": { - "type": "profile-subscription-bulk-create-job", - "attributes": { - "list_id": "XUepkK", - "subscriptions": [ - { - "email": "test@rudderstack.com", - "phone_number": "+12 345 578 900", - "channels": { - "email": [ - "MARKETING" - ], - "sms": [ - "MARKETING" - ] - } - } - ] - } - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "klaviyo", - "description": "Identify call for with flattenProperties enabled (old transformer)", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey", - "flattenProperties": true - } - }, - "message": { - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "user@1", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "traits": { - "firstName": "Test", - "lastName": "Rudderlabs", - "email": "test@rudderstack.com", - "phone": "+12 345 578 900", - "userId": "user@1", - "title": "Developer", - "organization": "Rudder", - "city": "Tokyo", - "region": "Kanto", - "country": "JP", - "zip": "100-0001", - "Flagged": false, - "Residence": "Shibuya", - "friend": { - "names": { - "first": "Alice", - "last": "Smith" - }, - "age": 25 - }, - "properties": { - "listId": "XUepkK", - "subscribe": true, - "consent": [ - "email", - "sms" - ] - } - }, - "locale": "en-US", - "screen": { - "density": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.11" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": - { - "version": "1", - "type": "REST", - "userId": "", - "method": "PATCH", - "endpoint": "https://a.klaviyo.com/api/profiles/01GW3PHVY0MTCDGS0A1612HARX", - "headers": { - "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", - "Content-Type": "application/json", - "Accept": "application/json", - "revision": "2023-02-22" - }, - "params": {}, - "body": { - "JSON": { - "data": { - "type": "profile", - "attributes": { - "external_id": "user@1", - "email": "test@rudderstack.com", - "first_name": "Test", - "last_name": "Rudderlabs", - "phone_number": "+12 345 578 900", - "title": "Developer", - "organization": "Rudder", - "location": { - "city": "Tokyo", - "region": "Kanto", - "country": "JP", - "zip": "100-0001" - }, - "properties": { - "friend.age": 25, - "friend.names.first": "Alice", - "friend.names.last": "Smith", - "Flagged": false, - "Residence": "Shibuya" - } - }, - "id": "01GW3PHVY0MTCDGS0A1612HARX" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - "statusCode": 200 - }, - { - "output": { - "version": "1", - "type": "REST", - "userId": "", - "method": "POST", - "endpoint": "https://a.klaviyo.com/api/profile-subscription-bulk-create-jobs", - "headers": { - "Content-Type": "application/json", - "Accept": "application/json", - "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", - "revision": "2023-02-22" - }, - "params": {}, - "body": { - "JSON": { - "data": { - "type": "profile-subscription-bulk-create-job", - "attributes": { - "list_id": "XUepkK", - "subscriptions": [ - { - "email": "test@rudderstack.com", - "phone_number": "+12 345 578 900", - "channels": { - "email": [ - "MARKETING" - ], - "sms": [ - "MARKETING" - ] - } - } - ] - } - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "klaviyo", - "description": "Profile updation call and subcribe user", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKeyforfailure" - } - }, - "message": { - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "user@1", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "traits": { - "firstName": "Test", - "lastName": "Rudderlabs", - "email": "test3@rudderstack.com", - "phone": "+12 345 578 900", - "userId": "user@1", - "title": "Developer", - "organization": "Rudder", - "city": "Tokyo", - "region": "Kanto", - "country": "JP", - "zip": "100-0001", - "Flagged": false, - "Residence": "Shibuya", - "properties": { - "listId": "XUepkK", - "subscribe": true, - "consent": [ - "email", - "sms" - ] - } - }, - "locale": "en-US", - "screen": { - "density": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.11" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "error": "{\"message\":\"Failed to create user due to \\\"\\\"\",\"destinationResponse\":\"\\\"\\\"\"}", - "statTags": { - "destType": "KLAVIYO", - "errorCategory": "network", - "errorType": "retryable", - "feature": "processor", - "implementation": "native", - "module": "destination" - }, - "statusCode": 500 - } - ] - } - } - }, - { - "name": "klaviyo", - "description": "Profile updation call listId is not provided for subscribing the user", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey" - } - }, - "message": { - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "user@1", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "traits": { - "firstName": "Test", - "lastName": "Rudderlabs", - "email": "test@rudderstack.com", - "phone": "+12 345 578 900", - "userId": "user@1", - "title": "Developer", - "organization": "Rudder", - "city": "Tokyo", - "region": "Kanto", - "country": "JP", - "zip": "100-0001", - "Flagged": false, - "Residence": "Shibuya", - "properties": { - "subscribe": false, - "consent": [ - "email", - "sms" - ] - } - }, - "locale": "en-US", - "screen": { - "density": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.11" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "PATCH", - "endpoint": "https://a.klaviyo.com/api/profiles/01GW3PHVY0MTCDGS0A1612HARX", - "headers": { - "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", - "Content-Type": "application/json", - "Accept": "application/json", - "revision": "2023-02-22" - }, - "params": {}, - "body": { - "JSON": { - "data": { - "type": "profile", - "attributes": { - "external_id": "user@1", - "email": "test@rudderstack.com", - "first_name": "Test", - "last_name": "Rudderlabs", - "phone_number": "+12 345 578 900", - "title": "Developer", - "organization": "Rudder", - "location": { - "city": "Tokyo", - "region": "Kanto", - "country": "JP", - "zip": "100-0001" - }, - "properties": { - "Flagged": false, - "Residence": "Shibuya" - } - }, - "id": "01GW3PHVY0MTCDGS0A1612HARX" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "klaviyo", - "description": "Identify call with enforceEmailAsPrimary enabled from UI", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey", - "enforceEmailAsPrimary": true - } - }, - "message": { - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "user@1", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "traits": { - "firstName": "Test", - "lastName": "Rudderlabs", - "email": "test@rudderstack.com", - "phone": "+12 345 578 900", - "userId": "user@1", - "title": "Developer", - "organization": "Rudder", - "city": "Tokyo", - "region": "Kanto", - "country": "JP", - "zip": "100-0001", - "Flagged": false, - "Residence": "Shibuya", - "properties": { - "listId": "XUepkK", - "subscribe": true, - "consent": [ - "email", - "sms" - ] - } - }, - "locale": "en-US", - "screen": { - "density": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.11" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": - { - "version": "1", - "type": "REST", - "userId": "", - "method": "PATCH", - "endpoint": "https://a.klaviyo.com/api/profiles/01GW3PHVY0MTCDGS0A1612HARX", - "headers": { - "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", - "Content-Type": "application/json", - "Accept": "application/json", - "revision": "2023-02-22" - }, - "params": {}, - "body": { - "JSON": { - "data": { - "type": "profile", - "attributes": { - "email": "test@rudderstack.com", - "first_name": "Test", - "last_name": "Rudderlabs", - "phone_number": "+12 345 578 900", - "title": "Developer", - "organization": "Rudder", - "location": { - "city": "Tokyo", - "region": "Kanto", - "country": "JP", - "zip": "100-0001" - }, - "properties": { - "Flagged": false, - "Residence": "Shibuya", - "_id": "user@1" - } - }, - "id": "01GW3PHVY0MTCDGS0A1612HARX" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - "statusCode": 200 - }, - { - "output": { - "version": "1", - "type": "REST", - "userId": "", - "method": "POST", - "endpoint": "https://a.klaviyo.com/api/profile-subscription-bulk-create-jobs", - "headers": { - "Content-Type": "application/json", - "Accept": "application/json", - "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", - "revision": "2023-02-22" - }, - "params": {}, - "body": { - "JSON": { - "data": { - "type": "profile-subscription-bulk-create-job", - "attributes": { - "list_id": "XUepkK", - "subscriptions": [ - { - "email": "test@rudderstack.com", - "phone_number": "+12 345 578 900", - "channels": { - "email": [ - "MARKETING" - ], - "sms": [ - "MARKETING" - ] - } - } - ] - } - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "klaviyo", - "description": "Identify call without user custom Properties", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey", - "enforceEmailAsPrimary": false - } - }, - "message": { - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "user@1", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "traits": { - "firstName": "Test", - "lastName": "Rudderlabs", - "email": "test@rudderstack.com", - "phone": "+12 345 578 900", - "userId": "user@1", - "title": "Developer", - "organization": "Rudder", - "city": "Tokyo", - "region": "Kanto", - "country": "JP", - "zip": "100-0001", - "properties": { - "listId": "XUepkK", - "subscribe": true, - "consent": [ - "email", - "sms" - ] - } - }, - "locale": "en-US", - "screen": { - "density": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.11" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "userId": "", - "method": "PATCH", - "endpoint": "https://a.klaviyo.com/api/profiles/01GW3PHVY0MTCDGS0A1612HARX", - "headers": { - "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", - "Content-Type": "application/json", - "Accept": "application/json", - "revision": "2023-02-22" - }, - "params": {}, - "body": { - "JSON": { - "data": { - "type": "profile", - "attributes": { - "email": "test@rudderstack.com", - "first_name": "Test", - "last_name": "Rudderlabs", - "phone_number": "+12 345 578 900", - "external_id": "user@1", - "title": "Developer", - "organization": "Rudder", - "location": { - "city": "Tokyo", - "region": "Kanto", - "country": "JP", - "zip": "100-0001" - } - }, - "id": "01GW3PHVY0MTCDGS0A1612HARX" - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - "statusCode": 200 - }, - { - "output": { - "version": "1", - "type": "REST", - "userId": "", - "method": "POST", - "endpoint": "https://a.klaviyo.com/api/profile-subscription-bulk-create-jobs", - "headers": { - "Content-Type": "application/json", - "Accept": "application/json", - "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", - "revision": "2023-02-22" - }, - "params": {}, - "body": { - "JSON": { - "data": { - "type": "profile-subscription-bulk-create-job", - "attributes": { - "list_id": "XUepkK", - "subscriptions": [ - { - "email": "test@rudderstack.com", - "phone_number": "+12 345 578 900", - "channels": { - "email": [ - "MARKETING" - ], - "sms": [ - "MARKETING" - ] - } - } - ] - } - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {} - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "klaviyo", - "description": "Identify call without email and phone & enforceEmailAsPrimary enabled from UI", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey", - "enforceEmailAsPrimary": true - } - }, - "message": { - "type": "identify", - "sentAt": "2021-01-03T17:02:53.195Z", - "userId": "user@1", - "channel": "web", - "context": { - "os": { - "name": "", - "version": "" - }, - "app": { - "name": "RudderLabs JavaScript SDK", - "build": "1.0.0", - "version": "1.1.11", - "namespace": "com.rudderlabs.javascript" - }, - "traits": { - "firstName": "Test", - "lastName": "Rudderlabs", - "userId": "user@1", - "title": "Developer", - "organization": "Rudder", - "city": "Tokyo", - "region": "Kanto", - "country": "JP", - "zip": "100-0001", - "Flagged": false, - "Residence": "Shibuya", - "properties": { - "listId": "XUepkK", - "subscribe": true, - "consent": [ - "email", - "sms" - ] - } - }, - "locale": "en-US", - "screen": { - "density": 2 - }, - "library": { - "name": "RudderLabs JavaScript SDK", - "version": "1.1.11" - }, - "campaign": {}, - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0" - }, - "rudderId": "8f8fa6b5-8e24-489c-8e22-61f23f2e364f", - "messageId": "2116ef8c-efc3-4ca4-851b-02ee60dad6ff", - "anonymousId": "97c46c81-3140-456d-b2a9-690d70aaca35", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-01-03T17:02:53.193Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "error": "None of email and phone are present in the payload", - "statTags": { - "destType": "KLAVIYO", - "errorCategory": "dataValidation", - "errorType": "instrumentation", - "feature": "processor", - "implementation": "native", - "module": "destination" - }, - "statusCode": 400 - } - ] - } - } - }, - { - "name": "klaviyo", - "description": "Screen event call", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey" - } - }, - "message": { - "type": "screen", - "event": "TestEven001", - "sentAt": "2021-01-25T16:12:02.048Z", - "userId": "sajal12", - "channel": "mobile", - "context": { - "os": { - "name": "Android", - "version": "10" - }, - "app": { - "name": "KlaviyoTest", - "build": "1", - "version": "1.0", - "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" - }, - "device": { - "id": "9c6bd77ea9da3e68", - "name": "raphaelin", - "type": "android", - "model": "Redmi K20 Pro", - "manufacturer": "Xiaomi" - }, - "locale": "en-IN", - "screen": { - "width": 1080, - "height": 2210, - "density": 440 - }, - "traits": { - "id": "user@1", - "age": "22", - "email": "test@rudderstack.com", - "phone": "9112340375", - "anonymousId": "9c6bd77ea9da3e68" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.2" - }, - "network": { - "wifi": true, - "carrier": "airtel", - "cellular": true, - "bluetooth": false - }, - "timezone": "Asia/Kolkata", - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)" - }, - "rudderId": "b7b24f86-f7bf-46d8-b2b4-ccafc080239c", - "messageId": "1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce", - "properties": { - "PreviouslyVicePresident": true, - "YearElected": 1801, - "VicePresidents": [ - "Aaron Burr", - "George Clinton" - ] - }, - "anonymousId": "9c6bd77ea9da3e68", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-01-25T15:32:56.409Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://a.klaviyo.com/api/events", - "headers": { - "Accept": "application/json", - "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", - "Content-Type": "application/json", - "revision": "2023-02-22" - }, - "params": {}, - "body": { - "JSON": { - "data": { - "type": "event", - "attributes": { - "metric": { - "name": "TestEven001" - }, - "properties": { - "PreviouslyVicePresident": true, - "YearElected": 1801, - "VicePresidents": [ - "Aaron Burr", - "George Clinton" - ] - }, - "profile": { - "$email": "test@rudderstack.com", - "$phone_number": "9112340375", - "$id": "sajal12", - "age": "22" - } - } - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "klaviyo", - "description": "Track event call with flatten properties enabled", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey", - "flattenProperties": true - } - }, - "message": { - "type": "track", - "event": "TestEven001", - "sentAt": "2021-01-25T16:12:02.048Z", - "userId": "sajal12", - "channel": "mobile", - "context": { - "os": { - "name": "Android", - "version": "10" - }, - "app": { - "name": "KlaviyoTest", - "build": "1", - "version": "1.0", - "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" - }, - "device": { - "id": "9c6bd77ea9da3e68", - "name": "raphaelin", - "type": "android", - "model": "Redmi K20 Pro", - "manufacturer": "Xiaomi" - }, - "locale": "en-IN", - "screen": { - "width": 1080, - "height": 2210, - "density": 440 - }, - "traits": { - "id": "user@1", - "age": "22", - "email": "test@rudderstack.com", - "phone": "9112340375", - "anonymousId": "9c6bd77ea9da3e68", - "plan_details": { - "plan_type": "gold", - "duration": "3 months" - } - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.2" - }, - "network": { - "wifi": true, - "carrier": "airtel", - "cellular": true, - "bluetooth": false - }, - "timezone": "Asia/Kolkata", - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)" - }, - "rudderId": "b7b24f86-f7bf-46d8-b2b4-ccafc080239c", - "messageId": "1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce", - "properties": { - "vicePresdentInfo": { - "PreviouslVicePresident": true, - "YearElected": 1801, - "VicePresidents": [ - "AaronBurr", - "GeorgeClinton" - ] - } - }, - "anonymousId": "9c6bd77ea9da3e68", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-01-25T15:32:56.409Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://a.klaviyo.com/api/events", - "headers": { - "Accept": "application/json", - "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", - "Content-Type": "application/json", - "revision": "2023-02-22" - }, - "params": {}, - "body": { - "JSON": { - "data": { - "type": "event", - "attributes": { - "metric": { - "name": "TestEven001" - }, - "properties": { - "vicePresdentInfo.PreviouslVicePresident": true, - "vicePresdentInfo.VicePresidents": [ - "AaronBurr", - "GeorgeClinton" - ], - "vicePresdentInfo.YearElected": 1801 - }, - "profile": { - "$email": "test@rudderstack.com", - "$phone_number": "9112340375", - "$id": "sajal12", - "age": "22", - "plan_details.plan_type": "gold", - "plan_details.duration": "3 months" - } - } - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "klaviyo", - "description": "Track event call", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey" - } - }, - "message": { - "type": "track", - "event": "TestEven002", - "sentAt": "2021-01-25T16:12:02.048Z", - "userId": "sajal12", - "channel": "mobile", - "context": { - "os": { - "name": "Android", - "version": "10" - }, - "app": { - "name": "KlaviyoTest", - "build": "1", - "version": "1.0", - "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" - }, - "device": { - "id": "9c6bd77ea9da3e68", - "name": "raphaelin", - "type": "android", - "model": "Redmi K20 Pro", - "manufacturer": "Xiaomi" - }, - "locale": "en-IN", - "screen": { - "width": 1080, - "height": 2210, - "density": 440 - }, - "traits": { - "id": "user@1", - "age": "22", - "name": "Test", - "email": "test@rudderstack.com", - "phone": "9112340375", - "anonymousId": "9c6bd77ea9da3e68", - "description": "Sample description" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.2" - }, - "network": { - "wifi": true, - "carrier": "airtel", - "cellular": true, - "bluetooth": false - }, - "timezone": "Asia/Kolkata", - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)" - }, - "rudderId": "b7b24f86-f7bf-46d8-b2b4-ccafc080239c", - "messageId": "1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce", - "properties": { - "PreviouslyVicePresident": true, - "YearElected": 1801, - "VicePresidents": [ - "Aaron Burr", - "George Clinton" - ], - "revenue": 3000 - }, - "anonymousId": "9c6bd77ea9da3e68", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-01-25T15:32:56.409Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://a.klaviyo.com/api/events", - "headers": { - "Accept": "application/json", - "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", - "Content-Type": "application/json", - "revision": "2023-02-22" - }, - "params": {}, - "body": { - "JSON": { - "data": { - "type": "event", - "attributes": { - "metric": { - "name": "TestEven002" - }, - "properties": { - "PreviouslyVicePresident": true, - "YearElected": 1801, - "VicePresidents": [ - "Aaron Burr", - "George Clinton" - ] - }, - "profile": { - "$email": "test@rudderstack.com", - "$phone_number": "9112340375", - "$id": "sajal12", - "age": "22", - "name": "Test", - "description": "Sample description" - }, - "value": 3000 - } - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "klaviyo", - "description": "Track event call, with make email or phone as primary identifier toggle on", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey", - "enforceEmailAsPrimary": true - } - }, - "message": { - "type": "track", - "event": "TestEven001", - "sentAt": "2021-01-25T16:12:02.048Z", - "userId": "sajal12", - "channel": "mobile", - "context": { - "os": { - "name": "Android", - "version": "10" - }, - "app": { - "name": "KlaviyoTest", - "build": "1", - "version": "1.0", - "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" - }, - "device": { - "id": "9c6bd77ea9da3e68", - "name": "raphaelin", - "type": "android", - "model": "Redmi K20 Pro", - "manufacturer": "Xiaomi" - }, - "locale": "en-IN", - "screen": { - "width": 1080, - "height": 2210, - "density": 440 - }, - "traits": { - "id": "user@1", - "age": "22", - "email": "test@rudderstack.com", - "phone": "9112340375", - "anonymousId": "9c6bd77ea9da3e68" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.2" - }, - "network": { - "wifi": true, - "carrier": "airtel", - "cellular": true, - "bluetooth": false - }, - "timezone": "Asia/Kolkata", - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)" - }, - "rudderId": "b7b24f86-f7bf-46d8-b2b4-ccafc080239c", - "messageId": "1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce", - "properties": { - "PreviouslyVicePresident": true, - "YearElected": 1801, - "VicePresidents": [ - "Aaron Burr", - "George Clinton" - ] - }, - "anonymousId": "9c6bd77ea9da3e68", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-01-25T15:32:56.409Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://a.klaviyo.com/api/events", - "headers": { - "Accept": "application/json", - "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", - "Content-Type": "application/json", - "revision": "2023-02-22" - }, - "params": {}, - "body": { - "JSON": { - "data": { - "type": "event", - "attributes": { - "metric": { - "name": "TestEven001" - }, - "properties": { - "PreviouslyVicePresident": true, - "YearElected": 1801, - "VicePresidents": [ - "Aaron Burr", - "George Clinton" - ] - }, - "profile": { - "$email": "test@rudderstack.com", - "$phone_number": "9112340375", - "age": "22", - "_id": "sajal12" - } - } - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "klaviyo", - "description": "Track event call, without email and phone & with (make email or phone as primary identifier) toggle on", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey", - "enforceEmailAsPrimary": true - } - }, - "message": { - "type": "track", - "event": "TestEven001", - "sentAt": "2021-01-25T16:12:02.048Z", - "userId": "sajal12", - "channel": "mobile", - "context": { - "os": { - "name": "Android", - "version": "10" - }, - "app": { - "name": "KlaviyoTest", - "build": "1", - "version": "1.0", - "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" - }, - "device": { - "id": "9c6bd77ea9da3e68", - "name": "raphaelin", - "type": "android", - "model": "Redmi K20 Pro", - "manufacturer": "Xiaomi" - }, - "locale": "en-IN", - "screen": { - "width": 1080, - "height": 2210, - "density": 440 - }, - "traits": { - "id": "user@1", - "age": "22", - "anonymousId": "9c6bd77ea9da3e68" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.2" - }, - "network": { - "wifi": true, - "carrier": "airtel", - "cellular": true, - "bluetooth": false - }, - "timezone": "Asia/Kolkata", - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)" - }, - "rudderId": "b7b24f86-f7bf-46d8-b2b4-ccafc080239c", - "messageId": "1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce", - "properties": { - "PreviouslyVicePresident": true, - "YearElected": 1801, - "VicePresidents": [ - "Aaron Burr", - "George Clinton" - ] - }, - "anonymousId": "9c6bd77ea9da3e68", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-01-25T15:32:56.409Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "error": "None of email and phone are present in the payload", - "statTags": { - "destType": "KLAVIYO", - "errorCategory": "dataValidation", - "errorType": "instrumentation", - "feature": "processor", - "implementation": "native", - "module": "destination" - }, - "statusCode": 400 - } - ] - } - } - }, - { - "name": "klaviyo", - "description": "group call", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey" - } - }, - "message": { - "userId": "user123", - "type": "group", - "groupId": "XUepkK", - "traits": { - "subscribe": true - }, - "context": { - "traits": { - "email": "test@rudderstack.com", - "phone": "+12 345 678 900", - "consent": [ - "email" - ] - }, - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-01-21T00:21:34.208Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { "output": { "body": { "FORM": {}, "JSON": { "data": { "attributes": { "list_id": "XUepkK", "subscriptions": [{ "email": "test@rudderstack.com", "phone_number": "+12 345 678 900" }] }, "type": "profile-subscription-bulk-create-job" } }, "JSON_ARRAY": {}, "XML": {} }, "endpoint": "https://a.klaviyo.com/api/profile-subscription-bulk-create-jobs", "files": {}, "headers": { "Accept": "application/json", "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", "Content-Type": "application/json", "revision": "2023-02-22" }, "method": "POST", "params": {}, "type": "REST", "userId": "", "version": "1" }, "statusCode": 200 } - ] - } - } - }, - { - "name": "klaviyo", - "description": "group call without groupId", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey" - } - }, - "message": { - "userId": "user123", - "type": "group", - "groupId": "", - "traits": { - "subscribe": true - }, - "context": { - "traits": { - "email": "test@rudderstack.com", - "phone": "+12 345 678 900", - "consent": "email" - }, - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-01-21T00:21:34.208Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "error": "groupId is a required field for group events", - "statTags": { - "destType": "KLAVIYO", - "errorCategory": "dataValidation", - "errorType": "instrumentation", - "feature": "processor", - "implementation": "native", - "module": "destination" - }, - "statusCode": 400 - } - ] - } - } - }, - { - "name": "klaviyo", - "description": "[Error]: Check for unsupported message type", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey" - } - }, - "message": { - "userId": "user123", - "type": "random", - "groupId": "XUepkK", - "traits": { - "subscribe": true - }, - "context": { - "traits": { - "email": "test@rudderstack.com", - "phone": "+12 345 678 900", - "consent": "email" - }, - "ip": "14.5.67.21", - "library": { - "name": "http" - } - }, - "timestamp": "2020-01-21T00:21:34.208Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "error": "Event type random is not supported", - "statTags": { - "destType": "KLAVIYO", - "errorCategory": "dataValidation", - "errorType": "instrumentation", - "feature": "processor", - "implementation": "native", - "module": "destination" - }, - "statusCode": 400 - } - ] - } - } - }, - { - "name": "klaviyo", - "description": "Track call with Ecom events (Viewed Product)", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey" - } - }, - "message": { - "type": "track", - "event": "product viewed", - "sentAt": "2021-01-25T16:12:02.048Z", - "userId": "sajal12", - "channel": "mobile", - "context": { - "os": { - "name": "Android", - "version": "10" - }, - "app": { - "name": "KlaviyoTest", - "build": "1", - "version": "1.0", - "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" - }, - "device": { - "id": "9c6bd77ea9da3e68", - "name": "raphaelin", - "type": "android", - "model": "Redmi K20 Pro", - "manufacturer": "Xiaomi" - }, - "locale": "en-IN", - "screen": { - "width": 1080, - "height": 2210, - "density": 440 - }, - "traits": { - "id": "user@1", - "age": "22", - "name": "Test", - "email": "test@rudderstack.com", - "phone": "9112340375", - "anonymousId": "9c6bd77ea9da3e68", - "description": "Sample description" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.2" - }, - "network": { - "wifi": true, - "carrier": "airtel", - "cellular": true, - "bluetooth": false - }, - "timezone": "Asia/Kolkata", - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)" - }, - "rudderId": "b7b24f86-f7bf-46d8-b2b4-ccafc080239c", - "messageId": "1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce", - "properties": { - "name": "test product", - "product_id": "1114", - "sku": "WINNIePuh12", - "image_url": "http://www.example.com/path/to/product/image.png", - "url": "http://www.example.com/path/to/product", - "brand": "Not for Kids", - "price": 9.9, - "categories": [ - "Fiction", - "Children" - ] - }, - "anonymousId": "9c6bd77ea9da3e68", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-01-25T15:32:56.409Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://a.klaviyo.com/api/events", - "headers": { - "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", - "Content-Type": "application/json", - "Accept": "application/json", - "revision": "2023-02-22" - }, - "params": {}, - "body": { - "JSON": { - "data": { - "type": "event", - "attributes": { - "metric": { - "name": "Viewed Product" - }, - "profile": { - "$email": "test@rudderstack.com", - "$phone_number": "9112340375", - "$id": "sajal12", - "age": "22", - "name": "Test", - "description": "Sample description" - }, - "properties": { - "ProductName": "test product", - "ProductID": "1114", - "SKU": "WINNIePuh12", - "ImageURL": "http://www.example.com/path/to/product/image.png", - "URL": "http://www.example.com/path/to/product", - "Brand": "Not for Kids", - "Price": 9.9, - "Categories": [ - "Fiction", - "Children" - ] - } - } - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "klaviyo", - "description": "Track call with Ecom events (Checkout Started) with enabled flattenProperties", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey", - "flattenProperties": true - } - }, - "message": { - "type": "track", - "event": "checkout started", - "sentAt": "2021-01-25T16:12:02.048Z", - "userId": "sajal12", - "channel": "mobile", - "context": { - "os": { - "name": "Android", - "version": "10" - }, - "app": { - "name": "KlaviyoTest", - "build": "1", - "version": "1.0", - "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" - }, - "device": { - "id": "9c6bd77ea9da3e68", - "name": "raphaelin", - "type": "android", - "model": "Redmi K20 Pro", - "manufacturer": "Xiaomi" - }, - "locale": "en-IN", - "screen": { - "width": 1080, - "height": 2210, - "density": 440 - }, - "traits": { - "id": "user@1", - "age": "22", - "name": "Test", - "email": "test@rudderstack.com", - "phone": "9112340375", - "anonymousId": "9c6bd77ea9da3e68", - "description": "Sample description" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.2" - }, - "network": { - "wifi": true, - "carrier": "airtel", - "cellular": true, - "bluetooth": false - }, - "timezone": "Asia/Kolkata", - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)" - }, - "rudderId": "b7b24f86-f7bf-46d8-b2b4-ccafc080239c", - "messageId": "1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce", - "properties": { - "order_id": "1234", - "affiliation": "Apple Store", - "value": 20, - "revenue": 15, - "shipping": 4, - "tax": 1, - "discount": 1.5, - "coupon": "ImagePro", - "currency": "USD", - "products": [ - { - "product_id": "123", - "sku": "G-32", - "name": "Monopoly", - "price": 14, - "quantity": 1, - "category": "Games", - "url": "https://www.website.com/product/path", - "image_url": "https://www.website.com/product/path.jpg" - }, - { - "product_id": "345", - "sku": "F-32", - "name": "UNO", - "price": 3.45, - "quantity": 2, - "category": "Games" - } - ] - }, - "anonymousId": "9c6bd77ea9da3e68", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-01-25T15:32:56.409Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://a.klaviyo.com/api/events", - "headers": { - "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", - "Content-Type": "application/json", - "Accept": "application/json", - "revision": "2023-02-22" - }, - "params": {}, - "body": { - "JSON": { - "data": { - "type": "event", - "attributes": { - "metric": { - "name": "Started Checkout" - }, - "properties": { - "$event_id": "1234", - "$value": 20, - "items[0].ProductID": "123", - "items[0].SKU": "G-32", - "items[0].ProductName": "Monopoly", - "items[0].Quantity": 1, - "items[0].ItemPrice": 14, - "items[0].ProductURL": "https://www.website.com/product/path", - "items[0].ImageURL": "https://www.website.com/product/path.jpg", - "items[1].ProductID": "345", - "items[1].SKU": "F-32", - "items[1].ProductName": "UNO", - "items[1].Quantity": 2, - "items[1].ItemPrice": 3.45 - }, - "profile": { - "$email": "test@rudderstack.com", - "$phone_number": "9112340375", - "$id": "sajal12", - "age": "22", - "name": "Test", - "description": "Sample description" - } - } - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - } - }, - { - "name": "klaviyo", - "description": "Track call with Ecom events (Added to Cart) with properties.products", - "feature": "processor", - "module": "destination", - "version": "v0", - "input": { - "request": { - "body": [ - { - "destination": { - "Config": { - "publicApiKey": "dummyPublicApiKey", - "privateApiKey": "dummyPrivateApiKey" - } - }, - "message": { - "type": "track", - "event": "product added", - "sentAt": "2021-01-25T16:12:02.048Z", - "userId": "sajal12", - "channel": "mobile", - "context": { - "os": { - "name": "Android", - "version": "10" - }, - "app": { - "name": "KlaviyoTest", - "build": "1", - "version": "1.0", - "namespace": "com.rudderstack.android.rudderstack.sampleAndroidApp" - }, - "device": { - "id": "9c6bd77ea9da3e68", - "name": "raphaelin", - "type": "android", - "model": "Redmi K20 Pro", - "manufacturer": "Xiaomi" - }, - "locale": "en-IN", - "screen": { - "width": 1080, - "height": 2210, - "density": 440 - }, - "traits": { - "id": "user@1", - "age": "22", - "name": "Test", - "email": "test@rudderstack.com", - "phone": "9112340375", - "anonymousId": "9c6bd77ea9da3e68", - "description": "Sample description" - }, - "library": { - "name": "com.rudderstack.android.sdk.core", - "version": "1.0.2" - }, - "network": { - "wifi": true, - "carrier": "airtel", - "cellular": true, - "bluetooth": false - }, - "timezone": "Asia/Kolkata", - "userAgent": "Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)" - }, - "rudderId": "b7b24f86-f7bf-46d8-b2b4-ccafc080239c", - "messageId": "1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce", - "properties": { - "order_id": "1234", - "value": 12.12, - "categories": [ - "Fiction3", - "Children3" - ], - "checkout_url": "http://www.heythere.com", - "item_names": [ - "book1", - "book2" - ], - "products": [ - { - "product_id": "b1pid", - "sku": "123x", - "name": "book1", - "url": "heyther.com", - "price": 12 - }, - { - "product_id": "b2pid", - "sku": "123x", - "name": "book2", - "url": "heyther2.com", - "price": 14 - } - ] - }, - "anonymousId": "9c6bd77ea9da3e68", - "integrations": { - "All": true - }, - "originalTimestamp": "2021-01-25T15:32:56.409Z" - } - } - ] - } - }, - "output": { - "response": { - "status": 200, - "body": [ - { - "output": { - "version": "1", - "type": "REST", - "method": "POST", - "endpoint": "https://a.klaviyo.com/api/events", - "headers": { - "Authorization": "Klaviyo-API-Key dummyPrivateApiKey", - "Content-Type": "application/json", - "Accept": "application/json", - "revision": "2023-02-22" - }, - "params": {}, - "body": { - "JSON": { - "data": { - "type": "event", - "attributes": { - "metric": { - "name": "Added to Cart" - }, - "profile": { - "$email": "test@rudderstack.com", - "$phone_number": "9112340375", - "$id": "sajal12", - "age": "22", - "name": "Test", - "description": "Sample description" - }, - "properties": { - "$value": 12.12, - "AddedItemCategories": [ - "Fiction3", - "Children3" - ], - "ItemNames": [ - "book1", - "book2" - ], - "CheckoutURL": "http://www.heythere.com", - "items": [ - { - "ProductID": "b1pid", - "SKU": "123x", - "ProductName": "book1", - "ItemPrice": 12, - "ProductURL": "heyther.com" - }, - { - "ProductID": "b2pid", - "SKU": "123x", - "ProductName": "book2", - "ItemPrice": 14, - "ProductURL": "heyther2.com" - } - ] - } - } - } - }, - "JSON_ARRAY": {}, - "XML": {}, - "FORM": {} - }, - "files": {}, - "userId": "" - }, - "statusCode": 200 - } - ] - } - } - } -] \ No newline at end of file + { + name: 'klaviyo', + description: 'Profile updating call and subscribe user (old transformer)', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + publicApiKey: 'dummyPublicApiKey', + privateApiKey: 'dummyPrivateApiKey', + }, + }, + message: { + type: 'identify', + sentAt: '2021-01-03T17:02:53.195Z', + userId: 'user@1', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + traits: { + firstName: 'Test', + lastName: 'Rudderlabs', + email: 'test@rudderstack.com', + phone: '+12 345 578 900', + userId: 'user@1', + title: 'Developer', + organization: 'Rudder', + city: 'Tokyo', + region: 'Kanto', + country: 'JP', + zip: '100-0001', + Flagged: false, + Residence: 'Shibuya', + properties: { + listId: 'XUepkK', + subscribe: true, + consent: ['email', 'sms'], + }, + }, + locale: 'en-US', + screen: { + density: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + integrations: { + All: true, + }, + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + userId: '', + method: 'PATCH', + endpoint: 'https://a.klaviyo.com/api/profiles/01GW3PHVY0MTCDGS0A1612HARX', + headers: { + Authorization: 'Klaviyo-API-Key dummyPrivateApiKey', + 'Content-Type': 'application/json', + Accept: 'application/json', + revision: '2023-02-22', + }, + params: {}, + body: { + JSON: { + data: { + type: 'profile', + attributes: { + external_id: 'user@1', + email: 'test@rudderstack.com', + first_name: 'Test', + last_name: 'Rudderlabs', + phone_number: '+12 345 578 900', + title: 'Developer', + organization: 'Rudder', + location: { + city: 'Tokyo', + region: 'Kanto', + country: 'JP', + zip: '100-0001', + }, + properties: { + Flagged: false, + Residence: 'Shibuya', + }, + }, + id: '01GW3PHVY0MTCDGS0A1612HARX', + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + method: 'POST', + userId: '', + endpoint: 'https://a.klaviyo.com/api/profile-subscription-bulk-create-jobs', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Klaviyo-API-Key dummyPrivateApiKey', + revision: '2023-02-22', + }, + params: {}, + body: { + JSON: { + data: { + type: 'profile-subscription-bulk-create-job', + attributes: { + list_id: 'XUepkK', + subscriptions: [ + { + email: 'test@rudderstack.com', + phone_number: '+12 345 578 900', + channels: { + email: ['MARKETING'], + sms: ['MARKETING'], + }, + }, + ], + }, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'klaviyo', + description: 'Identify call for with flattenProperties enabled (old transformer)', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + publicApiKey: 'dummyPublicApiKey', + privateApiKey: 'dummyPrivateApiKey', + flattenProperties: true, + }, + }, + message: { + type: 'identify', + sentAt: '2021-01-03T17:02:53.195Z', + userId: 'user@1', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + traits: { + firstName: 'Test', + lastName: 'Rudderlabs', + email: 'test@rudderstack.com', + phone: '+12 345 578 900', + userId: 'user@1', + title: 'Developer', + organization: 'Rudder', + city: 'Tokyo', + region: 'Kanto', + country: 'JP', + zip: '100-0001', + Flagged: false, + Residence: 'Shibuya', + friend: { + names: { + first: 'Alice', + last: 'Smith', + }, + age: 25, + }, + properties: { + listId: 'XUepkK', + subscribe: true, + consent: ['email', 'sms'], + }, + }, + locale: 'en-US', + screen: { + density: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + integrations: { + All: true, + }, + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + userId: '', + method: 'PATCH', + endpoint: 'https://a.klaviyo.com/api/profiles/01GW3PHVY0MTCDGS0A1612HARX', + headers: { + Authorization: 'Klaviyo-API-Key dummyPrivateApiKey', + 'Content-Type': 'application/json', + Accept: 'application/json', + revision: '2023-02-22', + }, + params: {}, + body: { + JSON: { + data: { + type: 'profile', + attributes: { + external_id: 'user@1', + email: 'test@rudderstack.com', + first_name: 'Test', + last_name: 'Rudderlabs', + phone_number: '+12 345 578 900', + title: 'Developer', + organization: 'Rudder', + location: { + city: 'Tokyo', + region: 'Kanto', + country: 'JP', + zip: '100-0001', + }, + properties: { + 'friend.age': 25, + 'friend.names.first': 'Alice', + 'friend.names.last': 'Smith', + Flagged: false, + Residence: 'Shibuya', + }, + }, + id: '01GW3PHVY0MTCDGS0A1612HARX', + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + userId: '', + method: 'POST', + endpoint: 'https://a.klaviyo.com/api/profile-subscription-bulk-create-jobs', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Klaviyo-API-Key dummyPrivateApiKey', + revision: '2023-02-22', + }, + params: {}, + body: { + JSON: { + data: { + type: 'profile-subscription-bulk-create-job', + attributes: { + list_id: 'XUepkK', + subscriptions: [ + { + email: 'test@rudderstack.com', + phone_number: '+12 345 578 900', + channels: { + email: ['MARKETING'], + sms: ['MARKETING'], + }, + }, + ], + }, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'klaviyo', + description: 'Profile updation call and subcribe user', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + publicApiKey: 'dummyPublicApiKey', + privateApiKey: 'dummyPrivateApiKeyforfailure', + }, + }, + message: { + type: 'identify', + sentAt: '2021-01-03T17:02:53.195Z', + userId: 'user@1', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + traits: { + firstName: 'Test', + lastName: 'Rudderlabs', + email: 'test3@rudderstack.com', + phone: '+12 345 578 900', + userId: 'user@1', + title: 'Developer', + organization: 'Rudder', + city: 'Tokyo', + region: 'Kanto', + country: 'JP', + zip: '100-0001', + Flagged: false, + Residence: 'Shibuya', + properties: { + listId: 'XUepkK', + subscribe: true, + consent: ['email', 'sms'], + }, + }, + locale: 'en-US', + screen: { + density: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + integrations: { + All: true, + }, + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: + '{"message":"Failed to create user due to \\"\\"","destinationResponse":"\\"\\""}', + statTags: { + destType: 'KLAVIYO', + errorCategory: 'network', + errorType: 'retryable', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 500, + }, + ], + }, + }, + }, + { + name: 'klaviyo', + description: 'Profile updation call listId is not provided for subscribing the user', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + publicApiKey: 'dummyPublicApiKey', + privateApiKey: 'dummyPrivateApiKey', + }, + }, + message: { + type: 'identify', + sentAt: '2021-01-03T17:02:53.195Z', + userId: 'user@1', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + traits: { + firstName: 'Test', + lastName: 'Rudderlabs', + email: 'test@rudderstack.com', + phone: '+12 345 578 900', + userId: 'user@1', + title: 'Developer', + organization: 'Rudder', + city: 'Tokyo', + region: 'Kanto', + country: 'JP', + zip: '100-0001', + Flagged: false, + Residence: 'Shibuya', + properties: { + subscribe: false, + consent: ['email', 'sms'], + }, + }, + locale: 'en-US', + screen: { + density: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + integrations: { + All: true, + }, + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'PATCH', + endpoint: 'https://a.klaviyo.com/api/profiles/01GW3PHVY0MTCDGS0A1612HARX', + headers: { + Authorization: 'Klaviyo-API-Key dummyPrivateApiKey', + 'Content-Type': 'application/json', + Accept: 'application/json', + revision: '2023-02-22', + }, + params: {}, + body: { + JSON: { + data: { + type: 'profile', + attributes: { + external_id: 'user@1', + email: 'test@rudderstack.com', + first_name: 'Test', + last_name: 'Rudderlabs', + phone_number: '+12 345 578 900', + title: 'Developer', + organization: 'Rudder', + location: { + city: 'Tokyo', + region: 'Kanto', + country: 'JP', + zip: '100-0001', + }, + properties: { + Flagged: false, + Residence: 'Shibuya', + }, + }, + id: '01GW3PHVY0MTCDGS0A1612HARX', + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'klaviyo', + description: 'Identify call with enforceEmailAsPrimary enabled from UI', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + publicApiKey: 'dummyPublicApiKey', + privateApiKey: 'dummyPrivateApiKey', + enforceEmailAsPrimary: true, + }, + }, + message: { + type: 'identify', + sentAt: '2021-01-03T17:02:53.195Z', + userId: 'user@1', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + traits: { + firstName: 'Test', + lastName: 'Rudderlabs', + email: 'test@rudderstack.com', + phone: '+12 345 578 900', + userId: 'user@1', + title: 'Developer', + organization: 'Rudder', + city: 'Tokyo', + region: 'Kanto', + country: 'JP', + zip: '100-0001', + Flagged: false, + Residence: 'Shibuya', + properties: { + listId: 'XUepkK', + subscribe: true, + consent: ['email', 'sms'], + }, + }, + locale: 'en-US', + screen: { + density: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + integrations: { + All: true, + }, + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + userId: '', + method: 'PATCH', + endpoint: 'https://a.klaviyo.com/api/profiles/01GW3PHVY0MTCDGS0A1612HARX', + headers: { + Authorization: 'Klaviyo-API-Key dummyPrivateApiKey', + 'Content-Type': 'application/json', + Accept: 'application/json', + revision: '2023-02-22', + }, + params: {}, + body: { + JSON: { + data: { + type: 'profile', + attributes: { + email: 'test@rudderstack.com', + first_name: 'Test', + last_name: 'Rudderlabs', + phone_number: '+12 345 578 900', + title: 'Developer', + organization: 'Rudder', + location: { + city: 'Tokyo', + region: 'Kanto', + country: 'JP', + zip: '100-0001', + }, + properties: { + Flagged: false, + Residence: 'Shibuya', + _id: 'user@1', + }, + }, + id: '01GW3PHVY0MTCDGS0A1612HARX', + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + userId: '', + method: 'POST', + endpoint: 'https://a.klaviyo.com/api/profile-subscription-bulk-create-jobs', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Klaviyo-API-Key dummyPrivateApiKey', + revision: '2023-02-22', + }, + params: {}, + body: { + JSON: { + data: { + type: 'profile-subscription-bulk-create-job', + attributes: { + list_id: 'XUepkK', + subscriptions: [ + { + email: 'test@rudderstack.com', + phone_number: '+12 345 578 900', + channels: { + email: ['MARKETING'], + sms: ['MARKETING'], + }, + }, + ], + }, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'klaviyo', + description: 'Identify call without user custom Properties', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + publicApiKey: 'dummyPublicApiKey', + privateApiKey: 'dummyPrivateApiKey', + enforceEmailAsPrimary: false, + }, + }, + message: { + type: 'identify', + sentAt: '2021-01-03T17:02:53.195Z', + userId: 'user@1', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + traits: { + firstName: 'Test', + lastName: 'Rudderlabs', + email: 'test@rudderstack.com', + phone: '+12 345 578 900', + userId: 'user@1', + title: 'Developer', + organization: 'Rudder', + city: 'Tokyo', + region: 'Kanto', + country: 'JP', + zip: '100-0001', + properties: { + listId: 'XUepkK', + subscribe: true, + consent: ['email', 'sms'], + }, + }, + locale: 'en-US', + screen: { + density: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + integrations: { + All: true, + }, + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + userId: '', + method: 'PATCH', + endpoint: 'https://a.klaviyo.com/api/profiles/01GW3PHVY0MTCDGS0A1612HARX', + headers: { + Authorization: 'Klaviyo-API-Key dummyPrivateApiKey', + 'Content-Type': 'application/json', + Accept: 'application/json', + revision: '2023-02-22', + }, + params: {}, + body: { + JSON: { + data: { + type: 'profile', + attributes: { + email: 'test@rudderstack.com', + first_name: 'Test', + last_name: 'Rudderlabs', + phone_number: '+12 345 578 900', + external_id: 'user@1', + title: 'Developer', + organization: 'Rudder', + location: { + city: 'Tokyo', + region: 'Kanto', + country: 'JP', + zip: '100-0001', + }, + }, + id: '01GW3PHVY0MTCDGS0A1612HARX', + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + statusCode: 200, + }, + { + output: { + version: '1', + type: 'REST', + userId: '', + method: 'POST', + endpoint: 'https://a.klaviyo.com/api/profile-subscription-bulk-create-jobs', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: 'Klaviyo-API-Key dummyPrivateApiKey', + revision: '2023-02-22', + }, + params: {}, + body: { + JSON: { + data: { + type: 'profile-subscription-bulk-create-job', + attributes: { + list_id: 'XUepkK', + subscriptions: [ + { + email: 'test@rudderstack.com', + phone_number: '+12 345 578 900', + channels: { + email: ['MARKETING'], + sms: ['MARKETING'], + }, + }, + ], + }, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'klaviyo', + description: 'Identify call without email and phone & enforceEmailAsPrimary enabled from UI', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + publicApiKey: 'dummyPublicApiKey', + privateApiKey: 'dummyPrivateApiKey', + enforceEmailAsPrimary: true, + }, + }, + message: { + type: 'identify', + sentAt: '2021-01-03T17:02:53.195Z', + userId: 'user@1', + channel: 'web', + context: { + os: { + name: '', + version: '', + }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + traits: { + firstName: 'Test', + lastName: 'Rudderlabs', + userId: 'user@1', + title: 'Developer', + organization: 'Rudder', + city: 'Tokyo', + region: 'Kanto', + country: 'JP', + zip: '100-0001', + Flagged: false, + Residence: 'Shibuya', + properties: { + listId: 'XUepkK', + subscribe: true, + consent: ['email', 'sms'], + }, + }, + locale: 'en-US', + screen: { + density: 2, + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }, + rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', + messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', + anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', + integrations: { + All: true, + }, + originalTimestamp: '2021-01-03T17:02:53.193Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'None of email and phone are present in the payload', + statTags: { + destType: 'KLAVIYO', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'klaviyo', + description: 'Screen event call', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + publicApiKey: 'dummyPublicApiKey', + privateApiKey: 'dummyPrivateApiKey', + }, + }, + message: { + type: 'screen', + event: 'TestEven001', + sentAt: '2021-01-25T16:12:02.048Z', + userId: 'sajal12', + channel: 'mobile', + context: { + os: { + name: 'Android', + version: '10', + }, + app: { + name: 'KlaviyoTest', + build: '1', + version: '1.0', + namespace: 'com.rudderstack.android.rudderstack.sampleAndroidApp', + }, + device: { + id: '9c6bd77ea9da3e68', + name: 'raphaelin', + type: 'android', + model: 'Redmi K20 Pro', + manufacturer: 'Xiaomi', + }, + locale: 'en-IN', + screen: { + width: 1080, + height: 2210, + density: 440, + }, + traits: { + id: 'user@1', + age: '22', + email: 'test@rudderstack.com', + phone: '9112340375', + anonymousId: '9c6bd77ea9da3e68', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.2', + }, + network: { + wifi: true, + carrier: 'airtel', + cellular: true, + bluetooth: false, + }, + timezone: 'Asia/Kolkata', + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)', + }, + rudderId: 'b7b24f86-f7bf-46d8-b2b4-ccafc080239c', + messageId: '1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce', + properties: { + PreviouslyVicePresident: true, + YearElected: 1801, + VicePresidents: ['Aaron Burr', 'George Clinton'], + }, + anonymousId: '9c6bd77ea9da3e68', + integrations: { + All: true, + }, + originalTimestamp: '2021-01-25T15:32:56.409Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://a.klaviyo.com/api/events', + headers: { + Accept: 'application/json', + Authorization: 'Klaviyo-API-Key dummyPrivateApiKey', + 'Content-Type': 'application/json', + revision: '2023-02-22', + }, + params: {}, + body: { + JSON: { + data: { + type: 'event', + attributes: { + metric: { + name: 'TestEven001', + }, + properties: { + PreviouslyVicePresident: true, + YearElected: 1801, + VicePresidents: ['Aaron Burr', 'George Clinton'], + }, + profile: { + $email: 'test@rudderstack.com', + $phone_number: '9112340375', + $id: 'sajal12', + age: '22', + }, + }, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'klaviyo', + description: 'Track event call with flatten properties enabled', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + publicApiKey: 'dummyPublicApiKey', + privateApiKey: 'dummyPrivateApiKey', + flattenProperties: true, + }, + }, + message: { + type: 'track', + event: 'TestEven001', + sentAt: '2021-01-25T16:12:02.048Z', + userId: 'sajal12', + channel: 'mobile', + context: { + os: { + name: 'Android', + version: '10', + }, + app: { + name: 'KlaviyoTest', + build: '1', + version: '1.0', + namespace: 'com.rudderstack.android.rudderstack.sampleAndroidApp', + }, + device: { + id: '9c6bd77ea9da3e68', + name: 'raphaelin', + type: 'android', + model: 'Redmi K20 Pro', + manufacturer: 'Xiaomi', + }, + locale: 'en-IN', + screen: { + width: 1080, + height: 2210, + density: 440, + }, + traits: { + id: 'user@1', + age: '22', + email: 'test@rudderstack.com', + phone: '9112340375', + anonymousId: '9c6bd77ea9da3e68', + plan_details: { + plan_type: 'gold', + duration: '3 months', + }, + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.2', + }, + network: { + wifi: true, + carrier: 'airtel', + cellular: true, + bluetooth: false, + }, + timezone: 'Asia/Kolkata', + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)', + }, + rudderId: 'b7b24f86-f7bf-46d8-b2b4-ccafc080239c', + messageId: '1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce', + properties: { + vicePresdentInfo: { + PreviouslVicePresident: true, + YearElected: 1801, + VicePresidents: ['AaronBurr', 'GeorgeClinton'], + }, + }, + anonymousId: '9c6bd77ea9da3e68', + integrations: { + All: true, + }, + originalTimestamp: '2021-01-25T15:32:56.409Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://a.klaviyo.com/api/events', + headers: { + Accept: 'application/json', + Authorization: 'Klaviyo-API-Key dummyPrivateApiKey', + 'Content-Type': 'application/json', + revision: '2023-02-22', + }, + params: {}, + body: { + JSON: { + data: { + type: 'event', + attributes: { + metric: { + name: 'TestEven001', + }, + properties: { + 'vicePresdentInfo.PreviouslVicePresident': true, + 'vicePresdentInfo.VicePresidents': ['AaronBurr', 'GeorgeClinton'], + 'vicePresdentInfo.YearElected': 1801, + }, + profile: { + $email: 'test@rudderstack.com', + $phone_number: '9112340375', + $id: 'sajal12', + age: '22', + 'plan_details.plan_type': 'gold', + 'plan_details.duration': '3 months', + }, + }, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'klaviyo', + description: 'Track event call', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + publicApiKey: 'dummyPublicApiKey', + privateApiKey: 'dummyPrivateApiKey', + }, + }, + message: { + type: 'track', + event: 'TestEven002', + sentAt: '2021-01-25T16:12:02.048Z', + userId: 'sajal12', + channel: 'mobile', + context: { + os: { + name: 'Android', + version: '10', + }, + app: { + name: 'KlaviyoTest', + build: '1', + version: '1.0', + namespace: 'com.rudderstack.android.rudderstack.sampleAndroidApp', + }, + device: { + id: '9c6bd77ea9da3e68', + name: 'raphaelin', + type: 'android', + model: 'Redmi K20 Pro', + manufacturer: 'Xiaomi', + }, + locale: 'en-IN', + screen: { + width: 1080, + height: 2210, + density: 440, + }, + traits: { + id: 'user@1', + age: '22', + name: 'Test', + email: 'test@rudderstack.com', + phone: '9112340375', + anonymousId: '9c6bd77ea9da3e68', + description: 'Sample description', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.2', + }, + network: { + wifi: true, + carrier: 'airtel', + cellular: true, + bluetooth: false, + }, + timezone: 'Asia/Kolkata', + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)', + }, + rudderId: 'b7b24f86-f7bf-46d8-b2b4-ccafc080239c', + messageId: '1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce', + properties: { + PreviouslyVicePresident: true, + YearElected: 1801, + VicePresidents: ['Aaron Burr', 'George Clinton'], + revenue: 3000, + }, + anonymousId: '9c6bd77ea9da3e68', + integrations: { + All: true, + }, + originalTimestamp: '2021-01-25T15:32:56.409Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://a.klaviyo.com/api/events', + headers: { + Accept: 'application/json', + Authorization: 'Klaviyo-API-Key dummyPrivateApiKey', + 'Content-Type': 'application/json', + revision: '2023-02-22', + }, + params: {}, + body: { + JSON: { + data: { + type: 'event', + attributes: { + metric: { + name: 'TestEven002', + }, + properties: { + PreviouslyVicePresident: true, + YearElected: 1801, + VicePresidents: ['Aaron Burr', 'George Clinton'], + }, + profile: { + $email: 'test@rudderstack.com', + $phone_number: '9112340375', + $id: 'sajal12', + age: '22', + name: 'Test', + description: 'Sample description', + }, + value: 3000, + }, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'klaviyo', + description: 'Track event call, with make email or phone as primary identifier toggle on', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + publicApiKey: 'dummyPublicApiKey', + privateApiKey: 'dummyPrivateApiKey', + enforceEmailAsPrimary: true, + }, + }, + message: { + type: 'track', + event: 'TestEven001', + sentAt: '2021-01-25T16:12:02.048Z', + userId: 'sajal12', + channel: 'mobile', + context: { + os: { + name: 'Android', + version: '10', + }, + app: { + name: 'KlaviyoTest', + build: '1', + version: '1.0', + namespace: 'com.rudderstack.android.rudderstack.sampleAndroidApp', + }, + device: { + id: '9c6bd77ea9da3e68', + name: 'raphaelin', + type: 'android', + model: 'Redmi K20 Pro', + manufacturer: 'Xiaomi', + }, + locale: 'en-IN', + screen: { + width: 1080, + height: 2210, + density: 440, + }, + traits: { + id: 'user@1', + age: '22', + email: 'test@rudderstack.com', + phone: '9112340375', + anonymousId: '9c6bd77ea9da3e68', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.2', + }, + network: { + wifi: true, + carrier: 'airtel', + cellular: true, + bluetooth: false, + }, + timezone: 'Asia/Kolkata', + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)', + }, + rudderId: 'b7b24f86-f7bf-46d8-b2b4-ccafc080239c', + messageId: '1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce', + properties: { + PreviouslyVicePresident: true, + YearElected: 1801, + VicePresidents: ['Aaron Burr', 'George Clinton'], + }, + anonymousId: '9c6bd77ea9da3e68', + integrations: { + All: true, + }, + originalTimestamp: '2021-01-25T15:32:56.409Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://a.klaviyo.com/api/events', + headers: { + Accept: 'application/json', + Authorization: 'Klaviyo-API-Key dummyPrivateApiKey', + 'Content-Type': 'application/json', + revision: '2023-02-22', + }, + params: {}, + body: { + JSON: { + data: { + type: 'event', + attributes: { + metric: { + name: 'TestEven001', + }, + properties: { + PreviouslyVicePresident: true, + YearElected: 1801, + VicePresidents: ['Aaron Burr', 'George Clinton'], + }, + profile: { + $email: 'test@rudderstack.com', + $phone_number: '9112340375', + age: '22', + _id: 'sajal12', + }, + }, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'klaviyo', + description: + 'Track event call, without email and phone & with (make email or phone as primary identifier) toggle on', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + publicApiKey: 'dummyPublicApiKey', + privateApiKey: 'dummyPrivateApiKey', + enforceEmailAsPrimary: true, + }, + }, + message: { + type: 'track', + event: 'TestEven001', + sentAt: '2021-01-25T16:12:02.048Z', + userId: 'sajal12', + channel: 'mobile', + context: { + os: { + name: 'Android', + version: '10', + }, + app: { + name: 'KlaviyoTest', + build: '1', + version: '1.0', + namespace: 'com.rudderstack.android.rudderstack.sampleAndroidApp', + }, + device: { + id: '9c6bd77ea9da3e68', + name: 'raphaelin', + type: 'android', + model: 'Redmi K20 Pro', + manufacturer: 'Xiaomi', + }, + locale: 'en-IN', + screen: { + width: 1080, + height: 2210, + density: 440, + }, + traits: { + id: 'user@1', + age: '22', + anonymousId: '9c6bd77ea9da3e68', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.2', + }, + network: { + wifi: true, + carrier: 'airtel', + cellular: true, + bluetooth: false, + }, + timezone: 'Asia/Kolkata', + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)', + }, + rudderId: 'b7b24f86-f7bf-46d8-b2b4-ccafc080239c', + messageId: '1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce', + properties: { + PreviouslyVicePresident: true, + YearElected: 1801, + VicePresidents: ['Aaron Burr', 'George Clinton'], + }, + anonymousId: '9c6bd77ea9da3e68', + integrations: { + All: true, + }, + originalTimestamp: '2021-01-25T15:32:56.409Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'None of email and phone are present in the payload', + statTags: { + destType: 'KLAVIYO', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'klaviyo', + description: 'group call', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + publicApiKey: 'dummyPublicApiKey', + privateApiKey: 'dummyPrivateApiKey', + }, + }, + message: { + userId: 'user123', + type: 'group', + groupId: 'XUepkK', + traits: { + subscribe: true, + }, + context: { + traits: { + email: 'test@rudderstack.com', + phone: '+12 345 678 900', + consent: ['email'], + }, + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-01-21T00:21:34.208Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + body: { + FORM: {}, + JSON: { + data: { + attributes: { + list_id: 'XUepkK', + subscriptions: [ + { email: 'test@rudderstack.com', phone_number: '+12 345 678 900' }, + ], + }, + type: 'profile-subscription-bulk-create-job', + }, + }, + JSON_ARRAY: {}, + XML: {}, + }, + endpoint: 'https://a.klaviyo.com/api/profile-subscription-bulk-create-jobs', + files: {}, + headers: { + Accept: 'application/json', + Authorization: 'Klaviyo-API-Key dummyPrivateApiKey', + 'Content-Type': 'application/json', + revision: '2023-02-22', + }, + method: 'POST', + params: {}, + type: 'REST', + userId: '', + version: '1', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'klaviyo', + description: 'group call without groupId', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + publicApiKey: 'dummyPublicApiKey', + privateApiKey: 'dummyPrivateApiKey', + }, + }, + message: { + userId: 'user123', + type: 'group', + groupId: '', + traits: { + subscribe: true, + }, + context: { + traits: { + email: 'test@rudderstack.com', + phone: '+12 345 678 900', + consent: 'email', + }, + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-01-21T00:21:34.208Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'groupId is a required field for group events', + statTags: { + destType: 'KLAVIYO', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'klaviyo', + description: '[Error]: Check for unsupported message type', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + publicApiKey: 'dummyPublicApiKey', + privateApiKey: 'dummyPrivateApiKey', + }, + }, + message: { + userId: 'user123', + type: 'random', + groupId: 'XUepkK', + traits: { + subscribe: true, + }, + context: { + traits: { + email: 'test@rudderstack.com', + phone: '+12 345 678 900', + consent: 'email', + }, + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, + timestamp: '2020-01-21T00:21:34.208Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Event type random is not supported', + statTags: { + destType: 'KLAVIYO', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'klaviyo', + description: 'Track call with Ecom events (Viewed Product)', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + publicApiKey: 'dummyPublicApiKey', + privateApiKey: 'dummyPrivateApiKey', + }, + }, + message: { + type: 'track', + event: 'product viewed', + sentAt: '2021-01-25T16:12:02.048Z', + userId: 'sajal12', + channel: 'mobile', + context: { + os: { + name: 'Android', + version: '10', + }, + app: { + name: 'KlaviyoTest', + build: '1', + version: '1.0', + namespace: 'com.rudderstack.android.rudderstack.sampleAndroidApp', + }, + device: { + id: '9c6bd77ea9da3e68', + name: 'raphaelin', + type: 'android', + model: 'Redmi K20 Pro', + manufacturer: 'Xiaomi', + }, + locale: 'en-IN', + screen: { + width: 1080, + height: 2210, + density: 440, + }, + traits: { + id: 'user@1', + age: '22', + name: 'Test', + email: 'test@rudderstack.com', + phone: '9112340375', + anonymousId: '9c6bd77ea9da3e68', + description: 'Sample description', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.2', + }, + network: { + wifi: true, + carrier: 'airtel', + cellular: true, + bluetooth: false, + }, + timezone: 'Asia/Kolkata', + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)', + }, + rudderId: 'b7b24f86-f7bf-46d8-b2b4-ccafc080239c', + messageId: '1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce', + properties: { + name: 'test product', + product_id: '1114', + sku: 'WINNIePuh12', + image_url: 'http://www.example.com/path/to/product/image.png', + url: 'http://www.example.com/path/to/product', + brand: 'Not for Kids', + price: 9.9, + categories: ['Fiction', 'Children'], + }, + anonymousId: '9c6bd77ea9da3e68', + integrations: { + All: true, + }, + originalTimestamp: '2021-01-25T15:32:56.409Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://a.klaviyo.com/api/events', + headers: { + Authorization: 'Klaviyo-API-Key dummyPrivateApiKey', + 'Content-Type': 'application/json', + Accept: 'application/json', + revision: '2023-02-22', + }, + params: {}, + body: { + JSON: { + data: { + type: 'event', + attributes: { + metric: { + name: 'Viewed Product', + }, + profile: { + $email: 'test@rudderstack.com', + $phone_number: '9112340375', + $id: 'sajal12', + age: '22', + name: 'Test', + description: 'Sample description', + }, + properties: { + ProductName: 'test product', + ProductID: '1114', + SKU: 'WINNIePuh12', + ImageURL: 'http://www.example.com/path/to/product/image.png', + URL: 'http://www.example.com/path/to/product', + Brand: 'Not for Kids', + Price: 9.9, + Categories: ['Fiction', 'Children'], + }, + }, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'klaviyo', + description: 'Track event call -> Invalid event i.e. sent as non-string', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + publicApiKey: 'dummyPublicApiKey', + privateApiKey: 'dummyPrivateApiKey', + }, + }, + message: { + type: 'track', + event: { name: 'TestEven002' }, + sentAt: '2021-01-25T16:12:02.048Z', + userId: 'sajal12', + channel: 'mobile', + context: { + os: { + name: 'Android', + version: '10', + }, + app: { + name: 'KlaviyoTest', + build: '1', + version: '1.0', + namespace: 'com.rudderstack.android.rudderstack.sampleAndroidApp', + }, + device: { + id: '9c6bd77ea9da3e68', + name: 'raphaelin', + type: 'android', + model: 'Redmi K20 Pro', + manufacturer: 'Xiaomi', + }, + locale: 'en-IN', + screen: { + width: 1080, + height: 2210, + density: 440, + }, + traits: { + id: 'user@1', + age: '22', + name: 'Test', + email: 'test@rudderstack.com', + phone: '9112340375', + anonymousId: '9c6bd77ea9da3e68', + description: 'Sample description', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.2', + }, + network: { + wifi: true, + carrier: 'airtel', + cellular: true, + bluetooth: false, + }, + timezone: 'Asia/Kolkata', + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)', + }, + rudderId: 'b7b24f86-f7bf-46d8-b2b4-ccafc080239c', + messageId: '1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce', + properties: { + PreviouslyVicePresident: true, + YearElected: 1801, + VicePresidents: ['Aaron Burr', 'George Clinton'], + revenue: 3000, + }, + anonymousId: '9c6bd77ea9da3e68', + integrations: { + All: true, + }, + originalTimestamp: '2021-01-25T15:32:56.409Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Event type should be a string', + statTags: { + destType: 'KLAVIYO', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, + { + name: 'klaviyo', + description: 'Track call with Ecom events (Checkout Started) with enabled flattenProperties', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + publicApiKey: 'dummyPublicApiKey', + privateApiKey: 'dummyPrivateApiKey', + flattenProperties: true, + }, + }, + message: { + type: 'track', + event: 'checkout started', + sentAt: '2021-01-25T16:12:02.048Z', + userId: 'sajal12', + channel: 'mobile', + context: { + os: { + name: 'Android', + version: '10', + }, + app: { + name: 'KlaviyoTest', + build: '1', + version: '1.0', + namespace: 'com.rudderstack.android.rudderstack.sampleAndroidApp', + }, + device: { + id: '9c6bd77ea9da3e68', + name: 'raphaelin', + type: 'android', + model: 'Redmi K20 Pro', + manufacturer: 'Xiaomi', + }, + locale: 'en-IN', + screen: { + width: 1080, + height: 2210, + density: 440, + }, + traits: { + id: 'user@1', + age: '22', + name: 'Test', + email: 'test@rudderstack.com', + phone: '9112340375', + anonymousId: '9c6bd77ea9da3e68', + description: 'Sample description', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.2', + }, + network: { + wifi: true, + carrier: 'airtel', + cellular: true, + bluetooth: false, + }, + timezone: 'Asia/Kolkata', + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)', + }, + rudderId: 'b7b24f86-f7bf-46d8-b2b4-ccafc080239c', + messageId: '1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce', + properties: { + order_id: '1234', + affiliation: 'Apple Store', + value: 20, + revenue: 15, + shipping: 4, + tax: 1, + discount: 1.5, + coupon: 'ImagePro', + currency: 'USD', + products: [ + { + product_id: '123', + sku: 'G-32', + name: 'Monopoly', + price: 14, + quantity: 1, + category: 'Games', + url: 'https://www.website.com/product/path', + image_url: 'https://www.website.com/product/path.jpg', + }, + { + product_id: '345', + sku: 'F-32', + name: 'UNO', + price: 3.45, + quantity: 2, + category: 'Games', + }, + ], + }, + anonymousId: '9c6bd77ea9da3e68', + integrations: { + All: true, + }, + originalTimestamp: '2021-01-25T15:32:56.409Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://a.klaviyo.com/api/events', + headers: { + Authorization: 'Klaviyo-API-Key dummyPrivateApiKey', + 'Content-Type': 'application/json', + Accept: 'application/json', + revision: '2023-02-22', + }, + params: {}, + body: { + JSON: { + data: { + type: 'event', + attributes: { + metric: { + name: 'Started Checkout', + }, + properties: { + $event_id: '1234', + $value: 20, + 'items[0].ProductID': '123', + 'items[0].SKU': 'G-32', + 'items[0].ProductName': 'Monopoly', + 'items[0].Quantity': 1, + 'items[0].ItemPrice': 14, + 'items[0].ProductURL': 'https://www.website.com/product/path', + 'items[0].ImageURL': 'https://www.website.com/product/path.jpg', + 'items[1].ProductID': '345', + 'items[1].SKU': 'F-32', + 'items[1].ProductName': 'UNO', + 'items[1].Quantity': 2, + 'items[1].ItemPrice': 3.45, + }, + profile: { + $email: 'test@rudderstack.com', + $phone_number: '9112340375', + $id: 'sajal12', + age: '22', + name: 'Test', + description: 'Sample description', + }, + }, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'klaviyo', + description: 'Track call with Ecom events (Added to Cart) with properties.products', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + publicApiKey: 'dummyPublicApiKey', + privateApiKey: 'dummyPrivateApiKey', + }, + }, + message: { + type: 'track', + event: 'product added', + sentAt: '2021-01-25T16:12:02.048Z', + userId: 'sajal12', + channel: 'mobile', + context: { + os: { + name: 'Android', + version: '10', + }, + app: { + name: 'KlaviyoTest', + build: '1', + version: '1.0', + namespace: 'com.rudderstack.android.rudderstack.sampleAndroidApp', + }, + device: { + id: '9c6bd77ea9da3e68', + name: 'raphaelin', + type: 'android', + model: 'Redmi K20 Pro', + manufacturer: 'Xiaomi', + }, + locale: 'en-IN', + screen: { + width: 1080, + height: 2210, + density: 440, + }, + traits: { + id: 'user@1', + age: '22', + name: 'Test', + email: 'test@rudderstack.com', + phone: '9112340375', + anonymousId: '9c6bd77ea9da3e68', + description: 'Sample description', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.2', + }, + network: { + wifi: true, + carrier: 'airtel', + cellular: true, + bluetooth: false, + }, + timezone: 'Asia/Kolkata', + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)', + }, + rudderId: 'b7b24f86-f7bf-46d8-b2b4-ccafc080239c', + messageId: '1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce', + properties: { + order_id: '1234', + value: 12.12, + categories: ['Fiction3', 'Children3'], + checkout_url: 'http://www.heythere.com', + item_names: ['book1', 'book2'], + products: [ + { + product_id: 'b1pid', + sku: '123x', + name: 'book1', + url: 'heyther.com', + price: 12, + }, + { + product_id: 'b2pid', + sku: '123x', + name: 'book2', + url: 'heyther2.com', + price: 14, + }, + ], + }, + anonymousId: '9c6bd77ea9da3e68', + integrations: { + All: true, + }, + originalTimestamp: '2021-01-25T15:32:56.409Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://a.klaviyo.com/api/events', + headers: { + Authorization: 'Klaviyo-API-Key dummyPrivateApiKey', + 'Content-Type': 'application/json', + Accept: 'application/json', + revision: '2023-02-22', + }, + params: {}, + body: { + JSON: { + data: { + type: 'event', + attributes: { + metric: { + name: 'Added to Cart', + }, + profile: { + $email: 'test@rudderstack.com', + $phone_number: '9112340375', + $id: 'sajal12', + age: '22', + name: 'Test', + description: 'Sample description', + }, + properties: { + $value: 12.12, + AddedItemCategories: ['Fiction3', 'Children3'], + ItemNames: ['book1', 'book2'], + CheckoutURL: 'http://www.heythere.com', + items: [ + { + ProductID: 'b1pid', + SKU: '123x', + ProductName: 'book1', + ItemPrice: 12, + ProductURL: 'heyther.com', + }, + { + ProductID: 'b2pid', + SKU: '123x', + ProductName: 'book2', + ItemPrice: 14, + ProductURL: 'heyther2.com', + }, + ], + }, + }, + }, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, +]; From 32c9c038ca96477cbe8d94d2a19679817b952e4c Mon Sep 17 00:00:00 2001 From: Gauravudia <60897972+Gauravudia@users.noreply.github.com> Date: Thu, 18 Jan 2024 15:35:02 +0530 Subject: [PATCH 131/135] fix: error handling for trade desk first party data flow (#2986) * fix: error handling for trade desk first party flow * refactor: used isEmptyObject utility * refactor: replace if-else with empty return --- .../v2/destinations/the_trade_desk/utils.js | 49 +-- .../the_trade_desk/router/data.ts | 294 ++++++++++++++++++ 2 files changed, 324 insertions(+), 19 deletions(-) diff --git a/src/cdk/v2/destinations/the_trade_desk/utils.js b/src/cdk/v2/destinations/the_trade_desk/utils.js index 0f1c3fb0c1..632442d74e 100644 --- a/src/cdk/v2/destinations/the_trade_desk/utils.js +++ b/src/cdk/v2/destinations/the_trade_desk/utils.js @@ -8,6 +8,7 @@ const { getSuccessRespEvents, removeUndefinedAndNullValues, handleRtTfSingleEventError, + isEmptyObject, } = require('../../../../v0/util'); const tradeDeskConfig = require('./config'); @@ -59,34 +60,44 @@ const processRecordInputs = (inputs, destination) => { const successMetadata = []; const errorResponseList = []; - const error = new InstrumentationError('Invalid action type'); + const invalidActionTypeError = new InstrumentationError('Invalid action type'); + const emptyFieldsError = new InstrumentationError('Fields cannot be empty'); inputs.forEach((input) => { const { fields, action } = input.message; const isInsertOrDelete = action === 'insert' || action === 'delete'; - if (isInsertOrDelete) { - successMetadata.push(input.metadata); - const data = [ - { - Name: Config.audienceId, - TTLInMinutes: action === 'insert' ? ttlInMin(Config.ttlInDays) : 0, - }, - ]; - - Object.keys(fields).forEach((id) => { - const value = fields[id]; - if (value) { - // adding only non empty ID's - items.push({ [id]: value, Data: data }); - } - }); - } else { - errorResponseList.push(handleRtTfSingleEventError(input, error, {})); + if (!isInsertOrDelete) { + errorResponseList.push(handleRtTfSingleEventError(input, invalidActionTypeError, {})); + return; } + + if (isEmptyObject(fields)) { + errorResponseList.push(handleRtTfSingleEventError(input, emptyFieldsError, {})); + return; + } + + successMetadata.push(input.metadata); + const data = [ + { + Name: Config.audienceId, + TTLInMinutes: action === 'insert' ? ttlInMin(Config.ttlInDays) : 0, + }, + ]; + + Object.keys(fields).forEach((id) => { + const value = fields[id]; + if (value) { + // adding only non empty ID's + items.push({ [id]: value, Data: data }); + } + }); }); const payloads = batchResponseBuilder(items, Config); + if (payloads.length === 0) { + return errorResponseList; + } const response = getSuccessRespEvents(payloads, successMetadata, destination, true); return [response, ...errorResponseList]; diff --git a/test/integrations/destinations/the_trade_desk/router/data.ts b/test/integrations/destinations/the_trade_desk/router/data.ts index 3c9cb1cc70..8aa16612fc 100644 --- a/test/integrations/destinations/the_trade_desk/router/data.ts +++ b/test/integrations/destinations/the_trade_desk/router/data.ts @@ -533,4 +533,298 @@ export const data = [ }, }, }, + { + name: destType, + description: 'Invalid action type', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + message: { + type: 'record', + action: 'insert', + fields: { + DAID: 'test-daid-1', + UID2: 'test-uid2-1', + }, + channel: 'sources', + context: sampleContext, + recordId: '1', + }, + destination: sampleDestination, + metadata: { + jobId: 1, + }, + }, + { + message: { + type: 'record', + action: 'update', + fields: { + DAID: 'test-daid-2', + UID2: null, + }, + channel: 'sources', + context: sampleContext, + recordId: '2', + }, + destination: sampleDestination, + metadata: { + jobId: 2, + }, + }, + ], + destType, + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: [ + { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://sin-data.adsrvr.org/data/advertiser', + headers: {}, + params: {}, + body: { + JSON: { + DataProviderId: dataProviderId, + AdvertiserId: advertiserId, + Items: [ + { + DAID: 'test-daid-1', + Data: [ + { + Name: segmentName, + TTLInMinutes: 43200, + }, + ], + }, + { + UID2: 'test-uid2-1', + Data: [ + { + Name: segmentName, + TTLInMinutes: 43200, + }, + ], + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + ], + metadata: [ + { + jobId: 1, + }, + ], + batched: true, + statusCode: 200, + destination: sampleDestination, + }, + { + batched: false, + metadata: [{ jobId: 2 }], + statusCode: 400, + error: 'Invalid action type', + statTags: { + destType: destTypeInUpperCase, + implementation: 'cdkV2', + feature: 'router', + module: 'destination', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + }, + destination: sampleDestination, + }, + ], + }, + }, + }, + mockFns: defaultMockFns, + }, + { + name: destType, + description: 'Empty fields in the message', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + message: { + type: 'record', + action: 'insert', + fields: {}, + channel: 'sources', + context: sampleContext, + recordId: '1', + }, + destination: sampleDestination, + metadata: { + jobId: 1, + }, + }, + { + message: { + type: 'record', + action: 'insert', + fields: { + DAID: 'test-daid-1', + }, + channel: 'sources', + context: sampleContext, + recordId: '2', + }, + destination: sampleDestination, + metadata: { + jobId: 2, + }, + }, + ], + destType, + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: [ + { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://sin-data.adsrvr.org/data/advertiser', + headers: {}, + params: {}, + body: { + JSON: { + DataProviderId: dataProviderId, + AdvertiserId: advertiserId, + Items: [ + { + DAID: 'test-daid-1', + Data: [ + { + Name: segmentName, + TTLInMinutes: 43200, + }, + ], + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + ], + metadata: [ + { + jobId: 2, + }, + ], + batched: true, + statusCode: 200, + destination: sampleDestination, + }, + { + batched: false, + metadata: [{ jobId: 1 }], + statusCode: 400, + error: 'Fields cannot be empty', + statTags: { + destType: destTypeInUpperCase, + implementation: 'cdkV2', + feature: 'router', + module: 'destination', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + }, + destination: sampleDestination, + }, + ], + }, + }, + }, + mockFns: defaultMockFns, + }, + { + name: destType, + description: '`fields` is missing', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + message: { + type: 'record', + action: 'insert', + channel: 'sources', + context: sampleContext, + recordId: '1', + }, + destination: sampleDestination, + metadata: { + jobId: 1, + }, + }, + ], + destType, + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batched: false, + metadata: [{ jobId: 1 }], + statusCode: 400, + error: 'Fields cannot be empty', + statTags: { + destType: destTypeInUpperCase, + implementation: 'cdkV2', + feature: 'router', + module: 'destination', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + }, + destination: sampleDestination, + }, + ], + }, + }, + }, + mockFns: defaultMockFns, + }, ]; From 0c2f7bcbf705787087a8d9073145e282851ddb6f Mon Sep 17 00:00:00 2001 From: Anant Jain <62471433+anantjain45823@users.noreply.github.com> Date: Thu, 18 Jan 2024 15:37:50 +0530 Subject: [PATCH 132/135] fix: ortto remove phn:phone field if no phone is there in payload (#2997) * fix: ortto remove phn:phone field if no phone is there in payload * chore: added removeUndefinedAndNullValues at commonFields.fields level --- .../v2/destinations/ortto/procWorkflow.yaml | 3 +- .../destinations/ortto/processor/data.ts | 214 ++++++++++++++++++ 2 files changed, 216 insertions(+), 1 deletion(-) diff --git a/src/cdk/v2/destinations/ortto/procWorkflow.yaml b/src/cdk/v2/destinations/ortto/procWorkflow.yaml index 4b98f6246f..dfd7118c41 100644 --- a/src/cdk/v2/destinations/ortto/procWorkflow.yaml +++ b/src/cdk/v2/destinations/ortto/procWorkflow.yaml @@ -34,6 +34,7 @@ steps: description: | Builds common fields in destination payload. template: | + let phone = .message.().({{{{$.getGenericPaths("phone")}}}}); let commonFields = .message.().({ "fields": { "str::first": {{{{$.getGenericPaths("firstName")}}}}, @@ -46,7 +47,7 @@ steps: "dtz::b": $.getBirthdayObj({{{{$.getGenericPaths("birthday")}}}}), "str::ei": {{{{$.getGenericPaths("userId")}}}}, "str::language": .context.traits.language || .context.locale, - "phn::phone": {"n": {{{{$.getGenericPaths("phone")}}}}}, + "phn::phone": phone ? {"n": phone}, "bol::gdpr": .context.traits.gdpr ?? true, "bol::p": .context.traits.emailConsent || false, "bol::sp": .context.traits.smsConsent || false, diff --git a/test/integrations/destinations/ortto/processor/data.ts b/test/integrations/destinations/ortto/processor/data.ts index e7c71c7355..715262e447 100644 --- a/test/integrations/destinations/ortto/processor/data.ts +++ b/test/integrations/destinations/ortto/processor/data.ts @@ -1068,6 +1068,220 @@ export const data = [ }, }, }, + { + name: 'ortto', + description: 'Track call for updating activities with no phone provided', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, + ID: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', + Name: 'ORTTO', + Config: { + privateApiKey: 'dummyApiKey', + instanceRegion: 'other', + orttoEventsMapping: [ + { + rsEventName: 'RudderEvent', + orttoEventName: 'Ortto Event', + eventProperties: [ + { + rudderProperty: 'RudderProp', + orttoProperty: 'OrttoProp', + type: 'text', + }, + { + rudderProperty: 'RudderProp', + orttoProperty: 'OrttoProp', + type: 'longText', + }, + ], + }, + ], + orttoPersonAttributes: [ + { + rudderTraits: 'ruddertrait0', + orttoAttribute: 'ortto attirbute0', + type: 'email', + }, + { + rudderTraits: 'ruddertrait1', + orttoAttribute: 'ortto attirbute1', + type: 'email', + }, + ], + }, + Enabled: true, + Transformations: [], + }, + metadata: { destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', jobId: 2 }, + message: { + anonymousId: '8d872292709c6fbe', + channel: 'mobile', + context: { + app: { + build: '1', + name: 'AMTestProject', + namespace: 'com.rudderstack.android.rudderstack.sampleAndroidApp', + version: '1.0', + }, + device: { + id: '8d872292709c6fbe', + manufacturer: 'Google', + model: 'AOSPonIAEmulator', + name: 'generic_x86_arm', + type: 'android', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.2', + }, + locale: 'en-US', + network: { + carrier: 'Android', + bluetooth: false, + cellular: true, + wifi: true, + }, + os: { + name: 'Android', + version: '9', + }, + screen: { + density: 420, + height: 1794, + width: 1080, + }, + timezone: 'Asia/Kolkata', + traits: { + ruddertrait0: 'abc', + ruddertrait1: 'def', + address: { + city: 'Kolkata', + country: 'India', + postalcode: '700096', + state: 'West bengal', + street: 'Park Street', + }, + age: '30', + anonymousId: '8d872292709c6fbe', + birthday: '2020-05-26', + createDate: '18th March 2020', + description: 'Premium User for 3 years', + email: 'identify@test.com', + firstname: 'John', + gdpr: false, + userId: 'sample_user_id', + lastname: 'Sparrow', + name: 'John Sparrow', + id: 'sample_user_id', + username: 'john_sparrow', + }, + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)', + }, + event: 'RudderEvent', + integrations: { + All: true, + }, + messageId: '1590431830915-73bed370-5889-436d-9a9e-0c0e0c809d06', + properties: { + revenue: '30', + RudderProp: 'USD', + quantity: '5', + test_key_2: { + test_child_key_1: 'test_child_value_1', + }, + price: '58.0', + }, + originalTimestamp: '2020-05-25T18:37:10.917Z', + type: 'track', + userId: 'sample_user_id', + }, + }, + ], + method: 'POST', + }, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://api.ap3api.com/v1/activities/create', + headers: { + 'X-Api-Key': 'dummyApiKey', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + activities: [ + { + fields: { + 'str::first': 'John', + 'str::last': 'Sparrow', + 'str::email': 'identify@test.com', + 'geo::city': { + name: 'Kolkata', + }, + 'geo::country': {}, + 'geo::region': {}, + 'dtz::b': { + day: 26, + month: 5, + year: 2020, + }, + 'str::postal': '700096', + 'str::language': 'en-US', + 'str::ei': 'sample_user_id', + 'bol::gdpr': false, + 'bol::p': false, + 'bol::sp': false, + 'str:cm:ortto-attirbute0': 'abc', + 'str:cm:ortto-attirbute1': 'def', + }, + activity_id: 'act:cm:ortto-event', + attributes: { + 'str:cm:orttoprop': 'USD', + 'txt:cm:orttoprop': 'USD', + }, + location: {}, + }, + ], + merge_by: ['str::ei', 'str::email'], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + metadata: { + destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', + jobId: 2, + }, + statusCode: 200, + }, + ], + }, + }, + }, { name: 'ortto', description: 'Track call for updating activities', From 0fca088980368954e9a82addedd6a4544035259a Mon Sep 17 00:00:00 2001 From: Anant Jain <62471433+anantjain45823@users.noreply.github.com> Date: Thu, 18 Jan 2024 17:14:53 +0530 Subject: [PATCH 133/135] feat: onboard new tiktok version events 2.0 (#2961) * feat: onboard new tiktok version events 2.0 * feat: add batching support * chore: added test cases for batching and small fixes * chore: comments addressed * chore: test coverage improved and moved mocking of event 2.0 to component test suite * chore: test case config correction * fix: added extra mapping for user and page --- src/v0/destinations/tiktok_ads/config.js | 10 + .../tiktok_ads/data/TikTokTrack.json | 16 + .../tiktok_ads/data/TikTokTrackV2.json | 133 + src/v0/destinations/tiktok_ads/transform.js | 10 +- src/v0/destinations/tiktok_ads/transformV2.js | 738 ++++++ src/v0/destinations/tiktok_ads/util.js | 45 +- src/v0/destinations/tiktok_ads/util.test.js | 79 +- src/v0/util/index.js | 1 + .../destinations/tiktok_ads/mocks.ts | 6 + .../destinations/tiktok_ads/processor/data.ts | 1850 ++++++++++++- .../destinations/tiktok_ads/router/data.ts | 2327 +++++++++++++++-- 11 files changed, 4968 insertions(+), 247 deletions(-) create mode 100644 src/v0/destinations/tiktok_ads/data/TikTokTrackV2.json create mode 100644 src/v0/destinations/tiktok_ads/transformV2.js create mode 100644 test/integrations/destinations/tiktok_ads/mocks.ts diff --git a/src/v0/destinations/tiktok_ads/config.js b/src/v0/destinations/tiktok_ads/config.js index 641b2e0865..61009d4c31 100644 --- a/src/v0/destinations/tiktok_ads/config.js +++ b/src/v0/destinations/tiktok_ads/config.js @@ -9,6 +9,10 @@ const ConfigCategory = { type: 'track', name: 'TikTokTrack', }, + TRACK_V2: { + type: 'track', + name: 'TikTokTrackV2', + }, }; const PARTNER_NAME = 'RudderStack'; @@ -32,12 +36,18 @@ const eventNameMapping = { const mappingConfig = getMappingConfig(ConfigCategory, __dirname); +// tiktok docs for max batch size for events 2.0: https://business-api.tiktok.com/portal/docs?id=1771100779668482 +const maxBatchSizeV2 = 1000; +const trackEndpointV2 = 'https://business-api.tiktok.com/open_api/v1.3/event/track/'; module.exports = { TRACK_ENDPOINT, BATCH_ENDPOINT, MAX_BATCH_SIZE, PARTNER_NAME, trackMapping: mappingConfig[ConfigCategory.TRACK.name], + trackMappingV2: mappingConfig[ConfigCategory.TRACK_V2.name], eventNameMapping, DESTINATION: 'TIKTOK_ADS', + trackEndpointV2, + maxBatchSizeV2, }; diff --git a/src/v0/destinations/tiktok_ads/data/TikTokTrack.json b/src/v0/destinations/tiktok_ads/data/TikTokTrack.json index cc5f4886e0..62688b7952 100644 --- a/src/v0/destinations/tiktok_ads/data/TikTokTrack.json +++ b/src/v0/destinations/tiktok_ads/data/TikTokTrack.json @@ -42,6 +42,22 @@ "type": "toString" } }, + { + "destKey": "properties.shop_id", + "sourceKeys": ["properties.shop_id", "properties.shopId"], + "required": false, + "metadata": { + "type": "toString" + } + }, + { + "destKey": "properties.order_id", + "sourceKeys": ["properties.order_id", "properties.orderId"], + "required": false, + "metadata": { + "type": "toString" + } + }, { "destKey": "properties.content_type", "sourceKeys": ["properties.contentType", "properties.content_type"], diff --git a/src/v0/destinations/tiktok_ads/data/TikTokTrackV2.json b/src/v0/destinations/tiktok_ads/data/TikTokTrackV2.json new file mode 100644 index 0000000000..8a31d67199 --- /dev/null +++ b/src/v0/destinations/tiktok_ads/data/TikTokTrackV2.json @@ -0,0 +1,133 @@ +[ + { + "destKey": "event_id", + "sourceKeys": ["properties.eventId", "properties.event_id", "messageId"], + "required": false + }, + { + "destKey": "event_time", + "sourceKeys": "timestamp", + "sourceFromGenericMap": true, + "required": true, + "metadata": { + "type": "secondTimestamp" + } + }, + { + "destKey": "limited_data_use", + "sourceKeys": "properties.limited_data_use", + "required": false + }, + { + "destKey": "properties.contents", + "sourceKeys": "properties.contents", + "required": false + }, + { + "destKey": "properties.content_type", + "sourceKeys": ["properties.contentType", "properties.content_type"], + "metadata": { + "defaultValue": "product" + } + }, + { + "destKey": "properties.shop_id", + "sourceKeys": ["properties.shop_id", "properties.shopId"], + "required": false, + "metadata": { + "type": "toString" + } + }, + { + "destKey": "properties.order_id", + "sourceKeys": ["properties.order_id", "properties.orderId"], + "required": false, + "metadata": { + "type": "toString" + } + }, + { + "destKey": "properties.currency", + "sourceKeys": "properties.currency", + "required": false + }, + { + "destKey": "properties.value", + "sourceKeys": "properties.value", + "required": false + }, + { + "destKey": "properties.description", + "sourceKeys": "properties.description", + "required": false + }, + { + "destKey": "properties.query", + "sourceKeys": "properties.query", + "required": false + }, + { + "destKey": "page.url", + "sourceKeys": ["properties.context.page.url", "properties.url", "context.page.url"], + "required": true + }, + { + "destKey": "page.referrer", + "sourceKeys": [ + "properties.context.page.referrer", + "properties.referrer", + "context.page.referrer" + ], + "required": false + }, + { + "destKey": "user.locale", + "sourceKeys": ["properties.context.user.locale", "context.locale"], + "required": false + }, + { + "destKey": "user.ttclid", + "sourceKeys": "properties.ttclid", + "required": false + }, + { + "destKey": "user.ttp", + "sourceKeys": ["properties.context.user.ttp", "properties.ttp"], + "required": false + }, + { + "destKey": "user.email", + "sourceKeys": [ + "properties.context.user.email", + "context.user.email", + "traits.email", + "context.traits.email", + "properties.email" + ], + "metadata": { + "type": ["trim", "toLower"] + }, + "required": false + }, + { + "destKey": "user.phone", + "sourceKeys": [ + "properties.context.user.phone", + "traits.phone", + "context.traits.phone", + "properties.phone" + ], + "sourceFromGenericMap": false, + "required": false + }, + { + "destKey": "user.ip", + "sourceKeys": ["properties.context.user.ip", "context.ip", "request_ip"], + "required": false + }, + { + "destKey": "user.user_agent", + "sourceKeys": ["properties.context.user.userAgent", "context.userAgent"], + "required": false + } +] diff --git a/src/v0/destinations/tiktok_ads/transform.js b/src/v0/destinations/tiktok_ads/transform.js index 91e2189170..bdf3a0defe 100644 --- a/src/v0/destinations/tiktok_ads/transform.js +++ b/src/v0/destinations/tiktok_ads/transform.js @@ -21,6 +21,7 @@ const { handleRtTfSingleEventError, batchMultiplexedEvents, } = require('../../util'); +const { process: processV2, processRouterDest: processRouterDestV2 } = require('./transformV2'); const { getContents } = require('./util'); const { trackMapping, @@ -165,7 +166,9 @@ const trackResponseBuilder = async (message, { Config }) => { const process = async (event) => { const { message, destination } = event; - + if (destination.Config?.version === 'v2') { + return processV2(event); + } if (!destination.Config.accessToken) { throw new ConfigurationError('Access Token not found. Aborting '); } @@ -240,6 +243,11 @@ function getEventChunks(event, trackResponseList, eventsChunk) { } const processRouterDest = async (inputs, reqMetadata) => { + const { destination } = inputs[0]; + const { Config } = destination; + if (Config?.version === 'v2') { + return processRouterDestV2(inputs, reqMetadata); + } const errorRespEvents = checkInvalidRtTfEvents(inputs); if (errorRespEvents.length > 0) { return errorRespEvents; diff --git a/src/v0/destinations/tiktok_ads/transformV2.js b/src/v0/destinations/tiktok_ads/transformV2.js new file mode 100644 index 0000000000..91078dfe65 --- /dev/null +++ b/src/v0/destinations/tiktok_ads/transformV2.js @@ -0,0 +1,738 @@ +/* eslint-disable camelcase */ +/* eslint-disable @typescript-eslint/naming-convention */ +const set = require('set-value'); +const { ConfigurationError, InstrumentationError } = require('@rudderstack/integrations-lib'); +const { EventType } = require('../../../constants'); +const { + constructPayload, + defaultRequestConfig, + defaultPostRequestConfig, + removeUndefinedAndNullValues, + defaultBatchRequestConfig, + getSuccessRespEvents, + isDefinedAndNotNullAndNotEmpty, + getDestinationExternalID, + getHashFromArrayWithDuplicate, + checkInvalidRtTfEvents, + handleRtTfSingleEventError, +} = require('../../util'); +const { getContents, hashUserField } = require('./util'); +const config = require('./config'); + +const { trackMappingV2, trackEndpointV2, eventNameMapping, PARTNER_NAME } = config; +const { JSON_MIME_TYPE } = require('../../util/constant'); + +/** + * Generated track payload for an event using TikTokTrackV2.json config mapping, + * hashing user properties and + * defining contents from products + * @param {*} message + * @param {*} Config + * @param {*} event + * @returns track payload + */ +const getTrackResponsePayload = (message, destConfig, event) => { + const payload = constructPayload(message, trackMappingV2); + + // if contents is not an array converting it into array + if (payload.properties?.contents && !Array.isArray(payload.properties.contents)) { + payload.properties.contents = [payload.properties.contents]; + } + + // if contents is not present but we have properties.products present which has fields with superset of contents fields + if (payload.properties && !payload.properties.contents && message.properties.products) { + // retreiving data from products only when contents is not present + payload.properties.contents = getContents(message, false); + } + + // getting externalId and hashing it and storing it in + const externalId = getDestinationExternalID(message, 'tiktokExternalId'); + if (isDefinedAndNotNullAndNotEmpty(externalId)) { + set(payload, 'user.external_id', externalId); + } + if (destConfig.hashUserProperties && isDefinedAndNotNullAndNotEmpty(payload.user)) { + payload.user = hashUserField(payload.user); + } + payload.event = event; + // add partner name and return payload + return removeUndefinedAndNullValues(payload); +}; + +const trackResponseBuilder = async (message, { Config }) => { + const { eventsToStandard, sendCustomEvents, accessToken, pixelCode } = Config; + + let event = message.event?.toLowerCase().trim(); + if (!event) { + throw new InstrumentationError('Event name is required'); + } + + const standardEventsMap = getHashFromArrayWithDuplicate(eventsToStandard); + + if (!sendCustomEvents && eventNameMapping[event] === undefined && !standardEventsMap[event]) { + throw new InstrumentationError( + `Event name (${event}) is not valid, must be mapped to one of standard events`, + ); + } + const response = defaultRequestConfig(); + response.headers = { + 'Access-Token': accessToken, + 'Content-Type': JSON_MIME_TYPE, + }; + // tiktok doc for request: https://business-api.tiktok.com/portal/docs?id=1771100865818625 + response.method = defaultPostRequestConfig.requestMethod; + response.endpoint = trackEndpointV2; + const responseList = []; + if (standardEventsMap[event]) { + Object.keys(standardEventsMap).forEach((key) => { + if (key === event) { + standardEventsMap[event].forEach((eventName) => { + responseList.push(getTrackResponsePayload(message, Config, eventName)); + }); + } + }); + } else { + /* + For custom event we do not want to lower case the event or trim it we just want to send those as it is + Doc https://ads.tiktok.com/help/article/standard-events-parameters?lang=en + */ + event = eventNameMapping[event] || message.event; + // if there exists no event mapping we will build payload with custom event recieved + responseList.push(getTrackResponsePayload(message, Config, event)); + } + // set event source and event_source_id + response.body.JSON = { + event_source: 'web', + event_source_id: pixelCode, + partner_name: PARTNER_NAME, + test_event_code: message.properties?.testEventCode, + }; + response.body.JSON.data = responseList; + return response; +}; + +const process = async (event) => { + const { message, destination } = event; + + if (!destination.Config.accessToken) { + throw new ConfigurationError('Access Token not found. Aborting'); + } + + if (!destination.Config.pixelCode) { + throw new ConfigurationError('Pixel Code not found. Aborting'); + } + + if (!message.type) { + throw new InstrumentationError('Event type is required'); + } + + const messageType = message.type.toLowerCase(); + + let response; + if (messageType === EventType.TRACK) { + response = await trackResponseBuilder(message, destination); + } else { + throw new InstrumentationError(`Event type ${messageType} is not supported`); + } + return response; +}; + +/** + * it builds batch response for an event using defaultBatchRequestConfig() utility + * @param {*} eventsChunk + * @returns batchedRequest + * + * Example: + * inputEvent: + *{ + event: { + event_source_id: "dummyPixelCode", + event_source: "web", + partner_name: "RudderStack", + data: [ + { + event_id: "1616318632825_357", + event_time: 1600372167, + properties: { + contents: [ + { + price: 8, + quantity: 2, + content_type: "socks", + content_id: "1077218", + }, + { + price: 30, + quantity: 1, + content_type: "dress", + content_id: "1197218", + }, + ], + content_type: "product", + currency: "USD", + value: 46, + }, + page: { + url: "http://demo.mywebsite.com/purchase", + referrer: "http://demo.mywebsite.com", + }, + user: { + locale: "en-US", + email: "f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc", + phone: "2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea", + ip: "13.57.97.131", + user_agent: "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion", + external_id: "id5", + }, + event: "CompletePayment", + partner_name: "RudderStack", + }, + { + event_id: "1616318632825_357", + event_time: 1600372167, + properties: { + contents: [ + { + price: 8, + quantity: 2, + content_type: "socks", + content_id: "1077218", + }, + { + price: 30, + quantity: 1, + content_type: "dress", + content_id: "1197218", + }, + ], + content_type: "product", + currency: "USD", + value: 46, + }, + page: { + url: "http://demo.mywebsite.com/purchase", + }, + user: { + locale: "en-US", + email: "f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc", + phone: "2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea", + ip: "13.57.97.131", + user_agent: "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion", + external_id: "id1", + }, + event: "CompletePayment", + partner_name: "RudderStack", + } + ], + }, + metadata: [ + { + jobId: 5, + }, + { + jobId: 1, + } + ], + destination: { + Config: { + accessToken: "dummyAccessToken", + pixelCode: "dummyPixelCode", + hashUserProperties: false, + version: "v2", + }, + }, +} + * returns: + * + { + version: "1", + type: "REST", + method: "POST", + endpoint: "https://business-api.tiktok.com/open_api/v1.3/event/track/", + headers: { + "Access-Token": "dummyAccessToken", + "Content-Type": "application/json", + }, + params: { + }, + body: { + JSON: { + event_source_id: "asdfg", + event_source: "web", + partner_name: "RudderStack", + data: [ + { + event_id: "1616318632825_357", + event_time: 1600372167, + properties: { + contents: [ + { + price: 8, + quantity: 2, + content_type: "socks", + content_id: "1077218", + }, + { + price: 30, + quantity: 1, + content_type: "dress", + content_id: "1197218", + }, + ], + content_type: "product", + currency: "USD", + value: 46, + }, + page: { + url: "http://demo.mywebsite.com/purchase", + referrer: "http://demo.mywebsite.com", + }, + user: { + locale: "en-US", + email: "f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc", + phone: "2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea", + ip: "13.57.97.131", + user_agent: "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion", + external_id: "id5", + }, + event: "CompletePayment", + }, + { + event_id: "1616318632825_357", + event_time: 1600372167, + properties: { + contents: [ + { + price: 8, + quantity: 2, + content_type: "socks", + content_id: "1077218", + }, + { + price: 30, + quantity: 1, + content_type: "dress", + content_id: "1197218", + }, + ], + content_type: "product", + currency: "USD", + value: 46, + }, + page: { + url: "http://demo.mywebsite.com/purchase", + }, + user: { + locale: "en-US", + email: "f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc", + phone: "2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea", + ip: "13.57.97.131", + user_agent: "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion", + external_id: "id1", + }, + event: "CompletePayment", + } + ], + }, + JSON_ARRAY: { + }, + XML: { + }, + FORM: { + }, + }, + files: { + }, +} + */ +const buildBatchResponseForEvent = (inputEvent) => { + const { destination, event } = inputEvent; + const { accessToken } = destination.Config; + const { batchedRequest } = defaultBatchRequestConfig(); + batchedRequest.body.JSON = event; + batchedRequest.endpoint = trackEndpointV2; + batchedRequest.headers = { + 'Access-Token': accessToken, + 'Content-Type': 'application/json', + }; + return batchedRequest; +}; + +const getEventChunks = (event, trackResponseList, eventsChunk) => { + // only for already transformed payload + // eslint-disable-next-line no-param-reassign + event.message = Array.isArray(event.message) ? event.message : [event.message]; + + // not performing batching for test events as it is not supported + if (event.message[0].body.JSON.test_event_code) { + const { metadata, destination, message } = event; + trackResponseList.push(getSuccessRespEvents(message, [metadata], destination)); + } else { + eventsChunk.push({ ...event }); + } +}; + +/** + * This clubs eventsChunk request body and metadat based upon maxBatchSize + * @param {*} eventsChunk + * @param {*} maxBatchSize + * @returns array of objects as + * { + * event, // Batched Event + * metadata, // metadata of all the requests combined to form above event + * destination, // destination object + * } + * + * Example: + * + * eventsChunk:[ + { + message: [ + { + version: "1", + type: "REST", + method: "POST", + endpoint: "https://business-api.tiktok.com/open_api/v1.3/event/track/", + headers: { + "Access-Token": "dummyAccessToken", + "Content-Type": "application/json", + }, + params: { + }, + body: { + JSON: { + event_source: "web", + event_source_id: "pixel_code", + data: [ + { + event_id: "1616318632825_357", + event_time: 1600372167, + properties: { + contents: [ + { + price: 8, + quantity: 2, + content_type: "socks", + content_id: "1077218", + }, + { + price: 30, + quantity: 1, + content_type: "dress", + content_id: "1197218", + }, + ], + content_type: "product", + currency: "USD", + value: 46, + }, + page: { + url: "http://demo.mywebsite.com/purchase", + referrer: "http://demo.mywebsite.com", + }, + user: { + locale: "en-US", + email: "f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc", + phone: "2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea", + ip: "13.57.97.131", + user_agent: "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion", + external_id: "id5", + }, + event: "CompletePayment", + partner_name: "RudderStack", + }, + ], + }, + JSON_ARRAY: { + }, + XML: { + }, + FORM: { + }, + }, + files: { + }, + }, + ], + metadata: { + jobId: 5, + }, + destination: { + Config: { + accessToken: "dummyAccessToken", + pixelCode: "pixel_code", + hashUserProperties: false, + version: "v2", + }, + }, + }, + { + message: [ + { + version: "1", + type: "REST", + method: "POST", + endpoint: "https://business-api.tiktok.com/open_api/v1.3/event/track/", + headers: { + "Access-Token": "dummyAccessToken", + "Content-Type": "application/json", + }, + params: { + }, + body: { + JSON: { + event_source: "web", + event_source_id: "pixel_code", + data: [ + { + event_id: "1616318632825_357", + event_time: 1600372167, + properties: { + contents: [ + { + price: 8, + quantity: 2, + content_type: "socks", + content_id: "1077218", + }, + { + price: 30, + quantity: 1, + content_type: "dress", + content_id: "1197218", + }, + ], + content_type: "product", + currency: "USD", + value: 46, + }, + page: { + url: "http://demo.mywebsite.com/purchase", + }, + user: { + locale: "en-US", + email: "f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc", + phone: "2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea", + ip: "13.57.97.131", + user_agent: "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion", + external_id: "id1", + }, + event: "CompletePayment", + partner_name: "RudderStack", + }, + ], + }, + JSON_ARRAY: { + }, + XML: { + }, + FORM: { + }, + }, + files: { + }, + }, + ], + metadata: { + jobId: 1, + }, + destination: { + Config: { + accessToken: "dummyAccessToken", + pixelCode: "pixel_code", + hashUserProperties: false, + version: "v2", + }, + }, + } +] + * maxBatchSize = 1000 + +Returns +[ + { + event: { + event_source_id: "dummyPixelCode", + event_source: "web", + partner_name: "RudderStack", + data: [ + { + event_id: "1616318632825_357", + event_time: 1600372167, + properties: { + contents: [ + { + price: 8, + quantity: 2, + content_type: "socks", + content_id: "1077218", + }, + { + price: 30, + quantity: 1, + content_type: "dress", + content_id: "1197218", + }, + ], + content_type: "product", + currency: "USD", + value: 46, + }, + page: { + url: "http://demo.mywebsite.com/purchase", + referrer: "http://demo.mywebsite.com", + }, + user: { + locale: "en-US", + email: "f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc", + phone: "2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea", + ip: "13.57.97.131", + user_agent: "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion", + external_id: "id5", + }, + event: "CompletePayment", + partner_name: "RudderStack", + }, + { + event_id: "1616318632825_357", + event_time: 1600372167, + properties: { + contents: [ + { + price: 8, + quantity: 2, + content_type: "socks", + content_id: "1077218", + }, + { + price: 30, + quantity: 1, + content_type: "dress", + content_id: "1197218", + }, + ], + content_type: "product", + currency: "USD", + value: 46, + }, + page: { + url: "http://demo.mywebsite.com/purchase", + }, + user: { + locale: "en-US", + email: "f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc", + phone: "2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea", + ip: "13.57.97.131", + user_agent: "Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion", + external_id: "id1", + }, + event: "CompletePayment", + partner_name: "RudderStack", + } + ], + }, + metadata: [ + { + jobId: 5, + }, + { + jobId: 1, + } + ], + destination: { + Config: { + accessToken: "dummyAccessToken", + pixelCode: "dummyPixelCode", + hashUserProperties: false, + version: "v2", + }, + }, + } +] + */ +const batchEvents = (eventsChunk) => { + const events = []; + let data = []; + let metadata = []; + const { destination } = eventsChunk[0]; + const { pixelCode } = destination.Config; + eventsChunk.forEach((event) => { + const eventData = event.message[0]?.body.JSON.data; + // eslint-disable-next-line unicorn/consistent-destructuring + if (Array.isArray(eventData) && eventData?.length > config.maxBatchSizeV2 - data.length) { + // Partner name must be added above "data": [..]; + events.push({ + event: { + event_source_id: pixelCode, + event_source: 'web', + partner_name: PARTNER_NAME, + data: [...data], + }, + metadata: [...metadata], + destination, + }); + data = []; + metadata = []; + } + data.push(...eventData); + metadata.push(event.metadata); + }); + // Partner name must be added above "data": [..]; + events.push({ + event: { + event_source_id: pixelCode, + event_source: 'web', + partner_name: PARTNER_NAME, + data: [...data], + }, + metadata: [...metadata], + destination, + }); + return events; +}; +const processRouterDest = async (inputs, reqMetadata) => { + const errorRespEvents = checkInvalidRtTfEvents(inputs); + if (errorRespEvents.length > 0) { + return errorRespEvents; + } + const trackResponseList = []; // list containing single track event in batched format + const eventsChunk = []; // temporary variable to divide payload into chunks + const errorRespList = []; + await Promise.all( + inputs.map(async (event) => { + try { + if (event.message.statusCode) { + // already transformed event + getEventChunks(event, trackResponseList, eventsChunk); + } else { + // if not transformed + getEventChunks( + { + message: await process(event), + metadata: event.metadata, + destination: event.destination, + }, + trackResponseList, + eventsChunk, + ); + } + } catch (error) { + const errRespEvent = handleRtTfSingleEventError(event, error, reqMetadata); + errorRespList.push(errRespEvent); + } + }), + ); + + const batchedResponseList = []; + if (eventsChunk.length > 0) { + const batchedEvents = batchEvents(eventsChunk); + batchedEvents.forEach((batch) => { + const batchedRequest = buildBatchResponseForEvent(batch); + batchedResponseList.push( + getSuccessRespEvents(batchedRequest, batch.metadata, batch.destination, true), + ); + }); + } + return [...batchedResponseList.concat(trackResponseList), ...errorRespList]; +}; + +module.exports = { process, processRouterDest }; diff --git a/src/v0/destinations/tiktok_ads/util.js b/src/v0/destinations/tiktok_ads/util.js index dbc8b344fc..5f86193531 100644 --- a/src/v0/destinations/tiktok_ads/util.js +++ b/src/v0/destinations/tiktok_ads/util.js @@ -1,11 +1,12 @@ -const { removeUndefinedAndNullValues } = require('../../util'); +const { removeUndefinedAndNullValues, hashToSha256 } = require('../../util'); /** * Prepare contents array from products array * @param {*} message + * @param {*} getContentType if true contents.$.content_type is mapped otherwise not * @returns */ -const getContents = (message) => { +const getContents = (message, getContentType = true) => { const contents = []; const { properties } = message; // eslint-disable-next-line @typescript-eslint/naming-convention @@ -13,20 +14,50 @@ const getContents = (message) => { if (products && Array.isArray(products) && products.length > 0) { products.forEach((product) => { const singleProduct = { - content_type: - product.contentType || contentType || product.content_type || content_type || 'product', + content_type: getContentType + ? product.contentType || contentType || product.contentType || content_type || 'product' + : undefined, content_id: String(product.product_id), content_category: product.category, content_name: product.name, price: product.price, quantity: product.quantity, description: product.description, - brand: product.brand + brand: product.brand, }; contents.push(removeUndefinedAndNullValues(singleProduct)); }); } return contents; }; - -module.exports = { getContents }; +const hashString = (input) => hashToSha256(input.toString().trim()); +/* + * Hashing user related detail i.e external_id, email, phone_number + */ +const hashUserField = (user) => { + const updatedUser = { ...user }; + // hashing external_id + const { email, phone, external_id: externalId } = user; + if (externalId) { + // if there are multiple externalId's in form of array that tiktok supports then hashing every + if (Array.isArray(externalId)) { + updatedUser.external_id = externalId.map((extId) => hashString(extId).toString()); + } else { + updatedUser.external_id = hashString(externalId).toString(); + } + } + // hashing email + if (email && email.length > 0) { + updatedUser.email = hashString(email).toString(); + } + // hashing phone + if (phone && phone.length > 0) { + if (Array.isArray(phone)) { + updatedUser.phone = phone.map((num) => hashString(num).toString()); + } else { + updatedUser.phone = hashString(phone).toString(); + } + } + return updatedUser; +}; +module.exports = { getContents, hashUserField }; diff --git a/src/v0/destinations/tiktok_ads/util.test.js b/src/v0/destinations/tiktok_ads/util.test.js index 5a5cc2c505..67473ad9dd 100644 --- a/src/v0/destinations/tiktok_ads/util.test.js +++ b/src/v0/destinations/tiktok_ads/util.test.js @@ -1,4 +1,4 @@ -const { getContents } = require('./util'); +const { getContents, hashUserField } = require('./util'); describe('getContents utility test', () => { it('product id sent as number', () => { @@ -95,3 +95,80 @@ describe('getContents utility test', () => { expect(expectedOutput).toEqual(getContents(message)); }); }); + +describe('hashUserField utility test', () => { + it('should return the updated user object with hashed fields', () => { + const user = { + external_id: 123, + email: 'test@example.com', + phone: '+1234567890', + }; + + const hashedUser = hashUserField(user); + + expect(hashedUser).toEqual({ + external_id: "a665a45920422f9d417e4867efdc4fb8a04a1f3fff1fa07e998e86f7f7a27ae3", + email: '973dfe463ec85785f5f95af5ba3906eedb2d931c24e69824a89ea65dba4e813b', + phone: '422ce82c6fc1724ac878042f7d055653ab5e983d186e616826a72d4384b68af8', + }); + }); + it('should hash external_id, email and phone fields when they are defined and not null or empty', () => { + const user = { + external_id: '123', + email: 'test@example.com', + phone: '+1234567890', + }; + + const hashedUser = hashUserField(user); + + expect(hashedUser.external_id).toBeDefined(); + expect(hashedUser.email).toBeDefined(); + expect(hashedUser.phone).toBeDefined(); + }); + + it('should hash external_id field even if it contains multiple values in form of array', () => { + const user = { + external_id: ['123', '456', '789'], + phone: ['+1234130697', '+e211134234'], + }; + + const hashedUser = hashUserField(user); + + expect(Array.isArray(hashedUser.external_id)).toBe(true); + expect(hashedUser.external_id.length).toBe(user.external_id.length); + hashedUser.external_id.forEach((hashedId, index) => { + expect(hashedId).toBeDefined(); + expect(hashedId).not.toBe(user.external_id[index]); + }); + hashedUser.phone.forEach((hashedId, index) => { + expect(hashedId).toBeDefined(); + expect(hashedId).not.toBe(user.phone[index]); + }); + }); + + it('should not hash external_id, email or phone fields when they are undefined, null or empty', () => { + const user = { + external_id: undefined, + email: null, + phone: '', + }; + + const hashedUser = hashUserField(user); + + expect(hashedUser.external_id).toBeUndefined(); + expect(hashedUser.email).toBeNull(); + expect(hashedUser.phone).toBe(''); + }); + + it('should not modify the original user object', () => { + const user = { + external_id: '123', + email: 'test@example.com', + phone: '1234567890', + }; + + const hashedUser = hashUserField(user); + + expect(hashedUser).not.toBe(user); + }); +}); diff --git a/src/v0/util/index.js b/src/v0/util/index.js index 34182a7685..5433529b5e 100644 --- a/src/v0/util/index.js +++ b/src/v0/util/index.js @@ -2165,6 +2165,7 @@ module.exports = { getValueFromPropertiesOrTraits, getValuesAsArrayFromConfig, handleSourceKeysOperation, + hashToSha256, isAppleFamily, isBlank, isCdkDestination, diff --git a/test/integrations/destinations/tiktok_ads/mocks.ts b/test/integrations/destinations/tiktok_ads/mocks.ts new file mode 100644 index 0000000000..6003027d23 --- /dev/null +++ b/test/integrations/destinations/tiktok_ads/mocks.ts @@ -0,0 +1,6 @@ +import config from '../../../../src/v0/destinations/tiktok_ads/config'; + +export const defaultMockFns = () => { + + jest.replaceProperty(config, 'maxBatchSizeV2', 3) + }; diff --git a/test/integrations/destinations/tiktok_ads/processor/data.ts b/test/integrations/destinations/tiktok_ads/processor/data.ts index 76a4a1ca89..21a12e5174 100644 --- a/test/integrations/destinations/tiktok_ads/processor/data.ts +++ b/test/integrations/destinations/tiktok_ads/processor/data.ts @@ -89,7 +89,7 @@ export const data = [ destination: { Config: { accessToken: 'dummyAccessToken', - pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + pixelCode: '{{PIXEL-CODE}}', hashUserProperties: false, }, }, @@ -114,7 +114,7 @@ export const data = [ params: {}, body: { JSON: { - pixel_code: 'A1T8T4UYGVIQA8ORZMX9', + pixel_code: '{{PIXEL-CODE}}', event: 'CompletePayment', event_id: '1616318632825_357', timestamp: '2020-09-17T19:49:27Z', @@ -256,7 +256,7 @@ export const data = [ destination: { Config: { accessToken: 'dummyAccessToken', - pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + pixelCode: '{{PIXEL-CODE}}', hashUserProperties: false, }, }, @@ -281,7 +281,7 @@ export const data = [ params: {}, body: { JSON: { - pixel_code: 'A1T8T4UYGVIQA8ORZMX9', + pixel_code: '{{PIXEL-CODE}}', event: 'InitiateCheckout', event_id: '1616318632825_357', timestamp: '2020-09-17T19:49:27Z', @@ -418,7 +418,7 @@ export const data = [ destination: { Config: { accessToken: 'dummyAccessToken', - pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + pixelCode: '{{PIXEL-CODE}}', hashUserProperties: false, }, }, @@ -443,7 +443,7 @@ export const data = [ params: {}, body: { JSON: { - pixel_code: 'A1T8T4UYGVIQA8ORZMX9', + pixel_code: '{{PIXEL-CODE}}', event: 'AddToWishlist', event_id: '1616318632825_357', timestamp: '2020-09-17T19:49:27Z', @@ -581,7 +581,7 @@ export const data = [ destination: { Config: { accessToken: 'dummyAccessToken', - pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + pixelCode: '{{PIXEL-CODE}}', hashUserProperties: false, }, }, @@ -697,7 +697,7 @@ export const data = [ destination: { Config: { accessToken: 'dummyAccessToken', - pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + pixelCode: '{{PIXEL-CODE}}', hashUserProperties: false, }, }, @@ -722,7 +722,7 @@ export const data = [ params: {}, body: { JSON: { - pixel_code: 'A1T8T4UYGVIQA8ORZMX9', + pixel_code: '{{PIXEL-CODE}}', event: 'AddToWishlist', event_id: '1616318632825_357', timestamp: '2020-09-17T19:49:27Z', @@ -863,7 +863,7 @@ export const data = [ destination: { Config: { accessToken: 'dummyAccessToken', - pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + pixelCode: '{{PIXEL-CODE}}', hashUserProperties: false, }, }, @@ -888,7 +888,7 @@ export const data = [ params: {}, body: { JSON: { - pixel_code: 'A1T8T4UYGVIQA8ORZMX9', + pixel_code: '{{PIXEL-CODE}}', event: 'AddToWishlist', event_id: '1616318632825_357', timestamp: '2020-09-17T19:49:27Z', @@ -1028,7 +1028,7 @@ export const data = [ destination: { Config: { accessToken: 'dummyAccessToken', - pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + pixelCode: '{{PIXEL-CODE}}', hashUserProperties: true, }, }, @@ -1053,7 +1053,7 @@ export const data = [ params: {}, body: { JSON: { - pixel_code: 'A1T8T4UYGVIQA8ORZMX9', + pixel_code: '{{PIXEL-CODE}}', event: 'Subscribe', event_id: '1616318632825_357', timestamp: '2020-09-17T19:49:27Z', @@ -1192,7 +1192,7 @@ export const data = [ destination: { Config: { accessToken: 'dummyAccessToken', - pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + pixelCode: '{{PIXEL-CODE}}', hashUserProperties: false, }, }, @@ -1217,7 +1217,7 @@ export const data = [ params: {}, body: { JSON: { - pixel_code: 'A1T8T4UYGVIQA8ORZMX9', + pixel_code: '{{PIXEL-CODE}}', event: 'AddPaymentInfo', event_id: '1616318632825_357', timestamp: '2020-09-17T19:49:27Z', @@ -1355,7 +1355,7 @@ export const data = [ destination: { Config: { accessToken: 'dummyAccessToken', - pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + pixelCode: '{{PIXEL-CODE}}', hashUserProperties: false, }, }, @@ -1467,7 +1467,7 @@ export const data = [ destination: { Config: { accessToken: 'dummyAccessToken', - pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + pixelCode: '{{PIXEL-CODE}}', hashUserProperties: false, }, }, @@ -1580,7 +1580,7 @@ export const data = [ destination: { Config: { accessToken: 'dummyAccessToken', - pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + pixelCode: '{{PIXEL-CODE}}', hashUserProperties: false, }, }, @@ -1605,7 +1605,7 @@ export const data = [ params: {}, body: { JSON: { - pixel_code: 'A1T8T4UYGVIQA8ORZMX9', + pixel_code: '{{PIXEL-CODE}}', event: 'AddPaymentInfo', event_id: '1616318632825_357', properties: { @@ -1743,7 +1743,7 @@ export const data = [ destination: { Config: { accessToken: 'dummyAccessToken', - pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + pixelCode: '{{PIXEL-CODE}}', hashUserProperties: false, }, }, @@ -1768,7 +1768,7 @@ export const data = [ params: {}, body: { JSON: { - pixel_code: 'A1T8T4UYGVIQA8ORZMX9', + pixel_code: '{{PIXEL-CODE}}', event: 'SubmitForm', event_id: '16163186328257', timestamp: '2020-09-17T19:49:27Z', @@ -1894,7 +1894,7 @@ export const data = [ destination: { Config: { accessToken: 'dummyAccessToken', - pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + pixelCode: '{{PIXEL-CODE}}', hashUserProperties: false, }, }, @@ -1919,7 +1919,7 @@ export const data = [ params: {}, body: { JSON: { - pixel_code: 'A1T8T4UYGVIQA8ORZMX9', + pixel_code: '{{PIXEL-CODE}}', event: 'SubmitForm', event_id: '16163186328257', timestamp: '2020-09-17T19:49:27Z', @@ -2040,7 +2040,7 @@ export const data = [ destination: { Config: { accessToken: 'dummyAccessToken', - pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + pixelCode: '{{PIXEL-CODE}}', hashUserProperties: false, }, }, @@ -2065,7 +2065,7 @@ export const data = [ params: {}, body: { JSON: { - pixel_code: 'A1T8T4UYGVIQA8ORZMX9', + pixel_code: '{{PIXEL-CODE}}', event: 'Contact', event_id: '16163186328257', timestamp: '2020-09-17T19:49:27Z', @@ -2204,7 +2204,7 @@ export const data = [ destination: { Config: { accessToken: 'dummyAccessToken', - pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + pixelCode: '{{PIXEL-CODE}}', hashUserProperties: false, }, }, @@ -2318,7 +2318,7 @@ export const data = [ destination: { Config: { accessToken: 'dummyAccessToken', - pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + pixelCode: '{{PIXEL-CODE}}', hashUserProperties: false, }, }, @@ -2343,7 +2343,7 @@ export const data = [ params: {}, body: { JSON: { - pixel_code: 'A1T8T4UYGVIQA8ORZMX9', + pixel_code: '{{PIXEL-CODE}}', event: 'CompletePayment', event_id: '1616318632825_357', timestamp: '2020-09-17T19:49:27Z', @@ -2482,7 +2482,7 @@ export const data = [ destination: { Config: { accessToken: 'dummyAccessToken', - pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + pixelCode: '{{PIXEL-CODE}}', hashUserProperties: false, }, }, @@ -2507,7 +2507,7 @@ export const data = [ params: {}, body: { JSON: { - pixel_code: 'A1T8T4UYGVIQA8ORZMX9', + pixel_code: '{{PIXEL-CODE}}', event: 'PlaceAnOrder', event_id: '1616318632825_357', timestamp: '2020-09-17T19:49:27Z', @@ -2650,7 +2650,7 @@ export const data = [ destination: { Config: { accessToken: 'dummyAccessToken', - pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + pixelCode: '{{PIXEL-CODE}}', hashUserProperties: true, }, }, @@ -2675,7 +2675,7 @@ export const data = [ params: {}, body: { JSON: { - pixel_code: 'A1T8T4UYGVIQA8ORZMX9', + pixel_code: '{{PIXEL-CODE}}', event: 'Subscribe', event_id: '1616318632825_357', timestamp: '2020-09-17T19:49:27Z', @@ -2819,7 +2819,7 @@ export const data = [ destination: { Config: { accessToken: 'dummyAccessToken', - pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + pixelCode: '{{PIXEL-CODE}}', hashUserProperties: true, }, }, @@ -2844,7 +2844,7 @@ export const data = [ params: {}, body: { JSON: { - pixel_code: 'A1T8T4UYGVIQA8ORZMX9', + pixel_code: '{{PIXEL-CODE}}', event: 'Subscribe', event_id: '1616318632825_357', timestamp: '2020-09-17T19:49:27Z', @@ -2984,7 +2984,7 @@ export const data = [ destination: { Config: { accessToken: 'dummyAccessToken', - pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + pixelCode: '{{PIXEL-CODE}}', hashUserProperties: false, }, }, @@ -3009,7 +3009,7 @@ export const data = [ params: {}, body: { JSON: { - pixel_code: 'A1T8T4UYGVIQA8ORZMX9', + pixel_code: '{{PIXEL-CODE}}', event: 'CompletePayment', event_id: '1616318632825_357', timestamp: '2020-09-17T19:49:27Z', @@ -3148,7 +3148,7 @@ export const data = [ destination: { Config: { accessToken: 'dummyAccessToken', - pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + pixelCode: '{{PIXEL-CODE}}', hashUserProperties: false, eventsToStandard: [ { @@ -3187,7 +3187,7 @@ export const data = [ params: {}, body: { JSON: { - pixel_code: 'A1T8T4UYGVIQA8ORZMX9', + pixel_code: '{{PIXEL-CODE}}', event: 'download', event_id: '1616318632825_357', timestamp: '2020-09-17T19:49:27Z', @@ -3249,7 +3249,7 @@ export const data = [ params: {}, body: { JSON: { - pixel_code: 'A1T8T4UYGVIQA8ORZMX9', + pixel_code: '{{PIXEL-CODE}}', event: 'search', event_id: '1616318632825_357', timestamp: '2020-09-17T19:49:27Z', @@ -3388,7 +3388,7 @@ export const data = [ destination: { Config: { accessToken: 'dummyAccessToken', - pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + pixelCode: '{{PIXEL-CODE}}', hashUserProperties: false, eventsToStandard: [ { @@ -3508,7 +3508,7 @@ export const data = [ destination: { Config: { accessToken: 'dummyAccessToken', - pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + pixelCode: '{{PIXEL-CODE}}', hashUserProperties: false, eventsToStandard: [ { @@ -3543,7 +3543,7 @@ export const data = [ params: {}, body: { JSON: { - pixel_code: 'A1T8T4UYGVIQA8ORZMX9', + pixel_code: '{{PIXEL-CODE}}', event: 'download', event_id: '1616318632825_357', timestamp: '2020-09-17T19:49:27Z', @@ -3681,7 +3681,7 @@ export const data = [ destination: { Config: { accessToken: 'dummyAccessToken', - pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + pixelCode: '{{PIXEL-CODE}}', hashUserProperties: true, eventsToStandard: [ { @@ -3716,7 +3716,7 @@ export const data = [ params: {}, body: { JSON: { - pixel_code: 'A1T8T4UYGVIQA8ORZMX9', + pixel_code: '{{PIXEL-CODE}}', event: 'download', event_id: '1616318632825_357', timestamp: '2020-09-17T19:49:27Z', @@ -3854,7 +3854,7 @@ export const data = [ destination: { Config: { accessToken: 'dummyAccessToken', - pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + pixelCode: '{{PIXEL-CODE}}', hashUserProperties: true, eventsToStandard: [ { @@ -3889,7 +3889,7 @@ export const data = [ params: {}, body: { JSON: { - pixel_code: 'A1T8T4UYGVIQA8ORZMX9', + pixel_code: '{{PIXEL-CODE}}', event: 'download', event_id: '1616318632825_357', timestamp: '2020-09-17T19:49:27Z', @@ -4048,7 +4048,7 @@ export const data = [ destination: { Config: { accessToken: 'dummyAccessToken', - pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + pixelCode: '{{PIXEL-CODE}}', hashUserProperties: false, }, }, @@ -4073,7 +4073,7 @@ export const data = [ params: {}, body: { JSON: { - pixel_code: 'A1T8T4UYGVIQA8ORZMX9', + pixel_code: '{{PIXEL-CODE}}', event: 'CompletePayment', event_id: '1616318632825_357', timestamp: '2020-09-17T19:49:27Z', @@ -4219,7 +4219,7 @@ export const data = [ destination: { Config: { accessToken: 'dummyAccessToken', - pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + pixelCode: '{{PIXEL-CODE}}', hashUserProperties: false, }, }, @@ -4244,7 +4244,7 @@ export const data = [ params: {}, body: { JSON: { - pixel_code: 'A1T8T4UYGVIQA8ORZMX9', + pixel_code: '{{PIXEL-CODE}}', event: 'CompletePayment', event_id: '1616318632825_357', timestamp: '2020-09-17T19:49:27Z', @@ -4394,7 +4394,7 @@ export const data = [ destination: { Config: { accessToken: 'dummyAccessToken', - pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + pixelCode: '{{PIXEL-CODE}}', hashUserProperties: false, }, }, @@ -4419,7 +4419,7 @@ export const data = [ params: {}, body: { JSON: { - pixel_code: 'A1T8T4UYGVIQA8ORZMX9', + pixel_code: '{{PIXEL-CODE}}', event: 'CompletePayment', event_id: '1616318632825_357', timestamp: '2020-09-17T19:49:27Z', @@ -4541,7 +4541,7 @@ export const data = [ category: 'Games', url: 'https://www.website.com/product/path', image_url: 'https://www.website.com/product/path.jpg', - brand:"brand_name" + brand: 'brand_name', }, { product_id: '345', @@ -4574,7 +4574,7 @@ export const data = [ destination: { Config: { accessToken: 'dummyAccessToken', - pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + pixelCode: '{{PIXEL-CODE}}', hashUserProperties: false, }, }, @@ -4599,7 +4599,7 @@ export const data = [ params: {}, body: { JSON: { - pixel_code: 'A1T8T4UYGVIQA8ORZMX9', + pixel_code: '{{PIXEL-CODE}}', event: 'CompletePayment', event_id: '1616318632825_357', timestamp: '2020-09-17T19:49:27Z', @@ -4619,7 +4619,7 @@ export const data = [ content_name: 'Monopoly', price: 14, quantity: 1, - brand:"brand_name" + brand: 'brand_name', }, { content_type: 'product_group', @@ -4752,7 +4752,7 @@ export const data = [ destination: { Config: { accessToken: 'dummyAccessToken', - pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + pixelCode: '{{PIXEL-CODE}}', hashUserProperties: false, sendCustomEvents: true, }, @@ -4778,7 +4778,7 @@ export const data = [ params: {}, body: { JSON: { - pixel_code: 'A1T8T4UYGVIQA8ORZMX9', + pixel_code: '{{PIXEL-CODE}}', event: 'custom_event', event_id: '1616318632825_357', timestamp: '2020-09-17T19:49:27Z', @@ -4924,7 +4924,7 @@ export const data = [ destination: { Config: { accessToken: 'dummyAccessToken', - pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + pixelCode: '{{PIXEL-CODE}}', hashUserProperties: false, sendCustomEvents: false, }, @@ -4956,7 +4956,7 @@ export const data = [ }, { name: 'tiktok_ads', - description: 'Test 29 -> Camel Case Custom Event Pass', + description: 'Test 31 -> Camel Case Custom Event Pass', feature: 'processor', module: 'destination', version: 'v0', @@ -5044,7 +5044,7 @@ export const data = [ destination: { Config: { accessToken: 'dummyAccessToken', - pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + pixelCode: '{{PIXEL-CODE}}', hashUserProperties: false, sendCustomEvents: true, }, @@ -5070,7 +5070,7 @@ export const data = [ params: {}, body: { JSON: { - pixel_code: 'A1T8T4UYGVIQA8ORZMX9', + pixel_code: '{{PIXEL-CODE}}', event: 'customEvent', event_id: '1616318632825_357', timestamp: '2020-09-17T19:49:27Z', @@ -5126,4 +5126,1730 @@ export const data = [ }, }, }, + { + name: 'tiktok_ads', + description: 'Test 32 -> V2 -> Camel Case Custom Event Pass', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + context: { + traits: { + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f' + }, + userAgent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + ip: '13.57.97.131', + locale: 'en-US', + externalId: [ + { + type: 'tiktokExternalId', + id: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + ], + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + timestamp: '2020-09-17T19:49:27Z', + type: 'track', + event: 'customEvent', + properties: { + eventId: '1616318632825_357', + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + url: "http://demo.mywebsite.com/purchase", + clickId: 'dummyclickId', + currency: 'USD', + value: 46, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + version: 'v2', + accessToken: 'dummyAccessToken', + pixelCode: '{{PIXEL-CODE}}', + hashUserProperties: false, + sendCustomEvents: true, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://business-api.tiktok.com/open_api/v1.3/event/track/', + headers: { + 'Access-Token': 'dummyAccessToken', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + event_source: 'web', + event_source_id: '{{PIXEL-CODE}}', + partner_name: 'RudderStack', + data: [ + { + event: 'customEvent', + event_id: '1616318632825_357', + event_time: 1600372167, + properties: { + content_type: "product", + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + currency: 'USD', + value: 46, + }, + page: { + url: 'http://demo.mywebsite.com/purchase' + }, + user: { + locale: "en-US", + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', + external_id: + 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + ip: '13.57.97.131', + user_agent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'tiktok_ads', + description: 'Test 33 -> V2 -> Event mapped to one standard event with contents present as it is in properties', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + context: { + traits: { + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f' + }, + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + userAgent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + ip: '13.57.97.131', + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'tiktokExternalId', + id: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + ], + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + timestamp: '2020-09-17T19:49:27Z', + type: 'track', + event: 'addToCart', + properties: { + eventId: '1616318632825_357', + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + clickId: 'dummyclickId', + currency: 'USD', + value: 46, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + version: 'v2', + accessToken: 'dummyAccessToken', + pixelCode: '{{PIXEL-CODE}}', + hashUserProperties: false, + sendCustomEvents: true, + eventsToStandard: [ + { + from: 'addToCart', + to: 'download', + } + ], + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://business-api.tiktok.com/open_api/v1.3/event/track/', + headers: { + 'Access-Token': 'dummyAccessToken', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + event_source: 'web', + event_source_id: '{{PIXEL-CODE}}', + partner_name: 'RudderStack', + data: [ + { + event: 'download', + event_id: '1616318632825_357', + event_time: 1600372167, + properties: { + content_type: "product", + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + currency: 'USD', + value: 46, + }, + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + locale: "en-US", + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', + external_id: + 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + ip: '13.57.97.131', + user_agent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'tiktok_ads', + description: 'Test 34 -> V2 -> Event mapped to multiple standard events and no phone', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + context: { + traits: { + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f' + }, + page: { + url: 'http://demo.mywebsite.com/purchase' + }, + userAgent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + ip: '13.57.97.131', + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'tiktokExternalId', + id: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + ], + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + timestamp: '2020-09-17T19:49:27Z', + type: 'track', + event: 'addToCart', + properties: { + eventId: '1616318632825_357', + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + clickId: 'dummyclickId', + currency: 'USD', + value: 46, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + version: 'v2', + accessToken: 'dummyAccessToken', + pixelCode: '{{PIXEL-CODE}}', + hashUserProperties: false, + sendCustomEvents: true, + eventsToStandard: [ + { + from: 'addToCart', + to: 'download', + }, + { + from: 'AddToCart', + to: 'AddToWishlist', + } + ], + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://business-api.tiktok.com/open_api/v1.3/event/track/', + headers: { + 'Access-Token': 'dummyAccessToken', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + event_source: 'web', + event_source_id: '{{PIXEL-CODE}}', + partner_name: 'RudderStack', + data: [ + { + event: 'download', + event_id: '1616318632825_357', + event_time: 1600372167, + properties: { + content_type: "product", + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + currency: 'USD', + value: 46, + }, + page: { + url: 'http://demo.mywebsite.com/purchase', + }, + user: { + locale: "en-US", + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', + external_id: + 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + ip: '13.57.97.131', + user_agent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + }, + }, + { + event: 'AddToWishlist', + event_id: '1616318632825_357', + event_time: 1600372167, + properties: { + content_type: "product", + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + currency: 'USD', + value: 46, + }, + page: { + url: 'http://demo.mywebsite.com/purchase', + }, + user: { + locale: "en-US", + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', + external_id: + 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + ip: '13.57.97.131', + user_agent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'tiktok_ads', + description: 'Test 35 -> V2 -> array of external_id and phone number', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + context: { + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + userAgent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + ip: '13.57.97.131', + externalId: [ + { + type: 'tiktokExternalId', + id: ['f0e388f53921a51f0bb0fc8a2944109ec188b5', '1f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc'], + }, + ], + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + timestamp: '2020-09-17T19:49:27Z', + type: 'track', + event: 'addToCart', + properties: { + eventId: '1616318632825_357', + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + clickId: 'dummyclickId', + currency: 'USD', + value: 46, + phone: ['+12345432', '+134234325'], + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f' + + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + version: 'v2', + accessToken: 'dummyAccessToken', + pixelCode: '{{PIXEL-CODE}}', + hashUserProperties: false, + sendCustomEvents: true, + eventsToStandard: [ + { + from: 'addToCart', + to: 'download', + }, + { + from: 'AddToCart', + to: 'AddToWishlist', + } + ], + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://business-api.tiktok.com/open_api/v1.3/event/track/', + headers: { + 'Access-Token': 'dummyAccessToken', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + event_source: 'web', + event_source_id: '{{PIXEL-CODE}}', + partner_name: 'RudderStack', + data: [ + { + event: 'download', + event_id: '1616318632825_357', + event_time: 1600372167, + properties: { + content_type: "product", + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + currency: 'USD', + value: 46, + }, + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + phone: ['+12345432', '+134234325'], + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', + external_id: ['f0e388f53921a51f0bb0fc8a2944109ec188b5', '1f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc'], + ip: '13.57.97.131', + user_agent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + }, + }, + { + event: 'AddToWishlist', + event_id: '1616318632825_357', + event_time: 1600372167, + properties: { + content_type: "product", + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + currency: 'USD', + value: 46, + }, + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + phone: ['+12345432', '+134234325'], + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', + external_id: ['f0e388f53921a51f0bb0fc8a2944109ec188b5', '1f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc'], + ip: '13.57.97.131', + user_agent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'tiktok_ads', + description: 'Test 36-> V2 -> Event not standard and no custom events allowed', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + context: { + traits: { + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f' + }, + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + locale: 'en-US', + ip: '13.57.97.131', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'tiktokExternalId', + id: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + ], + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + timestamp: '2020-09-17T19:49:27Z', + type: 'track', + event: 'Product Added to Wishlist1', + properties: { + eventId: '1616318632825_357', + testEventCode: 'sample rudder test_event_code', + context: { + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + phone_number: + '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', + }, + }, + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + currency: 'USD', + value: 46, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: '{{PIXEL-CODE}}', + hashUserProperties: false, + version: 'v2', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: + 'Event name (product added to wishlist1) is not valid, must be mapped to one of standard events', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'TIKTOK_ADS', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'tiktok_ads', + description: 'Test 37-> V2 -> No Message type', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + timestamp: '2020-09-17T19:49:27Z', + event: 'Product Added to Wishlist1', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: '{{PIXEL-CODE}}', + hashUserProperties: false, + version: 'v2' + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: + 'Event type is required', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'TIKTOK_ADS', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'tiktok_ads', + description: 'Test 38-> V2 -> Event not found', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + timestamp: '2020-09-17T19:49:27Z', + type: 'track', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: '{{PIXEL-CODE}}', + hashUserProperties: false, + version: 'v2', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: + 'Event name is required', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'TIKTOK_ADS', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'tiktok_ads', + description: 'Test 39-> V2 -> Access Token not found', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + timestamp: '2020-09-17T19:49:27Z', + type: 'track', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + pixelCode: 'configuration', + hashUserProperties: false, + version: 'v2', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: + 'Access Token not found. Aborting', + statTags: { + errorCategory: 'dataValidation', + errorType: 'configuration', + destType: 'TIKTOK_ADS', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'tiktok_ads', + description: 'Test 40-> V2 -> Pixel Code not found. Aborting', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + timestamp: '2020-09-17T19:49:27Z', + type: 'track', + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + accessToken: 'dummyAccessToken', + hashUserProperties: false, + version: 'v2', + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: + 'Pixel Code not found. Aborting', + statTags: { + errorCategory: 'dataValidation', + errorType: 'configuration', + destType: 'TIKTOK_ADS', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'tiktok_ads', + description: 'Test 41 -> V2 -> One of standard event', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + context: { + traits: { + email: 'abc@xyz.com' + }, + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + userAgent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + ip: '13.57.97.131', + externalId: [ + { + type: 'tiktokExternalId', + id: ['f0e388f53921a51f0bb0fc8a2944109ec188b5', '1f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc'], + }, + ], + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + timestamp: '2020-09-17T19:49:27Z', + type: 'track', + event: 'viewcontent', + properties: { + eventId: '1616318632825_357', + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + clickId: 'dummyclickId', + currency: 'USD', + value: 46, + phone: ['+12345432', '+134234325'] + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + version: 'v2', + accessToken: 'dummyAccessToken', + pixelCode: '{{PIXEL-CODE}}', + hashUserProperties: true, + sendCustomEvents: false, + eventsToStandard: [ + { + from: 'addToCart', + to: 'download', + }, + { + from: 'AddToCart', + to: 'AddToWishlist', + } + ], + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://business-api.tiktok.com/open_api/v1.3/event/track/', + headers: { + 'Access-Token': 'dummyAccessToken', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + event_source: 'web', + event_source_id: '{{PIXEL-CODE}}', + partner_name: 'RudderStack', + data: [ + { + event: 'ViewContent', + event_id: '1616318632825_357', + event_time: 1600372167, + properties: { + content_type: "product", + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + currency: 'USD', + value: 46, + }, + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + email: 'ee278943de84e5d6243578ee1a1057bcce0e50daad9755f45dfa64b60b13bc5d', + external_id: ["3e0c7a51acd326b87f29596e38c22cbeb732df37bc5c8f5f524c14b55d3472db", "f8be04e62f5a3eba31c8b9380843666f28f3ab5f44a380f47fac04e9ce7b2168",], + ip: '13.57.97.131', + phone: [ + "49a15e38bdc2572d362a924c2ddd100baed0fe29db44270d3700fcef03b18c39", + "5a6a7a09b18278e220312ce26d711ff7c8263d0965ee3b1d26b1b6f0ac7e71b3", + ], + user_agent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + }, + } + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'tiktok_ads', + description: 'Test 42 -> V2 -> One of standard event and contents from products', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + context: { + traits: { + email: 'abc@xyz.com' + }, + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + userAgent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + ip: '13.57.97.131', + externalId: [ + { + type: 'tiktokExternalId', + id: ['f0e388f53921a51f0bb0fc8a2944109ec188b5', '1f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc'], + }, + ], + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + timestamp: '2020-09-17T19:49:27Z', + type: 'track', + event: 'viewcontent', + properties: { + order_id: 1234, + shop_id: 4567, + description: "Viewed games", + query: "New age games", + contentType: 'product_group', + eventId: '1616318632825_357', + products: [ + { + product_id: 123, + sku: 'G-32', + name: 'Monopoly', + price: 14, + quantity: 1, + contentType: 'product_group', + category: 'Games', + brand: 'adidas', + image_url: 'https://www.website.com/product/path.jpg', + }, + { + product_id: 345, + sku: 'F-32', + name: 'UNO', + price: 3.45, + contentType: 'product_group', + quantity: 2, + }, + ], + clickId: 'dummyclickId', + currency: 'USD', + value: 46, + phone: ['+12345432', '+134234325'] + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + version: 'v2', + accessToken: 'dummyAccessToken', + pixelCode: '{{PIXEL-CODE}}', + hashUserProperties: true, + sendCustomEvents: false, + eventsToStandard: [ + { + from: 'addToCart', + to: 'download', + }, + { + from: 'AddToCart', + to: 'AddToWishlist', + } + ], + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://business-api.tiktok.com/open_api/v1.3/event/track/', + headers: { + 'Access-Token': 'dummyAccessToken', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + event_source: 'web', + event_source_id: '{{PIXEL-CODE}}', + partner_name: 'RudderStack', + data: [ + { + event: 'ViewContent', + event_id: '1616318632825_357', + event_time: 1600372167, + properties: { + order_id: "1234", + shop_id: "4567", + description: "Viewed games", + query: "New age games", + content_type: "product_group", + contents: [ + { + price: 14, + quantity: 1, + content_category: 'Games', + content_id: '123', + content_name: 'Monopoly', + brand: 'adidas' + }, + { + price: 3.45, + quantity: 2, + content_id: '345', + content_name: 'UNO' + }, + ], + currency: 'USD', + value: 46, + }, + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + email: 'ee278943de84e5d6243578ee1a1057bcce0e50daad9755f45dfa64b60b13bc5d', + external_id: ["3e0c7a51acd326b87f29596e38c22cbeb732df37bc5c8f5f524c14b55d3472db", "f8be04e62f5a3eba31c8b9380843666f28f3ab5f44a380f47fac04e9ce7b2168",], + ip: '13.57.97.131', + phone: [ + "49a15e38bdc2572d362a924c2ddd100baed0fe29db44270d3700fcef03b18c39", + "5a6a7a09b18278e220312ce26d711ff7c8263d0965ee3b1d26b1b6f0ac7e71b3", + ], + user_agent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + }, + } + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'tiktok_ads', + description: 'Test 43 -> V2 -> Contents present as object in properties', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + context: { + traits: { + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f' + }, + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + userAgent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + ip: '13.57.97.131', + locale: 'en-US', + externalId: [ + { + type: 'tiktokExternalId', + id: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + ], + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + timestamp: '2020-09-17T19:49:27Z', + type: 'track', + event: 'addToCart', + properties: { + eventId: '1616318632825_357', + contents: { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + clickId: 'dummyclickId', + currency: 'USD', + value: 46, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + version: 'v2', + accessToken: 'dummyAccessToken', + pixelCode: '{{PIXEL-CODE}}', + hashUserProperties: false, + sendCustomEvents: true, + eventsToStandard: [ + { + from: 'addToCart', + to: 'download', + } + ], + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://business-api.tiktok.com/open_api/v1.3/event/track/', + headers: { + 'Access-Token': 'dummyAccessToken', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + event_source: 'web', + event_source_id: '{{PIXEL-CODE}}', + partner_name: 'RudderStack', + data: [ + { + event: 'download', + event_id: '1616318632825_357', + event_time: 1600372167, + properties: { + content_type: "product", + contents: [{ + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }], + currency: 'USD', + value: 46, + }, + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + locale: "en-US", + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', + external_id: + 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + ip: '13.57.97.131', + user_agent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + }, + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, + { + name: 'tiktok_ads', + description: 'Test 44 -> Events 2.0 Event type identify not suported', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + context: { + externalId: [ + { + type: 'tiktokExternalId', + id: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + ], + }, + timestamp: '2020-09-17T19:49:27Z', + type: 'identify', + event: 'contact', + properties: {}, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: '{{PIXEL-CODE}}', + hashUserProperties: false, + version: "v2" + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + statusCode: 400, + error: 'Event type identify is not supported', + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + destType: 'TIKTOK_ADS', + module: 'destination', + implementation: 'native', + feature: 'processor', + }, + }, + ], + }, + }, + }, + { + name: 'tiktok_ads', + description: 'Test 45-> events 1.0 build contents from properties.product.$ where length of prodicts is 0', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + context: { + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + ip: '13.57.97.131', + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + externalId: [ + { + type: 'tiktokExternalId', + id: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + ], + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + timestamp: '2020-09-17T19:49:27Z', + type: 'track', + event: 'checkout step completed', + properties: { + eventId: '1616318632825_357', + products: [], + currency: 'USD', + value: 46, + context: { + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + phone_number: + '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', + }, + }, + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: '{{PIXEL-CODE}}', + hashUserProperties: false, + }, + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://business-api.tiktok.com/open_api/v1.3/pixel/track/', + headers: { + 'Access-Token': 'dummyAccessToken', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + pixel_code: '{{PIXEL-CODE}}', + event: 'CompletePayment', + event_id: '1616318632825_357', + timestamp: '2020-09-17T19:49:27Z', + properties: { + currency: 'USD', + value: 46, + contents: [], + }, + context: { + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + phone_number: + '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', + external_id: + 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + ip: '13.57.97.131', + user_agent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + }, + partner_name: 'RudderStack', + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + userId: '', + }, + statusCode: 200, + }, + ], + }, + }, + }, ]; diff --git a/test/integrations/destinations/tiktok_ads/router/data.ts b/test/integrations/destinations/tiktok_ads/router/data.ts index a8c233c7a8..cbf8da0cf8 100644 --- a/test/integrations/destinations/tiktok_ads/router/data.ts +++ b/test/integrations/destinations/tiktok_ads/router/data.ts @@ -1,9 +1,9 @@ import { FEATURES } from '../../../../../src/v0/util/tags'; - +import { defaultMockFns } from '../mocks'; export const data = [ { name: 'tiktok_ads', - description: 'Test 0', + description: 'Test 0 -> Events 1.0 Multiple events in single batch', feature: FEATURES.ROUTER, module: 'destination', version: 'v0', @@ -22,21 +22,13 @@ export const data = [ namespace: 'com.rudderlabs.javascript', version: '1.0.0', }, - library: { - name: 'RudderLabs JavaScript SDK', - version: '1.0.0', - }, + library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, userAgent: 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', ip: '13.57.97.131', locale: 'en-US', - os: { - name: '', - version: '', - }, - screen: { - density: 2, - }, + os: { name: '', version: '' }, + screen: { density: 2 }, externalId: [ { type: 'tiktokExternalId', @@ -54,18 +46,8 @@ export const data = [ eventId: '1616318632825_357', clickId: 'dummyClickId', contents: [ - { - price: 8, - quantity: 2, - content_type: 'socks', - content_id: '1077218', - }, - { - price: 30, - quantity: 1, - content_type: 'dress', - content_id: '1197218', - }, + { price: 8, quantity: 2, content_type: 'socks', content_id: '1077218' }, + { price: 30, quantity: 1, content_type: 'dress', content_id: '1197218' }, ], currency: 'USD', value: 46.0, @@ -92,7 +74,7 @@ export const data = [ destination: { Config: { accessToken: 'dummyAccessToken', - pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + pixelCode: 'dummyPixelCode', hashUserProperties: false, }, }, @@ -108,21 +90,13 @@ export const data = [ namespace: 'com.rudderlabs.javascript', version: '1.0.0', }, - library: { - name: 'RudderLabs JavaScript SDK', - version: '1.0.0', - }, + library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, userAgent: 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', locale: 'en-US', ip: '13.57.97.131', - os: { - name: '', - version: '', - }, - screen: { - density: 2, - }, + os: { name: '', version: '' }, + screen: { density: 2 }, externalId: [ { type: 'tiktokExternalId', @@ -150,18 +124,8 @@ export const data = [ }, }, contents: [ - { - price: 8, - quantity: 2, - content_type: 'socks', - content_id: '1077218', - }, - { - price: 30, - quantity: 1, - content_type: 'dress', - content_id: '1197218', - }, + { price: 8, quantity: 2, content_type: 'socks', content_id: '1077218' }, + { price: 30, quantity: 1, content_type: 'dress', content_id: '1197218' }, ], currency: 'USD', value: 46.0, @@ -177,7 +141,7 @@ export const data = [ destination: { Config: { accessToken: 'dummyAccessToken', - pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + pixelCode: 'dummyPixelCode', hashUserProperties: false, }, }, @@ -193,21 +157,13 @@ export const data = [ namespace: 'com.rudderlabs.javascript', version: '1.0.0', }, - library: { - name: 'RudderLabs JavaScript SDK', - version: '1.0.0', - }, + library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, userAgent: 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', locale: 'en-US', ip: '13.57.97.131', - os: { - name: '', - version: '', - }, - screen: { - density: 2, - }, + os: { name: '', version: '' }, + screen: { density: 2 }, externalId: [ { type: 'tiktokExternalId', @@ -238,18 +194,8 @@ export const data = [ ip: '13.57.97.131', }, contents: [ - { - price: 8, - quantity: 2, - content_type: 'socks', - content_id: '1077218', - }, - { - price: 30, - quantity: 1, - content_type: 'dress', - content_id: '1197218', - }, + { price: 8, quantity: 2, content_type: 'socks', content_id: '1077218' }, + { price: 30, quantity: 1, content_type: 'dress', content_id: '1197218' }, ], currency: 'USD', value: 46.0, @@ -265,7 +211,7 @@ export const data = [ destination: { Config: { accessToken: 'dummyAccessToken', - pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + pixelCode: 'dummyPixelCode', hashUserProperties: false, }, }, @@ -281,21 +227,13 @@ export const data = [ namespace: 'com.rudderlabs.javascript', version: '1.0.0', }, - library: { - name: 'RudderLabs JavaScript SDK', - version: '1.0.0', - }, + library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, userAgent: 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', locale: 'en-US', ip: '13.57.97.131', - os: { - name: '', - version: '', - }, - screen: { - density: 2, - }, + os: { name: '', version: '' }, + screen: { density: 2 }, externalId: [ { type: 'tiktokExternalId', @@ -326,18 +264,8 @@ export const data = [ ip: '13.57.97.131', }, contents: [ - { - price: 8, - quantity: 2, - content_type: 'socks', - content_id: '1077218', - }, - { - price: 30, - quantity: 1, - content_type: 'dress', - content_id: '1197218', - }, + { price: 8, quantity: 2, content_type: 'socks', content_id: '1077218' }, + { price: 30, quantity: 1, content_type: 'dress', content_id: '1197218' }, ], currency: 'USD', value: 46.0, @@ -353,7 +281,7 @@ export const data = [ destination: { Config: { accessToken: 'dummyAccessToken', - pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + pixelCode: 'dummyPixelCode', hashUserProperties: false, }, }, @@ -382,7 +310,7 @@ export const data = [ params: {}, body: { JSON: { - pixel_code: 'A1T8T4UYGVIQA8ORZMX9', + pixel_code: 'dummyPixelCode', partner_name: 'RudderStack', batch: [ { @@ -392,12 +320,7 @@ export const data = [ timestamp: '2020-09-17T19:49:27Z', properties: { contents: [ - { - price: 8, - quantity: 2, - content_type: 'socks', - content_id: '1077218', - }, + { price: 8, quantity: 2, content_type: 'socks', content_id: '1077218' }, { price: 30, quantity: 1, @@ -409,9 +332,7 @@ export const data = [ value: 46, }, context: { - ad: { - callback: 'dummyClickId', - }, + ad: { callback: 'dummyClickId' }, page: { url: 'http://demo.mywebsite.com/purchase', referrer: 'http://demo.mywebsite.com', @@ -454,12 +375,7 @@ export const data = [ properties: { value: 46, contents: [ - { - price: 8, - quantity: 2, - content_id: '1077218', - content_type: 'socks', - }, + { price: 8, quantity: 2, content_id: '1077218', content_type: 'socks' }, { price: 30, quantity: 1, @@ -495,12 +411,7 @@ export const data = [ properties: { value: 46, contents: [ - { - price: 8, - quantity: 2, - content_id: '1077218', - content_type: 'socks', - }, + { price: 8, quantity: 2, content_id: '1077218', content_type: 'socks' }, { price: 30, quantity: 1, @@ -536,12 +447,7 @@ export const data = [ properties: { value: 46, contents: [ - { - price: 8, - quantity: 2, - content_id: '1077218', - content_type: 'socks', - }, + { price: 8, quantity: 2, content_id: '1077218', content_type: 'socks' }, { price: 30, quantity: 1, @@ -579,7 +485,7 @@ export const data = [ destination: { Config: { accessToken: 'dummyAccessToken', - pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + pixelCode: 'dummyPixelCode', hashUserProperties: false, }, }, @@ -591,7 +497,7 @@ export const data = [ }, { name: 'tiktok_ads', - description: 'Test 1', + description: 'Test 1 -> Events 1.0 Single Event inside batch', feature: FEATURES.ROUTER, module: 'destination', version: 'v0', @@ -610,27 +516,14 @@ export const data = [ namespace: 'com.rudderlabs.javascript', version: '1.0.0', }, - library: { - name: 'RudderLabs JavaScript SDK', - version: '1.0.0', - }, + library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, userAgent: 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', locale: 'en-US', ip: '13.57.97.131', - os: { - name: '', - version: '', - }, - screen: { - density: 2, - }, - externalId: [ - { - type: 'tiktokExternalId', - id: '1234', - }, - ], + os: { name: '', version: '' }, + screen: { density: 2 }, + externalId: [{ type: 'tiktokExternalId', id: '1234' }], }, messageId: '84e26acc-56a5-4835-8233-591137fca468', session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', @@ -646,27 +539,14 @@ export const data = [ url: 'http://demo.mywebsite.com/purchase', referrer: 'http://demo.mywebsite.com', }, - user: { - phone_number: '+858987675687', - email: 'sample@sample.com', - }, + user: { phone_number: '+858987675687', email: 'sample@sample.com' }, userAgent: 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', ip: '13.57.97.131', }, contents: [ - { - price: 8, - quantity: 2, - content_type: 'socks', - content_id: '1077218', - }, - { - price: 30, - quantity: 1, - content_type: 'dress', - content_id: '1197218', - }, + { price: 8, quantity: 2, content_type: 'socks', content_id: '1077218' }, + { price: 30, quantity: 1, content_type: 'dress', content_id: '1197218' }, ], currency: 'USD', value: 46.0, @@ -682,7 +562,7 @@ export const data = [ destination: { Config: { accessToken: 'dummyAccessToken', - pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + pixelCode: 'dummyPixelCode', hashUserProperties: true, }, }, @@ -723,22 +603,12 @@ export const data = [ }, event: 'AddToWishlist', event_id: '1616318632825_357', - pixel_code: 'A1T8T4UYGVIQA8ORZMX9', + pixel_code: 'dummyPixelCode', partner_name: 'RudderStack', properties: { contents: [ - { - content_id: '1077218', - content_type: 'socks', - price: 8, - quantity: 2, - }, - { - content_id: '1197218', - content_type: 'dress', - price: 30, - quantity: 1, - }, + { content_id: '1077218', content_type: 'socks', price: 8, quantity: 2 }, + { content_id: '1197218', content_type: 'dress', price: 30, quantity: 1 }, ], currency: 'USD', value: 46, @@ -764,7 +634,7 @@ export const data = [ destination: { Config: { accessToken: 'dummyAccessToken', - pixelCode: 'A1T8T4UYGVIQA8ORZMX9', + pixelCode: 'dummyPixelCode', hashUserProperties: true, }, }, @@ -780,4 +650,2109 @@ export const data = [ }, }, }, + { + name: 'tiktok_ads', + description: + 'Test 2 -> Events 2.0 Single event is mapped to multiple tiktok event in config and exceeding max batch size', + feature: FEATURES.ROUTER, + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + context: { + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + userAgent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + ip: '13.57.97.131', + locale: 'en-US', + externalId: [{ type: 'tiktokExternalId', id: 'id5' }], + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + timestamp: '2020-09-17T19:49:27Z', + type: 'track', + event: 'checkout step completed', + properties: { + eventId: '1616318632825_357', + clickId: 'dummyClickId', + contents: [ + { price: 8, quantity: 2, content_type: 'socks', content_id: '1077218' }, + { price: 30, quantity: 1, content_type: 'dress', content_id: '1197218' }, + ], + currency: 'USD', + value: 46, + phone: '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + metadata: { + jobId: 5, + }, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: 'dummyPixelCode', + hashUserProperties: false, + version: 'v2', + eventsToStandard: [ + { from: 'addToCart', to: 'CompletePayment' }, + { from: 'addToCart', to: 'download' }, + ], + }, + }, + }, + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + context: { + userAgent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + ip: '13.57.97.131', + locale: 'en-US', + externalId: [{ type: 'tiktokExternalId', id: 'id1' }], + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + timestamp: '2020-09-17T19:49:27Z', + type: 'track', + event: 'addToCart', + properties: { + eventId: '1616318632825_357', + clickId: 'dummyClickId', + contents: [ + { price: 8, quantity: 2, content_type: 'socks', content_id: '1077218' }, + { price: 30, quantity: 1, content_type: 'dress', content_id: '1197218' }, + ], + currency: 'USD', + value: 46, + url: 'http://demo.mywebsite.com/purchase', + phone: '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + metadata: { + jobId: 1, + }, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: 'dummyPixelCode', + hashUserProperties: false, + version: 'v2', + eventsToStandard: [ + { from: 'addToCart', to: 'CompletePayment' }, + { from: 'addToCart', to: 'download' }, + ], + }, + }, + }, + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + context: { + userAgent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + ip: '13.57.97.131', + locale: 'en-US', + externalId: [{ type: 'tiktokExternalId', id: 'id2' }], + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + timestamp: '2020-09-17T19:49:27Z', + type: 'track', + event: 'checkout step completed', + properties: { + eventId: '1616318632825_357', + clickId: 'dummyClickId', + contents: [ + { price: 8, quantity: 2, content_type: 'socks', content_id: '1077218' }, + { price: 30, quantity: 1, content_type: 'dress', content_id: '1197218' }, + ], + currency: 'USD', + value: 46, + url: 'http://demo.mywebsite.com/purchase', + phone: '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + metadata: { + jobId: 2, + }, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: 'dummyPixelCode', + hashUserProperties: false, + version: 'v2', + }, + }, + }, + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + context: { + userAgent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + ip: '13.57.97.131', + locale: 'en-US', + externalId: [{ type: 'tiktokExternalId', id: 'id4' }], + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + timestamp: '2020-09-17T19:49:27Z', + type: 'track', + event: 'checkout step completed', + properties: { + eventId: '1616318632825_357', + clickId: 'dummyClickId', + contents: [ + { price: 8, quantity: 2, content_type: 'socks', content_id: '1077218' }, + { price: 30, quantity: 1, content_type: 'dress', content_id: '1197218' }, + ], + currency: 'USD', + value: 46, + url: 'http://demo.mywebsite.com/purchase', + phone: '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + metadata: { + jobId: 4, + }, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: 'dummyPixelCode', + hashUserProperties: false, + version: 'v2', + }, + }, + }, + ], + destType: 'tiktok_ads', + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://business-api.tiktok.com/open_api/v1.3/event/track/', + headers: { + 'Access-Token': 'dummyAccessToken', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + event_source_id: 'dummyPixelCode', + event_source: 'web', + partner_name: 'RudderStack', + data: [ + { + event_id: '1616318632825_357', + event_time: 1600372167, + properties: { + contents: [ + { price: 8, quantity: 2, content_type: 'socks', content_id: '1077218' }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + content_type: 'product', + currency: 'USD', + value: 46, + }, + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + locale: 'en-US', + email: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + phone: '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + ip: '13.57.97.131', + user_agent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + external_id: 'id5', + }, + event: 'CompletePayment', + }, + { + event_id: '1616318632825_357', + event_time: 1600372167, + properties: { + contents: [ + { price: 8, quantity: 2, content_type: 'socks', content_id: '1077218' }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + content_type: 'product', + currency: 'USD', + value: 46, + }, + page: { url: 'http://demo.mywebsite.com/purchase' }, + user: { + locale: 'en-US', + email: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + phone: '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + ip: '13.57.97.131', + user_agent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + external_id: 'id1', + }, + event: 'CompletePayment', + }, + { + event_id: '1616318632825_357', + event_time: 1600372167, + properties: { + contents: [ + { price: 8, quantity: 2, content_type: 'socks', content_id: '1077218' }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + content_type: 'product', + currency: 'USD', + value: 46, + }, + page: { url: 'http://demo.mywebsite.com/purchase' }, + user: { + locale: 'en-US', + email: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + phone: '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + ip: '13.57.97.131', + user_agent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + external_id: 'id1', + }, + event: 'download', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + metadata: [ + { + jobId: 5, + }, + { + jobId: 1, + }, + ], + batched: true, + statusCode: 200, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: 'dummyPixelCode', + hashUserProperties: false, + version: 'v2', + eventsToStandard: [ + { from: 'addToCart', to: 'CompletePayment' }, + { from: 'addToCart', to: 'download' }, + ], + }, + }, + }, + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://business-api.tiktok.com/open_api/v1.3/event/track/', + headers: { + 'Access-Token': 'dummyAccessToken', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + event_source_id: 'dummyPixelCode', + event_source: 'web', + partner_name: 'RudderStack', + data: [ + { + event_id: '1616318632825_357', + event_time: 1600372167, + properties: { + contents: [ + { price: 8, quantity: 2, content_type: 'socks', content_id: '1077218' }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + content_type: 'product', + currency: 'USD', + value: 46, + }, + page: { url: 'http://demo.mywebsite.com/purchase' }, + user: { + locale: 'en-US', + email: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + phone: '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + ip: '13.57.97.131', + user_agent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + external_id: 'id2', + }, + event: 'CompletePayment', + }, + { + event_id: '1616318632825_357', + event_time: 1600372167, + properties: { + contents: [ + { price: 8, quantity: 2, content_type: 'socks', content_id: '1077218' }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + content_type: 'product', + currency: 'USD', + value: 46, + }, + page: { url: 'http://demo.mywebsite.com/purchase' }, + user: { + locale: 'en-US', + email: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + phone: '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + ip: '13.57.97.131', + user_agent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + external_id: 'id4', + }, + event: 'CompletePayment', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + metadata: [ + { + jobId: 2, + }, + { + jobId: 4, + }, + ], + batched: true, + statusCode: 200, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: 'dummyPixelCode', + hashUserProperties: false, + version: 'v2', + eventsToStandard: [ + { from: 'addToCart', to: 'CompletePayment' }, + { from: 'addToCart', to: 'download' }, + ], + }, + }, + }, + ], + }, + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'tiktok_ads', + description: + 'Test 3 -> Events 2.0 Single event is mapped to single tiktok event in config and over the max batch limit', + feature: FEATURES.ROUTER, + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + context: { + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + userAgent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + ip: '13.57.97.131', + locale: 'en-US', + externalId: [{ type: 'tiktokExternalId', id: 'id5' }], + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + timestamp: '2020-09-17T19:49:27Z', + type: 'track', + event: 'checkout step completed', + properties: { + eventId: '1616318632825_357', + clickId: 'dummyClickId', + contents: [ + { price: 8, quantity: 2, content_type: 'socks', content_id: '1077218' }, + { price: 30, quantity: 1, content_type: 'dress', content_id: '1197218' }, + ], + currency: 'USD', + value: 46, + phone: '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + metadata: { + jobId: 5, + }, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: 'dummyPixelCode', + hashUserProperties: false, + version: 'v2', + }, + }, + }, + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + context: { + userAgent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + ip: '13.57.97.131', + locale: 'en-US', + externalId: [{ type: 'tiktokExternalId', id: 'id1' }], + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + timestamp: '2020-09-17T19:49:27Z', + type: 'track', + event: 'checkout step completed', + properties: { + eventId: '1616318632825_357', + clickId: 'dummyClickId', + contents: [ + { price: 8, quantity: 2, content_type: 'socks', content_id: '1077218' }, + { price: 30, quantity: 1, content_type: 'dress', content_id: '1197218' }, + ], + currency: 'USD', + value: 46, + url: 'http://demo.mywebsite.com/purchase', + phone: '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + metadata: { + jobId: 1, + }, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: 'dummyPixelCode', + hashUserProperties: false, + version: 'v2', + }, + }, + }, + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + context: { + userAgent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + ip: '13.57.97.131', + locale: 'en-US', + externalId: [{ type: 'tiktokExternalId', id: 'id2' }], + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + timestamp: '2020-09-17T19:49:27Z', + type: 'track', + event: 'checkout step completed', + properties: { + eventId: '1616318632825_357', + clickId: 'dummyClickId', + contents: [ + { price: 8, quantity: 2, content_type: 'socks', content_id: '1077218' }, + { price: 30, quantity: 1, content_type: 'dress', content_id: '1197218' }, + ], + currency: 'USD', + value: 46, + url: 'http://demo.mywebsite.com/purchase', + phone: '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + metadata: { + jobId: 2, + }, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: 'dummyPixelCode', + hashUserProperties: false, + version: 'v2', + }, + }, + }, + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + context: { + userAgent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + ip: '13.57.97.131', + locale: 'en-US', + externalId: [{ type: 'tiktokExternalId', id: 'id4' }], + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + timestamp: '2020-09-17T19:49:27Z', + type: 'track', + event: 'checkout step completed', + properties: { + eventId: '1616318632825_357', + clickId: 'dummyClickId', + contents: [ + { price: 8, quantity: 2, content_type: 'socks', content_id: '1077218' }, + { price: 30, quantity: 1, content_type: 'dress', content_id: '1197218' }, + ], + currency: 'USD', + value: 46, + url: 'http://demo.mywebsite.com/purchase', + phone: '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + metadata: { + jobId: 4, + }, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: 'dummyPixelCode', + hashUserProperties: false, + version: 'v2', + }, + }, + }, + ], + destType: 'tiktok_ads', + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://business-api.tiktok.com/open_api/v1.3/event/track/', + headers: { + 'Access-Token': 'dummyAccessToken', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + event_source_id: 'dummyPixelCode', + event_source: 'web', + partner_name: 'RudderStack', + data: [ + { + event_id: '1616318632825_357', + event_time: 1600372167, + properties: { + contents: [ + { price: 8, quantity: 2, content_type: 'socks', content_id: '1077218' }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + content_type: 'product', + currency: 'USD', + value: 46, + }, + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + locale: 'en-US', + email: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + phone: '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + ip: '13.57.97.131', + user_agent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + external_id: 'id5', + }, + event: 'CompletePayment', + }, + { + event_id: '1616318632825_357', + event_time: 1600372167, + properties: { + contents: [ + { price: 8, quantity: 2, content_type: 'socks', content_id: '1077218' }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + content_type: 'product', + currency: 'USD', + value: 46, + }, + page: { url: 'http://demo.mywebsite.com/purchase' }, + user: { + locale: 'en-US', + email: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + phone: '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + ip: '13.57.97.131', + user_agent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + external_id: 'id1', + }, + event: 'CompletePayment', + }, + { + event_id: '1616318632825_357', + event_time: 1600372167, + properties: { + contents: [ + { price: 8, quantity: 2, content_type: 'socks', content_id: '1077218' }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + content_type: 'product', + currency: 'USD', + value: 46, + }, + page: { url: 'http://demo.mywebsite.com/purchase' }, + user: { + locale: 'en-US', + email: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + phone: '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + ip: '13.57.97.131', + user_agent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + external_id: 'id2', + }, + event: 'CompletePayment', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + metadata: [ + { + jobId: 5, + }, + { + jobId: 1, + }, + { + jobId: 2, + }, + ], + batched: true, + statusCode: 200, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: 'dummyPixelCode', + hashUserProperties: false, + version: 'v2', + }, + }, + }, + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://business-api.tiktok.com/open_api/v1.3/event/track/', + headers: { + 'Access-Token': 'dummyAccessToken', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + event_source_id: 'dummyPixelCode', + event_source: 'web', + partner_name: 'RudderStack', + data: [ + { + event_id: '1616318632825_357', + event_time: 1600372167, + properties: { + contents: [ + { price: 8, quantity: 2, content_type: 'socks', content_id: '1077218' }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + content_type: 'product', + currency: 'USD', + value: 46, + }, + page: { url: 'http://demo.mywebsite.com/purchase' }, + user: { + locale: 'en-US', + email: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + phone: '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + ip: '13.57.97.131', + user_agent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + external_id: 'id4', + }, + event: 'CompletePayment', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + metadata: [ + { + jobId: 4, + }, + ], + batched: true, + statusCode: 200, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: 'dummyPixelCode', + hashUserProperties: false, + version: 'v2', + }, + }, + }, + ], + }, + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'tiktok_ads', + description: 'Test 4 -> One input event is invalid with one event to multiple events', + feature: FEATURES.ROUTER, + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + context: { + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + userAgent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + ip: '13.57.97.131', + locale: 'en-US', + externalId: [{ type: 'tiktokExternalId', id: 'id5' }], + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + timestamp: '2020-09-17T19:49:27Z', + type: 'track', + event: 'checkout step completed', + properties: { + eventId: '1616318632825_357', + clickId: 'dummyClickId', + contents: [ + { price: 8, quantity: 2, content_type: 'socks', content_id: '1077218' }, + { price: 30, quantity: 1, content_type: 'dress', content_id: '1197218' }, + ], + currency: 'USD', + value: 46, + phone: '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + metadata: { + jobId: 5, + }, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: 'dummyPixelCode', + hashUserProperties: false, + version: 'v2', + eventsToStandard: [ + { from: 'addToCart', to: 'CompletePayment' }, + { from: 'addToCart', to: 'download' }, + ], + }, + }, + }, + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + context: { + userAgent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + ip: '13.57.97.131', + locale: 'en-US', + externalId: [{ type: 'tiktokExternalId', id: 'id1' }], + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + timestamp: '2020-09-17T19:49:27Z', + type: 'track', + event: 'abc', + properties: { + eventId: '1616318632825_357', + clickId: 'dummyClickId', + contents: [ + { price: 8, quantity: 2, content_type: 'socks', content_id: '1077218' }, + { price: 30, quantity: 1, content_type: 'dress', content_id: '1197218' }, + ], + currency: 'USD', + value: 46, + url: 'http://demo.mywebsite.com/purchase', + phone: '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + metadata: { + jobId: 1, + }, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: 'dummyPixelCode', + hashUserProperties: false, + version: 'v2', + eventsToStandard: [ + { from: 'addToCart', to: 'CompletePayment' }, + { from: 'addToCart', to: 'download' }, + ], + }, + }, + }, + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + context: { + userAgent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + ip: '13.57.97.131', + locale: 'en-US', + externalId: [{ type: 'tiktokExternalId', id: 'id2' }], + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + timestamp: '2020-09-17T19:49:27Z', + type: 'track', + event: 'checkout step completed', + properties: { + eventId: '1616318632825_357', + clickId: 'dummyClickId', + contents: [ + { price: 8, quantity: 2, content_type: 'socks', content_id: '1077218' }, + { price: 30, quantity: 1, content_type: 'dress', content_id: '1197218' }, + ], + currency: 'USD', + value: 46, + url: 'http://demo.mywebsite.com/purchase', + phone: '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + metadata: { + jobId: 2, + }, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: 'dummyPixelCode', + hashUserProperties: false, + version: 'v2', + }, + }, + }, + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + context: { + userAgent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + ip: '13.57.97.131', + locale: 'en-US', + externalId: [{ type: 'tiktokExternalId', id: 'id4' }], + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + timestamp: '2020-09-17T19:49:27Z', + type: 'track', + event: 'checkout step completed', + properties: { + eventId: '1616318632825_357', + clickId: 'dummyClickId', + contents: [ + { price: 8, quantity: 2, content_type: 'socks', content_id: '1077218' }, + { price: 30, quantity: 1, content_type: 'dress', content_id: '1197218' }, + ], + currency: 'USD', + value: 46, + url: 'http://demo.mywebsite.com/purchase', + phone: '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + metadata: { + jobId: 4, + }, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: 'dummyPixelCode', + hashUserProperties: false, + version: 'v2', + }, + }, + }, + ], + destType: 'tiktok_ads', + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://business-api.tiktok.com/open_api/v1.3/event/track/', + headers: { + 'Access-Token': 'dummyAccessToken', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + event_source_id: 'dummyPixelCode', + event_source: 'web', + partner_name: 'RudderStack', + data: [ + { + event_id: '1616318632825_357', + event_time: 1600372167, + properties: { + contents: [ + { price: 8, quantity: 2, content_type: 'socks', content_id: '1077218' }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + content_type: 'product', + currency: 'USD', + value: 46, + }, + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + locale: 'en-US', + email: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + phone: '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + ip: '13.57.97.131', + user_agent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + external_id: 'id5', + }, + event: 'CompletePayment', + }, + { + event_id: '1616318632825_357', + event_time: 1600372167, + properties: { + contents: [ + { price: 8, quantity: 2, content_type: 'socks', content_id: '1077218' }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + content_type: 'product', + currency: 'USD', + value: 46, + }, + page: { url: 'http://demo.mywebsite.com/purchase' }, + user: { + locale: 'en-US', + email: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + phone: '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + ip: '13.57.97.131', + user_agent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + external_id: 'id2', + }, + event: 'CompletePayment', + }, + { + event_id: '1616318632825_357', + event_time: 1600372167, + properties: { + contents: [ + { price: 8, quantity: 2, content_type: 'socks', content_id: '1077218' }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + content_type: 'product', + currency: 'USD', + value: 46, + }, + page: { url: 'http://demo.mywebsite.com/purchase' }, + user: { + locale: 'en-US', + email: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + phone: '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + ip: '13.57.97.131', + user_agent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + external_id: 'id4', + }, + event: 'CompletePayment', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + metadata: [ + { + jobId: 5, + }, + { + jobId: 2, + }, + { + jobId: 4, + }, + ], + batched: true, + statusCode: 200, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: 'dummyPixelCode', + hashUserProperties: false, + version: 'v2', + eventsToStandard: [ + { from: 'addToCart', to: 'CompletePayment' }, + { from: 'addToCart', to: 'download' }, + ], + }, + }, + }, + { + batched: false, + destination: { + Config: { + accessToken: 'dummyAccessToken', + eventsToStandard: [ + { from: 'addToCart', to: 'CompletePayment' }, + { from: 'addToCart', to: 'download' }, + ], + hashUserProperties: false, + pixelCode: 'dummyPixelCode', + version: 'v2', + }, + }, + error: 'Event name (abc) is not valid, must be mapped to one of standard events', + metadata: [ + { + jobId: 1, + }, + ], + statTags: { + destType: 'TIKTOK_ADS', + feature: 'router', + implementation: 'native', + module: 'destination', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + }, + statusCode: 400, + }, + ], + }, + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'tiktok_ads', + description: 'Test 5 -> Some input events are test events with one event to multiple events', + feature: FEATURES.ROUTER, + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + context: { + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + userAgent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + ip: '13.57.97.131', + locale: 'en-US', + externalId: [{ type: 'tiktokExternalId', id: 'id5' }], + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + timestamp: '2020-09-17T19:49:27Z', + type: 'track', + event: 'checkout step completed', + properties: { + eventId: '1616318632825_357', + clickId: 'dummyClickId', + contents: [ + { price: 8, quantity: 2, content_type: 'socks', content_id: '1077218' }, + { price: 30, quantity: 1, content_type: 'dress', content_id: '1197218' }, + ], + currency: 'USD', + value: 46, + phone: '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + metadata: { + jobId: 5, + }, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: 'dummyPixelCode', + hashUserProperties: false, + version: 'v2', + eventsToStandard: [ + { from: 'addToCart', to: 'CompletePayment' }, + { from: 'addToCart', to: 'download' }, + ], + }, + }, + }, + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + context: { + userAgent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + ip: '13.57.97.131', + locale: 'en-US', + externalId: [{ type: 'tiktokExternalId', id: 'id1' }], + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + timestamp: '2020-09-17T19:49:27Z', + type: 'track', + event: 'addToCart', + properties: { + eventId: '1616318632825_357', + clickId: 'dummyClickId', + contents: [ + { price: 8, quantity: 2, content_type: 'socks', content_id: '1077218' }, + { price: 30, quantity: 1, content_type: 'dress', content_id: '1197218' }, + ], + currency: 'USD', + value: 46, + url: 'http://demo.mywebsite.com/purchase', + phone: '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + metadata: { + jobId: 1, + }, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: 'dummyPixelCode', + hashUserProperties: false, + version: 'v2', + eventsToStandard: [ + { from: 'addToCart', to: 'CompletePayment' }, + { from: 'addToCart', to: 'download' }, + ], + }, + }, + }, + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + context: { + userAgent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + ip: '13.57.97.131', + locale: 'en-US', + externalId: [{ type: 'tiktokExternalId', id: 'id2' }], + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + timestamp: '2020-09-17T19:49:27Z', + type: 'track', + event: 'checkout step completed', + properties: { + testEventCode: 'Some test event code for testing setup', + eventId: '1616318632825_357', + clickId: 'dummyClickId', + contents: [ + { price: 8, quantity: 2, content_type: 'socks', content_id: '1077218' }, + { price: 30, quantity: 1, content_type: 'dress', content_id: '1197218' }, + ], + currency: 'USD', + value: 46, + url: 'http://demo.mywebsite.com/purchase', + phone: '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + metadata: { + jobId: 2, + }, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: 'dummyPixelCode', + hashUserProperties: false, + version: 'v2', + }, + }, + }, + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + context: { + userAgent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + ip: '13.57.97.131', + locale: 'en-US', + externalId: [{ type: 'tiktokExternalId', id: 'id4' }], + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + timestamp: '2020-09-17T19:49:27Z', + type: 'track', + event: 'checkout step completed', + properties: { + eventId: '1616318632825_357', + clickId: 'dummyClickId', + contents: [ + { price: 8, quantity: 2, content_type: 'socks', content_id: '1077218' }, + { price: 30, quantity: 1, content_type: 'dress', content_id: '1197218' }, + ], + currency: 'USD', + value: 46, + url: 'http://demo.mywebsite.com/purchase', + phone: '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + metadata: { + jobId: 4, + }, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: 'dummyPixelCode', + hashUserProperties: false, + version: 'v2', + }, + }, + }, + ], + destType: 'tiktok_ads', + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://business-api.tiktok.com/open_api/v1.3/event/track/', + headers: { + 'Access-Token': 'dummyAccessToken', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + event_source_id: 'dummyPixelCode', + event_source: 'web', + partner_name: 'RudderStack', + data: [ + { + event_id: '1616318632825_357', + event_time: 1600372167, + properties: { + contents: [ + { price: 8, quantity: 2, content_type: 'socks', content_id: '1077218' }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + content_type: 'product', + currency: 'USD', + value: 46, + }, + page: { + url: 'http://demo.mywebsite.com/purchase', + referrer: 'http://demo.mywebsite.com', + }, + user: { + locale: 'en-US', + email: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + phone: '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + ip: '13.57.97.131', + user_agent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + external_id: 'id5', + }, + event: 'CompletePayment', + }, + { + event_id: '1616318632825_357', + event_time: 1600372167, + properties: { + contents: [ + { price: 8, quantity: 2, content_type: 'socks', content_id: '1077218' }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + content_type: 'product', + currency: 'USD', + value: 46, + }, + page: { url: 'http://demo.mywebsite.com/purchase' }, + user: { + locale: 'en-US', + email: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + phone: '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + ip: '13.57.97.131', + user_agent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + external_id: 'id1', + }, + event: 'CompletePayment', + }, + { + event_id: '1616318632825_357', + event_time: 1600372167, + properties: { + contents: [ + { price: 8, quantity: 2, content_type: 'socks', content_id: '1077218' }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + content_type: 'product', + currency: 'USD', + value: 46, + }, + page: { url: 'http://demo.mywebsite.com/purchase' }, + user: { + locale: 'en-US', + email: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + phone: '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + ip: '13.57.97.131', + user_agent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + external_id: 'id1', + }, + event: 'download', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + metadata: [ + { + jobId: 5, + }, + { + jobId: 1, + }, + ], + batched: true, + statusCode: 200, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: 'dummyPixelCode', + hashUserProperties: false, + version: 'v2', + eventsToStandard: [ + { from: 'addToCart', to: 'CompletePayment' }, + { from: 'addToCart', to: 'download' }, + ], + }, + }, + }, + { + batchedRequest: { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://business-api.tiktok.com/open_api/v1.3/event/track/', + headers: { + 'Access-Token': 'dummyAccessToken', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + event_source_id: 'dummyPixelCode', + event_source: 'web', + partner_name: 'RudderStack', + data: [ + { + event_id: '1616318632825_357', + event_time: 1600372167, + properties: { + contents: [ + { price: 8, quantity: 2, content_type: 'socks', content_id: '1077218' }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + content_type: 'product', + currency: 'USD', + value: 46, + }, + page: { url: 'http://demo.mywebsite.com/purchase' }, + user: { + locale: 'en-US', + email: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + phone: '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + ip: '13.57.97.131', + user_agent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + external_id: 'id4', + }, + event: 'CompletePayment', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + metadata: [ + { + jobId: 4, + }, + ], + batched: true, + statusCode: 200, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: 'dummyPixelCode', + hashUserProperties: false, + version: 'v2', + eventsToStandard: [ + { from: 'addToCart', to: 'CompletePayment' }, + { from: 'addToCart', to: 'download' }, + ], + }, + }, + }, + { + batchedRequest: [ + { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://business-api.tiktok.com/open_api/v1.3/event/track/', + headers: { + 'Access-Token': 'dummyAccessToken', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + event_source_id: 'dummyPixelCode', + event_source: 'web', + partner_name: 'RudderStack', + test_event_code: 'Some test event code for testing setup', + data: [ + { + event_id: '1616318632825_357', + event_time: 1600372167, + properties: { + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + content_type: 'product', + currency: 'USD', + value: 46, + }, + page: { url: 'http://demo.mywebsite.com/purchase' }, + user: { + locale: 'en-US', + email: + 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + phone: + '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + ip: '13.57.97.131', + user_agent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + external_id: 'id2', + }, + event: 'CompletePayment', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + ], + metadata: [ + { + jobId: 2, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: 'dummyPixelCode', + hashUserProperties: false, + version: 'v2', + }, + }, + }, + ], + }, + }, + }, + mockFns: defaultMockFns, + }, + { + name: 'tiktok_ads', + description: 'Test 6 -> All input events are test events', + feature: FEATURES.ROUTER, + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + context: { + userAgent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + ip: '13.57.97.131', + locale: 'en-US', + externalId: [{ type: 'tiktokExternalId', id: 'id5' }], + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + timestamp: '2020-09-17T19:49:27Z', + type: 'track', + event: 'checkout step completed', + properties: { + testEventCode: 'TEST_EVENT_CODE', + eventId: '1616318632825_357', + clickId: 'dummyClickId', + contents: [ + { price: 8, quantity: 2, content_type: 'socks', content_id: '1077218' }, + { price: 30, quantity: 1, content_type: 'dress', content_id: '1197218' }, + ], + currency: 'USD', + value: 46, + url: 'http://demo.mywebsite.com/purchase', + phone: '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + metadata: { + jobId: 5, + }, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: 'dummyPixelCode', + hashUserProperties: false, + version: 'v2', + eventsToStandard: [ + { from: 'addToCart', to: 'CompletePayment' }, + { from: 'addToCart', to: 'download' }, + ], + }, + }, + }, + { + message: { + anonymousId: '21e13f4bc7ceddad', + channel: 'web', + context: { + userAgent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + ip: '13.57.97.131', + locale: 'en-US', + externalId: [{ type: 'tiktokExternalId', id: 'id2' }], + }, + messageId: '84e26acc-56a5-4835-8233-591137fca468', + session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', + originalTimestamp: '2019-10-14T09:03:17.562Z', + timestamp: '2020-09-17T19:49:27Z', + type: 'track', + event: 'checkout step completed', + properties: { + testEventCode: 'TEST_EVENT_CODE', + eventId: '1616318632825_357', + clickId: 'dummyClickId', + contents: [ + { price: 8, quantity: 2, content_type: 'socks', content_id: '1077218' }, + { price: 30, quantity: 1, content_type: 'dress', content_id: '1197218' }, + ], + currency: 'USD', + value: 46, + url: 'http://demo.mywebsite.com/purchase', + phone: '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + email: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + }, + integrations: { + All: true, + }, + sentAt: '2019-10-14T09:03:22.563Z', + }, + metadata: { + jobId: 2, + }, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: 'dummyPixelCode', + hashUserProperties: false, + version: 'v2', + }, + }, + }, + ], + destType: 'tiktok_ads', + }, + method: 'POST', + }, + }, + output: { + response: { + status: 200, + body: { + output: [ + { + batchedRequest: [ + { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://business-api.tiktok.com/open_api/v1.3/event/track/', + headers: { + 'Access-Token': 'dummyAccessToken', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + event_source_id: 'dummyPixelCode', + event_source: 'web', + partner_name: 'RudderStack', + test_event_code: 'TEST_EVENT_CODE', + data: [ + { + event_id: '1616318632825_357', + event_time: 1600372167, + properties: { + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + content_type: 'product', + currency: 'USD', + value: 46, + }, + page: { url: 'http://demo.mywebsite.com/purchase' }, + user: { + locale: 'en-US', + email: + 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + phone: + '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + ip: '13.57.97.131', + user_agent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + external_id: 'id5', + }, + event: 'CompletePayment', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + ], + metadata: [ + { + jobId: 5, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: 'dummyPixelCode', + hashUserProperties: false, + version: 'v2', + eventsToStandard: [ + { from: 'addToCart', to: 'CompletePayment' }, + { from: 'addToCart', to: 'download' }, + ], + }, + }, + }, + { + batchedRequest: [ + { + version: '1', + type: 'REST', + method: 'POST', + endpoint: 'https://business-api.tiktok.com/open_api/v1.3/event/track/', + headers: { + 'Access-Token': 'dummyAccessToken', + 'Content-Type': 'application/json', + }, + params: {}, + body: { + JSON: { + event_source_id: 'dummyPixelCode', + event_source: 'web', + partner_name: 'RudderStack', + test_event_code: 'TEST_EVENT_CODE', + data: [ + { + event_id: '1616318632825_357', + event_time: 1600372167, + properties: { + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + { + price: 30, + quantity: 1, + content_type: 'dress', + content_id: '1197218', + }, + ], + content_type: 'product', + currency: 'USD', + value: 46, + }, + page: { url: 'http://demo.mywebsite.com/purchase' }, + user: { + locale: 'en-US', + email: + 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + phone: + '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', + ip: '13.57.97.131', + user_agent: + 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', + external_id: 'id2', + }, + event: 'CompletePayment', + }, + ], + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, + files: {}, + }, + ], + metadata: [ + { + jobId: 2, + }, + ], + batched: false, + statusCode: 200, + destination: { + Config: { + accessToken: 'dummyAccessToken', + pixelCode: 'dummyPixelCode', + hashUserProperties: false, + version: 'v2', + }, + }, + }, + ], + + }, + }, + }, + mockFns: defaultMockFns, + }, ]; From 34bf49d19f33326008a467230574e4f1c78e9ddb Mon Sep 17 00:00:00 2001 From: Anant Jain <62471433+anantjain45823@users.noreply.github.com> Date: Thu, 18 Jan 2024 18:15:02 +0530 Subject: [PATCH 134/135] fix: add valid code coverage file in workflows (#3000) --- .github/workflows/prepare-for-dev-deploy.yml | 2 +- .github/workflows/prepare-for-prod-dt-deploy.yml | 2 +- .github/workflows/prepare-for-prod-ut-deploy.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/prepare-for-dev-deploy.yml b/.github/workflows/prepare-for-dev-deploy.yml index cf97772e2e..9eb705aa52 100644 --- a/.github/workflows/prepare-for-dev-deploy.yml +++ b/.github/workflows/prepare-for-dev-deploy.yml @@ -14,7 +14,7 @@ jobs: report-coverage: name: Report Code Coverage if: github.event_name == 'push' - uses: ./.github/workflows/report-code-coverage.yml + uses: ./.github/workflows/dt-test-and-report-code-coverage.yml secrets: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} diff --git a/.github/workflows/prepare-for-prod-dt-deploy.yml b/.github/workflows/prepare-for-prod-dt-deploy.yml index 9669e1bc2c..2af853f643 100644 --- a/.github/workflows/prepare-for-prod-dt-deploy.yml +++ b/.github/workflows/prepare-for-prod-dt-deploy.yml @@ -14,7 +14,7 @@ jobs: report-coverage: name: Report Code Coverage if: github.event_name == 'push' - uses: ./.github/workflows/report-code-coverage.yml + uses: ./.github/workflows/dt-test-and-report-code-coverage.yml secrets: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} diff --git a/.github/workflows/prepare-for-prod-ut-deploy.yml b/.github/workflows/prepare-for-prod-ut-deploy.yml index ea5928f3b2..c2900d61da 100644 --- a/.github/workflows/prepare-for-prod-ut-deploy.yml +++ b/.github/workflows/prepare-for-prod-ut-deploy.yml @@ -14,7 +14,7 @@ jobs: report-coverage: name: Report Code Coverage if: github.event_name == 'push' - uses: ./.github/workflows/report-code-coverage.yml + uses: ./.github/workflows/dt-test-and-report-code-coverage.yml secrets: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} From 95f87e9b4ded640f14c10bcb305aa1643cf983da Mon Sep 17 00:00:00 2001 From: Utsab Chowdhury Date: Fri, 19 Jan 2024 10:25:54 +0530 Subject: [PATCH 135/135] chore: update component test and generate reports (#2989) --- .github/workflows/component-test-report.yml | 68 + .gitignore | 5 +- src/v0/destinations/tiktok_ads/util.test.js | 2 +- test/integrations/component.test.ts | 24 + .../destinations/klaviyo/processor/data.ts | 2511 +---------------- .../klaviyo/processor/ecomTestData.ts | 344 +++ .../klaviyo/processor/groupTestData.ts | 136 + .../klaviyo/processor/identifyTestData.ts | 551 ++++ .../klaviyo/processor/screenTestData.ts | 97 + .../klaviyo/processor/trackTestData.ts | 316 +++ .../klaviyo/processor/validationTestData.ts | 62 + .../destinations/klaviyo/router/data.ts | 5 +- .../destinations/tiktok_ads/mocks.ts | 5 +- .../destinations/tiktok_ads/processor/data.ts | 166 +- .../destinations/tiktok_ads/router/data.ts | 1 - test/integrations/testUtils.ts | 290 ++ test/test_reporter/reporter.ts | 133 + 17 files changed, 2138 insertions(+), 2578 deletions(-) create mode 100644 .github/workflows/component-test-report.yml create mode 100644 test/integrations/destinations/klaviyo/processor/ecomTestData.ts create mode 100644 test/integrations/destinations/klaviyo/processor/groupTestData.ts create mode 100644 test/integrations/destinations/klaviyo/processor/identifyTestData.ts create mode 100644 test/integrations/destinations/klaviyo/processor/screenTestData.ts create mode 100644 test/integrations/destinations/klaviyo/processor/trackTestData.ts create mode 100644 test/integrations/destinations/klaviyo/processor/validationTestData.ts create mode 100644 test/test_reporter/reporter.ts diff --git a/.github/workflows/component-test-report.yml b/.github/workflows/component-test-report.yml new file mode 100644 index 0000000000..9904004417 --- /dev/null +++ b/.github/workflows/component-test-report.yml @@ -0,0 +1,68 @@ +name: Component Test Reporter + +on: + pull_request: + types: + - opened + - reopened + - synchronize + +permissions: + id-token: write # allows the JWT to be requested from GitHub's OIDC provider + contents: read # This is required for actions/checkout + +jobs: + test_and_upload: + runs-on: ubuntu-latest + + steps: + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: arn:aws:iam::${{ secrets.AWS_DEV_ACCOUNT_ID }}:role/${{ secrets.AWS_DEV_S3_SYNC_ROLE }} + aws-region: us-east-1 + + - name: Checkout + uses: actions/checkout@v4.1.1 + with: + fetch-depth: 1 + + - name: Setup Node + uses: actions/setup-node@v4.0.1 + with: + node-version-file: '.nvmrc' + cache: 'npm' + + - name: Install Dependencies + run: npm ci + + - name: Run Tests and Generate Report + run: | + npm run test:ts -- component + + + - name: Uplaod Report to S3 + run: | + aws s3 cp ./test_reports/ s3://test-integrations-dev/integrations-test-reports/rudder-transformer/${{ github.event.number }}/ --recursive + + + - name: Comment on PR with S3 Object URL + uses: actions/github-script@v7 + with: + github-token: ${{ secrets.PAT }} + script: | + const { owner, repo } = context.repo; + // Get the pull request number + const prNumber = context.payload.pull_request.number; + const commentBody = `Test report for this run is available at: https://test-integrations-dev.s3.amazonaws.com/integrations-test-reports/rudder-transformer/${prNumber}/test-report.html`; + + + // Comment on the pull request + github.rest.issues.createComment({ + owner, + repo, + issue_number: prNumber, + body: commentBody + }); + + \ No newline at end of file diff --git a/.gitignore b/.gitignore index 24d37f6354..f96c3ac807 100644 --- a/.gitignore +++ b/.gitignore @@ -134,4 +134,7 @@ dist **/.DS_Store -.idea \ No newline at end of file +.idea + +# component test report +test_reports/ \ No newline at end of file diff --git a/src/v0/destinations/tiktok_ads/util.test.js b/src/v0/destinations/tiktok_ads/util.test.js index 67473ad9dd..1649b94eeb 100644 --- a/src/v0/destinations/tiktok_ads/util.test.js +++ b/src/v0/destinations/tiktok_ads/util.test.js @@ -107,7 +107,7 @@ describe('hashUserField utility test', () => { const hashedUser = hashUserField(user); expect(hashedUser).toEqual({ - external_id: "a665a45920422f9d417e4867efdc4fb8a04a1f3fff1fa07e998e86f7f7a27ae3", + external_id: 'a665a45920422f9d417e4867efdc4fb8a04a1f3fff1fa07e998e86f7f7a27ae3', email: '973dfe463ec85785f5f95af5ba3906eedb2d931c24e69824a89ea65dba4e813b', phone: '422ce82c6fc1724ac878042f7d055653ab5e983d186e616826a72d4384b68af8', }); diff --git a/test/integrations/component.test.ts b/test/integrations/component.test.ts index 847dd4c91f..d8d7732e12 100644 --- a/test/integrations/component.test.ts +++ b/test/integrations/component.test.ts @@ -21,6 +21,8 @@ import tags from '../../src/v0/util/tags'; import { Server } from 'http'; import { appendFileSync } from 'fs'; import { responses } from '../testHelper'; +import { generateTestReport, initaliseReport } from '../test_reporter/reporter'; +import _ from 'lodash'; // To run single destination test cases // npm run test:ts -- component --destination=adobe_analytics @@ -37,6 +39,7 @@ command .option('-f, --feature ', 'Enter Feature Name(processor, router)') .option('-i, --index ', 'Enter Test index') .option('-g, --generate ', 'Enter "true" If you want to generate network file') + .option('-id, --id ', 'Enter unique "Id" of the test case you want to run') .parse(); const opts = command.opts(); @@ -50,7 +53,10 @@ if (opts.generate === 'true') { let server: Server; +const REPORT_COMPATIBLE_INTEGRATION = ['klaviyo']; + beforeAll(async () => { + initaliseReport(); const app = new Koa(); app.use( bodyParser({ @@ -124,6 +130,16 @@ const testRoute = async (route, tcData: TestCaseData) => { const outputResp = tcData.output.response || ({} as any); expect(response.status).toEqual(outputResp.status); + if (REPORT_COMPATIBLE_INTEGRATION.includes(tcData.name?.toLocaleLowerCase())) { + const bodyMatched = _.isEqual(response.body, outputResp.body); + const statusMatched = response.status === outputResp.status; + if (bodyMatched && statusMatched) { + generateTestReport(tcData, response.body, 'passed'); + } else { + generateTestReport(tcData, response.body, 'failed'); + } + } + if (outputResp?.body) { expect(response.body).toEqual(outputResp.body); } @@ -181,6 +197,14 @@ describe.each(allTestDataFilePaths)('%s Tests', (testDataPath) => { if (opts.index !== undefined) { testData = [testData[parseInt(opts.index)]]; } + if (opts.id) { + testData = testData.filter((data) => { + if (data['id'] === opts.id) { + return true; + } + return false; + }); + } describe(`${testData[0].name} ${testData[0].module}`, () => { test.each(testData)('$feature -> $description', async (tcData) => { tcData?.mockFns?.(mockAdapter); diff --git a/test/integrations/destinations/klaviyo/processor/data.ts b/test/integrations/destinations/klaviyo/processor/data.ts index 58a1064251..06c4a3e530 100644 --- a/test/integrations/destinations/klaviyo/processor/data.ts +++ b/test/integrations/destinations/klaviyo/processor/data.ts @@ -1,2500 +1,15 @@ +import { ecomTestData } from './ecomTestData'; +import { groupTestData } from './groupTestData'; +import { identifyData } from './identifyTestData'; +import { screenTestData } from './screenTestData'; +import { trackTestData } from './trackTestData'; +import { validationTestData } from './validationTestData'; + export const data = [ - { - name: 'klaviyo', - description: 'Profile updating call and subscribe user (old transformer)', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - destination: { - Config: { - publicApiKey: 'dummyPublicApiKey', - privateApiKey: 'dummyPrivateApiKey', - }, - }, - message: { - type: 'identify', - sentAt: '2021-01-03T17:02:53.195Z', - userId: 'user@1', - channel: 'web', - context: { - os: { - name: '', - version: '', - }, - app: { - name: 'RudderLabs JavaScript SDK', - build: '1.0.0', - version: '1.1.11', - namespace: 'com.rudderlabs.javascript', - }, - traits: { - firstName: 'Test', - lastName: 'Rudderlabs', - email: 'test@rudderstack.com', - phone: '+12 345 578 900', - userId: 'user@1', - title: 'Developer', - organization: 'Rudder', - city: 'Tokyo', - region: 'Kanto', - country: 'JP', - zip: '100-0001', - Flagged: false, - Residence: 'Shibuya', - properties: { - listId: 'XUepkK', - subscribe: true, - consent: ['email', 'sms'], - }, - }, - locale: 'en-US', - screen: { - density: 2, - }, - library: { - name: 'RudderLabs JavaScript SDK', - version: '1.1.11', - }, - campaign: {}, - userAgent: - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', - }, - rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', - messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', - anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', - integrations: { - All: true, - }, - originalTimestamp: '2021-01-03T17:02:53.193Z', - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - userId: '', - method: 'PATCH', - endpoint: 'https://a.klaviyo.com/api/profiles/01GW3PHVY0MTCDGS0A1612HARX', - headers: { - Authorization: 'Klaviyo-API-Key dummyPrivateApiKey', - 'Content-Type': 'application/json', - Accept: 'application/json', - revision: '2023-02-22', - }, - params: {}, - body: { - JSON: { - data: { - type: 'profile', - attributes: { - external_id: 'user@1', - email: 'test@rudderstack.com', - first_name: 'Test', - last_name: 'Rudderlabs', - phone_number: '+12 345 578 900', - title: 'Developer', - organization: 'Rudder', - location: { - city: 'Tokyo', - region: 'Kanto', - country: 'JP', - zip: '100-0001', - }, - properties: { - Flagged: false, - Residence: 'Shibuya', - }, - }, - id: '01GW3PHVY0MTCDGS0A1612HARX', - }, - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - }, - statusCode: 200, - }, - { - output: { - version: '1', - type: 'REST', - method: 'POST', - userId: '', - endpoint: 'https://a.klaviyo.com/api/profile-subscription-bulk-create-jobs', - headers: { - 'Content-Type': 'application/json', - Accept: 'application/json', - Authorization: 'Klaviyo-API-Key dummyPrivateApiKey', - revision: '2023-02-22', - }, - params: {}, - body: { - JSON: { - data: { - type: 'profile-subscription-bulk-create-job', - attributes: { - list_id: 'XUepkK', - subscriptions: [ - { - email: 'test@rudderstack.com', - phone_number: '+12 345 578 900', - channels: { - email: ['MARKETING'], - sms: ['MARKETING'], - }, - }, - ], - }, - }, - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'klaviyo', - description: 'Identify call for with flattenProperties enabled (old transformer)', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - destination: { - Config: { - publicApiKey: 'dummyPublicApiKey', - privateApiKey: 'dummyPrivateApiKey', - flattenProperties: true, - }, - }, - message: { - type: 'identify', - sentAt: '2021-01-03T17:02:53.195Z', - userId: 'user@1', - channel: 'web', - context: { - os: { - name: '', - version: '', - }, - app: { - name: 'RudderLabs JavaScript SDK', - build: '1.0.0', - version: '1.1.11', - namespace: 'com.rudderlabs.javascript', - }, - traits: { - firstName: 'Test', - lastName: 'Rudderlabs', - email: 'test@rudderstack.com', - phone: '+12 345 578 900', - userId: 'user@1', - title: 'Developer', - organization: 'Rudder', - city: 'Tokyo', - region: 'Kanto', - country: 'JP', - zip: '100-0001', - Flagged: false, - Residence: 'Shibuya', - friend: { - names: { - first: 'Alice', - last: 'Smith', - }, - age: 25, - }, - properties: { - listId: 'XUepkK', - subscribe: true, - consent: ['email', 'sms'], - }, - }, - locale: 'en-US', - screen: { - density: 2, - }, - library: { - name: 'RudderLabs JavaScript SDK', - version: '1.1.11', - }, - campaign: {}, - userAgent: - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', - }, - rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', - messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', - anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', - integrations: { - All: true, - }, - originalTimestamp: '2021-01-03T17:02:53.193Z', - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - userId: '', - method: 'PATCH', - endpoint: 'https://a.klaviyo.com/api/profiles/01GW3PHVY0MTCDGS0A1612HARX', - headers: { - Authorization: 'Klaviyo-API-Key dummyPrivateApiKey', - 'Content-Type': 'application/json', - Accept: 'application/json', - revision: '2023-02-22', - }, - params: {}, - body: { - JSON: { - data: { - type: 'profile', - attributes: { - external_id: 'user@1', - email: 'test@rudderstack.com', - first_name: 'Test', - last_name: 'Rudderlabs', - phone_number: '+12 345 578 900', - title: 'Developer', - organization: 'Rudder', - location: { - city: 'Tokyo', - region: 'Kanto', - country: 'JP', - zip: '100-0001', - }, - properties: { - 'friend.age': 25, - 'friend.names.first': 'Alice', - 'friend.names.last': 'Smith', - Flagged: false, - Residence: 'Shibuya', - }, - }, - id: '01GW3PHVY0MTCDGS0A1612HARX', - }, - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - }, - statusCode: 200, - }, - { - output: { - version: '1', - type: 'REST', - userId: '', - method: 'POST', - endpoint: 'https://a.klaviyo.com/api/profile-subscription-bulk-create-jobs', - headers: { - 'Content-Type': 'application/json', - Accept: 'application/json', - Authorization: 'Klaviyo-API-Key dummyPrivateApiKey', - revision: '2023-02-22', - }, - params: {}, - body: { - JSON: { - data: { - type: 'profile-subscription-bulk-create-job', - attributes: { - list_id: 'XUepkK', - subscriptions: [ - { - email: 'test@rudderstack.com', - phone_number: '+12 345 578 900', - channels: { - email: ['MARKETING'], - sms: ['MARKETING'], - }, - }, - ], - }, - }, - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'klaviyo', - description: 'Profile updation call and subcribe user', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - destination: { - Config: { - publicApiKey: 'dummyPublicApiKey', - privateApiKey: 'dummyPrivateApiKeyforfailure', - }, - }, - message: { - type: 'identify', - sentAt: '2021-01-03T17:02:53.195Z', - userId: 'user@1', - channel: 'web', - context: { - os: { - name: '', - version: '', - }, - app: { - name: 'RudderLabs JavaScript SDK', - build: '1.0.0', - version: '1.1.11', - namespace: 'com.rudderlabs.javascript', - }, - traits: { - firstName: 'Test', - lastName: 'Rudderlabs', - email: 'test3@rudderstack.com', - phone: '+12 345 578 900', - userId: 'user@1', - title: 'Developer', - organization: 'Rudder', - city: 'Tokyo', - region: 'Kanto', - country: 'JP', - zip: '100-0001', - Flagged: false, - Residence: 'Shibuya', - properties: { - listId: 'XUepkK', - subscribe: true, - consent: ['email', 'sms'], - }, - }, - locale: 'en-US', - screen: { - density: 2, - }, - library: { - name: 'RudderLabs JavaScript SDK', - version: '1.1.11', - }, - campaign: {}, - userAgent: - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', - }, - rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', - messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', - anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', - integrations: { - All: true, - }, - originalTimestamp: '2021-01-03T17:02:53.193Z', - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - error: - '{"message":"Failed to create user due to \\"\\"","destinationResponse":"\\"\\""}', - statTags: { - destType: 'KLAVIYO', - errorCategory: 'network', - errorType: 'retryable', - feature: 'processor', - implementation: 'native', - module: 'destination', - }, - statusCode: 500, - }, - ], - }, - }, - }, - { - name: 'klaviyo', - description: 'Profile updation call listId is not provided for subscribing the user', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - destination: { - Config: { - publicApiKey: 'dummyPublicApiKey', - privateApiKey: 'dummyPrivateApiKey', - }, - }, - message: { - type: 'identify', - sentAt: '2021-01-03T17:02:53.195Z', - userId: 'user@1', - channel: 'web', - context: { - os: { - name: '', - version: '', - }, - app: { - name: 'RudderLabs JavaScript SDK', - build: '1.0.0', - version: '1.1.11', - namespace: 'com.rudderlabs.javascript', - }, - traits: { - firstName: 'Test', - lastName: 'Rudderlabs', - email: 'test@rudderstack.com', - phone: '+12 345 578 900', - userId: 'user@1', - title: 'Developer', - organization: 'Rudder', - city: 'Tokyo', - region: 'Kanto', - country: 'JP', - zip: '100-0001', - Flagged: false, - Residence: 'Shibuya', - properties: { - subscribe: false, - consent: ['email', 'sms'], - }, - }, - locale: 'en-US', - screen: { - density: 2, - }, - library: { - name: 'RudderLabs JavaScript SDK', - version: '1.1.11', - }, - campaign: {}, - userAgent: - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', - }, - rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', - messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', - anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', - integrations: { - All: true, - }, - originalTimestamp: '2021-01-03T17:02:53.193Z', - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'PATCH', - endpoint: 'https://a.klaviyo.com/api/profiles/01GW3PHVY0MTCDGS0A1612HARX', - headers: { - Authorization: 'Klaviyo-API-Key dummyPrivateApiKey', - 'Content-Type': 'application/json', - Accept: 'application/json', - revision: '2023-02-22', - }, - params: {}, - body: { - JSON: { - data: { - type: 'profile', - attributes: { - external_id: 'user@1', - email: 'test@rudderstack.com', - first_name: 'Test', - last_name: 'Rudderlabs', - phone_number: '+12 345 578 900', - title: 'Developer', - organization: 'Rudder', - location: { - city: 'Tokyo', - region: 'Kanto', - country: 'JP', - zip: '100-0001', - }, - properties: { - Flagged: false, - Residence: 'Shibuya', - }, - }, - id: '01GW3PHVY0MTCDGS0A1612HARX', - }, - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: '', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'klaviyo', - description: 'Identify call with enforceEmailAsPrimary enabled from UI', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - destination: { - Config: { - publicApiKey: 'dummyPublicApiKey', - privateApiKey: 'dummyPrivateApiKey', - enforceEmailAsPrimary: true, - }, - }, - message: { - type: 'identify', - sentAt: '2021-01-03T17:02:53.195Z', - userId: 'user@1', - channel: 'web', - context: { - os: { - name: '', - version: '', - }, - app: { - name: 'RudderLabs JavaScript SDK', - build: '1.0.0', - version: '1.1.11', - namespace: 'com.rudderlabs.javascript', - }, - traits: { - firstName: 'Test', - lastName: 'Rudderlabs', - email: 'test@rudderstack.com', - phone: '+12 345 578 900', - userId: 'user@1', - title: 'Developer', - organization: 'Rudder', - city: 'Tokyo', - region: 'Kanto', - country: 'JP', - zip: '100-0001', - Flagged: false, - Residence: 'Shibuya', - properties: { - listId: 'XUepkK', - subscribe: true, - consent: ['email', 'sms'], - }, - }, - locale: 'en-US', - screen: { - density: 2, - }, - library: { - name: 'RudderLabs JavaScript SDK', - version: '1.1.11', - }, - campaign: {}, - userAgent: - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', - }, - rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', - messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', - anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', - integrations: { - All: true, - }, - originalTimestamp: '2021-01-03T17:02:53.193Z', - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - userId: '', - method: 'PATCH', - endpoint: 'https://a.klaviyo.com/api/profiles/01GW3PHVY0MTCDGS0A1612HARX', - headers: { - Authorization: 'Klaviyo-API-Key dummyPrivateApiKey', - 'Content-Type': 'application/json', - Accept: 'application/json', - revision: '2023-02-22', - }, - params: {}, - body: { - JSON: { - data: { - type: 'profile', - attributes: { - email: 'test@rudderstack.com', - first_name: 'Test', - last_name: 'Rudderlabs', - phone_number: '+12 345 578 900', - title: 'Developer', - organization: 'Rudder', - location: { - city: 'Tokyo', - region: 'Kanto', - country: 'JP', - zip: '100-0001', - }, - properties: { - Flagged: false, - Residence: 'Shibuya', - _id: 'user@1', - }, - }, - id: '01GW3PHVY0MTCDGS0A1612HARX', - }, - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - }, - statusCode: 200, - }, - { - output: { - version: '1', - type: 'REST', - userId: '', - method: 'POST', - endpoint: 'https://a.klaviyo.com/api/profile-subscription-bulk-create-jobs', - headers: { - 'Content-Type': 'application/json', - Accept: 'application/json', - Authorization: 'Klaviyo-API-Key dummyPrivateApiKey', - revision: '2023-02-22', - }, - params: {}, - body: { - JSON: { - data: { - type: 'profile-subscription-bulk-create-job', - attributes: { - list_id: 'XUepkK', - subscriptions: [ - { - email: 'test@rudderstack.com', - phone_number: '+12 345 578 900', - channels: { - email: ['MARKETING'], - sms: ['MARKETING'], - }, - }, - ], - }, - }, - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'klaviyo', - description: 'Identify call without user custom Properties', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - destination: { - Config: { - publicApiKey: 'dummyPublicApiKey', - privateApiKey: 'dummyPrivateApiKey', - enforceEmailAsPrimary: false, - }, - }, - message: { - type: 'identify', - sentAt: '2021-01-03T17:02:53.195Z', - userId: 'user@1', - channel: 'web', - context: { - os: { - name: '', - version: '', - }, - app: { - name: 'RudderLabs JavaScript SDK', - build: '1.0.0', - version: '1.1.11', - namespace: 'com.rudderlabs.javascript', - }, - traits: { - firstName: 'Test', - lastName: 'Rudderlabs', - email: 'test@rudderstack.com', - phone: '+12 345 578 900', - userId: 'user@1', - title: 'Developer', - organization: 'Rudder', - city: 'Tokyo', - region: 'Kanto', - country: 'JP', - zip: '100-0001', - properties: { - listId: 'XUepkK', - subscribe: true, - consent: ['email', 'sms'], - }, - }, - locale: 'en-US', - screen: { - density: 2, - }, - library: { - name: 'RudderLabs JavaScript SDK', - version: '1.1.11', - }, - campaign: {}, - userAgent: - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', - }, - rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', - messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', - anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', - integrations: { - All: true, - }, - originalTimestamp: '2021-01-03T17:02:53.193Z', - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - userId: '', - method: 'PATCH', - endpoint: 'https://a.klaviyo.com/api/profiles/01GW3PHVY0MTCDGS0A1612HARX', - headers: { - Authorization: 'Klaviyo-API-Key dummyPrivateApiKey', - 'Content-Type': 'application/json', - Accept: 'application/json', - revision: '2023-02-22', - }, - params: {}, - body: { - JSON: { - data: { - type: 'profile', - attributes: { - email: 'test@rudderstack.com', - first_name: 'Test', - last_name: 'Rudderlabs', - phone_number: '+12 345 578 900', - external_id: 'user@1', - title: 'Developer', - organization: 'Rudder', - location: { - city: 'Tokyo', - region: 'Kanto', - country: 'JP', - zip: '100-0001', - }, - }, - id: '01GW3PHVY0MTCDGS0A1612HARX', - }, - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - }, - statusCode: 200, - }, - { - output: { - version: '1', - type: 'REST', - userId: '', - method: 'POST', - endpoint: 'https://a.klaviyo.com/api/profile-subscription-bulk-create-jobs', - headers: { - 'Content-Type': 'application/json', - Accept: 'application/json', - Authorization: 'Klaviyo-API-Key dummyPrivateApiKey', - revision: '2023-02-22', - }, - params: {}, - body: { - JSON: { - data: { - type: 'profile-subscription-bulk-create-job', - attributes: { - list_id: 'XUepkK', - subscriptions: [ - { - email: 'test@rudderstack.com', - phone_number: '+12 345 578 900', - channels: { - email: ['MARKETING'], - sms: ['MARKETING'], - }, - }, - ], - }, - }, - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'klaviyo', - description: 'Identify call without email and phone & enforceEmailAsPrimary enabled from UI', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - destination: { - Config: { - publicApiKey: 'dummyPublicApiKey', - privateApiKey: 'dummyPrivateApiKey', - enforceEmailAsPrimary: true, - }, - }, - message: { - type: 'identify', - sentAt: '2021-01-03T17:02:53.195Z', - userId: 'user@1', - channel: 'web', - context: { - os: { - name: '', - version: '', - }, - app: { - name: 'RudderLabs JavaScript SDK', - build: '1.0.0', - version: '1.1.11', - namespace: 'com.rudderlabs.javascript', - }, - traits: { - firstName: 'Test', - lastName: 'Rudderlabs', - userId: 'user@1', - title: 'Developer', - organization: 'Rudder', - city: 'Tokyo', - region: 'Kanto', - country: 'JP', - zip: '100-0001', - Flagged: false, - Residence: 'Shibuya', - properties: { - listId: 'XUepkK', - subscribe: true, - consent: ['email', 'sms'], - }, - }, - locale: 'en-US', - screen: { - density: 2, - }, - library: { - name: 'RudderLabs JavaScript SDK', - version: '1.1.11', - }, - campaign: {}, - userAgent: - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', - }, - rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', - messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', - anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', - integrations: { - All: true, - }, - originalTimestamp: '2021-01-03T17:02:53.193Z', - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - error: 'None of email and phone are present in the payload', - statTags: { - destType: 'KLAVIYO', - errorCategory: 'dataValidation', - errorType: 'instrumentation', - feature: 'processor', - implementation: 'native', - module: 'destination', - }, - statusCode: 400, - }, - ], - }, - }, - }, - { - name: 'klaviyo', - description: 'Screen event call', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - destination: { - Config: { - publicApiKey: 'dummyPublicApiKey', - privateApiKey: 'dummyPrivateApiKey', - }, - }, - message: { - type: 'screen', - event: 'TestEven001', - sentAt: '2021-01-25T16:12:02.048Z', - userId: 'sajal12', - channel: 'mobile', - context: { - os: { - name: 'Android', - version: '10', - }, - app: { - name: 'KlaviyoTest', - build: '1', - version: '1.0', - namespace: 'com.rudderstack.android.rudderstack.sampleAndroidApp', - }, - device: { - id: '9c6bd77ea9da3e68', - name: 'raphaelin', - type: 'android', - model: 'Redmi K20 Pro', - manufacturer: 'Xiaomi', - }, - locale: 'en-IN', - screen: { - width: 1080, - height: 2210, - density: 440, - }, - traits: { - id: 'user@1', - age: '22', - email: 'test@rudderstack.com', - phone: '9112340375', - anonymousId: '9c6bd77ea9da3e68', - }, - library: { - name: 'com.rudderstack.android.sdk.core', - version: '1.0.2', - }, - network: { - wifi: true, - carrier: 'airtel', - cellular: true, - bluetooth: false, - }, - timezone: 'Asia/Kolkata', - userAgent: - 'Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)', - }, - rudderId: 'b7b24f86-f7bf-46d8-b2b4-ccafc080239c', - messageId: '1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce', - properties: { - PreviouslyVicePresident: true, - YearElected: 1801, - VicePresidents: ['Aaron Burr', 'George Clinton'], - }, - anonymousId: '9c6bd77ea9da3e68', - integrations: { - All: true, - }, - originalTimestamp: '2021-01-25T15:32:56.409Z', - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://a.klaviyo.com/api/events', - headers: { - Accept: 'application/json', - Authorization: 'Klaviyo-API-Key dummyPrivateApiKey', - 'Content-Type': 'application/json', - revision: '2023-02-22', - }, - params: {}, - body: { - JSON: { - data: { - type: 'event', - attributes: { - metric: { - name: 'TestEven001', - }, - properties: { - PreviouslyVicePresident: true, - YearElected: 1801, - VicePresidents: ['Aaron Burr', 'George Clinton'], - }, - profile: { - $email: 'test@rudderstack.com', - $phone_number: '9112340375', - $id: 'sajal12', - age: '22', - }, - }, - }, - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: '', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'klaviyo', - description: 'Track event call with flatten properties enabled', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - destination: { - Config: { - publicApiKey: 'dummyPublicApiKey', - privateApiKey: 'dummyPrivateApiKey', - flattenProperties: true, - }, - }, - message: { - type: 'track', - event: 'TestEven001', - sentAt: '2021-01-25T16:12:02.048Z', - userId: 'sajal12', - channel: 'mobile', - context: { - os: { - name: 'Android', - version: '10', - }, - app: { - name: 'KlaviyoTest', - build: '1', - version: '1.0', - namespace: 'com.rudderstack.android.rudderstack.sampleAndroidApp', - }, - device: { - id: '9c6bd77ea9da3e68', - name: 'raphaelin', - type: 'android', - model: 'Redmi K20 Pro', - manufacturer: 'Xiaomi', - }, - locale: 'en-IN', - screen: { - width: 1080, - height: 2210, - density: 440, - }, - traits: { - id: 'user@1', - age: '22', - email: 'test@rudderstack.com', - phone: '9112340375', - anonymousId: '9c6bd77ea9da3e68', - plan_details: { - plan_type: 'gold', - duration: '3 months', - }, - }, - library: { - name: 'com.rudderstack.android.sdk.core', - version: '1.0.2', - }, - network: { - wifi: true, - carrier: 'airtel', - cellular: true, - bluetooth: false, - }, - timezone: 'Asia/Kolkata', - userAgent: - 'Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)', - }, - rudderId: 'b7b24f86-f7bf-46d8-b2b4-ccafc080239c', - messageId: '1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce', - properties: { - vicePresdentInfo: { - PreviouslVicePresident: true, - YearElected: 1801, - VicePresidents: ['AaronBurr', 'GeorgeClinton'], - }, - }, - anonymousId: '9c6bd77ea9da3e68', - integrations: { - All: true, - }, - originalTimestamp: '2021-01-25T15:32:56.409Z', - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://a.klaviyo.com/api/events', - headers: { - Accept: 'application/json', - Authorization: 'Klaviyo-API-Key dummyPrivateApiKey', - 'Content-Type': 'application/json', - revision: '2023-02-22', - }, - params: {}, - body: { - JSON: { - data: { - type: 'event', - attributes: { - metric: { - name: 'TestEven001', - }, - properties: { - 'vicePresdentInfo.PreviouslVicePresident': true, - 'vicePresdentInfo.VicePresidents': ['AaronBurr', 'GeorgeClinton'], - 'vicePresdentInfo.YearElected': 1801, - }, - profile: { - $email: 'test@rudderstack.com', - $phone_number: '9112340375', - $id: 'sajal12', - age: '22', - 'plan_details.plan_type': 'gold', - 'plan_details.duration': '3 months', - }, - }, - }, - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: '', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'klaviyo', - description: 'Track event call', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - destination: { - Config: { - publicApiKey: 'dummyPublicApiKey', - privateApiKey: 'dummyPrivateApiKey', - }, - }, - message: { - type: 'track', - event: 'TestEven002', - sentAt: '2021-01-25T16:12:02.048Z', - userId: 'sajal12', - channel: 'mobile', - context: { - os: { - name: 'Android', - version: '10', - }, - app: { - name: 'KlaviyoTest', - build: '1', - version: '1.0', - namespace: 'com.rudderstack.android.rudderstack.sampleAndroidApp', - }, - device: { - id: '9c6bd77ea9da3e68', - name: 'raphaelin', - type: 'android', - model: 'Redmi K20 Pro', - manufacturer: 'Xiaomi', - }, - locale: 'en-IN', - screen: { - width: 1080, - height: 2210, - density: 440, - }, - traits: { - id: 'user@1', - age: '22', - name: 'Test', - email: 'test@rudderstack.com', - phone: '9112340375', - anonymousId: '9c6bd77ea9da3e68', - description: 'Sample description', - }, - library: { - name: 'com.rudderstack.android.sdk.core', - version: '1.0.2', - }, - network: { - wifi: true, - carrier: 'airtel', - cellular: true, - bluetooth: false, - }, - timezone: 'Asia/Kolkata', - userAgent: - 'Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)', - }, - rudderId: 'b7b24f86-f7bf-46d8-b2b4-ccafc080239c', - messageId: '1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce', - properties: { - PreviouslyVicePresident: true, - YearElected: 1801, - VicePresidents: ['Aaron Burr', 'George Clinton'], - revenue: 3000, - }, - anonymousId: '9c6bd77ea9da3e68', - integrations: { - All: true, - }, - originalTimestamp: '2021-01-25T15:32:56.409Z', - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://a.klaviyo.com/api/events', - headers: { - Accept: 'application/json', - Authorization: 'Klaviyo-API-Key dummyPrivateApiKey', - 'Content-Type': 'application/json', - revision: '2023-02-22', - }, - params: {}, - body: { - JSON: { - data: { - type: 'event', - attributes: { - metric: { - name: 'TestEven002', - }, - properties: { - PreviouslyVicePresident: true, - YearElected: 1801, - VicePresidents: ['Aaron Burr', 'George Clinton'], - }, - profile: { - $email: 'test@rudderstack.com', - $phone_number: '9112340375', - $id: 'sajal12', - age: '22', - name: 'Test', - description: 'Sample description', - }, - value: 3000, - }, - }, - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: '', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'klaviyo', - description: 'Track event call, with make email or phone as primary identifier toggle on', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - destination: { - Config: { - publicApiKey: 'dummyPublicApiKey', - privateApiKey: 'dummyPrivateApiKey', - enforceEmailAsPrimary: true, - }, - }, - message: { - type: 'track', - event: 'TestEven001', - sentAt: '2021-01-25T16:12:02.048Z', - userId: 'sajal12', - channel: 'mobile', - context: { - os: { - name: 'Android', - version: '10', - }, - app: { - name: 'KlaviyoTest', - build: '1', - version: '1.0', - namespace: 'com.rudderstack.android.rudderstack.sampleAndroidApp', - }, - device: { - id: '9c6bd77ea9da3e68', - name: 'raphaelin', - type: 'android', - model: 'Redmi K20 Pro', - manufacturer: 'Xiaomi', - }, - locale: 'en-IN', - screen: { - width: 1080, - height: 2210, - density: 440, - }, - traits: { - id: 'user@1', - age: '22', - email: 'test@rudderstack.com', - phone: '9112340375', - anonymousId: '9c6bd77ea9da3e68', - }, - library: { - name: 'com.rudderstack.android.sdk.core', - version: '1.0.2', - }, - network: { - wifi: true, - carrier: 'airtel', - cellular: true, - bluetooth: false, - }, - timezone: 'Asia/Kolkata', - userAgent: - 'Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)', - }, - rudderId: 'b7b24f86-f7bf-46d8-b2b4-ccafc080239c', - messageId: '1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce', - properties: { - PreviouslyVicePresident: true, - YearElected: 1801, - VicePresidents: ['Aaron Burr', 'George Clinton'], - }, - anonymousId: '9c6bd77ea9da3e68', - integrations: { - All: true, - }, - originalTimestamp: '2021-01-25T15:32:56.409Z', - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://a.klaviyo.com/api/events', - headers: { - Accept: 'application/json', - Authorization: 'Klaviyo-API-Key dummyPrivateApiKey', - 'Content-Type': 'application/json', - revision: '2023-02-22', - }, - params: {}, - body: { - JSON: { - data: { - type: 'event', - attributes: { - metric: { - name: 'TestEven001', - }, - properties: { - PreviouslyVicePresident: true, - YearElected: 1801, - VicePresidents: ['Aaron Burr', 'George Clinton'], - }, - profile: { - $email: 'test@rudderstack.com', - $phone_number: '9112340375', - age: '22', - _id: 'sajal12', - }, - }, - }, - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: '', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'klaviyo', - description: - 'Track event call, without email and phone & with (make email or phone as primary identifier) toggle on', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - destination: { - Config: { - publicApiKey: 'dummyPublicApiKey', - privateApiKey: 'dummyPrivateApiKey', - enforceEmailAsPrimary: true, - }, - }, - message: { - type: 'track', - event: 'TestEven001', - sentAt: '2021-01-25T16:12:02.048Z', - userId: 'sajal12', - channel: 'mobile', - context: { - os: { - name: 'Android', - version: '10', - }, - app: { - name: 'KlaviyoTest', - build: '1', - version: '1.0', - namespace: 'com.rudderstack.android.rudderstack.sampleAndroidApp', - }, - device: { - id: '9c6bd77ea9da3e68', - name: 'raphaelin', - type: 'android', - model: 'Redmi K20 Pro', - manufacturer: 'Xiaomi', - }, - locale: 'en-IN', - screen: { - width: 1080, - height: 2210, - density: 440, - }, - traits: { - id: 'user@1', - age: '22', - anonymousId: '9c6bd77ea9da3e68', - }, - library: { - name: 'com.rudderstack.android.sdk.core', - version: '1.0.2', - }, - network: { - wifi: true, - carrier: 'airtel', - cellular: true, - bluetooth: false, - }, - timezone: 'Asia/Kolkata', - userAgent: - 'Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)', - }, - rudderId: 'b7b24f86-f7bf-46d8-b2b4-ccafc080239c', - messageId: '1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce', - properties: { - PreviouslyVicePresident: true, - YearElected: 1801, - VicePresidents: ['Aaron Burr', 'George Clinton'], - }, - anonymousId: '9c6bd77ea9da3e68', - integrations: { - All: true, - }, - originalTimestamp: '2021-01-25T15:32:56.409Z', - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - error: 'None of email and phone are present in the payload', - statTags: { - destType: 'KLAVIYO', - errorCategory: 'dataValidation', - errorType: 'instrumentation', - feature: 'processor', - implementation: 'native', - module: 'destination', - }, - statusCode: 400, - }, - ], - }, - }, - }, - { - name: 'klaviyo', - description: 'group call', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - destination: { - Config: { - publicApiKey: 'dummyPublicApiKey', - privateApiKey: 'dummyPrivateApiKey', - }, - }, - message: { - userId: 'user123', - type: 'group', - groupId: 'XUepkK', - traits: { - subscribe: true, - }, - context: { - traits: { - email: 'test@rudderstack.com', - phone: '+12 345 678 900', - consent: ['email'], - }, - ip: '14.5.67.21', - library: { - name: 'http', - }, - }, - timestamp: '2020-01-21T00:21:34.208Z', - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - body: { - FORM: {}, - JSON: { - data: { - attributes: { - list_id: 'XUepkK', - subscriptions: [ - { email: 'test@rudderstack.com', phone_number: '+12 345 678 900' }, - ], - }, - type: 'profile-subscription-bulk-create-job', - }, - }, - JSON_ARRAY: {}, - XML: {}, - }, - endpoint: 'https://a.klaviyo.com/api/profile-subscription-bulk-create-jobs', - files: {}, - headers: { - Accept: 'application/json', - Authorization: 'Klaviyo-API-Key dummyPrivateApiKey', - 'Content-Type': 'application/json', - revision: '2023-02-22', - }, - method: 'POST', - params: {}, - type: 'REST', - userId: '', - version: '1', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'klaviyo', - description: 'group call without groupId', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - destination: { - Config: { - publicApiKey: 'dummyPublicApiKey', - privateApiKey: 'dummyPrivateApiKey', - }, - }, - message: { - userId: 'user123', - type: 'group', - groupId: '', - traits: { - subscribe: true, - }, - context: { - traits: { - email: 'test@rudderstack.com', - phone: '+12 345 678 900', - consent: 'email', - }, - ip: '14.5.67.21', - library: { - name: 'http', - }, - }, - timestamp: '2020-01-21T00:21:34.208Z', - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - error: 'groupId is a required field for group events', - statTags: { - destType: 'KLAVIYO', - errorCategory: 'dataValidation', - errorType: 'instrumentation', - feature: 'processor', - implementation: 'native', - module: 'destination', - }, - statusCode: 400, - }, - ], - }, - }, - }, - { - name: 'klaviyo', - description: '[Error]: Check for unsupported message type', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - destination: { - Config: { - publicApiKey: 'dummyPublicApiKey', - privateApiKey: 'dummyPrivateApiKey', - }, - }, - message: { - userId: 'user123', - type: 'random', - groupId: 'XUepkK', - traits: { - subscribe: true, - }, - context: { - traits: { - email: 'test@rudderstack.com', - phone: '+12 345 678 900', - consent: 'email', - }, - ip: '14.5.67.21', - library: { - name: 'http', - }, - }, - timestamp: '2020-01-21T00:21:34.208Z', - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - error: 'Event type random is not supported', - statTags: { - destType: 'KLAVIYO', - errorCategory: 'dataValidation', - errorType: 'instrumentation', - feature: 'processor', - implementation: 'native', - module: 'destination', - }, - statusCode: 400, - }, - ], - }, - }, - }, - { - name: 'klaviyo', - description: 'Track call with Ecom events (Viewed Product)', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - destination: { - Config: { - publicApiKey: 'dummyPublicApiKey', - privateApiKey: 'dummyPrivateApiKey', - }, - }, - message: { - type: 'track', - event: 'product viewed', - sentAt: '2021-01-25T16:12:02.048Z', - userId: 'sajal12', - channel: 'mobile', - context: { - os: { - name: 'Android', - version: '10', - }, - app: { - name: 'KlaviyoTest', - build: '1', - version: '1.0', - namespace: 'com.rudderstack.android.rudderstack.sampleAndroidApp', - }, - device: { - id: '9c6bd77ea9da3e68', - name: 'raphaelin', - type: 'android', - model: 'Redmi K20 Pro', - manufacturer: 'Xiaomi', - }, - locale: 'en-IN', - screen: { - width: 1080, - height: 2210, - density: 440, - }, - traits: { - id: 'user@1', - age: '22', - name: 'Test', - email: 'test@rudderstack.com', - phone: '9112340375', - anonymousId: '9c6bd77ea9da3e68', - description: 'Sample description', - }, - library: { - name: 'com.rudderstack.android.sdk.core', - version: '1.0.2', - }, - network: { - wifi: true, - carrier: 'airtel', - cellular: true, - bluetooth: false, - }, - timezone: 'Asia/Kolkata', - userAgent: - 'Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)', - }, - rudderId: 'b7b24f86-f7bf-46d8-b2b4-ccafc080239c', - messageId: '1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce', - properties: { - name: 'test product', - product_id: '1114', - sku: 'WINNIePuh12', - image_url: 'http://www.example.com/path/to/product/image.png', - url: 'http://www.example.com/path/to/product', - brand: 'Not for Kids', - price: 9.9, - categories: ['Fiction', 'Children'], - }, - anonymousId: '9c6bd77ea9da3e68', - integrations: { - All: true, - }, - originalTimestamp: '2021-01-25T15:32:56.409Z', - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://a.klaviyo.com/api/events', - headers: { - Authorization: 'Klaviyo-API-Key dummyPrivateApiKey', - 'Content-Type': 'application/json', - Accept: 'application/json', - revision: '2023-02-22', - }, - params: {}, - body: { - JSON: { - data: { - type: 'event', - attributes: { - metric: { - name: 'Viewed Product', - }, - profile: { - $email: 'test@rudderstack.com', - $phone_number: '9112340375', - $id: 'sajal12', - age: '22', - name: 'Test', - description: 'Sample description', - }, - properties: { - ProductName: 'test product', - ProductID: '1114', - SKU: 'WINNIePuh12', - ImageURL: 'http://www.example.com/path/to/product/image.png', - URL: 'http://www.example.com/path/to/product', - Brand: 'Not for Kids', - Price: 9.9, - Categories: ['Fiction', 'Children'], - }, - }, - }, - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: '', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'klaviyo', - description: 'Track event call -> Invalid event i.e. sent as non-string', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - destination: { - Config: { - publicApiKey: 'dummyPublicApiKey', - privateApiKey: 'dummyPrivateApiKey', - }, - }, - message: { - type: 'track', - event: { name: 'TestEven002' }, - sentAt: '2021-01-25T16:12:02.048Z', - userId: 'sajal12', - channel: 'mobile', - context: { - os: { - name: 'Android', - version: '10', - }, - app: { - name: 'KlaviyoTest', - build: '1', - version: '1.0', - namespace: 'com.rudderstack.android.rudderstack.sampleAndroidApp', - }, - device: { - id: '9c6bd77ea9da3e68', - name: 'raphaelin', - type: 'android', - model: 'Redmi K20 Pro', - manufacturer: 'Xiaomi', - }, - locale: 'en-IN', - screen: { - width: 1080, - height: 2210, - density: 440, - }, - traits: { - id: 'user@1', - age: '22', - name: 'Test', - email: 'test@rudderstack.com', - phone: '9112340375', - anonymousId: '9c6bd77ea9da3e68', - description: 'Sample description', - }, - library: { - name: 'com.rudderstack.android.sdk.core', - version: '1.0.2', - }, - network: { - wifi: true, - carrier: 'airtel', - cellular: true, - bluetooth: false, - }, - timezone: 'Asia/Kolkata', - userAgent: - 'Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)', - }, - rudderId: 'b7b24f86-f7bf-46d8-b2b4-ccafc080239c', - messageId: '1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce', - properties: { - PreviouslyVicePresident: true, - YearElected: 1801, - VicePresidents: ['Aaron Burr', 'George Clinton'], - revenue: 3000, - }, - anonymousId: '9c6bd77ea9da3e68', - integrations: { - All: true, - }, - originalTimestamp: '2021-01-25T15:32:56.409Z', - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - error: 'Event type should be a string', - statTags: { - destType: 'KLAVIYO', - errorCategory: 'dataValidation', - errorType: 'instrumentation', - feature: 'processor', - implementation: 'native', - module: 'destination', - }, - statusCode: 400, - }, - ], - }, - }, - }, - { - name: 'klaviyo', - description: 'Track call with Ecom events (Checkout Started) with enabled flattenProperties', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - destination: { - Config: { - publicApiKey: 'dummyPublicApiKey', - privateApiKey: 'dummyPrivateApiKey', - flattenProperties: true, - }, - }, - message: { - type: 'track', - event: 'checkout started', - sentAt: '2021-01-25T16:12:02.048Z', - userId: 'sajal12', - channel: 'mobile', - context: { - os: { - name: 'Android', - version: '10', - }, - app: { - name: 'KlaviyoTest', - build: '1', - version: '1.0', - namespace: 'com.rudderstack.android.rudderstack.sampleAndroidApp', - }, - device: { - id: '9c6bd77ea9da3e68', - name: 'raphaelin', - type: 'android', - model: 'Redmi K20 Pro', - manufacturer: 'Xiaomi', - }, - locale: 'en-IN', - screen: { - width: 1080, - height: 2210, - density: 440, - }, - traits: { - id: 'user@1', - age: '22', - name: 'Test', - email: 'test@rudderstack.com', - phone: '9112340375', - anonymousId: '9c6bd77ea9da3e68', - description: 'Sample description', - }, - library: { - name: 'com.rudderstack.android.sdk.core', - version: '1.0.2', - }, - network: { - wifi: true, - carrier: 'airtel', - cellular: true, - bluetooth: false, - }, - timezone: 'Asia/Kolkata', - userAgent: - 'Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)', - }, - rudderId: 'b7b24f86-f7bf-46d8-b2b4-ccafc080239c', - messageId: '1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce', - properties: { - order_id: '1234', - affiliation: 'Apple Store', - value: 20, - revenue: 15, - shipping: 4, - tax: 1, - discount: 1.5, - coupon: 'ImagePro', - currency: 'USD', - products: [ - { - product_id: '123', - sku: 'G-32', - name: 'Monopoly', - price: 14, - quantity: 1, - category: 'Games', - url: 'https://www.website.com/product/path', - image_url: 'https://www.website.com/product/path.jpg', - }, - { - product_id: '345', - sku: 'F-32', - name: 'UNO', - price: 3.45, - quantity: 2, - category: 'Games', - }, - ], - }, - anonymousId: '9c6bd77ea9da3e68', - integrations: { - All: true, - }, - originalTimestamp: '2021-01-25T15:32:56.409Z', - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://a.klaviyo.com/api/events', - headers: { - Authorization: 'Klaviyo-API-Key dummyPrivateApiKey', - 'Content-Type': 'application/json', - Accept: 'application/json', - revision: '2023-02-22', - }, - params: {}, - body: { - JSON: { - data: { - type: 'event', - attributes: { - metric: { - name: 'Started Checkout', - }, - properties: { - $event_id: '1234', - $value: 20, - 'items[0].ProductID': '123', - 'items[0].SKU': 'G-32', - 'items[0].ProductName': 'Monopoly', - 'items[0].Quantity': 1, - 'items[0].ItemPrice': 14, - 'items[0].ProductURL': 'https://www.website.com/product/path', - 'items[0].ImageURL': 'https://www.website.com/product/path.jpg', - 'items[1].ProductID': '345', - 'items[1].SKU': 'F-32', - 'items[1].ProductName': 'UNO', - 'items[1].Quantity': 2, - 'items[1].ItemPrice': 3.45, - }, - profile: { - $email: 'test@rudderstack.com', - $phone_number: '9112340375', - $id: 'sajal12', - age: '22', - name: 'Test', - description: 'Sample description', - }, - }, - }, - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: '', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'klaviyo', - description: 'Track call with Ecom events (Added to Cart) with properties.products', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - destination: { - Config: { - publicApiKey: 'dummyPublicApiKey', - privateApiKey: 'dummyPrivateApiKey', - }, - }, - message: { - type: 'track', - event: 'product added', - sentAt: '2021-01-25T16:12:02.048Z', - userId: 'sajal12', - channel: 'mobile', - context: { - os: { - name: 'Android', - version: '10', - }, - app: { - name: 'KlaviyoTest', - build: '1', - version: '1.0', - namespace: 'com.rudderstack.android.rudderstack.sampleAndroidApp', - }, - device: { - id: '9c6bd77ea9da3e68', - name: 'raphaelin', - type: 'android', - model: 'Redmi K20 Pro', - manufacturer: 'Xiaomi', - }, - locale: 'en-IN', - screen: { - width: 1080, - height: 2210, - density: 440, - }, - traits: { - id: 'user@1', - age: '22', - name: 'Test', - email: 'test@rudderstack.com', - phone: '9112340375', - anonymousId: '9c6bd77ea9da3e68', - description: 'Sample description', - }, - library: { - name: 'com.rudderstack.android.sdk.core', - version: '1.0.2', - }, - network: { - wifi: true, - carrier: 'airtel', - cellular: true, - bluetooth: false, - }, - timezone: 'Asia/Kolkata', - userAgent: - 'Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.4.0.QFKINXM)', - }, - rudderId: 'b7b24f86-f7bf-46d8-b2b4-ccafc080239c', - messageId: '1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce', - properties: { - order_id: '1234', - value: 12.12, - categories: ['Fiction3', 'Children3'], - checkout_url: 'http://www.heythere.com', - item_names: ['book1', 'book2'], - products: [ - { - product_id: 'b1pid', - sku: '123x', - name: 'book1', - url: 'heyther.com', - price: 12, - }, - { - product_id: 'b2pid', - sku: '123x', - name: 'book2', - url: 'heyther2.com', - price: 14, - }, - ], - }, - anonymousId: '9c6bd77ea9da3e68', - integrations: { - All: true, - }, - originalTimestamp: '2021-01-25T15:32:56.409Z', - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://a.klaviyo.com/api/events', - headers: { - Authorization: 'Klaviyo-API-Key dummyPrivateApiKey', - 'Content-Type': 'application/json', - Accept: 'application/json', - revision: '2023-02-22', - }, - params: {}, - body: { - JSON: { - data: { - type: 'event', - attributes: { - metric: { - name: 'Added to Cart', - }, - profile: { - $email: 'test@rudderstack.com', - $phone_number: '9112340375', - $id: 'sajal12', - age: '22', - name: 'Test', - description: 'Sample description', - }, - properties: { - $value: 12.12, - AddedItemCategories: ['Fiction3', 'Children3'], - ItemNames: ['book1', 'book2'], - CheckoutURL: 'http://www.heythere.com', - items: [ - { - ProductID: 'b1pid', - SKU: '123x', - ProductName: 'book1', - ItemPrice: 12, - ProductURL: 'heyther.com', - }, - { - ProductID: 'b2pid', - SKU: '123x', - ProductName: 'book2', - ItemPrice: 14, - ProductURL: 'heyther2.com', - }, - ], - }, - }, - }, - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: '', - }, - statusCode: 200, - }, - ], - }, - }, - }, + ...identifyData, + ...trackTestData, + ...screenTestData, + ...groupTestData, + ...ecomTestData, + ...validationTestData, ]; diff --git a/test/integrations/destinations/klaviyo/processor/ecomTestData.ts b/test/integrations/destinations/klaviyo/processor/ecomTestData.ts new file mode 100644 index 0000000000..fab4cf85ce --- /dev/null +++ b/test/integrations/destinations/klaviyo/processor/ecomTestData.ts @@ -0,0 +1,344 @@ +import { overrideDestination, transformResultBuilder } from '../../../testUtils'; + +const destination = { + Config: { + publicApiKey: 'dummyPublicApiKey', + privateApiKey: 'dummyPrivateApiKey', + }, +}; + +const commonTraits = { + id: 'user@1', + age: '22', + name: 'Test', + email: 'test@rudderstack.com', + phone: '9112340375', + anonymousId: '9c6bd77ea9da3e68', + description: 'Sample description', +}; + +const eventsEndpoint = 'https://a.klaviyo.com/api/events'; + +const commonOutputHeaders = { + Authorization: 'Klaviyo-API-Key dummyPrivateApiKey', + 'Content-Type': 'application/json', + Accept: 'application/json', + revision: '2023-02-22', +}; + +export const ecomTestData = [ + { + id: 'klaviyo-ecom-test-1', + name: 'klaviyo', + description: 'Track call with Ecom events (Viewed Product)', + scenario: 'Business', + successCriteria: + 'Response should contain only event payload and status code should be 200, for the event payload should contain contextual traits and properties in the payload the event name should be Viewed Product and the properties should be mapped to the Klaviyo event properties', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination, + message: { + type: 'track', + event: 'product viewed', + sentAt: '2021-01-25T16:12:02.048Z', + userId: 'sajal12', + channel: 'mobile', + context: { + traits: commonTraits, + }, + properties: { + name: 'test product', + product_id: '1114', + sku: 'WINNIePuh12', + image_url: 'http://www.example.com/path/to/product/image.png', + url: 'http://www.example.com/path/to/product', + brand: 'Not for Kids', + price: 9.9, + categories: ['Fiction', 'Children'], + }, + anonymousId: '9c6bd77ea9da3e68', + originalTimestamp: '2021-01-25T15:32:56.409Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: transformResultBuilder({ + method: 'POST', + endpoint: eventsEndpoint, + headers: commonOutputHeaders, + JSON: { + data: { + type: 'event', + attributes: { + metric: { + name: 'Viewed Product', + }, + profile: { + $email: 'test@rudderstack.com', + $phone_number: '9112340375', + $id: 'sajal12', + age: '22', + name: 'Test', + description: 'Sample description', + }, + properties: { + ProductName: 'test product', + ProductID: '1114', + SKU: 'WINNIePuh12', + ImageURL: 'http://www.example.com/path/to/product/image.png', + URL: 'http://www.example.com/path/to/product', + Brand: 'Not for Kids', + Price: 9.9, + Categories: ['Fiction', 'Children'], + }, + }, + }, + }, + userId: '', + }), + statusCode: 200, + }, + ], + }, + }, + }, + { + id: 'klaviyo-ecom-test-2', + name: 'klaviyo', + description: 'Track call with Ecom events (Checkout Started) with enabled flattenProperties', + scenario: 'Business', + successCriteria: + 'Response should contain only event payload and status code should be 200, for the event payload should contain contextual traits and properties in the payload the event name should be Started Checkout and the properties should be mapped to the Klaviyo event properties with flattened properties', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: overrideDestination(destination, { flattenProperties: true }), + message: { + type: 'track', + event: 'checkout started', + sentAt: '2021-01-25T16:12:02.048Z', + userId: 'sajal12', + channel: 'mobile', + context: { + traits: commonTraits, + }, + properties: { + order_id: '1234', + affiliation: 'Apple Store', + value: 20, + revenue: 15, + shipping: 4, + tax: 1, + discount: 1.5, + coupon: 'ImagePro', + currency: 'USD', + products: [ + { + product_id: '123', + sku: 'G-32', + name: 'Monopoly', + price: 14, + quantity: 1, + category: 'Games', + url: 'https://www.website.com/product/path', + image_url: 'https://www.website.com/product/path.jpg', + }, + { + product_id: '345', + sku: 'F-32', + name: 'UNO', + price: 3.45, + quantity: 2, + category: 'Games', + }, + ], + }, + anonymousId: '9c6bd77ea9da3e68', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: transformResultBuilder({ + method: 'POST', + endpoint: eventsEndpoint, + headers: commonOutputHeaders, + JSON: { + data: { + type: 'event', + attributes: { + metric: { + name: 'Started Checkout', + }, + properties: { + $event_id: '1234', + $value: 20, + 'items[0].ProductID': '123', + 'items[0].SKU': 'G-32', + 'items[0].ProductName': 'Monopoly', + 'items[0].Quantity': 1, + 'items[0].ItemPrice': 14, + 'items[0].ProductURL': 'https://www.website.com/product/path', + 'items[0].ImageURL': 'https://www.website.com/product/path.jpg', + 'items[1].ProductID': '345', + 'items[1].SKU': 'F-32', + 'items[1].ProductName': 'UNO', + 'items[1].Quantity': 2, + 'items[1].ItemPrice': 3.45, + }, + profile: { + $email: 'test@rudderstack.com', + $phone_number: '9112340375', + $id: 'sajal12', + age: '22', + name: 'Test', + description: 'Sample description', + }, + }, + }, + }, + userId: '', + }), + statusCode: 200, + }, + ], + }, + }, + }, + { + id: 'klaviyo-ecom-test-3', + name: 'klaviyo', + description: 'Track call with Ecom events (Added to Cart) with properties.products', + scenario: 'Business', + successCriteria: + 'Response should contain only event payload and status code should be 200, for the event payload should contain contextual traits and properties in the payload the event name should be Added to Cart and the properties should be mapped to the Klaviyo event properties with flattened properties and products array should be mapped to items array in the payload', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination, + message: { + type: 'track', + event: 'product added', + sentAt: '2021-01-25T16:12:02.048Z', + userId: 'sajal12', + channel: 'mobile', + context: { + traits: commonTraits, + }, + rudderId: 'b7b24f86-f7bf-46d8-b2b4-ccafc080239c', + messageId: '1611588776408-ee5a3212-fbf9-4cbb-bbad-3ed0f7c6a2ce', + properties: { + order_id: '1234', + value: 12.12, + categories: ['Fiction3', 'Children3'], + checkout_url: 'http://www.heythere.com', + item_names: ['book1', 'book2'], + products: [ + { + product_id: 'b1pid', + sku: '123x', + name: 'book1', + url: 'heyther.com', + price: 12, + }, + { + product_id: 'b2pid', + sku: '123x', + name: 'book2', + url: 'heyther2.com', + price: 14, + }, + ], + }, + anonymousId: '9c6bd77ea9da3e68', + integrations: { + All: true, + }, + originalTimestamp: '2021-01-25T15:32:56.409Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: transformResultBuilder({ + method: 'POST', + endpoint: 'https://a.klaviyo.com/api/events', + headers: commonOutputHeaders, + JSON: { + data: { + type: 'event', + attributes: { + metric: { + name: 'Added to Cart', + }, + profile: { + $email: 'test@rudderstack.com', + $phone_number: '9112340375', + $id: 'sajal12', + age: '22', + name: 'Test', + description: 'Sample description', + }, + properties: { + $value: 12.12, + AddedItemCategories: ['Fiction3', 'Children3'], + ItemNames: ['book1', 'book2'], + CheckoutURL: 'http://www.heythere.com', + items: [ + { + ProductID: 'b1pid', + SKU: '123x', + ProductName: 'book1', + ItemPrice: 12, + ProductURL: 'heyther.com', + }, + { + ProductID: 'b2pid', + SKU: '123x', + ProductName: 'book2', + ItemPrice: 14, + ProductURL: 'heyther2.com', + }, + ], + }, + }, + }, + }, + userId: '', + }), + statusCode: 200, + }, + ], + }, + }, + }, +]; diff --git a/test/integrations/destinations/klaviyo/processor/groupTestData.ts b/test/integrations/destinations/klaviyo/processor/groupTestData.ts new file mode 100644 index 0000000000..031c949c4b --- /dev/null +++ b/test/integrations/destinations/klaviyo/processor/groupTestData.ts @@ -0,0 +1,136 @@ +import { generateSimplifiedGroupPayload, transformResultBuilder } from '../../../testUtils'; + +const destination = { + Config: { + publicApiKey: 'dummyPublicApiKey', + privateApiKey: 'dummyPrivateApiKey', + }, +}; + +const headers = { + Accept: 'application/json', + Authorization: 'Klaviyo-API-Key dummyPrivateApiKey', + 'Content-Type': 'application/json', + revision: '2023-02-22', +}; + +const commonEndpoint = 'https://a.klaviyo.com/api/profile-subscription-bulk-create-jobs'; + +export const groupTestData = [ + { + id: 'klaviyo-group-test-1', + name: 'klaviyo', + description: 'Simple group call', + scenario: 'Business', + successCriteria: + 'Response should contain only group payload and status code should be 200, for the group payload a subscription payload should be present in the final payload with email and phone', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination, + message: generateSimplifiedGroupPayload({ + userId: 'user123', + groupId: 'XUepkK', + traits: { + subscribe: true, + }, + context: { + traits: { + email: 'test@rudderstack.com', + phone: '+12 345 678 900', + consent: ['email'], + }, + }, + timestamp: '2020-01-21T00:21:34.208Z', + }), + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: transformResultBuilder({ + JSON: { + data: { + attributes: { + list_id: 'XUepkK', + subscriptions: [ + { email: 'test@rudderstack.com', phone_number: '+12 345 678 900' }, + ], + }, + type: 'profile-subscription-bulk-create-job', + }, + }, + endpoint: commonEndpoint, + headers: headers, + method: 'POST', + userId: '', + }), + statusCode: 200, + }, + ], + }, + }, + }, + { + id: 'klaviyo-group-test-2', + name: 'klaviyo', + description: 'Simple group call without groupId', + scenario: 'Business', + successCriteria: + 'Response should contain error message and status code should be 400, as we are not sending groupId in the payload and groupId is a required field for group events', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination, + message: generateSimplifiedGroupPayload({ + userId: 'user123', + groupId: '', + traits: { + subscribe: true, + }, + context: { + traits: { + email: 'test@rudderstack.com', + phone: '+12 345 678 900', + consent: 'email', + }, + }, + timestamp: '2020-01-21T00:21:34.208Z', + }), + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'groupId is a required field for group events', + statTags: { + destType: 'KLAVIYO', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, +]; diff --git a/test/integrations/destinations/klaviyo/processor/identifyTestData.ts b/test/integrations/destinations/klaviyo/processor/identifyTestData.ts new file mode 100644 index 0000000000..8b5503fad9 --- /dev/null +++ b/test/integrations/destinations/klaviyo/processor/identifyTestData.ts @@ -0,0 +1,551 @@ +import { removeUndefinedAndNullValues } from '@rudderstack/integrations-lib'; +import { + overrideDestination, + transformResultBuilder, + generateSimplifiedIdentifyPayload, +} from '../../../testUtils'; + +const destination = { + Config: { + publicApiKey: 'dummyPublicApiKey', + privateApiKey: 'dummyPrivateApiKey', + }, +}; + +const commonTraits = { + firstName: 'Test', + lastName: 'Rudderlabs', + email: 'test@rudderstack.com', + phone: '+12 345 578 900', + userId: 'user@1', + title: 'Developer', + organization: 'Rudder', + city: 'Tokyo', + region: 'Kanto', + country: 'JP', + zip: '100-0001', + Flagged: false, + Residence: 'Shibuya', + properties: { + listId: 'XUepkK', + subscribe: true, + consent: ['email', 'sms'], + }, +}; + +const commonOutputUserProps = { + external_id: 'user@1', + email: 'test@rudderstack.com', + first_name: 'Test', + last_name: 'Rudderlabs', + phone_number: '+12 345 578 900', + title: 'Developer', + organization: 'Rudder', + location: { + city: 'Tokyo', + region: 'Kanto', + country: 'JP', + zip: '100-0001', + }, + properties: { + Flagged: false, + Residence: 'Shibuya', + }, +}; + +const commonOutputSubscriptionProps = { + list_id: 'XUepkK', + subscriptions: [ + { + email: 'test@rudderstack.com', + phone_number: '+12 345 578 900', + channels: { + email: ['MARKETING'], + sms: ['MARKETING'], + }, + }, + ], +}; + +const commonOutputHeaders = { + Authorization: 'Klaviyo-API-Key dummyPrivateApiKey', + 'Content-Type': 'application/json', + Accept: 'application/json', + revision: '2023-02-22', +}; + +const anonymousId = '97c46c81-3140-456d-b2a9-690d70aaca35'; +const userId = 'user@1'; +const sentAt = '2021-01-03T17:02:53.195Z'; +const originalTimestamp = '2021-01-03T17:02:53.193Z'; +const commonUserUpdateEndpoint = 'https://a.klaviyo.com/api/profiles/01GW3PHVY0MTCDGS0A1612HARX'; +const subscribeEndpoint = 'https://a.klaviyo.com/api/profile-subscription-bulk-create-jobs'; + +export const identifyData = [ + { + id: 'klaviyo-identify-test-1', + name: 'klaviyo', + description: + 'Identify and Subscribe user where the user doesnot exists[mock] (without suppression status code feature from server)', + scenario: 'Business + Framework', + successCriteria: + 'Response should containt two payloads one for profile updation and other for subscription, response status code should be 200', + comment: + 'Reasoning: As suppression status code feature is not enabled from server, so we would expect 2 responses from transformer one for profile updation (deafult behaviour) and other for subscription', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination, + message: generateSimplifiedIdentifyPayload({ + context: { + traits: commonTraits, + }, + anonymousId, + userId, + sentAt, + }), + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: transformResultBuilder({ + userId: '', + method: 'PATCH', + endpoint: commonUserUpdateEndpoint, + headers: commonOutputHeaders, + JSON: { + data: { + type: 'profile', + attributes: commonOutputUserProps, + id: '01GW3PHVY0MTCDGS0A1612HARX', + }, + }, + }), + statusCode: 200, + }, + { + output: transformResultBuilder({ + method: 'POST', + userId: '', + endpoint: subscribeEndpoint, + headers: commonOutputHeaders, + JSON: { + data: { + type: 'profile-subscription-bulk-create-job', + attributes: commonOutputSubscriptionProps, + }, + }, + }), + statusCode: 200, + }, + ], + }, + }, + }, + { + id: 'klaviyo-identify-test-2', + name: 'klaviyo', + description: 'Identify call for with flattenProperties enabled in destination config', + scenario: 'Business', + successCriteria: + 'The profile updation response should contain the flattened properties of the friend object', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: overrideDestination(destination, { flattenProperties: true }), + message: generateSimplifiedIdentifyPayload({ + sentAt, + userId, + context: { + traits: { + ...commonTraits, + friend: { + names: { + first: 'Alice', + last: 'Smith', + }, + age: 25, + }, + }, + }, + anonymousId, + originalTimestamp, + }), + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: transformResultBuilder({ + userId: '', + method: 'PATCH', + endpoint: commonUserUpdateEndpoint, + headers: commonOutputHeaders, + JSON: { + data: { + type: 'profile', + id: '01GW3PHVY0MTCDGS0A1612HARX', + attributes: { + ...commonOutputUserProps, + properties: { + ...commonOutputUserProps.properties, + 'friend.age': 25, + 'friend.names.first': 'Alice', + 'friend.names.last': 'Smith', + }, + }, + }, + }, + }), + statusCode: 200, + }, + { + output: transformResultBuilder({ + userId: '', + method: 'POST', + endpoint: subscribeEndpoint, + headers: commonOutputHeaders, + JSON: { + data: { + type: 'profile-subscription-bulk-create-job', + attributes: commonOutputSubscriptionProps, + }, + }, + }), + statusCode: 200, + }, + ], + }, + }, + }, + { + id: 'klaviyo-identify-test-3', + name: 'klaviyo', + description: 'Negative Test Case for Profile updation call and subcribe user', + scenario: 'Business + Framework', + successCriteria: + 'Response should contain error message and status code should be 500, as we are getting a network error from klaviyo', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + publicApiKey: 'dummyPublicApiKey', + privateApiKey: 'dummyPrivateApiKeyforfailure', + }, + }, + message: generateSimplifiedIdentifyPayload({ + sentAt, + userId, + context: { + traits: { + ...commonTraits, + email: 'test3@rudderstack.com', + }, + }, + anonymousId, + originalTimestamp, + }), + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: + '{"message":"Failed to create user due to \\"\\"","destinationResponse":"\\"\\""}', + statTags: { + destType: 'KLAVIYO', + errorCategory: 'network', + errorType: 'retryable', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 500, + }, + ], + }, + }, + }, + { + id: 'klaviyo-identify-test-4', + name: 'klaviyo', + description: 'Profile create update without subscribing the user', + scenario: 'Business', + successCriteria: + 'Response should contain only profile update payload and status code should be 200 as subscribe is set to false in the payload', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination, + message: generateSimplifiedIdentifyPayload({ + sentAt, + userId, + context: { + traits: { + ...commonTraits, + properties: { ...commonTraits.properties, subscribe: false }, + }, + }, + anonymousId, + originalTimestamp, + }), + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: transformResultBuilder({ + method: 'PATCH', + endpoint: commonUserUpdateEndpoint, + headers: commonOutputHeaders, + JSON: { + data: { + type: 'profile', + attributes: commonOutputUserProps, + id: '01GW3PHVY0MTCDGS0A1612HARX', + }, + }, + userId: '', + }), + statusCode: 200, + }, + ], + }, + }, + }, + { + id: 'klaviyo-identify-test-5', + name: 'klaviyo', + description: 'Identify call with enforceEmailAsPrimary enabled in destination config', + scenario: 'Business', + successCriteria: + 'Response should contain two payloads one for profile updation and other for subscription, response status code should be 200, for the profile updation payload there should be no external_id field in the payload as enforceEmailAsPrimary is set to true in the destination config and the userId should be mapped to _id field in the properties object', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: overrideDestination(destination, { enforceEmailAsPrimary: true }), + message: generateSimplifiedIdentifyPayload({ + sentAt, + userId, + context: { + traits: commonTraits, + }, + anonymousId, + originalTimestamp, + }), + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: transformResultBuilder({ + userId: '', + method: 'PATCH', + endpoint: commonUserUpdateEndpoint, + headers: commonOutputHeaders, + JSON: { + data: { + type: 'profile', + attributes: removeUndefinedAndNullValues({ + ...commonOutputUserProps, + properties: { + ...commonOutputUserProps.properties, + _id: userId, + }, + // remove external_id from the payload + external_id: undefined, + }), + id: '01GW3PHVY0MTCDGS0A1612HARX', + }, + }, + }), + statusCode: 200, + }, + { + output: transformResultBuilder({ + userId: '', + method: 'POST', + endpoint: subscribeEndpoint, + headers: commonOutputHeaders, + JSON: { + data: { + type: 'profile-subscription-bulk-create-job', + attributes: commonOutputSubscriptionProps, + }, + }, + }), + statusCode: 200, + }, + ], + }, + }, + }, + { + id: 'klaviyo-identify-test-6', + name: 'klaviyo', + description: 'Identify call without user custom Properties', + scenario: 'Business', + successCriteria: + 'Response should contain two payloads one for profile updation and other for subscription, response status code should be 200, for the profile updation payload does not have any custom properties in the payload', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: destination, + message: generateSimplifiedIdentifyPayload({ + sentAt, + userId, + context: { + traits: removeUndefinedAndNullValues({ + ...commonTraits, + Flagged: undefined, + Residence: undefined, + }), + }, + anonymousId, + originalTimestamp, + }), + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: transformResultBuilder({ + userId: '', + method: 'PATCH', + endpoint: commonUserUpdateEndpoint, + headers: commonOutputHeaders, + JSON: { + data: { + type: 'profile', + attributes: removeUndefinedAndNullValues({ + ...commonOutputUserProps, + properties: undefined, + }), + id: '01GW3PHVY0MTCDGS0A1612HARX', + }, + }, + }), + statusCode: 200, + }, + { + output: transformResultBuilder({ + userId: '', + method: 'POST', + endpoint: subscribeEndpoint, + headers: commonOutputHeaders, + JSON: { + data: { + type: 'profile-subscription-bulk-create-job', + attributes: commonOutputSubscriptionProps, + }, + }, + }), + statusCode: 200, + }, + ], + }, + }, + }, + { + id: 'klaviyo-identify-test-7', + name: 'klaviyo', + description: 'Identify call without email and phone & enforceEmailAsPrimary enabled from UI', + scenario: 'Business', + successCriteria: + 'Response should contain error message and status code should be 400, as we are not sending email and phone in the payload and enforceEmailAsPrimary is enabled from UI', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: overrideDestination(destination, { enforceEmailAsPrimary: true }), + message: generateSimplifiedIdentifyPayload({ + sentAt, + userId, + context: { + traits: removeUndefinedAndNullValues({ + ...commonTraits, + email: undefined, + phone: undefined, + }), + }, + anonymousId, + originalTimestamp, + }), + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'None of email and phone are present in the payload', + statTags: { + destType: 'KLAVIYO', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, +]; diff --git a/test/integrations/destinations/klaviyo/processor/screenTestData.ts b/test/integrations/destinations/klaviyo/processor/screenTestData.ts new file mode 100644 index 0000000000..3779747a4e --- /dev/null +++ b/test/integrations/destinations/klaviyo/processor/screenTestData.ts @@ -0,0 +1,97 @@ +import { generateSimplifiedPageOrScreenPayload, transformResultBuilder } from '../../../testUtils'; + +const destination = { + Config: { + publicApiKey: 'dummyPublicApiKey', + privateApiKey: 'dummyPrivateApiKey', + }, +}; + +export const screenTestData = [ + { + id: 'klaviyo-screen-test-1', + name: 'klaviyo', + description: 'Screen event call with properties and contextual traits', + scenario: 'Business', + successCriteria: + 'Response should contain only event payload and status code should be 200, for the event payload should contain properties and contextual traits in the payload', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination, + message: generateSimplifiedPageOrScreenPayload( + { + event: 'TestEven001', + sentAt: '2021-01-25T16:12:02.048Z', + userId: 'sajal12', + context: { + traits: { + id: 'user@1', + age: '22', + email: 'test@rudderstack.com', + phone: '9112340375', + anonymousId: '9c6bd77ea9da3e68', + }, + }, + properties: { + PreviouslyVicePresident: true, + YearElected: 1801, + VicePresidents: ['Aaron Burr', 'George Clinton'], + }, + anonymousId: '9c6bd77ea9da3e68', + originalTimestamp: '2021-01-25T15:32:56.409Z', + }, + 'screen', + ), + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: transformResultBuilder({ + method: 'POST', + endpoint: 'https://a.klaviyo.com/api/events', + headers: { + Accept: 'application/json', + Authorization: 'Klaviyo-API-Key dummyPrivateApiKey', + 'Content-Type': 'application/json', + revision: '2023-02-22', + }, + JSON: { + data: { + type: 'event', + attributes: { + metric: { + name: 'TestEven001', + }, + properties: { + PreviouslyVicePresident: true, + YearElected: 1801, + VicePresidents: ['Aaron Burr', 'George Clinton'], + }, + profile: { + $email: 'test@rudderstack.com', + $phone_number: '9112340375', + $id: 'sajal12', + age: '22', + }, + }, + }, + }, + userId: '', + }), + statusCode: 200, + }, + ], + }, + }, + }, +]; diff --git a/test/integrations/destinations/klaviyo/processor/trackTestData.ts b/test/integrations/destinations/klaviyo/processor/trackTestData.ts new file mode 100644 index 0000000000..f3bbfb96b9 --- /dev/null +++ b/test/integrations/destinations/klaviyo/processor/trackTestData.ts @@ -0,0 +1,316 @@ +import { + generateSimplifiedTrackPayload, + generateTrackPayload, + overrideDestination, + transformResultBuilder, +} from '../../../testUtils'; + +const destination = { + Config: { + publicApiKey: 'dummyPublicApiKey', + privateApiKey: 'dummyPrivateApiKey', + }, +}; + +const commonTraits = { + id: 'user@1', + age: '22', + anonymousId: '9c6bd77ea9da3e68', +}; + +const commonProps = { + PreviouslVicePresident: true, + YearElected: 1801, + VicePresidents: ['AaronBurr', 'GeorgeClinton'], +}; + +const commonOutputHeaders = { + Accept: 'application/json', + Authorization: 'Klaviyo-API-Key dummyPrivateApiKey', + 'Content-Type': 'application/json', + revision: '2023-02-22', +}; + +const eventEndPoint = 'https://a.klaviyo.com/api/events'; + +export const trackTestData = [ + { + id: 'klaviyo-track-test-1', + name: 'klaviyo', + description: 'Track event call with flatten properties enabled in destination config', + scenario: 'Business', + successCriteria: + 'Response should contain only event payload and status code should be 200, for the event payload should contain flattened properties in the payload', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: overrideDestination(destination, { flattenProperties: true }), + message: generateSimplifiedTrackPayload({ + type: 'track', + event: 'TestEven001', + sentAt: '2021-01-25T16:12:02.048Z', + userId: 'sajal12', + context: { + traits: { + ...commonTraits, + email: 'test@rudderstack.com', + phone: '9112340375', + plan_details: { + plan_type: 'gold', + duration: '3 months', + }, + }, + }, + properties: { + vicePresdentInfo: commonProps, + }, + anonymousId: '9c6bd77ea9da3e68', + originalTimestamp: '2021-01-25T15:32:56.409Z', + }), + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: transformResultBuilder({ + method: 'POST', + endpoint: eventEndPoint, + headers: commonOutputHeaders, + JSON: { + data: { + type: 'event', + attributes: { + metric: { + name: 'TestEven001', + }, + properties: { + 'vicePresdentInfo.PreviouslVicePresident': true, + 'vicePresdentInfo.VicePresidents': ['AaronBurr', 'GeorgeClinton'], + 'vicePresdentInfo.YearElected': 1801, + }, + profile: { + $email: 'test@rudderstack.com', + $phone_number: '9112340375', + $id: 'sajal12', + age: '22', + 'plan_details.plan_type': 'gold', + 'plan_details.duration': '3 months', + }, + }, + }, + }, + userId: '', + }), + statusCode: 200, + }, + ], + }, + }, + }, + { + id: 'klaviyo-track-test-2', + name: 'klaviyo', + description: 'Simple track event call', + scenario: 'Business', + successCriteria: + 'Response should contain only event payload and status code should be 200, for the event payload should contain contextual traits and properties in the payload', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination, + message: generateSimplifiedTrackPayload({ + type: 'track', + event: 'TestEven002', + sentAt: '2021-01-25T16:12:02.048Z', + userId: 'sajal12', + context: { + traits: { + ...commonTraits, + name: 'Test', + email: 'test@rudderstack.com', + phone: '9112340375', + description: 'Sample description', + }, + }, + properties: { + ...commonProps, + revenue: 3000, + }, + anonymousId: '9c6bd77ea9da3e68', + originalTimestamp: '2021-01-25T15:32:56.409Z', + }), + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: transformResultBuilder({ + method: 'POST', + endpoint: eventEndPoint, + headers: commonOutputHeaders, + JSON: { + data: { + type: 'event', + attributes: { + metric: { + name: 'TestEven002', + }, + properties: commonProps, + profile: { + $email: 'test@rudderstack.com', + $phone_number: '9112340375', + $id: 'sajal12', + age: '22', + name: 'Test', + description: 'Sample description', + }, + value: 3000, + }, + }, + }, + userId: '', + }), + statusCode: 200, + }, + ], + }, + }, + }, + { + id: 'klaviyo-track-test-3', + name: 'klaviyo', + description: 'Track event call, with make email or phone as primary identifier toggle on', + scenario: 'Business', + successCriteria: + 'Response should contain only event payload and status code should be 200, for the event payload should contain contextual traits and properties in the payload, and email should be mapped to $email and userId should be mapped to _id', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: overrideDestination(destination, { enforceEmailAsPrimary: true }), + message: generateSimplifiedTrackPayload({ + type: 'track', + event: 'TestEven001', + sentAt: '2021-01-25T16:12:02.048Z', + userId: 'sajal12', + context: { + traits: { + ...commonTraits, + email: 'test@rudderstack.com', + phone: '9112340375', + }, + }, + properties: commonProps, + anonymousId: '9c6bd77ea9da3e68', + originalTimestamp: '2021-01-25T15:32:56.409Z', + }), + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + output: transformResultBuilder({ + method: 'POST', + endpoint: eventEndPoint, + headers: commonOutputHeaders, + JSON: { + data: { + type: 'event', + attributes: { + metric: { + name: 'TestEven001', + }, + properties: commonProps, + profile: { + $email: 'test@rudderstack.com', + $phone_number: '9112340375', + age: '22', + _id: 'sajal12', + }, + }, + }, + }, + userId: '', + }), + statusCode: 200, + }, + ], + }, + }, + }, + { + id: 'klaviyo-track-test-4', + name: 'klaviyo', + description: + 'Track event call, without email and phone & with (make email or phone as primary identifier) toggle on', + scenario: 'Business', + successCriteria: + 'Response should contain error message and status code should be 400, as we are not sending email and phone in the payload and enforceEmailAsPrimary is enabled from UI', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: overrideDestination(destination, { enforceEmailAsPrimary: true }), + message: generateSimplifiedTrackPayload({ + type: 'track', + event: 'TestEven001', + sentAt: '2021-01-25T16:12:02.048Z', + userId: 'sajal12', + context: { + traits: commonTraits, + }, + properties: commonProps, + anonymousId: '9c6bd77ea9da3e68', + originalTimestamp: '2021-01-25T15:32:56.409Z', + }), + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'None of email and phone are present in the payload', + statTags: { + destType: 'KLAVIYO', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, +]; diff --git a/test/integrations/destinations/klaviyo/processor/validationTestData.ts b/test/integrations/destinations/klaviyo/processor/validationTestData.ts new file mode 100644 index 0000000000..59556cfe5f --- /dev/null +++ b/test/integrations/destinations/klaviyo/processor/validationTestData.ts @@ -0,0 +1,62 @@ +export const validationTestData = [ + { + id: 'klaviyo-validation-test-1', + name: 'klaviyo', + description: '[Error]: Check for unsupported message type', + scenario: 'Framework', + successCriteria: + 'Response should contain error message and status code should be 400, as we are sending a message type which is not supported by Klaviyo destination and the error message should be Event type random is not supported', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + destination: { + Config: { + publicApiKey: 'dummyPublicApiKey', + privateApiKey: 'dummyPrivateApiKey', + }, + }, + message: { + userId: 'user123', + type: 'random', + groupId: 'XUepkK', + traits: { + subscribe: true, + }, + context: { + traits: { + email: 'test@rudderstack.com', + phone: '+12 345 678 900', + consent: 'email', + }, + }, + timestamp: '2020-01-21T00:21:34.208Z', + }, + }, + ], + }, + }, + output: { + response: { + status: 200, + body: [ + { + error: 'Event type random is not supported', + statTags: { + destType: 'KLAVIYO', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + }, + statusCode: 400, + }, + ], + }, + }, + }, +]; diff --git a/test/integrations/destinations/klaviyo/router/data.ts b/test/integrations/destinations/klaviyo/router/data.ts index 0fb735d6bf..83b494199c 100644 --- a/test/integrations/destinations/klaviyo/router/data.ts +++ b/test/integrations/destinations/klaviyo/router/data.ts @@ -1,7 +1,10 @@ export const data = [ { + id: 'klaviyo-router-test-1', name: 'klaviyo', - description: 'Test 0', + description: 'Basic Router Test to test multiple payloads', + scenario: 'Framework', + successCriteria: 'All the subscription events should be batched', feature: 'router', module: 'destination', version: 'v0', diff --git a/test/integrations/destinations/tiktok_ads/mocks.ts b/test/integrations/destinations/tiktok_ads/mocks.ts index 6003027d23..a5d8fc4a63 100644 --- a/test/integrations/destinations/tiktok_ads/mocks.ts +++ b/test/integrations/destinations/tiktok_ads/mocks.ts @@ -1,6 +1,5 @@ import config from '../../../../src/v0/destinations/tiktok_ads/config'; export const defaultMockFns = () => { - - jest.replaceProperty(config, 'maxBatchSizeV2', 3) - }; + jest.replaceProperty(config, 'maxBatchSizeV2', 3); +}; diff --git a/test/integrations/destinations/tiktok_ads/processor/data.ts b/test/integrations/destinations/tiktok_ads/processor/data.ts index 21a12e5174..334dba9440 100644 --- a/test/integrations/destinations/tiktok_ads/processor/data.ts +++ b/test/integrations/destinations/tiktok_ads/processor/data.ts @@ -5141,7 +5141,7 @@ export const data = [ channel: 'web', context: { traits: { - email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f' + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', }, userAgent: 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', @@ -5176,7 +5176,7 @@ export const data = [ content_id: '1197218', }, ], - url: "http://demo.mywebsite.com/purchase", + url: 'http://demo.mywebsite.com/purchase', clickId: 'dummyclickId', currency: 'USD', value: 46, @@ -5225,7 +5225,7 @@ export const data = [ event_id: '1616318632825_357', event_time: 1600372167, properties: { - content_type: "product", + content_type: 'product', contents: [ { price: 8, @@ -5244,10 +5244,10 @@ export const data = [ value: 46, }, page: { - url: 'http://demo.mywebsite.com/purchase' + url: 'http://demo.mywebsite.com/purchase', }, user: { - locale: "en-US", + locale: 'en-US', email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', external_id: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', @@ -5273,7 +5273,8 @@ export const data = [ }, { name: 'tiktok_ads', - description: 'Test 33 -> V2 -> Event mapped to one standard event with contents present as it is in properties', + description: + 'Test 33 -> V2 -> Event mapped to one standard event with contents present as it is in properties', feature: 'processor', module: 'destination', version: 'v0', @@ -5286,7 +5287,7 @@ export const data = [ channel: 'web', context: { traits: { - email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f' + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', }, page: { url: 'http://demo.mywebsite.com/purchase', @@ -5352,7 +5353,7 @@ export const data = [ { from: 'addToCart', to: 'download', - } + }, ], }, }, @@ -5386,7 +5387,7 @@ export const data = [ event_id: '1616318632825_357', event_time: 1600372167, properties: { - content_type: "product", + content_type: 'product', contents: [ { price: 8, @@ -5409,7 +5410,7 @@ export const data = [ referrer: 'http://demo.mywebsite.com', }, user: { - locale: "en-US", + locale: 'en-US', email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', external_id: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', @@ -5448,10 +5449,10 @@ export const data = [ channel: 'web', context: { traits: { - email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f' + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', }, page: { - url: 'http://demo.mywebsite.com/purchase' + url: 'http://demo.mywebsite.com/purchase', }, userAgent: 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', @@ -5517,7 +5518,7 @@ export const data = [ { from: 'AddToCart', to: 'AddToWishlist', - } + }, ], }, }, @@ -5551,7 +5552,7 @@ export const data = [ event_id: '1616318632825_357', event_time: 1600372167, properties: { - content_type: "product", + content_type: 'product', contents: [ { price: 8, @@ -5573,7 +5574,7 @@ export const data = [ url: 'http://demo.mywebsite.com/purchase', }, user: { - locale: "en-US", + locale: 'en-US', email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', external_id: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', @@ -5587,7 +5588,7 @@ export const data = [ event_id: '1616318632825_357', event_time: 1600372167, properties: { - content_type: "product", + content_type: 'product', contents: [ { price: 8, @@ -5609,7 +5610,7 @@ export const data = [ url: 'http://demo.mywebsite.com/purchase', }, user: { - locale: "en-US", + locale: 'en-US', email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', external_id: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', @@ -5657,7 +5658,10 @@ export const data = [ externalId: [ { type: 'tiktokExternalId', - id: ['f0e388f53921a51f0bb0fc8a2944109ec188b5', '1f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc'], + id: [ + 'f0e388f53921a51f0bb0fc8a2944109ec188b5', + '1f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + ], }, ], }, @@ -5687,8 +5691,7 @@ export const data = [ currency: 'USD', value: 46, phone: ['+12345432', '+134234325'], - email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f' - + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', }, integrations: { All: true, @@ -5710,7 +5713,7 @@ export const data = [ { from: 'AddToCart', to: 'AddToWishlist', - } + }, ], }, }, @@ -5744,7 +5747,7 @@ export const data = [ event_id: '1616318632825_357', event_time: 1600372167, properties: { - content_type: "product", + content_type: 'product', contents: [ { price: 8, @@ -5769,7 +5772,10 @@ export const data = [ user: { phone: ['+12345432', '+134234325'], email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', - external_id: ['f0e388f53921a51f0bb0fc8a2944109ec188b5', '1f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc'], + external_id: [ + 'f0e388f53921a51f0bb0fc8a2944109ec188b5', + '1f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + ], ip: '13.57.97.131', user_agent: 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', @@ -5780,7 +5786,7 @@ export const data = [ event_id: '1616318632825_357', event_time: 1600372167, properties: { - content_type: "product", + content_type: 'product', contents: [ { price: 8, @@ -5805,7 +5811,10 @@ export const data = [ user: { phone: ['+12345432', '+134234325'], email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', - external_id: ['f0e388f53921a51f0bb0fc8a2944109ec188b5', '1f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc'], + external_id: [ + 'f0e388f53921a51f0bb0fc8a2944109ec188b5', + '1f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + ], ip: '13.57.97.131', user_agent: 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', @@ -5841,7 +5850,7 @@ export const data = [ channel: 'web', context: { traits: { - email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f' + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', }, page: { url: 'http://demo.mywebsite.com/purchase', @@ -5979,7 +5988,7 @@ export const data = [ accessToken: 'dummyAccessToken', pixelCode: '{{PIXEL-CODE}}', hashUserProperties: false, - version: 'v2' + version: 'v2', }, }, }, @@ -5992,8 +6001,7 @@ export const data = [ body: [ { statusCode: 400, - error: - 'Event type is required', + error: 'Event type is required', statTags: { errorCategory: 'dataValidation', errorType: 'instrumentation', @@ -6048,8 +6056,7 @@ export const data = [ body: [ { statusCode: 400, - error: - 'Event name is required', + error: 'Event name is required', statTags: { errorCategory: 'dataValidation', errorType: 'instrumentation', @@ -6103,8 +6110,7 @@ export const data = [ body: [ { statusCode: 400, - error: - 'Access Token not found. Aborting', + error: 'Access Token not found. Aborting', statTags: { errorCategory: 'dataValidation', errorType: 'configuration', @@ -6158,8 +6164,7 @@ export const data = [ body: [ { statusCode: 400, - error: - 'Pixel Code not found. Aborting', + error: 'Pixel Code not found. Aborting', statTags: { errorCategory: 'dataValidation', errorType: 'configuration', @@ -6188,7 +6193,7 @@ export const data = [ channel: 'web', context: { traits: { - email: 'abc@xyz.com' + email: 'abc@xyz.com', }, page: { url: 'http://demo.mywebsite.com/purchase', @@ -6200,7 +6205,10 @@ export const data = [ externalId: [ { type: 'tiktokExternalId', - id: ['f0e388f53921a51f0bb0fc8a2944109ec188b5', '1f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc'], + id: [ + 'f0e388f53921a51f0bb0fc8a2944109ec188b5', + '1f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + ], }, ], }, @@ -6229,7 +6237,7 @@ export const data = [ clickId: 'dummyclickId', currency: 'USD', value: 46, - phone: ['+12345432', '+134234325'] + phone: ['+12345432', '+134234325'], }, integrations: { All: true, @@ -6251,7 +6259,7 @@ export const data = [ { from: 'AddToCart', to: 'AddToWishlist', - } + }, ], }, }, @@ -6285,7 +6293,7 @@ export const data = [ event_id: '1616318632825_357', event_time: 1600372167, properties: { - content_type: "product", + content_type: 'product', contents: [ { price: 8, @@ -6309,16 +6317,19 @@ export const data = [ }, user: { email: 'ee278943de84e5d6243578ee1a1057bcce0e50daad9755f45dfa64b60b13bc5d', - external_id: ["3e0c7a51acd326b87f29596e38c22cbeb732df37bc5c8f5f524c14b55d3472db", "f8be04e62f5a3eba31c8b9380843666f28f3ab5f44a380f47fac04e9ce7b2168",], + external_id: [ + '3e0c7a51acd326b87f29596e38c22cbeb732df37bc5c8f5f524c14b55d3472db', + 'f8be04e62f5a3eba31c8b9380843666f28f3ab5f44a380f47fac04e9ce7b2168', + ], ip: '13.57.97.131', phone: [ - "49a15e38bdc2572d362a924c2ddd100baed0fe29db44270d3700fcef03b18c39", - "5a6a7a09b18278e220312ce26d711ff7c8263d0965ee3b1d26b1b6f0ac7e71b3", + '49a15e38bdc2572d362a924c2ddd100baed0fe29db44270d3700fcef03b18c39', + '5a6a7a09b18278e220312ce26d711ff7c8263d0965ee3b1d26b1b6f0ac7e71b3', ], user_agent: 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', }, - } + }, ], }, JSON_ARRAY: {}, @@ -6349,7 +6360,7 @@ export const data = [ channel: 'web', context: { traits: { - email: 'abc@xyz.com' + email: 'abc@xyz.com', }, page: { url: 'http://demo.mywebsite.com/purchase', @@ -6361,7 +6372,10 @@ export const data = [ externalId: [ { type: 'tiktokExternalId', - id: ['f0e388f53921a51f0bb0fc8a2944109ec188b5', '1f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc'], + id: [ + 'f0e388f53921a51f0bb0fc8a2944109ec188b5', + '1f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', + ], }, ], }, @@ -6374,8 +6388,8 @@ export const data = [ properties: { order_id: 1234, shop_id: 4567, - description: "Viewed games", - query: "New age games", + description: 'Viewed games', + query: 'New age games', contentType: 'product_group', eventId: '1616318632825_357', products: [ @@ -6402,7 +6416,7 @@ export const data = [ clickId: 'dummyclickId', currency: 'USD', value: 46, - phone: ['+12345432', '+134234325'] + phone: ['+12345432', '+134234325'], }, integrations: { All: true, @@ -6424,7 +6438,7 @@ export const data = [ { from: 'AddToCart', to: 'AddToWishlist', - } + }, ], }, }, @@ -6458,11 +6472,11 @@ export const data = [ event_id: '1616318632825_357', event_time: 1600372167, properties: { - order_id: "1234", - shop_id: "4567", - description: "Viewed games", - query: "New age games", - content_type: "product_group", + order_id: '1234', + shop_id: '4567', + description: 'Viewed games', + query: 'New age games', + content_type: 'product_group', contents: [ { price: 14, @@ -6470,13 +6484,13 @@ export const data = [ content_category: 'Games', content_id: '123', content_name: 'Monopoly', - brand: 'adidas' + brand: 'adidas', }, { price: 3.45, quantity: 2, content_id: '345', - content_name: 'UNO' + content_name: 'UNO', }, ], currency: 'USD', @@ -6488,16 +6502,19 @@ export const data = [ }, user: { email: 'ee278943de84e5d6243578ee1a1057bcce0e50daad9755f45dfa64b60b13bc5d', - external_id: ["3e0c7a51acd326b87f29596e38c22cbeb732df37bc5c8f5f524c14b55d3472db", "f8be04e62f5a3eba31c8b9380843666f28f3ab5f44a380f47fac04e9ce7b2168",], + external_id: [ + '3e0c7a51acd326b87f29596e38c22cbeb732df37bc5c8f5f524c14b55d3472db', + 'f8be04e62f5a3eba31c8b9380843666f28f3ab5f44a380f47fac04e9ce7b2168', + ], ip: '13.57.97.131', phone: [ - "49a15e38bdc2572d362a924c2ddd100baed0fe29db44270d3700fcef03b18c39", - "5a6a7a09b18278e220312ce26d711ff7c8263d0965ee3b1d26b1b6f0ac7e71b3", + '49a15e38bdc2572d362a924c2ddd100baed0fe29db44270d3700fcef03b18c39', + '5a6a7a09b18278e220312ce26d711ff7c8263d0965ee3b1d26b1b6f0ac7e71b3', ], user_agent: 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', }, - } + }, ], }, JSON_ARRAY: {}, @@ -6528,7 +6545,7 @@ export const data = [ channel: 'web', context: { traits: { - email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f' + email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', }, page: { url: 'http://demo.mywebsite.com/purchase', @@ -6579,7 +6596,7 @@ export const data = [ { from: 'addToCart', to: 'download', - } + }, ], }, }, @@ -6613,13 +6630,15 @@ export const data = [ event_id: '1616318632825_357', event_time: 1600372167, properties: { - content_type: "product", - contents: [{ - price: 8, - quantity: 2, - content_type: 'socks', - content_id: '1077218', - }], + content_type: 'product', + contents: [ + { + price: 8, + quantity: 2, + content_type: 'socks', + content_id: '1077218', + }, + ], currency: 'USD', value: 46, }, @@ -6628,7 +6647,7 @@ export const data = [ referrer: 'http://demo.mywebsite.com', }, user: { - locale: "en-US", + locale: 'en-US', email: 'dd6ff77f54e2106661089bae4d40cdb600979bf7edc9eb65c0942ba55c7c2d7f', external_id: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', @@ -6687,7 +6706,7 @@ export const data = [ accessToken: 'dummyAccessToken', pixelCode: '{{PIXEL-CODE}}', hashUserProperties: false, - version: "v2" + version: 'v2', }, }, }, @@ -6716,7 +6735,8 @@ export const data = [ }, { name: 'tiktok_ads', - description: 'Test 45-> events 1.0 build contents from properties.product.$ where length of prodicts is 0', + description: + 'Test 45-> events 1.0 build contents from properties.product.$ where length of prodicts is 0', feature: 'processor', module: 'destination', version: 'v0', diff --git a/test/integrations/destinations/tiktok_ads/router/data.ts b/test/integrations/destinations/tiktok_ads/router/data.ts index cbf8da0cf8..0298979212 100644 --- a/test/integrations/destinations/tiktok_ads/router/data.ts +++ b/test/integrations/destinations/tiktok_ads/router/data.ts @@ -2749,7 +2749,6 @@ export const data = [ }, }, ], - }, }, }, diff --git a/test/integrations/testUtils.ts b/test/integrations/testUtils.ts index f5be8107ed..09f3a82d40 100644 --- a/test/integrations/testUtils.ts +++ b/test/integrations/testUtils.ts @@ -4,7 +4,10 @@ import { MockHttpCallsData, TestCaseData } from './testTypes'; import MockAdapter from 'axios-mock-adapter'; import isMatch from 'lodash/isMatch'; import { OptionValues } from 'commander'; +import { removeUndefinedAndNullValues } from '@rudderstack/integrations-lib'; +const generateAlphanumericId = (size = 36) => + [...Array(size)].map(() => ((Math.random() * size) | 0).toString(size)).join(''); export const getTestDataFilePaths = (dirPath: string, opts: OptionValues): string[] => { const globPattern = join(dirPath, '**', 'data.ts'); let testFilePaths = globSync(globPattern); @@ -74,3 +77,290 @@ export const overrideDestination = (destination, overrideConfigValues) => { Config: { ...destination.Config, ...overrideConfigValues }, }); }; + +export const generateIndentifyPayload = (parametersOverride: any) => { + const payload = { + type: 'identify', + sentAt: parametersOverride.sentAt || '2021-01-03T17:02:53.195Z', + userId: parametersOverride.userId || 'default-userId', + channel: 'web', + context: removeUndefinedAndNullValues({ + externalId: parametersOverride.externalId, + os: { name: '', version: '1.12.3' }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + traits: parametersOverride.context.traits, + locale: 'en-US', + device: { token: 'token', id: 'id', type: 'ios' }, + screen: { density: 2 }, + library: { name: 'RudderLabs JavaScript SDK', version: '1.1.11' }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }), + traits: parametersOverride.traits, + integrations: parametersOverride.integrations, + rudderId: parametersOverride.rudderId || generateAlphanumericId(36), + messageId: parametersOverride.messageId || generateAlphanumericId(36), + anonymousId: parametersOverride.anonymousId || 'default-anonymousId', + originalTimestamp: parametersOverride.originalTimestamp || '2021-01-03T17:02:53.193Z', + }; + + return removeUndefinedAndNullValues(payload); +}; + +export const generateSimplifiedIdentifyPayload = (parametersOverride: any) => { + return removeUndefinedAndNullValues({ + type: 'identify', + sentAt: parametersOverride.sentAt || '2021-01-03T17:02:53.195Z', + userId: parametersOverride.userId || 'default-userId', + traits: parametersOverride.traits, + integrations: parametersOverride.integrations, + rudderId: parametersOverride.rudderId || generateAlphanumericId(36), + messageId: parametersOverride.messageId || generateAlphanumericId(36), + context: { + externalId: parametersOverride.externalId, + traits: parametersOverride.context.traits, + }, + anonymousId: parametersOverride.anonymousId || 'default-anonymousId', + originalTimestamp: parametersOverride.originalTimestamp || '2021-01-03T17:02:53.193Z', + }); +}; + +export const generateTrackPayload = (parametersOverride: any) => { + const payload = { + type: 'track', + sentAt: parametersOverride.sentAt || '2021-01-03T17:02:53.195Z', + userId: parametersOverride.userId || 'default-user-id', + channel: 'web', + context: removeUndefinedAndNullValues({ + externalId: parametersOverride.externalId, + os: { name: '', version: '1.12.3' }, + app: { + name: 'RudderLabs JavaScript SDK', + build: '1.0.0', + version: '1.1.11', + namespace: 'com.rudderlabs.javascript', + }, + traits: parametersOverride.context.traits, + locale: 'en-US', + device: { token: 'token', id: 'id', type: 'ios' }, + screen: { density: 2 }, + library: { name: 'RudderLabs JavaScript SDK', version: '1.1.11' }, + campaign: {}, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', + }), + rudderId: parametersOverride.rudderId || generateAlphanumericId(36), + messageId: parametersOverride.messageId || generateAlphanumericId(36), + anonymousId: parametersOverride.anonymousId || 'default-anonymousId', + originalTimestamp: parametersOverride.originalTimestamp || '2021-01-03T17:02:53.193Z', + timestamp: parametersOverride.timestamp, + event: parametersOverride.event || 'test-event', + integrations: parametersOverride.integrations, + properties: parametersOverride.properties, + }; + return removeUndefinedAndNullValues(payload); +}; + +export const generateSimplifiedTrackPayload = (parametersOverride: any) => { + return removeUndefinedAndNullValues({ + type: 'track', + sentAt: parametersOverride.sentAt || '2021-01-03T17:02:53.195Z', + userId: parametersOverride.userId || 'default-user-id', + event: parametersOverride.event || 'test-event', + properties: parametersOverride.properties, + integrations: parametersOverride.integrations, + rudderId: parametersOverride.rudderId || generateAlphanumericId(36), + messageId: parametersOverride.messageId || generateAlphanumericId(36), + context: removeUndefinedAndNullValues({ + externalId: parametersOverride.externalId, + traits: parametersOverride.context.traits, + }), + anonymousId: parametersOverride.anonymousId || 'default-anonymousId', + originalTimestamp: parametersOverride.originalTimestamp || '2021-01-03T17:02:53.193Z', + }); +}; + +export const generatePageOrScreenPayload = (parametersOverride: any, eventType: string) => { + const payload = { + channel: 'web', + userId: parametersOverride.userId || 'default-userId', + rudderId: parametersOverride.rudderId || generateAlphanumericId(36), + originalTimestamp: parametersOverride.originalTimestamp || '2022-04-26T05:17:09Z', + timestamp: parametersOverride.timestamp, + context: removeUndefinedAndNullValues({ + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + device: { + adTrackingEnabled: 'false', + advertisingId: 'T0T0T072-5e28-45a1-9eda-ce22a3e36d1a', + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + manufacturer: 'Google', + model: 'AOSP on IA Emulator', + name: 'generic_x86_arm', + type: 'ios', + attTrackingStatus: 3, + }, + ip: '0.0.0.0', + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + locale: 'en-US', + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, + traits: parametersOverride.context.traits, + externalId: parametersOverride.externalId, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', + }), + event: parametersOverride.event, + anonymousId: parametersOverride.anonymousId || 'default-anonymousId', + properties: parametersOverride.properties, + type: eventType || 'page', + integrations: parametersOverride.integrations, + sentAt: '2022-04-20T15:20:57Z', + }; + + return removeUndefinedAndNullValues(payload); +}; + +export const generateSimplifiedPageOrScreenPayload = ( + parametersOverride: any, + eventType: string, +) => { + return removeUndefinedAndNullValues({ + channel: 'web', + userId: parametersOverride.userId || 'default-userId', + type: eventType || 'page', + event: parametersOverride.event, + properties: parametersOverride.properties, + integrations: parametersOverride.integrations, + rudderId: parametersOverride.rudderId || generateAlphanumericId(36), + context: removeUndefinedAndNullValues({ + externalId: parametersOverride.externalId, + traits: parametersOverride.context.traits, + }), + timestamp: parametersOverride.timestamp, + anonymousId: parametersOverride.anonymousId || 'default-anonymousId', + originalTimestamp: parametersOverride.originalTimestamp || '2022-04-26T05:17:09Z', + }); +}; + +export const generateGroupPayload = (parametersOverride: any) => { + const payload = { + channel: 'web', + context: removeUndefinedAndNullValues({ + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.0.0', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', + locale: 'en-US', + ip: '0.0.0.0', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: parametersOverride.context.traits, + externalId: parametersOverride.externalId, + }), + messageId: parametersOverride.messageId || generateAlphanumericId(36), + session_id: parametersOverride.session_id || generateAlphanumericId(36), + originalTimestamp: parametersOverride.originalTimestamp || '2019-10-14T09:03:17.562Z', + timestamp: parametersOverride.timestamp, + anonymousId: parametersOverride.anonymousId || generateAlphanumericId(36), + userId: parametersOverride.userId || 'default-user-id', + type: 'group', + groupId: parametersOverride.groupId, + traits: parametersOverride.traits, + integrations: parametersOverride.integrations, + sentAt: parametersOverride.sentAt || '2019-10-14T09:03:22.563Z', + }; + return removeUndefinedAndNullValues(payload); +}; + +export const generateSimplifiedGroupPayload = (parametersOverride: any) => { + return removeUndefinedAndNullValues({ + channel: 'web', + userId: parametersOverride.userId || 'default-userId', + type: 'group', + groupId: parametersOverride.groupId, + traits: parametersOverride.traits, + integrations: parametersOverride.integrations, + context: removeUndefinedAndNullValues({ + externalId: parametersOverride.externalId, + traits: parametersOverride.context.traits, + }), + timestamp: parametersOverride.timestamp, + anonymousId: parametersOverride.anonymousId || generateAlphanumericId(36), + originalTimestamp: parametersOverride.originalTimestamp || '2019-10-14T09:03:17.562Z', + }); +}; + +export const transformResultBuilder = (matchData) => { + return removeUndefinedAndNullValues({ + version: '1', + type: 'REST', + userId: matchData.userId, + method: matchData.method || 'POST', + endpoint: matchData.endpoint || '', + headers: matchData.headers || {}, + params: matchData.params || {}, + body: { + JSON: matchData.JSON || {}, + JSON_ARRAY: matchData.JSON_ARRAY || {}, + XML: matchData.XML || {}, + FORM: matchData.FORM || {}, + }, + files: matchData.files || {}, + }); +}; + +export const compareObjects = (obj1, obj2, logPrefix = '', differences: string[] = []) => { + for (const key in obj1) { + if (obj1.hasOwnProperty(key)) { + const fullKey = logPrefix ? `${logPrefix}.${key}` : key; + + if (typeof obj1[key] === 'object' && typeof obj2[key] === 'object') { + compareObjects(obj1[key], obj2[key], fullKey, differences); + } else if (obj1[key] !== obj2[key]) { + differences.push(fullKey); + } + } + } + + // Check for keys in obj2 that are not present in obj1 + for (const key in obj2) { + if (obj2.hasOwnProperty(key) && !obj1.hasOwnProperty(key)) { + const fullKey = logPrefix ? `${logPrefix}.${key}` : key; + differences.push(fullKey); + } + } + + return differences; +}; diff --git a/test/test_reporter/reporter.ts b/test/test_reporter/reporter.ts new file mode 100644 index 0000000000..135f980398 --- /dev/null +++ b/test/test_reporter/reporter.ts @@ -0,0 +1,133 @@ +import fs from 'fs'; +import { compareObjects } from '../integrations/testUtils'; + +// Step 1: Generate the template HTML +const generateHTMLTemplate = () => ` + + + + + + Test Report + + + + + +

Test Report

+ + + + + + + + + + + + + + + + + +
Integration NameIdDescriptionSuccess CriteriaScenarioModuleFeatureAPI VersionTest InputTest OutputExpected OutputDiff KeysTest Status
+ + + +`; + +// Step 2: Iterate through each test data element and add it to the HTML template +const generateHTMLContent = (testData, expectedData, testStatus) => { + let htmlContent = ''; + let diffKeys: string[] = []; + diffKeys = compareObjects(testData.output.response.body, expectedData); + htmlContent += ` + + ${testData.name} + ${testData.id} + ${testData.description} + ${testData.successCriteria} + ${testData.scenario} + ${testData.module} + ${testData.feature} + ${testData.version} + ${JSON.stringify(testData.input.request.body)} + ${JSON.stringify(testData.output.response.body)} + ${JSON.stringify(expectedData)} + ${JSON.stringify(diffKeys)} + ${testStatus} + + + `; + + return htmlContent; +}; + +// Step 3: Write the HTML report to a file +export const generateTestReport = (testData, output, result) => { + fs.readFile('test_reports/test-report.html', 'utf8', (err, htmlTemplate) => { + if (err) { + console.error(err); + return; + } + + const htmlContent = generateHTMLContent(testData, output, result); + const finalHTML = htmlTemplate.replace('', htmlContent); + fs.writeFileSync('test_reports/test-report.html', finalHTML); + }); +}; + +export const initaliseReport = () => { + const htmlTemplate = generateHTMLTemplate(); + if (!fs.existsSync('test_reports')){ + fs.mkdirSync('test_reports'); +} + fs.writeFileSync('test_reports/test-report.html', htmlTemplate); + console.log('Report initialised'); +};